wl1271: Remove obsolete files

Change-Id: I19c9ee8b975db9d6946c39529a4b01e3ba75b098
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/wl1271/Android.mk b/wl1271/Android.mk
deleted file mode 100644
index bf78606..0000000
--- a/wl1271/Android.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-ifeq ($(BOARD_WLAN_DEVICE),wl1271)
-    include $(call all-subdir-makefiles)
-endif
diff --git a/wl1271/CUDK/Android.mk b/wl1271/CUDK/Android.mk
deleted file mode 100644
index 5053e7d..0000000
--- a/wl1271/CUDK/Android.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(call all-subdir-makefiles)
diff --git a/wl1271/CUDK/Makefile b/wl1271/CUDK/Makefile
deleted file mode 100644
index a5e96c8..0000000
--- a/wl1271/CUDK/Makefile
+++ /dev/null
@@ -1,111 +0,0 @@
-#
-# Build options
-#
-# compiling the OAL as static lib
-STATIC_LIB ?= y
-# compiling in debug mode
-DEBUG ?= y
-# build the supplicant
-BUILD_SUPPL ?= y
-# type of supplicant to build
-# WPA = Point to TI's supplicant
-# ANDROID = Will point to Android's supplicant
-SUPPL?=ANDROID
-# enable WPA enterprise authorization modes
-WPA_ENTERPRISE ?= y
-# add XCC support
-XCC ?= n
-
-#
-# Directories and files
-#
-WILINK_ROOT = ..
-CUDK_ROOT ?= $(WILINK_ROOT)/CUDK
-CU_DIR = $(CUDK_ROOT)/configurationutility
-
-LOGGER_DIR = $(CUDK_ROOT)/logger/linux
-OUTPUT_DIR ?= $(CUDK_ROOT)/output
-TI_OS_LIB_DIR=$(CUDK_ROOT)/os/linux/src
-ifeq ($(STATIC_LIB),y)
-        TI_OS_LIB = tiOsLib.a
-else
-        TI_OS_LIB = tiOsLib.so
-endif
-WLAN_LOADER_DIR = $(CUDK_ROOT)/tiwlan_loader/
-
-
-#
-# Targets
-#
-CU_TARGET = $(OUTPUT_DIR)/wlan_cu
-OS_TARGET = $(OUTPUT_DIR)/$(TI_OS_LIB)
-LOADER_TARGET = $(OUTPUT_DIR)/tiwlan_loader
-ALL_TARGETS = $(OS_TARGET) $(LOADER_TARGET) $(CU_TARGET)
-#Supplicant directory, file and target
-
-ifeq ($(SUPPL),WPA)
-  SUPPL_TARGET = $(OUTPUT_DIR)/wpa_supplicant
-  TI_SUPP_LIB_DIR = $(CUDK_ROOT)/wpa_suppl
-  ifeq ($(BUILD_SUPPL),y)
-    ALL_TARGETS += $(SUPPL_TARGET)
-  endif
-endif
-
-ifeq ($(SUPPL),DEVICESCAPE)
-  SUPPL_TARGET = $(OUTPUT_DIR)/wpa_supplicant
-  TI_SUPP_LIB_DIR = $(CUDK_ROOT)/devicescape-dsa-XCC-wps-2.0.1-008
-  ifeq ($(BUILD_SUPPL),y)
-    ALL_TARGETS += $(SUPPL_TARGET)
-  endif
-endif
-
-ifeq ($(SUPPL),ANDROID)
-  TI_SUPP_LIB_DIR = $(CUDK_ROOT)/../../../../../external/wpa_supplicant
-endif
-
-.PHONY: all
-all: $(ALL_TARGETS)
-
-.PHONY: $(SUPPL_TARGET)
-$(SUPPL_TARGET):
-ifeq ($(SUPPL),DEVICESCAPE)
-	$(MAKE) -e -C $(TI_SUPP_LIB_DIR) DEBUG=$(DEBUG) XCC=$(XCC) CROSS_COMPILE=$(CROSS_COMPILE) STATIC_LIB=$(STATIC_LIB) TI_WLAN_DRIVER=y CONFIG_CTRL_IFACE=unix 
-else
-	$(MAKE) -e -C $(TI_SUPP_LIB_DIR) DEBUG=$(DEBUG) XCC=$(XCC) CROSS_COMPILE=$(CROSS_COMPILE) STATIC_LIB=$(STATIC_LIB) TI_WLAN_DRIVER=y CONFIG_CTRL_IFACE=unix CONFIG_EAP_WSC=y CONFIG_WPS=y
-
-endif
-	$(CROSS_COMPILE)strip -s $(TI_SUPP_LIB_DIR)/wpa_supplicant
-	cp -f $(TI_SUPP_LIB_DIR)/wpa_supplicant $(OUTPUT_DIR)
-
-.PHONY: $(OS_TARGET)
-$(OS_TARGET):
-	@echo ALL_TARGETS=$(ALL_TARGETS)
-	@echo SUPPL=$(SUPPL)
-	@echo BUILD_SUPPL=$(BUILD_SUPPL) 
-	$(MAKE) -C $(TI_OS_LIB_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) STATIC_LIB=$(STATIC_LIB) XCC=$(XCC) WPA_ENTERPRISE=$(WPA_ENTERPRISE) SUPPL=$(SUPPL) BUILD_SUPPL=$(BUILD_SUPPL) TI_SUPP_LIB_DIR=$(TI_SUPP_LIB_DIR)
-
-.PHONY: $(CU_TARGET)
-$(CU_TARGET):
-	$(MAKE) -C $(CU_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) STATIC_LIB=$(STATIC_LIB) XCC=$(XCC) WPA_ENTERPRISE=$(WPA_ENTERPRISE) SUPPL=$(SUPPL) BUILD_SUPPL=$(BUILD_SUPPL) TI_SUPP_LIB_DIR=$(TI_SUPP_LIB_DIR)
-
-.PHONY: $(LOADER_TARGET)
-$(LOADER_TARGET):
-	$(MAKE) -C $(WLAN_LOADER_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) STATIC_LIB=$(STATIC_LIB)
-
-.PHONY: clean
-clean:
-	$(MAKE) -C $(CU_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BUILD_SUPPL=$(BUILD_SUPPL) XCC=$(XCC) clean
-	$(MAKE) -C $(TI_OS_LIB_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BUILD_SUPPL=$(BUILD_SUPPL) XCC=$(XCC) clean
-	$(MAKE) -C $(WLAN_LOADER_DIR) CROSS_COMPILE=$(CROSS_COMPILE) clean
-ifeq ($(BUILD_SUPPL), y)
-	$(MAKE) -e -C $(TI_SUPP_LIB_DIR) CROSS_COMPILE=$(CROSS_COMPILE) clean
-endif
-ifeq ($(SUPPL), WPA)
-	rm -f $(OUTPUT_DIR)/wpa_supplicant
-	$(MAKE) -C $(TI_SUPP_LIB_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BUILD_SUPPL=$(BUILD_SUPPL) XCC=$(XCC) clean
-endif
-
-
-ifeq ($(ETH_SUPPORT), y)
-	DK_DEFINES += -D ETH_SUPPORT
-endif 
diff --git a/wl1271/CUDK/configurationutility/Android.mk b/wl1271/CUDK/configurationutility/Android.mk
deleted file mode 100644
index 6393ba5..0000000
--- a/wl1271/CUDK/configurationutility/Android.mk
+++ /dev/null
@@ -1,110 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-STATIC_LIB ?= y
-DEBUG ?= y
-BUILD_SUPPL ?= n
-WPA_ENTERPRISE ?= y
-
-WILINK_ROOT = ../..
-CUDK_ROOT ?= $(WILINK_ROOT)/CUDK
-CU_ROOT = $(CUDK_ROOT)/configurationutility
-
-ifndef WPA_SUPPLICANT_VERSION
-WPA_SUPPLICANT_VERSION := VER_0_5_X
-endif
-
-ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_5_X)
-WPA_SUPPL_DIR = external/wpa_supplicant
-else
-WPA_SUPPL_DIR = external/wpa_supplicant_6/wpa_supplicant
-endif
-WPA_SUPPL_DIR_INCLUDE = $(WPA_SUPPL_DIR)
-ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_6_X)
-WPA_SUPPL_DIR_INCLUDE += $(WPA_SUPPL_DIR)/src \
-	$(WPA_SUPPL_DIR)/src/common \
-	$(WPA_SUPPL_DIR)/src/drivers \
-	$(WPA_SUPPL_DIR)/src/l2_packet \
-	$(WPA_SUPPL_DIR)/src/utils \
-	$(WPA_SUPPL_DIR)/src/wps
-endif
-
-ifeq ($(DEBUG),y)
-DEBUGFLAGS = -O2 -g -DDEBUG -DTI_DBG -fno-builtin
-else
-DEBUGFLAGS = -O2
-endif
-
-ifeq ($(DEBUG),y)
-DEBUGFLAGS = -O2 -g -DDEBUG -DTI_DBG -fno-builtin   # "-O" is needed to expand inlines
-#  DEBUGFLAGS+= -DDEBUG_MESSAGES
-else
-DEBUGFLAGS = -O2
-endif
-DEBUGFLAGS += -DHOST_COMPILE
-
-
-DK_DEFINES =
-ifeq ($(WPA_ENTERPRISE), y)
-	DK_DEFINES += -D WPA_ENTERPRISE
-endif
-
-ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_6_X)
-	DK_DEFINES += -DSUPPL_WPS_SUPPORT
-endif
-
-#DK_DEFINES += -D NO_WPA_SUPPL
-
-#Supplicant image building
-ifeq ($(BUILD_SUPPL), y)
-DK_DEFINES += -D WPA_SUPPLICANT -D CONFIG_CTRL_IFACE -D CONFIG_CTRL_IFACE_UNIX
--include $(WPA_SUPPL_DIR)/.config
-ifdef CONFIG_WPS
-	DK_DEFINES += -DCONFIG_WPS
-endif
-endif
-
-ARMFLAGS = -fno-common -g #-fno-builtin -Wall #-pipe
-
-LOCAL_C_INCLUDES = \
-	$(LOCAL_PATH)/inc \
-	$(LOCAL_PATH)/$(CUDK_ROOT)/os/linux/inc \
-	$(LOCAL_PATH)/$(CUDK_ROOT)/os/common/inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/Export_Inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Sta_Management \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Application \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/utils \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/Txn \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/TWDriver \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FirmwareApi \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/TwIf \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/platforms/os/linux/inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/platforms/os/common/inc \
-	$(LOCAL_PATH)/$(KERNEL_DIR)/include \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FW_Transfer/Export_Inc \
-	$(WPA_SUPPL_DIR_INCLUDE)
-
-LOCAL_SRC_FILES = \
-	src/console.c \
-	src/cu_common.c \
-	src/cu_cmd.c \
-	src/ticon.c \
-	src/wpa_core.c
-
-LOCAL_CFLAGS += -Wall -Wstrict-prototypes $(DEBUGFLAGS) -D__LINUX__ $(DK_DEFINES) -D__BYTE_ORDER_LITTLE_ENDIAN -DDRV_NAME='"tiwlan"'
-
-LOCAL_CFLAGS += $(ARMFLAGS)
-
-LOCAL_LDLIBS += -lpthread
-
-LOCAL_STATIC_LIBRARIES = \
-	libtiOsLib
-
-ifeq ($(BUILD_SUPPL), y)
-LOCAL_SHARED_LIBRARIES = \
-	libwpa_client
-endif
-
-LOCAL_MODULE:= wlan_cu
-
-include $(BUILD_EXECUTABLE)
diff --git a/wl1271/CUDK/configurationutility/inc/console.h b/wl1271/CUDK/configurationutility/inc/console.h
deleted file mode 100644
index d9eda8e..0000000
--- a/wl1271/CUDK/configurationutility/inc/console.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * console.h
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/** \file  console.h 
- *  \brief Console (CLI) API
- *
- *  \see   console.c, ticon.c
- */
-
-#ifndef _CONSOLE_H_
-#define _CONSOLE_H_
-
-/* defines */
-/***********/
-/* parameter flags */
-#define CON_PARM_OPTIONAL       0x01  /* Parameter is optional */
-#define CON_PARM_DEFVAL         0x02  /* Default value is set */
-#define CON_PARM_RANGE          0x04  /* Range is set */
-#define CON_PARM_STRING         0x08  /* String parm */
-#define CON_PARM_LINE           0x10  /* String from the current parser position till EOL */
-#define CON_PARM_SIGN           0x20  /* Signed param */
-#define CON_PARM_NOVAL          0x80  /* Internal flag: parameter is anassigned */
-#define CON_LAST_PARM           { NULL, 0, 0, 0, 0 }
-
-#define CONSOLE_TERMINAL_MODULE_ID  (0)
-#define CONSOLE_LOGGER_MODULE_ID    (1)
-#define CONSOLE_WIPP_MODULE_ID      (2)
-#define CONSOLE_G_TESTER_MODULE_ID  (3)
-#define CONSOLE_NUMBER_OF_MODULES   (4)
-
-
-/* types */
-/*********/
-typedef enum
-{
-    E_OK = 0, 
-    E_BADPARM, 
-    E_TOOMANY,
-    E_NOMEMORY,
-    E_NOT_FOUND,
-    E_EXISTS,
-    E_DUMMY,
-    E_ERROR
-} consoleErr;
-
-typedef struct ConParm_t
-{
-   PS8         name;                     /* Parameter name. Shouldn't be allocated on stack! */
-   U8          flags;                    /* Combination of CON_PARM_??? flags */
-   U32         low_val;                  /* Low val for range checking */
-   U32         hi_val;                   /* Hi val for range checking/max length of string */
-   U32         value;                    /* Value/address of string parameter */
-} ConParm_t;
-
-
-typedef void (*FuncToken_t)(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-
-/* functions */
-/*************/
-THandle Console_Create(const PS8 device_name, S32 BypassSupplicant, PS8 pSupplIfFile);
-VOID Console_Destroy(THandle hConsole);
-VOID Console_GetDeviceStatus(THandle hConsole);
-VOID Console_Start(THandle hConsole);
-VOID Console_Stop(THandle hConsole);
-THandle Console_AddDirExt( THandle  hConsole,
-                            THandle  hRoot,
-                            const PS8 name,
-                            const PS8 desc );
-consoleErr Console_AddToken( THandle hConsole,
-                                THandle      hDir,
-                                const PS8     name,
-                                const PS8     help,
-                                FuncToken_t   p_func,
-                                ConParm_t     p_parms[] );
-
-#endif  /* _CONSOLE_H_ */
-        
diff --git a/wl1271/CUDK/configurationutility/inc/cu_cmd.h b/wl1271/CUDK/configurationutility/inc/cu_cmd.h
deleted file mode 100644
index eb4e4bc..0000000
--- a/wl1271/CUDK/configurationutility/inc/cu_cmd.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * cu_cmd.h
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************/
-/*                                                                          */
-/*    MODULE:   cu_cmd.h                                                    */
-/*    PURPOSE:                                                              */
-/*                                                                          */
-/****************************************************************************/
-#ifndef _CU_CMD_H_
-#define _CU_CMD_H_
-
-/* defines */
-/***********/
-
-/* types */
-/*********/
-typedef struct
-{
-    U32 value;
-    PS8 name;
-} named_value_t;
-
-/* functions */
-/*************/
-THandle CuCmd_Create(const PS8 device_name, THandle hConsole, S32 BypassSupplicant, PS8 pSupplIfFile);
-VOID CuCmd_Destroy(THandle hCuCmd);
-S32  CuCmd_GetDeviceStatus(THandle hCuCmd);
-VOID CuCmd_StartDriver(THandle hCuCmd);
-VOID CuCmd_StopDriver(THandle hCuCmd);
-
-#ifdef XCC_MODULE_INCLUDED
-THandle CuCmd_GetCuCommonHandle(THandle hCuCmd);
-THandle CuCmd_GetCuWpaHandle (THandle hCuCmd);
-#endif
-
-
-VOID CuCmd_Show_Status(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_BssidList(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_FullBssidList(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-#ifdef CONFIG_WPS
-VOID CuCmd_StartEnrolleePIN(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_StartEnrolleePBC(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_StopEnrollee(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetPin(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-#endif
-VOID CuCmd_Connect(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_Disassociate(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_ModifySsid(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ModifyChannel(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ModifyConnectMode(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetTxRate(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ModifyBssType(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ModifyFragTh(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ModifyRtsTh(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ModifyPreamble(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ModifyShortSlot(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RadioOnOff(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetSelectedBssidInfo(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetDriverState(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetRsiiLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetSnrRatio(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ShowTxPowerLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ShowTxPowerTable(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_TxPowerDbm(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ModifyState_802_11d(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ModifyState_802_11h(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_D_Country_2_4Ie(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_D_Country_5Ie(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ModifyDfsRange(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetBeaconFilterDesiredState(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetBeaconFilterDesiredState(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ModifySupportedRates(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SendHealthCheck(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_EnableRxDataFilters(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_DisableRxDataFilters(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_AddRxDataFilter(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RemoveRxDataFilter(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetRxDataFiltersStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_ShowStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ShowTxStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ShowAdvancedParams(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_ScanAppGlobalConfig(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ScanAppChannelConfig(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ScanAppClear(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ScanAppDisplay(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ScanSetSra(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ScanSetRssi(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_StartScan(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_StopScan (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_WextStartScan(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigPeriodicScanGlobal (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigPeriodicScanInterval (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigurePeriodicScanSsid (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigurePeriodicScanChannel (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ClearPeriodicScanConfiguration (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_DisplayPeriodicScanConfiguration (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_StartPeriodicScan (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_StopPeriodicScan (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigScanPolicy(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigScanBand(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigScanBandChannel(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigScanBandTrack(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigScanBandDiscover(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigScanBandImmed(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_DisplayScanPolicy(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ClearScanPolicy(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetScanPolicy(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetScanBssList(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_RoamingEnable(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RoamingDisable(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RoamingLowPassFilter(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RoamingQualityIndicator(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RoamingDataRetryThreshold(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RoamingNumExpectedTbttForBSSLoss(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RoamingTxRateThreshold(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RoamingLowRssiThreshold(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RoamingLowSnrThreshold(THandle hCuCmd, ConParm_t parm[], U16 nParms);                                                                           
-VOID CuCmd_RoamingLowQualityForBackgroungScanCondition(THandle hCuCmd, ConParm_t parm[], U16 nParms); 
-VOID CuCmd_RoamingNormalQualityForBackgroungScanCondition(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RoamingGetConfParams(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_CurrBssUserDefinedTrigger(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_AddTspec(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetTspec(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_DeleteTspec(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetApQosParams(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetPsRxStreamingParams(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetApQosCapabilities(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetAcStatus(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ModifyMediumUsageTh(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetDesiredPsMode(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_InsertClsfrEntry(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RemoveClsfrEntry(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetPsRxDelivery(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetQosParams(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetRxTimeOut(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_RegisterEvents(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_UnregisterEvents(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_EnableBtCoe(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigBtCoe(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetBtCoeStatus(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigCoexActivity(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ConfigFmCoex(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_SetPowerMode(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetPowerSavePowerLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetDefaultPowerLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetDozeModeInAutoPowerLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetTrafficIntensityTh(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_EnableTrafficEvents(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_DisableTrafficEvents(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetDcoItrimParams(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_LogAddReport(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_LogReportSeverityLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_SetReport(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_AddReport(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ClearReport(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ReportSeverityLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetReportLevelCLI(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_PrintDriverDebug(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_PrintDriverDebugBuffer(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_FwDebug(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetRateMngDebug(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetRateMngDebug(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-
-VOID CuCmd_SetArpIPFilter (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ShowAbout(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_Quit(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-/* Radio Debug Tests */
-VOID CuCmd_RadioDebug_ChannelTune(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RadioDebug_StartTxCw(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RadioDebug_StartContinuousTx(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RadioDebug_StopTx(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RadioDebug_Template(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RadioDebug_StartRxStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RadioDebug_StopRxStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RadioDebug_ResetRxStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RadioDebug_GetRxStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RadioDebug_GetHDKVersion(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-/* BIP Tests */
-VOID CuCmd_BIP_StartBIP(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_BIP_EnterRxBIP(THandle hCuCmd, ConParm_t parm[], U16 nParms); 
-VOID CuCmd_BIP_StartRxBIP(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_BIP_ExitRxBIP(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_BIP_BufferCalReferencePoint(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-
-VOID CuCmd_SetPrivacyAuth(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetPrivacyEap(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetPrivacyEncryption(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetPrivacyKeyType(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetPrivacyMixedMode(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetPrivacyAnyWpaMode(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetPrivacyCredentials(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetPrivacyPskPassPhrase(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_SetPrivacyCertificate(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_StopSuppl(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ChangeSupplDebugLevels(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_AddPrivacyKey(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RemovePrivacyKey(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_GetPrivacyDefaultKey(THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_EnableKeepAlive (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_DisableKeepAlive (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_AddKeepAliveMessage (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_RemoveKeepAliveMessage (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID CuCmd_ShowKeepAlive (THandle hCuCmd, ConParm_t parm[], U16 nParms);
-VOID Cucmd_ShowPowerConsumptionStats(THandle hCuCmd,ConParm_t parm[],U16 nParms);
-
-#endif  /* _CU_CMD_H_ */
-
diff --git a/wl1271/CUDK/configurationutility/inc/cu_common.h b/wl1271/CUDK/configurationutility/inc/cu_common.h
deleted file mode 100644
index 656dcd7..0000000
--- a/wl1271/CUDK/configurationutility/inc/cu_common.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * cu_common.h
- *
- * Copyright 2001-2010 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************/
-/*                                                                          */
-/*    MODULE:   CuCommon.h                                                  */
-/*    PURPOSE:                                                              */
-/*                                                                          */
-/****************************************************************************/
-#ifndef _CU_COMMON_H_
-#define _CU_COMMON_H_
-
-/* defines */
-/***********/
-
-/* types */
-/*********/
-typedef struct 
-{
-    U32 temp; /* the place of the IE's id and length */
-    U32 unmatchedPacketsCount;                  /* number of packets didn't match any filter (when the feature was enabled). */
-    U32 matchedPacketsCount[MAX_DATA_FILTERS];  /* number of packets matching each of the filters */
-} TCuCommon_RxDataFilteringStatistics;
-
-typedef struct
-{
-    U32 temp; /* the place of the IE's id and length */
-    U32 MissedBeacons;
-    U8 snr;       /* The current average SNR in db - For Data Packets*/
-    U8 snrBeacon;     /* The current average SNR in db - For Beacon Packets*/
-    S8 rssi;      /* The current average RSSI  - For Data Packets*/
-    S8 rssiBeacon;
-} TCuCommon_RoamingStatisticsTable;
-
-/* functions */
-/*************/
-THandle CuCommon_Create(THandle *pIpcSta, const PS8 device_name);
-VOID CuCommon_Destroy(THandle hCuCommon);
-
-S32 CuCommon_SetU32(THandle hCuCommon, U32 PrivateIoctlId, U32 Data);
-S32 CuCommon_GetU32(THandle hCuCommon, U32 PrivateIoctlId, PU32 pData);
-S32 CuCommon_SetU16(THandle hCuCommon, U32 PrivateIoctlId, U16 Data);
-S32 CuCommon_SetU8(THandle hCuCommon, U32 PrivateIoctlId, U8 Data);
-S32 CuCommon_GetU8(THandle hCuCommon, U32 PrivateIoctlId, PU8 pData);
-S32 CuCommon_SetBuffer(THandle hCuCommon, U32 PrivateIoctlId, PVOID pBuffer, U32 len);
-S32 CuCommon_GetBuffer(THandle hCuCommon, U32 PrivateIoctlId, PVOID pBuffer, U32 len);
-S32 CuCommon_GetSetBuffer(THandle hCuCommon, U32 PrivateIoctlId, PVOID pBuffer, U32 len);
-
-S32 CuCommon_Start_Scan(THandle hCuCommon, PVOID scanParams, U32 sizeOfScanParams);
-S32 CuCommon_Get_BssidList_Size(THandle hCuCommon, PU32 pSizeOfBssiList);
-S32 CuCommon_GetRssi(THandle hCuCommon, PS8 pdRssi, PS8 pbRssi);
-S32 CuCommon_GetSnr(THandle hCuCommon, PU32 pdSnr, PU32 pbSnr);
-S32 CuCommon_GetdesiredPreambleType(THandle hCuCommon, PU32 pDesiredPreambleType);
-S32 CuCommon_GetTxStatistics(THandle hCuCommon, TIWLN_TX_STATISTICS* pTxCounters, U32 doReset); 
-
-S32 CuCommon_Radio_Test(THandle hCuCommon,TTestCmd* data);
-
-S32 CuCommon_AddKey(THandle hCuCommon, OS_802_11_WEP* pKey);
-S32 CuCommon_RemoveKey(THandle hCuCommon, U32 KeyIndex);
-S32 CuCommon_GetDfsChannels(THandle hCuCommon, PU16 pMinDfsChannel, PU16 pMaxDfsChannel);
-S32 CuCommon_SetDfsChannels(THandle hCuCommon, U16 MinDfsChannel, U16 MaxDfsChannel);
-
-S32 CuCommon_PrintDriverDebug(THandle hCuCommon, PVOID pParams, U32 param_size);
-S32 CuCommon_PrintDriverDebugBuffer(THandle hCuCommon, U32 func_id, U32 opt_param);
-
-S32 CuCommon_GetRxDataFiltersStatistics(THandle hCuCommon, PU32 pUnmatchedPacketsCount, PU32 pMatchedPacketsCount);
-S32 CuCommon_GetPowerConsumptionStat(THandle hCuCommon, ACXPowerConsumptionTimeStat_t *pPowerstat);
-
-
-#endif  /* _CU_COMMON_H_ */
-        
diff --git a/wl1271/CUDK/configurationutility/inc/ticon.h b/wl1271/CUDK/configurationutility/inc/ticon.h
deleted file mode 100644
index 22e07cb..0000000
--- a/wl1271/CUDK/configurationutility/inc/ticon.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * ticon.h
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************/
-/*																			*/
-/*    MODULE:   ticon.h													*/
-/*    PURPOSE:																*/
-/*																			*/
-/****************************************************************************/
-#ifndef _TICON_H_
-#define _TICON_H_
-
-/* defines */
-/***********/
-
-/* types */
-/*********/
-
-/* functions */
-/*************/
-
-#endif  /* _TICON_H_ */
-        
diff --git a/wl1271/CUDK/configurationutility/inc/wpa_core.h b/wl1271/CUDK/configurationutility/inc/wpa_core.h
deleted file mode 100644
index c936f8f..0000000
--- a/wl1271/CUDK/configurationutility/inc/wpa_core.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * wpa_core.h
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************/
-/*																			*/
-/*    MODULE:   Wpa_core.h													*/
-/*    PURPOSE:																*/
-/*																			*/
-/****************************************************************************/
-#ifndef _WPA_CORE_H_
-#define _WPA_CORE_H_
-
-/* defines */
-/***********/
-#define WPACORE_MAX_CERT_FILE_NAME_LENGTH 		32
-#define WPACORE_MAX_CERT_PASSWORD_LENGTH 		32
-#define WPACORE_MAX_CERT_USER_NAME_LENGTH 		32
-
-#define WPACORE_MAX_PSK_STRING_LENGTH		64
-#define WPACORE_MIN_PSK_STRING_LENGTH		8
-#define WPACORE_PSK_HEX_LENGTH				64
-
-/* types */
-/*********/
-
-/* functions */
-/*************/
-THandle WpaCore_Create(PS32 pRes, PS8 pSupplIfFile);
-VOID WpaCore_Destroy(THandle hWpaCore);
-
-S32 WpaCore_SetAuthMode(THandle hWpaCore, OS_802_11_AUTHENTICATION_MODE AuthMode);
-S32 WpaCore_GetAuthMode(THandle hWpaCore, PU32 pAuthMode);
-S32 WpaCore_SetEncryptionPairWise(THandle hWpaCore, OS_802_11_ENCRYPTION_TYPES EncryptionType);
-S32 WpaCore_GetEncryptionPairWise(THandle hWpaCore, OS_802_11_ENCRYPTION_TYPES* pEncryptionType);
-S32 WpaCore_SetEncryptionGroup(THandle hWpaCore, OS_802_11_ENCRYPTION_TYPES EncryptionType);
-S32 WpaCore_GetEncryptionGroup(THandle hWpaCore, OS_802_11_ENCRYPTION_TYPES* pEncryptionType);
-S32 WpaCore_SetPskPassPhrase(THandle hWpaCore, PU8 pPassPhrase);
-S32 WpaCore_StopSuppl(THandle hWpaCore);
-S32 WpaCore_ChangeSupplDebugLevels(THandle hWpaCore, S32 Level1, S32 Level2, S32 Level3);
-S32 WpaCore_AddKey(THandle hWpaCore, OS_802_11_WEP* pKey);
-S32 WpaCore_GetDefaultKey(THandle hWpaCore, U32* pDefaultKeyIndex);
-S32 WpaCore_SetAnyWpaMode(THandle hWpaCore, U8 anyWpaMode);
-S32 WpaCore_GetAnyWpaMode(THandle hWpaCore, PU8 pAnyWpaMode);
-S32 WpaCore_SetBssType(THandle hWpaCore, U32 BssType);
-S32 WpaCore_GetBssType(THandle hWpaCore, PU32 pBssType);
-S32 WpaCore_SetSsid(THandle hWpaCore, OS_802_11_SSID* ssid, TMacAddr bssid);
-S32 WpaCore_Disassociate(THandle hWpaCore);
-S32 WpaCore_SetPrivacyEap(THandle hWpaCore, OS_802_11_EAP_TYPES EapType);
-S32 WpaCore_SetCredentials(THandle hWpaCore, PU8 Identity, PU8 Passward);
-S32 WpaCore_SetCertificate(THandle hWpaCore, PU8 Filepath);
-S32 WpaCore_SetXCC(THandle hWpaCore, U16 XCCConfig);
-
-
-#ifdef CONFIG_WPS
-S32 WpaCore_StartWpsPIN(THandle hWpaCore);
-S32 WpaCore_StartWpsPBC(THandle hWpaCore);
-S32 WpaCore_StopWps(THandle hWpaCore);
-S32 WpaCore_SetPin(THandle hWpaCore, PS8 pPinStr);
-#endif /* CONFIG_WPS */
-
-#endif  /* _WPA_CORE_H_ */
-        
diff --git a/wl1271/CUDK/configurationutility/makefile b/wl1271/CUDK/configurationutility/makefile
deleted file mode 100644
index 70b6d92..0000000
--- a/wl1271/CUDK/configurationutility/makefile
+++ /dev/null
@@ -1,152 +0,0 @@
-STATIC_LIB ?= y
-DEBUG ?= y
-BUILD_SUPPL ?= y
-SUPPL ?= WPA
-WPA_ENTERPRISE ?= y
-XCC ?= n
-#enable/disable wireless simple config (WPS) support
-CONFIG_EAP_WSC ?= n
-
-WILINK_ROOT = ../..
-CUDK_ROOT ?= $(WILINK_ROOT)/CUDK
-CU_ROOT = $(CUDK_ROOT)/configurationutility
-OUTPUT_DIR ?= $(CUDK_ROOT)/output
-TI_OS_LIB_DIR=$(CUDK_ROOT)/output
-ifeq ($(STATIC_LIB),y)
-        TI_OS_LIB = tiOsLib.a
-else
-        TI_OS_LIB = tiOsLib.so
-endif
-
-ifeq ($(DEBUG),y)
-  DEBUGFLAGS = -O2 -g -DDEBUG -DTI_DBG -fno-builtin   
-else
-  DEBUGFLAGS = -O2
-endif
-
-DEBUGFLAGS+= -DHOST_COMPILE -DANDROID
-
-ifeq ($(XCC), y)
-	DK_DEFINES = -D XCC_MODULE_INCLUDED 
-endif    
-ifeq ($(GEM), y)
-	DK_DEFINES += -D GEM_SUPPORTED 
-endif  
-ifeq ($(WPA_ENTERPRISE), y)
-	DK_DEFINES += -D WPA_ENTERPRISE
-endif
-
-TARGET := $(OUTPUT_DIR)/wlan_cu
-SRCS  := \
-	src/console.c \
-	src/cu_common.c \
-	src/cu_cmd.c \
-	src/ticon.c \
-	src/wpa_core.c
-        
-ifeq ($(XCC), y)
-SRCS  +=  \
-	XCC/cu_XCC.c
-endif    
-
-
-OBJS = $(SRCS:.c=.o)
-
-DEPS = $(SRCS:%.c=%.d)
-
-ARMFLAGS  = -fno-common -pipe
-
-#Supplicant image building
-ifeq ($(BUILD_SUPPL), y)
-DK_DEFINES += -D WPA_SUPPLICANT -D CONFIG_CTRL_IFACE -D CONFIG_CTRL_IFACE_UNIX
-  -include $(CU_ROOT)/$(TI_SUPP_LIB_DIR)/.config
-ifeq ($(CONFIG_EAP_WSC), y)
-DK_DEFINES += -DCONFIG_EAP_WSC
-endif
-endif
-
-INCLUDES = \
-	-I inc \
-	-I $(CUDK_ROOT)/os/linux/inc \
-	-I $(CUDK_ROOT)/os/common/inc \
-	-I $(WILINK_ROOT)/stad/Export_Inc \
-	-I $(WILINK_ROOT)/stad/src/Sta_Management \
-	-I $(WILINK_ROOT)/stad/src/Application \
-	-I $(WILINK_ROOT)/utils \
-	-I $(WILINK_ROOT)/Txn \
-	-I $(WILINK_ROOT)/TWD/TWDriver \
-	-I $(WILINK_ROOT)/TWD/FirmwareApi \
-	-I $(WILINK_ROOT)/TWD/TwIf \
-	-I $(WILINK_ROOT)/platforms/os/linux/inc \
-	-I $(WILINK_ROOT)/platforms/os/common/inc \
-	-I $(KERNEL_DIR)/include \
-	-I $(WILINK_ROOT)/TWD/FW_Transfer/Export_Inc \
-	-I $(CUDK_ROOT)/$(TI_SUPP_LIB_DIR)
-
-ifeq ($(XCC), y)
-INCLUDES += \
-	-I XCC \
-	-I $(WILINK_ROOT)/stad/Export_Inc/XCC \
-	-I $(WILINK_ROOT)/utils/XCC \
-	-I $(CUDK_ROOT)/devicescape-dsa-XCC-wps-2.0.1-008 \
-	-I $(CUDK_ROOT)/devicescape-dsa-XCC-wps-2.0.1-008/openssl-0.9.8e/include
-endif
-
-CFLAGS = $(OPT) -Wall -Wstrict-prototypes $(DEBUGFLAGS) $(INCLUDES) -D__LINUX__ $(DK_DEFINES) -D__BYTE_ORDER_LITTLE_ENDIAN
-CFLAGS += -DDRV_NAME='"tiwlan"'
-
-ifneq "$(CROSS_COMPILE)" ""		#compile for ARM
-	CFLAGS += $(ARMFLAGS)
-        # strip symbols
-ifneq "$(DEBUG)" "y"
-    LDFLAGS = -s
-endif
-
-endif    # CROSS_COMPILE != ""
-
-.PHONY: all
-
-all: $(TARGET)
-
-$(TARGET): $(OBJS)
-	$(CROSS_COMPILE)gcc --static $(OBJS) $(TI_OS_LIB_DIR)/$(TI_OS_LIB)  -L $(CU_ROOT)/Output $(LDFLAGS) -lpthread -lc -o $@
-ifeq ($(DEBUG), y)
-	cp -a $(TARGET) $(TARGET)_debug
-	$(CROSS_COMPILE)strip -s $(TARGET)
-endif    #DEBUG
-
-ifeq ("$(findstring $(MAKECMDGOALS), clean cleanall)", "")
--include .depend
-endif
-
-%.o: %.cpp
-	@echo $@
-	@$(CROSS_COMPILE)gcc $(CFLAGS) -c $^ -o $@
-
-%.o: %.c
-	@echo $@
-	@$(CROSS_COMPILE)gcc -s $(CFLAGS) -c $< -o $@
-
-%.i: %.c
-	@$(CROSS_COMPILE)gcc $(CFLAGS) -E -c $< > $@
-
-%.d: %.c
-	@echo $@
-	@$(CROSS_COMPILE)gcc $< -MT$(^:%.c=%.o) -M $(CFLAGS) > $@
-
-%.d: %.cpp
-	@echo $@
-	@$(CROSS_COMPILE)gcc $< -MT$(^:%.cpp=%.o) -M $(CFLAGS) > $@
-
-.depend: $(DEPS)
-	rm -f $@
-	for aa in $^; do cat $$aa >> $@; done
-
-.PHONY: clean
-clean:
-	@echo cleaning configuration utility...
-	rm -f .depend $(OBJS) $(DEPS) $(SRCS:.c=.i) *.ko .*.cmd .*.flags *.mod.c *~ *.~* $(OUTPUT_DIR)/wlan_cu $(OUTPUT_DIR)/wlan_cu_debug
-
-cleanall: clean	
-
-
diff --git a/wl1271/CUDK/configurationutility/src/console.c b/wl1271/CUDK/configurationutility/src/console.c
deleted file mode 100644
index ef645da..0000000
--- a/wl1271/CUDK/configurationutility/src/console.c
+++ /dev/null
@@ -1,1073 +0,0 @@
-/*
- * console.c
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************
-*
-*   MODULE:  console.c
-*   
-*   PURPOSE: 
-* 
-*   DESCRIPTION:  
-*   ============
-*      
-*
-****************************************************************************/
-
-/* includes */
-/************/
-#include <stdio.h>
-#include "cu_osapi.h"
-#include "console.h"
-#include "cu_cmd.h"
-
-/* defines */
-/***********/
-#define INBUF_LENGTH            2100
-#define MAX_NAME_LEN        64
-#define MAX_HELP_LEN        40
-#define MAX_PARM_LEN        20
-#define ALIAS_LEN           1
-
-#define TOKEN_UP           ".."
-#define TOKEN_ROOT         "/"
-#define TOKEN_BREAK        "#"
-#define TOKEN_HELP         "?"
-#define TOKEN_DIRHELP      "help"
-#define TOKEN_QUIT         "q1"
-
-/* local types */
-/***************/
-
-typedef enum 
-{ 
-    Dir, 
-    Token
-} ConEntry_type_t;
-
-/* Token types */
-typedef enum
-{
-    EmptyToken,
-    UpToken,
-    RootToken,
-    BreakToken,
-    HelpToken,
-    DirHelpToken,
-    QuitToken,
-    NameToken
-} TokenType_t;
-
-
-/* Monitor token structure */
-typedef struct ConEntry_t
-{
-    struct ConEntry_t   *next;
-    S8                  name[MAX_NAME_LEN+1];    /* Entry name */
-    S8                  help[MAX_HELP_LEN+1];    /* Help string */
-    PS8                 alias;                  /* Alias - always in upper case*/
-    ConEntry_type_t     sel;                   /* Entry selector */
-    
-    union 
-    {
-        struct
-        {
-            struct ConEntry_t   *upper;            /* Upper directory */
-            struct ConEntry_t   *first;            /* First entry */
-        } dir;
-        struct t_Token
-        {
-            FuncToken_t    f_tokenFunc;            /* Token handler */
-            S32            totalParams;
-            ConParm_t      *parm;                  /* Parameters array with totalParams size */
-            PS8            *name;                 /* Parameter name with totalParams size */
-        } token;
-    } u;
-} ConEntry_t;
-
-/* Module control block */
-typedef struct Console_t
-{
-    THandle hCuCmd;
-
-    S32 isDeviceOpen;
-    
-    ConEntry_t *p_mon_root;
-    ConEntry_t *p_cur_dir;
-    PS8         p_inbuf;
-    volatile S32 stop_UI_Monitor;
-} Console_t;
-
-/* local variables */
-/*******************/
-
-/* local fucntions */
-/*******************/
-static VOID Console_allocRoot(Console_t* pConsole);
-int consoleRunScript( char *script_file, THandle hConsole);
-
-
-/* Remove leading blanks */
-static PS8 Console_ltrim(PS8 s)
-{
-    while( *s == ' ' || *s == '\t' ) s++;
-    return s;
-}
-
-/* 
-Make a preliminary analizis of <name> token.
-Returns a token type (Empty, Up, Root, Break, Name)
-*/
-static TokenType_t Console_analizeToken( PS8 name )
-{
-    if (!name[0])
-        return EmptyToken;
-    
-    if (!os_strcmp(name, (PS8)TOKEN_UP ) )
-        return UpToken;
-    
-    if (!os_strcmp(name, (PS8)TOKEN_ROOT ) )
-        return RootToken;
-    
-    if (!os_strcmp(name, (PS8)TOKEN_BREAK ) )
-        return BreakToken;
-    
-    if (!os_strcmp(name, (PS8)TOKEN_HELP ) )
-        return HelpToken;
-    
-    if (!os_strcmp(name, (PS8)TOKEN_DIRHELP ) )
-        return DirHelpToken;
-    
-    if (!os_strcmp(name, (PS8)TOKEN_QUIT ) )
-        return QuitToken;
-
-    return NameToken;
-    
-}
-
-/* Compare strings case insensitive */
-static S32 Console_stricmp( PS8 s1, PS8 s2, U16 len )
-{
-    S32  i;
-    
-    for( i=0; i<len && s1[i] && s2[i]; i++ )
-    {
-        if (os_tolower(s1[i])  != os_tolower(s2[i] ))
-            break;
-    }
-    
-    return ( (len - i) * (s1[i] - s2[i]) );
-}
-
-/* Convert string s to lower case. Return pointer to s */
-static PS8 Console_strlwr( PS8 s )
-{
-    PS8 s0=s;
-    
-    while( *s )
-    {
-        *s = (S8)os_tolower(*s );
-        ++s;
-    }
-    
-    return s0;
-}
-
-/* free the entries tree */
-static VOID Console_FreeEntry(ConEntry_t *pEntry)
-{   
-    ConEntry_t *pEntryTemp,*pEntryTemp1;
-    
-    if(pEntry->sel == Dir)
-    {
-        pEntryTemp = pEntry->u.dir.first;
-
-        while (pEntryTemp)
-        {
-            pEntryTemp1 = pEntryTemp->next;
-            Console_FreeEntry(pEntryTemp);
-            pEntryTemp = pEntryTemp1;
-        }
-    }
-
-    /* free the current entry */
-    os_MemoryFree(pEntry);
-}
-
-
-/* Allocate root directory */
-static VOID Console_allocRoot(Console_t* pConsole)
-{   
-    /* The very first call. Allocate root structure */
-    if ((pConsole->p_mon_root=(ConEntry_t *)os_MemoryCAlloc(sizeof( ConEntry_t ), 1) ) == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)( "ERROR - Console_allocRoot(): cant allocate root\n") );
-        return;
-    }
-    os_strcpy((PS8)pConsole->p_mon_root->name, (PS8)("\\") );
-    pConsole->p_mon_root->sel = Dir;
-    pConsole->p_cur_dir = pConsole->p_mon_root;
-}
-
-/* Display current directory */
-static VOID Console_displayDir(Console_t* pConsole)
-{
-    S8 out_buf[512];
-    ConEntry_t *p_token;
-    ConEntry_t *p_dir = pConsole->p_cur_dir;
-
-    os_sprintf((PS8)out_buf, (PS8)("%s%s> "), (PS8)(p_dir==pConsole->p_mon_root)? (PS8)("") : (PS8)(".../"), (PS8)p_dir->name );
-    p_token = p_dir->u.dir.first;
-    while( p_token )
-    {
-        if( (os_strlen(out_buf) + os_strlen(p_token->name) + 2)>= sizeof(out_buf) )
-        {
-            os_error_printf(CU_MSG_ERROR, ( (PS8)"ERROR - Console_displayDir(): buffer too small....\n") );
-            break;
-        }
-        os_strcat(out_buf, p_token->name );
-        if ( p_token->sel == Dir )
-            os_strcat((PS8)out_buf, (PS8)("/" ) );
-        p_token = p_token->next;
-        if (p_token)
-            os_strcat((PS8)out_buf, (PS8)(", ") );
-    }
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)("%s\n"), (PS8)out_buf );   
-}
-
-
-/* 
-Cut the first U16 from <p_inbuf>.
-Return the U16 in <name> and updated <p_inbuf>
-*/
-static TokenType_t Console_getWord(Console_t* pConsole, PS8 name, U16 len )
-{
-    U16         i=0;
-    TokenType_t tType;  
-    
-    pConsole->p_inbuf = Console_ltrim(pConsole->p_inbuf);
-    
-    while( *pConsole->p_inbuf && *pConsole->p_inbuf!=' ' && i<len )
-        name[i++] = *(pConsole->p_inbuf++);     
-    
-    if (i<len)
-        name[i] = 0;
-    
-    tType   = Console_analizeToken( name );
-    
-    return tType;
-}
-
-static TokenType_t Console_getStrParam(Console_t* pConsole, PS8 buf, ConParm_t *param )
-{
-    TokenType_t tType;
-    U32         i, len = param->hi_val;
-    PS8         end_buf;
-    
-    pConsole->p_inbuf = Console_ltrim(pConsole->p_inbuf);
-    
-    if( param->flags & CON_PARM_LINE )
-    {
-        os_strcpy(buf, (PS8)pConsole->p_inbuf );
-        pConsole->p_inbuf += os_strlen(pConsole->p_inbuf);
-    }
-    else
-    {
-        if( *pConsole->p_inbuf == '\"' )
-        {
-            end_buf = os_strchr(pConsole->p_inbuf+1, '\"' );
-            if( !end_buf )
-            {
-                os_error_printf(CU_MSG_ERROR, (PS8)("ERROR - invalid string param: '%s'\n"), (PS8)pConsole->p_inbuf );
-                pConsole->p_inbuf += os_strlen(pConsole->p_inbuf);
-                return EmptyToken;
-            }
-            if( (end_buf - pConsole->p_inbuf - 1) > (int)len )
-            {
-                os_error_printf(CU_MSG_ERROR, (PS8)("ERROR - param is too long: '%s'\n"), (PS8)pConsole->p_inbuf );
-                pConsole->p_inbuf += os_strlen(pConsole->p_inbuf);
-                return EmptyToken;
-            }
-            *end_buf = 0;
-            os_strcpy( buf, (PS8)(pConsole->p_inbuf+1 ) );
-            pConsole->p_inbuf = end_buf + 1;
-        }
-        else
-        {
-            for( i=0; *pConsole->p_inbuf && *pConsole->p_inbuf!=' ' && i<len; i++ )
-                buf[i] = *(pConsole->p_inbuf++);
-            
-            buf[i] = 0;
-            if( *pConsole->p_inbuf && *pConsole->p_inbuf != ' ' )
-            {
-                os_error_printf(CU_MSG_ERROR, (PS8)("ERROR - param is too long: '%s'\n"), (PS8)( pConsole->p_inbuf-os_strlen( buf) ) );
-                pConsole->p_inbuf += os_strlen(pConsole->p_inbuf);
-                return EmptyToken;
-            }
-        }
-    }
-    
-    tType   = Console_analizeToken( buf );
-    
-    return tType;
-}
-
-/* Returns number of parameters of the given token
-*/
-static U16 Console_getNParms( ConEntry_t *p_token )
-{
-    U16 i;
-    if ( !p_token->u.token.parm )
-        return 0;
-    for( i=0;
-         (i<p_token->u.token.totalParams) &&
-          p_token->u.token.parm[i].name &&
-          p_token->u.token.parm[i].name[0];
-         i++ )
-        ;
-    return i;
-}
-
-/* Parse p_inbuf string based on parameter descriptions in <p_token>.
-Fill parameter values in <p_token>.
-Returns the number of parameters filled.
-To Do: add a option of one-by-one user input of missing parameters.
-*/
-static S32 Console_parseParms(Console_t* pConsole, ConEntry_t *p_token, U16 *pnParms )
-{
-    U16 nTotalParms = Console_getNParms( p_token );
-    U16 nParms=0;
-    PS8 end_buf = NULL;
-    S8  parm[INBUF_LENGTH];
-    U16 i, print_params = 0;
-    U32 val = 0;
-    S32 sval = 0;
-    
-    /* Mark all parameters as don't having an explicit value */
-    for( i=0; i<nTotalParms; i++ )
-        p_token->u.token.parm[i].flags |= CON_PARM_NOVAL;
-
-    /*        -----------------              */
-    pConsole->p_inbuf = Console_ltrim(pConsole->p_inbuf);
-    if( pConsole->p_inbuf[0] == '!' && pConsole->p_inbuf[1] == '!' )
-    {
-        pConsole->p_inbuf += 2; print_params = 1;
-    }
-    /*        -----------------              */
-
-    /* Build a format string */
-    for( i=0; i<nTotalParms; i++ )
-    {
-        if (p_token->u.token.parm[i].flags & (CON_PARM_STRING | CON_PARM_LINE) )
-        {
-            /* For a string parameter value is the string address */
-            /* and hi_val is the string length                   */
-            if (Console_getStrParam(pConsole, parm, &p_token->u.token.parm[i] ) != NameToken)
-                break;
-            if( os_strlen( parm) > p_token->u.token.parm[i].hi_val ||
-                (p_token->u.token.parm[i].low_val && p_token->u.token.parm[i].low_val > os_strlen( parm) ) )
-            {
-                os_error_printf(CU_MSG_ERROR, (PS8)("ERROR - param '%s' must be %ld..%ld chars\n"), (PS8)p_token->u.token.parm[i].name,
-                    (PS8)p_token->u.token.parm[i].low_val, (PS8)p_token->u.token.parm[i].hi_val);
-                return FALSE;               
-            }
-            os_strcpy((PS8)(char *)p_token->u.token.parm[i].value, (PS8)parm);
-        }
-        else
-        {
-            if (Console_getWord(pConsole, parm, MAX_PARM_LEN ) != NameToken)
-                break;
-            
-            if (p_token->u.token.parm[i].flags & CON_PARM_SIGN)
-            {
-                sval = os_strtol( parm, &end_buf, 0 );
-            }
-            else
-            {
-                val = os_strtoul( parm, &end_buf, 0 );
-            }
-            if( end_buf <= parm )
-                break;
-
-            /* Check value */
-            if (p_token->u.token.parm[i].flags & CON_PARM_RANGE)
-            {        
-                if (p_token->u.token.parm[i].flags & CON_PARM_SIGN)
-                {
-                    if ((sval < (S32)p_token->u.token.parm[i].low_val) ||
-                        (sval > (S32)p_token->u.token.parm[i].hi_val) )
-                    {
-                        os_error_printf(CU_MSG_ERROR, (PS8)("%s: %d out of range (%d, %d)\n"),
-                            (PS8)p_token->u.token.parm[i].name, (int)sval,
-                            (int)p_token->u.token.parm[i].low_val, (int)p_token->u.token.parm[i].hi_val );
-                        return FALSE;
-                    }
-                    
-                }
-                else
-                {                    
-                    if ((val < p_token->u.token.parm[i].low_val) ||
-                        (val > p_token->u.token.parm[i].hi_val) )
-                    {
-                        os_error_printf(CU_MSG_ERROR , (PS8)("%s: %ld out of range (%ld, %ld)\n"),
-                            (PS8)p_token->u.token.parm[i].name, (PS8)val,
-                            (PS8)p_token->u.token.parm[i].low_val, (PS8)p_token->u.token.parm[i].hi_val );
-                        return FALSE;
-                    }
-                }
-            }
-            
-            if (p_token->u.token.parm[i].flags & CON_PARM_SIGN)                
-                p_token->u.token.parm[i].value = sval;
-            else
-                p_token->u.token.parm[i].value = val;
-        }
-
-        p_token->u.token.parm[i].flags &= ~CON_PARM_NOVAL;
-        ++nParms;
-    }
-
-    /* Process default values */
-    for( ; i<nTotalParms; i++ )
-    {
-        if ((p_token->u.token.parm[i].flags & CON_PARM_DEFVAL) != 0)
-        {
-            p_token->u.token.parm[i].flags &= ~CON_PARM_NOVAL;
-            ++nParms;
-        }
-        else if (!(p_token->u.token.parm[i].flags & CON_PARM_OPTIONAL) )
-        {
-            /* Mandatory parameter missing */
-            return FALSE;
-        }
-    }
-
-    if( print_params )
-    {
-        os_error_printf((S32)CU_MSG_INFO2, (PS8)("Params: %d\n"), nParms );
-        for (i=0; i<nParms; i++ )
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)("%d: %s - flags:%d"), 
-                i+1, (PS8)p_token->u.token.parm[i].name,
-                p_token->u.token.parm[i].flags);
-            
-            if (p_token->u.token.parm[i].flags & CON_PARM_SIGN)  
-                os_error_printf(CU_MSG_INFO2, (PS8)("min:%d, max:%d, value:%d "),(PS8)p_token->u.token.parm[i].low_val, (PS8)p_token->u.token.parm[i].hi_val,
-                (PS8)p_token->u.token.parm[i].value);
-            else
-                os_error_printf(CU_MSG_INFO2, (PS8)("min:%ld, max:%ld, value:%ld "),(PS8)p_token->u.token.parm[i].low_val, (PS8)p_token->u.token.parm[i].hi_val,
-                (PS8)p_token->u.token.parm[i].value);
-            
-            os_error_printf(CU_MSG_INFO2, (PS8)("(%#lx)"),(PS8)p_token->u.token.parm[i].value );
-            
-            if( p_token->u.token.parm[i].flags & (CON_PARM_LINE | CON_PARM_STRING ))
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)(" - '%s'"), (PS8)(char *) p_token->u.token.parm[i].value );
-            }
-            os_error_printf(CU_MSG_INFO2, (PS8)("\n") );
-        }
-        
-    }
-    *pnParms = nParms;
-
-    return TRUE;
-}
-
-/* Serach a token by name in the current directory */
-static ConEntry_t *Console_searchToken( ConEntry_t *p_dir, PS8 name )
-{
-    ConEntry_t *p_token;
-    U16        name_len = (U16)os_strlen( name );
-    
-    /* Check alias */
-    p_token = p_dir->u.dir.first;
-    while( p_token )
-    {
-        if (p_token->alias &&
-            (name_len == ALIAS_LEN) &&
-            !Console_stricmp( p_token->alias, name, ALIAS_LEN ) )
-            return p_token;
-        p_token = p_token->next;
-    }
-    
-    /* Check name */
-    p_token = p_dir->u.dir.first;
-    while( p_token )
-    {
-        if (!Console_stricmp( p_token->name, name, name_len ) )
-            break;
-        p_token = p_token->next;
-    }
-    
-    return p_token;
-}
-
-
-/* Display help for each entry in the current directory */
-VOID  Console_dirHelp(Console_t* pConsole)
-{
-    ConEntry_t *p_token;
-    S8        print_str[80];
-    
-    p_token = pConsole->p_cur_dir->u.dir.first;
-    
-    while( p_token )
-    {
-        if (p_token->sel == Dir)
-            os_sprintf( print_str, (PS8)"%s: directory\n", (PS8)p_token->name );
-        else
-            os_sprintf( print_str, (PS8)("%s(%d parms): %s\n"),
-            (PS8)p_token->name, Console_getNParms(p_token), p_token->help );
-        os_error_printf(CU_MSG_INFO2,  (PS8)print_str );
-        p_token = p_token->next;
-    }
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)("Type ? <name> for command help, \"/\"-root, \"..\"-upper\n") );
-}
-
-
-/* Display help a token */
-static VOID  Console_displayHelp(Console_t* pConsole, ConEntry_t *p_token )
-{
-    S8 bra, ket;
-    U16 nTotalParms = Console_getNParms( p_token );
-    U16 i;
-    
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)("%s: %s "), (PS8)p_token->help, (PS8)p_token->name );
-    for( i=0; i<nTotalParms; i++ )
-    {
-        if (p_token->u.token.parm[i].flags & CON_PARM_OPTIONAL)
-        {
-            bra = '['; ket=']';
-        }
-        else
-        {
-            bra = '<'; ket='>';
-        }
-        os_error_printf(CU_MSG_INFO2, (PS8)("%c%s"), bra, (PS8)p_token->u.token.parm[i].name );
-        if (p_token->u.token.parm[i].flags & CON_PARM_DEFVAL)
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)("=%lu"), (PS8)p_token->u.token.parm[i].value);
-        }
-        if (p_token->u.token.parm[i].flags & CON_PARM_RANGE)
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)(p_token->u.token.parm[i].flags & CON_PARM_SIGN) ? (PS8)(" (%d..%d%s)") : (PS8)(" (%lu..%lu%s)"),
-                (PS8)p_token->u.token.parm[i].low_val,
-                (PS8)p_token->u.token.parm[i].hi_val,
-                (PS8)(p_token->u.token.parm[i].flags & (CON_PARM_STRING | CON_PARM_LINE)) ? (PS8)(" chars") : (PS8)("") );
-            
-        }
-        os_error_printf(CU_MSG_INFO2, (PS8)("%c \n"),ket );
-    }
-}
-
-/* Choose unique alias for <name> in <p_dir> */
-/* Currently only single-character aliases are supported */
-static S32 Console_chooseAlias( ConEntry_t *p_dir, ConEntry_t *p_new_token )
-{
-    ConEntry_t *p_token;
-    S32         i;
-    S8          c;
-    PS8         new_alias = NULL;
-    
-    /* find alias given from user */
-    for(i=0; p_new_token->name[i]; i++ )
-    {
-        if( os_isupper( p_new_token->name[i]) )
-        {
-            new_alias = &p_new_token->name[i];
-            break;
-        }
-    }
-    
-    Console_strlwr( p_new_token->name );
-    
-    if( new_alias )
-    {
-        p_token = p_dir->u.dir.first;
-        
-        while( p_token )
-        {
-            if (p_token->alias && (os_tolower(*p_token->alias ) == *new_alias) )
-            {
-                os_error_printf(CU_MSG_ERROR, (PS8)("Error - duplicated alias '%c' in <%s> and <%s>**\n"), *new_alias,
-                    (PS8)p_token->name, (PS8)p_new_token->name );
-                return 0;
-            }
-            p_token = p_token->next;
-        }
-        *new_alias = (S8)os_toupper(*new_alias);
-        p_new_token->alias = new_alias;
-        return 1;
-    }
-    
-    i = 0;
-    while( p_new_token->name[i] )
-    {
-        c = p_new_token->name[i];
-        p_token = p_dir->u.dir.first;
-        
-        while( p_token )
-        {
-            if (p_token->alias &&
-                (os_tolower(*p_token->alias ) == c) )
-                break;
-            p_token = p_token->next;
-        }
-        if (p_token)
-            ++i;
-        else
-        {
-            p_new_token->name[i] = (S8)os_toupper( c );
-            p_new_token->alias   = &p_new_token->name[i];
-            break;
-        }
-    }
-    return 1;
-}
-
-/* Parse the given input string and exit.
-All commands in the input string are executed one by one.
-*/
-static U8 Console_ParseString(Console_t* pConsole, PS8 input_string )
-{
-    ConEntry_t  *p_token;
-    S8          name[MAX_NAME_LEN];
-    TokenType_t tType;
-    U16         nParms; 
-        
-    if (!pConsole->p_mon_root)
-        return 1;
-
-    if(!pConsole->isDeviceOpen)
-    {
-        Console_GetDeviceStatus(pConsole);
-        if(!pConsole->isDeviceOpen)
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)("ERROR - Console_ParseString - Device isn't loaded !!!\n") );
-            return 1;
-        }
-    }
-    
-    if( input_string[os_strlen( input_string)-1] == '\n' )
-    {
-        PS8 s = &input_string[os_strlen( input_string)-1];
-        *s = 0;
-    }
-    pConsole->p_inbuf = input_string;
-    pConsole->stop_UI_Monitor = FALSE;
-
-    /* Interpret empty string as "display directory" */
-    if ( pConsole->p_inbuf && !*pConsole->p_inbuf )
-        Console_displayDir(pConsole);
-    
-    while(!pConsole->stop_UI_Monitor && pConsole->p_inbuf && *pConsole->p_inbuf)
-    {
-        tType = Console_getWord(pConsole, name, MAX_NAME_LEN );
-        switch( tType )
-        {
-            
-        case NameToken:
-            p_token = Console_searchToken( pConsole->p_cur_dir, name );
-            if (p_token == NULL)
-            {
-                os_error_printf(CU_MSG_ERROR, (PS8)("**Error: '%s'**\n"),name);
-                pConsole->p_inbuf = NULL;
-            }
-            else if (p_token->sel == Dir)
-            {
-                pConsole->p_cur_dir = p_token;
-                Console_displayDir(pConsole);
-            }
-            else
-            {  /* Function token */
-                if (!Console_parseParms(pConsole, p_token, &nParms ))
-                {
-                    Console_displayHelp(pConsole, p_token );
-                }
-                else
-                {
-                    p_token->u.token.f_tokenFunc(pConsole->hCuCmd, p_token->u.token.parm, nParms );
-                }
-            }
-            break;
-            
-        case UpToken: /* Go to upper directory */
-            if (pConsole->p_cur_dir->u.dir.upper)
-                pConsole->p_cur_dir = pConsole->p_cur_dir->u.dir.upper;
-            Console_displayDir(pConsole);
-            break;
-            
-        case RootToken: /* Go to the root directory */
-            if (pConsole->p_cur_dir->u.dir.upper)
-                pConsole->p_cur_dir = pConsole->p_mon_root;
-            Console_displayDir(pConsole);
-            break;
-            
-        case HelpToken: /* Display help */
-            if (( Console_getWord(pConsole, name, MAX_NAME_LEN ) == NameToken ) &&
-                ((p_token = Console_searchToken( pConsole->p_cur_dir, name )) != NULL ) &&
-                (p_token->sel == Token) )
-                Console_displayHelp(pConsole, p_token);
-            else
-                Console_dirHelp(pConsole);
-            break;
-            
-        case DirHelpToken:
-            Console_displayDir(pConsole);
-            os_error_printf(CU_MSG_INFO2, (PS8)("Type ? <name> for command help, \"/\"-root, \"..\"-upper\n") );
-            break;
-            
-        case BreakToken: /* Clear buffer */
-            pConsole->p_inbuf = NULL;
-            break;
-            
-        case QuitToken: /* Go to upper directory */
-			return 1;
-
-        case EmptyToken:
-            break;
-            
-        }
-    }
-	return 0;
-}
-
-/* functions */
-/*************/
-
-THandle Console_Create(const PS8 device_name, S32 BypassSupplicant, PS8 pSupplIfFile)
-{
-    Console_t* pConsole = (Console_t*)os_MemoryCAlloc(sizeof(Console_t), sizeof(U8));
-    if(pConsole == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)("Error - Console_Create - cant allocate control block\n") );
-        return NULL;
-    }
-
-    pConsole->hCuCmd = CuCmd_Create(device_name, pConsole, BypassSupplicant, pSupplIfFile);
-    if(pConsole->hCuCmd == NULL)
-    {   
-        Console_Destroy(pConsole);
-        return NULL;
-    }
-
-    Console_allocRoot(pConsole);
-
-    pConsole->isDeviceOpen = FALSE;
-
-    return pConsole;
-}
-
-VOID Console_Destroy(THandle hConsole)
-{
-    Console_t* pConsole = (Console_t*)hConsole;
-
-    if(pConsole->hCuCmd)
-    {
-        CuCmd_Destroy(pConsole->hCuCmd);
-    }
-    if (pConsole->p_mon_root)
-    {
-    Console_FreeEntry(pConsole->p_mon_root);
-    }
-    os_MemoryFree(pConsole);
-}
-
-VOID Console_Stop(THandle hConsole)
-{   
-    ((Console_t*)hConsole)->stop_UI_Monitor = TRUE;
-}
-
-/* Monitor driver */
-VOID Console_Start(THandle hConsole)
-{
-    Console_t* pConsole = (Console_t*)hConsole;
-    S8  inbuf[INBUF_LENGTH];
-    S32 res;
-        
-    if (!pConsole->p_mon_root)
-        return;
-
-    pConsole->stop_UI_Monitor = FALSE;
-    Console_displayDir(pConsole);
-    
-    while(!pConsole->stop_UI_Monitor)
-    {
-        /* get input string */
-        res = os_getInputString(inbuf, sizeof(inbuf));
-        if (res == FALSE) 
-        {
-            if(pConsole->stop_UI_Monitor)
-            {
-                continue;
-            }
-            else
-            {
-                return;
-            }
-        }   
-
-        if(res == OS_GETINPUTSTRING_CONTINUE)
-            continue;
-
-        /* change to NULL terminated strings */
-        if( inbuf[os_strlen(inbuf)-1] == '\n' )
-            inbuf[os_strlen(inbuf)-1] = 0;
-        
-        /* parse the string */
-        Console_ParseString(pConsole, inbuf);
-    }
-
-}
-
-VOID Console_GetDeviceStatus(THandle hConsole)
-{
-    Console_t* pConsole = (Console_t*)hConsole;
-
-    if(OK == CuCmd_GetDeviceStatus(pConsole->hCuCmd))
-    {
-        pConsole->isDeviceOpen = TRUE;
-    }
-}
-
-
-/***************************************************************
-
-  Function : consoleAddDirExt
-  
-    Description: Add subdirectory
-    
-      Parameters: p_root - root directory handle (might be NULL)
-      name   - directory name
-      
-        Output:  the new created directory handle
-        =NULL - failure
-***************************************************************/
-THandle Console_AddDirExt(THandle  hConsole,
-                          THandle   hRoot,         /* Upper directory handle. NULL=root */
-                          const PS8  name,          /* New directory name */
-                          const PS8  desc )         /* Optional dir description */
-{
-    Console_t* pConsole = (Console_t*)hConsole;
-    ConEntry_t *p_root = (ConEntry_t *)hRoot;
-    ConEntry_t *p_dir;
-    ConEntry_t **p_e;
-    
-    if (!p_root)
-        p_root = pConsole->p_mon_root;
-    
-    if(!( p_root && (p_root->sel == Dir)))
-        return NULL;
-    
-    if ( (p_dir=(ConEntry_t *)os_MemoryAlloc(sizeof( ConEntry_t )) ) == NULL)
-        return NULL;
-    
-    os_memset( p_dir, 0, sizeof( ConEntry_t ) );
-    os_strncpy( p_dir->name, name, MAX_NAME_LEN );
-    os_strncpy( p_dir->help, desc, MAX_HELP_LEN );
-    p_dir->sel = Dir;
-    
-    Console_chooseAlias( p_root, p_dir );
-    
-    /* Add new directory to the root's list */
-    p_dir->u.dir.upper = p_root;
-    p_e = &(p_root->u.dir.first);
-    while (*p_e)
-        p_e = &((*p_e)->next);
-    *p_e = p_dir;
-    
-    return p_dir;
-}
-
-/***************************************************************
-
-  Function : consoleAddToken
-  
-    Description: Add token
-    
-      Parameters: p_dir  - directory handle (might be NULL=root)
-      name   - token name
-      help   - help string
-      p_func - token handler
-      p_parms- array of parameter descriptions.
-      Must be terminated with {0}.
-      Each parm descriptor is a struct
-      { "myname",         - name
-      10,               - low value
-      20,               - high value
-      0 }               - default value =-1 no default
-      or address for string parameter
-      
-        Output:  E_OK - OK
-        !=0 - error
-***************************************************************/
-consoleErr Console_AddToken(  THandle hConsole,
-                                THandle      hDir,
-                                const PS8     name,
-                                const PS8     help,
-                                FuncToken_t   p_func,
-                                ConParm_t     p_parms[] )
-{
-    Console_t* pConsole = (Console_t*)hConsole;
-    ConEntry_t *p_dir = (ConEntry_t *)hDir;
-    ConEntry_t *p_token;
-    ConEntry_t **p_e;       
-    U16       i;
-
-    if (!pConsole->p_mon_root)
-      Console_allocRoot(pConsole);
-
-    if (!p_dir)
-      p_dir = pConsole->p_mon_root;
-    
-    if(!( p_dir && (p_dir->sel == Dir)))
-        return E_ERROR;
-    
-    
-    /* Initialize token structure */
-    if((p_token = (ConEntry_t *)os_MemoryCAlloc(1,sizeof(ConEntry_t))) == NULL)
-    {
-     os_error_printf(CU_MSG_ERROR, (PS8)("** no memory **\n") );
-      return E_NOMEMORY;
-    }
-    
-    
-    /* Copy name */
-    os_strncpy( p_token->name, name, MAX_NAME_LEN );
-    os_strncpy( p_token->help, help, MAX_HELP_LEN );
-    p_token->sel = Token;
-    p_token->u.token.f_tokenFunc = p_func;
-    p_token->u.token.totalParams = 0;
-    
-    /* Convert name to lower case and choose alias */
-    Console_chooseAlias( p_dir, p_token );
-    
-    /* Copy parameters */
-    if ( p_parms )
-    {
-       ConParm_t     *p_tmpParms = p_parms; 
-       
-       /* find the number of params */
-       while( p_tmpParms->name && p_tmpParms->name[0] )
-       {
-            p_token->u.token.totalParams++;
-            p_tmpParms++;
-       }
-       /* allocate the parameters info */
-       p_token->u.token.parm = (ConParm_t *)os_MemoryAlloc(p_token->u.token.totalParams * sizeof(ConParm_t));
-       p_token->u.token.name = (PS8*)os_MemoryAlloc(p_token->u.token.totalParams * sizeof(PS8));
-       if ((p_token->u.token.parm == NULL) || (p_token->u.token.name == NULL))
-       {
-            os_error_printf(CU_MSG_ERROR, (PS8)("** no memory for params\n") );
-            os_MemoryFree(p_token);
-            return E_NOMEMORY;
-       }
-       for (i=0; i < p_token->u.token.totalParams; i++)
-       {
-         ConParm_t *p_token_parm = &p_token->u.token.parm[i];
-    
-         /* String parameter must have an address */
-         if(p_parms->flags & (CON_PARM_STRING | CON_PARM_LINE))
-         {
-            if ( p_parms->hi_val >= INBUF_LENGTH )
-            {
-               os_error_printf(CU_MSG_ERROR, (PS8)("** buffer too big: %s/%s\n"), p_dir->name, name);
-                os_MemoryFree(p_token->u.token.parm);
-                os_MemoryFree(p_token->u.token.name);
-                os_MemoryFree(p_token);
-                return E_NOMEMORY;
-    
-            }
-            if (p_parms->hi_val == 0 || (p_parms->flags & CON_PARM_RANGE) )
-            {
-               os_error_printf(CU_MSG_ERROR, (PS8)("** Bad string param definition: %s/%s\n"), p_dir->name, name );
-                os_MemoryFree(p_token->u.token.parm);
-                os_MemoryFree(p_token->u.token.name);
-                os_MemoryFree(p_token);
-                return E_BADPARM;
-            }
-            p_parms->value = (U32)os_MemoryCAlloc(1,p_parms->hi_val+1);
-            if( !p_parms->value )
-            {
-                os_error_printf(CU_MSG_ERROR, (PS8)("** No memory: %s/%s (max.size=%ld)\n"), p_dir->name, name, p_parms->hi_val );
-                os_MemoryFree(p_token->u.token.parm);
-                os_MemoryFree(p_token->u.token.name);
-                os_MemoryFree(p_token);
-                return E_NOMEMORY;
-            }
-        }
-    
-        /* Copy parameter */
-        *p_token_parm = *p_parms;
-        if( p_token_parm->hi_val || p_token_parm->low_val )
-            p_token_parm->flags |= CON_PARM_RANGE;
-         
-        p_token->u.token.name[i] = os_MemoryAlloc(os_strlen(p_parms->name));  
-        if (p_token->u.token.name[i] == NULL)
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)("** Error allocate param name\n"));
-            os_MemoryFree(p_token->u.token.parm);
-            os_MemoryFree(p_token->u.token.name);
-            os_MemoryFree(p_token);
-            return E_NOMEMORY;
-        }
-         p_token_parm->name = (PS8)p_token->u.token.name[i];
-         os_strncpy( p_token->u.token.name[i], p_parms->name, os_strlen(p_parms->name) );
-         ++p_parms;
-      } /*end of for loop*/
-    }
-    
-    /* Add token to the directory */
-    p_e = &(p_dir->u.dir.first);
-    while (*p_e)
-      p_e = &((*p_e)->next);
-    *p_e = p_token;
-    
-    return E_OK;
-}
-
-int consoleRunScript( char *script_file, THandle hConsole)
-{
-    FILE *hfile = fopen(script_file, "r" );
-	U8 status = 0;
-    Console_t* pConsole = (Console_t*)hConsole;
-
-    if( hfile )
-    {
-        char buf[INBUF_LENGTH];
-        pConsole->stop_UI_Monitor = FALSE;
-
-        while( fgets(buf, sizeof(buf), hfile ) )
-        {
-            status = Console_ParseString(pConsole, buf);
-			if (status == 1)
-				return TRUE;
-			if( pConsole->stop_UI_Monitor )
-                break;
-        }
-
-        fclose(hfile);
-    }
-    else
-	{
-		os_error_printf(CU_MSG_ERROR, (PS8)("ERROR in script: %s \n"), (PS8)script_file);
-	}
-    return pConsole->stop_UI_Monitor;
-}
diff --git a/wl1271/CUDK/configurationutility/src/cu_cmd.c b/wl1271/CUDK/configurationutility/src/cu_cmd.c
deleted file mode 100644
index 3b7eafe..0000000
--- a/wl1271/CUDK/configurationutility/src/cu_cmd.c
+++ /dev/null
@@ -1,6386 +0,0 @@
-/*
- * cu_cmd.c
- *
- * Copyright 2001-2010 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************
-*
-*   MODULE:  cu_cmd.c
-*   
-*   PURPOSE: 
-* 
-*   DESCRIPTION:  
-*   ============
-*      
-*
-****************************************************************************/
-
-/* includes */
-/************/
-
-#include <stdio.h>
-
-#include "cu_osapi.h"
-#include "TWDriver.h"
-#include "convert.h"
-#include "console.h"
-#include "cu_common.h"
-#include "cu_os.h"
-#include "ipc_event.h"
-#include "wpa_core.h"
-#include "cu_cmd.h"
-#include "oserr.h"
-
-/* defines */
-/***********/
-#define print_available_values(arr) \
-        { \
-            S32 i; \
-            for(i=0; i<SIZE_ARR(arr); i++) \
-                os_error_printf(CU_MSG_INFO2, (PS8)"%d - %s%s", arr[i].value, arr[i].name, (i>=SIZE_ARR(arr)-1) ? (PS8)"\n" : (PS8)", " ); \
-        }
-
-#define CU_CMD_FIND_NAME_ARRAY(index, arr, val) \
-        for ( index = 0; index < SIZE_ARR(arr); index++ ) \
-            if ( arr[ index ].value == (val) ) \
-                break; \
-
-#define CHAN_FREQ_TABLE_SIZE        (sizeof(ChanFreq) / sizeof(struct CHAN_FREQ))
-
-#define IS_BASIC_RATE(a)    ((a) & NET_BASIC_MASK)
-
-#define RATE_2_MBPS(a)    ((F32)((a) & (NET_BASIC_MASK-1))/2)
-
-#define NET_BASIC_MASK      0x80    /* defined in common/src/utils/utils.c */
-
-#define BIT_TO_BYTE_FACTOR  8
-
-#define NVS_FILE_TX_PARAMETERS_UPDATE	0
-#define NVS_FILE_RX_PARAMETERS_UPDATE	1
-
-
-/* local types */
-/***************/
-/* Module control block */
-typedef struct CuCmd_t
-{
-    THandle                 hCuWext;
-    THandle                 hCuCommon;
-    THandle                 hConsole;
-    THandle                 hIpcEvent;
-    THandle                 hWpaCore;
-    
-    U32                     isDeviceRunning;
-
-    scan_Params_t             appScanParams;
-    TPeriodicScanParams     tPeriodicAppScanParams;
-    scan_Policy_t             scanPolicy;
-    
-} CuCmd_t;
-
-/* local variables */
-/*******************/
-struct CHAN_FREQ {
-    U8       chan;
-    U32      freq;
-} ChanFreq[] = {
-    {1,2412000}, {2,2417000}, {3,2422000}, {4,2427000},
-    {5,2432000}, {6,2437000}, {7,2442000}, {8,2447000},
-    {9,2452000},
-    {10,2457000}, {11,2462000}, {12,2467000}, {13,2472000},
-    {14,2484000}, {36,5180000}, {40,5200000}, {44,5220000},
-    {48,5240000}, {52,5260000}, {56,5280000}, {60,5300000},
-    {64,5320000},
-    {100,5500000}, {104,5520000}, {108,5540000}, {112,5560000},
-    {116,5580000}, {120,5600000}, {124,5620000}, {128,5640000},
-    {132,5660000}, {136,5680000}, {140,5700000}, {149,5745000},
-    {153,5765000}, {157,5785000}, {161,5805000} };
-
-static named_value_t BSS_type[] =
-{
-    { os802_11IBSS,                  (PS8)"AD-Hoc" },
-    { os802_11Infrastructure,        (PS8)"Infr." },
-    { os802_11AutoUnknown,           (PS8)"Auto" },
-};
-
-static named_value_t Current_mode[] =
-{
-    { 0,           (PS8)"SME Auto" },
-    { 1,           (PS8)"SME Manual" },
-};
-
-static named_value_t BeaconFilter_use[] =
-{
-    { 0,        (PS8)"INACTIVE" },
-    { 1,        (PS8)"ACTIVE" },
-};
-
-static named_value_t event_type[] = {
-    { IPC_EVENT_ASSOCIATED,             (PS8)"Associated" },
-    { IPC_EVENT_DISASSOCIATED,          (PS8)"Disassociated"  },
-    { IPC_EVENT_LINK_SPEED,             (PS8)"LinkSpeed" },
-    { IPC_EVENT_AUTH_SUCC,              (PS8)"Authentication Success" },
-    { IPC_EVENT_SCAN_COMPLETE,          (PS8)"ScanComplete" },
-    { IPC_EVENT_SCAN_STOPPED,           (PS8)"ScanStopped" },
-#ifdef XCC_MODULE_INCLUDED
-    { IPC_EVENT_CCKM_START,             (PS8)"CCKM_Start" },
-#endif
-    { IPC_EVENT_MEDIA_SPECIFIC,         (PS8)"Media_Specific" },
-    { IPC_EVENT_EAPOL,                  (PS8)"EAPOL" },
-    { IPC_EVENT_RE_AUTH_STARTED,		(PS8)"IPC_EVENT_RE_AUTH_STARTED" },
-    { IPC_EVENT_RE_AUTH_COMPLETED,		(PS8)"IPC_EVENT_RE_AUTH_COMPLETED" },
-    { IPC_EVENT_RE_AUTH_TERMINATED,     (PS8)"IPC_EVENT_RE_AUTH_TERMINATED" },
-    { IPC_EVENT_BOUND,                  (PS8)"Bound" },
-    { IPC_EVENT_UNBOUND,                (PS8)"Unbound" },
-#ifdef WPA_ENTERPRISE
-    { IPC_EVENT_PREAUTH_EAPOL,          (PS8)"PreAuth EAPOL"},
-#endif
-    { IPC_EVENT_LOW_RSSI,               (PS8)"Low RSSI" },    
-    { IPC_EVENT_TSPEC_STATUS,           (PS8)"IPC_EVENT_TSPEC_STATUS" },
-    { IPC_EVENT_TSPEC_RATE_STATUS,      (PS8)"IPC_EVENT_TSPEC_RATE_STATUS" },
-    { IPC_EVENT_MEDIUM_TIME_CROSS,      (PS8)"IPC_EVENT_MEDIUM_TIME_CROSS" },
-    { IPC_EVENT_ROAMING_COMPLETE,       (PS8)"ROAMING_COMPLETE"},
-    { IPC_EVENT_EAP_AUTH_FAILURE,       (PS8)"EAP-FAST/LEAP Auth Failed"},
-    { IPC_EVENT_WPA2_PREAUTHENTICATION, (PS8)"IPC_EVENT_WPA2_PREAUTHENTICATION" },
-    { IPC_EVENT_TRAFFIC_INTENSITY_THRESHOLD_CROSSED, (PS8)"IPC_EVENT_TRAFFIC_INTENSITY_THRESHOLD_CROSSED" },
-    { IPC_EVENT_SCAN_FAILED,			(PS8)"ScanFailed" },
-    { IPC_EVENT_WPS_SESSION_OVERLAP,    (PS8)"IPC_EVENT_WPS_SESSION_OVERLAP" },
-    { IPC_EVENT_RSSI_SNR_TRIGGER,       (PS8)"IPC_EVENT_RSSI_SNR_TRIGGER" },
-    { IPC_EVENT_TIMEOUT,                (PS8)"Timeout" }
-};
-
-static named_value_t report_module[] =
-{    
-    { FILE_ID_0   ,  (PS8)"timer                   " },
-    { FILE_ID_1   ,  (PS8)"measurementMgr          " },
-    { FILE_ID_2   ,  (PS8)"measurementMgrSM        " },
-    { FILE_ID_3   ,  (PS8)"regulatoryDomain        " },
-    { FILE_ID_4   ,  (PS8)"requestHandler          " },
-    { FILE_ID_5   ,  (PS8)"SoftGemini              " },
-    { FILE_ID_6   ,  (PS8)"spectrumMngmntMgr       " },
-    { FILE_ID_7   ,  (PS8)"SwitchChannel           " },
-    { FILE_ID_8   ,  (PS8)"roamingMngr             " },
-    { FILE_ID_9   ,  (PS8)"scanMngr                " },
-    { FILE_ID_10  ,  (PS8)"admCtrlXCC              " },
-    { FILE_ID_11  ,  (PS8)"XCCMngr                 " },
-    { FILE_ID_12  ,  (PS8)"XCCRMMngr               " },
-    { FILE_ID_13  ,  (PS8)"XCCTSMngr               " },
-    { FILE_ID_14  ,  (PS8)"rogueAp                 " },
-    { FILE_ID_15  ,  (PS8)"TransmitPowerXCC        " },
-    { FILE_ID_16  ,  (PS8)"admCtrl                 " },
-    { FILE_ID_17  ,  (PS8)"admCtrlNone             " },
-    { FILE_ID_18  ,  (PS8)"admCtrlWep              " },
-    { FILE_ID_19  ,  (PS8)"admCtrlWpa              " },
-    { FILE_ID_20  ,  (PS8)"admCtrlWpa2             " },
-    { FILE_ID_21  ,  (PS8)"apConn                  " },
-    { FILE_ID_22  ,  (PS8)"broadcastKey802_1x      " },
-    { FILE_ID_23  ,  (PS8)"broadcastKeyNone        " },
-    { FILE_ID_24  ,  (PS8)"broadcastKeySM          " },
-    { FILE_ID_25  ,  (PS8)"conn                    " },
-    { FILE_ID_26  ,  (PS8)"connIbss                " },
-    { FILE_ID_27  ,  (PS8)"connInfra               " },
-    { FILE_ID_28  ,  (PS8)"keyDerive               " },
-    { FILE_ID_29  ,  (PS8)"keyDeriveAes            " },
-    { FILE_ID_30  ,  (PS8)"keyDeriveCkip           " },
-    { FILE_ID_31  ,  (PS8)"keyDeriveTkip           " },
-    { FILE_ID_32  ,  (PS8)"keyDeriveWep            " },
-    { FILE_ID_33  ,  (PS8)"keyParser               " },
-    { FILE_ID_34  ,  (PS8)"keyParserExternal       " },
-    { FILE_ID_35  ,  (PS8)"keyParserWep            " },
-    { FILE_ID_36  ,  (PS8)"mainKeysSm              " },
-    { FILE_ID_37  ,  (PS8)"mainSecKeysOnly         " },
-    { FILE_ID_38  ,  (PS8)"mainSecNull             " },
-    { FILE_ID_39  ,  (PS8)"mainSecSm               " },
-    { FILE_ID_40  ,  (PS8)"rsn                     " },
-    { FILE_ID_41  ,  (PS8)"sme                     " },
-    { FILE_ID_42  ,  (PS8)"smeSelect               " },
-    { FILE_ID_43  ,  (PS8)"smeSm                   " },
-    { FILE_ID_44  ,  (PS8)"unicastKey802_1x        " },
-    { FILE_ID_45  ,  (PS8)"unicastKeyNone          " },
-    { FILE_ID_46  ,  (PS8)"unicastKeySM            " },
-    { FILE_ID_47  ,  (PS8)"CmdDispatcher           " },
-    { FILE_ID_48  ,  (PS8)"CmdHndlr                " },
-    { FILE_ID_49  ,  (PS8)"DrvMain                 " },
-    { FILE_ID_50  ,  (PS8)"EvHandler               " },
-    { FILE_ID_51  ,  (PS8)"Ctrl                    " },
-    { FILE_ID_52  ,  (PS8)"GeneralUtil             " },
-    { FILE_ID_53  ,  (PS8)"RateAdaptation          " },
-    { FILE_ID_54  ,  (PS8)"rx                      " },
-    { FILE_ID_55  ,  (PS8)"TrafficMonitor          " },
-    { FILE_ID_56  ,  (PS8)"txCtrl                  " },
-    { FILE_ID_57  ,  (PS8)"txCtrlParams            " },
-    { FILE_ID_58  ,  (PS8)"txCtrlServ              " },
-    { FILE_ID_59  ,  (PS8)"TxDataClsfr             " },
-    { FILE_ID_60  ,  (PS8)"txDataQueue             " },
-    { FILE_ID_61  ,  (PS8)"txMgmtQueue             " },
-    { FILE_ID_62  ,  (PS8)"txPort                  " },
-    { FILE_ID_63  ,  (PS8)"assocSM                 " },
-    { FILE_ID_64  ,  (PS8)"authSm                  " },
-    { FILE_ID_65  ,  (PS8)"currBss                 " },
-    { FILE_ID_66  ,  (PS8)"healthMonitor           " },
-    { FILE_ID_67  ,  (PS8)"mlmeBuilder             " },
-    { FILE_ID_68  ,  (PS8)"mlmeParser              " },
-    { FILE_ID_69  ,  (PS8)"mlmeSm                  " },
-    { FILE_ID_70  ,  (PS8)"openAuthSm              " },
-    { FILE_ID_71  ,  (PS8)"PowerMgr                " },
-    { FILE_ID_72  ,  (PS8)"PowerMgrDbgPrint        " },
-    { FILE_ID_73  ,  (PS8)"PowerMgrKeepAlive       " },
-    { FILE_ID_74  ,  (PS8)"qosMngr                 " },
-    { FILE_ID_75  ,  (PS8)"roamingInt              " },
-    { FILE_ID_76  ,  (PS8)"ScanCncn                " },
-    { FILE_ID_77  ,  (PS8)"ScanCncnApp             " },
-    { FILE_ID_78  ,  (PS8)"ScanCncnOsSm            " },
-    { FILE_ID_79  ,  (PS8)"ScanCncnSm              " },
-    { FILE_ID_80  ,  (PS8)"ScanCncnSmSpecific      " },
-    { FILE_ID_81  ,  (PS8)"scanResultTable         " },
-    { FILE_ID_82  ,  (PS8)"scr                     " },
-    { FILE_ID_83  ,  (PS8)"sharedKeyAuthSm         " },
-    { FILE_ID_84  ,  (PS8)"siteHash                " },
-    { FILE_ID_85  ,  (PS8)"siteMgr                 " },
-    { FILE_ID_86  ,  (PS8)"StaCap                  " },
-    { FILE_ID_87  ,  (PS8)"systemConfig            " },
-    { FILE_ID_88  ,  (PS8)"templates               " },
-    { FILE_ID_89  ,  (PS8)"trafficAdmControl       " },
-    { FILE_ID_90  ,  (PS8)"CmdBld                  " },
-    { FILE_ID_91  ,  (PS8)"CmdBldCfg               " },
-    { FILE_ID_92  ,  (PS8)"CmdBldCfgIE             " },
-    { FILE_ID_93  ,  (PS8)"CmdBldCmd               " },
-    { FILE_ID_94  ,  (PS8)"CmdBldCmdIE             " },
-    { FILE_ID_95  ,  (PS8)"CmdBldItr               " },
-    { FILE_ID_96  ,  (PS8)"CmdBldItrIE             " },
-    { FILE_ID_97  ,  (PS8)"CmdQueue                " },
-    { FILE_ID_98  ,  (PS8)"RxQueue                 " },
-    { FILE_ID_99  ,  (PS8)"txCtrlBlk               " },
-    { FILE_ID_100 ,  (PS8)"txHwQueue               " },
-    { FILE_ID_101 ,  (PS8)"CmdMBox                 " },
-    { FILE_ID_102 ,  (PS8)"eventMbox               " },
-    { FILE_ID_103 ,  (PS8)"fwDebug                 " },
-    { FILE_ID_104 ,  (PS8)"FwEvent                 " },
-    { FILE_ID_105 ,  (PS8)"HwInit                  " },
-    { FILE_ID_106 ,  (PS8)"RxXfer                  " },
-    { FILE_ID_107 ,  (PS8)"txResult                " },
-    { FILE_ID_108 ,  (PS8)"txXfer                  " },
-    { FILE_ID_109 ,  (PS8)"MacServices             " },
-    { FILE_ID_110 ,  (PS8)"MeasurementSrv          " },
-    { FILE_ID_111 ,  (PS8)"measurementSrvDbgPrint  " },
-    { FILE_ID_112 ,  (PS8)"MeasurementSrvSM        " },
-    { FILE_ID_113 ,  (PS8)"PowerSrv                " },
-    { FILE_ID_114 ,  (PS8)"PowerSrvSM              " },
-    { FILE_ID_115 ,  (PS8)"ScanSrv                 " },
-    { FILE_ID_116 ,  (PS8)"ScanSrvSM               " },
-    { FILE_ID_117 ,  (PS8)"TWDriver                " },
-    { FILE_ID_118 ,  (PS8)"TWDriverCtrl            " },
-    { FILE_ID_119 ,  (PS8)"TWDriverRadio           " },
-    { FILE_ID_120 ,  (PS8)"TWDriverTx              " },
-    { FILE_ID_121 ,  (PS8)"TwIf                    " },
-    { FILE_ID_122 ,  (PS8)"SdioBusDrv              " },
-    { FILE_ID_123 ,  (PS8)"TxnQueue                " },
-    { FILE_ID_124 ,  (PS8)"WspiBusDrv              " },
-    { FILE_ID_125 ,  (PS8)"context                 " },
-    { FILE_ID_126 ,  (PS8)"freq                    " },
-    { FILE_ID_127 ,  (PS8)"fsm                     " },
-    { FILE_ID_128 ,  (PS8)"GenSM                   " },
-    { FILE_ID_129 ,  (PS8)"mem                     " },
-    { FILE_ID_130 ,  (PS8)"queue                   " },
-    { FILE_ID_131 ,  (PS8)"rate                    " },
-    { FILE_ID_132 ,  (PS8)"report                  " },
-    { FILE_ID_133 ,  (PS8)"stack                   " },
-	{ FILE_ID_134 ,  (PS8)"externalSec             " },
-	{ FILE_ID_135 ,  (PS8)"roamingMngr_autoSM      " },
-	{ FILE_ID_136 ,  (PS8)"roamingMngr_manualSM    " },
-	{ FILE_ID_137 ,  (PS8)"cmdinterpretoid         " },
-	{ FILE_ID_138 ,  (PS8)"WlanDrvIf               " }
-};
-
-static named_value_t report_severity[] = {
-    { 0,                          (PS8)"----"           },
-    { REPORT_SEVERITY_INIT,         (PS8)"INIT",          },
-    { REPORT_SEVERITY_INFORMATION,  (PS8)"INFORMATION",   },
-    { REPORT_SEVERITY_WARNING,      (PS8)"WARNING",       },
-    { REPORT_SEVERITY_ERROR,        (PS8)"ERROR",         },
-    { REPORT_SEVERITY_FATAL_ERROR,  (PS8)"FATAL_ERROR",   },
-    { REPORT_SEVERITY_SM,           (PS8)"SM",            },
-    { REPORT_SEVERITY_CONSOLE,      (PS8)"CONSOLE"        }
-};
-
-static named_value_t power_level[] = {
-        { OS_POWER_LEVEL_ELP,       (PS8)"Extreme Low Power" },
-        { OS_POWER_LEVEL_PD,        (PS8)"Power Down" },
-        { OS_POWER_LEVEL_AWAKE,     (PS8)"Awake" },
-};
-
-static named_value_t band2Str[] = {
-        { RADIO_BAND_2_4_GHZ,                   (PS8)"2.4 GHz"                        },
-        { RADIO_BAND_5_0_GHZ,                   (PS8)"5.0 GHz"                        },
-        { RADIO_BAND_DUAL,                      (PS8)"Both   "                        }
-};
-
-static named_value_t EtEvent2Str[] = {
-        { SCAN_ET_COND_DISABLE,                 (PS8)"ET disabled  "                     },
-        { SCAN_ET_COND_BEACON,                  (PS8)"ET on Beacon "                     },
-        { SCAN_ET_COND_PROBE_RESP,              (PS8)"ET on Prb Rsp"                     },
-        { SCAN_ET_COND_ANY_FRAME,               (PS8)"ET on both   "                     }
-};
-
-static named_value_t rate2Str[] = {
-        { DRV_RATE_MASK_AUTO,                   (PS8)"Auto    "                          },
-        { DRV_RATE_MASK_1_BARKER,               (PS8)"1 Mbps  "                          },
-        { DRV_RATE_MASK_2_BARKER,               (PS8)"2 Mbps  "                          },
-        { DRV_RATE_MASK_5_5_CCK,                (PS8)"5.5 Mbps"                          },
-        { DRV_RATE_MASK_11_CCK,                 (PS8)"11 Mbps "                          },
-        { DRV_RATE_MASK_22_PBCC,                (PS8)"22 Mbps "                          },
-        { DRV_RATE_MASK_6_OFDM,                 (PS8)"6 Mbps  "                          },
-        { DRV_RATE_MASK_9_OFDM,                 (PS8)"9 Mbps  "                          },
-        { DRV_RATE_MASK_12_OFDM,                (PS8)"12 Mbps "                          },
-        { DRV_RATE_MASK_18_OFDM,                (PS8)"18 Mbps "                          },
-        { DRV_RATE_MASK_24_OFDM,                (PS8)"24 Mbps "                          },
-        { DRV_RATE_MASK_36_OFDM,                (PS8)"36 Mbps "                          },
-        { DRV_RATE_MASK_48_OFDM,                (PS8)"48 Mbps "                          },
-        { DRV_RATE_MASK_54_OFDM,                (PS8)"54 Mbps "                          }
-};
-
-static named_value_t scanType2Str[] = {
-        { SCAN_TYPE_NORMAL_PASSIVE,             (PS8)"Passive Normal Scan"               },
-        { SCAN_TYPE_NORMAL_ACTIVE,              (PS8)"Active Normal Scan"                },
-        { SCAN_TYPE_SPS,                        (PS8)"Scheduled Passive Scan (SPS)"      },
-        { SCAN_TYPE_TRIGGERED_PASSIVE,          (PS8)"Passive Triggered Scan"            },
-        { SCAN_TYPE_TRIGGERED_ACTIVE,           (PS8)"Active Triggered Scan"             }
-};
-
-static named_value_t booleanStr[] = {
-        { FALSE,                             (PS8)"False" },
-        { TRUE,                              (PS8)"True" }
-};
-
-static named_value_t ssidVisabilityStr[] = {
-        { SCAN_SSID_VISABILITY_PUBLIC,          (PS8)"Public" },
-        { SCAN_SSID_VISABILITY_HIDDEN,          (PS8)"Hidden" }
-};
-
-static named_value_t bssTypeStr[] = {
-        { BSS_INDEPENDENT,                      (PS8)"Independent" },
-        { BSS_INFRASTRUCTURE,                   (PS8)"Infrastructure" },
-        { BSS_ANY,                              (PS8)"Any" }
-};
-
-static named_value_t power_mode_val[] = {
-        { OS_POWER_MODE_AUTO,                   (PS8)"AUTO" },
-        { OS_POWER_MODE_ACTIVE,                 (PS8)"ACTIVE" },
-        { OS_POWER_MODE_SHORT_DOZE,             (PS8)"SHORT_DOZE" },
-        { OS_POWER_MODE_LONG_DOZE,              (PS8)"LONG_DOZE" }
-};
-
-static named_value_t encrypt_type[] = {
-        { OS_ENCRYPTION_TYPE_NONE,              (PS8)"None" },
-        { OS_ENCRYPTION_TYPE_WEP,               (PS8)"WEP" },
-        { OS_ENCRYPTION_TYPE_TKIP,              (PS8)"TKIP" },
-        { OS_ENCRYPTION_TYPE_AES,               (PS8)"AES" }
-};
-
-static named_value_t tKeepAliveTriggerTypes[] = {
-        { KEEP_ALIVE_TRIG_TYPE_NO_TX,           (PS8)"When Idle" },
-        { KEEP_ALIVE_TRIG_TYPE_PERIOD_ONLY,     (PS8)"Always" }
-};
-
-#if 0 /* need to create debug logic for CLI */
-static named_value_t cli_level_type[] = {
-        { CU_MSG_DEBUG,                         (PS8)"CU_MSG_DEBUG" },
-        { CU_MSG_INFO1,                         (PS8)"CU_MSG_INFO1" },
-        { CU_MSG_WARNING,                       (PS8)"CU_MSG_WARNING" },        
-        { CU_MSG_ERROR,                         (PS8)"CU_MSG_ERROR" },
-        { CU_MSG_INFO2,                         (PS8)"CU_MSG_INFO2" }
-};
-#endif
-
-
-static char *ConnState[] = {
-  "IDLE",
-  "SCANNING",
-  "CONNECTING",
-  "CONNECTED",
-  "DISCONNECT",
-  "IDLE"
-};
-
-
-
-static char ssidBuf[MAX_SSID_LEN +1];
-
-/* local fucntions */
-/*******************/
-static S32 CuCmd_Str2MACAddr(PS8 str, PU8 mac)
-{
-    S32 i;   
-    
-    for( i=0; i<MAC_ADDR_LEN; i++ )
-    {
-        mac[i] = (U8) os_strtoul(str, &str, 16);
-        str++;
-    }    
-    return TRUE;
-}
-
-/* used in get_bssid_list() */
-static U8 CuCmd_Freq2Chan(U32 freq)
-{
-    U32 i;
-
-    for(i=0; i<CHAN_FREQ_TABLE_SIZE; i++)
-        if(ChanFreq[i].freq == freq) 
-            return ChanFreq[i].chan;
-
-    return 0;
-}
-
-/* Converts a single ASCII character to a hex value (i.e. '0'-'9' = 0-9, 'a'-'f' = a-f, 'A'-'F' = a-f) */
-static U8 CuCmd_atox(U8 c)
-{
-    if (('0' <= c) && ('9' >= c))
-    {
-        return c - '0';
-    }
-    else if (('a' <= c) && ('f' >= c))
-    {
-        return c - 'a' + 10;
-    }
-    else /* assuming input is valid */
-    {
-        return c - 'A' + 10;
-    }
-}
-
-/* converts an ASCII string to a buffer */
-static void CuCmd_atox_string (U8* srcString, U8* dstBuffer)
-{
-    U32 uIndex, uLength;
-    
-    uLength = os_strlen ((PS8)srcString);
-
-    /* clear the destination buffer */
-    os_memset (dstBuffer, 0, (uLength / 2) + 1);
-
-    for (uIndex = 0; uIndex < uLength; uIndex++)
-    {
-        if (0 == (uIndex % 2))
-        {
-            dstBuffer[ uIndex / 2 ] |= (CuCmd_atox (srcString[ uIndex ]) << 4);
-        }
-        else
-        {
-            dstBuffer[ uIndex / 2 ] |= CuCmd_atox (srcString[ uIndex ]);
-        }
-    }
-}
-
-static void CuCmd_xtoa_string (U8* srcBuffer, U32 srcBufferLength, U8* dstString)
-{
-    U32 uIndex;
-
-    for (uIndex = 0; uIndex < srcBufferLength; uIndex++)
-    {
-        os_sprintf ((PS8)&(dstString[ uIndex * 2 ]), (PS8)"%02x", srcBuffer[ uIndex ]);
-    }
-}
-
-static VOID CuCmd_Init_Scan_Params(CuCmd_t* pCuCmd)
-{
-    U8 i,j;
-
-    /* init application scan default params */
-    pCuCmd->appScanParams.desiredSsid.len = 0;
-    pCuCmd->appScanParams.scanType = SCAN_TYPE_NORMAL_ACTIVE;
-    pCuCmd->appScanParams.band = RADIO_BAND_2_4_GHZ;
-    pCuCmd->appScanParams.probeReqNumber = 3;
-    pCuCmd->appScanParams.probeRequestRate = RATE_MASK_UNSPECIFIED; /* Let the FW select */;
-    pCuCmd->appScanParams.numOfChannels = 14;
-    for ( i = 0; i < 14; i++ )
-    {
-        for ( j = 0; j < 6; j++ )
-        {
-            pCuCmd->appScanParams.channelEntry[ i ].normalChannelEntry.bssId[ j ] = 0xff;
-        }
-        pCuCmd->appScanParams.channelEntry[ i ].normalChannelEntry.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-        pCuCmd->appScanParams.channelEntry[ i ].normalChannelEntry.ETMaxNumOfAPframes = 0;
-        pCuCmd->appScanParams.channelEntry[ i ].normalChannelEntry.maxChannelDwellTime = 60000;
-        pCuCmd->appScanParams.channelEntry[ i ].normalChannelEntry.minChannelDwellTime = 30000;
-        pCuCmd->appScanParams.channelEntry[ i ].normalChannelEntry.txPowerDbm = DEF_TX_POWER;
-        pCuCmd->appScanParams.channelEntry[ i ].normalChannelEntry.channel = i + 1;
-    }
-
-    /* init periodic application scan params */
-    pCuCmd->tPeriodicAppScanParams.uSsidNum = 0;
-    pCuCmd->tPeriodicAppScanParams.uSsidListFilterEnabled = 1;
-    pCuCmd->tPeriodicAppScanParams.uCycleNum = 0; /* forever */
-    pCuCmd->tPeriodicAppScanParams.uCycleIntervalMsec[ 0 ] = 3;
-    for (i = 1; i < PERIODIC_SCAN_MAX_INTERVAL_NUM; i++)
-    {
-        pCuCmd->tPeriodicAppScanParams.uCycleIntervalMsec[ i ] = 30000;
-    }
-    pCuCmd->tPeriodicAppScanParams.iRssiThreshold = -80;
-    pCuCmd->tPeriodicAppScanParams.iSnrThreshold = 0;
-    pCuCmd->tPeriodicAppScanParams.uFrameCountReportThreshold = 1;
-    pCuCmd->tPeriodicAppScanParams.bTerminateOnReport = TRUE;
-    pCuCmd->tPeriodicAppScanParams.eBssType = BSS_ANY;
-    pCuCmd->tPeriodicAppScanParams.uProbeRequestNum = 3;
-    pCuCmd->tPeriodicAppScanParams.uChannelNum = 14;
-    for ( i = 0; i < 14; i++ )
-    {
-        pCuCmd->tPeriodicAppScanParams.tChannels[ i ].eBand = RADIO_BAND_2_4_GHZ;
-        pCuCmd->tPeriodicAppScanParams.tChannels[ i ].uChannel = i + 1;
-        pCuCmd->tPeriodicAppScanParams.tChannels[ i ].eScanType = SCAN_TYPE_NORMAL_ACTIVE;
-        pCuCmd->tPeriodicAppScanParams.tChannels[ i ].uMinDwellTimeMs = 5;
-        pCuCmd->tPeriodicAppScanParams.tChannels[ i ].uMaxDwellTimeMs = 20;
-        pCuCmd->tPeriodicAppScanParams.tChannels[ i ].uTxPowerLevelDbm = DEF_TX_POWER;
-    }
-
-    /* init default scan policy */
-    pCuCmd->scanPolicy.normalScanInterval = 10000;
-    pCuCmd->scanPolicy.deterioratingScanInterval = 5000;
-    pCuCmd->scanPolicy.maxTrackFailures = 3;
-    pCuCmd->scanPolicy.BSSListSize = 4;
-    pCuCmd->scanPolicy.BSSNumberToStartDiscovery = 1;
-    pCuCmd->scanPolicy.numOfBands = 1;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].band = RADIO_BAND_2_4_GHZ;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].rxRSSIThreshold = -80;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].numOfChannles = 14;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].numOfChannlesForDiscovery = 3;
-    for ( i = 0; i < 14; i++ )
-    {
-        pCuCmd->scanPolicy.bandScanPolicy[ 0 ].channelList[ i ] = i + 1;
-    }
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].trackingMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.maxChannelDwellTime = 30000;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.minChannelDwellTime = 15000;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.bitrate = RATE_MASK_UNSPECIFIED; /* Let the FW select */
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.txPowerDbm = DEF_TX_POWER;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.maxChannelDwellTime = 30000;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.minChannelDwellTime = 15000;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.bitrate = RATE_MASK_UNSPECIFIED; /* Let the FW select */;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.txPowerDbm = DEF_TX_POWER;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.maxChannelDwellTime = 30000;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.minChannelDwellTime = 15000;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.bitrate = RATE_MASK_UNSPECIFIED; /* Let the FW select */;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3;
-    pCuCmd->scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.txPowerDbm = DEF_TX_POWER;
-}
-
-char* PrintSSID(OS_802_11_SSID* ssid)
-{
-    /* It looks like it never happens. Anyway decided to check */
-	if(ssid->SsidLength > MAX_SSID_LEN)
-    {
-        
-        os_error_printf(CU_MSG_ERROR, (PS8)"PrintSSID. ssid->SsidLength=%d exceeds the limit %d\n",
-                         ssid->SsidLength, MAX_SSID_LEN);
-        /*WLAN_OS_REPORT(("PrintSSID. ssid->SsidLength=%d exceeds the limit %d\n",
-                   ssid->SsidLength, MAX_SSID_LEN));*/
-        ssid->SsidLength = MAX_SSID_LEN;
-    }
-	os_memcpy((PVOID)ssidBuf, (PVOID) ssid->Ssid, ssid->SsidLength); 
-	ssidBuf[ssid->SsidLength] = '\0';
-	return ssidBuf;
-}
-
-static VOID CuCmd_PrintBssidList(OS_802_11_BSSID_LIST_EX* bssidList, S32 IsFullPrint, TMacAddr CurrentBssid)
-{
-    U32 i;
-    S8  connectionTypeStr[50];
-    POS_802_11_BSSID_EX pBssid = &bssidList->Bssid[0];
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"BssId List: Num=%u\n", bssidList->NumberOfItems);
-    os_error_printf(CU_MSG_INFO2, (PS8)"         MAC        Privacy Rssi  Mode    Channel    SSID\n");
-    for(i=0; i<bssidList->NumberOfItems; i++)
-    {            
-        switch (pBssid->InfrastructureMode)
-        {
-            case os802_11IBSS:
-                os_strcpy (connectionTypeStr, (PS8)"Adhoc");
-                break;
-            case os802_11Infrastructure:
-                os_strcpy (connectionTypeStr, (PS8)"Infra");
-                break;
-            case os802_11AutoUnknown:
-                os_strcpy (connectionTypeStr, (PS8)"Auto");
-                break;
-            default:
-                os_strcpy (connectionTypeStr, (PS8)" --- ");
-                break;
-        }
-        os_error_printf(CU_MSG_INFO2, (PS8)"%s%02x.%02x.%02x.%02x.%02x.%02x   %3u   %4d  %s %6d        %s\n",
-            (!os_memcmp(CurrentBssid, pBssid->MacAddress, MAC_ADDR_LEN))?"*":" ",
-            pBssid->MacAddress[0],
-            pBssid->MacAddress[1],
-            pBssid->MacAddress[2],
-            pBssid->MacAddress[3],
-            pBssid->MacAddress[4],
-            pBssid->MacAddress[5],
-            pBssid->Privacy, 
-			(char)pBssid->Rssi | 0xffffff00, /* need the 0xffffff00 to get negative value display */
-            connectionTypeStr,
-            CuCmd_Freq2Chan(pBssid->Configuration.Union.channel),
-            (pBssid->Ssid.Ssid[0] == '\0')?(PS8)"****":((PS8)pBssid->Ssid.Ssid) );
-
-        if (IsFullPrint)
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"   BeaconInterval %d\n",  pBssid->Configuration.BeaconPeriod);
-            os_error_printf(CU_MSG_INFO2, (PS8)"   Capabilities   0x%x\n",  pBssid->Capabilities);
-        }
-#ifdef _WINDOWS
-		pBssid = (POS_802_11_BSSID_EX)((S8*)pBssid + (pBssid->Length ? pBssid->Length : sizeof(OS_802_11_BSSID_EX)));
-#else /*for Linux*/
-		pBssid = &bssidList->Bssid[i+1];
-#endif
-    }        
-}
-
-static U8 CuCmd_Char2Hex( S8 c )
-{
-    if( c >= '0' && c <= '9' )
-        return c - '0';
-    else if( os_tolower(c) >= 'a' && os_tolower(c) <= 'f' )
-        return (U8) (os_tolower(c) - 'a' + 0x0a);
-    os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_Char2Hex - invalid symbol '%c'\n", c );
-    return ((U8)-1);
-}
-
-static PS8 CuCmd_CreateRateStr(PS8 str, U8 rate)
-{
-    if( rate == 0 )
-        return os_strcpy(str,(PS8)"Auto (0)");
-
-    os_sprintf(str, (PS8)"%.3g Mbps", 
-        RATE_2_MBPS(rate));
-
-    return str;
-}
-
-static VOID CuCmd_PrintScanMethod(scan_Method_t* scanMethod)
-{
-    S32 i;
-    os_error_printf(CU_MSG_INFO2, (PS8)"Scan type: %s\n", scanType2Str[ scanMethod->scanType ].name);
-    switch (scanMethod->scanType)
-    {
-        case SCAN_TYPE_NORMAL_ACTIVE:
-        case SCAN_TYPE_NORMAL_PASSIVE:
-            os_error_printf(CU_MSG_INFO2, (PS8)"Max channel dwell time: %d, Min channel dwell time: %d\n",
-                scanMethod->method.basicMethodParams.maxChannelDwellTime, 
-                scanMethod->method.basicMethodParams.minChannelDwellTime);
-            
-            CU_CMD_FIND_NAME_ARRAY(i, EtEvent2Str, scanMethod->method.basicMethodParams.earlyTerminationEvent);
-            os_error_printf(CU_MSG_INFO2 ,(PS8)"ET condition: %s, ET number of frames: %d\n",
-                EtEvent2Str[i].name, 
-                scanMethod->method.basicMethodParams.ETMaxNumberOfApFrames);
-
-            CU_CMD_FIND_NAME_ARRAY(i, rate2Str, scanMethod->method.basicMethodParams.probReqParams.bitrate);
-            os_error_printf(CU_MSG_INFO2 ,(PS8)"Probe request number: %d, probe request rate: %s, TX level: %d\n",
-                scanMethod->method.basicMethodParams.probReqParams.numOfProbeReqs, 
-                rate2Str[i].name,
-                scanMethod->method.basicMethodParams.probReqParams.txPowerDbm);
-            break;
-
-        case SCAN_TYPE_TRIGGERED_ACTIVE:
-        case SCAN_TYPE_TRIGGERED_PASSIVE:
-            os_error_printf(CU_MSG_INFO2, (PS8)"Triggering Tid: %d\n", scanMethod->method.TidTriggerdMethodParams.triggeringTid);
-            os_error_printf(CU_MSG_INFO2, (PS8)"Max channel dwell time: %d, Min channel dwell time: %d\n",
-                scanMethod->method.basicMethodParams.maxChannelDwellTime, 
-                scanMethod->method.basicMethodParams.minChannelDwellTime);
-            
-            CU_CMD_FIND_NAME_ARRAY(i, EtEvent2Str, scanMethod->method.basicMethodParams.earlyTerminationEvent);
-            os_error_printf(CU_MSG_INFO2, (PS8)"ET condition: %s, ET number of frames: %d\n",
-                EtEvent2Str[i].name, 
-                scanMethod->method.basicMethodParams.ETMaxNumberOfApFrames);
-
-            CU_CMD_FIND_NAME_ARRAY(i, rate2Str, scanMethod->method.basicMethodParams.probReqParams.bitrate);
-            os_error_printf(CU_MSG_INFO2, (PS8)"Probe request number: %d, probe request rate: %s, TX level: %d\n",
-                scanMethod->method.basicMethodParams.probReqParams.numOfProbeReqs, 
-                rate2Str[i].name,
-                scanMethod->method.basicMethodParams.probReqParams.txPowerDbm);
-            break;
-
-        case SCAN_TYPE_SPS:
-            CU_CMD_FIND_NAME_ARRAY(i, EtEvent2Str, scanMethod->method.spsMethodParams.earlyTerminationEvent);
-            os_error_printf(CU_MSG_INFO2, (PS8)"ET condition: %s, ET number of frames: %d\n",
-                EtEvent2Str[i].name, 
-                scanMethod->method.spsMethodParams.ETMaxNumberOfApFrames);
-            os_error_printf(CU_MSG_INFO2, (PS8)"Scan duration: %d\n", scanMethod->method.spsMethodParams.scanDuration);
-            break;
-
-        case SCAN_TYPE_NO_SCAN:
-        case SCAN_TYPE_PACTSIVE:
-            break;
-    }
-}
-
-static VOID CuCmd_PrintScanBand(scan_bandPolicy_t* pBandPolicy)
-{
-    S32 j;
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"\nBand: %s\n", band2Str[ pBandPolicy->band ].name);
-    os_error_printf(CU_MSG_INFO2, (PS8)"RSSI Threshold: %d dBm\n", pBandPolicy->rxRSSIThreshold);
-    os_error_printf(CU_MSG_INFO2, (PS8)"Number of channels for each discovery interval: %d\n", pBandPolicy->numOfChannlesForDiscovery);
-    os_error_printf(CU_MSG_INFO2, (PS8)"\nTracking Method:\n");
-    CuCmd_PrintScanMethod( &(pBandPolicy->trackingMethod) );
-    os_error_printf(CU_MSG_INFO2, (PS8)"\nDiscovery Method:\n");
-    CuCmd_PrintScanMethod( &(pBandPolicy->discoveryMethod) );
-    os_error_printf(CU_MSG_INFO2, (PS8)"\nImmediate Scan Method:\n");
-    CuCmd_PrintScanMethod( &(pBandPolicy->immediateScanMethod) );
-    if ( pBandPolicy->numOfChannles > 0 )
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"\nChannel list: ");
-        for ( j = 0; j < pBandPolicy->numOfChannles; j++ )
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"%3d ", pBandPolicy->channelList[ j ]);
-        }
-        os_error_printf(CU_MSG_INFO2, (PS8)"\n");
-    }
-    else
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"\nNo channels defined.\n");
-    }
-}
-
-static U32 CuCmd_IsValueRate(U32 rate)
-{
-
-    switch (rate)
-    {
-        case 1:
-        case 2:
-        case 5:
-        case 6:
-        case 9:
-        case 11:
-        case 12:
-        case 18:
-        case 24:
-        case 36:
-        case 48:
-        case 54:
-            return (TRUE);
-            
-        default:
-            return (FALSE);
-   }   
-}
-
-static VOID CuCmd_ParseMaskString(PS8 pString, PU8 pBuffer, PU8 pLength)
-{
-    S8  ch;
-    S32 iter = 0;
-    U8  val;
-
-    while ((ch = pString[iter]))
-    {
-        val = (ch == '1' ? 1 : 0);
-
-        if (iter % BIT_TO_BYTE_FACTOR)
-            pBuffer[iter / BIT_TO_BYTE_FACTOR] |= (val << (iter % BIT_TO_BYTE_FACTOR));
-        else
-            pBuffer[iter / BIT_TO_BYTE_FACTOR] = val;
-
-        ++iter;
-    }
-
-    /* iter = 0 len = 0, iter = 1 len = 1, iter = 8 len = 1, and so on... */
-    *pLength = (U8) (iter + BIT_TO_BYTE_FACTOR - 1) / BIT_TO_BYTE_FACTOR;
-}
-
-static VOID CuCmd_ParsePatternString(PS8 pString, PU8 pBuffer, PU8 pLength)
-{
-    S8 ch;
-    S32 iter = 0;
-    U8 val;
-
-    while ((ch = pString[iter]))
-    {
-        val = ((ch >= '0' && ch <= '9') ? (ch - '0') : 
-                     (ch >= 'A' && ch <= 'F') ? (0xA + ch - 'A') :
-                     (ch >= 'a' && ch <= 'f') ? (0xA + ch - 'a') : 0);
-
-        /* even indexes go to the lower nibble, odd indexes push them to the */
-        /* higher nibble and then go themselves to the lower nibble. */
-        if (iter % 2)
-            pBuffer[iter / 2] = ((pBuffer[iter / 2] << (BIT_TO_BYTE_FACTOR / 2)) | val);
-        else
-            pBuffer[iter / 2] = val;
-
-        ++iter;
-    }
-
-    /* iter = 0 len = 0, iter = 1 len = 1, iter = 2 len = 1, and so on... */
-    *pLength = (U8) (iter + 1) / 2;
-}
-
-/* functions */
-/*************/
-THandle CuCmd_Create(const PS8 device_name, THandle hConsole, S32 BypassSupplicant, PS8 pSupplIfFile)
-{
-    THandle hIpcSta;
-
-    CuCmd_t* pCuCmd = (CuCmd_t*)os_MemoryCAlloc(sizeof(CuCmd_t), sizeof(U8));
-    if(pCuCmd == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_Create - cant allocate control block\n");
-        return NULL;
-    }
-
-    pCuCmd->isDeviceRunning = FALSE;
-    pCuCmd->hConsole = hConsole;
-    
-    pCuCmd->hCuCommon= CuCommon_Create(&hIpcSta, device_name);
-    if(pCuCmd->hCuCommon == NULL)
-    {   
-        CuCmd_Destroy(pCuCmd);
-        return NULL;
-    }
-
-    pCuCmd->hCuWext= CuOs_Create(hIpcSta);
-    if(pCuCmd->hCuWext == NULL)
-    {   
-        CuCmd_Destroy(pCuCmd);
-        return NULL;
-    }
-
-    pCuCmd->hIpcEvent = (THandle) IpcEvent_Create();
-    if(pCuCmd->hIpcEvent == NULL)
-    {   
-        CuCmd_Destroy(pCuCmd);
-        return NULL;
-    }
-
-    if(BypassSupplicant)
-    {
-        /* specify that there is no supplicant */
-        pCuCmd->hWpaCore = NULL;
-    }
-    else
-    {
-#ifndef NO_WPA_SUPPL
-        S32 res;
-
-        pCuCmd->hWpaCore = WpaCore_Create(&res, pSupplIfFile);
-        if((pCuCmd->hWpaCore == NULL) && (res != EOALERR_IPC_WPA_ERROR_CANT_CONNECT_TO_SUPPL))
-        {
-            CuCmd_Destroy(pCuCmd);
-            return NULL;
-        }
-
-        if(res == EOALERR_IPC_WPA_ERROR_CANT_CONNECT_TO_SUPPL)
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"******************************************************\n");
-            os_error_printf(CU_MSG_ERROR, (PS8)"Connection to supplicant failed\n");
-            os_error_printf(CU_MSG_ERROR, (PS8)"******************************************************\n");
-        }
-        else
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"Connection established with supplicant\n");
-        }
-#endif
-    }
-
-    CuCmd_Init_Scan_Params(pCuCmd);
-
-    return pCuCmd;
-}
-
-VOID CuCmd_Destroy(THandle hCuCmd)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if(pCuCmd->hCuCommon)
-    {
-        CuCommon_Destroy(pCuCmd->hCuCommon);
-    }
-
-    if(pCuCmd->hCuWext)
-    {
-        CuOs_Destroy(pCuCmd->hCuWext);
-    }
-
-    if(pCuCmd->hIpcEvent)
-    {
-        IpcEvent_Destroy(pCuCmd->hIpcEvent);
-    }
-
-#ifndef NO_WPA_SUPPL
-    if(pCuCmd->hWpaCore)
-    {
-        WpaCore_Destroy(pCuCmd->hWpaCore);
-    }
-#endif
-
-    os_MemoryFree(pCuCmd);
-}
-
-S32 CuCmd_GetDeviceStatus(THandle hCuCmd)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    S32 status;
-
-    status = CuCommon_GetU32(pCuCmd->hCuCommon, DRIVER_STATUS_PARAM, &pCuCmd->isDeviceRunning);
-
-    if ((status == OK) && pCuCmd->isDeviceRunning)
-        return OK;  
-
-    return ECUERR_CU_CMD_ERROR_DEVICE_NOT_LOADED;
-}
-
-VOID CuCmd_StartDriver(THandle hCuCmd)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 uDummyBuf;
-
-    if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, DRIVER_START_PARAM, &uDummyBuf, sizeof(uDummyBuf))) 
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - Failed to start driver!\n");
-    }
-}
-
-VOID CuCmd_StopDriver(THandle hCuCmd)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 uDummyBuf;
-
-    if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, DRIVER_STOP_PARAM, &uDummyBuf, sizeof(uDummyBuf))) 
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - Failed to stop driver!\n");
-    }
-}
-
-#ifdef XCC_MODULE_INCLUDED
-THandle CuCmd_GetCuCommonHandle(THandle hCuCmd)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    return pCuCmd->hCuCommon;
-}
-
-THandle CuCmd_GetCuWpaHandle (THandle hCuCmd)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    return pCuCmd->hWpaCore;
-
-}
-#endif
-
-VOID CuCmd_Show_Status(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    
-    TMacAddr Mac;
-    OS_802_11_SSID ssid;
-    TMacAddr bssid;
-    U32 channel, threadid=0;
-    U32 status ;
-
-    if(OK != CuCmd_GetDeviceStatus(hCuCmd))
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Driver is stopped!\n");
-        return;
-    }
-
-    CuOs_GetDriverThreadId(pCuCmd->hCuWext, &threadid);
-    if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, CTRL_DATA_MAC_ADDRESS, Mac, sizeof(TMacAddr))) return;     
-    if(OK != CuOs_Get_SSID(pCuCmd->hCuWext, &ssid)) return;
-    if(OK != CuOs_Get_BSSID(pCuCmd->hCuWext, bssid)) return;
-    if(OK != CuOs_GetCurrentChannel(pCuCmd->hCuWext, &channel)) return;
-    if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, SME_CONNECTION_STATUS_PARAM, &status)) 
-      os_error_printf(CU_MSG_INFO2, (PS8)"can't read connection status!\n");
-    
-    if (threadid != 0)
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Thread id: %u (0x%x)\n\n", threadid, threadid);
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8)"==========================\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"Status   : %s\n",ConnState[status]);
-    os_error_printf(CU_MSG_INFO2, (PS8)"MAC      : %02x.%02x.%02x.%02x.%02x.%02x\n",Mac[0],Mac[1],Mac[2],Mac[3],Mac[4],Mac[5]);
-    os_error_printf(CU_MSG_INFO2, (PS8)"SSID     : %s\n",(ssid.SsidLength)?PrintSSID(&ssid):"<empty>");
-    os_error_printf(CU_MSG_INFO2, (PS8)"BSSID    : %02x.%02x.%02x.%02x.%02x.%02x\n",bssid[0],bssid[1],bssid[2],bssid[3],bssid[4],bssid[5]);
-    if(channel)
-        os_error_printf(CU_MSG_INFO2, (PS8)"Channel  : %d\n",channel);  
-    else
-        os_error_printf(CU_MSG_INFO2, (PS8)"Channel  : <empty>\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"==========================\n");
-    
-}
-
-VOID CuCmd_BssidList(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 SizeOfBssiList=0;
-    OS_802_11_BSSID_LIST_EX* bssidList;
-    TMacAddr bssid;
-
-    if(OK != CuCommon_Get_BssidList_Size(pCuCmd->hCuCommon, &SizeOfBssiList))
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_Bssid_List - cant get Bssid list size\n");
-        return;
-    }
-
-    /* allocate the bssidList */
-    bssidList = os_MemoryCAlloc(SizeOfBssiList, sizeof(U8));
-    if(bssidList == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_Bssid_List - cant allocate Bssid list\n");
-        return;
-    }
-
-    if(SizeOfBssiList == sizeof(U32))
-    {
-        /* means that bssidList is empty*/
-        bssidList->NumberOfItems = 0;
-        /* os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_Bssid_List - size of list is %d, indicating empty list\n",
-                        sizeof(U32)); */
-    }
-    else
-    {
-        if (OK != CuOs_GetBssidList(pCuCmd->hCuWext, bssidList))
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_Bssid_List - cant get Bssid list\n");
-            os_MemoryFree(bssidList);
-            return;
-        }
-    }
-
-    /* get currently connected bssid */
-    if(OK != CuOs_Get_BSSID(pCuCmd->hCuWext, bssid))
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_Bssid_List - cant get current BSSID\n");
-        os_MemoryFree(bssidList);
-        return;
-    }
-
-    /* print the list to the terminal */
-    CuCmd_PrintBssidList(bssidList, FALSE, bssid);    
-    
-    /* free the bssidList */
-    os_MemoryFree(bssidList);
-    
-}
-
-VOID CuCmd_FullBssidList(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 SizeOfBssiList=0;
-    OS_802_11_BSSID_LIST_EX* bssidList;
-    TMacAddr bssid;
-
-    if(OK != CuCommon_Get_BssidList_Size(pCuCmd->hCuCommon, &SizeOfBssiList)) return;
-
-    /* allocate the bssidList */
-    bssidList = os_MemoryCAlloc(SizeOfBssiList, sizeof(U8));
-    if(bssidList == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_Bssid_List - cant allocate Bssid list\n");
-        return;
-    }
-
-    if(SizeOfBssiList == sizeof(U32))
-    {
-        /* means that bssidList is empty*/
-        bssidList->NumberOfItems = 0;
-            
-    }
-    else
-    {
-        if(OK != CuOs_GetBssidList(pCuCmd->hCuWext, bssidList) ) return;
-    }
-
-    /* get currently connected bssid */
-    if(OK != CuOs_Get_BSSID(pCuCmd->hCuWext, bssid)) return;
-    
-    /* print the list to the terminal */
-    CuCmd_PrintBssidList(bssidList, TRUE, bssid);
-    
-    /* free the bssidList */
-    os_MemoryFree(bssidList);
-}
-
-#if defined(CONFIG_WPS) && !defined(NO_WPA_SUPPL)
-VOID CuCmd_StartEnrolleePIN(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - Cannot start Enrollee without connection to supplicant\n");
-        return;         
-    }
-    
-    WpaCore_StartWpsPIN(pCuCmd->hWpaCore);
-    os_error_printf(CU_MSG_INFO2, (PS8)"WPS in PIN mode started\n");
-}
-
-VOID CuCmd_StartEnrolleePBC(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - Cannot start Enrollee push button without connection to supplicant\n");
-        return;         
-    }
-    
-    WpaCore_StartWpsPBC(pCuCmd->hWpaCore);  
-    os_error_printf(CU_MSG_INFO2, (PS8)"WPS in PBC mode started\n");
-}
-
-VOID CuCmd_StopEnrollee(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - Cannot Stop Enrollee without connection to supplicant\n");
-        return;         
-    }
-    
-    WpaCore_StopWps(pCuCmd->hWpaCore);
-    os_error_printf(CU_MSG_INFO2, (PS8)"WPS mode stopped\n");
-}
-
-VOID CuCmd_SetPin(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - Cannot set PIN without connection to supplicant\n");
-        return;         
-    }
-    
-    WpaCore_SetPin(pCuCmd->hWpaCore, (PS8)parm[0].value); 
-    os_error_printf(CU_MSG_INFO2, (PS8)"WPS PIN set %s\n", parm[0].value);
-}
-
-#endif /* CONFIG_WPS */
-
-VOID CuCmd_Connect(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TMacAddr bssid = { 0xff,0xff,0xff,0xff,0xff,0xff };
-    OS_802_11_SSID ssid;
-    U32 BssType;
-
-    switch (nParms) 
-    {
-        case 0 :
-            /* 
-            *  No SSID & No BSSID are set -
-            *  Use Any SSID & Any BSSID.
-            */
-            ssid.SsidLength = 0;            
-            ssid.Ssid[0] = 0;
-            break;
-        case 1:
-            /* 
-            *  SSID set & BSSID insn't set  -
-            *  Use CLI's SSID & Any BSSID.
-            */
-            ssid.SsidLength = os_strlen( (PS8)parm[0].value);
-            os_memcpy((PVOID)ssid.Ssid, (PVOID) parm[0].value, ssid.SsidLength);
-            ssid.Ssid[ssid.SsidLength] = '\0';
-            break;
-        case 2:
-            /* 
-             *  Both SSID & BSSID are set -
-             *  Use CLI's SSID & BSSID.
-             */
-            if(!CuCmd_Str2MACAddr( (PS8)parm[1].value, bssid) )
-                return;
-            ssid.SsidLength = os_strlen((PS8) parm[0].value);
-            os_memcpy((PVOID)ssid.Ssid, (PVOID) parm[0].value, ssid.SsidLength);
-            ssid.Ssid[ssid.SsidLength] = '\0';
-            break;
-    }
-
-    if(pCuCmd->hWpaCore == NULL)
-    {
-        if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, CTRL_DATA_CURRENT_BSS_TYPE_PARAM, &BssType)) return;
-
-        if((BssType == os802_11IBSS/* Ad-Hoc */) && (ssid.SsidLength == 0))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"SSID string is needed due to fact that BSS Type set to Ad-Hoc.\n");
-            return;
-        }
-
-        if(OK != CuOs_Set_BSSID(pCuCmd->hCuWext, bssid ) ) return;
-        if(OK != CuOs_Set_ESSID(pCuCmd->hCuWext, &ssid) ) return;
-    }
-    else
-    {
-#ifndef NO_WPA_SUPPL
-        if(OK != WpaCore_GetBssType(pCuCmd->hWpaCore, &BssType)) return;
-
-        if((BssType == os802_11IBSS/* Ad-Hoc */) && (ssid.SsidLength == 0))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"SSID string is needed due to fact BSS Type set to Ad-Hoc\n");
-            return;
-        }
-
-        WpaCore_SetSsid(pCuCmd->hWpaCore, &ssid, bssid);
-#endif
-    }
-}
-
-VOID CuCmd_Disassociate(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if(pCuCmd->hWpaCore == NULL)
-    {
-        OS_802_11_SSID ssid;
-        
-        ssid.SsidLength = MAX_SSID_LEN;
-        os_memset(ssid.Ssid, 0, MAX_SSID_LEN);
-        
-        CuOs_Set_ESSID(pCuCmd->hCuWext, &ssid);
-    }
-    else
-    {
-#ifndef NO_WPA_SUPPL
-        WpaCore_Disassociate(pCuCmd->hWpaCore);
-#endif
-    }
-}
-
-VOID CuCmd_ModifySsid(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_SSID ssid;
-    TMacAddr bssid = { 0xff,0xff,0xff,0xff,0xff,0xff };    
-    
-    if( nParms == 0 )
-    {
-        OS_802_11_SSID ssid;
-        if(OK != CuOs_Get_SSID(pCuCmd->hCuWext, &ssid)) return;
-        os_error_printf(CU_MSG_INFO2, (PS8)"SSID: %s\n",(ssid.SsidLength)?(PS8)PrintSSID(&ssid):(PS8)"<empty>");        
-    }
-    else
-    {
-        /* Setting the new SSID, BRCS BSSID is set to clean pre-set BSSID */
-        ssid.SsidLength = os_strlen((PS8) parm[0].value);
-        os_memcpy((PVOID)ssid.Ssid, (PVOID) parm[0].value, ssid.SsidLength);
-        if(ssid.SsidLength < MAX_SSID_LEN)
-        {
-            ssid.Ssid[ssid.SsidLength] = 0;
-        }
-
-        if(OK != CuOs_Set_BSSID(pCuCmd->hCuWext, bssid ) ) return;
-        if(OK != CuOs_Set_ESSID(pCuCmd->hCuWext, &ssid) ) return;
-    }
-}
-
-VOID CuCmd_ModifyConnectMode(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32      i;
-
-    if( nParms == 0 )
-    {
-        U32 uConnectMode;
-        
-        if(OK != CuCommon_GetU32 (pCuCmd->hCuCommon, SME_CONNECTION_MODE_PARAM, &uConnectMode)) return;
-        CU_CMD_FIND_NAME_ARRAY (i, Current_mode, uConnectMode);
-        os_error_printf (CU_MSG_INFO2, (PS8)"Current mode = %s\n", Current_mode[i].name); 
-        print_available_values (Current_mode);
-    }
-    else
-    {      
-        U32 uConnectMode = parm[0].value;
-
-        /* check if the param is valid */
-        CU_CMD_FIND_NAME_ARRAY (i, Current_mode, uConnectMode);
-        if(i == SIZE_ARR(Current_mode))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_ModifyConnectMode, Connect Mode %d is not defined!\n", uConnectMode);
-            print_available_values (Current_mode);
-            return;
-        }
-        else
-        {
-            CuCommon_SetU32(pCuCmd->hCuCommon, SME_CONNECTION_MODE_PARAM, uConnectMode);
-        }
-    }
-}
-
-VOID CuCmd_ModifyChannel(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if( nParms == 0 )
-    {
-        U8 desiredChannel = 0;
-        U32 currentChannel = 0;
-        
-        
-        if(OK != CuCommon_GetU8(pCuCmd->hCuCommon, SITE_MGR_DESIRED_CHANNEL_PARAM, &desiredChannel)) return;
-        if(OK != CuOs_GetCurrentChannel(pCuCmd->hCuWext, &currentChannel)) return;
-        
-        os_error_printf(CU_MSG_INFO2, (PS8)"Channel=%d (desired: %d)\n",currentChannel,desiredChannel);
-    }
-    else
-    {       
-        CuCommon_SetU32(pCuCmd->hCuCommon, SITE_MGR_DESIRED_CHANNEL_PARAM, parm[0].value);
-    }
-}
-
-VOID CuCmd_GetTxRate(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if( nParms == 0)
-    {
-        U8 CurrentTxRate;
-        S8 CurrentTxRateStr[50];
-
-        if(OK != CuCommon_GetU8(pCuCmd->hCuCommon, TIWLN_802_11_CURRENT_RATES_GET, &CurrentTxRate)) return;
-
-        CuCmd_CreateRateStr(CurrentTxRateStr, CurrentTxRate);
-        os_error_printf(CU_MSG_INFO2, (PS8)"Rate: %s\n", CurrentTxRateStr);
-    }
-}
-
-VOID CuCmd_ModifyBssType(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 BssType = 0;
-    S32 i;
-    
-    if( nParms == 0 )
-    {
-        if(pCuCmd->hWpaCore == NULL)
-        {
-            if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, CTRL_DATA_CURRENT_BSS_TYPE_PARAM, &BssType)) return;
-        }
-        else
-        {
-#ifndef NO_WPA_SUPPL
-            if(OK != WpaCore_GetBssType(pCuCmd->hWpaCore, &BssType)) return;
-#endif
-        }       
-
-        CU_CMD_FIND_NAME_ARRAY(i, BSS_type, BssType);
-        if(i == SIZE_ARR(BSS_type))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"Error getting the current BssType! BssType=0x%x\n",BssType);
-            return;
-        }
-        else
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"Current mode = %s\n", BSS_type[i].name);        
-        }
-        print_available_values(BSS_type);        
-    }
-    else    
-    {
-        BssType = parm[0].value;
-        /* check if the param is valid */
-        CU_CMD_FIND_NAME_ARRAY(i, BSS_type, BssType);
-        if(i == SIZE_ARR(BSS_type))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_ModifyBssType, BssType %d is not defined!\n", BssType);
-            return;
-        }       
-        if(pCuCmd->hWpaCore == NULL)
-        {
-            CuCommon_SetU32(pCuCmd->hCuCommon, CTRL_DATA_CURRENT_BSS_TYPE_PARAM, BssType);
-            CuCommon_SetU32(pCuCmd->hCuCommon, SME_DESIRED_BSS_TYPE_PARAM, BssType);
-        }
-        else
-        {
-#ifndef NO_WPA_SUPPL
-            WpaCore_SetBssType(pCuCmd->hWpaCore, BssType);
-#endif
-        }
-    }
-}
-
-VOID CuCmd_ModifyFragTh(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    S32 FragTh;
-
-    if( nParms == 0 )
-    {
-        if(OK != CuOs_GetFragTh(pCuCmd->hCuWext, &FragTh)) return;
-        os_error_printf(CU_MSG_INFO2, (PS8)"Frag. threshold = %d\n", FragTh);
-    }
-    else
-    {
-        FragTh = parm[0].value;
-        CuOs_SetFragTh(pCuCmd->hCuWext, FragTh);
-    }   
-}
-
-VOID CuCmd_ModifyRtsTh(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    S32 RtsTh;
-
-    if( nParms == 0 )
-    {
-        if(OK != CuOs_GetRtsTh(pCuCmd->hCuWext, &RtsTh)) return;
-        os_error_printf(CU_MSG_INFO2, (PS8)"RTS threshold = %d\n", RtsTh);
-    }
-    else
-    {
-        RtsTh = parm[0].value;
-        CuOs_SetRtsTh(pCuCmd->hCuWext, RtsTh);
-    }   
-}
-
-VOID CuCmd_ModifyPreamble(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    EPreamble Preamble;
-    S32 i;
-    named_value_t preamble_type[] = {
-        { PREAMBLE_LONG,              (PS8)"PREAMBLE_LONG" },
-        { PREAMBLE_SHORT,             (PS8)"PREAMBLE_SHORT" }
-    };
-
-    if(nParms)
-    {
-        Preamble = parm[0].value;
-        /* check if the param is valid */
-        CU_CMD_FIND_NAME_ARRAY(i, preamble_type, Preamble);
-        if(i == SIZE_ARR(preamble_type))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_ModifyPreamble, Preamble %d is not defined!\n", Preamble);
-            return;
-        }
-        CuCommon_SetU32(pCuCmd->hCuCommon, TIWLN_802_11_SHORT_PREAMBLE_SET, Preamble);
-    }
-    else
-    {
-        S32 PreambleData;
-        if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, TIWLN_802_11_SHORT_PREAMBLE_GET, (PU32)&PreambleData)) return;
-        Preamble = PreambleData;
-        os_error_printf(CU_MSG_INFO2, (PS8)"Preamble = %d\n", Preamble);
-        print_available_values(preamble_type);
-    }
-}
-
-VOID CuCmd_ModifyShortSlot(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    slotTime_e SlotTime;
-    S32 i;
-    named_value_t SlotTime_type[] = {
-        { PHY_SLOT_TIME_LONG,              (PS8)"PHY_SLOT_TIME_LONG" },
-        { PHY_SLOT_TIME_SHORT,             (PS8)"PHY_SLOT_TIME_SHORT" }
-    };
-
-    if(nParms)
-    {
-        SlotTime = parm[0].value;
-        /* check if the param is valid */
-        CU_CMD_FIND_NAME_ARRAY(i, SlotTime_type, SlotTime);
-        if(i == SIZE_ARR(SlotTime_type))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_ModifyShortSlot, SlotTime %d is not defined!\n", SlotTime);
-            return;
-        }
-        CuCommon_SetU32(pCuCmd->hCuCommon, TIWLN_SHORT_SLOT_SET, SlotTime);
-    }
-    else
-    {
-        S32 SlotTimeData;
-        if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, TIWLN_SHORT_SLOT_GET, (PU32)&SlotTimeData)) return;
-        SlotTime = SlotTimeData;
-        os_error_printf(CU_MSG_INFO2, (PS8)"SlotTime = %d\n", SlotTime);
-        print_available_values(SlotTime_type);
-    }
-}
-
-
-VOID CuCmd_RadioOnOff(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-	CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-	U32      on_off;
-
-	if(nParms) 
-    {
-		on_off = parm[0].value;
-		CuCommon_SetU32(pCuCmd->hCuCommon, SME_RADIO_ON_PARAM, on_off);
-	}
-	else 
-    {
-		if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, SME_RADIO_ON_PARAM, &on_off)) {
-			os_error_printf(CU_MSG_ERROR, (PS8)"CuCmd_RadioOnOff error, Cannot get radio state!\n");
-			return;
-	}
-		os_error_printf(CU_MSG_ERROR, (PS8)"Radio state = %s\n", on_off ? "ON" : "OFF");
-        os_error_printf(CU_MSG_ERROR, (PS8)"Turn radio on/off. 0=OFF, 1=ON\n");
-	}
-}
-
-
-VOID CuCmd_GetSelectedBssidInfo(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_SSID ssid;
-    TMacAddr bssid;
-    
-    if(OK != CuOs_Get_SSID(pCuCmd->hCuWext, &ssid)) return;
-    if(OK != CuOs_Get_BSSID(pCuCmd->hCuWext, bssid)) return;
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"Selected BSSID Info:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"--------------------\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"SSID : %s\n",(ssid.SsidLength)?(PS8)PrintSSID(&ssid):(PS8)"<empty>");
-    os_error_printf(CU_MSG_INFO2, (PS8)"BSSID : %02x.%02x.%02x.%02x.%02x.%02x\n",bssid[0],bssid[1],bssid[2],bssid[3],bssid[4],bssid[5]);
-}
-
-VOID CuCmd_GetRsiiLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    S8 dRssi, bRssi;
-
-    if(OK != CuCommon_GetRssi(pCuCmd->hCuCommon, &dRssi, &bRssi)) return;
-	/* need the 0xffffff00 to get negative value display */
-    os_error_printf(CU_MSG_INFO2, (PS8)"Current dataRSSI=%d  beaconRssi=%d\n", dRssi?dRssi|0xffffff00:dRssi, bRssi?bRssi|0xffffff00:bRssi);
-}
-
-VOID CuCmd_GetSnrRatio(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 dSnr, bSnr;
-    
-    if(OK != CuCommon_GetSnr(pCuCmd->hCuCommon, &dSnr, &bSnr)) return;
-    os_error_printf(CU_MSG_INFO2, (PS8)"Current dataSNR=%d   beaconSnr=%d\n", dSnr, bSnr);
-}
-
-VOID CuCmd_ShowTxPowerLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    
-    S32 txPowerLevel;
-    if(OK != CuOs_GetTxPowerLevel(pCuCmd->hCuWext, &txPowerLevel)) return;
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)"Tx Power level = %d\n", txPowerLevel);        
-}
-
-VOID CuCmd_ShowTxPowerTable(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TpowerLevelTable_t txPowerLevel;
-    S32 i, res;
-
-    res = CuCommon_GetBuffer(pCuCmd->hCuCommon, REGULATORY_DOMAIN_TX_POWER_LEVEL_TABLE_PARAM, &txPowerLevel, sizeof(txPowerLevel));
-
-    if( !res )
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Power level table (Dbm/10)\n");        
-        for (i = 0; i < NUMBER_OF_SUB_BANDS_E; i++)
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"sub-band %i: %d %d %d %d\n", i,
-            txPowerLevel.uDbm[i][0],
-            txPowerLevel.uDbm[i][1],
-            txPowerLevel.uDbm[i][2],
-            txPowerLevel.uDbm[i][3]);
-        }
-    }
-    else
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Tx Power level table ERROR !!!\n");
-    }
-}
-
-VOID CuCmd_TxPowerDbm(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{   
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd; 
-    U8 txPowerLevelDbm = (U8)parm[0].value;
-
-    if(nParms == 0)
-    {
-        if(OK != CuCommon_GetU8(pCuCmd->hCuCommon, TIWLN_802_11_TX_POWER_DBM_GET, (PU8)&txPowerLevelDbm)) return;
-    }
-    else
-    {
-        if (parm[0].value > MAX_TX_POWER) 
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"Please use values between %d and %d\n", MIN_TX_POWER, MAX_TX_POWER); return;
-        }
-        else
-		{
-			if(OK != CuCommon_SetU8(pCuCmd->hCuCommon, TIWLN_802_11_TX_POWER_DBM_GET, (U8)txPowerLevelDbm)) return;
-		}
-    }
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"Tx Power in DBM = %d\n", txPowerLevelDbm);
-}
-
-VOID CuCmd_ModifyState_802_11d(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{   
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 Enabled_802_11d;
-
-    if(nParms == 0)
-    {
-        if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, TIWLN_REG_DOMAIN_GET_802_11D, &Enabled_802_11d)) return;
-        os_error_printf(CU_MSG_INFO2, (PS8)"802_11d enabled = %s\n", (Enabled_802_11d)?"TRUE":"FALSE");     
-    }
-    else
-    {
-        Enabled_802_11d = parm[0].value;
-        if(OK != CuCommon_SetU32(pCuCmd->hCuCommon, TIWLN_REG_DOMAIN_ENABLE_DISABLE_802_11D, Enabled_802_11d))
-        {
-            U32 Enabled_802_11h;
-            if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, TIWLN_REG_DOMAIN_GET_802_11H, &Enabled_802_11h)) return;
-            if(Enabled_802_11h && (!Enabled_802_11d))
-                os_error_printf(CU_MSG_INFO2, (PS8)"802_11d cannot be disabled while 802_11h is enabled!!\n" );
-                
-        }
-        else
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"802_11d status is updated to = %s\n", (Enabled_802_11d)?"TRUE":"FALSE" );
-        }
-    }
-}
-
-VOID CuCmd_ModifyState_802_11h(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{   
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 Enabled_802_11h;
-
-    if(nParms == 0)
-    {
-        if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, TIWLN_REG_DOMAIN_GET_802_11H, &Enabled_802_11h)) return;
-        os_error_printf(CU_MSG_INFO2, (PS8)"802_11h enabled = %s\n", (Enabled_802_11h)?"TRUE":"FALSE");     
-    }
-    else
-    {   
-        Enabled_802_11h = parm[0].value;
-        if(OK != CuCommon_SetU32(pCuCmd->hCuCommon, TIWLN_REG_DOMAIN_ENABLE_DISABLE_802_11H, Enabled_802_11h)) return;
-        if(Enabled_802_11h)
-            os_error_printf(CU_MSG_INFO2, (PS8)"802_11h enables automatically 802_11d!!\n" );
-                
-        os_error_printf(CU_MSG_INFO2, (PS8)"802_11h status is updated to =%d\n", Enabled_802_11h );
-    }
-}
-
-VOID CuCmd_D_Country_2_4Ie(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{   
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if( nParms == 0 )
-    {
-        U8   CountryString[DOT11_COUNTRY_STRING_LEN+1];
-        if(OK != CuCommon_GetSetBuffer(pCuCmd->hCuCommon, TIWLN_REG_DOMAIN_GET_COUNTRY_2_4,
-            CountryString, DOT11_COUNTRY_STRING_LEN+1)) return;
-        CountryString[DOT11_COUNTRY_STRING_LEN] = '\0';
-        if (CountryString[0] == '\0')
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"802_11d Country for 2.4 GHz is not found\n");
-        }
-        else
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"802_11d Country for 2.4 GHz is %s \n", CountryString );
-        }
-    }
-    else
-    {
-        country_t CountryWorld;
-
-        CountryWorld.elementId = COUNTRY_IE_ID;
-        CountryWorld.len = 6;
-        os_memcpy( (PVOID)CountryWorld.countryIE.CountryString,(PVOID)"GB ", 3);
-        CountryWorld.countryIE.tripletChannels[0].firstChannelNumber = 1;
-        CountryWorld.countryIE.tripletChannels[0].maxTxPowerLevel = 23;
-        CountryWorld.countryIE.tripletChannels[0].numberOfChannels = 11;        
-
-        if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_REG_DOMAIN_SET_COUNTRY_2_4,
-            &CountryWorld, sizeof(country_t))) return;                
-
-        os_error_printf(CU_MSG_INFO2, (PS8)"802_11d Start Setting GB Country for 2.4 GHz\n");
-    }
-}
-
-
-VOID CuCmd_D_Country_5Ie(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{   
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if( nParms == 0 )
-    {
-        U8   CountryString[DOT11_COUNTRY_STRING_LEN+1];
-        
-        if(OK != CuCommon_GetSetBuffer(pCuCmd->hCuCommon, TIWLN_REG_DOMAIN_GET_COUNTRY_5,
-            CountryString, DOT11_COUNTRY_STRING_LEN+1)) return;
-        
-        CountryString[DOT11_COUNTRY_STRING_LEN] = '\0';
-        if (CountryString[0] == '\0')
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"802_11d Country for 5 GHz is not found\n");
-        }
-        else
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"802_11d Country for 5 GHz is %s\n", CountryString );
-        }
-    }
-    else
-    {
-        country_t CountryWorld;
-
-        CountryWorld.elementId = COUNTRY_IE_ID;
-        CountryWorld.len = 6;
-        os_memcpy((PVOID) CountryWorld.countryIE.CountryString,(PVOID)"US ", 3);
-        CountryWorld.countryIE.tripletChannels[0].firstChannelNumber = 36;
-        CountryWorld.countryIE.tripletChannels[0].maxTxPowerLevel = 13;
-        CountryWorld.countryIE.tripletChannels[0].numberOfChannels = 8;        
-
-        if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_REG_DOMAIN_SET_COUNTRY_5,
-            &CountryWorld, sizeof(country_t))) return;                
-
-        os_error_printf(CU_MSG_INFO2, (PS8)"802_11d Start Setting US Country for 5 GHz\n");
-    }
-}
-
-VOID CuCmd_ModifyDfsRange(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{   
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U16 minDFS_channelNum;
-    U16 maxDFS_channelNum;
-
-    if( nParms == 0 )
-    {
-        if(OK != CuCommon_GetDfsChannels(pCuCmd->hCuCommon, &minDFS_channelNum, &maxDFS_channelNum)) return;
-        
-        os_error_printf(CU_MSG_INFO2, (PS8)"DFS min channel is %d, DFS max channel is %d\n", 
-                                    minDFS_channelNum, maxDFS_channelNum);
-    }
-    else
-    {
-        minDFS_channelNum = (U16) parm[0].value;
-        maxDFS_channelNum = (U16) parm[1].value;
-
-        if(OK != CuCommon_SetDfsChannels(pCuCmd->hCuCommon, minDFS_channelNum, maxDFS_channelNum)) return;
-        
-        os_error_printf(CU_MSG_INFO2, (PS8)"Setting DFS min channel %d, DFS max channel %d\n", 
-                                    minDFS_channelNum, maxDFS_channelNum);        
-    }
-}
-
-VOID CuCmd_SetBeaconFilterDesiredState(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    
-    if( nParms == 0 )
-    {
-        print_available_values(BeaconFilter_use);
-    }
-    else    
-    {
-        CuCommon_SetU8(pCuCmd->hCuCommon, TIWLN_802_11_BEACON_FILTER_DESIRED_STATE_SET, (U8)parm[0].value);
-    }
-}
-
-VOID CuCmd_GetBeaconFilterDesiredState(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U8 beaconFilterDesiredState = 0;
-
-    if(OK != CuCommon_GetU8(pCuCmd->hCuCommon, TIWLN_802_11_BEACON_FILTER_DESIRED_STATE_GET, &beaconFilterDesiredState)) return;
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)"Desired State is %s\n", (beaconFilterDesiredState == 0)?"FILTER INACTIVE":"FILTER ACTIVE" );
-}
-
-VOID CuCmd_ModifySupportedRates(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    rates_t SupportedRates;
-    S32 i;
-
-    if( nParms == 0 )
-    {
-        if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_SUPPORTED_RATES,
-            &SupportedRates, sizeof(rates_t))) return;   
-        
-        os_error_printf(CU_MSG_INFO2, (PS8)" Rates: ");
-        for( i=0; i < SupportedRates.len; i++ )
-        {
-            os_error_printf(CU_MSG_INFO2, 
-                            (PS8)"%g Mbps(%u%s)%s", 
-                            /* patch in order to support NET_RATE_MCS7 values that equal to NET_RATE_1M_BASIC */    
-                            (RATE_2_MBPS(SupportedRates.ratesString[i]) == 63.5) ? 65 : RATE_2_MBPS(SupportedRates.ratesString[i]), 
-                            /* patch in order to support NET_RATE_MCS7 values that equal to NET_RATE_1M_BASIC */    
-                            (SupportedRates.ratesString[i] == 0x7f) ? 0x83 : SupportedRates.ratesString[i],
-                IS_BASIC_RATE(SupportedRates.ratesString[i]) ? " - basic" : "",
-                (i < SupportedRates.len-1) ? "," : "" );
-        }
-        os_error_printf(CU_MSG_INFO2, (PS8)"\n");        
-    }
-    else
-    {
-        PS8 buf = (PS8) parm[0].value;
-        PS8 end_p;
-        U32 val;
-        U32 MaxVal = ((1 << (sizeof(SupportedRates.ratesString[i]) * 8))-1);
-
-        os_error_printf(CU_MSG_INFO2, (PS8)"param: %s\n", buf );
-        
-        for( i=0; *buf && i < DOT11_MAX_SUPPORTED_RATES; i++ )
-        {
-            val = os_strtoul(buf, &end_p, 0);
-            if(val == 0)
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_ModifySupportedRates: invalid value - %s\n", buf );
-                return;
-            }
-            if(val > MaxVal)
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_ModifySupportedRates: out of range %d\n", val );
-                return;
-            }
-            /* patch in order to support NET_RATE_MCS7 values that equal to NET_RATE_1M_BASIC */    
-            if (val == 0x83)
-            {
-                val = 0x7f;
-            }
-            SupportedRates.ratesString[i] = (U8)(val);
-            buf = end_p;
-            while( *buf==' ' || *buf == ',' )   buf++;
-        }
-        if(*buf)
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"too many parameters. Max=%d\n", DOT11_MAX_SUPPORTED_RATES );
-            return;
-        }
-
-        SupportedRates.len = (U8) i;
-        CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_SUPPORTED_RATES,
-            &SupportedRates, sizeof(rates_t));
-    }
-}
-
-VOID CuCmd_SendHealthCheck(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if (OK != CuCommon_SetU32(pCuCmd->hCuCommon, HEALTH_MONITOR_CHECK_DEVICE, TRUE)) return;
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)"Send health check...\n");
-}
-
-VOID CuCmd_EnableRxDataFilters(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if (OK != CuCommon_SetU32(pCuCmd->hCuCommon, TIWLN_ENABLE_DISABLE_RX_DATA_FILTERS, TRUE)) return;
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)"Enabling Rx data filtering...\n");
-}
-
-VOID CuCmd_DisableRxDataFilters(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if (OK != CuCommon_SetU32(pCuCmd->hCuCommon, TIWLN_ENABLE_DISABLE_RX_DATA_FILTERS, FALSE)) return;
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)"Disabling Rx data filtering...\n");
-}
-
-VOID CuCmd_AddRxDataFilter(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    S32 res;
-    TRxDataFilterRequest request;
-    PS8 mask = (PS8) parm[1].value;
-    PS8 pattern = (PS8) parm[2].value;
-
-    request.offset = (U8)parm[0].value;
-    CuCmd_ParseMaskString(mask, request.mask, &request.maskLength);
-    CuCmd_ParsePatternString(pattern, request.pattern, &request.patternLength);
-
-    res = CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_ADD_RX_DATA_FILTER,
-        &request, sizeof(TRxDataFilterRequest));
-
-    if(res == OK)
-        os_error_printf(CU_MSG_INFO2, (PS8)"Filter added.\n");
-    else
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_AddRxDataFilter - Couldn't add Rx data filter...\n");    
-        
-}
-
-VOID CuCmd_RemoveRxDataFilter(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    S32 res;
-    TRxDataFilterRequest request;
-    PS8 mask = (PS8) parm[1].value;
-    PS8 pattern = (PS8) parm[2].value;
-
-    request.offset = (U8)parm[0].value;
-    CuCmd_ParseMaskString(mask, request.mask, &request.maskLength);
-    CuCmd_ParsePatternString(pattern, request.pattern, &request.patternLength);
-
-    res = CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_REMOVE_RX_DATA_FILTER,
-        &request, sizeof(TRxDataFilterRequest));
-
-    if(res == OK)
-        os_error_printf(CU_MSG_INFO2, (PS8)"Filter Removed.\n");
-    else
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_AddRxDataFilter - Couldn't remove Rx data filter...\n");    
-}
-
-VOID CuCmd_GetRxDataFiltersStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 UnmatchedPacketsCount;
-    U32 MatchedPacketsCount[4];
-    
-    if (OK != CuCommon_GetRxDataFiltersStatistics(pCuCmd->hCuCommon, &UnmatchedPacketsCount, MatchedPacketsCount)) return;
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)"Rx data filtering statistics:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"Unmatched packets: %u\n", UnmatchedPacketsCount);
-    os_error_printf(CU_MSG_INFO2, (PS8)"Packets matching filter #1: %u\n", MatchedPacketsCount[0]);
-    os_error_printf(CU_MSG_INFO2, (PS8)"Packets matching filter #2: %u\n", MatchedPacketsCount[1]);
-    os_error_printf(CU_MSG_INFO2, (PS8)"Packets matching filter #3: %u\n", MatchedPacketsCount[2]);
-    os_error_printf(CU_MSG_INFO2, (PS8)"Packets matching filter #4: %u\n", MatchedPacketsCount[3]);
-}
-
-VOID CuCmd_ShowStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    U32 powerMode;
-    TMacAddr Mac;
-    OS_802_11_SSID ssid;
-    U8 desiredChannel;
-    S32 rtsTh;
-    S32 fragTh;
-    S32 txPowerLevel;
-    U8 bssType;
-    U32 desiredPreambleType;
-    TIWLN_COUNTERS driverCounters;
-    U32 AuthMode;
-    U8  CurrentTxRate;
-    S8  CurrentTxRateStr[20];
-    U8  CurrentRxRate;
-    S8  CurrentRxRateStr[20];
-    U32 DefaultKeyId;
-    U32 WepStatus;
-    S8 dRssi, bRssi;
-#ifdef XCC_MODULE_INCLUDED
-    U32 XCCNetEap;
-#endif
-
-    if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, CTRL_DATA_MAC_ADDRESS,
-            Mac, sizeof(TMacAddr))) return;     
-    if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_POWER_MODE_GET, &powerMode, sizeof(U32))) return;
-    if(OK != CuOs_Get_SSID(pCuCmd->hCuWext, &ssid)) return;
-    if(OK != CuCommon_GetU8(pCuCmd->hCuCommon, SITE_MGR_DESIRED_CHANNEL_PARAM, &desiredChannel)) return;
-    if(OK != CuOs_GetRtsTh(pCuCmd->hCuWext, &rtsTh)) return;
-    if(OK != CuOs_GetFragTh(pCuCmd->hCuWext, &fragTh)) return;
-    if(OK != CuOs_GetTxPowerLevel(pCuCmd->hCuWext, &txPowerLevel)) return;
-    if(OK != CuCommon_GetU8(pCuCmd->hCuCommon, CTRL_DATA_CURRENT_BSS_TYPE_PARAM, &bssType)) return;
-    if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, TIWLN_802_11_SHORT_PREAMBLE_GET, &desiredPreambleType)) return;
-    if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, SITE_MGR_TI_WLAN_COUNTERS_PARAM, &driverCounters, sizeof(TIWLN_COUNTERS))) return;
-    if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, RSN_ENCRYPTION_STATUS_PARAM, &WepStatus)) return;
-    if(OK != CuCommon_GetRssi(pCuCmd->hCuCommon, &dRssi, &bRssi)) return;
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, RSN_EXT_AUTHENTICATION_MODE, &AuthMode)) return;
-        if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, RSN_DEFAULT_KEY_ID, &DefaultKeyId)) return;
-    }
-    else
-    {
-#ifndef NO_WPA_SUPPL
-        if(OK != WpaCore_GetAuthMode(pCuCmd->hWpaCore, &AuthMode)) return;
-        if(OK != WpaCore_GetDefaultKey(pCuCmd->hWpaCore, &DefaultKeyId)) return;    
-#endif
-    }
-
-    if(OK != CuCommon_GetU8(pCuCmd->hCuCommon, TIWLN_802_11_CURRENT_RATES_GET, &CurrentTxRate)) return;
-    CuCmd_CreateRateStr(CurrentTxRateStr, CurrentTxRate);       
-
-    if(OK != CuCommon_GetU8(pCuCmd->hCuCommon, TIWLN_GET_RX_DATA_RATE, &CurrentRxRate)) return;
-    CuCmd_CreateRateStr(CurrentRxRateStr, CurrentRxRate);
-    
-#ifdef XCC_MODULE_INCLUDED
-    if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, RSN_XCC_NETWORK_EAP, &XCCNetEap)) return;
-#endif
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"******************\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"Driver Statistics:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"******************\n");
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"    dot11CurrentTxRate : %s\n", CurrentTxRateStr);
-	os_error_printf(CU_MSG_INFO2, (PS8)"         CurrentRxRate : %s\n", CurrentRxRateStr);
-    os_error_printf(CU_MSG_INFO2, (PS8)"   dot11DesiredChannel : %d\n", desiredChannel);
-    os_error_printf(CU_MSG_INFO2, (PS8)"     currentMACAddress : %02x.%02x.%02x.%02x.%02x.%02x\n",Mac[0],Mac[1],Mac[2],Mac[3],Mac[4],Mac[5]);
-    os_error_printf(CU_MSG_INFO2, (PS8)"      dot11DesiredSSID : %s\n", ssid.Ssid);
-    os_error_printf(CU_MSG_INFO2, (PS8)"          dot11BSSType : %d\n", bssType);
-    os_error_printf(CU_MSG_INFO2, (PS8)"    AuthenticationMode : %d\n", AuthMode );
-    os_error_printf(CU_MSG_INFO2, (PS8)"    bShortPreambleUsed : %d\n", desiredPreambleType );
-    os_error_printf(CU_MSG_INFO2, (PS8)"          RTSThreshold : %d\n", rtsTh );
-    os_error_printf(CU_MSG_INFO2, (PS8)"FragmentationThreshold : %d\n", fragTh );
-    os_error_printf(CU_MSG_INFO2, (PS8)" bDefaultWEPKeyDefined : %d\n", DefaultKeyId);
-    os_error_printf(CU_MSG_INFO2, (PS8)"             WEPStatus : %d\n", WepStatus);
-    os_error_printf(CU_MSG_INFO2, (PS8)"          TxPowerLevel : %d\n", txPowerLevel );
-    os_error_printf(CU_MSG_INFO2, (PS8)"             PowerMode : %d\n", powerMode );
-    os_error_printf(CU_MSG_INFO2, (PS8)"              dataRssi : %d\n", dRssi);
-	os_error_printf(CU_MSG_INFO2, (PS8)"            beaconRssi : %d\n", bRssi);
-    /**/
-    /* network layer statistics*/
-    /**/
-    os_error_printf(CU_MSG_INFO2, (PS8)"                RecvOk : %d\n", driverCounters.RecvOk );
-    os_error_printf(CU_MSG_INFO2, (PS8)"             RecvError : %d\n", driverCounters.RecvError );
-    os_error_printf(CU_MSG_INFO2, (PS8)"     DirectedBytesRecv : %d\n", driverCounters.DirectedBytesRecv );
-    os_error_printf(CU_MSG_INFO2, (PS8)"    DirectedFramesRecv : %d\n", driverCounters.DirectedFramesRecv );
-    os_error_printf(CU_MSG_INFO2, (PS8)"    MulticastBytesRecv : %d\n", driverCounters.MulticastBytesRecv );
-    os_error_printf(CU_MSG_INFO2, (PS8)"   MulticastFramesRecv : %d\n", driverCounters.MulticastFramesRecv );
-    os_error_printf(CU_MSG_INFO2, (PS8)"    BroadcastBytesRecv : %d\n", driverCounters.BroadcastBytesRecv );
-    os_error_printf(CU_MSG_INFO2, (PS8)"   BroadcastFramesRecv : %d\n", driverCounters.BroadcastFramesRecv );
-    os_error_printf(CU_MSG_INFO2, (PS8)"             FcsErrors : %d\n", driverCounters.FcsErrors );
-    os_error_printf(CU_MSG_INFO2, (PS8)"           BeaconsRecv : %d\n", driverCounters.BeaconsRecv );
-    os_error_printf(CU_MSG_INFO2, (PS8)"          AssocRejects : %d\n", driverCounters.AssocRejects );
-    os_error_printf(CU_MSG_INFO2, (PS8)"         AssocTimeouts : %d\n", driverCounters.AssocTimeouts );
-    os_error_printf(CU_MSG_INFO2, (PS8)"           AuthRejects : %d\n", driverCounters.AuthRejects );
-    os_error_printf(CU_MSG_INFO2, (PS8)"          AuthTimeouts : %d\n", driverCounters.AuthTimeouts );
-
-    /**/
-    /* other statistics*/
-    /**/
-#ifdef XCC_MODULE_INCLUDED
-    os_error_printf(CU_MSG_INFO2, (PS8)"        dwSecuritySuit : %d\n", XCCNetEap);
-#endif
-}
-
-VOID CuCmd_ShowTxStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TIWLN_TX_STATISTICS txCounters;
-    U32 TxQid;
-    U32 AverageDelay;
-    U32 AverageFWDelay;
-    U32 AverageMacDelay;
-
-    if( nParms == 0 )
-    {
-        if(OK != CuCommon_GetTxStatistics(pCuCmd->hCuCommon, &txCounters, 0)) return;
-    }
-    else    
-    {
-        if(OK != CuCommon_GetTxStatistics(pCuCmd->hCuCommon, &txCounters, parm[0].value)) return;
-    }
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"*********************\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"Tx Queues Statistics:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"*********************\n");
-
-    for (TxQid = 0; TxQid < MAX_NUM_OF_AC; TxQid++)
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"\nTx Queue %d:\n", TxQid);
-        os_error_printf(CU_MSG_INFO2, (PS8)"===========\n");
-        
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Total Good Frames             : %d\n", txCounters.txCounters[TxQid].XmitOk );
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Unicast Bytes                 : %d\n", txCounters.txCounters[TxQid].DirectedBytesXmit );
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Unicast Frames                : %d\n", txCounters.txCounters[TxQid].DirectedFramesXmit );
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Multicast Bytes               : %d\n", txCounters.txCounters[TxQid].MulticastBytesXmit );
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Multicast Frames              : %d\n", txCounters.txCounters[TxQid].MulticastFramesXmit );
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Broadcast Bytes               : %d\n", txCounters.txCounters[TxQid].BroadcastBytesXmit );
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Broadcast Frames              : %d\n", txCounters.txCounters[TxQid].BroadcastFramesXmit );
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Retry Failures                : %d\n", txCounters.txCounters[TxQid].RetryFailCounter );
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Tx Timeout Failures           : %d\n", txCounters.txCounters[TxQid].TxTimeoutCounter );
-        os_error_printf(CU_MSG_INFO2, (PS8)"  No Link Failures              : %d\n", txCounters.txCounters[TxQid].NoLinkCounter );
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Other Failures                : %d\n", txCounters.txCounters[TxQid].OtherFailCounter );
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Max Consecutive Retry Failures : %d\n\n", txCounters.txCounters[TxQid].MaxConsecutiveRetryFail );
-        
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Retry histogram:\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"  ----------------\n\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Retries: %8d %8d %8d %8d %8d %8d %8d %8d\n", 0, 1, 2, 3, 4, 5, 6, 7);
-        os_error_printf(CU_MSG_INFO2, (PS8)"  packets: %8d %8d %8d %8d %8d %8d %8d %8d\n\n", 
-                                txCounters.txCounters[TxQid].RetryHistogram[ 0 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 1 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 2 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 3 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 4 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 5 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 6 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 7 ]);
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Retries: %8d %8d %8d %8d %8d %8d %8d %8d\n", 8, 9, 10, 11, 12, 13, 14, 15);
-        os_error_printf(CU_MSG_INFO2, (PS8)"  packets: %8d %8d %8d %8d %8d %8d %8d %8d\n\n", 
-                                txCounters.txCounters[TxQid].RetryHistogram[ 8 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 9 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 10 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 11 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 12 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 13 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 14 ],
-                                txCounters.txCounters[TxQid].RetryHistogram[ 15 ]);
-
-        if (txCounters.txCounters[TxQid].NumPackets)
-        {
-            AverageDelay = txCounters.txCounters[TxQid].SumTotalDelayMs / txCounters.txCounters[TxQid].NumPackets;
-            AverageFWDelay = txCounters.txCounters[TxQid].SumFWDelayUs / txCounters.txCounters[TxQid].NumPackets;
-            AverageMacDelay = txCounters.txCounters[TxQid].SumMacDelayUs / txCounters.txCounters[TxQid].NumPackets;
-        }
-        else
-        {
-            AverageDelay = 0;
-            AverageFWDelay = 0;
-            AverageMacDelay = 0;
-        }
-
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Total Delay ms (average/sum) : %d / %d\n", AverageDelay, txCounters.txCounters[TxQid].SumTotalDelayMs);
-        os_error_printf(CU_MSG_INFO2, (PS8)"  FW Delay us (average/sum) : %d / %d\n", AverageFWDelay, txCounters.txCounters[TxQid].SumFWDelayUs);
-        os_error_printf(CU_MSG_INFO2, (PS8)"  MAC Delay us (average/sum)   : %d / %d\n\n", AverageMacDelay, txCounters.txCounters[TxQid].SumMacDelayUs);
-
-        os_error_printf(CU_MSG_INFO2, (PS8)"  Delay Ranges [msec]  : Num of packets\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"  -------------------  : --------------\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"        0   -    1     : %d\n", txCounters.txCounters[TxQid].txDelayHistogram[TX_DELAY_RANGE_0_TO_1] );
-        os_error_printf(CU_MSG_INFO2, (PS8)"        1   -   10     : %d\n", txCounters.txCounters[TxQid].txDelayHistogram[TX_DELAY_RANGE_1_TO_10] );
-        os_error_printf(CU_MSG_INFO2, (PS8)"       10   -   20     : %d\n", txCounters.txCounters[TxQid].txDelayHistogram[TX_DELAY_RANGE_10_TO_20] );
-        os_error_printf(CU_MSG_INFO2, (PS8)"       20   -   40     : %d\n", txCounters.txCounters[TxQid].txDelayHistogram[TX_DELAY_RANGE_20_TO_40] );
-        os_error_printf(CU_MSG_INFO2, (PS8)"       40   -   60     : %d\n", txCounters.txCounters[TxQid].txDelayHistogram[TX_DELAY_RANGE_40_TO_60] );
-        os_error_printf(CU_MSG_INFO2, (PS8)"       60   -   80     : %d\n", txCounters.txCounters[TxQid].txDelayHistogram[TX_DELAY_RANGE_60_TO_80] );
-        os_error_printf(CU_MSG_INFO2, (PS8)"       80   -  100     : %d\n", txCounters.txCounters[TxQid].txDelayHistogram[TX_DELAY_RANGE_80_TO_100] );
-        os_error_printf(CU_MSG_INFO2, (PS8)"      100   -  200     : %d\n", txCounters.txCounters[TxQid].txDelayHistogram[TX_DELAY_RANGE_100_TO_200] );
-        os_error_printf(CU_MSG_INFO2, (PS8)"        Above 200      : %d\n", txCounters.txCounters[TxQid].txDelayHistogram[TX_DELAY_RANGE_ABOVE_200] );
-    }       
-}
-
-VOID CuCmd_ShowAdvancedParams(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    U32 AuthMode;
-    TPowerMgr_PowerMode Mode;
-    S32 txPowerLevel;
-#ifndef NO_WPA_SUPPL
-    OS_802_11_ENCRYPTION_TYPES EncryptionTypePairwise;
-    OS_802_11_ENCRYPTION_TYPES EncryptionTypeGroup;
-#endif
-    S32 Preamble;       
-    S32 FragTh;
-    S32 RtsTh;
-
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, RSN_EXT_AUTHENTICATION_MODE, &AuthMode)) return;        
-    }
-    else
-    {
-#ifndef NO_WPA_SUPPL
-        if(OK != WpaCore_GetAuthMode(pCuCmd->hWpaCore, &AuthMode)) return;      
-#endif
-    }
-    if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_POWER_MODE_GET, &Mode, sizeof(TPowerMgr_PowerMode))) return;
-    if(OK != CuOs_GetTxPowerLevel(pCuCmd->hCuWext, &txPowerLevel)) return;    
-#ifndef NO_WPA_SUPPL
-    if(OK != WpaCore_GetEncryptionPairWise(pCuCmd->hWpaCore, &EncryptionTypePairwise)) return;  
-    if(OK != WpaCore_GetEncryptionGroup(pCuCmd->hWpaCore, &EncryptionTypeGroup)) return;    
-#endif
-    if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, TIWLN_802_11_SHORT_PREAMBLE_GET, (PU32)&Preamble)) return;
-    if(OK != CuOs_GetFragTh(pCuCmd->hCuWext, &FragTh)) return;
-    if(OK != CuOs_GetRtsTh(pCuCmd->hCuWext, &RtsTh)) return;
-            
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)"********************\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"Advanced Statistics:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"********************\n");
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)"  Authentication : %u\n", AuthMode );
-    os_error_printf(CU_MSG_INFO2, (PS8)"  Power mode : %d\n", Mode.PowerMode );
-    os_error_printf(CU_MSG_INFO2, (PS8)"  Tx Power level : %d\n", txPowerLevel );
-#ifndef NO_WPA_SUPPL
-    os_error_printf(CU_MSG_INFO2, (PS8)"  Encryption Pairwise: %u\n", EncryptionTypePairwise );
-    os_error_printf(CU_MSG_INFO2, (PS8)"  Encryption Group: %u\n", EncryptionTypeGroup );
-#endif
-    os_error_printf(CU_MSG_INFO2, (PS8)"  Preamble : <%s>\n", (Preamble) ? "short" : "long");
-    os_error_printf(CU_MSG_INFO2, (PS8)"  Frag. threshold : %u\n", FragTh);
-    os_error_printf(CU_MSG_INFO2, (PS8)"  RTS threshold : %u\n", RtsTh );
-    os_error_printf(CU_MSG_INFO2, (PS8)"  Power mode: ");
-    print_available_values(power_mode_val);
-    os_error_printf(CU_MSG_INFO2, (PS8)"  Encryption type: ");
-    print_available_values(encrypt_type);
-    
-}
-
-
-VOID Cucmd_ShowPowerConsumptionStats(THandle hCuCmd,ConParm_t parm[],U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    ACXPowerConsumptionTimeStat_t tStatistics;
-   
-    os_memset( &tStatistics, 0, sizeof(ACXPowerConsumptionTimeStat_t) );
-    
-     if (OK != CuCommon_GetPowerConsumptionStat(pCuCmd->hCuCommon,&tStatistics))
-     {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - Failed to read power consumption statistic!\n");
-        return;
-     }
-         
-
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)"\nPower Consumption Statistics:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"-----------------------------\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"activeTimeCnt:0x%x%x\n", tStatistics.awakeTimeCnt_Hi,tStatistics.awakeTimeCnt_Low );
-    os_error_printf(CU_MSG_INFO2, (PS8)"elpTimeCnt: 0x%x%x\n", tStatistics.elpTimeCnt_Hi,tStatistics.elpTimeCnt_Low);
-    os_error_printf(CU_MSG_INFO2, (PS8)"powerDownTimeCnt: 0x%x%x\n", tStatistics.powerDownTimeCnt_Hi,tStatistics.powerDownTimeCnt_Low);
-    os_error_printf(CU_MSG_INFO2, (PS8)"ListenMode11BTimeCnt: 0x%x%x\n", tStatistics.ListenMode11BTimeCnt_Hi,tStatistics.ListenMode11BTimeCnt_Low);
-    os_error_printf(CU_MSG_INFO2, (PS8)"ListenModeOFDMTimeCnt: 0x%x%x\n", tStatistics.ListenModeOFDMTimeCnt_Hi,tStatistics.ListenModeOFDMTimeCnt_Low);
-    
-}
-
-
-
-VOID CuCmd_ScanAppGlobalConfig(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if ( 0 == os_strcmp( (PS8)"<empty>", (PS8)parm[0].value) )
-    {
-        pCuCmd->appScanParams.desiredSsid.len = 0;
-        pCuCmd->appScanParams.desiredSsid.str[ 0 ] = '\0';
-    }
-    else
-    {    
-        pCuCmd->appScanParams.desiredSsid.len = (U8) os_strlen((PS8)parm[0].value);
-        os_memcpy( (PVOID)&(pCuCmd->appScanParams.desiredSsid.str), (PVOID)parm[0].value, pCuCmd->appScanParams.desiredSsid.len );
-        if(pCuCmd->appScanParams.desiredSsid.len < MAX_SSID_LEN)
-        {
-            pCuCmd->appScanParams.desiredSsid.str[pCuCmd->appScanParams.desiredSsid.len] = 0;
-        }
-    }
-    pCuCmd->appScanParams.scanType = parm[1].value;
-    pCuCmd->appScanParams.band = parm[2].value;
-    pCuCmd->appScanParams.probeReqNumber = (U8)parm[3].value;
-    pCuCmd->appScanParams.probeRequestRate = parm[4].value;
-#ifdef TI_DBG
-    pCuCmd->appScanParams.Tid = (U8)parm[5].value;
-    pCuCmd->appScanParams.numOfChannels  = (U8)parm[6].value;
-#else
-    pCuCmd->appScanParams.Tid = 0;
-    pCuCmd->appScanParams.numOfChannels = (U8)parm[5].value;
-#endif
-}
-
-VOID CuCmd_ScanAppChannelConfig(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    
-    scan_normalChannelEntry_t* pChannelEntry = 
-        &(pCuCmd->appScanParams.channelEntry[ parm[0].value ].normalChannelEntry);
-       
-    if (parm[2].value < parm[3].value)
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Max Dwell Time must be larger than or equal to Min Dwell Time...\n");
-        return;
-    }
-
-    CuCmd_Str2MACAddr ((PS8)parm[1].value, pChannelEntry->bssId);
-    pChannelEntry->maxChannelDwellTime = parm[2].value;
-    pChannelEntry->minChannelDwellTime = parm[3].value;
-    pChannelEntry->earlyTerminationEvent = parm[4].value;
-    pChannelEntry->ETMaxNumOfAPframes = (U8)parm[5].value;
-    pChannelEntry->txPowerDbm = (U8)parm[6].value;
-    pChannelEntry->channel = (U8)parm[7].value;
-}
-
-VOID CuCmd_ScanAppClear(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    os_memset( &pCuCmd->appScanParams, 0, sizeof(scan_Params_t) );
-    os_error_printf(CU_MSG_INFO2, (PS8)"Application scan parameters cleared.\n");
-}
-
-VOID CuCmd_ScanAppDisplay(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    S32 i,j;
-    scan_normalChannelEntry_t* pNormalChannel;
-
-    CU_CMD_FIND_NAME_ARRAY(j, rate2Str, pCuCmd->appScanParams.probeRequestRate);    
-    os_error_printf(CU_MSG_INFO2, (PS8)"Application Scan params:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"SSID: %s, Type: %s\n", 
-        pCuCmd->appScanParams.desiredSsid.str, 
-        scanType2Str[ pCuCmd->appScanParams.scanType ].name);
-    os_error_printf(CU_MSG_INFO2, (PS8)"Band: %s, Number of probe req:%d, probe req. rate:%s\n", 
-        band2Str[ pCuCmd->appScanParams.band ].name, 
-        pCuCmd->appScanParams.probeReqNumber, 
-        rate2Str[j].name);
-#ifdef TI_DBG
-    os_error_printf(CU_MSG_INFO2, (PS8)"Tid :%d\n\n", pCuCmd->appScanParams.Tid);
-#else
-    os_error_printf(CU_MSG_INFO2, (PS8)"\n");
-#endif
-    os_error_printf(CU_MSG_INFO2, (PS8)"Channel  BSS ID             Max time  Min time  ET event     ET frame num Power\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"-------------------------------------------------------------------------------\n");
-    for ( i = 0; i < pCuCmd->appScanParams.numOfChannels; i++ )
-    {
-        pNormalChannel = &(pCuCmd->appScanParams.channelEntry[ i ].normalChannelEntry);
-        CU_CMD_FIND_NAME_ARRAY(j, EtEvent2Str, pNormalChannel->earlyTerminationEvent);
-        os_error_printf(CU_MSG_INFO2, (PS8)"%2d       %02x.%02x.%02x.%02x.%02x.%02x  %7d   %7d   %s%3d          %1d\n",
-               pNormalChannel->channel, 
-               pNormalChannel->bssId[0],pNormalChannel->bssId[1],pNormalChannel->bssId[2],pNormalChannel->bssId[3],pNormalChannel->bssId[4],pNormalChannel->bssId[5],
-               pNormalChannel->maxChannelDwellTime,
-               pNormalChannel->minChannelDwellTime, 
-               EtEvent2Str[j].name,
-               pNormalChannel->ETMaxNumOfAPframes, 
-               pNormalChannel->txPowerDbm);
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8)"\n");
-}
-
-VOID CuCmd_ScanSetSra(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if (OK != CuCommon_SetU32(pCuCmd->hCuCommon, SCAN_CNCN_SET_SRA, parm[0].value) )
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8) "Failed setting Scan Result Aging");
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8) "Scan Result Aging set succesfully to %d seconds", parm[0].value);
-}
-
-VOID CuCmd_ScanSetRssi(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if (OK != CuCommon_SetU32(pCuCmd->hCuCommon, SCAN_CNCN_SET_RSSI, parm[0].value) )
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8) "Failed setting Rssi filter threshold");
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8) "Rssi filter set succesfully to %d", parm[0].value);
-}
-
-VOID CuCmd_StartScan(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_START_APP_SCAN_SET, 
-        &pCuCmd->appScanParams, sizeof(scan_Params_t))) 
-    {
-        return;
-    }
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"Application scan started\n");
-
-    /*
-	 * In order to have ability to set the application scan we are using application scan priver command 
-	 * exsample for using supplicant scan command below:
-	 * #ifndef NO_WPA_SUPPL
-     *       CuOs_Start_Scan(pCuCmd->hCuWext, &ssid);
-	 * #endif
-	 */
-}
-
-VOID CuCmd_WextStartScan(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_SSID ssid;
-	U8 scanType =0;
-
-    switch (nParms) 
-    {
-		case 0:
-			ssid.SsidLength = 0;
-            ssid.Ssid[0] = 0;
-			scanType = 0;
-			break;
-        case 1 :
-            /* 
-            *  No SSID & No BSSID are set -
-            *  Use Any SSID & Any BSSID.
-            */
-            ssid.SsidLength = 0;            
-            ssid.Ssid[0] = 0;
-			scanType = (U8)parm[0].value;
-            break;
-
-        case 2:
-            /* 
-            *  SSID set 
-            *  Use CLI's SSID & Any BSSID.
-            */
-            ssid.SsidLength = os_strlen( (PS8)parm[1].value);
-			os_memcpy((PVOID)ssid.Ssid, (PVOID) parm[1].value, ssid.SsidLength);
-            ssid.Ssid[ssid.SsidLength] = '\0';
-			scanType = (U8)parm[0].value; /* 0 - Active , 1 - Passive*/
-            break;
-
-        default:
-            os_error_printf(CU_MSG_ERROR, (PS8)"<Scan Type [0=Active, 1=Passive]> <ssid Name As optional>\n");
-            return;
-    }
-
-
-
-#ifndef NO_WPA_SUPPL
-    CuOs_Start_Scan(pCuCmd->hCuWext, &ssid, scanType);
-#else
-    os_error_printf(CU_MSG_INFO2, (PS8)"WEXT not build, Scan Not Started\n");
-#endif
-
-}
-
-VOID CuCmd_StopScan (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_STOP_APP_SCAN_SET, NULL, 0))
-    {
-        return;
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8)"Application scan stopped\n");
-}
-
-VOID CuCmd_ConfigPeriodicScanGlobal (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    pCuCmd->tPeriodicAppScanParams.iRssiThreshold = (S8)parm[ 0 ].value;
-    pCuCmd->tPeriodicAppScanParams.iSnrThreshold = (S8)parm[ 1 ].value;
-    pCuCmd->tPeriodicAppScanParams.uFrameCountReportThreshold = parm[ 2 ].value;
-    pCuCmd->tPeriodicAppScanParams.bTerminateOnReport = parm[ 3 ].value;
-    pCuCmd->tPeriodicAppScanParams.eBssType = (ScanBssType_e )parm[ 4 ].value;
-    pCuCmd->tPeriodicAppScanParams.uProbeRequestNum = parm[ 5 ].value;
-    pCuCmd->tPeriodicAppScanParams.uCycleNum = parm[ 6 ].value;
-    pCuCmd->tPeriodicAppScanParams.uSsidNum = parm[ 7 ].value;
-    pCuCmd->tPeriodicAppScanParams.uSsidListFilterEnabled = (U8)(parm[ 8 ].value);
-    pCuCmd->tPeriodicAppScanParams.uChannelNum = parm[ 9 ].value;
-}
-
-VOID CuCmd_ConfigPeriodicScanInterval (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    pCuCmd->tPeriodicAppScanParams.uCycleIntervalMsec[ parm[ 0 ].value ] = parm[ 1 ].value;
-}
-
-VOID CuCmd_ConfigurePeriodicScanSsid (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TSsid *pSsid = &pCuCmd->tPeriodicAppScanParams.tDesiredSsid[ parm[ 0 ].value ].tSsid;
-     
-    pCuCmd->tPeriodicAppScanParams.tDesiredSsid[ parm[ 0 ].value ].eVisability = parm[ 1 ].value;
-    pSsid->len = (U8)os_strlen ((PS8)parm[ 2 ].value);
-    os_memcpy ((PVOID)&(pSsid->str), 
-               (PVOID)parm[ 2 ].value,
-               pSsid->len);
-    if(pSsid->len < MAX_SSID_LEN)
-    {
-        pSsid->str[pSsid->len] = 0;
-    }
-}
-
-VOID CuCmd_ConfigurePeriodicScanChannel (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t                 *pCuCmd = (CuCmd_t*)hCuCmd;
-    TPeriodicChannelEntry   *pChannelEnrty = &(pCuCmd->tPeriodicAppScanParams.tChannels[ parm[ 0 ].value ]);
-
-    pChannelEnrty->eBand = parm[ 1 ].value;
-    pChannelEnrty->uChannel = parm[ 2 ].value;
-    pChannelEnrty->eScanType = parm[ 3 ].value;
-    pChannelEnrty->uMinDwellTimeMs = parm[ 4 ].value;;
-    pChannelEnrty->uMaxDwellTimeMs = parm[ 5 ].value;
-    pChannelEnrty->uTxPowerLevelDbm = parm[ 6 ].value;
-}
-
-VOID CuCmd_ClearPeriodicScanConfiguration (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    os_memset (&(pCuCmd->tPeriodicAppScanParams), 0, sizeof (TPeriodicScanParams));
-    os_error_printf(CU_MSG_INFO2, (PS8)"Periodic application scan parameters cleared.\n");
-}
-
-VOID CuCmd_DisplayPeriodicScanConfiguration (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t*    pCuCmd = (CuCmd_t*)hCuCmd;
-    S32         i, j, k;
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"Application Periodic Scan parameters:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"RSSI Threshold: %d, SNR Threshold: %d, Report Threshold: %d  Number of cycles: %d\n",
-                    pCuCmd->tPeriodicAppScanParams.iRssiThreshold, pCuCmd->tPeriodicAppScanParams.iSnrThreshold,
-                    pCuCmd->tPeriodicAppScanParams.uFrameCountReportThreshold, pCuCmd->tPeriodicAppScanParams.uCycleNum);
-    CU_CMD_FIND_NAME_ARRAY (i, booleanStr, pCuCmd->tPeriodicAppScanParams.bTerminateOnReport);
-    CU_CMD_FIND_NAME_ARRAY (j, bssTypeStr, pCuCmd->tPeriodicAppScanParams.eBssType);
-    os_error_printf(CU_MSG_INFO2, (PS8)"Terminate on Report: %s, BSS type: %s, Probe Request Number: %d\n",
-                    booleanStr[ i ].name, bssTypeStr[ j ].name, pCuCmd->tPeriodicAppScanParams.uProbeRequestNum);
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"\nIntervals (msec):\n");
-    for (i = 0; i < PERIODIC_SCAN_MAX_INTERVAL_NUM; i++)
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"%d ", pCuCmd->tPeriodicAppScanParams.uCycleIntervalMsec[ i ]);
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8)"\n\nSSIDs:\n");
-    for (i = 0; i < (S32)pCuCmd->tPeriodicAppScanParams.uSsidNum; i++)
-    {
-        CU_CMD_FIND_NAME_ARRAY (j, ssidVisabilityStr, pCuCmd->tPeriodicAppScanParams.tDesiredSsid[ i ].eVisability);
-        os_error_printf(CU_MSG_INFO2, (PS8)"%s (%s), ", pCuCmd->tPeriodicAppScanParams.tDesiredSsid[ i ].tSsid.str,
-                        ssidVisabilityStr[ j ].name);
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8)"\n\nSSID List Filter Enabled: %d\n", pCuCmd->tPeriodicAppScanParams.uSsidListFilterEnabled );
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"\n\nChannels:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"%-15s %-10s %-20s %-15s %-15s %-20s\n",
-                    (PS8)"Band", (PS8)"Channel", (PS8)"Scan type", (PS8)"Min dwell time", (PS8)"Max dwell time", (PS8)"Power level (dBm*10)");
-    os_error_printf(CU_MSG_INFO2, (PS8)"----------------------------------------------------------------------------------------------------\n");
-    for (i = 0; i < (S32)pCuCmd->tPeriodicAppScanParams.uChannelNum; i++)
-    {
-        CU_CMD_FIND_NAME_ARRAY (j, band2Str, pCuCmd->tPeriodicAppScanParams.tChannels[ i ].eBand);
-        CU_CMD_FIND_NAME_ARRAY (k, scanType2Str, pCuCmd->tPeriodicAppScanParams.tChannels[ i ].eScanType);
-        os_error_printf(CU_MSG_INFO2, (PS8)"%-15s %-10d %-20s %-15d %-15d %-20d\n",
-                        band2Str[ j ].name,
-                        pCuCmd->tPeriodicAppScanParams.tChannels[ i ].uChannel,
-                        scanType2Str[ k ].name,
-                        pCuCmd->tPeriodicAppScanParams.tChannels[ i ].uMinDwellTimeMs,
-                        pCuCmd->tPeriodicAppScanParams.tChannels[ i ].uMaxDwellTimeMs,
-                        pCuCmd->tPeriodicAppScanParams.tChannels[ i ].uTxPowerLevelDbm);   
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8)"\n");
-}
-
-VOID CuCmd_StartPeriodicScan (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, SCAN_CNCN_START_PERIODIC_SCAN,
-                                &(pCuCmd->tPeriodicAppScanParams), sizeof(TPeriodicScanParams))) 
-    {
-        return;
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8)"Periodic application scan started.\n");
-}
-
-VOID CuCmd_StopPeriodicScan (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, SCAN_CNCN_STOP_PERIODIC_SCAN,
-                                NULL, 0)) 
-    {
-        return;
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8)"Periodic application scan stopped.\n");
-}
-
-VOID CuCmd_ConfigScanPolicy(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    pCuCmd->scanPolicy.normalScanInterval =  parm[ 0 ].value;
-    pCuCmd->scanPolicy.deterioratingScanInterval = parm[ 1 ].value;
-    pCuCmd->scanPolicy.maxTrackFailures = (U8)(parm[ 2 ].value);
-    pCuCmd->scanPolicy.BSSListSize = (U8)(parm[ 3 ].value);
-    pCuCmd->scanPolicy.BSSNumberToStartDiscovery = (U8)(parm[ 4 ].value);
-    pCuCmd->scanPolicy.numOfBands = (U8)(parm[ 5 ].value);
-}
-
-VOID CuCmd_ConfigScanBand(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    scan_bandPolicy_t* pBandPolicy = &(pCuCmd->scanPolicy.bandScanPolicy[ parm [ 0 ].value ]);
-
-    pBandPolicy->band = parm[ 1 ].value;
-    pBandPolicy->rxRSSIThreshold = (S8)(parm[ 2 ].value);
-    pBandPolicy->numOfChannlesForDiscovery = (U8)(parm[ 3 ].value);
-    pBandPolicy->numOfChannles = (U8)(parm[ 4 ].value);
-}
-
-VOID CuCmd_ConfigScanBandChannel(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    scan_bandPolicy_t* pBandPolicy = &(pCuCmd->scanPolicy.bandScanPolicy[ parm [ 0 ].value ]);
-
-    pBandPolicy->channelList[ parm[ 1 ].value ] = (U8)(parm[ 2 ].value);
-}
-
-VOID CuCmd_ConfigScanBandTrack(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    scan_bandPolicy_t* pBandPolicy = &(pCuCmd->scanPolicy.bandScanPolicy[ parm [ 0 ].value ]);
-
-    if (parm[6].value < parm[7].value)
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Max Dwell Time must be larger than or equal to Min Dwell Time...\n");
-        return;
-    }
-
-    pBandPolicy->trackingMethod.scanType = parm[ 1 ].value;
-
-    switch (pBandPolicy->trackingMethod.scanType)
-    {
-        case SCAN_TYPE_NORMAL_ACTIVE:
-        case SCAN_TYPE_NORMAL_PASSIVE:
-            pBandPolicy->trackingMethod.method.basicMethodParams.maxChannelDwellTime = (parm[ 6 ].value);
-            pBandPolicy->trackingMethod.method.basicMethodParams.minChannelDwellTime = (parm[ 7 ].value);
-            pBandPolicy->trackingMethod.method.basicMethodParams.earlyTerminationEvent = parm[ 2 ].value;
-            pBandPolicy->trackingMethod.method.basicMethodParams.ETMaxNumberOfApFrames = (U8)(parm[ 3 ].value);
-            pBandPolicy->trackingMethod.method.basicMethodParams.probReqParams.bitrate = parm[ 9 ].value;
-            pBandPolicy->trackingMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = (U8)(parm[ 8 ].value);
-            pBandPolicy->trackingMethod.method.basicMethodParams.probReqParams.txPowerDbm = (U8)(parm[ 10 ].value);
-            break;
-
-        case SCAN_TYPE_TRIGGERED_ACTIVE:
-        case SCAN_TYPE_TRIGGERED_PASSIVE:
-            /* Check if valid TID */
-            if (((parm[ 4 ].value) > 7) && ((parm[ 4 ].value) != 255))
-            {
-                os_error_printf (CU_MSG_INFO2, (PS8)"ERROR Tid (AC) should be 0..7 or 255 instead = %d (using default = 255)\n",(parm[ 4 ].value));
-                parm[ 4 ].value = 255;
-            }
-
-            pBandPolicy->trackingMethod.method.TidTriggerdMethodParams.triggeringTid = (U8)(parm[ 4 ].value);
-            pBandPolicy->trackingMethod.method.TidTriggerdMethodParams.basicMethodParams.maxChannelDwellTime = (parm[ 6 ].value);
-            pBandPolicy->trackingMethod.method.TidTriggerdMethodParams.basicMethodParams.minChannelDwellTime = (parm[ 7 ].value);
-            pBandPolicy->trackingMethod.method.TidTriggerdMethodParams.basicMethodParams.earlyTerminationEvent = parm[ 2 ].value;
-            pBandPolicy->trackingMethod.method.TidTriggerdMethodParams.basicMethodParams.ETMaxNumberOfApFrames = (U8)(parm[ 3 ].value);
-            pBandPolicy->trackingMethod.method.TidTriggerdMethodParams.basicMethodParams.probReqParams.bitrate = parm[ 9 ].value;
-            pBandPolicy->trackingMethod.method.TidTriggerdMethodParams.basicMethodParams.probReqParams.numOfProbeReqs = (U8)(parm[ 8 ].value);
-            pBandPolicy->trackingMethod.method.TidTriggerdMethodParams.basicMethodParams.probReqParams.txPowerDbm = (U8)(parm[ 10 ].value);
-            break;
-
-        case SCAN_TYPE_SPS:
-            pBandPolicy->trackingMethod.method.spsMethodParams.earlyTerminationEvent = parm[ 2 ].value;
-            pBandPolicy->trackingMethod.method.spsMethodParams.ETMaxNumberOfApFrames = (U8)(parm[ 3 ].value);
-            pBandPolicy->trackingMethod.method.spsMethodParams.scanDuration = parm[ 5 ].value;
-            break;
-
-        default:
-            pBandPolicy->trackingMethod.scanType = SCAN_TYPE_NO_SCAN;
-            break;
-    }
-}
-
-VOID CuCmd_ConfigScanBandDiscover(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    scan_bandPolicy_t* pBandPolicy = &(pCuCmd->scanPolicy.bandScanPolicy[ parm [ 0 ].value ]);
-
-    if (parm[6].value < parm[7].value)
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Max Dwell Time must be larger than or equal to Min Dwell Time...\n");
-        return;
-    }
-
-    pBandPolicy->discoveryMethod.scanType = parm[ 1 ].value;
-
-    switch (pBandPolicy->discoveryMethod.scanType)
-    {
-        case SCAN_TYPE_NORMAL_ACTIVE:
-        case SCAN_TYPE_NORMAL_PASSIVE:
-            pBandPolicy->discoveryMethod.method.basicMethodParams.maxChannelDwellTime = (parm[ 6 ].value);
-            pBandPolicy->discoveryMethod.method.basicMethodParams.minChannelDwellTime = (parm[ 7 ].value);
-            pBandPolicy->discoveryMethod.method.basicMethodParams.earlyTerminationEvent = parm[ 2 ].value;
-            pBandPolicy->discoveryMethod.method.basicMethodParams.ETMaxNumberOfApFrames = (U8)(parm[ 3 ].value);
-            pBandPolicy->discoveryMethod.method.basicMethodParams.probReqParams.bitrate = parm[ 9 ].value;
-            pBandPolicy->discoveryMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = (U8)(parm[ 8 ].value);
-            pBandPolicy->discoveryMethod.method.basicMethodParams.probReqParams.txPowerDbm = (U8)(parm[ 10 ].value);
-            break;
-
-        case SCAN_TYPE_TRIGGERED_ACTIVE:
-        case SCAN_TYPE_TRIGGERED_PASSIVE:
-            /* Check if valid TID */
-            if (((parm[ 4 ].value) > 7) && ((parm[ 4 ].value) != 255))
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"ERROR Tid (AC) should be 0..7 or 255 instead = %d (using default = 255)\n",(parm[ 4 ].value));
-                parm[ 4 ].value = 255;
-            }
-
-            pBandPolicy->discoveryMethod.method.TidTriggerdMethodParams.triggeringTid = (U8)(parm[ 4 ].value);
-            pBandPolicy->discoveryMethod.method.TidTriggerdMethodParams.basicMethodParams.maxChannelDwellTime = (parm[ 6 ].value);
-            pBandPolicy->discoveryMethod.method.TidTriggerdMethodParams.basicMethodParams.minChannelDwellTime = (parm[ 7 ].value);
-            pBandPolicy->discoveryMethod.method.TidTriggerdMethodParams.basicMethodParams.earlyTerminationEvent = parm[ 2 ].value;
-            pBandPolicy->discoveryMethod.method.TidTriggerdMethodParams.basicMethodParams.ETMaxNumberOfApFrames = (U8)(parm[ 3 ].value);
-            pBandPolicy->discoveryMethod.method.TidTriggerdMethodParams.basicMethodParams.probReqParams.bitrate = parm[ 9 ].value;
-            pBandPolicy->discoveryMethod.method.TidTriggerdMethodParams.basicMethodParams.probReqParams.numOfProbeReqs = (U8)(parm[ 8 ].value);
-            pBandPolicy->discoveryMethod.method.TidTriggerdMethodParams.basicMethodParams.probReqParams.txPowerDbm = (U8)(parm[ 10 ].value);
-            break;
-
-        case SCAN_TYPE_SPS:
-            pBandPolicy->discoveryMethod.method.spsMethodParams.earlyTerminationEvent = parm[ 2 ].value;
-            pBandPolicy->discoveryMethod.method.spsMethodParams.ETMaxNumberOfApFrames = (U8)(parm[ 3 ].value);
-            pBandPolicy->discoveryMethod.method.spsMethodParams.scanDuration = parm[ 5 ].value;
-            break;
-
-        default:
-            pBandPolicy->discoveryMethod.scanType = SCAN_TYPE_NO_SCAN;
-            break;
-    }
-}
-
-VOID CuCmd_ConfigScanBandImmed(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    scan_bandPolicy_t* pBandPolicy = &(pCuCmd->scanPolicy.bandScanPolicy[ parm [ 0 ].value ]);
-
-    if (parm[6].value < parm[7].value)
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Max Dwell Time must be larger than or equal to Min Dwell Time...\n");
-        return;
-    }
-
-    pBandPolicy->immediateScanMethod.scanType = parm[ 1 ].value;
-
-    switch (pBandPolicy->immediateScanMethod.scanType)
-    {
-        case SCAN_TYPE_NORMAL_ACTIVE:
-        case SCAN_TYPE_NORMAL_PASSIVE:
-            pBandPolicy->immediateScanMethod.method.basicMethodParams.maxChannelDwellTime = (parm[ 6 ].value);
-            pBandPolicy->immediateScanMethod.method.basicMethodParams.minChannelDwellTime = (parm[ 7 ].value);
-            pBandPolicy->immediateScanMethod.method.basicMethodParams.earlyTerminationEvent = parm[ 2 ].value;
-            pBandPolicy->immediateScanMethod.method.basicMethodParams.ETMaxNumberOfApFrames = (U8)(parm[ 3 ].value);
-            pBandPolicy->immediateScanMethod.method.basicMethodParams.probReqParams.bitrate = parm[ 9 ].value;
-            pBandPolicy->immediateScanMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = (U8)(parm[ 8 ].value);
-            pBandPolicy->immediateScanMethod.method.basicMethodParams.probReqParams.txPowerDbm = (U8)(parm[ 10 ].value);
-            break;
-
-        case SCAN_TYPE_TRIGGERED_ACTIVE:
-        case SCAN_TYPE_TRIGGERED_PASSIVE:
-            /* Check if valid TID */
-            if (((parm[ 4 ].value) > 7) && ((parm[ 4 ].value) != 255))
-            {
-                os_error_printf (CU_MSG_INFO2, (PS8)"ERROR Tid (AC) should be 0..7 or 255 instead = %d (using default = 255)\n",(parm[ 4 ].value));
-                parm[ 4 ].value = 255;
-            }
-
-            pBandPolicy->immediateScanMethod.method.TidTriggerdMethodParams.triggeringTid = (U8)(parm[ 4 ].value);
-            pBandPolicy->immediateScanMethod.method.TidTriggerdMethodParams.basicMethodParams.maxChannelDwellTime = (parm[ 6 ].value);
-            pBandPolicy->immediateScanMethod.method.TidTriggerdMethodParams.basicMethodParams.minChannelDwellTime = (parm[ 7 ].value);
-            pBandPolicy->immediateScanMethod.method.TidTriggerdMethodParams.basicMethodParams.earlyTerminationEvent = parm[ 2 ].value;
-            pBandPolicy->immediateScanMethod.method.TidTriggerdMethodParams.basicMethodParams.ETMaxNumberOfApFrames = (U8)(parm[ 3 ].value);
-            pBandPolicy->immediateScanMethod.method.TidTriggerdMethodParams.basicMethodParams.probReqParams.bitrate = parm[ 9 ].value;
-            pBandPolicy->immediateScanMethod.method.TidTriggerdMethodParams.basicMethodParams.probReqParams.numOfProbeReqs = (U8)(parm[ 8 ].value);
-            pBandPolicy->immediateScanMethod.method.TidTriggerdMethodParams.basicMethodParams.probReqParams.txPowerDbm = (U8)(parm[ 10 ].value);
-            break;
-
-        case SCAN_TYPE_SPS:
-            pBandPolicy->immediateScanMethod.method.spsMethodParams.earlyTerminationEvent = parm[ 2 ].value;
-            pBandPolicy->immediateScanMethod.method.spsMethodParams.ETMaxNumberOfApFrames = (U8)(parm[ 3 ].value);
-            pBandPolicy->immediateScanMethod.method.spsMethodParams.scanDuration = parm[ 5 ].value;
-            break;
-
-        default:
-            pBandPolicy->immediateScanMethod.scanType = SCAN_TYPE_NO_SCAN;
-            break;
-    }
-}
-
-VOID CuCmd_DisplayScanPolicy(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    S32 i;  
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"Scan Policy:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"Normal scan interval: %d, deteriorating scan interval: %d\n",
-          pCuCmd->scanPolicy.normalScanInterval, pCuCmd->scanPolicy.deterioratingScanInterval);
-    os_error_printf(CU_MSG_INFO2, (PS8)"Max track attempt failures: %d\n", pCuCmd->scanPolicy.maxTrackFailures);
-    os_error_printf(CU_MSG_INFO2, (PS8)"BSS list size: %d, number of BSSes to start discovery: %d\n",
-          pCuCmd->scanPolicy.BSSListSize, pCuCmd->scanPolicy.BSSNumberToStartDiscovery);
-    os_error_printf(CU_MSG_INFO2, (PS8)"Number of configured bands: %d\n", pCuCmd->scanPolicy.numOfBands);
-    for ( i = 0; i < pCuCmd->scanPolicy.numOfBands; i++ )
-    {
-        CuCmd_PrintScanBand(&(pCuCmd->scanPolicy.bandScanPolicy[ i ]));       
-    }
-}
-
-VOID CuCmd_ClearScanPolicy(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    os_memset( &pCuCmd->scanPolicy, 0, sizeof(scan_Policy_t) );
-    os_error_printf(CU_MSG_INFO2, (PS8)"Scan policy cleared.\n");
-}
-
-VOID CuCmd_SetScanPolicy(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_SCAN_POLICY_PARAM_SET,
-        &pCuCmd->scanPolicy, sizeof(scan_Policy_t))) return;
-    os_error_printf(CU_MSG_INFO2, (PS8)"Scan policy stored.\n");
-}
-
-VOID CuCmd_GetScanBssList(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    bssList_t list;
-    S32 i;
-
-    if(OK != CuCommon_GetSetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_SCAN_BSS_LIST_GET,
-        &list, sizeof(bssList_t))) return;
-
-    /* os_error_printf list */
-    os_error_printf(CU_MSG_INFO2, (PS8)"BSS List:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"%-17s  %-7s  %-6s  %-4s  %-10s\n", (PS8)"BSSID", (PS8)"Band", (PS8)"Channel", (PS8)"RSSI", (PS8)"Neighbor?");
-    os_error_printf(CU_MSG_INFO2, (PS8)"-----------------------------------------------------\n");
-    for  ( i = 0; i < list.numOfEntries; i++ )
-    {
-        os_error_printf(CU_MSG_INFO2,  (PS8)"%02x.%02x.%02x.%02x.%02x.%02x  %s  %-7d  %-4d  %s\n", 
-               list.BSSList[i].BSSID[0], list.BSSList[i].BSSID[1], list.BSSList[i].BSSID[2], list.BSSList[i].BSSID[3], list.BSSList[i].BSSID[4], list.BSSList[i].BSSID[5],
-               band2Str[ list.BSSList[ i ].band ].name, 
-               list.BSSList[ i ].channel, list.BSSList[ i ].RSSI, 
-               (TRUE == list.BSSList[ i ].bNeighborAP ? (PS8)"Yes" : (PS8)"No") );
-    }
-}
-
-VOID CuCmd_RoamingEnable(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    roamingMngrConfigParams_t   roamingMngrConfigParams;
-    
-    if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION,
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t))) return;
-    roamingMngrConfigParams.roamingMngrConfig.enableDisable = ROAMING_ENABLED;  
-    if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION,
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    os_error_printf(CU_MSG_INFO2, (PS8)"Roaming is enabled \n");
-}
-
-VOID CuCmd_RoamingDisable(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    roamingMngrConfigParams_t   roamingMngrConfigParams;
-    
-    if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION,
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    roamingMngrConfigParams.roamingMngrConfig.enableDisable = ROAMING_DISABLED; 
-    if(OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION,
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    os_error_printf(CU_MSG_INFO2, (PS8)"Roaming is disabled \n");
-}
-
-VOID CuCmd_RoamingLowPassFilter(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    roamingMngrConfigParams_t   roamingMngrConfigParams;
-    
-    if(OK != CuCommon_GetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION,
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    if( nParms != 0 )   
-    {       
-        roamingMngrConfigParams.roamingMngrConfig.lowPassFilterRoamingAttempt = (U16) parm[0].value;
-        if(OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION,
-            &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;  
-    }   
-    os_error_printf(CU_MSG_INFO2, (PS8)"Time in sec to wait before low quality Roaming Triggers, \n lowPassFilterRoamingAttempt = %d sec\n", 
-           roamingMngrConfigParams.roamingMngrConfig.lowPassFilterRoamingAttempt);    
-}
-
-VOID CuCmd_RoamingQualityIndicator(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    roamingMngrConfigParams_t   roamingMngrConfigParams;
-    
-    if(OK != CuCommon_GetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    if( nParms != 0 )   
-    {       
-        roamingMngrConfigParams.roamingMngrConfig.apQualityThreshold = (S8) parm[0].value;  
-        if(OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-            &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    }       
-    os_error_printf(CU_MSG_INFO2, (PS8)"Quality indicator (RSSI) to be used when comparing AP List matching quality, \n apQualityThreshold = %d \n",         
-           (roamingMngrConfigParams.roamingMngrConfig.apQualityThreshold));
-}
-
-VOID CuCmd_RoamingDataRetryThreshold(THandle hCuCmd, ConParm_t parm[], U16 nParms)                                                                     
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    roamingMngrConfigParams_t   roamingMngrConfigParams;
-    
-    if(OK != CuCommon_GetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    if( nParms != 0 )
-    {
-        roamingMngrConfigParams.roamingMngrThresholdsConfig.dataRetryThreshold =  (S8) parm[0].value;
-        if(OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-            &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    }    
-    os_error_printf(CU_MSG_INFO2, (PS8)"dataRetryThreshold = %d \n", 
-           roamingMngrConfigParams.roamingMngrThresholdsConfig.dataRetryThreshold);
-
-}
-VOID CuCmd_RoamingNumExpectedTbttForBSSLoss(THandle hCuCmd, ConParm_t parm[], U16 nParms)                                                    
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    roamingMngrConfigParams_t   roamingMngrConfigParams;
-    
-    if(OK != CuCommon_GetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    if( nParms != 0 )
-    {
-        roamingMngrConfigParams.roamingMngrThresholdsConfig.numExpectedTbttForBSSLoss =  (S8) parm[0].value;
-        if(OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-            &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;    
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8)"Number of expected TBTTs for BSS Loss event, \n numExpectedTbttForBSSLoss = %d \n", 
-           roamingMngrConfigParams.roamingMngrThresholdsConfig.numExpectedTbttForBSSLoss);
-
-}
-VOID CuCmd_RoamingTxRateThreshold(THandle hCuCmd, ConParm_t parm[], U16 nParms)                                                                  
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    roamingMngrConfigParams_t   roamingMngrConfigParams;
-    
-    if(OK != CuCommon_GetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    if( nParms != 0 )
-    {
-        roamingMngrConfigParams.roamingMngrThresholdsConfig.txRateThreshold =  (S8 )parm[0].value;
-        if(OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-            &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    }    
-    os_error_printf(CU_MSG_INFO2, (PS8)"txRateThreshold = %d \n", 
-           roamingMngrConfigParams.roamingMngrThresholdsConfig.txRateThreshold);
-
-}
-
-VOID CuCmd_RoamingLowRssiThreshold(THandle hCuCmd, ConParm_t parm[], U16 nParms)                                                                           
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    roamingMngrConfigParams_t   roamingMngrConfigParams;
-    
-    if(OK != CuCommon_GetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    if( nParms != 0 )
-    {
-        roamingMngrConfigParams.roamingMngrThresholdsConfig.lowRssiThreshold =  (S8) parm[0].value;
-        if(OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-            &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    }   
-    os_error_printf(CU_MSG_INFO2, (PS8)"lowRssiThreshold = %d \n", 
-           (roamingMngrConfigParams.roamingMngrThresholdsConfig.lowRssiThreshold));
-
-}
-
-VOID CuCmd_RoamingLowSnrThreshold(THandle hCuCmd, ConParm_t parm[], U16 nParms)                                                                           
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    roamingMngrConfigParams_t   roamingMngrConfigParams;
-    
-    if(OK != CuCommon_GetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    if( nParms != 0 )
-    {
-        roamingMngrConfigParams.roamingMngrThresholdsConfig.lowSnrThreshold =  (S8)parm[0].value;
-        if(OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-            &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    }    
-    os_error_printf(CU_MSG_INFO2, (PS8)"lowSnrThreshold = %d \n", roamingMngrConfigParams.roamingMngrThresholdsConfig.lowSnrThreshold);
-}
-
-VOID CuCmd_RoamingLowQualityForBackgroungScanCondition(THandle hCuCmd, ConParm_t parm[], U16 nParms) 
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    roamingMngrConfigParams_t   roamingMngrConfigParams;
-    
-    if(OK != CuCommon_GetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    if( nParms != 0 )
-    {
-        roamingMngrConfigParams.roamingMngrThresholdsConfig.lowQualityForBackgroungScanCondition = (S8) parm[0].value;
-        if(OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-            &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    }    
-    os_error_printf(CU_MSG_INFO2, (PS8)"Indicator used to increase the background scan period when quality is low, \n lowQualityForBackgroungScanCondition = %d \n", 
-           (roamingMngrConfigParams.roamingMngrThresholdsConfig.lowQualityForBackgroungScanCondition));
-
-}
-
-VOID CuCmd_RoamingNormalQualityForBackgroungScanCondition(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    roamingMngrConfigParams_t   roamingMngrConfigParams;
-    
-    if(OK != CuCommon_GetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-    if( nParms != 0 )
-    {
-        roamingMngrConfigParams.roamingMngrThresholdsConfig.normalQualityForBackgroungScanCondition = (S8) parm[0].value;
-        if(OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-            &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;    
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8)"Indicator used to reduce the background scan period when quality is normal, \n normalQualityForBackgroungScanCondition = %d \n", 
-           (roamingMngrConfigParams.roamingMngrThresholdsConfig.normalQualityForBackgroungScanCondition));
-
-}
-
-VOID CuCmd_RoamingGetConfParams(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    roamingMngrConfigParams_t   roamingMngrConfigParams;
-    
-    if(OK != CuCommon_GetBuffer (pCuCmd->hCuCommon, ROAMING_MNGR_APPLICATION_CONFIGURATION, 
-        &roamingMngrConfigParams, sizeof(roamingMngrConfigParams_t)) ) return;
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"Roaming is: %s \n", roamingMngrConfigParams.roamingMngrConfig.enableDisable ? "Enabled" : "Disabled\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)" lowPassFilterRoamingAttempt = %d sec,\n apQualityThreshold = %d\n", 
-        roamingMngrConfigParams.roamingMngrConfig.lowPassFilterRoamingAttempt,
-        roamingMngrConfigParams.roamingMngrConfig.apQualityThreshold);
-    os_error_printf(CU_MSG_INFO2, (PS8)" Roaming Triggers' thresholds are: \n");
-    os_error_printf(CU_MSG_INFO2, (PS8)" dataRetryThreshold = %d,\n lowQualityForBackgroungScanCondition = %d,\n lowRssiThreshold = %d,\n lowSnrThreshold = %d,\n normalQualityForBackgroungScanCondition = %d,\n numExpectedTbttForBSSLoss = %d,\n txRateThreshold = %d \n",
-					roamingMngrConfigParams.roamingMngrThresholdsConfig.dataRetryThreshold,
-					roamingMngrConfigParams.roamingMngrThresholdsConfig.lowQualityForBackgroungScanCondition,
-					roamingMngrConfigParams.roamingMngrThresholdsConfig.lowRssiThreshold,
-					roamingMngrConfigParams.roamingMngrThresholdsConfig.lowSnrThreshold,
-					roamingMngrConfigParams.roamingMngrThresholdsConfig.normalQualityForBackgroungScanCondition,
-					roamingMngrConfigParams.roamingMngrThresholdsConfig.numExpectedTbttForBSSLoss,
-					roamingMngrConfigParams.roamingMngrThresholdsConfig.txRateThreshold);
-}
-
-VOID CuCmd_CurrBssUserDefinedTrigger(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t *pCuCmd = (CuCmd_t*)hCuCmd;
-    TUserDefinedQualityTrigger  userTrigger;
-    
-    if (nParms == 0)
-        return;
-
-    userTrigger.uIndex     = (U8)parm[0].value;
-    userTrigger.iThreshold = (U16)parm[1].value;
-    userTrigger.uPacing    = (U16)parm[2].value;
-    userTrigger.uMetric    = (U8)parm[3].value;
-    userTrigger.uType      = (U8)parm[4].value;
-    userTrigger.uDirection = (U8)parm[5].value;
-    userTrigger.uHystersis = (U8)parm[6].value;
-    userTrigger.uEnable    = (U8)parm[7].value;
-
-    userTrigger.uClientID = 0; /* '0' means that external application with no clientId has registered for the event */
-
-    if (OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, CURR_BSS_REGISTER_LINK_QUALITY_EVENT_PARAM,
-                                  &userTrigger, sizeof(TUserDefinedQualityTrigger)) ) 
-        return;    
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_RoamingUserDefinedTrigger: \n \
-          index = %d, \n \
-          threshold = %d, \n \
-          pacing = %d, \n \
-          metric = %d, \n \
-          type = %d, \n \
-          direction = %d, \n \
-          hystersis = %d, \n \
-          enable = %d \n",
-          userTrigger.uIndex,
-          userTrigger.iThreshold,
-          userTrigger.uPacing,
-          userTrigger.uMetric,
-          userTrigger.uType,
-          userTrigger.uDirection,
-          userTrigger.uHystersis,
-          userTrigger.uEnable);
-}
-
-VOID CuCmd_AddTspec(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_QOS_TSPEC_PARAMS TspecParams;
-    
-    TspecParams.uUserPriority = parm[0].value;
-    TspecParams.uNominalMSDUsize = parm[1].value;
-    TspecParams.uMeanDataRate = parm[2].value;
-    TspecParams.uMinimumPHYRate = parm[3].value * 1000 * 1000;
-    TspecParams.uSurplusBandwidthAllowance = parm[4].value << 13;
-    TspecParams.uAPSDFlag = parm[5].value;
-    TspecParams.uMinimumServiceInterval = parm[6].value;
-    TspecParams.uMaximumServiceInterval = parm[7].value;
-
-    if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_ADD_TSPEC, 
-        &TspecParams, sizeof(OS_802_11_QOS_TSPEC_PARAMS))) return;
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"TSpec request sent to driver...\n uUserPriority = %d\n uNominalMSDUsize = %d\n uMeanDataRate = %d\n uMinimumPHYRate = %d\n uSurplusBandwidthAllowance = %d\n uAPSDFlag = %d uMinimumServiceInterval = %d uMaximumServiceInterval = %d\n",
-               parm[0].value,
-               parm[1].value,
-               parm[2].value,
-               parm[3].value,
-               parm[4].value,
-               parm[5].value,
-               parm[6].value,
-               parm[7].value);
-   
-}
-
-VOID CuCmd_GetTspec(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_QOS_TSPEC_PARAMS TspecParams;
-
-    TspecParams.uUserPriority = parm[0].value;
-    
-    if(OK != CuCommon_GetSetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_GET_TSPEC_PARAMS,
-        &TspecParams, sizeof(OS_802_11_QOS_TSPEC_PARAMS))) return;
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"TSpec parameters retrieved:\nuUserPriority = %d\nuNominalMSDUsize = %d\nuMeanDataRate = %d\nuMinimumPHYRate = %d\nuSurplusBandwidthAllowance = %d\nuUAPSD_Flag = %d\nuMinimumServiceInterval = %d\nuMaximumServiceInterval = %d\nuMediumTime = %d\n",
-               TspecParams.uUserPriority,
-               TspecParams.uNominalMSDUsize,
-               TspecParams.uMeanDataRate,
-               TspecParams.uMinimumPHYRate,
-               TspecParams.uSurplusBandwidthAllowance,
-               TspecParams.uAPSDFlag,
-               TspecParams.uMinimumServiceInterval,
-               TspecParams.uMaximumServiceInterval,
-               TspecParams.uMediumTime);
-}
-
-VOID CuCmd_DeleteTspec(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_QOS_DELETE_TSPEC_PARAMS TspecParams; 
-
-    TspecParams.uUserPriority = parm[0].value;
-    TspecParams.uReasonCode = parm[1].value;
-
-    if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_DELETE_TSPEC, 
-        &TspecParams, sizeof(OS_802_11_QOS_TSPEC_PARAMS))) return;
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"TSPEC Delete request sent to driver...\n uUserPriority = %d\n uReasonCode = %d\n",
-        TspecParams.uUserPriority,
-        TspecParams.uReasonCode);
-}
-
-VOID CuCmd_GetApQosParams(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_AC_QOS_PARAMS AcQosParams;
-    S32 i = 0;
-
-    /* test if we can get the AC QOS Params */
-    AcQosParams.uAC = i;
-    if(OK != CuCommon_GetSetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_GET_AP_QOS_PARAMS,
-        &AcQosParams, sizeof(AcQosParams))) return;
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"AP QOS Parameters:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"+----+-------------+----------+-----------+-----------+-----------+\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"| AC | AdmCtrlFlag |   AIFS   |   CwMin   |   CwMax   | TXOPLimit |\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"+----+-------------+----------+-----------+-----------+-----------+\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"| %2d | %11d | %8d | %9d | %9d | %9d |\n",
-            i,
-            AcQosParams.uAssocAdmissionCtrlFlag,
-            AcQosParams.uAIFS,
-            AcQosParams.uCwMin,
-            AcQosParams.uCwMax,
-            AcQosParams.uTXOPLimit);
-         
-    for (i=1; i<4; i++)
-    {
-        AcQosParams.uAC = i;
-        if(OK != CuCommon_GetSetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_GET_AP_QOS_PARAMS,
-            &AcQosParams, sizeof(AcQosParams))) return;      
-
-        os_error_printf(CU_MSG_INFO2, (PS8)"| %2d | %11d | %8d | %9d | %9d | %9d |\n",
-            i,
-            AcQosParams.uAssocAdmissionCtrlFlag,
-            AcQosParams.uAIFS,
-            AcQosParams.uCwMin,
-            AcQosParams.uCwMax,
-            AcQosParams.uTXOPLimit);
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8)"+----+-------------+----------+-----------+-----------+-----------+\n");
-}
-
-VOID CuCmd_GetPsRxStreamingParams(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TPsRxStreaming tPsRxStreaming;
-    S32 i = 0;
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"PS Rx Streaming Parameters:\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"+-----+--------------+------------+---------+\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"| TID | StreamPeriod | uTxTimeout | Enabled |\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"+-----+--------------+------------+---------+\n");
-         
-    for (i=0; i<8; i++)
-    {
-        tPsRxStreaming.uTid = i;
-        if(OK != CuCommon_GetSetBuffer(pCuCmd->hCuCommon, QOS_MNGR_PS_RX_STREAMING,
-            &tPsRxStreaming, sizeof(TPsRxStreaming))) return;      
-
-        os_error_printf(CU_MSG_INFO2, (PS8)"| %3d | %12d | %10d | %7d |\n",
-            tPsRxStreaming.uTid,         
-            tPsRxStreaming.uStreamPeriod, 
-            tPsRxStreaming.uTxTimeout,    
-            tPsRxStreaming.bEnabled);
-    }
-    os_error_printf(CU_MSG_INFO2, (PS8)"+-----+--------------+------------+---------+\n");
-}
-
-VOID CuCmd_GetApQosCapabilities(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    OS_802_11_AP_QOS_CAPABILITIES_PARAMS ApQosCapabiltiesParams;
-
-    if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_GET_AP_QOS_CAPABILITIES,
-        &ApQosCapabiltiesParams, sizeof(OS_802_11_AP_QOS_CAPABILITIES_PARAMS))) return;
-   
-    os_error_printf(CU_MSG_INFO2, (PS8)"AP Qos Capabilities:\n QOSFlag = %d\n APSDFlag = %d\n",
-        ApQosCapabiltiesParams.uQOSFlag,
-        ApQosCapabiltiesParams.uAPSDFlag);
-       
-}
-
-VOID CuCmd_GetAcStatus(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_AC_UPSD_STATUS_PARAMS AcStatusParams;
-
-    AcStatusParams.uAC = parm[0].value;
-
-    if(OK != CuCommon_GetSetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_GET_CURRENT_AC_STATUS,
-        &AcStatusParams, sizeof(OS_802_11_AC_UPSD_STATUS_PARAMS))) return;
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"AC %d Status:\n", AcStatusParams.uAC);
-    os_error_printf(CU_MSG_INFO2, (PS8)"PS Scheme = %d (0=LEGACY, 1=UPSD)\n", AcStatusParams.uCurrentUAPSDStatus);
-    os_error_printf(CU_MSG_INFO2, (PS8)"Admission Status = %d (0=NOT_ADMITTED, 1=WAIT_ADMISSION, 2=ADMITTED)\n", AcStatusParams.pCurrentAdmissionStatus);
-}
-
-VOID CuCmd_ModifyMediumUsageTh(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_THRESHOLD_CROSS_PARAMS ThCrossParams;
-
-    if (nParms == 3) /* If user supplied 3 parameters - this is a SET operation */
-    {
-        ThCrossParams.uAC = parm[0].value;
-        ThCrossParams.uHighThreshold = parm[1].value;
-        ThCrossParams.uLowThreshold = parm[2].value;
-
-        if (ThCrossParams.uLowThreshold > ThCrossParams.uHighThreshold)
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"Low threshold cannot be higher than the High threshold...Aborting...\n");
-            return;
-        }
-
-        if(OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_SET_MEDIUM_USAGE_THRESHOLD,
-            &ThCrossParams, sizeof(OS_802_11_THRESHOLD_CROSS_PARAMS))) return;      
-
-        os_error_printf(CU_MSG_INFO2, (PS8)"Medium usage threshold for AC %d has been set to:\n LowThreshold = %d\n HighThreshold = %d\n",
-            ThCrossParams.uAC,
-            ThCrossParams.uLowThreshold,
-            ThCrossParams.uHighThreshold);
-   }
-   else if (nParms == 1) /* Only 1 parameter means a GET operation */
-   {
-        ThCrossParams.uAC = parm[0].value;
-        ThCrossParams.uLowThreshold = 0;
-        ThCrossParams.uHighThreshold = 0;
-
-        if(OK != CuCommon_GetSetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_GET_MEDIUM_USAGE_THRESHOLD,
-            &ThCrossParams, sizeof(OS_802_11_THRESHOLD_CROSS_PARAMS))) return;      
-
-        os_error_printf(CU_MSG_INFO2, (PS8)"Medium usage threshold for AC %d:\n LowThreshold = %d\n HighThreshold = %d\n",
-            ThCrossParams.uAC,
-            ThCrossParams.uLowThreshold,
-            ThCrossParams.uHighThreshold);
-   }
-}
-
-
-VOID CuCmd_GetDesiredPsMode(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_QOS_DESIRED_PS_MODE DesiredPsMode;
-
-    if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_GET_DESIRED_PS_MODE,
-        &DesiredPsMode, sizeof(OS_802_11_QOS_DESIRED_PS_MODE))) return;     
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"Desired PS Mode (0=PS_POLL, 1=UPSD, 2=PS_NONE):\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"===============================================\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"  +-----------+------+\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"  |    AC     | Mode |\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"  +-----------+------+\n");
-    os_error_printf(CU_MSG_INFO2, (PS8)"  |  General  |  %d   |\n", DesiredPsMode.uDesiredPsMode);
-    os_error_printf(CU_MSG_INFO2, (PS8)"  |   BE_AC   |  %d   |\n", DesiredPsMode.uDesiredWmeAcPsMode[QOS_AC_BE]);
-    os_error_printf(CU_MSG_INFO2, (PS8)"  |   BK_AC   |  %d   |\n", DesiredPsMode.uDesiredWmeAcPsMode[QOS_AC_BK]);
-    os_error_printf(CU_MSG_INFO2, (PS8)"  |   VI_AC   |  %d   |\n", DesiredPsMode.uDesiredWmeAcPsMode[QOS_AC_VI]);
-    os_error_printf(CU_MSG_INFO2, (PS8)"  |   VO_AC   |  %d   |\n", DesiredPsMode.uDesiredWmeAcPsMode[QOS_AC_VO]);
-    os_error_printf(CU_MSG_INFO2, (PS8)"  +-----------+------+\n");
-}
-
-
-VOID CuCmd_InsertClsfrEntry(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    clsfr_tableEntry_t newUserTableEntry;
-    S32 i;
-
-    if (nParms >=2)
-        newUserTableEntry.DTag = (U8) parm[1].value;
-
-    switch(parm[0].value)
-    {
-        case D_TAG_CLSFR:
-            os_error_printf(CU_MSG_INFO2, (PS8)"Cannot insert D_TAG classifier entry!\n");
-            return;        
-        case DSCP_CLSFR:
-            if (nParms != 3)
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"DSCP_CLSFR Entry type, wrong number of parameters(too many?)\n");
-                return;
-            }
-            newUserTableEntry.Dscp.CodePoint = (U8) parm[2].value;
-            os_error_printf(CU_MSG_INFO2, (PS8)"Inserting new DSCP_CLSFR classifier entry\nD-Tag = %d\nCodePoint = %d\n",newUserTableEntry.DTag,newUserTableEntry.Dscp.CodePoint);
-            break;
-        case PORT_CLSFR:
-            if (nParms != 3)
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"PORT_CLSFR Entry type, wrong number of parameters(too many?)\n");
-                return;
-            }
-            newUserTableEntry.Dscp.DstPortNum = (U16) parm[2].value;
-            os_error_printf(CU_MSG_INFO2, (PS8)"Inserting new PORT_CLSFR classifier entry\nD-Tag = %d\nPort = %d\n",newUserTableEntry.DTag,newUserTableEntry.Dscp.DstPortNum);
-            break;
-        case IPPORT_CLSFR:
-            if (nParms != 7)
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"PORT_CLSFR Entry type, wrong number of parameters\n");
-                return;
-            }
-            newUserTableEntry.Dscp.DstIPPort.DstPortNum = (U16) parm[2].value;
-            newUserTableEntry.Dscp.DstIPPort.DstIPAddress = 0;
-            for(i=0; i<4; i++)
-            {
-                newUserTableEntry.Dscp.DstIPPort.DstIPAddress |= parm[i+3].value << i * 8;
-            }
-            os_error_printf(CU_MSG_INFO2, (PS8)"Inserting new IPPORT_CLSFR classifier entry\nD-Tag = %d\nPort = %d\nIP = %3d.%d.%d.%d\n",
-                newUserTableEntry.DTag,
-                newUserTableEntry.Dscp.DstIPPort.DstPortNum,
-                (S32)parm[3].value,(S32)parm[4].value,(S32)parm[5].value,(S32)parm[6].value);
-            break;
-        default:
-            os_error_printf(CU_MSG_INFO2, (PS8)"Unknown Classifier Type - Command aborted!\n");
-            return;
-    }
-
-    if(CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_CONFIG_TX_CLASS,
-        &newUserTableEntry, sizeof(clsfr_tableEntry_t)))
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Failed to insert new classifier entry...\n");
-    }
-}
-
-VOID CuCmd_RemoveClsfrEntry(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    clsfr_tableEntry_t newUserTableEntry;
-    S32 i;
-
-    if (nParms >=2)
-        newUserTableEntry.DTag = (U8) parm[1].value;
-
-    switch(parm[0].value)
-    {
-        case D_TAG_CLSFR:
-            os_error_printf(CU_MSG_INFO2, (PS8)"Cannot remove D_TAG classifier entry!\n");
-            return;
-        case DSCP_CLSFR:
-            if (nParms != 3)
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"DSCP_CLSFR Entry type, wrong number of parameters(too many?)\n");
-                return;
-            }
-            newUserTableEntry.Dscp.CodePoint = (U8) parm[2].value;
-            os_error_printf(CU_MSG_INFO2, (PS8)"Removing DSCP_CLSFR classifier entry\nD-Tag = %d\nCodePoint = %d\n",newUserTableEntry.DTag,newUserTableEntry.Dscp.CodePoint);
-        break;
-        case PORT_CLSFR:
-            if (nParms != 3)
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"PORT_CLSFR Entry type, wrong number of parameters(too many?)\n");
-                return;
-            }
-            newUserTableEntry.Dscp.DstPortNum = (U16) parm[2].value;
-            os_error_printf(CU_MSG_INFO2, (PS8)"Removing PORT_CLSFR classifier entry\nD-Tag = %d\nPort = %d\n",newUserTableEntry.DTag,newUserTableEntry.Dscp.DstPortNum);
-        break;
-        case IPPORT_CLSFR:
-            if (nParms != 7)
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"PORT_CLSFR Entry type, wrong number of parameters\n");
-                return;
-            }
-            newUserTableEntry.Dscp.DstIPPort.DstPortNum = (U16) parm[2].value;
-            newUserTableEntry.Dscp.DstIPPort.DstIPAddress = 0;
-            for(i=0; i<4; i++)
-                {
-                    newUserTableEntry.Dscp.DstIPPort.DstIPAddress |= parm[i+3].value << i * 8;
-                }
-            os_error_printf(CU_MSG_INFO2, (PS8)"Removing IPPORT_CLSFR classifier entry\nD-Tag = %d\nPort = %d\nIP = %3d.%d.%d.%d\n",
-                    newUserTableEntry.DTag,
-                    newUserTableEntry.Dscp.DstIPPort.DstPortNum,
-                    (S32)parm[3].value,(S32)parm[4].value,(S32)parm[5].value,(S32)parm[6].value);
-            break;
-        default:
-            os_error_printf(CU_MSG_INFO2, (PS8)"Unknown Classifier Type - Command aborted!\n");
-            return;
-        break;
-    }
-   
-    if(CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_REMOVE_CLSFR_ENTRY,
-        &newUserTableEntry, sizeof(clsfr_tableEntry_t)))
-    {
-       os_error_printf(CU_MSG_INFO2, (PS8)"Failed to remove classifier entry...\n");
-    }
-}
-
-
-VOID CuCmd_SetPsRxDelivery(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TPsRxStreaming tPsRxStreaming;
-
-    tPsRxStreaming.uTid          = parm[0].value;
-    tPsRxStreaming.uStreamPeriod = parm[1].value;
-    tPsRxStreaming.uTxTimeout    = parm[2].value;
-    tPsRxStreaming.bEnabled      = parm[3].value;
-
-    if (CuCommon_SetBuffer(pCuCmd->hCuCommon, QOS_MNGR_PS_RX_STREAMING,
-        &tPsRxStreaming, sizeof(TPsRxStreaming)) == OK)
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Sent PS Rx Delivery to driver...");
-    }
-    else
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Error: could not set PS Rx Delivery in driver...\n");
-    }
-    os_error_printf(CU_MSG_INFO2, 
-        (PS8)"TID = %d \n RxPeriod = %d \n TxTimeout = %d\n Enabled = %d\n", 
-        tPsRxStreaming.uTid,      
-        tPsRxStreaming.uStreamPeriod, 
-        tPsRxStreaming.uTxTimeout,
-        tPsRxStreaming.bEnabled);
-}
-
-
-VOID CuCmd_SetQosParams(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_QOS_PARAMS QosParams;
-
-    QosParams.acID=parm[0].value;
-    QosParams.MaxLifeTime=parm[1].value;
-    QosParams.PSDeliveryProtocol = parm[2].value;
-   
-    if (CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_SET_QOS_PARAMS,
-        &QosParams, sizeof(OS_802_11_QOS_PARAMS)) == OK)
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Sent QOS params to driver...\n AC Number=%d \n MaxLifeTime=%d \n PSDeliveryProtocol = %d\n", 
-            QosParams.acID,
-            QosParams.MaxLifeTime,
-            QosParams.PSDeliveryProtocol);
-   }
-   else
-   {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Error: could not set QOS params...\n");
-   }
-}
-
-VOID CuCmd_SetRxTimeOut(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_QOS_RX_TIMEOUT_PARAMS rxTimeOut;
-
-    rxTimeOut.psPoll = parm[0].value;
-    rxTimeOut.UPSD   = parm[1].value;
-
-    if (nParms != 2) 
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Please enter Rx Time Out:\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 0 - psPoll (0 - 65000)\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 1 - UPSD (1 - 65000)\n");
-    }
-    else
-    {
-        if(CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_SET_RX_TIMEOUT,
-            &rxTimeOut, sizeof(OS_802_11_QOS_RX_TIMEOUT_PARAMS)) == OK)
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"Sent QOS Rx TimeOut params to driver...\n PsPoll = %d\n UPSD = %d\n", 
-                rxTimeOut.psPoll,
-                rxTimeOut.UPSD);
-        }
-        else
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"Error: could not set Rx TimeOut..\n");
-        }
-    }
-}
-
-VOID CuCmd_RegisterEvents(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if( nParms )
-    {
-        U32 event; 
-        S32 res, i;
-        
-        event = (U32)parm[0].value;
-
-        CU_CMD_FIND_NAME_ARRAY(i, event_type, event);
-        if(i == SIZE_ARR(event_type))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_RegisterEvents, event %d is not defined!\n", event);
-            return;
-        }
-
-        res = IpcEvent_EnableEvent(pCuCmd->hIpcEvent, event);       
-        if (res == EOALERR_IPC_EVENT_ERROR_EVENT_ALREADY_ENABLED)
-        {
-            CU_CMD_FIND_NAME_ARRAY(i, event_type, event);
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_RegisterEvents, event %s is already enabled!\n", event_type[i].name);
-            return;
-        }
-
-    }
-    else
-    {
-        print_available_values(event_type);
-    }   
-}
-
-VOID CuCmd_UnregisterEvents(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if( nParms )
-    {
-        U32 event; 
-        S32 res, i;
-        
-        event = (U32)parm[0].value;
-
-        CU_CMD_FIND_NAME_ARRAY(i, event_type, event);
-        if(i == SIZE_ARR(event_type))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_RegisterEvents, event %d is not defined!\n", event);
-            return;
-        }
-
-        res = IpcEvent_DisableEvent(pCuCmd->hIpcEvent, event);      
-        if (res == EOALERR_IPC_EVENT_ERROR_EVENT_ALREADY_DISABLED)
-        {
-            CU_CMD_FIND_NAME_ARRAY(i, event_type, event);
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_RegisterEvents, event %s is already disabled!\n", event_type[i].name);
-            return;
-        }
-
-    }
-    else
-    {
-        print_available_values(event_type);
-    }   
-}
-
-VOID CuCmd_EnableBtCoe(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    ESoftGeminiEnableModes BtMode;
-    S32 i;
-
-    named_value_t BtCoe_Mode[] =
-    {
-        { SG_DISABLE,       (PS8)"Disable" },
-        { SG_PROTECTIVE,    (PS8)"Protective" },
-        { SG_OPPORTUNISTIC, (PS8)"Opportunistic" },
-    };
-    
-
-    if(nParms)
-    {
-        CU_CMD_FIND_NAME_ARRAY(i, BtCoe_Mode, parm[0].value);
-        if(i == SIZE_ARR(BtCoe_Mode))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_EnableBtCoe, mode %d is not defined!\n", parm[0].value);
-            return;
-        }
-        BtMode = parm[0].value;
-        CuCommon_SetU32(pCuCmd->hCuCommon, SOFT_GEMINI_SET_ENABLE, BtMode);
-    }
-    else
-    {
-        print_available_values(BtCoe_Mode);
-    }
-}
-
-VOID CuCmd_ConfigBtCoe(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 Values[NUM_OF_CONFIG_PARAMS_IN_SG];
-    U8 Index;
-
-    if( nParms != NUM_OF_CONFIG_PARAMS_IN_SG )
-    {
-		os_error_printf(CU_MSG_INFO2, (PS8)"Please enter <index (0,1..)> <value> \n");
-
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 0  - coexBtPerThreshold (0 - 10000000) PER threshold in PPM of the BT voice \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 1  - coexAutoScanCompensationMaxTime (0 - 10000000 usec)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 2  - coexBtNfsSampleInterval (1 - 65000 msec)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 3  - coexBtLoadRatio (0 - 100 %)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 4  - coexAutoPsMode (0 = Disabled, 1 = Enabled) Auto Power Save \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 5  - coexHv3AutoScanEnlargedNumOfProbeReqPercent (%)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 6  - coexHv3AutoScanEnlargedScanWinodowPercent (%)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 7  - coexAntennaConfiguration (0 = Single, 1 = Dual)\n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 8  - coexMaxConsecutiveBeaconMissPrecent (1 - 100 %) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 9  - coexAPRateAdapationThr - rates (1 - 54)\n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 10 - coexAPRateAdapationSnr 	  (-128 - 127)\n");
-
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 11 - coexWlanPsBtAclMasterMinBR      (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 12 - coexWlanPsBtAclMasterMaxBR      (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 13 - coexWlanPsMaxBtAclMasterBR      (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 14 - coexWlanPsBtAclSlaveMinBR   	   (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 15 - coexWlanPsBtAclSlaveMaxBR  	   (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 16 - coexWlanPsMaxBtAclSlaveBR       (msec) \n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 17 - coexWlanPsBtAclMasterMinEDR     (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 18 - coexWlanPsBtAclMasterMaxEDR     (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 19 - coexWlanPsMaxBtAclMasterEDR     (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 20 - coexWlanPsBtAclSlaveMinEDR      (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 21 - coexWlanPsBtAclSlaveMaxEDR  	   (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 22 - coexWlanPsMaxBtAclSlaveEDR      (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 23 - coexRxt                    (usec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 24 - coexTxt                    (usec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 25 - coexAdaptiveRxtTxt    	  (0 = Disable, 1 = Enable) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 26 - coexPsPollTimeout          (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 27 - coexUpsdTimeout       	  (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 28 - coexWlanActiveBtAclMasterMinEDR (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 29 - coexWlanActiveBtAclMasterMaxEDR (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 30 - coexWlanActiveMaxBtAclMasterEDR (msec) \n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 31 - coexWlanActiveBtAclSlaveMinEDR  (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 32 - coexWlanActiveBtAclSlaveMaxEDR  (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 33 - coexWlanActiveMaxBtAclSlaveEDR  (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 34 - coexWlanActiveBtAclMinBR        (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 35 - coexWlanActiveBtAclMaxBR        (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 36 - coexWlanActiveMaxBtAclBR        (msec) \n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 37 - coexHv3AutoEnlargePassiveScanWindowPercent \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 38 - coexA2DPAutoEnlargePassiveScanWindowPercent \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 39 - coexPassiveScanBtTime (msec) \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 40 - coexPassiveScanWlanTime (msec)\n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 41 - coexTempParam5 \n");
-
-		return;
-    }
-    if ((parm[0].value == SOFT_GEMINI_RATE_ADAPT_THRESH) && (CuCmd_IsValueRate(parm[1].value) == FALSE))
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Invalid rate - PHY rate valid values are: 1,2,5,6,9,11,12,18,24,36,48,54\n");
-    }
-    else
-    {
-        for (Index = 0; Index < NUM_OF_CONFIG_PARAMS_IN_SG; Index++ )
-        {
-            Values[Index] = parm[Index].value;
-/* value[0] - parmater index, value[1] - parameter value */
-        }
-        CuCommon_SetBuffer(pCuCmd->hCuCommon, SOFT_GEMINI_SET_CONFIG, Values, sizeof(Values));
-    }
-}
-
-VOID CuCmd_GetBtCoeStatus(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 uDummyBuf;
-
-    if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, SOFT_GEMINI_GET_CONFIG,
-            &uDummyBuf, sizeof(U32)))
-    {
-        return;
-    }
-}
-
-VOID CuCmd_ConfigCoexActivity(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TCoexActivity tCoexActivity;
-
-    if( nParms != NUM_OF_COEX_ACTIVITY_PARAMS_IN_SG )
-    {
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 1 - coexIp          (0 - 1) BT-0, WLAN-1 \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 2 - activityId      (0 - 24)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 3 - defaultPriority (0 - 255)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 4 - raisedPriority  (0 - 255)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 5 - minService      (0 - 65535)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 6 - maxService      (0 - 65535)  \n");
-    }
-    else
-    {
-        tCoexActivity.coexIp          = (U8)parm[0].value;
-        tCoexActivity.activityId      = (U8)parm[1].value;
-        tCoexActivity.defaultPriority = (U8)parm[2].value;
-        tCoexActivity.raisedPriority  = (U8)parm[3].value;
-        tCoexActivity.minService      = (U16)parm[4].value;
-        tCoexActivity.maxService      = (U16)parm[5].value;
-
-        CuCommon_SetBuffer(pCuCmd->hCuCommon, TWD_COEX_ACTIVITY_PARAM,
-        &tCoexActivity, sizeof(tCoexActivity));
-    }
-}
-
-VOID CuCmd_ConfigFmCoex(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TFmCoexParams tFmCoexParams;
-
-    if (nParms != 10)
-    {
-		os_error_printf(CU_MSG_INFO2, (PS8)"1 - Enable                   (0 - 1)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"2 - SwallowPeriod            (0 - 255)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"3 - NDividerFrefSet1         (0 - 255)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"4 - NDividerFrefSet2         (0 - 255)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"5 - MDividerFrefSet1         (0 - 65535)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"6 - MDividerFrefSet2         (0 - 65535)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"7 - CoexPllStabilizationTime (0 - 4294967295)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"8 - LdoStabilizationTime     (0 - 65535)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"9 - FmDisturbedBandMargin    (0 - 255)  \n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"10- SwallowClkDif            (0 - 255)  \n");
-    }
-    else
-    {
-        tFmCoexParams.uEnable                    = (TI_UINT8)parm[0].value;
-        tFmCoexParams.uSwallowPeriod             = (TI_UINT8)parm[1].value;
-        tFmCoexParams.uNDividerFrefSet1          = (TI_UINT8)parm[2].value;
-        tFmCoexParams.uNDividerFrefSet2          = (TI_UINT8)parm[3].value;
-        tFmCoexParams.uMDividerFrefSet1          = (TI_UINT16)parm[4].value;
-        tFmCoexParams.uMDividerFrefSet2          = (TI_UINT16)parm[5].value;
-        tFmCoexParams.uCoexPllStabilizationTime  = parm[6].value;
-        tFmCoexParams.uLdoStabilizationTime      = (TI_UINT16)parm[7].value;
-        tFmCoexParams.uFmDisturbedBandMargin     = (TI_UINT8)parm[8].value;
-        tFmCoexParams.uSwallowClkDif             = (TI_UINT8)parm[9].value;
-
-        CuCommon_SetBuffer(pCuCmd->hCuCommon, TWD_FM_COEX_PARAM, &tFmCoexParams, sizeof(TFmCoexParams));
-    }
-}
-
-VOID CuCmd_SetPowerMode(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TPowerMgr_PowerMode Mode;
-    S32 i;
-    
-    if( nParms )
-    {
-        CU_CMD_FIND_NAME_ARRAY(i, power_mode_val, parm[0].value);
-        if(i == SIZE_ARR(power_mode_val))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_SetPowerMode, mode %d is not defined!\n", parm[0].value);
-            return;
-        }
-        Mode.PowerMode = parm[0].value;
-        Mode.PowerMngPriority = POWER_MANAGER_USER_PRIORITY;
-        CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_POWER_MODE_SET,
-            &Mode, sizeof(TPowerMgr_PowerMode));
-    }
-    else
-    {
-        if(!CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_POWER_MODE_GET, &Mode, sizeof(TPowerMgr_PowerMode)))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"Power mode: %d\n", Mode.PowerMode);
-            print_available_values(power_mode_val);
-        }
-    }
-}
-
-VOID CuCmd_SetPowerSavePowerLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 PowerSavePowerLevel;
-    S32 i;
-    
-    if( nParms )
-    {
-        CU_CMD_FIND_NAME_ARRAY(i, power_level, parm[0].value);
-        if(i == SIZE_ARR(power_level))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_SetPowerSavePowerLevel, level %d is not defined!\n", parm[0].value);
-            return;
-        }
-        PowerSavePowerLevel = parm[0].value;
-        CuCommon_SetU32(pCuCmd->hCuCommon, TIWLN_802_11_POWER_LEVEL_PS_SET, PowerSavePowerLevel);
-    }
-    else
-    {
-        if(!CuCommon_GetU32(pCuCmd->hCuCommon, TIWLN_802_11_POWER_LEVEL_PS_GET, &PowerSavePowerLevel))
-        {
-            CU_CMD_FIND_NAME_ARRAY(i, power_level, PowerSavePowerLevel);
-            os_error_printf(CU_MSG_INFO2, (PS8)"Power Level PowerSave is: %s\n", power_level[i].name);
-            print_available_values(power_level);
-        }
-    }
-}
-
-VOID CuCmd_SetDefaultPowerLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 DefaultPowerLevel;
-    S32 i;
-    
-    if( nParms )
-    {
-        CU_CMD_FIND_NAME_ARRAY(i, power_level, parm[0].value);
-        if(i == SIZE_ARR(power_level))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_SetDefaultPowerLevel, level %d is not defined!\n", parm[0].value);
-            return;
-        }
-        DefaultPowerLevel = parm[0].value;
-        CuCommon_SetU32(pCuCmd->hCuCommon, TIWLN_802_11_POWER_LEVEL_DEFAULT_SET, DefaultPowerLevel);
-    }
-    else
-    {
-        if(!CuCommon_GetU32(pCuCmd->hCuCommon, TIWLN_802_11_POWER_LEVEL_DEFAULT_GET, &DefaultPowerLevel))
-        {
-            CU_CMD_FIND_NAME_ARRAY(i, power_level, DefaultPowerLevel);
-            os_error_printf(CU_MSG_INFO2, (PS8)"Power Level Default is: %s\n", power_level[i].name);
-            print_available_values(power_level);
-        }        
-    }
-}
-
-VOID CuCmd_SetDozeModeInAutoPowerLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 DozeModeInAutoPowerLevel;
-    S32 i;
-    
-    if( nParms )
-    {
-        DozeModeInAutoPowerLevel = parm[0].value;
-        
-        if((DozeModeInAutoPowerLevel > AUTO_POWER_MODE_DOZE_MODE_MAX_VALUE) || (DozeModeInAutoPowerLevel < AUTO_POWER_MODE_DOZE_MODE_MIN_VALUE))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_SetDozeModeInAutoPowerLevel, level %d is not defined!\n", DozeModeInAutoPowerLevel);
-            return;
-        }       
-        CuCommon_SetU32(pCuCmd->hCuCommon, TIWLN_802_11_POWER_LEVEL_DOZE_MODE_SET, DozeModeInAutoPowerLevel);
-    }
-    else
-    {
-        /* set Short or Long Doze. no use of other parameters */
-        if(!CuCommon_GetU32(pCuCmd->hCuCommon, TIWLN_802_11_POWER_LEVEL_DOZE_MODE_GET, &DozeModeInAutoPowerLevel))
-        {            
-            CU_CMD_FIND_NAME_ARRAY(i, power_mode_val, DozeModeInAutoPowerLevel);
-            os_error_printf(CU_MSG_INFO2, (PS8)"Doze power level in auto mode is: %s\n", power_mode_val[i].name);           
-        }
-    }
-}
-
-VOID CuCmd_SetTrafficIntensityTh(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS TrafficIntensityTh;
-
-    if (nParms == 3)
-    {
-        TrafficIntensityTh.uHighThreshold = parm[0].value;
-        TrafficIntensityTh.uLowThreshold = parm[1].value;
-        TrafficIntensityTh.TestInterval = parm[2].value;
-   
-        if (TrafficIntensityTh.uLowThreshold >= TrafficIntensityTh.uHighThreshold)
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"Error - CuCmd_SetTrafficIntensityTh - low threshold equal or greater than the high threshold...aborting...\n");
-        }
-   
-        if(OK == CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_SET_TRAFFIC_INTENSITY_THRESHOLDS, 
-            &TrafficIntensityTh, sizeof(OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS)))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"Successfully set traffic intensity thresholds...\n");
-        }
-        else
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"Error - CuCmd_SetTrafficIntensityTh - cannot set thresholds\n");
-        }
-    }
-    else if (nParms == 0)
-    {
-        if(OK == CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_GET_TRAFFIC_INTENSITY_THRESHOLDS, 
-            &TrafficIntensityTh, sizeof(OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS)))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"Traffic intensity thresholds :\n HighThreshold = %d\n LowThreshold = %d\n TestInterval = %d\n",
-                  TrafficIntensityTh.uHighThreshold,
-                  TrafficIntensityTh.uLowThreshold,
-                  TrafficIntensityTh.TestInterval);
-        }
-        else
-        {
-            os_error_printf (CU_MSG_ERROR, (PS8)"Error - CuCmd_SetTrafficIntensityTh - cannot get thresholds\n");
-        }
-    }
-}
-
-VOID CuCmd_EnableTrafficEvents(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    if(OK != CuCommon_SetU32(pCuCmd->hCuCommon, TIWLN_802_11_TOGGLE_TRAFFIC_INTENSITY_EVENTS, TRUE) ) return;
-    os_error_printf(CU_MSG_INFO2, (PS8)"Traffic intensity thresholds enabled...\n");
-}
-
-VOID CuCmd_DisableTrafficEvents(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    if(OK != CuCommon_SetU32(pCuCmd->hCuCommon, TIWLN_802_11_TOGGLE_TRAFFIC_INTENSITY_EVENTS, FALSE) ) return;
-    os_error_printf(CU_MSG_INFO2, (PS8)"Traffic intensity thresholds disabled...\n");
-}
-
-VOID CuCmd_SetDcoItrimParams(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    DcoItrimParams_t dcoItrimParams;
-
-    if (nParms == 0)
-    {
-        if (OK == CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_DCO_ITRIM_PARAMS, &dcoItrimParams, sizeof(DcoItrimParams_t)))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"DCO Itrim Params :\n enable = %d\n moderationTimeoutUsec = %d\n",
-                            dcoItrimParams.enable, dcoItrimParams.moderationTimeoutUsec);
-        }
-        else
-        {
-            os_error_printf (CU_MSG_ERROR, (PS8)"Error - CuCmd_SetDcoItrimParams - cannot get DCO Itrim Params\n");
-        }
-    }
-
-    else
-    {      
-        dcoItrimParams.enable = (Bool_e)parm[0].value;
-        dcoItrimParams.moderationTimeoutUsec = parm[1].value;
-
-        if (OK == CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_DCO_ITRIM_PARAMS, &dcoItrimParams, sizeof(DcoItrimParams_t)))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"Successfully set DCO Itrim Params...\n");
-        }
-        else
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"Error - CuCmd_SetDcoItrimParams - cannot set DCO Itrim Params\n");
-        }
-    }
-}
-
-VOID CuCmd_LogAddReport(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U8 ModuleTable[REPORT_FILES_NUM], ModuleValue[REPORT_FILES_NUM] = {0};
-    int index = 0;
-
-    os_memcpy((THandle)ModuleValue, (THandle)(parm[0].value), nParms);
-
-    for (index = 0; index < REPORT_FILES_NUM; index ++)
-    {
-        if (ModuleValue[index] == '1')
-        {
-            ModuleTable[index] = '1';
-        } 
-        else
-        {
-            ModuleTable[index] = '0';
-        }
-    }
-    CuCommon_SetBuffer(pCuCmd->hCuCommon, REPORT_MODULE_TABLE_PARAM, ModuleTable, REPORT_FILES_NUM);
-}
-
-VOID CuCmd_LogReportSeverityLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U8 SeverityTable[REPORT_SEVERITY_MAX];
-    S32 index = 0;
-    PS8 SeverityValue = (PS8)(parm[0].value);
-
-    /* Get the current report severity */
-    if (!CuCommon_GetBuffer(pCuCmd->hCuCommon, REPORT_SEVERITY_TABLE_PARAM, SeverityTable, REPORT_SEVERITY_MAX))    
-    {
-        if(nParms == 0)
-        {            
-            S32 i;
-
-            os_error_printf(CU_MSG_INFO2, (PS8)"Severity:\n");
-            os_error_printf(CU_MSG_INFO2, (PS8)"-------------------------------\n");
-            os_error_printf(CU_MSG_INFO2, (PS8)"%14s\tState\t%s\n", (PS8)"Severity level", (PS8)"Desc");
-
-            for( i=1; i<SIZE_ARR(report_severity); i++ )
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"%d\t%c\t%s\n", report_severity[i].value, (SeverityTable[i] == '1') ? '+' : ' ', report_severity[i].name );
-            }
-
-            os_error_printf(CU_MSG_INFO2, (PS8)"* Use '0' to clear all table.\n");
-            os_error_printf(CU_MSG_INFO2, (PS8)"* Use '%d' (max index) to set all table.\n", REPORT_SEVERITY_MAX);            
-        }
-        else
-        {
-            for (index = 0; index < REPORT_SEVERITY_MAX; index ++)
-            {
-                if (SeverityValue[index] == '0')
-                {
-                    SeverityTable[index] = '0';
-                } 
-                else
-                {
-                    SeverityTable[index] = '1';
-                }
-            }
-            CuCommon_SetBuffer(pCuCmd->hCuCommon, REPORT_SEVERITY_TABLE_PARAM, SeverityTable, REPORT_SEVERITY_MAX);
-        }
-    }
-    else
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Error retriving the severity table from the driver\n");
-    }
-}
-
-VOID CuCmd_SetReport(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U8 *pModuleTable = (U8 *)parm[0].value;
-
-    if( nParms != 1)
-    {
-        U8 ModuleTable[REPORT_FILES_NUM];
-        S32 i;
-    
-        if (!CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_REPORT_MODULE_GET, ModuleTable, REPORT_FILES_NUM))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"-------------------------------\n");
-            os_error_printf(CU_MSG_INFO2, (PS8)"%.5s\tState\t %s\n", (PS8)"Index", (PS8)"Desc");
-        
-            for( i = 0; i < SIZE_ARR(report_module); i++)
-            {
-                /* Check if there is string content (the first character is not ZERO) */
-                if( report_module[i].name[0] )
-                {
-                    U8 module_num = (U8) report_module[i].value;
-                    os_error_printf(CU_MSG_INFO2, (PS8)"%3d\t%c\t%s\n", 
-                         module_num, 
-                         (ModuleTable[module_num] == '1') ? '+' : ' ', 
-                         report_module[i].name );
-                }
-            }
-        }
-        else
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"Error reading the report table form the driver\n");
-        }
-    }
-    else
-    {
-        CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_REPORT_MODULE_SET, pModuleTable, REPORT_FILES_NUM);
-    }
-}
-
-VOID CuCmd_AddReport(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U8 ModuleTable[REPORT_FILES_NUM];
-    
-    if( nParms != 1)
-    {       
-        S32 i;    
-        if (!CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_REPORT_MODULE_GET, ModuleTable, REPORT_FILES_NUM))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"-------------------------------\n");
-            os_error_printf(CU_MSG_INFO2, (PS8)"%.5s\tState\t %s\n", (PS8)"Index", (PS8)"Desc");
-        
-            for( i = 0; i < SIZE_ARR(report_module); i++)
-            {
-                /* Check if there is string content (the first character is not ZERO) */
-                if( report_module[i].name[0] )
-                {
-                    os_error_printf(CU_MSG_INFO2, (PS8)"%3d\t%c\t%s\n", report_module[i].value, (ModuleTable[i] == '1') ? '+' : ' ', report_module[i].name );
-                }
-            }
-        }
-        else
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"Error reading the report table form the driver\n");
-        }        
-        os_error_printf(CU_MSG_INFO2, (PS8)"* Use '%d' (max index) to set all table.\n", REPORT_FILES_NUM);
-    }
-    else if(!CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_REPORT_MODULE_GET, ModuleTable, REPORT_FILES_NUM))
-    {
-        if (parm[0].value == REPORT_FILES_NUM)
-        {
-            os_memset(ModuleTable, '1', REPORT_FILES_NUM);
-        }
-        else if(parm[0].value < REPORT_FILES_NUM)
-        {
-            ModuleTable[parm[0].value] = '1';
-        }
-        CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_REPORT_MODULE_SET, ModuleTable, REPORT_FILES_NUM);
-    }
-}
-
-VOID CuCmd_ClearReport(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U8 ModuleTable[REPORT_FILES_NUM];
-    
-    if( nParms != 1)
-    {
-        S32 i;    
-        if (!CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_REPORT_MODULE_GET, ModuleTable, REPORT_FILES_NUM))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"-------------------------------\n");
-            os_error_printf(CU_MSG_INFO2, (PS8)"%.5s\tState\t %s\n", (PS8)"Index", (PS8)"Desc");
-        
-            for( i = 0; i < SIZE_ARR(report_module); i++)
-            {
-                /* Check if there is string content (the first character is not ZERO) */
-                if( report_module[i].name[0] )
-                {
-                    os_error_printf(CU_MSG_INFO2, (PS8)"%3d\t%c\t%s\n", report_module[i].value, (ModuleTable[i] == '1') ? '+' : ' ', report_module[i].name );
-                }
-            }
-        }
-        else
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"Error reading the report table form the driver\n");
-        }        
-        os_error_printf(CU_MSG_INFO2, (PS8)"* Use '%d' (max index) to clear all table.\n", REPORT_FILES_NUM);
-    }
-    else if(!CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_REPORT_MODULE_GET, ModuleTable, REPORT_FILES_NUM))
-    {
-        if (parm[0].value == REPORT_FILES_NUM)
-        {
-            os_memset(ModuleTable, '0', REPORT_FILES_NUM);
-        }
-        else if(parm[0].value < REPORT_FILES_NUM)
-        {
-            ModuleTable[parm[0].value] = '0';
-        }
-        CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_REPORT_MODULE_SET, ModuleTable, REPORT_FILES_NUM);
-    }
-}
-
-VOID CuCmd_ReportSeverityLevel(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U8 SeverityTable[REPORT_SEVERITY_MAX];
-
-    /* Get the current report severity */
-    if (!CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_REPORT_SEVERITY_GET, SeverityTable, REPORT_SEVERITY_MAX))    
-    {
-        if(nParms == 0)
-        {            
-            S32 i;
-
-            os_error_printf(CU_MSG_INFO2, (PS8)"Severity:\n");
-            os_error_printf(CU_MSG_INFO2, (PS8)"-------------------------------\n");
-            os_error_printf(CU_MSG_INFO2, (PS8)"%14s\tState\t%s\n", (PS8)"Severity level", (PS8)"Desc");
-
-            for( i=1; i<SIZE_ARR(report_severity); i++ )
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"%d\t%c\t%s\n", report_severity[i].value, (SeverityTable[i] == '1') ? '+' : ' ', report_severity[i].name );
-            }
-
-            os_error_printf(CU_MSG_INFO2, (PS8)"* Use '0' to clear all table.\n");
-            os_error_printf(CU_MSG_INFO2, (PS8)"* Use '%d' (max index) to set all table.\n", REPORT_SEVERITY_MAX);            
-        }
-        else
-        {
-            if (parm[0].value == 0)
-            {
-                /* Disable all severity levels */
-                os_memset(SeverityTable, '0', sizeof(SeverityTable));
-                CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_REPORT_SEVERITY_SET, SeverityTable, REPORT_SEVERITY_MAX);
-            }
-            else if (parm[0].value == REPORT_SEVERITY_MAX)
-            {
-                /* Enable all severity levels */
-                os_memset(SeverityTable, '1', sizeof(SeverityTable));
-                CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_REPORT_SEVERITY_SET, SeverityTable, REPORT_SEVERITY_MAX);
-            }
-            else if (parm[0].value < REPORT_SEVERITY_MAX)
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"Toggle severity level %#lx\n", parm[0].value);
-                if (SeverityTable[parm[0].value] == '1')
-                {
-                    /* The level is enabled - Disable it */
-                    SeverityTable[parm[0].value] = '0';
-                }
-                else
-                {
-                    /* The bit is disabled - Enable it */
-                    SeverityTable[parm[0].value] = '1';
-                }                    
-                CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_REPORT_SEVERITY_SET, SeverityTable, REPORT_SEVERITY_MAX);
-            }
-            else
-            {
-                os_error_printf(CU_MSG_INFO2, (PS8)"invalid level value: %#lx\n", parm[0].value );
-            }
-        }
-    }
-    else
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Error retriving the severity table from the driver\n");
-    }
-}
-
-VOID CuCmd_SetReportLevelCLI(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-#if 0 /* need to create debug logic for CLI */
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    S32 i, cli_debug_level;
-
-    if(nParms)
-    {
-        cli_debug_level = parm[0].value;
-        /* check if the param is valid */
-        CU_CMD_FIND_NAME_ARRAY(i, cli_level_type, cli_debug_level);
-        if(i == SIZE_ARR(cli_level_type))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_SetReportLevelCLI, cli_debug_level %d is not defined!\n", cli_debug_level);
-            return;
-        }
-
-        g_debug_level = cli_debug_level;
-        IpcEvent_UpdateDebugLevel(pCuCmd->hIpcEvent, cli_debug_level);
-        os_error_printf(CU_MSG_INFO2, (PS8)"set CLI debug value = %s \n", cli_level_type[i].name);   
-    }
-    else
-    {
-        cli_debug_level = g_debug_level;
-        CU_CMD_FIND_NAME_ARRAY(i, cli_level_type, cli_debug_level);
-        os_error_printf(CU_MSG_INFO2, (PS8)"CLI debug value = %s (%d)\n", cli_level_type[i].name, cli_debug_level);
-        print_available_values(cli_level_type);     
-    }
-#endif
-}
-
-
-char* SkipSpaces(char* str)
-{
-	char* tmp = str;
-
-	while(*tmp == ' ') tmp++;
-	return tmp;
-}
-
-#define ti_isdigit(c)      ('0' <= (c) && (c) <= '9')
-#define ti_islower(c)      ('a' <= (c) && (c) <= 'z')
-#define ti_toupper(c)      (ti_islower(c) ? ((c) - 'a' + 'A') : (c))
-
-#define ti_isxdigit(c)   (('0' <= (c) && (c) <= '9') \
-                         || ('a' <= (c) && (c) <= 'f') \
-                         || ('A' <= (c) && (c) <= 'F'))
-
-#define ti_atol(x) strtoul(x, 0)
-
-
-unsigned long ti_strtoul(char *cp, char** endp, unsigned int base)
-{
-	unsigned long result = 0, value;
-	
-	if (!base) {
-		  base = 10;
-		  if (*cp == '0') {
-				  base = 8;
-				  cp++;
-				  if ((ti_toupper(*cp) == 'X') && ti_isxdigit(cp[1])) {
-						  cp++;
-						  base = 16;
-				  }
-		  }
-	} else if (base == 16) {
-		  if (cp[0] == '0' && ti_toupper(cp[1]) == 'X')
-				  cp += 2;
-	}
-	while (ti_isxdigit(*cp) &&
-			(value = ti_isdigit(*cp) ? *cp-'0' : ti_toupper(*cp)-'A'+10) < base) {
-			result = result*base + value;
-			 cp++;
-	}
-
-	if(endp)
-		*endp = (char *)cp;
-
-	return result;
-}
-
-
-VOID CuCmd_FwDebug(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-	CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-	U32 *buf_ptr, *pbuf;
-	char *pstr = (char *)parm[0].value;
-	U32 parm_length;
-
-	os_error_printf(CU_MSG_INFO2, (PS8)"FwDebug parm: %s\n", parm[0].value);
-
-	buf_ptr = (U32*)os_MemoryCAlloc(252, sizeof(U32));
-	if(!buf_ptr)
-		return;
-
-	pbuf = buf_ptr + 2;
-
-	pstr = SkipSpaces(pstr);
-	while(*pstr) {
-		*pbuf++ =  ti_strtoul(pstr, &pstr, 0);
-		pstr = SkipSpaces(pstr);
-	}
-
-	parm_length = (U32)((U8*)pbuf-(U8*)buf_ptr);
-
-	os_error_printf(CU_MSG_INFO2, (PS8)"Parms buf size = %d\n", parm_length);
-
-	*buf_ptr = 2210;
-	*(buf_ptr+1) = parm_length - 2*sizeof(U32);
-
-	CuCommon_PrintDriverDebug(pCuCmd->hCuCommon, (PVOID)buf_ptr, parm_length);
-
-	os_MemoryFree(buf_ptr);
-
-}
-
-VOID CuCmd_SetRateMngDebug(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    RateMangeParams_t     RateParams;
-
-	RateParams.paramIndex = (TI_UINT8)parm[0].value;
-
-
-    if( nParms == 2 )
-    {
-		switch (RateParams.paramIndex)
-		{
-		case RATE_MGMT_RETRY_SCORE_PARAM:
-			RateParams.RateRetryScore = (TI_UINT16)parm[1].value;
-			break;
-		case RATE_MGMT_PER_ADD_PARAM:
-			RateParams.PerAdd = (TI_UINT16)parm[1].value;
-			break;
-		case RATE_MGMT_PER_TH1_PARAM:
-			RateParams.PerTh1 = (TI_UINT16)parm[1].value;
-			break;
-		case RATE_MGMT_PER_TH2_PARAM:
-			RateParams.PerTh2 = (TI_UINT16)parm[1].value;
-			break;
-		case RATE_MGMT_MAX_PER_PARAM:
-			RateParams.MaxPer = (TI_UINT16)parm[1].value;
-			break;
-		case RATE_MGMT_INVERSE_CURIOSITY_FACTOR_PARAM:
-			RateParams.InverseCuriosityFactor = (TI_UINT8)parm[1].value;
-			break;
-		case RATE_MGMT_TX_FAIL_LOW_TH_PARAM:
-			RateParams.TxFailLowTh = (TI_UINT8)parm[1].value;
-			break;
-		case RATE_MGMT_TX_FAIL_HIGH_TH_PARAM:
-			RateParams.TxFailHighTh = (TI_UINT8)parm[1].value;
-			break;
-		case RATE_MGMT_PER_ALPHA_SHIFT_PARAM:
-			RateParams.PerAlphaShift = (TI_UINT8)parm[1].value;
-			break;
-		case RATE_MGMT_PER_ADD_SHIFT_PARAM:
-			RateParams.PerAddShift = (TI_UINT8)parm[1].value;
-			break;
-		case RATE_MGMT_PER_BETA1_SHIFT_PARAM:
-			RateParams.PerBeta1Shift = (TI_UINT8)parm[1].value;
-			break;
-		case RATE_MGMT_PER_BETA2_SHIFT_PARAM:
-			RateParams.PerBeta2Shift = (TI_UINT8)parm[1].value;
-			break;
-		case RATE_MGMT_RATE_CHECK_UP_PARAM:
-			RateParams.RateCheckUp = (TI_UINT8)parm[1].value;
-			break;
-		case RATE_MGMT_RATE_CHECK_DOWN_PARAM:
-			RateParams.RateCheckDown = (TI_UINT8)parm[1].value;
-			break;
-		default:
-			os_error_printf(CU_MSG_INFO2,"Error: index is not valid! \n");
-			return;
-
-		}
-	}
-	else if ((nParms == NUM_OF_RATE_MNGT_PARAMS_MAX) && (parm[0].value == RATE_MGMT_RATE_RETRY_POLICY_PARAM ))
-	{
-		int i=0;
-		for (i=1; i < NUM_OF_RATE_MNGT_PARAMS_MAX; i++)
-		{
-			RateParams.RateRetryPolicy[i-1] = (TI_UINT8)parm[i].value;
-		}
-    }
-    else
-    {
-           os_error_printf(CU_MSG_INFO2,"(0)  RateMngRateRetryScore \n");
-           os_error_printf(CU_MSG_INFO2,"(1)  RateMngPerAdd \n");
-           os_error_printf(CU_MSG_INFO2,"(2)  RateMngPerTh1 \n");
-           os_error_printf(CU_MSG_INFO2,"(3)  RateMngPerTh2 \n");
-		   os_error_printf(CU_MSG_INFO2,"(4)  RateMngMaxPer \n");
-           os_error_printf(CU_MSG_INFO2,"(5)  RateMngInverseCuriosityFactor \n");
-           os_error_printf(CU_MSG_INFO2,"(6)  RateMngTxFailLowTh \n");
-		   os_error_printf(CU_MSG_INFO2,"(7)  RateMngTxFailHighTh \n");
-           os_error_printf(CU_MSG_INFO2,"(8)  RateMngPerAlphaShift \n");
-           os_error_printf(CU_MSG_INFO2,"(9)  RateMngPerAddShift \n");
-           os_error_printf(CU_MSG_INFO2,"(10) RateMngPerBeta1Shift \n");
-           os_error_printf(CU_MSG_INFO2,"(11) RateMngPerBeta2Shift \n");
-           os_error_printf(CU_MSG_INFO2,"(12) RateMngRateCheckUp \n");
-		   os_error_printf(CU_MSG_INFO2,"(13) RateMngRateCheckDown \n");
-		   os_error_printf(CU_MSG_INFO2,"(14) RateMngRateRetryPolicy[13] \n");
-		   return;
-    }
-
-	CuCommon_SetBuffer(pCuCmd->hCuCommon, TIWLN_RATE_MNG_SET,&RateParams, sizeof(RateMangeParams_t));
-}
-
-VOID CuCmd_GetRateMngDebug(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    AcxRateMangeParams ReadRateParams;
-	int i;
-
-    os_memset(&ReadRateParams,0,sizeof(AcxRateMangeParams));
-
-    CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_RATE_MNG_GET, &ReadRateParams, sizeof(AcxRateMangeParams));
-
-	if (0 == nParms)
-	{
-		parm[0].value =  RATE_MGMT_ALL_PARAMS;
-	}
-
-	 switch (parm[0].value)
-		{
-		case RATE_MGMT_RETRY_SCORE_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngRateRetryScore = %d \n", ReadRateParams.RateRetryScore);
-			break;
-		case RATE_MGMT_PER_ADD_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngPerAdd = %d\n" , ReadRateParams.PerAdd);
-			break;
-		case RATE_MGMT_PER_TH1_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngPerTh1 = %d\n" , ReadRateParams.PerTh1);
-			break;
-		case RATE_MGMT_PER_TH2_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngPerTh2 = %d\n" , ReadRateParams.PerTh2);
-			break;
-		case RATE_MGMT_MAX_PER_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngMaxPer = %d\n" , ReadRateParams.MaxPer);
-			break;
-		case RATE_MGMT_INVERSE_CURIOSITY_FACTOR_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngInverseCuriosityFactor = %d \n" , ReadRateParams.InverseCuriosityFactor);
-			break;
-		case RATE_MGMT_TX_FAIL_LOW_TH_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngTxFailLowTh = %d\n" , ReadRateParams.TxFailLowTh);
-			break;
-		case RATE_MGMT_TX_FAIL_HIGH_TH_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngTxFailHighTh = %d\n" , ReadRateParams.TxFailHighTh);
-			break;
-		case RATE_MGMT_PER_ALPHA_SHIFT_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngPerAlphaShift = %d\n" , ReadRateParams.PerAlphaShift);
-			break;
-		case RATE_MGMT_PER_ADD_SHIFT_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngPerAddShift = %d\n" , ReadRateParams.PerAddShift);
-			break;
-		case RATE_MGMT_PER_BETA1_SHIFT_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngPerBeta1Shift = %d\n" , ReadRateParams.PerBeta1Shift);
-			break;
-		case RATE_MGMT_PER_BETA2_SHIFT_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngPerBeta2Shift = %d\n" , ReadRateParams.PerBeta2Shift);
-			break;
-		case RATE_MGMT_RATE_CHECK_UP_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngRateCheckUp = %d\n" , ReadRateParams.RateCheckUp);
-			break;
-		case RATE_MGMT_RATE_CHECK_DOWN_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngRateCheckDown = %d\n" , ReadRateParams.RateCheckDown);
-			break;
-	    case RATE_MGMT_RATE_RETRY_POLICY_PARAM:
-			os_error_printf(CU_MSG_INFO2,"RateMngRateRetryPolicy = ");
-
-			for (i=0 ; i< RATE_MNG_MAX_RETRY_POLICY_PARAMS_LEN ; i++)
-			{
-				os_error_printf(CU_MSG_INFO2,"%d ",ReadRateParams.RateRetryPolicy[i]);
-			}
-
-			os_error_printf(CU_MSG_INFO2,"\n");
-
-			break;
-
-	    case RATE_MGMT_ALL_PARAMS:
-		   os_error_printf(CU_MSG_INFO2,"RateMngRateRetryScore = %d \n", ReadRateParams.RateRetryScore);
-           os_error_printf(CU_MSG_INFO2,"RateMngPerAdd = %d\n" , ReadRateParams.PerAdd);
-           os_error_printf(CU_MSG_INFO2,"RateMngPerTh1 = %d\n" , ReadRateParams.PerTh1);
-           os_error_printf(CU_MSG_INFO2,"RateMngPerTh2 = %d\n" , ReadRateParams.PerTh2);
-		   os_error_printf(CU_MSG_INFO2,"RateMngMaxPer = %d\n" , ReadRateParams.MaxPer);
-           os_error_printf(CU_MSG_INFO2,"RateMngInverseCuriosityFactor = %d \n" , ReadRateParams.InverseCuriosityFactor);
-           os_error_printf(CU_MSG_INFO2,"RateMngTxFailLowTh = %d\n" , ReadRateParams.TxFailLowTh);
-		   os_error_printf(CU_MSG_INFO2,"RateMngTxFailHighTh = %d\n" , ReadRateParams.TxFailHighTh);
-           os_error_printf(CU_MSG_INFO2,"RateMngPerAlphaShift = %d\n" , ReadRateParams.PerAlphaShift);
-           os_error_printf(CU_MSG_INFO2,"RateMngPerAddShift = %d\n" , ReadRateParams.PerAddShift);
-           os_error_printf(CU_MSG_INFO2,"RateMngPerBeta1Shift = %d\n" , ReadRateParams.PerBeta1Shift);
-           os_error_printf(CU_MSG_INFO2,"RateMngPerBeta2Shift = %d\n" , ReadRateParams.PerBeta2Shift);
-           os_error_printf(CU_MSG_INFO2,"RateMngRateCheckUp = %d\n" , ReadRateParams.RateCheckUp);
-		   os_error_printf(CU_MSG_INFO2,"RateMngRateCheckDown = %d\n" , ReadRateParams.RateCheckDown);
-		   os_error_printf(CU_MSG_INFO2,"RateMngRateRetryPolicy = ");
-
-			for (i=0 ; i< RATE_MNG_MAX_RETRY_POLICY_PARAMS_LEN ; i++)
-			{
-				os_error_printf(CU_MSG_INFO2,"%d ",ReadRateParams.RateRetryPolicy[i]);
-			}
-			os_error_printf(CU_MSG_INFO2,"\n");
-		 break;
-
-		default:
-			os_error_printf(CU_MSG_INFO2,"Error: index is not valid! \n");
-			return;
-	 }
-
-}
-
-
-VOID CuCmd_PrintDriverDebug(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-	U32 size		= 0;
-	TTwdDebug data;
-
-	/* check if nParam is invalid */
-	if (( nParms == 0 ) || ( nParms > 4 ))
-	{
-		os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_PrintDriverDebug: Invalid number of Parameters %d\n", nParms);
-		return;
-	}
-
-	/* init */
-    os_memset( &data.debug_data.mem_debug.UBuf.buf8, 0, sizeof(data.debug_data.mem_debug.UBuf.buf8) );
-	data.func_id 						= parm[0].value;
-	size								= sizeof(data.func_id);
-
-	os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_PrintDriverDebug: FUN_ID: %u\n", data.func_id);
-
-	/* if R reg request - read data */
-    if ( nParms == 2 )
-	{
-        data.debug_data.opt_param = 4;
-		data.debug_data.opt_param = parm[1].value;
-		size += sizeof(data.debug_data.opt_param);
-	}
-    else
-	/* if W reg request - read data */
-	if ( nParms > 2 )
-	{
-        data.debug_data.mem_debug.addr 		= 0;
-
-        data.debug_data.mem_debug.length 	= 4;
-        size += sizeof(data.debug_data.mem_debug.length);
-
-        data.debug_data.mem_debug.addr = parm[1].value;
-        size += sizeof(data.debug_data.mem_debug.addr);
-
-        data.debug_data.mem_debug.UBuf.buf32[0] = parm[2].value;
-        size += sizeof(data.debug_data.mem_debug.UBuf.buf32[0]);
-
-		os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_PrintDriverDebug: addr: 0x%x\n", data.debug_data.opt_param);
-        os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_PrintDriverDebug: data: 0x%x\n", data.debug_data.mem_debug.UBuf.buf32[0]);
-	}
-	CuCommon_PrintDriverDebug(pCuCmd->hCuCommon, (PVOID)&data, size);
-}
-
-VOID CuCmd_PrintDriverDebugBuffer(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    U32 func_id = ( nParms > 0 ) ? parm[0].value : 0;
-    U32 opt_param = ( nParms > 1 ) ? parm[1].value : 0;
-    
-    os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_PrintDriverDebugBuffer: FUNC:%u, PARAM:%u\n", func_id, opt_param);
-
-    CuCommon_PrintDriverDebugBuffer(pCuCmd->hCuCommon, func_id, opt_param);
-}
-
-/*-------------------*/
-/* Radio Debug Tests */
-/*-------------------*/
-/* Set the RX channel --> Radio Tune */
-VOID CuCmd_RadioDebug_ChannelTune(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TPowerMgr_PowerMode Mode;
-    TTestCmd data;
-    
-    if ((nParms == 0) || (nParms > 2))
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 0 - Band (0-2.4Ghz, 1-5Ghz, 2-4.9Ghz)\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 1 - Channel\n");
-    }
-    else
-    {
-        if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, TIWLN_802_11_POWER_MODE_GET,
-            &Mode, sizeof(TPowerMgr_PowerMode))) return;    
-        if(Mode.PowerMode != OS_POWER_MODE_ACTIVE)
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"Radio tune was not performed becouse Default power-mode is not ACTIVE\n");
-        }
-        else
-        {
-			os_memset(&data, 0, sizeof(TTestCmd));
-			data.testCmdId 						= TEST_CMD_CHANNEL_TUNE;
-			data.testCmd_u.Channel.iChannel 	= (U8)parm[1].value;
-			data.testCmd_u.Channel.iBand 		= (U8)parm[0].value;
-
-			if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data))
-			{
-				os_error_printf(CU_MSG_INFO2, (PS8)"Channel %d tune failed\n",data.testCmd_u.Channel.iChannel);            
-				return;
-			}
-            os_error_printf(CU_MSG_INFO2, (PS8)"Channel tune of channel %d was performed OK\n",(U8)data.testCmd_u.Channel.iChannel);            
-        }
-    }
-}
-
-/* Start CW test (TELEC) */
-VOID CuCmd_RadioDebug_StartTxCw(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-	CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-	TTestCmd data;
-
-	/* check # of params OK */
-    if ((nParms == 0) || (nParms > 2))
-    {
-		/* print help */
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 0  - Power (0-25000 1/1000 db)\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 1  - Tone Type (1- Carrier Feed Through, 2- Single Tone)\n");
-
-/*        os_error_printf(CU_MSG_INFO2, (PS8)"Param 2  - Band\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 3  - Channel\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 4  - PPA Step\n");     
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 5  - Tone no. Single Tones\n");     
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 6  - Tone no. Two Tones\n");     
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 7  - Use digital DC\n");     
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 8  - Invert\n");     
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 9  - Eleven N Span\n");     
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 10 - Digital DC\n");     
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 11 - Analog DC Fine\n");     
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 12 - Analog DC Course\n");*/
-    }
-    else
-    {
-		os_memset(&data, 0, sizeof(TTestCmd));
-		data.testCmdId 										= TEST_CMD_TELEC;
-        data.testCmd_u.TxToneParams.iPower 					= (U16)parm[0].value;
-        data.testCmd_u.TxToneParams.iToneType 				= (U8)parm[1].value;
-/*		data.testCmd_u.TxToneParams.iPpaStep 				= (U8)parm[4].value;
-		data.testCmd_u.TxToneParams.iToneNumberSingleTones 	= (U8)parm[5].value;
-		data.testCmd_u.TxToneParams.iToneNumberTwoTones 	= (U8)parm[6].value;
-		data.testCmd_u.TxToneParams.iUseDigitalDC 			= (U8)parm[7].value;
-		data.testCmd_u.TxToneParams.iInvert 				= (U8)parm[8].value;
-		data.testCmd_u.TxToneParams.iElevenNSpan 			= (U8)parm[9].value;
-		data.testCmd_u.TxToneParams.iDigitalDC 				= (U8)parm[10].value;
-		data.testCmd_u.TxToneParams.iAnalogDCFine 			= (U8)parm[11].value;
-		data.testCmd_u.TxToneParams.iAnalogDCCoarse 		= (U8)parm[12].value;*/
-
-		if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data))
-		{
-			os_error_printf(CU_MSG_INFO2, (PS8)"CW test failed\n");                   
-			return;
-		}
-        os_error_printf(CU_MSG_INFO2, (PS8)"CW test was performed OK\n");                   
-    }
-}
-
-/* Start TX continues test (FCC) */
-VOID CuCmd_RadioDebug_StartContinuousTx(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    TMacAddr mac_addr_mask 	= { 0xff,0xff,0xff,0xff,0xff,0xff };
-	CuCmd_t* pCuCmd 		= (CuCmd_t*)hCuCmd;
-	TTestCmd data;
-
-    if ((nParms == 0) || (nParms > 15))
-    {
-		/* print help */
-        os_error_printf(CU_MSG_INFO2, (PS8)"\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 0 - Delay\n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 1 - Rate\n");		
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 2  - Size\n");		
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 3  - Amount\n");		
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 4  - Power\n");		
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 5  - Seed\n");		
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 6  - Packet Mode\n");		
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 7  - DCF On/Off\n");		
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 8  - GI\n");		
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 9  - Preamble\n");		
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 10 - Type\n");		
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 11 - Scrambler\n");		
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 12 - Enable CLPC\n");		
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 13 - Sequance no. Mode\n");		
-        /* future use. for now the oregenal source address are use.
-        os_error_printf(CU_MSG_INFO2, (PS8)"Param 14 - Source MAC Address\n");		
-        */
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 14 - Destination MAC Address\n");		
-    }
-    else
-    {
-		os_memset(&data, 0, sizeof(TTestCmd));
-		data.testCmdId = TEST_CMD_FCC;
-		data.testCmd_u.TxPacketParams.iDelay 			= (U32)parm[0].value;
-		data.testCmd_u.TxPacketParams.iRate 			= (U32)parm[1].value;
-		data.testCmd_u.TxPacketParams.iSize 			= (U16)parm[2].value;
-		data.testCmd_u.TxPacketParams.iAmount 			= (U16)parm[3].value;
-		data.testCmd_u.TxPacketParams.iPower 			= (U16)parm[4].value;
-		data.testCmd_u.TxPacketParams.iSeed 			= (U16)parm[5].value;
-		data.testCmd_u.TxPacketParams.iPacketMode 		= (U8)parm[6].value;
-		data.testCmd_u.TxPacketParams.iDcfOnOff 		= (U8)parm[7].value;
-		data.testCmd_u.TxPacketParams.iGI 				= (U8)parm[8].value;
-		data.testCmd_u.TxPacketParams.iPreamble 		= (U8)parm[9].value;
-		data.testCmd_u.TxPacketParams.iType 			= (U8)parm[10].value;
-		data.testCmd_u.TxPacketParams.iScrambler 		= (U8)parm[11].value;
-		data.testCmd_u.TxPacketParams.iEnableCLPC 		= (U8)parm[12].value;
-		data.testCmd_u.TxPacketParams.iSeqNumMode 		= (U8)parm[13].value;
-        /* future use. for now the oregenal source address are use.
-        if(!CuCmd_Str2MACAddr((PS8)parm[16].value, (PU8)mac_addr_mask) )
-		{
-			os_error_printf(CU_MSG_INFO2, (PS8)"Continuous Tx start has failed to read source MAC Address \n");
-			return;
-		}
-        */
-		os_memcpy((PVOID)data.testCmd_u.TxPacketParams.iSrcMacAddr, 
-				  (PVOID)mac_addr_mask, 
-				  sizeof(mac_addr_mask));
-		if(!CuCmd_Str2MACAddr((PS8)parm[14].value, (PU8)mac_addr_mask) )
-		{
-			os_error_printf(CU_MSG_INFO2, (PS8)"Continuous Tx start has failed to read destination MAC Address \n");
-			return;
-		}
-		os_memcpy((PVOID)data.testCmd_u.TxPacketParams.iDstMacAddr, 
-				  (PVOID)mac_addr_mask, 
-				  sizeof(mac_addr_mask));
-
-        if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data))
-		{
-			os_error_printf(CU_MSG_INFO2, (PS8)"Continuous Tx start has failed\n");
-			return;
-		}
-        os_error_printf(CU_MSG_INFO2, (PS8)"Continuous Tx started OK\n");
-   }
-}
-
-/* Stop FCC/TELEC (Radio Debug) */
-VOID CuCmd_RadioDebug_StopTx(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TTestCmd data;
-
-    os_memset(&data, 0, sizeof(TTestCmd));
-    data.testCmdId = TEST_CMD_STOP_TX;
-
-	if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data))
-	{
-        os_error_printf(CU_MSG_INFO2, (PS8)"Plt Tx Stop has failed\n");
-		return; 
-	}
-	os_error_printf(CU_MSG_INFO2, (PS8)"Plt Tx Stop was OK\n");
-}
-
-/* download packet template for transmissions 
-	the template shall be set before calling TX Debug */
-VOID CuCmd_RadioDebug_Template(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TTestCmd data;
-
-    if ((nParms == 0) || (nParms > 3))
-    {
-		/* print help */
-        os_error_printf(CU_MSG_INFO2, (PS8)"\n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 1 	- Buffer Offset\n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Param 2 	- Buffer Data\n");
-	}
-	else
-	{
-		os_memset(&data, 0, sizeof(TTestCmd));
-		data.testCmdId 									= TEST_CMD_PLT_TEMPLATE;
-		data.testCmd_u.TxTemplateParams.bufferOffset 	= (U16)parm[0].value;
-		data.testCmd_u.TxTemplateParams.bufferLength	= (U16)os_strlen((PS8)parm[1].value);
-		/* check that length is valid */
-		if( data.testCmd_u.TxTemplateParams.bufferOffset + data.testCmd_u.TxTemplateParams.bufferLength > TX_TEMPLATE_MAX_BUF_LEN )
-		{
-			os_error_printf(CU_MSG_INFO2, (PS8)"Plt Template has failed because of invalid buffer length\n");
-			return; 
-		}
-		/* convert the string to hexadeciaml values, and copy it */
-		CuCmd_atox_string ((U8*)parm[1].value,(U8*)data.testCmd_u.TxTemplateParams.buffer);
-
-		if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data))
-		{
-			os_error_printf(CU_MSG_INFO2, (PS8)"Plt Template has failed\n");
-			return; 
-		}
-		os_error_printf(CU_MSG_INFO2, (PS8)"Plt Template was OK\n");
-	}
-}
-
-
-/* Start RX Statistics */
-VOID CuCmd_RadioDebug_StartRxStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TTestCmd data;
-
-    os_memset(&data, 0, sizeof(TTestCmd));
-    data.testCmdId = TEST_CMD_RX_STAT_START;
-
-	if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data)) 
-    {
-		os_error_printf(CU_MSG_INFO2, (PS8)"Start RX Statistics has failed\n");   
-		return;
-    }
-	os_error_printf(CU_MSG_INFO2, (PS8)"Start RX Statistics OK\n");   
-}
-
-/* Stop RX Statistics */
-VOID CuCmd_RadioDebug_StopRxStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TTestCmd data;
-
-    os_memset(&data, 0, sizeof(TTestCmd));
-    data.testCmdId = TEST_CMD_RX_STAT_STOP;
-
-	if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data)) 
-    {
-		os_error_printf(CU_MSG_INFO2, (PS8)"Stop RX Statistics has failed\n");   
-		return;
-    }
-	os_error_printf(CU_MSG_INFO2, (PS8)"Stop RX Statistics OK\n");   
-}
-
-/* Reset RX Statistics */
-VOID CuCmd_RadioDebug_ResetRxStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TTestCmd data;
-
-    os_memset(&data, 0, sizeof(TTestCmd));
-    data.testCmdId = TEST_CMD_RX_STAT_RESET;
-
-	if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data)) 
-    {
-		os_error_printf(CU_MSG_INFO2, (PS8)"Reset RX Statistics has failed\n");   
-		return;
-    }
-	os_error_printf(CU_MSG_INFO2, (PS8)"Reset RX Statistics OK\n");   
-}
-
-
-/* Get HDK Version*/
-VOID CuCmd_RadioDebug_GetHDKVersion(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-	CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-	TTestCmd data;
-
-	os_memset(&data, 0, sizeof(TTestCmd));
-
-	data.testCmdId = TEST_CMD_GET_FW_VERSIONS;
-	if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data)) 
-	{
-		os_error_printf(CU_MSG_INFO2, (PS8)"Get FW version function has failed\n");   
-		return;
-	}
-	os_error_printf(CU_MSG_INFO2, (PS8)"ProductName:                       %d\n", data.testCmd_u.fwVersions.hdkVersion.ProductName);
-	os_error_printf(CU_MSG_INFO2, (PS8)"PgNumber:                          %d\n", data.testCmd_u.fwVersions.hdkVersion.PgNumber);
-	os_error_printf(CU_MSG_INFO2, (PS8)"SoftwareVersionLevel:              %d\n", data.testCmd_u.fwVersions.hdkVersion.SoftwareVersionLevel);
-	os_error_printf(CU_MSG_INFO2, (PS8)"radioModuleType:                   %d\n", data.testCmd_u.fwVersions.hdkVersion.radioModuleType);
-	os_error_printf(CU_MSG_INFO2, (PS8)"SoftwareVersionDelivery:           %d\n", data.testCmd_u.fwVersions.hdkVersion.SoftwareVersionDelivery);
-	os_error_printf(CU_MSG_INFO2, (PS8)"numberOfReferenceDesignsSupported: %d\n", data.testCmd_u.fwVersions.hdkVersion.numberOfReferenceDesignsSupported);
-#ifdef FIX_HDK_VERSION_API /* HDK version struct should be changed aligned and without pointer */
-	os_error_printf(CU_MSG_INFO2, (PS8)"referenceDesignsSupported->referenceDesignId: %d\n",    data.testCmd_u.fwVersions.hdkVersion.referenceDesignsSupported->referenceDesignId);
-	os_error_printf(CU_MSG_INFO2, (PS8)"referenceDesignsSupported->nvsMajorVersion: %d\n",      data.testCmd_u.fwVersions.hdkVersion.referenceDesignsSupported->nvsMajorVersion);
-	os_error_printf(CU_MSG_INFO2, (PS8)"referenceDesignsSupported->nvsMinorVersion: %d\n",      data.testCmd_u.fwVersions.hdkVersion.referenceDesignsSupported->nvsMinorVersion);
-	os_error_printf(CU_MSG_INFO2, (PS8)"referenceDesignsSupported->nvsMinorMinorVersion: %d\n", data.testCmd_u.fwVersions.hdkVersion.referenceDesignsSupported->nvsMinorMinorVersion);
-#endif
-}
-
-/* Get RX Statistics */
-VOID CuCmd_RadioDebug_GetRxStatistics(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-#if 0 /*Temp: currently not supported*/
-	U32 i 			= 0;
-#endif
-
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TTestCmd data;
-
-    os_memset(&data, 0, sizeof(TTestCmd));
-    data.testCmdId = TEST_CMD_RX_STAT_GET;
-
-	if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data)) 
-    {
-		os_error_printf(CU_MSG_INFO2, (PS8)"Get RX Statistics has failed\n");   
-		return;
-    }
-	/* print Statistics Got */
-	os_error_printf(CU_MSG_INFO2, (PS8)"\n");
-	os_error_printf(CU_MSG_INFO2, (PS8)"Received Valid Packet no.: %d(0x%x)\n", data.testCmd_u.Statistics.oRxPathStatistics.ReceivedValidPacketsNumber,data.testCmd_u.Statistics.oRxPathStatistics.ReceivedValidPacketsNumber);
-	os_error_printf(CU_MSG_INFO2, (PS8)"Received FCS Error Packet no.: %d(0x%x)\n", data.testCmd_u.Statistics.oRxPathStatistics.ReceivedFcsErrorPacketsNumber,data.testCmd_u.Statistics.oRxPathStatistics.ReceivedFcsErrorPacketsNumber);
-	os_error_printf(CU_MSG_INFO2, (PS8)"Received Address mismatched packet: %d(0x%x)\n", data.testCmd_u.Statistics.oRxPathStatistics.ReceivedPlcpErrorPacketsNumber,data.testCmd_u.Statistics.oRxPathStatistics.ReceivedPlcpErrorPacketsNumber);
-	os_error_printf(CU_MSG_INFO2, (PS8)"Sequance Nomber Missing Count: %d(0x%x)\n", data.testCmd_u.Statistics.oRxPathStatistics.SeqNumMissCount,data.testCmd_u.Statistics.oRxPathStatistics.SeqNumMissCount);
-	/* The RSSI and SNR are in octal units, the value divided by 8 for the print */  
-	os_error_printf(CU_MSG_INFO2, (PS8)"Average SNR: %d(0x%x)\n", data.testCmd_u.Statistics.oRxPathStatistics.AverageSnr/8,data.testCmd_u.Statistics.oRxPathStatistics.AverageSnr/8);
-	os_error_printf(CU_MSG_INFO2, (PS8)"Average RSSI: %d(0x%x)\n", (data.testCmd_u.Statistics.oRxPathStatistics.AverageRssi)/8,(data.testCmd_u.Statistics.oRxPathStatistics.AverageRssi)/8);
-	os_error_printf(CU_MSG_INFO2, (PS8)"Base Packet ID: %d(0x%x)\n", data.testCmd_u.Statistics.oBasePacketId,data.testCmd_u.Statistics.oBasePacketId);
-	os_error_printf(CU_MSG_INFO2, (PS8)"Number of Packets: %d(0x%x)\n", data.testCmd_u.Statistics.ioNumberOfPackets,data.testCmd_u.Statistics.ioNumberOfPackets);
-	os_error_printf(CU_MSG_INFO2, (PS8)"Number of Missed Packets: %d(0x%x)\n", data.testCmd_u.Statistics.oNumberOfMissedPackets,data.testCmd_u.Statistics.oNumberOfMissedPackets);
-#if 0/*Temp: currently not supported*/
-	for ( i = 0 ; i < RX_STAT_PACKETS_PER_MESSAGE ; i++ )
-	{ 
-		os_error_printf(CU_MSG_INFO2, (PS8)"RX Packet %d Statistics\n",i);
-		os_error_printf(CU_MSG_INFO2, (PS8)"Length: %d(0x%x)\n", data.testCmd_u.Statistics.RxPacketStatistics[i].Length,data.testCmd_u.Statistics.RxPacketStatistics[i].Length);
-		os_error_printf(CU_MSG_INFO2, (PS8)"EVM: %d(0x%x)\n", data.testCmd_u.Statistics.RxPacketStatistics[i].EVM,data.testCmd_u.Statistics.RxPacketStatistics[i].EVM);
-		os_error_printf(CU_MSG_INFO2, (PS8)"RSSI: %d(0x%x)\n", data.testCmd_u.Statistics.RxPacketStatistics[i].RSSI,data.testCmd_u.Statistics.RxPacketStatistics[i].RSSI);
-		os_error_printf(CU_MSG_INFO2, (PS8)"Frequency Delta: %d(0x%x)\n", data.testCmd_u.Statistics.RxPacketStatistics[i].FrequencyDelta,data.testCmd_u.Statistics.RxPacketStatistics[i].FrequencyDelta);
-		os_error_printf(CU_MSG_INFO2, (PS8)"Flags: %d(0x%x)\n", data.testCmd_u.Statistics.RxPacketStatistics[i].Flags,data.testCmd_u.Statistics.RxPacketStatistics[i].Flags);
-		os_error_printf(CU_MSG_INFO2, (PS8)"Type: %d(0x%x)\n", data.testCmd_u.Statistics.RxPacketStatistics[i].Type,data.testCmd_u.Statistics.RxPacketStatistics[i].Type);
-		os_error_printf(CU_MSG_INFO2, (PS8)"Rate: %d(0x%x)\n", data.testCmd_u.Statistics.RxPacketStatistics[i].Rate,data.testCmd_u.Statistics.RxPacketStatistics[i].Rate);
-		os_error_printf(CU_MSG_INFO2, (PS8)"Noise: %d(0x%x)\n", data.testCmd_u.Statistics.RxPacketStatistics[i].Noise,data.testCmd_u.Statistics.RxPacketStatistics[i].Noise);
-		os_error_printf(CU_MSG_INFO2, (PS8)"AGC Gain: %d(0x%x)\n", data.testCmd_u.Statistics.RxPacketStatistics[i].AgcGain,data.testCmd_u.Statistics.RxPacketStatistics[i].AgcGain);
-	}
-#endif
-}
-
-
-/*-----------*/
-/* BIP Tests */
-/*-----------*/
-
-
-void nvsFillMACAddress(THandle hCuCmd, FILE *nvsBinFile)
-{
-	CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-	TMacAddr Mac;
-	U8	lengthToSet;
-	U8	addressHigher;
-	U8	addressLower;
-	U8	valueToSet=0;
-
-	lengthToSet = 0x1;
-	
-
-	os_error_printf(CU_MSG_INFO2, (PS8)"Entering FillMACAddressToNVS\n");
-	/* param 0 in nvs*/
-	os_fwrite(&lengthToSet, sizeof(U8), 1, nvsBinFile);
-	
-	/* register for MAC Address*/
-	addressHigher	= 0x6D;
-	addressLower	= 0x54;
-	
-	/* param 1 in nvs*/
-	os_fwrite(&addressHigher, sizeof(U8), 1, nvsBinFile);
-	/* param 2 in nvs*/
-	os_fwrite(&addressLower, sizeof(U8), 1, nvsBinFile);
-	
-
-   /*	read mac address */
-	if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, CTRL_DATA_MAC_ADDRESS, Mac, sizeof(TMacAddr))) 
-	{
-		os_error_printf(CU_MSG_INFO2, (PS8)"Unable  to get Mac address, aborting\n");
-		return;
-	}
-	os_error_printf(CU_MSG_INFO2, (PS8)"Mac[0]=%02x\n", Mac[0]);
-	os_error_printf(CU_MSG_INFO2, (PS8)"Mac[1]=%02x\n", Mac[1]);
-	os_error_printf(CU_MSG_INFO2, (PS8)"Mac[2]=%02x\n", Mac[2]);
-	os_error_printf(CU_MSG_INFO2, (PS8)"Mac[3]=%02x\n", Mac[3]);
-	os_error_printf(CU_MSG_INFO2, (PS8)"Mac[4]=%02x\n", Mac[4]);
-	os_error_printf(CU_MSG_INFO2, (PS8)"Mac[5]=%02x\n", Mac[5]);
-
-	/* write the lower MAC address starting from the LSB
-	   params 3-6 in NVS*/
-	os_fwrite(&Mac[5], sizeof(U8), 1, nvsBinFile);
-	os_fwrite(&Mac[4], sizeof(U8), 1, nvsBinFile);
-	os_fwrite(&Mac[3], sizeof(U8), 1, nvsBinFile);
-	os_fwrite(&Mac[2], sizeof(U8), 1, nvsBinFile);
-
-    /* param 7 in NVS*/
-	os_fwrite(&lengthToSet, sizeof(U8), 1, nvsBinFile);
-	
-	addressHigher	= 0x71;
-	addressLower	= 0x54;
-
-	/* params 8-9 in NVS*/
-	os_fwrite(&addressHigher, sizeof(U8), 1, nvsBinFile);
-	os_fwrite(&addressLower, sizeof(U8), 1, nvsBinFile);
-
-	
-    /* Write the higher MAC address starting from the LSB
-	   params 10-13 in NVS*/
-	os_fwrite(&Mac[1], sizeof(U8), 1, nvsBinFile);
-	os_fwrite(&Mac[0], sizeof(U8), 1, nvsBinFile);
-
-    os_fwrite(&valueToSet, sizeof(U8), 1, nvsBinFile);
-	os_fwrite(&valueToSet, sizeof(U8), 1, nvsBinFile);
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"exiting FillMACAddressToNVS\n");
-}
-
-TI_BOOL nvsReadFile(TI_UINT8 *pReadBuffer, TI_UINT16 *length, char* nvsFilePath)
-{
-	FILE      *nvsBinFile = NULL;
-	TI_UINT8  nvsData;
-	TI_INT8   nvsFileValid = TRUE;
-	TI_UINT32 index =0;
-
-	if (NULL == (nvsBinFile = os_fopen (nvsFilePath, OS_FOPEN_READ_BINARY)))
-    {
-       nvsFileValid = FALSE; 
-	   return TI_FALSE;
-    }
-
-	do 
-	{
-		os_fread(&nvsData, sizeof(TI_UINT8), 1, nvsBinFile);
-		pReadBuffer[index++] = nvsData;
-	} while((!feof(nvsBinFile)) && (index < NVS_TOTAL_LENGTH)) ;
-
-	*length = index;
-	os_fclose(nvsBinFile);
-
-	return TI_TRUE;
-}
-
-
-VOID nvsParsePreviosOne(const uint8 *nvsBuffer, TNvsStruct *nvsTypeTLV, uint32 *nvsVersion)
-{
-#define BUFFER_INDEX	bufferIndex + START_PARAM_INDEX + infoModeIndex
-
-	uint16		bufferIndex;
-	uint8		tlvType;
-	uint16		tlvLength;
-	uint16		infoModeIndex;
-	NVSTypeInfo	nvsTypeInfo;
-	uint8		nvsVersionOctetIndex;
-	uint8		shift;
-
-	for (bufferIndex = 0; bufferIndex < NVS_TOTAL_LENGTH;)
-	{
-		tlvType = nvsBuffer[bufferIndex];
-		
-		/* fill the correct mode to fill the NVS struct buffer */
-		/* if the tlvType is the last type break from the loop */
-		switch(tlvType)
-		{
-			case eNVS_RADIO_TX_PARAMETERS:
-				nvsTypeInfo = eNVS_RADIO_TX_TYPE_PARAMETERS_INFO;
-				break;
-
-			case eNVS_RADIO_RX_PARAMETERS:
-				nvsTypeInfo = eNVS_RADIO_RX_TYPE_PARAMETERS_INFO;
-				break;
-
-			case eNVS_VERSION:
-				for (*nvsVersion = 0, nvsVersionOctetIndex = 0; nvsVersionOctetIndex < NVS_VERSION_PARAMETER_LENGTH; nvsVersionOctetIndex++)
-				{
-					shift = 8 * (NVS_VERSION_PARAMETER_LENGTH - 1 - nvsVersionOctetIndex);
-					*nvsVersion += ((nvsBuffer[bufferIndex + START_PARAM_INDEX + nvsVersionOctetIndex]) << shift);	
-				}				
-				break;
-			
-			case eTLV_LAST:
-			default:
-				return;
-		}
-
-		tlvLength = (nvsBuffer[bufferIndex + START_LENGTH_INDEX  + 1] << 8) + nvsBuffer[bufferIndex + START_LENGTH_INDEX];
-
-		/* if TLV type is not NVS version fill the NVS structure according to the mode TX/RX */
-		if ((eNVS_RADIO_TX_PARAMETERS == tlvType) || (eNVS_RADIO_RX_PARAMETERS == tlvType)) 
-		{
-			nvsTypeTLV[nvsTypeInfo].Type = tlvType;
-			nvsTypeTLV[nvsTypeInfo].Length = tlvLength;
-
-			for (infoModeIndex = 0; (infoModeIndex < tlvLength) && (BUFFER_INDEX < NVS_TOTAL_LENGTH); infoModeIndex++)
-			{
-				nvsTypeTLV[nvsTypeInfo].Buffer[infoModeIndex] = nvsBuffer[BUFFER_INDEX];			
-			}
-
-		}
-
-		/* increment to the next TLV */
-		bufferIndex += START_PARAM_INDEX + tlvLength;
-	}
-}
-
-
-VOID nvsFillOldRxParams(FILE *nvsBinFile, const TI_UINT8 *buffer, const uint16 rxLength)
-{
-	TI_UINT16 	index;
-	TI_UINT8	rxTypeValue;
-	TI_UINT8	valueToSet;
-
-	/* RX BiP type */
-	rxTypeValue = eNVS_RADIO_RX_PARAMETERS;
-	fwrite(&rxTypeValue, sizeof(TI_UINT8), 1, nvsBinFile);
-
-	/* RX BIP Length */
-	fwrite(&rxLength, sizeof(TI_UINT16), 1, nvsBinFile);
-
-	for (index = 0; index < rxLength; index++)
-	{
-		valueToSet = buffer[index];
-		fwrite(&valueToSet, sizeof(TI_UINT8), 1, nvsBinFile);
-	}	
-}
-
-VOID nvsFillTXParams(FILE *nvsBinFile, TI_UINT8	*nvsPtr, TI_UINT16 txParamLength)
-{
-	TI_UINT8			txParamValue;
-	TI_UINT8			valueToSet;
-	TI_UINT16			index;
-
-	/* TX BiP type */
-	txParamValue = eNVS_RADIO_TX_PARAMETERS;
-	os_fwrite(&txParamValue, sizeof(TI_UINT8), 1, nvsBinFile);
-
-	/* TX Bip Length */
-	os_fwrite(&txParamLength, sizeof(TI_UINT16), 1, nvsBinFile);
-
-	for (index = 0; index < txParamLength; index++)
-	{
-		valueToSet = nvsPtr[index];
-		os_fwrite(&valueToSet, sizeof(TI_UINT8), 1, nvsBinFile);			
-	}
-}
-
-VOID nvsFillDefaultRXParams(FILE *nvsBinFile)
-{
-	TI_UINT8	typeValue = eNVS_RADIO_RX_PARAMETERS;
-	TI_UINT16	lengthValue = NVS_RX_PARAM_LENGTH;
-	TI_UINT8	valueToSet = DEFAULT_EFUSE_VALUE;
-	TI_UINT8	rxParamIndex;
-
-	/* RX type */
-	os_fwrite(&typeValue, sizeof(TI_UINT8), 1, nvsBinFile);
-
-	/* RX length */
-	os_fwrite(&lengthValue, sizeof(TI_UINT16), 1, nvsBinFile);
-
-	for (rxParamIndex = 0; rxParamIndex < lengthValue; rxParamIndex++)
-	{		
-		os_fwrite(&valueToSet, sizeof(TI_UINT8), 1, nvsBinFile);
-	}
-}
-
-
-void nvsFillOldTXParams(FILE *nvsBinFile, const TI_UINT8	*buffer, const uint16	txParamLength)
-{
-	TI_UINT16	index;
-	TI_UINT8	rxTypeValue;	
-	TI_UINT8	valueToSet;
-	TI_UINT16	tlvLength;
-	
-	/* TX BiP type */
-	rxTypeValue = eNVS_RADIO_TX_PARAMETERS;
-	os_fwrite(&rxTypeValue, sizeof(TI_UINT8), 1, nvsBinFile);
-
-	/* TX BIP Length */
-	tlvLength = txParamLength;
-	os_fwrite(&tlvLength, sizeof(TI_UINT16), 1, nvsBinFile);
-
-	for (index = 0; index < txParamLength; index++)
-	{
-		valueToSet = buffer[index];
-		os_fwrite(&valueToSet, sizeof(TI_UINT8), 1, nvsBinFile);
-	}
-}
-
-
-VOID nvsFillDefaultTXParams(FILE *nvsBinFile, const uint16	txParamLength)
-{
-	TI_UINT32	index;
-	TI_UINT32	lengthOfP2Gtable = NVS_TX_P2G_TABLE_LENGTH;
-	TI_UINT8	p2GValue = 0;
-	TI_UINT32	lengthOfPPASTepTable = NVS_TX_PPA_STEPS_TABLE_LENGTH;
-	TI_UINT8	ppaStesValue = 0;
-	TI_UINT32	lengthOfPDBufferTable = NVS_TX_PD_TABLE_LENGTH_NVS_V2;
-	TI_UINT8	pdStesValue = 0;
-	TI_UINT8	typeValue = eNVS_RADIO_TX_PARAMETERS;
-	TI_UINT16	lengthValue = txParamLength;
-	TI_UINT8	perChannelGainOffsetValue = 0;
-	TI_UINT16	lengthOfGainOffsetTable = NUMBER_OF_RADIO_CHANNEL_INDEXS_E;
-
-	/* TX type */
-	os_fwrite(&typeValue, sizeof(TI_UINT8), 1, nvsBinFile);
-
-	/* TX length */
-	os_fwrite(&lengthValue, sizeof(TI_UINT16), 1, nvsBinFile);
-
-	/* P2G table */
-	for (index = 0; index < lengthOfP2Gtable; index++)
-	{
-		os_fwrite(&p2GValue, sizeof(TI_UINT8), 1, nvsBinFile);
-	}
-
-	/* PPA steps table */
-	for (index = 0; index < lengthOfPPASTepTable; index++)
-	{
-		os_fwrite(&ppaStesValue, sizeof(TI_UINT8), 1, nvsBinFile);
-	}
-
-	/* Power Detector */
-	for (index = 0; index < lengthOfPDBufferTable; index++)
-	{
-		os_fwrite(&pdStesValue, sizeof(TI_UINT8), 1, nvsBinFile);
-	}
-
-	/* Per Channel Gain Offset */
-	for (index = 0; index < lengthOfGainOffsetTable; index++)
-	{
-		os_fwrite(&perChannelGainOffsetValue, sizeof(TI_UINT8), 1, nvsBinFile);
-	}
-}
-
-void nvsFillRXParams(FILE *nvsBinFile, uint8	*nvsPtr, uint16	rxLength)
-{
-	TI_UINT8	rxTypeValue;
-	TI_UINT8	valueToSet;
-	TI_UINT16	index;
-
-	/* RX BiP type */
-	rxTypeValue = eNVS_RADIO_RX_PARAMETERS;
-	os_fwrite(&rxTypeValue, sizeof(TI_UINT8), 1, nvsBinFile);
-
-	/* RX Bip Length */
-	os_fwrite(&rxLength, sizeof(TI_UINT16), 1, nvsBinFile);
-
-	for (index = 0; index < rxLength; index++)
-	{
-		valueToSet = nvsPtr[index];
-		os_fwrite(&valueToSet, sizeof(TI_UINT8), 1, nvsBinFile);			
-	}	
-}
-
-
-VOID  nvsFillVersion(FILE *nvsBinFile, TI_UINT32 version)
-{
-	char			versionBuffer[NVS_VERSION_PARAMETER_LENGTH];
-	TI_UINT8		shift8;
-	TI_UINT8		valueToSet;
-	TI_UINT32		comparison;
-	TI_INT16		index;
-	TI_UINT16		lengthToSet;
-
-	/* version type */
-	valueToSet = eNVS_VERSION;
-	os_fwrite(&valueToSet, sizeof(TI_UINT8), 1, nvsBinFile);
-
-	/* version length */
-	lengthToSet = NVS_VERSION_PARAMETER_LENGTH;
-	os_fwrite(&lengthToSet, sizeof(TI_UINT16), 1, nvsBinFile);	
-
-	for (shift8 = 0, comparison = 0xff, index = NVS_VERSION_PARAMETER_LENGTH - 1;index >= 0; index--)
-	{
-		valueToSet = (version & comparison) >> shift8;
-		versionBuffer[index] = valueToSet;		 
-
-		comparison <<= 8;
-		shift8 += 8;
-	}
-
-	for (index = 0; index < NVS_VERSION_PARAMETER_LENGTH; index++)
-	{
-		os_fwrite(&versionBuffer[index], sizeof(TI_UINT8), 1, nvsBinFile);	 
-	}	
-}
-
-
-VOID nvsWriteEndNVS(FILE *nvsBinFile)
-{
-	TI_UINT8	valueToSet;
-	TI_UINT16	lengthToSet;
-	
-	/* version type */
-	valueToSet = eTLV_LAST;
-	os_fwrite(&valueToSet, sizeof(TI_UINT8), 1, nvsBinFile);
-
-	valueToSet = eTLV_LAST;
-	os_fwrite(&valueToSet, sizeof(TI_UINT8), 1, nvsBinFile);
-
-	/* version length */
-	lengthToSet = 0;
-	os_fwrite(&lengthToSet, sizeof(TI_UINT16), 1, nvsBinFile);
-}
-
-VOID nvsUpdateFile(THandle hCuCmd, TNvsStruct nvsStruct, TI_UINT8 version,  S8 updatedProtocol)
-{
-#ifdef _WINDOWS
-    PS8 nvsFilePath = (PS8)"/windows/nvs_map.bin";
-#else
-    PS8 nvsFilePath = (PS8)"./nvs_map.bin";
-#endif /*_WINDOWS*/
-	TI_UINT8		currentNVSbuffer[1500];
-	TI_UINT16		lengthOfCurrentNVSBufer;
-	TI_BOOL     	prevNVSIsValid;
-	TNvsStruct		oldNVSParam[eNUMBER_RADIO_TYPE_PARAMETERS_INFO];
-    FILE			*nvsBinFile;
-	TI_UINT8    	index;
-	TI_UINT8		valueToSet = 0;
-	TI_UINT16		nvsTXParamLength = NVS_TX_PARAM_LENGTH_NVS_V2;
-	TI_UINT16		oldNVSTXParamLength;
-	TI_UINT32		oldNVSVersion;
-	TI_UINT32       currentNVSVersion = NVS_VERSION_2; 
-
-	/* read previous NVS if exists */
-	prevNVSIsValid = nvsReadFile(currentNVSbuffer, &lengthOfCurrentNVSBufer, nvsFilePath);
-
-	if (prevNVSIsValid)
-	{
-		/* fill the TLV structure for the mode TX/RX */
-		os_memset(oldNVSParam, 0, eNUMBER_RADIO_TYPE_PARAMETERS_INFO * sizeof(TNvsStruct));
-		nvsParsePreviosOne(&currentNVSbuffer[NVS_PRE_PARAMETERS_LENGTH], oldNVSParam, &oldNVSVersion);
-
-		if (currentNVSVersion == oldNVSVersion)
-		{
-			oldNVSTXParamLength = NVS_TX_PARAM_LENGTH_NVS_V2;
-		
-			/* if read all the parameter (needed) from the previous NVS */
-			if ((oldNVSParam[eNVS_RADIO_TX_TYPE_PARAMETERS_INFO].Type != eNVS_RADIO_TX_PARAMETERS)	||
-				(oldNVSParam[eNVS_RADIO_TX_TYPE_PARAMETERS_INFO].Length != nvsTXParamLength)		||
-				(oldNVSParam[eNVS_RADIO_RX_TYPE_PARAMETERS_INFO].Type != eNVS_RADIO_RX_PARAMETERS)	||
-				(oldNVSParam[eNVS_RADIO_RX_TYPE_PARAMETERS_INFO].Length != NVS_RX_PARAM_LENGTH))
-			{
-				/* the parameters are wrong */
-				prevNVSIsValid = TI_FALSE;
-			}	
-			else
-			{
-				/* the parameters are right */
-				prevNVSIsValid = TI_TRUE;
-			}
-		}
-		else
-		{
-			/* there isn't NVS */
-			prevNVSIsValid = TI_FALSE;
-		}		
-	}
-
-	nvsBinFile = os_fopen(nvsFilePath, OS_FOPEN_WRITE_BINARY);
-
-	if (NULL == nvsBinFile)
-	{
-		os_error_printf(CU_MSG_ERROR, (PS8)"\n Could not create FILE!!! !!!! \n");
-	}
-	
-	/* fill MAC Address */
-	nvsFillMACAddress(hCuCmd, nvsBinFile);
-
-	/* fill end burst transaction zeros */
-	for (index = 0; index < NVS_END_BURST_TRANSACTION_LENGTH; index++)
-	{
-		os_fwrite(&valueToSet, sizeof(TI_UINT8), 1, nvsBinFile);
-	}
-
-	/* fill zeros to Align TLV start address */
-	for (index = 0; index < NVS_ALING_TLV_START_ADDRESS_LENGTH; index++)
-	{
-		os_fwrite(&valueToSet, sizeof(TI_UINT8), 1, nvsBinFile);
-	}
-
-	/* Getting from TX BiP Command */
-	if(NVS_FILE_TX_PARAMETERS_UPDATE == updatedProtocol)
-	{
-		// Fill new TX BiP values
-		nvsFillTXParams(nvsBinFile, nvsStruct.Buffer, nvsStruct.Length);
-
-		if (prevNVSIsValid)
-		{
-			/* set Parameters of RX from the previous file */
-			nvsFillOldRxParams(nvsBinFile, oldNVSParam[eNVS_RADIO_RX_TYPE_PARAMETERS_INFO].Buffer,
-							   oldNVSParam[eNVS_RADIO_RX_TYPE_PARAMETERS_INFO].Length);
-		}
-		else
-		{
-			nvsFillDefaultRXParams(nvsBinFile);
-		}
-	}
-	/* Getting from RX BiP Command */
-	else if (NVS_FILE_RX_PARAMETERS_UPDATE == updatedProtocol)
-	{
-		if (prevNVSIsValid)
-		{
-			// set Parameters of TX from the previous file
-			nvsFillOldTXParams(nvsBinFile, oldNVSParam[eNVS_RADIO_TX_TYPE_PARAMETERS_INFO].Buffer,
-									oldNVSParam[eNVS_RADIO_TX_TYPE_PARAMETERS_INFO].Length);
-		}
-		else
-		{
-			nvsFillDefaultTXParams(nvsBinFile, nvsTXParamLength);
-		}
-
-		/* Fill new RX BiP values */ 
-		nvsFillRXParams(nvsBinFile, nvsStruct.Buffer, nvsStruct.Length);
-	
-	}
-	else  /* NVS_FILE_WRONG_UPDATE == updatedProtocol */
-	{
-		if (prevNVSIsValid)
-		{
-			/* set Parameters of TX from the previous file */
-			nvsFillOldTXParams(nvsBinFile,
-									oldNVSParam[eNVS_RADIO_TX_TYPE_PARAMETERS_INFO].Buffer,
-				                    oldNVSParam[eNVS_RADIO_TX_TYPE_PARAMETERS_INFO].Length);
-
-			/* set Parameters of RX from the previous file  */
-			nvsFillOldRxParams(nvsBinFile,
-									oldNVSParam[eNVS_RADIO_RX_TYPE_PARAMETERS_INFO].Buffer,
-				                    oldNVSParam[eNVS_RADIO_RX_TYPE_PARAMETERS_INFO].Length);
-		}
-		else
-		{
-			/* set default TX param */
-			nvsFillDefaultTXParams(nvsBinFile,nvsTXParamLength);
-
-			/* set default RX param */
-			nvsFillDefaultRXParams(nvsBinFile);
-		}		
-	}
-
-	/* Fill the NVS version to the NVS */
-	nvsFillVersion(nvsBinFile, version);
-
-	/* End of NVS */
-	nvsWriteEndNVS(nvsBinFile);
-
-	/* close the file */
-	os_fclose(nvsBinFile);
-}
-
-VOID CuCmd_BIP_BufferCalReferencePoint(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-#define NUM_OF_PARAMETERS_REF_POINT 3
-
-	CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-	TTestCmd data;
-
-	if(nParms != NUM_OF_PARAMETERS_REF_POINT)
-	{
-		os_error_printf(CU_MSG_INFO2, (PS8)"Missing Param1: iReferencePointDetectorValue\n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Missing Param2: iReferencePointPower\n");
-		os_error_printf(CU_MSG_INFO2, (PS8)"Missing Param3: isubBand\n");
-		return;
-	}
-	else
-	{
-		os_memset(&data, 0, sizeof(TTestCmd));
-		data.testCmdId = TEST_CMD_UPDATE_PD_REFERENCE_POINT;
-/*		data.testCmd_u.PdBufferCalReferencePoint.iReferencePointDetectorValue = 189;
-		data.testCmd_u.PdBufferCalReferencePoint.iReferencePointPower = 12;
-		data.testCmd_u.PdBufferCalReferencePoint.isubBand = 0; 1- BG 2-*/
-
-		data.testCmd_u.PdBufferCalReferencePoint.iReferencePointDetectorValue = parm[0].value;
-		data.testCmd_u.PdBufferCalReferencePoint.iReferencePointPower = parm[1].value;
-		data.testCmd_u.PdBufferCalReferencePoint.isubBand = (U8)parm[2].value;
-		
-		if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data))
-		{
-			os_error_printf(CU_MSG_INFO2, (PS8)"BufferCalReferencePoint has failed\n");            
-			return;
-		}
-		
-		os_error_printf(CU_MSG_INFO2, (PS8)"BufferCalReferencePoint was configured succesfully\n");
-	}
-	return;
-}
-
-
-/* P2G Calibration */
-VOID CuCmd_BIP_StartBIP(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-	CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TTestCmd data;
-    U32 i;
-    
-	os_memset(&data, 0, sizeof(TTestCmd));
-	
-	data.testCmdId = TEST_CMD_P2G_CAL;
-
-    data.testCmd_u.P2GCal.iSubBandMask = 0;
-    for (i = 0; i < 8; i++) 
-    {
-        data.testCmd_u.P2GCal.iSubBandMask |= (U8)parm[i].value << i;
-    }
-    
-	if (data.testCmd_u.P2GCal.iSubBandMask == 0) 
-	{
-		os_error_printf(CU_MSG_INFO2, (PS8)"At least one sub-band should be enabled\n");        
-		return;
-	}
-	
-	if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data)) 
-	{
-		os_error_printf(CU_MSG_INFO2, (PS8)"Tx calibration start has failed\n");        
-		return;
-	}
-	
-	if (TI_OK != data.testCmd_u.P2GCal.oRadioStatus) {
-		os_error_printf(CU_MSG_INFO2, (PS8)"Tx calibration returned status: %d\n", data.testCmd_u.P2GCal.oRadioStatus);        
-		return;
-	}
-
-	nvsUpdateFile(hCuCmd,data.testCmd_u.P2GCal.oNvsStruct , (TI_UINT8)data.testCmd_u.P2GCal.oNVSVersion, NVS_FILE_TX_PARAMETERS_UPDATE);
-
-}
-
-VOID CuCmd_BIP_EnterRxBIP(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-	CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TTestCmd data;
-        
-	os_memset(&data, 0, sizeof(TTestCmd));
-	
-	data.testCmdId = TEST_CMD_RX_PLT_ENTER;
-      
-	if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data)) 
-	{
-		os_error_printf(CU_MSG_INFO2, (PS8)"Enter Rx calibration has failed\n");        
-		return;
-	}
-
-   
-    if (TI_OK != data.testCmd_u.RxPlt.oRadioStatus) {
-		os_error_printf(CU_MSG_INFO2, (PS8)"Enter Rx calibration returned status: %d\n", data.testCmd_u.RxPlt.oRadioStatus);        
-		return;
-	}
-
-}
-
-
-VOID CuCmd_BIP_StartRxBIP(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-	CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TTestCmd data;
-        
-	os_memset(&data, 0, sizeof(TTestCmd));
-	
-    data.testCmdId = TEST_CMD_RX_PLT_CAL;
-    data.testCmd_u.RxPlt.iExternalSignalPowerLevel = (S32)parm[0].value;
-   
-    if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data)) 
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Rx calibration has failed\n");        
-        return;
-    }
-
-    if (TI_OK != data.testCmd_u.RxPlt.oRadioStatus) {
-		os_error_printf(CU_MSG_INFO2, (PS8)"Rx calibration returned status: %d\n", data.testCmd_u.RxPlt.oRadioStatus);        
-		return;
-	}
-
-	nvsUpdateFile(hCuCmd, data.testCmd_u.RxPlt.oNvsStruct, (TI_UINT8)data.testCmd_u.RxPlt.oNVSVersion, NVS_FILE_RX_PARAMETERS_UPDATE);
-}
-
-VOID CuCmd_BIP_ExitRxBIP(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-	CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    TTestCmd data;
-        
-	os_memset(&data, 0, sizeof(TTestCmd));
-	
-	data.testCmdId = TEST_CMD_RX_PLT_EXIT;
-      
-	if(OK != CuCommon_Radio_Test(pCuCmd->hCuCommon, &data)) 
-	{
-		os_error_printf(CU_MSG_INFO2, (PS8)"Exit Rx calibration has failed\n");        
-		return;
-	}
-
-   
-    if (TI_OK != data.testCmd_u.RxPlt.oRadioStatus) {
-		os_error_printf(CU_MSG_INFO2, (PS8)"Exit Rx calibration returned status: %d\n", data.testCmd_u.RxPlt.oRadioStatus);        
-		return;
-	}
-
-}
-
-
-
-VOID CuCmd_SetPrivacyAuth(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 AuthMode;
-    
-    if( nParms )
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"Setting privacy authentication to %ld\n", parm[0].value);
-        AuthMode = parm[0].value;
-        if (pCuCmd->hWpaCore == NULL)
-        {
-            /* we can only accept WEP or OPEN configurations */
-            if((AuthMode >= os802_11AuthModeOpen) && (AuthMode <= os802_11AuthModeAutoSwitch))
-            {
-                if(OK != CuCommon_SetU32(pCuCmd->hCuCommon, RSN_EXT_AUTHENTICATION_MODE, AuthMode)) return;
-            }
-            else
-            {
-                os_error_printf(CU_MSG_ERROR, (PS8)"Error - CuCmd_SetPrivacyAuth - cannot set mode (%ld) when Suppl is not present\n", AuthMode);
-                return;
-            }
-        }
-        else
-        {
-#ifndef NO_WPA_SUPPL
-            if(OK != WpaCore_SetAuthMode(pCuCmd->hWpaCore, AuthMode)) return;
-#endif
-        }
-    }
-    else
-    {
-#ifdef WPA_ENTERPRISE
-        static named_value_t auth_mode_type[] = {
-            { os802_11AuthModeOpen,             (PS8)"Open"      },
-            { os802_11AuthModeShared,           (PS8)"Shared"    },
-            { os802_11AuthModeAutoSwitch,       (PS8)"AutoSwitch"},
-            { os802_11AuthModeWPA,              (PS8)"WPA"       },
-            { os802_11AuthModeWPAPSK,           (PS8)"WPAPSK"    },
-            { os802_11AuthModeWPANone,          (PS8)"WPANone"   },
-            { os802_11AuthModeWPA2,             (PS8)"WPA2"      },
-            { os802_11AuthModeWPA2PSK,          (PS8)"WPA2PSK"   },
-        };
-#else
-        static named_value_t auth_mode_type[] = {
-            { os802_11AuthModeOpen,             (PS8)"Open"      },
-            { os802_11AuthModeShared,           (PS8)"Shared"    },
-            { os802_11AuthModeWPAPSK,           (PS8)"WPAPSK"    },
-            { os802_11AuthModeWPA2PSK,          (PS8)"WPA2PSK"   },
-        };
-#endif
-        
-        if (pCuCmd->hWpaCore == NULL)
-        {
-            if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, RSN_EXT_AUTHENTICATION_MODE, &AuthMode)) return;    
-        }
-        else 
-        {
-#ifndef NO_WPA_SUPPL
-            if(OK != WpaCore_GetAuthMode(pCuCmd->hWpaCore, &AuthMode)) return;  
-#endif
-        }
-
-        print_available_values(auth_mode_type);
-        os_error_printf(CU_MSG_INFO2, (PS8)"AuthenticationMode=%d\n", AuthMode );
-    }   
-}
-
-VOID CuCmd_SetPrivacyEap(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd; 
-    OS_802_11_EAP_TYPES EapType;
-    S32 i;
-    named_value_t EapType_type[] = {
-        { OS_EAP_TYPE_NONE,                 (PS8)"OS_EAP_TYPE_NONE" },
-        { OS_EAP_TYPE_MD5_CHALLENGE,        (PS8)"OS_EAP_TYPE_MD5_CHALLENGE" },
-        { OS_EAP_TYPE_GENERIC_TOKEN_CARD,   (PS8)"OS_EAP_TYPE_GENERIC_TOKEN_CARD" },
-        { OS_EAP_TYPE_TLS,                  (PS8)"OS_EAP_TYPE_TLS" },
-        { OS_EAP_TYPE_LEAP,                 (PS8)"OS_EAP_TYPE_LEAP" },
-        { OS_EAP_TYPE_TTLS,                 (PS8)"OS_EAP_TYPE_TTLS" },
-        { OS_EAP_TYPE_PEAP,                 (PS8)"OS_EAP_TYPE_PEAP" },
-        { OS_EAP_TYPE_MS_CHAP_V2,           (PS8)"OS_EAP_TYPE_MS_CHAP_V2" },
-        { OS_EAP_TYPE_FAST,                 (PS8)"OS_EAP_TYPE_FAST" }        
-    };
-    
-    /* check if we have supplicant */
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Error - CuCmd_SetPrivacyEap - cannot set EapType when Suppl is not present\n");
-        return;                     
-    }
-
-    if( nParms )
-    {
-        EapType = parm[0].value;
-        /* check if the param is valid */
-        CU_CMD_FIND_NAME_ARRAY(i, EapType_type, EapType);
-        if(i == SIZE_ARR(EapType_type))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_SetPrivacyEap, EapType %d is not defined!\n", EapType);
-            return;
-        }       
-
-#ifndef NO_WPA_SUPPL
-
-        if(OK != WpaCore_SetPrivacyEap(pCuCmd->hWpaCore, EapType))
-            os_error_printf(CU_MSG_INFO2, (PS8)"Error Setting EapType to %ld\n", EapType);
-        else
-            os_error_printf(CU_MSG_INFO2, (PS8)"Setting EapType to %ld\n", EapType);
-
-#endif        
-               /* 
-        WEXT phase I
-        TI_SetEAPType( g_id_adapter, (OS_802_11_EAP_TYPES) parm[0].value );
-        TI_SetEAPTypeDriver( g_id_adapter, (OS_802_11_EAP_TYPES) parm[0].value );
-        */
-        
-    }
-    else
-    {       
-        print_available_values(EapType_type);        
-    }
-}
-
-
-VOID CuCmd_SetPrivacyEncryption(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 EncryptionType;
-#ifndef NO_WPA_SUPPL
-    OS_802_11_ENCRYPTION_TYPES EncryptionTypePairWise;
-    OS_802_11_ENCRYPTION_TYPES EncryptionTypeGroup;
-#endif
-    S32 i;
-   
-    if( nParms )
-    {
-        EncryptionType = parm[0].value;
-
-        /* check if the param is valid */
-        CU_CMD_FIND_NAME_ARRAY(i, encrypt_type, EncryptionType);
-        if(i == SIZE_ARR(encrypt_type))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_SetPrivacyEncryption, EncryptionType %d is not defined!\n", EncryptionType);
-            return;
-        }
-
-        if (pCuCmd->hWpaCore == NULL)
-        {
-            if((EncryptionType == OS_ENCRYPTION_TYPE_NONE) || (EncryptionType == OS_ENCRYPTION_TYPE_WEP))
-            {
-                if(OK != CuCommon_SetU32(pCuCmd->hCuCommon, RSN_ENCRYPTION_STATUS_PARAM, (U32)EncryptionType)) return;              
-            }
-            else
-            {
-                os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_SetPrivacyEncryption - can't set EncryptionType %s when not connected to supplicant",encrypt_type[i].name);
-                return;
-            }
-        }
-        else
-        {
-#ifndef NO_WPA_SUPPL
-            switch(EncryptionType)
-            {
-                case OS_ENCRYPTION_TYPE_NONE:
-                    EncryptionTypePairWise = OS_ENCRYPTION_TYPE_NONE;
-                    EncryptionTypeGroup = OS_ENCRYPTION_TYPE_NONE;
-                    break;
-                case OS_ENCRYPTION_TYPE_WEP:
-                    EncryptionTypePairWise = OS_ENCRYPTION_TYPE_WEP;
-                    EncryptionTypeGroup = OS_ENCRYPTION_TYPE_WEP;
-                    break;
-                case OS_ENCRYPTION_TYPE_TKIP:
-                    EncryptionTypePairWise = OS_ENCRYPTION_TYPE_TKIP;
-                    EncryptionTypeGroup = OS_ENCRYPTION_TYPE_TKIP;
-                    break;
-                case OS_ENCRYPTION_TYPE_AES:
-                    EncryptionTypePairWise = OS_ENCRYPTION_TYPE_AES;
-                    EncryptionTypeGroup = OS_ENCRYPTION_TYPE_AES;
-                    break;
-            }
-
-            if(OK != WpaCore_SetEncryptionPairWise(pCuCmd->hWpaCore, EncryptionTypePairWise)) return;   
-            if(OK != WpaCore_SetEncryptionGroup(pCuCmd->hWpaCore, EncryptionTypeGroup)) return;         
-#endif
-            
-        }
-
-        os_error_printf(CU_MSG_INFO2, (PS8)"Setting privacy encryption to %ld\n", encrypt_type[i]);        
-    }
-    else
-    {   
-        if (pCuCmd->hWpaCore == NULL)
-        {
-            if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, RSN_ENCRYPTION_STATUS_PARAM, &EncryptionType)) return;  
-
-            switch (EncryptionType)
-            {
-            case TWD_CIPHER_NONE:
-                EncryptionType = OS_ENCRYPTION_TYPE_NONE;
-                break;
-            case TWD_CIPHER_WEP:   
-            case TWD_CIPHER_WEP104:
-                EncryptionType = OS_ENCRYPTION_TYPE_WEP;
-                break;
-            case TWD_CIPHER_TKIP: 
-                EncryptionType = OS_ENCRYPTION_TYPE_TKIP;
-                break;
-            case TWD_CIPHER_AES_WRAP:
-            case TWD_CIPHER_AES_CCMP:
-                EncryptionType = OS_ENCRYPTION_TYPE_AES;
-                break;
-            default:
-                os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_SetPrivacyEncryption - unknown encryption type (%d)",EncryptionType);
-                break;
-            }
-        }
-        else
-        {
-#ifndef NO_WPA_SUPPL
-            if(OK != WpaCore_GetEncryptionPairWise(pCuCmd->hWpaCore, &EncryptionTypePairWise)) return;  
-            if(OK != WpaCore_GetEncryptionGroup(pCuCmd->hWpaCore, &EncryptionTypeGroup)) return;
-
-            if((EncryptionTypePairWise == OS_ENCRYPTION_TYPE_NONE) && (EncryptionTypeGroup == OS_ENCRYPTION_TYPE_NONE))
-                EncryptionType = OS_ENCRYPTION_TYPE_NONE;
-            else if((EncryptionTypePairWise == OS_ENCRYPTION_TYPE_WEP) && (EncryptionTypeGroup == OS_ENCRYPTION_TYPE_WEP))
-                EncryptionType = OS_ENCRYPTION_TYPE_WEP;
-            else if((EncryptionTypePairWise == OS_ENCRYPTION_TYPE_TKIP) && (EncryptionTypeGroup == OS_ENCRYPTION_TYPE_TKIP))
-                EncryptionType = OS_ENCRYPTION_TYPE_TKIP;
-            else if((EncryptionTypePairWise == OS_ENCRYPTION_TYPE_AES) && (EncryptionTypeGroup == OS_ENCRYPTION_TYPE_AES))
-                EncryptionType = OS_ENCRYPTION_TYPE_AES;
-            else
-            {
-                os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_SetPrivacyEncryption - unknown encryption type (%d,%d)",EncryptionTypePairWise, EncryptionTypeGroup);
-                return;
-            }
-#endif
-        }
-        
-        print_available_values(encrypt_type);
-        os_error_printf(CU_MSG_INFO2, (PS8)"Encryption = %d\n", EncryptionType);
-    }
-}
-
-VOID CuCmd_SetPrivacyKeyType(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    OS_802_11_KEY_TYPES KeyType;
-    S32 i;
-    static named_value_t KeyType_type[] = {
-            { OS_KEY_TYPE_STATIC,             (PS8)"STATIC" },
-            { OS_KEY_TYPE_DYNAMIC,            (PS8)"DYNAMIC"}
-    };
-
-    /* check if we have supplicant */
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Error - CuCmd_SetPrivacyEncryptGroup - cannot set encryption Group when Suppl is not present\n");
-        return;                     
-    }
-
-    if( nParms )
-    {
-        KeyType = parm[0].value;
-        /* check if the param is valid */
-        CU_CMD_FIND_NAME_ARRAY(i, KeyType_type, KeyType);
-        if(i == SIZE_ARR(KeyType_type))
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"CuCmd_SetPrivacyKeyType - KeyType %d is not defined!\n", KeyType);
-            return;
-        }       
-        
-        os_error_printf(CU_MSG_INFO2, (PS8)"Setting KeyType to %ld\n", KeyType);
-
-         /* 
-        WEXT phase I
-        TI_SetKeyType( g_id_adapter, (OS_802_11_KEY_TYPES)parm[0].value );
-        */
-    }
-    else
-    {       
-        print_available_values(KeyType_type); 
-    }
-}
-
-VOID CuCmd_SetPrivacyMixedMode(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 MixedMode;
-
-    if( nParms )
-    {
-        MixedMode = parm[0].value;
-        os_error_printf(CU_MSG_INFO2, (PS8)"Setting MixedMode to %s\n", (MixedMode)?"True":"False");
-
-        CuCommon_SetU32(pCuCmd->hCuCommon, TIWLN_802_11_MIXED_MODE_SET, MixedMode);
-    }
-    else
-    {  
-        if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, TIWLN_802_11_MIXED_MODE_GET, &MixedMode)) return;
-        
-        os_error_printf(CU_MSG_INFO2, (PS8)"Mixed Mode: 0 - FALSE, 1 - TRUE\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"Mixed Mode =%s\n", (MixedMode)?"True":"False");
-    }
-}
-
-VOID CuCmd_SetPrivacyAnyWpaMode(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-#ifndef NO_WPA_SUPPL
-    U32 anyWpaMode;
-
-    if( nParms )
-    {
-        anyWpaMode = parm[0].value;
-        os_error_printf(CU_MSG_INFO2, (PS8)"Setting anyWpaMode to %s\n", (anyWpaMode)?"True":"False");
-
-        WpaCore_SetAnyWpaMode(pCuCmd->hWpaCore,(U8)anyWpaMode);
-    }
-    else
-    {  
-		WpaCore_GetAnyWpaMode(pCuCmd->hWpaCore,(U8 *)&anyWpaMode);
-        os_error_printf(CU_MSG_INFO2, (PS8)"Any WPA Mode: 0 - FALSE, 1 - TRUE\n");
-        os_error_printf(CU_MSG_INFO2, (PS8)"Any WPA =%s\n", (anyWpaMode)?"True":"False");
-    }
-#else
-    os_error_printf(CU_MSG_INFO2, (PS8)"Any Wpa Mode support only in Linux supplicants\n");
-#endif
-}
-
-VOID CuCmd_SetPrivacyCredentials(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    
-    if( nParms == 0 )
-        return;
-
-   if (pCuCmd->hWpaCore == NULL)
-   {
-       os_error_printf(CU_MSG_ERROR, (PS8)"Error - CuCmd_SetPrivacyPskPassPhrase - cannot set Credential password phrase when Suppl is not present\n");
-       return;                     
-   }
-
-#ifndef NO_WPA_SUPPL
-      
-     if( nParms == 2 )
-    {
-      WpaCore_SetCredentials(pCuCmd->hWpaCore,(PU8)(parm[0].value),(PU8)(parm[1].value));     
-    }
-    else if( nParms == 1 )
-    {
-      WpaCore_SetCredentials(pCuCmd->hWpaCore,(PU8)(parm[0].value),NULL);
-    }
-#endif    
-}
-
-VOID CuCmd_SetPrivacyPskPassPhrase(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 IsHexKey = FALSE;
-    U8 buf[WPACORE_MAX_PSK_STRING_LENGTH];
-    PS8 pPassphrase;
-    S32 len;
-
-    if( nParms == 0 )
-        return;
-
-    /* check if we have supplicant */
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Error - CuCmd_SetPrivacyPskPassPhrase - cannot set PSK password phrase when Suppl is not present\n");
-        return;                     
-    }
-
-    len = os_strlen((PS8)(parm[0].value));
-    pPassphrase = ((PS8)parm[0].value);
-    os_memset(buf, 0, WPACORE_MAX_PSK_STRING_LENGTH);
-
-    
-    if( nParms == 2 )
-    {       
-        if( !os_strcmp( (PS8) parm[1].value, (PS8)"hex") )
-            IsHexKey = TRUE;
-        else if(!os_strcmp( (PS8) parm[1].value, (PS8)"text"))
-            IsHexKey = FALSE;
-    }
-
-    if( IsHexKey )
-    {
-        U8 val_l;
-        U8 val_u;
-        S32 i;
-        
-        if( len != WPACORE_PSK_HEX_LENGTH )
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"The hexa PSKPassphrase must be at length of %d hexa digits \n",WPACORE_PSK_HEX_LENGTH);
-            return;
-        }
-        
-        for( i=0; *pPassphrase; i++, pPassphrase++ )
-        {
-            val_u = CuCmd_Char2Hex(*pPassphrase);
-            if( val_u == ((U8)-1) ) return;
-            val_l = CuCmd_Char2Hex(*(++pPassphrase));
-            if( val_l == ((U8)-1) ) return; 
-            buf[i] = ((val_u << 4) | val_l);
-        }        
-    }
-    else
-    {
-        if (len > WPACORE_MAX_PSK_STRING_LENGTH || len < WPACORE_MIN_PSK_STRING_LENGTH)
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"The PSKPassphrase must be between %d to  %d chars \n", WPACORE_MIN_PSK_STRING_LENGTH, WPACORE_MAX_PSK_STRING_LENGTH);
-            return;
-        }
-
-        os_memcpy((PVOID)buf, (PVOID)pPassphrase, len);
-    }
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"Setting PSKPassphrase to %s\n", (PS8) parm[0].value);
-#ifndef NO_WPA_SUPPL
-    WpaCore_SetPskPassPhrase(pCuCmd->hWpaCore, buf);
-#endif
-    
-}
-
-VOID CuCmd_SetPrivacyCertificate(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-  CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-  
-   if( nParms == 0 )
-        return;
-
-   if (pCuCmd->hWpaCore == NULL)
-   {
-       os_error_printf(CU_MSG_ERROR, (PS8)"Error - CuCmd_SetPrivacyPskPassPhrase - cannot set Certification  when Suppl is not present\n");
-       return;                     
-   }
-#ifndef NO_WPA_SUPPL
-   WpaCore_SetCertificate(pCuCmd->hWpaCore,(PU8)(parm[0].value));
-#endif     
-  
-    
-}
-
-VOID CuCmd_StopSuppl(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    /* check if we have supplicant */
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Error - CuCmd_StopSuppl - cannot stop supplicant when Suppl is not present :-)\n");
-        return;                     
-    }
-#ifndef NO_WPA_SUPPL    
-    WpaCore_StopSuppl(pCuCmd->hWpaCore);
-#endif
-}
-
-VOID CuCmd_ChangeSupplDebugLevels(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    /* check if we have supplicant */
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Error - CuCmd_DebugSuppl - cannot debug supplicant when Suppl is not present :-)\n");
-        return;                     
-    }
-#ifndef NO_WPA_SUPPL
-    WpaCore_ChangeSupplDebugLevels(pCuCmd->hWpaCore, parm[0].value, parm[1].value, parm[2].value);
-#endif
-}
-
-VOID CuCmd_AddPrivacyKey(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    PS8 buf;
-    U32 key_id = 0;
-    U32 def_flag = 0;
-    U32 IsHexKey = TRUE;
-    OS_802_11_WEP data;
-    U8 val_l, val_u;
-    S32 len;
-    
-    buf =  (PS8)parm[0].value;
-    key_id = (U32)parm[1].value;
-    if( parm[2].value ) def_flag = 0x80000000;
-    os_memset(data.KeyMaterial,0,sizeof(data.KeyMaterial));
-    len = os_strlen((PS8)buf);
-
-    if(key_id > 3)
-    {
-        os_error_printf(CU_MSG_INFO2, (PS8)"the key index must be between 0 and 3\n");
-        return;
-    }
-    
-    if( nParms >= 4 )
-    {
-        if( !os_strcmp( (PS8) parm[3].value, (PS8)"hex") )
-            IsHexKey = TRUE;
-        else if( !os_strcmp( (PS8) parm[3].value, (PS8)"HEX") )
-            IsHexKey = TRUE;
-        else if(!os_strcmp( (PS8) parm[3].value, (PS8)"text"))
-            IsHexKey = FALSE;
-        else if(!os_strcmp( (PS8) parm[3].value, (PS8)"TEXT"))
-            IsHexKey = FALSE;
-    }
-
-    if( IsHexKey )
-    {
-        S32 i;
-
-        if( len % 2 )
-        {
-            os_error_printf(CU_MSG_INFO2, (PS8)"The hexa key should be even length\n");
-            return;
-        }
-        if(len <= 10) /*10 is number of character for key length 40 bit*/
-            data.KeyLength = 5;
-        else if(len <= 26) /*26 is number of character for key length 128 bit*/
-            data.KeyLength = 13;
-        else if(len <= 58) /*58 is number of character for key length 256 bit*/
-            data.KeyLength = 29;
-        else 
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_AddPrivacyKey - key length not valid\n" );
-            return;
-        }
-
-        for( i=0; *buf; i++, buf++ )
-        {
-            val_u = CuCmd_Char2Hex(*buf);
-            if(val_u == ((U8)-1)) return;
-            val_l = CuCmd_Char2Hex(*(++buf));
-            if(val_l == ((U8)-1)) return;
-            data.KeyMaterial[i] = ((val_u << 4) | val_l);
-        }
-    }
-    else /* for ascii key */
-    {
-        if(len <= 5) /*10 is number of character for key length 40 bit*/
-            data.KeyLength = 5;
-        else if(len <= 13) /*26 is number of character for key length 128 bit*/
-            data.KeyLength = 13;
-        else if(len <= 29) /*58 is number of character for key length 256 bit*/
-            data.KeyLength = 29;
-        else 
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuCmd_AddPrivacyKey - key length not valid\n" );
-            return;
-        }
-        os_memcpy((PVOID)data.KeyMaterial, (PVOID)buf, len);
-    }
-
-    data.KeyIndex = def_flag | key_id;
-    data.Length = sizeof(OS_802_11_WEP);
-
-    /* check if we have supplicant */
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        CuCommon_AddKey(pCuCmd->hCuCommon, &data);
-    }
-    else
-    {
-#ifndef NO_WPA_SUPPL
-        WpaCore_AddKey(pCuCmd->hWpaCore, &data);
-#endif
-    }
-}
-
-VOID CuCmd_RemovePrivacyKey(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    /* check if we have supplicant */
-    CuCommon_RemoveKey(pCuCmd->hCuCommon, parm[0].value);
-}
-
-VOID CuCmd_GetPrivacyDefaultKey(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    U32 DefaultKeyId;
-    
-    /* check if we have supplicant */
-    if (pCuCmd->hWpaCore == NULL)
-    {
-        if(OK != CuCommon_GetU32(pCuCmd->hCuCommon, RSN_DEFAULT_KEY_ID, &DefaultKeyId)) return; 
-    }
-    else
-    {
-#ifndef NO_WPA_SUPPL
-        if(OK != WpaCore_GetDefaultKey(pCuCmd->hWpaCore, &DefaultKeyId)) return;    
-#endif
-    }
-
-    os_error_printf(CU_MSG_INFO2, (PS8)"WEP default key ID = %d\n", DefaultKeyId );
-}
-
-VOID CuCmd_EnableKeepAlive (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if (OK != CuCommon_SetU32 (pCuCmd->hCuCommon, POWER_MGR_KEEP_ALIVE_ENA_DIS, 1))
-    {
-        os_error_printf (CU_MSG_ERROR, (PS8)"Unable to enable keep-alive messages\n");
-    }
-}
-
-VOID CuCmd_DisableKeepAlive (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    if (OK != CuCommon_SetU32 (pCuCmd->hCuCommon, POWER_MGR_KEEP_ALIVE_ENA_DIS, 0))
-    {
-        os_error_printf (CU_MSG_ERROR, (PS8)"Unable to disable keep-alive messages\n");
-    }
-}
-
-VOID CuCmd_AddKeepAliveMessage (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t                 *pCuCmd = (CuCmd_t*)hCuCmd;
-    TKeepAliveTemplate      keepAliveParams;
-
-    if (4 != nParms)
-    {
-        os_error_printf (CU_MSG_ERROR, (PS8)"Number of params to add keep-alive message is %d\n", nParms);
-        return;
-    }
-
-    /* copy keep-alive params */
-    keepAliveParams.keepAliveParams.index = (U8)parm[ 0 ].value;
-    keepAliveParams.keepAliveParams.interval = parm[ 1 ].value;
-    keepAliveParams.keepAliveParams.trigType = parm[ 2 ].value;
-    keepAliveParams.keepAliveParams.enaDisFlag = 1; /* set to enable */
-    keepAliveParams.msgBufferLength = os_strlen ((PS8)parm[ 3 ].value);
-    if (0 == (keepAliveParams.msgBufferLength %2))
-    {
-        keepAliveParams.msgBufferLength = keepAliveParams.msgBufferLength / 2;
-    }
-    else
-    {
-        keepAliveParams.msgBufferLength = (keepAliveParams.msgBufferLength / 2) + 1;
-    }
-    /* convert the string to hexadeciaml values, and copy it */
-    CuCmd_atox_string ((U8*)parm[ 3 ].value, &keepAliveParams.msgBuffer[ 0 ]);
-
-    if (TI_OK != CuCommon_SetBuffer(pCuCmd->hCuCommon, POWER_MGR_KEEP_ALIVE_ADD_REM, 
-                                    &(keepAliveParams), sizeof(TKeepAliveTemplate)))
-    {
-        os_error_printf (CU_MSG_ERROR, (PS8)"Unable to add keep-alive message\n");
-    }
-}
-
-VOID CuCmd_RemoveKeepAliveMessage (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t                 *pCuCmd = (CuCmd_t*)hCuCmd;
-    TKeepAliveTemplate      keepAliveParams;
-
-    if (1 != nParms)
-    {
-        os_error_printf (CU_MSG_ERROR, (PS8)"Number of params to remove keep-alive message is %d\n", nParms);
-        return;
-    }
-
-    /* copy keep-alive params */
-    keepAliveParams.keepAliveParams.index = (U8)parm[ 0 ].value;
-    keepAliveParams.keepAliveParams.enaDisFlag = 0; /* set to disable */
-    keepAliveParams.keepAliveParams.interval = 1000; /* FW validate all parameters, so some reasonable values must be used */
-    keepAliveParams.keepAliveParams.trigType = KEEP_ALIVE_TRIG_TYPE_PERIOD_ONLY;
-
-    if (OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, POWER_MGR_KEEP_ALIVE_ADD_REM, 
-                                  &(keepAliveParams), sizeof(TKeepAliveTemplate)))
-    {
-        os_error_printf (CU_MSG_ERROR, (PS8)"Unable to remove keep-alive message\n");
-    }
-}
-
-VOID CuCmd_ShowKeepAlive (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t                 *pCuCmd = (CuCmd_t*)hCuCmd;
-    TKeepAliveConfig        tConfig;
-    U32                     uIndex, uNameIndex;
-    S8                      msgBuffer[ KEEP_ALIVE_TEMPLATE_MAX_LENGTH * 2 ];
-
-    if (OK != CuCommon_GetSetBuffer (pCuCmd->hCuCommon, POWER_MGR_KEEP_ALIVE_GET_CONFIG, 
-                                     &(tConfig), sizeof(TKeepAliveConfig)))
-    {
-        os_error_printf (CU_MSG_ERROR, (PS8)"Unable to read keep-alive configuration\n");
-    }
-
-    os_error_printf (CU_MSG_ERROR, (PS8)"Keep-Alive configuration:\n"
-                                   "-------------------------\n");
-    if (TRUE == tConfig.enaDisFlag)
-    {
-        os_error_printf (CU_MSG_ERROR, (PS8)"Keep-Alive global flag set to enabled\n\n");
-    }
-    else
-    {
-        os_error_printf (CU_MSG_ERROR, (PS8)"Keep-Alive global flag set to disabled\n\n");
-    }
-
-    os_error_printf (CU_MSG_ERROR, (PS8)"%-8s %-8s %-9s %-10s %s\n", (PS8)"Index", (PS8)"Enabled", (PS8)"Trig Type", (PS8)"Interval", (PS8)"Pattern");
-    os_error_printf (CU_MSG_ERROR, (PS8)"-----------------------------------------------\n");
-    for (uIndex = 0; uIndex < KEEP_ALIVE_MAX_USER_MESSAGES; uIndex++)
-    {
-        if (TRUE == tConfig.templates[ uIndex ].keepAliveParams.enaDisFlag)
-        {
-            CU_CMD_FIND_NAME_ARRAY (uNameIndex, tKeepAliveTriggerTypes, 
-                                    tConfig.templates[ uIndex ].keepAliveParams.trigType);
-            CuCmd_xtoa_string (&(tConfig.templates[ uIndex ].msgBuffer[ 0 ]), 
-                               tConfig.templates[ uIndex ].msgBufferLength, (U8*)&(msgBuffer[ 0 ]));
-                             os_error_printf (CU_MSG_ERROR, (PS8)"%-8d %-8d %-9s %-10d %s\n", uIndex, 
-                             tConfig.templates[ uIndex ].keepAliveParams.enaDisFlag,
-                             tKeepAliveTriggerTypes[ uNameIndex ].name,
-                             tConfig.templates[ uIndex ].keepAliveParams.interval,
-                             &(msgBuffer[ 0 ]));
-        }
-        else
-        {
-            os_error_printf (CU_MSG_ERROR, (PS8)"%-8d %-8d %-9s %-10d %s\n", uIndex, 0, (PS8)"N/A", 0, (PS8)"N/A");
-        }
-    }
-}
-
-
-VOID CuCmd_SetArpIPFilter (THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-
-    TIpAddr     staIp;
-    CuCmd_t     *pCuCmd = (CuCmd_t*)hCuCmd;
-    TI_UINT8    length = 4;
-
-    if (length != nParms)
-    {
-        os_error_printf (CU_MSG_ERROR, (PS8)"Error! IP format requires 4 parameters as follows: <Part1> <Part2> <Part3> <Part4>  \n");
-        os_error_printf (CU_MSG_ERROR, (PS8)"Please note! IP of 0 0 0 0 will disable the arp filtering feature \n");
-        return;
-    }
-
-    staIp[0] = (TI_UINT8)parm[0].value;
-    staIp[1] = (TI_UINT8)parm[1].value;
-    staIp[2] = (TI_UINT8)parm[2].value;
-    staIp[3] = (TI_UINT8)parm[3].value;
-
-
-     if (OK != CuCommon_SetBuffer (pCuCmd->hCuCommon, SITE_MGR_SET_WLAN_IP_PARAM, staIp, length))
-    {
-        os_error_printf (CU_MSG_ERROR, (PS8)"Unable to configure ARP IP filter \n");
-    }
-
-}
-
-VOID CuCmd_ShowAbout(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-    S8 FwVesrion[FW_VERSION_LEN];
-
-    if(OK != CuCommon_GetBuffer(pCuCmd->hCuCommon, SITE_MGR_FIRMWARE_VERSION_PARAM,
-        FwVesrion, FW_VERSION_LEN)) return;
-    
-#ifdef XCC_MODULE_INCLUDED
-    os_error_printf(CU_MSG_INFO2, (PS8)"Driver version: %s_XCC\n", 
-                                                SW_VERSION_STR);
-#elif GEM_SUPPORTED
-    os_error_printf(CU_MSG_INFO2, (PS8)"Driver version: %s_GEM\n", 
-                                                SW_VERSION_STR);
-#else
-    os_error_printf(CU_MSG_INFO2, (PS8)"Driver version: %s_NOCCX\n", 
-                                                SW_VERSION_STR);
-#endif/* XCC_MODULE_INCLUDED*/
-    os_error_printf(CU_MSG_INFO2, (PS8)"Firmware version: %s\n", 
-                                                FwVesrion);
-    
-}
-
-VOID CuCmd_Quit(THandle hCuCmd, ConParm_t parm[], U16 nParms)
-{
-    CuCmd_t* pCuCmd = (CuCmd_t*)hCuCmd;
-
-    Console_Stop(pCuCmd->hConsole);
-}
-
-
diff --git a/wl1271/CUDK/configurationutility/src/cu_common.c b/wl1271/CUDK/configurationutility/src/cu_common.c
deleted file mode 100644
index 5357126..0000000
--- a/wl1271/CUDK/configurationutility/src/cu_common.c
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- * cu_common.c
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************
-*
-*   MODULE:  CU_Common.c
-*   
-*   PURPOSE: 
-* 
-*   DESCRIPTION:  
-*   ============
-*      
-*
-****************************************************************************/
-
-/* includes */
-/************/
-#include "cu_osapi.h"
-#include "oserr.h"
-
-#include "TWDriver.h"
-#include "convert.h"
-
-#include "ipc_sta.h"
-#include "cu_common.h"
-
-/* defines */
-/***********/
-
-/* local types */
-/***************/
-/* Module control block */
-typedef struct CuCommon_t
-{
-    THandle hIpcSta;
-} CuCommon_t;
-
-
-typedef enum
-{
-    DRIVER_STATUS_IDLE              = 0,
-    DRIVER_STATUS_RUNNING           = 1
-} PARAM_OUT_Driver_Status_e;
-
-
-/* local variables */
-/*******************/
-
-/* local fucntions */
-/*******************/
-
-
-/* functions */
-/*************/
-THandle CuCommon_Create(THandle *pIpcSta, const PS8 device_name)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)os_MemoryCAlloc(sizeof(CuCommon_t), sizeof(U8));
-    if(pCuCommon == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)("ERROR - CuCommon_Create - cant allocate control block\n") );
-        return NULL;
-    }
-
-    pCuCommon->hIpcSta = IpcSta_Create(device_name);
-    if(pCuCommon->hIpcSta == NULL)
-    {   
-        CuCommon_Destroy(pCuCommon);
-        return NULL;
-    }
-    *pIpcSta = pCuCommon->hIpcSta;
-
-    return pCuCommon;
-}
-
-VOID CuCommon_Destroy(THandle hCuCommon)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-
-    if(pCuCommon->hIpcSta)
-        IpcSta_Destroy(pCuCommon->hIpcSta);
-
-    os_MemoryFree(pCuCommon);
-}
-
-S32 CuCommon_SetU32(THandle hCuCommon, U32 PrivateIoctlId, U32 Data)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res;
-
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, PrivateIoctlId, &Data, sizeof(U32), 
-                                                NULL, 0);
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;  
-}
-
-S32 CuCommon_GetU32(THandle hCuCommon, U32 PrivateIoctlId, PU32 pData)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res;
-
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, PrivateIoctlId, NULL, 0, 
-                                                pData, sizeof(U32));
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;  
-}
-
-S32 CuCommon_SetU16(THandle hCuCommon, U32 PrivateIoctlId, U16 Data)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res;
-
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, PrivateIoctlId, &Data, sizeof(U16), 
-                                                NULL, 0);
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;  
-}
-
-S32 CuCommon_SetU8(THandle hCuCommon, U32 PrivateIoctlId, U8 Data)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res;
-
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, PrivateIoctlId, &Data, sizeof(U8), 
-                                                NULL, 0);
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;  
-}
-
-
-S32 CuCommon_GetU8(THandle hCuCommon, U32 PrivateIoctlId, PU8 pData)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res;
-
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, PrivateIoctlId, NULL, 0, 
-                                                pData, sizeof(U8));
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;  
-}
-
-
-S32 CuCommon_SetBuffer(THandle hCuCommon, U32 PrivateIoctlId, PVOID pBuffer, U32 len)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon; 
-    S32 res;
-
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, PrivateIoctlId, pBuffer, len, 
-                                                NULL, 0);
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;      
-}
-
-S32 CuCommon_GetBuffer(THandle hCuCommon, U32 PrivateIoctlId, PVOID pBuffer, U32 len)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon; 
-    S32 res;
-
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, PrivateIoctlId, NULL, 0, 
-                                                pBuffer, len);
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;      
-}
-
-S32 CuCommon_GetSetBuffer(THandle hCuCommon, U32 PrivateIoctlId, PVOID pBuffer, U32 len)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon; 
-    S32 res;
-
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, PrivateIoctlId, pBuffer, len, 
-                                                pBuffer, len);
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;      
-}
-   
-S32 CuCommon_Get_BssidList_Size(THandle hCuCommon, PU32 pSizeOfBssiList)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon; 
-    S32 res;
-
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, SCAN_CNCN_BSSID_LIST_SIZE_PARAM, NULL, 0, 
-                                                pSizeOfBssiList, sizeof(U32));
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;      
-}
-
-S32 CuCommon_GetRssi(THandle hCuCommon, PS8 pdRssi, PS8 pbRssi)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon; 
-    S32 res;    
-    TCuCommon_RoamingStatisticsTable buffer;
-    
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, TIWLN_802_11_RSSI, NULL, 0, 
-                                                &buffer, sizeof(TCuCommon_RoamingStatisticsTable));
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    *pdRssi = (S8)buffer.rssi;
-	*pbRssi = (S8)buffer.rssiBeacon;
-
-    return OK;
-}
-
-S32 CuCommon_GetSnr(THandle hCuCommon, PU32 pdSnr, PU32 pbSnr)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon; 
-    S32 res;
-    TCuCommon_RoamingStatisticsTable buffer;
-        
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, TWD_SNR_RATIO_PARAM, NULL, 0, 
-                                                &buffer, sizeof(TCuCommon_RoamingStatisticsTable));
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-	*pdSnr = (U32)buffer.snr;
-	*pbSnr = (U32)buffer.snrBeacon;
-
-    return OK;
-}
-
-S32 CuCommon_GetTxStatistics(THandle hCuCommon, TIWLN_TX_STATISTICS* pTxCounters, U32 doReset)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon; 
-    S32 res;
-
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, TIWLN_802_11_TX_STATISTICS, pTxCounters, sizeof(TIWLN_TX_STATISTICS),
-                                                pTxCounters, sizeof(TIWLN_TX_STATISTICS));
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    if(doReset)
-    {
-        res = IPC_STA_Private_Send(pCuCommon->hIpcSta, TX_CTRL_RESET_COUNTERS_PARAM, NULL, 0, 
-                                                NULL, 0);
-        if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-            return ECUERR_CU_COMMON_ERROR;
-    }
-
-    return OK;      
-}
-
-S32 CuCommon_Radio_Test(THandle hCuCommon,TTestCmd* data)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res;
-
-	res = IPC_STA_Private_Send(pCuCommon->hIpcSta, 
-							   TWD_RADIO_TEST_PARAM, 
-							   (PVOID)data, 
-							   sizeof(TTestCmd),
-							   (PVOID)data, 
-							   sizeof(TTestCmd));
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-	{
-		os_error_printf(CU_MSG_INFO2, (PS8)"In CuCommon_Radio_Test: IPC_STA_Private_Send failed\n");            
-		return ECUERR_CU_COMMON_ERROR;
-	}
-
-    return OK;  
-}
-
-S32 CuCommon_AddKey(THandle hCuCommon, OS_802_11_WEP* pKey)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res;    
-    OS_802_11_KEY  key;
-
-    os_memset(&key, 0, sizeof(OS_802_11_KEY));
-
-    key.Length = pKey->Length;
-    key.KeyIndex = (pKey->KeyIndex & 0x80000000) | (pKey->KeyIndex & 0x3FFFFFFF);
-    key.KeyLength = pKey->KeyLength;
-    os_memcpy(key.KeyMaterial, pKey->KeyMaterial, pKey->KeyLength);
-
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, RSN_ADD_KEY_PARAM, &key, sizeof(OS_802_11_KEY), 
-                                                NULL, 0);
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;  
-}
-
-S32 CuCommon_RemoveKey(THandle hCuCommon, U32 KeyIndex)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res;
-    OS_802_11_KEY  key;
-
-    os_memset(&key, 0, sizeof(OS_802_11_KEY));
-    key.KeyIndex = KeyIndex;
-    
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, RSN_REMOVE_KEY_PARAM, &key, sizeof(OS_802_11_KEY), 
-                                                NULL, 0);
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;  
-}
-
-S32 CuCommon_GetDfsChannels(THandle hCuCommon, PU16 pMinDfsChannel, PU16 pMaxDfsChannel)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res;
-    DFS_ChannelRange_t DFS_ChannelRange;
-    
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, TIWLN_REG_DOMAIN_GET_DFS_RANGE, NULL, 0, 
-                                                &DFS_ChannelRange, sizeof(DFS_ChannelRange_t));
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    *pMaxDfsChannel = DFS_ChannelRange.maxDFS_channelNum;
-    *pMinDfsChannel = DFS_ChannelRange.minDFS_channelNum;
-
-    return OK;  
-}
-
-S32 CuCommon_SetDfsChannels(THandle hCuCommon, U16 MinDfsChannel, U16 MaxDfsChannel)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res;
-    DFS_ChannelRange_t DFS_ChannelRange;
-
-    DFS_ChannelRange.maxDFS_channelNum = MaxDfsChannel;
-    DFS_ChannelRange.minDFS_channelNum = MinDfsChannel;
-    
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, TIWLN_REG_DOMAIN_SET_DFS_RANGE, &DFS_ChannelRange, sizeof(DFS_ChannelRange_t),
-                                                NULL, 0);
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;  
-}
-
-S32 CuCommon_PrintDriverDebug(THandle hCuCommon, PVOID pParams, U32 param_size)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res;
-
-	if ( pParams == NULL )
-	{
-		return ECUERR_CU_COMMON_ERROR;
-	}
-
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, TIWLN_DISPLAY_STATS, pParams, param_size,
-							   NULL, 0);
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;  
-}
-
-S32 CuCommon_PrintDriverDebugBuffer(THandle hCuCommon, U32 func_id, U32 opt_param)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res, len;
-    U8 buf[260];  /* no more then 256 + func id */
-
-    if (opt_param == 0)
-        return ECUERR_CU_ERROR;
-
-    len = os_strlen((PS8)opt_param);
-    *(PU32)buf = func_id;
-    os_memcpy((PS8)buf + sizeof(U32),(PS8)opt_param, len);
-        
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, TIWLN_DISPLAY_STATS, buf, len + sizeof(U32),
-                                                NULL, 0);
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    return OK;  
-}
-
-
-S32 CuCommon_GetRxDataFiltersStatistics(THandle hCuCommon, PU32 pUnmatchedPacketsCount, PU32 pMatchedPacketsCount)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    S32 res;
-    TCuCommon_RxDataFilteringStatistics buffer;
-    
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, TIWLN_GET_RX_DATA_FILTERS_STATISTICS, NULL, 0,
-                                                &buffer, sizeof(TCuCommon_RxDataFilteringStatistics));
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    *pUnmatchedPacketsCount = buffer.unmatchedPacketsCount;
-    os_memcpy(pMatchedPacketsCount, &buffer.matchedPacketsCount, MAX_DATA_FILTERS*sizeof(U32));
-
-    return OK;  
-}
-
-
-S32 CuCommon_GetPowerConsumptionStat(THandle hCuCommon, ACXPowerConsumptionTimeStat_t *pPowerstat)
-{
-    CuCommon_t* pCuCommon = (CuCommon_t*)hCuCommon;
-    ACXPowerConsumptionTimeStat_t tStatistics;
-    S32 res;
-
-    
-    res = IPC_STA_Private_Send(pCuCommon->hIpcSta, TIWLN_GET_POWER_CONSUMPTION_STATISTICS, NULL, 0,
-                                                &tStatistics, sizeof(ACXPowerConsumptionTimeStat_t));
-
-    if(res == EOALERR_IPC_STA_ERROR_SENDING_WEXT)
-        return ECUERR_CU_COMMON_ERROR;
-
-    os_memcpy(pPowerstat, &tStatistics, sizeof(ACXPowerConsumptionTimeStat_t));
-
-    return OK;  
-}
-
-
-
-
-
-
-
diff --git a/wl1271/CUDK/configurationutility/src/ticon.c b/wl1271/CUDK/configurationutility/src/ticon.c
deleted file mode 100644
index 1d4baf5..0000000
--- a/wl1271/CUDK/configurationutility/src/ticon.c
+++ /dev/null
@@ -1,1215 +0,0 @@
-/*
- * ticon.c
- *
- * Copyright 2001-2010 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************
-*
-*   MODULE:  ticon.c
-*   
-*   PURPOSE: 
-* 
-*   DESCRIPTION:  
-*   ============
-*      
-*
-****************************************************************************/
-
-/* includes */
-/************/
-#include "cu_osapi.h"
-#include "oserr.h"
-
-#include "TWDriver.h"
-#include "STADExternalIf.h"
-
-#include "console.h"
-#include "cu_cmd.h"
-#include "wpa_core.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "cu_XCC.h"
-#endif
-
-/* defines */
-/***********/
-#ifdef DEBUG
-#define CHK_NULL(p)    ((p)) ? (VOID) 0 : os_error_printf(CU_MSG_ERROR, (PS8)"\nfailed: '%s', file %s, line %d\n", #p, __FILE__, __LINE__);
-#define CHK(p)        ((!p)) ? (VOID) 0 : os_error_printf(CU_MSG_ERROR, (PS8)"\nfailed: '%s', file %s, line %d\n", #p, __FILE__, __LINE__);
-#else
-#define CHK(p)        (p)
-#define CHK_NULL(p)    (p)
-#endif
-
-#define TIWLAN_DRV_NAME "tiwlan0"
-#ifdef ANDROID
-#define SUPPL_IF_FILE "/data/misc/wifi/sockets/" TIWLAN_DRV_NAME
-#else
-#define SUPPL_IF_FILE "/var/run/" TIWLAN_DRV_NAME
-#endif
-extern int consoleRunScript( char *script_file, THandle hConsole);
-    
-/* local types */
-/***************/
-/* Module control block */
-typedef struct TiCon_t
-{
-	THandle 	hConsole;	
-    S8          drv_name[IF_NAME_SIZE];
-} TiCon_t;
-
-/* local variables */
-/*******************/
-static TiCon_t g_TiCon;
-
-/* local fucntions */
-/*******************/
-static S32 TiCon_Init_Console_Menu(TiCon_t* pTiCon)
-{
-    THandle h, h1;
-    THandle h2;
-
-
-
-    /* -------------------------------------------- Driver -------------------------------------------- */
-	
-    CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"Driver", (PS8)"Driver start/stop" ) );	
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"Start", (PS8)"Start driver", (FuncToken_t) CuCmd_StartDriver, NULL );
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"sTop", (PS8)"Stop driver",  (FuncToken_t) CuCmd_StopDriver,  NULL );
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"stAtus", (PS8)"Print status", (FuncToken_t) CuCmd_Show_Status, NULL );
-	
-    /* -------------------------------------------- Connection -------------------------------------------- */
-	
-    CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"Connection", (PS8)"Connection management" ) );
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"Bssid_list", (PS8)"Bssid_list", (FuncToken_t) CuCmd_BssidList, NULL );
-	{
-		ConParm_t aaa[]  = { {(PS8)"ssid", 	CON_PARM_STRING | CON_PARM_OPTIONAL, 0, 32, 0 },
-		                     {(PS8)"bssid", CON_PARM_STRING | CON_PARM_OPTIONAL, 0, 32, 0 },
-							 CON_LAST_PARM };
-		
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Connect", (PS8)"Connect", (FuncToken_t) CuCmd_Connect, aaa );
-	}
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"Disassociate", (PS8)"disconnect", (FuncToken_t) CuCmd_Disassociate, NULL );
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"Status", (PS8)"Print connection status", (FuncToken_t) CuCmd_Show_Status, NULL );
-#ifdef TI_DBG 
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"Full_bssid_list", (PS8)"Full_bssid_list", (FuncToken_t) CuCmd_FullBssidList, NULL );
-#endif
-	
-#ifdef CONFIG_WPS
-	CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h, (PS8)"wPs", (PS8)"WiFi Protected Setup" ) );
-	Console_AddToken(pTiCon->hConsole,h1, (PS8)"Pin", (PS8)"Acquire profile using PIN", (FuncToken_t) CuCmd_StartEnrolleePIN, NULL );
-	Console_AddToken(pTiCon->hConsole,h1, (PS8)"pBc", (PS8)"Acquire profile using Push Button", (FuncToken_t) CuCmd_StartEnrolleePBC, NULL );
-	Console_AddToken(pTiCon->hConsole,h1, (PS8)"Stop", (PS8)"Stop WiFi Protected Setup", (FuncToken_t) CuCmd_StopEnrollee, NULL );
-	{
-		ConParm_t aaa[]  =
-		{
-			{(PS8)"PIN", CON_PARM_STRING, 0, 8, 0 },
-				CON_LAST_PARM
-		};	
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"set pIn", (PS8)"Set PIN code", (FuncToken_t) CuCmd_SetPin, aaa );
-	}
-#endif /* CONFIG_WPS */
-
-    /* -------------------------------------------- Management -------------------------------------------- */
-	
-    CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"Management", (PS8)"Station management" ) );
-	{
-		ConParm_t aaa[]  = { {(PS8)"connectMode", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"connect moDe", (PS8)"Set Connect Mode", (FuncToken_t) CuCmd_ModifyConnectMode, aaa );
-	}
-	{
-		ConParm_t aaa[]  = { {(PS8)"channel", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Channel", (PS8)"Set the channel", (FuncToken_t) CuCmd_ModifyChannel, aaa );
-	}
-	{
-		ConParm_t aaa[]  = { {(PS8)"tx rate", CON_PARM_STRING | CON_PARM_OPTIONAL, 0, 32, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Rate", (PS8)"Get TX data rate in Mbps (1,2,5.5,11...)", (FuncToken_t) CuCmd_GetTxRate, aaa );
-	}
-	{
-		ConParm_t aaa[]  = { {(PS8)"BSS_type", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Mode", (PS8)"BSS_type", (FuncToken_t) CuCmd_ModifyBssType, aaa );
-	}
-	{
-		ConParm_t aaa[]  = { {(PS8)"frag", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Frag", (PS8)"Set the fragmentation threshold <256..2346>", (FuncToken_t) CuCmd_ModifyFragTh, aaa );
-	}
-	{
-		ConParm_t aaa[]  = { {(PS8)"rts", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"rts", (PS8)"Set RTS threshold <0..2347>", (FuncToken_t) CuCmd_ModifyRtsTh, aaa);
-	}
-	{
-		ConParm_t aaa[]  = { {(PS8)"preamble", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 1, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Preamble", (PS8)"Set preamble type 1=short 0=long", (FuncToken_t) CuCmd_ModifyPreamble, aaa );
-	}
-	{
-		ConParm_t aaa[]  = { {(PS8)"slot", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"sLot", (PS8)"Set short  slot", (FuncToken_t) CuCmd_ModifyShortSlot, aaa );
-	}
-	{
-		ConParm_t aaa[]  = { {(PS8)"radio on//off", CON_PARM_OPTIONAL, 0, 1, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"rAdio on/off", (PS8)"Turn radio on/off. 0=OFF, 1=ON", (FuncToken_t) CuCmd_RadioOnOff, aaa );
-	}
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"Info", (PS8)"Get Selected BSSID Info", (FuncToken_t) CuCmd_GetSelectedBssidInfo, NULL );
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"siGnal", (PS8)"Get Current RSSI level", (FuncToken_t) CuCmd_GetRsiiLevel, NULL );
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"snr ratiO", (PS8)"Get Current SNR radio", (FuncToken_t) CuCmd_GetSnrRatio, NULL );
-	
-	
-	{
-		ConParm_t aaa[]  = { {(PS8)"Tx power level", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"tX_power_table", (PS8)"show Tx power table", (FuncToken_t) CuCmd_ShowTxPowerTable, aaa );
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"tx_power_dBm_div10", (PS8)"Tx power level", (FuncToken_t) CuCmd_TxPowerDbm, aaa );
-	}	
-	CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h, (PS8)"802_11d_h",  (PS8)"802_11D_H" ) );
-	{
-		ConParm_t aaa[]  = { {(PS8)"802_11_D", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		ConParm_t bbb[]  = {
-			{(PS8)"min DFS channel", CON_PARM_RANGE, 36, 180, 40 },
-			{(PS8)"max DFS channel", CON_PARM_RANGE, 36, 180, 140 },
-			CON_LAST_PARM};
-			
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"D_enableDisable", (PS8)"enableDisable_d", (FuncToken_t) CuCmd_ModifyState_802_11d, aaa );
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"H_enableDisable", (PS8)"enableDisable_h", (FuncToken_t) CuCmd_ModifyState_802_11h, aaa );
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"d_Country_2_4Ie", (PS8)"d_Country_2_4Ie", (FuncToken_t) CuCmd_D_Country_2_4Ie, aaa );
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"d_cOuntry_5Ie", (PS8)"d_Country_5Ie", (FuncToken_t) CuCmd_D_Country_5Ie, aaa );
-			
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"dfS_range", (PS8)"DFS_range", (FuncToken_t) CuCmd_ModifyDfsRange, bbb );
-			
-	}
-	CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h, (PS8)"beacoN", (PS8)"Set Beacon Filter Desired State" ) );
-	{
-		ConParm_t beaconFilterDesiredState[]  = { {(PS8)"Set Beacon Desired State", CON_PARM_OPTIONAL, 0, 0, 0 },
-			CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Set Beacon Filter Desired State", (PS8)"Set Beacon Filter Current State", (FuncToken_t) CuCmd_SetBeaconFilterDesiredState, beaconFilterDesiredState );
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Get Beacon Filter Current State", (PS8)"Get Beacon Filter Current State", (FuncToken_t) CuCmd_GetBeaconFilterDesiredState, NULL );
-	}
-	
-	CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole, (THandle) h, (PS8)"adVanced", (PS8)"Advanced params" ) );
-	{
-		ConParm_t aaa[]  = { { (PS8)"rates", CON_PARM_OPTIONAL | CON_PARM_LINE, 0, 120, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole, h1, (PS8)"Supported rates",  (PS8)"rates", (FuncToken_t) CuCmd_ModifySupportedRates, aaa );
-	}
-    Console_AddToken(pTiCon->hConsole, h1, (PS8)"Health-check", (PS8)"Send health-check to device", (FuncToken_t) CuCmd_SendHealthCheck, NULL );
-	CHK_NULL(h2 = (THandle) Console_AddDirExt(pTiCon->hConsole, (THandle) h1, (PS8)"rx data Filter", (PS8)"Rx Data Filter" ) );
-    Console_AddToken(pTiCon->hConsole, h2, (PS8)"Enable",  (PS8)"Enable Rx Data Filtering", (FuncToken_t) CuCmd_EnableRxDataFilters, NULL );
-    Console_AddToken(pTiCon->hConsole, h2, (PS8)"Disable", (PS8)"Enable Rx Data Filtering", (FuncToken_t) CuCmd_DisableRxDataFilters, NULL );
-    {
-        ConParm_t aaa[]  = 
-        {
-            {(PS8)"Offset", CON_PARM_RANGE, 0, 255, 0 },
-            {(PS8)"Mask", CON_PARM_STRING, 0, 64, 0 },
-            {(PS8)"Pattern", CON_PARM_STRING, 0, 128, 0 },
-            CON_LAST_PARM
-        };
-        Console_AddToken(pTiCon->hConsole, h2, (PS8)"Add", (PS8)"Add Rx Data Filter", (FuncToken_t) CuCmd_AddRxDataFilter, aaa );
-    }
-    {
-        ConParm_t aaa[]  = 
-        {
-            {(PS8)"Offset", CON_PARM_RANGE, 0, 255, 0 },
-            {(PS8)"Mask", CON_PARM_STRING, 0, 64, 0 },
-            {(PS8)"Pattern", CON_PARM_STRING, 0, 128, 0 },
-            CON_LAST_PARM
-        };
-        Console_AddToken(pTiCon->hConsole, h2, (PS8)"Remove", (PS8)"Remove Rx Data Filter", (FuncToken_t) CuCmd_RemoveRxDataFilter, aaa );
-    }
-    Console_AddToken(pTiCon->hConsole, h2, (PS8)"Statistics", (PS8)"Print Rx Data Filtering Statistics", (FuncToken_t) CuCmd_GetRxDataFiltersStatistics, NULL );
-    CHK_NULL(h2 = (THandle) Console_AddDirExt(pTiCon->hConsole, (THandle) h1, (PS8)"Keep alive", (PS8)"Keep Alive templates" ) );
-    Console_AddToken(pTiCon->hConsole, h2, (PS8)"Enable", (PS8)"Set global keep-alive flag to enable", (FuncToken_t)CuCmd_EnableKeepAlive, NULL );
-    Console_AddToken(pTiCon->hConsole, h2, (PS8)"Disable", (PS8)"Set global keep-alive flag to disable", (FuncToken_t)CuCmd_DisableKeepAlive, NULL );
-    {
-        ConParm_t aaa[]  = 
-        {
-            {(PS8)"Index", CON_PARM_RANGE, 0, 1, 0 },
-            {(PS8)"Interval (msec)", CON_PARM_RANGE, 0, 1000000, 60000 },
-            {(PS8)"Trigger type (0-idle 1-always)", CON_PARM_RANGE, 0, 1, 0 },
-            {(PS8)"Pattern (hex data)", CON_PARM_STRING, 0, KEEP_ALIVE_TEMPLATE_MAX_LENGTH * 2, 0 },
-            CON_LAST_PARM
-        };
-        Console_AddToken(pTiCon->hConsole, h2, (PS8)"Add", (PS8)"Add a new keep-alive template", (FuncToken_t)CuCmd_AddKeepAliveMessage, aaa );
-    }
-    {
-        ConParm_t aaa[]  = 
-        {
-            {(PS8)"Index", CON_PARM_RANGE, 0, 1, 0 },
-            CON_LAST_PARM
-        };
-        Console_AddToken(pTiCon->hConsole, h2, (PS8)"Remove", (PS8)"Remove a keep-alive template", (FuncToken_t)CuCmd_RemoveKeepAliveMessage, aaa );
-    }
-    Console_AddToken(pTiCon->hConsole, h2, (PS8)"Show", (PS8)"Show all configured keep-alive templates", (FuncToken_t)CuCmd_ShowKeepAlive, NULL );
-
-	/* -------------------------------------------- Show -------------------------------------------- */	
-    CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"Show", (PS8)"Show params" ) );
-	Console_AddToken(pTiCon->hConsole, h, (PS8)"Statistics", (PS8)"Show statistics", (FuncToken_t) CuCmd_ShowStatistics, NULL );
-	{
-		ConParm_t aaa[]  = { {(PS8)"Clear stats on read", CON_PARM_OPTIONAL | CON_PARM_RANGE, 0, 1, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Txstatistics", (PS8)"Show tx statistics", (FuncToken_t) CuCmd_ShowTxStatistics, aaa );
-	}
-    Console_AddToken(pTiCon->hConsole,h, (PS8)"Advanced", (PS8)"Show advanced params", (FuncToken_t) CuCmd_ShowAdvancedParams, NULL );
-
-    Console_AddToken(pTiCon->hConsole,h, (PS8)"Power consumption",  (PS8)"Show power consumption statistics", (FuncToken_t) Cucmd_ShowPowerConsumptionStats, NULL );
-	
-	/* -------------------------------------------- Privacy -------------------------------------------- */
-	
-	CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"Privacy", (PS8)"Privacy configuration" ) );
-	{
-		ConParm_t aaa[]  = { {(PS8)"mode", CON_PARM_OPTIONAL, 0, 0, 0 },CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Authentication", (PS8)"Set authentication mode",
-			(FuncToken_t)CuCmd_SetPrivacyAuth, aaa ); 
-	}
-#ifdef WPA_ENTERPRISE
-	{
-		ConParm_t aaa[]  = { {(PS8)"type", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Eap", (PS8)"Set EAP type", (FuncToken_t)CuCmd_SetPrivacyEap, aaa );
-	}
-#endif    
-	{
-		ConParm_t aaa[]  = { {(PS8)"type", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"encRyption", (PS8)"Set encryption type", (FuncToken_t)CuCmd_SetPrivacyEncryption, aaa);
-	}	
-#ifdef WPA_ENTERPRISE
-	{
-		ConParm_t aaa[]  = { {(PS8)"type", 0, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Keytype", (PS8)"Set key type", (FuncToken_t) CuCmd_SetPrivacyKeyType, aaa );
-	}
-	
-	{
-		ConParm_t aaa[]  = { {(PS8)"mode", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Mixedmode", (PS8)"Set mixed mode", (FuncToken_t) CuCmd_SetPrivacyMixedMode, aaa );
-	}
-	
-	{
-		ConParm_t aaa[]  = { {(PS8)"mode", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"aNywpamode", (PS8)"Set Any WPA mode", (FuncToken_t) CuCmd_SetPrivacyAnyWpaMode, aaa );
-	}
-
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"User:", CON_PARM_STRING, 0, WPACORE_MAX_CERT_USER_NAME_LENGTH, 0 },
-			{(PS8)"Password:", CON_PARM_STRING | CON_PARM_OPTIONAL, 0, WPACORE_MAX_CERT_PASSWORD_LENGTH , 0 },
-			CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h, (PS8)"Credentials", (PS8)"Set Credentials ", (FuncToken_t)CuCmd_SetPrivacyCredentials, aaa);
-	}
-#endif
-	{                
-		ConParm_t aaa[]  =
-		{
-			{(PS8)"Passphrase", CON_PARM_STRING, WPACORE_MIN_PSK_STRING_LENGTH, WPACORE_MAX_PSK_STRING_LENGTH, 0},                        
-			{(PS8)"key type (hex | text) [text]", CON_PARM_OPTIONAL | CON_PARM_STRING, 0, 5, 0},
-			CON_LAST_PARM
-		};
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"pskPassphrase", (PS8)"Set PSK Passphrase", (FuncToken_t)CuCmd_SetPrivacyPskPassPhrase, aaa );
-	}
-
-#ifdef WPA_ENTERPRISE
-	{
-		ConParm_t aaa[]  = { {(PS8)"Certificate Name:", CON_PARM_STRING, 0, WPACORE_MAX_CERT_FILE_NAME_LENGTH, 0 },
-		{(PS8)"Validate (yes - 1 /no - 0):", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"cerTificate", (PS8)"Set Certificate",(FuncToken_t)CuCmd_SetPrivacyCertificate, aaa);
-		
-	}
-#endif
-#ifdef WPA_SUPPLICANT
-	CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h, (PS8)"Supplicant", (PS8)"Supplicant" ) );
-	{
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Kill", (PS8)"Kill", (FuncToken_t) CuCmd_StopSuppl, NULL );
-		
-		ConParm_t aaa[]  =
-		{
-			{(PS8)"Level", CON_PARM_RANGE, 0, 4, 0 },
-			{(PS8)"Show keys", CON_PARM_RANGE, 0, 1, 0 },
-			{(PS8)"Show timestamps (yes - 1 /no - 0)", CON_PARM_RANGE, 0, 1, 0 },
-			CON_LAST_PARM};
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Debug", (PS8)"Set debug", (FuncToken_t)CuCmd_ChangeSupplDebugLevels, aaa );
-	}
-#endif
-	
-	CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h, (PS8)"Wep", (PS8)"Wep" ) );
-	{
-		ConParm_t aaa[]  =
-		{
-			{(PS8)"Key Value", CON_PARM_STRING, 0, 64, 0},
-			{(PS8)"Tx Key Index", 0, 0, 0, 0 },
-			{(PS8)"Default Key (yes - 1 /no - 0)", 0, 0, 0, 0 },
-			{(PS8)"key type (hex | text) [hex]", CON_PARM_OPTIONAL | CON_PARM_STRING, 0, 5, 0},
-			CON_LAST_PARM
-		};
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Add", (PS8)"Add WEP", (FuncToken_t)CuCmd_AddPrivacyKey, aaa );
-	}
-	{
-		ConParm_t aaa[]  = { {(PS8)"Key Index", 0, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Remove", (PS8)"Remove WEP", (FuncToken_t)CuCmd_RemovePrivacyKey, aaa);
-	}
-	Console_AddToken(pTiCon->hConsole,h1, (PS8)"Get Default Key ID", (PS8)"Get Default Key ID", (FuncToken_t)CuCmd_GetPrivacyDefaultKey, NULL);
-	
-	
-#ifdef XCC_MODULE_INCLUDED
-	CuXCC_AddXCCMenu(pTiCon, h);
-#endif/*XCC_MODULE_INCLUDED*/
-	
-    /* -------------------------------------------- Scan -------------------------------------------- */
-	
-    CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"scAn", (PS8)"Scan Service Configuration" ) );
-    Console_AddToken(pTiCon->hConsole, h, (PS8)"Start", (PS8)"Start One-Shot Application Scan", (FuncToken_t) CuCmd_StartScan, NULL );
-    Console_AddToken(pTiCon->hConsole, h, (PS8)"sTop", (PS8)"Stop One-Shot Application Scan", (FuncToken_t) CuCmd_StopScan, NULL );
-#ifndef NO_WPA_SUPPL
-    {
-         ConParm_t aaa[]  = { {(PS8)"Scan Type (0=Active, 1=Passive)", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 1, 0 },
-								{(PS8)"Ssid", CON_PARM_STRING | CON_PARM_OPTIONAL, 0, 32, 0 },
-                                 CON_LAST_PARM };
-
-         Console_AddToken(pTiCon->hConsole,h, (PS8)"Wextstart", (PS8)"WEXT Start One-Shot Application Scan", (FuncToken_t) CuCmd_WextStartScan, aaa );
-    }
-#endif
-    
-    CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h, (PS8)"configApp", (PS8)"Configure One-Shot Application Scan Params" ) );
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"SSID", CON_PARM_STRING, 0, 33, 0 },
-#ifdef TI_DBG /* limitn application scan to normal only in release version */
-			{(PS8)"Scan Type", CON_PARM_RANGE, SCAN_TYPE_NORMAL_PASSIVE, SCAN_TYPE_TRIGGERED_ACTIVE, 0 },
-#else
-			{(PS8)"Scan Type", CON_PARM_RANGE, SCAN_TYPE_NORMAL_PASSIVE, SCAN_TYPE_NORMAL_ACTIVE, 0 },
-#endif
-			{(PS8)"Band", CON_PARM_RANGE, 0, 1, 0 },
-			{(PS8)"Probe Request Number", CON_PARM_RANGE, 0, 255, 0 },
-			{(PS8)"Probe Request Rate", CON_PARM_RANGE, 0, DRV_RATE_MASK_54_OFDM, 0 },
-			
-#ifdef TI_DBG
-			{(PS8)"Tid", CON_PARM_RANGE, 0, 255, 0 },
-#endif
-			{(PS8)"Number of Channels", CON_PARM_RANGE, 0, 16, 0 },
-			CON_LAST_PARM };
-            Console_AddToken(pTiCon->hConsole,h1, (PS8)"Global", (PS8)"Config Global Params", (FuncToken_t) CuCmd_ScanAppGlobalConfig, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Index", CON_PARM_RANGE, 0, 30, 0 },
-			{(PS8)"BSSID (xx:xx:xx:xx:xx:xx)", CON_PARM_STRING, 0, 18, 0 },
-			{(PS8)"Max Dwell Time", CON_PARM_RANGE, 0, 100000000, 0 },
-			{(PS8)"Min Dwell Time", CON_PARM_RANGE, 0, 100000000, 0 },
-			{(PS8)"ET Condition", CON_PARM_RANGE, SCAN_ET_COND_DISABLE, SCAN_ET_COND_ANY_FRAME, 0 },
-			{(PS8)"ET Frame Number", CON_PARM_RANGE, 0, 255, 0 },
-			{(PS8)"TX power level", CON_PARM_RANGE, 0, MAX_TX_POWER, 0 },
-			{(PS8)"Channel Number", CON_PARM_RANGE, 0, 255, 0 },
-			CON_LAST_PARM };
-            Console_AddToken(pTiCon->hConsole,h1, (PS8)"Channel", (PS8)"Config Channel Params", (FuncToken_t) CuCmd_ScanAppChannelConfig, aaa );
-	}
-	Console_AddToken(pTiCon->hConsole,h1, (PS8)"cLear", (PS8)"Clear All Params", (FuncToken_t) CuCmd_ScanAppClear, NULL );
-	Console_AddToken(pTiCon->hConsole,h1, (PS8)"Display", (PS8)"Display Params", (FuncToken_t) CuCmd_ScanAppDisplay, NULL );
-	
-    {
-        ConParm_t aaa[]  = {
-            {(PS8)"Aging threshold", CON_PARM_RANGE, 0, 1000, 60 } };
-        Console_AddToken(pTiCon->hConsole,h1, (PS8)"Aging", (PS8)"Set aging threshiold", (FuncToken_t) CuCmd_ScanSetSra, aaa );
-    }
-    {
-        ConParm_t aaa[]  = {
-            {(PS8)"Rssi threshold", CON_PARM_RANGE | CON_PARM_SIGN, -100, 0, -80 } };
-        Console_AddToken(pTiCon->hConsole,h1, (PS8)"Rssi", (PS8)"Set rssi threshiold", (FuncToken_t) CuCmd_ScanSetRssi, aaa );
-    }
-
-    CHK_NULL(h1 = (THandle) Console_AddDirExt (pTiCon->hConsole, (THandle)h, (PS8)"configpEriodic", (PS8)"Configure Periodic Application Scan" ) );
-    {
-        ConParm_t aaa[]  = {
-            {(PS8)"RSSI Threshold", CON_PARM_RANGE | CON_PARM_SIGN, -100, 0, -97 },
-            {(PS8)"SNR threshold", CON_PARM_RANGE | CON_PARM_SIGN, -10, 100, 0 },
-            {(PS8)"Report threshold", CON_PARM_RANGE, 1, 8, 1 },
-            {(PS8)"Terminate on report", CON_PARM_RANGE, 0, 1, 1 },
-            {(PS8)"BSS Type (0-independent, 1-infrastructure, 2-any)", CON_PARM_RANGE, 0, 2, 2 },
-            {(PS8)"Probe request number", CON_PARM_RANGE, 0, 5, 3 },
-            {(PS8)"Number of scan cycles", CON_PARM_RANGE, 0, 100, 0 },
-            {(PS8)"Number of SSIDs", CON_PARM_RANGE, 0, 8, 0 },
-            {(PS8)"SSID List Filter Enabled", CON_PARM_RANGE, 0, 1, 1 },
-            {(PS8)"Number of channels", CON_PARM_RANGE, 0, 32, 14 },
-            CON_LAST_PARM };
-        Console_AddToken (pTiCon->hConsole, h1, (PS8)"Global", (PS8)"Configure global periodic scan parameters", CuCmd_ConfigPeriodicScanGlobal, aaa);
-    }
-    {
-        ConParm_t aaa[]  = {
-            {(PS8)"Index", CON_PARM_RANGE, 0, PERIODIC_SCAN_MAX_INTERVAL_NUM - 1, 0 },
-            {(PS8)"Interval (in millisec)", CON_PARM_RANGE, 0, 3600000, 1000 },
-            CON_LAST_PARM };
-        Console_AddToken (pTiCon->hConsole, h1, (PS8)"Interval", (PS8)"Configure interval table", CuCmd_ConfigPeriodicScanInterval, aaa);
-    }
-    {
-        ConParm_t aaa[] = {
-            {(PS8)"Index", CON_PARM_RANGE, 0, 7, 0 },
-            {(PS8)"Visability (0-public, 1-hidden)", CON_PARM_RANGE, 0, 1, 0 },
-            {(PS8)"SSID", CON_PARM_STRING, 0, 33, 0},
-            CON_LAST_PARM };
-        Console_AddToken (pTiCon->hConsole, h1, (PS8)"SSID", (PS8)"Configure SSID list", CuCmd_ConfigurePeriodicScanSsid, aaa);
-    }
-    {
-        ConParm_t aaa[] = {
-            {(PS8)"Index", CON_PARM_RANGE, 0, 32, 0 },
-            {(PS8)"Band (0-2.4GHz, 1-5GHz)", CON_PARM_RANGE, 0, 1, 0 },
-            {(PS8)"Channel", CON_PARM_RANGE, 0, 180, 0 },
-            {(PS8)"Scan Type (0-passive, 1-active)", CON_PARM_RANGE, 0, 1, 0 },
-            {(PS8)"Min dwell time (in millisec)", CON_PARM_RANGE, 1, 1000, 15 },
-            {(PS8)"Max dwell time (in millisec)", CON_PARM_RANGE, 1, 1000, 100 },
-            {(PS8)"TX power level (dBm*10)", CON_PARM_RANGE, 0, MAX_TX_POWER, 0 },
-            CON_LAST_PARM };
-        Console_AddToken (pTiCon->hConsole, h1, (PS8)"Channel", (PS8)"Configure channel list", CuCmd_ConfigurePeriodicScanChannel, aaa);
-    }
-    Console_AddToken (pTiCon->hConsole, h1, (PS8)"cLear", (PS8)"Clear configuration", CuCmd_ClearPeriodicScanConfiguration, NULL);
-    Console_AddToken (pTiCon->hConsole, h1, (PS8)"Display", (PS8)"Display current configuration", CuCmd_DisplayPeriodicScanConfiguration, NULL);
-    Console_AddToken (pTiCon->hConsole, h1, (PS8)"sTart", (PS8)"Start Periodic Scan", CuCmd_StartPeriodicScan, NULL);
-    Console_AddToken (pTiCon->hConsole, h1, (PS8)"stoP", (PS8)"Stop periodic scan", CuCmd_StopPeriodicScan, NULL);
-
-    CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h, (PS8)"configPolicy", (PS8)"Configure Scan Manager Scan Policy" ) );
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Normal scan interval (msec)", CON_PARM_RANGE, 0, 3600000, 5000 },
-			{(PS8)"Deteriorating scan interval", CON_PARM_RANGE, 0, 3600000, 3000 },
-			{(PS8)"Max Track Failures", CON_PARM_RANGE, 0, 20, 3 },
-			{(PS8)"BSS list size", CON_PARM_RANGE, 0, 16, 8 },
-			{(PS8)"BSS Number to start discovery", CON_PARM_RANGE, 0, 16, 4 },
-			{(PS8)"Number of bands", CON_PARM_RANGE, 0, 2, 1 },
-			CON_LAST_PARM };
-            Console_AddToken(pTiCon->hConsole,h1, (PS8)"Gloabal", (PS8)"Set Global policy Params", (FuncToken_t) CuCmd_ConfigScanPolicy, aaa );
-	}
-	
-	CHK_NULL(h2 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h1, (PS8)"Band", (PS8)"Configure band scan policy" ) );
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Index", CON_PARM_RANGE, 0, 1, 0 },
-			{(PS8)"Band", CON_PARM_RANGE, 0, 1, 0 },
-			{(PS8)"RSSI threshold", CON_PARM_RANGE| CON_PARM_SIGN, -100, 0, 0 },
-			{(PS8)"Channel number for discovery cycle", CON_PARM_RANGE, 0, 30, 5 },
-			{(PS8)"Number of Channels", CON_PARM_RANGE, 0, 30, 0 },
-			CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h2, (PS8)"Misc", (PS8)"Set misc band params",  (FuncToken_t) CuCmd_ConfigScanBand, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Band Index", CON_PARM_RANGE, 0, 1, 0 },
-			{(PS8)"Channel Index", CON_PARM_RANGE, 0, 29, 0 },
-			{(PS8)"Channel", CON_PARM_RANGE, 0, 160, 0 },
-			CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h2, (PS8)"Channel", (PS8)"Set Channel params",  (FuncToken_t) CuCmd_ConfigScanBandChannel, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Band Index", CON_PARM_RANGE, 0, 1, 0 },
-			{(PS8)"Scan Type", CON_PARM_RANGE, 0, 5, 0 },
-			{(PS8)"ET event", CON_PARM_RANGE, SCAN_ET_COND_DISABLE, SCAN_ET_COND_ANY_FRAME, SCAN_ET_COND_DISABLE },
-			{(PS8)"ET num of frames", CON_PARM_RANGE, 0, 255,0 },
-			{(PS8)"Triggering AC", CON_PARM_RANGE, 0, 255, 0 },
-			{(PS8)"Scan Duration (SPS)", CON_PARM_RANGE, 0, 100000000, 2000 },
-			{(PS8)"Max dwell time", CON_PARM_RANGE, 0, 100000000, 60000 },
-			{(PS8)"Min dwell time", CON_PARM_RANGE, 0, 100000000, 30000 },
-			{(PS8)"Probe req. number", CON_PARM_RANGE, 0, 255, 2 },
-			
-			{(PS8)"Probe req. rate", CON_PARM_RANGE, 0, DRV_RATE_MASK_54_OFDM, 0 },
-			
-			{(PS8)"TX power level", CON_PARM_RANGE, 0, MAX_TX_POWER, 0 },
-			CON_LAST_PARM };                
-			Console_AddToken(pTiCon->hConsole,h2, (PS8)"Track", (PS8)"Set tracking method params",  (FuncToken_t) CuCmd_ConfigScanBandTrack, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Band Index", CON_PARM_RANGE, 0, 1, 0 },
-			{(PS8)"Scan Type", CON_PARM_RANGE, 0, 5, 0 },
-			{(PS8)"ET event", CON_PARM_RANGE, SCAN_ET_COND_DISABLE, SCAN_ET_COND_ANY_FRAME, SCAN_ET_COND_DISABLE },
-			{(PS8)"ET num of frames", CON_PARM_RANGE, 0, 255,0 },
-			{(PS8)"Triggering AC", CON_PARM_RANGE, 0, 255, 0 },
-			{(PS8)"Scan Duration (SPS)", CON_PARM_RANGE, 0, 100000000, 2000 },
-			{(PS8)"Max dwell time", CON_PARM_RANGE, 0, 100000000, 60000 },
-			{(PS8)"Min dwell time", CON_PARM_RANGE, 0, 100000000, 30000 },
-			{(PS8)"Probe req. number", CON_PARM_RANGE, 0, 255, 2 },
-			
-			{(PS8)"Probe req. rate", CON_PARM_RANGE, 0, DRV_RATE_MASK_54_OFDM, 0 },
-			
-			{(PS8)"TX power level", CON_PARM_RANGE, 0, MAX_TX_POWER, 0 },
-			CON_LAST_PARM };                
-			Console_AddToken(pTiCon->hConsole,h2, (PS8)"Discovery", (PS8)"Set Discovery method params",  (FuncToken_t) CuCmd_ConfigScanBandDiscover, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Band Index", CON_PARM_RANGE, 0, 1, 0 },
-			{(PS8)"Scan Type", CON_PARM_RANGE, 0, 5, 0 },
-			{(PS8)"ET event", CON_PARM_RANGE, SCAN_ET_COND_DISABLE, SCAN_ET_COND_ANY_FRAME, SCAN_ET_COND_DISABLE },
-			{(PS8)"ET num of frames", CON_PARM_RANGE, 0, 255,0 },
-			{(PS8)"Triggering AC", CON_PARM_RANGE, 0, 255, 0 },
-			{(PS8)"Scan Duration (SPS)", CON_PARM_RANGE, 0, 100000000, 2000 },
-			{(PS8)"Max dwell time", CON_PARM_RANGE, 0, 100000000, 60000 },
-			{(PS8)"Min dwell time", CON_PARM_RANGE, 0, 100000000, 30000 },
-			{(PS8)"Probe req. number", CON_PARM_RANGE, 0, 255, 2 },
-			
-			{(PS8)"Probe req. rate", CON_PARM_RANGE, 0, DRV_RATE_MASK_54_OFDM, 0 },
-			
-			{(PS8)"TX power level", CON_PARM_RANGE, 0, MAX_TX_POWER, 0 },
-			CON_LAST_PARM };                
-			Console_AddToken(pTiCon->hConsole,h2, (PS8)"Immediate", (PS8)"Set Immediate method params",  (FuncToken_t) CuCmd_ConfigScanBandImmed, aaa );
-	}
-	
-	
-	Console_AddToken(pTiCon->hConsole,h1, (PS8)"Display", (PS8)"Display Policy Params", (FuncToken_t) CuCmd_DisplayScanPolicy, NULL );
-	Console_AddToken(pTiCon->hConsole,h1, (PS8)"cLear", (PS8)"Clear Polciy Params", (FuncToken_t) CuCmd_ClearScanPolicy, NULL );
-	Console_AddToken(pTiCon->hConsole,h1, (PS8)"Store", (PS8)"Send policy to scan manager", (FuncToken_t) CuCmd_SetScanPolicy, NULL );
-	Console_AddToken(pTiCon->hConsole,h1, (PS8)"bsslisT", (PS8)"Display BSS list", (FuncToken_t) CuCmd_GetScanBssList, NULL );
-	
-	/* -------------------------------------------- roaminG -------------------------------------------- */
-	
-	/************ ROAMING manager commands - start  ********************/
-    CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"roaminG", (PS8)"Roaming Manager configuration" ) );
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"Enable", (PS8)"Enable Internal Roaming", (FuncToken_t) CuCmd_RoamingEnable, NULL );
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"Disable", (PS8)"Disable Internal Roaming", (FuncToken_t) CuCmd_RoamingDisable, NULL );
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Low pass filter time", CON_PARM_RANGE, 0, 1440, 30 }, CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h, (PS8)"Low pass filter", (PS8)"Time in sec ", (FuncToken_t) CuCmd_RoamingLowPassFilter, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Quality threshold", CON_PARM_RANGE | CON_PARM_SIGN, -150, 0, -70 }, CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h, (PS8)"Quality threshold", (PS8)"Quality indicator", (FuncToken_t) CuCmd_RoamingQualityIndicator, aaa );
-	}
-	
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"Get ", (PS8)"Get Roaming config params ", (FuncToken_t) CuCmd_RoamingGetConfParams, NULL );
-	
-    CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h, (PS8)"Thresholds", (PS8)"Set Roaming MNGR triggers thresholds" ) );
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Tx retry", CON_PARM_RANGE, 0, 255, 20 }, CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"Tx retry ", (PS8)"Consecutive number of TX retries", (FuncToken_t) CuCmd_RoamingDataRetryThreshold, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Bss loss", CON_PARM_RANGE, 1, 255, 4 }, CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"Bss loss ", (PS8)"Number of TBTTs", (FuncToken_t) CuCmd_RoamingNumExpectedTbttForBSSLoss, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"tx Rate threshold", CON_PARM_RANGE, 0, 54, 2 }, CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"tx Rate threshold ", (PS8)"TX rate (fallback) threshold", (FuncToken_t) CuCmd_RoamingTxRateThreshold, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Low rssi threshold", CON_PARM_RANGE | CON_PARM_SIGN, -150, 0, -80 }, CON_LAST_PARM };
-			
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"low rssi thresHold ", (PS8)"Low RSSI threshold", (FuncToken_t) CuCmd_RoamingLowRssiThreshold, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"low Snr threshold", CON_PARM_RANGE, 0, 255, 10 }, CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"low Snr threshold ", (PS8)"Low SNR threshold", (FuncToken_t) CuCmd_RoamingLowSnrThreshold, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"low Quality for scan", CON_PARM_RANGE | CON_PARM_SIGN, -150, -40, -85 }, CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"low Quality for scan ", (PS8)"Increase the background scan", (FuncToken_t) CuCmd_RoamingLowQualityForBackgroungScanCondition, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Normal quality for scan", CON_PARM_RANGE | CON_PARM_SIGN, -150, -40, -70 }, CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"Normal quality for scan ", (PS8)"Reduce the background scan", (FuncToken_t) CuCmd_RoamingNormalQualityForBackgroungScanCondition, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"Index   ", CON_PARM_RANGE, 0, 1, 0  },
-			{(PS8)"Threshold [dB / dBm] ", CON_PARM_RANGE | CON_PARM_SIGN, -100, 100, 0  },
-			{(PS8)"Pacing    [Millisecond] ", CON_PARM_RANGE, 0, 60000, 1000  },
-			{(PS8)"Metric    [0 - bcon_rssi, 1 - pkt_rssi, 2 - bcon_snr, 3 - pkt_snr] ", CON_PARM_RANGE, 0, 3, 0  },
-			{(PS8)"Type      [0 - Level, 1 - Edge] ", CON_PARM_RANGE, 0, 1, 0  },
-			{(PS8)"Direction [0 - Down, 1 - Up, 2 - Both] ", CON_PARM_RANGE, 0, 2, 0  },
-			{(PS8)"Hystersis [dB] ", CON_PARM_RANGE, 0, 255, 0  },
-			{(PS8)"Enable    [0 - Disable, 1 - Enable] ", CON_PARM_RANGE, 0, 1, 0  },
-			CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"User defined trigger\n", (PS8)"User defined FW trigger", (FuncToken_t) CuCmd_CurrBssUserDefinedTrigger, aaa );
-	}
-	
-	/************ ROAMING manager commands - end  ********************/
-	
-    /* -------------------------------------------- QOS -------------------------------------------- */
-	
-	
-    CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"qOs", (PS8)"Quality of service" ) );
-
-    Console_AddToken(pTiCon->hConsole,h, (PS8)"aP params", (PS8)"Get AP QoS parameters", (FuncToken_t) CuCmd_GetApQosParams, NULL );
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"ap Capabilities", (PS8)"Get AP QoS capabilities parameters", (FuncToken_t) CuCmd_GetApQosCapabilities, NULL );
-    {
-		ConParm_t ACid[]  = { {(PS8)"AC", CON_PARM_RANGE, 0, 3, 3  }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"ac Status", (PS8)"Get Current AC Status", (FuncToken_t) CuCmd_GetAcStatus, ACid );
-	}
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"dEsired ps mode", (PS8)"Get desired PS mode", (FuncToken_t) CuCmd_GetDesiredPsMode, NULL );
-    {
-        ConParm_t aaa[]  = {
-            {(PS8)"TID", CON_PARM_RANGE, 0, 7, 0  },
-            {(PS8)"Stream Period (mSec)", CON_PARM_RANGE , 10, 100, 20 },
-            {(PS8)"Tx Timeout (mSec)", CON_PARM_RANGE , 0, 200, 30 },
-            {(PS8)"Enable", CON_PARM_RANGE , 0, 1, 1  },
-            CON_LAST_PARM };
-            Console_AddToken(pTiCon->hConsole,h, (PS8)"set ps rX streaming", (PS8)"Set PS Rx Streaming", (FuncToken_t) CuCmd_SetPsRxDelivery, aaa );
-    }
-    Console_AddToken(pTiCon->hConsole,h, (PS8)"get ps rx streAming", (PS8)"Get PS Rx Streaming parameters", (FuncToken_t) CuCmd_GetPsRxStreamingParams, NULL );
-    {
-        ConParm_t aaa[]  = {
-            {(PS8)"acID", CON_PARM_RANGE, 0, 3, 0  },
-            {(PS8)"MaxLifeTime", CON_PARM_RANGE , 0, 1024, 0  },
-            {(PS8)"PS Delivery Protocol (0 - Legacy, 1 - U-APSD)", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 1, 1 },
-            CON_LAST_PARM };
-            Console_AddToken(pTiCon->hConsole,h, (PS8)"Qosparams", (PS8)"Set QOS Parameters", (FuncToken_t) CuCmd_SetQosParams, aaa );
-    }
-    {
-        ConParm_t aaa[]  = {
-            {(PS8)"PsPoll", CON_PARM_RANGE, 0, 65000, 0  },
-            {(PS8)"UPSD", CON_PARM_RANGE , 0, 65000, 0  },
-            CON_LAST_PARM };
-            Console_AddToken(pTiCon->hConsole,h, (PS8)"Rx TimeOut", (PS8)"Rx TimeOut", (FuncToken_t) CuCmd_SetRxTimeOut, aaa );
-    }
-    {       ConParm_t aaa[]  = {
-        {(PS8)"Type", CON_PARM_RANGE, DSCP_CLSFR, CLSFR_TYPE_MAX, 0  },
-        {(PS8)"D-Tag", CON_PARM_RANGE, CLASSIFIER_DTAG_MIN, CLASSIFIER_DTAG_MAX, CLASSIFIER_DTAG_DEF  },
-        {(PS8)"Param1", CON_PARM_RANGE, 0, 65535, 0 },
-        {(PS8)"Ip1", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 255, 0  },
-        {(PS8)"Ip2", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 255, 0 },
-        {(PS8)"Ip3", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 255, 0 },
-        {(PS8)"Ip4", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 255, 0 },
-        CON_LAST_PARM };
-        Console_AddToken(pTiCon->hConsole,h, (PS8)"Insert class", (PS8)"Insert new classification entry", (FuncToken_t) CuCmd_InsertClsfrEntry, aaa );
-    }
-    {       ConParm_t aaa[]  = {
-        {(PS8)"Type", CON_PARM_RANGE, DSCP_CLSFR, CLSFR_TYPE_MAX, 0  },
-        {(PS8)"D-Tag", CON_PARM_RANGE, CLASSIFIER_DTAG_MIN, CLASSIFIER_DTAG_MAX, CLASSIFIER_DTAG_DEF  },
-        {(PS8)"Param1", CON_PARM_RANGE, 0, 65535, 0 },
-        {(PS8)"Ip1", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 255, 0  },
-        {(PS8)"Ip2", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 255, 0 },
-        {(PS8)"Ip3", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 255, 0 },
-        {(PS8)"Ip4", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 255, 0 },
-        CON_LAST_PARM };
-        Console_AddToken(pTiCon->hConsole,h, (PS8)"remoVe class", (PS8)"Remove classification entry", (FuncToken_t) CuCmd_RemoveClsfrEntry, aaa );
-    }
-
-    CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h, (PS8)"Tspec", (PS8)"TSPEC Sub-menu" ) );
-	{       ConParm_t TspecParams[]  = {
-		{(PS8)"UserPriority", CON_PARM_RANGE, 0, 7, 1  },
-		{(PS8)"NominalMSDUsize", CON_PARM_RANGE, 1, 2312, 1  },
-		{(PS8)"MeanDataRate (Bps units)", CON_PARM_RANGE, 0, 54000000, 0 },
-		{(PS8)"MinimumPHYRate (Mbps units)", CON_PARM_RANGE , 0, 54, 0  },
-		{(PS8)"SurplusBandwidthAllowance", CON_PARM_RANGE , 0, 7, 0 },
-		{(PS8)"UPSD Mode (0 - Legacy, 1 - U-APSD)", CON_PARM_RANGE , 0, 1, 0 },
-		{(PS8)"MinimumServiceInterval (usec)", CON_PARM_RANGE , 0, 1000000000, 0 },
-		{(PS8)"MaximumServiceInterval (usec)", CON_PARM_RANGE , 0, 1000000000, 0 },
-		CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Add", (PS8)"Add TSPEC", (FuncToken_t) CuCmd_AddTspec, TspecParams );
-	}
-	{
-		ConParm_t UPid[]  = { {(PS8)"User priority", CON_PARM_RANGE, 0, 7, 1  }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Get", (PS8)"Get TSPEC Params", (FuncToken_t) CuCmd_GetTspec, UPid );
-	}
-	{
-		ConParm_t UPid[]  = { {(PS8)"UserPriority", CON_PARM_RANGE, 0, 7, 1  }, 
-		{(PS8)"ReasonCode", CON_PARM_RANGE, 32, 45, 32  }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Delete", (PS8)"Delete TSPEC", (FuncToken_t) CuCmd_DeleteTspec, UPid );
-	}
-	
-	{
-		ConParm_t MediumUsageParams[]  = {
-			{(PS8)"AC", CON_PARM_RANGE, 0, 3, 3  },
-			{(PS8)"HighThreshold", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 100, 1  },
-			{(PS8)"LowThreshold", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 100, 1 },
-			CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"Medium usage", (PS8)"Medium usage threshold", (FuncToken_t) CuCmd_ModifyMediumUsageTh, MediumUsageParams );
-	}
-	
-    
-	/* -------------------------------------------- Power Management -------------------------------------------- */
-	
-    CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"poWer", (PS8)"Power Management" ) );
-	{
-		/* Set Power Mode Command */
-		ConParm_t powerModeCmd[]  = {
-			{(PS8)"PowerMode", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 3, 1 }, /* Min/Max/Def */
-				CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h, (PS8)"set_Power_mode", (PS8)"Set user power mode", (FuncToken_t) CuCmd_SetPowerMode, powerModeCmd );
-			
-	}
-	{
-		/* Set Power Save Power level Command */
-		ConParm_t powerSavePowerLevelCmd[]  = {
-			{(PS8)"PowerSavePowerLevel", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 2, 2 }, /* Min/Max/Def */
-				CON_LAST_PARM };
-            Console_AddToken(pTiCon->hConsole,h, (PS8)"set_powersave_powerLevel", (PS8)"Set the Power level during PowerSave", (FuncToken_t) CuCmd_SetPowerSavePowerLevel, powerSavePowerLevelCmd );
-			
-	}
-	{
-		/* Set default Power level Command */
-		ConParm_t defaultPowerLevelCmd[]  = {
-			{(PS8)"DefaultPowerLevel", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 2, 2 }, /* Min/Max/Def */
-				CON_LAST_PARM };
-            Console_AddToken(pTiCon->hConsole,h, (PS8)"set_deFault_powerlevel", (PS8)"Set the default power level", (FuncToken_t) CuCmd_SetDefaultPowerLevel, defaultPowerLevelCmd );
-			
-	}
-	{
-		/* Set doze mode in auto power mode */
-		ConParm_t powerSaveDozeMode[]  = {
-			{(PS8)"DozeModeInAuto", CON_PARM_RANGE | CON_PARM_OPTIONAL, AUTO_POWER_MODE_DOZE_MODE_MIN_VALUE, AUTO_POWER_MODE_DOZE_MODE_MAX_VALUE, AUTO_POWER_MODE_DOZE_MODE_DEF_VALUE },
-				CON_LAST_PARM };
-            Console_AddToken(pTiCon->hConsole,h, (PS8)"set_doZe_mode_in_auto", (PS8)"Set doze mode in auto power mode", (FuncToken_t) CuCmd_SetDozeModeInAutoPowerLevel, powerSaveDozeMode );
-			
-	}
-	
-	{
-		ConParm_t TrafficIntensityParams[]  = {
-			{(PS8)"HighThreshold (packets/sec)", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 1000, 100  },
-			{(PS8)"LowThreshold (packets/sec)", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 1000, 25 },
-			{(PS8)"CheckInterval (ms)", CON_PARM_RANGE | CON_PARM_OPTIONAL, 100, 10000, 1000 },
-			CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h, (PS8)"traffic_Thresholds", (PS8)"Set/Get traffic intensity thresholds", (FuncToken_t) CuCmd_SetTrafficIntensityTh, TrafficIntensityParams );
-	}
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"eNable", (PS8)"enable traffic intensity events", (FuncToken_t) CuCmd_EnableTrafficEvents, NULL );
-	Console_AddToken(pTiCon->hConsole,h, (PS8)"Disable", (PS8)"disable traffic intensity events", (FuncToken_t) CuCmd_DisableTrafficEvents, NULL );
-	{
-        /* set DCO-Itrim parameters */
-		ConParm_t dcoItrimParams[]  = { {(PS8)"Enable/Disable <1/0>", CON_PARM_RANGE | CON_PARM_OPTIONAL, DCO_ITRIM_ENABLE_MIN, DCO_ITRIM_ENABLE_MAX, DCO_ITRIM_ENABLE_DEF },
-                                        {(PS8)"Set Moderation Timeout (usec)", CON_PARM_RANGE | CON_PARM_OPTIONAL, DCO_ITRIM_MODERATION_TIMEOUT_MIN, DCO_ITRIM_MODERATION_TIMEOUT_MAX, DCO_ITRIM_MODERATION_TIMEOUT_DEF},
-                                        CON_LAST_PARM };
-        Console_AddToken(pTiCon->hConsole,h, (PS8)"set_dcO_itrim", (PS8)"Set/Get DCO Itrim Parameters", (FuncToken_t) CuCmd_SetDcoItrimParams, dcoItrimParams );
-	}
-
-	/* -------------------------------------------- Events -------------------------------------------- */
-	
-    CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"eVents", (PS8)"Events" ) );
-	{
-		ConParm_t aaa[]  = { {(PS8)"type", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Register", (PS8)"IPC events", (FuncToken_t)CuCmd_RegisterEvents, aaa);
-	}
-	{
-		ConParm_t aaa[]  = { {(PS8)"type", CON_PARM_OPTIONAL, 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Unregister", (PS8)"IPC events", (FuncToken_t)CuCmd_UnregisterEvents, aaa);
-	}
-
-	/* -------------------------------------------- SG -------------------------------------------- */
-    CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"Bt CoExsistance", (PS8)"BT - Wlan CoExsistance" ) );
-	{
-		ConParm_t aaa[]  = { {(PS8)"enable", CON_PARM_RANGE | CON_PARM_OPTIONAL, 
-			SOFT_GEMINI_ENABLED_MIN, SOFT_GEMINI_ENABLED_MAX, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Enable", (PS8)"Enable BT Coexistense", (FuncToken_t) CuCmd_EnableBtCoe, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"coexParamIdx", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-			SOFT_GEMINI_PARAMS_INDEX_MIN, SOFT_GEMINI_PARAMS_INDEX_MAX, SOFT_GEMINI_PARAMS_INDEX_DEF  },
-			{(PS8)"coexParamValue", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-			SOFT_GEMINI_PARAMS_VALUE_MIN, SOFT_GEMINI_PARAMS_VALUE_MAX, SOFT_GEMINI_PARAMS_VALUE_DEF},
-			CON_LAST_PARM };
-
-			Console_AddToken(pTiCon->hConsole, h, (PS8)"Config", (PS8)"Parameters configuration", (FuncToken_t) CuCmd_ConfigBtCoe, aaa );
-	}
-    {
-			ConParm_t aaa[]  = { {(PS8)"status", CON_PARM_RANGE | CON_PARM_OPTIONAL, 0, 3, 0 }, CON_LAST_PARM };
-            Console_AddToken(pTiCon->hConsole, h, (PS8)"Status", (PS8)"Get status", (FuncToken_t) CuCmd_GetBtCoeStatus, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"coexIp", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-			COEX_ACTIVITY_PARAMS_COEX_IP_MIN, COEX_ACTIVITY_PARAMS_COEX_IP_MAX, COEX_ACTIVITY_PARAMS_COEX_IP_DEF  },
-			{(PS8)"activityId", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-			COEX_ACTIVITY_PARAMS_ACTIVITY_ID_MIN, COEX_ACTIVITY_PARAMS_ACTIVITY_ID_MAX, COEX_ACTIVITY_PARAMS_ACTIVITY_ID_DEF},
-			{(PS8)"defaultPriority", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-			COEX_ACTIVITY_PARAMS_DEFAULT_PRIO_MIN, COEX_ACTIVITY_PARAMS_DEFAULT_PRIO_MAX, COEX_ACTIVITY_PARAMS_DEFAULT_PRIO_DEF},
-			{(PS8)"raisedPriority", CON_PARM_RANGE  | CON_PARM_OPTIONAL,
-			COEX_ACTIVITY_PARAMS_RAISED_PRIO_MIN, COEX_ACTIVITY_PARAMS_RAISED_PRIO_MAX, COEX_ACTIVITY_PARAMS_RAISED_PRIO_DEF},
-			{(PS8)"minService", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-			COEX_ACTIVITY_PARAMS_MIN_SERVICE_MIN, COEX_ACTIVITY_PARAMS_MIN_SERVICE_MAX, COEX_ACTIVITY_PARAMS_MIN_SERVICE_DEF  },
-			{(PS8)"maxService", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-			COEX_ACTIVITY_PARAMS_MAX_SERVICE_MIN, COEX_ACTIVITY_PARAMS_MAX_SERVICE_MAX, COEX_ACTIVITY_PARAMS_MAX_SERVICE_DEF},
-			CON_LAST_PARM };
-
-			Console_AddToken(pTiCon->hConsole, h, (PS8)"coexActivity", (PS8)"Coex Activity Parameters configuration", (FuncToken_t) CuCmd_ConfigCoexActivity, aaa );
-	}
-	{
-		ConParm_t aaa[]  = {
-			{(PS8)"enable", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-            FM_COEX_ENABLE_MIN, FM_COEX_ENABLE_MAX, FM_COEX_ENABLE_DEF  },
-			{(PS8)"swallowPeriod", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-            FM_COEX_SWALLOW_PERIOD_MIN, FM_COEX_SWALLOW_PERIOD_MAX, FM_COEX_SWALLOW_PERIOD_DEF  },
-			{(PS8)"nDividerFrefSet1", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-            FM_COEX_N_DIVIDER_FREF_SET1_MIN, FM_COEX_N_DIVIDER_FREF_SET1_MAX, FM_COEX_N_DIVIDER_FREF_SET1_DEF  },
-			{(PS8)"nDividerFrefSet2", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-            FM_COEX_N_DIVIDER_FREF_SET2_MIN, FM_COEX_N_DIVIDER_FREF_SET2_MAX, FM_COEX_N_DIVIDER_FREF_SET2_DEF  },
-			{(PS8)"mDividerFrefSet1", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-            FM_COEX_M_DIVIDER_FREF_SET1_MIN, FM_COEX_M_DIVIDER_FREF_SET1_MAX, FM_COEX_M_DIVIDER_FREF_SET1_DEF  },
-			{(PS8)"mDividerFrefSet2", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-            FM_COEX_M_DIVIDER_FREF_SET2_MIN, FM_COEX_M_DIVIDER_FREF_SET2_MAX, FM_COEX_M_DIVIDER_FREF_SET2_DEF  },
-			{(PS8)"pllStabilizationTime", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-            FM_COEX_PLL_STABILIZATION_TIME_MIN, FM_COEX_PLL_STABILIZATION_TIME_MAX, FM_COEX_PLL_STABILIZATION_TIME_DEF  },
-			{(PS8)"ldoStabilizationTime", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-            FM_COEX_LDO_STABILIZATION_TIME_MIN, FM_COEX_LDO_STABILIZATION_TIME_MAX, FM_COEX_LDO_STABILIZATION_TIME_DEF  },
-			{(PS8)"disturbedBandMargin", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-            FM_COEX_DISTURBED_BAND_MARGIN_MIN, FM_COEX_DISTURBED_BAND_MARGIN_MAX, FM_COEX_DISTURBED_BAND_MARGIN_DEF  },
-			{(PS8)"swallowClkDif", CON_PARM_RANGE | CON_PARM_OPTIONAL ,
-            FM_COEX_SWALLOW_CLK_DIF_MIN, FM_COEX_SWALLOW_CLK_DIF_MAX, FM_COEX_SWALLOW_CLK_DIF_DEF  },
-			CON_LAST_PARM };
-
-			Console_AddToken(pTiCon->hConsole, h, (PS8)"Fm_coexistence", (PS8)"FM Coexistence parameters configuration", (FuncToken_t) CuCmd_ConfigFmCoex, aaa );
-	}
-	
-#ifdef XCC_MODULE_INCLUDED
-	CuXCC_AddMeasurementMenu(pTiCon->hConsole);
-#endif /* XCC_MODULE_INCLUDED*/
-
-#ifdef TI_DBG
-	
-	/* -------------------------------------------- Report -------------------------------------------- */
-	
-    CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"Report", (PS8)"Debug features" ) );
-	{
-		ConParm_t aaa[]  = 
-		{ 
-			{(PS8)"module table", CON_PARM_STRING | CON_PARM_OPTIONAL , REPORT_FILES_NUM, REPORT_FILES_NUM, 0 },
-				CON_LAST_PARM };
-            Console_AddToken(pTiCon->hConsole,h1, (PS8)"Set", (PS8)"set report module table", (FuncToken_t) CuCmd_SetReport, aaa );
-		}
-	{
-		ConParm_t aaa[]  = 
-		{ 
-			{(PS8)"module", CON_PARM_OPTIONAL, 0, 0, 0 }, 
-				CON_LAST_PARM 
-		};
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Add", (PS8)"set report for specified module", (FuncToken_t) CuCmd_AddReport, aaa );
-	}
-	{
-		ConParm_t aaa[]  = 
-		{ 
-			{(PS8)"module", CON_PARM_OPTIONAL, 0, 0, 0 }, 
-				CON_LAST_PARM 
-		};
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Clear", (PS8)"clear report for specified module", (FuncToken_t) CuCmd_ClearReport, aaa );
-	}
-	{
-		ConParm_t aaa[]  = { {(PS8)"level", CON_PARM_OPTIONAL , 0, 0, 0 }, CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Level", (PS8)"set report severity level", (FuncToken_t) CuCmd_ReportSeverityLevel, aaa );
-	}
-	/* -------------------------------------------- Debug -------------------------------------------- */
-	
-    CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"dEbug", (PS8)"Debug features" ) );	
-	{
-		ConParm_t aaa[]  = {{(PS8)"func_num", CON_PARM_OPTIONAL, 0, 0, 0 },
-							{(PS8)"param1 (decimal)", CON_PARM_OPTIONAL , 0, 0, 0 }, 
-							{(PS8)"param2 (decimal)", CON_PARM_OPTIONAL , 0, 0, 0 }, 
-							{(PS8)"R/W Mem buf (up to 32 characters)", CON_PARM_STRING | CON_PARM_OPTIONAL, 0, FW_DEBUG_MAX_BUF * 2, 0 },
-							CON_LAST_PARM };
-		Console_AddToken(pTiCon->hConsole,h, (PS8)"Print", (PS8)"print driver debug info", (FuncToken_t) CuCmd_PrintDriverDebug, aaa );
-
-      CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle)h , (PS8)"Fw Debug", (PS8)"Debug features" ) );
-      {
-       {
-	      ConParm_t aaa[]  = { { (PS8)"debug", CON_PARM_OPTIONAL | CON_PARM_LINE, 0, 2050, 0 }, CON_LAST_PARM };
-	      Console_AddToken(pTiCon->hConsole, h1, (PS8)"debug",  (PS8)" debug", (FuncToken_t) CuCmd_FwDebug, aaa );
-	   }
-      {
-         ConParm_t aaa[]  = { {(PS8)"Index", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,0,255,0},
-                              {(PS8)"Value_1", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  {(PS8)"Value_2", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  {(PS8)"Value_3", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  {(PS8)"Value_4", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  {(PS8)"Value_5", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  {(PS8)"Value_6", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  {(PS8)"Value_7", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  {(PS8)"Value_8", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  {(PS8)"Value_9", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  {(PS8)"Value_10", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  {(PS8)"Value_11", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  {(PS8)"Value_12", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  {(PS8)"Value_13", CON_PARM_OPTIONAL|CON_PARM_RANGE | CON_PARM_SIGN,-4096,4069,0},
-							  CON_LAST_PARM };
-          Console_AddToken(pTiCon->hConsole, h1, (PS8)"Set rate managment",  (PS8)"rate managment", (FuncToken_t) CuCmd_SetRateMngDebug, aaa );
-
-      }
-      {
-         ConParm_t aaa[]  = { {(PS8)"Index", CON_PARM_OPTIONAL,0,4096,0},
-                              {(PS8)"Value", CON_PARM_OPTIONAL,0,4096,0}, CON_LAST_PARM };
-          Console_AddToken(pTiCon->hConsole, h1, (PS8)"Get rate managment",  (PS8)"rate managment", (FuncToken_t) CuCmd_GetRateMngDebug, aaa );
-      }
-
-      {
-         ConParm_t aaa[]  = { {(PS8)"IpPart1", CON_PARM_OPTIONAL,0,255,0},
-                              {(PS8)"IpPart2", CON_PARM_OPTIONAL,0,255,0},
-                              {(PS8)"IpPart3", CON_PARM_OPTIONAL,0,255,0},
-                              {(PS8)"IpPart4", CON_PARM_OPTIONAL,0,255,0},
-                              CON_LAST_PARM };
-
-          Console_AddToken(pTiCon->hConsole, h1, (PS8)"set Arp ip filter",  (PS8)"arp ip filter", (FuncToken_t) CuCmd_SetArpIPFilter, aaa );
-      }
-
-     }
-    }
-
-#endif /*TI_DBG*/
-	
-	/* -------------------------------------------- BIT -------------------------------------------- */
-	
-    CHK_NULL(h = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) NULL, (PS8)"biT", (PS8)"Built In Test" ) );
-
-    CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h, (PS8)"Bip", (PS8)"Built In Production Line Test" ) );
-	{
-		{
-			ConParm_t aaa[]  = {{(PS8)"iReferencePointDetectorValue", CON_PARM_OPTIONAL|CON_PARM_RANGE, 0, 1000, 0 },
-								{(PS8)"iReferencePointPower", CON_PARM_OPTIONAL|CON_PARM_RANGE, 0, 200, 0 },
-								{(PS8)"isubBand", CON_PARM_OPTIONAL|CON_PARM_RANGE, 0, 10, 0 },
-								CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"update Buffer calref point", (PS8)"BufferCalReferencePoint", (FuncToken_t) CuCmd_BIP_BufferCalReferencePoint, aaa );
-		}
-
-		{
-			ConParm_t aaa[]  = {{(PS8)"Sub Band B/G:  1 - 14", CON_PARM_RANGE, 0, 1, 0 },
-                                {(PS8)"Sub Band A:    1 -  4", CON_PARM_RANGE, 0, 1, 0 },
-                                {(PS8)"Sub Band A:    8 - 16", CON_PARM_RANGE, 0, 1, 0 },
-                                {(PS8)"Sub Band A:   34 - 48", CON_PARM_RANGE, 0, 1, 0 },
-                                {(PS8)"Sub Band A:   52 - 64", CON_PARM_RANGE, 0, 1, 0 },
-                                {(PS8)"Sub Band A:  100 -116", CON_PARM_RANGE, 0, 1, 0 },
-                                {(PS8)"Sub Band A:  120 -140", CON_PARM_RANGE, 0, 1, 0 },
-                                {(PS8)"Sub Band A:  149 -165", CON_PARM_RANGE, 0, 1, 0 },
-								CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"Tx bip", (PS8)"P2G Calibration", (FuncToken_t) CuCmd_BIP_StartBIP, aaa );
-		}
-
-        
-      CHK_NULL(h2 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h1, (PS8)"Rx bip", (PS8)"Rx Built In Production Line Test" ) );
-      {
-          {
-           ConParm_t aaa[]  = {{(PS8)"initiates RX BIP operations",CON_PARM_OPTIONAL },
-                              CON_LAST_PARM };
-           Console_AddToken(pTiCon->hConsole,h2, (PS8)"rx Enter", (PS8)"enter Rx Calibration state", (FuncToken_t) CuCmd_BIP_EnterRxBIP, aaa );
-          }
-
-          {
-           ConParm_t aaa[]  = {{(PS8)"Reference point value", CON_PARM_SIGN },
-                              CON_LAST_PARM };
-           Console_AddToken(pTiCon->hConsole,h2, (PS8)"rx Start", (PS8)" Rx Calibration", (FuncToken_t) CuCmd_BIP_StartRxBIP, aaa );
-          }
-
-          {
-           ConParm_t aaa[]  = {{(PS8)"finished the RX BIP procedure" ,CON_PARM_OPTIONAL},
-                              CON_LAST_PARM };
-           Console_AddToken(pTiCon->hConsole,h2, (PS8)"rx eXit", (PS8)"Exit Rx Calibration", (FuncToken_t) CuCmd_BIP_ExitRxBIP, aaa );
-          }
-
-       }
-       
-     
-	}
-
-	CHK_NULL(h1 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h, (PS8)"Radio debug", (PS8)"Radio Debug Test" ) );
-	{
-		/* Get HDK version*/
-		Console_AddToken(pTiCon->hConsole,h1, (PS8)"Get hdk version",  (PS8)"HDK version", (FuncToken_t) CuCmd_RadioDebug_GetHDKVersion, NULL );
-		/* Rx Channel Tune */
-		{
-			ConParm_t aaa[]  = {{(PS8)"Band", CON_PARM_OPTIONAL|CON_PARM_RANGE, 0, 2, 0 },
-								{(PS8)"Channel", CON_PARM_OPTIONAL|CON_PARM_RANGE , 1, 161, 0 }, 
-								CON_LAST_PARM };
-			Console_AddToken(pTiCon->hConsole,h1, (PS8)"cHannel tune", (PS8)"Set the RX channel", (FuncToken_t) CuCmd_RadioDebug_ChannelTune, aaa );
-		}
-		/* TX Debug */
-		CHK_NULL(h2 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h1, (PS8)"Tx debug", (PS8)"TX Debug Test" ) );
-		{
-			/* TELEC */
-			{
-                ConParm_t aaa[]  = {{(PS8)"Power", CON_PARM_OPTIONAL, 0, 25000, 0 },
-                                   {(PS8)"Tone Type", CON_PARM_OPTIONAL, 1, 2, 2 },
-									/*	{(PS8)"Band", CON_PARM_OPTIONAL, 0, 2, 0 },
-                                    {(PS8)"Channel", CON_PARM_OPTIONAL , 1, 161, 0 }, 
-                                    {(PS8)"Power", CON_PARM_OPTIONAL, 0, 0, 0 },
-                                    {(PS8)"Tone Type", CON_PARM_OPTIONAL, 0, 0, 0 },
-                                    {(PS8)"Tone Number - Single Tones", CON_PARM_OPTIONAL, 0, 0, 0 },
-                                    {(PS8)"Tone Number - Two Tones", CON_PARM_OPTIONAL, 0, 0, 0 },
-                                    {(PS8)"Use Digital DC", CON_PARM_OPTIONAL, 0, 0, 0 },
-                                    {(PS8)"Invert", CON_PARM_OPTIONAL, 0, 0, 0 },
-                                    {(PS8)"Eleven N Span", CON_PARM_OPTIONAL, 0, 0, 0 },
-                                    {(PS8)"Digital DC", CON_PARM_OPTIONAL, 0, 0, 0 },
-                                    {(PS8)"Analog DC Fine", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Analog DC Coarse", CON_PARM_OPTIONAL, 0, 0, 0 },*/
-                                    CON_LAST_PARM };
-				Console_AddToken(pTiCon->hConsole,h2, (PS8)"Cw", (PS8)"Start CW test", (FuncToken_t) CuCmd_RadioDebug_StartTxCw, aaa );
-
-			}
-			/* FCC */
-			{
-				ConParm_t aaa[]  = {{(PS8)"Delay", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Rate", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Size", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Amount", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Power", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Seed", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Packet Mode", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"DC On Off", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"GI", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Preamble", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Type", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Scrambler", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Enable CLPC", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Sequance Number Mode", CON_PARM_OPTIONAL, 0, 0, 0 },
-									{(PS8)"Destination MAC Address", CON_PARM_STRING | CON_PARM_OPTIONAL, 0, 32, 0 },
-									/* future use. for now the oregenal source address are use.
-                                     {(PS8)"Source MAC Address", CON_PARM_STRING | CON_PARM_OPTIONAL, 0, 32, 0 },
-                                     */
-									{(PS8)"Destination MAC Address", CON_PARM_STRING | CON_PARM_OPTIONAL, 0, 32, 0 },
-									CON_LAST_PARM };
-				Console_AddToken(pTiCon->hConsole,h2, (PS8)"coNtinues", (PS8)"Start TX continues test", (FuncToken_t) CuCmd_RadioDebug_StartContinuousTx, aaa );
-			}
-			/* Stop FCC/TELEC */
-			{
-				Console_AddToken(pTiCon->hConsole,h2, (PS8)"Stop", (PS8)"Stop TX tests", (FuncToken_t) CuCmd_RadioDebug_StopTx, NULL );
-			}
-#if 0 /* not support for now */
-			/* TEMPLATE */
-			{
-				ConParm_t aaa[]  = {{(PS8)"Length", CON_PARM_OPTIONAL|CON_PARM_RANGE, 0, 0, 0 },
-									{(PS8)"Offset", CON_PARM_OPTIONAL|CON_PARM_RANGE , 0, 0, 0 }, 
-									{(PS8)"Data", CON_PARM_OPTIONAL|CON_PARM_RANGE, 0, 0, 0 },
-									CON_LAST_PARM };
-				Console_AddToken(pTiCon->hConsole,h2, (PS8)"temPlate", (PS8)"Set Template", (FuncToken_t) CuCmd_RadioDebug_Template, aaa );
-			}
-#endif
-		}
-		/*yael - to Complete statistics */
-		CHK_NULL(h2 = (THandle) Console_AddDirExt(pTiCon->hConsole,  (THandle) h1, (PS8)"rx Statistics", (PS8)"Rx Statistics" ) );
-		{
-			/* RX Statixtics Start */
-			Console_AddToken(pTiCon->hConsole,h2, (PS8)"rx stat Start", (PS8)"Start Rx Statistics", (FuncToken_t)CuCmd_RadioDebug_StartRxStatistics , NULL );
-			/* RX Statixtics Stop */
-			Console_AddToken(pTiCon->hConsole,h2, (PS8)"rx stat stoP", (PS8)"Stop Rx Statistics", (FuncToken_t)CuCmd_RadioDebug_StopRxStatistics , NULL );
-			/* RX Statixtics Reset */
-			Console_AddToken(pTiCon->hConsole,h2, (PS8)"rx stat Reset",  (PS8)"Reset Rx Statistics", (FuncToken_t)CuCmd_RadioDebug_ResetRxStatistics , NULL );
-			/* RX Statixtics Get */
-			Console_AddToken(pTiCon->hConsole,h2, (PS8)"rx stat Get",  (PS8)"Get Rx Statistics", (FuncToken_t)CuCmd_RadioDebug_GetRxStatistics , NULL );
-		}
-	} /* h1 */
-
-    /* -------------------------------------------- Root -------------------------------------------- */
-				
-	Console_AddToken(pTiCon->hConsole,NULL, (PS8)"aboUt", (PS8)"About", (FuncToken_t) CuCmd_ShowAbout, NULL );
-	Console_AddToken(pTiCon->hConsole,NULL, (PS8)"Quit", (PS8)"quit", (FuncToken_t) CuCmd_Quit, NULL );
-
-	return 0;
-}
-
-
-static S32 TiCon_Print_Usage(VOID)
-{
-    os_error_printf(CU_MSG_ERROR, (PS8)"Usage: ./wlan_cu [driver_name] [options]\n");    
-    os_error_printf(CU_MSG_ERROR, (PS8)"   -b             - bypass supplicant\n");
-	os_error_printf(CU_MSG_ERROR, (PS8)"   -i<ifname>     - supplicant interface file\n");
-	os_error_printf(CU_MSG_ERROR, (PS8)"example:\n");
-	os_error_printf(CU_MSG_ERROR, (PS8)"   ./wlan_cu tiwlan0 -i/voice/tiwlan0\n");
-    return 0;
-}
-
-static VOID TiCon_SignalCtrlC(S32 signo)
-{
-	os_error_printf(CU_MSG_ERROR, (PS8)"TiCon_Signal - got signal Ctrl+c ... exiting\n");
-	Console_Stop(g_TiCon.hConsole);
-}
-
-
-/* functions */
-/*************/
-S32 user_main(S32 argc, PS8* argv)
-{
-    S32 i;
-    char *script_file = NULL;
-    S32 BypassSupplicant = FALSE;
-    S8 SupplIfFile[50];
-    S32 fill_name = TRUE;
-    int stop_UI = 0;
-
-    SupplIfFile[0] = '\0';
-    if( argc > 1 )
-    {
-        i=1;
-        if( argv[i][0] != '-' )
-        {
-            os_strcpy( g_TiCon.drv_name, argv[i++] );
-			fill_name = FALSE;
-        }
-
-        for( ;i < argc; i++ )
-        {
-            if( !os_strcmp(argv[i], (PS8)"-h" ) || !os_strcmp(argv[i], (PS8)"--help") )
-            {
-                TiCon_Print_Usage();
-				return 0;
-            }
-            else if(!os_strcmp(argv[i], (PS8)"-b"))
-            {
-                BypassSupplicant = TRUE;
-            }
-            else if(!os_strncmp(argv[i], (PS8)"-i", 2))
-            {
-            	os_strcpy( SupplIfFile, &(argv[i])[2] );
-            }
-            else if(!os_strncmp(argv[i], "-s", 2 ) )
-            {
-                script_file = argv[++i];
-            }
-        }
-    }
-
-	os_OsSpecificCmdParams(argc, argv);
-
-	/* fill the driver name */
-    if(fill_name == TRUE)
-    {
-        os_strcpy(g_TiCon.drv_name, (PS8)TIWLAN_DRV_NAME);
-    }
-
-	/* fill supplicant interface file */
-    if(SupplIfFile[0] == '\0')
-    {
-        os_strcpy(SupplIfFile, (PS8)SUPPL_IF_FILE);
-    }
-
-	g_TiCon.hConsole = Console_Create(g_TiCon.drv_name, BypassSupplicant, SupplIfFile);
-	if(g_TiCon.hConsole == NULL)
-		return 0;
-
-	Console_GetDeviceStatus(g_TiCon.hConsole);	
-
-	os_Catch_CtrlC_Signal(TiCon_SignalCtrlC);		
-
-	os_InitOsSpecificModules();
-    
-    /* ----------------------------------------------------------- */
-    TiCon_Init_Console_Menu(&g_TiCon);
-
-	if( script_file )
-    {
-        stop_UI = consoleRunScript (script_file, g_TiCon.hConsole);
-    }
-
-    if( !stop_UI )
-	{
-        os_error_printf(CU_MSG_INFO2, (PS8)("user_main, start\n") );
-		Console_Start(g_TiCon.hConsole);
-	}
-
-	Console_Destroy(g_TiCon.hConsole);
-
-	os_DeInitOsSpecificModules();
-
-    return 0;
-}
-
-/* Stubs for all OS */
-void g_tester_send_event(U8 event_index)
-{
-}
-
-void ProcessLoggerMessage(PU8 data, U32 len)
-{
-}
diff --git a/wl1271/CUDK/configurationutility/src/wpa_core.c b/wl1271/CUDK/configurationutility/src/wpa_core.c
deleted file mode 100644
index f771625..0000000
--- a/wl1271/CUDK/configurationutility/src/wpa_core.c
+++ /dev/null
@@ -1,940 +0,0 @@
-/*
- * wpa_core.c
- *
- * Copyright 2001-2010 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************
-*
-*   MODULE:  Wpa_Core.c
-*   
-*   PURPOSE: 
-* 
-*   DESCRIPTION:  
-*   ============
-*      
-*
-****************************************************************************/
-
-/* includes */
-/************/
-
-#ifdef ANDROID
-#include <unistd.h>
-#endif
-
-#include <netinet/if_ether.h>
-
-#include "cu_osapi.h"
-#include "TWDriver.h"
-#include "config_ssid.h"
-#include "driver.h"
-#include "ipc_wpa.h"
-#include "wpa_core.h"
-#include "oserr.h"
-
-/* defines */
-/***********/
-#ifdef CONFIG_WPS
-#define WSC_MODE_OFF	0
-#define WSC_MODE_PIN	1
-#define WSC_MODE_PBC	2
-#endif
-
-/* local types */
-/***************/
-/* Network configuration block - holds candidate connection parameters */
-typedef struct 
-{
-	S32 mode;
-	S32 proto;
-	S32 key_mgmt;
-	S32 auth_alg;
-	S32 pair_wise;
-	S32 group;
-	U8 pass_phrase[WPACORE_MAX_PSK_STRING_LENGTH];
-	U8 wep_key[4][32];
-	U8 default_wep_key;
-	U8 wep_key_length;
-#ifdef CONFIG_WPS
-	U8	WscMode;
-	PS8 pWscPin;
-#endif
-    S32 eap;
-    U8 Identity[WPACORE_MAX_CERT_PASSWORD_LENGTH];
-    U8 private_key_passwd[WPACORE_MAX_CERT_PASSWORD_LENGTH];
-    U8 private_key[WPACORE_MAX_CERT_PASSWORD_LENGTH];
-    U8 client_cert[WPACORE_MAX_CERT_FILE_NAME_LENGTH];
-    U8 password[WPACORE_MAX_CERT_PASSWORD_LENGTH];
-    U8 anyWpaMode;
-#ifdef XCC_MODULE_INCLUDED
-    U16 XCC;
-#endif
-} TWpaCore_WpaSupplParams;
-
-typedef struct 
-{
-	OS_802_11_AUTHENTICATION_MODE AuthMode;
-	OS_802_11_ENCRYPTION_TYPES EncryptionTypePairWise;
-	OS_802_11_ENCRYPTION_TYPES EncryptionTypeGroup;
-} TWpaCore_WpaParams;
-
-/* Module control block */
-typedef struct TWpaCore
-{
-    THandle hIpcWpa;
-
-    S32 CurrentNetwork;
-
-	TWpaCore_WpaSupplParams WpaSupplParams; 
-	TWpaCore_WpaParams WpaParams;
-} TWpaCore;
-
-/* local variables */
-/*******************/
-
-/* local fucntions */
-/*******************/
-static VOID WpaCore_InitWpaParams(TWpaCore* pWpaCore)
-{
-      os_memset( &pWpaCore->WpaSupplParams, 0, sizeof(TWpaCore_WpaSupplParams));
-	  pWpaCore->WpaSupplParams.mode = IEEE80211_MODE_INFRA;         /* Default is Infrastructure mode */
-	  pWpaCore->WpaSupplParams.proto = 0;                           /* key negotiation protocol - WPA is ok even though no security is used */ 
-	  pWpaCore->WpaSupplParams.key_mgmt = WPA_KEY_MGMT_NONE;        /* No key management suite */
-	  pWpaCore->WpaSupplParams.auth_alg = WPA_AUTH_ALG_OPEN;        /* Open authentication */
-	  pWpaCore->WpaSupplParams.pair_wise = WPA_CIPHER_NONE;
-	  pWpaCore->WpaSupplParams.group = WPA_CIPHER_NONE; 
-      pWpaCore->WpaSupplParams.anyWpaMode = 0;
-#ifdef CONFIG_WPS
-	pWpaCore->WpaSupplParams.pWscPin = NULL;
-	pWpaCore->WpaSupplParams.WscMode = WSC_MODE_OFF;
-#endif
-
-	pWpaCore->WpaParams.AuthMode = os802_11AuthModeOpen;
-	pWpaCore->WpaParams.EncryptionTypeGroup = OS_ENCRYPTION_TYPE_NONE;
-	pWpaCore->WpaParams.EncryptionTypePairWise = OS_ENCRYPTION_TYPE_NONE;
-}
-
-/* functions */
-/*************/
-THandle WpaCore_Create(PS32 pRes, PS8 pSupplIfFile)
-{	
-	TWpaCore* pWpaCore = (TWpaCore*)os_MemoryCAlloc(sizeof(TWpaCore), sizeof(U8));
-	if(pWpaCore == NULL)
-	{
-		*pRes = OK;
-		os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - WpaCore_Create - cant allocate control block\n");
-		return NULL;
-	}
-
-    pWpaCore->hIpcWpa = IpcWpa_Create(pRes, pSupplIfFile);
-	if(pWpaCore->hIpcWpa == NULL)
-	{	
-		WpaCore_Destroy(pWpaCore);
-		return NULL;		
-	}
-
-	WpaCore_InitWpaParams(pWpaCore);
-
-	pWpaCore->CurrentNetwork = -1;
-
-	/* send default configuration to the supplicant */
-	IpcWpa_Command(pWpaCore->hIpcWpa, (PS8)"AP_SCAN 2", FALSE);	
-
-	return pWpaCore;
-}
-
-VOID WpaCore_Destroy(THandle hWpaCore)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-	if(pWpaCore->hIpcWpa)
-		IpcWpa_Destroy(pWpaCore->hIpcWpa);
-#ifdef CONFIG_WPS
-	if(pWpaCore->WpaSupplParams.pWscPin)
-		os_MemoryFree(pWpaCore->WpaSupplParams.pWscPin);	
-#endif
-
-	os_MemoryFree(pWpaCore);
-}
-
-#ifdef XCC_MODULE_INCLUDED
-S32 WpaCore_SetXCC(THandle hWpaCore, U16 XCCConfig)
-{
-    TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-    pWpaCore->WpaSupplParams.XCC = XCCConfig;
-
-    return TI_OK;
-}
-#endif
-
-S32 WpaCore_SetAuthMode(THandle hWpaCore, OS_802_11_AUTHENTICATION_MODE AuthMode)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-	pWpaCore->WpaParams.AuthMode = AuthMode;
-
-	switch (AuthMode)
-	{
-		case os802_11AuthModeOpen:
-			pWpaCore->WpaSupplParams.proto = 0;
-            pWpaCore->WpaSupplParams.key_mgmt = WPA_KEY_MGMT_NONE;
-            pWpaCore->WpaSupplParams.auth_alg = WPA_AUTH_ALG_OPEN;
-            break;
-		case os802_11AuthModeShared:
-			pWpaCore->WpaSupplParams.proto = 0;
-            pWpaCore->WpaSupplParams.key_mgmt = WPA_KEY_MGMT_NONE;
-            pWpaCore->WpaSupplParams.auth_alg = WPA_AUTH_ALG_SHARED;
-            break;
-		case os802_11AuthModeWPANone:
-			pWpaCore->WpaSupplParams.proto = WPA_PROTO_WPA;
-			pWpaCore->WpaSupplParams.key_mgmt = WPA_KEY_MGMT_WPA_NONE;
-			pWpaCore->WpaSupplParams.auth_alg = WPA_AUTH_ALG_OPEN;
-			break;
-		case os802_11AuthModeWPAPSK:
-			pWpaCore->WpaSupplParams.proto = WPA_PROTO_WPA;
-			pWpaCore->WpaSupplParams.key_mgmt = WPA_KEY_MGMT_PSK;
-			pWpaCore->WpaSupplParams.auth_alg = WPA_AUTH_ALG_OPEN;
-			break;
-		case os802_11AuthModeWPA2PSK:
-			pWpaCore->WpaSupplParams.proto = WPA_PROTO_RSN;
-			pWpaCore->WpaSupplParams.key_mgmt = WPA_KEY_MGMT_PSK;
-			pWpaCore->WpaSupplParams.auth_alg = WPA_AUTH_ALG_OPEN;
-			break;
-        case os802_11AuthModeWPA:
-            pWpaCore->WpaSupplParams.proto = WPA_PROTO_WPA;
-            pWpaCore->WpaSupplParams.key_mgmt = WPA_KEY_MGMT_IEEE8021X;
-            pWpaCore->WpaSupplParams.auth_alg = WPA_AUTH_ALG_OPEN;
-            break;
-       case os802_11AuthModeWPA2:
-            pWpaCore->WpaSupplParams.proto = WPA_PROTO_RSN;
-            pWpaCore->WpaSupplParams.key_mgmt = WPA_KEY_MGMT_IEEE8021X;
-            pWpaCore->WpaSupplParams.auth_alg = WPA_AUTH_ALG_OPEN;
-            break;
-
-        default:
-			os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - WpaCore_SetAuthMode - unknown authentication mode (%d)!!!\n", AuthMode);
-            return ECUERR_WPA_CORE_ERROR_UNKNOWN_AUTH_MODE;
-	}
-
-	return OK;
-}	
-
-
-S32 WpaCore_GetAuthMode(THandle hWpaCore, PU32 pAuthMode)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-	*pAuthMode = pWpaCore->WpaParams.AuthMode;
-
-	return OK;
-}	
-
-S32 WpaCore_SetEncryptionPairWise(THandle hWpaCore, OS_802_11_ENCRYPTION_TYPES EncryptionType)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-	pWpaCore->WpaParams.EncryptionTypePairWise = EncryptionType;
-	
-	switch (EncryptionType)
-    {
-		case OS_ENCRYPTION_TYPE_NONE:
-			pWpaCore->WpaSupplParams.pair_wise = WPA_CIPHER_NONE;
-			break;
-		case OS_ENCRYPTION_TYPE_WEP:
-			pWpaCore->WpaSupplParams.pair_wise = WPA_CIPHER_WEP40;
-			break;		
-        case OS_ENCRYPTION_TYPE_TKIP:
-            pWpaCore->WpaSupplParams.pair_wise = WPA_CIPHER_TKIP;
-            break;
-        case OS_ENCRYPTION_TYPE_AES:
-			pWpaCore->WpaSupplParams.pair_wise = WPA_CIPHER_CCMP;
-            break;
-    }
-
-	return OK;
-}
-
-S32 WpaCore_SetPrivacyEap(THandle hWpaCore, OS_802_11_EAP_TYPES EapType)
-{
-   TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-   pWpaCore->WpaSupplParams.eap = EapType;
-
-   return OK;
-}
-
-S32 WpaCore_GetEncryptionPairWise(THandle hWpaCore, OS_802_11_ENCRYPTION_TYPES* pEncryptionType)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-	
-	*pEncryptionType = pWpaCore->WpaParams.EncryptionTypePairWise;
-
-	return OK;
-}
-
-S32 WpaCore_SetEncryptionGroup(THandle hWpaCore, OS_802_11_ENCRYPTION_TYPES EncryptionType)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-	pWpaCore->WpaParams.EncryptionTypeGroup = EncryptionType;
-	
-	switch (EncryptionType)
-    {			
-    	case OS_ENCRYPTION_TYPE_NONE:
-			os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - WpaCore_SetEncryptionGroup - group encryption cant be NONE\n");
-			break;
-		case OS_ENCRYPTION_TYPE_WEP:
-			pWpaCore->WpaSupplParams.group = WPA_CIPHER_WEP40;
-			break;
-					
-        case OS_ENCRYPTION_TYPE_TKIP:
-            pWpaCore->WpaSupplParams.group = WPA_CIPHER_TKIP;
-            break;
-        case OS_ENCRYPTION_TYPE_AES:
-			pWpaCore->WpaSupplParams.group = WPA_CIPHER_CCMP;
-            break;
-    }
-
-	return OK;
-}
-
-S32 WpaCore_GetEncryptionGroup(THandle hWpaCore, OS_802_11_ENCRYPTION_TYPES* pEncryptionType)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-	
-	*pEncryptionType = pWpaCore->WpaParams.EncryptionTypeGroup;
-
-	return OK;
-}
-
-S32 WpaCore_SetCredentials(THandle hWpaCore, PU8 Identity, PU8 Passward)
-{
-  TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-  os_memcpy((PVOID)pWpaCore->WpaSupplParams.Identity, (PVOID)Identity, os_strlen((PS8)Identity));
-
-  if (Passward !=NULL)
-  {
-    os_memcpy((PVOID)pWpaCore->WpaSupplParams.password, (PVOID)Passward, os_strlen((PS8)Passward));
-    os_memcpy((PVOID)pWpaCore->WpaSupplParams.private_key_passwd, (PVOID)Passward, os_strlen((PS8)Passward));
-  }
- 
-  return OK;
-}
-
-S32 WpaCore_SetCertificate(THandle hWpaCore, PU8 Filepath)
-{
-  TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-  os_memcpy((PVOID)pWpaCore->WpaSupplParams.client_cert, (PVOID)Filepath, os_strlen((PS8)Filepath));
-
-  return OK;
-
-}
-
-S32 WpaCore_SetPskPassPhrase(THandle hWpaCore, PU8 pPassPhrase)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-	
-    os_memcpy((PVOID)pWpaCore->WpaSupplParams.pass_phrase, (PVOID)pPassPhrase, os_strlen((PS8)pPassPhrase));
-
-	return OK;
-}
-
-S32 WpaCore_StopSuppl(THandle hWpaCore)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-	IpcWpa_Command(pWpaCore->hIpcWpa, (PS8)"TERMINATE", TRUE);
-
-	return OK;
-}
-
-S32 WpaCore_ChangeSupplDebugLevels(THandle hWpaCore, S32 Level1, S32 Level2, S32 Level3)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-    S8 cmd[100];
-
-	os_sprintf(cmd, (PS8)"CHANGE_SUPPLICANT_DEBUG %ld %ld %ld", Level1, Level2, Level3);
-	IpcWpa_Command(pWpaCore->hIpcWpa, cmd, TRUE);
-
-	return OK;
-}
-
-S32 WpaCore_AddKey(THandle hWpaCore, OS_802_11_WEP* pKey)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-	U32 WepKeyIndx;
-
-	WepKeyIndx = pKey->KeyIndex & 0x7FFFFFFF;
-	
-	if ((pKey->KeyIndex & 0x80000000) == 0x80000000)
-	{
-		/* Add "1" to the default wep key index - since "0" is used to indicate no default wep key */
-		pWpaCore->WpaSupplParams.default_wep_key = WepKeyIndx + 1;
-	}
-	
-	/* If key length wasn't set so far - set it according to current key */
-	if (pWpaCore->WpaSupplParams.wep_key_length == 0)
-	{
-		pWpaCore->WpaSupplParams.wep_key_length = pKey->KeyLength;
-	}
-	else
-	{
-        if (pWpaCore->WpaSupplParams.wep_key_length != pKey->KeyLength) return ECUERR_WPA_CORE_ERROR_KEY_LEN_MUST_BE_SAME;     
-	}
-	
-	os_memcpy(&pWpaCore->WpaSupplParams.wep_key[WepKeyIndx][0], pKey->KeyMaterial, pKey->KeyLength);
-
-	return OK;
-}
-
-S32 WpaCore_GetDefaultKey(THandle hWpaCore, U32* pDefaultKeyIndex)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-	*pDefaultKeyIndex = pWpaCore->WpaSupplParams.default_wep_key;
-
-	return OK;
-}
-
-#ifdef CONFIG_WPS
-S32 WpaCore_StartWpsPIN(THandle hWpaCore)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-#ifdef SUPPL_WPS_SUPPORT
-	S8 cmd[100];
-#endif
-
-	pWpaCore->WpaSupplParams.WscMode = WSC_MODE_PIN;
-
-#ifdef SUPPL_WPS_SUPPORT
-	os_sprintf(cmd, "WPS_PIN any");
-	IpcWpa_Command(pWpaCore->hIpcWpa, cmd, TRUE);
-#endif
-
-	return OK;
-}
-
-S32 WpaCore_StartWpsPBC(THandle hWpaCore)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-#ifdef SUPPL_WPS_SUPPORT
-	S8 cmd[100];
-#endif
-
-	pWpaCore->WpaSupplParams.WscMode = WSC_MODE_PBC;
-
-#ifdef SUPPL_WPS_SUPPORT
-	os_sprintf(cmd, "WPS_PBC");
-	IpcWpa_Command(pWpaCore->hIpcWpa, cmd, TRUE);
-#endif
-
-	return OK;
-}
-
-S32 WpaCore_StopWps(THandle hWpaCore)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-	pWpaCore->WpaSupplParams.WscMode = WSC_MODE_OFF;
-	
-	return OK;
-}
-
-S32 WpaCore_SetPin(THandle hWpaCore, PS8 pPinStr)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-	int len = os_strlen(pPinStr);
-
-	if (len == 0)
-		return ECUERR_WPA_CORE_ERROR_IVALID_PIN;
-
-	pWpaCore->WpaSupplParams.pWscPin = (PS8)os_MemoryCAlloc(len, sizeof(char));
-	if(!pWpaCore->WpaSupplParams.pWscPin)
-		return ECUERR_WPA_CORE_ERROR_CANT_ALLOC_PIN;
-
-	os_strcpy(pWpaCore->WpaSupplParams.pWscPin, pPinStr);
-
-	return OK;
-}
-#endif /* CONFIG_WPS */
-
-S32 WpaCore_SetAnyWpaMode(THandle hWpaCore, U8 anyWpaMode)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-	pWpaCore->WpaSupplParams.anyWpaMode = anyWpaMode;
-
-	return OK;
-}
-
-S32 WpaCore_GetAnyWpaMode(THandle hWpaCore, PU8 pAnyWpaMode)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-	*pAnyWpaMode = pWpaCore->WpaSupplParams.anyWpaMode;
-	
-	return OK;
-}
-
-
-S32 WpaCore_SetBssType(THandle hWpaCore, U32 BssType)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-	switch(BssType)
-	{
-		case os802_11IBSS:
-			pWpaCore->WpaSupplParams.mode = IEEE80211_MODE_IBSS;
-			break;
-		case os802_11Infrastructure:
-			pWpaCore->WpaSupplParams.mode = IEEE80211_MODE_INFRA;
-			break;
-		default:
-			pWpaCore->WpaSupplParams.mode = IEEE80211_MODE_INFRA;
-			break;		
-	}
-
-	return OK;
-}
-
-S32 WpaCore_GetBssType(THandle hWpaCore, PU32 pBssType)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-
-	switch(pWpaCore->WpaSupplParams.mode)
-	{
-		case IEEE80211_MODE_IBSS:
-			*pBssType = os802_11IBSS;
-			break;
-		case IEEE80211_MODE_INFRA:
-			*pBssType = os802_11Infrastructure;
-			break;
-	}
-
-	return OK;
-}
-
-S32 WpaCore_SetSsid(THandle hWpaCore, OS_802_11_SSID* ssid, TMacAddr bssid)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-    S8  cmd[256];
-    S8  Resp[IPC_WPA_RESP_MAX_LEN];
-    PS8 pRespTemp;
-	U32 RespLen;
-	U32 NetworkID;
-	U32 SendCommand;
-    U8  Len;
-   
-#define WPACORE_SETSSID_FAIL \
-	os_error_printf(CU_MSG_ERROR, (PS8)"Failed to connect to %s\n", ssid->Ssid); \
-    return ECUERR_WPA_CORE_ERROR_FAILED_CONNECT_SSID;
-
-    /* First Add a new network block*/
-	os_sprintf(cmd, (PS8)"ADD_NETWORK");
-	if (IpcWpa_CommandWithResp(pWpaCore->hIpcWpa, cmd, TRUE, Resp, &RespLen))
-	{
-		WPACORE_SETSSID_FAIL;
-	}
-	NetworkID = os_strtoul(Resp, &pRespTemp, 0);
-
-	/* Set the parameters in the new new network block*/
-
-	/* Set the BSSID */
-	if(!((bssid[0] == 0xFF) && 
-		(bssid[1] == 0xFF) &&
-		(bssid[2] == 0xFF) &&
-		(bssid[3] == 0xFF) &&
-		(bssid[4] == 0xFF) &&
-		(bssid[5] == 0xFF)))
-	{
-		/* set th ebssid only if the bssid doesn't mean any bssid */	
-        S8 temp[20];
-		os_sprintf(temp, (PS8)"%02x", bssid[0]);
-		os_sprintf(temp, (PS8)"%s:%02x", temp, bssid[1]);
-		os_sprintf(temp, (PS8)"%s:%02x", temp, bssid[2]);
-		os_sprintf(temp, (PS8)"%s:%02x", temp, bssid[3]);
-		os_sprintf(temp, (PS8)"%s:%02x", temp, bssid[4]);
-		os_sprintf(temp, (PS8)"%s:%02x", temp, bssid[5]);
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d bssid %s", NetworkID, temp);
-		
-		if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, FALSE))
-		{
-			WPACORE_SETSSID_FAIL;
-		}
-	}
-
-   /* Set the SSID */
-	os_sprintf(cmd, (PS8)"SET_NETWORK %d ssid \"%s\"", NetworkID, ssid->Ssid);
-	if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-	{
-		WPACORE_SETSSID_FAIL;
-	}
-
-	/* set mode of the new network block */
-	os_sprintf(cmd, (PS8)"SET_NETWORK %d mode %d", NetworkID, pWpaCore->WpaSupplParams.mode);
-	if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-	{
-		WPACORE_SETSSID_FAIL;		
-	}
-
-    /* set proto of the new network block */
-	SendCommand = TRUE;
-	if (pWpaCore->WpaSupplParams.proto == WPA_PROTO_WPA)
-	{
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d proto WPA", NetworkID);
-	}
-	else if (pWpaCore->WpaSupplParams.proto == WPA_PROTO_RSN)
-	{
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d proto RSN", NetworkID);
-	}
-	else
-	{
-		SendCommand = FALSE;
-	}
-	
-	if (SendCommand && IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-	{
-		WPACORE_SETSSID_FAIL;		
-	}
-
-	/* set key management of the new network block */
-	SendCommand = TRUE;
-	if (pWpaCore->WpaSupplParams.key_mgmt == WPA_KEY_MGMT_NONE)
-	{
-		if ((pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_LEAP) ||
-			(pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_PEAP) ||
-			(pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_FAST))
-        {
-         os_sprintf(cmd, (PS8)"SET_NETWORK %d key_mgmt IEEE8021X", NetworkID);
-        }
-		else
-			os_sprintf(cmd, (PS8)"SET_NETWORK %d key_mgmt NONE", NetworkID);
-	}
-	else if (pWpaCore->WpaSupplParams.key_mgmt == WPA_KEY_MGMT_PSK)
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d key_mgmt WPA-PSK", NetworkID);
-	else if (pWpaCore->WpaSupplParams.key_mgmt == WPA_KEY_MGMT_IEEE8021X)
-#ifdef XCC_MODULE_INCLUDED
-       if((pWpaCore->WpaSupplParams.XCC == OS_XCC_CONFIGURATION_ENABLE_CCKM)||(pWpaCore->WpaSupplParams.XCC == OS_XCC_CONFIGURATION_ENABLE_ALL))
-       {
-        os_sprintf(cmd, (PS8)"SET_NETWORK %d key_mgmt WPA-EAP CCKM", NetworkID);
-       }
-       else
-#endif
-       os_sprintf(cmd, (PS8)"SET_NETWORK %d key_mgmt WPA-EAP", NetworkID);
-   else if (pWpaCore->WpaSupplParams.key_mgmt == WPA_KEY_MGMT_WPA_NONE)
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d key_mgmt WPA-NONE", NetworkID);
-	else
-	{
-		SendCommand = FALSE;
-	}
-	
-	if (SendCommand && IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-	{
-		WPACORE_SETSSID_FAIL;		
-	}
-
-   
-	/* set authentication alog of the new network block */
-	SendCommand = TRUE;
-	if (pWpaCore->WpaSupplParams.auth_alg == WPA_AUTH_ALG_OPEN)
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d auth_alg OPEN", NetworkID);
-	else if (pWpaCore->WpaSupplParams.auth_alg == WPA_AUTH_ALG_SHARED)
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d auth_alg SHARED", NetworkID);
-	else if (pWpaCore->WpaSupplParams.auth_alg == WPA_AUTH_ALG_LEAP)
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d auth_alg LEAP", NetworkID);
-	else
-	{
-		SendCommand = FALSE;
-	}
-	
-	if (SendCommand && IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-	{
-		WPACORE_SETSSID_FAIL;		
-	}
-
-
-    /* set pairwise encryption of the new network block */
-	SendCommand = TRUE;
-	if (pWpaCore->WpaSupplParams.pair_wise == WPA_CIPHER_NONE)
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d pairwise NONE", NetworkID);
-	else if (pWpaCore->WpaSupplParams.pair_wise == WPA_CIPHER_WEP40)
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d pairwise NONE", NetworkID);
-	else if (pWpaCore->WpaSupplParams.pair_wise == WPA_CIPHER_TKIP)
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d pairwise TKIP", NetworkID);
-	else if ((pWpaCore->WpaSupplParams.pair_wise == WPA_CIPHER_CCMP)&& (pWpaCore->WpaSupplParams.anyWpaMode == 0))
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d pairwise CCMP", NetworkID);
-    else if ((pWpaCore->WpaSupplParams.pair_wise == WPA_CIPHER_CCMP)&& (pWpaCore->WpaSupplParams.anyWpaMode == 1))
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d pairwise CCMP TKIP", NetworkID);
-	else
-	{
-		SendCommand = FALSE;
-	}
-	   
-	if (SendCommand && IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-	{
-		WPACORE_SETSSID_FAIL;		 
-	}
-
-   /* set group encryption of the new network block */
-	SendCommand = TRUE;
-	if (pWpaCore->WpaSupplParams.group == WPA_CIPHER_WEP40)
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d group WEP40", NetworkID);
-	else if (pWpaCore->WpaSupplParams.group == WPA_CIPHER_TKIP)
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d group TKIP", NetworkID);
-	else if ((pWpaCore->WpaSupplParams.group == WPA_CIPHER_CCMP)&& (pWpaCore->WpaSupplParams.anyWpaMode == 0))
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d group CCMP", NetworkID);
-    else if ((pWpaCore->WpaSupplParams.group == WPA_CIPHER_CCMP)&& (pWpaCore->WpaSupplParams.anyWpaMode == 1))
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d group CCMP TKIP", NetworkID);
-	else
-	{
-		SendCommand = FALSE;
-	}
-	
-	if (SendCommand && IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-	{
-		WPACORE_SETSSID_FAIL;		
-	}
-
-   
-   /* set eap of the new network block */
-    if (pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_NONE)
-        SendCommand = FALSE;
-    else
-    {
-      SendCommand = TRUE;
-      if (pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_MD5_CHALLENGE)
-        os_sprintf(cmd, (PS8)"SET_NETWORK %d eap MD5", NetworkID);
-      else if (pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_GENERIC_TOKEN_CARD)
-        os_sprintf(cmd, (PS8)"SET_NETWORK %d eap GTC", NetworkID);
-      else if (pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_TLS)
-        os_sprintf(cmd, (PS8)"SET_NETWORK %d eap TLS", NetworkID);
-      else if (pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_TTLS)
-        os_sprintf(cmd, (PS8)"SET_NETWORK %d eap TTLS", NetworkID);
-      else if (pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_PEAP)
-        os_sprintf(cmd, (PS8)"SET_NETWORK %d eap PEAP", NetworkID);
-      else if (pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_MS_CHAP_V2)
-        os_sprintf(cmd, (PS8)"SET_NETWORK %d eap MSCHAPV2", NetworkID);
-#ifdef XCC_MODULE_INCLUDED
-      else if (pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_LEAP)
-        os_sprintf(cmd, (PS8)"SET_NETWORK %d eap LEAP", NetworkID);
-      else if (pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_FAST) 
-        os_sprintf(cmd, (PS8)"SET_NETWORK %d eap FAST", NetworkID);
-#endif
-      else
-       SendCommand = FALSE;
-    }
-
-   
-    if (SendCommand && IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-    {
-        WPACORE_SETSSID_FAIL;		
-    }
-
-     if (pWpaCore->WpaSupplParams.Identity[0]) 
-	 {
-       os_sprintf(cmd, (PS8)"SET_NETWORK %d identity \"%s\"", NetworkID,pWpaCore->WpaSupplParams.Identity);
-       if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-	   {
-          WPACORE_SETSSID_FAIL;  
-	   }
-     }
-     
-     if (pWpaCore->WpaSupplParams.client_cert[0])
-	 {
-       os_sprintf(cmd, (PS8)"SET_NETWORK %d client_cert \"%s\"", NetworkID,pWpaCore->WpaSupplParams.client_cert);
-       
-      if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-      {
-       WPACORE_SETSSID_FAIL; 
-      }
-       
-	 }
-
-    
-	 if (pWpaCore->WpaSupplParams.client_cert[0])
-	 {
-
-      Len = os_strlen ((PS8)pWpaCore->WpaSupplParams.client_cert);
-      os_memcpy(pWpaCore->WpaSupplParams.private_key,pWpaCore->WpaSupplParams.client_cert,Len);
-      os_memcpy(&pWpaCore->WpaSupplParams.private_key[Len-3],"pem",3);
-    
-      os_sprintf(cmd, (PS8)"SET_NETWORK %d private_key \"%s\"", NetworkID,pWpaCore->WpaSupplParams.private_key);
-      if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-      {
-        WPACORE_SETSSID_FAIL; 
-      }
-	 }
-    
-    if (pWpaCore->WpaSupplParams.private_key_passwd[0] ) 
-	{
-      os_sprintf(cmd, (PS8)"SET_NETWORK %d private_key_passwd \"%s\"", NetworkID,pWpaCore->WpaSupplParams.private_key_passwd);
-       if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-        {
-         WPACORE_SETSSID_FAIL; 
-        }
-	}
-    
-    if (pWpaCore->WpaSupplParams.password[0] ) 
-    {
-      os_sprintf(cmd, (PS8)"SET_NETWORK %d password \"%s\"", NetworkID,pWpaCore->WpaSupplParams.password);
-       if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-        {
-         WPACORE_SETSSID_FAIL; 
-        }
-      
-    }
-
-
-    if (pWpaCore->WpaSupplParams.eap == OS_EAP_TYPE_FAST) 
-    {
-      os_sprintf(cmd, (PS8)"SET_NETWORK %d phase1 \"fast_provisioning=3\"", NetworkID);
-       if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-          {
-           WPACORE_SETSSID_FAIL; 
-          }
-
-     os_sprintf(cmd, (PS8)"SET_NETWORK %d pac_file \"/etc/wpa_supplicant.eap-fast-pac\"", NetworkID);
-       if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-          {
-           WPACORE_SETSSID_FAIL; 
-          }
-
-     os_sprintf(cmd, (PS8)"SET_NETWORK %d anonymous_identity \"anonymous\"", NetworkID);
-       if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-          {
-           WPACORE_SETSSID_FAIL; 
-          }
-
-    }
-        
-    if (pWpaCore->WpaSupplParams.pair_wise == WPA_CIPHER_WEP40)	
-	{
-        S32 idx, idx2;
-		
-		for (idx=0; idx<4; idx++)
-		{
-            S8 TempBuf[3];
-			os_sprintf(cmd, (PS8)"SET_NETWORK %d wep_key%d ", NetworkID, idx);
-			for (idx2=0; idx2 < pWpaCore->WpaSupplParams.wep_key_length; idx2++)
-			{
-				os_sprintf(TempBuf, (PS8)"%02x", pWpaCore->WpaSupplParams.wep_key[idx][idx2]);
-				os_strcat (cmd, TempBuf);
-			}
-			if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-			{
-				WPACORE_SETSSID_FAIL;				
-			}
-		}
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d wep_tx_keyidx %d", NetworkID, pWpaCore->WpaSupplParams.default_wep_key-1);
-		if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-		{
-			WPACORE_SETSSID_FAIL;			
-		}
-	}
-
-	if (pWpaCore->WpaSupplParams.key_mgmt == WPA_KEY_MGMT_PSK)
-	{
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d psk \"%s\"", NetworkID, pWpaCore->WpaSupplParams.pass_phrase);
-		if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-		{
-			WPACORE_SETSSID_FAIL;			
-		}
-	}
-
-   
-#ifdef CONFIG_WPS
-	if (pWpaCore->WpaSupplParams.WscMode)
-	{
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d wsc_mode %d", NetworkID, pWpaCore->WpaSupplParams.WscMode);
-		if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-		{
-			WPACORE_SETSSID_FAIL;			
-		}
-	}
-	if (pWpaCore->WpaSupplParams.pWscPin)
-	{
-		os_sprintf(cmd, (PS8)"SET_NETWORK %d wsc_pin \"%s\"", NetworkID, pWpaCore->WpaSupplParams.pWscPin);
-		if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-		{
-			WPACORE_SETSSID_FAIL;			
-		}
-	}
-#endif
-
-	/* Finaly Connect to the new network block */
-	os_sprintf(cmd, (PS8)"SELECT_NETWORK %d", NetworkID);
-	if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 0))
-	{
-		WPACORE_SETSSID_FAIL;
-	}
-
-	pWpaCore->CurrentNetwork = NetworkID;	
-	IpcWpa_Command(pWpaCore->hIpcWpa, (PS8)"SAVE_CONFIG", 1);
-
-   /* 
-	init the connection params thus the next time we connect we will by default 
-	connect to an open 
-	*/
-	WpaCore_InitWpaParams(pWpaCore);
-
-	return OK;
-}
-
-S32 WpaCore_Disassociate(THandle hWpaCore)
-{
-	TWpaCore* pWpaCore = (TWpaCore*)hWpaCore;
-    S8 cmd[256];
-
-    os_sprintf(cmd, (PS8)"DISABLE_NETWORK %d", pWpaCore->CurrentNetwork);
-    if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 1))
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Failed to disconnect from current ssid\n");
-        return ECUERR_WPA_CORE_ERROR_FAILED_DISCONNECT_SSID;
-    }
-
-    pWpaCore->CurrentNetwork = -1;
-    IpcWpa_Command(pWpaCore->hIpcWpa, (PS8)"SAVE_CONFIG", 0);    
-
-#if 0 /* for futur WPS work */
-    if(pWpaCore->CurrentNetwork == -1)
-    {
-		os_sprintf(cmd, (PS8)"LIST_NETWORKS");
-        if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 1))
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"Failed to disconnect from current ssid\n");
-            return ECUERR_WPA_CORE_ERROR_FAILED_DISCONNECT_SSID;
-        }
-    }
-    else
-    {   
-        os_sprintf(cmd, (PS8)"DISABLE_NETWORK %d", pWpaCore->CurrentNetwork);
-        if (IpcWpa_Command(pWpaCore->hIpcWpa, cmd, 1))
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"Failed to disconnect from current ssid\n");
-            return ECUERR_WPA_CORE_ERROR_FAILED_DISCONNECT_SSID;
-        }
-
-        pWpaCore->CurrentNetwork = -1;
-        IpcWpa_Command(pWpaCore->hIpcWpa, (PS8)"SAVE_CONFIG", 0);    
-    }
-#endif /* #if 0 for futur WPS work */
- 
-    return OK;
-}
-
diff --git a/wl1271/CUDK/os/Android.mk b/wl1271/CUDK/os/Android.mk
deleted file mode 100644
index 5053e7d..0000000
--- a/wl1271/CUDK/os/Android.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(call all-subdir-makefiles)
diff --git a/wl1271/CUDK/os/common/inc/cu_osapi.h b/wl1271/CUDK/os/common/inc/cu_osapi.h
deleted file mode 100644
index f22e8f2..0000000
--- a/wl1271/CUDK/os/common/inc/cu_osapi.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * cu_osapi.h
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************/
-/*                                                                          */
-/*    MODULE:   cu_osapi.h                                                     */
-/*    PURPOSE:                                                              */
-/*                                                                          */
-/****************************************************************************/
-#ifndef _CUOSAPI_H_
-#define _CUOSAPI_H_
-
-#include "cu_ostypes.h"
-
-/* defines */
-/***********/
-#define OK                      0
-#define FALSE                   0
-#define TRUE                    1
-#define OSAL_ERROR				-1
-#define OSAL_SUCCESS				0
-#define OSAL_FAILURE				1
-#define OS_GETINPUTSTRING_CONTINUE  TRUE+1
-
-#if !defined(max)
-#define max(a,b) ((a>b)?a:b)
-#endif
-/* replaces IFNAMSIZ in Linux */
-#define IF_NAME_SIZE    16
-
-/* 
- * TODO : supp declares its OS abstarction with primitive types, so these must
- * be specifically declared here, and only if they weren't defined before by someone
- * including common.h
- */
-#ifndef COMMON_H
-typedef unsigned char   u8;
-typedef unsigned short u16;
-typedef unsigned long   u32;
-typedef unsigned long long u64;
-
-#ifndef BIT
-#define BIT(x) (1 << (x))
-#endif
-#endif
-
-#ifndef NULL
-#define NULL    (0)
-#endif
-
-typedef enum
-{
-    OS_FOPEN_READ = 0,
-	OS_FOPEN_READ_BINARY, 
-	OS_FOPEN_WRITE,
-	OS_FOPEN_WRITE_BINARY
-} os_fopen_mode_e;
-
-enum { CU_MSG_DEBUG, CU_MSG_INFO1, CU_MSG_WARNING, CU_MSG_ERROR, CU_MSG_INFO2};
-
-/****************************************************************************************
- *                      OS Memory API                                                   *
- ****************************************************************************************/
-PVOID os_MemoryCAlloc(U32 Number, U32 Size);
-PVOID os_MemoryAlloc(U32 Size);
-VOID os_MemoryFree(PVOID pMemPtr);
-PVOID os_memset(PVOID s, U8 c, U32 n);
-PVOID os_memcpy(PVOID dest, const PVOID src, U32 n);
-S32 os_memcmp(const PVOID s1, const PVOID s2, S32 n);
-
-/****************************************************************************************
- *                      OS File API                                                    *
- ****************************************************************************************/
-PVOID os_fopen (const PS8 path, os_fopen_mode_e mode);
-S32 os_fclose (PVOID stream);
-S32 os_getFileSize (PVOID file);
-PS8 os_fgets (PS8 s, S32 size, PVOID stream);
-S32 os_fread (PVOID ptr, S32 size, S32 nmemb, PVOID stream);
-S32 os_fwrite (PVOID ptr, S32 size, S32 nmemb, PVOID stream);
-
-/****************************************************************************************
- *                      OS String API                                                   *
- ****************************************************************************************/
-PS8 os_strcpy(PS8 dest, const PS8 src);
-PS8 os_strncpy(PS8 dest, const PS8 src, S32 n);
-S32 os_strcmp(const PS8 s1, const PS8 s2);
-S32 os_strncmp(const PS8 s1, const PS8 s2, U32 n);
-S32 os_sscanf(const PS8 str, const PS8 format, ...);
-S32 os_sprintf(PS8 str, const PS8 format, ...);
-PS8 os_strcat(PS8 dest, const PS8 src);
-U32 os_strlen(const PS8 s);
-PS8 os_strchr(const PS8 s, S32 c);
-S32 os_strtol(const PS8 nptr, PPS8 endptr, S32 base);
-U32 os_strtoul(const PS8 nptr, PPS8 endptr, S32 base);
-S32 os_tolower(S32 c);
-S32 os_isupper(S32 c);
-S32 os_toupper(S32 c);
-S32 os_atoi(const PS8 str);
-
-/****************************************************************************************
- *                      OS Output API                                                   *
- ****************************************************************************************/
-S32 os_Printf(const PS8 buffer);
-VOID os_error_printf(S32 debug_level, const PS8 arg_list ,...);
-
-/****************************************************************************************
- *                      Miscelanous OS API                                              *
- ****************************************************************************************/
-S32 os_getInputString(PS8 inbuf, S32 len);
-VOID os_Catch_CtrlC_Signal(PVOID SignalCB);
-
-VOID os_OsSpecificCmdParams(S32 argc, PS8* argv);
-VOID os_InitOsSpecificModules(VOID);
-VOID os_DeInitOsSpecificModules(VOID);
-TI_SIZE_T os_get_last_error(VOID);
-
-#endif  /* _CUOSAPI_H_ */
-
diff --git a/wl1271/CUDK/os/common/inc/cu_ostypes.h b/wl1271/CUDK/os/common/inc/cu_ostypes.h
deleted file mode 100644
index 83a0769..0000000
--- a/wl1271/CUDK/os/common/inc/cu_ostypes.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _CUOSTYPES_H_
-#define _CUOSTYPES_H_
-
-/* types */
-/*********/
-#if !defined(VOID)
-typedef void                    VOID,*PVOID;
-#endif
-typedef unsigned char           U8,*PU8;
-typedef /*signed*/ char         S8,*PS8,**PPS8;
-typedef unsigned short          U16,*PU16;
-typedef signed short            S16,*PS16;
-typedef unsigned long           U32,*PU32;
-typedef signed long             S32,*PS32;
-typedef float                   F32,*PF32;
-typedef PVOID                   THandle;
-typedef int                     TI_SIZE_T;
-
-#endif
diff --git a/wl1271/CUDK/os/common/inc/oserr.h b/wl1271/CUDK/os/common/inc/oserr.h
deleted file mode 100644
index 4112ef5..0000000
--- a/wl1271/CUDK/os/common/inc/oserr.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * oserr.h
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/** 
- * \file  osErr.h 
- * \brief Declare error codes returned by OS abstraction
- */
-
-#ifndef __OS_ERR_H__
-#define __OS_ERR_H__
-
-typedef enum
-{
-    EOALERR_NO_ERR = 0,
-    EOALERR_CU_WEXT_ERROR_CANT_ALLOCATE = -1,
-    EOALERR_IPC_STA_ERROR_SENDING_WEXT = -2,
-    EOALERR_IPC_EVENT_ERROR_EVENT_NOT_DEFINED = -3,
-    EOALERR_IPC_EVENT_ERROR_EVENT_ALREADY_ENABLED = -4,
-    EOALERR_IPC_EVENT_ERROR_EVENT_ALREADY_DISABLED = -5,
-    EOALERR_IPC_WPA_ERROR_CANT_CONNECT_TO_SUPPL = -6,
-    EOALERR_IPC_WPA_ERROR_CMD_TIMEOUT = -7,
-    EOALERR_IPC_WPA_ERROR_CMD_FAILED = -8,
-    EOALERR_MAX_ERROR = EOALERR_IPC_WPA_ERROR_CMD_FAILED
-} EOALError;
-
-typedef enum
-{
-	ECUERR_CU_ERROR = 								EOALERR_MAX_ERROR - 1,
-	ECUERR_CU_CMD_ERROR_DEVICE_NOT_LOADED = 		EOALERR_MAX_ERROR - 2,
-	ECUERR_WPA_CORE_ERROR_UNKNOWN_AUTH_MODE = 		EOALERR_MAX_ERROR - 3,
-	ECUERR_WPA_CORE_ERROR_KEY_LEN_MUST_BE_SAME = 	EOALERR_MAX_ERROR - 4,
-	ECUERR_WPA_CORE_ERROR_FAILED_CONNECT_SSID = 	EOALERR_MAX_ERROR - 5,
-	ECUERR_WPA_CORE_ERROR_FAILED_DISCONNECT_SSID= 	EOALERR_MAX_ERROR - 6,
-	ECUERR_CU_COMMON_ERROR = 						EOALERR_MAX_ERROR - 7,
-	ECUERR_WPA_CORE_ERROR_IVALID_PIN = 				EOALERR_MAX_ERROR - 8,
-	ECUERR_WPA_CORE_ERROR_CANT_ALLOC_PIN = 			EOALERR_MAX_ERROR - 9
-} ECUError;
-
-
-#endif /* __OS_ERR_H__ */
-
diff --git a/wl1271/CUDK/os/linux/Android.mk b/wl1271/CUDK/os/linux/Android.mk
deleted file mode 100644
index 5053e7d..0000000
--- a/wl1271/CUDK/os/linux/Android.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(call all-subdir-makefiles)
diff --git a/wl1271/CUDK/os/linux/inc/ParsEvent.h b/wl1271/CUDK/os/linux/inc/ParsEvent.h
deleted file mode 100644
index 335cb3c..0000000
--- a/wl1271/CUDK/os/linux/inc/ParsEvent.h
+++ /dev/null
Binary files differ
diff --git a/wl1271/CUDK/os/linux/inc/cu_os.h b/wl1271/CUDK/os/linux/inc/cu_os.h
deleted file mode 100644
index bc8f67e..0000000
--- a/wl1271/CUDK/os/linux/inc/cu_os.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * cu_os.h
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************/
-/*                                                                          */
-/*    MODULE:   CuWext.h                                                    */
-/*    PURPOSE:                                                              */
-/*                                                                          */
-/****************************************************************************/
-#ifndef _CU_WEXT_H_
-#define _CU_WEXT_H_
-
-#include "cu_osapi.h"
-#include "osDot11.h"
-
-/* defines */
-/***********/
-#define MAX_SSID_LEN    32
-#define MAX_PATH        260
-
-/* types */
-/*********/
-
-/* functions */
-/*************/
-
-S32 CuOs_GetDriverThreadId(THandle hCuWext, U32* threadid);
-
-THandle CuOs_Create(THandle hIpcSta);
-VOID CuOs_Destroy(THandle hCuWext);
-
-S32 CuOs_Get_SSID(THandle hCuWext, OS_802_11_SSID* ssid);
-S32 CuOs_Get_BSSID(THandle hCuWext, TMacAddr bssid);
-S32 CuOs_GetCurrentChannel(THandle hCuWext, U32* channel);
-S32 CuOs_Start_Scan(THandle hCuWext, OS_802_11_SSID* ssid, TI_UINT8 scanType);
-S32 CuOs_GetBssidList(THandle hCuWext, OS_802_11_BSSID_LIST_EX *bssidList);
-S32 CuOs_Set_BSSID(THandle hCuWext, TMacAddr bssid);
-S32 CuOs_Set_ESSID(THandle hCuWext, OS_802_11_SSID* ssid);
-S32 CuOs_GetTxPowerLevel(THandle hCuWext, S32* pTxPowerLevel);
-S32 CuOs_SetTxPowerLevel(THandle hCuWext, S32 txPowerLevel);
-S32 CuOs_GetRtsTh(THandle hCuWext, PS32 pRtsTh);
-S32 CuOs_SetRtsTh(THandle hCuWext, S32 RtsTh);
-S32 CuOs_GetFragTh(THandle hCuWext, PS32 pFragTh);
-S32 CuOs_SetFragTh(THandle hCuWext, S32 FragTh);
-
-#endif  /* _CU_WEXT_H_ */
-        
diff --git a/wl1271/CUDK/os/linux/inc/ipc_event.h b/wl1271/CUDK/os/linux/inc/ipc_event.h
deleted file mode 100644
index f548e14..0000000
--- a/wl1271/CUDK/os/linux/inc/ipc_event.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * ipc_event.h
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************/
-/*                                                                          */
-/*    MODULE:   IPC_Event.h                                                 */
-/*    PURPOSE:                                                              */
-/*                                                                          */
-/****************************************************************************/
-#ifndef _IPC_EVENT_H_
-#define _IPC_EVENT_H_
-
-/* defines */
-/***********/
-
-/* types */
-/*********/
-
-/* functions */
-/*************/
-THandle IpcEvent_Create(VOID);
-VOID IpcEvent_Destroy(THandle hIpcEvent);
-
-S32 IpcEvent_EnableEvent(THandle hIpcEvent, U32 event);
-S32 IpcEvent_DisableEvent(THandle hIpcEvent, U32 event);
-S32 IpcEvent_UpdateDebugLevel(THandle hIpcEvent, S32 debug_level);
-
-#endif  /* _IPC_EVENT_H_ */
-        
diff --git a/wl1271/CUDK/os/linux/inc/ipc_sta.h b/wl1271/CUDK/os/linux/inc/ipc_sta.h
deleted file mode 100644
index 375d15e..0000000
--- a/wl1271/CUDK/os/linux/inc/ipc_sta.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * ipc_sta.h
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************/
-/*                                                                          */
-/*    MODULE:   IPC_STA.h                                                   */
-/*    PURPOSE:                                                              */
-/*                                                                          */
-/****************************************************************************/
-#ifndef _IPC_STA_H_
-#define _IPC_STA_H_
-
-#include "oserr.h"
-
-/* defines */
-/***********/
-
-/* types */
-/*********/
-
-/* functions */
-/*************/
-THandle IpcSta_Create(const PS8 device_name);
-VOID IpcSta_Destroy(THandle hIpcSta);
-S32 IPC_STA_Private_Send(THandle hIpcSta, U32 ioctl_cmd, PVOID bufIn, U32 sizeIn, PVOID bufOut, U32 sizeOut);
-S32 IPC_STA_Wext_Send(THandle hIpcSta, U32 wext_request_id, PVOID p_iwreq_data, U32 len);
-#endif  /* _IPC_STA_H_ */
-
diff --git a/wl1271/CUDK/os/linux/inc/ipc_wpa.h b/wl1271/CUDK/os/linux/inc/ipc_wpa.h
deleted file mode 100644
index 1155671..0000000
--- a/wl1271/CUDK/os/linux/inc/ipc_wpa.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * ipc_wpa.h
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************/
-/*                                                                          */
-/*    MODULE:   Ipc_Wpa.h                                                   */
-/*    PURPOSE:                                                              */
-/*                                                                          */
-/****************************************************************************/
-#ifndef _IPC_WPA_H_
-#define _IPC_WPA_H_
-
-/* defines */
-/***********/
-#define IPC_WPA_RESP_MAX_LEN 256
-
-/* types */
-/*********/
-
-/* functions */
-/*************/
-THandle IpcWpa_Create(PS32 pRes, PS8 pSupplIfFile);
-VOID IpcWpa_Destroy(THandle hIpcWpa);
-
-S32 IpcWpa_Command(THandle hIpcWpa, PS8 cmd, S32 print);
-S32 IpcWpa_CommandWithResp(THandle hIpcWpa, PS8 cmd, S32 print, PS8 pResp, PU32 pRespLen);
-
-
-#endif  /* _IPC_WPA_H_ */
-        
diff --git a/wl1271/CUDK/os/linux/inc/os_trans.h b/wl1271/CUDK/os/linux/inc/os_trans.h
deleted file mode 100644
index 21026dd..0000000
--- a/wl1271/CUDK/os/linux/inc/os_trans.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * os_trans.h
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-#ifndef _OS_TRANS_H
-#define _OS_TRANS_H
-
-#include "cu_osapi.h"
-#include "tidef.h"
-
-#ifndef SOCKET_ERROR
-#define SOCKET_ERROR -1
-#endif
-
-#define MAX_QUEUE_LENGTH	5//maximum length the queue of pending connections
-
-typedef  int		SOCKET;
-
-TI_BOOL os_trans_create(VOID);
-TI_BOOL os_socket (THandle* pSock);
-TI_BOOL os_bind (THandle sock, U16 port);
-TI_BOOL os_sockWaitForConnection (THandle socket_id, THandle* pConnSock);
-TI_BOOL os_sockSend (THandle socket_id, PS8 buffer, U32 bufferSize);
-VOID	os_trans_destroy(VOID);
-S32		os_sockRecv (THandle socket_id, PU8 pBuffer, U32 bufferSize, TI_SIZE_T flags);
-
-#endif
diff --git a/wl1271/CUDK/os/linux/src/Android.mk b/wl1271/CUDK/os/linux/src/Android.mk
deleted file mode 100644
index 8d673a5..0000000
--- a/wl1271/CUDK/os/linux/src/Android.mk
+++ /dev/null
@@ -1,89 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-STATIC_LIB ?= y
-DEBUG ?= y
-BUILD_SUPPL ?= n
-WPA_ENTERPRISE ?= y
-
-ifeq ($(DEBUG),y)
-  DEBUGFLAGS = -O2 -g -DDEBUG -DTI_DBG -fno-builtin   
-else
-  DEBUGFLAGS = -O2
-endif
-
-WILINK_ROOT = ../../../..
-CUDK_ROOT = $(WILINK_ROOT)/CUDK
-ifndef WPA_SUPPLICANT_VERSION
-WPA_SUPPLICANT_VERSION := VER_0_5_X
-endif
-
-ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_5_X)
-WPA_SUPPL_DIR = external/wpa_supplicant
-else
-WPA_SUPPL_DIR = external/wpa_supplicant_6/wpa_supplicant
-endif
-WPA_SUPPL_DIR_INCLUDE = $(WPA_SUPPL_DIR)
-ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_6_X)
-WPA_SUPPL_DIR_INCLUDE += $(WPA_SUPPL_DIR)/src \
-	$(WPA_SUPPL_DIR)/src/common \
-	$(WPA_SUPPL_DIR)/src/drivers \
-	$(WPA_SUPPL_DIR)/src/l2_packet \
-	$(WPA_SUPPL_DIR)/src/utils \
-	$(WPA_SUPPL_DIR)/src/wps
-endif
-
-DK_DEFINES = 
-ifeq ($(WPA_ENTERPRISE), y)
-DK_DEFINES += -D WPA_ENTERPRISE
-endif
-
-ifeq ($(BUILD_SUPPL), y)
-DK_DEFINES += -D WPA_SUPPLICANT -D CONFIG_CTRL_IFACE -D CONFIG_CTRL_IFACE_UNIX
--include $(WPA_SUPPL_DIR)/.config
-ifdef CONFIG_WPS
-DK_DEFINES += -DCONFIG_WPS
-endif
-endif
-
-LOCAL_CFLAGS += \
-	-Wall -Wstrict-prototypes $(DEBUGFLAGS) -D__LINUX__ $(DK_DEFINES) -D__BYTE_ORDER_LITTLE_ENDIAN -fno-common #-pipe
-
-LOCAL_SRC_FILES:= \
-	cu_wext.c \
-	ipc_sta.c \
-	ipc_event.c \
-	ipc_wpa.c \
-	os_trans.c \
-	ParsEvent.c \
-	osapi.c
-
-ifeq ($(BUILD_SUPPL), y)
-	ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_5_X)
-	LOCAL_SRC_FILES += $(WPA_SUPPL_DIR)/wpa_ctrl.c
-	else
-	LOCAL_SRC_FILES += $(WPA_SUPPL_DIR)/common/src/wpa_ctrl.c
-	endif
-endif
-
-LOCAL_C_INCLUDES := \
-	$(LOCAL_PATH)/../inc \
-	$(LOCAL_PATH)/../../common/inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/Export_Inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Sta_Management \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Application \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/utils \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/Txn \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/TWDriver \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FirmwareApi \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FW_Transfer/Export_Inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/TwIf \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/platforms/os/linux/inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/platforms/os/common/inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FirmwareApi \
-	$(LOCAL_PATH)/$(CUDK_ROOT)/configurationutility/inc \
-	$(WPA_SUPPL_DIR_INCLUDE)
-
-LOCAL_MODULE := libtiOsLib
-
-include $(BUILD_STATIC_LIBRARY)
diff --git a/wl1271/CUDK/os/linux/src/ParsEvent.c b/wl1271/CUDK/os/linux/src/ParsEvent.c
deleted file mode 100644
index 43d65b0..0000000
--- a/wl1271/CUDK/os/linux/src/ParsEvent.c
+++ /dev/null
Binary files differ
diff --git a/wl1271/CUDK/os/linux/src/cu_wext.c b/wl1271/CUDK/os/linux/src/cu_wext.c
deleted file mode 100644
index 39189ad..0000000
--- a/wl1271/CUDK/os/linux/src/cu_wext.c
+++ /dev/null
@@ -1,488 +0,0 @@
-/*
- * cu_wext.c
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************
-*
-*   MODULE:  CU_Wext.c
-*   
-*   PURPOSE: 
-* 
-*   DESCRIPTION:  
-*   ============
-*      
-*
-****************************************************************************/
-
-/* includes */
-/************/
-#include "cu_osapi.h"
-#include "oserr.h"
-#include <net/if.h>
-#include <linux/rtnetlink.h>
-#include <linux/wireless.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "TWDriver.h"
-#include "STADExternalIf.h"
-#include "ParsEvent.h"
-#include "ipc_sta.h"
-#include "cu_os.h"
-
-/* defines */
-/***********/
-
-/* local types */
-/***************/
-/* Module control block */
-typedef struct
-{
-    THandle hIpcSta;
-    union iwreq_data req_data;
-
-    struct iw_scan_req *scan_req;   
-    U16 scan_flag;
-} TCuWext;
-
-/* local variables */
-/*******************/
-
-/* local fucntions */
-/*******************/
-static S32 CuWext_FillBssidList(struct iw_event *iwe, OS_802_11_BSSID_EX* bssidList, S32 index)
-{
-    S32 res = 0;    
-    switch(iwe->cmd)
-    {
-        case SIOCGIWAP:
-            os_memcpy(bssidList[index].MacAddress, iwe->u.ap_addr.sa_data, MAC_ADDR_LEN);
-            bssidList[index].Configuration.BeaconPeriod = 0; /* default configuration */
-            res = 1;
-            break;
-        case SIOCGIWESSID:          
-            bssidList[index-1].Ssid.SsidLength = iwe->u.data.length;
-            os_memcpy(bssidList[index-1].Ssid.Ssid, iwe->u.data.pointer, bssidList[index-1].Ssid.SsidLength);
-            if(iwe->u.data.length != MAX_SSID_LEN)
-                bssidList[index-1].Ssid.Ssid[bssidList[index-1].Ssid.SsidLength] = 0;
-            break;
-        case SIOCGIWNAME:
-            {
-                unsigned i;
-                S8 buffer[IFNAMSIZ];
-                static const char *ieee80211_modes[] = {
-                    "?", 
-                    "IEEE 802.11 B", 
-                    "IEEE 802.11 A", 
-                    "IEEE 802.11 BG", 
-                    "IEEE 802.11 ABG" };
-                    
-                os_memset(buffer, 0, IFNAMSIZ);
-                os_memcpy(buffer, iwe->u.name, IFNAMSIZ);
-                for(i=0;i<SIZE_ARR(ieee80211_modes); i++)
-                    if (0 == os_strcmp((PS8)ieee80211_modes[i], buffer))
-                        break;
-                bssidList[index-1].NetworkTypeInUse = i;  
-            }
-            break;
-        case SIOCGIWMODE:
-            if(iwe->u.mode == IW_MODE_ADHOC)
-                bssidList[index-1].InfrastructureMode = os802_11IBSS;
-            else if (iwe->u.mode == IW_MODE_INFRA)
-                bssidList[index-1].InfrastructureMode = os802_11Infrastructure;
-            else if (iwe->u.mode == IW_MODE_AUTO)
-                bssidList[index-1].InfrastructureMode = os802_11AutoUnknown;
-            else
-                bssidList[index-1].InfrastructureMode = os802_11InfrastructureMax;
-            
-            break;
-        case SIOCGIWFREQ:
-            bssidList[index-1].Configuration.Union.channel = iwe->u.freq.m;
-            break;
-        case IWEVQUAL:
-            bssidList[index-1].Rssi = (S8)iwe->u.qual.level;
-            break;
-        case SIOCGIWENCODE:
-            if(iwe->u.data.flags == (IW_ENCODE_ENABLED | IW_ENCODE_NOKEY))
-            {
-                bssidList[index-1].Privacy = TRUE;
-                bssidList[index-1].Capabilities |= CAP_PRIVACY_MASK<<CAP_PRIVACY_SHIFT;
-            }
-            else
-            {
-                bssidList[index-1].Privacy = FALSE;
-                bssidList[index-1].Capabilities &= ~(CAP_PRIVACY_MASK<<CAP_PRIVACY_SHIFT);
-            }
-            break;
-        case SIOCGIWRATE:
-            break;
-        case IWEVCUSTOM:
-            {
-                S8 buffer[100];
-                
-                os_memset(buffer, 0, 100);
-                os_memcpy(buffer, iwe->u.data.pointer, iwe->u.data.length);
-
-                if(!os_strncmp(buffer, (PS8)"Bcn", 3))
-                {
-                    char *p1;
-                    p1 = strtok(&buffer[10], " ");
-                    bssidList[index-1].Configuration.BeaconPeriod = atoi(p1);
-                }
-            }           
-            break;          
-    }
-
-    return res;
-}
-
-
-/* functions */
-/*************/
-
-THandle CuOs_Create(THandle hIpcSta)
-{
-    TCuWext* pCuWext = (TCuWext*)os_MemoryCAlloc(sizeof(TCuWext), sizeof(U8));
-    if(pCuWext == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuOs_Create - cant allocate control block\n");
-        return NULL;
-    }
-
-    pCuWext->hIpcSta = hIpcSta;
-
-    return pCuWext;
-}
-
-VOID CuOs_Destroy(THandle hCuWext)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;
-
-    os_MemoryFree(pCuWext);
-}
-
-S32 CuOs_Get_SSID(THandle hCuWext, OS_802_11_SSID* ssid)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;
-    S32 res;
-
-    os_memset(ssid->Ssid, 0, sizeof(OS_802_11_SSID) - sizeof(U32));
-
-    pCuWext->req_data.essid.pointer = (PVOID)ssid->Ssid;
-    pCuWext->req_data.essid.length = sizeof(OS_802_11_SSID) - sizeof(U32);  
-    pCuWext->req_data.essid.flags = 0;
-
-    res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCGIWESSID, &pCuWext->req_data, sizeof(struct iw_point));
-    if(res != OK)   
-        return res;
-
-    ssid->SsidLength = pCuWext->req_data.essid.length;
-
-    return OK;
-}
-
-S32 CuOs_Get_BSSID(THandle hCuWext, TMacAddr bssid)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;   
-    S32 res,i;
-
-    os_memset(&pCuWext->req_data.ap_addr, 0x00, sizeof(struct sockaddr));
-
-    res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCGIWAP, &pCuWext->req_data, sizeof(struct sockaddr));
-    if(res != OK)   
-        return res;
-
-    for(i=0;i<MAC_ADDR_LEN;i++)
-        bssid[i] = pCuWext->req_data.ap_addr.sa_data[i];    
-
-    return OK;
-}
-
-S32 CuOs_GetCurrentChannel(THandle hCuWext, U32* channel)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;
-    S32 res;
-
-    pCuWext->req_data.freq.m = 0;
-    
-    res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCGIWFREQ, &pCuWext->req_data, sizeof(struct iw_freq    ));
-    if(res != OK)   
-        return res;
-
-    *channel = pCuWext->req_data.freq.m;
-
-    return OK;
-}
-
-/*Usage example of SIOCGIWSTATS. This WEXT is used by wireless tools such as iwconfig, iwlib etc.*/
-S32 CuOs_GetCurrentStats(THandle hCuWext, S32* rssi)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;
-    S32 res;
-	struct	iw_statistics stat;
-	*rssi = 0;
-
-	pCuWext->req_data.data.pointer = &stat;
-
-	res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCGIWSTATS, &pCuWext->req_data, sizeof(struct iw_statistics));
-    if(res != OK)
-        return res;
-
-    *rssi = stat.qual.level;
-
-    return OK;
-}
-
-S32 CuOs_Start_Scan(THandle hCuWext, OS_802_11_SSID* ssid, U8 scanType)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;
-    struct iw_scan_req tReq;
-    S32 res;
-
-    if (ssid->SsidLength > IW_ESSID_MAX_SIZE) 
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuOs_Start_Scan - too long SSID (%lu)\n",ssid->SsidLength);
-        return OSAL_ERROR;
-    }
-
-    if (ssid->Ssid[0] && ssid->SsidLength) 
-    {
-        os_memset(&tReq, 0, sizeof(tReq));
-        tReq.essid_len = ssid->SsidLength;
-        /*
-         * tReq.bssid.sa_family = ARPHRD_ETHER;
-         * os_memset(tReq.bssid.sa_data, 0xff, ETH_ALEN); 
-         */
-        os_memcpy(tReq.essid, ssid->Ssid, ssid->SsidLength);
-        pCuWext->scan_req = &tReq;
-        pCuWext->req_data.data.flags = IW_SCAN_THIS_ESSID;
-    }
-    else
-    {
-        pCuWext->req_data.data.flags = 0;
-    }
-
-	tReq.scan_type = scanType;
-    pCuWext->req_data.data.pointer = &tReq;
-    pCuWext->req_data.data.length = sizeof(struct iw_scan_req);
-
-    res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCSIWSCAN, &pCuWext->req_data, sizeof(struct iw_point));
-    if(res != OK)   
-        return res;
-
-    return OK;  
-}
-
-S32 CuOs_GetBssidList(THandle hCuWext, OS_802_11_BSSID_LIST_EX *bssidList)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;
-    S32 res, NumberOfItems;
-        
-    /* allocate the scan result buffer */
-    U8* buffer = os_MemoryCAlloc(IW_SCAN_MAX_DATA, sizeof(U8));
-    if(buffer == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - CuOs_Get_BssidList - cant allocate scan result buffer\n");
-        return EOALERR_CU_WEXT_ERROR_CANT_ALLOCATE;
-    }
-
-    NumberOfItems = 0;
-    pCuWext->req_data.data.pointer = buffer;
-    pCuWext->req_data.data.flags = 0;
-    do
-    {       
-        pCuWext->req_data.data.length = IW_SCAN_MAX_DATA;       
-
-        res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCGIWSCAN, &pCuWext->req_data, sizeof(struct iw_point));
-        if(res != OK)   
-        {
-            os_MemoryFree(buffer);
-            return res;
-        }
-    
-        /* parse the scan results */
-        if(pCuWext->req_data.data.length)    
-        {      
-            struct iw_event     iwe;      
-            struct stream_descr stream;                 
-            S32                 ret;  
-            
-            /* init the event stream */
-            os_memset((char *)&stream, '\0', sizeof(struct stream_descr));
-            stream.current = (char *)buffer;
-            stream.end = (char *)(buffer + pCuWext->req_data.data.length);
-
-            do  
-            {     
-                /* Extract an event and print it */   
-                ret = ParsEvent_GetEvent(&stream, &iwe);     
-                if(ret > 0)     
-                    NumberOfItems += CuWext_FillBssidList(&iwe, bssidList->Bssid, NumberOfItems);   
-            }      
-            while(ret > 0);      
-        }       
-        
-    } while(pCuWext->req_data.data.flags);
-
-    bssidList->NumberOfItems = NumberOfItems;   
-
-    /* free the scan result buffer */
-    os_MemoryFree(buffer);
-    
-    return OK;
-}
-
-
-S32 CuOs_Set_BSSID(THandle hCuWext, TMacAddr bssid)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;   
-    S32 res;
-
-    os_memcpy(pCuWext->req_data.ap_addr.sa_data, bssid, MAC_ADDR_LEN);
-        
-    res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCSIWAP, &pCuWext->req_data, sizeof(struct sockaddr));
-                                                
-    if(res != OK)   
-        return res;
-
-    return OK;
-}
-
-S32 CuOs_Set_ESSID(THandle hCuWext, OS_802_11_SSID* ssid)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;   
-    S32 res;
-
-    pCuWext->req_data.essid.pointer = (PVOID)ssid->Ssid;
-    pCuWext->req_data.essid.length = ssid->SsidLength;
-    if(ssid->SsidLength)
-        pCuWext->req_data.essid.flags = 1;  
-    else
-        pCuWext->req_data.essid.flags = 0;
-    pCuWext->req_data.essid.flags |= SET_SSID_WITHOUT_SUPPL;
-
-    res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCSIWESSID, &pCuWext->req_data, sizeof(struct sockaddr));
-                                                
-    if(res != OK)   
-        return res;
-
-    return OK;
-}
-
-S32 CuOs_GetTxPowerLevel(THandle hCuWext, S32* pTxPowerLevel)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;   
-    S32 res;
-
-    os_memset(&pCuWext->req_data.txpower, 0, sizeof(struct iw_param));
-
-    res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCGIWTXPOW, &pCuWext->req_data, sizeof(struct iw_param));
-                                                
-    if(res != OK)   
-        return res;
-
-    *pTxPowerLevel = pCuWext->req_data.txpower.value;
-
-    return OK;
-}
-
-S32 CuOs_SetTxPowerLevel(THandle hCuWext, S32 txPowerLevel)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;   
-    S32 res;
-
-    os_memset(&pCuWext->req_data.txpower, 0, sizeof(struct iw_param));
-
-    pCuWext->req_data.txpower.value = txPowerLevel;
-
-    res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCSIWTXPOW, &pCuWext->req_data, sizeof(struct iw_param));
-                                                
-    if(res != OK)   
-        return res;
-
-    return OK;
-}
-
-S32 CuOs_GetRtsTh(THandle hCuWext, PS32 pRtsTh)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;
-    S32 res;
-
-    os_memset(&pCuWext->req_data.rts, 0, sizeof(struct iw_param));
-
-    res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCGIWRTS, &pCuWext->req_data, sizeof(struct iw_param));
-    if(res != OK)   
-        return res;
-
-    *pRtsTh = pCuWext->req_data.rts.value;
-
-    return OK;
-}
-
-
-S32 CuOs_SetRtsTh(THandle hCuWext, S32 RtsTh)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;
-    S32 res;
-
-    os_memset(&pCuWext->req_data.rts, 0, sizeof(struct iw_param));
-    pCuWext->req_data.rts.value = RtsTh;
-
-    res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCSIWRTS, &pCuWext->req_data, sizeof(struct iw_param));
-    if(res != OK)   
-        return res;
-
-    
-
-    return OK;
-}
-
-S32 CuOs_GetFragTh(THandle hCuWext, PS32 pFragTh)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;
-    S32 res;
-
-    os_memset(&pCuWext->req_data.frag, 0, sizeof(struct iw_param));
-
-    res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCGIWFRAG, &pCuWext->req_data, sizeof(struct iw_param));
-    if(res != OK)   
-        return res;
-
-    *pFragTh = pCuWext->req_data.frag.value;
-
-    return OK;
-}
-
-S32 CuOs_SetFragTh(THandle hCuWext, S32 FragTh)
-{
-    TCuWext* pCuWext = (TCuWext*)hCuWext;
-    S32 res;
-
-    os_memset(&pCuWext->req_data.frag, 0, sizeof(struct iw_param));
-    pCuWext->req_data.frag.value = FragTh;
-
-    res = IPC_STA_Wext_Send(pCuWext->hIpcSta, SIOCSIWFRAG, &pCuWext->req_data, sizeof(struct iw_param));
-    if(res != OK)   
-        return res; 
-
-    return OK;
-}
-/*stab function (should be filled later on for Linux to get ThreadID of the WLAN driver*/
-S32 CuOs_GetDriverThreadId(THandle hCuWext, U32* threadid)
-{
-	return OK;
-}
diff --git a/wl1271/CUDK/os/linux/src/ipc_event.c b/wl1271/CUDK/os/linux/src/ipc_event.c
deleted file mode 100644
index e8be991..0000000
--- a/wl1271/CUDK/os/linux/src/ipc_event.c
+++ /dev/null
@@ -1,679 +0,0 @@
-/*
- * ipc_event.c
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************
-*
-*   MODULE:  IPC_Event.c
-*   
-*   PURPOSE: 
-* 
-*   DESCRIPTION:  
-*   ============
-*      
-*
-****************************************************************************/
-
-/* includes */
-/************/
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <linux/rtnetlink.h>
-#include <signal.h>
-#include <sys/mman.h>
-#include <unistd.h>
-#include <linux/wireless.h>
-#include "cu_osapi.h"
-#include "oserr.h"
-
-#include "TWDriver.h"
-#include "STADExternalIf.h"
-
-#include "ParsEvent.h"
-#include "ipc_event.h"
-
-/* defines */
-/***********/
-#define PIPE_READ 0
-#define PIPE_WRITE 1
-#define IPC_EVENT_KEY ((key_t)123456789)
-
-/* IPC evemt messages to child */
-#define IPC_EVENT_MSG_KILL                  "IPC_EVENT_MSG_KILL"
-#define IPC_EVENT_MSG_UPDATE_DEBUG_LEVEL    "IPC_EVENT_MSG_UPDATE_DEBUG_LEVEL"
-#define IPC_EVENT_MSG_MAX_LEN   50
-
-/* local types */
-/***************/
-typedef struct IpcEvent_Shared_Memory_t
-{
-    int pipe_fields[2];
-    u64 event_mask;
-    union 
-    {
-        S32 debug_level;
-    } content;
-} IpcEvent_Shared_Memory_t;
-
-/* Module control block */
-typedef struct IpcEvent_t
-{
-    IpcEvent_Shared_Memory_t* p_shared_memory;
-    S32 child_process_id;
-    S32 pipe_to_child;
-} IpcEvent_t;
-
-typedef struct IpcEvent_Child_t
-{
-    S32 STA_socket;
-    IpcEvent_Shared_Memory_t* p_shared_memory;
-    S32 pipe_from_parent;    
-} IpcEvent_Child_t;
-
-/* local variables */
-/*******************/
-VOID g_tester_send_event(U8 event_index);
-/* local fucntions */
-/*******************/
-static VOID IpcEvent_SendMessageToChild(IpcEvent_t* pIpcEvent, PS8 msg)
-{
-    write(pIpcEvent->pipe_to_child, msg, os_strlen(msg));    
-}
-
-static S32 IpcEvent_Sockets_Open(VOID)
-{
-    S32 skfd;
-    struct sockaddr_nl  local;
-
-    skfd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
-    if (skfd < 0) 
-    {
-        return -1;
-    }
-
-    os_memset(&local, 0, sizeof(local));
-    local.nl_family = AF_NETLINK;
-    local.nl_groups = RTMGRP_LINK;
-    if (bind(skfd, (struct sockaddr *) &local, sizeof(local)) < 0) 
-    {
-        close(skfd);
-        return -2;
-    }
-    
-    return skfd;
-}
-
-static inline VOID IpcEvent_Sockets_Close(S32 skfd)
-{
-    close(skfd);
-}
-
-void ProcessLoggerMessage(PU8 data, U16 len);
-
-static VOID IpcEvent_PrintEvent(IpcEvent_Child_t* pIpcEventChild, U32 EventId, TI_UINT8* pData, S32 DataLen)
-{
-
-    if(pIpcEventChild->p_shared_memory->event_mask & ((u64)1<<EventId))
-    {
-        switch(EventId)
-        {
-            case IPC_EVENT_DISASSOCIATED:
-            {
-                OS_802_11_DISASSOCIATE_REASON_T    *pDisAssoc;
-
-                if (NULL == pData)
-                {
-                    return;
-                }
-                else
-                {
-                    pDisAssoc = (OS_802_11_DISASSOCIATE_REASON_T*)pData;
-                }
-
-                switch(pDisAssoc->eDisAssocType)
-                {
-                    case OS_DISASSOC_STATUS_UNSPECIFIED:
-                        os_error_printf(CU_MSG_ERROR, "CLI Event - Disassociated with unspecified reason (User/SG/Recovery)\n");
-                        break;
-                    case OS_DISASSOC_STATUS_AUTH_REJECT:
-                        if (pDisAssoc->uStatusCode == STATUS_PACKET_REJ_TIMEOUT)
-                        {
-                            os_error_printf(CU_MSG_ERROR, "CLI Event - Disassociated due to no Auth response \n");
-                        } 
-                        else
-                        {
-                            os_error_printf(CU_MSG_ERROR, "CLI Event - Disassociated due to Auth response packet with reason = %d\n", pDisAssoc->uStatusCode);
-                        }
-                        break;
-                    case OS_DISASSOC_STATUS_ASSOC_REJECT:
-                        if (pDisAssoc->uStatusCode == STATUS_PACKET_REJ_TIMEOUT)
-                        {
-                            os_error_printf(CU_MSG_ERROR, "CLI Event - Disassociated due to no Assoc response \n");
-                        } 
-                        else
-                        {
-                            os_error_printf(CU_MSG_ERROR, "CLI Event - Disassociated due to Assoc response packet with reason = %d\n", pDisAssoc->uStatusCode);
-                        }
-                        break;
-                    case OS_DISASSOC_STATUS_SECURITY_FAILURE:
-                        os_error_printf(CU_MSG_ERROR, "CLI Event - Disassociated due to RSN failure\n");
-                        break;
-                    case OS_DISASSOC_STATUS_AP_DEAUTHENTICATE:
-                        os_error_printf(CU_MSG_ERROR, "CLI Event - Disassociated due to AP deAuthenticate packet with reason = %d\n", pDisAssoc->uStatusCode);
-                        break;
-                    case OS_DISASSOC_STATUS_AP_DISASSOCIATE:
-                        os_error_printf(CU_MSG_ERROR, "CLI Event - Disassociated due to AP disAssoc packet with reason = %d\n", pDisAssoc->uStatusCode);
-                        break;
-                    case OS_DISASSOC_STATUS_ROAMING_TRIGGER:
-                        os_error_printf(CU_MSG_ERROR, "CLI Event - Disassociated due to roaming trigger = %d\n", pDisAssoc->uStatusCode);
-                        break;
-                    default:
-                        os_error_printf(CU_MSG_ERROR, "CLI Event - Disassociated with unknown reason = %d\n", pDisAssoc->eDisAssocType);
-                        break; 
-                }
-                
-                break; /* the end of the IPC_EVENT_DISASSOCIATED case */
-            }
-            case IPC_EVENT_ASSOCIATED:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_ASSOCIATED\n");
-                break;
-            case IPC_EVENT_MEDIA_SPECIFIC:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_MEDIA_SPECIFIC\n");
-                break;
-            case IPC_EVENT_SCAN_COMPLETE:
-				os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_SCAN_COMPLETE\n");
-                break;
-            /* custom events */
-            case IPC_EVENT_SCAN_STOPPED:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_SCAN_STOPPED\n");
-                break;
-            case IPC_EVENT_LINK_SPEED:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_LINK_SPEED\n");
-                break;
-            case IPC_EVENT_AUTH_SUCC:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_AUTH_SUCC\n");
-                break;
-            case IPC_EVENT_CCKM_START:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_CCKM_START\n");
-                break;
-            case IPC_EVENT_EAPOL:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_EAPOL\n");
-                break;
-            case IPC_EVENT_RE_AUTH_STARTED:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_RE_AUTH_STARTED\n");
-                break;
-            case IPC_EVENT_RE_AUTH_COMPLETED:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_RE_AUTH_COMPLETED\n");
-                break;
-            case IPC_EVENT_RE_AUTH_TERMINATED:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_RE_AUTH_TERMINATED\n");
-                break;
-            case IPC_EVENT_BOUND:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_BOUND\n");
-                break;
-            case IPC_EVENT_UNBOUND:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_UNBOUND\n");
-                break;
-            case IPC_EVENT_PREAUTH_EAPOL:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_PREAUTH_EAPOL\n");
-                break;
-            case IPC_EVENT_LOW_RSSI:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_LOW_RSSI\n");
-                break;
-            case IPC_EVENT_TSPEC_STATUS:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_TSPEC_STATUS\n");
-
-                OS_802_11_QOS_TSPEC_PARAMS* tspec = (OS_802_11_QOS_TSPEC_PARAMS*)pData;
-                os_error_printf(CU_MSG_ERROR, "CLI Event - IPC_EVENT_TSPEC_STATUS -- (ReasonCode = %d) \n",tspec->uReasonCode);
-                os_error_printf(CU_MSG_ERROR, "Tspec Parameters (as received through event handler):\n");
-                os_error_printf(CU_MSG_ERROR, "-----------------------------------------------------\n");
-                os_error_printf(CU_MSG_ERROR, "userPriority = %d\n",tspec->uUserPriority);
-                os_error_printf(CU_MSG_ERROR, "uNominalMSDUsize = %d\n",tspec->uNominalMSDUsize);
-                os_error_printf(CU_MSG_ERROR, "uMeanDataRate = %d\n",tspec->uMeanDataRate);
-                os_error_printf(CU_MSG_ERROR, "uMinimumPHYRate = %d\n",tspec->uMinimumPHYRate);
-                os_error_printf(CU_MSG_ERROR, "uSurplusBandwidthAllowance = %d\n",tspec->uSurplusBandwidthAllowance);
-                os_error_printf(CU_MSG_ERROR, "uAPSDFlag = %d\n",tspec->uAPSDFlag);
-                os_error_printf(CU_MSG_ERROR, "MinimumServiceInterval = %d\n",tspec->uMinimumServiceInterval);
-                os_error_printf(CU_MSG_ERROR, "MaximumServiceInterval = %d\n",tspec->uMaximumServiceInterval);
-                os_error_printf(CU_MSG_ERROR, "uMediumTime = %d\n\n",tspec->uMediumTime);
-           
-                break;
-            case IPC_EVENT_TSPEC_RATE_STATUS:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_TSPEC_RATE_STATUS\n");
-                break;
-            case IPC_EVENT_MEDIUM_TIME_CROSS:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_MEDIUM_TIME_CROSS\n");
-                break;
-            case IPC_EVENT_ROAMING_COMPLETE:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_ROAMING_COMPLETE\n");
-                break;
-            case IPC_EVENT_EAP_AUTH_FAILURE:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_EAP_AUTH_FAILURE\n");
-                break;
-            case IPC_EVENT_WPA2_PREAUTHENTICATION:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_WPA2_PREAUTHENTICATION\n");
-                break;
-            case IPC_EVENT_TRAFFIC_INTENSITY_THRESHOLD_CROSSED:
-            {
-                U32 *crossInfo = (U32 *)pData;
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_TRAFFIC_INTENSITY_THRESHOLD_CROSSED\n");
-                os_error_printf(CU_MSG_ERROR, (PS8)"Threshold(High=0,  Low=1)   crossed= %d\n", crossInfo[0]);
-                os_error_printf(CU_MSG_ERROR, (PS8)"Direction(Above=0, Below=1) crossed= %d\n", crossInfo[1]);
-                break;
-            }
-            case IPC_EVENT_SCAN_FAILED:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_SCAN_FAILED\n");
-                break;
-            case IPC_EVENT_WPS_SESSION_OVERLAP:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_WPS_SESSION_OVERLAP\n");
-                break;
-            case IPC_EVENT_RSSI_SNR_TRIGGER:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_RSSI_SNR_TRIGGER (index = %d), Data = %d\n", (S8)(*(pData + 2) - 1),(S8)(*pData));
-                break;
-            case IPC_EVENT_TIMEOUT:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_TIMEOUT\n");
-                break;
-            case IPC_EVENT_GWSI:
-                os_error_printf(CU_MSG_ERROR, (PS8)"IpcEvent_PrintEvent - received IPC_EVENT_GWSI\n");
-                break;
-            case IPC_EVENT_LOGGER:
-#ifdef ETH_SUPPORT
-                ProcessLoggerMessage(pData, (U16)DataLen);
-#endif   
-                break;
-            default :
-                os_error_printf(CU_MSG_ERROR, (PS8)"**** Unknow EventId %d ****\n", EventId); 
-        }
-    }   
-}
-
-static VOID IpcEvent_wext_event_wireless(IpcEvent_Child_t* pIpcEventChild, PS8 data, S32 len)
-{
-    struct iw_event     iwe;      
-    struct stream_descr stream;                 
-    S32                 ret;  
-    IPC_EV_DATA*        pEvent;    
-	U32					EventId = 0;
-
-    /* init the event stream */
-    os_memset((char *)&stream, '\0', sizeof(struct stream_descr));
-    stream.current = (char *)data;
-    stream.end = (char *)(data + len);
-
-    do  
-    {     
-        /* Extract an event and print it */   
-        ret = ParsEvent_GetEvent(&stream, &iwe);     
-
-        if(ret <= 0)   
-            break;
-
-        switch (iwe.cmd) 
-        {
-            case SIOCGIWAP:
-                if((iwe.u.ap_addr.sa_data[0] == 0) && 
-                    (iwe.u.ap_addr.sa_data[1] == 0) &&
-                    (iwe.u.ap_addr.sa_data[2] == 0) &&
-                    (iwe.u.ap_addr.sa_data[3] == 0) &&
-                    (iwe.u.ap_addr.sa_data[4] == 0) &&
-                    (iwe.u.ap_addr.sa_data[5] == 0))
-                {
-					EventId=IPC_EVENT_DISASSOCIATED;
-                     IpcEvent_PrintEvent(pIpcEventChild, EventId, NULL,0);
-                } 
-                else 
-                {
-#ifdef XCC_MODULE_INCLUDED
-                    /* Send a signal to the udhcpc application to trigger the renew request */
-                    system("killall -SIGUSR1 udhcpc"); 
-#endif
-					EventId=IPC_EVENT_ASSOCIATED;
-                     IpcEvent_PrintEvent(pIpcEventChild, EventId, NULL,0);                
-                }
-                break;
-            case IWEVMICHAELMICFAILURE:
-				EventId=IPC_EVENT_MEDIA_SPECIFIC;
-                IpcEvent_PrintEvent(pIpcEventChild, EventId, NULL,0);
-                break;
-            case IWEVCUSTOM:
-				pEvent =  (IPC_EV_DATA*)iwe.u.data.pointer;
-                if (pEvent)
-                {
-                    EventId = (U32)pEvent->EvParams.uEventType;
-                    IpcEvent_PrintEvent (pIpcEventChild, EventId, pEvent->uBuffer, pEvent->uBufferSize);
-                }
-				break;
-            case SIOCGIWSCAN:
-				EventId=IPC_EVENT_SCAN_COMPLETE;
-                IpcEvent_PrintEvent(pIpcEventChild, EventId, NULL,0);             
-                break;
-            case IWEVASSOCREQIE:
-                /* NOP */
-                break;
-            case IWEVASSOCRESPIE:
-                /* NOP */
-                break;
-            case IWEVPMKIDCAND:
-				EventId=IPC_EVENT_MEDIA_SPECIFIC;
-                IpcEvent_PrintEvent(pIpcEventChild, EventId, NULL,0);    
-                break;
-        }
-
-		g_tester_send_event((U8) EventId);
-
-    }      
-    while(1);
-}
-
-static VOID IpcEvent_wext_event_rtm_newlink(IpcEvent_Child_t* pIpcEventChild, struct nlmsghdr *h, 
-                                            S32 len)
-{
-    struct ifinfomsg *ifi;
-    S32 attrlen, nlmsg_len, rta_len;
-    struct rtattr * attr;
-
-    if (len < sizeof(*ifi))
-        return;
-
-    ifi = NLMSG_DATA(h);
-
-    /*
-    if ((if_nametoindex("wlan") != ifi->ifi_index) && (if_nametoindex("wifi") != ifi->ifi_index))
-    {
-        os_error_printf(CU_MSG_ERROR, "ERROR - IpcEvent_wext_event_rtm_newlink - Ignore event for foreign ifindex %d",
-               ifi->ifi_index);
-        return;
-    }
-    */
-
-    nlmsg_len = NLMSG_ALIGN(sizeof(struct ifinfomsg));
-
-    attrlen = h->nlmsg_len - nlmsg_len;
-    if (attrlen < 0)
-        return;
-
-    attr = (struct rtattr *) (((char *) ifi) + nlmsg_len);
-
-    rta_len = RTA_ALIGN(sizeof(struct rtattr));
-    while (RTA_OK(attr, attrlen)) {
-        if (attr->rta_type == IFLA_WIRELESS) 
-        {
-            IpcEvent_wext_event_wireless(pIpcEventChild, ((PS8) attr) + rta_len,
-                attr->rta_len - rta_len);
-        } 
-        else if (attr->rta_type == IFLA_IFNAME) 
-        {
-            os_error_printf(CU_MSG_WARNING, (PS8)"WARNING - IpcEvent_wext_event_rtm_newlink - unsupported rta_type = IFLA_IFNAME\n");
-            
-        }
-        attr = RTA_NEXT(attr, attrlen);
-    }
-}
-
-static VOID IpcEvent_Handle_STA_Event(IpcEvent_Child_t* pIpcEventChild)
-{       
-    S8 buf[512];
-    S32 left;
-    struct sockaddr_nl from;
-    socklen_t fromlen;
-    struct nlmsghdr *h;
-
-    fromlen = sizeof(from);
-    left = recvfrom(pIpcEventChild->STA_socket, buf, sizeof(buf), MSG_DONTWAIT,
-            (struct sockaddr *) &from, &fromlen);
-    if (left < 0) 
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcEvent_Handle_STA_Event - cant recv from socket %X .\n", 
-						pIpcEventChild->STA_socket);
-        return;
-    }
-
-    h = (struct nlmsghdr *) buf;
-
-    while (left >= sizeof(*h)) 
-    {
-        S32 len, plen;
-
-        len = h->nlmsg_len;
-        plen = len - sizeof(*h);
-        if (len > left || plen < 0) {
-            os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcEvent_Handle_STA_Event - Malformed netlink message: len=%d left=%d plen=%d",
-                   len, left, plen);
-            break;
-        }
-
-        switch (h->nlmsg_type) 
-        {
-        case RTM_NEWLINK:
-            IpcEvent_wext_event_rtm_newlink(pIpcEventChild, h, plen);
-            break;      
-        }
-
-        len = NLMSG_ALIGN(len);
-        left -= len;
-        h = (struct nlmsghdr *) ((char *) h + len);
-    }
-
-    if (left > 0) 
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcEvent_Handle_STA_Event - %d extra bytes in the end of netlink ",
-               left);
-        IpcEvent_Handle_STA_Event(pIpcEventChild);
-    }
-    
-}
-
-static S32 IpcEvent_Handle_Parent_Event(IpcEvent_Child_t* pIpcEventChild)
-{
-    S8 msg[IPC_EVENT_MSG_MAX_LEN];
-
-    S32 msgLen = read(pIpcEventChild->pipe_from_parent,msg, IPC_EVENT_MSG_MAX_LEN);
-    msg[msgLen] = 0;
-
-    if(!os_strcmp(msg, (PS8)IPC_EVENT_MSG_KILL))
-    {
-        return TRUE;
-    }
-    if(!os_strcmp(msg, (PS8)IPC_EVENT_MSG_UPDATE_DEBUG_LEVEL))
-    {
-/*        g_debug_level= pIpcEventChild->p_shared_memory->content.debug_level;*/
-        return FALSE;
-    }else
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcEvent_Handle_Parent_Event - unknown msgLen=%d msg=|%s| \n",msgLen,msg);  
-
-	return FALSE;
-
-}
-
-static VOID IpcEvent_Child_Destroy(IpcEvent_Child_t* pIpcEventChild)
-{
-    if(pIpcEventChild->STA_socket)
-    {
-        IpcEvent_Sockets_Close(pIpcEventChild->STA_socket);
-    }
-    
-}
-    
-static VOID IpcEvent_Child(IpcEvent_Child_t* pIpcEventChild)
-{
-    /* open the socket from the driver */
-    pIpcEventChild->STA_socket = IpcEvent_Sockets_Open();
-    if(pIpcEventChild->STA_socket < 0)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcEvent_Create - cant open socket for communication with the driver (%d)\n",pIpcEventChild->STA_socket);
-        return;
-    }
-    
-    while(1)    
-    {      
-        fd_set      read_set;       /* File descriptors for select */           
-        S32         ret;      
-        
-        FD_ZERO(&read_set);
-        FD_SET(pIpcEventChild->STA_socket, &read_set);
-        FD_SET(pIpcEventChild->pipe_from_parent, &read_set);
-
-#ifndef ANDROID
-        ret = select(max(pIpcEventChild->pipe_from_parent,pIpcEventChild->STA_socket) + 1, 
-                    &read_set, NULL, NULL, NULL);
-#else
-        ret = select(pIpcEventChild->STA_socket + 1, 
-                    &read_set, NULL, NULL, NULL);
-#endif
-
-        if(ret < 0) 
-        {             
-            os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcEvent_Child - Unhandled signal - exiting...\n");    
-            break;
-        }      
-        if(ret == 0)    {     continue; }      /* Check for interface discovery events. */      
-        if(FD_ISSET(pIpcEventChild->STA_socket, &read_set))
-            IpcEvent_Handle_STA_Event(pIpcEventChild);    
-
-#ifndef ANDROID 
-        if(FD_ISSET(pIpcEventChild->pipe_from_parent, &read_set))   
-        {
-            S32 exit = IpcEvent_Handle_Parent_Event(pIpcEventChild);
-             if(exit)
-                break;
-        }
-#endif
-
-    }  
-
-    IpcEvent_Child_Destroy(pIpcEventChild);
-}
-
-/* functions */
-/*************/
-THandle IpcEvent_Create(VOID)
-{   
-    IpcEvent_t* pIpcEvent = (IpcEvent_t*)os_MemoryCAlloc(sizeof(IpcEvent_t), sizeof(U8));
-    if(pIpcEvent == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcEvent_Create - cant allocate control block\n");
-        return NULL;
-    }
-     
-    /* create a shared memory space */
-    pIpcEvent->p_shared_memory = mmap(0, sizeof(IpcEvent_Shared_Memory_t), PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0);
-    if ( pIpcEvent->p_shared_memory == ((PVOID)-1)) 
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcEvent_Create - cant allocate shared memory\n");
-        IpcEvent_Destroy(pIpcEvent);
-        return NULL;
-    }
-
-    /* create a pipe */
-    pipe(pIpcEvent->p_shared_memory->pipe_fields);
-
-    /* set the event mask to all disabled */
-    pIpcEvent->p_shared_memory->event_mask = 0;
-
-    /* Create a child process */
-    pIpcEvent->child_process_id = fork();
-
-    if (0 == pIpcEvent->child_process_id)
-    {
-        /******************/
-        /* Child process */
-        /****************/      
-        IpcEvent_Child_t* pIpcEventChild = (IpcEvent_Child_t*)os_MemoryCAlloc(sizeof(IpcEvent_Child_t), sizeof(U8));        
-        if(pIpcEventChild == NULL)
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcEvent_Create - cant allocate child control block\n");
-            _exit(1);
-        }
-
-        pIpcEventChild->p_shared_memory = pIpcEvent->p_shared_memory;
-
-        pIpcEventChild->pipe_from_parent = pIpcEventChild->p_shared_memory->pipe_fields[PIPE_READ];
-        close(pIpcEventChild->p_shared_memory->pipe_fields[PIPE_WRITE]);
-
-        IpcEvent_Child(pIpcEventChild);
-
-        os_MemoryFree(pIpcEventChild);
-
-        _exit(0);
-    }
- 
-    pIpcEvent->pipe_to_child = pIpcEvent->p_shared_memory->pipe_fields[PIPE_WRITE];
-    close(pIpcEvent->p_shared_memory->pipe_fields[PIPE_READ]);
-    
-    return pIpcEvent;
-}
-
-VOID IpcEvent_Destroy(THandle hIpcEvent)
-{
-    IpcEvent_t* pIpcEvent = (IpcEvent_t*)hIpcEvent;
-
-    if((pIpcEvent->p_shared_memory != ((PVOID)-1)) && (pIpcEvent->p_shared_memory))
-    {       
-        munmap(pIpcEvent->p_shared_memory, sizeof(IpcEvent_Shared_Memory_t));
-    }
-
-    /* kill child process */
-    kill(pIpcEvent->child_process_id, SIGKILL);
-    
-     os_MemoryFree(pIpcEvent);
-
-}
-
-S32 IpcEvent_EnableEvent(THandle hIpcEvent, U32 event)
-{
-    IpcEvent_t* pIpcEvent = (IpcEvent_t*)hIpcEvent;
-    
-    if(pIpcEvent->p_shared_memory->event_mask & ((u64)1 << event))
-    {
-        return EOALERR_IPC_EVENT_ERROR_EVENT_ALREADY_ENABLED;
-    }
-    else
-    {
-       pIpcEvent->p_shared_memory->event_mask |= ((u64)1 << event);
-    }
-
-    return OK;
-        
-}
-
-S32 IpcEvent_DisableEvent(THandle hIpcEvent, U32 event)
-{
-    IpcEvent_t* pIpcEvent = (IpcEvent_t*)hIpcEvent;
-    
-    if(!(pIpcEvent->p_shared_memory->event_mask & (1 << event)))
-    {
-        return EOALERR_IPC_EVENT_ERROR_EVENT_ALREADY_DISABLED;
-    }
-    else
-    {
-        pIpcEvent->p_shared_memory->event_mask &= ~(1 << event);
-    }
-
-    return OK;
-}
-
-S32 IpcEvent_UpdateDebugLevel(THandle hIpcEvent, S32 debug_level)
-{
-    IpcEvent_t* pIpcEvent = (IpcEvent_t*)hIpcEvent;
-
-    pIpcEvent->p_shared_memory->content.debug_level = debug_level;
-    IpcEvent_SendMessageToChild(pIpcEvent, (PS8)IPC_EVENT_MSG_UPDATE_DEBUG_LEVEL);
-
-    return OK;
-}
-
diff --git a/wl1271/CUDK/os/linux/src/ipc_sta.c b/wl1271/CUDK/os/linux/src/ipc_sta.c
deleted file mode 100644
index 53ecef0..0000000
--- a/wl1271/CUDK/os/linux/src/ipc_sta.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * ipc_sta.c
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************
-*
-*   MODULE:  IPC_STA.c
-*   
-*   PURPOSE: 
-* 
-*   DESCRIPTION:  
-*   ============
-*      
-*
-****************************************************************************/
-
-/* includes */
-/************/
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <linux/rtnetlink.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <linux/wireless.h>
-#include "cu_osapi.h"
-#include "oserr.h"
-#include "STADExternalIf.h"
-#include "ipc_sta.h"
-
-/* defines */
-/***********/
-
-/* local types */
-/***************/
-/* Module control block */
-typedef struct IpcSta_t
-{
-    struct iwreq    wext_req;
-    ti_private_cmd_t private_cmd;
-    S32 STA_socket;
-    
-} IpcSta_t;
-
-/* local variables */
-/*******************/
-
-/* local fucntions */
-/*******************/
-
-/*
- * IpcSta_Sockets_Open - Open a socket.
- * Depending on the protocol present, open the right socket. The socket
- * will allow us to talk to the driver.
- */
-static S32 IpcSta_Sockets_Open(VOID)
-{
-    static const S32 families[] = {
-        AF_INET, AF_IPX, AF_APPLETALK
-    };
-    U32    i;
-    S32    sock;
-
-    /*
-    * Now pick any (exisiting) useful socket family for generic queries
-    * Note : don't open all the socket, only returns when one matches,
-    * all protocols might not be valid.
-    * Workaround by Jim Kaba <jkaba@sarnoff.com>
-    * Note : in 2001% of the case, we will just open the inet_sock.
-    * The remaining 2002% case are not fully correct...
-    */
-
-    /* Try all families we support */
-    for(i = 0; i < sizeof(families)/sizeof(int); ++i)
-    {
-        /* Try to open the socket, if success returns it */
-        sock = socket(families[i], SOCK_DGRAM, 0);
-        if(sock >= 0)
-            return sock;
-    }
-
-    return -1;
-}
-
-/*
- * IpcSta_Sockets_Close - Close the socket used for ioctl.
- */
-static inline VOID IpcSta_Sockets_Close(S32 skfd)
-{
-    close(skfd);
-}
-
-
-/* functions */
-/*************/
-THandle IpcSta_Create(const PS8 device_name)
-{
-    IpcSta_t* pIpcSta = (IpcSta_t*)os_MemoryCAlloc(sizeof(IpcSta_t), sizeof(U8));
-    if(pIpcSta == NULL)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcSta_Create - cant allocate control block\n");
-        return NULL;
-    }
-
-    /* open the socket to the driver */
-    pIpcSta->STA_socket = IpcSta_Sockets_Open();
-    if(pIpcSta->STA_socket == -1)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcSta_Create - cant open socket for communication with the driver\n");
-        return NULL;
-    }
-
-    /* set the driver name */
-    os_strcpy((PS8)pIpcSta->wext_req.ifr_ifrn.ifrn_name, device_name);   
-
-    return pIpcSta;
-}
-
-VOID IpcSta_Destroy(THandle hIpcSta)
-{
-    IpcSta_t* pIpcSta = (IpcSta_t*)hIpcSta;
-
-    /* close the socket to the driver */
-    IpcSta_Sockets_Close(pIpcSta->STA_socket);
-
-    os_MemoryFree(pIpcSta);
-}
-
-S32 IPC_STA_Private_Send(THandle hIpcSta, U32 ioctl_cmd, PVOID bufIn, U32 sizeIn, 
-                                                PVOID bufOut, U32 sizeOut)
-
-{
-    IpcSta_t* pIpcSta = (IpcSta_t*)hIpcSta;
-    S32 res;
-
-    pIpcSta ->private_cmd.cmd = ioctl_cmd;
-    if(bufOut == NULL)
-        pIpcSta ->private_cmd.flags = PRIVATE_CMD_SET_FLAG;
-    else
-        pIpcSta ->private_cmd.flags = PRIVATE_CMD_GET_FLAG;
-
-    pIpcSta ->private_cmd.in_buffer = bufIn;
-    pIpcSta ->private_cmd.in_buffer_len = sizeIn;
-    pIpcSta ->private_cmd.out_buffer = bufOut;
-    pIpcSta ->private_cmd.out_buffer_len = sizeOut;
-
-
-    pIpcSta->wext_req.u.data.pointer = &pIpcSta->private_cmd;
-    pIpcSta->wext_req.u.data.length = sizeof(ti_private_cmd_t);
-    pIpcSta->wext_req.u.data.flags = 0;
-
-    res = ioctl(pIpcSta->STA_socket, SIOCIWFIRSTPRIV, &pIpcSta->wext_req);     
-    if(res != OK)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IPC_STA_Private_Send - error sending Wext private IOCTL to STA driver (ioctl_cmd = %x,  res = %d, errno = %d)\n", ioctl_cmd,res,errno);
-        return EOALERR_IPC_STA_ERROR_SENDING_WEXT;
-    }
-
-    return OK;
-}
-
-S32 IPC_STA_Wext_Send(THandle hIpcSta, U32 wext_request_id, PVOID p_iwreq_data, U32 len)
-{
-    IpcSta_t* pIpcSta = (IpcSta_t*)hIpcSta;
-    S32 res;
-
-    os_memcpy(&pIpcSta->wext_req.u.data, p_iwreq_data, len);
-
-    res = ioctl(pIpcSta->STA_socket, wext_request_id, &pIpcSta->wext_req);
-    if(res != OK)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IPC_STA_Wext_Send - error sending Wext IOCTL to STA driver (wext_request_id = 0x%x, res = %d, errno = %d)\n",wext_request_id,res,errno);
-        return EOALERR_IPC_STA_ERROR_SENDING_WEXT;
-    }
-    
-    os_memcpy(p_iwreq_data, &pIpcSta->wext_req.u.data, len);
-
-    return OK;
-}
-
diff --git a/wl1271/CUDK/os/linux/src/ipc_wpa.c b/wl1271/CUDK/os/linux/src/ipc_wpa.c
deleted file mode 100644
index 03f050d..0000000
--- a/wl1271/CUDK/os/linux/src/ipc_wpa.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * ipc_wpa.c
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************
-*
-*   MODULE:  Ipc_Wpa.c
-*   
-*   PURPOSE: 
-* 
-*   DESCRIPTION:  
-*   ============
-*      
-*
-****************************************************************************/
-
-/* includes */
-/************/
-#include <sys/types.h>
-
-
-#include "cu_osapi.h"
-#include "oserr.h"
-#include "wpa_ctrl.h"
-#include "ipc_wpa.h"
-
-/* defines */
-/***********/
-#define IPC_WPA_CTRL_OPEN_RETRIES 5
-
-/* local types */
-/***************/
-/* Module control block */
-typedef struct TIpcWpa
-{
-	struct wpa_ctrl *pWpaCtrl;
-#if 0
-	S32 socket;
-	struct sockaddr_in local;
-	struct sockaddr_in dest;
-#endif
-} TIpcWpa;
-
-/* local variables */
-/*******************/
-
-/* local fucntions */
-/*******************/
-static S32 IpcWpa_Sockets_Open(TIpcWpa* pIpcWpa, PS8 pSupplIfFile)
-{
-#ifdef WPA_SUPPLICANT
-	S32 i;
-
-	for(i=0; i< IPC_WPA_CTRL_OPEN_RETRIES; i++)
-	{
-		pIpcWpa->pWpaCtrl = wpa_ctrl_open((char*)pSupplIfFile);
-		if(pIpcWpa->pWpaCtrl)
-			break;
-	}
-#else
-	pIpcWpa->pWpaCtrl = NULL;
-#endif
-	if(pIpcWpa->pWpaCtrl == NULL)
-	{
-		os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcWpa_Sockets_Open - can't connect the socket\n");
-		return EOALERR_IPC_WPA_ERROR_CANT_CONNECT_TO_SUPPL;
-	}
-
-	return OK;
-}
-
-static VOID IpcWpa_Sockets_Close(TIpcWpa* pIpcWpa)
-{
-#ifdef WPA_SUPPLICANT
-	wpa_ctrl_close(pIpcWpa->pWpaCtrl);
-#endif
-}
-
-
-/* functions */
-/*************/
-THandle IpcWpa_Create(PS32 pRes, PS8 pSupplIfFile)
-{	
-	TIpcWpa* pIpcWpa = (TIpcWpa*)os_MemoryCAlloc(sizeof(TIpcWpa), sizeof(U8));
-	if(pIpcWpa == NULL)
-	{
-		*pRes = OK;
-		os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - IpcWpa_Create - cant allocate control block\n");
-		return NULL;
-	}
-
-	*pRes = IpcWpa_Sockets_Open(pIpcWpa, pSupplIfFile);
-	if(*pRes)
-	{
-		IpcWpa_Destroy(pIpcWpa);
-		return NULL;
-	}
-
-	return pIpcWpa;
-}
-
-VOID IpcWpa_Destroy(THandle hIpcWpa)
-{
-	TIpcWpa* pIpcWpa = (TIpcWpa*)hIpcWpa;
-
-	if(pIpcWpa->pWpaCtrl)
-		IpcWpa_Sockets_Close(pIpcWpa);
-
-	os_MemoryFree(pIpcWpa);
-}
-
-S32 IpcWpa_Command(THandle hIpcWpa, PS8 cmd, S32 print)
-{
-#ifdef WPA_SUPPLICANT
-	TIpcWpa* pIpcWpa = (TIpcWpa*)hIpcWpa;
-	S8  Resp[IPC_WPA_RESP_MAX_LEN];
-	TI_SIZE_T RespLen = IPC_WPA_RESP_MAX_LEN - 1;
-	S32 ret;
-
-	ret = wpa_ctrl_request(pIpcWpa->pWpaCtrl, (char*)cmd, os_strlen(cmd), (char*)Resp, (size_t*)&RespLen, NULL);
-
-	if (ret == -2)
-	{
-		os_error_printf(CU_MSG_ERROR, (PS8)"'%s' command timed out.\n", cmd);
-		return EOALERR_IPC_WPA_ERROR_CMD_TIMEOUT;
-	}
-	else if (ret < 0)
-	{
-		os_error_printf(CU_MSG_ERROR, (PS8)"'%s' command failed (%d).\n", cmd, ret);
-		return EOALERR_IPC_WPA_ERROR_CMD_FAILED;
-	}
-	if (print)
-	{
-		Resp[RespLen] = '\0';
-		os_error_printf(CU_MSG_INFO2, (PS8)"%s", Resp);
-	}
-	return OK;
-#else
-	return EOALERR_IPC_WPA_ERROR_CMD_FAILED;
-#endif
-}
-
-S32 IpcWpa_CommandWithResp(THandle hIpcWpa, PS8 cmd, S32 print, PS8 pResp, PU32 pRespLen)
-{
-#ifdef WPA_SUPPLICANT
-	TIpcWpa* pIpcWpa = (TIpcWpa*)hIpcWpa;
-	S32 ret;
-
-	*pRespLen = IPC_WPA_RESP_MAX_LEN - 1;
-	ret = wpa_ctrl_request(pIpcWpa->pWpaCtrl, (char*)cmd, os_strlen(cmd), (char*)pResp, (size_t*)pRespLen, NULL);
-
-	if (ret == -2)
-	{
-		os_error_printf(CU_MSG_ERROR, (PS8)"'%s' command timed out.\n", cmd);
-		return EOALERR_IPC_WPA_ERROR_CMD_TIMEOUT;
-	}
-	else if (ret < 0)
-	{
-		os_error_printf(CU_MSG_ERROR, (PS8)"'%s' command failed.\n", cmd);
-		return EOALERR_IPC_WPA_ERROR_CMD_FAILED;
-	}
-	if (print)
-	{
-		pResp[*pRespLen] = '\0';
-		os_error_printf(CU_MSG_INFO2, (PS8)"%s", pResp);
-	}
-	return OK;
-#else
-	return EOALERR_IPC_WPA_ERROR_CMD_FAILED;
-#endif
-}
diff --git a/wl1271/CUDK/os/linux/src/makefile b/wl1271/CUDK/os/linux/src/makefile
deleted file mode 100644
index 2bca27c..0000000
--- a/wl1271/CUDK/os/linux/src/makefile
+++ /dev/null
@@ -1,136 +0,0 @@
-STATIC_LIB ?= y
-DEBUG ?= y
-BUILD_SUPPL ?= y
-SUPPL ?= ANDROID
-WPA_ENTERPRISE ?= y
-ETH_SUPPORT ?= n
-
-ifeq ($(DEBUG),y)
-  DEBUGFLAGS = -O2 -g -DDEBUG -DTI_DBG -fno-builtin   
-else
-  DEBUGFLAGS = -O2
-endif
-
-WILINK_ROOT = ../../../..
-CUDK_ROOT = $(WILINK_ROOT)/CUDK
-LIB_NAME = tiOsLib
-OUTPUT_DIR ?= $(CUDK_ROOT)/output
-
-DK_DEFINES = 
-ifeq ($(WPA_ENTERPRISE), y)
-        DK_DEFINES += -D WPA_ENTERPRISE
-endif
-
-ifeq ($(BUILD_SUPPL), y)
-  DK_DEFINES += -D WPA_SUPPLICANT -D CONFIG_CTRL_IFACE -D CONFIG_CTRL_IFACE_UNIX
-  -include $(CUDK_ROOT)/$(TI_SUPP_LIB_DIR)/.config
-  ifeq ($(CONFIG_EAP_WSC), y)
-    DK_DEFINES += -DCONFIG_EAP_WSC
-  endif
-endif
-
-ifeq ($(STATIC_LIB),y)
-        TARGET = $(OUTPUT_DIR)/$(LIB_NAME).a
-else
-        TARGET = $(OUTPUT_DIR)/$(LIB_NAME).so
-endif
-
-ifeq ($(ETH_SUPPORT), y)
-	DK_DEFINES += -DETH_SUPPORT
-endif
-
-SRCS  := \
-        cu_wext.c \
-        ipc_sta.c \
-        ipc_event.c \
-        ipc_wpa.c \
-        os_trans.c \
-        ParsEvent.c \
-        osapi.c
-ifeq ($(BUILD_SUPPL), y)
-SRCS  +=  \
-        $(CUDK_ROOT)/$(TI_SUPP_LIB_DIR)/wpa_ctrl.c
-endif
-        
-OBJS = $(SRCS:.c=.o)
-
-DEPS = $(SRCS:%.c=%.d)
-
-ARMFLAGS  = -fno-common -pipe
-
-INCLUDES = \
-        -I ../inc \
-        -I ../../common/inc \
-        -I $(WILINK_ROOT)/stad/Export_Inc \
-        -I $(WILINK_ROOT)/stad/src/Sta_Management \
-        -I $(WILINK_ROOT)/stad/src/Application \
-        -I $(WILINK_ROOT)/utils \
-        -I $(WILINK_ROOT)/Txn \
-        -I $(WILINK_ROOT)/TWD/TWDriver \
-		-I $(WILINK_ROOT)/TWD/FirmwareApi \
-		-I $(WILINK_ROOT)/TWD/FW_Transfer/Export_Inc \
-		-I $(WILINK_ROOT)/TWD/TwIf \
-        -I $(WILINK_ROOT)/platforms/os/linux/inc \
-        -I $(WILINK_ROOT)/platforms/os/common/inc \
-        -I $(WILINK_ROOT)/TWD/FirmwareApi \
-        -I $(CUDK_ROOT)/$(TI_SUPP_LIB_DIR) \
-        -I $(CUDK_ROOT)/configurationutility/inc
-        
-CFLAGS = -Wall -Wstrict-prototypes $(DEBUGFLAGS) $(INCLUDES) -D__LINUX__ $(DK_DEFINES) -D__BYTE_ORDER_LITTLE_ENDIAN
-
-ifneq "$(CROSS_COMPILE)" ""             #compile for ARM
-        CFLAGS += $(ARMFLAGS)
-        # strip symbols
-ifneq "$(DEBUG)" "y"
-    LDFLAGS = -s
-endif
-
-endif    # CROSS_COMPILE != ""
-
-.PHONY: all
-
-all: $(TARGET)
-
-$(OUTPUT_DIR)/$(LIB_NAME).a: $(OBJS)
-	rm -f $@
-	$(CROSS_COMPILE)$(AR) -q $@ $^
-
-$(OUTPUT_DIR)/$(LIB_NAME).so: $(OBJS)
-	rm -f $@
-	$(CROSS_COMPILE)gcc -shared $(CFLAGS) $(OBJS) -lc -o $@
-	$(CROSS_COMPILE)strip $@
-
-ifeq ("$(findstring $(MAKECMDGOALS), clean cleanall)", "")
--include .depend
-endif
-
-%.o: %.cpp
-	@echo $@
-	@$(CROSS_COMPILE)gcc $(CFLAGS) -c $^ -o $@
-
-%.o: %.c
-	@echo $@
-	@$(CROSS_COMPILE)gcc -s $(CFLAGS) -c $< -o $@
-
-%.i: %.c
-	@$(CROSS_COMPILE)gcc $(CFLAGS) -E -c $< > $@
-
-%.d: %.c
-	@echo $@
-	@$(CROSS_COMPILE)gcc $< -MT$(^:%.c=%.o) -M $(CFLAGS) > $@
-
-%.d: %.cpp
-	@echo $@
-	@$(CROSS_COMPILE)gcc $< -MT$(^:%.cpp=%.o) -M $(CFLAGS) > $@
-
-.depend: $(DEPS)
-	rm -f $@
-	for aa in $^; do cat $$aa >> $@; done
-
-.PHONY: clean
-clean:
-	@echo cleaning OS library...
-	rm -f .depend $(OBJS) $(DEPS) $(SRCS:.c=.i) *.ko .*.cmd .*.flags *.mod.c *~ *.~* $(TARGET)
-
-cleanall: clean 
-
diff --git a/wl1271/CUDK/os/linux/src/os_trans.c b/wl1271/CUDK/os/linux/src/os_trans.c
deleted file mode 100644
index c235626..0000000
--- a/wl1271/CUDK/os/linux/src/os_trans.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * os_trans.c
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <arpa/inet.h>
-#include <unistd.h>
-
-
-#include "cu_osapi.h"
-#include "os_trans.h"
-
-TI_BOOL os_trans_create()
-{
-    return TRUE;
-}
-
-
-TI_BOOL os_socket (THandle* pSock)
-{
-    SOCKET socket_id;
-    TI_BOOL optval = TRUE;
-
-    socket_id = socket(PF_INET, SOCK_STREAM, 0);
-
-    if (socket_id==SOCKET_ERROR)
-    {
-        /* Error opening socket */
-        os_error_printf(CU_MSG_ERROR, "%s: error opening socket.\n", __FUNCTION__);
-        return (FALSE);
-    }
-
-    /*************************/
-    /* Configure the socket */
-    /***********************/
-
-    if (setsockopt(socket_id, SOL_SOCKET, SO_REUSEADDR, (const THandle)&optval, sizeof(optval)) == OSAL_ERROR) {
-        /* Error setting socket option */
-        os_error_printf(CU_MSG_ERROR, "%s: error setting socket option. Error %d\n", __FUNCTION__, os_get_last_error());
-        close(socket_id); //close socket
-        return FALSE;
-    }
-
-    *pSock = (THandle) socket_id;
-
-    return TRUE;
-}
-
-
-TI_BOOL os_bind (THandle sock, U16 port)
-{
-    struct sockaddr_in server_addr;
-    TI_SIZE_T result;
-
-    server_addr.sin_family = AF_INET;
-    server_addr.sin_addr.s_addr = htonl (INADDR_ANY);
-    server_addr.sin_port = htons(port);
-
-    result = bind((SOCKET)sock, (struct sockaddr *)&server_addr, sizeof(server_addr));
-
-    if (result != OK) {
-        /* Error binding socket */
-        os_error_printf(CU_MSG_ERROR, "%s: error binding socket. Error %d\n", __FUNCTION__, os_get_last_error());
-        close((SOCKET)sock);
-        return(FALSE);
-    }
-
-    return TRUE;
-}
-
-
-TI_BOOL os_sockWaitForConnection (THandle socket_id, THandle* pConnSock)
-{
-    struct sockaddr_in client_addr;
-    socklen_t client_addr_len;
-    TI_SIZE_T result;
-
-    result = listen((SOCKET)socket_id, MAX_QUEUE_LENGTH);
-
-    if (result == OSAL_ERROR) {
-        /* Error listening to socket */
-        /*       os_error_printf(CU_MSG_ERROR, "%s: error listening to socket. Error %d\n", __FUNCTION__, errno);
-        *pConnSock = NULL;
-        closesocket((SOCKET)socket_id);
-        return(FALSE);*/
-    }
-
-    /**********************/
-    /* Accept connection */
-    /********************/
-    client_addr_len = sizeof(client_addr);
-
-    /* We suppose to get new socket id after accept (blocking action) */
-    result = accept((SOCKET)socket_id, (struct sockaddr *)&client_addr, &client_addr_len);
-
-    if (result == OSAL_ERROR) {			
-        *pConnSock = NULL;
-        /* Error accepting connection */
-        os_error_printf(CU_MSG_ERROR, "%s: error accepting connection. Error %d\n", __FUNCTION__, os_get_last_error());
-        close((SOCKET) socket_id);
-        return(FALSE);
-    }
-
-    *pConnSock = (THandle) result;
-
-    return TRUE;
-}
-
-
-TI_BOOL os_sockSend (THandle socket_id, PS8 buffer, U32 bufferSize)
-{
-    TI_SIZE_T result;
-
-    /* Write to the socket */
-    result = send( (SOCKET) socket_id, buffer, (U32)bufferSize, 0);
-    if (result == SOCKET_ERROR) {
-
-        /**************************/
-        /* Error writing to port */
-        /************************/
-        os_error_printf(CU_MSG_ERROR, "%s: Error writing to socket (result = %d), error %d\n", 
-            __FUNCTION__, result, os_get_last_error());
-
-        return FALSE;
-    }
-
-    return TRUE;
-}
-
-VOID os_trans_destroy()
-{
-
-}
-
-S32 os_sockRecv (THandle socket_id, PU8 pBuffer, U32 bufferSize, TI_SIZE_T flags)
-
-{
-    TI_SIZE_T result;
-
-    /* Read from the socket */
-    result = recv((SOCKET)socket_id, pBuffer, bufferSize, flags);
-    if (result == SOCKET_ERROR) {
-
-        /***************************/
-        /* Error reading from port */
-        /***************************/
-
-        os_error_printf(CU_MSG_ERROR, "%s: Error reading from socket (result = %d), error %d\n", __FUNCTION__, result, os_get_last_error());
-    }
-
-    return (S32)result;
-}
-
diff --git a/wl1271/CUDK/os/linux/src/osapi.c b/wl1271/CUDK/os/linux/src/osapi.c
deleted file mode 100644
index b124211..0000000
--- a/wl1271/CUDK/os/linux/src/osapi.c
+++ /dev/null
@@ -1,621 +0,0 @@
-/*
- * osapi.c
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
- * limitations under the License.
- */
-
-/****************************************************************************
-*
-*   MODULE:  osapi.c
-*   
-*   PURPOSE: 
-* 
-*   DESCRIPTION:  
-*   ============
-*   OS Memory API for user mode application (CUDK)      
-*
-****************************************************************************/
-
-/* includes */
-/************/
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <signal.h>
-#include <errno.h>
-#include "cu_os.h"
-#include "cu_osapi.h"
-
-/* defines */
-/***********/
-#define MAX_HOST_MESSAGE_SIZE   512
-
-S32 ipc_pipe[2];
-
-extern S32 user_main (S32 argc, PPS8 argv);
-
-/** 
- * \fn     main
- * \brief  Main entry point to a user-mode program 
- * 
- * This is the main() function for a user mode program, or the entry point
- * called by the OS, This calls an OS-abstracted main function
- * 
- * \param  argc - command line argument count
- * \param  argv - command line arguments
- * \return 0 on success, any other value indicates error 
- * \sa     user_main
- */ 
-int main (int argc, char** argv)
-{
-    return user_main (argc, (PPS8)argv);
-}
-
-/****************************************************************************************
- *                        os_error_printf()                                 
- ****************************************************************************************
-DESCRIPTION:    This function prints a debug message
-
-ARGUMENTS:      OsContext   -   our adapter context.
-                arg_list - string to output with arguments
-
-RETURN:         None
-*****************************************************************************************/
-VOID os_error_printf(S32 debug_level, const PS8 arg_list ,...)
-{
-    static int g_debug_level = CU_MSG_ERROR; /* TODO ronen: create debug logic for CLI */
-    S8 msg[MAX_HOST_MESSAGE_SIZE];
-    va_list ap;
-#ifdef OS_CLI_LOG_TO_FILE
-    char file_name[30]="/cli.log";
-    FILE *ftmp;
-#endif
-
-    if (debug_level < g_debug_level)
-        return;
-
-    /* Format the message */
-    va_start(ap, arg_list);
-    vsprintf((char *)msg, (char *)arg_list, ap);
-    va_end(ap);
-
-    /* print the message */
-    fprintf(stderr, (char *)msg);
-
-#ifdef OS_CLI_LOG_TO_FILE
-    ftmp = fopen(file_name, "a");
-    if (ftmp != NULL) {
-        fprintf(ftmp,(char *)msg);
-        fclose(ftmp);
-    }
-#endif
-}
-
-/****************************************************************************************
- *                        os_strcpy()                                 
- ****************************************************************************************
-DESCRIPTION:    wrapper to the OS strcpy fucntion
-
-ARGUMENTS:      
-
-RETURN:         
-*****************************************************************************************/
-inline PS8 os_strcpy(PS8 dest, const PS8 src)
-{
-    return (PS8)strcpy((char*)dest, (char*)src);
-}
-
-/****************************************************************************************
- *                        os_strncpy()                                 
- ****************************************************************************************
-DESCRIPTION:    wrapper to the OS strncpy fucntion
-
-ARGUMENTS:      
-
-RETURN:         
-*****************************************************************************************/
-PS8 os_strncpy(PS8 dest, const PS8 src, S32 n)
-{
-    return (PS8)strncpy((char*)dest, (char*)src, n);
-}
-
-/****************************************************************************************
- *                        os_sprintf()                                 
- ****************************************************************************************
-DESCRIPTION:    wrapper to the OS sprintf fucntion
-
-ARGUMENTS:      
-
-RETURN:         
-*****************************************************************************************/
-S32 os_sprintf(PS8 str, const PS8 arg_list, ...)
-{
-    va_list ap;
-    S8 msg[MAX_HOST_MESSAGE_SIZE];
-
-    va_start(ap, arg_list);
-    vsprintf((char*)msg, (char*)arg_list, ap);
-    va_end(ap);
-
-    return sprintf((char*)str, (char*)msg);
-}
-
-/****************************************************************************************
- *                        os_Printf()                                 
- ****************************************************************************************
-DESCRIPTION:    wrapper to the OS printf fucntion
-
-ARGUMENTS:      
-
-RETURN:         
-*****************************************************************************************/
-S32 os_Printf(const PS8 buffer)
-{
-    return printf((char*)buffer);
-}
-
-
-/****************************************************************************************
- *                        os_strcat()                                 
- ****************************************************************************************
-DESCRIPTION:    wrapper to the OS strcat fucntion
-
-ARGUMENTS:      
-
-RETURN:         
-*****************************************************************************************/
-PS8 os_strcat(PS8 dest, const PS8 src)
-{
-    return (PS8)strcat((char*)dest, (char*)src);
-}
-
-/****************************************************************************************
- *                        os_strlen()                                 
- ****************************************************************************************
-DESCRIPTION:    wrapper to the OS strlen fucntion
-
-ARGUMENTS:      
-
-RETURN:         
-*****************************************************************************************/
-U32 os_strlen(const PS8 s)
-{
-    return strlen((char*)s);
-}
-
-/****************************************************************************************
- *                        os_memoryCAlloc()                                 
- ****************************************************************************************
-DESCRIPTION:    Allocates an array in memory with elements initialized to 0.
-
-ARGUMENTS:      OsContext   -   our adapter context.
-                Number      -   Number of elements
-                Size        -   Length in bytes of each element
-
-RETURN:         Pointer to the allocated memory.
-*****************************************************************************************/
-PVOID os_MemoryCAlloc(U32 Number, U32 Size)
-{
-    return calloc(Number, Size);
-}
-
-/****************************************************************************************
- *                        os_memoryAlloc()                                 
- ****************************************************************************************
-DESCRIPTION:    Allocates resident (nonpaged) system-space memory.
-
-ARGUMENTS:      OsContext   - our adapter context.
-                Size        - Specifies the size, in bytes, to be allocated.
-
-RETURN:         Pointer to the allocated memory.
-*****************************************************************************************/
-PVOID os_MemoryAlloc(U32 Size)
-{
-    return malloc(Size);
-}
-
-/****************************************************************************************
- *                        os_memoryFree()                                 
- ****************************************************************************************
-DESCRIPTION:    This function releases a block of memory previously allocated with the
-                os_memoryAlloc function.
-
-
-ARGUMENTS:      OsContext   -   our adapter context.
-                pMemPtr     -   Pointer to the base virtual address of the allocated memory.
-                                This address was returned by the os_memoryAlloc function.
-                Size        -   Redundant, needed only for kernel mode.
-
-RETURN:         None
-*****************************************************************************************/
-VOID os_MemoryFree(PVOID pMemPtr)
-{
-     free(pMemPtr);
-}
-
-/****************************************************************************************
- *                        os_memset()                                 
- ****************************************************************************************
-DESCRIPTION:    wrapper to the OS memset fucntion
-
-ARGUMENTS:      
-
-RETURN:         
-*****************************************************************************************/
-PVOID os_memset(PVOID s, U8 c, U32 n)
-{
-    return memset(s, c, n);
-}
-
-/****************************************************************************************
- *                        os_memcpy()                                 
- ****************************************************************************************
-DESCRIPTION:    wrapper to the OS memcpy fucntion
-
-ARGUMENTS:      
-
-RETURN:         
-*****************************************************************************************/
-PVOID os_memcpy(PVOID dest, const PVOID src, U32 n)
-{
-    return memcpy(dest, src, n);
-}
-
-/****************************************************************************************
- *                        os_memcmp()                                 
- ****************************************************************************************
-DESCRIPTION:    wrapper to the OS memcmp fucntion
-
-ARGUMENTS:      
-
-RETURN:         
-*****************************************************************************************/
-S32 os_memcmp(const PVOID s1, const PVOID s2, S32 n)
-{
-    return memcmp(s1, s2, n);
-}
-
-/************************************************************************
- *                        os_strcmp                     *
- ************************************************************************
-DESCRIPTION: wrapper to the OS strcmp fucntion
-
-CONTEXT:  
-************************************************************************/
-S32 os_strcmp(const PS8 s1, const PS8 s2)
-{
-    return strcmp((char*)s1,(char*)s2);
-}
-
-
-/************************************************************************
- *                        os_strncmp                        *
- ************************************************************************
-DESCRIPTION: wrapper to the OS strcmp fucntion
-
-CONTEXT:  
-************************************************************************/
-S32 os_strncmp(const PS8 s1, const PS8 s2, U32 n)
-{
-    return strncmp((char*)s1,(char*)s2,n);
-}
-
-/************************************************************************
- *                        os_sscanf                     *
- ************************************************************************
-DESCRIPTION: wrapper to the OS sscanf fucntion
-
-CONTEXT:  
-************************************************************************/
-S32 os_sscanf(const PS8 str, const PS8 arg_list, ...)
-{
-    va_list ap;
-    S8 msg[MAX_HOST_MESSAGE_SIZE];
-
-    va_start(ap, arg_list);
-    vsprintf((char*)msg, (char*)arg_list, ap);
-    va_end(ap);
-
-    return sscanf((char*)str, (char*)msg);
-}
-
-/************************************************************************
- *                        os_strchr                     *
- ************************************************************************
-DESCRIPTION: wrapper to the OS strchr fucntion
-
-CONTEXT:  
-************************************************************************/
-PS8 os_strchr(const PS8 s, S32 c)
-{
-    return (PS8)strchr((char*)s,c);
-}
-
-/************************************************************************
- *                        os_strtol                     *
- ************************************************************************
-DESCRIPTION: wrapper to the OS strtol fucntion
-
-CONTEXT:  
-************************************************************************/
-S32 os_strtol(const PS8 nptr, PPS8 endptr, S32 base)
-{
-    return strtol((char*)nptr, (char**)endptr, base);
-}
-
-/************************************************************************
- *                        os_strtoul                        *
- ************************************************************************
-DESCRIPTION: wrapper to the OS strtoul fucntion
-
-CONTEXT:  
-************************************************************************/
-U32 os_strtoul(const PS8 nptr, PPS8 endptr, S32 base)
-{
-    return strtoul((char*)nptr, (char**)endptr, base);
-}
-
-/************************************************************************
- *                        os_tolower                        *
- ************************************************************************
-DESCRIPTION: wrapper to the OS tolower fucntion
-
-CONTEXT:  
-************************************************************************/
-S32 os_tolower(S32 c)
-{
-    return tolower(c);
-}
-
-/************************************************************************
- *                        os_tolower                        *
- ************************************************************************
-DESCRIPTION: wrapper to the OS tolower fucntion
-
-CONTEXT:  
-************************************************************************/
-S32 os_isupper(S32 c)
-{
-    return isupper(c);
-}
-
-/************************************************************************
- *                        os_tolower                        *
- ************************************************************************
-DESCRIPTION: wrapper to the OS tolower fucntion
-
-CONTEXT:  
-************************************************************************/
-S32 os_toupper(S32 c)
-{
-    return toupper(c);
-
-}
-
-/************************************************************************
- *                        os_atoi                        *
- ************************************************************************
-DESCRIPTION: wrapper to the OS atoi fucntion
-
-CONTEXT:  
-************************************************************************/
-S32 os_atoi(const PS8 str)
-{
-	return (S32)atoi(str);
-}
-
-/************************************************************************
- *                        os_fopen                      *
- ************************************************************************
-DESCRIPTION: wrapper to the OS fopen fucntion
-
-CONTEXT:  
-************************************************************************/
-PVOID os_fopen(const PS8 path, os_fopen_mode_e mode)
-{
-    switch(mode)
-    {
-        case OS_FOPEN_READ:
-            return fopen((char*)path, "r");
-		case OS_FOPEN_READ_BINARY:
-			return fopen((char*)path, "rb");
-		case OS_FOPEN_WRITE:
-			return fopen(path, "w");
-		case OS_FOPEN_WRITE_BINARY:
-			return fopen(path, "wb");
-
-
-        default:
-            return NULL;
-    }   
-}
-
-/************************************************************************
- *                        os_getFileSize                      *
- ************************************************************************
-DESCRIPTION: wrapper to the OS fopen fucntion
-
-CONTEXT:  
-************************************************************************/
-S32 os_getFileSize (PVOID file)
-{
-    S32 size;
-
-    if (fseek(file, 0, SEEK_END))
-    {
-        os_error_printf (CU_MSG_ERROR, (PS8)"Cannot seek file to end\n");
-        return -1;
-    }
-    size = ftell(file);
-    rewind(file);  
-    return size;
-}
-
-/************************************************************************
- *                        os_fgets                      *
- ************************************************************************
-DESCRIPTION: wrapper to the OS fgets fucntion
-
-CONTEXT:  
-************************************************************************/
-inline PS8 os_fgets(PS8 s, S32 size, PVOID stream)
-{
-    return (PS8)fgets((char*)s, size, stream);
-}
-
-/************************************************************************
- *                        os_fread                      *
- ************************************************************************
-DESCRIPTION: wrapper to the OS fread fucntion
-
-CONTEXT:  
-************************************************************************/
-inline S32 os_fread (PVOID ptr, S32 size, S32 nmemb, PVOID stream)
-{
-    return fread (ptr, size, nmemb, stream);
-}
-
-/************************************************************************
- *                        os_fwrite                      *
- ************************************************************************
-DESCRIPTION: wrapper to the OS fwrite fucntion
-
-CONTEXT:  
-************************************************************************/
-S32 os_fwrite (PVOID ptr, S32 size, S32 nmemb, PVOID stream)
-{
-    return fwrite (ptr, size, nmemb, stream);
-}
-
-/************************************************************************
- *                        os_fclose                     *
- ************************************************************************
-DESCRIPTION: wrapper to the OS fclose fucntion
-
-CONTEXT:  
-************************************************************************/
-inline S32 os_fclose(PVOID stream)
-{
-    return fclose(stream);
-}
-
-/************************************************************************
- *                        os_getInputString                     *
- ************************************************************************
-DESCRIPTION: get the input string for the console from the appropiate inputs
-
-CONTEXT:  
-************************************************************************/
-S32 os_getInputString(PS8 inbuf, S32 len)
-{
-    fd_set read_set; 
-    S32 max_fd_index;
-    S32 result;
-    S32 pid;
-
-    /*
-     * Wait for one of two external events:
-     * ----------------------------------- 
-     *
-     * 1. Data received from STDIN
-     * 2. Data received from the event process
-     */
-
-    /* Prepare the read set fields */
-    FD_ZERO(&read_set);
-    FD_SET(0, &read_set);
-    FD_SET(ipc_pipe[0], &read_set);
-
-    /* Determine the maximum index of the file descriptor */
-    max_fd_index = max(0, ipc_pipe[0]) + 1;
-       
-    /* Wait for event - blocking */
-    result = select(max_fd_index, &read_set, NULL, NULL, NULL);
-
-    if (result > 0)
-    {
-        if (FD_ISSET(0, &read_set))
-        {
-            /* Data received from STDIN */
-            if ( fgets( (char*)inbuf, len, stdin ) == NULL )
-                return FALSE;
-            else
-                return TRUE;
-        } 
-           
-        if (FD_ISSET(ipc_pipe[0], &read_set))
-        {
-            /**********************************/
-            /* Data received from TCP client */
-            /********************************/
-            result = read(ipc_pipe[0], inbuf, len);
-
-            /* Get the pid of the calling process */
-            pid = *(inbuf + 0) | (*(inbuf + 1) << 8);
-
-            /* 
-            Signal the calling process (tell him that we have 
-            received the command, and he can send us another one 
-            */
-            if (pid != 0xFFFF)
-            {
-                kill(pid, SIGUSR1); 
-            }
-
-            if ( result <= 0 )
-                return FALSE;
-            else
-                return TRUE;
-        }
-    }
-
-    /* Error */
-    os_error_printf(CU_MSG_ERROR, (PS8)"Input selection mismatch (0x%x)...\n", read_set);
-    return FALSE;
-}
-
-/************************************************************************
- *                        os_Catch_CtrlC_Signal                     *
- ************************************************************************
-DESCRIPTION: register to catch the Ctrl+C signal
-
-CONTEXT:  
-************************************************************************/
-VOID os_Catch_CtrlC_Signal(PVOID SignalCB)
-{
-    if(signal(SIGINT, SignalCB) == SIG_ERR)
-        os_error_printf(CU_MSG_ERROR, (PS8)"ERROR - os_Catch_CtrlC_Signal - cant catch Ctrl+C signal\n");
-}
-
-
-VOID os_OsSpecificCmdParams(S32 argc, PS8* argv)
-{
-}
-
-VOID os_InitOsSpecificModules(VOID)
-{
-}
-
-VOID os_DeInitOsSpecificModules(VOID)
-{
-}
-
-TI_SIZE_T os_get_last_error()
-{
-	return errno;
-}
diff --git a/wl1271/CUDK/tiwlan_loader/Android.mk b/wl1271/CUDK/tiwlan_loader/Android.mk
deleted file mode 100644
index b7cfc93..0000000
--- a/wl1271/CUDK/tiwlan_loader/Android.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-STATIC_LIB ?= y
-DEBUG ?= y
-HOST_PLATFORM ?= wipp
-
-WILINK_ROOT = ../..
-CUDK_ROOT = $(WILINK_ROOT)/CUDK
-
-ifeq ($(DEBUG),y)
-DEBUGFLAGS = -O2 -g -DDEBUG -DTI_DBG -fno-builtin   # "-O" is needed to expand inlines
-#  DEBUGFLAGS+= -DDEBUG_MESSAGES
-else
-DEBUGFLAGS = -O2
-endif
-
-COMMON = $(WILINK_ROOT)/stad
-
-ARMFLAGS = -fno-common -g -fno-builtin -Wall #-pipe
-
-LOCAL_C_INCLUDES = \
-	$(LOCAL_PATH)/$(CUDK_ROOT)/os/common/inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/platforms/os/common/inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/platforms/os/linux/inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/Export_Inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Sta_Management \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Connection_Managment \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/stad/src/Application \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/utils \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/Txn \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/TWDriver \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FirmwareApi \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/FW_Transfer/Export_Inc \
-	$(LOCAL_PATH)/$(WILINK_ROOT)/TWD/TwIf \
-	$(LOCAL_PATH)/$(CUDK_ROOT)/os/linux/inc \
-	$(LOCAL_PATH)/$(KERNEL_DIR)/include 
-
-LOCAL_SRC_FILES:= \
-	tiwlan_loader.c
-
-LOCAL_CFLAGS+= -Wall -Wstrict-prototypes $(DEBUGFLAGS) -D__LINUX__ $(DK_DEFINES) -D__BYTE_ORDER_LITTLE_ENDIAN -DDRV_NAME='"tiwlan"'
-
-LOCAL_CFLAGS += $(ARMFLAGS)
-
-LOCAL_LDLIBS += -lpthread
-
-LOCAL_STATIC_LIBRARIES := \
-	libtiOsLib
-
-LOCAL_SHARED_LIBRARIES := \
-	libc libcutils libhardware_legacy
-
-LOCAL_MODULE:= wlan_loader
-
-include $(BUILD_EXECUTABLE)
diff --git a/wl1271/CUDK/tiwlan_loader/Makefile b/wl1271/CUDK/tiwlan_loader/Makefile
deleted file mode 100644
index 4e4ec4c..0000000
--- a/wl1271/CUDK/tiwlan_loader/Makefile
+++ /dev/null
@@ -1,105 +0,0 @@
-
-STATIC_LIB ?= y
-
-DEBUG ?= y
-HOST_PLATFORM ?= wipp
-WILINK_ROOT = ../..
-CUDK_ROOT = $(WILINK_ROOT)/CUDK
-TI_OS_LIB_DIR=$(CUDK_ROOT)/output
-ifeq ($(STATIC_LIB),y)
-        TI_OS_LIB = tiOsLib.a
-else
-        TI_OS_LIB = tiOsLib.so
-endif
-
-ifeq ($(DEBUG),y)
-  DEBUGFLAGS = -O2 -g -DDEBUG -DTI_DBG -fno-builtin   # "-O" is needed to expand inlines
-#  DEBUGFLAGS+= -DDEBUG_MESSAGES
-else
-  DEBUGFLAGS = -O2
-endif
-
-COMMON  = $(WILINK_ROOT)/stad
-
-#ARMFLAGS  = -fno-common -pipe -msoft-float -mabi=apcs-gnu
-ARMFLAGS  = -fno-common -pipe -g -fno-builtin -Wall 
-
-INCLUDES = \
-        -I $(CUDK_ROOT)/os/common/inc \
-	-I $(WILINK_ROOT)/platforms/os/common/inc \
-	-I $(WILINK_ROOT)/platforms/os/linux/inc \
-	-I $(WILINK_ROOT)/stad/Export_Inc \
-	-I $(WILINK_ROOT)/stad/src/Sta_Management \
-	-I $(WILINK_ROOT)/stad/src/Connection_Managment \
-	-I $(WILINK_ROOT)/stad/src/Application \
-	-I $(WILINK_ROOT)/utils \
-	-I $(WILINK_ROOT)/Txn \
-	-I $(WILINK_ROOT)/TWD/TWDriver \
-	-I $(WILINK_ROOT)/TWD/FirmwareApi \
-	-I $(WILINK_ROOT)/TWD/FW_Transfer/Export_Inc \
-	-I $(WILINK_ROOT)/TWD/TwIf \
-	-I $(CUDK_ROOT)/os/linux/inc \
-	-I $(KERNEL_DIR)/include 
-
-OUTPUT_DIR ?= $(CUDK_ROOT)/output
-
-TARGET = $(OUTPUT_DIR)/tiwlan_loader
-SRCS := \
-	tiwlan_loader.c
-
-OBJS = $(SRCS:.c=.o)
-
-DEPS = $(SRCS:%.c=%.d)
-
-CFLAGS = -Wall -Wstrict-prototypes $(DEBUGFLAGS) $(INCLUDES) -D__LINUX__ $(DK_DEFINES)
-CFLAGS += -D__BYTE_ORDER_LITTLE_ENDIAN
-CFLAGS += -DDRV_NAME='"tiwlan"'
-
-ifneq "$(CROSS_COMPILE)" ""		#compile for ARM
-	CFLAGS += $(ARMFLAGS)
-        # strip symbols
-ifneq "$(DEBUG)" "y"
-    LDFLAGS = -s
-endif
-
-endif    # CROSS_COMPILE != ""
-
-.PHONY: all
-
-all: $(TARGET)
-
-$(TARGET): $(OBJS)
-	$(CROSS_COMPILE)gcc --static $(OBJS) $(TI_OS_LIB_DIR)/$(TI_OS_LIB) -L $(CUDK_ROOT)/output $(LDFLAGS) -lpthread -lc -o $@
-	$(CROSS_COMPILE)strip -s $(TARGET)
-
-ifeq ("$(findstring $(MAKECMDGOALS), clean cleanall)", "")
--include .depend
-endif
-
-%.o: %.cpp
-	echo $@
-	$(CROSS_COMPILE)gcc $(CFLAGS) -c $^ -o $@
-
-%.o: %.c
-	@echo $@
-	@$(CROSS_COMPILE)gcc $(CFLAGS) -c $< -o $@
-
-%.i: %.c
-	$(CROSS_COMPILE)gcc $(CFLAGS) -E -c $< > $@
-
-%.d: %.c
-	@echo $@
-	@$(CROSS_COMPILE)gcc $< -MT$(^:%.c=%.o) -M $(CFLAGS) > $@
-
-%.d: %.cpp
-	echo $@
-	$(CROSS_COMPILE)gcc $< -MT$(^:%.cpp=%.o) -M $(CFLAGS) > $@
-
-.depend: $(DEPS)
-	rm -f $@
-	for aa in $^; do cat $$aa >> $@; done
-
-.PHONY: clean
-clean:
-	-rm -f $(TARGET) .depend $(OBJS) $(DEPS) $(SRCS:.c=.i) *.ko .*.cmd .*.flags *.mod.c *~ *.~*
-
diff --git a/wl1271/CUDK/tiwlan_loader/tiwlan_loader.c b/wl1271/CUDK/tiwlan_loader/tiwlan_loader.c
deleted file mode 100644
index 2cf21eb..0000000
--- a/wl1271/CUDK/tiwlan_loader/tiwlan_loader.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * tiwlan_loader.c
- *
- * Copyright 2001-2009 Texas Instruments, Inc. - http://www.ti.com/
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * \file  tiwlan_loader.c
- * \brief Loader implementation - sends FW image, NVS image and ini file to the driver
- */
-
-
-#ifdef ANDROID
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <string.h>
-#include <cutils/properties.h>
-#include <hardware_legacy/power.h>
-#define PROGRAM_NAME    "wlan_loader"
-#endif
-
-#include "STADExternalIf.h"
-#include "cu_osapi.h"
-#include "ipc_sta.h"
-#include "WlanDrvCommon.h"
-
-#define TIWLAN_DRV_NAME "tiwlan"
-
-S8    g_drv_name[IF_NAME_SIZE + 1];
-
-S32 print_usage(VOID)
-{
-    os_error_printf (CU_MSG_INFO1, (PS8)"Usage: ./wlan_loader [driver_name] [options]\n");
-    os_error_printf (CU_MSG_INFO1, (PS8)"   -e <filename>  - eeprom image file name. default=./nvs_map.bin\n");
-    os_error_printf (CU_MSG_INFO1, (PS8)"   -n - no eeprom file\n");
-    os_error_printf (CU_MSG_INFO1, (PS8)"   -i <filename>  - init file name. default=tiwlan.ini\n");
-    os_error_printf (CU_MSG_INFO1, (PS8)"   -f <filename>  - firmware image file name. default=firmware.bin\n");
-    return 1;
-}
-
-/*  Return '0' if success */
-S32 init_driver( PS8 adapter_name, PS8 eeprom_file_name,
-                 PS8 init_file_name, PS8 firmware_file_name )
-{
-    PVOID f1 = NULL, f2 = NULL, f3 = NULL;
-    S32 eeprom_image_length = 0;
-    S32 init_file_length = 0;
-    S32 firmware_image_length = 0;
-    U32 req_size = 0;
-    TLoaderFilesData *init_info = NULL;
-    S32 rc = -1;
-    THandle hIpcSta;
-
-    if( !adapter_name || !*adapter_name )
-        return rc;
-
-    os_error_printf(CU_MSG_INFO1, (PS8)"+---------------------------+\n");
-    os_error_printf(CU_MSG_INFO1, (PS8)"| wlan_loader: initializing |\n");
-    os_error_printf(CU_MSG_INFO1, (PS8)"+---------------------------+\n");
-
-    hIpcSta = IpcSta_Create(adapter_name);
-    if (hIpcSta == NULL)
-    {
-	os_error_printf (CU_MSG_ERROR, (PS8)"wlan_loader: cant allocate IpcSta context\n", eeprom_file_name);
-	goto init_driver_end;
-    }
-
-    /* Send init request to the driver */
-    if ( (NULL != eeprom_file_name) &&
-         (f1 = os_fopen (eeprom_file_name, OS_FOPEN_READ)) != NULL)
-    {
-        eeprom_image_length = os_getFileSize(f1);
-        if (-1 == eeprom_image_length)
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"Cannot get eeprom image file length <%s>\n", eeprom_file_name);
-            goto init_driver_end;
-        }
-    }
-
-    if ( (NULL != firmware_file_name) &&
-         (f2 = os_fopen (firmware_file_name, OS_FOPEN_READ)) != NULL)
-    {
-        firmware_image_length = os_getFileSize(f2);
-        if (-1 == firmware_image_length)
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"Cannot get firmware image file length <%s>\n", firmware_file_name);
-            goto init_driver_end;
-        }
-    }
-
-    if ( (NULL != init_file_name) &&
-         (f3 = os_fopen (init_file_name, OS_FOPEN_READ)) != NULL)
-    {
-        init_file_length = os_getFileSize(f3);
-        if (-1 == init_file_length)
-        {
-            os_error_printf(CU_MSG_ERROR, (PS8)"Cannot get init file length <%s>\n", init_file_name);
-            goto init_driver_end;
-        }
-    }
-
-    /* Now when we can calculate the request length. allocate it and read the files */
-    req_size = sizeof(TLoaderFilesData) + eeprom_image_length + (init_file_length+1) + firmware_image_length;
-    init_info = (TLoaderFilesData *)os_MemoryAlloc(req_size);
-    if (!init_info)
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"No memory to allocate init request (%d bytes)\n", req_size);
-        goto init_driver_end;
-    }
-    init_info->uNvsFileLength = eeprom_image_length;
-    init_info->uFwFileLength  = firmware_image_length;
-    init_info->uIniFileLength = init_file_length;
-
-    if (!f1 || (eeprom_image_length &&
-        os_fread(&init_info->data[0], 1, eeprom_image_length, f1)<eeprom_image_length))
-    {
-    } else
-        os_error_printf(CU_MSG_INFO1, (PS8)"****  nvs file found %s **** \n", eeprom_file_name);
-
-    if (!f2 || (firmware_image_length &&
-        os_fread(&init_info->data[eeprom_image_length], 1, firmware_image_length, f2)<firmware_image_length))
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Error reading firmware image %s - Aborting...\n", firmware_file_name);
-        goto init_driver_end;
-    }
-
-    if (!f3 || (init_file_length &&
-        os_fread(&init_info->data[eeprom_image_length+firmware_image_length], 1, init_file_length, f3)<init_file_length))
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Warning: Error in reading init_file %s - Using defaults\n", init_file_name);
-    }
-
-    /* Load driver defaults */
-    if(EOALERR_IPC_STA_ERROR_SENDING_WEXT == IPC_STA_Private_Send(hIpcSta, DRIVER_INIT_PARAM, init_info, req_size, NULL, 0))
-    {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Wlan_loader: Error sending init command (DRIVER_INIT_PARAM) to driver\n");
-        goto init_driver_end;
-    }
-
-    /* No Error Found */
-    rc = 0;
-
-init_driver_end:
-    if (f1)
-        os_fclose(f1);
-    if (f2)
-        os_fclose(f2);
-    if (f3)
-        os_fclose(f3);
-    if (init_info)
-        os_MemoryFree(init_info);
-    if (hIpcSta)
-        IpcSta_Destroy(hIpcSta);
-
-    return rc;
-}
-
-#ifdef ANDROID
-int check_and_set_property(char *prop_name, char *prop_val)
-{
-    char prop_status[PROPERTY_VALUE_MAX];
-    int count;
-
-    for(count=4;( count != 0 );count--) {
-        property_set(prop_name, prop_val);
-        if( property_get(prop_name, prop_status, NULL) &&
-            (strcmp(prop_status, prop_val) == 0) )
-	    break;
-    }
-    if( count ) {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Set property %s = %s - Ok\n", prop_name, prop_val);
-    }
-    else {
-        os_error_printf(CU_MSG_ERROR, (PS8)"Set property %s = %s - Fail\n", prop_name, prop_val);
-    }
-    return( count );
-}
-#endif
-
-S32 user_main(S32 argc, PPS8 argv)
-{
-    S32 i;
-    PS8 eeprom_file_name = (PS8)"./nvs_map.bin";
-    PS8 init_file_name = (PS8)"tiwlan.ini";
-    PS8 firmware_file_name = (PS8)"firmware.bin";
-
-    /* Parse command line parameters */
-    if( argc > 1 )
-    {
-        i=1;
-        if( argv[i][0] != '-' )
-        {
-            os_strcpy( g_drv_name, argv[i++] );
-        }
-        for( ;i < argc; i++ )
-        {
-            if( !os_strcmp(argv[i], (PS8)"-h" ) || !os_strcmp(argv[i], (PS8)"--help") )
-                return print_usage();
-            else if(!os_strcmp(argv[i], (PS8)"-f" ) )
-            {
-                firmware_file_name = argv[++i];
-            }
-            else if(!os_strcmp(argv[i], (PS8)"-e") && (i+1<argc))
-            {
-                eeprom_file_name = argv[++i];
-            }
-            else if(!os_strcmp(argv[i], (PS8)"-i") && (i+1<argc))
-            {
-                init_file_name = argv[++i];
-            }
-            else if(!os_strcmp(argv[i], (PS8)"-n" ) )
-            {
-               eeprom_file_name = NULL;
-            }
-            else
-            {
-                os_error_printf (CU_MSG_ERROR, (PS8)"Loader: unknow parameter '%s'\n", argv[i]);
-#ifdef ANDROID
-                check_and_set_property("wlan.driver.status", "failed");
-#endif
-                return -1;
-            }
-        }
-    }
-
-    if( !g_drv_name[0] )
-    {
-        os_strcpy(g_drv_name, (PS8)TIWLAN_DRV_NAME "0" );
-    }
-
-#ifdef ANDROID
-    acquire_wake_lock(PARTIAL_WAKE_LOCK, PROGRAM_NAME);
-#endif
-
-    if (init_driver (g_drv_name, eeprom_file_name, init_file_name, firmware_file_name) != 0)
-    {
-#ifdef ANDROID
-        check_and_set_property("wlan.driver.status", "failed");
-        release_wake_lock(PROGRAM_NAME);
-#endif
-        return -1;
-    }
-#ifdef ANDROID
-    check_and_set_property("wlan.driver.status", "ok");
-    release_wake_lock(PROGRAM_NAME);
-#endif
-    return 0;
-}
diff --git a/wl1271/TWD/Ctrl/CmdBld.c b/wl1271/TWD/Ctrl/CmdBld.c
deleted file mode 100644
index 82b3d0c..0000000
--- a/wl1271/TWD/Ctrl/CmdBld.c
+++ /dev/null
@@ -1,2597 +0,0 @@
-/*
- * CmdBld.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  CmdBld.c 
- *  \brief Command builder main
- *
- *  \see   CmdBld.h 
- */
-#define __FILE_ID__  FILE_ID_90
-#include "TWDriver.h"
-#include "osApi.h"
-#include "tidef.h"
-#include "report.h"
-#include "public_infoele.h"
-#include "CmdBld.h"
-#include "txResult_api.h"
-#include "CmdBldCmdIE.h"
-#include "CmdBldCfgIE.h"
-#include "CmdBldItrIE.h"
-#include "CmdQueue_api.h"
-#include "eventMbox_api.h"
-#include "TWDriverInternal.h"
-#include "HwInit_api.h"
-
-#define DEFAULT_TRACE_ENABLE                   0
-#define DEFAULT_TRACE_OUT                      0
-
-#define DEFAULT_PBCC_DYNAMIC_ENABLE_VAL        0
-#define DEFAULT_PBCC_DYNAMIC_INTERVAL          500
-#define DEFAULT_PBCC_DYNAMIC_IGNORE_MCAST      0
-
-#define DEFAULT_HW_RADIO_CHANNEL               11
-
-#define DEFAULT_CW_MIN                         15
-
-#define DEFAULT_USE_DEVICE_ERROR_INTERRUPT     1
-
-#define DEFAULT_UCAST_PRIORITY                 0
-
-#define DEFAULT_NUM_STATIONS                   1
-
-/* only for AP */
-/*  8 increase number of BC frames */
-#define DEFAULT_NUM_BCAST_TX_DESC              16  
-
-#define DEFAULT_BCAST_PRIORITY                 0x81
-
-/* hw access method*/
-typedef enum
-{
-    HW_ACCESS_BUS_SLAVE_INDIRECT    = 0,
-    HW_ACCESS_BUS_SLAVE_DIRECT      = 1,
-    HW_ACCESS_BUS_MASTER            = 2
-
-} EHwAccessMethod;
-
-typedef int (*TConfigFwCb) (TI_HANDLE, TI_STATUS);
-
-
-static TI_STATUS cmdBld_ConfigSeq               (TI_HANDLE hCmdBld);
-static TI_STATUS cmdBld_GetCurrentAssociationId (TI_HANDLE hCmdBld, TI_UINT16 *pAidVal);
-static TI_STATUS cmdBld_GetArpIpAddressesTable  (TI_HANDLE hCmdBld, TIpAddr *pIpAddr, TI_UINT8 *pEnabled , EIpVer *pIpVer);
-static TI_STATUS cmdBld_JoinCmpltForReconfigCb  (TI_HANDLE hCmdBld);
-static TI_STATUS cmdBld_DummyCb                 (TI_HANDLE hCmdBld);
-
-
-
-
-TI_HANDLE cmdBld_Create (TI_HANDLE hOs)
-{
-    TCmdBld        *pCmdBld;
-    TI_UINT32      uNumOfStations;
-    TI_UINT32      i;
-
-    /* Allocate the command builder */
-    pCmdBld = (TCmdBld *)os_memoryAlloc (hOs, sizeof(TCmdBld));
-    if (pCmdBld == NULL)
-    {
-        WLAN_OS_REPORT(("cmdBld_Create: Error memory allocation\n"));
-        return NULL;
-    }
-    os_memoryZero (hOs, (void *)pCmdBld, sizeof(TCmdBld));
-
-    pCmdBld->hOs = hOs;
-
-    /* Create the Params object */
-    /* make this code flat, move it to configure */
-    {
-        TWlanParams     *pWlanParams    = &DB_WLAN(pCmdBld);
-        TDmaParams      *pDmaParams     = &DB_DMA(pCmdBld);
-        TBssInfoParams  *pBssInfoParams = &DB_BSS(pCmdBld);
-        TGenCounters    *pGenCounters   = &DB_CNT(pCmdBld);
-
-        /* General counters */
-        pGenCounters->FcsErrCnt                     = 0;
-
-        /* BSS info paramaters */
-        pBssInfoParams->RadioChannel                = DEFAULT_HW_RADIO_CHANNEL;
-        pBssInfoParams->Ctrl                        = 0;
-        /*
-         * Intilaize the ctrl field in the BSS join structure 
-         * Only bit_7 in the ctrl field is vurrently in use.
-         * If bit_7 is on => Doing Tx flash before joining new AP 
-         */
-        pBssInfoParams->Ctrl                        |= JOIN_CMD_CTRL_TX_FLUSH;
-
-        /* WLAN parameters*/
-
-        /* Init filters as station (start/join with BssType will overwrite the values) */
-        cmdBld_SetRxFilter ((TI_HANDLE)pCmdBld, RX_CONFIG_OPTION_MY_DST_MY_BSS, RX_FILTER_OPTION_FILTER_ALL);
-        pWlanParams->UseDeviceErrorInterrupt        = DEFAULT_USE_DEVICE_ERROR_INTERRUPT;
-        /* Initialize the params object database fields */
-        pWlanParams->hwAccessMethod = HW_ACCESS_BUS_SLAVE_INDIRECT;
-        pWlanParams->maxSitesFragCollect = TWD_SITE_FRAG_COLLECT_DEF;
-        pWlanParams->RtsThreshold = TWD_RTS_THRESHOLD_DEF; 
-        pWlanParams->bJoin = TI_FALSE;
-        /* Soft Gemini defaults */
-        pWlanParams->SoftGeminiEnable = SG_DISABLE;
-        /* Beacon filter defaults */
-        pWlanParams->beaconFilterParams.desiredState    = TI_FALSE;
-        pWlanParams->beaconFilterParams.numOfElements   = DEF_NUM_STORED_FILTERS;
-        pWlanParams->beaconFilterIETable.numberOfIEs    = DEF_BEACON_FILTER_IE_TABLE_NUM;
-        pWlanParams->beaconFilterIETable.IETableSize    = BEACON_FILTER_IE_TABLE_DEF_SIZE;
-        /* Roaming  parameters */
-        pWlanParams->roamTriggers.BssLossTimeout    = NO_BEACON_DEFAULT_TIMEOUT;
-        pWlanParams->roamTriggers.TsfMissThreshold  = OUT_OF_SYNC_DEFAULT_THRESHOLD;
-        /* CoexActivity table */
-        pWlanParams->tWlanParamsCoexActivityTable.numOfElements = COEX_ACTIVITY_TABLE_DEF_NUM; 
-
-        /* DMA parameters */
-        /* Initialize the Params object database fields*/
-        pDmaParams->NumStations                     = DEFAULT_NUM_STATIONS;
-        uNumOfStations                              = (TI_UINT32)pDmaParams->NumStations;
-        /* 
-         * loop an all rssi_snr triggers and initialize only index number. 
-         * Reason: 'index' not initialized --> 'index = 0' --> triggers 1..7 will overrun trigger '0' in cmdBld_ConfigSeq
-         */
-        for (i = 0; i < NUM_OF_RSSI_SNR_TRIGGERS ; i++) 
-        {
-           pWlanParams->tRssiSnrTrigger[i].index = i;
-        }
-    }
-    
-    pCmdBld->uLastElpCtrlMode = ELPCTRL_MODE_NORMAL;
-    
-    /* Create security objects */
-    pCmdBld->tSecurity.eSecurityMode = TWD_CIPHER_NONE;
-    pCmdBld->tSecurity.uNumOfStations = uNumOfStations;
-    DB_KEYS(pCmdBld).pReconfKeys = (TSecurityKeys*)os_memoryAlloc (hOs, 
-                                        sizeof(TSecurityKeys) * (uNumOfStations * NO_OF_RECONF_SECUR_KEYS_PER_STATION + NO_OF_EXTRA_RECONF_SECUR_KEYS));
-    os_memoryZero (hOs, 
-                   (void *)(DB_KEYS(pCmdBld).pReconfKeys), 
-                   sizeof(TSecurityKeys) * (uNumOfStations * NO_OF_RECONF_SECUR_KEYS_PER_STATION + NO_OF_EXTRA_RECONF_SECUR_KEYS));
-
-
-    WLAN_INIT_REPORT(("cmdBld_Create end %x\n",(TI_HANDLE)pCmdBld));
-
-    return (TI_HANDLE)pCmdBld;
-}
-
-
-TI_STATUS cmdBld_Destroy (TI_HANDLE hCmdBld)
-{
-    TCmdBld      *pCmdBld = (TCmdBld *)hCmdBld;
-    TDmaParams   *pDmaParams = NULL;
-    TI_UINT32        uNumOfStations;
-    
-    if (pCmdBld == NULL)
-    {
-        return TI_OK;
-    }
-
-    pDmaParams = &DB_DMA(hCmdBld);
-
-    uNumOfStations = (TI_UINT32)pDmaParams->NumStations;
-
-    if (DB_KEYS(pCmdBld).pReconfKeys)
-    {
-        os_memoryFree (pCmdBld->hOs, 
-                       DB_KEYS(pCmdBld).pReconfKeys, 
-                       sizeof(TSecurityKeys) * (uNumOfStations * NO_OF_RECONF_SECUR_KEYS_PER_STATION + NO_OF_EXTRA_RECONF_SECUR_KEYS));
-    }
-  
-    /* free the whalCtrl data structure */
-    os_memoryFree (pCmdBld->hOs, pCmdBld, sizeof(TCmdBld));
-    
-    return TI_OK;
-}
-
-TI_STATUS cmdBld_Restart (TI_HANDLE hCmdBld)
-{
-    TCmdBld      *pCmdBld = (TCmdBld *)hCmdBld;
-    
-    /* This init is for recovery stage */
-    pCmdBld->uLastElpCtrlMode = ELPCTRL_MODE_NORMAL;
-
-    /* 
-     * This call is to have the recovery process in AWAKE mode 
-     * Prevent move to sleep mode between Hw_Init and Fw_Init
-     */
-    cmdBld_CfgIeSleepAuth (hCmdBld, DB_WLAN(hCmdBld).minPowerLevel, NULL, NULL);
-
-    return TI_OK;
-}
-
-TI_STATUS cmdBld_Config (TI_HANDLE  hCmdBld, 
-                         TI_HANDLE  hReport, 
-                         void      *fFinalizeDownload, 
-                         TI_HANDLE  hFinalizeDownload, 
-                         TI_HANDLE  hEventMbox, 
-                         TI_HANDLE  hCmdQueue,
-                         TI_HANDLE  hTwIf)
-{
-    TCmdBld        *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT32       index;
-    
-    pCmdBld->hReport = hReport;
-    pCmdBld->fFinalizeDownload = fFinalizeDownload;
-    pCmdBld->hFinalizeDownload = hFinalizeDownload;
-    pCmdBld->hEventMbox = hEventMbox;
-    pCmdBld->hCmdQueue = hCmdQueue;
-    pCmdBld->hTwIf  = hTwIf;
-
-    /* Reset all reconfig valid fields*/
-    DB_KEYS(pCmdBld).bHwEncDecrEnableValid = TI_FALSE;
-    DB_KEYS(pCmdBld).bDefaultKeyIdValid    = TI_FALSE;  
-    for (index = 0; 
-         index < pCmdBld->tSecurity.uNumOfStations * NO_OF_RECONF_SECUR_KEYS_PER_STATION + NO_OF_EXTRA_RECONF_SECUR_KEYS; 
-         index++)
-        (DB_KEYS(pCmdBld).pReconfKeys + index)->keyType = KEY_NULL;
-
-
-    return TI_OK;
-}
-
-
-
-static void cmdBld_ConfigFwCb (TI_HANDLE hCmdBld, TI_STATUS status, void *pData)
-{
-    TCmdBld        *pCmdBld = (TCmdBld *)hCmdBld;
-    MemoryMap_t    *pMemMap = &pCmdBld->tMemMap;
-    TDmaParams     *pDmaParams = &DB_DMA(hCmdBld);
-
-    /* Arrived from callback */
-    if (pData)
-    {
-        TI_UINT32         *pSwap, i, uMemMapNumFields;
-
-        /* Solve endian problem (all fields are 32 bit) */
-        uMemMapNumFields = (sizeof(MemoryMap_t) - sizeof(EleHdrStruct)) % 4;
-        pSwap = (TI_UINT32* )&(pMemMap->codeStart);
-        for (i = 0; i < uMemMapNumFields; i++)
-        {
-            pSwap[i] = ENDIAN_HANDLE_LONG(pSwap[i]);
-        }
-    }
-
-    /* Save number of TX blocks */
-    pDmaParams->NumTxBlocks = pMemMap->numTxMemBlks;
-    /* Firmware Control block is internally pointing to TxResultInterface structure */
-    pDmaParams->fwTxResultInterface = pMemMap->trqBlock.controlBlock; 
-    pDmaParams->fwRxCBufPtr =           pMemMap->rxCBufPtr;
-    pDmaParams->fwTxCBufPtr =           pMemMap->txCBufPtr;
-    pDmaParams->fwRxControlPtr =        pMemMap->rxControlPtr;
-    pDmaParams->fwTxControlPtr =        pMemMap->txControlPtr;
-
-    pDmaParams->PacketMemoryPoolStart = (TI_UINT32)pMemMap->packetMemoryPoolStart;
-
-    /* Indicate that the reconfig process is over. */
-    pCmdBld->bReconfigInProgress = TI_FALSE;
-
-    /* Call the upper layer callback */
-    (*((TConfigFwCb)pCmdBld->fConfigFwCb)) (pCmdBld->hConfigFwCb, TI_OK);
-}
-
-
-/****************************************************************************
- *                      cmdBld_ConfigFw()
- ****************************************************************************
- * DESCRIPTION: Configure the WLAN firmware
- * 
- * INPUTS: None 
- * 
- * OUTPUT: None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ConfigFw (TI_HANDLE hCmdBld, void *fConfigFwCb, TI_HANDLE hConfigFwCb)
-{
-    TCmdBld        *pCmdBld = (TCmdBld *)hCmdBld;
-
-    pCmdBld->fConfigFwCb = fConfigFwCb;
-    pCmdBld->hConfigFwCb = hConfigFwCb; 
-    pCmdBld->uIniSeq = 0;
-    pCmdBld->bReconfigInProgress = TI_TRUE;
-    /* should be re-initialized for recovery,   pCmdBld->uLastElpCtrlMode = ELPCTRL_MODE_KEEP_AWAKE; */
-
-    /* Start configuration sequence */
-    return cmdBld_ConfigSeq (hCmdBld);
-}
-
-
-typedef TI_STATUS (*TCmdCfgFunc) (TI_HANDLE);
-
-
-static TI_STATUS __cmd_probe_req (TI_HANDLE hCmdBld)
-{
-    TI_STATUS   tStatus = TI_OK;
-
-    /* keep space for 2.4 GHz probe request */
-    tStatus = cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                  NULL, 
-                                                  DB_WLAN(hCmdBld).probeRequestTemplateSize,
-                                                  CFG_TEMPLATE_PROBE_REQ_2_4,
-                                                  0,
-                                                  NULL,
-                                                  NULL);
-    if (TI_OK != tStatus)
-    {
-        return tStatus;
-    }
-
-    /* keep space for 5.0 GHz probe request */
-    return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                               NULL, 
-                                               DB_WLAN(hCmdBld).probeRequestTemplateSize,
-                                               CFG_TEMPLATE_PROBE_REQ_5,
-                                               0,
-                                             (void *)cmdBld_ConfigSeq,
-                                             hCmdBld); 
-}
-
-
-static TI_STATUS __cmd_null_data (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                             NULL, 
-                                             DB_WLAN(hCmdBld).nullTemplateSize,
-                                               TEMPLATE_NULL_DATA,
-                                               0,
-                                             (void *)cmdBld_ConfigSeq,
-                                             hCmdBld); 
-}
-
-static TI_STATUS __cmd_burst_mode_enable (TI_HANDLE hCmdBld)
-{
-	return cmdBld_CfgIeBurstMode (hCmdBld, 
-							  DB_AC(hCmdBld).isBurstModeEnabled, 
-							  (void *)cmdBld_ConfigSeq, 
-							  hCmdBld);
-}
-
-
-static TI_STATUS __cmd_disconn (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                             NULL, 
-                                             DB_WLAN(hCmdBld).disconnTemplateSize,
-                                             TEMPLATE_DISCONNECT,
-                                             0,
-                                             (void *)cmdBld_ConfigSeq,
-                                             hCmdBld); 
-}
-
-static TI_STATUS __cmd_ps_poll (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                             NULL, 
-                                             DB_WLAN(hCmdBld).PsPollTemplateSize,
-                                               TEMPLATE_PS_POLL,
-                                               0,
-                                             (void *)cmdBld_ConfigSeq,
-                                             hCmdBld); 
-}
-
-
-static TI_STATUS __cmd_qos_null_data (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                             NULL, 
-                                             DB_WLAN(hCmdBld).qosNullDataTemplateSize,
-                                               TEMPLATE_QOS_NULL_DATA,
-                                               0,
-                                             (void *)cmdBld_ConfigSeq,
-                                             hCmdBld); 
-}
-
-
-static TI_STATUS __cmd_probe_resp (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                             NULL, 
-                                             DB_WLAN(hCmdBld).probeResponseTemplateSize,
-                                               TEMPLATE_PROBE_RESPONSE,
-                                               0,
-                                             (void *)cmdBld_ConfigSeq,
-                                             hCmdBld); 
-}
-
-
-static TI_STATUS __cmd_beacon (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                             NULL, 
-                                             DB_WLAN(hCmdBld).beaconTemplateSize,
-                                               TEMPLATE_BEACON,
-                                               0,
-                                             (void *)cmdBld_ConfigSeq,
-                                             hCmdBld); 
-}
-
-static TI_STATUS __cmd_keep_alive_tmpl (TI_HANDLE hCmdBld)
-{
-    TI_UINT32   index;
-    TI_STATUS   status = TI_NOK;
-
-    /* 
-     * config templates 
-     * fisr configure all indexes but the last one with no CB, and than configure the last one 
-     * with a CB to continue configuration.
-     */
-    for (index = 0; index < KLV_MAX_TMPL_NUM - 1; index++)
-    {
-        status =  cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                      NULL, 
-                                                      MAX_TEMPLATES_SIZE,
-                                                      TEMPLATE_KLV,
-                                                      index,
-                                                      NULL,
-                                                      NULL);
-        if (TI_OK != status)
-        {
-            return status;
-        }
-    }
-
-    status =  cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                  NULL, 
-                                                  MAX_TEMPLATES_SIZE,
-                                                  TEMPLATE_KLV,
-                                                  index,
-                                                  (void *)cmdBld_ConfigSeq,
-                                                  hCmdBld);
-
-    return status;
-}
-
-
-static TI_STATUS __cfg_mem (TI_HANDLE hCmdBld)
-{
-    /* Configure the weight among the different hardware queues */
-    return cmdBld_CfgIeConfigMemory (hCmdBld, &DB_DMA(hCmdBld), (void *)cmdBld_ConfigSeq, hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rx_msdu_life_time (TI_HANDLE hCmdBld)
-{    
-    /* Configure the Rx Msdu Life Time (expiry time of de-fragmentation in FW) */
-    return cmdBld_CfgIeRxMsduLifeTime (hCmdBld, 
-                                       DB_WLAN(hCmdBld).MaxRxMsduLifetime, 
-                                       (void *)cmdBld_ConfigSeq, 
-                                       hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rx (TI_HANDLE hCmdBld)
-{    
-    return cmdBld_CfgIeRx (hCmdBld, 
-                           DB_WLAN(hCmdBld).RxConfigOption, 
-                           DB_WLAN(hCmdBld).RxFilterOption, 
-                           (void *)cmdBld_ConfigSeq, 
-                           hCmdBld);
-}
-
-
-static TI_STATUS __cfg_ac_params_0 (TI_HANDLE hCmdBld)
-{
-    /*
-     * NOTE: Set following parameter only if configured.
-     *       Otherwise, is contains garbage.
-     */
-
-    if (DB_AC(hCmdBld).isAcConfigured[0])
-    {
-        return cmdBld_CfgAcParams (hCmdBld, &DB_AC(hCmdBld).ac[0], (void *)cmdBld_ConfigSeq, hCmdBld);
-    }
-    else
-    {
-        return TI_NOK;
-    }
-}
-
-
-static TI_STATUS __cfg_ac_params_1 (TI_HANDLE hCmdBld)
-{
-    /*
-     * NOTE: Set following parameter only if configured.
-     *       Otherwise, is contains garbage.
-     */
-
-    if (DB_AC(hCmdBld).isAcConfigured[1])
-    {
-        return cmdBld_CfgAcParams (hCmdBld, &DB_AC(hCmdBld).ac[1], (void *)cmdBld_ConfigSeq, hCmdBld);
-    }
-    else
-    {
-        return TI_NOK;
-    }
-}
-
-
-static TI_STATUS __cfg_ac_params_2 (TI_HANDLE hCmdBld)
-{
-    /*
-     * NOTE: Set following parameter only if configured.
-     *       Otherwise, is contains garbage.
-     */
-
-    if (DB_AC(hCmdBld).isAcConfigured[2])
-    {
-        return cmdBld_CfgAcParams (hCmdBld, &DB_AC(hCmdBld).ac[2], (void *)cmdBld_ConfigSeq, hCmdBld);
-    }
-    else
-    {
-        return TI_NOK;
-    }
-}
-
-
-static TI_STATUS __cfg_ac_params_3 (TI_HANDLE hCmdBld)
-{
-    /*
-     * NOTE: Set following parameter only if configured.
-     *       Otherwise, is contains garbage.
-     */
-
-    if (DB_AC(hCmdBld).isAcConfigured[3])
-    {
-        return cmdBld_CfgAcParams (hCmdBld, &DB_AC(hCmdBld).ac[3], (void *)cmdBld_ConfigSeq, hCmdBld);
-    }
-    else
-    {
-        return TI_NOK;
-    }
-}
-
-
-static TI_STATUS __cfg_tid_0 (TI_HANDLE hCmdBld)
-{
-    /*
-     * NOTE: Set following parameter only if configured.
-     *       Otherwise, is contains garbage.
-     */
-    if (DB_QUEUES(hCmdBld).isQueueConfigured[0])
-    {
-        return cmdBld_CfgTid (hCmdBld, &DB_QUEUES(hCmdBld).queues[0], (void *)cmdBld_ConfigSeq, hCmdBld);
-    }
-    else
-    {
-        return TI_NOK;
-    }
-}
-
-
-static TI_STATUS __cfg_tid_1 (TI_HANDLE hCmdBld)
-{
-    /*
-     * NOTE: Set following parameter only if configured.
-     *       Otherwise, is contains garbage.
-     */
-    if (DB_QUEUES(hCmdBld).isQueueConfigured[1])
-    {
-        return cmdBld_CfgTid (hCmdBld, &DB_QUEUES(hCmdBld).queues[1], (void *)cmdBld_ConfigSeq, hCmdBld);
-    }
-    else
-    {
-        return TI_NOK;
-    }
-}
-
-
-static TI_STATUS __cfg_tid_2 (TI_HANDLE hCmdBld)
-{
-    /*
-     * NOTE: Set following parameter only if configured.
-     *       Otherwise, is contains garbage.
-     */
-    if (DB_QUEUES(hCmdBld).isQueueConfigured[2])
-    {
-        return cmdBld_CfgTid (hCmdBld, &DB_QUEUES(hCmdBld).queues[2], (void *)cmdBld_ConfigSeq, hCmdBld);
-    }
-    else
-    {
-        return TI_NOK;
-    }
-}
-
-
-static TI_STATUS __cfg_tid_3 (TI_HANDLE hCmdBld)
-{
-    /*
-     * NOTE: Set following parameter only if configured.
-     *       Otherwise, is contains garbage.
-     */
-    if (DB_QUEUES(hCmdBld).isQueueConfigured[3])
-    {
-        return cmdBld_CfgTid (hCmdBld, &DB_QUEUES(hCmdBld).queues[3], (void *)cmdBld_ConfigSeq, hCmdBld);
-    }
-    else
-    {
-        return TI_NOK;
-    }
-}
-
-
-static TI_STATUS __cfg_ps_rx_streaming (TI_HANDLE hCmdBld)
-{
-    TI_UINT32       index;
-    TI_STATUS        eStatus;
-    TPsRxStreaming *pPsRxStreaming;
-
-
-    if (!DB_WLAN(hCmdBld).bJoin)
-    {
-        return TI_NOK;
-    }
-
-    /* Config enabled streams (disable is the FW default). */
-    for (index = 0; index < MAX_NUM_OF_802_1d_TAGS - 1; index++)
-    {
-        pPsRxStreaming = &(DB_PS_STREAM(hCmdBld).tid[index]);
-
-        if (pPsRxStreaming->bEnabled)
-        {
-            eStatus = cmdBld_CfgPsRxStreaming (hCmdBld, pPsRxStreaming, NULL, NULL);
-            if (eStatus != TI_OK) 
-            {
-                return eStatus;
-            }
-        }
-    }
-
-    /* Set NOK for a case the following config is skipped, to indicate that no callback is expected */
-    eStatus = TI_NOK;
-
-    pPsRxStreaming = &(DB_PS_STREAM(hCmdBld).tid[MAX_NUM_OF_802_1d_TAGS - 1]);
-    if (pPsRxStreaming->bEnabled)
-    {
-        eStatus = cmdBld_CfgPsRxStreaming (hCmdBld, pPsRxStreaming, (void *)cmdBld_ConfigSeq, hCmdBld);
-        if (eStatus != TI_OK) 
-        {
-            return eStatus;
-        }
-    }
-
-    return eStatus; 
-    }
-
-
-static TI_STATUS __cfg_rx_data_filter (TI_HANDLE hCmdBld)
-{
-    TI_UINT32       index;
-    TI_STATUS       eStatus;
-    TRxDataFilter   *pFilters;
-
-
-    if (DB_RX_DATA_FLTR(hCmdBld).bEnabled) 
-    {
-        eStatus = cmdBld_CfgIeEnableRxDataFilter (hCmdBld, 
-                                                  DB_RX_DATA_FLTR(hCmdBld).bEnabled, 
-                                                  DB_RX_DATA_FLTR(hCmdBld).eDefaultAction, 
-                                                  NULL, 
-                                                  NULL);
-        if (eStatus != TI_OK) 
-        {
-            return eStatus;
-        }
-    }
-
-    /* 
-     * Config enabled filters (last one is separated to use the callback) 
-     */
-    for (index = 0; index < MAX_DATA_FILTERS - 1; index++)
-    {
-        pFilters = &(DB_RX_DATA_FLTR(hCmdBld).aRxDataFilter[index]);
-
-        if (pFilters->uCommand == ADD_FILTER)
-        {
-            eStatus = cmdBld_CfgIeRxDataFilter (hCmdBld, 
-                                                pFilters->uIndex, 
-                                                pFilters->uCommand, 
-                                                pFilters->eAction, 
-                                                pFilters->uNumFieldPatterns, 
-                                                pFilters->uLenFieldPatterns, 
-                                                pFilters->aFieldPattern, 
-                                                NULL, 
-                                                NULL);
-            if (eStatus != TI_OK) 
-    {
-                return eStatus;
-            }
-        }
-    }
-
-    /* Set NOK for a case the following config is skipped, to indicate that no callback is expected */
-        eStatus = TI_NOK;
-
-    pFilters = &(DB_RX_DATA_FLTR(hCmdBld).aRxDataFilter[MAX_DATA_FILTERS - 1]);
-    if (pFilters->uCommand == ADD_FILTER)
-    {
-        eStatus = cmdBld_CfgIeRxDataFilter (hCmdBld, 
-                                            pFilters->uIndex, 
-                                            pFilters->uCommand, 
-                                            pFilters->eAction, 
-                                            pFilters->uNumFieldPatterns, 
-                                            pFilters->uLenFieldPatterns, 
-                                            pFilters->aFieldPattern, 
-                                            (void *)cmdBld_ConfigSeq, 
-                                            hCmdBld);
-        if (eStatus != TI_OK) 
-        {
-            return eStatus;
-        }
-    }
-
-    return eStatus;
-}
-
-
-static TI_STATUS __cfg_pd_threshold (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIePacketDetectionThreshold (hCmdBld, 
-                                                 DB_WLAN(hCmdBld).PacketDetectionThreshold, 
-                                                 (void *)cmdBld_ConfigSeq, 
-                                                 hCmdBld);
-}
-
-
-static TI_STATUS __cfg_slot_time (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeSlotTime (hCmdBld, DB_WLAN(hCmdBld).SlotTime, (void *)cmdBld_ConfigSeq, hCmdBld);
-}
-
-
-static TI_STATUS __cfg_arp_ip_filter (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeArpIpFilter (hCmdBld, 
-                                    DB_WLAN(hCmdBld).arp_IP_addr, 
-                                    (EArpFilterType)DB_WLAN(hCmdBld).arpFilterType, 
-                                    (void *)cmdBld_ConfigSeq, 
-                                    hCmdBld);
-}
-
-static TI_STATUS __cfg_group_address_table (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeGroupAdressTable (hCmdBld, 
-                                         DB_WLAN(hCmdBld).numGroupAddrs, 
-                                         DB_WLAN(hCmdBld).aGroupAddr, 
-                                         DB_WLAN(hCmdBld).isMacAddrFilteringnabled, 
-                                         (void *)cmdBld_ConfigSeq, 
-                                         hCmdBld);
-}
-
-
-static TI_STATUS __cfg_service_period_timeout (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeServicePeriodTimeout (hCmdBld, 
-                                             &DB_WLAN(hCmdBld).rxTimeOut, 
-                                             (void *)cmdBld_ConfigSeq, 
-                                             hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rts_threshold (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgRtsThreshold (hCmdBld, 
-                                   DB_WLAN(hCmdBld).RtsThreshold, 
-                                   (void *)cmdBld_ConfigSeq, 
-                                   hCmdBld);
-}
-
-static TI_STATUS __cfg_dco_itrim_params (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgDcoItrimParams (hCmdBld, 
-                                     DB_WLAN(hCmdBld).dcoItrimEnabled, 
-                                     DB_WLAN(hCmdBld).dcoItrimModerationTimeoutUsec, 
-                                     (void *)cmdBld_ConfigSeq, 
-                                     hCmdBld);
-}
-
-static TI_STATUS __cfg_fragment_threshold (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeFragmentThreshold (hCmdBld, 
-                                          DB_WLAN(hCmdBld).FragmentThreshold, 
-                                          (void *)cmdBld_ConfigSeq, 
-                                          hCmdBld);
-}
-
-
-static TI_STATUS __cfg_pm_config (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIePmConfig (hCmdBld, 
-                                 DB_WLAN(hCmdBld).uHostClkSettlingTime,
-                                 DB_WLAN(hCmdBld).uHostFastWakeupSupport, 
-                                 (void *)cmdBld_ConfigSeq, 
-                                 hCmdBld);
-}
-
-
-static TI_STATUS __cfg_beacon_filter_opt (TI_HANDLE hCmdBld)
-{
-    /* Set The Beacon Filter in HAL */
-    return cmdBld_CfgIeBeaconFilterOpt (hCmdBld, 
-                                        DB_WLAN(hCmdBld).beaconFilterParams.desiredState,
-                                        DB_WLAN(hCmdBld).beaconFilterParams.numOfElements, 
-                                        (void *)cmdBld_ConfigSeq, 
-                                        hCmdBld);
-}
-
-
-static TI_STATUS __cfg_beacon_filter_table (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeBeaconFilterTable (hCmdBld, 
-                                          DB_WLAN(hCmdBld).beaconFilterIETable.numberOfIEs,
-                                          DB_WLAN(hCmdBld).beaconFilterIETable.IETable,
-                                          DB_WLAN(hCmdBld).beaconFilterIETable.IETableSize, 
-                                          (void *)cmdBld_ConfigSeq, 
-                                          hCmdBld);
-}
-
-
-static TI_STATUS __cfg_tx_cmplt_pacing (TI_HANDLE hCmdBld)
-{    
-    return cmdBld_CfgIeTxCmpltPacing (hCmdBld, 
-                                      DB_WLAN(hCmdBld).TxCompletePacingThreshold,
-                                      DB_WLAN(hCmdBld).TxCompletePacingTimeout,
-                                      (void *)cmdBld_ConfigSeq, 
-                                      hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rx_intr_pacing (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeRxIntrPacing (hCmdBld, 
-                                     DB_WLAN(hCmdBld).RxIntrPacingThreshold,
-                                     DB_WLAN(hCmdBld).RxIntrPacingTimeout,
-                         (void *)cmdBld_ConfigSeq, 
-                               hCmdBld);
-}
-
-
-#ifdef TI_TEST
-static TI_STATUS __cfg_coex_activity_table (TI_HANDLE hCmdBld)
-{
-    TCmdBld       *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT32 uNumberOfIEs = DB_WLAN(hCmdBld).tWlanParamsCoexActivityTable.numOfElements;
-    TCoexActivity *CoexActivityTable = DB_WLAN(hCmdBld).tWlanParamsCoexActivityTable.entry;
-    TI_STATUS   status = TI_NOK;
-    TI_UINT32   index;
-
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , " CoexActivity, uNumberOfIEs=%d\n", uNumberOfIEs);
-    if (uNumberOfIEs == 0)
-    {
-        return status;
-    }
-    /* 
-     * config CoexActivity table 
-     * first configure all indexes but the last one with no CB, and than configure the last one 
-     * with a CB to continue configuration.
-     */
-    for (index = 0; index < uNumberOfIEs-1; index++)
-    {
-        TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , " CoexActivity, send %d\n", index);
-        status =  cmdBld_CfgIeCoexActivity (hCmdBld, &CoexActivityTable[index], 
-                                                NULL, NULL);
-        if (TI_OK != status)
-        {
-            return status;
-        }
-    }
-
-    /* Send last activity with a callback to continue config sequence */
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , " CoexActivity, send last %d\n", index);
-    status =  cmdBld_CfgIeCoexActivity (hCmdBld, &CoexActivityTable[index], 
-                                            (void *)cmdBld_ConfigSeq, hCmdBld);
-
-    return status;
-}
-#endif
-
-static TI_STATUS __cfg_cca_threshold (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeCcaThreshold (hCmdBld, 
-                                     DB_WLAN(hCmdBld).ch14TelecCca, 
-                                     (void *)cmdBld_ConfigSeq, 
-                                     hCmdBld);
-}
-
-
-static TI_STATUS __cfg_bcn_brc_options (TI_HANDLE hCmdBld)
-{
-    TPowerMgmtConfig powerMgmtConfig;                   
-
-    /* Beacon broadcast options */
-    powerMgmtConfig.BcnBrcOptions = DB_WLAN(hCmdBld).BcnBrcOptions;
-    powerMgmtConfig.ConsecutivePsPollDeliveryFailureThreshold = DB_WLAN(hCmdBld).ConsecutivePsPollDeliveryFailureThreshold;
-
-    return cmdBld_CfgIeBcnBrcOptions (hCmdBld, 
-                                      &powerMgmtConfig, 
-                                      (void *)cmdBld_ConfigSeq, 
-                                      hCmdBld);
-}
-
-
-static TI_STATUS __cmd_enable_rx (TI_HANDLE hCmdBld)
-{
-    /* Enable rx path on the hardware */
-    return cmdBld_CmdEnableRx (hCmdBld, (void *)cmdBld_ConfigSeq, hCmdBld);
-}
-
-
-static TI_STATUS __cmd_enable_tx (TI_HANDLE hCmdBld)
-{
-    /* Enable tx path on the hardware */
-    return cmdBld_CmdEnableTx (hCmdBld, 
-                               DB_DEFAULT_CHANNEL(hCmdBld), 
-                               (void *)cmdBld_ConfigSeq, 
-                               hCmdBld);
-}
-
-
-static TI_STATUS __cfg_ps_wmm (TI_HANDLE hCmdBld)
-{
-    /* ACX for a work around for Wi-Fi test */
-    return cmdBld_CfgIePsWmm (hCmdBld, 
-                              DB_WLAN(hCmdBld).WiFiWmmPS, 
-                              (void *)cmdBld_ConfigSeq, 
-                              hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rssi_snr_weights (TI_HANDLE hCmdBld)
-{
-    /* RSSI/SNR Weights for Average calculations */
-    return cmdBld_CfgIeRssiSnrWeights (hCmdBld, 
-                                       &DB_WLAN(hCmdBld).tRssiSnrWeights, 
-                                       (void *)cmdBld_ConfigSeq, 
-                                       hCmdBld);
-}
-
-
-static TI_STATUS __cfg_event_scan_cmplt (TI_HANDLE hCmdBld)
-{    
-    TCmdBld   *pCmdBld = (TCmdBld *)hCmdBld;
-
-    /* Enable the scan complete interrupt source */
-    return eventMbox_UnMaskEvent (pCmdBld->hEventMbox, 
-                               TWD_OWN_EVENT_SCAN_CMPLT, 
-                               (void *)cmdBld_ConfigSeq, 
-                               hCmdBld);
-}
-
-static TI_STATUS __cfg_event_sps_scan_cmplt (TI_HANDLE hCmdBld)
-{    
-    TCmdBld   *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return eventMbox_UnMaskEvent (pCmdBld->hEventMbox, 
-                               TWD_OWN_EVENT_SPS_SCAN_CMPLT, 
-                               (void *)cmdBld_ConfigSeq, 
-                               hCmdBld);
-}
-
-static TI_STATUS __cfg_event_plt_rx_calibration_cmplt (TI_HANDLE hCmdBld)
-{
-    TCmdBld   *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return eventMbox_UnMaskEvent (pCmdBld->hEventMbox, 
-                               TWD_OWN_EVENT_PLT_RX_CALIBRATION_COMPLETE, 
-                               (void *)cmdBld_ConfigSeq, 
-                               hCmdBld);
-}
-
-
-static TI_STATUS __cfg_hw_enc_dec_enable (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgHwEncDecEnable (hCmdBld, TI_TRUE, (void *)cmdBld_ConfigSeq, hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rssi_snr_trigger_0 (TI_HANDLE hCmdBld)
-{
-    /* RSSI/SNR Troggers */
-    return  cmdBld_CfgIeRssiSnrTrigger (hCmdBld, 
-                                        &DB_WLAN(hCmdBld).tRssiSnrTrigger[0], 
-                                        (void *)cmdBld_ConfigSeq, 
-                                        hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rssi_snr_trigger_1 (TI_HANDLE hCmdBld)
-{
-    /* RSSI/SNR Troggers */
-    return  cmdBld_CfgIeRssiSnrTrigger (hCmdBld, 
-                                        &DB_WLAN(hCmdBld).tRssiSnrTrigger[1], 
-                                        (void *)cmdBld_ConfigSeq, 
-                                        hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rssi_snr_trigger_2 (TI_HANDLE hCmdBld)
-{
-    /* RSSI/SNR Troggers */
-    return  cmdBld_CfgIeRssiSnrTrigger (hCmdBld, 
-                                        &DB_WLAN(hCmdBld).tRssiSnrTrigger[2], 
-                                        (void *)cmdBld_ConfigSeq, 
-                                        hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rssi_snr_trigger_3 (TI_HANDLE hCmdBld)
-{
-    /* RSSI/SNR Troggers */
-    return  cmdBld_CfgIeRssiSnrTrigger (hCmdBld, 
-                                        &DB_WLAN(hCmdBld).tRssiSnrTrigger[3], 
-                                        (void *)cmdBld_ConfigSeq, 
-                                        hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rssi_snr_trigger_4 (TI_HANDLE hCmdBld)
-{
-    /* RSSI/SNR Troggers */
-    return  cmdBld_CfgIeRssiSnrTrigger (hCmdBld, 
-                                        &DB_WLAN(hCmdBld).tRssiSnrTrigger[4], 
-                                        (void *)cmdBld_ConfigSeq, 
-                                        hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rssi_snr_trigger_5 (TI_HANDLE hCmdBld)
-{
-    /* RSSI/SNR Troggers */
-    return  cmdBld_CfgIeRssiSnrTrigger (hCmdBld, 
-                                        &DB_WLAN(hCmdBld).tRssiSnrTrigger[5], 
-                                        (void *)cmdBld_ConfigSeq, 
-                                        hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rssi_snr_trigger_6 (TI_HANDLE hCmdBld)
-{
-    /* RSSI/SNR Troggers */
-    return  cmdBld_CfgIeRssiSnrTrigger (hCmdBld, 
-                                        &DB_WLAN(hCmdBld).tRssiSnrTrigger[6], 
-                                        (void *)cmdBld_ConfigSeq, 
-                                        hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rssi_snr_trigger_7 (TI_HANDLE hCmdBld)
-{
-    /* RSSI/SNR Troggers */
-    return  cmdBld_CfgIeRssiSnrTrigger (hCmdBld, 
-                                        &DB_WLAN(hCmdBld).tRssiSnrTrigger[7], 
-                                        (void *)cmdBld_ConfigSeq, 
-                                        hCmdBld);
-}
-
-
-static TI_STATUS __cfg_max_tx_retry (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeMaxTxRetry (hCmdBld, 
-                                   &DB_WLAN(hCmdBld).roamTriggers, 
-                                   (void *)cmdBld_ConfigSeq, 
-                                   hCmdBld);
-}
-
-
-
-static TI_STATUS __cfg_split_scan_timeout (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CmdIeSetSplitScanTimeOut (hCmdBld, 
-                                            DB_WLAN(hCmdBld).uSlicedScanTimeOut, 
-                                            (void *)cmdBld_ConfigSeq, 
-                                            hCmdBld);
-}
-
-
-static TI_STATUS __cfg_conn_monit_params (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeConnMonitParams (hCmdBld, 
-                                        &DB_WLAN(hCmdBld).roamTriggers, 
-                                        (void *)cmdBld_ConfigSeq, 
-                                        hCmdBld);
-}
-
-
-static TI_STATUS __cfg_bet (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgBet (hCmdBld, 
-                          DB_WLAN(hCmdBld).BetEnable, 
-                          DB_WLAN(hCmdBld).MaximumConsecutiveET,
-                          (void *)cmdBld_ConfigSeq, 
-                          hCmdBld);
-}
-                
-
-static TI_STATUS __cfg_cts_protection (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeCtsProtection (hCmdBld,
-                                      DB_WLAN(hCmdBld).CtsToSelf, 
-                                      (void *)cmdBld_ConfigSeq, 
-                                      hCmdBld);
-}
-
-
-static TI_STATUS __cfg_radio_params (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeRadioParams (hCmdBld, 
-                                    &DB_RADIO(hCmdBld), 
-                                    (void *)cmdBld_ConfigSeq, 
-                                    hCmdBld);
-}
-
-
-static TI_STATUS __cfg_extended_radio_params (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeExtendedRadioParams (hCmdBld,
-											&DB_EXT_RADIO(hCmdBld),
-											(void *)cmdBld_ConfigSeq,
-											hCmdBld);
-}
-
-
-static TI_STATUS __cfg_platform_params (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgPlatformGenParams(hCmdBld, 
-                                      &DB_GEN(hCmdBld), 
-                                      (void *)cmdBld_ConfigSeq, 
-                                      hCmdBld);
-}
-
-
-
-static TI_STATUS __cfg_tx_rate_policy (TI_HANDLE hCmdBld)
-{
-    /*
-     * JOIN (use the local parameters), otherwize the CORE will reconnect
-     */
-    if (DB_WLAN(hCmdBld).bJoin)
-    {
-        /* Set TxRatePolicy */
-        return cmdBld_CfgTxRatePolicy (hCmdBld, 
-                                       &DB_BSS(hCmdBld).TxRateClassParams, 
-                                       (void *)cmdBld_ConfigSeq, 
-                                       hCmdBld);
-    }
-
-    return TI_NOK;
-}
-
-
-static TI_STATUS __cmd_beacon_join (TI_HANDLE hCmdBld)
-{
-    if (DB_WLAN(hCmdBld).bJoin && DB_TEMP(hCmdBld).Beacon.Size != 0)
-    {
-        return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                   &(DB_TEMP(hCmdBld).Beacon), 
-                                                 (TI_UINT16)DB_TEMP(hCmdBld).Beacon.Size,
-                                                   TEMPLATE_BEACON,
-                                                   0,
-                                                 (void *)cmdBld_ConfigSeq,
-                                                 hCmdBld);
-    }
-
-    return TI_NOK;
-}
-    
-static TI_STATUS __cmd_probe_resp_join (TI_HANDLE hCmdBld)
-{
-    if (DB_WLAN(hCmdBld).bJoin && DB_TEMP(hCmdBld).ProbeResp.Size != 0)
-    {
-        return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                   &(DB_TEMP(hCmdBld).ProbeResp), 
-                                                 (TI_UINT16)DB_TEMP(hCmdBld).ProbeResp.Size,
-                                                   TEMPLATE_PROBE_RESPONSE,
-                                                   0,
-                                                 (void *)cmdBld_ConfigSeq,
-                                                 hCmdBld);
-    }
-
-    return TI_NOK;
-}
-
-
-static TI_STATUS __cmd_probe_req_join (TI_HANDLE hCmdBld)
-{
-    TI_STATUS   tStatus;
-
-    /* set Probe Req template also if join == false ! */
-    if (DB_TEMP(hCmdBld).ProbeReq24.Size != 0)
-    {
-        tStatus =  cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                       &(DB_TEMP(hCmdBld).ProbeReq24), 
-                                                       (TI_UINT16)DB_TEMP(hCmdBld).ProbeReq24.Size,
-                                                       CFG_TEMPLATE_PROBE_REQ_2_4,
-                                                       0,
-                                                       NULL,
-                                                       NULL);
-        if (TI_OK != tStatus)
-        {
-            return tStatus;
-        }
-    }
-
-    /* set Probe Req template also if join == false ! */
-    if (DB_TEMP(hCmdBld).ProbeReq50.Size != 0)
-    {
-        return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                   &(DB_TEMP(hCmdBld).ProbeReq50), 
-                                                   (TI_UINT16)DB_TEMP(hCmdBld).ProbeReq50.Size,
-                                                   CFG_TEMPLATE_PROBE_REQ_5,
-                                                   0,
-                                                 (void *)cmdBld_ConfigSeq,
-                                                 hCmdBld);
-    }
-
-    return TI_NOK;
-}
-
-
-static TI_STATUS __cmd_null_data_join (TI_HANDLE hCmdBld)
-{
-    if (DB_WLAN(hCmdBld).bJoin && DB_TEMP(hCmdBld).NullData.Size != 0)
-    {
-        return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                   &(DB_TEMP(hCmdBld).NullData), 
-                                                 (TI_UINT16)DB_TEMP(hCmdBld).NullData.Size,
-                                                   TEMPLATE_NULL_DATA,
-                                                   0,
-                                                 (void *)cmdBld_ConfigSeq,
-                                                 hCmdBld);
-    }
-
-    return TI_NOK;
-}
-
-static TI_STATUS __cmd_disconn_join (TI_HANDLE hCmdBld)
-{
-    if (DB_WLAN(hCmdBld).bJoin && DB_TEMP(hCmdBld).Disconn.Size != 0)
-    {
-        return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                   &(DB_TEMP(hCmdBld).Disconn), 
-                                                   (TI_UINT16)DB_TEMP(hCmdBld).Disconn.Size,
-                                                   TEMPLATE_DISCONNECT,
-                                                   0,
-                                                   (void *)cmdBld_ConfigSeq,
-                                                   hCmdBld);
-    }
-
-    return TI_NOK;
-}
-
-static TI_STATUS __cmd_ps_poll_join (TI_HANDLE hCmdBld)
-{
-    if (DB_WLAN(hCmdBld).bJoin && DB_TEMP(hCmdBld).PsPoll.Size != 0)
-    {
-        return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                   &(DB_TEMP(hCmdBld).PsPoll), 
-                                                 (TI_UINT16)DB_TEMP(hCmdBld).PsPoll.Size,
-                                                   TEMPLATE_PS_POLL,
-                                                   0,
-                                                 (void *)cmdBld_ConfigSeq,
-                                                 hCmdBld);
-    }
-
-    return TI_NOK;
-}
-
-static TI_STATUS __cmd_arp_rsp (TI_HANDLE hCmdBld)
-{
-
-   return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                   NULL, 
-                                                   DB_WLAN(hCmdBld).ArpRspTemplateSize,
-                                                   TEMPLATE_ARP_RSP,
-                                                   0,
-                                                   (void *)cmdBld_ConfigSeq,
-                                                   hCmdBld);
-}
-
-
-static TI_STATUS __cmd_arp_rsp_join (TI_HANDLE hCmdBld)
-{
-    
-    if ((DB_WLAN(hCmdBld).bJoin) && (DB_TEMP(hCmdBld).ArpRsp.Size != 0))
-    {
-        return cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                   &(DB_TEMP(hCmdBld).ArpRsp), 
-                                                   DB_TEMP(hCmdBld).ArpRsp.Size,
-                                                   TEMPLATE_ARP_RSP,
-                                                   0,
-                                                   (void *)cmdBld_ConfigSeq,
-                                                   hCmdBld);
-    }
-
-    return TI_NOK;
-}
-
-
-
-
-static TI_STATUS __cmd_keep_alive_tmpl_join (TI_HANDLE hCmdBld)
-{
-    TI_UINT32   index;
-    TI_STATUS   status = TI_NOK;
-
-    /* 
-     * config templates 
-     * first configure all indexes but the last one with no CB, and than configure the last one 
-     * with a CB to continue configuration.
-     */
-    for (index = 0; index < KLV_MAX_TMPL_NUM - 1; index++)
-    {
-        if (DB_WLAN(hCmdBld).bJoin && DB_TEMP(hCmdBld).KeepAlive[ index ].Size != 0)
-        {
-            status =  cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                          &(DB_TEMP(hCmdBld).KeepAlive[index]), 
-                                                          (TI_UINT16)DB_TEMP(hCmdBld).KeepAlive[index].Size,
-                                                          TEMPLATE_KLV,
-                                                          index,
-                                                          NULL,
-                                                          NULL);
-            if (TI_OK != status)
-            {
-                return status;
-            }
-        }
-    }
-
-    if (DB_WLAN(hCmdBld).bJoin && DB_TEMP(hCmdBld).KeepAlive[ index ].Size != 0)
-    {
-        status =  cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                                      &(DB_TEMP(hCmdBld).KeepAlive[index]), 
-                                                      (TI_UINT16)DB_TEMP(hCmdBld).KeepAlive[index].Size,
-                                                      TEMPLATE_KLV,
-                                                      index,
-                                                      (void *)cmdBld_ConfigSeq,
-                                                      hCmdBld);
-        if (TI_OK != status)
-        {
-            return status;
-        }
-    }
-
-    return status;
-}
-
-
-static TI_STATUS __cmd_keep_alive_params(TI_HANDLE hCmdBld)
-{
-    TI_UINT32   index;
-    TI_STATUS   status;
-
-    /* config gloabl enable / disable flag */
-    cmdBld_CfgKeepAliveEnaDis (hCmdBld, DB_KLV(hCmdBld).enaDisFlag, NULL, NULL);
-
-    /* 
-     * config per-template params 
-     * fisr configure all indexes but the last one with no CB, and than configure the last one 
-     * with a CB to continue configuration.
-     */
-    for (index = 0; index < KLV_MAX_TMPL_NUM - 1; index++)
-    {
-        if (DB_WLAN(hCmdBld).bJoin && DB_KLV(hCmdBld).keepAliveParams[ index ].enaDisFlag != 0)
-        {
-            status =  cmdBld_CmdIeConfigureKeepAliveParams (hCmdBld, 
-                                                            index,
-                                                            DB_KLV(hCmdBld).keepAliveParams[ index ].enaDisFlag,
-                                                            DB_KLV(hCmdBld).keepAliveParams[ index ].trigType,
-                                                            DB_KLV(hCmdBld).keepAliveParams[ index ].interval,
-                                                            NULL,
-                                                            NULL);
-            if (TI_OK != status)
-            {
-                return status;
-            }
-        }
-    }
-
-    /* Set NOK for a case the following config is skipped, to indicate that no callback is expected */
-    status = TI_NOK;
-
-    if (DB_WLAN(hCmdBld).bJoin && DB_KLV(hCmdBld).keepAliveParams[ index ].enaDisFlag != 0)
-    {
-        status =  cmdBld_CmdIeConfigureKeepAliveParams (hCmdBld, 
-                                                        index,
-                                                        DB_KLV(hCmdBld).keepAliveParams[ index ].enaDisFlag,
-                                                        DB_KLV(hCmdBld).keepAliveParams[ index ].trigType,
-                                                        DB_KLV(hCmdBld).keepAliveParams[ index ].interval,
-                                                        (void *)cmdBld_ConfigSeq,
-                                                        hCmdBld);
-        if (TI_OK != status)
-        {
-            return status;
-        }
-    }
-
-    return status;
-}
-
-static TI_STATUS __cmd_power_auth (TI_HANDLE hCmdBld)
-{
-    return cmdBld_CfgIeSleepAuth (hCmdBld,
-                              DB_WLAN(hCmdBld).minPowerLevel,
-                              (void *)cmdBld_ConfigSeq,
-                              hCmdBld);
-}
-
-static TI_STATUS __cmd_start_join (TI_HANDLE hCmdBld)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    if (DB_WLAN(hCmdBld).bJoin)
-    {
-        /* 
-         * Replace the Join-Complete event CB by a local function.
-         * Thus, the reconfig sequence will not continue until the Join is completed!
-         * The original CB is restored after Join-Complete.
-         */
-        eventMbox_ReplaceEvent (pCmdBld->hEventMbox, 
-                                  TWD_OWN_EVENT_JOIN_CMPLT, 
-                                  (void *)cmdBld_JoinCmpltForReconfigCb, 
-                                  hCmdBld,                                   
-                                  &pCmdBld->fJoinCmpltOriginalCbFunc, 
-                                  &pCmdBld->hJoinCmpltOriginalCbHndl);                                    
-        /*
-         * Call the hardware to start/join the bss 
-         */
-        return cmdBld_CmdStartJoin (hCmdBld, 
-                                    (ScanBssType_e)DB_BSS(hCmdBld).ReqBssType, 
-                                    (void *)cmdBld_DummyCb, 
-                                    hCmdBld);
-    }
-
-    return TI_NOK;
-}
-
-static TI_STATUS __cmd_sta_state (TI_HANDLE hCmdBld)
-{
-    if (DB_WLAN(hCmdBld).bStaConnected)
-    {
-        return cmdBld_CmdSetStaState (hCmdBld, 
-                                    STA_STATE_CONNECTED, 
-                                    (void *)cmdBld_ConfigSeq, 
-                                    hCmdBld);
-    }
-
-    return TI_NOK;
-}
-
-static TI_STATUS __cfg_aid (TI_HANDLE hCmdBld)
-{
-    if (DB_WLAN(hCmdBld).bJoin)
-    {
-        return cmdBld_CfgAid (hCmdBld, DB_WLAN(hCmdBld).Aid, (void *)cmdBld_ConfigSeq, hCmdBld);
-    }
-
-    return TI_NOK;
-}
-
-
-static TI_STATUS __cfg_slot_time_join (TI_HANDLE hCmdBld)
-{
-    if (DB_WLAN(hCmdBld).bJoin)
-    {
-        /* Slot time must be setting after doing join */
-        return cmdBld_CfgSlotTime (hCmdBld, (ESlotTime)(DB_WLAN(hCmdBld).SlotTime), (void *)cmdBld_ConfigSeq, hCmdBld);              
-    }
-
-    return TI_NOK;
-}
-
-
-static TI_STATUS __cfg_preamble_join (TI_HANDLE hCmdBld)
-{
-    if (DB_WLAN(hCmdBld).bJoin)
-    {
-        /* Preamble type must be set after doing join */
-        return cmdBld_CfgPreamble (hCmdBld, (Preamble_e) DB_WLAN(hCmdBld).preamble, (void *)cmdBld_ConfigSeq, hCmdBld);              
-    }
-
-    return TI_NOK;
-}
-
-
-static TI_STATUS __cfg_ht_capabilities (TI_HANDLE hCmdBld)
-{
-    if (DB_WLAN(hCmdBld).bJoin && DB_BSS(hCmdBld).bHtCap)
-    {
-        /* HT capabilities must be set after doing join */
-        return cmdBld_CfgIeSetFwHtCapabilities (hCmdBld, 
-                                                DB_BSS(hCmdBld).uHtCapabilites, 
-                                                DB_BSS(hCmdBld).tMacAddress,
-                                                DB_BSS(hCmdBld).uAmpduMaxLeng,
-                                                DB_BSS(hCmdBld).uAmpduMinSpac,
-                                                (void *)cmdBld_ConfigSeq, 
-                                                hCmdBld);              
-    }
-
-    return TI_NOK;
-}
-
-
-static TI_STATUS __cfg_ht_information (TI_HANDLE hCmdBld)
-{
-    if (DB_WLAN(hCmdBld).bJoin && DB_BSS(hCmdBld).bHtInf)
-    {
-        /* HT Information must be set after doing join */
-        return cmdBld_CfgIeSetFwHtInformation (hCmdBld, 
-                                               DB_BSS(hCmdBld).uRifsMode,
-                                               DB_BSS(hCmdBld).uHtProtection,
-                                               DB_BSS(hCmdBld).uGfProtection,
-                                               DB_BSS(hCmdBld).uHtTxBurstLimit,
-                                               DB_BSS(hCmdBld).uDualCtsProtection,
-                                               (void *)cmdBld_ConfigSeq, 
-                                               hCmdBld);              
-    }
-
-    return TI_NOK;
-}
-
-
-static TI_STATUS __cfg_ba_set_session (TI_HANDLE hCmdBld)
-{
-	TI_STATUS tRes = TI_NOK;
-
-    if (DB_WLAN(hCmdBld).bJoin)
-    {
-        TI_UINT32 uTid;
-		TI_UINT32 uLastTid = MAX_NUM_OF_802_1d_TAGS; /* initial value is "not found" */
-
-		/* Look through configured BA sessions in data base to find the last set TID */
-        for (uTid = 0; uTid < MAX_NUM_OF_802_1d_TAGS; uTid++)
-        {
-            /* Is BA initiator or responder configured? */
-            if (DB_BSS(hCmdBld).bBaInitiator[uTid] || DB_BSS(hCmdBld).bBaResponder[uTid])
-            {
-				uLastTid = uTid;
-            }
-		}
-
-		if (uLastTid != MAX_NUM_OF_802_1d_TAGS)
-		{
-			/* At least one TID is set */
-			for (uTid = 0; uTid < uLastTid; ++uTid)
-			{
-				if (DB_BSS(hCmdBld).bBaInitiator[uTid])
-				{
-					/* set BA Initiator */
-					tRes = cmdBld_CfgIeSetBaSession (hCmdBld,
-													 ACX_BA_SESSION_INITIATOR_POLICY,
-													 uTid,
-													 DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uTid].uPolicy,
-													 DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uTid].aMacAddress,
-													 DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uTid].uWinSize,
-													 DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uTid].uInactivityTimeout,
-													 NULL,
-													 NULL);
-					if (tRes != TI_OK)
-					{
-						return tRes;
-					}
-				}
-
-				if (DB_BSS(hCmdBld).bBaResponder[uTid])
-				{
-					/* set BA Responder */
-					tRes = cmdBld_CfgIeSetBaSession (hCmdBld,
-													 ACX_BA_SESSION_RESPONDER_POLICY,
-													 uTid,
-													 DB_BSS(hCmdBld).tBaSessionResponderPolicy[uTid].uPolicy,
-													 DB_BSS(hCmdBld).tBaSessionResponderPolicy[uTid].aMacAddress,
-													 DB_BSS(hCmdBld).tBaSessionResponderPolicy[uTid].uWinSize,
-													 DB_BSS(hCmdBld).tBaSessionResponderPolicy[uTid].uInactivityTimeout,
-													 NULL,
-													 NULL);
-					if (tRes != TI_OK)
-					{
-						return tRes;
-					}
-				}
-			}
-
-			/* Push the last command of the last TID entry into queue with a call back function */
-			if (DB_BSS(hCmdBld).bBaInitiator[uLastTid] && !(DB_BSS(hCmdBld).bBaResponder[uLastTid]))
-			{
-
-				tRes = cmdBld_CfgIeSetBaSession (hCmdBld,
-												 ACX_BA_SESSION_INITIATOR_POLICY,
-												 uLastTid,
-												 DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uLastTid].uPolicy,
-												 DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uLastTid].aMacAddress,
-												 DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uLastTid].uWinSize,
-												 DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uLastTid].uInactivityTimeout,
-												 (void *)cmdBld_ConfigSeq,
-												 hCmdBld);
-			}
-			else if (!(DB_BSS(hCmdBld).bBaInitiator[uLastTid]) && DB_BSS(hCmdBld).bBaResponder[uLastTid])
-			{
-				tRes = cmdBld_CfgIeSetBaSession (hCmdBld,
-												 ACX_BA_SESSION_RESPONDER_POLICY,
-												 uLastTid,
-												 DB_BSS(hCmdBld).tBaSessionResponderPolicy[uLastTid].uPolicy,
-												 DB_BSS(hCmdBld).tBaSessionResponderPolicy[uLastTid].aMacAddress,
-												 DB_BSS(hCmdBld).tBaSessionResponderPolicy[uLastTid].uWinSize,
-												 DB_BSS(hCmdBld).tBaSessionResponderPolicy[uLastTid].uInactivityTimeout,
-												 (void *)cmdBld_ConfigSeq,
-												 hCmdBld);
-			}
-			else
-			{
-				/* Initiator & Responsder policy is to be set */
-				tRes = cmdBld_CfgIeSetBaSession (hCmdBld,
-												 ACX_BA_SESSION_INITIATOR_POLICY,
-												 uLastTid,
-												 DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uLastTid].uPolicy,
-												 DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uLastTid].aMacAddress,
-												 DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uLastTid].uWinSize,
-												 DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uLastTid].uInactivityTimeout,
-												 NULL,
-												 NULL);
-				if (tRes != TI_OK)
-				{
-					return tRes;
-				}
-
-				tRes = cmdBld_CfgIeSetBaSession (hCmdBld,
-												 ACX_BA_SESSION_RESPONDER_POLICY,
-												 uLastTid,
-												 DB_BSS(hCmdBld).tBaSessionResponderPolicy[uLastTid].uPolicy,
-												 DB_BSS(hCmdBld).tBaSessionResponderPolicy[uLastTid].aMacAddress,
-												 DB_BSS(hCmdBld).tBaSessionResponderPolicy[uLastTid].uWinSize,
-												 DB_BSS(hCmdBld).tBaSessionResponderPolicy[uLastTid].uInactivityTimeout,
-												 (void *)cmdBld_ConfigSeq,
-												 hCmdBld);
-			}
-		}
-	}
-
-	return tRes;
-}
-
-
-static TI_STATUS __cfg_tx_power_join (TI_HANDLE hCmdBld)
-{
-    if (DB_WLAN(hCmdBld).bJoin)
-    {
-        /* Tx-power must be set after doing join */
-        return cmdBld_CfgTxPowerDbm (hCmdBld, DB_WLAN(hCmdBld).TxPowerDbm, (void *)cmdBld_ConfigSeq, hCmdBld);              
-    }
-
-    return TI_NOK;
-}
-
-
-static TI_STATUS __cfg_keys (TI_HANDLE hCmdBld)
-{
-    TCmdBld   *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT32  index;
-
-    if (!DB_WLAN(hCmdBld).bJoin)
-    {
-        return TI_NOK;
-    }
-
-    if (pCmdBld->tSecurity.eSecurityMode != TWD_CIPHER_NONE)
-    {
-        /* 
-         * We are doing recovery during security so increase security-sequence-number by 255 just to ensure 
-         *   the AP will see progress from last Tx before the recovery (actually needed only for TKIP and AES).
-         * Decrementing the low byte by one is handled like it wrpped around, i.e. increment total number by 255.
-         */
-        cmdBld_SetSecuritySeqNum (hCmdBld, (TI_UINT8)(pCmdBld->uSecuritySeqNumLow - 1));
-
-
-        /* set the keys to the HW*/
-        for (index = 0; 
-             index < pCmdBld->tSecurity.uNumOfStations * NO_OF_RECONF_SECUR_KEYS_PER_STATION + NO_OF_EXTRA_RECONF_SECUR_KEYS; 
-             index++)
-        {
-            if ((DB_KEYS(pCmdBld).pReconfKeys + index)->keyType != KEY_NULL)
-            {
-                if (cmdBld_CmdAddKey (hCmdBld, DB_KEYS(pCmdBld).pReconfKeys + index, TI_TRUE, NULL, NULL) != TI_OK)
-                {
-                    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "__cfg_keys: ERROR cmdBld_CmdAddKey failure index=%d\n", index);
-                    return TI_NOK;
-                }   
-            }
-        }
-    
-        if (DB_KEYS(pCmdBld).bDefaultKeyIdValid)
-        {
-            /* Set the deafult key ID to the HW*/
-            if (cmdBld_CmdSetWepDefaultKeyId (hCmdBld, DB_KEYS(pCmdBld).uReconfDefaultKeyId, NULL, NULL) != TI_OK)
-            {
-                TRACE0(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "__cfg_keys: ERROR cmdBld_CmdSetWepDefaultKeyId failure\n");
-                return TI_NOK;
-            }   
-        }
-    }
-
-    /* Set the encryption/decryption control on the HW */   
-    if (cmdBld_CfgHwEncDecEnable (hCmdBld, 
-                                  DB_KEYS(pCmdBld).bReconfHwEncEnable, 
-                                  (void *)cmdBld_ConfigSeq, 
-                                  hCmdBld) != TI_OK)
-    {
-        TRACE0(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "__cfg_keys: ERROR cmdBld_CfgHwEncDecEnable failure \n");
-        return TI_NOK;
-    }   
-    
-    return TI_OK;
-}
-
-static TI_STATUS __cfg_sg_enable (TI_HANDLE hCmdBld)
-{    
-    /* Set the Soft Gemini state */
-    return cmdBld_CfgSgEnable (hCmdBld, 
-                               DB_WLAN(hCmdBld).SoftGeminiEnable,
-                               (void *)cmdBld_ConfigSeq, 
-                               hCmdBld);
-}
-
-
-static TI_STATUS __cfg_sg (TI_HANDLE hCmdBld)
-{    
-    /* Set the Soft Gemini params */
-
-	/* signals the FW to config all the paramters from the DB*/
-	DB_WLAN(hCmdBld).SoftGeminiParams.paramIdx = 0xFF;
-
-    return cmdBld_CfgSg (hCmdBld, 
-                         &DB_WLAN(hCmdBld).SoftGeminiParams, 
-                         (void *)cmdBld_ConfigSeq, 
-                         hCmdBld);
-}
-
-
-static TI_STATUS __cfg_fm_coex (TI_HANDLE hCmdBld)
-{
-    /* Set the FM Coexistence params */
-    return cmdBld_CfgIeFmCoex (hCmdBld,
-                               &DB_WLAN(hCmdBld).tFmCoexParams,
-                               (void *)cmdBld_ConfigSeq,
-                               hCmdBld);
-}
-
-
-static TI_STATUS __cfg_rate_management (TI_HANDLE hCmdBld)
-{
-	DB_RM(hCmdBld).rateMngParams.paramIndex = (rateAdaptParam_e) 0xFF;
-
-	return cmdBld_CfgIeRateMngDbg(hCmdBld,
-						   &DB_RM(hCmdBld).rateMngParams,
-						   (void *)cmdBld_ConfigSeq,
-						   hCmdBld);
-
-}
-
-
-TI_STATUS __itr_memory_map (TI_HANDLE hCmdBld)
-{
-    TCmdBld   *pCmdBld = (TCmdBld *)hCmdBld;
-
-    WLAN_OS_REPORT(("Interrogate TX/RX parameters\n"));
-
-    /* Interrogate TX/RX parameters */
-    return cmdBld_ItrIeMemoryMap (hCmdBld, 
-                                  &pCmdBld->tMemMap, 
-                                  (void *)cmdBld_ConfigFwCb, 
-                                  hCmdBld);
-}
-
-
-static const TCmdCfgFunc aCmdIniSeq [] =
-{
-    __cfg_platform_params,
-    __cfg_radio_params,
-	__cfg_extended_radio_params,
-    __cmd_probe_req,
-    __cmd_null_data,
-    __cmd_disconn,
-    __cmd_ps_poll,
-    __cmd_qos_null_data,
-    __cmd_probe_resp,
-    __cmd_beacon,
-    __cmd_keep_alive_tmpl,
-    __cfg_mem,
-    __cfg_rx_msdu_life_time,
-    __cfg_rx,
-    __cfg_ac_params_0,
-    __cfg_tid_0,
-    __cfg_ac_params_1,
-    __cfg_tid_1,
-    __cfg_ac_params_2,
-    __cfg_tid_2,
-    __cfg_ac_params_3,
-    __cfg_tid_3,
-    __cfg_pd_threshold,
-    __cfg_slot_time,
-    __cmd_arp_rsp,
-    __cfg_arp_ip_filter,
-    __cfg_group_address_table,
-    __cfg_service_period_timeout,
-    __cfg_rts_threshold,
-    __cfg_dco_itrim_params,
-    __cfg_fragment_threshold,
-    __cfg_pm_config,
-    __cfg_beacon_filter_opt,
-    __cfg_beacon_filter_table,
-    __cfg_tx_cmplt_pacing,
-    __cfg_rx_intr_pacing,
-    __cfg_sg,
-    __cfg_sg_enable,
-    __cfg_fm_coex,
-    __cfg_cca_threshold,
-    __cfg_bcn_brc_options,
-    __cmd_enable_rx,
-    __cmd_enable_tx,
-    __cfg_ps_wmm,
-    __cfg_event_scan_cmplt,
-    __cfg_event_sps_scan_cmplt,
-    __cfg_event_plt_rx_calibration_cmplt,
-    __cfg_hw_enc_dec_enable,
-    __cfg_rssi_snr_weights,
-    __cfg_rssi_snr_trigger_0,
-    __cfg_rssi_snr_trigger_1,
-    __cfg_rssi_snr_trigger_2,
-    __cfg_rssi_snr_trigger_3,
-    __cfg_rssi_snr_trigger_4,
-    __cfg_rssi_snr_trigger_5,
-    __cfg_rssi_snr_trigger_6,
-    __cfg_rssi_snr_trigger_7,
-    __cfg_max_tx_retry,
-    __cfg_split_scan_timeout,
-
-    /* Re-join sequence */ 
-    __cfg_tx_rate_policy,
-    __cmd_beacon_join,
-    __cmd_probe_resp_join,
-    __cmd_probe_req_join,
-    __cmd_null_data_join,
-    __cmd_disconn_join,
-    __cmd_ps_poll_join,
-    __cmd_keep_alive_tmpl_join,
-    __cfg_slot_time_join,
-    __cfg_preamble_join,
-    __cfg_ht_capabilities,
-    __cfg_ht_information,
-    __cmd_start_join,
-    __cfg_aid,
-    __cfg_ba_set_session,
-    __cfg_tx_power_join,
-    __cfg_keys,
-    __cmd_keep_alive_params,
-    __cfg_conn_monit_params,
-    __cfg_bet,
-    __cfg_cts_protection,
-    __cfg_ps_rx_streaming,
-    __cfg_rx_data_filter,
-    __cmd_sta_state,
-    __cmd_power_auth,
-	__cmd_burst_mode_enable,
-	__cfg_rate_management,
-    __cmd_arp_rsp_join,
-    /* Interrogate command -> must be last!! */
-    __itr_memory_map,
-
-    NULL
-};
-
-
-/****************************************************************************
- *                      cmdBld_ConfigSeq()
- ****************************************************************************
- * DESCRIPTION: Configuration sequence engine
- * 
- * INPUTS: None 
- * 
- * OUTPUT: None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ConfigSeq (TI_HANDLE hCmdBld)
-{
-    TCmdBld   *pCmdBld = (TCmdBld *)hCmdBld;
-
-    do 
-    {
-        if (aCmdIniSeq [pCmdBld->uIniSeq++] == NULL)
-        {
-            return TI_NOK; 
-        }
-    } 
-    while ((*aCmdIniSeq [pCmdBld->uIniSeq - 1])(hCmdBld) != TI_OK);
-
-    return TI_OK;
-}
-
-/****************************************************************************
- *                      cmdBld_FinalizeDownload()
- ****************************************************************************
- * DESCRIPTION: Finalize all the remaining initialization after the download has finished 
- * 
- * INPUTS:  
- * 
- * OUTPUT:  None
- * 
- * RETURNS: void
- ****************************************************************************/
-void cmdBld_FinalizeDownload (TI_HANDLE hCmdBld, TBootAttr *pBootAttr, FwStaticData_t *pFwInfo)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT8    *pMacAddr = pFwInfo->dot11StationID;
-    TI_UINT32    i;
-    TI_UINT8     uTmp;
-
-    /* Save FW version */
-    os_memoryCopy (pCmdBld->hOs, 
-                   (void *)DB_HW(hCmdBld).fwVer, 
-                   (void *)pFwInfo->FWVersion, 
-                   sizeof(DB_HW(hCmdBld).fwVer));
-
-    /* Save MAC adress (correct the bytes order first) */
-    for (i = 0; i < 3; i++)
-    {
-        uTmp = pMacAddr[i];
-        pMacAddr[i] = pMacAddr[5 - i]; 
-        pMacAddr[5 - i] = uTmp; 
-    }
-    MAC_COPY (DB_HW(hCmdBld).macAddress, pMacAddr);
-
-    /* Save chip ID */
-    os_memoryCopy (pCmdBld->hOs, 
-                   (void *)&(DB_HW(hCmdBld).uHardWareVersion), 
-                   (void *)&(pFwInfo->HardWareVersion), 
-                   sizeof(DB_HW(hCmdBld).uHardWareVersion));
-
-    /* Save power-levels table */
-    os_memoryCopy (pCmdBld->hOs, 
-                   (void *)DB_HW(hCmdBld).txPowerTable, 
-                   (void *)pFwInfo->txPowerTable, 
-                   sizeof(DB_HW(hCmdBld).txPowerTable));
-
-    /* Call the upper layer callback */
-    (*((TFinalizeCb)pCmdBld->fFinalizeDownload)) (pCmdBld->hFinalizeDownload);
-}
-
-
-TI_STATUS cmdBld_GetParam (TI_HANDLE hCmdBld, TTwdParamInfo *pParamInfo)
-{
-    TCmdBld       *pCmdBld = (TCmdBld *)hCmdBld;
-    TWlanParams   *pWlanParams = &DB_WLAN(hCmdBld);
-
-    switch (pParamInfo->paramType)
-    {
-        case TWD_RTS_THRESHOLD_PARAM_ID:
-            pParamInfo->content.halCtrlRtsThreshold = pWlanParams->RtsThreshold;
-            break;
-        
-        case TWD_FRAG_THRESHOLD_PARAM_ID:
-            pParamInfo->content.halCtrlFragThreshold = pWlanParams->FragmentThreshold;
-            break;
-
-        case TWD_COUNTERS_PARAM_ID:
-            /* Constant zero because the ACX last buffer next pointer is always pointed
-               to itself, so it's like an endless buffer*/
-            pParamInfo->content.halCtrlCounters.RecvNoBuffer = 0;
-            pParamInfo->content.halCtrlCounters.FragmentsRecv = 0; /* not supported;*/
-            pParamInfo->content.halCtrlCounters.FrameDuplicates = 0;/* not supported*/
-            pParamInfo->content.halCtrlCounters.FcsErrors = DB_CNT(hCmdBld).FcsErrCnt;
-            pParamInfo->content.halCtrlCounters.RecvError = DB_CNT(hCmdBld).FcsErrCnt;
-            break;
-        
-        case TWD_LISTEN_INTERVAL_PARAM_ID:
-            pParamInfo->content.halCtrlListenInterval = pWlanParams->ListenInterval;
-            break;
-                            
-        case TWD_RSN_DEFAULT_KEY_ID_PARAM_ID:
-            /* Not implemented */
-            return TI_NOK;
-
-        case TWD_RSN_SECURITY_MODE_PARAM_ID:
-             pParamInfo->content.rsnEncryptionStatus = pCmdBld->tSecurity.eSecurityMode;
-            break;
-
-      case TWD_ACX_STATISTICS_PARAM_ID:
-            /* Not implemented */
-         #if 0
-            {
-                acxStatisitcs_t     acxStatisitics;
-                pParamInfo->content.acxStatisitics.FWpacketReceived = acxStatisitics.FWpacketReceived;
-                /* Not supported */
-                pParamInfo->content.acxStatisitics.HALpacketReceived = 0; 
-            }
-         #endif
-            return TI_NOK;
-
-    case TWD_MEDIUM_OCCUPANCY_PARAM_ID:
-        if (cmdBld_ItrIeMediumOccupancy (hCmdBld, pParamInfo->content.interogateCmdCBParams) != TI_OK)
-            return TI_NOK;
-            break;
-
-    case TWD_TSF_DTIM_MIB_PARAM_ID:
-        if (cmdBld_ItrIeTfsDtim (hCmdBld, pParamInfo->content.interogateCmdCBParams) != TI_OK)
-            return TI_NOK;
-        break;
-
-    case TWD_AID_PARAM_ID:
-        if (cmdBld_GetCurrentAssociationId (hCmdBld, &pParamInfo->content.halCtrlAid) != TI_OK)
-            return TI_NOK;
-
-        TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , " AID 2 %d\n", pParamInfo->content.halCtrlAid);
-        break;
-
-    case TWD_NOISE_HISTOGRAM_PARAM_ID:
-        if (cmdBld_ItrIeNoiseHistogramResults (hCmdBld, pParamInfo->content.interogateCmdCBParams) != TI_OK)
-        {
-            return TI_NOK;
-        }
-        break;
-
-    case TWD_CURRENT_CHANNEL_PARAM_ID:
-        /* Get current channel number */
-        pParamInfo->content.halCtrlCurrentChannel = DB_BSS(hCmdBld).RadioChannel;
-        break;
-
-    /* SNR and RSSI belongs to the same MIB, and the relevant CB is passed here*/
-    case TWD_RSSI_LEVEL_PARAM_ID:
-    case TWD_SNR_RATIO_PARAM_ID:
-        /* Retrive the Callback function and read buffer pointer that are in fact stored in the TIWLAN_ADAPTER and then send it to the Command Mailbox */
-        cmdBld_ItrRSSI (hCmdBld, 
-                        pParamInfo->content.interogateCmdCBParams.fCb, 
-                        pParamInfo->content.interogateCmdCBParams.hCb, 
-                        pParamInfo->content.interogateCmdCBParams.pCb);
-        break;
-
-    case TWD_BCN_BRC_OPTIONS_PARAM_ID:
-        pParamInfo->content.BcnBrcOptions.BeaconRxTimeout    = pWlanParams->BcnBrcOptions.BeaconRxTimeout;
-        pParamInfo->content.BcnBrcOptions.BroadcastRxTimeout = pWlanParams->BcnBrcOptions.BroadcastRxTimeout;
-        pParamInfo->content.BcnBrcOptions.RxBroadcastInPs    = pWlanParams->BcnBrcOptions.RxBroadcastInPs;
-        break;
-
-    case TWD_MAX_RX_MSDU_LIFE_TIME_PARAM_ID:
-        pParamInfo->content.halCtrlMaxRxMsduLifetime = pWlanParams->MaxRxMsduLifetime;
-        break;
-
-    case TWD_TX_RATE_CLASS_PARAM_ID:
-        pParamInfo->content.pTxRatePlicy = &DB_BSS(hCmdBld).TxRateClassParams;
-        break;
-
-    case TWD_SG_CONFIG_PARAM_ID:
-        return cmdBld_ItrSg (hCmdBld,
-                             pParamInfo->content.interogateCmdCBParams.fCb, 
-                             pParamInfo->content.interogateCmdCBParams.hCb,
-                             (void*)pParamInfo->content.interogateCmdCBParams.pCb);
-
-    case TWD_TX_POWER_PARAM_ID:
-        pParamInfo->content.halCtrlTxPowerDbm = DB_WLAN(hCmdBld).TxPowerDbm;        
-        break;
-
-    case TWD_RADIO_TEST_PARAM_ID:
-        TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Radio Test\n");
-        return cmdBld_CmdTest (hCmdBld,
-                               pParamInfo->content.interogateCmdCBParams.fCb,
-                               pParamInfo->content.interogateCmdCBParams.hCb,
-                               (TTestCmd*)pParamInfo->content.interogateCmdCBParams.pCb);
-
-    case TWD_DCO_ITRIM_PARAMS_ID:
-        pParamInfo->content.tDcoItrimParams.enable = pWlanParams->dcoItrimEnabled;
-        pParamInfo->content.tDcoItrimParams.moderationTimeoutUsec = pWlanParams->dcoItrimModerationTimeoutUsec;
-        break;
-
-    default:
-        TRACE1(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "cmdBld_GetParam - ERROR - Param is not supported, %d\n\n", pParamInfo->paramType);
-        return (PARAM_NOT_SUPPORTED);
-    }
-
-    return TI_OK;
-}
-
-
-static TI_STATUS cmdBld_ReadMibBeaconFilterIETable (TI_HANDLE hCmdBld, TI_HANDLE hCb, void* fCb, void* pCb)
-{
-    TCmdBld *pCmdBld                = (TCmdBld *)hCmdBld;
-    TMib *pMib                      = (TMib*)pCb;
-    TCmdQueueInterrogateCb RetFunc  = (TCmdQueueInterrogateCb)fCb;
-    TI_UINT8 IETableSize            = 0;
-
-    /*Get params*/
-    pMib->aData.BeaconFilter.iNumberOfIEs = DB_WLAN(hCmdBld).beaconFilterIETable.numberOfIEs;
-    IETableSize = DB_WLAN(hCmdBld).beaconFilterIETable.IETableSize;
-                  
-    os_memoryZero (pCmdBld->hOs, 
-                   pMib->aData.BeaconFilter.iIETable,
-                   sizeof(pMib->aData.BeaconFilter.iIETable));
-
-    os_memoryCopy (pCmdBld->hOs, 
-                   pMib->aData.BeaconFilter.iIETable,
-                   DB_WLAN(hCmdBld).beaconFilterIETable.IETable,
-                   IETableSize);
-
-    pMib->Length = IETableSize + 1;     
-
-    RetFunc(hCb, TI_OK, pCb); 
-
-    return TI_OK;
-}
-
-/**
- * \author \n
- * \date \n
- * \brief Coordinates between legacy TxRatePolicy implementation and the MIB format: \n
- *        Converts the pGwsi_txRatePolicy back to whal commands 
- *        Activates the whal whalCtrl_set function 
- * Function Scope \e Public.\n
- * \param  - \n
- * \return \n
- */
-static TI_STATUS cmdBld_ReadMibTxRatePolicy (TI_HANDLE hCmdBld, TI_HANDLE hCb, void* fCb, void* pCb)
-{
-    TMib* pMib = (TMib*)pCb;
-    TCmdQueueInterrogateCb RetFunc = (TCmdQueueInterrogateCb)fCb;
-    TTwdParamInfo param;
-    TI_STATUS status = TI_OK;
-
-    param.paramType = TWD_TX_RATE_CLASS_PARAM_ID;
-    cmdBld_GetParam (hCmdBld, &param);
-    if (param.content.pTxRatePlicy == NULL)
-        return TI_NOK;
-
-    /*Copy the data form the param to the MIB*/
-    pMib->aData.txRatePolicy = *param.content.pTxRatePlicy;
-    pMib->Length = pMib->aData.txRatePolicy.numOfRateClasses * sizeof(pMib->aData.txRatePolicy.rateClass[0]) + 
-                   sizeof(pMib->aData.txRatePolicy.numOfRateClasses);
-    RetFunc (hCb, status, pCb);
-    return status;
-}
-
-
-TI_STATUS cmdBld_ReadMib (TI_HANDLE hCmdBld, TI_HANDLE hCb, void* fCb, void* pCb)
-{
-    TCmdBld     *pCmdBld = (TCmdBld *)hCmdBld;
-    TMib    *pMibBuf = (TMib*)pCb;
-    TCmdQueueInterrogateCb RetFunc = (TCmdQueueInterrogateCb)fCb;
-    TI_STATUS Status = TI_OK;
-    
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_ReadMib :pMibBuf %p:\n",pMibBuf);
-    
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_ReadMib :aMib %x:\n", pMibBuf->aMib);
-    
-    switch (pMibBuf->aMib)
-    {
-    case MIB_dot11MaxReceiveLifetime:
-        {
-            TTwdParamInfo ParamInfo;
-            ParamInfo.paramType = TWD_MAX_RX_MSDU_LIFE_TIME_PARAM_ID;
-            ParamInfo.paramLength = sizeof(ParamInfo.content.halCtrlMaxRxMsduLifetime);
-            Status = cmdBld_GetParam (hCmdBld, &ParamInfo);
-            pMibBuf->aData.MaxReceiveLifeTime = ParamInfo.content.halCtrlMaxRxMsduLifetime / 1024; /* converting from usecs to TUs*/
-            pMibBuf->Length = sizeof(pMibBuf->aData.MaxReceiveLifeTime);
-        }
-        break;
-        
-    case MIB_dot11GroupAddressesTable:
-        {
-            Status = cmdBld_GetGroupAddressTable (hCmdBld,
-                                                  &pMibBuf->aData.GroupAddressTable.bFilteringEnable,
-                                                  &pMibBuf->aData.GroupAddressTable.nNumberOfAddresses,
-                                                  pMibBuf->aData.GroupAddressTable.aGroupTable);
-            
-            pMibBuf->Length = sizeof(pMibBuf->aData.GroupAddressTable.bFilteringEnable) + 
-                              sizeof(pMibBuf->aData.GroupAddressTable.nNumberOfAddresses) +
-                              pMibBuf->aData.GroupAddressTable.nNumberOfAddresses * sizeof(TMacAddr);
-        }
-        break;
-        
-    case MIB_ctsToSelf:
-        {
-            TTwdParamInfo ParamInfo;
-            ParamInfo.paramType = TWD_CTS_TO_SELF_PARAM_ID;
-            ParamInfo.paramLength = sizeof(ParamInfo.content.halCtrlCtsToSelf);
-            Status = cmdBld_GetParam (hCmdBld, &ParamInfo);
-            pMibBuf->aData.CTSToSelfEnable = ParamInfo.content.halCtrlCtsToSelf;
-            pMibBuf->Length = sizeof(pMibBuf->aData.CTSToSelfEnable);
-        }
-        break;
-        
-    case MIB_arpIpAddressesTable:
-        {
-            TIpAddr   IpAddress;  
-            EIpVer    IPver;
-            TI_UINT8  Enable;
-            
-            pMibBuf->Length = sizeof(TMibArpIpAddressesTable);
-            Status = cmdBld_GetArpIpAddressesTable (hCmdBld, &IpAddress, &Enable, &IPver);
-            if (Status == TI_OK)
-            {
-                pMibBuf->aData.ArpIpAddressesTable.FilteringEnable = Enable;         
-
-                if (IP_VER_4 == IPver) /* IP_VER_4 only */
-                {
-                    IP_COPY (pMibBuf->aData.ArpIpAddressesTable.addr, IpAddress);
-                }
-                else
-                {
-                    Status = TI_NOK;
-                }
-            }
-            return Status;
-        }
-        
-    case MIB_rxFilter:
-        {
-            TI_UINT32 RxConfigOption;
-            TI_UINT32 RxFilterOption;
-            
-            pMibBuf->Length = 1;
-            pMibBuf->aData.RxFilter = 0;
-
-            /* Get RX filter data */
-            Status = cmdBld_GetRxFilters (hCmdBld, &RxConfigOption, &RxFilterOption);
-            if (TI_OK == Status)
-            {
-                /*Translate to MIB bitmap*/
-                if ((RxConfigOption & RX_CFG_MAC) == RX_CFG_ENABLE_ANY_DEST_MAC)
-                    pMibBuf->aData.RxFilter |= MIB_RX_FILTER_PROMISCOUS_SET;
-                
-                if ((RxConfigOption & RX_CFG_BSSID) == RX_CFG_ENABLE_ONLY_MY_BSSID)
-                    pMibBuf->aData.RxFilter |= MIB_RX_FILTER_BSSID_SET;
-            }
-        }
-        break;
-
-    case MIB_beaconFilterIETable:
-        return cmdBld_ReadMibBeaconFilterIETable (hCmdBld, hCb, fCb, pCb);
-
-    case MIB_txRatePolicy:
-        return cmdBld_ReadMibTxRatePolicy (hCmdBld, hCb, fCb, pCb);
-
-    case MIB_countersTable:
-        return cmdBld_ItrErrorCnt (hCmdBld, fCb, hCb, pCb);
-
-    case MIB_statisticsTable:
-        return cmdBld_ItrRoamimgStatisitics (hCmdBld, fCb, hCb, pCb);
-
-    default:
-        TRACE1(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "TWD_ReadMib:MIB aMib 0x%x Not supported\n",pMibBuf->aMib);
-        return TI_NOK;
-    }
-
-    if(RetFunc)
-        RetFunc(hCb, Status, pCb);
-    
-    return TI_OK;
-}
-
-
-TI_STATUS cmdBld_GetGroupAddressTable (TI_HANDLE hCmdBld, TI_UINT8* pEnabled, TI_UINT8* pNumGroupAddrs, TMacAddr *pGroupAddr)
-{
-    TCmdBld   *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT32     i;
-
-    if (NULL == pEnabled || NULL == pNumGroupAddrs || NULL == pGroupAddr)
-    {
-        TRACE3(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "cmdBld_GetGroupAddressTable: pisEnabled=0x%p pnumGroupAddrs=0x%p  Group_addr=0x%p !!!\n", pEnabled, pNumGroupAddrs, pGroupAddr);
-        return PARAM_VALUE_NOT_VALID;
-    }
-
-    *pNumGroupAddrs = DB_WLAN(hCmdBld).numGroupAddrs;
-    *pEnabled = DB_WLAN(hCmdBld).isMacAddrFilteringnabled;
-
-    os_memoryZero (pCmdBld->hOs, pGroupAddr, sizeof(pGroupAddr));
-    for (i = 0; i < *pNumGroupAddrs; i++) 
-    {
-        os_memoryCopy (pCmdBld->hOs, 
-                       (void *)&((*pGroupAddr)[MAC_ADDR_LEN*i]), 
-                       &DB_WLAN(hCmdBld).aGroupAddr[i], 
-                       MAC_ADDR_LEN);
-    }
-
-    return TI_OK;
-}
-
-
-TI_STATUS cmdBld_GetRxFilters (TI_HANDLE hCmdBld, TI_UINT32* pRxConfigOption, TI_UINT32* pRxFilterOption)
-{
-    *pRxConfigOption = DB_WLAN(hCmdBld).RxConfigOption;
-    *pRxFilterOption = DB_WLAN(hCmdBld).RxFilterOption;
-
-    return TI_OK;
-}
-
-
-TFwInfo * cmdBld_GetFWInfo (TI_HANDLE hCmdBld)
-{
-    return &DB_HW(hCmdBld);
-}
-
-
-
-TI_STATUS cmdBld_SetRadioBand (TI_HANDLE hCmdBld, ERadioBand eRadioBand)
-{
-    DB_WLAN(hCmdBld).RadioBand = eRadioBand;       
-    
-    return TI_OK;
-}
-
-
-/****************************************************************************
- *                      cmdBld_CurrentAssociationIdGet()
- ****************************************************************************
- * DESCRIPTION: Get the current TX antenna 
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_GetCurrentAssociationId (TI_HANDLE hCmdBld, TI_UINT16 *pAidVal)
-{
-    *pAidVal = DB_WLAN(hCmdBld).Aid;
-
-    return TI_OK;
-}
-
-
- /****************************************************************************
- *                      cmdBld_GetArpIpAddressesTable()
- ****************************************************************************
- * DESCRIPTION: Sets the Group table according to the given configuration. 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_GetArpIpAddressesTable (TI_HANDLE hCmdBld, TIpAddr *pIp, TI_UINT8* pbEnabled, EIpVer *pIpVer)
-{
-    *pIpVer = (EIpVer)DB_WLAN(hCmdBld).arp_IP_ver;
-
-    IP_COPY (*pIp, DB_WLAN(hCmdBld).arp_IP_addr);
-
-    *pbEnabled = (TI_UINT8)DB_WLAN(hCmdBld).arpFilterType;
-
-    return TI_OK;
-}
-
-
-TI_STATUS cmdBld_ConvertAppRatesBitmap (TI_UINT32 uAppRatesBitmap, TI_UINT32 uAppModulation, EHwRateBitFiled *pHwRatesBitmap)
-{
-    EHwRateBitFiled uRatesBitmap = 0;
-   
-    if (uAppRatesBitmap & DRV_RATE_MASK_1_BARKER)    uRatesBitmap |= HW_BIT_RATE_1MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_2_BARKER)    uRatesBitmap |= HW_BIT_RATE_2MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_5_5_CCK)     uRatesBitmap |= HW_BIT_RATE_5_5MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_11_CCK)      uRatesBitmap |= HW_BIT_RATE_11MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_22_PBCC)     uRatesBitmap |= HW_BIT_RATE_22MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_6_OFDM)      uRatesBitmap |= HW_BIT_RATE_6MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_9_OFDM)      uRatesBitmap |= HW_BIT_RATE_9MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_12_OFDM)     uRatesBitmap |= HW_BIT_RATE_12MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_18_OFDM)     uRatesBitmap |= HW_BIT_RATE_18MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_24_OFDM)     uRatesBitmap |= HW_BIT_RATE_24MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_36_OFDM)     uRatesBitmap |= HW_BIT_RATE_36MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_48_OFDM)     uRatesBitmap |= HW_BIT_RATE_48MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_54_OFDM)     uRatesBitmap |= HW_BIT_RATE_54MBPS;
-    if (uAppRatesBitmap & DRV_RATE_MASK_MCS_0_OFDM)  uRatesBitmap |= HW_BIT_RATE_MCS_0;
-    if (uAppRatesBitmap & DRV_RATE_MASK_MCS_1_OFDM)  uRatesBitmap |= HW_BIT_RATE_MCS_1;
-    if (uAppRatesBitmap & DRV_RATE_MASK_MCS_2_OFDM)  uRatesBitmap |= HW_BIT_RATE_MCS_2;
-    if (uAppRatesBitmap & DRV_RATE_MASK_MCS_3_OFDM)  uRatesBitmap |= HW_BIT_RATE_MCS_3;
-    if (uAppRatesBitmap & DRV_RATE_MASK_MCS_4_OFDM)  uRatesBitmap |= HW_BIT_RATE_MCS_4;
-    if (uAppRatesBitmap & DRV_RATE_MASK_MCS_5_OFDM)  uRatesBitmap |= HW_BIT_RATE_MCS_5;
-    if (uAppRatesBitmap & DRV_RATE_MASK_MCS_6_OFDM)  uRatesBitmap |= HW_BIT_RATE_MCS_6;
-    if (uAppRatesBitmap & DRV_RATE_MASK_MCS_7_OFDM)  uRatesBitmap |= HW_BIT_RATE_MCS_7;
-    
-    *pHwRatesBitmap = uRatesBitmap;
-
-    return TI_OK;
-}
-
-EHwRateBitFiled rateNumberToBitmap(TI_UINT8 uRate)
-{
-	switch(uRate)
-	{
-	case 1:   return HW_BIT_RATE_1MBPS;
-	case 2:   return HW_BIT_RATE_2MBPS;
-	case 5:   return HW_BIT_RATE_5_5MBPS;
-	case 6:   return HW_BIT_RATE_6MBPS; 
-	case 9:   return HW_BIT_RATE_9MBPS; 
-	case 11:  return HW_BIT_RATE_11MBPS;
-	case 12:  return HW_BIT_RATE_12MBPS;
-	case 18:  return HW_BIT_RATE_18MBPS;
-	case 22:  return HW_BIT_RATE_22MBPS;
-	case 24:  return HW_BIT_RATE_24MBPS;
-	case 36:  return HW_BIT_RATE_36MBPS;
-	case 48:  return HW_BIT_RATE_48MBPS;
-	case 54:  return HW_BIT_RATE_54MBPS;
-	default:
-		return 0;
-	}
-}
-
-TI_STATUS cmdBld_ConvertAppRate (ERate AppRate, TI_UINT8 *pHwRate)
-{
-    TI_UINT8     Rate = 0;
-    TI_STATUS status = TI_OK;
-
-    switch (AppRate)
-    {
-        /*
-         *  The handle for 5.5/11/22 PBCC was removed !!!
-         */
-
-        case DRV_RATE_1M:           Rate = txPolicy1;          break;
-        case DRV_RATE_2M:           Rate = txPolicy2;          break;
-        case DRV_RATE_5_5M:         Rate = txPolicy5_5;        break;
-        case DRV_RATE_11M:          Rate = txPolicy11;         break;
-        case DRV_RATE_22M:          Rate = txPolicy22;         break;
-        case DRV_RATE_6M:           Rate = txPolicy6;          break;
-        case DRV_RATE_9M:           Rate = txPolicy9;          break;
-        case DRV_RATE_12M:          Rate = txPolicy12;         break;
-        case DRV_RATE_18M:          Rate = txPolicy18;         break;
-        case DRV_RATE_24M:          Rate = txPolicy24;         break;
-        case DRV_RATE_36M:          Rate = txPolicy36;         break;
-        case DRV_RATE_48M:          Rate = txPolicy48;         break;
-        case DRV_RATE_54M:          Rate = txPolicy54;         break;
-        case DRV_RATE_MCS_0:          Rate = txPolicyMcs0;         break;
-        case DRV_RATE_MCS_1:          Rate = txPolicyMcs1;         break;
-        case DRV_RATE_MCS_2:          Rate = txPolicyMcs2;         break;
-        case DRV_RATE_MCS_3:          Rate = txPolicyMcs3;         break;
-        case DRV_RATE_MCS_4:          Rate = txPolicyMcs4;         break;
-        case DRV_RATE_MCS_5:          Rate = txPolicyMcs5;         break;
-        case DRV_RATE_MCS_6:          Rate = txPolicyMcs6;         break;
-        case DRV_RATE_MCS_7:          Rate = txPolicyMcs7;         break;
-
-        default:
-            WLAN_OS_REPORT(("%s wrong app rate = %d\n",__FUNCTION__,AppRate));
-            status = TI_NOK;
-            break;
-    }
-
-    if (status == TI_OK)
-        *pHwRate = Rate;
-    else
-        *pHwRate = txPolicy1; 
-
-    return status;
-}
-
-
-TI_STATUS cmdBld_SetRxFilter (TI_HANDLE hCmdBld, TI_UINT32 uRxConfigOption, TI_UINT32 uRxFilterOption)
-{
-    DB_WLAN(hCmdBld).RxConfigOption = uRxConfigOption;
-    DB_WLAN(hCmdBld).RxFilterOption = uRxFilterOption;
-    DB_WLAN(hCmdBld).RxConfigOption |= RX_CFG_ENABLE_PHY_HEADER_PLCP;
-
-    if (DB_WLAN(hCmdBld).RxDisableBroadcast)
-    {
-        DB_WLAN(hCmdBld).RxConfigOption |= RX_CFG_DISABLE_BCAST;
-    }
-    
-    return TI_OK;
-}
-
-
-TI_UINT8 cmdBld_GetBssType (TI_HANDLE hCmdBld)
-{
-    return DB_BSS(hCmdBld).ReqBssType;
-}
-
-
-TI_UINT32 cmdBld_GetAckPolicy (TI_HANDLE hCmdBld, TI_UINT32 uQueueId)
-{
-    return (TI_UINT32)DB_QUEUES(hCmdBld).queues[uQueueId].ackPolicy;
-}
-
-
-TI_STATUS cmdBld_SetSecuritySeqNum (TI_HANDLE hCmdBld, TI_UINT8 securitySeqNumLsByte)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    /* If 8 lsb wrap around occurred (new < old). */
-    if ((TI_UINT16)securitySeqNumLsByte < (pCmdBld->uSecuritySeqNumLow & 0xFF))
-    {
-        /* Increment the upper byte of the 16 lsb. */       
-        pCmdBld->uSecuritySeqNumLow += 0x100;
-
-        /* If 16 bit wrap around occurred, increment the upper 32 bit. */
-        if (!(pCmdBld->uSecuritySeqNumLow & 0xFF00))
-            pCmdBld->uSecuritySeqNumHigh++;
-    }
-
-    /* Save new sequence number 8 lsb (received from the FW). */
-    pCmdBld->uSecuritySeqNumLow &= 0xFF00;
-    pCmdBld->uSecuritySeqNumLow |= (TI_UINT16)securitySeqNumLsByte;
-
-    return TI_OK;
-}
-
-/****************************************************************************
- *                      cmdBld_JoinCmpltForReconfigCb()
- ****************************************************************************
- * DESCRIPTION:   The Join-Complete callback used by the reconfig sequenc (see __cmd_start_join()).
- *                It restores the original Join-Complete CB and continues the sequence.
- *                It is needed so the reconfig sequence won't progress before the Join
- *                    command is completed (otherwise the FW may drop the other commands).
- *
- * INPUTS: hCmdBld - The module object 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK
- ****************************************************************************/
-static TI_STATUS cmdBld_JoinCmpltForReconfigCb (TI_HANDLE hCmdBld)
-{
-    TCmdBld    *pCmdBld = (TCmdBld *)hCmdBld;
-    void       *fDummyCb;    
-    TI_HANDLE   hDummyHndl;  
-
-    /* Restored the original Join-Complete callback function */
-    eventMbox_ReplaceEvent (pCmdBld->hEventMbox, 
-                              TWD_OWN_EVENT_JOIN_CMPLT, 
-                              pCmdBld->fJoinCmpltOriginalCbFunc, 
-                              pCmdBld->hJoinCmpltOriginalCbHndl,
-                              &fDummyCb,
-                              &hDummyHndl);  
-
-    /* Call the reconfig sequence to continue the configuration after Join completion */
-    cmdBld_ConfigSeq (hCmdBld);
-
-    return TI_OK;
-}
-
-
-
-static TI_STATUS cmdBld_DummyCb (TI_HANDLE hCmdBld)
-{
-    return TI_OK;
-}
-
-
-
-
-
-#ifdef TI_DBG
-
-void cmdBld_DbgForceTemplatesRates (TI_HANDLE hCmdBld, TI_UINT32 uRateMask)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    pCmdBld->uDbgTemplatesRateMask = uRateMask; 
-}
-
-#endif /* TI_DBG */
-
diff --git a/wl1271/TWD/Ctrl/CmdBld.h b/wl1271/TWD/Ctrl/CmdBld.h
deleted file mode 100644
index dbc1084..0000000
--- a/wl1271/TWD/Ctrl/CmdBld.h
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * CmdBld.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-#ifndef CMDBLD_H
-#define CMDBLD_H
-
-
-#include "TWDriver.h"
-#include "CmdBldDb.h"
-
-TI_HANDLE cmdBld_Create                 (TI_HANDLE hOs);
-TI_STATUS cmdBld_Destroy                (TI_HANDLE hCmdBld);
-TI_STATUS cmdBld_Restart               (TI_HANDLE hCmdBld);
-TI_STATUS cmdBld_Config                 (TI_HANDLE  hCmdBld, 
-                                         TI_HANDLE  hReport, 
-                                         void      *fFinalizeDownload, 
-                                         TI_HANDLE  hFinalizeDownload, 
-                                         TI_HANDLE  hEventMbox, 
-                                         TI_HANDLE  hCmdQueue,
-                                         TI_HANDLE  hTwIf);
-TI_STATUS cmdBld_ConfigFw               (TI_HANDLE hCmdBld, void *fConfigFwCb, TI_HANDLE hConfigFwCb);
-TI_STATUS cmdBld_CheckMboxCb            (TI_HANDLE hCmdBld, void *fFailureEvCb, TI_HANDLE hFailureEv);
-TI_STATUS cmdBld_GetParam               (TI_HANDLE hCmdBld, TTwdParamInfo *pParamInfo);
-TI_STATUS cmdBld_ReadMib                (TI_HANDLE hCmdBld, TI_HANDLE hCb, void* fCb, void* pCb);
-TI_STATUS cmdBld_ConvertAppRatesBitmap  (TI_UINT32 uAppRatesBitmap, TI_UINT32 uAppModulation, EHwRateBitFiled *pHwRatesBitmap);
-TI_STATUS cmdBld_ConvertAppRate (ERate AppRate, TI_UINT8 *pHwRate);
-EHwRateBitFiled rateNumberToBitmap(TI_UINT8 uRate);
-
-/* Commands */
-TI_STATUS cmdBld_CmdNoiseHistogram      (TI_HANDLE hCmdBld, TNoiseHistogram* pNoiseHistParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdMeasurement         (TI_HANDLE hCmdBld, TMeasurementParams *pMeasurementParams, void *fCommandResponseCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdMeasurementStop     (TI_HANDLE hCmdBld, void *fCommandResponseCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdApDiscovery         (TI_HANDLE hCmdBld, TApDiscoveryParams* pApDiscoveryParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdApDiscoveryStop     (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdStartScan           (TI_HANDLE hCmdBld, TScanParams *pScanVals, EScanResultTag eScanTag, TI_BOOL bHighPriority, void *fScanCommandResponseCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdStartSPSScan        (TI_HANDLE hCmdBld, TScanParams *pScanVals, EScanResultTag eScanTag, void *fScanCommandResponseCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdStopScan            (TI_HANDLE hCmdBld, EScanResultTag eScanTag, void *fScanCommandResponseCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdStopSPSScan         (TI_HANDLE hCmdBld, EScanResultTag eScanTag, void *fScanCommandResponseCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdSetSplitScanTimeOut (TI_HANDLE hCmdBld, TI_UINT32 uTimeOut);
-TI_STATUS cmdBld_StartPeriodicScan      (TI_HANDLE hCmdBld, TPeriodicScanParams *pPeriodicScanParams, EScanResultTag eScanTag, TI_UINT32 uPassiveScanDfsDwellTimeMs, void* fScanCommandResponseCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_StopPeriodicScan       (TI_HANDLE hCmdBld, EScanResultTag eScanTag, void* fScanCommandResponseCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdStartJoin           (TI_HANDLE hCmdBld, ScanBssType_e eBssType, void *fJoinCompleteCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdJoinBss             (TI_HANDLE hCmdBld, TJoinBss *pJoinBssParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdTemplate            (TI_HANDLE hCmdBld, TSetTemplate *pTemplateParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdSwitchChannel       (TI_HANDLE hCmdBld, TSwitchChannelParams *pSwitchChannelCmdvoid, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdSwitchChannelCancel (TI_HANDLE hCmdBld, TI_UINT8 channel, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdEnableTx            (TI_HANDLE hCmdBld, TI_UINT8 channel, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdDisableTx           (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdFwDisconnect        (TI_HANDLE hCmdBld, TI_UINT32 uConfigOptions, TI_UINT32 uFilterOptions, DisconnectType_e uDisconType, TI_UINT16 uDisconReason, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdHealthCheck         (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdSetPsMode           (TI_HANDLE hCmdBld, TPowerSaveParams* pPowerSaveParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdEnableRx            (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdAddWepDefaultKey    (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdRemoveWepDefaultKey (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdSetWepDefaultKeyId  (TI_HANDLE hCmdBld, TI_UINT8 aKeyIdVal, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdAddWpaKey           (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdRemoveWpaKey        (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdAddTkipMicMappingKey(TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdRemoveTkipMicMappingKey (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdAddAesMappingKey    (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdRemoveAesMappingKey (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb);
-#ifdef GEM_SUPPORTED
-    TI_STATUS cmdBld_CmdAddGemMappingKey    (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb);
-    TI_STATUS cmdBld_CmdRemoveGemMappingKey (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb);
-#endif
-TI_STATUS cmdBld_CmdAddKey              (TI_HANDLE hCmdBld, TSecurityKeys* pKey, TI_BOOL bReconfFlag, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdRemoveKey           (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdConfigureTemplates  (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdSetStaState         (TI_HANDLE hCmdBld, TI_UINT8 staState, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdTest                (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, TTestCmd* pTestCmd);
-
-
-/* Config */
-TI_STATUS cmdBld_CfgEventMask           (TI_HANDLE hCmdBld, TI_UINT32 uEventMask, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgConnMonitParams     (TI_HANDLE hCmdBld, TRroamingTriggerParams *pRoamingTriggerCmd, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgMaxTxRetry          (TI_HANDLE hCmdBld, TRroamingTriggerParams *pRoamingTriggerCmd, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgAid                 (TI_HANDLE hCmdBld, TI_UINT16 aid, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgSlotTime            (TI_HANDLE hCmdBld, ESlotTime eSlotTimeVal, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgArpIpAddrTable      (TI_HANDLE hCmdBld, TIpAddr tIpAddr, TI_UINT8 bEnabled, EIpVer eIpVer, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgArpIpFilter         (TI_HANDLE hCmdBld, TIpAddr tIpAddr, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgRx                  (TI_HANDLE hCmdBld, TI_UINT32 uRxConfigOption, TI_UINT32 uRxFilterOption, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgPreamble            (TI_HANDLE hCmdBld, Preamble_e ePreamble, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgPacketDetectionThreshold (TI_HANDLE hCmdBld, TI_UINT32 threshold, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgBeaconFilterOpt     (TI_HANDLE hCmdBld, TI_UINT8 uBeaconFilteringStatus, TI_UINT8 uNumOfBeaconsToBuffer, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgBeaconFilterTable   (TI_HANDLE hCmdBld, TI_UINT8 uNumberOfIEs, TI_UINT8 *pIETable, TI_UINT8 uIeTableSize, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgWakeUpCondition     (TI_HANDLE hCmdBld, TPowerMgmtConfig *pPMConfig, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgBcnBrcOptions       (TI_HANDLE hCmdBld, TPowerMgmtConfig *pPMConfig, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgGroupAddressTable   (TI_HANDLE hCmdBld, TI_UINT8 numGroupAddrs, TMacAddr *pGroupAddr, TI_BOOL bEnabled, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgSleepAuth           (TI_HANDLE hCmdBld, EPowerPolicy eMinPowerLevel, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgSgEnable            (TI_HANDLE hCmdBld, ESoftGeminiEnableModes eSgEnable, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgSg                  (TI_HANDLE hCmdBld, TSoftGeminiParams *pSgParam, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgTxRatePolicy        (TI_HANDLE hCmdBld, TTxRatePolicy *pTxRatePolicy, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgTid                 (TI_HANDLE hCmdBld, TQueueTrafficParams *pQtrafficParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgAcParams            (TI_HANDLE hCmdBld, TAcQosParams *pAcQosParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgPsRxStreaming       (TI_HANDLE hCmdBld, TPsRxStreaming *pPsRxStreaming, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgClkRun              (TI_HANDLE hCmdBld, TI_BOOL bClkRunEnable, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgHwEncEnable         (TI_HANDLE hCmdBld, TI_BOOL aHwEncEnable, TI_BOOL bHwDecEnable, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgHwEncDecEnable      (TI_HANDLE hCmdBld, TI_BOOL bHwEncEnable, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgRxMsduFormat        (TI_HANDLE hCmdBld, TI_BOOL bRxMsduForamtEnable, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgRtsThreshold        (TI_HANDLE hCmdBld, TI_UINT16 threshold, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgDcoItrimParams      (TI_HANDLE hCmdBld, TI_BOOL enable, TI_UINT32 moderationTimeoutUsec, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgFragmentThreshold   (TI_HANDLE hCmdBld, TI_UINT16 uFragmentThreshold, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgSecureMode          (TI_HANDLE hCmdBld, ECipherSuite eSecurMode, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgMacClock            (TI_HANDLE hCmdBld, TI_UINT32 uMacClock, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgArmClock            (TI_HANDLE hCmdBld, TI_UINT32 uArmClock, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgEnableRxDataFilter  (TI_HANDLE hCmdBld, TI_BOOL bEnabled, filter_e eDefaultAction, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgRxDataFilter        (TI_HANDLE hCmdBld, TI_UINT8 index, TI_UINT8 command, filter_e eAction, TI_UINT8 uNumFieldPatterns, TI_UINT8 uLenFieldPatterns, TI_UINT8 *pFieldPatterns, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgCtsProtection       (TI_HANDLE hCmdBld, TI_UINT8 uCtsProtection, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgServicePeriodTimeout(TI_HANDLE hCmdBld, TRxTimeOut *pRxTimeOut, void *fCb, TI_HANDLE hCb);                            
-TI_STATUS cmdBld_CfgRxMsduLifeTime      (TI_HANDLE hCmdBld, TI_UINT32 uRxMsduLifeTime, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgStatisitics         (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgTxPowerDbm          (TI_HANDLE hCmdBld, TI_UINT8 uTxPowerDbm, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgRssiSnrTrigger      (TI_HANDLE hCmdBld, RssiSnrTriggerCfg_t *pTriggerParam, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgRssiSnrWeights      (TI_HANDLE hCmdBld, RssiSnrAverageWeights_t *pWeightsParam, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgBet                 (TI_HANDLE hCmdBld, TI_UINT8 Enable, TI_UINT8 MaximumConsecutiveET, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgKeepAlive           (TI_HANDLE hCmdBld, TKeepAliveParams *pKeepAliveParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgKeepAliveEnaDis     (TI_HANDLE hCmdBld, TI_UINT8 enaDisFlag, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgSetBaSession        (TI_HANDLE hCmdBld, InfoElement_e eBaType, TI_UINT8 uTid, TI_UINT8 uState, TMacAddr tRa, TI_UINT16 uWinSize, TI_UINT16 uInactivityTimeout, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgSetFwHtCapabilities (TI_HANDLE hCmdBld, TI_UINT32 uHtCapabilites, TMacAddr tMacAddress, TI_UINT8 uAmpduMaxLeng, TI_UINT8 uAmpduMinSpac, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgSetFwHtInformation  (TI_HANDLE hCmdBld, TI_UINT8 uRifsMode,TI_UINT8 uHtProtection, TI_UINT8 uGfProtection, TI_UINT8 uHtTxBurstLimit, TI_UINT8 uDualCtsProtection, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgCoexActivity        (TI_HANDLE hCmdBld, TCoexActivity *pCoexActivity, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgBurstMode 			(TI_HANDLE hCmdBld, TI_BOOL bEnabled, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgFmCoex              (TI_HANDLE hCmdBld, TFmCoexParams *pFmCoexParams, void *fCb, TI_HANDLE hCb);
-
-/* Interrogate */
-TI_STATUS cmdBld_ItrRSSI                    (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb);
-TI_STATUS cmdBld_ItrErrorCnt                (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb);
-TI_STATUS cmdBld_ItrRoamimgStatisitics      (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb);
-TI_STATUS cmdBld_ItrSg                      (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb);
-TI_STATUS cmdBld_ItrMemoryMap               (TI_HANDLE hCmdBld, MemoryMap_t *pMap, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_ItrStatistics              (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb);
-TI_STATUS cmdBld_ItrDataFilterStatistics    (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb);
-TI_STATUS cmdBld_ItrPowerConsumptionstat    (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void* pCb);
-TI_STATUS cmdBld_ItrRateParams              (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void* pCb);
-
-
-/* Get */
-TI_STATUS cmdBld_GetGroupAddressTable       (TI_HANDLE hCmdBld, TI_UINT8* pEnabled, TI_UINT8* pNumGroupAddrs, TMacAddr *pGroupAddr);
-TI_UINT8  cmdBld_GetDtimCount               (TI_HANDLE hCmdBld);
-TI_UINT16 cmdBld_GetBeaconInterval          (TI_HANDLE hCmdBld);
-TFwInfo * cmdBld_GetFWInfo                  (TI_HANDLE hCmdBld);
-TI_STATUS cmdBld_GetRxFilters               (TI_HANDLE hCmdBld, TI_UINT32 *pRxConfigOption, TI_UINT32 *pRxFilterOption);
-TI_UINT8  cmdBld_GetBssType                 (TI_HANDLE hCmdBld); 
-TI_UINT32 cmdBld_GetAckPolicy               (TI_HANDLE hCmdBld, TI_UINT32 uQueueId); 
-TI_STATUS cmdBld_GetPltRxCalibrationStatus  ( TI_HANDLE hCmdBld, TI_STATUS *pLastStatus );
-
-/* Set */
-TI_STATUS cmdBld_SetRadioBand           (TI_HANDLE hCmdBld, ERadioBand eRadioBand);
-TI_STATUS cmdBld_SetRxFilter            (TI_HANDLE hCmdBld, TI_UINT32 uRxConfigOption, TI_UINT32 uRxFilterOption);
-TI_STATUS cmdBld_SetSecuritySeqNum      (TI_HANDLE hCmdBld, TI_UINT8 securitySeqNumLsByte);
-TI_STATUS cmdBld_CfgRateMngDbg 			(TI_HANDLE hCmdBld, RateMangeParams_t *pRateMngParams ,void *fCb, TI_HANDLE  hCb);
-
-
-/* this is a solution for the EMP project Enable/Disable Rx Data*/
-TI_STATUS cmdBld_SetDownlinkData  (TI_HANDLE hCmdBld, TI_BOOL bDownlinkFlag);
-
-
-#ifdef TI_DBG
-void cmdBld_DbgForceTemplatesRates (TI_HANDLE hCmdBld, TI_UINT32 uRateMask);
-#endif
-
-
-typedef struct
-{
-    TI_UINT32                  uNumOfStations;
-    ECipherSuite               eSecurityMode;
-    EKeyType                   eCurTxKeyType;  /* Key type of current configured unicast key */ 
-
-} TSecurity;
-
-
-typedef struct 
-{
-    TI_HANDLE                  hOs;
-    TI_HANDLE                  hReport;
-    TI_HANDLE                  hCmdQueue;
-    TI_HANDLE                  hEventMbox;
-    TI_HANDLE                  hTwIf;
-
-    TCmdBldDb                  tDb;
-    TSecurity                  tSecurity;
-    MemoryMap_t                tMemMap;
-    TI_UINT16                  uSecuritySeqNumLow;
-    TI_UINT32                  uSecuritySeqNumHigh;
-
-    void                       *fFinalizeDownload;
-    TI_HANDLE                  hFinalizeDownload;
-
-    void                       *fConfigFwCb;
-    TI_HANDLE                  hConfigFwCb;
-
-    void                       *fJoinCmpltOriginalCbFunc;
-    TI_HANDLE                  hJoinCmpltOriginalCbHndl;
-
-    TI_UINT32                  uIniSeq;         /* Init sequence counter */
-    TI_BOOL                    bReconfigInProgress;
-
-    TI_UINT32                  uLastElpCtrlMode;/* Init sleep mode */
-
-#ifdef TI_DBG
-    TI_UINT32                  uDbgTemplatesRateMask;
-#endif
-
-} TCmdBld;
-
-
-/* 
- * Define the number of keys allocated on reconfigure 
- * data structure for each station
- */
-#define NO_OF_RECONF_SECUR_KEYS_PER_STATION     1 
-#define NO_OF_EXTRA_RECONF_SECUR_KEYS           3 
-
-
-#define DB_QUEUES(HCMDBLD) (((TCmdBld *)HCMDBLD)->tDb.queues)
-#define DB_AC(HCMDBLD)     (((TCmdBld *)HCMDBLD)->tDb.ac)
-#define DB_PS_STREAM(HCMDBLD) (((TCmdBld *)HCMDBLD)->tDb.psStream)
-#define DB_WLAN(HCMDBLD)   (((TCmdBld *)HCMDBLD)->tDb.wlan)
-#define DB_DMA(HCMDBLD)    (((TCmdBld *)HCMDBLD)->tDb.dma)
-#define DB_BSS(HCMDBLD)    (((TCmdBld *)HCMDBLD)->tDb.bss)
-#define DB_HW(HCMDBLD)     (((TCmdBld *)HCMDBLD)->tDb.hw)
-#define DB_CNT(HCMDBLD)    (((TCmdBld *)HCMDBLD)->tDb.counters)
-#define DB_TEMP(HCMDBLD)   (((TCmdBld *)HCMDBLD)->tDb.templateList)
-#define DB_KLV(HCMDBLD)    (((TCmdBld *)HCMDBLD)->tDb.klvList)
-#define DB_KEYS(HCMDBLD)            (((TCmdBld *)HCMDBLD)->tDb.keys)
-#define DB_RX_DATA_FLTR(HCMDBLD)    (((TCmdBld *)HCMDBLD)->tDb.rxDataFilters)
-#define DB_RADIO(HCMDBLD)    (((TCmdBld *)HCMDBLD)->tDb.tRadioIniParams)
-#define DB_EXT_RADIO(HCMDBLD)		(((TCmdBld *)HCMDBLD)->tDb.tExtRadioIniParams)
-#define DB_GEN(HCMDBLD)    (((TCmdBld *)HCMDBLD)->tDb.tPlatformGenParams)
-#define DB_RM(HCMDBLD)    (((TCmdBld *)HCMDBLD)->tDb.tRateMngParams)
-
-
-#define DB_DEFAULT_CHANNEL(HCMDBLD)                     \
-    (RADIO_BAND_5_0_GHZ == DB_WLAN(HCMDBLD).RadioBand)  \
-        ? DB_WLAN(HCMDBLD).calibrationChannel5_0        \
-        : DB_WLAN(HCMDBLD).calibrationChannel2_4
-
-#endif
-
diff --git a/wl1271/TWD/Ctrl/CmdBldCfg.c b/wl1271/TWD/Ctrl/CmdBldCfg.c
deleted file mode 100644
index 3411cdf..0000000
--- a/wl1271/TWD/Ctrl/CmdBldCfg.c
+++ /dev/null
@@ -1,1325 +0,0 @@
-/*
- * CmdBldCfg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  CmdBldCfg.c 
- *  \brief Command builder. Configuration commands
- *
- *  \see   CmdBld.h 
- */
-#define __FILE_ID__  FILE_ID_91
-#include "osApi.h"
-#include "tidef.h"
-#include "report.h"
-#include "CmdBld.h"
-#include "CmdBldCfgIE.h"
-#include "TWDriverInternal.h"
-
-
-/****************************************************************************
- *                      cmdBld_CfgRx()
- ****************************************************************************
- * DESCRIPTION: Sets the filters according to the given configuration. 
- * 
- * INPUTS:  RxConfigOption  - The given Rx filters configuration
- *          RxFilterOption  - The given Rx filters options
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgRx (TI_HANDLE hCmdBld, TI_UINT32 uRxConfigOption, TI_UINT32 uRxFilterOption, void *fCb, TI_HANDLE hCb)
-{
-    DB_WLAN(hCmdBld).RxConfigOption = uRxConfigOption;
-    DB_WLAN(hCmdBld).RxFilterOption = uRxFilterOption;
-    DB_WLAN(hCmdBld).RxConfigOption |= RX_CFG_ENABLE_PHY_HEADER_PLCP;
-  #if defined (TNETW_MASTER_MODE) || defined (TNETW_USB_MODE)
-    DB_WLAN(hCmdBld).RxConfigOption |= RX_CFG_COPY_RX_STATUS;
-  #endif    
-
-    if (DB_WLAN(hCmdBld).RxDisableBroadcast)
-    {
-        DB_WLAN(hCmdBld).RxConfigOption |= RX_CFG_DISABLE_BCAST;
-    }
-
-    return cmdBld_CfgIeRx (hCmdBld,
-                           DB_WLAN(hCmdBld).RxConfigOption,
-                           DB_WLAN(hCmdBld).RxFilterOption,
-                           fCb,
-                           hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgArpIpAddrTable()
- ****************************************************************************
- * DESCRIPTION: Sets the ARP IP table according to the given configuration. 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgArpIpAddrTable (TI_HANDLE hCmdBld, TIpAddr tIpAddr, TI_UINT8 bEnabled, EIpVer eIpVer, void *fCb, TI_HANDLE hCb)
-{
-    DB_WLAN(hCmdBld).arp_IP_ver = eIpVer;
-
-    /* no support for IPV6 */
-    if (eIpVer == IP_VER_4) 
-    {
-        IP_COPY (DB_WLAN(hCmdBld).arp_IP_addr, tIpAddr);
-    }
-
-    DB_WLAN(hCmdBld).arpFilterType = (EArpFilterType)bEnabled;
-
-    /* Set the new ip with the current state (e/d) */
-    return cmdBld_CfgIeArpIpFilter (hCmdBld, tIpAddr, (EArpFilterType)bEnabled, fCb, hCb);
-}
-
- /****************************************************************************
- *                      cmdBld_CfgArpIpFilter()
- ****************************************************************************
- * DESCRIPTION: Enable\Disable the ARP filter 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgArpIpFilter (TI_HANDLE hCmdBld, TIpAddr tIpAddr, void *fCb, TI_HANDLE hCb) 
-{
-    /* no support for IPV6 */
-    IP_COPY (DB_WLAN(hCmdBld).arp_IP_addr, tIpAddr);
-
-    return cmdBld_CfgIeArpIpFilter (hCmdBld, 
-                                    tIpAddr,
-                                    DB_WLAN(hCmdBld).arpFilterType,
-                                    fCb,
-                                    hCb);
-}
-/****************************************************************************
- *                      cmdBld_CfgGroupAddressTable()
- ****************************************************************************
- * DESCRIPTION: Sets the Group table according to the given configuration. 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgGroupAddressTable (TI_HANDLE        hCmdBld,
-                                       TI_UINT8         uNumGroupAddr, 
-                                       TMacAddr         *pGroupAddr,
-                                       TI_BOOL          bEnabled, 
-                                       void             *fCb, 
-                                       TI_HANDLE        hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT32    i;
-
-    if (uNumGroupAddr > MAX_MULTICAST_GROUP_ADDRS) 
-    {
-        TRACE1(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "cmdBld_CfgGroupAddressTable: numGroupAddrs=%d\n", uNumGroupAddr);
-        return PARAM_VALUE_NOT_VALID;
-    }
-
-    if (NULL == pGroupAddr)
-    {
-        TRACE2(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "cmdBld_CfgGroupAddressTable: numGroupAddrs=%d Group_addr=0x%x  !!!\n", uNumGroupAddr, pGroupAddr);
-        return PARAM_VALUE_NOT_VALID;
-    }
-
-    /* Keeps the parameters in the db */
-    DB_WLAN(hCmdBld).numGroupAddrs = uNumGroupAddr;
-    DB_WLAN(hCmdBld).isMacAddrFilteringnabled = bEnabled;
-
-    for (i = 0; i < uNumGroupAddr; i++) 
-    {
-        MAC_COPY (DB_WLAN(hCmdBld).aGroupAddr[i], *(pGroupAddr + i));
-    }
-
-    return cmdBld_CfgIeGroupAdressTable (hCmdBld, uNumGroupAddr, pGroupAddr, bEnabled, fCb, hCb);  
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgRtsThreshold()
- ****************************************************************************
- * DESCRIPTION: Sets the Rts Threshold. 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK  pWlanParams->RtsThreshold
- ****************************************************************************/
-TI_STATUS cmdBld_CfgRtsThreshold (TI_HANDLE hCmdBld, TI_UINT16 threshold, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CfgIeRtsThreshold (hCmdBld, threshold, fCb, hCb);
-}
-
-/****************************************************************************
- *                      cmdBld_CfgDcoItrimParams()
- ****************************************************************************
- * DESCRIPTION: Sets the DCO Itrim parameters. 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK 
- ****************************************************************************/
-TI_STATUS cmdBld_CfgDcoItrimParams (TI_HANDLE hCmdBld, TI_BOOL enable, TI_UINT32 moderationTimeoutUsec, void *fCb, TI_HANDLE hCb)
-{
-    /* Keeps the parameters in the db */
-    DB_WLAN(hCmdBld).dcoItrimEnabled = enable;
-    DB_WLAN(hCmdBld).dcoItrimModerationTimeoutUsec = moderationTimeoutUsec;
-
-    return cmdBld_CfgIeDcoItrimParams (hCmdBld, enable, moderationTimeoutUsec, fCb, hCb);
-}
-
-/****************************************************************************
- *                      cmdBld_CfgFragmentThreshold()
- ****************************************************************************
- * DESCRIPTION: Sets the tx fragmentation Threshold. 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK 
- ****************************************************************************/
-TI_STATUS cmdBld_CfgFragmentThreshold (TI_HANDLE hCmdBld, TI_UINT16 uFragmentThreshold, void *fCb, TI_HANDLE hCb)
-{
-    DB_WLAN(hCmdBld).FragmentThreshold = uFragmentThreshold;  
-
-    return cmdBld_CfgIeFragmentThreshold (hCmdBld, uFragmentThreshold, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgPreamble()
- ****************************************************************************
- * DESCRIPTION: Set the preamble in ?????? hardware register
- *
- * INPUTS:  
- *      preambleVal     
- * 
- * OUTPUT:  None
- * 
- * RETURNS: None
- ****************************************************************************/
-TI_STATUS cmdBld_CfgPreamble (TI_HANDLE hCmdBld, Preamble_e ePreamble, void *fCb, TI_HANDLE hCb)
-{
-    DB_WLAN(hCmdBld).preamble = ePreamble;      
-
-    return cmdBld_CfgIePreamble (hCmdBld, (TI_UINT8)ePreamble, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgBcnBrcOptions()
- ****************************************************************************
- * DESCRIPTION: Configure the wlan hardware
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgBcnBrcOptions (TI_HANDLE hCmdBld, TPowerMgmtConfig *pPMConfig, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CfgIeBcnBrcOptions (hCmdBld, pPMConfig, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgWakeUpCondition()
- ****************************************************************************
- * DESCRIPTION: Configure the wlan hardware
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgWakeUpCondition (TI_HANDLE hCmdBld, TPowerMgmtConfig *pPMConfig, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CfgIeWakeUpCondition (hCmdBld, pPMConfig, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgSleepAuth ()
- ****************************************************************************
- * DESCRIPTION: Set the min power level
- * 
- * INPUTS: 
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgSleepAuth (TI_HANDLE hCmdBld, EPowerPolicy eMinPowerLevel, void *fCb, TI_HANDLE hCb)
-{
-    /* Save th parameter in database */
-    DB_WLAN(hCmdBld).minPowerLevel = eMinPowerLevel;
-
-    return cmdBld_CfgIeSleepAuth (hCmdBld, eMinPowerLevel, fCb, hCb);
-}
-
-
-typedef enum { HW_CLOCK_40_MHZ = 40, HW_CLOCK_80_MHZ = 80 } EHwClock;
-
-
-/****************************************************************************
- *                      cmdBld_CfgArmClock()
- ****************************************************************************
- * DESCRIPTION: Configure the arm clock
- *  !!! Note that the firmware will set the slot time according to the new clock
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgArmClock (TI_HANDLE hCmdBld, TI_UINT32 uArmClock, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TWlanParams *pWlanParams = &DB_WLAN(hCmdBld);
-
-    pWlanParams->ArmClock = uArmClock;
-
-    /* Illegal combination Mac=80, Arm=40 ==> force setting 40/40*/
-    if (pWlanParams->MacClock == HW_CLOCK_80_MHZ && pWlanParams->ArmClock == HW_CLOCK_40_MHZ)
-    {
-        TRACE0(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "cmdBld_ArmClockSet: Illegal combination Mac=80, Arm=40 ==> force setting 40/40\n");
-        pWlanParams->MacClock = HW_CLOCK_40_MHZ;
-    }
-
-    return cmdBld_CfgIeFeatureConfig (hCmdBld, 
-                                      pWlanParams->FeatureOptions, 
-                                      pWlanParams->FeatureDataFlowOptions,
-                                      fCb, 
-                                      hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgMacClock()
- ****************************************************************************
- * DESCRIPTION: Configure the mac clock
- *  !!! Note that the firmware will set the slot time according to the new clock
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgMacClock (TI_HANDLE hCmdBld, TI_UINT32 uMacClock, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TWlanParams *pWlanParams = &DB_WLAN(hCmdBld);
-
-    pWlanParams->MacClock = uMacClock;
-
-    /* Force same clock - for printing */
-    pWlanParams->ArmClock = uMacClock;
-
-    /* Illegal combination Mac=80, Arm=40 ==> force setting 40/40*/
-    if (pWlanParams->MacClock == HW_CLOCK_80_MHZ && pWlanParams->ArmClock == HW_CLOCK_40_MHZ)
-    {
-        TRACE0(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "cmdBld_MacClockSet: Illegal combination Mac=80, Arm=40 ==> force setting 40/40\n");
-        pWlanParams->MacClock = HW_CLOCK_40_MHZ;
-    }
-
-    return cmdBld_CfgIeFeatureConfig (hCmdBld, 
-                                      pWlanParams->FeatureOptions, 
-                                      pWlanParams->FeatureDataFlowOptions, 
-                                      fCb, 
-                                      hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgAid()
- ****************************************************************************
- * DESCRIPTION: Set the AID
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgAid (TI_HANDLE hCmdBld, TI_UINT16 uAidVal, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CfgIeAid (hCmdBld, uAidVal, fCb, hCb);
-}
-
-TI_STATUS cmdBld_CfgClkRun (TI_HANDLE hCmdBld, TI_BOOL aClkRunEnable, void *fCb, TI_HANDLE hCb)
-{
-    TWlanParams *pWlanParams = &DB_WLAN(hCmdBld);
-
-    if (aClkRunEnable)
-    {
-        pWlanParams->FeatureDataFlowOptions |= FEAT_PCI_CLK_RUN_ENABLE;
-    }
-    else
-    {
-        pWlanParams->FeatureDataFlowOptions &= ~FEAT_PCI_CLK_RUN_ENABLE;
-    }
-
-    return cmdBld_CfgIeFeatureConfig (hCmdBld, 
-                                      pWlanParams->FeatureOptions, 
-                                      pWlanParams->FeatureDataFlowOptions, 
-                                      fCb, 
-                                      hCb);
-}
-
-
-TI_STATUS cmdBld_CfgRxMsduFormat (TI_HANDLE hCmdBld, TI_BOOL bRxMsduForamtEnable, void *fCb, TI_HANDLE hCb)
-{
-#if 1
-    /* WARNING:  Have to check how to control the Rx Frame format select (which bit)
-                 and then access the HW*/
-    return TI_OK;
-#else
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TWlanParams *pWlanParams = &DB_WLAN(hCmdBld);
-
-    if (aRxMsduForamtEnable)
-    {
-        pWlanParams->FeatureDataFlowOptions |= DATA_FLOW_RX_MSDU_FRAME;
-    }
-    else
-    {
-        pWlanParams->FeatureDataFlowOptions &= ~DATA_FLOW_RX_MSDU_FRAME;
-    }
-
-    return cmdBld_CfgIeFeatureConfig (hCmdBld, 
-                                      pWlanParams->FeatureOptions, 
-                                      pWlanParams->FeatureDataFlowOptions, 
-                                      fCb, 
-                                      hCb);
-#endif
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgTid()
- ****************************************************************************
- * DESCRIPTION: configure Queue traffic params
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgTid (TI_HANDLE hCmdBld, TQueueTrafficParams *pQtrafficParams, void *fCb, TI_HANDLE hCb)
-{
-    DB_QUEUES(hCmdBld).isQueueConfigured[pQtrafficParams->queueID] = TI_TRUE;
-    DB_QUEUES(hCmdBld).queues[pQtrafficParams->queueID] = *pQtrafficParams;
-
-    return cmdBld_CfgIeTid (hCmdBld, pQtrafficParams, fCb, hCb);  
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgAcParams()
- ****************************************************************************
- * DESCRIPTION: configure AC params
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgAcParams (TI_HANDLE hCmdBld, TAcQosParams *pAcQosParams, void *fCb, TI_HANDLE hCb)
-{
-    DB_AC(hCmdBld).isAcConfigured[pAcQosParams->ac] = TI_TRUE;
-    DB_AC(hCmdBld).ac[pAcQosParams->ac] = *pAcQosParams;
-
-    return cmdBld_CfgIeAcParams (hCmdBld, pAcQosParams, fCb, hCb);  
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgPsRxStreaming()
- ****************************************************************************
- * DESCRIPTION: configure PS-Rx-Streaming params
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgPsRxStreaming (TI_HANDLE hCmdBld, TPsRxStreaming *pPsRxStreaming, void *fCb, TI_HANDLE hCb)
-{
-    DB_PS_STREAM(hCmdBld).tid[pPsRxStreaming->uTid] = *pPsRxStreaming;
-
-    return cmdBld_CfgIePsRxStreaming (hCmdBld, pPsRxStreaming, fCb, hCb);  
-}
-
-
-/****************************************************************************
- *                     cmdBld_CfgPacketDetectionThreshold
- ****************************************************************************
- * DESCRIPTION: Sets Packet Detection Threshold 
- * 
- * INPUTS:  None    
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgPacketDetectionThreshold (TI_HANDLE hCmdBld, TI_UINT32 threshold, void *fCb, TI_HANDLE hCb)
-{
-    DB_WLAN(hCmdBld).PacketDetectionThreshold = threshold;
-
-    return cmdBld_CfgIePacketDetectionThreshold (hCmdBld, threshold, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                     cmdBld_CfgBeaconFilterOpt
- ****************************************************************************
- * DESCRIPTION: Sets Beacon filtering state 
- * 
- * INPUTS:  None    
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgBeaconFilterOpt (TI_HANDLE  hCmdBld, 
-                                     TI_UINT8   uBeaconFilteringStatus, 
-                                     TI_UINT8   uNumOfBeaconsToBuffer, 
-                                     void       *fCb, 
-                                     TI_HANDLE  hCb)
-{
-    DB_WLAN(hCmdBld).beaconFilterParams.desiredState = uBeaconFilteringStatus;
-    DB_WLAN(hCmdBld).beaconFilterParams.numOfElements = uNumOfBeaconsToBuffer;
-
-    return cmdBld_CfgIeBeaconFilterOpt (hCmdBld,
-                                        uBeaconFilteringStatus,
-                                        uNumOfBeaconsToBuffer,
-                                        fCb,
-                                        hCb);
-}
-
-/****************************************************************************
- *                     cmdBld_CfgRateMngDbg
- ****************************************************************************
- * DESCRIPTION: Sets rate managment params
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-
-TI_STATUS cmdBld_CfgRateMngDbg (TI_HANDLE  hCmdBld,
-                                RateMangeParams_t *pRateMngParams ,
-                                void       *fCb,
-                                TI_HANDLE  hCb)
-{
-
-	TRateMngParams      *pRateMngParamsDB = &DB_RM(hCmdBld);
-	int uIndex;
-
-	pRateMngParamsDB->rateMngParams.paramIndex = pRateMngParams->paramIndex;
-
-	 switch (pRateMngParams->paramIndex)
-		{
-		case RATE_MGMT_RETRY_SCORE_PARAM:
-			pRateMngParamsDB->rateMngParams.RateRetryScore = pRateMngParams->RateRetryScore;
-			break;
-		case RATE_MGMT_PER_ADD_PARAM:
-			pRateMngParamsDB->rateMngParams.PerAdd = pRateMngParams->PerAdd;
-			break;
-		case RATE_MGMT_PER_TH1_PARAM:
-			pRateMngParamsDB->rateMngParams.PerTh1 = pRateMngParams->PerTh1;
-			break;
-		case RATE_MGMT_PER_TH2_PARAM:
-			pRateMngParamsDB->rateMngParams.PerTh2 = pRateMngParams->PerTh2;
-			break;
-		case RATE_MGMT_MAX_PER_PARAM:
-			pRateMngParamsDB->rateMngParams.MaxPer = pRateMngParams->MaxPer;
-			break;
-		case RATE_MGMT_INVERSE_CURIOSITY_FACTOR_PARAM:
-			pRateMngParamsDB->rateMngParams.InverseCuriosityFactor = pRateMngParams->InverseCuriosityFactor;
-			break;
-		case RATE_MGMT_TX_FAIL_LOW_TH_PARAM:
-			pRateMngParamsDB->rateMngParams.TxFailLowTh = pRateMngParams->TxFailLowTh;
-			break;
-		case RATE_MGMT_TX_FAIL_HIGH_TH_PARAM:
-			pRateMngParamsDB->rateMngParams.TxFailHighTh = pRateMngParams->TxFailHighTh;
-			break;
-		case RATE_MGMT_PER_ALPHA_SHIFT_PARAM:
-			pRateMngParamsDB->rateMngParams.PerAlphaShift = pRateMngParams->PerAlphaShift;
-			break;
-		case RATE_MGMT_PER_ADD_SHIFT_PARAM:
-			pRateMngParamsDB->rateMngParams.PerAddShift = pRateMngParams->PerAddShift;
-			break;
-		case RATE_MGMT_PER_BETA1_SHIFT_PARAM:
-			pRateMngParamsDB->rateMngParams.PerBeta1Shift = pRateMngParams->PerBeta1Shift;
-			break;
-		case RATE_MGMT_PER_BETA2_SHIFT_PARAM:
-			pRateMngParamsDB->rateMngParams.PerBeta2Shift = pRateMngParams->PerBeta2Shift;
-			break;
-		case RATE_MGMT_RATE_CHECK_UP_PARAM:
-			pRateMngParamsDB->rateMngParams.RateCheckUp = pRateMngParams->RateCheckUp;
-			break;
-		case RATE_MGMT_RATE_CHECK_DOWN_PARAM:
-			pRateMngParamsDB->rateMngParams.RateCheckDown = pRateMngParams->RateCheckDown;
-			break;
-	    case RATE_MGMT_RATE_RETRY_POLICY_PARAM:
-			for (uIndex = 0; uIndex < 13; uIndex++)
-				{
-					pRateMngParamsDB->rateMngParams.RateRetryPolicy[uIndex] = pRateMngParams->RateRetryPolicy[uIndex];
-				}
-			break;
-	 }
-
-
-    return cmdBld_CfgIeRateMngDbg (hCmdBld,
-                                   pRateMngParams,
-                                   fCb,
-                                   hCb);
-
-}
-
-
-/****************************************************************************
- *                     cmdBld_CfgBeaconFilterTable
- ****************************************************************************
- * DESCRIPTION: Sets Beacon filtering state 
- * 
- * INPUTS:  None    
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgBeaconFilterTable (TI_HANDLE    hCmdBld, 
-                                       TI_UINT8     uNumberOfIEs, 
-                                       TI_UINT8     *pIETable, 
-                                       TI_UINT8     uIETableSize, 
-                                       void         *fCb, 
-                                       TI_HANDLE    hCb)
-{
-    TCmdBld   *pCmdBld = (TCmdBld *)hCmdBld;
-
-    if (uIETableSize > BEACON_FILTER_TABLE_MAX_SIZE)
-    {
-        TRACE2(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "cmdBld_CfgBeaconFilterTable: Table size is too big %d (>%d)\n", uIETableSize, BEACON_FILTER_TABLE_MAX_SIZE);
-
-        return PARAM_VALUE_NOT_VALID;
-    }
-
-    os_memoryZero (pCmdBld->hOs, 
-                   (void *)DB_WLAN(hCmdBld).beaconFilterIETable.IETable, 
-                   BEACON_FILTER_TABLE_MAX_SIZE);
-    os_memoryCopy (pCmdBld->hOs, 
-                   (void *)DB_WLAN(hCmdBld).beaconFilterIETable.IETable, 
-                   (void *)pIETable, 
-                   uIETableSize);
-    DB_WLAN(hCmdBld).beaconFilterIETable.numberOfIEs = uNumberOfIEs;
-    DB_WLAN(hCmdBld).beaconFilterIETable.IETableSize = uIETableSize;
-
-    return cmdBld_CfgIeBeaconFilterTable (hCmdBld, uNumberOfIEs, pIETable, uIETableSize, fCb, hCb);
-}
-
- 
-/*----------------------------------------*/
-/* Roaming Trigger Configuration Commands */
-/*----------------------------------------*/
-
-/****************************************************************************
- *                      cmdBld_CfgRssiSnrTrigger()
- ****************************************************************************
- * DESCRIPTION: Set the RSSI/SNR Trigger parameters.
- *
- * INPUTS:  
- *
- * OUTPUT:  None
- *
- * RETURNS: None
- ****************************************************************************/
-TI_STATUS cmdBld_CfgRssiSnrTrigger (TI_HANDLE hCmdBld, RssiSnrTriggerCfg_t *pTriggerParam, void *fCb, TI_HANDLE hCb) 
-{
-    DB_WLAN(hCmdBld).tRssiSnrTrigger[pTriggerParam->index].index     = pTriggerParam->index;
-    DB_WLAN(hCmdBld).tRssiSnrTrigger[pTriggerParam->index].threshold = pTriggerParam->threshold;
-    DB_WLAN(hCmdBld).tRssiSnrTrigger[pTriggerParam->index].pacing    = pTriggerParam->pacing;
-    DB_WLAN(hCmdBld).tRssiSnrTrigger[pTriggerParam->index].metric    = pTriggerParam->metric;
-    DB_WLAN(hCmdBld).tRssiSnrTrigger[pTriggerParam->index].type      = pTriggerParam->type;
-    DB_WLAN(hCmdBld).tRssiSnrTrigger[pTriggerParam->index].direction = pTriggerParam->direction;
-    DB_WLAN(hCmdBld).tRssiSnrTrigger[pTriggerParam->index].hystersis = pTriggerParam->hystersis;
-    DB_WLAN(hCmdBld).tRssiSnrTrigger[pTriggerParam->index].enable    = pTriggerParam->enable;
-
-    return cmdBld_CfgIeRssiSnrTrigger (hCmdBld, pTriggerParam, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgRssiSnrWeights()
- ****************************************************************************
- * DESCRIPTION: Set RSSI/SNR Weights for Average calculations.
- *
- * INPUTS:  
- *
- * OUTPUT:  None
- *
- * RETURNS: None
- ****************************************************************************/
-TI_STATUS cmdBld_CfgRssiSnrWeights (TI_HANDLE hCmdBld, RssiSnrAverageWeights_t *pWeightsParam, void *fCb, TI_HANDLE hCb) 
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "\n cmdBld_CfgRssiSnrWeights :\n                             uRssiBeaconAverageWeight = %d\n                             uRssiPacketAverageWeight = %d\n                             uSnrBeaconAverageWeight  = %d\n                             uSnrPacketAverageWeight = %d \n ", pWeightsParam->rssiBeaconAverageWeight, pWeightsParam->rssiPacketAverageWeight, pWeightsParam->snrBeaconAverageWeight , pWeightsParam->snrPacketAverageWeight  );
-
-    DB_WLAN(hCmdBld).tRssiSnrWeights.rssiBeaconAverageWeight = pWeightsParam->rssiBeaconAverageWeight;
-    DB_WLAN(hCmdBld).tRssiSnrWeights.rssiPacketAverageWeight = pWeightsParam->rssiPacketAverageWeight;
-    DB_WLAN(hCmdBld).tRssiSnrWeights.snrBeaconAverageWeight  = pWeightsParam->snrBeaconAverageWeight ;
-    DB_WLAN(hCmdBld).tRssiSnrWeights.snrPacketAverageWeight  = pWeightsParam->snrPacketAverageWeight ;
-
-    return cmdBld_CfgIeRssiSnrWeights (hCmdBld, pWeightsParam, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgMaxTxRetry()
- ****************************************************************************
- * DESCRIPTION: Set Max Tx retry parmaters.
- *
- * INPUTS:  
- *      maxTxRetry             max Tx Retry
- *
- * OUTPUT:  None
- *
- * RETURNS: None
- ****************************************************************************/
-TI_STATUS cmdBld_CfgMaxTxRetry (TI_HANDLE hCmdBld, TRroamingTriggerParams *pRoamingTriggerCmd, void *fCb, TI_HANDLE hCb)
-{
-    DB_WLAN(hCmdBld).roamTriggers.maxTxRetry = pRoamingTriggerCmd->maxTxRetry;
-
-    return cmdBld_CfgIeMaxTxRetry (hCmdBld, pRoamingTriggerCmd, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgSgEnable()
- ****************************************************************************
- * DESCRIPTION: Save Soft Gemini enable parameter
- *
- * INPUTS:
- *
- * OUTPUT:
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgSgEnable (TI_HANDLE hCmdBld, ESoftGeminiEnableModes eSgEnable, void *fCb, TI_HANDLE hCb)
-{
-    DB_WLAN(hCmdBld).SoftGeminiEnable = eSgEnable;
-                    
-    return cmdBld_CfgIeSgEnable (hCmdBld, eSgEnable, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgSg()
- ****************************************************************************
- * DESCRIPTION: Save Soft Gemini config parameter
- *
- * INPUTS:
- *
- * OUTPUT:
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgSg (TI_HANDLE hCmdBld, TSoftGeminiParams *pSgParam, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    /* Copy params for recovery */
-    os_memoryCopy (pCmdBld->hOs,
-                   (void*)&DB_WLAN(hCmdBld).SoftGeminiParams,
-                   (void*)pSgParam,
-                   sizeof(TSoftGeminiParams));
-                  
-    return cmdBld_CfgIeSg (hCmdBld, pSgParam, fCb, hCb);
-}
-
-/****************************************************************************
- *                      cmdBld_CfgCoexActivity()
- ****************************************************************************
- * DESCRIPTION: Sets the CoexActivity table. 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK  pWlanParams->RtsThreshold
- ****************************************************************************/
-TI_STATUS cmdBld_CfgCoexActivity (TI_HANDLE hCmdBld, TCoexActivity *pCoexActivity, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TWlanParams *pWlanParams = &DB_WLAN(hCmdBld);
-    TCoexActivity *pSaveCoex = &pWlanParams->tWlanParamsCoexActivityTable.entry[0];
-    int numOfElements = pWlanParams->tWlanParamsCoexActivityTable.numOfElements;
-    int i;
-    
-    /* Check if to overwrite existing entry or put on last index */
-    for (i=0; i<numOfElements; i++)
-    {
-        if ((pSaveCoex[i].activityId == pCoexActivity->activityId) && (pSaveCoex->coexIp == pCoexActivity->coexIp))
-        {
-            break;
-        }
-    }
-
-    TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "cmdBld_CfgCoexActivity: save Param %d in index %d, %d %d\n", 0, i, pCoexActivity->coexIp, pCoexActivity->activityId);
-    /* save in WlanParams for recovery */
-    pSaveCoex[i].coexIp          = pCoexActivity->coexIp;
-    pSaveCoex[i].activityId      = pCoexActivity->activityId;
-    pSaveCoex[i].defaultPriority = pCoexActivity->defaultPriority;
-    pSaveCoex[i].raisedPriority  = pCoexActivity->raisedPriority;
-    pSaveCoex[i].minService      = pCoexActivity->minService;
-    pSaveCoex[i].maxService      = pCoexActivity->maxService;
-
-    if (i == numOfElements)
-    {
-        /* no existing entry overwrite, increment number of elements */
-        pWlanParams->tWlanParamsCoexActivityTable.numOfElements++;
-    }
-
-    return cmdBld_CfgIeCoexActivity (hCmdBld, pCoexActivity, fCb, hCb);
-}
-
-/****************************************************************************
- *                      cmdBld_CfgFmCoex()
- ****************************************************************************
- * DESCRIPTION: Save and configure FM coexistence parameters
- *
- * INPUTS:
- *
- * OUTPUT:
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgFmCoex (TI_HANDLE hCmdBld, TFmCoexParams *pFmCoexParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    /* Copy params for recovery */
-    os_memoryCopy (pCmdBld->hOs,
-                   (void*)&(DB_WLAN(hCmdBld).tFmCoexParams),
-                   (void*)pFmCoexParams,
-                   sizeof(TFmCoexParams));
-
-    return cmdBld_CfgIeFmCoex (hCmdBld, pFmCoexParams, fCb, hCb);
-}
-
-/****************************************************************************
- *                      cmdBld_CfgTxRatePolicy()
- ****************************************************************************
- * DESCRIPTION: configure TxRatePolicy params
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgTxRatePolicy (TI_HANDLE hCmdBld, TTxRatePolicy *pTxRatePolicy, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld       *pCmdBld      = (TCmdBld *)hCmdBld;
-    TTxRateClass  *pTxRateClass = pTxRatePolicy->rateClass;
-    TI_UINT8       index;
-
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "_1, Num of classes = 0x%x\n", pTxRatePolicy->numOfRateClasses);
-
-    DB_BSS(hCmdBld).TxRateClassParams.numOfRateClasses = pTxRatePolicy->numOfRateClasses;
-
-    for (index = 0; index < pTxRatePolicy->numOfRateClasses; index++, pTxRateClass++)
-    {
-        TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "_2loop, Index = %d, Short R = 0x%x, Long R = 0x%x, Rates = 0x%x\n", index, pTxRateClass->shortRetryLimit, pTxRateClass->longRetryLimit, pTxRateClass->txEnabledRates);
-
-        DB_BSS(hCmdBld).TxRateClassParams.rateClass[index] = *pTxRateClass;
-    }
-
-    return cmdBld_CfgIeTxRatePolicy (hCmdBld, pTxRatePolicy, fCb, hCb);  
-}
-
-
-TI_STATUS cmdBld_CfgSlotTime (TI_HANDLE hCmdBld, ESlotTime eSlotTime, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    DB_WLAN(hCmdBld).SlotTime = eSlotTime;      
-
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_CfgSlotTime: Slot time = %d\n", eSlotTime);
-
-    /* Configure the new Slot-Time value to the FW. */
-    return cmdBld_CfgIeSlotTime (hCmdBld, (TI_UINT8)eSlotTime, fCb, hCb);
-}
-
-
-TI_STATUS cmdBld_CfgEventMask (TI_HANDLE hCmdBld, TI_UINT32 uEventMask, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CfgIeEventMask (hCmdBld, uEventMask, fCb, hCb);
-}
-
-
-/*
- * ----------------------------------------------------------------------------
- * Function : cmdBld_CfgHwEncEnable
- *
- * Input    : 
- * Output   :
- * Process  :
- * Note(s)  :
- * -----------------------------------------------------------------------------
- */
-TI_STATUS cmdBld_CfgHwEncEnable (TI_HANDLE hCmdBld, TI_BOOL bHwEncEnable, TI_BOOL bHwDecEnable, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld     *pCmdBld = (TCmdBld *)hCmdBld;
-    TWlanParams *pWlanParams = &DB_WLAN(hCmdBld);
-    
-    /* Store the HW encryption Enable flag for reconfigure time (FW reload)*/
-    DB_KEYS(pCmdBld).bReconfHwEncEnable = bHwEncEnable;
-    DB_KEYS(pCmdBld).bHwEncDecrEnableValid = TI_TRUE;
-
-    if (bHwEncEnable)
-    {
-        pWlanParams->FeatureDataFlowOptions &= ~DF_ENCRYPTION_DISABLE;
-    }
-    else
-    {
-        pWlanParams->FeatureDataFlowOptions |= DF_ENCRYPTION_DISABLE;
-    }
-
-    /* Set bit DF_SNIFF_MODE_ENABLE to enable or prevent decryption in fw */
-    /* WARNING: Have to check how to control the decryption (which bit) and then set/reset
-                the  appropriate bit*/ 
-    if (bHwDecEnable)
-    {
-        pWlanParams->FeatureDataFlowOptions &= ~DF_SNIFF_MODE_ENABLE;
-    }
-    else
-    {
-        pWlanParams->FeatureDataFlowOptions |= DF_SNIFF_MODE_ENABLE;
-    }
-
-    return cmdBld_CfgIeFeatureConfig (hCmdBld, 
-                                      pWlanParams->FeatureOptions, 
-                                      pWlanParams->FeatureDataFlowOptions, 
-                                      fCb, 
-                                      hCb);
-}
-
-
-TI_STATUS cmdBld_CfgHwEncDecEnable (TI_HANDLE hCmdBld, TI_BOOL bHwEncEnable, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CfgHwEncEnable (hCmdBld, bHwEncEnable, bHwEncEnable, fCb, hCb);
-}
-
-
-/*
- * ----------------------------------------------------------------------------
- * Function : cmdBld_CfgSecureMode
- *
- * Input    : 
- * Output   :
- * Process  :
- * Note(s)  :
- * -----------------------------------------------------------------------------
- */
-TI_STATUS cmdBld_CfgSecureMode (TI_HANDLE hCmdBld, ECipherSuite eSecurMode, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld  *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT32     index;
-
-    if (eSecurMode < TWD_CIPHER_MAX)
-    {
-        TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "cmdBld_CfgSecureMode: change tSecurity mode from %d --> %d\n", pCmdBld->tSecurity.eSecurityMode, eSecurMode);
-        /* check if tSecurity mode is equal to previous one*/
-        if (pCmdBld->tSecurity.eSecurityMode == eSecurMode)
-        {
-            return TI_OK;
-        }
-
-        /* Reset all reconfig valid fields*/
-        DB_KEYS(pCmdBld).bHwEncDecrEnableValid = TI_FALSE;
-        DB_KEYS(pCmdBld).bDefaultKeyIdValid = TI_FALSE;  
-        for (index = 0; 
-             index < pCmdBld->tSecurity.uNumOfStations * NO_OF_RECONF_SECUR_KEYS_PER_STATION + NO_OF_EXTRA_RECONF_SECUR_KEYS; 
-             index++)
-        {
-            (DB_KEYS(pCmdBld).pReconfKeys + index)->keyType = KEY_NULL;
-        }
-        
-        /* set the new tSecurity mode*/
-        pCmdBld->tSecurity.eSecurityMode = eSecurMode;
-
-        /* disable defrag, duplicate detection on TNETW+XCC on chip level*/
-        /* YV- to add fragmentation control (if there is- artur ?)*/
-        return cmdBld_CfgRxMsduFormat (hCmdBld, 
-                                       pCmdBld->tSecurity.eSecurityMode != TWD_CIPHER_CKIP,
-                                       fCb,
-                                       hCb);
-    }
-    else
-    {
-        return TI_NOK;
-    }
-}
-
-
-TI_STATUS cmdBld_CfgConnMonitParams (TI_HANDLE  hCmdBld, 
-                                     TRroamingTriggerParams *pRoamingTriggerCmd, 
-                                     void       *fCb, 
-                                     TI_HANDLE  hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "SetBssLossTsfThresholdParamsCmd :\n                             BssLossTimeout = %d\n                             TsfMissThreshold = %d \n ", pRoamingTriggerCmd->BssLossTimeout, pRoamingTriggerCmd->TsfMissThreshold);
-
-    DB_WLAN(hCmdBld).roamTriggers.BssLossTimeout = pRoamingTriggerCmd->BssLossTimeout;
-    DB_WLAN(hCmdBld).roamTriggers.TsfMissThreshold = pRoamingTriggerCmd->TsfMissThreshold;
-
-    return cmdBld_CfgIeConnMonitParams (hCmdBld, pRoamingTriggerCmd, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                 cmdBld_CfgEnableRxDataFilter()
- ****************************************************************************
- * DESCRIPTION: Enables or disables Rx data filtering.
- * 
- * INPUTS:  enabled             - 0 to disable data filtering, any other value to enable.
- *          defaultAction       - The default action to take on non-matching packets.
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgEnableRxDataFilter (TI_HANDLE   hCmdBld, 
-                                        TI_BOOL     bEnabled, 
-                                        filter_e    eDefaultAction, 
-                                        void        *fCb, 
-                                        TI_HANDLE   hCb)
-{
-    /* Save parameters for reconfig phase */
-    DB_RX_DATA_FLTR(hCmdBld).bEnabled       = bEnabled;
-    DB_RX_DATA_FLTR(hCmdBld).eDefaultAction = eDefaultAction;
-
-    return cmdBld_CfgIeEnableRxDataFilter (hCmdBld, bEnabled, eDefaultAction, fCb, hCb);
-}
-
-
-/****************************************************************************
-*                      cmdBld_CfgRxDataFilter()
-*****************************************************************************
-* DESCRIPTION: Add/remove Rx Data filter information element.
-*
-* INPUTS:  index               - Index of the Rx Data filter
-*          command             - Add or remove the filter
-*          action              - Action to take on packets matching the pattern
-*          numFieldPatterns    - Number of field patterns in the filter
-*          lenFieldPatterns    - Length of the field pattern series
-*          fieldPatterns       - Series of field patterns
-*
-* OUTPUT:  None
-*
-* RETURNS: TI_OK or TI_NOK
-****************************************************************************/
-TI_STATUS cmdBld_CfgRxDataFilter (TI_HANDLE hCmdBld, 
-                                  TI_UINT8     index, 
-                                  TI_UINT8     command, 
-                                  filter_e  eAction, 
-                                  TI_UINT8     uNumFieldPatterns, 
-                                  TI_UINT8     uLenFieldPatterns, 
-                                  TI_UINT8  *pFieldPatterns, 
-                                  void      *fCb, 
-                                  TI_HANDLE hCb)
-{
-    TCmdBld         *pCmdBld  = (TCmdBld *)hCmdBld;
-    TRxDataFilter   *pFilters = &(DB_RX_DATA_FLTR(hCmdBld).aRxDataFilter[index]);
-
-    /* Save parameters for reconfig phase */
-    pFilters->uIndex            = index;
-    pFilters->uCommand          = command;
-    pFilters->eAction           = eAction;
-    pFilters->uNumFieldPatterns = uNumFieldPatterns;
-    pFilters->uLenFieldPatterns = uLenFieldPatterns;
-    os_memoryCopy(pCmdBld->hOs, pFilters->aFieldPattern, pFieldPatterns, uLenFieldPatterns);
-
-    return cmdBld_CfgIeRxDataFilter (hCmdBld, 
-                                     index, 
-                                     command, 
-                                     eAction, 
-                                     uNumFieldPatterns, 
-                                     uLenFieldPatterns, 
-                                     pFieldPatterns, 
-                                     fCb, 
-                                     hCb);
-}
-
-
-TI_STATUS cmdBld_CfgCtsProtection (TI_HANDLE hCmdBld, TI_UINT8 uCtsProtection, void *fCb, TI_HANDLE hCb)
-    {
-        DB_WLAN(hCmdBld).CtsToSelf = uCtsProtection;
-
-    return cmdBld_CfgIeCtsProtection (hCmdBld, uCtsProtection, fCb, hCb);
-}
-
-
-TI_STATUS cmdBld_CfgServicePeriodTimeout (TI_HANDLE hCmdBld, TRxTimeOut *pRxTimeOut, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CfgIeServicePeriodTimeout (hCmdBld, pRxTimeOut, fCb, hCb);
-}
-
-
-TI_STATUS cmdBld_CfgRxMsduLifeTime (TI_HANDLE hCmdBld, TI_UINT32 uRxMsduLifeTime, void *fCb, TI_HANDLE hCb)
-    {
-        DB_WLAN(hCmdBld).MaxRxMsduLifetime = uRxMsduLifeTime;
-
-    return cmdBld_CfgIeRxMsduLifeTime (hCmdBld, uRxMsduLifeTime, fCb, hCb);
-}
-
-
-TI_STATUS cmdBld_CfgStatisitics (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CfgIeStatisitics (hCmdBld, fCb, hCb);
-}
-
-
-TI_STATUS cmdBld_CfgTxPowerDbm (TI_HANDLE hCmdBld, TI_UINT8 uTxPowerDbm, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CfgIeTxPowerDbm (hCmdBld, uTxPowerDbm, fCb, hCb);
-}
-
- /*
- * ----------------------------------------------------------------------------
- * Function : cmdBld_CfgBet
- *
- * Input    :   enabled               - 0 to disable BET, 0 to disable BET
- *              MaximumConsecutiveET  - Max number of consecutive beacons
- *                                      that may be early terminated.
- * Output   : TI_STATUS
- * Process  :  Configures Beacon Early Termination information element.
- * Note(s)  :  None
- * -----------------------------------------------------------------------------
- */
-TI_STATUS cmdBld_CfgBet (TI_HANDLE hCmdBld, TI_UINT8 Enable, TI_UINT8 MaximumConsecutiveET, void *fCb, TI_HANDLE hCb)
-{
-    DB_WLAN(hCmdBld).BetEnable              = Enable;
-    DB_WLAN(hCmdBld).MaximumConsecutiveET   = MaximumConsecutiveET;
-
-    return cmdBld_CfgIeBet (hCmdBld, Enable, MaximumConsecutiveET, fCb, hCb);
-}
-
-/****************************************************************************
- *                      cmdBld_CfgKeepAlive()
- ****************************************************************************
- * DESCRIPTION: Set keep-alive paramters for a single index
- * 
- * INPUTS: Paramters and CB
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgKeepAlive (TI_HANDLE hCmdBld, TKeepAliveParams *pKeepAliveParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld   *pCmdBld = (TCmdBld *)hCmdBld;
-
-    TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "CmdBld: Seeting keep-alive params, index=%d, interval=%d msec, trigType=%d, enaFlag=%d\n", pKeepAliveParams->index, pKeepAliveParams->interval, pKeepAliveParams->trigType, pKeepAliveParams->enaDisFlag);
-
-    os_memoryCopy (pCmdBld->hOs, 
-                   (void *)&DB_KLV(hCmdBld).keepAliveParams[ pKeepAliveParams->index ], 
-                   (void *)pKeepAliveParams, 
-                   sizeof (TKeepAliveParams));
-
-    return cmdBld_CmdIeConfigureKeepAliveParams (hCmdBld, 
-                                                 pKeepAliveParams->index,
-                                                 pKeepAliveParams->enaDisFlag,
-                                                 (TI_UINT8)pKeepAliveParams->trigType,
-                                                 pKeepAliveParams->interval,
-                                                 fCb,
-                                                 hCb);
-}
-
-/****************************************************************************
- *                      cmdBld_CfgKeepAliveEnaDis()
- ****************************************************************************
- * DESCRIPTION: Set global keep-alive enable / disable flag
- * 
- * INPUTS: Paramters and CB
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgKeepAliveEnaDis(TI_HANDLE hCmdBld, TI_UINT8 enaDisFlag, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld   *pCmdBld = (TCmdBld *)hCmdBld;
-
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "CmdBld: Seeting keep-alive Global ena / dis flag to %d\n", (TI_UINT32)enaDisFlag);
-
-    DB_KLV(hCmdBld).enaDisFlag = enaDisFlag;
-
-    return cmdBld_CmdIeConfigureKeepAliveEnaDis (hCmdBld, enaDisFlag, fCb, hCb);
-}
-
-/** 
- * \fn     cmdBld_CfgSetFwHtCapabilities 
- * \brief  set the current AP HT Capabilities to the FW. 
- *
- * \note    
- * \return TI_OK on success or TI_NOK on failure 
- * \sa 
- */ 
-TI_STATUS cmdBld_CfgSetFwHtCapabilities (TI_HANDLE hCmdBld,
-                                         TI_UINT32 uHtCapabilites,
-                                         TMacAddr  tMacAddress,
-                                         TI_UINT8  uAmpduMaxLeng,
-                                         TI_UINT8  uAmpduMinSpac,
-                                         void      *fCb, 
-                                         TI_HANDLE hCb)
-{
-
-    DB_BSS(hCmdBld).bHtCap = TI_TRUE;
-    DB_BSS(hCmdBld).uHtCapabilites = uHtCapabilites;
-    MAC_COPY ((DB_BSS(hCmdBld).tMacAddress), tMacAddress);
-    DB_BSS(hCmdBld).uAmpduMaxLeng = uAmpduMaxLeng;
-    DB_BSS(hCmdBld).uAmpduMinSpac = uAmpduMinSpac;
-
-    return cmdBld_CfgIeSetFwHtCapabilities (hCmdBld,
-                                            uHtCapabilites,
-                                            tMacAddress,
-                                            uAmpduMaxLeng,
-                                            uAmpduMinSpac,
-                                            fCb, 
-                                            hCb);
-}
-
-/** 
- * \fn     cmdBld_CfgSetFwHtInformation 
- * \brief  set the current AP HT Information to the FW. 
- *
- * \note    
- * \return TI_OK on success or TI_NOK on failure 
- * \sa 
- */ 
-TI_STATUS cmdBld_CfgSetFwHtInformation (TI_HANDLE hCmdBld,
-                                        TI_UINT8  uRifsMode,         
-                                        TI_UINT8  uHtProtection,     
-                                        TI_UINT8  uGfProtection,     
-                                        TI_UINT8  uHtTxBurstLimit,   
-                                        TI_UINT8  uDualCtsProtection,
-                                        void      *fCb, 
-                                        TI_HANDLE hCb)
-{
-
-    DB_BSS(hCmdBld).bHtInf = TI_TRUE;
-    DB_BSS(hCmdBld).uRifsMode = uRifsMode;
-    DB_BSS(hCmdBld).uHtProtection = uHtProtection;
-    DB_BSS(hCmdBld).uGfProtection = uGfProtection;
-    DB_BSS(hCmdBld).uHtTxBurstLimit = uHtTxBurstLimit;
-    DB_BSS(hCmdBld).uDualCtsProtection = uDualCtsProtection;
-
-    return cmdBld_CfgIeSetFwHtInformation (hCmdBld,
-                                           uRifsMode,          
-                                           uHtProtection,      
-                                           uGfProtection,      
-                                           uHtTxBurstLimit,    
-                                           uDualCtsProtection, 
-                                           fCb, 
-                                           hCb);
-}
-
-/** 
- * \fn     cmdBld_CfgSetBaInitiator 
- * \brief  configure BA session initiator\receiver parameters setting in the FW. 
- *
- * \note    
- * \return TI_OK on success or TI_NOK on failure 
- * \sa 
- */ 
-TI_STATUS cmdBld_CfgSetBaSession (TI_HANDLE hCmdBld, 
-                                  InfoElement_e eBaType,   
-                                  TI_UINT8 uTid,               
-                                  TI_UINT8 uState,             
-                                  TMacAddr tRa,                
-                                  TI_UINT16 uWinSize,          
-                                  TI_UINT16 uInactivityTimeout,
-                                  void *fCb, 
-                                  TI_HANDLE hCb)
-{
-    if (ACX_BA_SESSION_INITIATOR_POLICY == eBaType)
-    {
-        DB_BSS(hCmdBld).bBaInitiator[uTid] = TI_TRUE;
-        DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uTid].uTid = uTid;
-        DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uTid].uPolicy = uState;
-        MAC_COPY ((DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uTid].aMacAddress),tRa);
-        DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uTid].uWinSize = uWinSize;
-        DB_BSS(hCmdBld).tBaSessionInitiatorPolicy[uTid].uInactivityTimeout = uInactivityTimeout;
-    }
-    else
-    {
-        DB_BSS(hCmdBld).bBaResponder[uTid] = TI_TRUE;
-        DB_BSS(hCmdBld).tBaSessionResponderPolicy[uTid].uTid = uTid;
-        DB_BSS(hCmdBld).tBaSessionResponderPolicy[uTid].uPolicy = uState;
-        MAC_COPY ((DB_BSS(hCmdBld).tBaSessionResponderPolicy[uTid].aMacAddress),tRa);
-        DB_BSS(hCmdBld).tBaSessionResponderPolicy[uTid].uWinSize = uWinSize;
-        DB_BSS(hCmdBld).tBaSessionResponderPolicy[uTid].uInactivityTimeout = uInactivityTimeout;
-    }
-
-    return cmdBld_CfgIeSetBaSession (hCmdBld, 
-                                     eBaType,
-                                     uTid,               
-                                     uState,             
-                                     tRa,                
-                                     uWinSize,          
-                                     uInactivityTimeout,
-                                     fCb,
-                                     hCb);
-}
-
-
-TI_STATUS cmdBld_CfgBurstMode (TI_HANDLE hCmdBld, TI_BOOL bEnabled, void *fCb, TI_HANDLE hCb)
-{
-	DB_AC(hCmdBld).isBurstModeEnabled = bEnabled;
-	return cmdBld_CfgIeBurstMode (hCmdBld, bEnabled, fCb, hCb); 
-}
-
diff --git a/wl1271/TWD/Ctrl/CmdBldCfgIE.c b/wl1271/TWD/Ctrl/CmdBldCfgIE.c
deleted file mode 100644
index 495770a..0000000
--- a/wl1271/TWD/Ctrl/CmdBldCfgIE.c
+++ /dev/null
@@ -1,2014 +0,0 @@
-/*
- * CmdBldCfgIE.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  CmdBldCfgIE.c 
- *  \brief Command builder. Configuration commands information elements
- *
- *  \see   CmdBld.h 
- */
-#define __FILE_ID__  FILE_ID_92
-#include "osApi.h"
-#include "report.h"
-#include "CmdBld.h"
-#include "CmdQueue_api.h"
-#include "rate.h"
-#include "TwIf.h"
-
-/****************************************************************************
- *                      cmdBld_CfgIeConfigMemory()
- ****************************************************************************
- * DESCRIPTION: Configure wlan hardware memory
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeConfigMemory (TI_HANDLE hCmdBld, TDmaParams *pDmaParams, void *fCb, TI_HANDLE hCb)
-{   
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXConfigMemory_t AcxElm_ConfigMemory;
-    ACXConfigMemory_t *pCfg = &AcxElm_ConfigMemory;
-    
-    os_memoryZero(pCmdBld->hOs, (void *)pCfg, sizeof(*pCfg));
-
-    /*
-     * Set information element header
-     */
-    pCfg->EleHdr.id = ACX_MEM_CFG;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    /*
-     * Set configuration fields
-     */
-    pCfg->numStations             = pDmaParams->NumStations;
-    pCfg->rxMemblockNumber        = pDmaParams->NumRxBlocks;
-    pCfg->txMinimumMemblockNumber = TWD_TX_MIN_MEM_BLKS_NUM;
-    pCfg->numSsidProfiles         = 1;
-    pCfg->totalTxDescriptors      = ENDIAN_HANDLE_LONG(NUM_TX_DESCRIPTORS);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/* WoneIndex value when running as station */
-#define STATION_WONE_INDEX                  0
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeSlotTime()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate the Slot Time
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeSlotTime (TI_HANDLE hCmdBld, TI_UINT8 apSlotTime, void *fCb, TI_HANDLE hCb)                                
-{
-    TCmdBld    *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXSlot_t   AcxElm_SlotTime;
-    ACXSlot_t   *pCfg = &AcxElm_SlotTime;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_SLOT;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    /* Set configuration fields */
-    /* woneIndex is not relevant to station implementation */
-    pCfg->woneIndex = STATION_WONE_INDEX;
-    pCfg->slotTime = apSlotTime;
-
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, ": Sending info elem to firmware, Slot Time = %d\n", (TI_UINT8)pCfg->slotTime);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIePreamble()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate the Preamble
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIePreamble (TI_HANDLE hCmdBld, TI_UINT8 preamble, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld        *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXPreamble_t   AcxElm_Preamble;
-    ACXPreamble_t   *pCfg = &AcxElm_Preamble;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_PREAMBLE_TYPE;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    /* Set configuration fields */
-    /* woneIndex is not relevant to station implementation */
-    pCfg->preamble = preamble;
-
-    TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "ID=%u: preamble=%u\n", pCfg->EleHdr.id, preamble);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeRx()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate RxConfig information element
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeRx (TI_HANDLE hCmdBld, TI_UINT32 apRxConfigOption, TI_UINT32 apRxFilterOption, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld       *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXRxConfig_t   AcxElm_RxConfig;
-    ACXRxConfig_t  *pCfg = &AcxElm_RxConfig;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_RX_CFG;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    /* Set configuration fields */
-    pCfg->ConfigOptions = ENDIAN_HANDLE_LONG(apRxConfigOption);
-    pCfg->FilterOptions = ENDIAN_HANDLE_LONG(apRxFilterOption);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-/****************************************************************************
-*                 cmdBld_CfgIeEnableRxDataFilter()
-*****************************************************************************
-* DESCRIPTION: Enables or disables Rx data filtering.
-*
-* INPUTS:  enabled             - 0 to disable data filtering, any other value to enable 
-*          defaultAction       - The default action to take on non-matching packets.
-*
-* OUTPUT:  None
-*
-* RETURNS: TI_OK or TI_NOK
-****************************************************************************/
-TI_STATUS cmdBld_CfgIeEnableRxDataFilter (TI_HANDLE hCmdBld, TI_BOOL enabled, filter_e defaultAction, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld       *pCmdBld = (TCmdBld *)hCmdBld;
-    DataFilterDefault_t dataFilterDefault;
-    DataFilterDefault_t * pCfg = &dataFilterDefault;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_ENABLE_RX_DATA_FILTER;
-    pCfg->EleHdr.len = 0;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, ": Rx Data Filter configuration:\n");
-    TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, ": enabled = %d, defaultAction = %d\n", enabled, defaultAction);
-
-    /* Set information element configuration fields */
-    pCfg->enable = enabled;
-    pCfg->action = defaultAction;
-    pCfg->EleHdr.len += sizeof(pCfg->enable) + sizeof(pCfg->action);
-
-    TRACE_INFO_HEX(pCmdBld->hReport, (TI_UINT8 *) pCfg, sizeof(dataFilterDefault));
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-/****************************************************************************
-*                      cmdBld_CfgIeRxDataFilter()
-*****************************************************************************
-* DESCRIPTION: Add/remove Rx Data filter information element.
-*
-* INPUTS:  index               - Index of the Rx Data filter
-*          command             - Add or remove the filter
-*          action              - Action to take on packets matching the pattern
-*          numFieldPatterns    - Number of field patterns in the filter
-*          lenFieldPatterns    - Length of the field pattern series
-*          fieldPatterns       - Series of field patterns
-*
-* OUTPUT:  None
-*
-* RETURNS: TI_OK or TI_NOK
-****************************************************************************/
-TI_STATUS cmdBld_CfgIeRxDataFilter (TI_HANDLE hCmdBld, 
-                                    TI_UINT8 index, 
-                                    TI_UINT8 command, 
-                                    filter_e action, 
-                                    TI_UINT8 numFieldPatterns, 
-                                    TI_UINT8 lenFieldPatterns, 
-                                    TI_UINT8 *pFieldPatterns, 
-                                    void *fCb, 
-                                    TI_HANDLE hCb)
-{
-    TCmdBld       *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT8 dataFilterConfig[sizeof(DataFilterConfig_t) + MAX_DATA_FILTER_SIZE];
-    DataFilterConfig_t * pCfg = (DataFilterConfig_t *) &dataFilterConfig;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_SET_RX_DATA_FILTER;
-    pCfg->EleHdr.len = 0;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, ": Rx Data Filter configuration:\n");
-    TRACE5(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, ": command = %d, index = %d, action = %d, numFieldPatterns = %d, lenFieldPatterns = %d\n", command, index, action, numFieldPatterns, lenFieldPatterns);
-
-    /* Set information element configuration fields */
-    pCfg->command = command;
-    pCfg->index = index;
-    pCfg->EleHdr.len += sizeof(pCfg->command) + sizeof(pCfg->index);
-
-    /* When removing a filter only the index and command are to be sent */
-    if (command == ADD_FILTER)
-    {
-        pCfg->action = action;
-        pCfg->numOfFields = numFieldPatterns;
-        pCfg->EleHdr.len += sizeof(pCfg->action) + sizeof(pCfg->numOfFields);
-
-        if (pFieldPatterns == NULL)
-        {
-            TRACE0(pCmdBld->hReport, REPORT_SEVERITY_ERROR, ": Null pattern table argument received!\n");
-
-            return PARAM_VALUE_NOT_VALID;
-        }
-
-        os_memoryCopy(pCmdBld->hOs, &pCfg->FPTable, pFieldPatterns, lenFieldPatterns);
-        pCfg->EleHdr.len += lenFieldPatterns;
-    }
-
-    TRACE_INFO_HEX(pCmdBld->hReport, (TI_UINT8 *) pCfg, sizeof(dataFilterConfig));
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(dataFilterConfig), fCb, hCb, NULL);
-}
-
-/****************************************************************************
- *                      cmdBld_CfgIeArpIpFilter()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate ARP addr table information element for
- *              ipV4 only
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeArpIpFilter (TI_HANDLE hCmdBld, 
-                                   TIpAddr   tIpAddr,
-                                   EArpFilterType  filterType, 
-                                   void      *fCb, 
-                                   TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXConfigureIP_t AcxElm_CmdConfigureIP;
-    ACXConfigureIP_t *pCfg = &AcxElm_CmdConfigureIP;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_ARP_IP_FILTER;
-    pCfg->EleHdr.len = sizeof(ACXConfigureIP_t) - sizeof(EleHdrStruct);
-
-    pCfg->arpFilterEnable = (TI_UINT8)filterType;
-        
-    /* IP address */
-    /* Note that in the case of IPv4 it is assumed that the extra two bytes are zero */
-    IP_COPY (pCfg->address, tIpAddr);
-
-    TRACE3(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "ID=%u: ip=%x, enable=%u\n", pCfg->EleHdr.id, *((TI_UINT32*)pCfg->address), filterType);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(ACXConfigureIP_t), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeGroupAdressTable()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate Group addr table information element
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeGroupAdressTable (TI_HANDLE       hCmdBld, 
-                                        TI_UINT8        numGroupAddrs, 
-                                        TMacAddr        *pGroupAddr, 
-                                        TI_BOOL         bEnabled, 
-                                        void            *fCb, 
-                                        TI_HANDLE       hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT32   i = 0;
-    TI_UINT8   *tmpLoc = NULL;
-    dot11MulticastGroupAddrStart_t  AcxElm_CmdConfigureMulticastIp;
-    dot11MulticastGroupAddrStart_t* pCfg = &AcxElm_CmdConfigureMulticastIp;
-      
-    os_memoryZero (pCmdBld->hOs, (void *)pCfg, sizeof(dot11MulticastGroupAddrStart_t));
-
-    /* Set information element header */
-    pCfg->EleHdr.id = DOT11_GROUP_ADDRESS_TBL;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-     
-    pCfg->numOfGroups = numGroupAddrs;
-    pCfg->fltrState = bEnabled;
-    tmpLoc = pCfg->dataLocation;
-        
-    if (NULL != pGroupAddr)
-    {
-        for (i = 0; i < numGroupAddrs; i++) 
-        {
-            MAC_COPY (&tmpLoc[MAC_ADDR_LEN * i], *(pGroupAddr + i));
-
-            TRACE7(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_CfgIeGroupAdressTable: MAC %x: %x:%x:%x:%x:%x:%x\n", i, tmpLoc[MAC_ADDR_LEN*i+0] , tmpLoc[MAC_ADDR_LEN*i+1] , tmpLoc[MAC_ADDR_LEN*i+2] , tmpLoc[MAC_ADDR_LEN*i+3] , tmpLoc[MAC_ADDR_LEN*i+4] , tmpLoc[MAC_ADDR_LEN*i+5]);
-        }
-    }
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(dot11MulticastGroupAddrStart_t), fCb, hCb, NULL);
-    
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeSgEnable()
- ****************************************************************************
- * DESCRIPTION: Enable/Disable the BTH-WLAN  
- *
- * INPUTS:  Enable flag
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeSgEnable (TI_HANDLE hCmdBld, ESoftGeminiEnableModes SoftGeminiEnableModes, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXBluetoothWlanCoEnableStruct  AcxElm_BluetoothWlanEnable;
-    ACXBluetoothWlanCoEnableStruct* pCfg = &AcxElm_BluetoothWlanEnable;
-
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_CfgIeSgEnable: Enable flag = %d\n", SoftGeminiEnableModes);
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_SG_ENABLE;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    /* Set enable field */
-    pCfg->coexOperationMode = (TI_UINT8)SoftGeminiEnableModes;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeSg()
- ****************************************************************************
- * DESCRIPTION: Configure the BTH-WLAN co-exsistance   
- *
- * INPUTS:  Configuration structure pointer 
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeSg (TI_HANDLE hCmdBld, TSoftGeminiParams *pSoftGeminiParam, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXBluetoothWlanCoParamsStruct  AcxElm_BluetoothWlanEnable;
-    ACXBluetoothWlanCoParamsStruct *pCfg = &AcxElm_BluetoothWlanEnable;
-	int i=0;
-    
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_CfgIeSg. \n");
-
-    /* Set information element header */
-    pCfg->EleHdr.id      		= ACX_SG_CFG;
-    pCfg->EleHdr.len     		= sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-	pCfg->softGeminiParams.paramIdx = pSoftGeminiParam->paramIdx;
-
-
-	for (i=0; i< SOFT_GEMINI_PARAMS_MAX ; i++)
-	{
-		pCfg->softGeminiParams.coexParams[i] = pSoftGeminiParam->coexParams[i];
-	}
-
-    /* Rate conversion is done in the HAL */
-    pCfg->softGeminiParams.coexParams[SOFT_GEMINI_RATE_ADAPT_THRESH] = rateNumberToBitmap((TI_UINT8)pSoftGeminiParam->coexParams[SOFT_GEMINI_RATE_ADAPT_THRESH]);
-
-	if (pCfg->softGeminiParams.coexParams[SOFT_GEMINI_RATE_ADAPT_THRESH] == 0)
-    {
-        TRACE0(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "coexAPRateAdapationThr is 0, convert to 1MBPS. \n");
-        pCfg->softGeminiParams.coexParams[SOFT_GEMINI_RATE_ADAPT_THRESH] = HW_BIT_RATE_1MBPS;
-    }
-
-    /* Send the configuration command */
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeFmCoex()
- ****************************************************************************
- * DESCRIPTION: Configure the FM-WLAN co-exsistance parameters
- *
- * INPUTS:  Configuration structure pointer
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeFmCoex (TI_HANDLE hCmdBld, TFmCoexParams *pFmCoexParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXWlanFmCoexStruct  tFmWlanCoex;
-    ACXWlanFmCoexStruct *pCfg = &tFmWlanCoex;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_CfgIeFmCoex\n");
-
-    /* Set information element header */
-    pCfg->EleHdr.id  = ACX_FM_COEX_CFG;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    /* Set parameters with endianess handling */
-    pCfg->enable                   = pFmCoexParams->uEnable;
-    pCfg->swallowPeriod            = pFmCoexParams->uSwallowPeriod;
-    pCfg->nDividerFrefSet1         = pFmCoexParams->uNDividerFrefSet1;
-    pCfg->nDividerFrefSet2         = pFmCoexParams->uNDividerFrefSet2;
-    pCfg->mDividerFrefSet1         = ENDIAN_HANDLE_WORD(pFmCoexParams->uMDividerFrefSet1);
-    pCfg->mDividerFrefSet2         = ENDIAN_HANDLE_WORD(pFmCoexParams->uMDividerFrefSet2);
-    pCfg->coexPllStabilizationTime = ENDIAN_HANDLE_LONG(pFmCoexParams->uCoexPllStabilizationTime);
-    pCfg->ldoStabilizationTime     = ENDIAN_HANDLE_WORD(pFmCoexParams->uLdoStabilizationTime);
-    pCfg->fmDisturbedBandMargin    = pFmCoexParams->uFmDisturbedBandMargin;
-    pCfg->swallowClkDif            = pFmCoexParams->uSwallowClkDif;
-
-    /* Send the configuration command */
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeMemoryMap ()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate MemoryMap information element
- *
- * INPUTS:
- *      AcxElm_MemoryMap_T *apMap   pointer to the memory map structure
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeMemoryMap (TI_HANDLE hCmdBld, MemoryMap_t *apMap, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    MemoryMap_t SwapMap;
-    TI_UINT32 *pSwap, *pOrig, i, uMemMapNumFields;
-
-    /* Set information element header */
-    SwapMap.EleHdr.id  = ACX_MEM_MAP;
-    SwapMap.EleHdr.len = sizeof(MemoryMap_t) - sizeof(EleHdrStruct);
-
-    /* Solve endian problem (all fields are 32 bit) */
-    pOrig = (TI_UINT32* )&apMap->codeStart;
-    pSwap = (TI_UINT32* )&SwapMap.codeStart;
-    uMemMapNumFields = (sizeof(MemoryMap_t) - sizeof(EleHdrStruct)) % 4;
-    for (i = 0; i < uMemMapNumFields; i++)
-        pSwap[i] = ENDIAN_HANDLE_LONG(pOrig[i]);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, &SwapMap, sizeof(SwapMap), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeAid()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate the AID info element
- *
- * INPUTS:
- *      TI_UINT16* apAidVal     The AID value
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeAid (TI_HANDLE hCmdBld, TI_UINT16 apAidVal, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXAid_t    WlanElm_AID;
-    ACXAid_t    *pCfg = &WlanElm_AID;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_AID;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    pCfg->Aid = ENDIAN_HANDLE_WORD(apAidVal);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeWakeUpCondition()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate the power management option
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeWakeUpCondition (TI_HANDLE hCmdBld, TPowerMgmtConfig *pPMConfig, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    WakeUpCondition_t WakeUpCondition;
-    WakeUpCondition_t *pCfg = &WakeUpCondition;
-
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "WakeUpCondition :\n                             listenInterval = 0x%X\n", pPMConfig->listenInterval);
-
-    switch (pPMConfig->tnetWakeupOn)
-    {
-        case TNET_WAKE_ON_BEACON:
-            pCfg->wakeUpConditionBitmap = WAKE_UP_EVENT_BEACON_BITMAP;
-            break;
-        case TNET_WAKE_ON_DTIM:
-            pCfg->wakeUpConditionBitmap = WAKE_UP_EVENT_DTIM_BITMAP;
-            break;
-        case TNET_WAKE_ON_N_BEACON:
-            pCfg->wakeUpConditionBitmap = WAKE_UP_EVENT_N_BEACONS_BITMAP;
-            break;
-        case TNET_WAKE_ON_N_DTIM:
-            pCfg->wakeUpConditionBitmap = WAKE_UP_EVENT_N_DTIM_BITMAP;
-            break;
-        default:
-            pCfg->wakeUpConditionBitmap = WAKE_UP_EVENT_BEACON_BITMAP;
-            break;
-    }
-
-    pCfg->listenInterval = pPMConfig->listenInterval;
-
-    TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, " cmdBld_wakeUpCondition  tnetWakeupOn=0x%x listenInterval=%d\n",pCfg->wakeUpConditionBitmap,pCfg->listenInterval);
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_WAKE_UP_CONDITIONS;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeSleepAuth()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate the power management option
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeSleepAuth (TI_HANDLE hCmdBld, EPowerPolicy eMinPowerLevel, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXSleepAuth_t ACXSleepAuth;
-    ACXSleepAuth_t *pCfg = &ACXSleepAuth;
-    EElpCtrlMode eElpCtrlMode;
-
-    /* Set the ELP control according to the new power policy */
-    switch (eMinPowerLevel) 
-    {
-    case POWERAUTHO_POLICY_AWAKE:   eElpCtrlMode = ELPCTRL_MODE_KEEP_AWAKE;  break;
-    case POWERAUTHO_POLICY_PD:      eElpCtrlMode = ELPCTRL_MODE_KEEP_AWAKE;  break;
-    case POWERAUTHO_POLICY_ELP:     eElpCtrlMode = ELPCTRL_MODE_NORMAL;      break;
-    default:
-        TRACE1(pCmdBld->hReport, REPORT_SEVERITY_ERROR, " - Param value is not supported, %d\n", eMinPowerLevel);
-        return TI_NOK;
-
-    }
-
-    /* Set the ELP mode only if there is a change */
-    if (pCmdBld->uLastElpCtrlMode != eElpCtrlMode)
-    {
-        pCmdBld->uLastElpCtrlMode = eElpCtrlMode;
-		if (eElpCtrlMode == ELPCTRL_MODE_KEEP_AWAKE)
-		{
-			twIf_Awake(pCmdBld->hTwIf);
-		}
-		else
-		{
-			twIf_Sleep(pCmdBld->hTwIf);
-		}
-    }
-
-    /* In the info element the enums are in reverse */
-    switch (eMinPowerLevel)
-    {
-        case POWERAUTHO_POLICY_ELP:
-            pCfg->sleepAuth = 2;
-            break;
-        case POWERAUTHO_POLICY_AWAKE:
-            pCfg->sleepAuth = 0;
-            break;
-        default:
-            pCfg->sleepAuth = eMinPowerLevel;
-    }
-
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, " cmdBld_MinPowerLevelSet  sleepAuth=%d\n", eMinPowerLevel);
-
-    /* Set information element header*/
-    pCfg->EleHdr.id = ACX_SLEEP_AUTH;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeBcnBrcOptions()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate the power management option
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeBcnBrcOptions (TI_HANDLE hCmdBld, TPowerMgmtConfig *pPMConfig, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXBeaconAndBroadcastOptions_t ACXBeaconAndBroadcastOptions;
-    ACXBeaconAndBroadcastOptions_t *pCfg = &ACXBeaconAndBroadcastOptions;
-
-    pCfg->beaconRxTimeOut = pPMConfig->BcnBrcOptions.BeaconRxTimeout;
-    pCfg->broadcastTimeOut = pPMConfig->BcnBrcOptions.BroadcastRxTimeout;
-    pCfg->rxBroadcastInPS = pPMConfig->BcnBrcOptions.RxBroadcastInPs;
-	pCfg->consecutivePsPollDeliveryFailureThr = pPMConfig->ConsecutivePsPollDeliveryFailureThreshold;
-
-
-    TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, " cmdBld_BcnBrcOptions  BeaconRxTimeout=%d BroadcastRxTimeout=%d RxBroadcastInPs=0x%x, consecutivePsPollDeliveryFailureThr=%d\n",							 pCfg->beaconRxTimeOut,pCfg->broadcastTimeOut,							 pCfg->rxBroadcastInPS, pCfg->consecutivePsPollDeliveryFailureThr);
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_BCN_DTIM_OPTIONS;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeFeatureConfig()
-                                    ACXBeaconAndBroadcastOptions_t* pWlanElm_BcnBrcOptions,
- ****************************************************************************
- * DESCRIPTION: Configure the feature config info element
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeFeatureConfig (TI_HANDLE hCmdBld, TI_UINT32 options, TI_UINT32 uDataFlowOptions, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXFeatureConfig_t  WlanElm_FeatureConfig;
-    ACXFeatureConfig_t  *pCfg = &WlanElm_FeatureConfig;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_FEATURE_CFG;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    /* Set fields */
-    pCfg->Options = ENDIAN_HANDLE_LONG(options);
-    pCfg->dataflowOptions = ENDIAN_HANDLE_LONG(uDataFlowOptions);
-
-    TRACE3(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "ID=%u: option=0x%x, def.option=0x%x\n", pCfg->EleHdr.id, options, uDataFlowOptions);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeTxPowerDbm ()
- ****************************************************************************
- * DESCRIPTION: Set the Tx power in Dbm units.
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeTxPowerDbm (TI_HANDLE hCmdBld, TI_UINT8 uTxPowerDbm , void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    dot11CurrentTxPowerStruct dot11CurrentTxPower;
-    dot11CurrentTxPowerStruct *pCfg = &dot11CurrentTxPower;
-
-   TRACE1( pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, " uTxPowerDbm = %d\n", uTxPowerDbm);
-
-
-    /* Set information element header*/
-    pCfg->EleHdr.id = DOT11_CUR_TX_PWR;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    pCfg->dot11CurrentTxPower = uTxPowerDbm;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeStatisitics ()
- ****************************************************************************
- * DESCRIPTION: Set the ACX statistics counters to zero.
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeStatisitics (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_STATUS status = TI_NOK;
-    ACXStatistics_t  *pCfg;
-
-    pCfg = os_memoryAlloc(pCmdBld->hOs, sizeof(ACXStatistics_t));
-    if (!pCfg)
-    {
-        return status;
-    }
-
-    /* Set information element header */
-    pCfg->EleHdr.id  = ACX_STATISTICS;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    status = cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-    os_memoryFree(pCmdBld->hOs, pCfg, sizeof(ACXStatistics_t));
-    return status;
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeTid()
- ****************************************************************************
- * DESCRIPTION: Write the Queue configuration (For Quality Of Service)
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeTid (TI_HANDLE hCmdBld, TQueueTrafficParams* pQtrafficParams, void *fCb, TI_HANDLE hCb)
-                                          
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXTIDConfig_t    TrafficCategoryCfg;
-    ACXTIDConfig_t   *pCfg = &TrafficCategoryCfg;
-
-    os_memoryZero (pCmdBld->hOs, (void *)pCfg, sizeof(*pCfg));
-
-    /*
-     * Set information element header
-     * ==============================
-     */
-    pCfg->EleHdr.id = ACX_TID_CFG;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    /*
-     * Set information element Data
-     * ==============================
-     */
-    pCfg->queueID       = pQtrafficParams->queueID;
-    pCfg->channelType   = pQtrafficParams->channelType;
-    pCfg->tsid          = pQtrafficParams->tsid;
-    pCfg->psScheme      = pQtrafficParams->psScheme; 
-    pCfg->APSDConf[0]   = pQtrafficParams->APSDConf[0];
-    pCfg->APSDConf[1]   = pQtrafficParams->APSDConf[1];
-
-    TRACE7(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "ID=%u: queue-id=%u, chan-type=%u, tsid=%u, ps-scheme=%u, apsd-1=0x%x, apsd-2=0x%x\n", pCfg->EleHdr.id, pCfg->queueID, pCfg->channelType, pCfg->tsid, pCfg->psScheme, pCfg->APSDConf[0], pCfg->APSDConf[1]);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeAcParams()
- ****************************************************************************
- * DESCRIPTION: Write the AC configuration (For Quality Of Service)
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeAcParams (TI_HANDLE hCmdBld, TAcQosParams *pAcQosParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXAcCfg_t     AcCfg;
-    ACXAcCfg_t    *pCfg  = &AcCfg;
-
-    os_memoryZero (pCmdBld->hOs, (void *)pCfg, sizeof(*pCfg));
-
-    /*
-     * Set information element header
-     * ==============================
-     */
-    pCfg->EleHdr.id = ACX_AC_CFG;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    /*
-     * Set information element Data
-     * ==============================
-     */
-
-    pCfg->ac        = pAcQosParams->ac;
-    pCfg->aifsn     = pAcQosParams->aifsn;
-    pCfg->cwMax     = ENDIAN_HANDLE_WORD(pAcQosParams->cwMax);
-    pCfg->cwMin     = pAcQosParams->cwMin;
-    pCfg->txopLimit = ENDIAN_HANDLE_WORD(pAcQosParams->txopLimit);
-
-    TRACE6(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "ID=%u: ac= %u, aifsn=%u, cw-max=%u, cw-min=%u, txop=%u\n", pCfg->EleHdr.id, pAcQosParams->ac, pAcQosParams->aifsn, pAcQosParams->cwMax, pAcQosParams->cwMin, pAcQosParams->txopLimit);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIePsRxStreaming()
- ****************************************************************************
- * DESCRIPTION: Write the AC PS-Rx-Streaming
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIePsRxStreaming (TI_HANDLE hCmdBld, TPsRxStreaming *pPsRxStreaming, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXPsRxStreaming_t  tStreamingCfg;
-    ACXPsRxStreaming_t *pCfg  = &tStreamingCfg;
-
-    os_memoryZero (pCmdBld->hOs, (void *)pCfg, sizeof(*pCfg));
-
-    /*
-     * Set information element header
-     * ==============================
-     */
-    pCfg->EleHdr.id = ACX_PS_RX_STREAMING;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    /*
-     * Set information element Data
-     * ============================
-     */
-    pCfg->TID          = (TI_UINT8)pPsRxStreaming->uTid;
-    pCfg->rxPSDEnabled = (TI_UINT8)pPsRxStreaming->bEnabled;
-    pCfg->streamPeriod = (TI_UINT8)pPsRxStreaming->uStreamPeriod;
-    pCfg->txTimeout    = (TI_UINT8)pPsRxStreaming->uTxTimeout;
-
-    TRACE5(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "ID=%u: tid= %u, enable=%u, streamPeriod=%u, txTimeout=%u\n", pCfg->EleHdr.id, pCfg->TID, pCfg->rxPSDEnabled, pCfg->streamPeriod, pCfg->txTimeout);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIePacketDetectionThreshold()
- ****************************************************************************
- * DESCRIPTION:  Set the PacketDetection threshold
- *
- * INPUTS:  
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIePacketDetectionThreshold (TI_HANDLE hCmdBld, TI_UINT32 pdThreshold, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXPacketDetection_t  PacketDetectionThresholdCfg;
-    ACXPacketDetection_t *pCfg = &PacketDetectionThresholdCfg;
-
-    /*
-     * Set information element header
-     * ==============================
-     */
-    pCfg->EleHdr.id = ACX_PD_THRESHOLD;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    /*
-     * Set information element Data
-     * ==============================
-     */
-    pCfg->pdThreshold = ENDIAN_HANDLE_LONG(pdThreshold);
-
-    TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, ": pdThreshold = 0x%x , len = 0x%x \n",pCfg->pdThreshold,pCfg->EleHdr.len);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeBeaconFilterOpt()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate the beacon filtering option
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeBeaconFilterOpt (TI_HANDLE hCmdBld, TI_UINT8 beaconFilteringStatus, TI_UINT8 numOfBeaconsToBuffer, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXBeaconFilterOptions_t  ACXBeaconFilterOptions;
-    ACXBeaconFilterOptions_t *pCfg = &ACXBeaconFilterOptions;
-    
-    pCfg->enable = beaconFilteringStatus;
-    pCfg->maxNumOfBeaconsStored = numOfBeaconsToBuffer;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_BEACON_FILTER_OPT;
-    pCfg->EleHdr.len = sizeof(ACXBeaconFilterOptions_t) - sizeof(EleHdrStruct);
-
-    TRACE3(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "ID=%u: enable=%u, num-stored=%u\n", pCfg->EleHdr.id, beaconFilteringStatus, numOfBeaconsToBuffer);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(ACXBeaconFilterOptions_t), fCb, hCb, NULL);
-}
-/****************************************************************************
- *                      cmdBld_CfgIeRateMngDbg()
- ****************************************************************************
- * DESCRIPTION: Configure the rate managment params
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-
-TI_STATUS cmdBld_CfgIeRateMngDbg (TI_HANDLE hCmdBld, RateMangeParams_t *pRateMngParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    AcxRateMangeParams  RateMng;
-    AcxRateMangeParams *pCfg = &RateMng;
-	int i;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_SET_RATE_MAMAGEMENT_PARAMS;
-    pCfg->EleHdr.len = sizeof(AcxRateMangeParams) - sizeof(EleHdrStruct);
-
-
-    TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "ID=%u, index=%d \n",pCfg->EleHdr.id,pRateMngParams->paramIndex);
-
-	pCfg->paramIndex = pRateMngParams->paramIndex;
-
-	pCfg->InverseCuriosityFactor = pRateMngParams->InverseCuriosityFactor;
-    pCfg->MaxPer = pRateMngParams->MaxPer;
-	pCfg->PerAdd = pRateMngParams->PerAdd;
-	pCfg->PerAddShift = pRateMngParams->PerAddShift;
-	pCfg->PerAlphaShift = pRateMngParams->PerAlphaShift;
-	pCfg->PerBeta1Shift = pRateMngParams->PerBeta1Shift;
-	pCfg->PerBeta2Shift = pRateMngParams->PerBeta2Shift;
-	pCfg->PerTh1 = pRateMngParams->PerTh1;
-	pCfg->PerTh2 = pRateMngParams->PerTh2;
-	pCfg->RateCheckDown = pRateMngParams->RateCheckDown;
-	pCfg->RateCheckUp = pRateMngParams->RateCheckUp;
-	pCfg->RateRetryScore = pRateMngParams->RateRetryScore;
-	pCfg->TxFailHighTh = pRateMngParams->TxFailHighTh;
-	pCfg->TxFailLowTh = pRateMngParams->TxFailLowTh;
-
-	for (i=0 ; i< 13 ; i++)
-	{
-		pCfg->RateRetryPolicy[i] = pRateMngParams->RateRetryPolicy[i];
-	}
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(AcxRateMangeParams), fCb, hCb, NULL);
-}
-
-
-
-/****************************************************************************
- *                     cmdBld_CfgIeBeaconFilterTable
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate the beacon filter IE table
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeBeaconFilterTable (TI_HANDLE hCmdBld,
-                                         TI_UINT8   uNumberOfIEs, 
-                                         TI_UINT8  *pIETable,
-                                         TI_UINT8   uIETableSize, 
-                                         void      *fCb, 
-                                         TI_HANDLE  hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXBeaconFilterIETable_t beaconFilterIETableStruct;
-    ACXBeaconFilterIETable_t *pCfg = &beaconFilterIETableStruct;
-    TI_UINT32 counter;
-    
-    if (NULL == pIETable) 
-    {
-        return PARAM_VALUE_NOT_VALID;
-    }
-
-    pCfg->EleHdr.id = ACX_BEACON_FILTER_TABLE;
-    pCfg->EleHdr.len = uIETableSize + 1; 
-    pCfg->NumberOfIEs = uNumberOfIEs;
-        
-    os_memoryZero (pCmdBld->hOs, (void *)pCfg->IETable, BEACON_FILTER_TABLE_MAX_SIZE);
-    os_memoryCopy (pCmdBld->hOs, (void *)pCfg->IETable, (void *)pIETable, uIETableSize);
-        
-    TRACE3(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "ID=%u: num-ie=%u, table-size=%u\n", pCfg->EleHdr.id, uNumberOfIEs, uIETableSize);
-
-TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "Beacon IE Table:\n");
-    for (counter = 0; counter < uIETableSize; counter++)
-    {
-TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "%2x ", pIETable[counter]);
-	}
-TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "\n");
-        
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(ACXBeaconFilterIETable_t), fCb, hCb, NULL);
-}
- 
-/****************************************************************************
- *                     cmdBld_CfgCoexActivity
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate the Coex activity IE 
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeCoexActivity (TI_HANDLE hCmdBld,
-                                         TCoexActivity  *pCoexActivity,
-                                         void      *fCb, 
-                                         TI_HANDLE  hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXCoexActivityIE_t coexActivityIEStruct;
-    ACXCoexActivityIE_t *pCfg = &coexActivityIEStruct;
-    
-    if (NULL == pCoexActivity) 
-    {
-        return PARAM_VALUE_NOT_VALID;
-    }
-
-    pCfg->EleHdr.id = ACX_COEX_ACTIVITY;
-    pCfg->EleHdr.len = sizeof(ACXCoexActivityIE_t) - sizeof(EleHdrStruct);
-        
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "CoexActivity: ID=0x%x\n", pCfg->EleHdr.id);
-
-    pCfg->coexIp          = pCoexActivity->coexIp;
-    pCfg->activityId      = pCoexActivity->activityId;
-    pCfg->defaultPriority = pCoexActivity->defaultPriority;
-    pCfg->raisedPriority  = pCoexActivity->raisedPriority;
-    pCfg->minService      = ENDIAN_HANDLE_WORD(pCoexActivity->minService);
-    pCfg->maxService      = ENDIAN_HANDLE_WORD(pCoexActivity->maxService);
-
-    TRACE6(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "CoexActivity: 0x%02x 0x%02x - 0x%02x 0x%02x 0x%04x 0x%04x\n", 
-            pCfg->coexIp,
-            pCfg->activityId,
-            pCfg->defaultPriority,
-            pCfg->raisedPriority,
-            pCfg->minService,
-            pCfg->maxService);
- 
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-/****************************************************************************
- *                      cmdBld_CfgIeCcaThreshold()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate the Slot Time
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeCcaThreshold (TI_HANDLE hCmdBld, TI_UINT16 ccaThreshold, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXEnergyDetection_t AcxElm_CcaThreshold;
-    ACXEnergyDetection_t *pCfg = &AcxElm_CcaThreshold;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_CCA_THRESHOLD;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-    
-    pCfg->rxCCAThreshold = ENDIAN_HANDLE_WORD(ccaThreshold);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeEventMask()
- ****************************************************************************
- * DESCRIPTION: Change the Event Vector Mask in the FW
- * 
- * INPUTS: MaskVector   The Updated Vector Mask
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeEventMask (TI_HANDLE hCmdBld, TI_UINT32 mask, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    ACXEventMboxMask_t EventMboxData;
-    ACXEventMboxMask_t *pCfg = &EventMboxData;
-
-    /* Set information element header*/
-    pCfg->EleHdr.id = ACX_EVENT_MBOX_MASK; 
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-    pCfg->lowEventMask = ENDIAN_HANDLE_LONG(mask);
-    pCfg->highEventMask = ENDIAN_HANDLE_LONG(0xffffffff); /* Not in Use */
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "cmdBld_CfgIeEventMask:\n");
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeMaxTxRetry()
- ****************************************************************************
- * DESCRIPTION: Configure the Max Tx Retry parameters
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeMaxTxRetry (TI_HANDLE hCmdBld,
-                                  TRroamingTriggerParams *pRoamingTriggerCmd,
-                                  void      *fCb, 
-                                  TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXConsTxFailureTriggerParameters_t AcxElm_SetMaxTxRetry;
-    ACXConsTxFailureTriggerParameters_t* pCfg = &AcxElm_SetMaxTxRetry;
-
-    pCfg->maxTxRetry = pRoamingTriggerCmd->maxTxRetry;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_CONS_TX_FAILURE;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-    
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeConnMonitParams()
- ****************************************************************************
- * DESCRIPTION: Configure the Bss Lost Timeout & TSF miss threshold
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeConnMonitParams (TI_HANDLE hCmdBld, TRroamingTriggerParams *pRoamingTriggerCmd, void *fCb, TI_HANDLE hCb)                                           
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    AcxConnectionMonitorOptions  AcxElm_SetBssLossTsfThreshold;
-    AcxConnectionMonitorOptions* pCfg = &AcxElm_SetBssLossTsfThreshold;
-
-    pCfg->BSSLossTimeout     = ENDIAN_HANDLE_LONG(pRoamingTriggerCmd->BssLossTimeout);
-    pCfg->TSFMissedThreshold = ENDIAN_HANDLE_LONG(pRoamingTriggerCmd->TsfMissThreshold);
-
-    /* Set information element header */
-    pCfg->EleHdr.id  = ACX_CONN_MONIT_PARAMS;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-    
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeTxRatePolicy()
- ****************************************************************************
- * DESCRIPTION: Write the TxRateClass configuration 
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeTxRatePolicy (TI_HANDLE hCmdBld, TTxRatePolicy *pTxRatePolicy, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXTxAttrClasses_t  TxClassCfg;
-    ACXTxAttrClasses_t *pCfg  = &TxClassCfg;
-    TI_UINT8 PolicyId;
-    
-    os_memoryZero (pCmdBld->hOs, (void *)pCfg, sizeof(*pCfg));
-
-    /*
-     * Set information element header
-     * ==============================
-     */
-    pCfg->EleHdr.id = ACX_RATE_POLICY;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-    pCfg->numOfClasses = pTxRatePolicy->numOfRateClasses;
-
-    for (PolicyId = 0; PolicyId < pTxRatePolicy->numOfRateClasses; PolicyId++)
-    {
-        os_memoryCopy (pCmdBld->hOs,
-                       (void *)&(pCfg->rateClasses[PolicyId]),
-                       (void *)&(pTxRatePolicy->rateClass[PolicyId]),
-                       sizeof(TTxRateClass));
-    }
-    
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeRtsThreshold()
- ****************************************************************************
- * DESCRIPTION: Configure the RTS threshold
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeRtsThreshold (TI_HANDLE hCmdBld, TI_UINT16 uRtsThreshold, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    dot11RTSThreshold_t AcxElm_RtsThreshold;
-    dot11RTSThreshold_t *pCfg = &AcxElm_RtsThreshold;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = DOT11_RTS_THRESHOLD;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    pCfg->RTSThreshold = ENDIAN_HANDLE_WORD(uRtsThreshold);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeRtsThreshold()
- ****************************************************************************
- * DESCRIPTION: Configure the tx fragmentation threshold
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeFragmentThreshold (TI_HANDLE hCmdBld, TI_UINT16 uFragmentThreshold, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXFRAGThreshold_t AcxElm_FragmentThreshold;
-    ACXFRAGThreshold_t *pCfg = &AcxElm_FragmentThreshold;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_FRAG_CFG;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    pCfg->fragThreshold = ENDIAN_HANDLE_WORD(uFragmentThreshold);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIePmConfig()
- ****************************************************************************
- * DESCRIPTION: Configure PM parameters
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIePmConfig (TI_HANDLE   hCmdBld, 
-                                TI_UINT32   uHostClkSettlingTime,
-                                TI_UINT8    uHostFastWakeupSupport, 
-                                void *      fCb, 
-                                TI_HANDLE   hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXPMConfig_t tPmConfig;
-    ACXPMConfig_t *pCfg = &tPmConfig;
-
-    /* Set information element header*/
-    pCfg->EleHdr.id  = ACX_PM_CONFIG;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    pCfg->hostClkSettlingTime   = uHostClkSettlingTime;
-    pCfg->hostFastWakeupSupport = uHostFastWakeupSupport;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeTxCmpltPacing()
- ****************************************************************************
- * DESCRIPTION: Configure Tx-Complete interrupt pacing to FW
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeTxCmpltPacing (TI_HANDLE  hCmdBld,
-                                     TI_UINT16  uTxCompletePacingThreshold,
-                                     TI_UINT16  uTxCompletePacingTimeout,
-                                     void *     fCb, 
-                                     TI_HANDLE  hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXTxConfigOptions_t  tTxCmpltPacing;
-    ACXTxConfigOptions_t  *pCfg = &tTxCmpltPacing;
-
-    /* Set information element header */
-    pCfg->EleHdr.id  = ACX_TX_CONFIG_OPT;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    pCfg->txCompleteThreshold = ENDIAN_HANDLE_WORD(uTxCompletePacingThreshold);
-    pCfg->txCompleteTimeout   = ENDIAN_HANDLE_WORD(uTxCompletePacingTimeout);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeRxIntrPacing()
- ****************************************************************************
- * DESCRIPTION: Configure Rx-Complete interrupt pacing to FW
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeRxIntrPacing (TI_HANDLE  hCmdBld,
-                                    TI_UINT16  uRxIntrPacingThreshold,
-                                    TI_UINT16  uRxIntrPacingTimeout,
-                                    void *     fCb, 
-                                    TI_HANDLE  hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXRxBufferingConfig_t  tRxIntrPacing;
-    ACXRxBufferingConfig_t  *pCfg = &tRxIntrPacing;
-
-    /* Set information element header */
-    pCfg->EleHdr.id  = ACX_RX_CONFIG_OPT;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    pCfg->rxPktThreshold    = ENDIAN_HANDLE_WORD(uRxIntrPacingThreshold);
-    pCfg->rxCompleteTimeout = ENDIAN_HANDLE_WORD(uRxIntrPacingTimeout);
-    pCfg->rxMblkThreshold   = ENDIAN_HANDLE_WORD(0xFFFF);    /* Set to maximum so it has no effect (only the PktThreshold is used) */
-    pCfg->rxQueueType       = RX_QUEUE_TYPE_RX_LOW_PRIORITY; /* Only low priority data packets are buffered */
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
-*                      cmdBld_CfgIeCtsProtection()
- ****************************************************************************
- * DESCRIPTION: Configure The Cts to self feature
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeCtsProtection (TI_HANDLE hCmdBld, TI_UINT8 ctsProtection, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXCtsProtection_t AcxElm_CtsToSelf;
-    ACXCtsProtection_t *pCfg = &AcxElm_CtsToSelf;
-
-    /* Set information element header*/
-    pCfg->EleHdr.id = ACX_CTS_PROTECTION;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    pCfg->ctsProtectMode = ctsProtection;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeRxMsduLifeTime()
- ****************************************************************************
- * DESCRIPTION: Configure The Cts to self feature
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeRxMsduLifeTime (TI_HANDLE hCmdBld, TI_UINT32 RxMsduLifeTime, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    dot11RxMsduLifeTime_t   AcxElm_RxMsduLifeTime;
-    dot11RxMsduLifeTime_t *pCfg = &AcxElm_RxMsduLifeTime;
-
-    /* Set information element header*/
-    pCfg->EleHdr.id = DOT11_RX_MSDU_LIFE_TIME;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-    pCfg->RxMsduLifeTime = RxMsduLifeTime;
-
-    TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, ": RxMsduLifeTime = 0x%x, len = 0x%x\n",pCfg->RxMsduLifeTime,pCfg->EleHdr.len);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeServicePeriodTimeout()
- ****************************************************************************
- * DESCRIPTION: Configure The Rx Time Out
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeServicePeriodTimeout (TI_HANDLE hCmdBld, TRxTimeOut* pRxTimeOut, void *fCb, TI_HANDLE hCb)                            
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXRxTimeout_t AcxElm_rxTimeOut;
-    ACXRxTimeout_t *pCfg = &AcxElm_rxTimeOut;
-
-    /* Set information element header*/
-    pCfg->EleHdr.id = ACX_SERVICE_PERIOD_TIMEOUT;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    pCfg->PsPollTimeout = pRxTimeOut->psPoll;
-    pCfg->UpsdTimeout   = pRxTimeOut->UPSD;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIePsWmm()
- ****************************************************************************
- * DESCRIPTION: Configure The PS for WMM
- *
- * INPUTS:   TI_TRUE  - Configure PS to work on WMM mode - do not send the NULL/PS_POLL 
- *                   packets even if TIM is set.
- *           TI_FALSE - Configure PS to work on Non-WMM mode - work according to the 
- *                   standard
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIePsWmm (TI_HANDLE hCmdBld, TI_BOOL enableWA, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXConfigPsWmm_t  ConfigPsWmm;
-    ACXConfigPsWmm_t *pCfg = &ConfigPsWmm;
-
-    /*
-     * Set information element header
-     */
-    pCfg->EleHdr.id = ACX_CONFIG_PS_WMM;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    pCfg->ConfigPsOnWmmMode = enableWA;
-
-    /* Report the meesage only if we are using the WiFi patch */
-    if (enableWA)
-    {
-        TRACE0(pCmdBld->hReport, REPORT_SEVERITY_CONSOLE, "cmdBld_CfgIePsWmm: PS is on WMM mode\n");
-        WLAN_OS_REPORT(("%s PS is on WMM mode\n",__FUNCTION__));
-    }
-    
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-/****************************************************************************
- *                      cmdBld_CfgIeRssiSnrTrigger()
- ****************************************************************************
- * DESCRIPTION: Configure the RSSI/SNR Trigger parameters
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: OK or NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeRssiSnrTrigger (TI_HANDLE hCmdBld, RssiSnrTriggerCfg_t *pTriggerParam, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXRssiSnrTriggerCfg_t  tAcxTriggerParameters;
-    ACXRssiSnrTriggerCfg_t *pCfg = &tAcxTriggerParameters;
-
-    pCfg->param.index       = pTriggerParam->index    ;        
-    pCfg->param.threshold   = pTriggerParam->threshold;        
-    pCfg->param.pacing      = pTriggerParam->pacing   ;        
-    pCfg->param.metric      = pTriggerParam->metric   ;        
-    pCfg->param.type        = pTriggerParam->type     ;        
-    pCfg->param.direction   = pTriggerParam->direction;        
-    pCfg->param.hystersis   = pTriggerParam->hystersis;        
-    pCfg->param.enable      = pTriggerParam->enable   ;        
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_RSSI_SNR_TRIGGER;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    TRACE8(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "ID=%u: threshold=%u, pacing=%u, metric=%u, type=%u, dir=%u, hyst=%u, enable=%u\n", pTriggerParam->index, pTriggerParam->threshold, pTriggerParam->pacing, pTriggerParam->metric, pTriggerParam->type, pTriggerParam->direction, pTriggerParam->hystersis, pTriggerParam->enable);
-                                             
-    /* Send the configuration command */
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-/****************************************************************************
- *                      cmdBld_CfgIeRssiSnrWeights()
- ****************************************************************************
- * DESCRIPTION: Configure the RSSI/SNR Trigger parameters
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: OK or NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeRssiSnrWeights (TI_HANDLE hCmdBld, RssiSnrAverageWeights_t *pWeightsParam, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXRssiSnrAverageWeights_t  tAcxAverageWeights;
-    ACXRssiSnrAverageWeights_t *pCfg = &tAcxAverageWeights;
-
-    pCfg->param.rssiBeaconAverageWeight = pWeightsParam->rssiBeaconAverageWeight;        
-    pCfg->param.rssiPacketAverageWeight = pWeightsParam->rssiPacketAverageWeight;        
-    pCfg->param.snrBeaconAverageWeight  = pWeightsParam->snrBeaconAverageWeight ;        
-    pCfg->param.snrPacketAverageWeight  = pWeightsParam->snrPacketAverageWeight ;        
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_RSSI_SNR_WEIGHTS;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "rssi-beacon-avg-weight=%u, rssi-packet-avg-weight=%u, snr-beacon-avg-weight=%u, snr-packet-avg-weight=%u", pWeightsParam->rssiBeaconAverageWeight, pWeightsParam->rssiPacketAverageWeight, pWeightsParam->snrBeaconAverageWeight, pWeightsParam->snrPacketAverageWeight);
-
-    /* Send the configuration command */
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
- /*
- * ----------------------------------------------------------------------------
- * Function : cmdBld_CfgIeBet
- *
- * Input    :   enabled               - 0 to disable BET, 0 to disable BET
- *              MaximumConsecutiveET  - Max number of consecutive beacons
- *                                      that may be early terminated.
- * Output   : TI_STATUS
- * Process  :  Configures Beacon Early Termination information element.
- * Note(s)  :  None
- * -----------------------------------------------------------------------------
- */
-TI_STATUS cmdBld_CfgIeBet (TI_HANDLE hCmdBld, TI_UINT8 Enable, TI_UINT8 MaximumConsecutiveET, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    ACXBet_Enable_t ACXBet_Enable;
-    ACXBet_Enable_t* pCfg = &ACXBet_Enable;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_BET_ENABLE;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    /* Set configuration fields */
-    pCfg->Enable = Enable;
-    pCfg->MaximumConsecutiveET = MaximumConsecutiveET;
-
-    TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, ": Sending info elem to firmware, Enable=%d, MaximumConsecutiveET=%d\n", (TI_UINT32)pCfg->Enable, (TI_UINT32)pCfg->MaximumConsecutiveET);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-/****************************************************************************
- *                      cmdBld_CmdIeConfigureKeepAliveParams()
- ****************************************************************************
- * DESCRIPTION: Configure keep-alive parameters for a single template
- *
- * INPUTS:  hCmdBld     - handle to command builder object
- *          uIndex      - keep-alive index
- *          uEnaDisFlag - whether keep-alive is enabled or disables
- *          trigType    - send keep alive when TX is idle or always
- *          interval    - keep-alive interval
- *          fCB         - callback function for command complete
- *          hCb         - handle to be apssed to callback function    
- *
- * OUTPUT:  None
- *
- * RETURNS: OK or NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeConfigureKeepAliveParams (TI_HANDLE hCmdBld, TI_UINT8 uIndex,
-                                                TI_UINT8 uEnaDisFlag, TI_UINT8 trigType,
-                                                TI_UINT32 interval, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    AcxSetKeepAliveConfig_t ACXKeepAlive;
-
-    /* set IE header */
-    ACXKeepAlive.EleHdr.id = ACX_SET_KEEP_ALIVE_CONFIG;
-    ACXKeepAlive.EleHdr.len = sizeof (AcxSetKeepAliveConfig_t) - sizeof (EleHdrStruct);
-
-    /* set Keep-Alive values */
-    ACXKeepAlive.index = uIndex;
-    ACXKeepAlive.period = interval;
-    ACXKeepAlive.trigger = trigType;
-    ACXKeepAlive.valid = uEnaDisFlag;
-
-    TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, ": Sending info elem to firmware, index=%d, enaDis=%d, trigType=%d, interval=%d\n", (TI_UINT32)ACXKeepAlive.index, (TI_UINT32)ACXKeepAlive.valid, (TI_UINT32)ACXKeepAlive.trigger, (TI_UINT32)ACXKeepAlive.period);
-
-    /* send the command to the FW */
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, &ACXKeepAlive, sizeof(AcxSetKeepAliveConfig_t), fCb, hCb, NULL);
-}
-
-/****************************************************************************
- *                      cmdBld_CmdIeConfigureKeepAliveParams()
- ****************************************************************************
- * DESCRIPTION: Configure keep-alive global enable / disable flag
- *
- * INPUTS:  enable / disable flag
- *
- * OUTPUT:  None
- *
- * RETURNS: OK or NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeConfigureKeepAliveEnaDis (TI_HANDLE hCmdBld, TI_UINT8 enaDisFlag, 
-                                                void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    AcxKeepAliveMode ACXKeepAliveMode;
-
-    /* set IE header */
-    ACXKeepAliveMode.EleHdr.id = ACX_KEEP_ALIVE_MODE;
-    ACXKeepAliveMode.EleHdr.len = sizeof (AcxKeepAliveMode) - sizeof (EleHdrStruct);
-
-    /* set Keep-Alive mode */
-    ACXKeepAliveMode.modeEnabled = enaDisFlag;
-
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, ": Sending info elem to firmware, enaDis=%d\n", (TI_UINT32)ACXKeepAliveMode.modeEnabled);
-
-    /* send the command to the FW */
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, &ACXKeepAliveMode, sizeof(AcxKeepAliveMode), fCb, hCb, NULL);
-}
-
-/** 
- * \fn     cmdBld_CfgIeSetFwHtCapabilities 
- * \brief  set the current AP HT Capabilities to the FW. 
- *
- * \note    
- * \return TI_OK on success or TI_NOK on failure 
- * \sa 
- */ 
-TI_STATUS cmdBld_CfgIeSetFwHtCapabilities (TI_HANDLE hCmdBld,
-                                           TI_UINT32 uHtCapabilites,
-                                           TMacAddr  tMacAddress,
-                                           TI_UINT8  uAmpduMaxLeng,
-                                           TI_UINT8  uAmpduMinSpac,
-                                           void      *fCb, 
-                                           TI_HANDLE hCb)
-{
-    TCmdBld                         *pCmdBld = (TCmdBld *)hCmdBld;
-    TAxcHtCapabilitiesIeFwInterface tAcxFwHtCap;
-    TAxcHtCapabilitiesIeFwInterface *pCfg    = &tAcxFwHtCap;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_PEER_HT_CAP;
-    pCfg->EleHdr.len = sizeof(tAcxFwHtCap) - sizeof(EleHdrStruct);
-
-    MAC_COPY (pCfg->aMacAddress, tMacAddress);
-    pCfg->uHtCapabilites = uHtCapabilites;
-    pCfg->uAmpduMaxLength = uAmpduMaxLeng;
-    pCfg->uAmpduMinSpacing = uAmpduMinSpac;
- 
-    TRACE9(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_CfgIeSetFwHtCapabilities: HtCapabilites=0x%x, AmpduMaxLength=%d, AmpduMinSpac=%d, MAC: %x:%x:%x:%x:%x:%x\n", uHtCapabilites, uAmpduMaxLeng, uAmpduMinSpac, pCfg->aMacAddress[0], pCfg->aMacAddress[1], pCfg->aMacAddress[2], pCfg->aMacAddress[3], pCfg->aMacAddress[4], pCfg->aMacAddress[5]);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(TAxcHtCapabilitiesIeFwInterface), fCb, hCb, NULL);
-    
-}
-
-/** 
- * \fn     cmdBld_CfgIeSetFwHtInformation 
- * \brief  set the current AP HT Information to the FW. 
- *
- * \note    
- * \return TI_OK on success or TI_NOK on failure 
- * \sa 
- */ 
-TI_STATUS cmdBld_CfgIeSetFwHtInformation (TI_HANDLE hCmdBld,
-                                          TI_UINT8  uRifsMode,           
-                                          TI_UINT8  uHtProtection,       
-                                          TI_UINT8  uGfProtection,       
-                                          TI_UINT8  uHtTxBurstLimit,     
-                                          TI_UINT8  uDualCtsProtection,  
-                                          void      *fCb, 
-                                          TI_HANDLE hCb)
-{
-    TCmdBld                        *pCmdBld = (TCmdBld *)hCmdBld;
-    TAxcHtInformationIeFwInterface tAcxFwHtInf;
-    TAxcHtInformationIeFwInterface *pCfg = &tAcxFwHtInf;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_HT_BSS_OPERATION;
-    pCfg->EleHdr.len = sizeof(tAcxFwHtInf) - sizeof(EleHdrStruct);
-
-    pCfg->uRifsMode = uRifsMode;
-    pCfg->uHtProtection = uHtProtection;
-    pCfg->uGfProtection = uGfProtection;
-    pCfg->uHtTxBurstLimit = uHtTxBurstLimit;
-    pCfg->uDualCtsProtection = uDualCtsProtection;
- 
-    TRACE5(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_CfgIeSetFwHtInformation: RifsMode=0x%x, HtProtection=0x%x, GfProtection=0x%x, HtTxBurstLimit=0x%x, DualCtsProtection=0x%x\n", uRifsMode, uHtProtection, uGfProtection, uHtTxBurstLimit, uDualCtsProtection);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(TAxcHtInformationIeFwInterface), fCb, hCb, NULL);
-}
-
-/** 
- * \fn     cmdBld_CfgIeSetBaSession 
- * \brief  configure BA session initiator\receiver parameters setting in the FW. 
- *
- * \note    
- * \return TI_OK on success or TI_NOK on failure 
- * \sa 
- */ 
-TI_STATUS cmdBld_CfgIeSetBaSession (TI_HANDLE hCmdBld, 
-                                    InfoElement_e eBaType,
-                                    TI_UINT8 uTid,               
-                                    TI_UINT8 uState,             
-                                    TMacAddr tRa,                
-                                    TI_UINT16 uWinSize,          
-                                    TI_UINT16 uInactivityTimeout,
-                                    void *fCb, 
-                                    TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TAxcBaSessionInitiatorResponderPolicy tAcxBaSessionPrm;
-    TAxcBaSessionInitiatorResponderPolicy *pCfg = &tAcxBaSessionPrm;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = eBaType;
-    pCfg->EleHdr.len = sizeof(tAcxBaSessionPrm) - sizeof(EleHdrStruct);
-
-    MAC_COPY (pCfg->aMacAddress, tRa);
-    pCfg->uTid = uTid;
-    pCfg->uPolicy = uState;
-    pCfg->uWinSize = uWinSize;
-
-    if (eBaType == ACX_BA_SESSION_INITIATOR_POLICY)
-    {
-        pCfg->uInactivityTimeout = uInactivityTimeout;
-    }
-    else
-    {
-        if (eBaType == ACX_BA_SESSION_RESPONDER_POLICY)
-        {
-            pCfg->uInactivityTimeout = 0;
-        }
-        else
-        {
-            TRACE1(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "cmdBld_CfgIeSetBaSession: error ID=%u\n", pCfg->EleHdr.id);
-            return TI_NOK;
-        }
-    }
-
-    TRACE10(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_CfgIeSetBaSession: ID=, TID=%u, Policy=%u, MAC: %x:%x:%x:%x:%x:%x, uWinSize=%u, Timeout=%u\n", pCfg->uTid, pCfg->uPolicy, pCfg->aMacAddress[0], pCfg->aMacAddress[1], pCfg->aMacAddress[2], pCfg->aMacAddress[3], pCfg->aMacAddress[4], pCfg->aMacAddress[5], pCfg->uWinSize, pCfg->uInactivityTimeout);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(TAxcBaSessionInitiatorResponderPolicy), fCb, hCb, NULL);
-}
-
-/** 
- * \fn     cmdBld_CfgIeRadioParams 
- * \brief  configure radio parameters setting in the FW. 
- *
- * \note    
- * \return TI_OK on success or TI_NOK on failure 
- * \sa 
- */ 
-TI_STATUS cmdBld_CfgIeRadioParams (TI_HANDLE hCmdBld, IniFileRadioParam *pIniFileRadioParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_STATUS status = TI_NOK;
-    TTestCmd *pTestCmd;
-
-    pTestCmd = os_memoryAlloc(pCmdBld->hOs, sizeof(TTestCmd));
-    if (!pTestCmd)
-    {
-        return status;
-    }
-
-    pTestCmd->testCmdId = TEST_CMD_INI_FILE_RADIO_PARAM;
-
-    os_memoryCopy(pCmdBld->hOs, &pTestCmd->testCmd_u.IniFileRadioParams, pIniFileRadioParams, sizeof(IniFileRadioParam));
-
-    status = cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_TEST, 
-                             (void *)pTestCmd, 
-                             sizeof(IniFileRadioParam) + 4,
-                             fCb, 
-                             hCb, 
-                             NULL);
-    os_memoryFree(pCmdBld->hOs, pTestCmd, sizeof(TTestCmd));
-    return status;
-}
-
-
-/** 
- * \fn     cmdBld_CfgIeExtendedRadioParams 
- * \brief  configure extended radio parameters setting in the
- * FW.
- *
- * \note    
- * \return TI_OK on success or TI_NOK on failure 
- * \sa 
- */ 
-TI_STATUS cmdBld_CfgIeExtendedRadioParams (TI_HANDLE hCmdBld,
-										   IniFileExtendedRadioParam *pIniFileExtRadioParams,
-										   void *fCb,
-										   TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_STATUS status = TI_NOK;
-    TTestCmd *pTestCmd;
-
-    pTestCmd = os_memoryAlloc(pCmdBld->hOs, sizeof(TTestCmd));
-    if (!pTestCmd)
-    {
-        return status;
-    }
-
-    pTestCmd->testCmdId = TEST_CMD_INI_FILE_RF_EXTENDED_PARAM;
-    
-    os_memoryCopy(pCmdBld->hOs, &pTestCmd->testCmd_u.IniFileExtendedRadioParams,
-				  pIniFileExtRadioParams, sizeof(IniFileExtendedRadioParam));
-
-    status = cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_TEST, 
-                             (void *)pTestCmd, 
-                             sizeof(IniFileExtendedRadioParam) + 4,
-                             fCb, 
-                             hCb, 
-                             NULL);
-    os_memoryFree(pCmdBld->hOs, pTestCmd, sizeof(TTestCmd));
-    return status;
-}
-
-
-TI_STATUS cmdBld_CfgPlatformGenParams (TI_HANDLE hCmdBld, IniFileGeneralParam *pGenParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_STATUS status = TI_NOK;
-    TTestCmd *pTestCmd;
-
-    pTestCmd = os_memoryAlloc(pCmdBld->hOs, sizeof(TTestCmd));
-    if (!pTestCmd)
-    {
-        return status;
-    }
-
-    pTestCmd->testCmdId = TEST_CMD_INI_FILE_GENERAL_PARAM;
-    
-    os_memoryCopy(pCmdBld->hOs, &pTestCmd->testCmd_u.IniFileGeneralParams, pGenParams, sizeof(IniFileGeneralParam));
-
-    status = cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                              CMD_TEST, 
-                              (void *)pTestCmd, 
-                              sizeof(IniFileGeneralParam),
-                              fCb, 
-                              hCb, 
-                              NULL);    
-    os_memoryFree(pCmdBld->hOs, pTestCmd, sizeof(TTestCmd));
-    return status;
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeBurstMode()
- ****************************************************************************
- * DESCRIPTION: Configure burst mode
- *
- * INPUTS:  hCmdBld     - handle to command builder object
- *          bEnabled    - is enabled flag
- *          fCB         - callback function for command complete
- *          hCb         - handle to be apssed to callback function
- *
- * OUTPUT:  None
- *
- * RETURNS: OK or NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeBurstMode (TI_HANDLE hCmdBld, TI_BOOL bEnabled, void *fCb, TI_HANDLE hCb)
-{
-	TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-	AcxBurstMode tAcxBurstMode;
-	AcxBurstMode *pCfg = &tAcxBurstMode;
-
-	/* set IE header */
-	pCfg->EleHdr.id = ACX_BURST_MODE;
-	pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-	/* set burst mode value */
-	pCfg->enable = (uint8)bEnabled;
-
-	/* send the command to the FW */
-	return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(*pCfg), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CfgIeDcoItrimParams()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate the DCO Itrim parameters
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CfgIeDcoItrimParams (TI_HANDLE hCmdBld, TI_BOOL enable, TI_UINT32 moderationTimeoutUsec, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXDCOItrimParams_t ACXBeaconFilterOptions;
-    ACXDCOItrimParams_t *pCfg = &ACXBeaconFilterOptions;
-    
-    pCfg->enable = enable;
-    pCfg->moderation_timeout_usec = moderationTimeoutUsec;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_SET_DCO_ITRIM_PARAMS;
-    pCfg->EleHdr.len = sizeof(ACXDCOItrimParams_t) - sizeof(EleHdrStruct);
-
-    TRACE3(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "ID=%u: enable=%u, moderation_timeout_usec=%u\n", pCfg->EleHdr.id, enable, moderationTimeoutUsec);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CONFIGURE, pCfg, sizeof(ACXDCOItrimParams_t), fCb, hCb, NULL);
-}
diff --git a/wl1271/TWD/Ctrl/CmdBldCfgIE.h b/wl1271/TWD/Ctrl/CmdBldCfgIE.h
deleted file mode 100644
index 60b8c5c..0000000
--- a/wl1271/TWD/Ctrl/CmdBldCfgIE.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * CmdBldCfgIE.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  CmdBldCfgIE.h
- *   PURPOSE: wlan hardware configuration information elements
- * 
- ****************************************************************************/
-
-#ifndef CMDBLDCFGIE_H
-#define CMDBLDCFGIE_H
-
-
-#include "TWDriverInternal.h"
-#include "public_infoele.h"
-
-
-TI_STATUS cmdBld_CfgIeMemoryMap                	(TI_HANDLE hCmdBld, MemoryMap_t *apMap, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeRx                       	(TI_HANDLE hCmdBld, TI_UINT32 apRxConfigOption, TI_UINT32 apRxFilterOption, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeStationId                	(TI_HANDLE hCmdBld, TI_UINT8* apStationId, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeSleepAuth                	(TI_HANDLE hCmdBld, EPowerPolicy minPowerLevel, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeWakeUpCondition          	(TI_HANDLE hCmdBld, TPowerMgmtConfig *pPMConfig, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeFeatureConfig            	(TI_HANDLE hCmdBld, TI_UINT32 uOptions, TI_UINT32 uDataFlowOptions, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeBeaconFilterOpt          	(TI_HANDLE hCmdBld, TI_UINT8 beaconFilteringStatus, TI_UINT8 numOfBeaconsToBuffer, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeBeaconFilterTable        	(TI_HANDLE hCmdBld, TI_UINT8 numberOfIEs, TI_UINT8* pIETable, TI_UINT8 IETableSize, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeArpIpFilter              	(TI_HANDLE hCmdBld, TIpAddr tIpAddr, EArpFilterType filterType, void *fCb, TI_HANDLE hCb); 
-TI_STATUS cmdBld_CfgIeGroupAdressTable         	(TI_HANDLE hCmdBld, TI_UINT8 numGroupAddrs, TMacAddr *pGroupAddr, TI_BOOL bEnabled, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeAid                      	(TI_HANDLE hCmdBld, TI_UINT16 apAidVal, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeTxPowerDbm 				(TI_HANDLE hCmdBld, TI_UINT8 uTxPowerDbm , void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeSgEnable                 	(TI_HANDLE hCmdBld, ESoftGeminiEnableModes eSoftGeminiEnableModes, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeSg                       	(TI_HANDLE hCmdBld, TSoftGeminiParams *pSoftGeminiParam, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeFmCoex                    (TI_HANDLE hCmdBld, TFmCoexParams *pFmCoexParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeConnMonitParams          	(TI_HANDLE hCmdBld, TRroamingTriggerParams *pRoamingTriggerCmd, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeConfigMemory             	(TI_HANDLE hCmdBld, TDmaParams *pDmaParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeSlotTime                 	(TI_HANDLE hCmdBld, TI_UINT8 apSlotTime, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIePreamble                 	(TI_HANDLE hCmdBld, TI_UINT8 apPreamble, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeStatisitics              	(TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeEventMask                	(TI_HANDLE hCmdBld, TI_UINT32 mask, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIePacketDetectionThreshold 	(TI_HANDLE hCmdBld, TI_UINT32 pdThreshold, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeCcaThreshold              (TI_HANDLE hCmdBld, TI_UINT16 ccaThreshold, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeTxRatePolicy             	(TI_HANDLE hCmdBld, TTxRatePolicy *pTxRatePolicy, void *fCb, TI_HANDLE hCb);                                        
-TI_STATUS cmdBld_CfgIeRtsThreshold             	(TI_HANDLE hCmdBld, TI_UINT16 uRtsThreshold, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeDcoItrimParams            (TI_HANDLE hCmdBld, TI_BOOL enable, TI_UINT32 moderationTimeoutUsec, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeFragmentThreshold         (TI_HANDLE hCmdBld, TI_UINT16 uFragmentThreshold, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIePmConfig                  (TI_HANDLE hCmdBld, TI_UINT32 uHostClkSettlingTime, TI_UINT8 uHostFastWakeupSupport, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeTxCmpltPacing             (TI_HANDLE hCmdBld, TI_UINT16 uTxCompletePacingThreshold, TI_UINT16 uTxCompletePacingTimeout, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeRxIntrPacing              (TI_HANDLE hCmdBld, TI_UINT16 uRxIntrPacingThreshold, TI_UINT16 uRxIntrPacingTimeout, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeCtsProtection            	(TI_HANDLE hCmdBld, TI_UINT8 uCtsToSelf, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeBcnBrcOptions            	(TI_HANDLE hCmdBld, TPowerMgmtConfig *pPMConfig, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIePsWmm                    	(TI_HANDLE hCmdBld, TI_BOOL bEnableWA, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeRssiSnrTrigger           	(TI_HANDLE hCmdBld, RssiSnrTriggerCfg_t *pTriggerParam, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeRssiSnrWeights           	(TI_HANDLE hCmdBld, RssiSnrAverageWeights_t *pWeightsParam, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeTid                      	(TI_HANDLE hCmdBld, TQueueTrafficParams *pQtrafficParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeAcParams                 	(TI_HANDLE hCmdBld, TAcQosParams *pConfigureCommand, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIePsRxStreaming             (TI_HANDLE hCmdBld, TPsRxStreaming *pPsRxStreaming, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeMaxTxRetry               	(TI_HANDLE hCmdBld, TRroamingTriggerParams *pRoamingTriggerCmd, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeServicePeriodTimeout     	(TI_HANDLE hCmdBld, TRxTimeOut* pRxTimeOut, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeRxMsduLifeTime           	(TI_HANDLE hCmdBld, TI_UINT32 uRxMsduLifeTime, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeEnableRxDataFilter       	(TI_HANDLE hCmdBld, TI_BOOL enabled, filter_e eDefaultAction, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeRxDataFilter             	(TI_HANDLE hCmdBld, TI_UINT8 index, TI_UINT8 command, filter_e action, TI_UINT8 numFieldPatterns, TI_UINT8 lenFieldPatterns, TI_UINT8 *pFieldPatterns, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeBet                      	(TI_HANDLE hCmdBld, TI_UINT8 Enable, TI_UINT8 MaximumConsecutiveET, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeConfigureKeepAliveParams  (TI_HANDLE hCmdBld, TI_UINT8 uIndex, TI_UINT8 uEnaDisFlag, TI_UINT8 trigType, TI_UINT32 interval, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeConfigureKeepAliveEnaDis  (TI_HANDLE hCmdBld, TI_UINT8 enaDisFlag, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeSetBaSession              (TI_HANDLE hCmdBld, InfoElement_e eBaType, TI_UINT8 uTid, TI_UINT8 uState, TMacAddr tRa, TI_UINT16 uWinSize, TI_UINT16 uInactivityTimeout, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeSetFwHtCapabilities       (TI_HANDLE hCmdBld, TI_UINT32 uHtCapabilites, TMacAddr tMacAddress, TI_UINT8 uAmpduMaxLeng, TI_UINT8 uAmpduMinSpac, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeSetFwHtInformation        (TI_HANDLE hCmdBld, TI_UINT8 uRifsMode, TI_UINT8 uHtProtection, TI_UINT8 uGfProtection, TI_UINT8 uHtTxBurstLimit, TI_UINT8 uDualCtsProtection, void *fCb,TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeRadioParams               (TI_HANDLE hCmdBld, IniFileRadioParam *pIniFileRadioParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeExtendedRadioParams 		(TI_HANDLE hCmdBld, IniFileExtendedRadioParam *pIniFileExtRadioParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgPlatformGenParams           (TI_HANDLE hCmdBld, IniFileGeneralParam *pGenParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeCoexActivity              (TI_HANDLE hCmdBld, TCoexActivity *pCoexActivity, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeBurstMode 				(TI_HANDLE hCmdBld, TI_BOOL bEnabled, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CfgIeRateMngDbg 				(TI_HANDLE hCmdBld, RateMangeParams_t *pRateMngParams, void *fCb, TI_HANDLE hCb);
-#endif
-
diff --git a/wl1271/TWD/Ctrl/CmdBldCmd.c b/wl1271/TWD/Ctrl/CmdBldCmd.c
deleted file mode 100644
index 14e195d..0000000
--- a/wl1271/TWD/Ctrl/CmdBldCmd.c
+++ /dev/null
@@ -1,1689 +0,0 @@
-/*
- * CmdBldCmd.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  CmdBldCmd.c 
- *  \brief Command builder. Commands
- *
- *  \see   CmdBld.h 
- */
-
-#define __FILE_ID__  FILE_ID_93
-#include "tidef.h"
-#include "report.h"
-#include "TWDriverInternal.h"
-#include "CmdBld.h"
-#include "CmdBldCmdIE.h"
-#include "CmdBldCfgIE.h"
-#include "CmdQueue_api.h"
-#include "eventMbox_api.h"
-
-/* 
-    Rx filter field is mostly hard-coded.
-   This filter value basically pass only valid beacons / probe responses. For exact bit description,
-   consult either the DPG or the FPG (or both, and Yoel...)
-*/
-#define RX_FILTER_CFG_ (CFG_RX_PRSP_EN | CFG_RX_MGMT_EN | CFG_RX_BCN_EN | CFG_RX_RCTS_ACK | CFG_RX_CTL_EN)
-#define RX_CONFIG_OPTION (CFG_RX_RAW | CFG_RX_INT_FCS_ERROR | CFG_RX_WR_RX_STATUS | CFG_RX_TIMESTAMP_TSF)
-
-
-
-TI_STATUS cmdBld_CmdAddWepMappingKey 	(TI_HANDLE hCmdBld, TSecurityKeys* aSecurityKey, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdRemoveWepMappingKey (TI_HANDLE hCmdBld, TSecurityKeys* aSecurityKey, void *fCb, TI_HANDLE hCb);
-TI_UINT32 cmdBld_BuildPeriodicScanChannles  (TPeriodicScanParams *pPeriodicScanParams, ConnScanChannelInfo_t *pChannelList, EScanType eScanType, ERadioBand eRadioBand, TI_UINT32 uPassiveScanDfsDwellTime);
-
-
-/** 
- * \fn     cmdBld_CmdStartScan
- * \brief  Build a start scan command and send it to the FW
- * 
- * Build a start scan command and send it to the FW
- * 
- * \param  hCmdBld - handle to the command builder object
- * \param  pScanVals - scan parameters
- * \param  eScanTag - scan tag used for scan complete and result tracking
- * \param  fScanCommandResponseCB - command complete CB
- * \param  hCb - command complete CB
- * \return command status (OK / NOK)
- * \sa     cmdBld_CmdStopScan
- */ 
-TI_STATUS cmdBld_CmdStartScan (TI_HANDLE hCmdBld, TScanParams *pScanVals, EScanResultTag eScanTag, 
-                               TI_BOOL bHighPriority, void* ScanCommandResponseCB, TI_HANDLE hCb)
-{
-    TCmdBld   *pCmdBld = (TCmdBld *)hCmdBld;
-    BasicScanChannelParameters_t* chanPtr;
-    ScanParameters_t    tnetScanParams;
-    TI_UINT8*              pBSSID;
-    TI_INT32 i;
-
-   
-    /* Convert general scan data to tnet structure */
-    tnetScanParams.basicScanParameters.tidTrigger = pScanVals->Tid;
-    tnetScanParams.basicScanParameters.numOfProbRqst = pScanVals->probeReqNumber;
-    tnetScanParams.basicScanParameters.ssidLength = pScanVals->desiredSsid.len;
-    os_memoryCopy (pCmdBld->hOs, 
-                   (void *)tnetScanParams.basicScanParameters.ssidStr, 
-                   (void *)pScanVals->desiredSsid.str, 
-                   tnetScanParams.basicScanParameters.ssidLength);
-    
-    /* 
-        scan options field is composed of scan type and band selection. 
-        First, use the lookup table to convert the scan type 
-    */                  
-
-    tnetScanParams.basicScanParameters.scanOptions = 0;
-
-    switch ( pScanVals->scanType )
-    {
-    case SCAN_TYPE_NORMAL_ACTIVE : 
-        tnetScanParams.basicScanParameters.scanOptions = SCAN_ACTIVE;
-        break;
-    
-    case SCAN_TYPE_NORMAL_PASSIVE : 
-        tnetScanParams.basicScanParameters.scanOptions = SCAN_PASSIVE;
-        break;
-    
-    case SCAN_TYPE_TRIGGERED_ACTIVE :
-        tnetScanParams.basicScanParameters.scanOptions = SCAN_ACTIVE | TRIGGERED_SCAN;
-        break;
-    
-    case SCAN_TYPE_TRIGGERED_PASSIVE :
-        tnetScanParams.basicScanParameters.scanOptions = SCAN_PASSIVE | TRIGGERED_SCAN;
-        break;
-
-    default:
-        TRACE1( pCmdBld->hReport, REPORT_SEVERITY_ERROR, "Invalid scan type:%d\n", pScanVals->scanType);
-        return TI_NOK;
-    }
-
-    /* Add the band selection */
-    if ( RADIO_BAND_5_0_GHZ == pScanVals->band )
-    {
-        tnetScanParams.basicScanParameters.band = RADIO_BAND_5GHZ;
-    }
-    else
-    {
-        tnetScanParams.basicScanParameters.band = RADIO_BAND_2_4_GHZ;
-    }
-
-    /* Add high priority bit */
-    if ( bHighPriority )
-    {
-        tnetScanParams.basicScanParameters.scanOptions |= SCAN_PRIORITY_HIGH;
-    }
-
-    tnetScanParams.basicScanParameters.scanOptions = ENDIAN_HANDLE_WORD( tnetScanParams.basicScanParameters.scanOptions );
-
-    /* important note: BSSID filter (0x0010) is DISABLED, because the FW sets it according
-       to BSSID value (broadcast does not filter, any other value will */
-    tnetScanParams.basicScanParameters.rxCfg.ConfigOptions = ENDIAN_HANDLE_LONG(RX_CONFIG_OPTION) ;
-    tnetScanParams.basicScanParameters.rxCfg.FilterOptions = ENDIAN_HANDLE_LONG( RX_FILTER_CFG_ );
-
-    /* If the SSID is not broadcast SSID, filter according to SSID and local MAC address */
-    if (pScanVals->desiredSsid.len != 0)
-    {
-        tnetScanParams.basicScanParameters.rxCfg.ConfigOptions = ENDIAN_HANDLE_LONG(RX_CONFIG_OPTION | CFG_SSID_FILTER_EN | CFG_UNI_FILTER_EN) ;
-    }
-    /* Rate conversion is done in the HAL */
-    cmdBld_ConvertAppRatesBitmap (pScanVals->probeRequestRate, 
-                                     0, 
-                                     &tnetScanParams.basicScanParameters.txdRateSet);
-
-    tnetScanParams.basicScanParameters.txdRateSet = ENDIAN_HANDLE_LONG( tnetScanParams.basicScanParameters.txdRateSet );
-    tnetScanParams.basicScanParameters.numChannels = ENDIAN_HANDLE_WORD( pScanVals->numOfChannels );
-
-    /* scan result tag */
-    tnetScanParams.basicScanParameters.scanTag = eScanTag;
-
-    /* copy channel specific scan data to HAL structure */
-    for ( i = 0; i < pScanVals->numOfChannels; i++ )
-    {
-        TI_INT32 j;
-        TI_UINT8*  macAddr;
-
-        macAddr = (TI_UINT8*)&tnetScanParams.basicScanChannelParameters[ i ].bssIdL;
-
-        /* copy the MAC address, upside down (CHIP structure) */
-        for ( j = 0; j < MAC_ADDR_LEN; j++ )
-        {
-            macAddr[ j ] = pScanVals->channelEntry[ i ].normalChannelEntry.bssId[ MAC_ADDR_LEN - 1 - j ];
-        }
-        tnetScanParams.basicScanChannelParameters[ i ].scanMinDuration = 
-            ENDIAN_HANDLE_LONG( pScanVals->channelEntry[ i ].normalChannelEntry.minChannelDwellTime );
-        tnetScanParams.basicScanChannelParameters[ i ].scanMaxDuration = 
-            ENDIAN_HANDLE_LONG( pScanVals->channelEntry[ i ].normalChannelEntry.maxChannelDwellTime );
-        tnetScanParams.basicScanChannelParameters[ i ].ETCondCount = 
-            pScanVals->channelEntry[ i ].normalChannelEntry.ETMaxNumOfAPframes |
-            pScanVals->channelEntry[ i ].normalChannelEntry.earlyTerminationEvent;
-        tnetScanParams.basicScanChannelParameters[ i ].txPowerAttenuation = 
-            pScanVals->channelEntry[ i ].normalChannelEntry.txPowerDbm;
-        tnetScanParams.basicScanChannelParameters[ i ].channel = 
-            pScanVals->channelEntry[ i ].normalChannelEntry.channel;
-    }
-
-    TRACE7(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "RxCfg = 0x%x\n                             RxFilterCfg = 0x%x\n                             scanOptions = 0x%x\n                             numChannels = %d\n                             probeNumber = %d\n                             probeRateModulation = 0x%x\n                             tidTrigger = %d\n" ,                               tnetScanParams.basicScanParameters.rxCfg.ConfigOptions,                               tnetScanParams.basicScanParameters.rxCfg.FilterOptions,                              tnetScanParams.basicScanParameters.scanOptions,                               tnetScanParams.basicScanParameters.numChannels,                               tnetScanParams.basicScanParameters.numOfProbRqst,                              tnetScanParams.basicScanParameters.txdRateSet,                               tnetScanParams.basicScanParameters.tidTrigger);
-    
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Channel      BSSID           MinTime     MaxTime     ET     TxPower   probChan\n");
-   
-    for( i=0; i < pScanVals->numOfChannels; i++)
-    {
-        chanPtr = &tnetScanParams.basicScanChannelParameters[i];
-        pBSSID = (TI_UINT8*)&chanPtr->bssIdL;
-
- 		TRACE12(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "%06d   %02x:%02x:%02x:%02x:%02x:%02x    %05d %05d %02d %05d %05d\n",i, pBSSID[5],pBSSID[4],pBSSID[3],pBSSID[2],pBSSID[1],pBSSID[0], chanPtr->scanMinDuration, chanPtr->scanMaxDuration, chanPtr->ETCondCount, chanPtr->txPowerAttenuation, chanPtr->channel);
-    }
-
-    return cmdBld_CmdIeStartScan (hCmdBld, &tnetScanParams, ScanCommandResponseCB, hCb);
-}
-
-/** 
- * \fn     cmdBld_CmdStartSPSScan
- * \brief  Build a start SPS scan command and send it to the FW
- * 
- * Build a start SPS scan command and send it to the FW
- * 
- * \param  hCmdBld - handle to the command builder object
- * \param  pScanVals - scan parameters
- * \param  eScanTag - scan tag used for scan complete and result tracking
- * \param  fScanCommandResponseCB - command complete CB
- * \param  hCb - command complete CB
- * \return command status (OK / NOK)
- * \sa     cmdBld_CmdStopSPSScan
- */ 
-TI_STATUS cmdBld_CmdStartSPSScan (TI_HANDLE hCmdBld, TScanParams *pScanVals, EScanResultTag eScanTag, 
-                                  void* fScanCommandResponseCB, TI_HANDLE hCb)
-{
-    TCmdBld  *pCmdBld = (TCmdBld *)hCmdBld;
-    ScheduledScanParameters_t   tnetSPSScanParams;
-    TI_INT32 i;
-
-    /* Convert general scan data to TNET structure */
-    tnetSPSScanParams.scheduledGeneralParameters.scanOptions = SCAN_PASSIVE;
-    /* Add the band selection */
-    if ( RADIO_BAND_5_0_GHZ == pScanVals->band )
-    {
-        tnetSPSScanParams.scheduledGeneralParameters.band = RADIO_BAND_5GHZ;
-    }
-    else
-    {
-        tnetSPSScanParams.scheduledGeneralParameters.band = RADIO_BAND_2_4_GHZ;
-    }
-
-
-    tnetSPSScanParams.scheduledGeneralParameters.scanOptions = ENDIAN_HANDLE_WORD( tnetSPSScanParams.scheduledGeneralParameters.scanOptions );
-
-    /* important note: BSSID filter (0x0010) is DISABLED, because the FW sets it according
-       to BSSID value (broadcast does not filter, any other value will */
-    /* If the SSID is not broadcast SSID, also filter according to SSID */
-    tnetSPSScanParams.scheduledGeneralParameters.rxCfg.ConfigOptions = ENDIAN_HANDLE_LONG(RX_CONFIG_OPTION);
-    tnetSPSScanParams.scheduledGeneralParameters.rxCfg.FilterOptions = ENDIAN_HANDLE_LONG( RX_FILTER_CFG_ );
-    tnetSPSScanParams.scheduledGeneralParameters.rxCfg.ConfigOptions = ENDIAN_HANDLE_LONG( tnetSPSScanParams.scheduledGeneralParameters.rxCfg.ConfigOptions );
-
-    /* latest TSF value - used to discover TSF error (AP recovery) */
-    tnetSPSScanParams.scheduledGeneralParameters.scanCmdTime_h = ENDIAN_HANDLE_LONG( INT64_HIGHER(pScanVals->latestTSFValue) );
-    tnetSPSScanParams.scheduledGeneralParameters.scanCmdTime_l = ENDIAN_HANDLE_LONG( INT64_LOWER(pScanVals->latestTSFValue) );
-
-    /* add scan tag */
-    tnetSPSScanParams.scheduledGeneralParameters.scanTag = eScanTag;
-
-    tnetSPSScanParams.scheduledGeneralParameters.numChannels = pScanVals->numOfChannels;
-
-    /* copy channel specific scan data to HAL structure */
-    for ( i = 0; i < pScanVals->numOfChannels; i++ )
-    {
-        TI_INT32 j;
-        TI_UINT8*  macAddr;
-
-        macAddr = (TI_UINT8*)&tnetSPSScanParams.scheduledChannelParameters[ i ].bssIdL;
-
-        /* copy the MAC address, upside down (CHIP structure) */
-        for ( j = 0; j < MAC_ADDR_LEN; j++ )
-        {
-            macAddr[ j ] = pScanVals->channelEntry[ i ].normalChannelEntry.bssId[ MAC_ADDR_LEN - 1 - j ];
-        }
-        tnetSPSScanParams.scheduledChannelParameters[ i ].scanMaxDuration = 
-            ENDIAN_HANDLE_LONG( pScanVals->channelEntry[ i ].SPSChannelEntry.scanDuration );
-        tnetSPSScanParams.scheduledChannelParameters[ i ].scanStartTime = 
-            ENDIAN_HANDLE_LONG( pScanVals->channelEntry[ i ].SPSChannelEntry.scanStartTime );
-        tnetSPSScanParams.scheduledChannelParameters[ i ].ETCondCount =
-            pScanVals->channelEntry[ i ].SPSChannelEntry.ETMaxNumOfAPframes | 
-            pScanVals->channelEntry[ i ].SPSChannelEntry.earlyTerminationEvent;
-        tnetSPSScanParams.scheduledChannelParameters[ i ].channel = 
-            pScanVals->channelEntry[ i ].SPSChannelEntry.channel;
-    }
-
-    TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "RxCfg = 0x%x\n                             RxFilterCfg = 0x%x\n                             scanOptions = 0x%x\n                             numChannels = %d\n", tnetSPSScanParams.scheduledGeneralParameters.rxCfg.ConfigOptions, tnetSPSScanParams.scheduledGeneralParameters.rxCfg.FilterOptions, tnetSPSScanParams.scheduledGeneralParameters.scanOptions, tnetSPSScanParams.scheduledGeneralParameters.numChannels);
-    
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Channel      BSSID           StartTime     Duration     ET     probChan\n");
-   
-#ifdef TI_DBG
-    for( i=0; i < tnetSPSScanParams.scheduledGeneralParameters.numChannels; i++)
-    {
-        ScheduledChannelParameters_t* chanPtr = &tnetSPSScanParams.scheduledChannelParameters[ i ];
-        TI_UINT8* pBSSID = (TI_UINT8*)&chanPtr->bssIdL;
-
-        TRACE11(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "%6d   %02x:%02x:%02x:%02x:%02x:%02x    %5d %5d %2d %5d\n",i, pBSSID[5],pBSSID[4],pBSSID[3],pBSSID[2],pBSSID[1],pBSSID[0], chanPtr->scanStartTime, chanPtr->scanMaxDuration, chanPtr->ETCondCount, chanPtr->channel);
-    }
-#endif /* TI_DBG */
-
-    return cmdBld_CmdIeStartSPSScan (hCmdBld, &tnetSPSScanParams, fScanCommandResponseCB, hCb);
-}
-
-/** 
- * \fn     cmdBld_CmdStopScan
- * \brief  Build a stop scan command and send it to FW
- * 
- * Build a stop scan command and send it to FW
- * 
- * \param  hCmdBld - handle to the command builder object
- * \param  eScanTag - scan tag, used for scan complete and result tracking
- * \return command status (OK / NOK)
- * \sa     cmdBld_CmdStartSPSScan
- */ 
-TI_STATUS cmdBld_CmdStopScan (TI_HANDLE hCmdBld, EScanResultTag eScanTag, 
-                              void *fScanCommandResponseCB, TI_HANDLE hCb)
-{
-    return cmdBld_CmdIeStopScan (hCmdBld, fScanCommandResponseCB, hCb);
-}
-
-
-/** 
- * \fn     cmdBld_CmdStopSPSScan
- * \brief  Build a stop SPS scan command and send it to FW
- * 
- * Build a stop SPS scan command and send it to FW
- * 
- * \param  hCmdBld - handle to the command builder object
- * \param  eScanTag - scan tag, used for scan complete and result tracking
- * \return command status (OK / NOK)
- * \sa     cmdBld_CmdStartScan
- */ TI_STATUS cmdBld_CmdStopSPSScan (TI_HANDLE hCmdBld, EScanResultTag eScanTag, 
-                                 void* fScanCommandResponseCB, TI_HANDLE hCb)
-{
-    return cmdBld_CmdIeStopSPSScan (hCmdBld, fScanCommandResponseCB, hCb);
-}
-
-TI_STATUS cmdBld_CmdSetSplitScanTimeOut (TI_HANDLE hCmdBld, TI_UINT32 uTimeOut)
-{
-    DB_WLAN(hCmdBld).uSlicedScanTimeOut = uTimeOut;
-
-	return cmdBld_CmdIeSetSplitScanTimeOut (hCmdBld, uTimeOut, NULL, NULL);
-}
-
-/** 
- * \fn     cmdBld_debugPrintPeriodicScanChannles 
- * \brief  Print periodic scan channel list for debug purposes
- * 
- * Print periodic scan channel list for debug purposes
- * 
- * \param  hCmdBld - handle to the command builder object
- * \param  pChannel - pointer to the channel list to print
- * \param  uChannelCount - number of channles to print
- * \return None
- * \sa     cmdBld_debugPrintPeriodicScanParams
- */ 
-void cmdBld_debugPrintPeriodicScanChannles (TI_HANDLE hCmdBld, ConnScanChannelInfo_t* pChannel,
-                                            TI_UINT32 uChannelCount)
-{
-    TCmdBld                 *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT32               uIndex;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Index  Channel  MinTime  MaxTime  DFStime  PowerLevel\n");
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "-------------------------------------------------------------------\n");
-    for (uIndex = 0; uIndex <  uChannelCount; uIndex++)
-    {
-        TRACE6(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "%-10d %-10d %-10d %-10d %-10d %-11d\n", uIndex, pChannel[ uIndex ].channel, pChannel[ uIndex ].scanMinDuration, pChannel[ uIndex ].scanMaxDuration, pChannel[ uIndex ].passiveScanDuration, pChannel[ uIndex ].txPowerLevelDbm);
-    }
-}
-
-/** 
- * \fn     cmdBld_debugPrintPeriodicScanParams 
- * \brief  Print periodic scan parameters for debug purposes
- * 
- * Print periodic scan parameters for debug purposes
- * 
- * \param  hCmdBld - handle to the command builder object
- * \param  pCommand - pointer to the periodic scan command to print
- * \return None
- * \sa     cmdBld_debugPrintPeriodicScanChannles
- */ 
-void cmdBld_debugPrintPeriodicScanParams (TI_HANDLE hCmdBld, ConnScanParameters_t* pCommand)
-{
-    TCmdBld                 *pCmdBld = (TCmdBld *)hCmdBld;
-
-    /* print periodic scan params command */
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Cycle intervals:\n");
-    TRACE8(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "0:  %-6d %-6d %-6d %-6d %-6d %-6d %-6d %-6d\n", pCommand->cycleIntervals[ 0 ], pCommand->cycleIntervals[ 1 ], pCommand->cycleIntervals[ 2 ], pCommand->cycleIntervals[ 3 ], pCommand->cycleIntervals[ 4 ], pCommand->cycleIntervals[ 5 ], pCommand->cycleIntervals[ 6 ], pCommand->cycleIntervals[ 7 ]);
-    TRACE8(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "8:  %-6d %-6d %-6d %-6d %-6d %-6d %-6d %-6d\n", pCommand->cycleIntervals[ 8 ], pCommand->cycleIntervals[ 9 ], pCommand->cycleIntervals[ 10 ], pCommand->cycleIntervals[ 11 ], pCommand->cycleIntervals[ 12 ], pCommand->cycleIntervals[ 13 ], pCommand->cycleIntervals[ 14 ], pCommand->cycleIntervals[ 15 ]);
-    TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "RSSI threshold: %d, SNR threshold: %d, number of cycles: %d, reporth threshold: %d\n", pCommand->rssiThreshold, pCommand->snrThreshold, pCommand->maxNumOfCycles, pCommand->reportThreshold);
-    TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Terminate on report: %d, result tag: %d, BSS type: %d, number of probe requests: %d\n", pCommand->terminateOnReport, pCommand->resultsTag, pCommand->bssType, pCommand->numProbe);
-    TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "SSID filter type: %d, SSID length: %d, SSID: \n", pCommand->ssidFilterType, pCommand->ssidLength);
-    /* print channel info */
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "2.4 GHz Channels:\n");
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "-----------------\n");
-    TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Number of passive channels: %d, number of active channels: %d\n", pCommand->numOfPassive[ 0 ], pCommand->numOfActive[ 0 ]);
-    cmdBld_debugPrintPeriodicScanChannles (hCmdBld, &(pCommand->channelList[ 0 ]),
-                                           pCommand->numOfPassive[ 0 ] + 
-                                           pCommand->numOfActive[ 0 ]);
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "5.0 GHz Channels:\n");
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "-----------------\n");
-    TRACE3(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Number of passive channels: %d, number of DFS channels: %d, number of active channels: %d\n", pCommand->numOfPassive[ 1 ], pCommand->numOfDfs, pCommand->numOfActive[ 2 ]);
-    cmdBld_debugPrintPeriodicScanChannles (hCmdBld, &(pCommand->channelList[ CONN_SCAN_MAX_CHANNELS_BG ]),
-                                           pCommand->numOfPassive[ 1 ] + 
-                                           pCommand->numOfActive[ 1 ] +
-                                           pCommand->numOfDfs);
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "4.9 GHz channles:\n");
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "-----------------\n");
-    TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Number of passive channels: %d, number of active channels: %d\n", pCommand->numOfPassive[ 2 ], pCommand->numOfActive[ 2 ]);
-    cmdBld_debugPrintPeriodicScanChannles (hCmdBld, &(pCommand->channelList[ CONN_SCAN_MAX_CHANNELS_BG + CONN_SCAN_MAX_CHANNELS_A ]),
-                                           pCommand->numOfPassive[ 2 ] + 
-                                           pCommand->numOfActive[ 2 ]);
-}
-
-/** 
- * \fn     cmdBld_debugPrintPeriodicScanSsidList 
- * \brief  Print periodic scan SSID list for debug purposes
- * 
- * Print periodic scan SSID list for debug purposes
- * 
- * \param  hCmdBld - handle to the command builder object
- * \param  pCommand - pointer to the periodic scan SSID list command to print
- * \return None
- * \sa     cmdBld_debugPrintPeriodicScanParams
- */ 
-void cmdBld_debugPrintPeriodicScanSsidList (TI_HANDLE hCmdBld, ConnScanSSIDList_t* pCommand)
-{
-    TCmdBld                 *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT32               uIndex;
-
-    /* print SSID list command */
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "SSID list:\n");
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "---------\n");
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Num of entries: %d\n", pCommand->numOfSSIDEntries);
-    for (uIndex = 0; uIndex < pCommand->numOfSSIDEntries; uIndex++)
-    {
-        TRACE3(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "index: %d, SSID type: %d, SSID length:% d, SSID string:\n", uIndex, pCommand->SSIDList[ uIndex ].ssidType, pCommand->SSIDList[ uIndex ].ssidLength);
-    }
-
-}
-
-/** 
- * \fn     cmdBld_BuildPeriodicScanChannlesn 
- * \brief  Copy channels info for periodic scan to FW structure for a specific band and scan type 
- * 
- * Copy channels info, from driver structure, to FW structure, for periodic scan, for a specific
- * band and scan type.
- * 
- * \param  pPeriodicScanParams - driver priodic scan parameters (source)
- * \param  pChannelList - FW scan channel list (destination)
- * \param  eScanType - scan type (passive or active)
- * \param  eRadioBand - band (G, A or J)
- * \param  uPassiveScanDfsDwellTime - Dwell time for passive scan on DFS channels (in milli-secs)
- * \return Number of channels found for this scan type and band
- * \sa     cmdBld_StartPeriodicScan 
- */ 
-TI_UINT32 cmdBld_BuildPeriodicScanChannles (TPeriodicScanParams *pPeriodicScanParams, 
-                                            ConnScanChannelInfo_t *pChannelList,
-                                            EScanType eScanType, ERadioBand eRadioBand,
-                                            TI_UINT32 uPassiveScanDfsDwellTime)
-{
-    TI_UINT32       uIndex, uNumChannels = 0;
-
-    /* check all channels */
-    for (uIndex = 0; uIndex < pPeriodicScanParams->uChannelNum; uIndex++)
-    {
-        /* if this channel is on the required band and uses the required scan type */
-        if ((eRadioBand == pPeriodicScanParams->tChannels[ uIndex ].eBand) &&
-            (eScanType == pPeriodicScanParams->tChannels[ uIndex ].eScanType))
-        {
-            /* update scan parameters */
-            pChannelList[ uNumChannels ].channel = (TI_UINT8)pPeriodicScanParams->tChannels[ uIndex ].uChannel;
-            pChannelList[ uNumChannels ].scanMaxDuration = 
-                ENDIAN_HANDLE_WORD ((TI_UINT16)pPeriodicScanParams->tChannels[ uIndex ].uMaxDwellTimeMs);
-            pChannelList[ uNumChannels ].scanMinDuration = 
-                ENDIAN_HANDLE_WORD ((TI_UINT16)pPeriodicScanParams->tChannels[ uIndex ].uMinDwellTimeMs);
-            pChannelList[ uNumChannels ].txPowerLevelDbm = (TI_UINT8)pPeriodicScanParams->tChannels[ uIndex ].uTxPowerLevelDbm;
-            if (SCAN_TYPE_PACTSIVE == eScanType) /* DFS channel */
-            {
-                pChannelList[ uNumChannels ].passiveScanDuration = ENDIAN_HANDLE_WORD ((TI_UINT16)uPassiveScanDfsDwellTime);
-                pChannelList[ uNumChannels ].channelFlags = 1; /* mark as DFS channel */
-            }
-            else
-            {
-                pChannelList[ uNumChannels ].passiveScanDuration = ENDIAN_HANDLE_WORD ((TI_UINT16)pPeriodicScanParams->tChannels[ uIndex ].uMaxDwellTimeMs);
-                pChannelList[ uNumChannels ].channelFlags = 0; /* mark as not DFS channel */
-            }
-
-            /* advance mathcing channel counter */
-            uNumChannels++;
-        }
-    }
-
-    /* return channel count */
-    return uNumChannels;
-}
-
-/** 
- * \fn     cmdBld_StartPeriodicScan 
- * \brief  Copy driver periodic scan parameters to FW structures and send all commands to FW
- * 
- * Copy driver periodic scan parameters to FW structures (SSID list, parameters including channels
- * and start command) and send all commands to FW.
- * 
- * \param  hCmdBld - handle to the command builder object
- * \param  pPeriodicScanParams - periodic scan driver parameters (source)
- * \param  eScanTag - scan tag, used for scan complete and result tracking
- * \param  uPassiveScanDfsDwellTimeUs - Passive dwell time for DFS channels
- * \param  fScanCommandResponseCB - scan command complete CB
- * \param  hCb - scan command response handle
- * \return TI_OK on success, other codes indicate failure
- * \sa     cmdBld_BuildPeriodicScanChannles, cmdBld_StopPeriodicScan
- */ 
-TI_STATUS cmdBld_StartPeriodicScan (TI_HANDLE hCmdBld, TPeriodicScanParams *pPeriodicScanParams,
-                                    EScanResultTag eScanTag, TI_UINT32 uPassiveScanDfsDwellTimeMs,
-                                    void* fScanCommandResponseCB, TI_HANDLE hCb)
-{
-    TCmdBld                         *pCmdBld = (TCmdBld *)hCmdBld;
-    ConnScanParameters_t            tFWPeriodicScanParams;
-    ConnScanSSIDList_t              *pFWSsidList;
-    PeriodicScanTag                 tScanStart;
-    TI_UINT32                       uIndex;
-    TI_STATUS                       tStatus;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Building start periodic scan commands:\n");
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "--------------------------------------\n");
-    /* copy parameters to FW structure */
-    tFWPeriodicScanParams.bssType = (ScanBssType_e)pPeriodicScanParams->eBssType;
-    for (uIndex = 0; uIndex < PERIODIC_SCAN_MAX_INTERVAL_NUM; uIndex ++)
-    {
-        tFWPeriodicScanParams.cycleIntervals[ uIndex ] = 
-            ENDIAN_HANDLE_LONG (pPeriodicScanParams->uCycleIntervalMsec[ uIndex ]);
-    }
-    tFWPeriodicScanParams.maxNumOfCycles = (TI_UINT8)pPeriodicScanParams->uCycleNum;
-    tFWPeriodicScanParams.numProbe = (TI_UINT8)pPeriodicScanParams->uProbeRequestNum;
-    tFWPeriodicScanParams.reportThreshold = (TI_UINT8)pPeriodicScanParams->uFrameCountReportThreshold;
-    tFWPeriodicScanParams.rssiThreshold = (TI_UINT8)pPeriodicScanParams->iRssiThreshold;
-    tFWPeriodicScanParams.snrThreshold = (TI_INT8)pPeriodicScanParams->iSnrThreshold;
-    tFWPeriodicScanParams.terminateOnReport = (TI_UINT8)pPeriodicScanParams->bTerminateOnReport;
-    tFWPeriodicScanParams.resultsTag = (TI_UINT8)eScanTag;
-    switch (pPeriodicScanParams->uSsidNum)
-    {
-    case 0: /* No SSIDs defined - no need to filter according to SSID */
-        tFWPeriodicScanParams.ssidFilterType = (ScanSsidFilterType_e)SCAN_SSID_FILTER_TYPE_ANY;
-        tFWPeriodicScanParams.ssidLength = 0;
-        break;
-
-    default: /* More than one SSID - copy SSIDs to SSID list command */
-        pFWSsidList = os_memoryAlloc(pCmdBld->hOs, sizeof(ConnScanSSIDList_t));
-        if (!pFWSsidList)
-        {
-            return TI_NOK;
-        }
-
-        if ((TI_UINT8)pPeriodicScanParams->uSsidListFilterEnabled == 1)
-	        tFWPeriodicScanParams.ssidFilterType = (ScanSsidFilterType_e)SCAN_SSID_FILTER_TYPE_LIST;
-		else
-	        tFWPeriodicScanParams.ssidFilterType = (ScanSsidFilterType_e)SCAN_SSID_FILTER_TYPE_LIST_FILTER_DISABLED;
-        tFWPeriodicScanParams.ssidLength = 0;
-        pFWSsidList->numOfSSIDEntries = (TI_UINT8)pPeriodicScanParams->uSsidNum;
-        for (uIndex = 0; uIndex < pPeriodicScanParams->uSsidNum; uIndex++)
-        {
-            pFWSsidList->SSIDList[ uIndex ].ssidType = 
-                (TI_UINT8)pPeriodicScanParams->tDesiredSsid[ uIndex ].eVisability;
-            pFWSsidList->SSIDList[ uIndex ].ssidLength = 
-                (TI_UINT8)pPeriodicScanParams->tDesiredSsid[ uIndex ].tSsid.len;
-            os_memoryCopy (pCmdBld->hOs, (void*)&(pFWSsidList->SSIDList[ uIndex ].ssid[ 0 ]),
-                           (void*)&(pPeriodicScanParams->tDesiredSsid[ uIndex ].tSsid.str[ 0 ]),
-                           pFWSsidList->SSIDList[ uIndex ].ssidLength);
-        }
-
-        /* print the SSID list parameters */
-        cmdBld_debugPrintPeriodicScanSsidList (hCmdBld, pFWSsidList);
-
-        /* send the SSID list command */
-        tStatus = cmdBld_CmdIeScanSsidList (hCmdBld, pFWSsidList, NULL, NULL);
-        os_memoryFree(pCmdBld->hOs, pFWSsidList, sizeof(ConnScanSSIDList_t));
-        if (TI_OK != tStatus)
-        {
-            TRACE1(pCmdBld->hReport, REPORT_SEVERITY_ERROR , "cmdBld_StartPeriodicScan: status %d when configuring SSID list", tStatus);
-            return tStatus;
-        }
-        break;
-    }
-
-    /* copy channels */
-    tFWPeriodicScanParams.numOfPassive[ 0 ] =  /* build passive B/G channels */
-        cmdBld_BuildPeriodicScanChannles (pPeriodicScanParams, &(tFWPeriodicScanParams.channelList[ 0 ]),
-                                          SCAN_TYPE_NORMAL_PASSIVE, RADIO_BAND_2_4_GHZ, uPassiveScanDfsDwellTimeMs);
-    tFWPeriodicScanParams.numOfActive[ 0 ] = /* build active B/G channels */
-        cmdBld_BuildPeriodicScanChannles (pPeriodicScanParams, &(tFWPeriodicScanParams.channelList[ tFWPeriodicScanParams.numOfPassive[ 0 ] ]),
-                                          SCAN_TYPE_NORMAL_ACTIVE, RADIO_BAND_2_4_GHZ, uPassiveScanDfsDwellTimeMs);
-    tFWPeriodicScanParams.numOfPassive[ 1 ] = /* build passive A channels */
-        cmdBld_BuildPeriodicScanChannles (pPeriodicScanParams, &(tFWPeriodicScanParams.channelList[ CONN_SCAN_MAX_CHANNELS_BG ]),
-                                          SCAN_TYPE_NORMAL_PASSIVE, RADIO_BAND_5_0_GHZ, uPassiveScanDfsDwellTimeMs);
-    tFWPeriodicScanParams.numOfDfs = /* build DFS A channels */
-        cmdBld_BuildPeriodicScanChannles (pPeriodicScanParams, &(tFWPeriodicScanParams.channelList[ CONN_SCAN_MAX_CHANNELS_BG + tFWPeriodicScanParams.numOfPassive[ 1 ] ]),
-                                          SCAN_TYPE_PACTSIVE, RADIO_BAND_5_0_GHZ, uPassiveScanDfsDwellTimeMs);
-    tFWPeriodicScanParams.numOfActive[ 1 ] = /* build active A channels */
-        cmdBld_BuildPeriodicScanChannles (pPeriodicScanParams, &(tFWPeriodicScanParams.channelList[ CONN_SCAN_MAX_CHANNELS_BG + tFWPeriodicScanParams.numOfPassive[ 1 ] + tFWPeriodicScanParams.numOfDfs ]),
-                                          SCAN_TYPE_NORMAL_ACTIVE, RADIO_BAND_5_0_GHZ, uPassiveScanDfsDwellTimeMs);
-
-    /* until J is supported, mark zero channels for J passive and active */
-    tFWPeriodicScanParams.numOfPassive[ 2 ] = 0;
-    tFWPeriodicScanParams.numOfActive[ 2 ] = 0;
-
-    /* print the command */
-    cmdBld_debugPrintPeriodicScanParams (hCmdBld, &tFWPeriodicScanParams);
-
-    /* Send the periodic scan parameters command */
-    tStatus = cmdBld_CmdIePeriodicScanParams (hCmdBld, &tFWPeriodicScanParams, NULL, NULL);
-    if (TI_OK != tStatus)
-    {
-        TRACE1(pCmdBld->hReport, REPORT_SEVERITY_ERROR , "cmdBld_StartPeriodicScan: status %d when configuring periodic scan parameters", tStatus);
-        return tStatus;
-    }
-
-    /* send the periodic scan start command */
-    tScanStart.scanTag = eScanTag;
-    tStatus = cmdBld_CmdIeStartPeriodicScan (hCmdBld, &tScanStart, fScanCommandResponseCB, hCb);
-    return tStatus;
-}
-
-/** 
- * \fn     cmdBld_StopPeriodicScan 
- * \brief  Stops an on-going periodic scan operation
- * 
- * Stops an on-going periodic scan operation 
- * 
- * \param  hCmdBld - handle to the command builder object
- * \param  eScanTag - scan tag, used for scan complete and result tracking
- * \param  fScanCommandResponseCB - scan command complete CB
- * \param  hCb - scan command response handle
- * \return TI_OK on success, other codes indicate failure
- * \sa     cmdBld_BuildPeriodicScanChannles, cmdBld_StartPeriodicScan
- */ 
-TI_STATUS cmdBld_StopPeriodicScan (TI_HANDLE hCmdBld, EScanResultTag eScanTag, 
-                                   void* fScanCommandResponseCB, TI_HANDLE hCb)
-{
-    PeriodicScanTag tScanStop;
-
-    /* send the periodic scan stop command */
-    tScanStop.scanTag = eScanTag;
-    return cmdBld_CmdIeStopPeriodicScan (hCmdBld, &tScanStop, fScanCommandResponseCB, hCb);
-}
-
-/****************************************************************************
- *                      cmdBld_SetBssType()
- ****************************************************************************
- * DESCRIPTION: Set Bss type, set RxFilter 
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-static TI_STATUS cmdBld_CmdSetBssType (TI_HANDLE hCmdBld, ScanBssType_e BssType, TI_UINT8 *HwBssType)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    switch (BssType)
-    {
-    case BSS_INFRASTRUCTURE:
-        DB_BSS(hCmdBld).BssType = BSS_TYPE_STA_BSS;
-        cmdBld_SetRxFilter (hCmdBld, RX_CONFIG_OPTION_FOR_JOIN, RX_FILTER_OPTION_JOIN);
-        break;
-
-    case BSS_INDEPENDENT:
-        DB_BSS(hCmdBld).BssType = BSS_TYPE_IBSS;
-        cmdBld_SetRxFilter (hCmdBld, RX_CONFIG_OPTION_FOR_IBSS_JOIN, RX_FILTER_OPTION_DEF);
-        break;
-
-    default: 
-        TRACE1(pCmdBld->hReport, REPORT_SEVERITY_FATAL_ERROR, "cmdBld_SetBssType: FATAL_ERROR, unknown BssType %d\n", BssType);
-        return TI_NOK;
-    }
-
-    *HwBssType = DB_BSS(hCmdBld).BssType;
-
-    return TI_OK;
-}
-
-
-/****************************************************************************
- *                      cmdBld_StartJoin()
- ****************************************************************************
- * DESCRIPTION: Enable Rx/Tx and send Start/Join command 
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdStartJoin (TI_HANDLE hCmdBld, ScanBssType_e BssType, void *fJoinCompleteCB, TI_HANDLE hCb)
-{
-    TI_UINT8  HwBssType = 0;
-#ifdef TI_DBG  
-    TCmdBld  *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT8 *pBssId = DB_BSS(hCmdBld).BssId;
-
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INIT, "cmdBld_StartJoin: Enable Tx, Rx and Start the Bss, type=%d\n", BssType);
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INIT, "------------------------------------------------------------\n");
-    TRACE7(pCmdBld->hReport, REPORT_SEVERITY_INIT, "START/JOIN, SSID=, BSSID=%02X-%02X-%02X-%02X-%02X-%02X, Chan=%d\n", pBssId[0], pBssId[1], pBssId[2], pBssId[3], pBssId[4], pBssId[5], DB_BSS(hCmdBld).RadioChannel);
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INIT, "------------------------------------------------------------\n");
-#endif /* TI_DBG */
-
-    /*
-     * set RxFilter (but don't write it to the FW, this is done in the join command),
-     * Configure templates content, ...
-     */
-    cmdBld_CmdSetBssType (hCmdBld, BssType, &HwBssType);
-
-    return cmdBld_CmdIeStartBss (hCmdBld, HwBssType, fJoinCompleteCB, hCb);
-}
-
-
-TI_STATUS cmdBld_CmdJoinBss (TI_HANDLE hCmdBld, TJoinBss *pJoinBssParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld        *pCmdBld = (TCmdBld *)hCmdBld;
-    TWlanParams    *pWlanParams = &DB_WLAN(hCmdBld);
-    TBssInfoParams *pBssInfoParams = &DB_BSS(hCmdBld);
-#ifdef TI_DBG
-    TI_UINT8 dbgSsidStr[33];
-#endif /* TI_DBG */
-
-    /* for debug purpose, can be removed later*/
-    if (pJoinBssParams->ssidLength > 32)
-        pJoinBssParams->ssidLength = 32;
-
-    /* Update Tx-Session-Counter in the Ctrl field of the Join command. */
-    pBssInfoParams->Ctrl &= ~JOIN_CMD_CTRL_TX_SESSION;
-    pBssInfoParams->Ctrl |= (TI_UINT8)(pJoinBssParams->txSessionCount << JOIN_CMD_CTRL_OFFSET_TX_SESSION);
-
-#ifdef TI_DBG
-    os_memoryCopy (pCmdBld->hOs, (void *)dbgSsidStr, (void *)pJoinBssParams->pSSID, pJoinBssParams->ssidLength);
-    dbgSsidStr[pJoinBssParams->ssidLength] = '\0';
-
-    TRACE14(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "TWD_JoinBss : bssType = %d, beaconInterval = %d, dtimInterval = %d, channel = %d, BSSID = %x-%x-%x-%x-%x-%x, ssidLength = %d, basicRateSet = 0x%x, RadioBand = %d, Ctrl = 0x%x", pJoinBssParams->bssType, pJoinBssParams->beaconInterval, pJoinBssParams->dtimInterval, pJoinBssParams->channel, pJoinBssParams->pBSSID[0], pJoinBssParams->pBSSID[1], pJoinBssParams->pBSSID[2], pJoinBssParams->pBSSID[3], pJoinBssParams->pBSSID[4], pJoinBssParams->pBSSID[5], pJoinBssParams->ssidLength, pJoinBssParams->basicRateSet, pJoinBssParams->radioBand, pBssInfoParams->Ctrl);
-#endif /* TI_DBG */
-    /*
-     * save Bss info parameters
-     */
-    DB_BSS(hCmdBld).ReqBssType = pJoinBssParams->bssType;
-    MAC_COPY (DB_BSS(hCmdBld).BssId, pJoinBssParams->pBSSID);
-    pBssInfoParams->tSsid.len = pJoinBssParams->ssidLength;
-    os_memoryZero (pCmdBld->hOs, (void *)pBssInfoParams->tSsid.str, sizeof (pBssInfoParams->tSsid.str));
-    os_memoryCopy (pCmdBld->hOs, (void *)pBssInfoParams->tSsid.str, (void *)pJoinBssParams->pSSID, pJoinBssParams->ssidLength);
-    DB_BSS(hCmdBld).BeaconInterval = pJoinBssParams->beaconInterval;
-    DB_BSS(hCmdBld).DtimInterval = (TI_UINT8)pJoinBssParams->dtimInterval;
-    DB_BSS(hCmdBld).RadioChannel = pJoinBssParams->channel;
-    DB_WLAN(hCmdBld).RadioBand = (TI_UINT8)pJoinBssParams->radioBand;
-    DB_BSS(hCmdBld).BasicRateSet = pJoinBssParams->basicRateSet;
-
-    /* In case we're joining a new BSS, reset the TKIP/AES sequence counter. */
-    /* The firmware resets its own counter - so we won't have mismatch in the following TX complete events */
-    pCmdBld->uSecuritySeqNumLow = 0;
-    pCmdBld->uSecuritySeqNumHigh = 0;
-
-    pWlanParams->bJoin = TI_TRUE;
-    pWlanParams->bStaConnected = TI_FALSE;
-    /*
-     * call the hardware to start/join the bss
-     */
-    return cmdBld_CmdStartJoin (hCmdBld, pJoinBssParams->bssType, fCb, hCb);
-}
-
-
-TI_STATUS cmdBld_CmdTemplate (TI_HANDLE hCmdBld, TSetTemplate *pTemplateParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld   *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_STATUS  Stt;
-    TTemplateParams *pTemplate;
-    TI_UINT8   uIndex = 0;
-    TemplateType_e eType;
-
-    TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "cmdBld_CmdTemplate: Type=%d, size=%d, index=%d, RateMask=0x%x\n", pTemplateParams->type, pTemplateParams->len, pTemplateParams->index, pTemplateParams->uRateMask);
-
-    switch (pTemplateParams->type)
-    {
-    case BEACON_TEMPLATE:
-        eType = TEMPLATE_BEACON;
-        pTemplate = &(DB_TEMP(hCmdBld).Beacon);
-        break;
-
-    case PROBE_RESPONSE_TEMPLATE:
-        eType = TEMPLATE_PROBE_RESPONSE;
-        pTemplate = &(DB_TEMP(hCmdBld).ProbeResp);
-        break;
-
-    case PROBE_REQUEST_TEMPLATE:
-        if (pTemplateParams->eBand == RADIO_BAND_2_4_GHZ)
-        {
-            eType = CFG_TEMPLATE_PROBE_REQ_2_4;
-            pTemplate = &(DB_TEMP(hCmdBld).ProbeReq24);
-        }
-        else
-        {
-            eType = CFG_TEMPLATE_PROBE_REQ_5;
-            pTemplate = &(DB_TEMP(hCmdBld).ProbeReq50);
-        }
-        break;
-
-    case NULL_DATA_TEMPLATE:
-        eType = TEMPLATE_NULL_DATA;
-        pTemplate = &(DB_TEMP(hCmdBld).NullData);
-        break;
-
-    case PS_POLL_TEMPLATE:
-        eType = TEMPLATE_PS_POLL;
-        pTemplate = &(DB_TEMP(hCmdBld).PsPoll);
-        break;
-
-    case QOS_NULL_DATA_TEMPLATE:
-        eType = TEMPLATE_QOS_NULL_DATA;
-        pTemplate = &(DB_TEMP(hCmdBld).QosNullData);
-        break;
-
-    case KEEP_ALIVE_TEMPLATE:
-        eType = TEMPLATE_KLV;
-        uIndex = pTemplateParams->index;
-        pTemplate = &(DB_TEMP(hCmdBld).KeepAlive[uIndex]);
-        break;
-
-    case DISCONN_TEMPLATE:
-        eType = TEMPLATE_DISCONNECT;
-        pTemplate = &(DB_TEMP(hCmdBld).Disconn);
-        break;
-
-    case ARP_RSP_TEMPLATE:
-        eType = TEMPLATE_ARP_RSP;
-        pTemplate = &(DB_TEMP(hCmdBld).ArpRsp); 
-        break;
-
-    default:
-        TRACE1( pCmdBld->hReport, REPORT_SEVERITY_ERROR,
-                 "cmdBld_CmdTemplate. Invalid template type:%d\n", pTemplateParams->type);
-        return TI_NOK;
-    }
-
-    /* Save template information to DB (for recovery) */
-    pTemplate->Size = pTemplateParams->len;
-    pTemplate->uRateMask = pTemplateParams->uRateMask;
-    os_memoryCopy (pCmdBld->hOs, 
-                   (void *)(pTemplate->Buffer), 
-                   (void *)(pTemplateParams->ptr), 
-                   pTemplateParams->len);
-    /* if (eType == TEMPLATE_ARP_RSP)
-    {   
-       WLAN_OS_REPORT(("cmdBld_CmdTemplate: template (len=%d):\n>>>", pTemplate->Size));
-       for (i=0; i<sizeof(ArpRspTemplate_t); i++ )
-       {
-           WLAN_OS_REPORT((" %2x", *(pTemplate->Buffer+i))); 
-           if (i%8 == 7) WLAN_OS_REPORT(("\n>>>"));
-       }
-         WLAN_OS_REPORT(("\n"));
-    }
-	*/
-    /* Configure template to FW */
-    Stt = cmdBld_CmdIeConfigureTemplateFrame (hCmdBld, 
-                                              pTemplate, 
-                                              (TI_UINT16)pTemplateParams->len,
-                                              eType,
-                                              uIndex, /* index is only relevant for keep-alive template */
-                                              fCb,
-                                              hCb);
-
-    /* WLAN_OS_REPORT(("cmdBld_CmdTemplate: template %d config rc=%d\n", eType, Stt)); */
-    return Stt;
-}
-
-
-/****************************************************************************
- *                      cmdBld_switchChannel()
- ****************************************************************************
- * DESCRIPTION: Switching the serving channel 
- * 
- * INPUTS: channel  -   new channel number  
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdEnableTx (TI_HANDLE hCmdBld, TI_UINT8 channel, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CmdIeEnableTx (hCmdBld, channel, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_DisableTx()
- ****************************************************************************
- * DESCRIPTION: Disable Tx path. 
- * 
- * INPUTS: None
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdDisableTx (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CmdIeDisableTx (hCmdBld, fCb, hCb);
-}
-
-
-
-/****************************************************************************
- *                      cmdBld_SwitchChannelCmd()
- ****************************************************************************
- * DESCRIPTION: Send Switch Channel command 
- * 
- * INPUTS: None  
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdSwitchChannel (TI_HANDLE hCmdBld, TSwitchChannelParams *pSwitchChannelCmd, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "\n SwitchChannelCmd :\n                             channelNumber = %d\n                             switchTime = %d\n                             txFlag = %d\n                             flush = %d \n ", pSwitchChannelCmd->channelNumber, pSwitchChannelCmd->switchTime, pSwitchChannelCmd->txFlag, pSwitchChannelCmd->flush);
-
-    DB_BSS(hCmdBld).RadioChannel = pSwitchChannelCmd->channelNumber;
-
-    return cmdBld_CmdIeSwitchChannel (hCmdBld, pSwitchChannelCmd, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_SwitchChannelCmd()
- ****************************************************************************
- * DESCRIPTION: Send Switch Channel command 
- * 
- * INPUTS: None  
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdSwitchChannelCancel (TI_HANDLE hCmdBld, TI_UINT8 channel, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "\n TWD_SwitchChannelCancelCmd :\n ");
-
-    DB_BSS(hCmdBld).RadioChannel = channel;
-
-    return cmdBld_CmdIeSwitchChannelCancel (hCmdBld, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_FwDisconnect()
- ****************************************************************************
- * DESCRIPTION: Disconnect. 
- * 
- * INPUTS: None
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdFwDisconnect (TI_HANDLE hCmdBld, TI_UINT32 uConfigOptions, TI_UINT32 uFilterOptions, DisconnectType_e uDisconType, TI_UINT16 uDisconReason, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TWlanParams *pWlanParams = &DB_WLAN(hCmdBld);
-
-    pWlanParams->bJoin = TI_FALSE;
-    pWlanParams->bStaConnected = TI_FALSE;
-
-    TRACE4(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Sending FW disconnect, ConfigOptions=%x, FilterOPtions=%x, uDisconType=%d, uDisconReason=%d\n",uConfigOptions, uFilterOptions, uDisconType, uDisconReason);
-
-
-    return cmdBld_CmdIeFwDisconnect (hCmdBld, uConfigOptions, uFilterOptions, uDisconType, uDisconReason, fCb, hCb);
-}
-
-
-TI_STATUS cmdBld_CmdMeasurement (TI_HANDLE          hCmdBld, 
-                                 TMeasurementParams *pMeasurementParams,
-                                 void               *fCommandResponseCB, 
-                                 TI_HANDLE          hCb)
-{
-    return cmdBld_CmdIeMeasurement (hCmdBld, pMeasurementParams, fCommandResponseCB, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_measurementStop()
- ****************************************************************************
- * DESCRIPTION: send Command for stoping measurement  
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdMeasurementStop (TI_HANDLE hCmdBld, void* fMeasureCommandResponseCB, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "cmdBld_measurementStop\n");
-
-    return cmdBld_CmdIeMeasurementStop (hCmdBld, fMeasureCommandResponseCB, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_ApDiscovery()
- ****************************************************************************
- * DESCRIPTION: send Command for AP Discovery 
- *              to the mailbox
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdApDiscovery (TI_HANDLE hCmdBld, TApDiscoveryParams *pApDiscoveryParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_ApDiscovery\n");
-
-    return cmdBld_CmdIeApDiscovery (hCmdBld, pApDiscoveryParams, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_ApDiscoveryStop()
- ****************************************************************************
- * DESCRIPTION: send Command for stoping AP Discovery
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdApDiscoveryStop (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_ApDiscoveryStop\n");
-    
-    return cmdBld_CmdIeApDiscoveryStop (hCmdBld, fCb, hCb);
-}
-
-
-TI_STATUS cmdBld_CmdNoiseHistogram (TI_HANDLE hCmdBld, TNoiseHistogram *pNoiseHistParams, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CmdIeNoiseHistogram (hCmdBld, pNoiseHistParams, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_PowerMgmtConfigurationSet ()
- ****************************************************************************
- * DESCRIPTION: Set the ACX power management option IE
- * 
- * INPUTS: powerSaveParams
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdSetPsMode (TI_HANDLE hCmdBld, TPowerSaveParams* powerSaveParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    /* Rate conversion is done in the HAL */
-    cmdBld_ConvertAppRatesBitmap (powerSaveParams->NullPktRateModulation, 
-                                  0, 
-                                  &powerSaveParams->NullPktRateModulation);
-
-    TRACE5(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, " cmdBld_PowerMgmtConfigurationSet  ps802_11Enable=0x%x hangOverPeriod=%d needToSendNullData=0x%x  numNullPktRetries=%d  NullPktRateModulation=0x%x\n", powerSaveParams->ps802_11Enable, powerSaveParams->hangOverPeriod, powerSaveParams->needToSendNullData, powerSaveParams->numNullPktRetries, powerSaveParams->NullPktRateModulation);
-
-    return cmdBld_CmdIeSetPsMode (hCmdBld, powerSaveParams, fCb, hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_EnableRx()
- ****************************************************************************
- * DESCRIPTION: Enable Rx and send Start/Join command 
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdEnableRx (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CmdIeEnableRx (hCmdBld, fCb, hCb);
-}
-
-
-TI_STATUS cmdBld_CmdAddKey (TI_HANDLE hCmdBld, TSecurityKeys* pKey, TI_BOOL reconfFlag, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT8     keyIdx  = (TI_UINT8)pKey->keyIndex;
-
-    /* store the security key for reconfigure phase (FW reload)*/
-    if (reconfFlag != TI_TRUE)
-    {
-        if (keyIdx >= (pCmdBld->tSecurity.uNumOfStations * NO_OF_RECONF_SECUR_KEYS_PER_STATION + NO_OF_EXTRA_RECONF_SECUR_KEYS))
-        {
-            TRACE2(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "cmdBld_CmdAddKey: ERROR Key keyIndex field out of range =%d, range is (0 to %d)\n", pKey->keyIndex, pCmdBld->tSecurity.uNumOfStations * NO_OF_RECONF_SECUR_KEYS_PER_STATION+NO_OF_EXTRA_RECONF_SECUR_KEYS - 1);
-            
-            return TI_NOK;
-        }
-
-        if (pKey->keyType == KEY_NULL)
-        {
-            TRACE0(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "cmdBld_CmdAddKey: ERROR KeyType is NULL_KEY\n");
-            
-            return TI_NOK;
-        }
-
-        os_memoryCopy (pCmdBld->hOs, 
-                       (void *)(DB_KEYS(pCmdBld).pReconfKeys + keyIdx),
-                       (void *)pKey, 
-                       sizeof(TSecurityKeys));
-    }
-    
-    switch (pCmdBld->tSecurity.eSecurityMode)
-    {
-        case TWD_CIPHER_WEP:
-        case TWD_CIPHER_WEP104:
-				return cmdBld_CmdAddWepDefaultKey (hCmdBld, pKey, fCb, hCb);
-    
-        case TWD_CIPHER_TKIP:
-        case TWD_CIPHER_AES_CCMP:
-        #ifdef GEM_SUPPORTED
-            case TWD_CIPHER_GEM:
-        #endif
-            return cmdBld_CmdAddWpaKey (hCmdBld, pKey, fCb, hCb);
-
-        default:
-            return TI_NOK;
-    }
-}
-
-
-TI_STATUS cmdBld_CmdAddWpaKey (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
- 
-    /* Only WEP, TKIP, AES keys are handled*/
-    switch (pKey->keyType)
-    {
-        case KEY_WEP:
-            /* Configure the encKeys to the HW - default keys cache*/
-            return cmdBld_CmdAddWepDefaultKey (hCmdBld, pKey, fCb, hCb);
-        
-        case KEY_TKIP:
-            /* Set the REAL TKIP key into the TKIP key cache*/
-            if (cmdBld_CmdAddTkipMicMappingKey (hCmdBld, pKey, fCb, hCb) != TI_OK)
-                return TI_NOK;
-
-            break;
-        
-        case KEY_AES:
-            if (cmdBld_CmdAddAesMappingKey (hCmdBld, pKey, fCb, hCb) != TI_OK)
-                return TI_NOK;
-            break;
-        
-        #ifdef GEM_SUPPORTED
-            case KEY_GEM:
-                if (cmdBld_CmdAddGemMappingKey (hCmdBld, pKey, fCb, hCb) != TI_OK)
-                    return TI_NOK;
-                break;
-        #endif
-        
-        default:
-            return TI_NOK;
-    }
-    
-    /* AES or TKIP key has been successfully added. Store the current */
-    /* key type of the unicast (i.e. transmit !) key                  */
-    if (!MAC_BROADCAST (pKey->macAddress))
-    {
-        pCmdBld->tSecurity.eCurTxKeyType = pKey->keyType;
-    }
-
-    return TI_OK;
-}
-
-
-TI_STATUS cmdBld_CmdRemoveWpaKey (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb)
-{
-    /* Only WEP, TKIP, AES keys are handled*/
-    switch (pKey->keyType)
-    {
-        case KEY_WEP:
-            /* Configure the encKeys to the HW - default keys cache*/
-            return cmdBld_CmdRemoveWepDefaultKey (hCmdBld, pKey, fCb, hCb);
-        
-        case KEY_TKIP:
-            /* Configure the encKeys to the HW - mapping keys cache*/
-            /* configure through SET_KEYS command */
-
-            /* remove the TKIP key from the TKIP key cache*/
-            if (cmdBld_CmdRemoveTkipMicMappingKey (hCmdBld, pKey, fCb, hCb) != TI_OK)
-                return (TI_NOK);
-            break;
-        
-        case KEY_AES:
-            if (cmdBld_CmdRemoveAesMappingKey (hCmdBld, pKey, fCb, hCb) != TI_OK)
-                return TI_NOK;
-            break;
-        
-        #ifdef GEM_SUPPORTED
-            case KEY_GEM:
-                if (cmdBld_CmdRemoveGemMappingKey (hCmdBld, pKey, fCb, hCb) != TI_OK)
-                    return TI_NOK;
-                break;
-        #endif
-        
-        default:
-            return TI_NOK;
-    }
-    
-    return TI_OK;
-}
-
-
-/*
- * ----------------------------------------------------------------------------
- * Function : cmdBld_CmdRemoveKey
- *
- * Input    : 
- * Output   :
- * Process  :
- * Note(s)  :
- * -----------------------------------------------------------------------------
- */
-TI_STATUS cmdBld_CmdRemoveKey (TI_HANDLE hCmdBld, TSecurityKeys* pKey, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld  *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT8  keyIdx  = (TI_UINT8)pKey->keyIndex;
-
-    /* Clear the remove key in the reconfigure data base */
-    (DB_KEYS(pCmdBld).pReconfKeys + keyIdx)->keyType = KEY_NULL;
-
-    switch (pCmdBld->tSecurity.eSecurityMode)
-    {
-        case TWD_CIPHER_WEP:
-        case TWD_CIPHER_WEP104:
-				return cmdBld_CmdRemoveWepDefaultKey (hCmdBld, pKey, fCb, hCb);
-        case TWD_CIPHER_TKIP:
-        case TWD_CIPHER_AES_CCMP:
-        #ifdef GEM_SUPPORTED
-            case TWD_CIPHER_GEM:
-        #endif
-            return cmdBld_CmdRemoveWpaKey (hCmdBld, pKey, fCb, hCb);
-        
-        default:
-            return TI_NOK;
-    }
-}
-
-
-/****************************************************************************
- *                      cmdBld_WepDefaultKeyAdd()
- ****************************************************************************
- * DESCRIPTION: Set the actual default key
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdAddWepDefaultKey (TI_HANDLE hCmdBld, TSecurityKeys* aSecurityKey, void *fCb, TI_HANDLE hCb) 
-{
-    TI_STATUS  status;
-    TI_UINT8   sMacAddrDummy[6]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-    /* Non WEP keys are trashed*/
-    if (aSecurityKey->keyType != KEY_WEP)
-    {
-        return TI_NOK;
-    }
-
-    status = cmdBld_CmdIeSetKey (hCmdBld, 
-                                 KEY_ADD_OR_REPLACE,
-                                 sMacAddrDummy, 
-                                 aSecurityKey->encLen, 
-                                 CIPHER_SUITE_WEP,
-                                 aSecurityKey->keyIndex, 
-                                 (TI_UINT8*)aSecurityKey->encKey, 
-                                 0,
-                                 0,
-                                 fCb, 
-                                 hCb);
-    return status;
-}
-
-/****************************************************************************
- *                      cmdBld_WepDefaultKeyRemove()
- ****************************************************************************
- * DESCRIPTION: Set the actual default key
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdSetWepDefaultKeyId (TI_HANDLE hCmdBld, TI_UINT8 aKeyIdVal, void *fCb, TI_HANDLE hCb) 
-{
-    TCmdBld  *pCmdBld          = (TCmdBld *)hCmdBld;
-    TI_UINT8 sMacAddrDummy[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-    /* Save the deafult key ID for reconfigure phase */
-    DB_KEYS(pCmdBld).bDefaultKeyIdValid  = TI_TRUE;
-    DB_KEYS(pCmdBld).uReconfDefaultKeyId = aKeyIdVal;
-
-    return cmdBld_CmdIeSetKey (hCmdBld, 
-                               KEY_SET_ID,
-                               sMacAddrDummy, 
-                               0, 
-                               CIPHER_SUITE_WEP,
-                               aKeyIdVal, 
-                               0, 
-                               0, 
-                               0,
-                               fCb, 
-                               hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_WepDefaultKeyRemove()
- ****************************************************************************
- * DESCRIPTION: Set the actual default key
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdRemoveWepDefaultKey (TI_HANDLE hCmdBld, TSecurityKeys* aSecurityKey, void *fCb, TI_HANDLE hCb) 
-{
-    TI_UINT8  sMacAddrDummy[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-    /* Non WEP keys are trashed*/
-    if (aSecurityKey->keyType != KEY_WEP)
-    {
-        return TI_NOK;
-    }
-
-    return cmdBld_CmdIeSetKey (hCmdBld, 
-                               KEY_REMOVE,
-                               sMacAddrDummy, 
-                               aSecurityKey->encLen, 
-                               CIPHER_SUITE_WEP,
-                               aSecurityKey->keyIndex, 
-                               (TI_UINT8*)aSecurityKey->encKey, 
-                               0, 
-                               0,
-                               fCb, 
-                               hCb);
-}
-
-/****************************************************************************
- *                      cmdBld_WepMappingKeyAdd()
- ****************************************************************************
- * DESCRIPTION: Set the actual mapping key
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdAddWepMappingKey (TI_HANDLE hCmdBld, TSecurityKeys* aSecurityKey, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_CmdIeSetKey (hCmdBld, 
-                               KEY_ADD_OR_REPLACE,
-                               (TI_UINT8*)aSecurityKey->macAddress, 
-                               aSecurityKey->encLen, 
-                               CIPHER_SUITE_WEP,
-                               aSecurityKey->keyIndex, 
-                               (TI_UINT8*)aSecurityKey->encKey, 
-                               0, 
-                               0,
-                               fCb, 
-                               hCb);
-}
-
-/****************************************************************************
- *                      cmdBld_WepMappingKeyRemove()
- ****************************************************************************
- * DESCRIPTION: Set the actual mapping key
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdRemoveWepMappingKey (TI_HANDLE hCmdBld, TSecurityKeys* aSecurityKey, void *fCb, TI_HANDLE hCb)
-{
-	/*In the new security interface it is not allowed to remove uni-cast keys. it will be cleaned on the next join command*/
-	if (!MAC_BROADCAST(aSecurityKey->macAddress) ) 
-	{
-		return TI_OK;
-	}
-    return cmdBld_CmdIeSetKey (hCmdBld, 
-                               KEY_REMOVE,
-                               (TI_UINT8*)aSecurityKey->macAddress, 
-                               aSecurityKey->encLen, 
-                               CIPHER_SUITE_WEP,
-                               aSecurityKey->keyIndex, 
-                               (TI_UINT8*)aSecurityKey->encKey, 
-                               0, 
-                               0,
-                               fCb, 
-                               hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_TkipMicMappingKeyAdd()
- ****************************************************************************
- * DESCRIPTION: Set the actual mapping key
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdAddTkipMicMappingKey (TI_HANDLE hCmdBld, TSecurityKeys* aSecurityKey, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld  *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT8      keyType;
-    TI_UINT8      keyBuffer[KEY_SIZE_TKIP];
-
-    keyType = CIPHER_SUITE_TKIP;
-
-    os_memoryCopy (pCmdBld->hOs, (void*)(&keyBuffer[0]), (void*)aSecurityKey->encKey, 16);
-    os_memoryCopy (pCmdBld->hOs, (void*)(&keyBuffer[16]), (void*)aSecurityKey->micRxKey, 8);
-    os_memoryCopy (pCmdBld->hOs, (void*)(&keyBuffer[24]), (void*)aSecurityKey->micTxKey, 8);
-
-    return cmdBld_CmdIeSetKey (hCmdBld, 
-                               KEY_ADD_OR_REPLACE,
-                               (TI_UINT8*)aSecurityKey->macAddress, 
-                               KEY_SIZE_TKIP, 
-                               keyType,
-                               aSecurityKey->keyIndex, 
-                               (TI_UINT8*)keyBuffer, 
-                               pCmdBld->uSecuritySeqNumLow, 
-                               pCmdBld->uSecuritySeqNumHigh,
-                               fCb, 
-                               hCb);
-}
-
-/****************************************************************************
- *                      cmdBld_TkipMappingKeyAdd()
- ****************************************************************************
- * DESCRIPTION: Set the actual mapping key
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdRemoveTkipMicMappingKey (TI_HANDLE hCmdBld, TSecurityKeys* aSecurityKey, void *fCb, TI_HANDLE hCb)
-{
-    TI_UINT8 keyType;
-
-    keyType = CIPHER_SUITE_TKIP;
-
-	/*In the new security interface it is not allowed to remove uni-cast keys. it will be cleaned on the next join command*/
-	if (!MAC_BROADCAST(aSecurityKey->macAddress) ) 
-	{
-		return TI_OK;
-	}
-
-
-    return cmdBld_CmdIeSetKey (hCmdBld, 
-                               KEY_REMOVE,
-                               (TI_UINT8*)aSecurityKey->macAddress, 
-                               aSecurityKey->encLen, 
-                               keyType,
-                               aSecurityKey->keyIndex, 
-                               (TI_UINT8*)aSecurityKey->encKey,
-                               0,
-                               0,
-                               fCb, 
-                               hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_AesMappingKeyAdd()
- ****************************************************************************
- * DESCRIPTION: Set the actual Aes mapping key
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdAddAesMappingKey (TI_HANDLE hCmdBld, TSecurityKeys* aSecurityKey, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld  *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT8      keyType;
-
-    keyType = CIPHER_SUITE_AES;
-
-    TRACE2(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_AesMappingKeyAdd: uSecuritySeqNumHigh=%ld, pHwCtrl->uSecuritySeqNumLow=%ld \n", pCmdBld->uSecuritySeqNumHigh, pCmdBld->uSecuritySeqNumLow);
-
-    return cmdBld_CmdIeSetKey (hCmdBld, 
-                               KEY_ADD_OR_REPLACE,
-                               (TI_UINT8*)aSecurityKey->macAddress, 
-                               aSecurityKey->encLen, keyType,
-                               aSecurityKey->keyIndex, 
-                               (TI_UINT8*)aSecurityKey->encKey, 
-                               pCmdBld->uSecuritySeqNumLow, 
-                               pCmdBld->uSecuritySeqNumHigh,
-                               fCb, 
-                               hCb);
-}
-
-
- /****************************************************************************
- *                      cmdBld_AesMappingKeyRemove()
- ****************************************************************************
- * DESCRIPTION: Remove  Aes mapping key
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdRemoveAesMappingKey (TI_HANDLE hCmdBld, TSecurityKeys* aSecurityKey, void *fCb, TI_HANDLE hCb)
-{
-    TI_UINT8  keyType;
-
-    keyType = CIPHER_SUITE_AES;
-
-	/*In the new security interface it is not allowed to remove uni-cast keys. it will be cleaned on the next join command*/
-	if (!MAC_BROADCAST(aSecurityKey->macAddress) ) 
-	{
-		return TI_OK;
-	}
-
-	return cmdBld_CmdIeSetKey (hCmdBld, 
-                               KEY_REMOVE,
-                               (TI_UINT8*)aSecurityKey->macAddress, 
-                               aSecurityKey->encLen, 
-                               keyType,
-                               aSecurityKey->keyIndex, 
-                               (TI_UINT8*)aSecurityKey->encKey, 
-                               0, 
-                               0,
-                               fCb, 
-                               hCb);
- }
-
-/****************************************************************************
- *                      cmdBld_CmdSetStaState()
- ****************************************************************************
- * DESCRIPTION: Set station status . 
- * 
- * INPUTS: None
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdSetStaState (TI_HANDLE hCmdBld, TI_UINT8 staState, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TWlanParams *pWlanParams = &DB_WLAN(hCmdBld);
-
-    pWlanParams->bStaConnected = TI_TRUE;
-    TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION , "Sending StaState %d\n",staState);
-
-    return cmdBld_CmdIeSetStaState (hCmdBld, staState, fCb, hCb);
-}
-
-#ifdef GEM_SUPPORTED
-/****************************************************************************
- *                      cmdBld_CmdAddGemMappingKey()
- ****************************************************************************
- * DESCRIPTION: Set the actual GEM mapping key
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdAddGemMappingKey (TI_HANDLE hCmdBld, TSecurityKeys* aSecurityKey, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld  *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT8      keyType;
-
-    keyType = CIPHER_SUITE_GEM;
-
-    return cmdBld_CmdIeSetKey (hCmdBld, 
-                               KEY_ADD_OR_REPLACE,
-                               aSecurityKey->macAddress, 
-                               MAX_KEY_SIZE, 
-                               keyType,
-                               aSecurityKey->keyIndex, 
-							   aSecurityKey->encKey,
-                               pCmdBld->uSecuritySeqNumLow, 
-                               pCmdBld->uSecuritySeqNumHigh,
-                               fCb, 
-                               hCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdRemoveGemMappingKey()
- ****************************************************************************
- * DESCRIPTION: Remove  GEM mapping key
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdRemoveGemMappingKey (TI_HANDLE hCmdBld, TSecurityKeys* aSecurityKey, void *fCb, TI_HANDLE hCb)
-{
-    TI_UINT8  keyType;
-
-    keyType = CIPHER_SUITE_GEM;
-
-	/*In the new security interface it is not allowed to remove uni-cast keys. it will be cleaned on the next join command*/
-	if (!MAC_BROADCAST(aSecurityKey->macAddress) ) 
-	{
-		return TI_OK;
-	}
-
-	return cmdBld_CmdIeSetKey (hCmdBld, 
-                               KEY_REMOVE,
-                               aSecurityKey->macAddress, 
-                               aSecurityKey->encLen, 
-                               keyType,
-                               aSecurityKey->keyIndex, 
-                               aSecurityKey->encKey, 
-                               0, 
-                               0,
-                               fCb, 
-                               hCb);
- }
-#endif /*GEM_SUPPORTED*/
-
-/****************************************************************************
- *                      cmdBld_healthCheck()
- ****************************************************************************
- * DESCRIPTION: 
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: 
- ****************************************************************************/
-TI_STATUS cmdBld_CmdHealthCheck (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_CmdIeHealthCheck\n");
-    
-    return cmdBld_CmdIeHealthCheck (hCmdBld, fCb, hCb);
-}
-
-TI_STATUS cmdBld_CmdTest (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, TTestCmd* pTestCmd)
-{
-    return cmdBld_CmdIeTest (hCmdBld, fCb, hCb, pTestCmd);
-}
-
diff --git a/wl1271/TWD/Ctrl/CmdBldCmdIE.c b/wl1271/TWD/Ctrl/CmdBldCmdIE.c
deleted file mode 100644
index f5edb52..0000000
--- a/wl1271/TWD/Ctrl/CmdBldCmdIE.c
+++ /dev/null
@@ -1,1100 +0,0 @@
-/*
- * CmdBldCmdIE.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  CmdBldCmdIE.c 
- *  \brief Command builder. Command information elements
- *
- *  \see   CmdBldCmdIE.h 
- */
-#define __FILE_ID__  FILE_ID_94
-#include "osApi.h"
-#include "tidef.h"
-#include "report.h"
-#include "TWDriver.h"
-#include "CmdQueue_api.h"
-#include "CmdBld.h"
-
-
-/* Local Macros */
-
-#define MAC_TO_VENDOR_PREAMBLE(mac) ((mac[0] << 16) | (mac[1] << 8) | mac[2])
-
-/*******************************************
- * Wlan hardware Test (BIT)
- * =================
- *
- * Tests description:
- * ==================
- * FCC           = Continuous modulated transmission (should not emit carrier)
- * TELEC         = Continuous unmodulated carrier transmission (carrier only)
- * PER_TX_STOP   = Stops the TX test in progress (FCC or TELEC).
- * ReadRegister  = Read a register value.
- * WriteRegister = Sets a register value.
-* 
-* Rx PER test
-* ========
-* PerRxStart       = Start or resume the PER measurement. This function will put the device in promiscuous mode, and resume counters update.
-* PerRxStop        = Stop Rx PER measurements. This function stop counters update and make it is safe to read the PER test result.
-* PerRxGetResults  = Get the last Rx PER test results.
-* PerRxClear       = Clear the Rx PER test results. 
- */
-
-enum
-{
-/* 0 */   TEST_MOD_QPSK,
-/* 1 */   TEST_MOD_CCK,
-/* 2 */   TEST_MOD_PBCC,
-          TEST_MOD_NUMOF
-};
-
-enum
-{
-/* 0 */   TEST_MOD_LONG_PREAMBLE,
-/* 1 */   TEST_MOD_SHORT_PREAMBLE
-};
-
-enum
-{
-/* 0 */   TEST_BAND_2_4GHZ,
-/* 1 */   TEST_BAND_5GHZ,
-/* 2 */   TEST_BAND_4_9GHZ
-};
-
-
-enum
-{
-    MOD_PBCC = 1,
-    MOD_CCK,
-    MOD_OFDM
-};
-
-
-#define TEST_MOD_MIN_GAP           200
-#define TEST_MOD_MIN_TX_BODYLEN    0
-#define TEST_MOD_MAX_TX_BODYLEN    2304
-
-#define TEST_RX_CAL_SAFE_TIME      5000  /*uSec*/
-
-#define TEST_MOD_IS_GAP_OK(gap)     ((gap) >= TEST_MOD_MIN_GAP)
-
-#define TEST_MOD_IS_TX_BODYLEN_OK(len)  \
-   (INRANGE((len), TEST_MOD_MIN_TX_BODYLEN, TEST_MOD_MAX_TX_BODYLEN) && \
-   (((len) & 3) == 0) )
-
-#define TEST_MOD_IS_PREAMBLE_OK(p)  \
-   INRANGE((p), TEST_MOD_LONG_PREAMBLE, TEST_MOD_SHORT_PREAMBLE)
-
-
-#define RESEARVED_SIZE_FOR_RESPONSE 4
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeStartBss()
- ****************************************************************************
- * DESCRIPTION: Construct the StartBss command fileds and send it to the mailbox
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeStartBss (TI_HANDLE hCmdBld, BSS_e BssType, void *fJoinCompleteCb, TI_HANDLE hCb)
-{
-    TCmdBld            *pCmdBld = (TCmdBld *)hCmdBld;
-    StartJoinRequest_t  AcxCmd_StartBss;
-    StartJoinRequest_t *pCmd = &AcxCmd_StartBss;
-    TSsid              *pSsid = &DB_BSS(hCmdBld).tSsid;
-    TBssInfoParams     *pBssInfoParams = &DB_BSS(hCmdBld);
-    TI_UINT8 *BssId;
-    TI_UINT8 *cmdBssId;
-    EHwRateBitFiled HwBasicRatesBitmap;
-    TI_UINT32 i; 
-    
-    os_memoryZero (pCmdBld->hOs, (void *)pCmd, sizeof(StartJoinRequest_t));
-
-    /*
-     * Set RxCfg and RxFilterCfg values
-     */
-    pCmd->rxFilter.ConfigOptions = ENDIAN_HANDLE_LONG (DB_WLAN(hCmdBld).RxConfigOption);
-    pCmd->rxFilter.FilterOptions = ENDIAN_HANDLE_LONG (DB_WLAN(hCmdBld).RxFilterOption);
-    pCmd->beaconInterval = ENDIAN_HANDLE_WORD (DB_BSS(hCmdBld).BeaconInterval);
-    pCmd->dtimInterval = DB_BSS(hCmdBld).DtimInterval; 
-    pCmd->channelNumber = DB_BSS(hCmdBld).RadioChannel;
-    pCmd->bssType = BssType;
-    /* Add radio band */
-    pCmd->bssType |= DB_WLAN(hCmdBld).RadioBand << 4;
-    /* Bits 0-2: Tx-Session-Count. bit 7: indicates if to flush the Tx queues */
-    pCmd->ctrl = pBssInfoParams->Ctrl; 
-    
-    /*
-     * BasicRateSet
-     * The wlan hardware uses pHwMboxCmd field to determine the rate at which to transmit 
-     * control frame responses (such as ACK or CTS frames)
-     */
-    cmdBld_ConvertAppRatesBitmap (pBssInfoParams->BasicRateSet, 0, &HwBasicRatesBitmap);
-    pCmd->basicRateSet = ENDIAN_HANDLE_LONG(HwBasicRatesBitmap);
-
-    /* BSS ID - reversed order (see wlan hardware spec) */
-    BssId = DB_BSS(hCmdBld).BssId;
-    cmdBssId = (TI_UINT8*)&pCmd->bssIdL;
-    for (i = 0; i < MAC_ADDR_LEN; i++)
-        cmdBssId[i] = BssId[MAC_ADDR_LEN - 1 - i];
-
-    /* SSID string */ 
-    pCmd->ssidLength = pSsid->len;
-    os_memoryCopy (pCmdBld->hOs, (void *)pCmd->ssidStr, (void *)pSsid->str, pSsid->len);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_START_JOIN, 
-                             (TI_CHAR *)pCmd, 
-                             sizeof(*pCmd), 
-                             fJoinCompleteCb, 
-                             hCb, 
-                             NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeEnableRx()
- ****************************************************************************
- * DESCRIPTION: Construct the EnableRx command fileds and send it to the mailbox
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeEnableRx (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld  *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT8  aEnableRx_buf[4];
-
-    aEnableRx_buf[0] = DB_DEFAULT_CHANNEL (hCmdBld);
-    aEnableRx_buf[1] = 0; /* padding */
-    aEnableRx_buf[2] = 0; /* padding */
-    aEnableRx_buf[3] = 0; /* padding */
-
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_ENABLE_RX, 
-                             (TI_CHAR *)aEnableRx_buf, 
-                             sizeof(aEnableRx_buf),
-                             fCb,
-                             hCb,
-                             NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeEnableTx()
- ****************************************************************************
- * DESCRIPTION: Construct the EnableTx command fileds and send it to the mailbox
- *              Note: This Enable_TX command is used also for changing the serving 
- *              channel.
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeEnableTx (TI_HANDLE hCmdBld, TI_UINT8 channel, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    TI_UINT8  aEnableTx_buf[4];
-
-    aEnableTx_buf[0] = channel;
-    aEnableTx_buf[1] = 0; /* padding */
-    aEnableTx_buf[2] = 0; /* padding */
-    aEnableTx_buf[3] = 0; /* padding */
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_ENABLE_TX, 
-                             (TI_CHAR *)aEnableTx_buf, 
-                             sizeof(aEnableTx_buf),
-                             fCb,
-                             hCb,
-                             NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeDisableRx()
- ****************************************************************************
- * DESCRIPTION: Construct the DisableRx command fileds and send it to the mailbox
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeDisableRx (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_DISABLE_RX, NULL, 0, fCb, hCb, NULL);
-}
-
-/****************************************************************************
- *                      cmdBld_CmdIeDisableTx()
- ****************************************************************************
- * DESCRIPTION: Construct the DisableTx command fileds and send it to the mailbox
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeDisableTx (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_DISABLE_TX, NULL, 0, fCb, hCb, NULL);
-}
-
-/****************************************************************************
- *                      cmdBld_CmdIeConfigureTemplateFrame()
- ****************************************************************************
- * DESCRIPTION: Generic function which sets the Fw with a template frame according
- *              to the given template type.
- * 
- * INPUTS: templateType - CMD_BEACON, CMD_PROBE_REQ, CMD_PROBE_RESP etc.
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeConfigureTemplateFrame (TI_HANDLE         hCmdBld, 
-                                              TTemplateParams  *pTemplate, 
-                                              TI_UINT16         uFrameSize, 
-                                              TemplateType_e    eTemplateType, 
-                                              TI_UINT8          uIndex, 
-                                              void *            fCb, 
-                                              TI_HANDLE         hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    PktTemplate_t AcxCmd_PktTemplate;
-    PktTemplate_t *pCmd = &AcxCmd_PktTemplate;
-
-    /* If the frame size is too big - we truncate the frame template */
-    if (uFrameSize > MAX_TEMPLATES_SIZE)
-    {
-        EReportSeverity eReportSeverity = (pTemplate == NULL) ? REPORT_SEVERITY_WARNING : REPORT_SEVERITY_ERROR;
-
-        /* Report as error only if this is the actual template and not just a space holder */
-        TRACE3(pCmdBld->hReport, eReportSeverity, "cmdBld_CmdIeConfigureTemplateFrame: Frame size (=%d) of CmdType (=%d) is bigger than MAX_TEMPLATES_SIZE(=%d) !!!\n", uFrameSize, eTemplateType, MAX_TEMPLATES_SIZE);
-
-        /* Truncate length to the template size limit */
-        uFrameSize = MAX_TEMPLATES_SIZE;
-    }
-    /* WLAN_OS_REPORT(("DloadTempl type =%d size=%d\n", eTemplateType, uFrameSize)); */
-    /* if pTemplate is NULL than it means that we just want to reserve place in Fw, and there is no need to copy */
-    if (pTemplate != NULL)
-    {
-        os_memoryCopy(pCmdBld->hOs, (void *)&pCmd->templateStart, (void *)(pTemplate->Buffer), uFrameSize);
-        pCmd->templateTxAttribute.enabledRates    = pTemplate->uRateMask;
-    }
-    pCmd->len = ENDIAN_HANDLE_WORD(uFrameSize);
-    pCmd->index = uIndex;
-    pCmd->templateType = eTemplateType;
-    pCmd->templateTxAttribute.shortRetryLimit = 10;
-    pCmd->templateTxAttribute.longRetryLimit  = 10;
-
-#ifdef TI_DBG
-    if (pCmdBld->uDbgTemplatesRateMask != 0) 
-    {
-        pCmd->templateTxAttribute.enabledRates = pCmdBld->uDbgTemplatesRateMask;
-    }
-#endif
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_SET_TEMPLATE, 
-                             (TI_CHAR *)pCmd, 
-                             sizeof (PktTemplate_t),
-                             fCb,
-                             hCb,
-                             NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeSetKey()
- ****************************************************************************
- * DESCRIPTION: Construct the SetKey command fileds and send it to the mailbox
- * 
- * INPUTS: 
- *      Action      - add/remove key
- *      MacAddr     - relevant only for mapping keys
- *      KeySize     - key size
- *      KeyType     - default/mapping/TKIP
- *      KeyId       - relevant only for default keys
- *      Key         - key data
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeSetKey (TI_HANDLE hCmdBld, 
-                              TI_UINT32 action, 
-                              TI_UINT8  *pMacAddr, 
-                              TI_UINT32 uKeySize, 
-                              TI_UINT32 uKeyType, 
-                              TI_UINT32 uKeyId, 
-                              TI_UINT8  *pKey, 
-                              TI_UINT32 uSecuritySeqNumLow, 
-                              TI_UINT32 uSecuritySeqNumHigh,
-                              void      *fCb, 
-                              TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    SetKey_t AcxCmd_SetKey;
-    SetKey_t *pCmd = &AcxCmd_SetKey;
-
-    os_memoryZero (pCmdBld->hOs, (void *)pCmd, sizeof(*pCmd));
-
-    MAC_COPY (pCmd->addr, pMacAddr);
-
-    if (uKeySize > MAX_KEY_SIZE)
-    {
-        os_memoryCopy (pCmdBld->hOs, (void *)pCmd->key, (void *)pKey, MAX_KEY_SIZE);
-    }
-    else 
-    {
-        os_memoryCopy (pCmdBld->hOs, (void *)pCmd->key, (void *)pKey, uKeySize);
-    }
-
-    pCmd->action = ENDIAN_HANDLE_WORD((TI_UINT16)action);
-    pCmd->keySize = (TI_UINT8)uKeySize;
-    pCmd->type = (TI_UINT8)uKeyType;
-    pCmd->id = (TI_UINT8)uKeyId;
-    pCmd->ssidProfile = 0;
-
-    /* 
-     * Preserve TKIP/AES security sequence number after recovery.
-     * If not in reconfig set to 0 so the FW will ignore it and keep its own number.
-     * Note that our STA Tx is currently using only one sequence-counter 
-     * for all ACs (unlike the Rx which is separated per AC).  
-     */
-    if (pCmdBld->bReconfigInProgress == TI_FALSE)
-    {
-        uSecuritySeqNumLow = uSecuritySeqNumHigh = 0;
-    }
-    pCmd->AcSeqNum16[0] = ENDIAN_HANDLE_WORD((TI_UINT16)uSecuritySeqNumLow);
-    pCmd->AcSeqNum16[1] = 0;
-    pCmd->AcSeqNum16[2] = 0;
-    pCmd->AcSeqNum16[3] = 0;
-    
-    pCmd->AcSeqNum32[0] = ENDIAN_HANDLE_LONG(uSecuritySeqNumHigh);
-    pCmd->AcSeqNum32[1] = 0;
-    pCmd->AcSeqNum32[2] = 0;
-    pCmd->AcSeqNum32[3] = 0;
-
-
-TRACE6(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "Addr: %02x:%02x:%02x:%02x:%02x:%02x\n", pCmd->addr[0],pCmd->addr[1],pCmd->addr[2],pCmd->addr[3],pCmd->addr[4],pCmd->addr[5]);
-			
-TRACE7(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "Action=%x,keySize=0x%x,type=%x, id=%x, ssidProfile=%x, AcSeqNum16[0]=%x, AcSeqNum32[0]=%x\n", pCmd->action,pCmd->keySize, pCmd->type,pCmd->id,pCmd->ssidProfile,pCmd->AcSeqNum16[0],pCmd->AcSeqNum32[0] );
-
-	return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_SET_KEYS, (char *)pCmd, sizeof(*pCmd), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeStartScan ()
- ****************************************************************************
- * DESCRIPTION: Send SCAN Command
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeStartScan (TI_HANDLE hCmdBld, ScanParameters_t* pScanParams, void *fScanResponseCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue,
-                             CMD_SCAN, 
-                             (TI_CHAR *)pScanParams,  
-                             sizeof(ScanParameters_t),
-                             fScanResponseCb, 
-                             hCb, 
-                             NULL);
-}
-
-/****************************************************************************
- *                      cmdBld_CmdIeStartSPSScan ()
- ****************************************************************************
- * DESCRIPTION: Send SPS SCAN Command
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeStartSPSScan (TI_HANDLE hCmdBld, ScheduledScanParameters_t* pScanParams, void* fScanResponseCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_SPS_SCAN, 
-                             (TI_CHAR *)pScanParams, 
-                             sizeof(ScheduledScanParameters_t),
-                             fScanResponseCb, 
-                             hCb, 
-                             NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeStopScan ()
- ****************************************************************************
- * DESCRIPTION: Construct the STOP_SCAN command fields and send it to the
- *              mailbox 
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeStopScan (TI_HANDLE hCmdBld, void *fScanResponseCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_CmdIeStopScan: -------------- \n");
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_STOP_SCAN, 0, 0, fScanResponseCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeStopSPSScan ()
- ****************************************************************************
- * DESCRIPTION: Construct the STOP_SPS_SCAN command fields and send it to the
- *              mailbox 
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeStopSPSScan (TI_HANDLE hCmdBld, void* fScanResponseCB, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_CmdIeStopSPSScan: -------------- \n");
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_STOP_SPS_SCAN, 0, 0, fScanResponseCB, hCb, NULL);
-}
-
-
-TI_STATUS cmdBld_CmdIeSetSplitScanTimeOut (TI_HANDLE hCmdBld, TI_UINT32 uTimeOut, void *fCB, TI_HANDLE hCb)
-{
-	TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-	enhancedTriggerTO_t Cmd_enhancedTrigger;
-	enhancedTriggerTO_t *pCmd = &Cmd_enhancedTrigger;
-
-TRACE1(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_CmdIeSetSplitScanTimeOut: uTimeOut=%d -------------- \n", uTimeOut);
-
-	pCmd->slicedScanTimeOut = uTimeOut;
-
-	return cmdQueue_SendCommand(pCmdBld->hCmdQueue, CMD_TRIGGER_SCAN_TO, (char *)pCmd, sizeof(*pCmd), fCB, hCb, NULL);
-}
-
-/** 
- * \fn     cmdBld_CmdIeScanSsidList 
- * \brief  Sets SSID list for periodic scan 
- * 
- * Sets SSID list for periodic scan 
- * 
- * \param  hCmdBld - handle to command builder object
- * \param  pSsidList - command data
- * \param  fScanResponseCB - command complete function callback
- * \param  hCb - command complete callback handle
- * \return TI_OK on success, any other code on error 
- * \sa     cmdBld_CmdIePeriodicScanParams, cmdBld_CmdIeStartPeriodicScan, cmdBld_CmdIeStopPeriodicScan
- */ 
-TI_STATUS cmdBld_CmdIeScanSsidList (TI_HANDLE hCmdBld, ConnScanSSIDList_t *pSsidList,
-                                    void* fScanResponseCB, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue,
-                             CMD_CONNECTION_SCAN_SSID_CFG, 
-                             (char *)pSsidList,  
-                             sizeof(ConnScanSSIDList_t),
-                             fScanResponseCB, 
-                             hCb, 
-                             NULL);
-}
-
-/** 
- * \fn     cmdBld_CmdIePeriodicScanParams 
- * \brief  Sets periodic scan parameters 
- * 
- * Sets periodic scan parameters
- * 
- * \param  hCmdBld - handle to command builder object
- * \param  pPeriodicScanParams - command data
- * \param  fScanResponseCB - command complete function callback
- * \param  hCb - command complete callback handle
- * \return TI_OK on success, any other code on error 
- * \sa     cmdBld_CmdIeScanSsidList, cmdBld_CmdIeStartPeriodicScan, cmdBld_CmdIeStopPeriodicScan
- */ 
-TI_STATUS cmdBld_CmdIePeriodicScanParams (TI_HANDLE hCmdBld, ConnScanParameters_t *pPeriodicScanParams,
-                                          void* fScanResponseCB, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue,
-                             CMD_CONNECTION_SCAN_CFG, 
-                             (char *)pPeriodicScanParams,  
-                             sizeof(ConnScanParameters_t),
-                             fScanResponseCB, 
-                             hCb, 
-                             NULL);
-}
-
-/** 
- * \fn     cmdBld_CmdIeStartPeriodicScan 
- * \brief  Starts a periodic scan operation
- * 
- * Starts a periodic scan operation
- * 
- * \param  hCmdBld - handle to command builder object
- * \param  pPeriodicScanStart - command data
- * \param  fScanResponseCB - command complete function callback
- * \param  hCb - command complete callback handle
- * \return TI_OK on success, any other code on error 
- * \sa     cmdBld_CmdIeScanSsidList,  cmdBld_CmdIePeriodicScanParams, cmdBld_CmdIeStopPeriodicScan
- */ 
-TI_STATUS cmdBld_CmdIeStartPeriodicScan (TI_HANDLE hCmdBld, PeriodicScanTag* pPeriodicScanStart,
-                                         void* fScanResponseCB, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue,
-                             CMD_START_PERIODIC_SCAN, 
-                             pPeriodicScanStart, sizeof (PeriodicScanTag),
-                             fScanResponseCB, 
-                             hCb, 
-                             NULL);
-}
-
-/** 
- * \fn     cmdBld_CmdIeStopPeriodicScan
- * \brief  Stops an on-going periodic scan operation 
- * 
- * Stops an on-going periodic scan operation
- * 
- * \param  hCmdBld - handle to command builder object
- * \param  fScanResponseCB - command complete function callback
- * \param  hCb - command complete callback handle
- * \return TI_OK on success, any other code on error 
- * \sa     cmdBld_CmdIeScanSsidList, cmdBld_CmdIePeriodicScanParams, cmdBld_CmdIeStartPeriodicScan
- */ 
-TI_STATUS cmdBld_CmdIeStopPeriodicScan (TI_HANDLE hCmdBld, 
-                                        PeriodicScanTag* pPeriodicScanStop, 
-                                        void* fScanResponseCB, 
-                                        TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue,
-                             CMD_STOP_PERIODIC_SCAN, 
-                             pPeriodicScanStop, 
-                             sizeof(pPeriodicScanStop),
-                             fScanResponseCB, 
-                             hCb, 
-                             NULL);
-}
-
-/****************************************************************************
- *                      cmdBld_CmdIeNoiseHistogram ()
- ****************************************************************************
- * DESCRIPTION: Send NOISE_HISTOGRAM Command
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeNoiseHistogram (TI_HANDLE hCmdBld, TNoiseHistogram *pNoiseHistParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    NoiseHistRequest_t AcxCmd_NoiseHistogram;
-    NoiseHistRequest_t *pCmd = &AcxCmd_NoiseHistogram;
-
-    os_memoryZero(pCmdBld->hOs, (void *)pCmd, sizeof(*pCmd));
-
-    pCmd->mode = ENDIAN_HANDLE_WORD((TI_UINT16)pNoiseHistParams->cmd);
-    pCmd->sampleIntervalUSec = ENDIAN_HANDLE_WORD(pNoiseHistParams->sampleInterval);
-
-    os_memoryCopy (pCmdBld->hOs, (void *)&(pCmd->thresholds[0]), (void *)&(pNoiseHistParams->ranges[0]), MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_NOISE_HIST, (TI_CHAR *)pCmd, sizeof(*pCmd), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeSetPsMode()
- ****************************************************************************
- * DESCRIPTION: send Command for Power Management configuration 
- *              to the mailbox
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeSetPsMode (TI_HANDLE hCmdBld, TPowerSaveParams* powerSaveParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    PSModeParameters_t   Cmd_PowerMgmtCnf;
-    PSModeParameters_t * pCmd = &Cmd_PowerMgmtCnf;
-
-    os_memoryZero(pCmdBld->hOs, (void *)pCmd, sizeof(*pCmd));
-
-    if (powerSaveParams->ps802_11Enable)
-    {
-        pCmd->mode = 1;
-    }
-    else
-    {
-        pCmd->mode = 0;
-    }
-    
-    pCmd->hangOverPeriod            = powerSaveParams->hangOverPeriod;
-    pCmd->needToSendNullData        = powerSaveParams->needToSendNullData;
-    pCmd->rateToTransmitNullData    = ENDIAN_HANDLE_LONG(powerSaveParams->NullPktRateModulation);
-    pCmd->numberOfRetries           = powerSaveParams->numNullPktRetries;
-
-  	return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_SET_PS_MODE, (TI_CHAR *)pCmd, sizeof(*pCmd), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeSwitchChannel ()
- ****************************************************************************
- * DESCRIPTION: Send CMD_SWITCH_CHANNEL Command
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeSwitchChannel (TI_HANDLE hCmdBld, TSwitchChannelParams *pSwitchChannelCmd, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ChannelSwitchParameters_t AcxCmd_SwitchChannel;
-    ChannelSwitchParameters_t *pCmd = &AcxCmd_SwitchChannel;
-
-    os_memoryZero (pCmdBld->hOs, (void *)pCmd, sizeof(*pCmd));
-
-    pCmd->channel = pSwitchChannelCmd->channelNumber;
-    pCmd->switchTime = pSwitchChannelCmd->switchTime;
-    pCmd->txSuspend = pSwitchChannelCmd->txFlag;
-    pCmd->flush = pSwitchChannelCmd->flush;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_CHANNEL_SWITCH, (TI_CHAR *)pCmd, sizeof(*pCmd), fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeSwitchChannelCancel ()
- ****************************************************************************
- * DESCRIPTION: Send CMD_SWITCH_CHANNEL_CANCEL Command
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeSwitchChannelCancel (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_STOP_CHANNEL_SWICTH, 0, 0, fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeFwDisconnect()
- ****************************************************************************
- * DESCRIPTION: Construct the Disconnect command fileds and send it to the mailbox
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeFwDisconnect (TI_HANDLE hCmdBld, TI_UINT32 uConfigOptions, TI_UINT32 uFilterOptions, DisconnectType_e uDisconType, TI_UINT16 uDisconReason, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    DisconnectParameters_t AcxCmd_Disconnect;
-    
-    AcxCmd_Disconnect.rxFilter.ConfigOptions = ENDIAN_HANDLE_LONG(uConfigOptions);
-    AcxCmd_Disconnect.rxFilter.FilterOptions = ENDIAN_HANDLE_LONG(uFilterOptions);
-    AcxCmd_Disconnect.disconnectReason = ENDIAN_HANDLE_LONG(uDisconReason);
-    AcxCmd_Disconnect.disconnectType = uDisconType;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_DISCONNECT, 
-                             (void *)&AcxCmd_Disconnect, 
-                             sizeof(AcxCmd_Disconnect),
-                             fCb,
-                             hCb,
-                             NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeMeasurement()
- ****************************************************************************
- * DESCRIPTION: send Command for measurement configuration 
- *              to the mailbox
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeMeasurement (TI_HANDLE          hCmdBld, 
-                                   TMeasurementParams *pMeasurementParams,
-                                   void               *fMeasureResponseCb, 
-                                   TI_HANDLE          hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    MeasurementParameters_t Cmd_MeasurementParam;
-    MeasurementParameters_t *pCmd = &Cmd_MeasurementParam;
-
-    os_memoryZero (pCmdBld->hOs, (void *)pCmd, sizeof(*pCmd));
-    
-    pCmd->band =                    pMeasurementParams->band;
-    pCmd->channel =                 pMeasurementParams->channel;
-    pCmd->duration =                ENDIAN_HANDLE_LONG(pMeasurementParams->duration);
-    pCmd->rxFilter.ConfigOptions =  ENDIAN_HANDLE_LONG(pMeasurementParams->ConfigOptions);
-    pCmd->rxFilter.FilterOptions =  ENDIAN_HANDLE_LONG(pMeasurementParams->FilterOptions);
-    pCmd->scanTag =                 (TI_UINT8)pMeasurementParams->eTag;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_MEASUREMENT, 
-                             (TI_CHAR *)pCmd, 
-                             sizeof(*pCmd),
-                             fMeasureResponseCb, 
-                             hCb, 
-                             NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeMeasurementStop()
- ****************************************************************************
- * DESCRIPTION: send Command for stoping measurement  
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeMeasurementStop (TI_HANDLE hCmdBld, void* fMeasureResponseCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_STOP_MEASUREMENT, 
-                             0, 
-                             0,
-                             fMeasureResponseCb, 
-                             hCb, 
-                             NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeApDiscovery()
- ****************************************************************************
- * DESCRIPTION: send Command for AP Discovery 
- *              to the mailbox
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeApDiscovery (TI_HANDLE hCmdBld, TApDiscoveryParams *pApDiscoveryParams, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ApDiscoveryParameters_t Cmd_ApDiscovery;
-    ApDiscoveryParameters_t *pCmd = &Cmd_ApDiscovery;
-
-    os_memoryZero (pCmdBld->hOs, (void *)pCmd, sizeof(*pCmd));
-    
-    pCmd->txPowerAttenuation = pApDiscoveryParams->txPowerDbm;
-    pCmd->numOfProbRqst = pApDiscoveryParams->numOfProbRqst;
-    pCmd->scanDuration  =  ENDIAN_HANDLE_LONG(pApDiscoveryParams->scanDuration);
-    pCmd->scanOptions   =  ENDIAN_HANDLE_WORD(pApDiscoveryParams->scanOptions);
-    pCmd->txdRateSet    =  ENDIAN_HANDLE_LONG(pApDiscoveryParams->txdRateSet);
-    pCmd->rxFilter.ConfigOptions =  ENDIAN_HANDLE_LONG(pApDiscoveryParams->ConfigOptions);
-    pCmd->rxFilter.FilterOptions =  ENDIAN_HANDLE_LONG(pApDiscoveryParams->FilterOptions);
-
-	return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_AP_DISCOVERY, 
-                             (void *)pCmd, 
-                             sizeof(*pCmd),
-                             fCb,
-                             hCb,
-                             NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeApDiscoveryStop()
- ****************************************************************************
- * DESCRIPTION: send Command for stoping AP Discovery
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeApDiscoveryStop (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_STOP_AP_DISCOVERY, 0, 0, fCb, hCb, NULL);
-}
-
-
-/****************************************************************************
- *                      cmdBld_CmdIeHealthCheck()
- ****************************************************************************
- * DESCRIPTION: 
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS:
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeHealthCheck (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_HEALTH_CHECK, NULL, 0, fCb, hCb, NULL);
-}
-
-/****************************************************************************
- *                      cmdBld_CmdIeSetStaState()
- ****************************************************************************
- * DESCRIPTION: Construct the Disconnect command fileds and send it to the mailbox
- * 
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeSetStaState (TI_HANDLE hCmdBld, TI_UINT8 staState, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    SetStaState_t AcxCmd_SetStaState;
-    
-    AcxCmd_SetStaState.staState = staState;
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_SET_STA_STATE, 
-                             (void *)&AcxCmd_SetStaState, 
-                             sizeof(AcxCmd_SetStaState),
-                             fCb,
-                             hCb,
-                             NULL);
-}
-
-/****************************************************************************
- *                      cmdBld_BitIeTestCmd()
- ****************************************************************************
- * DESCRIPTION:   
- * INPUTS: None 
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_CmdIeTest (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, TTestCmd* pTestCmd)
-{
-    TCmdBld		 *pCmdBld = (TI_HANDLE)hCmdBld;
-    TI_UINT32	 paramLength;
-    TI_BOOL      bIsCBfuncNecessary = TI_TRUE;
-
-    if (NULL == pTestCmd)
-    {
-         TRACE0(pCmdBld->hReport, REPORT_SEVERITY_ERROR, " pTestCmd_Buf = NULL!!!\n");
-		 return TI_NOK;
-    }
-
-	if ( (TestCmdID_enum)pTestCmd->testCmdId < MAX_TEST_CMD_ID )
-	{
-        bIsCBfuncNecessary = TI_TRUE; 
-	}
-	else
-	{
-        TRACE1(pCmdBld->hReport, REPORT_SEVERITY_WARNING, " Unsupported testCmdId (%d)\n", pTestCmd->testCmdId);
-	}
-
-    if (bIsCBfuncNecessary && fCb == NULL) 
-    {
-        return TI_OK;
-    }
-	
-	switch( pTestCmd->testCmdId )
-	{
-		case TEST_CMD_PD_BUFFER_CAL:
-			paramLength = sizeof(TTestCmdPdBufferCal);
-			break;
-
-		case TEST_CMD_P2G_CAL:
-			paramLength = sizeof(TTestCmdP2GCal);
-			break;
-
-		case TEST_CMD_RX_STAT_GET:
-			paramLength = sizeof(RadioRxStatistics);
-			break;
-
-		/* packet */
-		case TEST_CMD_FCC:
-			paramLength = sizeof(TPacketParam);
-			break;
-
-		/* tone */
-		case TEST_CMD_TELEC:
-			paramLength = sizeof(TToneParam);
-			break;
-
-		case TEST_CMD_PLT_TEMPLATE:
-			paramLength = sizeof(TTxTemplate);
-			break;
-
-		/* channel tune */
-		case TEST_CMD_CHANNEL_TUNE:
-			paramLength = sizeof(TTestCmdChannel);
-			break;
-
-		case TEST_CMD_GET_FW_VERSIONS:
-			paramLength = sizeof(TFWVerisons);
-			break;
-
-        case TEST_CMD_INI_FILE_RADIO_PARAM:
-            paramLength = sizeof(IniFileRadioParam);
-            break;
-          
-        case TEST_CMD_INI_FILE_GENERAL_PARAM:
-            paramLength = sizeof(IniFileGeneralParam);
-            break;
-          
-		case TEST_CMD_PLT_GAIN_ADJUST:
-			paramLength = sizeof(uint32);
-			break;
-
-		case TEST_CMD_RUN_CALIBRATION_TYPE:
-			paramLength = sizeof(TTestCmdRunCalibration);
-			break;
-
-		case TEST_CMD_TX_GAIN_ADJUST:
-			paramLength = sizeof(TTxGainAdjust);
-			break;
-        case TEST_CMD_TEST_TONE:
-            paramLength = sizeof(TestToneParams_t);
-            break;
-
-		case TEST_CMD_SET_EFUSE:
-			paramLength = sizeof(EfuseParameters_t);
-			break;
-		case TEST_CMD_GET_EFUSE:
-			paramLength = sizeof(EfuseParameters_t);
-			break;
-
-		case TEST_CMD_RX_PLT_CAL:
-			paramLength = sizeof(RadioRxPltCal);
-			break;
-			
-		case TEST_CMD_UPDATE_PD_REFERENCE_POINT:
-			paramLength = sizeof(TTestCmdUpdateReferncePoint);
-			break;
-
-		case TEST_CMD_UPDATE_PD_BUFFER_ERRORS:
-			paramLength = sizeof(TTestCmdPdBufferErrors);
-			break;
-			
-		case TEST_CMD_POWER_MODE:
-			paramLength = sizeof(TTestCmdPowerMode);
-			break;
-
-		case TEST_CMD_STOP_TX:
-		case TEST_CMD_RX_STAT_STOP:
-		case TEST_CMD_RX_STAT_START:
-		case TEST_CMD_RX_STAT_RESET:
-		case TEST_CMD_RX_PLT_ENTER:
-		case TEST_CMD_RX_PLT_EXIT:
-			paramLength = 0;
-			break;
-
-		default:
-			paramLength = sizeof(pTestCmd->testCmd_u);
-	}
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                             CMD_TEST, 
-                             (void *)pTestCmd, 
-                             paramLength + RESEARVED_SIZE_FOR_RESPONSE,
-                             fCb, 
-                             hCb, 
-                             (void*)pTestCmd);    
-}
diff --git a/wl1271/TWD/Ctrl/CmdBldCmdIE.h b/wl1271/TWD/Ctrl/CmdBldCmdIE.h
deleted file mode 100644
index 3f919e3..0000000
--- a/wl1271/TWD/Ctrl/CmdBldCmdIE.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * CmdBldCmdIE.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  CmdBldCmdIE.h 
- *  \brief Command builder. Command information elements
- *
- *  \see   CmdBld.c 
- */
-
-#ifndef CMDBLDCMDIE_H
-#define CMDBLDCMDIE_H
-
-
-TI_STATUS cmdBld_CmdIeStartBss          (TI_HANDLE hCmdBld, BSS_e BssType, void *fJoinCompleteCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeEnableRx          (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeEnableTx          (TI_HANDLE hCmdBld, TI_UINT8 channel, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeDisableRx         (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeDisableTx         (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeInitMemory        (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeConfigureTemplateFrame (TI_HANDLE hCmdBld, TTemplateParams *pTemplate, TI_UINT16 uFrameSize, TemplateType_e templateType, TI_UINT8 uIndex, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeStartScan         (TI_HANDLE hCmdBld, ScanParameters_t* pScanParams, void* fScanCommandResponseCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeStartSPSScan      (TI_HANDLE hCmdBld, ScheduledScanParameters_t* pScanParams, void* fScanCommandResponseCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeStopScan          (TI_HANDLE hCmdBld, void *fScanCommandResponseCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeStopSPSScan       (TI_HANDLE hCmdBld, void *fScanCommandResponseCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeSetSplitScanTimeOut (TI_HANDLE hCmdBld, TI_UINT32 uTimeOut, void *fCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeScanSsidList      (TI_HANDLE hCmdBld, ConnScanSSIDList_t *pSsidList, void* fScanResponseCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIePeriodicScanParams(TI_HANDLE hCmdBld, ConnScanParameters_t *pPeriodicScanParams, void* fScanResponseCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeStartPeriodicScan (TI_HANDLE hCmdBld, PeriodicScanTag* pPeriodicScanStart, void* fScanResponseCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeStopPeriodicScan  (TI_HANDLE hCmdBld, PeriodicScanTag* pPeriodicScanStop, void* fScanResponseCB, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeNoiseHistogram    (TI_HANDLE hCmdBld, TNoiseHistogram *pNoiseHistParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeSwitchChannel     (TI_HANDLE hCmdBld, TSwitchChannelParams *pSwitchChannelCmd, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeSwitchChannelCancel (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeSetKey            (TI_HANDLE hCmdBld, TI_UINT32 uAction, TI_UINT8 *pMacAddr, TI_UINT32 uKeySize, TI_UINT32 uKeyType, TI_UINT32 uKeyId, TI_UINT8 *pKey, TI_UINT32 uSecuritySeqNumLow, TI_UINT32 SecuritySeqNumHigh, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeSetPsMode         (TI_HANDLE hCmdBld, TPowerSaveParams *pPowerSaveParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeStartNewScan      (TI_HANDLE hCmdBld, TScanParams *pScanParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeFwDisconnect      (TI_HANDLE hCmdBld, TI_UINT32 uConfigOptions, TI_UINT32 uFilterOptions, DisconnectType_e uDisconType, TI_UINT16 uDisconReason, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeMeasurement       (TI_HANDLE hCmdBld, TMeasurementParams *pMeasurementParams, void* fMeasureCommandResponseCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeMeasurementStop   (TI_HANDLE hCmdBld, void *fMeasureCommandResponseCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeApDiscovery       (TI_HANDLE hCmdBld, TApDiscoveryParams* pMeasurementParams, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeApDiscoveryStop   (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeHealthCheck       (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_CmdIeSetStaState       (TI_HANDLE hCmdBld, TI_UINT8 staState, void *fCb, TI_HANDLE hCb);
-
-TI_STATUS cmdBld_CmdIeTest              (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, TTestCmd* pTestCmdBuf);
-
-
-#endif
diff --git a/wl1271/TWD/Ctrl/CmdBldDb.h b/wl1271/TWD/Ctrl/CmdBldDb.h
deleted file mode 100644
index a3c438f..0000000
--- a/wl1271/TWD/Ctrl/CmdBldDb.h
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * CmdBldDb.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  CmdBldDb.h 
- *  \brief Command builder database
- *
- *  \see   CmdBld.h 
- */
-
-#ifndef CMDBLDDB_H
-#define CMDBLDDB_H
-
-
-#include "TWDriverInternal.h"
-#include "public_infoele.h"
-
-
-/* 
- * Dot11 params
- * ------------
- */
-typedef struct
-{
-    TI_UINT16                  RtsThreshold;
-    TI_UINT8                   CtsToSelf;
-    TRxTimeOut                 rxTimeOut;
-    TI_UINT16                  FragmentThreshold;
-    TI_UINT8                   ListenInterval;
-    TI_UINT16                  Capabilities;
-    TI_UINT32                  MaxTxMsduLifetime;
-    TI_UINT32                  MaxRxMsduLifetime;
-    TI_UINT8                   calibrationChannel2_4;
-    TI_UINT8                   calibrationChannel5_0;
-    TI_UINT16                  Aid;
-    TI_UINT8                   CurrAntenna;
-    TI_UINT8                   TxAntenna;
-    TI_UINT8                   RxAntenna;
-    TI_UINT8                   Hw_TxAntenna;
-    TI_UINT8                   Hw_RxAntenna;
-    TI_UINT16                  CwMin;
-    TI_UINT8                   RateFallback;
-    TI_UINT32                  RxConfigOption;
-    TI_UINT32                  RxFilterOption;
-    TI_BOOL                    WiFiWmmPS;
-
-    /* Data interrupts pacing */
-    TI_UINT16                  TxCompletePacingThreshold;
-    TI_UINT16                  TxCompletePacingTimeout; 
-    TI_UINT16                  RxIntrPacingThreshold;	 
-    TI_UINT16                  RxIntrPacingTimeout;	 
-
-    /* ARP IP Addr table */
-    TI_UINT32                  arp_IP_ver;
-    EArpFilterType             arpFilterType;
-    TIpAddr                    arp_IP_addr;
-
-    /* Mac addresses filter */
-    TI_UINT8                   isMacAddrFilteringnabled;
-    TI_UINT8                   numGroupAddrs;
-    TMacAddr                   aGroupAddr[MAX_MULTICAST_GROUP_ADDRS];
-
-    TI_UINT32                  FeatureOptions;
-    TI_UINT32                  FeatureDataFlowOptions;
-    TI_UINT8                   SlotTime;
-    TI_UINT8                   preamble;
-    TI_UINT8                   RadioBand;
-    TI_UINT8                   MacClock;
-    TI_UINT8                   ArmClock;
-    TI_UINT8                   CurrPowerSaveState;
-    ESoftGeminiEnableModes     SoftGeminiEnable;
-    TSoftGeminiParams          SoftGeminiParams;
-    TFmCoexParams              tFmCoexParams;
-    TI_UINT8                   maxSitesFragCollect;
-    TI_UINT8                   hwAccessMethod;
-    TI_UINT32                  nullTemplateSize;
-    TI_UINT32                  disconnTemplateSize;
-    TI_UINT32                  beaconTemplateSize;
-    TI_UINT32                  probeRequestTemplateSize;
-    TI_UINT32                  probeResponseTemplateSize;
-    TI_UINT32                  PsPollTemplateSize;
-    TI_UINT32                  qosNullDataTemplateSize;
-    TI_UINT32                  ArpRspTemplateSize;
-    TI_BOOL                    ch14TelecCca;
-    TI_UINT8                   PacketDetectionThreshold;
-    TI_UINT8                   FcsErrThrsh;
-    TI_UINT8                   UseDeviceErrorInterrupt;
-    TI_BOOL                    RetryPreemption;
-    /* This flag indicate if to discards all broadcast frames */
-    TI_BOOL                    RxDisableBroadcast; 
-    /* Indicate if the station is joined */
-    TI_BOOL                    bJoin;              
-    /* Indicate if the station is connected */
-    TI_BOOL                    bStaConnected;              
-    TI_UINT8                   AntDiversity;
-    /* Parameters for roaming triggers configuration */
-    TRroamingTriggerParams     roamTriggers;
-    /* Power control param */
-    EPowerPolicy               minPowerLevel;
-    TBcnBrcOptions             BcnBrcOptions;
-    TBeaconFilterIeTable       beaconFilterIETable;
-    TBeaconFilterInitParams    beaconFilterParams;
-
-    /*Beacon Early Termination (Bet)*/
-    TI_UINT8                   BetEnable;
-    TI_UINT8                   MaximumConsecutiveET;
-    TI_UINT8                   ConsecutivePsPollDeliveryFailureThreshold;
-
-    /* RSSI/SNR triggers */
-    RssiSnrTriggerCfg_t        tRssiSnrTrigger[NUM_OF_RSSI_SNR_TRIGGERS];
-    RssiSnrAverageWeights_t    tRssiSnrWeights;
-
-    TI_UINT32                  uSlicedScanTimeOut;
-
-    /* HT capabilities */
-    TTwdHtCapabilities         tTwdHtCapabilities;
-
-    /* PM Config params */
-    TI_UINT32                  uHostClkSettlingTime;	 
-    TI_UINT8                   uHostFastWakeupSupport;
-
-    TI_UINT8                   TxPowerDbm;
-
-    /* CoexActivity Table */
-    THalCoexActivityTable      tWlanParamsCoexActivityTable;
-
-    /* DCO Itrim params */
-    TI_BOOL                    dcoItrimEnabled;
-    TI_UINT32                  dcoItrimModerationTimeoutUsec;
-    
-} TWlanParams;
-
-
-/* 
- * BssInfo params
- * --------------
- */
-typedef struct
-{
-    TI_UINT8                   ReqBssType;
-    TI_UINT8                   BssType;
-    TI_UINT16                  BeaconInterval;
-    TI_UINT8                   DtimInterval; 
-    TI_UINT8                   RadioChannel;
-    TI_UINT8                   BssId[MAC_ADDR_LEN];
-    TSsid                      tSsid;
-    /* Policy for recovery */  
-    TTxRatePolicy              TxRateClassParams; 
-    TI_UINT32                  BasicRateSet;   
-    /* The ctrl field in the Join-Command (see StartJoinRequest_t) */
-    TI_UINT8                   Ctrl;                                 
-    /* ATIM window of IBSS*/
-    /* Note that when ATIM window is zero the*/
-    /* initiated IBSS does not support powersave*/
-    TI_UINT16                  ATimWindow;     
-    /* Specifies the PLCP preamble type used*/
-    /* 0 for long preamble*/
-    /* 1 for short preamble*/
-    TI_UINT8                   DefaultPreamble;
-
-    /* 
-     * HT setting 
-     */
-    /* capabilities */
-    TI_BOOL   bHtCap;
-    TI_UINT32 uHtCapabilites;
-    TMacAddr  tMacAddress;
-    TI_UINT8  uAmpduMaxLeng;
-    TI_UINT8  uAmpduMinSpac;
-    /* Information */
-    TI_BOOL   bHtInf;
-    TI_UINT8  uRifsMode;     
-    TI_UINT8  uHtProtection;
-    TI_UINT8  uGfProtection;     
-    TI_UINT8  uHtTxBurstLimit;
-    TI_UINT8  uDualCtsProtection;
-    /* BA session */
-    TI_BOOL                               bBaInitiator[MAX_NUM_OF_802_1d_TAGS];
-    TAxcBaSessionInitiatorResponderPolicy tBaSessionInitiatorPolicy[MAX_NUM_OF_802_1d_TAGS]; 
-    TI_BOOL                               bBaResponder[MAX_NUM_OF_802_1d_TAGS];
-    TAxcBaSessionInitiatorResponderPolicy tBaSessionResponderPolicy[MAX_NUM_OF_802_1d_TAGS]; 
-
-} TBssInfoParams;
-
-
-/* 
- * General counters
- * ----------------
- */
-typedef struct
-{
-    TI_UINT32                  FcsErrCnt;
-
-} TGenCounters;
-
-
-/*
- * queuesParam_T - Queue params for Quality Of Service
- * ------------------------------------------
- */
-typedef struct
-{
-    TQueueTrafficParams        queues[MAX_NUM_OF_AC];
-    TI_BOOL                    isQueueConfigured[MAX_NUM_OF_AC];
-
-} TQueuesParams;
-
-
-typedef struct 
-{
-    TAcQosParams               ac[MAX_NUM_OF_AC];
-    TI_BOOL                    isAcConfigured[MAX_NUM_OF_AC];
-	TI_BOOL					   isBurstModeEnabled;
-} TAcConfParams;
-
-
-typedef struct 
-{
-    TPsRxStreaming             tid[MAX_NUM_OF_802_1d_TAGS];
-
-} TPsRxStreamingParams;
-
-
-/* 
- * Templates params
- * ----------------
- */
-typedef struct
-{
-    TTemplateParams            Beacon;
-    TTemplateParams            ProbeReq24;
-    TTemplateParams            ProbeReq50;
-    TTemplateParams            ProbeResp;
-    TTemplateParams            NullData;
-    TTemplateParams            PsPoll;
-    TTemplateParams            QosNullData;
-    TTemplateParams            KeepAlive[ KLV_MAX_TMPL_NUM ];
-    TTemplateParams            Disconn;
-    TTemplateParams            ArpRsp;
-
-} TTemplateListParams;
-
-typedef struct
-{
-    TI_UINT8                   enaDisFlag;
-    TKeepAliveParams           keepAliveParams[ KLV_MAX_TMPL_NUM ];
-} TKeepAliveList;
-
-/* Security keys structure for reconfigure phase */
-typedef struct
-{
-    TI_BOOL                    bReconfHwEncEnable;     
-    TI_BOOL                    bHwEncDecrEnableValid; 
-    TI_UINT8                   uReconfDefaultKeyId;   
-    TI_BOOL                    bDefaultKeyIdValid;  
-    TSecurityKeys*             pReconfKeys; 
-                                   
-} TSecurReconf;
-
-
-/* Rx Data Filters */
-typedef struct
-{
-    TI_UINT8                   uIndex;
-    TI_UINT8                   uCommand; 
-    filter_e                   eAction;
-    TI_UINT8                   uNumFieldPatterns;
-    TI_UINT8                   uLenFieldPatterns;
-    TI_UINT8                   aFieldPattern[MAX_DATA_FILTER_SIZE];
-                                   
-} TRxDataFilter;
-
-typedef struct
-{
-    TI_BOOL                    bEnabled;
-    filter_e                   eDefaultAction;
-    TRxDataFilter              aRxDataFilter[MAX_DATA_FILTERS];
-                                   
-} TRxDataFiltersTable;
-
-typedef struct
-{
-	RateMangeParams_t rateMngParams;
-
-} TRateMngParams;
-
-
-
-/*
- * ----------------------------------------------------------------
- *                  MAIN PARAMETERS STRUCTURE
- * ----------------------------------------------------------------
- */
-typedef struct 
-{
-    TDmaParams                 dma;                 /* Rx/Tx queue parameters   */
-    TQueuesParams              queues;              /* Queues params for QOS    */
-    TAcConfParams              ac;                  /* AC params for QoS        */
-    TPsRxStreamingParams       psStream;            /* PS-Rx-Streaming params   */
-    TWlanParams                wlan;                /* Wlan parameters          */
-    TBssInfoParams             bss;                 /* Bss information          */
-    TFwInfo                    hw;                  /* HW eeprom & versions info*/
-    TGenCounters               counters;            /* General counters         */
-    TTemplateListParams        templateList;        /* Templates for recovery   */
-    TKeepAliveList             klvList;             /* Keep-Alive paramters     */  
-    TSecurReconf               keys;                /* Security keys            */
-    TRxDataFiltersTable        rxDataFilters;       /* Rx data filters          */
-    IniFileGeneralParam        tPlatformGenParams;  /* platfrom gen params from public_radio.h  */   
-    IniFileRadioParam          tRadioIniParams;     /* Radio ini params from public_radio.h     */
-	IniFileExtendedRadioParam  tExtRadioIniParams;  /* Extended Radio ini params from public_radio.h     */
-	TRateMngParams		       tRateMngParams;      /* rate management params */
-} TCmdBldDb;
-
-#endif
-
-
-
diff --git a/wl1271/TWD/Ctrl/CmdBldItr.c b/wl1271/TWD/Ctrl/CmdBldItr.c
deleted file mode 100644
index 90fde0e..0000000
--- a/wl1271/TWD/Ctrl/CmdBldItr.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * CmdBldItr.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  CmdBldItr.c 
- *  \brief Command builder. Interrogate commands
- *
- *  \see   CmdBld.h 
- */
-
-#define __FILE_ID__  FILE_ID_95
-#include "tidef.h"
-#include "CmdBld.h"
-#include "CmdBldItrIE.h"
-
-
-TI_STATUS cmdBld_ItrMemoryMap (TI_HANDLE hCmdBld, MemoryMap_t *apMap, void *fCb, TI_HANDLE hCb)
-{
-    return cmdBld_ItrIeMemoryMap (hCmdBld, apMap, fCb, hCb);
-}
-
-
-TI_STATUS cmdBld_ItrRoamimgStatisitics (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb)
-{
-    return cmdBld_ItrIeRoamimgStatisitics (hCmdBld, fCb, hCb, pCb);
-}
-
-
-TI_STATUS cmdBld_ItrErrorCnt (TI_HANDLE hCmdBld, void * fCb, TI_HANDLE hCb, void * pCb)
-{
-    return cmdBld_ItrIeErrorCnt (hCmdBld, fCb, hCb, pCb);
-}
-
-
-/*
- * ----------------------------------------------------------------------------
- * Function : TWD_GetAverageRSSI
- *
- * Input    :   averageRSSI - pointer for return verage RSSI result
- *
- * Output   :   averageRSSI
- * Process  :
- * -----------------------------------------------------------------------------
- */
-TI_STATUS cmdBld_ItrRSSI (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb)
-{
-    return cmdBld_ItrIeRSSI (hCmdBld, fCb, hCb, pCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_GetSoftGeminiParams()
- ****************************************************************************
- * DESCRIPTION: Get Soft Gemini config parameter
- *
- * INPUTS:
- *
- * OUTPUT:
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ItrSg (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void* pCb)
-{                  
-    return cmdBld_ItrIeSg (hCmdBld, fCb, hCb, pCb);
-}
-
-TI_STATUS cmdBld_ItrRateParams(TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void* pCb)
-{
-    TTwd *pTWD = (TTwd *)hCmdBld;
-
-    return cmdBld_ItrIeRateParams (pTWD->hCmdBld, fCb, hCb, pCb);
-
-}
-
-
-TI_STATUS cmdBld_ItrStatistics (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb)
-{
-    return cmdBld_ItrIeStatistics (hCmdBld, fCb, hCb, pCb);
-}
-
-
-TI_STATUS cmdBld_ItrPowerConsumptionstat (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void* pCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    return  cmdBld_ItrIePowerConsumptionstat (pTWD->hCmdBld, fCb, hCb, pCb);
-}
-
- /****************************************************************************
- *                      cmdBld_ItrDataFilterStatistics()
- ****************************************************************************
- * DESCRIPTION: Get the ACX GWSI counters 
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ItrDataFilterStatistics (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb)
-{
-    return cmdBld_ItrIeDataFilterStatistics (hCmdBld, fCb, hCb, pCb);
-}
-
diff --git a/wl1271/TWD/Ctrl/CmdBldItrIE.c b/wl1271/TWD/Ctrl/CmdBldItrIE.c
deleted file mode 100644
index 2d1efca..0000000
--- a/wl1271/TWD/Ctrl/CmdBldItrIE.c
+++ /dev/null
@@ -1,369 +0,0 @@
-/*
- * CmdBldItrIE.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#define __FILE_ID__  FILE_ID_96
-#include "osApi.h"
-#include "report.h"
-#include "CmdBld.h"
-#include "CmdQueue_api.h"
-
-
-TI_STATUS cmdBld_ItrIeMemoryMap (TI_HANDLE hCmdBld, MemoryMap_t *apMap, void *fCb, TI_HANDLE hCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-   
-    /* Set information element header */
-    apMap->EleHdr.id  = ACX_MEM_MAP;
-    apMap->EleHdr.len = sizeof(*apMap) - sizeof(EleHdrStruct);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_INTERROGATE, apMap, sizeof(*apMap), fCb, hCb, apMap);
-}
-
-
-/****************************************************************************
- *                      cmdBld_ItrIeRoamimgStatisitics ()
- ****************************************************************************
- * DESCRIPTION: Get the ACX GWSI statistics 
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ItrIeRoamimgStatisitics (TI_HANDLE  hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXRoamingStatisticsTable_t acx;
-    ACXRoamingStatisticsTable_t * pCfg = &acx;
-
-    /* 
-     * Set information element header
-     */
-    pCfg->EleHdr.id  = ACX_ROAMING_STATISTICS_TBL;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-   
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_INTERROGATE, pCfg, sizeof(*pCfg), fCb, hCb, pCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_ItrIeErrorCnt ()
- ****************************************************************************
- * DESCRIPTION: Get the ACX GWSI counters 
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ItrIeErrorCnt (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXErrorCounters_t acx;
-    ACXErrorCounters_t * pCfg = &acx;
-
-    /* 
-     * Set information element header
-     */
-    pCfg->EleHdr.id  = ACX_ERROR_CNT;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-     
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_INTERROGATE, pCfg, sizeof(*pCfg), fCb, hCb, pCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_ItrIeRSSI ()
- ****************************************************************************
- * DESCRIPTION: Configure/Interrogate StationId information element to/from
- *      the wlan hardware.
- *      This information element specifies the MAC Address assigned to the
- *      STATION or AP.
- *      This default value is the permanent MAC address that is stored in the
- *      adaptor's non-volatile memory.
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ItrIeRSSI (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, TI_UINT8* pCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXRoamingStatisticsTable_t AcxElm_GetAverageRSSI;
-    ACXRoamingStatisticsTable_t* pCfg = &AcxElm_GetAverageRSSI;
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_ROAMING_STATISTICS_TBL;
-    pCfg->EleHdr.len = sizeof(ACXRoamingStatisticsTable_t) - sizeof(EleHdrStruct);
-
-      
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_INTERROGATE, pCfg, sizeof(ACXRoamingStatisticsTable_t), fCb, hCb, pCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_ItrIeSg()
- ****************************************************************************
- * DESCRIPTION: Get the BTH-WLAN co-exsistance parameters from the Fw   
- *
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ItrIeSg (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void* pCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXBluetoothWlanCoParamsStruct  AcxElm_BluetoothWlanEnable;
-    ACXBluetoothWlanCoParamsStruct* pCfg = &AcxElm_BluetoothWlanEnable;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_ItrIeSg \n");
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_SG_CFG;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-   return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_INTERROGATE, pCfg, sizeof(ACXBluetoothWlanCoParamsStruct), fCb, hCb, pCb);
-}
-/****************************************************************************
- *                      cmdBld_ItrIeRateParams()
- ****************************************************************************
- * DESCRIPTION: Get the rate managment configuration
- *
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-
-TI_STATUS cmdBld_ItrIeRateParams (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void* pCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-	AcxRateMangeParams  RateParams;
-    AcxRateMangeParams* pCfg = &RateParams;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_ItrIeRateParams \n");
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_GET_RATE_MAMAGEMENT_PARAMS;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_INTERROGATE, pCfg, sizeof(AcxRateMangeParams), fCb, hCb, pCb);
-}
-
-/****************************************************************************
- *                      cmdBld_ItrIePowerConsumptionstat()
- ****************************************************************************
- * DESCRIPTION: Get the Power consumption statistic from the Fw   
- *
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ItrIePowerConsumptionstat(TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void* pCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXPowerConsumptionTimeStat_t  AcxPowerConsumptionStat;
-    ACXPowerConsumptionTimeStat_t* pCfg = &AcxPowerConsumptionStat;
-
-    TRACE0(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "cmdBld_ItrIePowerConsumptionstat \n");
-
-    /* Set information element header */
-    pCfg->EleHdr.id = ACX_PWR_CONSUMPTION_STATISTICS;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-   
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_INTERROGATE, pCfg, sizeof(AcxPowerConsumptionStat), fCb, hCb, pCb);
-
-}
-
-
-
-/****************************************************************************
- *                      cmdBld_ItrIeStatistics ()
- ****************************************************************************
- * DESCRIPTION: Print the statistics from the input IE statistics
- *
- * INPUTS:
- *          ACXStatisticsStruct* pElem  The Statistics information element
- *                                      to be printed
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ItrIeStatistics (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void *pCb)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXStatistics_t *pACXStatistics = (ACXStatistics_t *)pCb;
-
-    /* Set information element header */
-    pACXStatistics->EleHdr.id  = ACX_STATISTICS;
-    pACXStatistics->EleHdr.len = sizeof(*pACXStatistics) - sizeof(EleHdrStruct);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_INTERROGATE, pCb, sizeof(*pACXStatistics), fCb, hCb, pCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_ItrIeMediumOccupancy ()
- ****************************************************************************
- * DESCRIPTION: Get the Medium Occupancy.
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ItrIeMediumOccupancy (TI_HANDLE hCmdBld,
-                                       TInterrogateCmdCbParams  mediumUsageCBParams)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXMediumUsage_t    medium;
-    ACXMediumUsage_t    *pCfg = &medium;
-
-    /* Set information element header */
-    pCfg->EleHdr.id  = ACX_MEDIUM_USAGE;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                                 CMD_INTERROGATE, 
-                                 pCfg, 
-                                 sizeof(*pCfg), 
-                                 mediumUsageCBParams.fCb, 
-                                 mediumUsageCBParams.hCb, 
-                                 mediumUsageCBParams.pCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_ItrIeTfsDtim ()
- ****************************************************************************
- * DESCRIPTION: Get the Tsf and Dtim counter from Fw
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ItrIeTfsDtim (TI_HANDLE hCmdBld,
-                               TInterrogateCmdCbParams  mediumUsageCBParams)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    ACX_fwTSFInformation_t    fwTsfDtimMib;
-    ACX_fwTSFInformation_t    *pCfg = &fwTsfDtimMib;
-
-    /* Set information element header*/
-    pCfg->EleHdr.id  = ACX_TSF_INFO;
-    pCfg->EleHdr.len = sizeof(ACX_fwTSFInformation_t) - sizeof(EleHdrStruct);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                                 CMD_INTERROGATE, 
-                                 pCfg, 
-                                 sizeof(*pCfg), 
-                                 mediumUsageCBParams.fCb, 
-                                 mediumUsageCBParams.hCb, 
-                                 mediumUsageCBParams.pCb);
-}
-
-
-/****************************************************************************
- *                      cmdBld_ItrIeNoiseHistogramResults()
- ****************************************************************************
- * DESCRIPTION: Get the Noise Histogram Measurement Results.
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ItrIeNoiseHistogramResults (TI_HANDLE hCmdBld,
-                                             TInterrogateCmdCbParams noiseHistCBParams)
-{
-    TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
-    NoiseHistResult_t   results;
-    NoiseHistResult_t   *pCfg = &results;
-
-    /* Set information element header*/
-    pCfg->EleHdr.id  = ACX_NOISE_HIST;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, 
-                                 CMD_INTERROGATE, 
-                                 pCfg, 
-                                 sizeof(*pCfg), 
-                                 noiseHistCBParams.fCb, 
-                                 noiseHistCBParams.hCb, 
-                                 noiseHistCBParams.pCb);
-} 
-
-/****************************************************************************
- *                      cmdBld_ItrIeDataFilterStatistics()
- ****************************************************************************
- * DESCRIPTION: Get the ACX GWSI counters 
- *
- * INPUTS:
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS cmdBld_ItrIeDataFilterStatistics (TI_HANDLE  hCmdBld, 
-                                            void      *fCb, 
-                                            TI_HANDLE  hCb, 
-                                            void      *pCb)
-{
-	TCmdBld       *pCmdBld = (TCmdBld *)hCmdBld;
-    ACXDataFilteringStatistics_t acx;
-    ACXDataFilteringStatistics_t * pCfg = &acx;
-
-    /* Set information element header */
-    pCfg->EleHdr.id  = ACX_GET_DATA_FILTER_STATISTICS;
-    pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
-
-    TRACE_INFO_HEX(pCmdBld->hReport, (TI_UINT8 *) pCfg, sizeof(ACXDataFilteringStatistics_t));
-
-    /* Send the interrogation command */
-    return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_INTERROGATE, pCfg, sizeof(*pCfg), fCb, hCb, pCb);
-}
-
-
diff --git a/wl1271/TWD/Ctrl/CmdBldItrIE.h b/wl1271/TWD/Ctrl/CmdBldItrIE.h
deleted file mode 100644
index b3f0c36..0000000
--- a/wl1271/TWD/Ctrl/CmdBldItrIE.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * CmdBldItrIE.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef CMDBLDITRIE_H
-#define CMDBLDITRIE_H
-
-
-TI_STATUS cmdBld_ItrIeMemoryMap                	(TI_HANDLE hCmdBld, MemoryMap_t *apMap, void *fCb, TI_HANDLE hCb);
-TI_STATUS cmdBld_ItrIeRoamimgStatisitics       	(TI_HANDLE hCmdBld, void * fCb, TI_HANDLE hCb, void * pCb);
-TI_STATUS cmdBld_ItrIeErrorCnt                 	(TI_HANDLE hCmdBld, void * fCb, TI_HANDLE hCb, void * pCb);
-TI_STATUS cmdBld_ItrIeRSSI                     	(TI_HANDLE hCmdBld, void * fCb, TI_HANDLE hCb, void * pCb);
-TI_STATUS cmdBld_ItrIeSg                       	(TI_HANDLE hCmdBld, void * fCb, TI_HANDLE hCb, void * pCb);
-TI_STATUS cmdBld_ItrIeStatistics               	(TI_HANDLE hCmdBld, void * fCb, TI_HANDLE hCb, void *pCb);
-TI_STATUS cmdBld_ItrIeDataFilterStatistics     	(TI_HANDLE hCmdBld, void * fCb, TI_HANDLE hCb, void *pCb);
-TI_STATUS cmdBld_ItrIeMediumOccupancy          	(TI_HANDLE hCmdBld, TInterrogateCmdCbParams interogateCmdCBParams);
-TI_STATUS cmdBld_ItrIeTfsDtim                  	(TI_HANDLE hCmdBld, TInterrogateCmdCbParams interogateCmdCBParams);
-TI_STATUS cmdBld_ItrIeNoiseHistogramResults    	(TI_HANDLE hCmdBld, TInterrogateCmdCbParams noiseHistCBParams);
-TI_STATUS cmdBld_ItrIePowerConsumptionstat      (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void* pCb);
-TI_STATUS cmdBld_ItrIeRateParams                (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb, void* pCb);
-
-#endif
-
diff --git a/wl1271/TWD/Ctrl/CmdQueue.c b/wl1271/TWD/Ctrl/CmdQueue.c
deleted file mode 100644
index 97893ec..0000000
--- a/wl1271/TWD/Ctrl/CmdQueue.c
+++ /dev/null
@@ -1,1100 +0,0 @@
-/*
- * CmdQueue.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  CmdQueue.c
- *  \brief Handle the wlan command queue
- *
- *  \see CmdQueue.h, CmdQueue_api.h, CmdMBox.c
- */
-
-
-#define __FILE_ID__  FILE_ID_97
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "TwIf.h"
-#include "public_commands.h"
-#include "CmdQueue_api.h"
-#include "CmdMBox_api.h"
-#include "CmdQueue.h"
-
-/*****************************************************************************
- **         Internal functions prototypes                                   **
- *****************************************************************************/
-
-static TI_STATUS    cmdQueue_SM (TI_HANDLE hCmdQueue, ECmdQueueSmEvents event);
-static TI_STATUS    cmdQueue_Push (TI_HANDLE  hCmdQueue, 
-                                   Command_e  cmdType,
-                                   TI_UINT8   *pParamsBuf, 
-                                   TI_UINT32  uParamsLen,
-                                   void       *fCb, 
-                                   TI_HANDLE  hCb, 
-                                   void       *pCb);
-#ifdef TI_DBG
-static void         cmdQueue_PrintQueue(TCmdQueue  *pCmdQueue);
-#ifdef REPORT_LOG
-static char *       cmdQueue_GetIEString (TI_INT32 MboxCmdType, TI_UINT16 id);
-static char *       cmdQueue_GetCmdString (TI_INT32 MboxCmdType);
-#endif
-#endif /* TI_DBG */
-
-
-
-
-/*
- * \brief	Create the TCmdQueue object
- * 
- * \param  hOs  - OS module object handle
- * \return Handle to the created object
- * 
- * \par Description
- * Calling this function creates a CmdQueue object
- * 
- * \sa cmdQueue_Destroy
- */
-TI_HANDLE cmdQueue_Create (TI_HANDLE hOs)
-{
-    TCmdQueue  *pCmdQueue;
-
-    pCmdQueue = os_memoryAlloc (hOs, sizeof(TCmdQueue));
-    if (pCmdQueue == NULL)
-    {
-        WLAN_OS_REPORT(("FATAL ERROR: cmdQueue_Create(): Error Creating aCmdQueue - Aborting\n"));
-        return NULL;
-    }
-
-    /* reset control module control block */
-    os_memoryZero (hOs, pCmdQueue, sizeof(TCmdQueue));
-    pCmdQueue->hOs = hOs;
-    
-    return pCmdQueue;   
-}
-
-
-/*
- * \brief	Destroys the cmdQueue object
- * 
- * \param  hCmdMbox  - The object to free
- * \return TI_OK
- * 
- * \par Description
- * Calling this function destroys the cmdQueue object
- * 
- * \sa cmdQueue_Create
- */
-TI_STATUS cmdQueue_Destroy (TI_HANDLE hCmdQueue)
-{
-    TCmdQueue* pCmdQueue = (TCmdQueue*)hCmdQueue;
-
-    /* Free context */
-    os_memoryFree (pCmdQueue->hOs, pCmdQueue, sizeof(TCmdQueue));
-
-	return TI_OK;
-}
-
-
-/*
- * \brief	Configure the CmdQueue object
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \param  hCmdMbox  - Handle to CmdMbox
- * \param  hReport - Handle to report module
- * \param  hTwIf  - Handle to TwIf
- * \param  hTimer  - Handle to os timer
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS cmdQueue_Init   (TI_HANDLE hCmdQueue, 
-                           TI_HANDLE hCmdMbox, 
-                           TI_HANDLE hReport, 
-                           TI_HANDLE hTwIf,
-                           TI_HANDLE hTimer)
-{
-    TCmdQueue* pCmdQueue = (TCmdQueue*) hCmdQueue;
-
-    pCmdQueue->head = 0;
-    pCmdQueue->tail = 0;
-    pCmdQueue->uNumberOfCommandInQueue = 0;
-    pCmdQueue->uMaxNumberOfCommandInQueue = 0;
-    pCmdQueue->state = CMDQUEUE_STATE_IDLE;
-    pCmdQueue->fCmdCompleteCb = NULL;
-    pCmdQueue->hCmdCompleteCb = NULL;
-    pCmdQueue->fFailureCb = NULL;
-    pCmdQueue->hFailureCb = NULL;
-    pCmdQueue->hReport = hReport;
-    pCmdQueue->hCmdMBox = hCmdMbox;
-    pCmdQueue->hTwIf = hTwIf;
-    pCmdQueue->bErrorFlag = TI_FALSE;
-    pCmdQueue->bMboxEnabled = TI_FALSE;
-    pCmdQueue->bAwake = TI_FALSE;
-
-    /* Configure Command Mailbox */
-    cmdMbox_Init (hCmdMbox, hReport, hTwIf,
-                  hTimer, hCmdQueue,
-                  cmdQueue_Error);
-
-    /*
-     * NOTE: don't set uNumberOfRecoveryNodes = 0; 
-     *       its value is used by recovery process
-     */
-
-    return TI_OK;
-}
-
-
-/*
- * \brief	Configure the CmdQueue object
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \param  eCmdQueueEvent - The event that triggered the SM
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Handles the CmdQueue SM.
- * 
- * \sa cmdQueue_Push, cmdQueue_ResultReceived
- */
-static TI_STATUS cmdQueue_SM (TI_HANDLE hCmdQueue, ECmdQueueSmEvents eCmdQueueEvent)
-{   
-    TCmdQueue     *pCmdQueue = (TCmdQueue*)hCmdQueue;
-    TI_BOOL        bBreakWhile = TI_FALSE;
-    TI_STATUS      rc = TI_OK, status;
-    TCmdQueueNode *pHead;
-    TI_UINT32      uReadLen, uWriteLen;
-
-    while(!bBreakWhile)
-    {
-        switch (pCmdQueue->state)
-        {
-            case CMDQUEUE_STATE_IDLE:
-                switch(eCmdQueueEvent)
-                {
-                    case CMDQUEUE_EVENT_RUN:
-                        pCmdQueue->state = CMDQUEUE_STATE_WAIT_FOR_COMPLETION;
-
-                        pHead = &pCmdQueue->aCmdQueue[pCmdQueue->head];
-
-                        #ifdef CMDQUEUE_DEBUG_PRINT
-                        TRACE4(pCmdQueue->hReport, REPORT_SEVERITY_CONSOLE, "cmdQueue_SM: Send Cmd: CmdType = %d(%d) Len = %d, NumOfCmd = %d", pHead->cmdType, (pHead->aParamsBuf) ?  *(TI_UINT16 *)pHead->aParamsBuf:0, pHead->uParamsLen, pCmdQueue->uNumberOfCommandInQueue);
-
-                        WLAN_OS_REPORT(("cmdQueue_SM: Send Cmd: CmdType = %s(%s)\n"
-                                        "Len = %d, NumOfCmd = %d \n",
-                                        cmdQueue_GetCmdString(pHead->cmdType),
-                                        (pHead->aParamsBuf) ?  cmdQueue_GetIEString(pHead->cmdType,*(TI_UINT16 *)pHead->aParamsBuf):"",
-                                        pHead->uParamsLen, pCmdQueue->uNumberOfCommandInQueue));
-                        #endif
-                
-                        #ifdef TI_DBG
-                            pCmdQueue->uCmdSendCounter++;
-                        #endif 
-
-                        /* 
-                         * if bAwake is true, then we reached here because there were more commands 
-                         * in the queue after sending a previous command.
-                         * There is no need to send another awake command to TwIf. 
-                         */
-                        if (pCmdQueue->bAwake == TI_FALSE)
-                        {
-                            /* Keep the device awake for the entire Cmd transaction */
-                            twIf_Awake(pCmdQueue->hTwIf);
-                            pCmdQueue->bAwake = TI_TRUE;
-                        }
-
-                        if (pHead->cmdType == CMD_INTERROGATE)
-                        {
-                            uWriteLen = CMDQUEUE_INFO_ELEM_HEADER_LEN;
-                            /* Will be updated by CmdMbox to count the status response */
-                            uReadLen = pHead->uParamsLen;
-                        }
-                        else if(pHead->cmdType == CMD_TEST)
-                        {
-                            /* CMD_TEST has configure & interrogate abillities together */
-                            uWriteLen = pHead->uParamsLen;
-                            /* Will be updated by CmdMbox to count the status response */
-                            uReadLen = pHead->uParamsLen;
-                        }
-                        else /* CMD_CONFIGURE or others */
-                        {
-                            uWriteLen = pHead->uParamsLen;
-                            /* Will be updated by CmdMbox to count the status response */
-                            uReadLen = 0;
-
-                        }
-                        /* send the command to TNET */
-                        rc = cmdMbox_SendCommand (pCmdQueue->hCmdMBox, 
-                                              pHead->cmdType, 
-                                              pHead->aParamsBuf, 
-                                              uWriteLen,
-                                              uReadLen);
-
-                        bBreakWhile = TI_TRUE;
-
-                        /* end of CMDQUEUE_EVENT_RUN */
-                        break;
-
-                    default:
-                        TRACE1(pCmdQueue->hReport, REPORT_SEVERITY_ERROR, "cmdQueue_SM: ** ERROR **  No such event (%d) for state CMDQUEUE_STATE_IDLE\n",eCmdQueueEvent);
-                        bBreakWhile = TI_TRUE;
-                        rc =  TI_NOK;
-
-                        break;
-                }
-                break;
-            
-            case CMDQUEUE_STATE_WAIT_FOR_COMPLETION:
-                switch(eCmdQueueEvent)
-                {
-                    case CMDQUEUE_EVENT_RUN:
-                        /* We are in the middle of other command transaction so there is nothing top be done */
-                        bBreakWhile = TI_TRUE;
-                        rc = TXN_STATUS_PENDING;
-                        break;
-
-                    case CMDQUEUE_EVENT_COMPLETE:
-                        {
-                            Command_e cmdType;
-                            TI_UINT16        uParam;
-                            void *fCb, *hCb, *pCb;
-                            CommandStatus_e cmdStatus;
-
-                            pHead = &pCmdQueue->aCmdQueue[pCmdQueue->head];
-            
-                            /* Keep callback parameters in temporary variables */
-                            cmdType = pHead->cmdType;
-                            uParam  = *(TI_UINT16 *)pHead->aParamsBuf;
-                            fCb = pHead->fCb;
-                            hCb = pHead->hCb;
-                            pCb = pHead->pInterrogateBuf;
-                            
-                            /* 
-                             * Delete the command from the queue before calling a callback 
-                             * because there may be nested calls inside a callback
-                             */
-                            pCmdQueue->head ++;
-                            if (pCmdQueue->head >= CMDQUEUE_QUEUE_DEPTH)
-                                pCmdQueue->head = 0;                
-                            pCmdQueue->uNumberOfCommandInQueue --;                
-                
-                        #ifdef TI_DBG
-                            pCmdQueue->uCmdCompltCounter++;
-                        #endif 
-
-                            /* Read the latest command return status */
-                            status = cmdMbox_GetStatus (pCmdQueue->hCmdMBox, &cmdStatus);
-                            if (status != TI_OK)
-                            {
-                                if (cmdStatus == CMD_STATUS_REJECT_MEAS_SG_ACTIVE)
-                                {
-                                    /* return reject status in the callback */
-                                    status = SG_REJECT_MEAS_SG_ACTIVE;
-                                    pCmdQueue->bErrorFlag = TI_FALSE;
-                                }
-                                else
-                                {
-                                    WLAN_OS_REPORT(("cmdQueue_SM: ** ERROR **  Mbox status error %d, set bErrorFlag !!!!!\n", cmdStatus));
-                                    TRACE1(pCmdQueue->hReport, REPORT_SEVERITY_ERROR, "cmdQueue_SM: ** ERROR **  Mbox status error %d, set bErrorFlag !!!!!\n", cmdStatus);
-                                    pCmdQueue->bErrorFlag = TI_TRUE;
-                                }
-                            }
-                            else
-                            {
-                                pCmdQueue->bErrorFlag = TI_FALSE;
-                            }
-
-                            /* If the command had a CB, then call it with the proper results buffer */
-                            if (fCb)
-                            {   
-                                if (pCb)
-                                {
-                                    /* If pInterrogateBuf isn't NULL we need to copy the results */
-                                    cmdMbox_GetCmdParams(pCmdQueue->hCmdMBox, pCb);
-                                    /* Call the CB with the result buffer and the returned status */
-                                    ((TCmdQueueInterrogateCb)fCb) (hCb, status, pCb); 
-                                }
-                                else
-                                {
-                                    /* Call the CB with only the returned status */
-                                    ((TCmdQueueCb)fCb) (hCb, status);
-                                }
-                            }
-                            else
-                            {
-                                /* Call the generic callback */
-                                if (pCmdQueue->fCmdCompleteCb)
-                                {
-                                    pCmdQueue->fCmdCompleteCb (pCmdQueue->hCmdCompleteCb, cmdType, uParam, status);
-                                }
-                            }
-
-                            /* Check if there are any more commands in queue */
-                            if (pCmdQueue->uNumberOfCommandInQueue > 0)               
-                            {
-                                /* If queue isn't empty, send the next command */
-                                pCmdQueue->state = CMDQUEUE_STATE_IDLE;
-                                eCmdQueueEvent = CMDQUEUE_EVENT_RUN;
-                            }
-                            else	
-                            {   
-                                /* If queue is empty, we can permit TwIf to send sleep a command if neccesary */
-                                twIf_Sleep(pCmdQueue->hTwIf);
-                                pCmdQueue->bAwake = TI_FALSE;
-                                pCmdQueue->state = CMDQUEUE_STATE_IDLE;
-
-                                bBreakWhile = TI_TRUE;
-                            }
-                        /* end of CMDQUEUE_EVENT_COMPLETE */
-                        }            
-                        break;
-
-                    default:
-                        TRACE1(pCmdQueue->hReport, REPORT_SEVERITY_ERROR, "cmdQueue_SM: ** ERROR **  No such event (%d) for state CMDQUEUE_STATE_IDLE\n",eCmdQueueEvent);
-                        bBreakWhile = TI_TRUE;
-                        rc =  TI_NOK;
-
-                        break;
-
-                /* end of switch event */
-                } 
-                break;
-        /* end of switch state */
-        }
-    /* end of while */
-    }
-
-    return rc;
-}
-
-
-/*
- * \brief	Sends the command to the cmdMbox
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \param  eMboxCmdType - The command type
- * \param  pMboxBuf - The command itself (parameters)
- * \param  uParamsLen - The command's length
- * \param  fCb - The command's Cb function
- * \param  hCb - The command's Cb handle
- * \param  pCb - Pointer to the results buffer (for interrogate commands)
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Pushes the command to the command queue, which triggers the 
- * CmdQueue SM.
- * 
- * \sa cmdQueue_Push
- */
-TI_STATUS cmdQueue_SendCommand (TI_HANDLE  hCmdQueue, 
-                            Command_e  eMboxCmdType, 
-                            void      *pMboxBuf, 
-                            TI_UINT32  uParamsLen, 
-                            void      *fCb, 
-                            TI_HANDLE  hCb, 
-                            void      *pCb)
-{
-    TCmdQueue *pCmdQueue = (TCmdQueue*)hCmdQueue;
-    TI_STATUS  status;
-
-    if (pCmdQueue->bErrorFlag) 
-        return TI_NOK;
-
-    status = cmdQueue_Push (pCmdQueue, 
-                            eMboxCmdType,
-                            (TI_UINT8*)pMboxBuf, 
-                            uParamsLen,
-                            fCb, 
-                            hCb, 
-                            (TI_UINT8*)pCb); 
-
-    return RC_CONVERT (status);
-}
-
-
-/*
- * \brief	Push the command Node to the Queue with its information element parameter
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \param  cmdType - The command type
- * \param  pParamsBuf - The command itself (parameters)
- * \param  uParamsLen - The command's length
- * \param  fCb - The command's Cb function
- * \param  hCb - The command's Cb handle
- * \param  pCb - Pointer to the results buffer (for interrogate commands)
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa cmdQueue_SendCommand, cmdQueue_SM
- */
-static TI_STATUS cmdQueue_Push (TI_HANDLE  hCmdQueue, 
-                         Command_e  cmdType,
-                         TI_UINT8   *pParamsBuf, 
-                         TI_UINT32  uParamsLen,
-                         void       *fCb, 
-                         TI_HANDLE  hCb, 
-                         void       *pCb)
-{
-    TCmdQueue *pCmdQueue = (TCmdQueue*)hCmdQueue;
-
-    /* If command type is NOT CMD_INTERROGATE, enter Push only if Mailbox is enabled */
-    if (!pCmdQueue->bMboxEnabled) 
-        return TI_OK;
-
-    #ifdef TI_DBG
-        /*
-         * Check if Queue is Full
-         */
-        if (pCmdQueue->uNumberOfCommandInQueue == CMDQUEUE_QUEUE_DEPTH)
-        	{
-        TRACE0(pCmdQueue->hReport, REPORT_SEVERITY_ERROR, "cmdQueue_Push: ** ERROR ** The Queue is full\n");
-
-            	return  TI_NOK;
-        	}
-    #endif /* TI_DBG*/
-
-    /* Initializes the last Node in the Queue with the arrgs */
-    pCmdQueue->aCmdQueue[pCmdQueue->tail].cmdType   = cmdType;
-    pCmdQueue->aCmdQueue[pCmdQueue->tail].uParamsLen = uParamsLen;
-    pCmdQueue->aCmdQueue[pCmdQueue->tail].fCb = fCb;
-    pCmdQueue->aCmdQueue[pCmdQueue->tail].hCb = hCb;   
-
-    os_memoryCopy (pCmdQueue->hOs, 
-                   pCmdQueue->aCmdQueue[pCmdQueue->tail].aParamsBuf, 
-                   pParamsBuf, 
-                   uParamsLen);
-    
-    pCmdQueue->aCmdQueue[pCmdQueue->tail].pInterrogateBuf = (TI_UINT8 *)pCb;
-            
-    /* Advance the queue tail*/
-    pCmdQueue->tail++;
-    if (pCmdQueue->tail == CMDQUEUE_QUEUE_DEPTH)
-        pCmdQueue->tail = 0;
-    
-    /* Update counters */
-    pCmdQueue->uNumberOfCommandInQueue++;
-
-    #ifdef TI_DBG    
-        if (pCmdQueue->uMaxNumberOfCommandInQueue < pCmdQueue->uNumberOfCommandInQueue)
-        {
-            pCmdQueue->uMaxNumberOfCommandInQueue = pCmdQueue->uNumberOfCommandInQueue;     
-        }
-    #endif /* TI_DBG*/
-      
-    #ifdef CMDQUEUE_DEBUG_PRINT    
-        WLAN_OS_REPORT(("cmdQueue_Push: CmdType = %s (%s(%d))"
-    			"Len = %d, NumOfCmd = %d \n",
-    			cmdQueue_GetCmdString(cmdType),
-    			(pParamsBuf) ?  cmdQueue_GetIEString(cmdType,*(TI_UINT16 *)pParamsBuf):"",			
-    			(pParamsBuf) ?  *(TI_UINT16 *)pParamsBuf:0,			
-                uParamsLen, pCmdQueue->uNumberOfCommandInQueue));
-    #endif
-
-    /* If queue has only one command trigger the send command from queue */  
-    if (pCmdQueue->uNumberOfCommandInQueue == 1)
-	{
-        return cmdQueue_SM (pCmdQueue, CMDQUEUE_EVENT_RUN);
-	}
-	else
-    {
-        return TI_OK;            
-    }
-}
-
-
-/*
- * \brief	Notify the CmdQueue SM on the result received.
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Call the CmdQueue SM with CMDQUEUE_EVENT_COMPLETE
- * 
- * \sa cmdQueue_SM
- */
-TI_STATUS  cmdQueue_ResultReceived(TI_HANDLE hCmdQueue)
-{
-    TCmdQueue *pCmdQueue = (TCmdQueue*)hCmdQueue;
-
-    return cmdQueue_SM (pCmdQueue, CMDQUEUE_EVENT_COMPLETE);
-}
-
-
-/*
- * \brief	Prepere the command queue for recovery.
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return TI_OK
- * 
- * \par Description
- * Copy the queue nodes to a recovery list, in order handle 
- * the commands CB's after recovery has finished
- * 
- * \sa cmdQueue_EndReconfig
- */
-TI_STATUS cmdQueue_Restart (TI_HANDLE hCmdQueue)
-{
-    TCmdQueue* pCmdQueue = (TCmdQueue*)   hCmdQueue;
-    TI_UINT32  uCurrentCmdIndex;
-    TI_UINT32  first  = pCmdQueue->head;
-    TCmdQueueNode *pHead;
-    TCmdQueueRecoveryNode *pRecoveryNode;
-    
-    /* 
-     * Stop the SM
-    */
-    pCmdQueue->state = CMDQUEUE_STATE_IDLE;
-    pCmdQueue->bAwake = TI_FALSE;
-
-TRACE0(pCmdQueue->hReport, REPORT_SEVERITY_INFORMATION, "cmdQueue_Clean: Cleaning aCmdQueue Queue");
-    
-	/*
-     * Save The Call Back Function in the Queue in order the return them after the recovery 
-     * with an error status 
-	*/ 
-
-	/* Clean The Command Call Back Counter */ 
-    pCmdQueue->uNumberOfRecoveryNodes = 0;
-    pRecoveryNode = &pCmdQueue->aRecoveryQueue[pCmdQueue->uNumberOfRecoveryNodes];
-
-    for (uCurrentCmdIndex = 0; 
-         uCurrentCmdIndex < pCmdQueue->uNumberOfCommandInQueue; 
-         uCurrentCmdIndex++)
-    {
-        pHead  =  &pCmdQueue->aCmdQueue[first];
-
-        if (pHead->fCb != NULL)
-        { 
-            /*Copy the interrogate CB and the interrogate data buffer pointer */
-            pRecoveryNode->fCb = pHead->fCb;
-            pRecoveryNode->hCb = pHead->hCb;
-            pRecoveryNode->pInterrogateBuf = pHead->pInterrogateBuf;
-            pCmdQueue->uNumberOfRecoveryNodes++;
-            pRecoveryNode = &pCmdQueue->aRecoveryQueue[pCmdQueue->uNumberOfRecoveryNodes];
-        }       
-        first++;
-        if (first == CMDQUEUE_QUEUE_DEPTH)
-            first = 0;
-    }
-
-    /*
-     * Init the queue
-     */
-    pCmdQueue->head = 0;
-    pCmdQueue->tail = 0;
-    pCmdQueue->uNumberOfCommandInQueue = 0;
-
-    return TI_OK;
-}
-
-
-/*
- * \brief	Call the stored CB to end the recovery of the MBox queue
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return TI_OK
- * 
- * \par Description
- * Call the stored CB's with an error status 
- * 
- * \sa cmdQueue_StartReconfig
- */
-TI_STATUS cmdQueue_EndReconfig (TI_HANDLE hCmdQueue)
-{
-    TCmdQueue* pCmdQueue = (TCmdQueue*)   hCmdQueue;
-    TI_UINT32  uCbIndex;
-    TCmdQueueRecoveryNode *pHead;
-
-    for (uCbIndex = 0; uCbIndex < pCmdQueue->uNumberOfRecoveryNodes; uCbIndex++)
-    {
-        pHead  =  &pCmdQueue->aRecoveryQueue[uCbIndex];
-
-        if (pHead->pInterrogateBuf)
-        {
-            ((TCmdQueueInterrogateCb)pHead->fCb)(pHead->hCb, CMD_STATUS_FW_RESET, pHead->pInterrogateBuf);
-        }
-        else
-        {
-            ((TCmdQueueCb)pHead->fCb)(pHead->hCb, CMD_STATUS_FW_RESET);
-        }
-    }
-
-    pCmdQueue->uNumberOfRecoveryNodes = 0;
-	
-	return TI_OK;
-}
-
-
-/*
- * \brief	Register for a call back to be called when Command Complete occured and the CmdMboxCB was NULL
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \param  fCb - The command's Cb function
- * \param  hCb - The command's Cb handle
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS cmdQueue_RegisterCmdCompleteGenericCb (TI_HANDLE hCmdQueue, void *fCb, TI_HANDLE hCb)
-{
-    TCmdQueue* pCmdQueue = (TCmdQueue*)hCmdQueue;
-	
-    if (fCb == NULL || hCb == NULL)
-	{
-TRACE0(pCmdQueue->hReport, REPORT_SEVERITY_ERROR, "cmdQueue_RegisterCmdCompleteGenericCB: NULL parameter\n");
-		return TI_NOK;
-	}
-
-    pCmdQueue->fCmdCompleteCb = (TCmdQueueGenericCb)fCb;
-    pCmdQueue->hCmdCompleteCb = hCb;
-
-	return TI_OK;
-}
-
-
-/*
- * \brief	Register for a call back to be called when an Error (Timeout) occurs
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \param  fCb - The command's Cb function
- * \param  hCb - The command's Cb handle
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS cmdQueue_RegisterForErrorCb (TI_HANDLE hCmdQueue, void *fCb, TI_HANDLE hCb)
-{
-    TCmdQueue* pCmdQueue = (TCmdQueue*)hCmdQueue;
-	
-    if (fCb == NULL || hCb == NULL)
-	{
-TRACE0(pCmdQueue->hReport, REPORT_SEVERITY_ERROR, "cmdQueue_RegisterForErrorCB: NULL parameters\n");
-		return TI_NOK;
-	}
-
-    pCmdQueue->hFailureCb = hCb;
-    pCmdQueue->fFailureCb = (TCmdQueueCb)fCb;
-
-	return TI_OK;
-}
-
-
-/*
- * \brief	Enables the CmdMbox (on exit from init mode)
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa cmdQueue_DisableMbox
- */
-TI_STATUS cmdQueue_EnableMbox (TI_HANDLE hCmdQueue)
-{
-    TCmdQueue* pCmdQueue = (TCmdQueue*)hCmdQueue;
-
-    pCmdQueue->bMboxEnabled = TI_TRUE;
-
-    return TI_OK;
-}
-
-
-/*
- * \brief	Disables the CmdMbox (when stopping the driver)
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa cmdQueue_EnableMbox
- */
-TI_STATUS cmdQueue_DisableMbox (TI_HANDLE hCmdQueue)
-{
-    TCmdQueue* pCmdQueue = (TCmdQueue*)hCmdQueue;
-
-    pCmdQueue->bMboxEnabled = TI_FALSE;
-
-    return TI_OK;
-}
-
-
-/*
- * \brief	Called when a command timeout occur
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa cmdQueue_Init, cmdMbox_TimeOut
- */
-TI_STATUS cmdQueue_Error (TI_HANDLE hCmdQueue, TI_UINT32 command, TI_UINT32 status, void *param)
-{
-    TCmdQueue* pCmdQueue = (TCmdQueue*)hCmdQueue;     
-
-    if (status == CMD_STATUS_UNKNOWN_CMD)
-    {
-        TRACE1(pCmdQueue->hReport, REPORT_SEVERITY_ERROR , "cmdQueue_Error: Unknown Cmd  (%d)\n", command);
-    }
-    else if (status == CMD_STATUS_UNKNOWN_IE)
-    {
-        TRACE4(pCmdQueue->hReport, REPORT_SEVERITY_CONSOLE,"cmdQueue_Error: Unknown IE, cmdType : %d (%d) IE: %d (%d)\n", command, command, (param) ? *(TI_UINT16 *) param : 0, *((TI_UINT16 *) param));
-
-        WLAN_OS_REPORT(("cmdQueue_Error: Unknown IE, cmdType : %s (%d) IE: %s (%d)\n",
-                        cmdQueue_GetCmdString (command),
-                        command,
-                        (param) ? cmdQueue_GetIEString (command, *((TI_UINT16 *) param)) : "",
-                        *((TI_UINT16 *) param)));
-    }
-    else
-    {
-        TRACE1(pCmdQueue->hReport, REPORT_SEVERITY_ERROR , "cmdQueue_Error: CmdMbox status is %d\n", status);
-    }
-
-    if (status != CMD_STATUS_UNKNOWN_CMD && status != CMD_STATUS_UNKNOWN_IE)
-    {
-#ifdef TI_DBG
-#ifdef REPORT_LOG
-        TCmdQueueNode* pHead = &pCmdQueue->aCmdQueue[pCmdQueue->head];  
-        TI_UINT32 TimeStamp = os_timeStampMs(pCmdQueue->hOs);
-
-        WLAN_OS_REPORT(("cmdQueue_Error: **ERROR**  Command Occured \n"
-						 "                                        Cmd = %s %s, Len = %d \n"
-						 "                                        NumOfCmd = %d\n"
-						 "                                        MAC TimeStamp on timeout = %d\n",
-						cmdQueue_GetCmdString(pHead->cmdType), 
-						(pHead->aParamsBuf) ? cmdQueue_GetIEString(pHead->cmdType, *(TI_UINT16 *)pHead->aParamsBuf) : "",
-						pHead->uParamsLen, 
-						pCmdQueue->uNumberOfCommandInQueue, 
-						TimeStamp));
-#endif
-        /* Print The command that was sent before the timeout occur */
-        cmdQueue_PrintHistory(pCmdQueue, CMDQUEUE_HISTORY_DEPTH);
-
-#endif /* TI_DBG */
-
-        /* preform Recovery */
-        if (pCmdQueue->fFailureCb)
-        {
-            pCmdQueue->fFailureCb (pCmdQueue->hFailureCb, TI_NOK);
-        }
-    }
-
-    return TI_OK;
-}
-
-
-/*
- * \brief	Returns maximum number of commands (ever) in TCmdQueue queue
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return maximum number of commands (ever) in mailbox queue
- * 
- * \par Description
- * Used for debugging purposes
- *
- * \sa cmdQueue_Error
- */
-TI_UINT32 cmdQueue_GetMaxNumberOfCommands (TI_HANDLE hCmdQueue)
-{
-    TCmdQueue* pCmdQueue = (TCmdQueue*)hCmdQueue;
-
-    return pCmdQueue->uMaxNumberOfCommandInQueue;
-}
-
-
-
-/********************************************************************************
-*                              DEBUG  FUNCTIONS           	          			*
-*********************************************************************************/
-
-#ifdef TI_DBG
-
-/*
- * \brief	Print the command queue & statistics
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return void
- * 
- * \par Description
- * Used for debugging purposes
- *
- * \sa cmdQueue_PrintQueue
- */
-void cmdQueue_Print (TI_HANDLE hCmdQueue)
-{
-    TCmdQueue* pCmdQueue = (TCmdQueue*)hCmdQueue; 
-	
-    WLAN_OS_REPORT(("------------- aCmdQueue Queue -------------------\n"));
-    
-    WLAN_OS_REPORT(("state = %d\n", pCmdQueue->state));
-    WLAN_OS_REPORT(("cmdQueue_Print:The Max NumOfCmd in Queue was = %d\n",
-                        pCmdQueue->uMaxNumberOfCommandInQueue));
-    WLAN_OS_REPORT(("cmdQueue_Print:The Current NumOfCmd in Queue = %d\n",
-                        pCmdQueue->uNumberOfCommandInQueue));
-    WLAN_OS_REPORT(("cmdQueue_Print:The Total number of Cmd send from Queue= %d\n",
-                        pCmdQueue->uCmdSendCounter));
-    WLAN_OS_REPORT(("cmdQueue_Print:The Total number of Cmd Completed interrupt= %d\n",
-                        pCmdQueue->uCmdCompltCounter));
-
-    cmdQueue_PrintQueue (pCmdQueue);
-}
-
-
-/*
- * \brief	Print the command queue
- * 
- * \param  pCmdQueue - Pointer to TCmdQueue
- * \return void
- * 
- * \par Description
- * Used for debugging purposes
- *
- * \sa cmdQueue_Print, cmdQueue_GetCmdString, cmdQueue_GetIEString
- */
-static void cmdQueue_PrintQueue (TCmdQueue *pCmdQueue)
-{
-    TI_UINT32 uCurrentCmdIndex;
-    TI_UINT32 first = pCmdQueue->head;
-    TCmdQueueNode* pHead;
-    TI_UINT32 NumberOfCommand = pCmdQueue->uNumberOfCommandInQueue;
-
-    for(uCurrentCmdIndex = 0 ; uCurrentCmdIndex < NumberOfCommand ; uCurrentCmdIndex++)
-    {
-        pHead = &pCmdQueue->aCmdQueue[first];
-
-        WLAN_OS_REPORT(("Cmd index %d CmdType = %s %s, Len = %d, Place in Queue = %d \n",
-                       uCurrentCmdIndex, 
-                       cmdQueue_GetCmdString(pHead->cmdType),
-                       cmdQueue_GetIEString(pHead->cmdType, (((pHead->cmdType == CMD_INTERROGATE)||(pHead->cmdType == CMD_CONFIGURE)) ? *(TI_UINT16 *)pHead->aParamsBuf : 0)),
-                       pHead->uParamsLen, 
-                       first));    
-
-        first++;
-        if (first == CMDQUEUE_QUEUE_DEPTH)
-        {
-            first = 0;
-        }
-    } 
-}
-
-
-/*
- * \brief	print the last uNumOfCmd commands
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \param  uNumOfCmd - Number of commands to print
- * \return void
- * 
- * \par Description
- * Used for debugging purposes
- *
- * \sa cmdQueue_Error
- */
-void cmdQueue_PrintHistory (TI_HANDLE hCmdQueue, TI_UINT32 uNumOfCmd)
-{
-#ifdef REPORT_LOG
-    TCmdQueue* pCmdQueue = (TCmdQueue*)hCmdQueue; 
-    TI_UINT32 uCurrentCmdIndex;
-    TI_UINT32 first  = pCmdQueue->head;
-    TCmdQueueNode* pHead;
-
-    WLAN_OS_REPORT(("--------------- cmdQueue_PrintHistory of %d -------------------\n",uNumOfCmd));
-    
-    for (uCurrentCmdIndex = 0; uCurrentCmdIndex < uNumOfCmd; uCurrentCmdIndex++)
-    {
-        pHead  =  &pCmdQueue->aCmdQueue[first];
-
-        WLAN_OS_REPORT(("Cmd index %d CmdType = %s %s, Len = %d, Place in Queue = %d \n",
-                        uCurrentCmdIndex, 
-                        cmdQueue_GetCmdString(pHead->cmdType),
-                        cmdQueue_GetIEString(pHead->cmdType, (((pHead->cmdType == CMD_INTERROGATE)||(pHead->cmdType == CMD_CONFIGURE)) ? *(TI_UINT16 *)pHead->aParamsBuf : 0)),
-                        pHead->uParamsLen, 
-                        first));
-
-        if (first == 0)
-        {
-            first = CMDQUEUE_QUEUE_DEPTH - 1;
-        }
-        else
-        {
-			first--;
-        }
-    }
-
-    WLAN_OS_REPORT(("-----------------------------------------------------------------------\n"));
-#endif
-}
-
-#ifdef REPORT_LOG
-/*
- * \brief	Interperts the command's type to the command's name 
- * 
- * \param  MboxCmdType - The command type
- * \return The command name
- * 
- * \par Description
- * Used for debugging purposes
- *
- * \sa
- */
-static char* cmdQueue_GetCmdString (TI_INT32 MboxCmdType)
-    {
-    	switch (MboxCmdType)
-    	{
-    		case 0: return "CMD_RESET";
-    		case 1: return "CMD_INTERROGATE"; 
-    	 	case 2: return "CMD_CONFIGURE";
-    	    	case 3: return "CMD_ENABLE_RX";
-    		case 4: return "CMD_ENABLE_TX";
-    		case 5: return "CMD_DISABLE_RX";
-    	    	case 6: return "CMD_DISABLE_TX";	
-    		case 8: return "CMD_SCAN";
-    		case 9: return "CMD_STOP_SCAN";	
-    	    	case 10: return "CMD_VBM";
-    		case 11: return "CMD_START_JOIN";	
-    		case 12: return "CMD_SET_KEYS";	
-    		case 13: return "CMD_READ_MEMORY";	
-    	    	case 14: return "CMD_WRITE_MEMORY";
-            case 19: return "CMD_SET_TEMPLATE";
-    		case 23: return "CMD_TEST";		
-    		case 27: return "CMD_ENABLE_RX_PATH";
-    		case 28: return "CMD_NOISE_HIST";	
-    	    	case 29: return "CMD_RX_RESET";	
-    		case 32: return "CMD_LNA_CONTROL";	
-    		case 33: return "CMD_SET_BCN_MODE";	
-    		case 34: return "CMD_MEASUREMENT";	
-    		case 35: return "CMD_STOP_MEASUREMENT";
-    		case 36: return "CMD_DISCONNECT";		
-    		case 37: return "CMD_SET_PS_MODE";		
-    		case 38: return "CMD_CHANNEL_SWITCH";	
-    		case 39: return "CMD_STOP_CHANNEL_SWICTH";
-    		case 40: return "CMD_AP_DISCOVERY";
-    		case 41: return "CMD_STOP_AP_DISCOVERY";
-    		case 42: return "CMD_SPS_SCAN";			
-    		case 43: return "CMD_STOP_SPS_SCAN";		
-            case 45: return "CMD_HEALTH_CHECK";     
-            case 48: return "CMD_CONNECTION_SCAN_CFG";
-            case 49: return "CMD_CONNECTION_SCAN_SSID_CFG";
-            case 50: return "CMD_START_PERIODIC_SCAN";
-            case 51: return "CMD_STOP_PERIODIC_SCAN";
-            case 52: return "CMD_SET_STATUS";
-    		default: return " *** Error No Such CMD **** ";
-    	}
-    }
-    
-/*
- * \brief	Interperts the command's IE to the command's IE name 
- * 
- * \param  MboxCmdType - The command IE number
- * \return The command IE name
- * 
- * \par Description
- * Used for debugging purposes
- *
- * \sa
- */
-static char * cmdQueue_GetIEString (TI_INT32 MboxCmdType, TI_UINT16 Id)
-{
-    if( MboxCmdType== CMD_INTERROGATE || MboxCmdType == CMD_CONFIGURE)	
-    {
-        switch (Id)
-        {
-        case ACX_WAKE_UP_CONDITIONS: 		return " (ACX_WAKE_UP_CONDITIONS)";
-        case ACX_MEM_CFG: 					return " (ACX_MEM_CFG)";                 
-        case ACX_SLOT: 						return " (ACX_SLOT) ";                    
-        case ACX_AC_CFG: 					return " (ACX_AC_CFG) ";                  
-        case ACX_MEM_MAP: 					return " (ACX_MEM_MAP)";
-        case ACX_AID: 						return " (ACX_AID)";
-        case ACX_MEDIUM_USAGE: 				return " (ACX_MEDIUM_USAGE) ";                  
-        case ACX_RX_CFG: 					return " (ACX_RX_CFG) ";                  
-        case ACX_STATISTICS: 				return " (ACX_STATISTICS) ";
-        case ACX_FEATURE_CFG: 				return " (ACX_FEATURE_CFG) ";                    
-        case ACX_TID_CFG: 					return " (ACX_TID_CFG) ";                    
-        case ACX_BEACON_FILTER_OPT: 		return " (ACX_BEACON_FILTER_OPT) ";             			      											  
-        case ACX_NOISE_HIST: 				return " (ACX_NOISE_HIST)";           
-        case ACX_PD_THRESHOLD: 				return " (ACX_PD_THRESHOLD) ";                 
-        case ACX_TX_CONFIG_OPT: 			return " (ACX_TX_CONFIG_OPT) ";
-        case ACX_CCA_THRESHOLD: 			return " (ACX_CCA_THRESHOLD)";            
-        case ACX_EVENT_MBOX_MASK: 			return " (ACX_EVENT_MBOX_MASK) ";
-        case ACX_CONN_MONIT_PARAMS: 		return " (ACX_CONN_MONIT_PARAMS) ";
-        case ACX_CONS_TX_FAILURE: 			return " (ACX_CONS_TX_FAILURE) ";
-        case ACX_BCN_DTIM_OPTIONS: 			return " (ACX_BCN_DTIM_OPTIONS) ";                             
-        case ACX_SG_ENABLE: 				return " (ACX_SG_ENABLE) ";                                       
-        case ACX_SG_CFG: 					return " (ACX_SG_CFG) ";                                       
-        case ACX_FM_COEX_CFG: 				return " (ACX_FM_COEX_CFG) ";
-        case ACX_BEACON_FILTER_TABLE: 		return " (ACX_BEACON_FILTER_TABLE) ";
-        case ACX_ARP_IP_FILTER: 			return " (ACX_ARP_IP_FILTER) ";
-        case ACX_ROAMING_STATISTICS_TBL:	return " (ACX_ROAMING_STATISTICS_TBL) ";  
-        case ACX_RATE_POLICY: 				return " (ACX_RATE_POLICY) ";  
-        case ACX_CTS_PROTECTION: 			return " (ACX_CTS_PROTECTION) ";  
-        case ACX_SLEEP_AUTH: 				return " (ACX_SLEEP_AUTH) ";  
-        case ACX_PREAMBLE_TYPE: 			return " (ACX_PREAMBLE_TYPE) ";  
-        case ACX_ERROR_CNT: 				return " (ACX_ERROR_CNT) ";  
-        case ACX_IBSS_FILTER: 				return " (ACX_IBSS_FILTER) ";  
-        case ACX_SERVICE_PERIOD_TIMEOUT:	return " (ACX_SERVICE_PERIOD_TIMEOUT) ";  
-        case ACX_TSF_INFO: 					return " (ACX_TSF_INFO) ";  
-        case ACX_CONFIG_PS_WMM: 			return " (ACX_CONFIG_PS_WMM) "; 
-        case ACX_ENABLE_RX_DATA_FILTER: 	return " (ACX_ENABLE_RX_DATA_FILTER) ";
-        case ACX_SET_RX_DATA_FILTER: 		return " (ACX_SET_RX_DATA_FILTER) ";
-        case ACX_GET_DATA_FILTER_STATISTICS:return " (ACX_GET_DATA_FILTER_STATISTICS) ";
-        case ACX_RX_CONFIG_OPT: 			return " (ACX_RX_CONFIG_OPT) ";
-        case ACX_FRAG_CFG: 				    return " (ACX_FRAG_CFG) ";
-        case ACX_BET_ENABLE: 				return " (ACX_BET_ENABLE) ";
-        case ACX_RSSI_SNR_TRIGGER: 			return " (ACX_RSSI_SNR_TRIGGER) ";
-        case ACX_RSSI_SNR_WEIGHTS: 			return " (ACX_RSSI_SNR_WEIGHTS) ";
-        case ACX_KEEP_ALIVE_MODE:           return " (ACX_KEEP_ALIVE_MODE) ";
-        case ACX_SET_KEEP_ALIVE_CONFIG:     return " (ACX_SET_KEEP_ALIVE_CONFIG) ";
-        case ACX_SET_DCO_ITRIM_PARAMS:      return " (ACX_SET_DCO_ITRIM_PARAMS) ";
-        case DOT11_RX_MSDU_LIFE_TIME: 		return " (DOT11_RX_MSDU_LIFE_TIME) ";
-        case DOT11_CUR_TX_PWR:   			return " (DOT11_CUR_TX_PWR) ";
-        case DOT11_RTS_THRESHOLD: 			return " (DOT11_RTS_THRESHOLD) ";
-        case DOT11_GROUP_ADDRESS_TBL: 		return " (DOT11_GROUP_ADDRESS_TBL) ";  
-               
-        default:	return " *** Error No Such IE **** ";
-        }
-    }
-    return "";
-}
-#endif
-#endif  /* TI_DBG */
-
-
diff --git a/wl1271/TWD/Ctrl/CmdQueue.h b/wl1271/TWD/Ctrl/CmdQueue.h
deleted file mode 100644
index fa8ebbd..0000000
--- a/wl1271/TWD/Ctrl/CmdQueue.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * CmdQueue.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file CmdQueue.h
- *  \brief CmdQueue internal defenitions
- *
- *  \see CmdQueue.c
- */
-
-#ifndef _CMDQUEUE_H_
-#define _CMDQUEUE_H_
-
-
-
-
-/*****************************************************************************
- **         Defines                                                         **
- *****************************************************************************/
-#define CMDQUEUE_QUEUE_DEPTH          30
-#define CMDQUEUE_HISTORY_DEPTH        5
-#define CMDQUEUE_INFO_ELEM_HEADER_LEN 4
-
-
-#define RC_CONVERT(rc) \
-    (rc == TXN_STATUS_OK || rc == TXN_STATUS_COMPLETE || rc == TXN_STATUS_PENDING || rc == TI_OK) ? TI_OK : TI_NOK
-
-
-/*****************************************************************************
- **         Enums                                                           **
- *****************************************************************************/
-typedef enum 
-{
-    CMDQUEUE_EVENT_RUN,
-    CMDQUEUE_EVENT_COMPLETE,
-    CMDQUEUE_EVENT_NUM
-
-} ECmdQueueSmEvents;
-
-
-typedef enum 
-{
-    CMDQUEUE_STATE_IDLE,
-    CMDQUEUE_STATE_WAIT_FOR_COMPLETION
-
-} ECmdQueueSmStates;
-
-
-/*****************************************************************************
- **         Structures                                                      **
- *****************************************************************************/
-/*  CmdQueue Node */
-typedef struct 
-{
-    /* Command Type Config/interrogat ... */
-    Command_e               cmdType;        
-    TI_UINT32               uParamsLen; 
-    void*                   fCb;
-    TI_HANDLE               hCb;
-    /* Param for config */
-    TI_UINT8                aParamsBuf[MAX_CMD_PARAMS]; 
-    /* A returned value buffer */ 
-    TI_UINT8*               pInterrogateBuf; 
-
-} TCmdQueueNode;
-
-
-/*  Saved CallBack Node In case of Recovery*/
-typedef struct 
-{
-    void*                   fCb;
-    TI_HANDLE               hCb;
-    /* A returned value buffer */
-    TI_UINT8*               pInterrogateBuf; 
-
-} TCmdQueueRecoveryNode;
-
-
-typedef void (*TCmdQueueCb) (TI_HANDLE handle, TI_UINT16 uMboxStatus);
-
-
-typedef void (*TCmdQueueGenericCb)(TI_HANDLE handle, TI_UINT16 uCmdType, TI_UINT16 uCmdID, TI_UINT32 status);
-
-
-/** \struct TCmdQueue
- * \brief CmdQueue structure
- * 
- * \par Description
- * 
- * \sa	
- */ 
-typedef struct
-{   
-    /* Handles */
-    TI_HANDLE               hOs;
-    TI_HANDLE               hReport;
-    TI_HANDLE               hCmdMBox;
-    TI_HANDLE               hTwIf;
-
-    /* SM */
-    ECmdQueueSmStates       state;
-    TCmdQueueGenericCb      fCmdCompleteCb;
-    TI_HANDLE               hCmdCompleteCb;
-    TCmdQueueCb             fFailureCb;
-    TI_HANDLE               hFailureCb;
-
-    /* Queues */
-    TCmdQueueNode           aCmdQueue [CMDQUEUE_QUEUE_DEPTH]; 
-    TCmdQueueRecoveryNode   aRecoveryQueue [CMDQUEUE_QUEUE_DEPTH];
-
-    /* Indexes & counters */
-    TI_UINT32               head;
-    TI_UINT32               tail;
-    TI_UINT32               uNumberOfCommandInQueue;
-    TI_UINT32               uMaxNumberOfCommandInQueue;
-    TI_UINT32               uNumberOfRecoveryNodes;  
-    #ifdef TI_DBG
-        TI_UINT32               uCmdSendCounter;
-        TI_UINT32               uCmdCompltCounter;
-    #endif
-
-    /* Error handling */
-    TI_BOOL                 bErrorFlag;
-    /* Mbox status */
-    TI_BOOL                 bMboxEnabled;
-    /* Notify that we have already awaken the chip */
-    TI_BOOL                 bAwake;
-
-} TCmdQueue; 
-
-#endif
-
diff --git a/wl1271/TWD/Ctrl/Export_Inc/CmdQueue_api.h b/wl1271/TWD/Ctrl/Export_Inc/CmdQueue_api.h
deleted file mode 100644
index fe8473e..0000000
--- a/wl1271/TWD/Ctrl/Export_Inc/CmdQueue_api.h
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * CmdQueue_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-/** \file CmdQueue_api.h
- *  \brief CmdQueue api
- *
- *  \see CmdQueue.c
- */
-
-#ifndef _CMDQUEUE_API_H_
-#define _CMDQUEUE_API_H_
-
-#include "public_commands.h"
-
-
-/*****************************************************************************
- **         Structures                                                      **
- *****************************************************************************/
-
-/* User Callback for Queue */
-typedef void (*TCmdQueueInterrogateCb) (TI_HANDLE handle, TI_UINT16 status, void *pItrBuf);
-
-
-/*****************************************************************************
- **         APIs definitions                                  **
- *****************************************************************************/
-
-/*
- * \brief	Create the TCmdQueue object
- * 
- * \param  hOs  - OS module object handle
- * \return Handle to the created object
- * 
- * \par Description
- * Calling this function creates a CmdQueue object
- * 
- * \sa cmdQueue_Destroy
- */
-TI_HANDLE cmdQueue_Create (TI_HANDLE hOS);
-
-
-/*
- * \brief	Destroys the cmdQueue object
- * 
- * \param  hCmdMbox  - The object to free
- * \return TI_OK
- * 
- * \par Description
- * Calling this function destroys the cmdQueue object
- * 
- * \sa cmdQueue_Create
- */
-TI_STATUS cmdQueue_Destroy (TI_HANDLE hCmdQueue);
-
-
-/*
- * \brief	Configure the CmdQueue object
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \param  hCmdMbox  - Handle to CmdMbox
- * \param  hReport - Handle to report module
- * \param  hTwIf  - Handle to TwIf
- * \param  hTimer  - Handle to os timer
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS cmdQueue_Init   (TI_HANDLE hCmdQueue, 
-                           TI_HANDLE hCmdMbox, 
-                           TI_HANDLE hReport, 
-                           TI_HANDLE hTwIf,
-                           TI_HANDLE hTimer);
-
-
-/*
- * \brief	Prepere the command queue for recovery.
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return TI_OK
- * 
- * \par Description
- * Copy the queue nodes to a recovery list, in order handle 
- * the commands CB's after recovery has finished
- * 
- * \sa cmdQueue_EndReconfig
- */
-TI_STATUS cmdQueue_Restart (TI_HANDLE hCmdQueue);
-
-
-/*
- * \brief	Call the stored CB to end the recovery of the MBox queue
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return TI_OK
- * 
- * \par Description
- * Call the stored CB's with an error status 
- * 
- * \sa cmdQueue_StartReconfig
- */
-TI_STATUS cmdQueue_EndReconfig (TI_HANDLE hCmdQueue);
-
-
-/*
- * \brief	Register for a call back to be called when Command Complete occured and the CmdMboxCB was NULL
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \param  fCb - The command's Cb function
- * \param  hCb - The command's Cb handle
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS cmdQueue_RegisterCmdCompleteGenericCb (TI_HANDLE hCmdQueue, void *fCb, TI_HANDLE hCb);
-
-
-/*
- * \brief	Register for a call back to be called when an Error (Timeout) occurs
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \param  fCb - The command's Cb function
- * \param  hCb - The command's Cb handle
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS cmdQueue_RegisterForErrorCb (TI_HANDLE hCmdQueue, void *fCb, TI_HANDLE hCb);
-
-
-/*
- * \brief	Sends the command to the cmdMbox
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \param  eMboxCmdType - The command type
- * \param  pMboxBuf - The command itself (parameters)
- * \param  uParamsLen - The command's length
- * \param  fCb - The command's Cb function
- * \param  hCb - The command's Cb handle
- * \param  pCb - Pointer to the results buffer (for interrogate commands)
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Pushes the command to the command queue, which triggers the 
- * CmdQueue SM.
- * 
- * \sa cmdQueue_Push
- */
-TI_STATUS cmdQueue_SendCommand (TI_HANDLE  hCmdQueue, 
-                            Command_e  eMboxCmdType, 
-                            void      *pMboxBuf, 
-                            TI_UINT32  uParamsLen, 
-                            void      *fCb, 
-                            TI_HANDLE  hCb, 
-                            void      *pCb);
-
-
-/*
- * \brief	Notify the CmdQueue SM on the result received.
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Call the CmdQueue SM with CMDQUEUE_EVENT_COMPLETE
- * 
- * \sa cmdQueue_SM
- */
-TI_STATUS cmdQueue_ResultReceived (TI_HANDLE hCmdQueue);
-
-
-/*
- * \brief	Returns maximum number of commands (ever) in TCmdQueue queue
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return maximum number of commands (ever) in mailbox queue
- * 
- * \par Description
- * Used for debugging purposes
- *
- * \sa cmdQueue_Error
- */
-TI_UINT32 cmdQueue_GetMaxNumberOfCommands (TI_HANDLE hCmdQueue);
-
-
-/*
- * \brief	Enables the CmdMbox (on exit from init mode)
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa cmdQueue_DisableMbox
- */
-TI_STATUS cmdQueue_EnableMbox (TI_HANDLE hCmdQueue);
-
-
-/*
- * \brief	Disables the CmdMbox (when stopping the driver)
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa cmdQueue_EnableMbox
- */
-TI_STATUS cmdQueue_DisableMbox (TI_HANDLE hCmdQueue);
-
-
-/*
- * \brief	Called when a command timeout occur
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa cmdQueue_Init, cmdMbox_TimeOut
- */
-TI_STATUS cmdQueue_Error (TI_HANDLE hCmdQueue, TI_UINT32 command, TI_UINT32 status, void *param);
-
-
-#ifdef TI_DBG
-
-/*
- * \brief	Print the command queue & statistics
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \return void
- * 
- * \par Description
- * Used for debugging purposes
- *
- * \sa cmdQueue_PrintQueue
- */
-void      cmdQueue_Print (TI_HANDLE hCmdQueue);
-
-
-/*
- * \brief	print the last uNumOfCmd commands
- * 
- * \param  hCmdQueue - Handle to CmdQueue
- * \param  uNumOfCmd - Number of commands to print
- * \return void
- * 
- * \par Description
- * Used for debugging purposes
- *
- * \sa cmdQueue_Error
- */
-void      cmdQueue_PrintHistory (TI_HANDLE hCmdQueue, TI_UINT32 uNumOfCmd);
-
-
-#endif  /* TI_DBG */
-
-
-#endif  /* _CMDQUEUE_API_H_ */
diff --git a/wl1271/TWD/Data_Service/Export_Inc/RxQueue_api.h b/wl1271/TWD/Data_Service/Export_Inc/RxQueue_api.h
deleted file mode 100644
index 1c49749..0000000
--- a/wl1271/TWD/Data_Service/Export_Inc/RxQueue_api.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * RxQueue_api.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-/** \file   RxQueue_api.h 
- *  \brief  RxQueue module header file.                                  
- *
- *  \see    RxQueue_api.c
- */
-
-#ifndef _RX_QUEUE_H_
-#define _RX_QUEUE_H_
-
-/* 
- * External Functions Prototypes 
- * ============================= 
- */
-TI_HANDLE RxQueue_Create        (TI_HANDLE hOs);
-TI_STATUS RxQueue_Destroy       (TI_HANDLE hRxQueue);
-TI_STATUS RxQueue_Init          (TI_HANDLE hRxQueue, TI_HANDLE hReport, TI_HANDLE hTimerModule);
-void      RxQueue_CloseBaSession(TI_HANDLE hRxQueue, TI_UINT8 uFrameTid);
-void      RxQueue_ReceivePacket (TI_HANDLE hRxQueue, const void *aFrame);
-void      RxQueue_Register_CB   (TI_HANDLE hRxQueue, TI_UINT32 CallBackID, void *CBFunc, TI_HANDLE CBObj);
-
-
-#endif  /* _STA_CAP_H_ */
-
-
diff --git a/wl1271/TWD/Data_Service/Export_Inc/txCtrlBlk_api.h b/wl1271/TWD/Data_Service/Export_Inc/txCtrlBlk_api.h
deleted file mode 100644
index a324816..0000000
--- a/wl1271/TWD/Data_Service/Export_Inc/txCtrlBlk_api.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * txCtrlBlk_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*	  MODULE:	txCtrlBlk_api.h											       */
-/*    PURPOSE:	Tx control block module API.							   */
-/*																		   */
-/***************************************************************************/
-#ifndef _TX_CTRL_BLK_API_H_
-#define _TX_CTRL_BLK_API_H_
-
-
-#include "TWDriver.h"
-
-/* Public Function Definitions */
-TI_HANDLE	txCtrlBlk_Create    (TI_HANDLE hOs);
-TI_STATUS	txCtrlBlk_Destroy   (TI_HANDLE hTxCtrlBlk);
-TI_STATUS   txCtrlBlk_Init      (TI_HANDLE hTxCtrlBlk, TI_HANDLE hReport, TI_HANDLE hContext);
-TTxCtrlBlk *txCtrlBlk_Alloc     (TI_HANDLE hTxCtrlBlk);
-void		txCtrlBlk_Free      (TI_HANDLE hTxCtrlBlk, TTxCtrlBlk *pCurrentEntry);
-TTxCtrlBlk *txCtrlBlk_GetPointer(TI_HANDLE hTxCtrlBlk, TI_UINT8 descId);
-#ifdef TI_DBG
-void		txCtrlBlk_PrintTable(TI_HANDLE hTxCtrlBlk);
-#endif /* TI_DBG */
-
-
-#endif  /* _TX_CTRL_BLK_API_H_ */
-		
-
diff --git a/wl1271/TWD/Data_Service/Export_Inc/txHwQueue_api.h b/wl1271/TWD/Data_Service/Export_Inc/txHwQueue_api.h
deleted file mode 100644
index 681c462..0000000
--- a/wl1271/TWD/Data_Service/Export_Inc/txHwQueue_api.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * txHwQueue_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  txHwQueue_api.h
- *
- *   PURPOSE: HW Tx Queue module API.
- * 
- ****************************************************************************/
-
-#ifndef _TX_HW_QUEUE_API_H
-#define _TX_HW_QUEUE_API_H
-
-
-#include "TWDriver.h"
-#include "TWDriverInternal.h"
-
-
-/* Public Function Definitions */
-
-TI_HANDLE	txHwQueue_Create (TI_HANDLE hOs);
-TI_STATUS	txHwQueue_Destroy (TI_HANDLE hTxHwQueue);
-TI_STATUS	txHwQueue_Init (TI_HANDLE hTxHwQueue, TI_HANDLE hReport);
-TI_STATUS	txHwQueue_Config (TI_HANDLE hTxHwQueue, TTwdInitParams *pInitParams);
-TI_STATUS	txHwQueue_SetHwInfo (TI_HANDLE hTxHwQueue, TDmaParams *pDmaParams);
-TI_STATUS	txHwQueue_Restart (TI_HANDLE hTxHwQueue);
-ETxHwQueStatus txHwQueue_AllocResources (TI_HANDLE hTxHwQueue, TTxCtrlBlk *pTxCtrlBlk);
-ETxnStatus         txHwQueue_UpdateFreeResources (TI_HANDLE hTxHwQueue, FwStatus_t *pFwStatus);
-void        txHwQueue_RegisterCb (TI_HANDLE hTxHwQueue, TI_UINT32 uCallBackId, void *fCbFunc, TI_HANDLE hCbHndl);
-#ifdef TI_DBG
-void		txHwQueue_PrintInfo (TI_HANDLE hTxHwQueue);
-#endif /* TI_DBG */
-
-
-#endif /* _TX_HW_QUEUE_API_H */
-
-
-
-
diff --git a/wl1271/TWD/Data_Service/RxQueue.c b/wl1271/TWD/Data_Service/RxQueue.c
deleted file mode 100644
index ec5ce9b..0000000
--- a/wl1271/TWD/Data_Service/RxQueue.c
+++ /dev/null
@@ -1,1044 +0,0 @@
-/*
- * RxQueue.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   RxQueue.c 
- *  \brief  RX Queue module that responsible to support re-ordering of received packets to upper layers.
- *  
- *  \see    RxQueue.h
- */
-#define __FILE_ID__  FILE_ID_98
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h" 
-#include "RxBuf.h"
-#include "TWDriver.h"
-#include "public_descriptors.h"
-#include "timer.h"
-
-/************************ static definition declaration *****************************/
-#define RX_QUEUE_ARRAY_SIZE		                            8
-#define RX_QUEUE_ARRAY_SIZE_BIT_MASK                        0x7 /* RX_QUEUE_ARRAY_SIZE -1 */
-#define RX_QUEUE_WIN_SIZE		                            RX_QUEUE_ARRAY_SIZE
-#define BA_SESSION_TIME_TO_SLEEP		                    (50)
-
-#define BA_SESSION_IS_A_BIGGER_THAN_B(A,B)       (((((A)-(B)) & 0xFFF) < 0x7FF) && ((A)!=(B)))
-#define BA_SESSION_IS_A_BIGGER_EQUAL_THAN_B(A,B) (((((A)-(B)) & 0xFFF) < 0x7FF))
-#define SEQ_NUM_WRAP 0x1000
-#define SEQ_NUM_MASK 0xFFF
-
-
-/************************ static structures declaration *****************************/
-/* structure describe one entry of save packet information in the packet queue array */
-typedef struct 
-{
-    void                *pPacket;	/* Packet address of the packet */
-    TI_STATUS	        tStatus;	/* RxXfer status. */
-    TI_UINT16           uFrameSn;
-} TRxQueuePacketEntry;	
-
-/* structure describe set of data that one Tid, also including the arras himself */
-typedef struct 
-{
-    /* array packets Entries */
-    TRxQueuePacketEntry aPaketsQueue [RX_QUEUE_ARRAY_SIZE];	
-    /* TID BA state */
-    TI_BOOL	            aTidBaEstablished;	              
-    /* index that winStar point on */
-    TI_UINT32 	        aWinStartArrayInex;	                    
-    /* windows size */
-    TI_UINT32	        aTidWinSize;
-	/* expected sequence number (ESN) */ 
-    TI_UINT16	        aTidExpectedSn;
-} TRxQueueTidDataBase;	
-
-/* structure describe set of data that assist of manage one SA RxQueue arrays */
-typedef struct 
-{
-    TRxQueueTidDataBase tSa1ArrayMng [MAX_NUM_OF_802_1d_TAGS];
-} TRxQueueArraysMng;	
-
-typedef struct
-{
-    TI_BOOL             bPacketMiss;                /* True - Wait for missing packets start timer
-                                                       False - all packets received in order */ 
-    TI_UINT16           aPacketsStored;             /* Represent the number of packets in Queue, 0 - Queue is empty */
-    TI_UINT8            aFrameTid;                  /* save the TID of the missing packet */
-} TPacketTimeout;
-
-
-/* main RxQueue structure in order to management the packets disordered array. */
-typedef struct 
-{
-    TI_HANDLE           hOs;                        /* OS handler */
-    TI_HANDLE           hReport;                    /* Report handler */
-	TI_HANDLE           hTimer;                     /* Timer Handle */
-    TRxQueueArraysMng   tRxQueueArraysMng;          /* manage each Source Address RxQueue arrays */
-    TPacketReceiveCb    tReceivePacketCB;           /* Receive packets CB address */
-    TI_HANDLE           hReceivePacketCB_handle;    /* Receive packets CB handler */
-	TPacketTimeout      tPacketTimeout;             /* save information about the missing packet */
-} TRxQueue;	
-
-/************************ static function declaration *****************************/
-static TI_STATUS RxQueue_PassPacket (TI_HANDLE hRxQueue, TI_STATUS tStatus, const void *pBuffer);
-static void RxQueue_PacketTimeOut (TI_HANDLE hRxQueue, TI_BOOL bTwdInitOccured);
-
-/** 
- * \fn     RxQueue_Create() 
- * \brief  Create the RxQueue module.
- * 
- * Allocate and clear the RxQueue module object.
- * 
- * \param  hOs - Handle to Os Abstraction Layer
- * \return Handle of the allocated object 
- * \sa     RxQueue_Destroy
- */ 
-TI_HANDLE RxQueue_Create (TI_HANDLE hOs)
-{
-	TRxQueue *pRxQueue;
-
-	/* allocate module object */
-	pRxQueue = os_memoryAlloc (hOs, sizeof(TRxQueue));
-	
-	if (!pRxQueue)
-	{
-		WLAN_OS_REPORT (("RxQueue_Create():  Allocation failed!!\n"));
-		return NULL;
-	}
-	
-    os_memoryZero (hOs, pRxQueue, (sizeof(TRxQueue)));
-
-    pRxQueue->hOs = hOs;
-
-	return (pRxQueue);
-}
-
-
-/** 
- * \fn     RxQueue_Destroy()
- * \brief  Destroy the module. 
- * 
- * Free the module's queues and object.
- * 
- * \param  hRxQueue - The module object
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     RxQueue_Create
- */ 
-TI_STATUS RxQueue_Destroy (TI_HANDLE hRxQueue)
-{
-    TRxQueue *pRxQueue;
-    
-    if (hRxQueue) {
-        pRxQueue = (TRxQueue *)hRxQueue;
-        
-        if (pRxQueue->hTimer) {
-            tmr_DestroyTimer (pRxQueue->hTimer);
-            pRxQueue->hTimer = NULL;
-        }
-        
-        /* free module object */
-        os_memoryFree (pRxQueue->hOs, pRxQueue, sizeof(TRxQueue));
-        
-        return TI_OK;
-    }
-    
-    return TI_NOK;
-}
-
-
-/** 
- * \fn     RxQueue_Init() 
- * \brief  Init required handles 
- * 
- * Init required handles and module variables.
- * 
- * \note    
- * \param  hRxQueue - The module object
- * \param  hReport - Report module Handles
- * \return TI_OK on success or TI_NOK on failure  
- * \sa     
- */ 
-TI_STATUS RxQueue_Init (TI_HANDLE hRxQueue, TI_HANDLE hReport, TI_HANDLE hTimerModule)
-{
-	TRxQueue *pRxQueue = (TRxQueue *)hRxQueue;
-    
-    pRxQueue->hReport   = hReport;
-
-	pRxQueue->hTimer = tmr_CreateTimer (hTimerModule);
-
-	return TI_OK;
-}
-
-
-/** 
- * \fn     RxQueue_Register_CB()
- * \brief  Register the function to be called for received Rx.
- * 
- * \note   
- * \param  hRxQueue - The module object
- * \param  CallBackID - event ID
- * \param  CBFunc - function address.
- * \param  CBObj - function parameter.
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     
- */ 
-void RxQueue_Register_CB (TI_HANDLE hRxQueue, TI_UINT32 uCallBackID, void *CBFunc, TI_HANDLE CBObj)
-{
-    TRxQueue* pRxQueue = (TRxQueue *)hRxQueue;
-
-    TRACE1(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION , "RxQueue_Register_CB: CallBack ID = 0x%x\n", uCallBackID);
-
-    switch(uCallBackID)
-    {
-    case TWD_INT_RECEIVE_PACKET:
-        pRxQueue->tReceivePacketCB = (TPacketReceiveCb)CBFunc;
-        pRxQueue->hReceivePacketCB_handle = CBObj;
-        break;
-
-    default:
-        TRACE0(pRxQueue->hReport, REPORT_SEVERITY_ERROR , "RxQueue_Register_CB: Illegal value\n");
-        break;
-    }
-}
-
-/**
- * \fn     RxQueue_CloseBaSession ()
- * \brief  Close BA session receiver and pass all packets in the TID queue to upper layer.
- *
- * \note   
- * \param  hRxQueue - RxQueue handle.
- * \param  uFrameTid - TID session.
- * \return None 
- * \sa     
- */ 
-void RxQueue_CloseBaSession(TI_HANDLE hRxQueue, TI_UINT8 uFrameTid)
-{
-    TRxQueue            *pRxQueue     = (TRxQueue *)hRxQueue;
-    TI_UINT32            i;
-    /*set the SA Tid pointer */
-    TRxQueueTidDataBase *pTidDataBase = &(pRxQueue->tRxQueueArraysMng.tSa1ArrayMng[uFrameTid]);
-    
-    /* TID illegal value ? */
-    if (uFrameTid >= MAX_NUM_OF_802_1d_TAGS)
-    {
-        TRACE1(pRxQueue->hReport, REPORT_SEVERITY_ERROR , "RxQueue_CloseBaSession: BA event - DELBA frame with TID value too big, TID = %d\n", uFrameTid);
-        
-        return;
-    }
-
-    if(pTidDataBase->aTidBaEstablished == TI_TRUE)
-    {
-        /* clean BA session */
-        pTidDataBase->aTidBaEstablished = TI_FALSE;
-
-        /* pass all valid entries at the array */ 
-        for (i = 0; (i < RX_QUEUE_ARRAY_SIZE) && (i < RX_QUEUE_WIN_SIZE); i++)
-        {
-            if (pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket != NULL)
-            {
-                RxQueue_PassPacket (pRxQueue, 
-                                    pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].tStatus,
-                                    pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket);
-
-                pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket = NULL;
-
-                pRxQueue->tPacketTimeout.aPacketsStored--;
-            }
-
-            pTidDataBase->aWinStartArrayInex ++;
-
-            /* aWinStartArrayInex % RX_QUEUE_ARRAY_SIZE */
-            pTidDataBase->aWinStartArrayInex &= RX_QUEUE_ARRAY_SIZE_BIT_MASK;
-        }
-
-        if (pRxQueue->tPacketTimeout.bPacketMiss) 
-        {
-                tmr_StopTimer (pRxQueue->hTimer);
-                pRxQueue->tPacketTimeout.bPacketMiss = TI_FALSE;
-        }
-    }
-}
-
-
-/** 
- * \fn     RxQueue_PassPacket()
- * \brief  Responsible on decode packet parameters and pass it to upper layer.
- *
- * \note   
- * \param  hRxQueue - RxQueue handle.
- * \param  aStatus - RxXfer status that indicate if the upper layer should free the packet or use it.
- * \param  pFrame - paket address of the packet
- * \param  pRxParams - address to structure of the Rx Descriptor received by FW.
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     
- */ 
-static TI_STATUS RxQueue_PassPacket (TI_HANDLE hRxQueue, TI_STATUS tStatus, const void *pBuffer)
-{
-
-    TRxQueue            *pRxQueue   = (TRxQueue *)hRxQueue;
-
-    if (tStatus == TI_OK)
-    {
-        /* Get the mac header location in the packet Buffer */
-        dot11_header_t *pMacHdr = (dot11_header_t *)(TI_UINT8*)RX_BUF_DATA(pBuffer);
-
-        /* Handle endian for the frame control fields */
-        pMacHdr->fc  = ENDIAN_HANDLE_WORD(pMacHdr->fc);
-        pMacHdr->duration = ENDIAN_HANDLE_WORD(pMacHdr->duration);
-        pMacHdr->seqCtrl = ENDIAN_HANDLE_WORD(pMacHdr->seqCtrl);
-    }
-    else
-    {
-        RxIfDescriptor_t    *pRxParams  = (RxIfDescriptor_t*)pBuffer;
-
-        pRxParams->status &= ~RX_DESC_STATUS_MASK;
-        pRxParams->status |= RX_DESC_STATUS_DRIVER_RX_Q_FAIL;
-    }
-
-    TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION , "RxQueue_PassPacket: call TWD_OWNER_RX_QUEUE CB. In std rxData_ReceivePacket()\n");
-
-    /* Set the packet to upper layer */
-    /* if the packet status not success it will be discarded */
-    pRxQueue->tReceivePacketCB (pRxQueue->hReceivePacketCB_handle, pBuffer);
-
-    return TI_OK;
-}
-
-
-/** 
- * \fn     RxQueue_ReceivePacket()
- * \brief  Main function of the RxQueue module. 
- * Responsible on reorder of the packets from the RxXfer to the RX module.
- * Call from RxXfer in order to pass packet to uppers layers.
- * In order to save disordered packets the module use array of structures per TID 
- * that each entry describe a packet. The array elements is sorted in the way that 
- * the winStart array index represent always the winStart packet and the lowest SN. 
- * Each increment index represent index at the BA window. Array index winEnd  always 
- * represent winEnd packet. The indexes of winStart and winEnd handled in cyclic manner.
- * The function functionality devided to parts:
- *   Part 1: 
- * in case the modulo receive packet with SN equal to winStart: 
- * "	pass it to upper layers
- * "	increases winStart and array index winStart
- * "	validate that all sequential queue packet are pass to the upper layers.
- *   Part 2: 
- * in case the modulo receive packet that SN between winStart to winEnd: 
- * "	Save it sorted at the array at index: Save index = ((SN - winStart) + index array winStart) % arraySize.
- *   Part 3: 
- * in case the modulo receive packet that SN higher than winEnd: 
- * "	Update winStart and WinEnd. 
- * "	Save it sorted at the array in index winEnd index.
- * "	Pass to the upper layers all packets at the array indexes from old winStart index to the updated winStart index.
- *   Part 4 + 5: 
- * in case the modulo receive BA event packet: 
- * "	Update winStart and WinEnd 
- * "	Pass to the upper layers all packets at the array indexes from old winStart index to the updated winStart index.
- * "	Free BA event packet via pass it to upper layers with error status.
- *
- * \note   
- * \param  hRxQueue - RxQueue handle.
- * \param  aStatus - RxXfer status that indicate if the upper layer should free the packet or use it.
- * \param  pBuffer - paket address of the packet
- * \return None 
- * \sa     
- */ 
-void RxQueue_ReceivePacket (TI_HANDLE hRxQueue, const void * pBuffer)
-{
-    TRxQueue            *pRxQueue   = (TRxQueue *)hRxQueue;
-    RxIfDescriptor_t    *pRxParams  = (RxIfDescriptor_t*)pBuffer;
-    TI_UINT8            *pFrame     = RX_BUF_DATA((TI_UINT8 *)pBuffer);
-    TI_STATUS           tStatus     = TI_OK;
-    dot11_header_t      *pHdr       = (dot11_header_t *)pFrame;
-    TI_UINT16		    uQosControl;
-
-    COPY_WLAN_WORD(&uQosControl, &pHdr->qosControl); /* copy with endianess handling. */
-
-    TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: packet_class_tag = 0x%x(%d)",pRxParams->packet_class_tag,pRxParams->packet_class_tag);
-
-    /* 
-     * Retrieving the TAG from the packet itself and not from the Rx Descriptor since by now it is not correct
-     * Note: in the DR TAG_CLASS_EAPOL packet handled as TAG_CLASS_QOS_DATA   
-     */
-    if (IS_QOS_FRAME(*(TI_UINT16*)pFrame) && (pRxParams->packet_class_tag != TAG_CLASS_QOS_DATA) && (pRxParams->packet_class_tag != TAG_CLASS_AMSDU))
-	{
-        TRACE1(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: BAD CLASS TAG =0x%x from FW.\n", pRxParams->packet_class_tag);
-		
-        /* Get AMSDU bit from frame */
-        if( uQosControl & DOT11_QOS_CONTROL_FIELD_A_MSDU_BITS)
-        {
-            pRxParams->packet_class_tag = TAG_CLASS_AMSDU;
-        }
-        else
-        {
-            pRxParams->packet_class_tag = TAG_CLASS_QOS_DATA;
-        }
-    }
-
-    /* 
-     * packet doesn't need reorder ? 
-     */
-    if ((pRxParams->packet_class_tag != TAG_CLASS_QOS_DATA) && (pRxParams->packet_class_tag != TAG_CLASS_BA_EVENT) && (pRxParams->packet_class_tag != TAG_CLASS_AMSDU))
-    {
-        TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: pass packet without reorder.\n");
-        
-        RxQueue_PassPacket (pRxQueue, tStatus, pBuffer);
-
-        return;
-    }
-
-
-    /* 
-     * pRxParams->type == TAG_CLASS_QOS_DATA ? 
-     */
-    if ((pRxParams->packet_class_tag == TAG_CLASS_QOS_DATA) || (pRxParams->packet_class_tag == TAG_CLASS_AMSDU))
-    {
-        TI_UINT8            uFrameTid;
-        TI_UINT16           uFrameSn;
-        TI_UINT16		    uSequenceControl;
-        TRxQueueTidDataBase *pTidDataBase;
-
-        /* Get TID from frame */
-        uFrameTid = uQosControl & DOT11_QOS_CONTROL_FIELD_TID_BITS;
-
-        TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: QoS Packet received");
-        TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: uFrameTid = 0x%x(%d)",uFrameTid,uFrameTid);
-
-        /* TID illegal value ? */
-        if (uFrameTid >= MAX_NUM_OF_802_1d_TAGS)
-        {
-            TRACE1(pRxQueue->hReport, REPORT_SEVERITY_ERROR, "RxQueue_ReceivePacket: TID value too big, TID = %d. packet discarded!\n",uFrameTid);
-
-            RxQueue_PassPacket (pRxQueue, TI_NOK, pBuffer);
-
-            return;
-        }
-
-        /* Set the SA Tid pointer */
-        pTidDataBase = &(pRxQueue->tRxQueueArraysMng.tSa1ArrayMng[uFrameTid]);
-
-        /* TID legal value */
-        /* Packet TID BA session not established ? */ 
-        if (pTidDataBase->aTidBaEstablished != TI_TRUE)
-        {
-            TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: pass packet without reorder.\n");
-
-            RxQueue_PassPacket (pRxQueue, tStatus, pBuffer);
-
-            return;
-        }
-
-        /* packet TID BA established */
-        /* Get Sequence Number from frame */
-        COPY_WLAN_WORD(&uSequenceControl, &pHdr->seqCtrl); /* copy with endianess handling. */
-        uFrameSn = (uSequenceControl & DOT11_SC_SEQ_NUM_MASK) >> 4;
-
-        TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: uFrameSn = 0x%x(%d)", uFrameSn, uFrameSn);
-        TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: aTidExpectedSn = 0x%x(%d)",pTidDataBase->aTidExpectedSn, pTidDataBase->aTidExpectedSn);
-
-        /* 
-         * Note: 
-         * The FW never sends packet, in establish TID BA, with SN less than ESN !!! 
-         */
-
-        /* Part 1 - Frame Sequence Number is the expected one ? */
-        if (uFrameSn == pTidDataBase->aTidExpectedSn)
-        {
-            TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: frame Sequence Number == expected one Sequence Number.\n");
-
-			/* Stop timer in case that the expected SN received and timer was running */
-
-
-            /* If we wait for 2 consecutive packets we should not stop the timer - This is why we are checking after the while loop, if we have 
-               more packets stored, and if we have, we start the timer again.
-            */
-            if (pRxQueue->tPacketTimeout.bPacketMiss)
-            {
-                tmr_StopTimer (pRxQueue->hTimer);
-                pRxQueue->tPacketTimeout.bPacketMiss = TI_FALSE;
-            }
-
-
-            /* Pass the packet */
-            RxQueue_PassPacket (pRxQueue, tStatus, pBuffer);
-
-            /* Increase expected SN to the next */
-            pTidDataBase->aTidExpectedSn++;
-            pTidDataBase->aTidExpectedSn &= 0xfff;  /* SN is 12 bits long */
-
-            /* Increase the ArrayInex to the next */
-            pTidDataBase->aWinStartArrayInex++;
-
-            /* aWinStartArrayInex % RX_QUEUE_ARRAY_SIZE */
-            pTidDataBase->aWinStartArrayInex &= RX_QUEUE_ARRAY_SIZE_BIT_MASK;
-
-            /* Pass all saved queue packets with SN higher than the expected one */
-            while (pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket != NULL)
-            {
-                TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: Pass all saved queue packets with SN higher than the expected one that was just received.");
-                TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: aTidExpectedSn = 0x%x(%d)", pTidDataBase->aTidExpectedSn, pTidDataBase->aTidExpectedSn);
-                TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: aWinStartArrayInex = 0x%x(%d)", pTidDataBase->aWinStartArrayInex, pTidDataBase->aWinStartArrayInex);
-
-                RxQueue_PassPacket (pRxQueue, 
-                                    pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].tStatus,
-                                    pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket);
-
-                pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket = NULL;
-
-                pTidDataBase->aWinStartArrayInex++;
-
-                /* aWinStartArrayInex % RX_QUEUE_ARRAY_SIZE */
-                pTidDataBase->aWinStartArrayInex &= RX_QUEUE_ARRAY_SIZE_BIT_MASK;
-
-                 pTidDataBase->aTidExpectedSn++;
-				 pTidDataBase->aTidExpectedSn &= 0xfff; /* SN is 12 bits long */
-
-				 /* Decrease the packets in queue */
-                pRxQueue->tPacketTimeout.aPacketsStored--;
-            }
-
-
-            /* aTidExpectedSn % 0xfff in order to tack care of wrap around */
-            pTidDataBase->aTidExpectedSn &= 0xfff; 
-
-            /* If there are still packets stored in the queue - start timer */
-			if (pRxQueue->tPacketTimeout.aPacketsStored)
-            {
-                tmr_StartTimer (pRxQueue->hTimer, RxQueue_PacketTimeOut, pRxQueue, BA_SESSION_TIME_TO_SLEEP, TI_FALSE);
-
-                pRxQueue->tPacketTimeout.bPacketMiss = TI_TRUE;
-                pRxQueue->tPacketTimeout.aFrameTid   = uFrameTid;
-            }
-
-            return;
-        }
-
-        /* Frame Sequence Number is lower than Expected sequence number (ISN) ? */ 
-        if (! BA_SESSION_IS_A_BIGGER_THAN_B (uFrameSn, pTidDataBase->aTidExpectedSn))			
-        {
-            /* WLAN_OS_REPORT(("%s: ERROR - SN=%u is less than ESN=%u\n", __FUNCTION__, uFrameSn, pTidDataBase->aTidExpectedSn)); */
-            TRACE0(pRxQueue->hReport, REPORT_SEVERITY_ERROR, "RxQueue_ReceivePacket: frame Sequence Number is lower than expected sequence number.\n");
-
-            RxQueue_PassPacket (pRxQueue, tStatus, pBuffer);
-
-            return;
-        }
-
-        /* Part 2 - Frame Sequence Number between winStart and winEnd ? */
-        if ((BA_SESSION_IS_A_BIGGER_THAN_B (uFrameSn, pTidDataBase->aTidExpectedSn)) &&
-            /* mean: uFrameSn <= pTidDataBase->aTidExpectedSn + pTidDataBase->aTidWinSize) */
-            ( ! BA_SESSION_IS_A_BIGGER_THAN_B (uFrameSn,(pTidDataBase->aTidExpectedSn + pTidDataBase->aTidWinSize - 1))))
-        {
-            TI_UINT16 uSaveIndex = pTidDataBase->aWinStartArrayInex + (TI_UINT16)((uFrameSn + SEQ_NUM_WRAP - pTidDataBase->aTidExpectedSn) & SEQ_NUM_MASK);
-        
-            /* uSaveIndex % RX_QUEUE_ARRAY_SIZE */
-            uSaveIndex &= RX_QUEUE_ARRAY_SIZE_BIT_MASK; 
-
-            TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: frame Sequence Number between winStart and winEnd.\n");
-            TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: uSaveIndex = 0x%x(%d)",uSaveIndex,uSaveIndex);
-
-            /* Before storing packet in queue, make sure the place in the queue is vacant */
-			if (pTidDataBase->aPaketsQueue[uSaveIndex].pPacket == NULL)
-			{
-                TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: Enter packet to Reorder Queue");
-                
-                /* Store the packet in the queue */
-                pTidDataBase->aPaketsQueue[uSaveIndex].tStatus  = tStatus;
-                pTidDataBase->aPaketsQueue[uSaveIndex].pPacket  = (void *)pBuffer;
-                pTidDataBase->aPaketsQueue[uSaveIndex].uFrameSn = uFrameSn;
-
-				pRxQueue->tPacketTimeout.aPacketsStored++;
-
-           
-				/* Start Timer [only if timer is not already started - according to bPacketMiss] */
-                if(pRxQueue->tPacketTimeout.bPacketMiss == TI_FALSE)
-                {     
-				    tmr_StartTimer (pRxQueue->hTimer, RxQueue_PacketTimeOut, pRxQueue, BA_SESSION_TIME_TO_SLEEP, TI_FALSE);
-				    pRxQueue->tPacketTimeout.bPacketMiss = TI_TRUE;
-				    pRxQueue->tPacketTimeout.aFrameTid   = uFrameTid;
-			    }
-            }
-			else
-			{
- 				 TRACE1(pRxQueue->hReport, REPORT_SEVERITY_ERROR, "RxQueue_ReceivePacket: frame Sequence has already saved. uFrameSn = %d\n", uFrameSn);
-
-				 RxQueue_PassPacket (pRxQueue, TI_NOK, pBuffer);
-				 return;
-			}
-            return;
-        }
-
-
-        /* 
-        Part 3 - Frame Sequence Number higher than winEnd ? 
-        */
-        if ( BA_SESSION_IS_A_BIGGER_THAN_B (uFrameSn, (pTidDataBase->aTidExpectedSn + pTidDataBase->aTidWinSize - 1)) )
-        {
-            TI_UINT32 i;
-            TI_UINT16 uNewWinStartSn = (uFrameSn + SEQ_NUM_WRAP - pTidDataBase->aTidWinSize + 1) & SEQ_NUM_MASK;
-            TI_UINT16 uSaveIndex;
-            
-            
-			TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: frame Sequence Number higher than winEnd.\n");
-            TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: uNewWinStartSn = 0x%x(%d) STOP TIMER",uNewWinStartSn,uNewWinStartSn);
-
-            /* If timer is on - stop it */
-			if (pRxQueue->tPacketTimeout.bPacketMiss) 
-            {
-                tmr_StopTimer (pRxQueue->hTimer);
-                pRxQueue->tPacketTimeout.bPacketMiss = TI_FALSE;
-            }
-
-            /* Increase the ArrayInex to the next */
-            pTidDataBase->aWinStartArrayInex++;
-
-            /* aWinStartArrayInex % RX_QUEUE_ARRAY_SIZE */
-            pTidDataBase->aWinStartArrayInex &= RX_QUEUE_ARRAY_SIZE_BIT_MASK;
-
-            /* Update the Expected SN since the current one is lost */
-            pTidDataBase->aTidExpectedSn++;
-            pTidDataBase->aTidExpectedSn &= 0xFFF;
-
-            /* Pass all saved queue packets with SN lower than the new win start */
-            for (i = 0;
-                 BA_SESSION_IS_A_BIGGER_THAN_B(uNewWinStartSn,pTidDataBase->aTidExpectedSn) && 
-                  (i < RX_QUEUE_ARRAY_SIZE) && 
-                  (i < pTidDataBase->aTidWinSize);
-                 i++)
-            {
-                TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: aTidExpectedSn = 0x%x(%d)",pTidDataBase->aTidExpectedSn,pTidDataBase->aTidExpectedSn);
-                TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: aWinStartArrayInex = 0x%x(%d)",pTidDataBase->aWinStartArrayInex,pTidDataBase->aWinStartArrayInex);
-
-                if (pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket != NULL)
-                {
-                    TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: Send Packet to Upper layer");
-                    RxQueue_PassPacket (pRxQueue, 
-                                        pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].tStatus,
-                                        pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket);
-
-                    pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket = NULL;
-
-					pRxQueue->tPacketTimeout.aPacketsStored--;
-                }
-
-                pTidDataBase->aWinStartArrayInex++;
-
-                /* aWinStartArrayInex % RX_QUEUE_ARRAY_SIZE */
-                pTidDataBase->aWinStartArrayInex &= RX_QUEUE_ARRAY_SIZE_BIT_MASK;
-
-                pTidDataBase->aTidExpectedSn++;
-                pTidDataBase->aTidExpectedSn &= 0xFFF;
-
-            }
-
-            TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: aTidExpectedSn = 0x%x(%d)",pTidDataBase->aTidExpectedSn,pTidDataBase->aTidExpectedSn);
-            TRACE1(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: i = %d",i);
-
-            /* Calculate the new Expected SN */
-            if (i == pTidDataBase->aTidWinSize)
-            {
-                TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: Set aTidExpectedSn to uNewWinStartSn");
-                pTidDataBase->aTidExpectedSn = uNewWinStartSn;
-            }
-            else
-            {
-                TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: Send all saved packets");
-                /* In case the uWinStartDelta lower than aTidWinSize check if ther are packets stored in Array */
- 
-                while (pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket != NULL) 
-                {
-                    TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: Send packet with SN = 0x%x(%d)",pTidDataBase->aTidExpectedSn,pTidDataBase->aTidExpectedSn);
-                
-                    RxQueue_PassPacket ( pRxQueue, 
-                                         pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].tStatus,
-                                         pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket
-                                       );
-                    pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket = NULL;
-
-                    pTidDataBase->aWinStartArrayInex++;
-
-                    /* aWinStartArrayInex % RX_QUEUE_ARRAY_SIZE */
-                    pTidDataBase->aWinStartArrayInex &= RX_QUEUE_ARRAY_SIZE_BIT_MASK;
-
-                    pTidDataBase->aTidExpectedSn++;
-                    pTidDataBase->aTidExpectedSn &= 0xFFF;
-
-                    pRxQueue->tPacketTimeout.aPacketsStored--;
-                }
-            }
-
-            TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: aTidExpectedSn = 0x%x(%d)",pTidDataBase->aTidExpectedSn,pTidDataBase->aTidExpectedSn);
-
-            if(pTidDataBase->aTidExpectedSn == uFrameSn)
-            {
-                TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: Send current packet to uper layer");
-                /* pass the packet */
-                RxQueue_PassPacket (pRxQueue, tStatus, pBuffer);
-                pTidDataBase->aTidExpectedSn++;
-				pTidDataBase->aTidExpectedSn &= 0xfff;
-            }
-            else
-            {
-                uSaveIndex = pTidDataBase->aWinStartArrayInex + (TI_UINT16)((uFrameSn + SEQ_NUM_WRAP - pTidDataBase->aTidExpectedSn) & SEQ_NUM_MASK);  
-
-                TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: Enter current packet to Reorder Queue");
-                TRACE2(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: uSaveIndex = 0x%x(%d)", uSaveIndex, uSaveIndex);
-
-				/* uSaveIndex % RX_QUEUE_ARRAY_SIZE */
-				uSaveIndex &= RX_QUEUE_ARRAY_SIZE_BIT_MASK; 
-
-				/* Save the packet in the last entry of the queue */
-				pTidDataBase->aPaketsQueue[uSaveIndex].tStatus = tStatus;
-				pTidDataBase->aPaketsQueue[uSaveIndex].pPacket = (void *)pBuffer;
-				pTidDataBase->aPaketsQueue[uSaveIndex].pPacket = (void *)pBuffer;
-
-               pRxQueue->tPacketTimeout.aPacketsStored++;
-            }
-
-
-            /* aTidExpectedSn % 0xfff in order to tack care of wrap around */
-            pTidDataBase->aTidExpectedSn &= 0xfff; 
-
-            /* If there are still packets stored in the queue - start timer */
-			if (pRxQueue->tPacketTimeout.aPacketsStored) 
-            {
-                tmr_StartTimer (pRxQueue->hTimer, RxQueue_PacketTimeOut, pRxQueue, BA_SESSION_TIME_TO_SLEEP, TI_FALSE);
-                pRxQueue->tPacketTimeout.bPacketMiss = TI_TRUE;
-                pRxQueue->tPacketTimeout.aFrameTid   = uFrameTid;
-            }
-
-            return;
-        }
-    }
-
-
-    /* 
-     * BA event ? 
-     */
-    if (pRxParams->packet_class_tag == TAG_CLASS_BA_EVENT)
-    {
-        TRxQueueTidDataBase *pTidDataBase;
-        TI_UINT8            *pDataFrameBody;
-        TI_UINT16           ufc;
-        TI_UINT8            uFrameTid;
-        TI_UINT16           uStartingSequenceNumber;
-        TI_UINT16           uWinStartDelta;
-        TI_UINT16           uBarControlField;
-        TI_UINT16           uBaStartingSequenceControlField;
-        TI_UINT16           uBAParameterField;         
-        TI_UINT32           i;
-
-        /* Get sub type from frame */
-        COPY_WLAN_WORD(&ufc, &pHdr->fc); /* copy with endianess handling. */
-
-        /* get the type to BA event */
-        switch ((dot11_Fc_Sub_Type_e)(ufc & DOT11_FC_SUB_MASK))
-        {
-        case DOT11_FC_SUB_BAR:
-            TRACE0(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION , "RxQueue_ReceivePacket: BA event - BAR frame.\n");
-
-            /* get pointer to the frame body */
-            pDataFrameBody = pFrame + sizeof(dot11_BarFrameHeader_t);
-
-            /* Get TID from BAR frame */
-            COPY_WLAN_WORD (&uBarControlField, (TI_UINT16 *)pDataFrameBody); /* copy with endianess handling. */
-            uFrameTid = (uBarControlField & DOT11_BAR_CONTROL_FIELD_TID_BITS) >> 12;
-
-            /* TID illegal value ? */
-            if (uFrameTid >= MAX_NUM_OF_802_1d_TAGS)
-            {
-                TRACE1(pRxQueue->hReport, REPORT_SEVERITY_ERROR , "RxQueue_ReceivePacket: BA event - BAR frame with TID value too big, TID = %d.\n",uFrameTid);
-
-                RxQueue_PassPacket (pRxQueue, TI_NOK, pBuffer);
-
-                return;
-            }
-
-            /* set the SA Tid pointer */
-            pTidDataBase = &(pRxQueue->tRxQueueArraysMng.tSa1ArrayMng[uFrameTid]);
-
-            /* TID legal value */
-            /* packet TID BA not established ? */ 
-            if (pTidDataBase->aTidBaEstablished != TI_TRUE)
-            {
-                TRACE1(pRxQueue->hReport, REPORT_SEVERITY_ERROR , "RxQueue_ReceivePacket: BA event - BAR frame for TID not established, TID = %d.\n",uFrameTid);
-
-                RxQueue_PassPacket (pRxQueue, TI_NOK, pBuffer);
-
-                return;
-            }
-
-            /* Get Starting Sequence number from BAR frame */
-            pDataFrameBody = pDataFrameBody + 2;
-            COPY_WLAN_WORD (&uBaStartingSequenceControlField, (TI_UINT16 *)pDataFrameBody); /* copy with endianess handling. */
-            uStartingSequenceNumber = (uBaStartingSequenceControlField & DOT11_SC_SEQ_NUM_MASK) >> 4;
-
-            /* Starting Sequence Number is higher than winStart ? */
-            if ( BA_SESSION_IS_A_BIGGER_THAN_B (uStartingSequenceNumber, pTidDataBase->aTidExpectedSn) )
-            {
-                uWinStartDelta = uStartingSequenceNumber - pTidDataBase->aTidExpectedSn;
-                if (pRxQueue->tPacketTimeout.bPacketMiss) 
-                {
-                    tmr_StopTimer (pRxQueue->hTimer);
-                    pRxQueue->tPacketTimeout.bPacketMiss = TI_FALSE;
-                }
-
-                /* pass all saved queue packets with SN lower than the new win start */
-                for (i = 0;
-                     ((i < uWinStartDelta) || (pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket != NULL)) &&
-                      (i < RX_QUEUE_ARRAY_SIZE) && 
-                      (i < RX_QUEUE_WIN_SIZE);
-                     i++)
-                {
-                    if (pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket != NULL)
-                    {
-                        RxQueue_PassPacket (pRxQueue, 
-                                            pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].tStatus,
-                                            pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket);
-
-                        pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket = NULL;
-                        pRxQueue->tPacketTimeout.aPacketsStored--;
-                    }
-
-                    pTidDataBase->aWinStartArrayInex++;
-
-                    /* aWinStartArrayInex % RX_QUEUE_ARRAY_SIZE */
-                    pTidDataBase->aWinStartArrayInex &= RX_QUEUE_ARRAY_SIZE_BIT_MASK;
-                }
-
-                if (pRxQueue->tPacketTimeout.aPacketsStored) 
-                {
-                    tmr_StartTimer (pRxQueue->hTimer, RxQueue_PacketTimeOut, pRxQueue, BA_SESSION_TIME_TO_SLEEP, TI_FALSE);
-                    pRxQueue->tPacketTimeout.bPacketMiss = TI_TRUE;
-                    pRxQueue->tPacketTimeout.aFrameTid = uFrameTid;
-                }
-
-
-                pTidDataBase->aTidExpectedSn = uStartingSequenceNumber;
-            }
-            break;
-
-
-        case DOT11_FC_SUB_ACTION:
-            /* get pointer to the frame body */
-            pDataFrameBody = pFrame + sizeof(dot11_mgmtHeader_t);
-
-            /* get Action field from BA action frame */
-            pDataFrameBody++;
-            switch(*pDataFrameBody)
-            {
-            case DOT11_BA_ACTION_ADDBA:
-
-
-                /* get TID field and winSize from ADDBA action frame */
-                pDataFrameBody = pDataFrameBody + 2;
-                COPY_WLAN_WORD(&uBAParameterField, (TI_UINT16 *)pDataFrameBody); /* copy with endianess handling. */
-                uFrameTid = (uBAParameterField & DOT11_BA_PARAMETER_SET_FIELD_TID_BITS) >> 2;
-
-                /* TID illegal value ? */
-                if (uFrameTid >= MAX_NUM_OF_802_1d_TAGS)
-                {
-                    TRACE1(pRxQueue->hReport, REPORT_SEVERITY_ERROR , "RxQueue_ReceivePacket: BA event - ADDBA frame with TID value too big, TID = %d.\n",uFrameTid);
-
-                    RxQueue_PassPacket (pRxQueue, TI_NOK, pBuffer);
-
-                    return;
-                }
-
-                /*set the SA Tid pointer */
-                pTidDataBase = &(pRxQueue->tRxQueueArraysMng.tSa1ArrayMng[uFrameTid]);
-
-                /* TID legal value */
-                /* packet TID BA established ? */ 
-                if (pTidDataBase->aTidBaEstablished == TI_TRUE)
-                {
-                    TRACE1(pRxQueue->hReport, REPORT_SEVERITY_ERROR , "RxQueue_ReceivePacket: BA event - ADDBA frame for TID already established, TID = %d.\n",uFrameTid);
-
-                    RxQueue_PassPacket (pRxQueue, TI_NOK, pBuffer);
-
-                    return;
-                }
-
-                /* get winSize from ADDBA action frame */
-                pTidDataBase->aTidWinSize = (uBAParameterField & DOT11_BA_PARAMETER_SET_FIELD_WINSIZE_BITS) >> 6; 
-
-                /* winSize illegal value ? */ 
-                if (pTidDataBase->aTidWinSize > RX_QUEUE_WIN_SIZE)
-                {
-                    /* In case the win Size is higher than 8 the driver and the FW set it to 8 and inform the AP in ADDBA respond */
-                    pTidDataBase->aTidWinSize = RX_QUEUE_WIN_SIZE;
-                }
-
-                /* packet TID BA not yet established and winSize legal */
-                /* establishe BA TID */
-                pTidDataBase->aTidBaEstablished = TI_TRUE;
-
-                /* get initial sequence number (ISN) from ADDBA action frame */
-                pDataFrameBody = pDataFrameBody + 4;
-                COPY_WLAN_WORD (&uStartingSequenceNumber, (TI_UINT16 *)pDataFrameBody); /* copy with endianess handling. */
-                pTidDataBase->aTidExpectedSn = (uStartingSequenceNumber & DOT11_SC_SEQ_NUM_MASK) >> 4;
-                pTidDataBase->aWinStartArrayInex = 0;
-                os_memoryZero (pRxQueue->hOs, pTidDataBase->aPaketsQueue, sizeof (TRxQueuePacketEntry) * RX_QUEUE_ARRAY_SIZE);
-                break;
-
-            case DOT11_BA_ACTION_DELBA:
-
-
-                /* get TID field and winSize from ADDBA action frame */
-                pDataFrameBody = pDataFrameBody + 1;
-                COPY_WLAN_WORD(&uBAParameterField, (TI_UINT16 *)pDataFrameBody); /* copy with endianess handling. */
-                uFrameTid = (uBAParameterField & DOT11_DELBA_PARAMETER_FIELD_TID_BITS) >> 12;
-
-                /* TID illegal value ? */
-                if (uFrameTid >= MAX_NUM_OF_802_1d_TAGS)
-                {
-                    TRACE1(pRxQueue->hReport, REPORT_SEVERITY_ERROR , "RxQueue_ReceivePacket: BA event - DELBA frame with TID value too big, TID = %d.\n",uFrameTid);
-
-                    RxQueue_PassPacket (pRxQueue, TI_NOK, pBuffer);
-
-                    return;
-                }
-
-                /*set the SA Tid pointer */
-                pTidDataBase = &(pRxQueue->tRxQueueArraysMng.tSa1ArrayMng[uFrameTid]);
-
-                /* TID legal value */
-                /* packet TID BA not established ? */ 
-                if (pTidDataBase->aTidBaEstablished != TI_TRUE)
-                {
-                    TRACE1(pRxQueue->hReport, REPORT_SEVERITY_ERROR , "RxQueue_ReceivePacket: BA event - DELBA frame for TID not established, TID = %d.\n",uFrameTid);
-
-                    RxQueue_PassPacket (pRxQueue, TI_NOK, pBuffer);
-
-                    return;
-                }
-
-                RxQueue_CloseBaSession(hRxQueue, uFrameTid);
-                break;
-
-            default:
-                TRACE1(pRxQueue->hReport, REPORT_SEVERITY_ERROR , "RxQueue_ReceivePacket: BA event Action field from BA action frame illegal. action = 0x%x\n",*pDataFrameBody);
-
-                RxQueue_PassPacket (pRxQueue, TI_NOK, pBuffer);
-
-                return;
-            }
-            break;
-
-        default:
-            TRACE1(pRxQueue->hReport, REPORT_SEVERITY_ERROR , "RxQueue_ReceivePacket: BA event with Subtype illegal. Subtype = 0x%x\n",((ufc & DOT11_FC_SUB_MASK) >> 4));
-
-            RxQueue_PassPacket (pRxQueue, TI_NOK, pBuffer);
-
-            return;
-          }
-
-    }
-
-    TRACE1(pRxQueue->hReport, REPORT_SEVERITY_INFORMATION, "RxQueue_ReceivePacket: unknow type tag. tag = %d\n", pRxParams->packet_class_tag);
-
-    RxQueue_PassPacket (pRxQueue, tStatus, pBuffer);
-
-    return;
-}
-
-
-/*
-Function Name : RxQueue_PacketTimeOut
-
-Description   : This function sends all consecutive old packets stored in a specific TID queue to the upper layer.
-
-                This function is called on timer wake up. 
-                [The timer is started when we have stored packets in the RxQueue].
-                
-
-Parameters    : hRxQueue        - A handle to the RxQueue structure.
-                bTwdInitOccured - Not used.
-
-Returned Value: void
-*/
-static void RxQueue_PacketTimeOut (TI_HANDLE hRxQueue, TI_BOOL bTwdInitOccured)
-{
-    TRxQueue            *pRxQueue   = (TRxQueue *)hRxQueue;
-    TRxQueueTidDataBase *pTidDataBase;
-
-    pRxQueue->tPacketTimeout.bPacketMiss = TI_FALSE;
-
-    /* Set the SA Tid pointer */
-    pTidDataBase = &(pRxQueue->tRxQueueArraysMng.tSa1ArrayMng[pRxQueue->tPacketTimeout.aFrameTid]);
-
-
-    if (pRxQueue->tPacketTimeout.aPacketsStored) 
-    {
-
-        /* Find the first stored packet */
-        while (pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket == NULL) 
-        {
-            pTidDataBase->aWinStartArrayInex++;
-    
-            /* aWinStartArrayInex % RX_QUEUE_ARRAY_SIZE */
-            pTidDataBase->aWinStartArrayInex &= RX_QUEUE_ARRAY_SIZE_BIT_MASK;
-        
-            pTidDataBase->aTidExpectedSn++;
-            pTidDataBase->aTidExpectedSn &= 0xFFF;
-        }
-
-
-        /* Send all packets in order */
-        while ((pRxQueue->tPacketTimeout.aPacketsStored > 0) && (pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket != NULL)) 
-        {
-
-            RxQueue_PassPacket (pRxQueue, 
-                                pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].tStatus,
-                                pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket);
-    
-            pTidDataBase->aPaketsQueue[pTidDataBase->aWinStartArrayInex].pPacket = NULL;
-
-            pTidDataBase->aWinStartArrayInex++;
-
-            /* aWinStartArrayInex % RX_QUEUE_ARRAY_SIZE */
-            pTidDataBase->aWinStartArrayInex &= RX_QUEUE_ARRAY_SIZE_BIT_MASK;
-
-            pTidDataBase->aTidExpectedSn++;
-            pTidDataBase->aTidExpectedSn &= 0xFFF;
-
-            pRxQueue->tPacketTimeout.aPacketsStored--;
-            
-        }
-    }
-
-    if (pRxQueue->tPacketTimeout.aPacketsStored) 
-    {
-        tmr_StartTimer (pRxQueue->hTimer, RxQueue_PacketTimeOut, pRxQueue, BA_SESSION_TIME_TO_SLEEP, TI_FALSE);
-        pRxQueue->tPacketTimeout.bPacketMiss = TI_TRUE;
-    }
-}
diff --git a/wl1271/TWD/Data_Service/txCtrlBlk.c b/wl1271/TWD/Data_Service/txCtrlBlk.c
deleted file mode 100644
index 41b867b..0000000
--- a/wl1271/TWD/Data_Service/txCtrlBlk.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * txCtrlBlk.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  txCtrlBlk.c
- *   
- *   PURPOSE: Maintains active packets Tx attributes table (including descriptor). 
- * 
- *	 DESCRIPTION:  
- *   ============
- *		This module allocates and frees table entry for each packet in the Tx
- *		process (from sendPkt by upper driver until Tx-complete).
- *
- ****************************************************************************/
-#define __FILE_ID__  FILE_ID_99
-#include "osApi.h"
-#include "tidef.h"
-#include "report.h"
-#include "context.h"
-#include "TWDriver.h"
-#include "txCtrlBlk_api.h"
-
-
-/* The TxCtrlBlk module object - contains the control-block table. */
-typedef struct
-{
-	TI_HANDLE   hOs;
-	TI_HANDLE   hReport;
-	TI_HANDLE   hContext;
-
-	TTxCtrlBlk  aTxCtrlBlkTbl[CTRL_BLK_ENTRIES_NUM]; /* The table of control-block entries. */
-
-#ifdef TI_DBG  /* Just for debug. */
-	TI_UINT32	uNumUsedEntries;  
-#endif
-
-} TTxCtrlBlkObj;
-
-
-/****************************************************************************
- *                      txCtrlBlk_Create()
- ****************************************************************************
- * DESCRIPTION:	Create the Tx control block table object 
- * 
- * INPUTS:	hOs
- * 
- * OUTPUT:	None
- * 
- * RETURNS:	The Created object
- ****************************************************************************/
-TI_HANDLE txCtrlBlk_Create (TI_HANDLE hOs)
-{
-	TTxCtrlBlkObj *pTxCtrlBlk;
-
-	pTxCtrlBlk = os_memoryAlloc (hOs, sizeof(TTxCtrlBlkObj));
-	if (pTxCtrlBlk == NULL)
-		return NULL;
-
-	os_memoryZero (hOs, pTxCtrlBlk, sizeof(TTxCtrlBlkObj));
-
-	pTxCtrlBlk->hOs = hOs;
-
-	return( (TI_HANDLE)pTxCtrlBlk );
-}
-
-
-/****************************************************************************
- *                      txCtrlBlk_Destroy()
- ****************************************************************************
- * DESCRIPTION:	Destroy the Tx control block table object 
- * 
- * INPUTS:	hTxCtrlBlk - The object to free
- * 
- * OUTPUT:	None
- * 
- * RETURNS:	TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS txCtrlBlk_Destroy (TI_HANDLE hTxCtrlBlk)
-{
-	TTxCtrlBlkObj *pTxCtrlBlk = (TTxCtrlBlkObj *)hTxCtrlBlk;
-
-	if (pTxCtrlBlk)
-		os_memoryFree(pTxCtrlBlk->hOs, pTxCtrlBlk, sizeof(TTxCtrlBlkObj));
-
-	return TI_OK;
-}
-
-
-/****************************************************************************
- *               txCtrlBlk_Init()
- ****************************************************************************
-   DESCRIPTION:	 Initialize the Tx control block module.
- ****************************************************************************/
-TI_STATUS txCtrlBlk_Init (TI_HANDLE hTxCtrlBlk, TI_HANDLE hReport, TI_HANDLE hContext)
-{
-	TTxCtrlBlkObj *pTxCtrlBlk = (TTxCtrlBlkObj *)hTxCtrlBlk;
-	TTxnStruct    *pTxn;
-	TI_UINT8       entry;
-
-	pTxCtrlBlk->hReport  = hReport;
-	pTxCtrlBlk->hContext = hContext;
-	
-	/* For all entries, write the entry index in the descriptor and the next entry address
-		 in the next free entery pointer. Init also some other fields. */
-	for(entry = 0; entry < CTRL_BLK_ENTRIES_NUM; entry++)
-	{
-		pTxCtrlBlk->aTxCtrlBlkTbl[entry].tTxDescriptor.descID = entry;
-		pTxCtrlBlk->aTxCtrlBlkTbl[entry].pNextFreeEntry       = &(pTxCtrlBlk->aTxCtrlBlkTbl[entry + 1]);
-		pTxCtrlBlk->aTxCtrlBlkTbl[entry].tTxDescriptor.aid    = 1;  /* The value for infrastructure BSS */
-		pTxCtrlBlk->aTxCtrlBlkTbl[entry].tTxDescriptor.reserved  = 0;
-
-        /* Prepare the Txn fields to the host-slave register (fixed address) */
-        pTxn = &(pTxCtrlBlk->aTxCtrlBlkTbl[entry].tTxnStruct);
-        TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_FIXED_ADDR)
-	}
-
-	/* Write null in the next-free index of the last entry. */
-	pTxCtrlBlk->aTxCtrlBlkTbl[CTRL_BLK_ENTRIES_NUM - 1].pNextFreeEntry = NULL;
-
-  #ifdef TI_DBG
-	pTxCtrlBlk->uNumUsedEntries = 0;
-  #endif
-
-	return TI_OK;
-}
-
-
-/****************************************************************************
- *					txCtrlBlk_Alloc()
- ****************************************************************************
- * DESCRIPTION:	 
-	Allocate a free control-block entry for the current Tx packet's parameters
-	  (including the descriptor structure).
-	Note that entry 0 in the list is never allocated and points to the
-	  first free entry.
- ****************************************************************************/
-TTxCtrlBlk *txCtrlBlk_Alloc (TI_HANDLE hTxCtrlBlk)
-{
-	TTxCtrlBlkObj   *pTxCtrlBlk = (TTxCtrlBlkObj *)hTxCtrlBlk;
-	TTxCtrlBlk      *pCurrentEntry; /* The pointer of the new entry allocated for the packet. */
-	TTxCtrlBlk      *pFirstFreeEntry; /* The first entry just points to the first free entry. */ 
-
-	pFirstFreeEntry = &(pTxCtrlBlk->aTxCtrlBlkTbl[0]); 
-
-    /* Protect block allocation from preemption (may be called from external context) */
-    context_EnterCriticalSection (pTxCtrlBlk->hContext);
-
-    pCurrentEntry = pFirstFreeEntry->pNextFreeEntry; /* Get free entry. */
-
-#ifdef TI_DBG
-	/* If no free entries, print error (not expected to happen) and return NULL. */
-	if (pCurrentEntry->pNextFreeEntry == NULL)
-	{
-TRACE1(pTxCtrlBlk->hReport, REPORT_SEVERITY_ERROR, "txCtrlBlk_alloc():  No free entry,  UsedEntries=%d\n", pTxCtrlBlk->uNumUsedEntries);
-        context_LeaveCriticalSection (pTxCtrlBlk->hContext);
-		return NULL;
-	}
-	pTxCtrlBlk->uNumUsedEntries++;
-#endif
-
-	/* Link the first entry to the next free entry. */
-	pFirstFreeEntry->pNextFreeEntry = pCurrentEntry->pNextFreeEntry;
-
-    context_LeaveCriticalSection (pTxCtrlBlk->hContext);
-	
-	/* Clear the next-free-entry index just as an indication that our entry is not free. */
-	pCurrentEntry->pNextFreeEntry = 0;
-
-    pCurrentEntry->tTxPktParams.uFlags = 0;
-    pCurrentEntry->tTxPktParams.uHeadroomSize = 0;
-
-	return pCurrentEntry;
-}
-
-
-/****************************************************************************
- *					txCtrlBlk_Free()
- ****************************************************************************
- * DESCRIPTION:	
-	Link the freed entry after entry 0, so now it is the first free entry to
-	  be allocated.
- ****************************************************************************/
-void txCtrlBlk_Free (TI_HANDLE hTxCtrlBlk, TTxCtrlBlk *pCurrentEntry)
-{
-	TTxCtrlBlkObj   *pTxCtrlBlk = (TTxCtrlBlkObj *)hTxCtrlBlk;
-	TTxCtrlBlk *pFirstFreeEntry = &(pTxCtrlBlk->aTxCtrlBlkTbl[0]);
-
-	if (!pTxCtrlBlk)
-    {
-		return;
-	}
-
-#ifdef TI_DBG
-	/* If the pointed entry is already free, print error and exit (not expected to happen). */
-	if (pCurrentEntry->pNextFreeEntry != 0)
-	{
-		TRACE2(pTxCtrlBlk->hReport, REPORT_SEVERITY_ERROR, "txCtrlBlk_free(): Entry %d alredy free, UsedEntries=%d\n", 			pCurrentEntry->tTxDescriptor.descID, pTxCtrlBlk->uNumUsedEntries);
-		return;
-	}
-	pTxCtrlBlk->uNumUsedEntries--;
-#endif
-
-	/* Protect block freeing from preemption (may be called from external context) */
-	context_EnterCriticalSection (pTxCtrlBlk->hContext);
-
-	/* Link the freed entry between entry 0 and the next free entry. */
-	pCurrentEntry->pNextFreeEntry   = pFirstFreeEntry->pNextFreeEntry;
-	pFirstFreeEntry->pNextFreeEntry = pCurrentEntry;
-
-	context_LeaveCriticalSection (pTxCtrlBlk->hContext);
-}
-
-
-/****************************************************************************
- *					txCtrlBlk_GetPointer()
- ****************************************************************************
- * DESCRIPTION:	 
-	Return a pointer to the control block entry of the requested packet.
-	Used upon tx-complete to retrieve info after getting the descId from the FW.
- ****************************************************************************/
-TTxCtrlBlk *txCtrlBlk_GetPointer (TI_HANDLE hTxCtrlBlk, TI_UINT8 descId)
-{
-	TTxCtrlBlkObj *pTxCtrlBlk = (TTxCtrlBlkObj *)hTxCtrlBlk;
-	return ( &(pTxCtrlBlk->aTxCtrlBlkTbl[descId]) );
-}
-
-
-/****************************************************************************
- *                      txCtrlBlk_PrintTable()
- ****************************************************************************
- * DESCRIPTION:	 Print the txCtrlBlk table main fields.
- ****************************************************************************/
-#ifdef TI_DBG
-void txCtrlBlk_PrintTable (TI_HANDLE hTxCtrlBlk)
-{
-#ifdef REPORT_LOG
-	TTxCtrlBlkObj *pTxCtrlBlk = (TTxCtrlBlkObj *)hTxCtrlBlk;
-	TI_UINT8 entry;
-
-	WLAN_OS_REPORT((" Tx-Control-Block Information,  UsedEntries=%d\n", pTxCtrlBlk->uNumUsedEntries));
-	WLAN_OS_REPORT(("==============================================\n"));
-	
-	for(entry = 0; entry < CTRL_BLK_ENTRIES_NUM; entry++)
-	{
-		WLAN_OS_REPORT(("Entry %d: DescID=%d, Next=0x%x, Len=%d, StartTime=%d, TID=%d, ExtraBlks=%d, TotalBlks=%d, Flags=0x%x\n", 
-			entry, 
-			pTxCtrlBlk->aTxCtrlBlkTbl[entry].tTxDescriptor.descID,
-			pTxCtrlBlk->aTxCtrlBlkTbl[entry].pNextFreeEntry,
-			ENDIAN_HANDLE_WORD(pTxCtrlBlk->aTxCtrlBlkTbl[entry].tTxDescriptor.length),
-			ENDIAN_HANDLE_LONG(pTxCtrlBlk->aTxCtrlBlkTbl[entry].tTxDescriptor.startTime),
-            pTxCtrlBlk->aTxCtrlBlkTbl[entry].tTxDescriptor.tid,
-			pTxCtrlBlk->aTxCtrlBlkTbl[entry].tTxDescriptor.extraMemBlks,
-            pTxCtrlBlk->aTxCtrlBlkTbl[entry].tTxDescriptor.totalMemBlks,
-            pTxCtrlBlk->aTxCtrlBlkTbl[entry].tTxPktParams.uFlags));
-	}
-#endif
-}
-#endif /* TI_DBG */
-
diff --git a/wl1271/TWD/Data_Service/txHwQueue.c b/wl1271/TWD/Data_Service/txHwQueue.c
deleted file mode 100644
index dda6da0..0000000
--- a/wl1271/TWD/Data_Service/txHwQueue.c
+++ /dev/null
@@ -1,714 +0,0 @@
-/*
- * txHwQueue.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  txHwQueue.c
- *   
- *   PURPOSE: manage the wlan hardware Tx memory blocks allocation per queue. 
- * 
- *   DESCRIPTION:  
- *   ============
- *      This module is responsible for the HW Tx data-blocks and descriptors allocation.
- *      The HW Tx blocks are allocated in the driver by rough calculations without 
- *        accessing the FW. 
- *      They are freed according to FW counters that are provided by the FwEvent module
- *          on every FW interrupt.
- ****************************************************************************/
-#define __FILE_ID__  FILE_ID_100
-#include "osApi.h"
-#include "report.h"
-#include "TWDriver.h"
-#include "txCtrlBlk_api.h"
-#include "txHwQueue_api.h"
-
-
-/* Translate input TID to AC */            
-/* Note: This structure is shared with other modules */
-const EAcTrfcType WMEQosTagToACTable[MAX_NUM_OF_802_1d_TAGS] = 
-	{QOS_AC_BE, QOS_AC_BK, QOS_AC_BK, QOS_AC_BE, QOS_AC_VI, QOS_AC_VI, QOS_AC_VO, QOS_AC_VO};
-
-/* 
- *  Local definitions:
- */
-
-/* Spare blocks written in extraMemBlks field in TxDescriptor for HW use */
-#define BLKS_HW_ALLOC_SPARE             2
-
-/* Set queue's backpressure bit (indicates queue state changed from ready to busy or inversely). */
-#define SET_QUEUE_BACKPRESSURE(pBackpressure, uQueueId)   (*pBackpressure |= (1 << uQueueId)) 
-
-/* Callback function definition for UpdateBusyMap */
-typedef void (* tUpdateBusyMapCb)(TI_HANDLE hCbHndl, TI_UINT32 uBackpressure);
-
-/* Per Queue HW blocks accounting data: */
-typedef struct
-{
-    TI_UINT32  uNumBlksThresh;          /* Minimum HW blocks that must be reserved for this Queue. */
-    TI_UINT32  uNumBlksUsed;            /* Number of HW blocks that are currently allocated for this Queue. */
-    TI_UINT32  uNumBlksReserved;        /* Number of HW blocks currently reserved for this Queue (to guarentee the low threshold). */
-    TI_UINT32  uAllocatedBlksCntr;      /* Accumulates allocated blocks for FW freed-blocks counter coordination. */ 
-    TI_UINT32  uFwFreedBlksCntr;        /* Accumulated freed blocks in FW. */ 
-    TI_UINT32  uNumBlksCausedBusy;      /* Number of HW blocks that caused queue busy state. */
-    TI_BOOL    bQueueBusy;              /* If TI_TRUE, this queue is currently stopped. */
-    TI_UINT16  uPercentOfBlkLowThresh;  /* Configured percentage of blocks to use as the queue's low allocation threshold */
-    TI_UINT16  uPercentOfBlkHighThresh; /* Configured percentage of blocks to use as the queue's high allocation threshold */
-
-} TTxHwQueueInfo; 
-
-typedef struct
-{
-    TI_HANDLE  hOs;
-    TI_HANDLE  hReport;
-    
-    tUpdateBusyMapCb fUpdateBusyMapCb;  /* The upper layers UpdateBusyMap callback */
-    TI_HANDLE        hUpdateBusyMapHndl;/* The handle for the fUpdateBusyMapCb */
-
-    TI_UINT32  uNumTotalBlks;           /* The total number of Tx blocks        */
-    TI_UINT32  uNumTotalBlksFree;       /* Total number of free HW blocks       */    
-    TI_UINT32  uNumTotalBlksReserved;   /* Total number of free but reserved HW blocks */
-    TI_UINT32  uNumUsedDescriptors;     /* Total number of packets in the FW. */
-    TI_UINT8   uFwTxResultsCntr;        /* Accumulated freed descriptors in FW. */
-    TI_UINT8   uDrvTxPacketsCntr;       /* Accumulated allocated descriptors in driver. */
-    
-    TTxHwQueueInfo  aTxHwQueueInfo[MAX_NUM_OF_AC]; /* The per queue variables */
-
-} TTxHwQueue;
-
-
-static void      txHwQueue_UpdateFreeBlocks (TTxHwQueue *pTxHwQueue, TI_UINT32 uQueueId, TI_UINT32 uFreeBlocks);
-static TI_UINT32 txHwQueue_CheckResources (TTxHwQueue *pTxHwQueue, TTxHwQueueInfo *pQueueInfo);
-
-
-
-/****************************************************************************
- *                      txHwQueue_Create()
- ****************************************************************************
- * DESCRIPTION: Create the Tx buffers pool object 
- * 
- * INPUTS:  None
- * 
- * OUTPUT:  None
- * 
- * RETURNS: The Created object
- ****************************************************************************/
-TI_HANDLE txHwQueue_Create (TI_HANDLE hOs)
-{
-    TTxHwQueue *pTxHwQueue;
-
-    pTxHwQueue = os_memoryAlloc(hOs, sizeof(TTxHwQueue));
-    if (pTxHwQueue == NULL)
-    {
-        return NULL;
-    }
-
-    os_memoryZero(hOs, pTxHwQueue, sizeof(TTxHwQueue));
-
-    pTxHwQueue->hOs = hOs;
-
-    return (TI_HANDLE)pTxHwQueue;
-}
-
-/****************************************************************************
- *                      txHwQueue_Destroy()
- ****************************************************************************
- * DESCRIPTION: Destroy the Tx buffers pool object 
- * 
- * INPUTS:  hTxHwQueue - The object to free
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS txHwQueue_Destroy (TI_HANDLE hTxHwQueue)
-{
-    TTxHwQueue *pTxHwQueue = (TTxHwQueue *)hTxHwQueue;
-
-    if (pTxHwQueue)
-    {
-        os_memoryFree(pTxHwQueue->hOs, pTxHwQueue, sizeof(TTxHwQueue));
-    }
-    return TI_OK;
-}
-
-
-
-
-/****************************************************************************
- *               txHwQueue_Init()
- ****************************************************************************
-
-  DESCRIPTION:  Initialize module handles.
-
- ****************************************************************************/
-TI_STATUS txHwQueue_Init (TI_HANDLE hTxHwQueue, TI_HANDLE hReport)
-{
-    TTxHwQueue *pTxHwQueue = (TTxHwQueue *)hTxHwQueue;
-    
-    pTxHwQueue->hReport = hReport;
-
-    return TI_OK;
-}
-
-
-/****************************************************************************
- *                      txHwQueue_Config()
- ****************************************************************************
- * DESCRIPTION: Configure the Tx buffers pool object 
- * 
- * INPUTS:  None
- * 
- * OUTPUT:  None
- * 
- * RETURNS: 
- ****************************************************************************/
-TI_STATUS txHwQueue_Config (TI_HANDLE hTxHwQueue, TTwdInitParams *pInitParams)
-{
-    TTxHwQueue *pTxHwQueue = (TTxHwQueue *)hTxHwQueue;
-    TI_UINT32   TxQid;
-    
-    /* Configure queue parameters to Tx-HW queue module */
-    for (TxQid = 0; TxQid < MAX_NUM_OF_AC; TxQid++)
-    {
-        pTxHwQueue->aTxHwQueueInfo[TxQid].uNumBlksThresh = pInitParams->tGeneral.TxBlocksThresholdPerAc[TxQid];
-    }
-    
-    return TI_OK;
-}
-
-
-
-/****************************************************************************
- *                  txHwQueue_SetHwInfo()
- ****************************************************************************
-
-  DESCRIPTION:  
-  
-    Called after the HW configuration in the driver init or recovery process.
-    Configure Tx HW information, including Tx-HW-blocks number, and per queue
-      Tx-descriptors number. Than, restart the module variables.
-
-    Two thresholds are defined per queue:
-    a)  TxBlocksLowPercentPerQueue[queue] - The lower threshold is the minimal number of 
-        Tx blocks guaranteed for each queue.
-        The sum of all low thresholds should be less than 100%.
-    b)  TxBlocksHighPercentPerQueue[queue] - The higher threshold is the maximal number of
-        Tx blocks that may be allocated to the queue.
-        The extra blocks above the low threshold can be allocated when needed only 
-        if they are currently available and are not needed in order to guarantee
-        the other queues low threshold.
-        The sum of all high thresholds should be more than 100%.
- ****************************************************************************/
-TI_STATUS txHwQueue_SetHwInfo (TI_HANDLE hTxHwQueue, TDmaParams *pDmaParams) 
-{
-    TTxHwQueue *pTxHwQueue = (TTxHwQueue *)hTxHwQueue;
-    
-    pTxHwQueue->uNumTotalBlks = pDmaParams->NumTxBlocks - 1; /* One block must be always free for FW use. */
-    
-    /* Restart the module variables. */
-    txHwQueue_Restart (hTxHwQueue);
-
-    return TI_OK;
-}
-
-
-/****************************************************************************
- *               txHwQueue_Restart()
- ****************************************************************************
-   DESCRIPTION:  
-   ============
-     Called after the HW configuration in the driver init or recovery process.
-     Restarts the Tx-HW-Queue module.
- ****************************************************************************/
-TI_STATUS txHwQueue_Restart (TI_HANDLE hTxHwQueue)
-{
-    TTxHwQueue     *pTxHwQueue = (TTxHwQueue *)hTxHwQueue;
-    TTxHwQueueInfo *pQueueInfo;
-    TI_UINT32       TxQid;
-    
-
-    /* 
-     * All blocks are free at restart.
-     * Note that free means all blocks that are currently not in use, while reserved are 
-     *   a part of the free blocks that are the summary of all queues reserved blocks.
-     * Each queue may take from the reserved part only up to its own reservation (according to
-     *   its low threshold). 
-     */
-    pTxHwQueue->uNumTotalBlksFree = pTxHwQueue->uNumTotalBlks;
-    pTxHwQueue->uNumTotalBlksReserved = 0;
-    pTxHwQueue->uNumUsedDescriptors = 0;
-    pTxHwQueue->uFwTxResultsCntr = 0;
-    pTxHwQueue->uDrvTxPacketsCntr = 0;
-
-    for (TxQid = 0; TxQid < MAX_NUM_OF_AC; TxQid++)
-    {
-        pQueueInfo = &pTxHwQueue->aTxHwQueueInfo[TxQid];
-
-        pQueueInfo->uNumBlksUsed = 0;
-        pQueueInfo->uAllocatedBlksCntr = 0; 
-        pQueueInfo->uFwFreedBlksCntr = 0;
-        pQueueInfo->uNumBlksCausedBusy = 0;
-        pQueueInfo->bQueueBusy = TI_FALSE;
-
-        /* Since no blocks are used yet, reserved blocks number equals to the low threshold. */
-        pQueueInfo->uNumBlksReserved = pQueueInfo->uNumBlksThresh;
-
-        /* Accumulate total reserved blocks. */
-        pTxHwQueue->uNumTotalBlksReserved += pQueueInfo->uNumBlksReserved;
-    }
-
-    return TI_OK;
-}
-
-
-/****************************************************************************
- *                  txHwQueue_AllocResources()
- ****************************************************************************
- * DESCRIPTION: 
-   ============
-    1.  Estimate required HW-blocks number.
-    2.  If the required blocks are not available or no free descriptor, 
-            return  STOP_CURRENT  (to stop current queue and requeue the packet).
-    3.  Resources are available so update allocated blocks and descriptors counters.
-    4.  If no resources for another similar packet, return STOP_NEXT (to stop current queue).
-        Else, return SUCCESS
- ****************************************************************************/
-ETxHwQueStatus txHwQueue_AllocResources (TI_HANDLE hTxHwQueue, TTxCtrlBlk *pTxCtrlBlk)
-{
-    TTxHwQueue *pTxHwQueue = (TTxHwQueue *)hTxHwQueue;
-    TI_UINT32 uNumBlksToAlloc; /* The number of blocks required for the current packet. */
-    TI_UINT32 uExcludedLength; /* The data length not included in the rough blocks calculation */
-    TI_UINT32 uAvailableBlks;  /* Max blocks that are currently available for this queue. */
-    TI_UINT32 uReservedBlks;   /* How many blocks are reserved for this queue before this allocation. */
-    TI_UINT32 uQueueId = WMEQosTagToACTable[pTxCtrlBlk->tTxDescriptor.tid];
-    TTxHwQueueInfo *pQueueInfo = &(pTxHwQueue->aTxHwQueueInfo[uQueueId]);
-
-
-    /***********************************************************************/
-    /*  Calculate packet required HW blocks.                               */
-    /***********************************************************************/
-
-    /* Divide length by 256 instead of 252 (block size) to save CPU */
-    uNumBlksToAlloc = ( pTxCtrlBlk->tTxDescriptor.length + 20 ) >> 8;
-
-    /* The length not yet included in the uNumBlksToAlloc is the sum of:
-        1) 4 bytes per block as a result of using 256 instead of 252 block size.
-        2) The remainder of the division by 256. 
-        3) Overhead due to header translation, security and LLC header (subtracting ethernet header).
-    */
-    uExcludedLength = (uNumBlksToAlloc << 2) + ((pTxCtrlBlk->tTxDescriptor.length + 20) & 0xFF) + MAX_HEADER_SIZE - 14;
-
-    /* Add 1 or 2 blocks for the excluded length, according to its size */
-    uNumBlksToAlloc += (uExcludedLength > 252) ? 2 : 1;
-
-    /* Add extra blocks needed in case of fragmentation */
-    uNumBlksToAlloc += BLKS_HW_ALLOC_SPARE;
-
-    /***********************************************************************/
-    /*            Check if the required resources are available            */
-    /***********************************************************************/
-
-    /* Find max available blocks for this queue (0 could indicate no descriptors). */
-    uAvailableBlks = txHwQueue_CheckResources (pTxHwQueue, pQueueInfo);
-    
-    /* If we need more blocks than available, return  STOP_CURRENT (stop current queue and requeue packet). */
-    if (uNumBlksToAlloc > uAvailableBlks)
-    {
-        TRACE6(pTxHwQueue->hReport, REPORT_SEVERITY_INFORMATION, ": No resources, Queue=%d, ReqBlks=%d, FreeBlks=%d, UsedBlks=%d, AvailBlks=%d, UsedPkts=%d\n", uQueueId, uNumBlksToAlloc, pTxHwQueue->uNumTotalBlksFree, pQueueInfo->uNumBlksUsed, uAvailableBlks, pTxHwQueue->uNumUsedDescriptors);
-        pQueueInfo->uNumBlksCausedBusy = uNumBlksToAlloc;
-        pQueueInfo->bQueueBusy = TI_TRUE;
-
-        return TX_HW_QUE_STATUS_STOP_CURRENT;  /**** Exit! (we should stop queue and requeue packet) ****/
-    }
-
-    /***********************************************************************/
-    /*                    Allocate required resources                      */
-    /***********************************************************************/
-
-    /* Update blocks numbers in Tx descriptor */
-    pTxCtrlBlk->tTxDescriptor.extraMemBlks = BLKS_HW_ALLOC_SPARE;
-    pTxCtrlBlk->tTxDescriptor.totalMemBlks = uNumBlksToAlloc;
-
-    /* Update packet allocation info:  */
-    pTxHwQueue->uNumUsedDescriptors++; /* Update number of packets in FW (for descriptors allocation check). */
-    pTxHwQueue->uDrvTxPacketsCntr++;
-    pQueueInfo->uAllocatedBlksCntr += uNumBlksToAlloc; /* For FW counter coordination. */
-    uReservedBlks = pQueueInfo->uNumBlksReserved;
-
-    /* If we are currently using less than the low threshold (i.e. we have some reserved blocks), 
-        blocks allocation should reduce the reserved blocks number as follows:
-    */
-    if (uReservedBlks)
-    {
-
-        /* If adding the allocated blocks to the used blocks will pass the low-threshold,
-            only the part up to the low-threshold is subtracted from the reserved blocks.
-            This is because blocks are reserved for the Queue only up to its low-threshold. 
-            
-              0   old used                    low      new used       high
-              |######|                         |          |            |
-              |######|                         |          |            |
-                      <------------ allocated ----------->
-                      <----- old reserved ---->
-                             new reserved = 0     (we passed the low threshold)
-        */
-        if (uNumBlksToAlloc > uReservedBlks)
-        {
-            pQueueInfo->uNumBlksReserved = 0;
-            pTxHwQueue->uNumTotalBlksReserved -= uReservedBlks; /* reduce change from total reserved.*/
-        }
-
-
-        /* Else, if allocating less than reserved,
-            the allocated blocks are subtracted from the reserved blocks:
-            
-              0   old used       new used               low      high
-              |######|               |                   |        |
-              |######|               |                   |        |
-                      <- allocated ->
-                      <--------- old reserved ---------->
-                                     <-- new reserved -->
-        */
-        else
-        {
-            pQueueInfo->uNumBlksReserved -= uNumBlksToAlloc;
-            pTxHwQueue->uNumTotalBlksReserved -= uNumBlksToAlloc; /* reduce change from total reserved.*/
-        }
-    }
-
-
-    /* Update total free blocks and Queue used blocks with the allocated blocks number. */
-    pTxHwQueue->uNumTotalBlksFree -= uNumBlksToAlloc;
-    pQueueInfo->uNumBlksUsed += uNumBlksToAlloc;
-
-    TRACE6(pTxHwQueue->hReport, REPORT_SEVERITY_INFORMATION, ": SUCCESS,  Queue=%d, Req-blks=%d , Free=%d, Used=%d, Reserved=%d, Accumulated=%d\n", uQueueId, uNumBlksToAlloc, pTxHwQueue->uNumTotalBlksFree, pQueueInfo->uNumBlksUsed, pQueueInfo->uNumBlksReserved, pQueueInfo->uAllocatedBlksCntr);
-
-    /* If no resources for another similar packet, return STOP_NEXT (to stop current queue). */
-    /* Note: Current packet transmission is continued */
-    if ( (uNumBlksToAlloc << 1) > uAvailableBlks )
-    {
-        TRACE6(pTxHwQueue->hReport, REPORT_SEVERITY_INFORMATION, ": No resources for next pkt, Queue=%d, ReqBlks=%d, FreeBlks=%d, UsedBlks=%d, AvailBlks=%d, UsedPkts=%d\n", uQueueId, uNumBlksToAlloc, pTxHwQueue->uNumTotalBlksFree, pQueueInfo->uNumBlksUsed, uAvailableBlks, pTxHwQueue->uNumUsedDescriptors);
-        pQueueInfo->uNumBlksCausedBusy = uNumBlksToAlloc;
-        pQueueInfo->bQueueBusy = TI_TRUE;
-        return TX_HW_QUE_STATUS_STOP_NEXT;
-    }
-
-    /* Return SUCCESS (resources are available). */
-    return TX_HW_QUE_STATUS_SUCCESS;
-}
-
-
-/****************************************************************************
- *                  txHwQueue_UpdateFreeBlocks()
- ****************************************************************************
- * DESCRIPTION: 
-   ===========
-    This function is called per queue after reading the freed blocks counters from the FwStatus.
-    It updates the queue's blocks status according to the freed blocks.
- ****************************************************************************/
-static void txHwQueue_UpdateFreeBlocks (TTxHwQueue *pTxHwQueue, TI_UINT32 uQueueId, TI_UINT32 uFreeBlocks)
-{
-    TTxHwQueueInfo *pQueueInfo = &(pTxHwQueue->aTxHwQueueInfo[uQueueId]);
-    TI_UINT32 lowThreshold;  /* Minimum blocks that are guaranteed for this Queue. */
-    TI_UINT32 newUsedBlks;   /* Blocks that are used by this Queue after updating free blocks. */
-    TI_UINT32 newReserved;   /* How many blocks are reserved to this Queue after freeing. */
-    TI_UINT32 numBlksToFree; /* The number of blocks freed in the current queue. */
-
-    /* If the FW free blocks counter didn't change, exit */
-    uFreeBlocks = ENDIAN_HANDLE_LONG(uFreeBlocks);
-    if (uFreeBlocks == pQueueInfo->uFwFreedBlksCntr) 
-    {
-        return;
-    }
-
-    pQueueInfo->uFwFreedBlksCntr = uFreeBlocks;
-
-    /* The uFreeBlocks is the accumulated number of blocks freed by the FW for the uQueueId.
-     * Subtracting it from the accumulated number of blocks allocated by the driver should
-     *   give the current number of used blocks in this queue.
-     * Since the difference is always a small positive number, a simple subtraction should work
-     *   also for wrap around.
-     */
-    newUsedBlks = pQueueInfo->uAllocatedBlksCntr - uFreeBlocks;
-
-    numBlksToFree = pQueueInfo->uNumBlksUsed - newUsedBlks;
-
-#ifdef TI_DBG   /* Sanity check: make sure we don't free more than is allocated. */
-    if (numBlksToFree > pQueueInfo->uNumBlksUsed)
-    {
-        TRACE5(pTxHwQueue->hReport, REPORT_SEVERITY_ERROR, ":  Try to free more blks than used: Queue %d, ToFree %d, Used %d, HostAlloc=0x%x, FwFree=0x%x\n", uQueueId, numBlksToFree, pQueueInfo->uNumBlksUsed, pQueueInfo->uAllocatedBlksCntr, uFreeBlocks);
-    }
-#endif
-
-    /* Update total free blocks and Queue used blocks with the freed blocks number. */
-    pTxHwQueue->uNumTotalBlksFree += numBlksToFree;
-    pQueueInfo->uNumBlksUsed = newUsedBlks;
-
-    lowThreshold = pQueueInfo->uNumBlksThresh;
-    
-    /* If after freeing the blocks we are using less than the low threshold, 
-        update total reserved blocks number as follows:
-       (note: if we are above the low threshold after freeing the blocks we still have no reservation.)
-    */
-    if (newUsedBlks < lowThreshold)
-    {
-        newReserved = lowThreshold - newUsedBlks;
-        pQueueInfo->uNumBlksReserved = newReserved;
-
-        
-        /* If freeing the blocks reduces the used blocks from above to below the low-threshold,
-            only the part from the low-threshold to the new used number is added to the 
-            reserved blocks (because blocks are reserved for the Queue only up to its low-threshold):
-            
-              0        new used               low            old used         high
-              |###########|####################|################|             |
-              |###########|####################|################|             |
-                           <-------------- freed -------------->
-                           <-- new reserved -->
-                             old reserved = 0
-        */
-        if (numBlksToFree > newReserved)
-            pTxHwQueue->uNumTotalBlksReserved += newReserved; /* Add change to total reserved.*/
-
-
-        /* Else, if we were under the low-threshold before freeing these blocks,
-            all freed blocks are added to the reserved blocks: 
-            
-              0             new used          old used             low               high
-              |################|#################|                  |                  |
-              |################|#################|                  |                  |
-                                <---- freed ---->
-                                                  <- old reserved ->
-                                <---------- new reserved ---------->
-        */
-        else
-            pTxHwQueue->uNumTotalBlksReserved += numBlksToFree; /* Add change to total reserved.*/
-    }
-
-    TRACE5(pTxHwQueue->hReport, REPORT_SEVERITY_INFORMATION, ":  Queue %d, ToFree %d, Used %d, HostAlloc=0x%x, FwFree=0x%x\n", uQueueId, numBlksToFree, pQueueInfo->uNumBlksUsed, pQueueInfo->uAllocatedBlksCntr, uFreeBlocks);
-}
-
-
-/****************************************************************************
- *                  txHwQueue_UpdateFreeResources()
- ****************************************************************************
- * DESCRIPTION: 
-   ===========
-   Called by FwEvent upon Data interrupt to update freed HW-Queue resources as follows:
-    1) For all queues, update blocks and descriptors numbers according to FwStatus information.
-    2) For each busy queue, if now available indicate it in the backpressure bitmap.
- ****************************************************************************/
-ETxnStatus txHwQueue_UpdateFreeResources (TI_HANDLE hTxHwQueue, FwStatus_t *pFwStatus)
-{
-    TTxHwQueue *pTxHwQueue = (TTxHwQueue *)hTxHwQueue;
-    TTxHwQueueInfo *pQueueInfo;
-    TI_UINT32 uQueueId;
-    TI_UINT32 uAvailableBlks; /* Max blocks available for current queue. */
-    TI_UINT32 uNewNumUsedDescriptors;
-    TI_UINT32 uBackpressure = 0;
-    TI_UINT32 *pFreeBlocks = (TI_UINT32 *)pFwStatus->txReleasedBlks;
-    TI_UINT32 uTempFwCounters;
-    FwStatCntrs_t *pFwStatusCounters;
-
-    /* 
-     * If TxResults counter changed in FwStatus, update descriptors number according to  information 
-     */
-    uTempFwCounters = (ENDIAN_HANDLE_LONG(pFwStatus->counters));
-    pFwStatusCounters = (FwStatCntrs_t *)&uTempFwCounters;
-    if (pFwStatusCounters->txResultsCntr != pTxHwQueue->uFwTxResultsCntr) 
-    {
-        pTxHwQueue->uFwTxResultsCntr = pFwStatusCounters->txResultsCntr; 
-
-        /* Calculate new number of used descriptors (the else is for wrap around case) */
-        if (pTxHwQueue->uFwTxResultsCntr <= pTxHwQueue->uDrvTxPacketsCntr) 
-        {
-            uNewNumUsedDescriptors = (TI_UINT32)(pTxHwQueue->uDrvTxPacketsCntr - pTxHwQueue->uFwTxResultsCntr);
-        }
-        else 
-        {
-            uNewNumUsedDescriptors = 0x100 - (TI_UINT32)(pTxHwQueue->uFwTxResultsCntr - pTxHwQueue->uDrvTxPacketsCntr);
-        }
-    
-#ifdef TI_DBG   /* Sanity check: make sure we don't free more descriptors than allocated. */
-        if (uNewNumUsedDescriptors >= pTxHwQueue->uNumUsedDescriptors)
-        {
-            TRACE2(pTxHwQueue->hReport, REPORT_SEVERITY_ERROR, ":  Used descriptors number should decrease: UsedDesc %d, NewUsedDesc %d\n", pTxHwQueue->uNumUsedDescriptors, uNewNumUsedDescriptors);
-        }
-#endif
-    
-        /* Update number of packets left in FW (for descriptors allocation check). */
-        pTxHwQueue->uNumUsedDescriptors = uNewNumUsedDescriptors;
-    }
-
-    /* 
-     * For all queues, update blocks numbers according to FwStatus information 
-     */
-    for (uQueueId = 0; uQueueId < MAX_NUM_OF_AC; uQueueId++)
-    {
-        pQueueInfo = &(pTxHwQueue->aTxHwQueueInfo[uQueueId]);
-
-        /* Update per queue number of used, free and reserved blocks. */
-        txHwQueue_UpdateFreeBlocks (pTxHwQueue, uQueueId, pFreeBlocks[uQueueId]);
-    }
-
-    /* 
-     * For each busy queue, if now available indicate it in the backpressure bitmap 
-     */
-    for (uQueueId = 0; uQueueId < MAX_NUM_OF_AC; uQueueId++)
-    {
-        pQueueInfo = &(pTxHwQueue->aTxHwQueueInfo[uQueueId]);
-
-        /* If the queue was stopped */
-        if (pQueueInfo->bQueueBusy) 
-        {
-            /* Find max available blocks for this queue (0 could indicate no descriptors). */
-            uAvailableBlks = txHwQueue_CheckResources (pTxHwQueue, pQueueInfo);
-
-            /* If the required blocks and a descriptor are available, 
-                 set the queue's backpressure bit to indicate NOT-busy! */
-            if (pQueueInfo->uNumBlksCausedBusy <= uAvailableBlks)
-            {
-                TRACE6(pTxHwQueue->hReport, REPORT_SEVERITY_INFORMATION, ": Queue Available, Queue=%d, ReqBlks=%d, FreeBlks=%d, UsedBlks=%d, AvailBlks=%d, UsedPkts=%d\n", uQueueId, pQueueInfo->uNumBlksCausedBusy, pTxHwQueue->uNumTotalBlksFree, pQueueInfo->uNumBlksUsed, uAvailableBlks, pTxHwQueue->uNumUsedDescriptors);
-                SET_QUEUE_BACKPRESSURE(&uBackpressure, uQueueId); /* Start queue. */
-                pQueueInfo->bQueueBusy = TI_FALSE;
-            }
-        }
-    }
-
-    /* If released queues map is not 0, send it to the upper layers (if CB available) */
-    if ((uBackpressure > 0) && (pTxHwQueue->fUpdateBusyMapCb != NULL))
-    {
-        pTxHwQueue->fUpdateBusyMapCb (pTxHwQueue->hUpdateBusyMapHndl, uBackpressure);
-    }
-
-    return TXN_STATUS_COMPLETE;
-}
-
-
-/****************************************************************************
- *                  txHwQueue_CheckResources()
- ****************************************************************************
- * DESCRIPTION: 
-   ============
-    Return the given queue's available blocks.
-    If no descriptors available, return 0.
- ****************************************************************************/
-static TI_UINT32 txHwQueue_CheckResources (TTxHwQueue *pTxHwQueue, TTxHwQueueInfo *pQueueInfo)
-{
-    /* If descriptors are available: */
-    if (pTxHwQueue->uNumUsedDescriptors < NUM_TX_DESCRIPTORS)
-    {
-        /* Calculate how many buffers are available for this Queue: the total free buffers minus the buffers
-             that are reserved for other Queues (all reserved minus this Queue's reserved). */
-        return (pTxHwQueue->uNumTotalBlksFree - (pTxHwQueue->uNumTotalBlksReserved - pQueueInfo->uNumBlksReserved));
-    }
-
-    /* If no descriptors are available, return 0 (can't transmit anything). */
-    else
-    {
-        return 0;
-    }
-}
-
-
-/****************************************************************************
- *                      txHwQueue_RegisterCb()
- ****************************************************************************
- * DESCRIPTION:  Register the upper driver TxHwQueue callback functions.
- ****************************************************************************/
-void txHwQueue_RegisterCb (TI_HANDLE hTxHwQueue, TI_UINT32 uCallBackId, void *fCbFunc, TI_HANDLE hCbHndl)
-{
-    TTxHwQueue *pTxHwQueue = (TTxHwQueue *)hTxHwQueue;
-
-    switch (uCallBackId)
-    {
-        case TWD_INT_UPDATE_BUSY_MAP:
-            pTxHwQueue->fUpdateBusyMapCb   = (tUpdateBusyMapCb)fCbFunc;
-            pTxHwQueue->hUpdateBusyMapHndl = hCbHndl;
-            break;
-
-        default:
-            TRACE1(pTxHwQueue->hReport, REPORT_SEVERITY_ERROR, " - Illegal parameter = %d\n", uCallBackId);
-            return;
-    }
-}
-
-
-/****************************************************************************
- *                      txHwQueue_PrintInfo()
- ****************************************************************************
- * DESCRIPTION: Print the Hw Queue module current information
- ****************************************************************************/
-#ifdef TI_DBG
-void txHwQueue_PrintInfo (TI_HANDLE hTxHwQueue)
-{
-#ifdef REPORT_LOG
-    TTxHwQueue *pTxHwQueue = (TTxHwQueue *)hTxHwQueue;
-    TI_INT32 TxQid;
-
-    /* Print the Tx-HW-Queue information: */
-    WLAN_OS_REPORT(("Hw-Queues Information:\n"));
-    WLAN_OS_REPORT(("======================\n"));
-    WLAN_OS_REPORT(("Total Blocks:           %d\n", pTxHwQueue->uNumTotalBlks));
-    WLAN_OS_REPORT(("Total Free Blocks:      %d\n", pTxHwQueue->uNumTotalBlksFree));
-    WLAN_OS_REPORT(("Total Reserved Blocks:  %d\n", pTxHwQueue->uNumTotalBlksReserved));
-    WLAN_OS_REPORT(("Total Used Descriptors: %d\n", pTxHwQueue->uNumUsedDescriptors));
-    WLAN_OS_REPORT(("FwTxResultsCntr:        %d\n", pTxHwQueue->uFwTxResultsCntr));
-    WLAN_OS_REPORT(("DrvTxPacketsCntr:       %d\n", pTxHwQueue->uDrvTxPacketsCntr));
-
-    for(TxQid = 0; TxQid < MAX_NUM_OF_AC; TxQid++)
-    {
-        WLAN_OS_REPORT(("Q=%d: Used=%d, Reserve=%d, Threshold=%d\n", 
-            TxQid,
-            pTxHwQueue->aTxHwQueueInfo[TxQid].uNumBlksUsed,
-            pTxHwQueue->aTxHwQueueInfo[TxQid].uNumBlksReserved,
-            pTxHwQueue->aTxHwQueueInfo[TxQid].uNumBlksThresh));
-    }
-
-    WLAN_OS_REPORT(("\n"));
-
-    for(TxQid = 0; TxQid < MAX_NUM_OF_AC; TxQid++)
-    {
-        WLAN_OS_REPORT(("Queue=%d: HostAllocCount=0x%x, FwFreeCount=0x%x, BusyBlks=%d, Busy=%d\n", 
-            TxQid,
-            pTxHwQueue->aTxHwQueueInfo[TxQid].uAllocatedBlksCntr,
-            pTxHwQueue->aTxHwQueueInfo[TxQid].uFwFreedBlksCntr,
-            pTxHwQueue->aTxHwQueueInfo[TxQid].uNumBlksCausedBusy,
-            pTxHwQueue->aTxHwQueueInfo[TxQid].bQueueBusy));
-    }
-#endif
-}
-
-#endif /* TI_DBG */
-
diff --git a/wl1271/TWD/FW_Transfer/CmdMBox.c b/wl1271/TWD/FW_Transfer/CmdMBox.c
deleted file mode 100644
index 4c3dfa7..0000000
--- a/wl1271/TWD/FW_Transfer/CmdMBox.c
+++ /dev/null
@@ -1,513 +0,0 @@
-/*
- * CmdMBox.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  CmdMBox.c
- *  \brief Handle the wlan hardware command mailbox
- *
- *  \see CmdMBox.h, CmdMBox_api.h, CmdQueue.c
- */
-
-#define __FILE_ID__  FILE_ID_101
-#include "tidef.h"
-#include "osApi.h"
-#include "timer.h"
-#include "report.h"
-#include "FwEvent_api.h"
-#include "CmdMBox_api.h"
-#include "CmdMBox.h"
-#include "CmdQueue_api.h"
-#include "TWDriverInternal.h"
-#include "TwIf.h"
-
-/*****************************************************************************
- **         Internal functions definitions                                  **
- *****************************************************************************/
-
-/*
- * \brief	Handle cmdMbox timeout.
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return TI_OK
- * 
- * \par Description
- * Call fErrorCb() to handle the error.
- * 
- * \sa cmdMbox_SendCommand
- */
-static void cmdMbox_TimeOut (TI_HANDLE hCmdMbox, TI_BOOL bTwdInitOccured);
-static void cmdMbox_ConfigHwCb (TI_HANDLE hCmdMbox, TTxnStruct *pTxn);
-
-/*
- * \brief	Create the mailbox object
- * 
- * \param  hOs  - OS module object handle
- * \return Handle to the created object
- * 
- * \par Description
- * Calling this function creates a CmdMbox object
- * 
- * \sa cmdMbox_Destroy
- */
-TI_HANDLE cmdMbox_Create (TI_HANDLE hOs)
-{
-    TCmdMbox   *pCmdMbox;
-
-    pCmdMbox = os_memoryAlloc (hOs, sizeof (TCmdMbox));
-    if (pCmdMbox == NULL)
-    {
-        WLAN_OS_REPORT (("FATAL ERROR: cmdMbox_Create(): Error Creating CmdMbox - Aborting\n"));
-        return NULL;
-    }
-
-    /* reset control module control block */
-    os_memoryZero (hOs, pCmdMbox, sizeof (TCmdMbox));
-    pCmdMbox->hOs = hOs;
-
-    return pCmdMbox;
-}
-
-
-/*
- * \brief	Destroys the mailbox object
- * 
- * \param  hCmdMbox  - The object to free
- * \return TI_OK
- * 
- * \par Description
- * Calling this function destroys a CmdMbox object
- * 
- * \sa cmdMbox_Create
- */
-TI_STATUS cmdMbox_Destroy (TI_HANDLE hCmdMbox)
-{
-    TCmdMbox   *pCmdMbox = (TCmdMbox *)hCmdMbox;
-
-    /* free timer */
-    if (pCmdMbox->hCmdMboxTimer)
-    {
-        tmr_DestroyTimer (pCmdMbox->hCmdMboxTimer);
-    }
-
-    /* free context */
-    os_memoryFree (pCmdMbox->hOs, pCmdMbox, sizeof (TCmdMbox));
-
-    return TI_OK;
-}
-
-
-/*
- * \brief	Configure the CmdMbox object
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \param  hReport  - Handle to report module
- * \param  hTwIf  - Handle to TwIf
- * \param  hTimer  - Handle to os timer
- * \param  hCmdQueue  - Handle to CmdQueue
- * \param  fErrorCb  - Handle to error handling function
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS cmdMbox_Init (TI_HANDLE hCmdMbox,
-                          TI_HANDLE             hReport, 
-                        TI_HANDLE hTwIf,
-                          TI_HANDLE             hTimer, 
-                        TI_HANDLE hCmdQueue,
-                          TCmdMboxErrorCb       fErrorCb)
-{
-    TCmdMbox   *pCmdMbox = (TCmdMbox *)hCmdMbox;
-
-    pCmdMbox->hCmdQueue = hCmdQueue;
-    pCmdMbox->hTwIf = hTwIf;
-    pCmdMbox->hReport = hReport;
-
-    pCmdMbox->uFwAddr = 0;
-    pCmdMbox->uReadLen = 0;
-    pCmdMbox->uWriteLen = 0;
-    pCmdMbox->bCmdInProgress = TI_FALSE;
-    pCmdMbox->fErrorCb = fErrorCb;
-
-	/* allocate OS timer memory */
-    pCmdMbox->hCmdMboxTimer = tmr_CreateTimer (hTimer);
-	if (pCmdMbox->hCmdMboxTimer == NULL)
-	{
-        TRACE0(pCmdMbox->hReport, REPORT_SEVERITY_ERROR, "cmdMbox_Init(): Failed to create hCmdMboxTimer!\n");
-		return TI_NOK;
-	}
-
-    return TI_OK;
-}
-
-
-/*
- * \brief	Send the Command to the Mailbox
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \param  cmdType  - 
- * \param  pParamsBuf  - The buffer that will be written to the mailbox
- * \param  uWriteLen  - Length of data to write to the mailbox
- * \param  uReadLen  - Length of data to read from the mailbox (when the result is received)
- * \return TI_PENDING
- * 
- * \par Description
- * Copy the buffer given to a local struct, update the write & read lengths
- * and send to the FW's mailbox.
- *             
- *       ------------------------------------------------------
- *      | CmdMbox Header | Cmd Header    | Command parameters |
- *      ------------------------------------------------------
- *      | ID   | Status  | Type | Length | Command parameters |
- *      ------------------------------------------------------
- *       16bit   16bit    16bit   16bit     
- *
- * \sa cmdMbox_CommandComplete
- */
-TI_STATUS cmdMbox_SendCommand       (TI_HANDLE hCmdMbox, Command_e cmdType, TI_UINT8* pParamsBuf, TI_UINT32 uWriteLen, TI_UINT32 uReadLen)
-{
-    TCmdMbox   *pCmdMbox = (TCmdMbox *)hCmdMbox;
-    TTxnStruct *pCmdTxn = (TTxnStruct*)&pCmdMbox->aCmdTxn[0].tTxnStruct;
-    TTxnStruct *pRegTxn = (TTxnStruct*)&pCmdMbox->aRegTxn[0].tTxnStruct;
-    Command_t  *pCmd = (Command_t*)&pCmdMbox->aCmdTxn[0].tCmdMbox;
-    
-
-    if (pCmdMbox->bCmdInProgress)
-    {
-        TRACE0(pCmdMbox->hReport, REPORT_SEVERITY_ERROR, "cmdMbox_SendCommand(): Trying to send Cmd while other Cmd is still in progres!\n");
-        return TI_NOK;
-    }
-
-    /* Add the CMDMBOX_HEADER_LEN to the read length, used when reading the result later on */
-    pCmdMbox->uReadLen = uReadLen + CMDMBOX_HEADER_LEN;
-    /* Prepare the Cmd Hw template */
-    pCmd->cmdID = cmdType;
-    pCmd->cmdStatus = TI_OK;
-    os_memoryCopy (pCmdMbox->hOs, (void *)pCmd->parameters, (void *)pParamsBuf, uWriteLen);
-
-    /* Add the CMDMBOX_HEADER_LEN to the write length */
-    pCmdMbox->uWriteLen = uWriteLen + CMDMBOX_HEADER_LEN;
-
-    /* Must make sure that the length is multiple of 32 bit */
-    if (pCmdMbox->uWriteLen & 0x3)
-    {
-        TRACE1(pCmdMbox->hReport, REPORT_SEVERITY_WARNING, "cmdMbox_SendCommand(): Command length isn't 32bit aligned! CmdId=%d\n", pCmd->cmdID);
-        pCmdMbox->uWriteLen = (pCmdMbox->uWriteLen + 4) & 0xFFFFFFFC;
-    }
-
-    /* no other command can start the send process  till bCmdInProgress will return to TI_FALSE*/
-    pCmdMbox->bCmdInProgress = TI_TRUE;
-
-    /* Build the command TxnStruct */
-    TXN_PARAM_SET(pCmdTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-    BUILD_TTxnStruct(pCmdTxn, pCmdMbox->uFwAddr, pCmd, pCmdMbox->uWriteLen, NULL, NULL)
-    /* Send the command */
-    twIf_Transact(pCmdMbox->hTwIf, pCmdTxn);
-
-    /* Build the trig TxnStruct */
-    pCmdMbox->aRegTxn[0].uRegister = INTR_TRIG_CMD;
-    TXN_PARAM_SET(pRegTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-    BUILD_TTxnStruct(pRegTxn, ACX_REG_INTERRUPT_TRIG, &(pCmdMbox->aRegTxn[0].uRegister), REGISTER_SIZE, NULL, NULL)
-
-    /* start the CmdMbox timer */
-    tmr_StartTimer (pCmdMbox->hCmdMboxTimer, cmdMbox_TimeOut, hCmdMbox, CMDMBOX_WAIT_TIMEOUT, TI_FALSE);
-
-    /* Send the FW trigger */
-    twIf_Transact(pCmdMbox->hTwIf, pRegTxn);
-
-
-    return TXN_STATUS_PENDING;
-}
-
-
-/*
- * \brief	Read the command's result
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return void
- * 
- * \par Description
- * This function is called from FwEvent module uppon receiving command complete interrupt.
- * It issues a read transaction from the mailbox with a CB.
- * 
- * \sa cmdMbox_SendCommand, cmdMbox_TransferComplete
- */
-ETxnStatus cmdMbox_CommandComplete (TI_HANDLE hCmdMbox)
-{
-    TCmdMbox   *pCmdMbox = (TCmdMbox *)hCmdMbox;
-    TTxnStruct *pCmdTxn = (TTxnStruct*)&pCmdMbox->aCmdTxn[1].tTxnStruct;
-    Command_t  *pCmd = (Command_t*)&pCmdMbox->aCmdTxn[1].tCmdMbox;
-    ETxnStatus  rc;
-
-    /* stop the CmdMbox timer */
-    tmr_StopTimer(pCmdMbox->hCmdMboxTimer);
-
-    /* Build the command TxnStruct */
-    TXN_PARAM_SET(pCmdTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_READ, TXN_INC_ADDR)
-    /* Applying a CB in case of an async read */
-    BUILD_TTxnStruct(pCmdTxn, pCmdMbox->uFwAddr, pCmd, pCmdMbox->uReadLen,(TTxnDoneCb)cmdMbox_TransferComplete, hCmdMbox)
-    /* Send the command */
-    rc = twIf_Transact(pCmdMbox->hTwIf, pCmdTxn);
-
-    /* In case of a sync read, call the CB directly */
-    if (rc == TXN_STATUS_COMPLETE)
-    {
-        cmdMbox_TransferComplete(hCmdMbox);
-    }
-
-    return TXN_STATUS_COMPLETE;
-}
-
-
-/*
- * \brief	Calls the cmdQueue_ResultReceived.
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return TI_OK
- * 
- * \par Description
- * This function is called from cmdMbox_CommandComplete on a sync read, or from TwIf as a CB on an async read.
- * It calls cmdQueue_ResultReceived to continue the result handling procces & switch the bCmdInProgress flag to TI_FALSE, 
- * meaning other commands can be sent to the FW.
- * 
- * \sa cmdMbox_SendCommand, cmdMbox_TransferComplete
- */
-TI_STATUS cmdMbox_TransferComplete(TI_HANDLE hCmdMbox)
-{
-    TCmdMbox   *pCmdMbox = (TCmdMbox *)hCmdMbox;
-
-    /* Other commands can be sent to the FW */
-    pCmdMbox->bCmdInProgress = TI_FALSE;
-
-    cmdQueue_ResultReceived(pCmdMbox->hCmdQueue);
-    
-    return TI_OK;
-}
-
-
-/*
- * \brief	Handle cmdMbox timeout.
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return TI_OK
- * 
- * \par Description
- * Call fErrorCb() to handle the error.
- * 
- * \sa cmdMbox_SendCommand
- */
-static void cmdMbox_TimeOut (TI_HANDLE hCmdMbox, TI_BOOL bTwdInitOccured)
-{
-    TCmdMbox   *pCmdMbox = (TCmdMbox *)hCmdMbox;
-    Command_t  *pCmd = (Command_t*)&pCmdMbox->aCmdTxn[0].tCmdMbox;
-
-    TRACE0(pCmdMbox->hReport, REPORT_SEVERITY_ERROR , "cmdMbox_TimeOut: Timeout occured in CmdMbox\n");
-
-    /* Call error CB */
-    if (pCmdMbox->fErrorCb != NULL)
-    {
-        pCmdMbox->fErrorCb (pCmdMbox->hCmdQueue, 
-                            (TI_UINT32)pCmd->cmdID, 
-                            CMD_STATUS_TIMEOUT, 
-                            (void *)pCmd->parameters);
-    }
-}
-
-
-/*
- * \brief	configure the mailbox address.
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \param  fCb  - Pointer to the CB
- * \param  hCb  - Cb's handle
- * \return TI_OK or TI_PENDING
- * 
- * \par Description
- * Called from HwInit to read the command mailbox address.
- * 
- * \sa
- */
-TI_STATUS cmdMbox_ConfigHw (TI_HANDLE hCmdMbox, fnotify_t fCb, TI_HANDLE hCb)
-{
-    TCmdMbox   *pCmdMbox = (TCmdMbox *)hCmdMbox;
-    TTxnStruct *pRegTxn = (TTxnStruct*)&pCmdMbox->aRegTxn[1].tTxnStruct;
-    TI_STATUS   rc;
-
-    pCmdMbox->fCb = fCb;
-    pCmdMbox->hCb = hCb;
-    /* Build the command TxnStruct */
-    TXN_PARAM_SET(pRegTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_READ, TXN_INC_ADDR)
-    BUILD_TTxnStruct(pRegTxn, REG_COMMAND_MAILBOX_PTR, &(pCmdMbox->aRegTxn[1].uRegister), REGISTER_SIZE,(TTxnDoneCb)cmdMbox_ConfigHwCb, hCmdMbox)
-    /* Get the command mailbox address */
-    rc = twIf_Transact(pCmdMbox->hTwIf, pRegTxn);
-    if (rc == TXN_STATUS_COMPLETE)
-    {
-        pCmdMbox->uFwAddr = pCmdMbox->aRegTxn[1].uRegister;
-    }
-
-    return rc;
-}
-
-
-/*
- * \brief	Cb to cmdMbox_ConfigHw
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa
- */
-static void cmdMbox_ConfigHwCb (TI_HANDLE hCmdMbox, TTxnStruct *pTxn)
-{
-    TCmdMbox   *pCmdMbox = (TCmdMbox *)hCmdMbox;
-
-    pCmdMbox->uFwAddr = pCmdMbox->aRegTxn[1].uRegister;
-
-    /* Call back the original State Machine */
-    pCmdMbox->fCb(pCmdMbox->hCb, TI_OK);
-}
-
-
-/*
- * \brief	Restart the module upon driver stop or restart
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS cmdMbox_Restart (TI_HANDLE hCmdMbox)
-{
-    TCmdMbox   *pCmdMbox = (TCmdMbox *)hCmdMbox;
-
-    /* Stop the timeout timer if running and reset the state */
-    tmr_StopTimer (pCmdMbox->hCmdMboxTimer);
-    pCmdMbox->bCmdInProgress = TI_FALSE;
-    pCmdMbox->uReadLen       = 0;
-    pCmdMbox->uWriteLen      = 0;
-
-    return TI_OK;
-}
-
-
-/*
- * \brief	Return the latest command status
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return TI_OK or TI_NOK
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS cmdMbox_GetStatus (TI_HANDLE hCmdMbox, CommandStatus_e *cmdStatus)
-{
-    TCmdMbox   *pCmdMbox = (TCmdMbox *)hCmdMbox;
-    Command_t  *pCmd = (Command_t*)&pCmdMbox->aCmdTxn[1].tCmdMbox;
-    TI_STATUS   status;
-
-    status = (pCmd->cmdStatus == CMD_STATUS_SUCCESS) ? TI_OK : TI_NOK;
-    TRACE2(pCmdMbox->hReport, REPORT_SEVERITY_INFORMATION , "cmdMbox_GetStatus: TI_STATUS = (%d) <= pCmdMbox->tCmdMbox.cmdStatus = %d\n", status, pCmd->cmdStatus);
-    *cmdStatus = pCmd->cmdStatus;
-    return status;
-}
-
-/*
- * \brief	Return the MBox address
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return MBox address
- * 
- * \par Description
- * 
- * \sa
- */
-TI_UINT32 cmdMbox_GetMboxAddress (TI_HANDLE hCmdMbox)
-{
-    TCmdMbox *pCmdMbox = (TCmdMbox *)hCmdMbox;
-
-    return pCmdMbox->uFwAddr;
-}
-
-
-/*
- * \brief	Return the Command parameters buffer
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \param  pParamBuf  - Holds the returned buffer
- * \return
- * 
- * \par Description
- * Copying the command's data to pParamBuf
- * 
- * \sa
- */
-void cmdMbox_GetCmdParams (TI_HANDLE hCmdMbox, TI_UINT8* pParamBuf)
-{
-    TCmdMbox *pCmdMbox = (TCmdMbox *)hCmdMbox;
-    Command_t  *pCmd = (Command_t*)&pCmdMbox->aCmdTxn[1].tCmdMbox;
-
-    /* 
-     * Copy the results to the caller buffer:
-     * We need to copy only the data without the cmdMbox header, 
-     * otherwise we will overflow the pParambuf 
-     */
-    os_memoryCopy (pCmdMbox->hOs,
-                   (void *)pParamBuf,
-                   (void *)pCmd->parameters,
-                   pCmdMbox->uReadLen - CMDMBOX_HEADER_LEN);
-
-}
-
-
-#ifdef TI_DBG
-
-void cmdMbox_PrintInfo(TI_HANDLE hCmdMbox)
-{
-#ifdef REPORT_LOG
-    TCmdMbox *pCmdMbox = (TCmdMbox *)hCmdMbox;
-
-    WLAN_OS_REPORT(("Print cmdMbox module info\n"));
-    WLAN_OS_REPORT(("=========================\n"));
-    WLAN_OS_REPORT(("bCmdInProgress = %d\n", pCmdMbox->bCmdInProgress));
-#endif
-}
-
-#endif  /* TI_DBG */
-
-
diff --git a/wl1271/TWD/FW_Transfer/CmdMBox.h b/wl1271/TWD/FW_Transfer/CmdMBox.h
deleted file mode 100644
index 1e5db43..0000000
--- a/wl1271/TWD/FW_Transfer/CmdMBox.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * CmdMBox.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file CmdMBox.h
- *  \brief CmdMbox internal defenitions
- *
- *  \see CmdMBox.c
- */
-
-#ifndef _CMDMBOX_H_
-#define _CMDMBOX_H_
-
-#include "TwIf.h"
-
-/*****************************************************************************
- **          Defines                                                        **
- *****************************************************************************/
- /* wait for a Mail box command to complete, ms */
-#define CMDMBOX_WAIT_TIMEOUT            15000
-#define CMDMBOX_HEADER_LEN              4
-#define MAX_CMD_MBOX_CONSECUTIVE_TXN    5
-
-
-
-typedef struct
-{   
-    TTxnStruct          tTxnStruct;
-    Command_t           tCmdMbox;
-}TCmdTxn;
-
-typedef struct
-{   
-    TTxnStruct          tTxnStruct;
-    TI_UINT32           uRegister;
-}TRegTxn;
-
-
-/*****************************************************************************
- **         Structures                                                      **
- *****************************************************************************/
-
-/** \struct TCmdMbox
- * \brief CmdMbox structure
- * 
- * \par Description
- * 
- * \sa	
- */ 
-typedef struct
-{   
-    /* handles */
-    TI_HANDLE           hOs;
-    TI_HANDLE           hReport;
-    TI_HANDLE           hTwIf;
-    TI_HANDLE           hCmdQueue;
-    TI_HANDLE           hCmdMboxTimer;
-    fnotify_t           fCb;
-    TI_HANDLE           hCb;
-    TCmdMboxErrorCb     fErrorCb;
-    
-    /* HW params */
-    /* use a struct to read buffers from the bus - used for extra bytes reserving */
-
-    TCmdTxn             aCmdTxn[2];
-    TRegTxn             aRegTxn[2];
-
-    /* Holds the module state */
-    TI_BOOL             bCmdInProgress;
-    TI_UINT32           uFwAddr;
-    TI_UINT32           uWriteLen;
-    TI_UINT32           uReadLen;
-
-} TCmdMbox;
-
-#endif
-
-
diff --git a/wl1271/TWD/FW_Transfer/Export_Inc/CmdMBox_api.h b/wl1271/TWD/FW_Transfer/Export_Inc/CmdMBox_api.h
deleted file mode 100644
index 940fe07..0000000
--- a/wl1271/TWD/FW_Transfer/Export_Inc/CmdMBox_api.h
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * CmdMBox_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file CmdMBox_api.h
- *  \brief CmdMbox api
- *
- *  \see CmdMBox.c
- */
-
-#ifndef _CMDMBOX_API_H_
-#define _CMDMBOX_API_H_
-
-#include "TWDriverInternal.h"
-
-
-/*****************************************************************************
- **              Types                                                      **
- *****************************************************************************/
-typedef TI_STATUS (*TCmdMboxErrorCb)     (TI_HANDLE hCmdQueue, TI_UINT32 command, TI_UINT32 status, void *param);
-
-
-/*****************************************************************************
- **         API functions definitions                                  **
- *****************************************************************************/
-
-/*
- * \brief	Create the mailbox object
- * 
- * \param  hOs  - OS module object handle
- * \return Handle to the created object
- * 
- * \par Description
- * Calling this function creates a CmdMbox object
- * 
- * \sa cmdMbox_Destroy
- */
-TI_HANDLE cmdMbox_Create            (TI_HANDLE hOs);
-
-
-/*
- * \brief	Destroys the mailbox object
- * 
- * \param  hCmdMbox  - The object to free
- * \return TI_OK
- * 
- * \par Description
- * Calling this function destroys a CmdMbox object
- * 
- * \sa cmdMbox_Create
- */
-TI_STATUS cmdMbox_Destroy           (TI_HANDLE hCmdMbox);
-
-
-/*
- * \brief	Configure the CmdMbox object
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \param  hReport  - Handle to report module
- * \param  hTwIf  - Handle to TwIf
- * \param  hTimer  - Handle to os timer
- * \param  hCmdQueue  - Handle to CmdQueue
- * \param  fErrorCb  - Handle to error handling function
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS cmdMbox_Init              (TI_HANDLE hCmdMbox,
-                                     TI_HANDLE hReport,
-                                     TI_HANDLE hTwIf,
-                                     TI_HANDLE hTimer,
-                                     TI_HANDLE hCmdQueue,
-                                     TCmdMboxErrorCb fErrorCb);
-
-
-/*
- * \brief	configure the mailbox address.
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \param  fCb  - Pointer to the CB
- * \param  hCb  - Cb's handle
- * \return TI_OK or TI_PENDING
- * 
- * \par Description
- * Called from HwInit to read the command mailbox address.
- * 
- * \sa
- */
-TI_STATUS cmdMbox_ConfigHw          (TI_HANDLE hCmdMbox, fnotify_t fCb, TI_HANDLE hCb);
-
-
-/*
- * \brief	Send the Command to the Mailbox
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \param  cmdType  - 
- * \param  pParamsBuf  - The buffer that will be written to the mailbox
- * \param  uWriteLen  - Length of data to write to the mailbox
- * \param  uReadLen  - Length of data to read from the mailbox (when the result is received)
- * \return TI_PENDING
- * 
- * \par Description
- * Copy the buffer given to a local struct, update the write & read lengths
- * and send to the FW's mailbox.
- *             
- *       ------------------------------------------------------
- *      | CmdMbox Header | Cmd Header    | Command parameters |
- *      ------------------------------------------------------
- *      | ID   | Status  | Type | Length | Command parameters |
- *      ------------------------------------------------------
- *       16bit   16bit    16bit   16bit     
- *
- * \sa cmdMbox_CommandComplete
- */
-TI_STATUS cmdMbox_SendCommand       (TI_HANDLE hCmdMbox, Command_e cmdType, TI_UINT8* pParamsBuf, TI_UINT32 uWriteLen, TI_UINT32 uReadLen);
-
-
-/*
- * \brief	Read the command's result
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return void
- * 
- * \par Description
- * This function is called for FwEvent module uppon receiving command complete interrupt.
- * It issues a read transaction from the mailbox with a CB.
- * 
- * \sa cmdMbox_SendCommand, cmdMbox_TransferComplete
- */
-ETxnStatus cmdMbox_CommandComplete (TI_HANDLE hCmdMbox);
-
-
-/*
- * \brief	Calls the cmdQueue_ResultReceived.
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return TI_OK
- * 
- * \par Description
- * This function is called from cmdMbox_CommandComplete on a sync read, or from TwIf as a CB on an async read.
- * It calls cmdQueue_ResultReceived to continue the result handling procces & switch the bCmdInProgress flag to TI_FALSE, 
- * meaning other commands can be sent to the FW.
- * 
- * \sa cmdMbox_SendCommand, cmdMbox_TransferComplete
- */
-TI_STATUS cmdMbox_TransferComplete  (TI_HANDLE hCmdMbox);
-
-
-/*
- * \brief	Restart the module upon driver stop or restart
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return TI_OK
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS cmdMbox_Restart           (TI_HANDLE hCmdMbox);
-
-
-/*
- * \brief	Return the latest command status
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return TI_OK or TI_NOK
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS cmdMbox_GetStatus         (TI_HANDLE hCmdMbox, CommandStatus_e *cmdStatus);
-
-
-/*
- * \brief	Return the MBox address
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \return MBox address
- * 
- * \par Description
- * 
- * \sa
- */
-TI_UINT32 cmdMbox_GetMboxAddress    (TI_HANDLE hCmdMbox);
-
-
-/*
- * \brief	Return the Command parameters buffer
- * 
- * \param  hCmdMbox  - Handle to CmdMbox
- * \param  pParamBuf  - Holds the returned buffer
- * \return
- * 
- * \par Description
- * Copying the command's data to pParamBuf
- * 
- * \sa
- */
-void      cmdMbox_GetCmdParams           (TI_HANDLE hCmdMbox, TI_UINT8* pParamBuf);
-
-
-#ifdef TI_DBG
-void      cmdMbox_PrintInfo              (TI_HANDLE hCmdMbox);
-#endif
-
-
-#endif
diff --git a/wl1271/TWD/FW_Transfer/Export_Inc/FwEvent_api.h b/wl1271/TWD/FW_Transfer/Export_Inc/FwEvent_api.h
deleted file mode 100644
index e4d14ba..0000000
--- a/wl1271/TWD/FW_Transfer/Export_Inc/FwEvent_api.h
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * FwEvent_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file FwEvent_api.h
- *  \brief FwEvent api
- *
- *  \see FwEvent.c
- */
-
-
-#ifndef _FW_EVENT_API_H
-#define _FW_EVENT_API_H
-
-/* Public Function Definitions */
-
-/*
- * \brief	Create the FwEvent module object
- * 
- * \param  hOs  - OS module object handle
- * \return Handle to the created object
- * 
- * \par Description
- * Calling this function creates a FwEvent object
- * 
- * \sa fwEvent_Destroy
- */
-TI_HANDLE       fwEvent_Create              (TI_HANDLE hOs);
-
-
-/*
- * \brief	Destroys the FwEvent object
- * 
- * \param  hFwEvent  - The object to free
- * \return TI_OK
- * 
- * \par Description
- * Calling this function destroys a FwEvent object
- * 
- * \sa fwEvent_Create
- */
-TI_STATUS       fwEvent_Destroy             (TI_HANDLE hFwEvent);
-
-
-/*
- * \brief	Requests the context engine to schedule the driver task
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return void
- * 
- * \par Description
- * Called by the FW-Interrupt ISR.
- * Requests the context engine to schedule the driver task 
- * for handling the FW-Events (FwEvent callback).
- * 
- * \sa
- */
-void            fwEvent_InterruptRequest    (TI_HANDLE hFwEvent);
-
-
-/*
- * \brief	Config the FwEvent module object
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \param  hTWD  - Handle to TWD module
- * \return TI_OK
- * 
- * \par Description
- * From hTWD we extract : hOs, hReport, hTwIf, hContext,
- *      hHealthMonitor, hEventMbox, hCmdMbox, hRxXfer, 
- *      hTxHwQueue, hTxResult
- * In this function we also register the FwEvent to the context engine
- * 
- * \sa
- */
-TI_STATUS       fwEvent_Init                (TI_HANDLE hFwEvent, TI_HANDLE hTWD);
-
-
-/*
- * \brief	Called by any handler that completed after pending
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- *
- * \par Description
- *
- * Decrement pending handlers counter and if 0 call the SM to complete its process.
- * 
- * \sa
- */
-void            fwEvent_HandlerCompleted    (TI_HANDLE hFwEvent);
-
-
-/*
- * \brief	Stop & reset FwEvent (called by the driver stop process)
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return TI_OK
- * 
- * \par Description
- *
- * \sa
- */
-TI_STATUS       fwEvent_Stop                (TI_HANDLE hFwEvent);
-
-
-/*
- * \brief	Translate host to FW time (Usec)
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \param  uHostTime - The host time in MS to translate
- *
- * \return FW Time in Usec
- * 
- * \par Description
- * 
- * \sa
- */
-TI_UINT32       fwEvent_TranslateToFwTime (TI_HANDLE hFwEvent, TI_UINT32 uHostTime);
-
-
-/*
- * \brief	Disable the FwEvent client of the context thread handler
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return void
- * 
- * \par Description
- *
- * \sa
- */
-void            fwEvent_DisableInterrupts   (TI_HANDLE hFwEvent);
-
-
-/*
- * \brief	Enable the FwEvent client of the context thread handler
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return void
- * 
- * \par Description
- *
- * \sa
- */
-void            fwEvent_EnableInterrupts    (TI_HANDLE hFwEvent);
-
-
-/*
- * \brief	Unmask all interrupts, set Rx interrupt bit and call FwEvent_Handle
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return void
- * 
- * \par Description
- * Called when driver Start or recovery process is completed.
- * Unmask all interrupts, set Rx interrupt bit and call FwEvent_Handle 
- * (in case we missed an Rx interrupt in a recovery process).
- *
- * \sa
- */
-void            fwEvent_EnableExternalEvents(TI_HANDLE hFwEvent);
-
-
-/*
- * \brief	Unmask only cmd-cmplt and events interrupts (needed for init phase)
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return Event mask
- * 
- * \par Description
- * Unmask only cmd-cmplt and events interrupts (needed for init phase).
-
- *
- * \sa
- */
-void            fwEvent_SetInitMask         (TI_HANDLE hFwEvent);
-
-
-
-#ifdef TI_DBG
-
-void            fwEvent_PrintStat           (TI_HANDLE hFwEvent);
-
-#endif  /* TI_DBG */
-
-
-
-#endif /* _FW_EVENT_API_H */
-
-
-
-
-
-
-
diff --git a/wl1271/TWD/FW_Transfer/Export_Inc/HwInit_api.h b/wl1271/TWD/FW_Transfer/Export_Inc/HwInit_api.h
deleted file mode 100644
index 5222001..0000000
--- a/wl1271/TWD/FW_Transfer/Export_Inc/HwInit_api.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * HwInit_api.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   HwInit_api.h                                               */
-/*    PURPOSE:  HwInit module Header file                             	   */
-/*                                                                         */
-/***************************************************************************/
-#ifndef _HW_INIT_API_H_
-#define _HW_INIT_API_H_
-
-#include "TWDriver.h"
-
-typedef TI_STATUS (*TFinalizeCb) (TI_HANDLE);
-
-typedef struct
-{
-    TI_UINT8   MacClock;
-    TI_UINT8   ArmClock;
-    TI_BOOL    FirmwareDebug;
-
-} TBootAttr;
-
-
-/* Callback function definition for EndOfRecovery */
-typedef void (* TEndOfHwInitCb) (TI_HANDLE handle);
-
-
-TI_HANDLE hwInit_Create (TI_HANDLE hOs);
-TI_STATUS hwInit_Init   (TI_HANDLE hHwInit,
-                         TI_HANDLE hReport, 
-                         TI_HANDLE hTimer, 
-                         TI_HANDLE hTWD, 
-                         TI_HANDLE hFinalizeDownload, 
-                         TFinalizeCb fFinalizeDownload, 
-                         TEndOfHwInitCb fInitHwCb);
-TI_STATUS hwInit_SetNvsImage (TI_HANDLE hHwInit, TI_UINT8 *pbuf, TI_UINT32 length);
-TI_STATUS hwInit_SetFwImage (TI_HANDLE hHwInit, TFileInfo *pFileInfo);
-TI_STATUS hwInit_Destroy (TI_HANDLE hHwInit);
-TI_STATUS hwInit_Boot (TI_HANDLE hHwInit);
-TI_STATUS hwInit_LoadFw (TI_HANDLE hHwInit);
-TI_STATUS hwInit_ReadRadioParamsSm (TI_HANDLE hHwInit);
-TI_STATUS hwInit_ReadRadioParams (TI_HANDLE hHwInit);
-TI_STATUS hwInit_WriteIRQPolarity(TI_HANDLE hHwInit);
-TI_STATUS hwInit_InitPolarity(TI_HANDLE hHwInit);
-
-
-#endif /* _HW_INIT_API_H_ */
diff --git a/wl1271/TWD/FW_Transfer/Export_Inc/eventMbox_api.h b/wl1271/TWD/FW_Transfer/Export_Inc/eventMbox_api.h
deleted file mode 100644
index 8f8417d..0000000
--- a/wl1271/TWD/FW_Transfer/Export_Inc/eventMbox_api.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * eventMbox_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  eventMbox_api.h : event Mail Box API
- *   PURPOSE: Notify EventMbox in case of an incoming event from the FW
- *
- ****************************************************************************/
-#ifndef _EVENT_MBOX_API_H
-#define _EVENT_MBOX_API_H
-
-
-#include "TWDriverInternal.h"
-
-
-/*
- *  TEventMboxDataCb : This Call back is for EventMbox Client 
- *                     that expect an event with Data associated  
- *                     str:    The Data String
- *                     strLen : The Length of the Data
- */
-typedef void (*TEventMboxDataCb)(TI_HANDLE hCb, TI_CHAR* str, TI_UINT32 strLen);
-
-/*
- *  TEventMboxEvCb : This Call back is for EventMbox Client 
- *                   that expect an event without any Data
- */
-typedef void (*TEventMboxEvCb)(TI_HANDLE hCb);
-
-
-/*****************************************************************************
- **         API                                                            **
- *****************************************************************************/
-
-TI_HANDLE eventMbox_Create          (TI_HANDLE hOs);
-void      eventMbox_Destroy			(TI_HANDLE hEventMbox);
-void      eventMbox_Stop			(TI_HANDLE hEventMbox);
-void      eventMbox_Config			(TI_HANDLE hEventMbox,
-									 TI_HANDLE hTwif,
-									 TI_HANDLE hReport,
-									 TI_HANDLE hFwEvent,
-									 TI_HANDLE hCmdBld);
-TI_STATUS eventMbox_InitMboxAddr	(TI_HANDLE hEventMbox, fnotify_t fCb, TI_HANDLE hCb);
-void      eventMbox_InitComplete	(TI_HANDLE hEventMbox);
-TI_STATUS eventMbox_RegisterEvent	(TI_HANDLE hEventMbox, TI_UINT32 EvID, void *fCb, TI_HANDLE hCb);
-TI_STATUS eventMbox_ReplaceEvent	(TI_HANDLE hEventMbox,
-                                     TI_UINT32   EvID, 
-                                     void       *fNewCb, 
-                                     TI_HANDLE   hNewCb,                                    
-                                     void      **pPrevCb, 
-                                     TI_HANDLE  *pPrevHndl);                                
-TI_STATUS eventMbox_UnMaskEvent		(TI_HANDLE hEventMbox, TI_UINT32 EvID, void *fCb, TI_HANDLE hCb);
-TI_STATUS eventMbox_MaskEvent		(TI_HANDLE hEventMbox, TI_UINT32 EvID, void *fCb, TI_HANDLE hCb);
-ETxnStatus      eventMbox_Handle		   	(TI_HANDLE hEventMbox, FwStatus_t *pFwStatus);
-#ifdef TI_DBG
-TI_STATUS eventMbox_Print           (TI_HANDLE hEventMbox);
-#endif
-
-#endif /* _EVENT_MBOX_API_H */
diff --git a/wl1271/TWD/FW_Transfer/Export_Inc/fwDebug_api.h b/wl1271/TWD/FW_Transfer/Export_Inc/fwDebug_api.h
deleted file mode 100644
index 988b6d4..0000000
--- a/wl1271/TWD/FW_Transfer/Export_Inc/fwDebug_api.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * fwDebug_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  fwDebug_api.h
- *
- *   PURPOSE: FW-Debug module API.
- * 
- ****************************************************************************/
-
-#ifndef _FW_DEBUG_API_H
-#define _FW_DEBUG_API_H
-
-
-#define FW_DEBUG_MAX_BUF		256
-#define FW_DBG_CMD_MAX_PARAMS	2
-
-
-/* FW Debug commands. */
-typedef enum
-{
-	FW_DBG_CMD_READ_MEM,
-	FW_DBG_CMD_WRITE_MEM
-}fwDbg_dbgCmd_e;
-
-typedef struct
-{
-	TI_UINT32	addr;
-	TI_UINT32 	length;
-	union
-	{
-		TI_UINT8	buf8[FW_DEBUG_MAX_BUF];
-		TI_UINT32	buf32[FW_DEBUG_MAX_BUF/4];
-	} UBuf;
-}TFwDebugParams;
-
-/* for TWD Debug */
-typedef struct
-{
-	TI_UINT32		func_id;
-	union
-	{
-		TI_UINT32		opt_param;
-		TFwDebugParams	mem_debug;
-	}debug_data;
-} TTwdDebug;
-
-typedef void(*TFwDubCallback)(TI_HANDLE hCb);
-
-
-/* Public Function Definitions */
-
-
-TI_HANDLE fwDbg_Create      (TI_HANDLE hOs);
-
-void      fwDbg_Destroy     (TI_HANDLE hFwDebug);
-
-void      fwDbg_Init	    (TI_HANDLE hFwDebug,
-                             TI_HANDLE hReport,
-                             TI_HANDLE hTwif);
-
-TI_STATUS fwDbg_WriteAddr   (TI_HANDLE hFwDebug,
-                             TI_UINT32 Address,
-                             TI_UINT32 Length,
-                             TI_UINT8* Buffer,
-                             TFwDubCallback fCb,
-                             TI_HANDLE hCb);
-
-TI_STATUS fwDbg_ReadAddr    (TI_HANDLE hFwDebug,
-                             TI_UINT32 Address,
-                             TI_UINT32 Length,
-                             TI_UINT8* Buffer,
-                             TFwDubCallback fCb,
-						     TI_HANDLE hCb);
-
-TI_BOOL fwDbg_isValidMemoryAddr    (TI_HANDLE hFwDebug,
-                             TI_UINT32 Address,
-                             TI_UINT32 Length);
-
-TI_BOOL fwDbg_isValidRegAddr    (TI_HANDLE hFwDebug,
-                             TI_UINT32 Address,
-                             TI_UINT32 Length);
-
-
-#endif /* _FW_DEBUG_API_H */
-
-
-
-
diff --git a/wl1271/TWD/FW_Transfer/Export_Inc/rxXfer_api.h b/wl1271/TWD/FW_Transfer/Export_Inc/rxXfer_api.h
deleted file mode 100644
index fa4c024..0000000
--- a/wl1271/TWD/FW_Transfer/Export_Inc/rxXfer_api.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * rxXfer_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  rxXfer_api.h
- *
- *   PURPOSE: Rx Xfer module API.
- * 
- ****************************************************************************/
-
-#ifndef _RX_XFER_API_H
-#define _RX_XFER_API_H
-
-
-#include "TWDriverInternal.h"
-
-/* Public Function Definitions */
-
-
-TI_HANDLE			rxXfer_Create(TI_HANDLE hOs);
-
-void				rxXfer_Destroy(TI_HANDLE hRxXfer);
-
-void				rxXfer_Init( TI_HANDLE hRxXfer,
-								 TI_HANDLE hFwEvent, 
-								 TI_HANDLE hReport,
-                                 TI_HANDLE hTwIf,
-                                 TI_HANDLE hRxQueue);
-
-void                rxXfer_SetDefaults (TI_HANDLE hRxXfer, TTwdInitParams *pInitParams);
-
-void                rxXfer_SetBusParams (TI_HANDLE hRxXfer, TI_UINT32 uDmaBufLen);
-
-ETxnStatus           rxXfer_RxEvent (TI_HANDLE hRxXfer, FwStatus_t* pFwStatus);
-
-void				rxXfer_Register_CB(TI_HANDLE hRxXfer,TI_UINT32 CallBackID,void *CBFunc,TI_HANDLE CBObj);
-
-void                rxXfer_SetRxDirectAccessParams (TI_HANDLE hRxXfer, TDmaParams *pDmaParams);
-                    
-void                rxXfer_RegisterErrCb (TI_HANDLE hRxXfer, void *fErrCb, TI_HANDLE hErrCb);
-
-void                rxXfer_Restart (TI_HANDLE hRxXfer);
-
-
-#ifdef TI_DBG
-
-void rxXfer_ClearStats( TI_HANDLE hRxXfer );
-
-void rxXfer_PrintStats( TI_HANDLE hRxXfer );
-
-#endif /* TI_DBG */
-
-
-#endif /* _RX_XFER_API_H */
-
-
-
-
diff --git a/wl1271/TWD/FW_Transfer/Export_Inc/txResult_api.h b/wl1271/TWD/FW_Transfer/Export_Inc/txResult_api.h
deleted file mode 100644
index d6ce41d..0000000
--- a/wl1271/TWD/FW_Transfer/Export_Inc/txResult_api.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * txResult_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  txResult_api.h
- *
- *   PURPOSE: Tx result module API.
- * 
- ****************************************************************************/
-
-#ifndef _TX_RESULT_API_H
-#define _TX_RESULT_API_H
-
-
-#include "TWDriverInternal.h"
-
-
-/* Public Function Definitions */
-
-TI_HANDLE	txResult_Create (TI_HANDLE hOs);
-TI_STATUS	txResult_Destroy (TI_HANDLE hTxResult);
-TI_STATUS   txResult_Init (TI_HANDLE hTxResult, TI_HANDLE hReport, TI_HANDLE hTwIf);
-void		txResult_setHwInfo (TI_HANDLE hTxResult, TDmaParams *pDmaParams);
-void		txResult_RegisterCb (TI_HANDLE hTxResult, TI_UINT32 CallBackID, void *CBFunc, TI_HANDLE CBObj);
-ETxnStatus         txResult_TxCmpltIntrCb (TI_HANDLE hTxResult, FwStatus_t *pFwStatus);
-
-#ifdef TI_DBG
-void		txResult_PrintInfo (TI_HANDLE hTxResult);
-void		txResult_ClearInfo (TI_HANDLE hTxResult);
-#endif
-
-
-#endif /* _TX_RESULT_API_H */
-
diff --git a/wl1271/TWD/FW_Transfer/Export_Inc/txXfer_api.h b/wl1271/TWD/FW_Transfer/Export_Inc/txXfer_api.h
deleted file mode 100644
index ba4ceda..0000000
--- a/wl1271/TWD/FW_Transfer/Export_Inc/txXfer_api.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * txXfer_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  txXfer_api.h
- *
- *   PURPOSE: Tx Xfer module API.
- * 
- ****************************************************************************/
-
-#ifndef _TX_XFER_API_H
-#define _TX_XFER_API_H
-
-
-#include "TWDriver.h"
-
-
-/* 
- *   Public Function Definitions:
- *   ============================
- */
-
-
-/** 
- * \fn     txXfer_Create
- * \brief  Create module
- * 
- * Create module
- * 
- * \note   
- * \param  hOs - The OS API handle
- * \return The created module handle
- * \sa     
- */ 
-TI_HANDLE txXfer_Create (TI_HANDLE hOs);
-
-
-/** 
- * \fn     txXfer_Destroy
- * \brief  Destroy module
- * 
- * Destroy module
- * 
- * \note   
- * \param  hTxXfer - Module handle
- * \return TI_OK
- * \sa     
- */ 
-TI_STATUS txXfer_Destroy (TI_HANDLE hTxXfer);
-
-
-/** 
- * \fn     txXfer_Init
- * \brief  Initialize module variables
- * 
- * Initialize module variables including saving other modules handles
- * 
- * \note   
- * \param  hTxXfer - Module handle
- * \param  hXXX    - Other modules handles
- * \return TI_OK
- * \sa     
- */ 
-TI_STATUS txXfer_Init (TI_HANDLE hTxXfer, TI_HANDLE hReport, TI_HANDLE hTwIf);
-
-
-/** 
- * \fn     txXfer_Restart
- * \brief  Restart some module variables
- * 
- * Restart some module variables upon init, stop or recovery
- * 
- * \note   
- * \param  hTxXfer - Module handle
- * \return TI_OK
- * \sa     
- */ 
-TI_STATUS txXfer_Restart (TI_HANDLE hTxXfer);
-
-
-/** 
- * \fn     txXfer_SetDefaults
- * \brief  Configure module default settings
- * 
- * Configure module default settings from ini file
- * 
- * \note   
- * \param  hTxXfer     - Module handle
- * \param  pInitParams - The default paremeters structure
- * \return void
- * \sa     
- */ 
-void txXfer_SetDefaults (TI_HANDLE hTxXfer, TTwdInitParams *pInitParams);
-
-
-/** 
- * \fn     txXfer_SetBusParams
- * \brief  Configure bus related parameters
- * 
- * Configure bus driver DMA-able buffer length to be used as a limit to the aggragation length.
- * 
- * \note   
- * \param  hTxXfer     - Module handle
- * \param  uDmaBufLen  - The bus driver DMA-able buffer length
- * \return void
- * \sa     
- */ 
-void txXfer_SetBusParams (TI_HANDLE hTxXfer, TI_UINT32 uDmaBufLen);
-
-
-/** 
- * \fn     txXfer_RegisterCb
- * \brief  Register callback functions
- * 
- * Called by Tx upper layers to register their CB for packet transfer completion.
- * Registered only if needed (currently used only by WHA layer).
- * 
- * \note   
- * \param  hTxXfer    - Module handle
- * \param  CallBackID - Type of CB being registered (currently only transfer completion)
- * \param  CBFunc     - The CB function
- * \param  CBObj      - The parameter to provide when calling the CB
- * \return void
- * \sa     
- */ 
-void txXfer_RegisterCb (TI_HANDLE hTxXfer, TI_UINT32 CallBackID, void *CBFunc, TI_HANDLE CBObj);
-
-
-/** 
- * \fn     txXfer_SendPacket
- * \brief  Send a Tx packet to the FW
- * 
- * Called by the Tx upper layers to send a new Tx packet to the FW (after FW resources were allocated).
- * Aggregate the packet if possible, and if needed call txXfer_SendAggregatedPkts to forward 
- *     the aggregation to the FW.
- * 
- * \note   
- * \param  hTxXfer     - Module handle
- * \param  pPktCtrlBlk - The new packet to send
- * \return COMPLETE if completed in this context, PENDING if not, ERROR if failed
- * \sa     
- */ 
-ETxnStatus txXfer_SendPacket (TI_HANDLE hTxXfer, TTxCtrlBlk *pPktCtrlBlk);
-
-
-/** 
- * \fn     txXfer_EndOfBurst
- * \brief  Indicates that current packets burst stopped
- * 
- * Called by the Tx upper layers to indicate that the current packets burst stopped.
- * Sends the current aggregation of packets to the FW.
- * 
- * \note   
- * \param  hTxXfer - module handle
- * \return void
- * \sa     
- */ 
-void txXfer_EndOfBurst (TI_HANDLE hTxXfer);
-
-
-
-#ifdef TI_DBG
-void txXfer_ClearStats (TI_HANDLE hTxXfer);
-void txXfer_PrintStats (TI_HANDLE hTxXfer);
-#endif
-
-
-
-#endif /* _TX_XFER_API_H */
diff --git a/wl1271/TWD/FW_Transfer/FwEvent.c b/wl1271/TWD/FW_Transfer/FwEvent.c
deleted file mode 100644
index 6672aea..0000000
--- a/wl1271/TWD/FW_Transfer/FwEvent.c
+++ /dev/null
@@ -1,792 +0,0 @@
-/*
- * FwEvent.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  FwEvent.c
- *  \brief Handle firmware events
- * 
- *   
- * \par Description
- *      Call the appropriate event handler.
- *
- *  \see FwEvent.h
- */
-
-#define __FILE_ID__  FILE_ID_104
-#include "tidef.h"
-#include "report.h"
-#include "context.h"
-#include "osApi.h"
-#include "TWDriver.h"
-#include "TWDriverInternal.h"
-#include "txResult_api.h"
-#include "CmdMBox_api.h"
-#include "rxXfer_api.h" 
-#include "txXfer_api.h" 
-#include "txHwQueue_api.h"
-#include "eventMbox_api.h"
-#include "TwIf.h"
-#include "public_host_int.h"
-#include "FwEvent_api.h"
-#ifdef TI_DBG
-    #include "tracebuf_api.h"
-#endif
-#include "bmtrace_api.h"
-
-
-#ifdef _VLCT_
-extern int trigger_another_read;
-#endif
-
-
-/*
- * Address of FW-Status structure in FW memory ==> Special mapping, see note!!
- *
- * Note: This structure actually includes two separate areas in the FW:
- *          1) Interrupt-Status register - a 32 bit register (clear on read).
- *          2) FW-Status structure - 64 bytes memory area
- *       The two areas are read in a single transaction thanks to a special memory 
- *           partition that maps them as contiguous memory.
- */
-#define FW_STATUS_ADDR           0x14FC0 + 0xA000
-
-
-#define ALL_EVENTS_VECTOR        ACX_INTR_WATCHDOG | ACX_INTR_INIT_COMPLETE | ACX_INTR_EVENT_A |\
-                                 ACX_INTR_EVENT_B | ACX_INTR_CMD_COMPLETE |ACX_INTR_HW_AVAILABLE |\
-                                 ACX_INTR_DATA
-
-#define TXN_FW_EVENT_SET_MASK_ADDR(pFwEvent)      pFwEvent->tMaskTxn.tTxnStruct.uHwAddr = HINT_MASK;
-#define TXN_FW_EVENT_SET_FW_STAT_ADDR(pFwEvent)   pFwEvent->tFwStatusTxn.tTxnStruct.uHwAddr = FW_STATUS_ADDR;
-
-#define UPDATE_PENDING_HANDLERS_NUMBER(eStatus)   if (eStatus == TXN_STATUS_PENDING) {pFwEvent->uNumPendHndlrs++;}
-
-
-typedef enum
-{
-    FWEVENT_STATE_IDLE,    
-    FWEVENT_STATE_WAIT_INTR_INFO,
-    FWEVENT_STATE_WAIT_HANDLE_COMPLT
-
-} EFwEventState;
-
-typedef struct 
-{
-    TTxnStruct              tTxnStruct;
-    TI_UINT32               uData; 
-
-} TRegisterTxn;
-
-typedef struct 
-{
-    TTxnStruct     tTxnStruct;
-    FwStatus_t     tFwStatus;
-
-} TFwStatusTxn;
-
-/* The FwEvent module's main structure */
-typedef struct 
-{
-    EFwEventState       eSmState;       /* State machine state */
-    TI_UINT32           uEventMask;     /* Static interrupt event mask */
-    TI_UINT32           uEventVector;   /* Saves the current active FW interrupts */
-    TRegisterTxn        tMaskTxn;       /* The host mask register transaction */
-    TFwStatusTxn        tFwStatusTxn;   /* The FW status structure transaction (read from FW memory) */
-    TI_UINT32           uFwTimeOffset;  /* Offset in microseconds between driver and FW clocks */
-    TI_UINT32           uContextId;     /* Client ID got upon registration to the context module */
-    TI_BOOL             bIntrPending;   /* If TRUE a new interrupt is pending while handling the previous one */
-    TI_UINT32           uNumPendHndlrs; /* Number of event handlers that didn't complete their event processing */
-
-    /* Other modules handles */
-    TI_HANDLE           hOs;                    	
-    TI_HANDLE           hTWD;
-    TI_HANDLE           hReport;                	
-    TI_HANDLE           hContext;               	
-    TI_HANDLE           hTwIf;                      
-    TI_HANDLE           hHealthMonitor;             
-    TI_HANDLE           hEventMbox;
-    TI_HANDLE           hCmdMbox;
-    TI_HANDLE           hRxXfer;
-    TI_HANDLE           hTxXfer;
-    TI_HANDLE           hTxHwQueue;
-    TI_HANDLE           hTxResult;
-
-} TfwEvent; 
-
-
-static void       fwEvent_NewEvent       (TI_HANDLE hFwEvent);
-static void       fwEvent_StateMachine   (TfwEvent *pFwEvent);
-static ETxnStatus fwEvent_SmReadIntrInfo (TfwEvent *pFwEvent);
-static ETxnStatus fwEvent_SmHandleEvents (TfwEvent *pFwEvent);
-static ETxnStatus fwEvent_CallHandlers   (TfwEvent *pFwEvent);
-
-
-/*
- * \brief	Create the FwEvent module object
- * 
- * \param  hOs  - OS module object handle
- * \return Handle to the created object
- * 
- * \par Description
- * Calling this function creates a FwEvent object
- * 
- * \sa fwEvent_Destroy
- */
-TI_HANDLE fwEvent_Create (TI_HANDLE hOs)
-{
-    TfwEvent *pFwEvent;
-
-    pFwEvent = os_memoryAlloc (hOs, sizeof(TfwEvent));
-    if (pFwEvent == NULL)
-    {
-        return NULL;
-    }
-
-    os_memoryZero (hOs, pFwEvent, sizeof(TfwEvent));
-
-    pFwEvent->hOs = hOs;
-
-    return (TI_HANDLE)pFwEvent;
-}
-
-
-/*
- * \brief	Destroys the FwEvent object
- * 
- * \param  hFwEvent  - The object to free
- * \return TI_OK
- * 
- * \par Description
- * Calling this function destroys a FwEvent object
- * 
- * \sa fwEvent_Create
- */
-TI_STATUS fwEvent_Destroy (TI_HANDLE hFwEvent)
-{
-    TfwEvent *pFwEvent = (TfwEvent *)hFwEvent;
-
-    if (pFwEvent)
-    {
-        os_memoryFree (pFwEvent->hOs, pFwEvent, sizeof(TfwEvent));
-    }
-
-    return TI_OK;
-}
-
-
-/*
- * \brief	Config the FwEvent module object
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \param  hTWD  - Handle to TWD module
- * \return TI_OK
- * 
- * \par Description
- * From hTWD we extract : hOs, hReport, hTwIf, hContext,
- *      hHealthMonitor, hEventMbox, hCmdMbox, hRxXfer, 
- *      hTxHwQueue, hTxResult
- * In this function we also register the FwEvent to the context engine
- * 
- * \sa
- */
-TI_STATUS fwEvent_Init (TI_HANDLE hFwEvent, TI_HANDLE hTWD)
-{
-    TfwEvent  *pFwEvent = (TfwEvent *)hFwEvent;
-    TTwd      *pTWD = (TTwd *)hTWD;
-    TTxnStruct* pTxn;
-    
-    pFwEvent->hTWD              = hTWD;
-    pFwEvent->hOs               = pTWD->hOs;
-    pFwEvent->hReport           = pTWD->hReport;
-    pFwEvent->hContext          = pTWD->hContext;
-    pFwEvent->hTwIf             = pTWD->hTwIf;
-    pFwEvent->hHealthMonitor    = pTWD->hHealthMonitor;
-    pFwEvent->hEventMbox        = pTWD->hEventMbox;
-    pFwEvent->hCmdMbox          = pTWD->hCmdMbox;
-    pFwEvent->hRxXfer           = pTWD->hRxXfer;
-    pFwEvent->hTxHwQueue        = pTWD->hTxHwQueue;
-    pFwEvent->hTxXfer           = pTWD->hTxXfer;
-    pFwEvent->hTxResult         = pTWD->hTxResult;
-
-    pFwEvent->eSmState          = FWEVENT_STATE_IDLE;
-    pFwEvent->bIntrPending      = TI_FALSE;
-    pFwEvent->uNumPendHndlrs    = 0;
-    pFwEvent->uEventMask        = 0;
-    pFwEvent->uEventVector      = 0;
-
-    /* Prepare Interrupts Mask regiter Txn structure */
-    /* 
-     * Note!!: The mask transaction is sent in low priority because it is used in the 
-     *           init process which includes a long sequence of low priority transactions,
-     *           and the order of this sequence is important so we must use the same priority
-     */
-    pTxn = (TTxnStruct*)&pFwEvent->tMaskTxn.tTxnStruct;
-    TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-    BUILD_TTxnStruct(pTxn, HINT_MASK, &pFwEvent->tMaskTxn.uData, REGISTER_SIZE, NULL, NULL)
-
-    /* Prepare FW status Txn structure (includes 4 bytes interrupt status reg and 64 bytes FW-status from memory area) */
-    /* Note: This is the only transaction that is sent in high priority.
-     *       The original reason was to lower the interrupt latency, but we may consider using the 
-     *         same priority as all other transaction for simplicity.
-     */
-    pTxn = (TTxnStruct*)&pFwEvent->tFwStatusTxn.tTxnStruct;
-    TXN_PARAM_SET(pTxn, TXN_HIGH_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_READ, TXN_INC_ADDR)
-    BUILD_TTxnStruct(pTxn, FW_STATUS_ADDR, &pFwEvent->tFwStatusTxn.tFwStatus, sizeof(FwStatus_t), (TTxnDoneCb)fwEvent_StateMachine, hFwEvent)
-
-    /* 
-     *  Register the FwEvent to the context engine and get the client ID.
-     *  The FwEvent() will be called from the context_DriverTask() after scheduled
-     *    by a FW-Interrupt (see fwEvent_InterruptRequest()).
-     */
-    pFwEvent->uContextId = context_RegisterClient (pFwEvent->hContext,
-                                                   fwEvent_NewEvent,
-                                                   hFwEvent,
-                                                   TI_FALSE,
-                                                   "FW_EVENT",
-                                                   sizeof("FW_EVENT"));
-	
-    return TI_OK;
-}
-
-
-/*
- * \brief	FW interrupt handler, just switch to WLAN context for handling
- * 
- * \param   hFwEvent - FwEvent Driver handle
- * \return  void
- * 
- * \par Description
- * Called by the FW-Interrupt ISR (external context!).
- * Requests the context engine to schedule the driver task for handling the FW-Events.
- * 
- * \sa
- */
-void fwEvent_InterruptRequest (TI_HANDLE hFwEvent)
-{
-    TfwEvent *pFwEvent = (TfwEvent *)hFwEvent;
-    CL_TRACE_START_L1();
-
-    TRACE0(pFwEvent->hReport, REPORT_SEVERITY_INFORMATION, "fwEvent_InterruptRequest()\n");
-
-    /* Request switch to driver context for handling the FW-Interrupt event */
-    context_RequestSchedule (pFwEvent->hContext, pFwEvent->uContextId);
-
-    CL_TRACE_END_L1("tiwlan_drv.ko", "IRQ", "FwEvent", "");
-}
-
-
-/*
- * \brief   The CB called in the driver context upon new interrupt
- * 
- * \param   hFwEvent - FwEvent Driver handle
- * \return  void
- * 
- * \par Description
- * Called by the context module after scheduled by fwEvent_InterruptRequest().
- * If IDLE, start the SM, and if not just indicate pending event for later.
- * 
- * \sa
- */
-static void fwEvent_NewEvent (TI_HANDLE hFwEvent)
-{
-    TfwEvent *pFwEvent = (TfwEvent *)hFwEvent;
-    CL_TRACE_START_L2();
-
-    /* If the SM is idle, call it to start handling new events */
-    if (pFwEvent->eSmState == FWEVENT_STATE_IDLE) 
-    {
-        TRACE0(pFwEvent->hReport, REPORT_SEVERITY_INFORMATION, "fwEvent_NewEvent: Start SM\n");
-
-        fwEvent_StateMachine (pFwEvent);
-    }
-    /* Else - SM is busy so set flag to handle it when finished with current events */
-    else 
-    {
-        TRACE0(pFwEvent->hReport, REPORT_SEVERITY_INFORMATION, "fwEvent_NewEvent: SM busy, set IntrPending flag\n");
-
-        pFwEvent->bIntrPending = TI_TRUE;
-    }
-
-    CL_TRACE_END_L2("tiwlan_drv.ko", "CONTEXT", "FwEvent", "");
-}
-
-
-/*
- * \brief	FW-Event state machine
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return void
- * 
- * \par Description
- * 
- * Process the current FW events in a sequence that may progress in the same context,
- *     or exit if pending an Async transaction, which will call back the SM when finished.
- *
- * \sa
- */
-static void fwEvent_StateMachine (TfwEvent *pFwEvent)
-{
-    ETxnStatus  eStatus = TXN_STATUS_ERROR; /* Set to error to detect if used uninitialized */
-    CL_TRACE_START_L3();
-
-	/* 
-	 * Loop through the states sequence as long as the process is synchronous.
-	 * Exit when finished or if an Asynchronous process is required. 
-     * In this case the SM will be called back upon Async operation completion. 
-	 */
-	while (1)
-	{
-		switch (pFwEvent->eSmState)
-		{
-            /* IDLE: Update TwIf and read interrupt info from FW */
-            case FWEVENT_STATE_IDLE:
-            {
-                CL_TRACE_START_L5();
-                twIf_Awake(pFwEvent->hTwIf);
-                eStatus = fwEvent_SmReadIntrInfo (pFwEvent);
-                pFwEvent->eSmState = FWEVENT_STATE_WAIT_INTR_INFO;
-                CL_TRACE_END_L5("tiwlan_drv.ko", "CONTEXT", "FwEvent", ".ReadInfo");
-                break;
-            }
-            /* WAIT_INTR_INFO: We have the interrupt info so call the handlers accordingly */
-            case FWEVENT_STATE_WAIT_INTR_INFO:
-            {
-                CL_TRACE_START_L5();
-                eStatus = fwEvent_SmHandleEvents (pFwEvent);
-                /* If state was changed to IDLE by recovery or stop process, exit (process terminated) */
-                if (pFwEvent->eSmState == FWEVENT_STATE_IDLE) 
-                {
-                    CL_TRACE_END_L5("tiwlan_drv.ko", "CONTEXT", "FwEvent", ".HndlEvents");
-                    CL_TRACE_END_L3("tiwlan_drv.ko", "CONTEXT", "FwEvent", "");
-                    return;
-                }
-                pFwEvent->eSmState = FWEVENT_STATE_WAIT_HANDLE_COMPLT;
-                CL_TRACE_END_L5("tiwlan_drv.ko", "CONTEXT", "FwEvent", ".HndlEvents");
-                break;
-            }
-            /* WAIT_HANDLE_COMPLT: Current handling is completed. */
-            case FWEVENT_STATE_WAIT_HANDLE_COMPLT:
-            {
-                /* If pending interrupt, read interrupt info (back to WAIT_INTR_INFO state) */
-                if (pFwEvent->bIntrPending) 
-                {
-                    CL_TRACE_START_L5();
-                    pFwEvent->bIntrPending = TI_FALSE;
-                    eStatus = fwEvent_SmReadIntrInfo (pFwEvent);
-                    pFwEvent->eSmState = FWEVENT_STATE_WAIT_INTR_INFO;
-                    CL_TRACE_END_L5("tiwlan_drv.ko", "CONTEXT", "FwEvent", ".HndlCmplt");
-                }
-                /* Else - all done so release TwIf to sleep and exit */
-                else 
-                {
-                    twIf_Sleep(pFwEvent->hTwIf);
-                    pFwEvent->eSmState = FWEVENT_STATE_IDLE;
-
-                    TRACE3(pFwEvent->hReport, REPORT_SEVERITY_INFORMATION, "fwEvent_StateMachine: Completed, NewState=%d, Status=%d, IntrPending=%d\n", pFwEvent->eSmState, eStatus, pFwEvent->bIntrPending);
-                    CL_TRACE_END_L3("tiwlan_drv.ko", "CONTEXT", "FwEvent", "");
-
-                    /**** Finished all current events handling so exit ****/
-                    return;
-                }
-                break;
-            }
-
-        }  /* switch */
-
-        TRACE3(pFwEvent->hReport, REPORT_SEVERITY_INFORMATION, "fwEvent_StateMachine: NewState=%d, Status=%d, IntrPending=%d\n", pFwEvent->eSmState, eStatus, pFwEvent->bIntrPending);
-        
-		/* If last status is Pending, exit the SM (to be called back upon Async operation completion) */
-		if (eStatus == TXN_STATUS_PENDING)
-		{
-            CL_TRACE_END_L3("tiwlan_drv.ko", "CONTEXT", "FwEvent", "");
-			return;
-		}
-
-        /* If error occured, stop the process and exit (should be cleaned by recovery process) */
-		else if (eStatus == TXN_STATUS_ERROR)
-		{
-            TRACE5(pFwEvent->hReport, REPORT_SEVERITY_ERROR, "fwEvent_StateMachine: NewState=%d, Status=%d, IntrPending=%d, EventVector=0x%x, EventMask=0x%x\n", pFwEvent->eSmState, eStatus, pFwEvent->bIntrPending, pFwEvent->uEventVector, pFwEvent->uEventMask);
-            CL_TRACE_END_L3("tiwlan_drv.ko", "CONTEXT", "FwEvent", "");
-            fwEvent_Stop ((TI_HANDLE)pFwEvent);
-			return;
-		}
-
-        /* If we got here the status is COMPLETE so continue in the while loop to the next state */
-
-	}  /* while */
-}
-
-
-/*
- * \brief	Read interrupt info from FW
- * 
- * \param   hFwEvent  - FwEvent Driver handle
- * \return  void
- * 
- * \par Description
- * 
- * Indicate the TwIf that HW is available and initiate transactions for reading
- *     the Interrupt status and the FW status.
- *
- * \sa
- */
-static ETxnStatus fwEvent_SmReadIntrInfo (TfwEvent *pFwEvent)
-{
-    ETxnStatus eStatus;
-    CL_TRACE_START_L4();
-
-#ifdef HOST_INTR_MODE_EDGE
-    /* Acknowledge the host interrupt for EDGE mode (must be before HINT_STT_CLR register clear on read) */
-    os_InterruptServiced (pFwEvent->hOs);
-#endif
-
-    /* Indicate that the chip is awake (since it interrupted us) */
-    twIf_HwAvailable(pFwEvent->hTwIf);
-
-    /*
-     * Read FW-Status structure from HW ==> Special mapping, see note!!
-     *
-     * Note: This structure actually includes two separate areas in the FW:
-     *          1) Interrupt-Status register - a 32 bit register (clear on read).
-     *          2) FW-Status structure - 64 bytes memory area
-     *       The two areas are read in a single transaction thanks to a special memory 
-     *           partition that maps them as contiguous memory.
-     */
-    TXN_FW_EVENT_SET_FW_STAT_ADDR(pFwEvent)
-    eStatus = twIf_TransactReadFWStatus (pFwEvent->hTwIf, &(pFwEvent->tFwStatusTxn.tTxnStruct));
-
-    CL_TRACE_END_L4("tiwlan_drv.ko", "CONTEXT", "FwEvent", "");
-
-    /* Return the status of the FwStatus read (complete, pending or error) */
-    return eStatus;
-}
-
-
-/*
- * \brief	Handle the Fw Status information 
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return void
- * 
- * \par Description
- * This function is called from fwEvent_Handle on a sync read, or from TwIf as a CB on an async read.
- * It calls fwEvent_CallHandlers to handle the triggered interrupts.
- * 
- * \sa fwEvent_Handle
- */
-static ETxnStatus fwEvent_SmHandleEvents (TfwEvent *pFwEvent)
-{
-    ETxnStatus eStatus;
-    CL_TRACE_START_L4();
-
-    /* Save delta between driver and FW time (needed for Tx packets lifetime) */
-    pFwEvent->uFwTimeOffset = (os_timeStampMs (pFwEvent->hOs) * 1000) - 
-                              ENDIAN_HANDLE_LONG (pFwEvent->tFwStatusTxn.tFwStatus.fwLocalTime);
-
-#ifdef HOST_INTR_MODE_LEVEL
-    /* Acknowledge the host interrupt for LEVEL mode (must be after HINT_STT_CLR register clear on read) */
-    os_InterruptServiced (pFwEvent->hOs);
-#endif
-
-    /* Save the interrupts status retreived from the FW */
-    pFwEvent->uEventVector = pFwEvent->tFwStatusTxn.tFwStatus.intrStatus;
-
-    /* Mask unwanted interrupts */
-    pFwEvent->uEventVector &= pFwEvent->uEventMask;
-
-    /* Call the interrupts handlers */
-    eStatus = fwEvent_CallHandlers (pFwEvent);
-
-    TRACE5(pFwEvent->hReport, REPORT_SEVERITY_INFORMATION, "fwEvent_SmHandleEvents: Status=%d, EventVector=0x%x, IntrPending=%d, NumPendHndlrs=%d, FwTimeOfst=%d\n", eStatus, pFwEvent->uEventVector, pFwEvent->bIntrPending, pFwEvent->uNumPendHndlrs, pFwEvent->uFwTimeOffset);
-    CL_TRACE_END_L4("tiwlan_drv.ko", "CONTEXT", "FwEvent", "");
-
-    /* Return the status of the handlers processing (complete, pending or error) */
-    return eStatus;
-} 
-
-
-/*
- * \brief	Call FwEvent clients event handlers
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return void
- * 
- * \par Description
- * 
- * \sa
- */
-static ETxnStatus fwEvent_CallHandlers (TfwEvent *pFwEvent)
-{
-    ETxnStatus eStatus;
-    CL_TRACE_START_L4();
-
-    pFwEvent->uNumPendHndlrs = 0;
-
-    if (pFwEvent->uEventVector & ACX_INTR_WATCHDOG)
-    {
-        /* Fw watchdog timeout has occured */
-        eStatus = TWD_WdExpireEvent (pFwEvent->hTWD);
-        UPDATE_PENDING_HANDLERS_NUMBER(eStatus)
-    }
-
-    if (pFwEvent->uEventVector & ACX_INTR_INIT_COMPLETE)
-    {
-        TRACE0(pFwEvent->hReport, REPORT_SEVERITY_INFORMATION, "fwEvent_CallHandlers: INIT_COMPLETE\n");
-    }
-	/* Note: Handle Cmd-MBOX before Event-MBOX to keep command response and command complete order (for WHA) */
-    if (pFwEvent->uEventVector & ACX_INTR_CMD_COMPLETE)
-    {
-        /* Command Mbox completed */
-        eStatus = cmdMbox_CommandComplete(pFwEvent->hCmdMbox);
-        UPDATE_PENDING_HANDLERS_NUMBER(eStatus)
-    }
-    if (pFwEvent->uEventVector & ACX_INTR_EVENT_A)
-    {
-        eStatus = eventMbox_Handle(pFwEvent->hEventMbox,&pFwEvent->tFwStatusTxn.tFwStatus);
-        UPDATE_PENDING_HANDLERS_NUMBER(eStatus)
-    }
-    if (pFwEvent->uEventVector & ACX_INTR_EVENT_B)
-    {
-        eStatus = eventMbox_Handle(pFwEvent->hEventMbox,&pFwEvent->tFwStatusTxn.tFwStatus);
-        UPDATE_PENDING_HANDLERS_NUMBER(eStatus)
-    }
-    
-    /* The DATA interrupt is shared by all data path events, so call all Tx and Rx clients */
-    if (pFwEvent->uEventVector & ACX_INTR_DATA)
-    {
-        eStatus = rxXfer_RxEvent (pFwEvent->hRxXfer, &pFwEvent->tFwStatusTxn.tFwStatus);
-        UPDATE_PENDING_HANDLERS_NUMBER(eStatus)
-
-        eStatus = txHwQueue_UpdateFreeResources (pFwEvent->hTxHwQueue, &pFwEvent->tFwStatusTxn.tFwStatus);
-        UPDATE_PENDING_HANDLERS_NUMBER(eStatus)
-
-        eStatus = txResult_TxCmpltIntrCb (pFwEvent->hTxResult, &pFwEvent->tFwStatusTxn.tFwStatus);
-        UPDATE_PENDING_HANDLERS_NUMBER(eStatus)
-    } 
-
-    CL_TRACE_END_L4("tiwlan_drv.ko", "CONTEXT", "FwEvent", "");
-
-    /* Return COMPLETE if all handlers completed, and PENDING if not. */
-    return ((pFwEvent->uNumPendHndlrs == 0) ? TXN_STATUS_COMPLETE : TXN_STATUS_PENDING);
-}
-
-
-/*
- * \brief	Called by any handler that completed after pending
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- *
- * \par Description
- *
- * Decrement pending handlers counter and if 0 call the SM to complete its process.
- * 
- * \sa
- */
-void fwEvent_HandlerCompleted (TI_HANDLE hFwEvent)
-{
-    TfwEvent *pFwEvent = (TfwEvent *)hFwEvent;
-
-#ifdef TI_DBG
-    TRACE2(pFwEvent->hReport, REPORT_SEVERITY_INFORMATION, "fwEvent_HandlerCompleted: state=%d, NumPendHndlrs=%d\n", pFwEvent->eSmState, pFwEvent->uNumPendHndlrs);
-    /* Verify that we really have pending handlers, otherwise it an error */
-    if (pFwEvent->uNumPendHndlrs == 0) 
-    {
-        TRACE0(pFwEvent->hReport, REPORT_SEVERITY_ERROR, "fwEvent_HandlerCompleted: Called while no handlers are pending\n");
-        return;
-    }
-    /* Verify that we are in */
-    if (pFwEvent->eSmState != FWEVENT_STATE_WAIT_HANDLE_COMPLT) 
-    {
-        TRACE1(pFwEvent->hReport, REPORT_SEVERITY_ERROR, "fwEvent_HandlerCompleted: Called while not in WAIT_HANDLE_COMPLT state (state=%d)\n", pFwEvent->eSmState);
-        return;
-    }
-#endif
-
-    /* Decrement the pending handlers counter and if zero call the SM to complete the process */
-    pFwEvent->uNumPendHndlrs--;
-    if (pFwEvent->uNumPendHndlrs == 0) 
-    {
-        fwEvent_StateMachine (pFwEvent);
-    }
-}
-
-
-/*
- * \brief	Translate host to FW time (Usec)
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \param  uHostTime - The host time in MS to translate
- *
- * \return FW Time in Usec
- * 
- * \par Description
- * 
- * \sa
- */
-TI_UINT32 fwEvent_TranslateToFwTime (TI_HANDLE hFwEvent, TI_UINT32 uHostTime)
-{
-    TfwEvent *pFwEvent = (TfwEvent *)hFwEvent;
-
-    return ((uHostTime * 1000) - pFwEvent->uFwTimeOffset);
-}
-
-
-/*
- * \brief	Unmask only cmd-cmplt and events interrupts (needed for init phase)
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return Event mask
- * 
- * \par Description
- * Unmask only cmd-cmplt and events interrupts (needed for init phase).
- * 
- * \sa
- */
-void fwEvent_SetInitMask (TI_HANDLE hFwEvent)
-{
-    TfwEvent *pFwEvent = (TfwEvent *)hFwEvent;
-
-    /* Unmask only the interrupts needed for the FW configuration process. */
-    pFwEvent->uEventMask = ACX_INTR_CMD_COMPLETE | ACX_INTR_EVENT_A | ACX_INTR_EVENT_B;
-    pFwEvent->tMaskTxn.uData = ~pFwEvent->uEventMask;
-    TXN_FW_EVENT_SET_MASK_ADDR(pFwEvent)
-    twIf_Transact(pFwEvent->hTwIf, &(pFwEvent->tMaskTxn.tTxnStruct));
-}
-
-
-/*
- * \brief	Stop & reset FwEvent (called by the driver stop process)
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return TI_OK
- * 
- * \par Description
- *
- * \sa
- */
-TI_STATUS fwEvent_Stop (TI_HANDLE hFwEvent)
-{
-    TfwEvent *pFwEvent = (TfwEvent *)hFwEvent;
-
-    pFwEvent->eSmState       = FWEVENT_STATE_IDLE;
-    pFwEvent->bIntrPending  = TI_FALSE;
-    pFwEvent->uNumPendHndlrs = 0;
-    pFwEvent->uEventMask     = 0;
-    pFwEvent->uEventVector   = 0;    
-    
-    return TI_OK;
-}
-
-
-/*
- * \brief	Unmask all interrupts
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return void
- * 
- * \par Description
- *
- * Called after driver Start or Recovery process are completed.
- * Unmask all interrupts.
- * 
- * \sa
- */
-void fwEvent_EnableExternalEvents (TI_HANDLE hFwEvent)
-{
-    TfwEvent *pFwEvent = (TfwEvent *)hFwEvent;
-
-    /* Unmask all interrupts */
-    pFwEvent->uEventMask = ALL_EVENTS_VECTOR;
-    pFwEvent->tMaskTxn.uData = ~pFwEvent->uEventMask;
-    TXN_FW_EVENT_SET_MASK_ADDR(pFwEvent)
-    twIf_Transact(pFwEvent->hTwIf, &(pFwEvent->tMaskTxn.tTxnStruct));
-}
-
-
-/*
- * \brief	Disable the FwEvent client in the context handler
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return void
- * 
- * \par Description
- *
- * \sa
- */
-void fwEvent_DisableInterrupts(TI_HANDLE hFwEvent)
-{
-    TfwEvent  *pFwEvent = (TfwEvent *)hFwEvent;
-
-    context_DisableClient (pFwEvent->hContext,pFwEvent->uContextId);
-}
-
-
-/*
- * \brief	Enable the FwEvent client in the context handler
- * 
- * \param  hFwEvent  - FwEvent Driver handle
- * \return void
- * 
- * \par Description
- *
- * \sa
- */
-void fwEvent_EnableInterrupts(TI_HANDLE hFwEvent)
-{
-    TfwEvent  *pFwEvent = (TfwEvent *)hFwEvent;
-
-    context_EnableClient (pFwEvent->hContext,pFwEvent->uContextId);
-}
-
-
-#ifdef TI_DBG
-
-void fwEvent_PrintStat (TI_HANDLE hFwEvent)
-{
-#ifdef REPORT_LOG
-    TfwEvent *pFwEvent = (TfwEvent *)hFwEvent;
-
-    WLAN_OS_REPORT(("Print FW event module info\n"));
-    WLAN_OS_REPORT(("==========================\n"));
-    WLAN_OS_REPORT(("uEventVector   = 0x%x\n", pFwEvent->uEventVector));
-    WLAN_OS_REPORT(("uEventMask     = 0x%x\n", pFwEvent->uEventMask));
-    WLAN_OS_REPORT(("eSmState       = %d\n",   pFwEvent->eSmState));
-    WLAN_OS_REPORT(("bIntrPending   = %d\n",   pFwEvent->bIntrPending));
-    WLAN_OS_REPORT(("uNumPendHndlrs = %d\n",   pFwEvent->uNumPendHndlrs));
-    WLAN_OS_REPORT(("uFwTimeOffset  = %d\n",   pFwEvent->uFwTimeOffset));
-#endif
-}
-
-#endif  /* TI_DBG */
-
-
-
diff --git a/wl1271/TWD/FW_Transfer/HwInit.c b/wl1271/TWD/FW_Transfer/HwInit.c
deleted file mode 100644
index addca88..0000000
--- a/wl1271/TWD/FW_Transfer/HwInit.c
+++ /dev/null
@@ -1,2360 +0,0 @@
-/*
- * HwInit.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-/*******************************************************************************/
-/*                                                                             */
-/*  MODULE:  HwInit.c                                                          */
-/*  PURPOSE: HwInit module manages the init process of the TNETW, included     */
-/*           firmware download process. It shall perform Hard Reset the chip   */
-/*           if possible (this will require a Reset line to be connected to    */
-/*           the host); Start InterfaceCtrl; Download NVS and FW               */
-/*                                                                             */
-/*                                                                             */
-/*******************************************************************************/
-
-#define __FILE_ID__  FILE_ID_105
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "timer.h"
-#include "HwInit_api.h"
-#include "FwEvent_api.h"
-#include "TwIf.h"
-#include "TWDriver.h"
-#include "TWDriverInternal.h"
-#include "eventMbox_api.h"
-#include "CmdBld.h"
-#include "CmdMBox_api.h"
-#ifdef TI_RANDOM_DEFAULT_MAC
-#include <linux/random.h>
-#include <linux/jiffies.h>
-#endif
-
-
-extern void TWD_FinalizeOnFailure   (TI_HANDLE hTWD);
-extern void cmdBld_FinalizeDownload (TI_HANDLE hCmdBld, TBootAttr *pBootAttr, FwStaticData_t *pFwInfo);
-
-
-/************************************************************************
- * Defines
- ************************************************************************/
-
-/* Download phase partition */
-#define PARTITION_DOWN_MEM_ADDR       0                 
-#define PARTITION_DOWN_MEM_SIZE       0x177C0           
-#define PARTITION_DOWN_REG_ADDR       REGISTERS_BASE	
-#define PARTITION_DOWN_REG_SIZE       0x8800            
-
-/* Working phase partition */
-#define PARTITION_WORK_MEM_ADDR1       0x40000
-#define PARTITION_WORK_MEM_SIZE1       0x14FC0
-#define PARTITION_WORK_MEM_ADDR2       REGISTERS_BASE
-#define PARTITION_WORK_MEM_SIZE2       0xA000
-#define PARTITION_WORK_MEM_ADDR3       0x3004F8
-#define PARTITION_WORK_MEM_SIZE3       0x4
-#define PARTITION_WORK_MEM_ADDR4       0x40404
-
-/* DRPW setting partition */
-#define PARTITION_DRPW_MEM_ADDR       0x40000
-#define PARTITION_DRPW_MEM_SIZE       0x14FC0
-#define PARTITION_DRPW_REG_ADDR       DRPW_BASE         
-#define PARTITION_DRPW_REG_SIZE       0x6000	        
-
-/* Total range of bus addresses range */
-#define PARTITION_TOTAL_ADDR_RANGE    0x1FFC0
-
-/* Maximal block size in a single SDIO transfer --> Firmware image load chunk size */
-#ifdef _VLCT_
-#define MAX_SDIO_BLOCK					(4000)
-#else
-#define MAX_SDIO_BLOCK					(500)
-#endif
-
-#define ACX_EEPROMLESS_IND_REG        (SCR_PAD4)
-#define USE_EEPROM                    (0)
-#define SOFT_RESET_MAX_TIME           (1000000)
-#define SOFT_RESET_STALL_TIME         (1000)
-#define NVS_DATA_BUNDARY_ALIGNMENT    (4)
-
-#define MAX_HW_INIT_CONSECUTIVE_TXN     15
-
-#define WORD_SIZE                       4
-#define WORD_ALIGNMENT_MASK             0x3
-#define DEF_NVS_SIZE                    ((NVS_PRE_PARAMETERS_LENGTH) + (NVS_TX_TYPE_INDEX) + 4)
-
-#define RADIO_SM_WAIT_LOOP  32
-
-#define FREF_CLK_FREQ_MASK      0x7
-#define FREF_CLK_TYPE_MASK      BIT_3
-#define FREF_CLK_POLARITY_MASK  BIT_4
-
-#define FREF_CLK_TYPE_BITS      0xfffffe7f
-#define CLK_REQ_PRCM            0x100
-
-#define FREF_CLK_POLARITY_BITS  0xfffff8ff
-#define CLK_REQ_OUTN_SEL        0x700
-
-#define DRPw_MASK_CHECK  0xc0
-#define DRPw_MASK_SET    0x2000000
-
-/* time to wait till we check if fw is running */
-#define STALL_TIMEOUT   7
-
-#ifdef DOWNLOAD_TIMER_REQUIERD
-#define FIN_LOOP 10
-#endif
-
-
-#ifdef _VLCT_
-#define FIN_LOOP 10
-#else
-#define FIN_LOOP 20000
-#endif
-
-
-/************************************************************************
- * Macros
- ************************************************************************/
-
-#define SET_DEF_NVS(aNVS)     aNVS[0]=0x01; aNVS[1]=0x6d; aNVS[2]=0x54; aNVS[3]=0x56; aNVS[4]=0x34; \
-                              aNVS[5]=0x12; aNVS[6]=0x28; aNVS[7]=0x01; aNVS[8]=0x71; aNVS[9]=0x54; \
-                              aNVS[10]=0x00; aNVS[11]=0x08; aNVS[12]=0x00; aNVS[13]=0x00; aNVS[14]=0x00; \
-                              aNVS[15]=0x00; aNVS[16]=0x00; aNVS[17]=0x00; aNVS[18]=0x00; aNVS[19]=0x00; \
-                              aNVS[20]=0x00; aNVS[21]=0x00; aNVS[22]=0x00; aNVS[23]=0x00; aNVS[24]=eNVS_NON_FILE;\
-							  aNVS[25]=0x00; aNVS[26]=0x00; aNVS[27]=0x00;
-
-
-#define SET_PARTITION(pPartition,uAddr1,uMemSize1,uAddr2,uMemSize2,uAddr3,uMemSize3,uAddr4) \
-                    ((TPartition*)pPartition)[0].uMemAdrr = uAddr1; \
-                    ((TPartition*)pPartition)[0].uMemSize = uMemSize1; \
-                    ((TPartition*)pPartition)[1].uMemAdrr = uAddr2; \
-                    ((TPartition*)pPartition)[1].uMemSize = uMemSize2; \
-                    ((TPartition*)pPartition)[2].uMemAdrr = uAddr3; \
-                    ((TPartition*)pPartition)[2].uMemSize = uMemSize3; \
-                    ((TPartition*)pPartition)[3].uMemAdrr = uAddr4;
-
-#define HW_INIT_PTXN_SET(pHwInit, pTxn)  pTxn = (TTxnStruct*)&(pHwInit->aHwInitTxn[pHwInit->uTxnIndex].tTxnStruct);
-
-#define BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, uAddr, uVal, uSize, direction, fCB, hCB)     \
-                              HW_INIT_PTXN_SET(pHwInit, pTxn) \
-                              TXN_PARAM_SET_DIRECTION(pTxn, direction); \
-                              pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData = (TI_UINT32)uVal; \
-                              BUILD_TTxnStruct(pTxn, uAddr, &(pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData), uSize, fCB, hCB)
-
-#define BUILD_HW_INIT_FW_STATIC_TXN(pHwInit, pTxn, uAddr, fCB, hCB)     \
-                              HW_INIT_PTXN_SET(pHwInit, pTxn) \
-                              TXN_PARAM_SET_DIRECTION(pTxn, TXN_DIRECTION_READ); \
-                              BUILD_TTxnStruct(pTxn, uAddr, &(pHwInit->tFwStaticTxn.tFwStaticInfo), sizeof(FwStaticData_t), fCB, hCB)
-
-#define BUILD_HW_INIT_FW_DL_TXN(pHwInit, pTxn, uAddr, uVal, uSize, direction, fCB, hCB)     \
-                              HW_INIT_PTXN_SET(pHwInit, pTxn) \
-                              TXN_PARAM_SET_DIRECTION(pTxn, direction); \
-                              BUILD_TTxnStruct(pTxn, uAddr, uVal, uSize, fCB, hCB)
-
-
-#define SET_DRP_PARTITION(pPartition)\
-                        SET_PARTITION(pPartition, PARTITION_DRPW_MEM_ADDR, PARTITION_DRPW_MEM_SIZE, PARTITION_DRPW_REG_ADDR, PARTITION_DRPW_REG_SIZE, 0, 0, 0)
-
-#define SET_FW_LOAD_PARTITION(pPartition,uFwAddress)\
-                            SET_PARTITION(pPartition,uFwAddress,PARTITION_DOWN_MEM_SIZE, PARTITION_DOWN_REG_ADDR, PARTITION_DOWN_REG_SIZE,0,0,0)
-
-#define SET_WORK_PARTITION(pPartition)\
-                        SET_PARTITION(pPartition,PARTITION_WORK_MEM_ADDR1, PARTITION_WORK_MEM_SIZE1, PARTITION_WORK_MEM_ADDR2, PARTITION_WORK_MEM_SIZE2, PARTITION_WORK_MEM_ADDR3, PARTITION_WORK_MEM_SIZE3, PARTITION_WORK_MEM_ADDR4)
-
-/* Handle return status inside a state machine */
-#define EXCEPT(phwinit,status)                                   \
-    switch (status) {                                           \
-        case TI_OK:                                             \
-        case TXN_STATUS_OK:                                     \
-        case TXN_STATUS_COMPLETE:                               \
-             break;                                             \
-        case TXN_STATUS_PENDING:                                \
-             return TXN_STATUS_PENDING;                         \
-        default:                                                \
-             TWD_FinalizeOnFailure (phwinit->hTWD);             \
-             return TXN_STATUS_ERROR;                           \
-    }
-
-
-/* Handle return status inside an init sequence state machine  */
-#define EXCEPT_I(phwinit,status)                                \
-    switch (status) {                                           \
-        case TI_OK:                                             \
-        case TXN_STATUS_COMPLETE:                               \
-             break;                                             \
-        case TXN_STATUS_PENDING:                                \
-             phwinit->uInitSeqStatus = status;                  \
-             return TXN_STATUS_PENDING;                         \
-        default:                                                \
-             TWD_FinalizeOnFailure (phwinit->hTWD);             \
-             return TXN_STATUS_ERROR;                           \
-    }
-
-
-/* Handle return status inside a load image state machine */
-#define EXCEPT_L(phwinit,status)                                \
-    switch (status) {                                           \
-        case TXN_STATUS_OK:                                     \
-        case TXN_STATUS_COMPLETE:                               \
-             break;                                             \
-        case TXN_STATUS_PENDING:                                \
-             phwinit->DownloadStatus = status;                  \
-             return TXN_STATUS_PENDING;                         \
-        default:                                                \
-             phwinit->DownloadStatus = status;                  \
-             TWD_FinalizeOnFailure (phwinit->hTWD);             \
-             return TXN_STATUS_ERROR;                           \
-    }
-
-
-/************************************************************************
- * Types
- ************************************************************************/
-
-enum
-{
-    REF_FREQ_19_2                   = 0,
-    REF_FREQ_26_0                   = 1,
-    REF_FREQ_38_4                   = 2,
-    REF_FREQ_40_0                   = 3,
-    REF_FREQ_33_6                   = 4,
-    REF_FREQ_NUM                    = 5
-};
-
-enum
-{
-    LUT_PARAM_INTEGER_DIVIDER       = 0,
-    LUT_PARAM_FRACTIONAL_DIVIDER    = 1,
-    LUT_PARAM_ATTN_BB               = 2,
-    LUT_PARAM_ALPHA_BB              = 3,
-    LUT_PARAM_STOP_TIME_BB          = 4,
-    LUT_PARAM_BB_PLL_LOOP_FILTER    = 5,
-    LUT_PARAM_NUM                   = 6
-};
-
-typedef struct 
-{
-    TTxnStruct              tTxnStruct;
-    TI_UINT32               uData; 
-
-} THwInitTxn;
-
-typedef struct 
-{
-    TTxnStruct              tTxnStruct;
-    FwStaticData_t          tFwStaticInfo; 
-
-} TFwStaticTxn;
-
-
-/* The HW Init module object */
-typedef struct 
-{
-    /* Handles */
-    TI_HANDLE               hOs;
-    TI_HANDLE               hReport;
-    TI_HANDLE               hTWD;
-    TI_HANDLE               hBusTxn;
-    TI_HANDLE               hTwIf;
-
-    TI_HANDLE 		    hFileInfo;	/* holds parameters of FW Image Portion - for DW Download */
-    TEndOfHwInitCb          fInitHwCb;
-
-    /* Firmware image ptr */
-    TI_UINT8               *pFwBuf;       
-    /* Firmware image length */
-    TI_UINT32               uFwLength;
-    TI_UINT32               uFwAddress;
-    TI_UINT32               bFwBufLast;  
-    TI_UINT32               uFwLastAddr;  
-    /* EEPROM image ptr */
-    TI_UINT8               *pEEPROMBuf;   
-    /* EEPROM image length */
-    TI_UINT32               uEEPROMLen;   
-
-    TI_UINT8               *pEEPROMCurPtr;
-    TI_UINT32               uEEPROMCurLen;
-    TBootAttr               tBootAttr;
-    TI_HANDLE               hHwCtrl;
-    ETxnStatus              DownloadStatus;
-    /* Upper module callback for the init stage */
-    fnotify_t               fCb;          
-    /* Upper module handle for the init stage */
-    TI_HANDLE               hCb;          
-    /* Init stage */
-    TI_UINT32               uInitStage;   
-    /* Reset statge */ 
-    TI_UINT32               uResetStage;  
-    /* EEPROM burst stage */
-    TI_UINT32               uEEPROMStage; 
-    /* Init state machine temporary data */
-    TI_UINT32               uInitData;    
-    /* ELP command image */
-    TI_UINT32               uElpCmd;      
-    /* Chip ID */
-    TI_UINT32               uChipId;      
-    /* Boot state machine temporary data */
-    TI_UINT32               uBootData;    
-    TI_UINT32               uSelfClearTime;
-    TI_UINT8                uEEPROMBurstLen;
-    TI_UINT8                uEEPROMBurstLoop;
-    TI_UINT32               uEEPROMRegAddr;
-    TI_STATUS               uEEPROMStatus;
-    TI_UINT32               uNVSStartAddr;
-    TI_UINT32               uNVSNumChar;
-    TI_UINT32               uNVSNumByte;
-    TI_STATUS               uNVSStatus;
-    TI_UINT32               uScrPad6;
-    TI_UINT32               uRefFreq; 
-    TI_UINT32               uInitSeqStage;
-    TI_STATUS               uInitSeqStatus;
-    TI_UINT32               uLoadStage;
-    TI_UINT32               uBlockReadNum;
-    TI_UINT32               uBlockWriteNum;
-    TI_UINT32               uPartitionLimit;
-    TI_UINT32               uFinStage;
-    TI_UINT32               uFinData;
-    TI_UINT32               uFinLoop; 
-     TI_UINT32               uRegStage;
-    TI_UINT32               uRegLoop;
-    TI_UINT32               uRegSeqStage;
-    TI_UINT32               uRegData;
-	TI_HANDLE               hStallTimer;
-
-    /* Top register Read/Write SM temporary data*/
-    TI_UINT32               uTopRegAddr;
-    TI_UINT32               uTopRegValue;
-    TI_UINT32               uTopRegMask;
-    TI_UINT32               uTopRegUpdateValue;
-    TI_UINT32               uTopStage;
-    TI_STATUS               uTopStatus;
-
-    TI_UINT8                auFwTmpBuf [WSPI_PAD_LEN_WRITE + MAX_SDIO_BLOCK];
-
-    TFinalizeCb             fFinalizeDownload;
-    TI_HANDLE               hFinalizeDownload;
-    /* Size of the Fw image, retrieved from the image itself */         
-    TI_UINT32               uFwDataLen; 
-    TI_UINT8                aDefaultNVS[DEF_NVS_SIZE];
-    TI_UINT8                uTxnIndex;
-    THwInitTxn              aHwInitTxn[MAX_HW_INIT_CONSECUTIVE_TXN];
-    TFwStaticTxn            tFwStaticTxn;
-
-    TI_UINT32               uSavedDataForWspiHdr;  /* For saving the 4 bytes before the NVS data for WSPI case 
-                                                        where they are overrun by the WSPI BusDrv */
-    TPartition              aPartition[NUM_OF_PARTITION];
-} THwInit;
-
-
-/************************************************************************
- * Local Functions Prototypes
- ************************************************************************/
-static void      hwInit_SetPartition                (THwInit   *pHwInit, 
-                                                     TPartition *pPartition);
-static TI_STATUS hwInit_BootSm                      (TI_HANDLE hHwInit);
-static TI_STATUS hwInit_ResetSm                     (TI_HANDLE hHwInit);
-static TI_STATUS hwInit_EepromlessStartBurstSm      (TI_HANDLE hHwInit);                                                   
-static TI_STATUS hwInit_LoadFwImageSm               (TI_HANDLE hHwInit);
-static TI_STATUS hwInit_FinalizeDownloadSm          (TI_HANDLE hHwInit);                                             
-static TI_STATUS hwInit_TopRegisterRead(TI_HANDLE hHwInit);
-static TI_STATUS hwInit_InitTopRegisterRead(TI_HANDLE hHwInit, TI_UINT32 uAddress);
-static TI_STATUS hwInit_TopRegisterWrite(TI_HANDLE hHwInit);
-static TI_STATUS hwInit_InitTopRegisterWrite(TI_HANDLE hHwInit, TI_UINT32 uAddress, TI_UINT32 uValue);
-#ifdef DOWNLOAD_TIMER_REQUIERD
-static void      hwInit_StallTimerCb                (TI_HANDLE hHwInit, TI_BOOL bTwdInitOccured);
-#endif
-
-
-/*******************************************************************************
-*                       PUBLIC  FUNCTIONS  IMPLEMENTATION                      *
-********************************************************************************/
-
-
-/*************************************************************************
-*                        hwInit_Create                                   *
-**************************************************************************
-* DESCRIPTION:  This function initializes the HwInit module.
-*
-* INPUT:        hOs - handle to Os Abstraction Layer
-*               
-* RETURN:       Handle to the allocated HwInit module
-*************************************************************************/
-TI_HANDLE hwInit_Create (TI_HANDLE hOs)
-{
-    THwInit *pHwInit;
-
-    /* Allocate HwInit module */
-    pHwInit = os_memoryAlloc (hOs, sizeof(THwInit));
-
-    if (pHwInit == NULL)
-    {
-        WLAN_OS_REPORT(("Error allocating the HwInit Module\n"));
-        return NULL;
-    }
-
-    /* Reset HwInit module */
-    os_memoryZero (hOs, pHwInit, sizeof(THwInit));
-
-    pHwInit->hOs = hOs;
-
-    return (TI_HANDLE)pHwInit;
-}
-
-
-/***************************************************************************
-*                           hwInit_Destroy                                 *
-****************************************************************************
-* DESCRIPTION:  This function unload the HwInit module. 
-*
-* INPUTS:       hHwInit - the object
-*
-* OUTPUT:
-*
-* RETURNS:      TI_OK - Unload succesfull
-*               TI_NOK - Unload unsuccesfull
-***************************************************************************/
-TI_STATUS hwInit_Destroy (TI_HANDLE hHwInit)
-{
-    THwInit *pHwInit = (THwInit *)hHwInit;
-
-    if (pHwInit->hStallTimer)
-    {
-#ifdef DOWNLOAD_TIMER_REQUIERD
-		tmr_DestroyTimer (pHwInit->hStallTimer);
-#endif
-    }        
-
-    /* Free HwInit Module */
-    os_memoryFree (pHwInit->hOs, pHwInit, sizeof(THwInit));
-
-    return TI_OK;
-}
-
-
-/***************************************************************************
-*                           hwInit_Init                                    *
-****************************************************************************
-* DESCRIPTION:  This function configures the hwInit module
-*
-* RETURNS:      TI_OK - Configuration successful
-*               TI_NOK - Configuration unsuccessful
-***************************************************************************/
-TI_STATUS hwInit_Init (TI_HANDLE      hHwInit,
-                       TI_HANDLE      hReport,
-                       TI_HANDLE      hTimer,
-                       TI_HANDLE      hTWD,
-                       TI_HANDLE 	  hFinalizeDownload, 
-                       TFinalizeCb    fFinalizeDownload, 
-                       TEndOfHwInitCb fInitHwCb)
-{
-    THwInit   *pHwInit = (THwInit *)hHwInit;
-    TTxnStruct* pTxn;
-#ifdef TI_RANDOM_DEFAULT_MAC
-    u32 rand_mac;
-#endif
-
-    /* Configure modules handles */
-    pHwInit->hReport    = hReport;
-    pHwInit->hTWD       = hTWD;
-    pHwInit->hTwIf      = ((TTwd *)hTWD)->hTwIf;
-    pHwInit->hOs        = ((TTwd *)hTWD)->hOs;
-    pHwInit->fInitHwCb  = fInitHwCb;
-    pHwInit->fFinalizeDownload 	= fFinalizeDownload;
-    pHwInit->hFinalizeDownload 	= hFinalizeDownload;
-
-    SET_DEF_NVS(pHwInit->aDefaultNVS)
-#ifdef TI_RANDOM_DEFAULT_MAC
-    /* Create random MAC address: offset 3, 4 and 5 */
-    srandom32((u32)jiffies);
-    rand_mac = random32();
-    pHwInit->aDefaultNVS[3] = (u8)rand_mac;
-    pHwInit->aDefaultNVS[4] = (u8)(rand_mac >> 8);
-    pHwInit->aDefaultNVS[5] = (u8)(rand_mac >> 16);
-#endif
-
-    for (pHwInit->uTxnIndex=0;pHwInit->uTxnIndex<MAX_HW_INIT_CONSECUTIVE_TXN;pHwInit->uTxnIndex++)
-    {
-        HW_INIT_PTXN_SET(pHwInit, pTxn)
-        /* Setting write as default transaction */
-        TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-    }
-
-#ifdef DOWNLOAD_TIMER_REQUIERD
-	pHwInit->hStallTimer = tmr_CreateTimer (hTimer);
-	if (pHwInit->hStallTimer == NULL) 
-	{
-		return TI_NOK;
-	}
-#endif
-
-    TRACE0(pHwInit->hReport, REPORT_SEVERITY_INIT, ".....HwInit configured successfully\n");
-    
-    return TI_OK;
-}
-
-
-TI_STATUS hwInit_SetNvsImage (TI_HANDLE hHwInit, TI_UINT8 *pbuf, TI_UINT32 length)
-{
-    THwInit   *pHwInit = (THwInit *)hHwInit;
-
-    pHwInit->pEEPROMBuf = pbuf;
-    pHwInit->uEEPROMLen = length; 
-
-    return TI_OK;
-}
-
-
-TI_STATUS hwInit_SetFwImage (TI_HANDLE hHwInit, TFileInfo *pFileInfo)
-{
-    THwInit   *pHwInit = (THwInit *)hHwInit;
-
-    if ((hHwInit == NULL) || (pFileInfo == NULL))
-    {
-	return TI_NOK;
-    }
-
-    pHwInit->pFwBuf 	= pFileInfo->pBuffer;
-    pHwInit->uFwLength  = pFileInfo->uLength;
-    pHwInit->uFwAddress = pFileInfo->uAddress;
-    pHwInit->bFwBufLast = pFileInfo->bLast;
-
-    return TI_OK;
-}
-
-
-/** 
- * \fn     hwInit_SetPartition
- * \brief  Set HW addresses partition
- * 
- * Set the HW address ranges for download or working memory and registers access.
- * Generate and configure the bus access address mapping table.
- * The partition is split between register (fixed partition of 24KB size, exists in all modes), 
- *     and memory (dynamically changed during init and gets constant value in run-time, 104KB size).
- * The TwIf configures the memory mapping table on the device by issuing write transaction to 
- *     table address (note that the TxnQ and bus driver see this as a regular transaction). 
- * 
- * \note In future versions, a specific bus may not support partitioning (as in wUART), 
- *       In this case the HwInit module shall not call this function (will learn the bus 
- *       configuration from the INI file).
- *
- * \param  pHwInit   - The module's object
- * \param  pPartition  - all partition base address
- * \return void
- * \sa     
- */ 
-static void hwInit_SetPartition (THwInit   *pHwInit, 
-                                 TPartition *pPartition)
-{
-   TRACE7(pHwInit->hReport, REPORT_SEVERITY_INFORMATION, "hwInit_SetPartition: uMemAddr1=0x%x, MemSize1=0x%x uMemAddr2=0x%x, MemSize2=0x%x, uMemAddr3=0x%x, MemSize3=0x%x, uMemAddr4=0x%x, MemSize4=0x%x\n",pPartition[0].uMemAdrr, pPartition[0].uMemSize,pPartition[1].uMemAdrr, pPartition[1].uMemSize,pPartition[2].uMemAdrr, pPartition[2].uMemSize,pPartition[3].uMemAdrr );
-
-    /* Prepare partition Txn data and send to HW */
-    twIf_SetPartition (pHwInit->hTwIf,pPartition);
-}
-
-
-/****************************************************************************
- *                      hwInit_Boot()
- ****************************************************************************
- * DESCRIPTION: Start HW init sequence which writes and reads some HW registers
- *                  that are needed prior to FW download.
- * 
- * INPUTS:  None    
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS hwInit_Boot (TI_HANDLE hHwInit)
-{ 
-    THwInit      *pHwInit = (THwInit *)hHwInit;
-    TTwd         *pTWD = (TTwd *)pHwInit->hTWD;
-    TWlanParams  *pWlanParams = &DB_WLAN(pTWD->hCmdBld);
-    TBootAttr     tBootAttr;
-
-    tBootAttr.MacClock = pWlanParams->MacClock;
-    tBootAttr.ArmClock = pWlanParams->ArmClock;
-
-    /*
-     * Initialize the status of download to  pending 
-     * It will be set to TXN_STATUS_COMPLETE at the FinalizeDownload function 
-     */
-    pHwInit->DownloadStatus = TXN_STATUS_PENDING;
-
-    /* Call the boot sequence state machine */
-    pHwInit->uInitStage = 0;
-
-    os_memoryCopy (pHwInit->hOs, &pHwInit->tBootAttr, &tBootAttr, sizeof(TBootAttr));
-
-    hwInit_BootSm (hHwInit);
-
-    /*
-     * If it returns the status of the StartInstance only then we can here query for the download status 
-     * and then return the status up to the TNETW_Driver.
-     * This return value will go back up to the TNETW Driver layer so that the init from OS will know
-     * if to wait for the InitComplte or not in case of TXN_STATUS_ERROR.
-     * This value will always be pending since the SPI is ASYNC 
-     * and in SDIOa timer is set so it will be ASync also in anyway.
-     */
-    return pHwInit->DownloadStatus;
-}
-
-
- /****************************************************************************
- * DESCRIPTION: Firmware boot state machine
- * 
- * INPUTS:  
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK 
- ****************************************************************************/
-static TI_STATUS hwInit_BootSm (TI_HANDLE hHwInit)
-{
-    THwInit    *pHwInit = (THwInit *)hHwInit;
-    TI_STATUS   status = 0;
-    TTxnStruct  *pTxn;
-    TI_UINT32   uData;
-    TTwd        *pTWD        = (TTwd *) pHwInit->hTWD;
-    IniFileGeneralParam  *pGenParams = &DB_GEN(pTWD->hCmdBld);
-    TI_UINT32   clkVal = 0x3;
-
-    switch (pHwInit->uInitStage)
-    {
-    case 0:
-        pHwInit->uInitStage++;
-        pHwInit->uTxnIndex = 0;
-
-        /* Set the bus addresses partition to its "running" mode */
-        SET_WORK_PARTITION(pHwInit->aPartition)
-        hwInit_SetPartition (pHwInit,pHwInit->aPartition);
-
-#ifdef _VLCT_
-         /* Set FW to test mode */    
-         BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, SCR_PAD8, 0xBABABABE, 
-                                REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-         twIf_Transact(pHwInit->hTwIf, pTxn);
-         pHwInit->uTxnIndex++;
-#endif
-
-        if (( 0 == (pGenParams->RefClk & FREF_CLK_FREQ_MASK)) || (2 == (pGenParams->RefClk & FREF_CLK_FREQ_MASK))
-             || (4 == (pGenParams->RefClk & FREF_CLK_FREQ_MASK)))
-        {/* ref clk: 19.2/38.4/38.4-XTAL */
-            clkVal = 0x3;
-        }
-        if ((1 == (pGenParams->RefClk & FREF_CLK_FREQ_MASK)) || (3 == (pGenParams->RefClk & FREF_CLK_FREQ_MASK)))
-        {/* ref clk: 26/52 */
-            clkVal = 0x5;
-        }
-
-        WLAN_OS_REPORT(("CHIP VERSION... set 1273 chip top registers\n"));
-
-        /* set the reference clock freq' to be used (pll_selinpfref field) */        
-        BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, PLL_PARAMETERS, clkVal,
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-        twIf_Transact(pHwInit->hTwIf, pTxn);
-
-        pHwInit->uTxnIndex++;
-
-        /* read the PAUSE value to highest threshold */        
-        BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, PLL_PARAMETERS, 0, 
-                               REGISTER_SIZE, TXN_DIRECTION_READ, (TTxnDoneCb)hwInit_BootSm, hHwInit)
-        status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-        EXCEPT (pHwInit, status)
-
-    case 1:
-        pHwInit->uInitStage ++;
-        /* We don't zero pHwInit->uTxnIndex at the begining because we need it's value to the next transaction */
-        uData = pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData;
-        uData &= ~(0x3ff);
-
-        /* Now we can zero the index */
-        pHwInit->uTxnIndex = 0;
-
-        /* set the the PAUSE value to highest threshold */        
-        uData |= WU_COUNTER_PAUSE_VAL;
-        BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, WU_COUNTER_PAUSE, uData, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-        twIf_Transact(pHwInit->hTwIf, pTxn);
-
-        pHwInit->uTxnIndex++;
-
-        /* Continue the ELP wake up sequence */
-        BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, WELP_ARM_COMMAND, WELP_ARM_COMMAND_VAL, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-        twIf_Transact(pHwInit->hTwIf, pTxn);
-
-        /* Wait 500uS */
-        os_StalluSec (pHwInit->hOs, 500);
-
-        /* Set the bus addresses partition to DRPw registers region */
-        SET_DRP_PARTITION(pHwInit->aPartition)
-        hwInit_SetPartition (pHwInit,pHwInit->aPartition);
-
-        pHwInit->uTxnIndex++;
-
-        /* Read-modify-write DRPW_SCRATCH_START register (see next state) to be used by DRPw FW. 
-           The RTRIM value will be added  by the FW before taking DRPw out of reset */
-        BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, DRPW_SCRATCH_START, 0, 
-                               REGISTER_SIZE, TXN_DIRECTION_READ,(TTxnDoneCb)hwInit_BootSm, hHwInit)
-        status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-        EXCEPT (pHwInit, status)
-
-    case 2:
-        pHwInit->uInitStage ++;
-
-        /* multiply fref value by 2, so that {0,1,2,3} values will become {0,2,4,6} */
-        /* Then, move it 4 places to the right, to alter Fref relevant bits in register 0x2c */
-        clkVal = pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData;
-        pHwInit->uTxnIndex = 0; /* Reset index only after getting the last read value! */
-        clkVal |= ((pGenParams->RefClk & 0x3)<< 1) << 4;
-        if ((pGenParams->GeneralSettings & DRPw_MASK_CHECK) > 0)
-        {
-            clkVal |= DRPw_MASK_SET;
-        }
-        BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, DRPW_SCRATCH_START, clkVal, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-        twIf_Transact(pHwInit->hTwIf, pTxn);
-
-        pHwInit->uTxnIndex++;
-
-
-        /* Set the bus addresses partition back to its "running" mode */
-        SET_WORK_PARTITION(pHwInit->aPartition)
-        hwInit_SetPartition (pHwInit,pHwInit->aPartition);
-
-        /* 
-         * end of CHIP init seq.
-         */
-
-        /* Disable interrupts */
-        BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, ACX_REG_INTERRUPT_MASK, ACX_INTR_ALL, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-        twIf_Transact(pHwInit->hTwIf, pTxn);
-
-        pHwInit->uTxnIndex++;
-
-        /* Read the CHIP ID to get an indication that the bus is TI_OK */
-        BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, CHIP_ID, 0, 
-                               REGISTER_SIZE, TXN_DIRECTION_READ,(TTxnDoneCb)hwInit_BootSm, hHwInit)
-        status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-        EXCEPT (pHwInit, status)
-        
-    case 3:
-        pHwInit->uInitStage ++;
-
-        /* We don't zero pHwInit->uTxnIndex at the begining because we need it's value to the next transaction */
-         pHwInit->uChipId = pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData;
-
-        /* This is only sanity check that the HW exists, we can continue and fail on FwLoad */
-		if (pHwInit->uChipId == CHIP_ID_1273_PG10)
-        {
-            WLAN_OS_REPORT(("Error!!  1273 PG 1.0 is not supported anymore!!.\n"));
-        }
-		else if (pHwInit->uChipId == CHIP_ID_1273_PG20)
-        {
-            WLAN_OS_REPORT(("Working on a 1273 PG 2.0 board.\n"));
-        }
-        else 
-        {
-            WLAN_OS_REPORT (("Error!! Found unknown Chip Id = 0x%x\n", pHwInit->uChipId));
-
-            /*
-             * NOTE: no exception because of forward compatibility
-             */
-        }
-    
-        /*
-         * Soft reset 
-         */
-        pHwInit->uResetStage = 0;
-        pHwInit->uSelfClearTime = 0;
-        pHwInit->uBootData = 0;
-        status = hwInit_ResetSm (pHwInit);    
-
-        EXCEPT (pHwInit, status)
-
-    case 4:
-        pHwInit->uInitStage ++;
-
-        TRACE0(pHwInit->hReport, REPORT_SEVERITY_INIT , "TNET SOFT-RESET\n");
-
-        WLAN_OS_REPORT(("Starting to process NVS...\n"));
-
-        /*
-         * Start EEPROM/NVS burst
-         */
-
-        if (pHwInit->pEEPROMBuf) 
-        {
-            /* NVS file exists (EEPROM-less support) */
-            pHwInit->uEEPROMCurLen = pHwInit->uEEPROMLen;
-
-            TRACE2(pHwInit->hReport, REPORT_SEVERITY_INIT , "EEPROM Image addr=0x%x, EEPROM Len=0x0x%x\n", pHwInit->pEEPROMBuf, pHwInit->uEEPROMLen);
-            WLAN_OS_REPORT (("NVS found, EEPROM Image addr=0x%x, EEPROM Len=0x0x%x\n", 
-            pHwInit->pEEPROMBuf, pHwInit->uEEPROMLen));
-        }
-        else
-        {
-            WLAN_OS_REPORT (("No Nvs, Setting default MAC address\n"));
-            pHwInit->uEEPROMCurLen = DEF_NVS_SIZE;
-            pHwInit->pEEPROMBuf = (TI_UINT8*)(&pHwInit->aDefaultNVS[0]);
-            WLAN_OS_REPORT (("pHwInit->uEEPROMCurLen: %x\n", pHwInit->uEEPROMCurLen));
-            WLAN_OS_REPORT (("ERROR: If you are not calibating the device, you will soon get errors !!!\n"));
-
-        }
-
-        pHwInit->pEEPROMCurPtr = pHwInit->pEEPROMBuf;
-        pHwInit->uEEPROMStage = 0;
-        status = hwInit_EepromlessStartBurstSm (hHwInit);
-
-        EXCEPT (pHwInit, status)
-        
-    case 5: 
-        pHwInit->uInitStage ++;
-        pHwInit->uTxnIndex = 0;
-
-        if (pHwInit->pEEPROMBuf) 
-        {
-            /* Signal FW that we are eeprom less */
-            BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, ACX_EEPROMLESS_IND_REG, ACX_EEPROMLESS_IND_REG, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-            twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            TRACE0(pHwInit->hReport, REPORT_SEVERITY_INIT , "DRIVER NVS BURST-READ\n");
-        }
-        else
-        {
-	    /* 1273 - EEPROM is not support by FPGA yet */ 
-            /*
-             * Start ACX EEPROM
-             */     
-            /*pHwInit->uRegister = START_EEPROM_MGR;
-            TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-            BUILD_TTxnStruct(pTxn, ACX_REG_EE_START, &pHwInit->uRegister, REGISTER_SIZE, 0, NULL, NULL)
-            twIf_Transact(pHwInit->hTwIf, pTxn);*/
-
-            /*
-             * The stall is needed so the EEPROM NVS burst read will complete
-             */     
-            os_StalluSec (pHwInit->hOs, 40000);
-
-            BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, ACX_EEPROMLESS_IND_REG, USE_EEPROM, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-            twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            TRACE0(pHwInit->hReport, REPORT_SEVERITY_INIT , "STARTING EEPROM NVS BURST-READ\n");
-        }
-
-        pHwInit->uTxnIndex++;
-
-        /* Read Chip ID */
-        BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn,  CHIP_ID, 0, 
-                               REGISTER_SIZE, TXN_DIRECTION_READ,(TTxnDoneCb)hwInit_BootSm, hHwInit)
-        status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-        EXCEPT (pHwInit, status)
-
-    case 6:
-        pHwInit->uInitStage ++;
-        /* We don't zero pHwInit->uTxnIndex at the begining because we need it's value to the next transaction */
-        pHwInit->uBootData = pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData;
-        /* Now we can zero the index */
-        pHwInit->uTxnIndex = 0;
-
-        WLAN_OS_REPORT(("Chip ID is 0x%X.\n", pHwInit->uBootData));
-        /* if the WLAN_EN is ON but MainClock is problamtic the chip-id will be zero*/
-        if (pHwInit->uBootData == 0)
-        {
-         WLAN_OS_REPORT(("Cannot read ChipID stopping\n", pHwInit->uBootData));
-         TWD_FinalizeOnFailure (pHwInit->hTWD); 
-         return TXN_STATUS_ERROR; 
-        }
-
-
-		
-        /* Read Scr2 to verify that the HW is ready */
-        BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, SCR_PAD2, 0, 
-                               REGISTER_SIZE, TXN_DIRECTION_READ,(TTxnDoneCb)hwInit_BootSm, hHwInit)
-        status = twIf_Transact(pHwInit->hTwIf, pTxn);
-        EXCEPT (pHwInit, status)
-
-    case 7:
-        pHwInit->uInitStage ++;
-        /* We don't zero pHwInit->uTxnIndex at the begining because we need it's value to the next transaction */
-        pHwInit->uBootData = pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData;
-
-        if (pHwInit->uBootData == 0xffffffff)
-        {
-            TRACE0(pHwInit->hReport, REPORT_SEVERITY_FATAL_ERROR , "Error in SCR_PAD2 register\n");
-            EXCEPT (pHwInit, TXN_STATUS_ERROR)
-        }
-
-        /* Call the restart sequence */
-        pHwInit->uInitSeqStage = 0;
-        pHwInit->uInitSeqStatus = TXN_STATUS_COMPLETE;
-
-        EXCEPT (pHwInit, status)
-
-    case 8:
-        pHwInit->uInitStage++;
-        if ((pGenParams->RefClk & FREF_CLK_TYPE_MASK) != 0x0)
-        {
-            status = hwInit_InitTopRegisterRead(hHwInit, 0x448);
-            EXCEPT (pHwInit, status)
-        }
-
-    case 9:
-        pHwInit->uInitStage++;
-
-        if ((pGenParams->RefClk & FREF_CLK_TYPE_MASK) != 0x0)
-        {
-			pHwInit->uTopRegValue &= FREF_CLK_TYPE_BITS;
-            pHwInit->uTopRegValue |= CLK_REQ_PRCM;
-			status =  hwInit_InitTopRegisterWrite( hHwInit, 0x448, pHwInit->uTopRegValue);
-            EXCEPT (pHwInit, status)
-        }
-
-    case 10:
-        pHwInit->uInitStage++;
-		if ((pGenParams->RefClk & FREF_CLK_POLARITY_MASK) == 0x0)
-        {
-            status = hwInit_InitTopRegisterRead(hHwInit, 0xCB2);
-            EXCEPT (pHwInit, status)
-        }
-
-    case 11:
-        pHwInit->uInitStage++;
-        if ((pGenParams->RefClk & FREF_CLK_POLARITY_MASK) == 0x0)
-        {
-            pHwInit->uTopRegValue &= FREF_CLK_POLARITY_BITS;
-            pHwInit->uTopRegValue |= CLK_REQ_OUTN_SEL;
-            status =  hwInit_InitTopRegisterWrite( hHwInit, 0xCB2, pHwInit->uTopRegValue);
-            EXCEPT (pHwInit, status)
-        }
-
-    case 12:
-        pHwInit->uInitStage = 0;
-        
-        /* Set the Download Status to COMPLETE */
-        pHwInit->DownloadStatus = TXN_STATUS_COMPLETE;
-
-        /* Call upper layer callback */
-        if (pHwInit->fInitHwCb)
-        {
-            (*pHwInit->fInitHwCb) (pHwInit->hTWD);
-        }
-
-        return TI_OK;
-    }
-
-    return TI_OK;
-}
-
-
-TI_STATUS hwInit_LoadFw (TI_HANDLE hHwInit)
-{
-    THwInit   *pHwInit = (THwInit *)hHwInit;
-    TI_STATUS  status;
-
-    /* check parameters */
-    if (hHwInit == NULL)
-    {
-        EXCEPT (pHwInit, TXN_STATUS_ERROR)
-    }
-
-    if (pHwInit->pFwBuf)
-    {
-        TRACE0(pHwInit->hReport, REPORT_SEVERITY_INIT , "CPU halt -> download code\n");
-
-        /* Load firmware image */ 
-        pHwInit->uLoadStage = 0;
-        status = hwInit_LoadFwImageSm (pHwInit);
-
-        switch (status)
-        {
-        case TI_OK:
-        case TXN_STATUS_OK:
-        case TXN_STATUS_COMPLETE:
-            WLAN_OS_REPORT (("Firmware successfully downloaded.\n"));
-            break;
-        case TXN_STATUS_PENDING:
-            WLAN_OS_REPORT (("Starting to download firmware...\n"));
-            break;
-        default:
-            TRACE0(pHwInit->hReport, REPORT_SEVERITY_ERROR , "Firmware download failed!\n");
-            break;
-        }
-
-        EXCEPT (pHwInit, status);
-    }   
-    else
-    {
-        TRACE0(pHwInit->hReport, REPORT_SEVERITY_INIT , "Firmware not downloaded...\n");
-
-        EXCEPT (pHwInit, TXN_STATUS_ERROR)
-    }
-            
-    WLAN_OS_REPORT (("FW download OK...\n"));
-    return TI_OK;
-}                                                  
-    
-
-/****************************************************************************
- *                      hwInit_FinalizeDownloadSm()
- ****************************************************************************
- * DESCRIPTION: Run the Hardware firmware
- *              Wait for Init Complete
- *              Configure the Bus Access with Addresses available on the scratch pad register 
- *              Change the SDIO/SPI partitions to be able to see all the memory addresses
- * 
- * INPUTS:  None    
- * 
- * OUTPUT:  None
- * 
- * RETURNS: None
- ****************************************************************************/
-static TI_STATUS hwInit_FinalizeDownloadSm (TI_HANDLE hHwInit)
-{
-    THwInit  *pHwInit = (THwInit *)hHwInit;
-    TTwd     *pTWD = (TTwd *)pHwInit->hTWD;
-    TI_STATUS status = TI_OK;
-    TTxnStruct* pTxn;
-
-
-    while (TI_TRUE)
-    {
-        switch (pHwInit->uFinStage)
-        {
-        case 0:
-            pHwInit->uFinStage = 1;
-            pHwInit->uTxnIndex = 0;
-            /*
-             * Run the firmware (I) - Read current value from ECPU Control Reg.
-             */
-            BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, ACX_REG_ECPU_CONTROL, 0, 
-                               REGISTER_SIZE, TXN_DIRECTION_READ, (TTxnDoneCb)hwInit_FinalizeDownloadSm, hHwInit)
-            status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            EXCEPT (pHwInit, status)
-
-        case 1:
-            pHwInit->uFinStage ++;
-            /* We don't zero pHwInit->uTxnIndex at the begining because we need it's value to the next transaction */
-            pHwInit->uFinData = pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData;
-            /* Now we can zero the index */
-            pHwInit->uTxnIndex = 0;
-
-            /*
-             * Run the firmware (II) - Take HW out of reset (write ECPU_CONTROL_HALT to ECPU Control Reg.)
-             */
-            BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, ACX_REG_ECPU_CONTROL, (pHwInit->uFinData | ECPU_CONTROL_HALT), 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-            twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            WLAN_OS_REPORT (("Firmware running.\n"));
-
-            /* 
-             * CHIP ID Debug
-             */     
-
-            pHwInit->uTxnIndex++;                  
-
-            BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, CHIP_ID, 0, 
-                               REGISTER_SIZE, TXN_DIRECTION_READ, (TTxnDoneCb)hwInit_FinalizeDownloadSm, hHwInit)
-            status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            EXCEPT (pHwInit, status)
-
-        case 2:
-            pHwInit->uFinStage ++;
-            pHwInit->uFinLoop = 0;
-
-            /* We don't zero pHwInit->uTxnIndex at the begining because we need it's value to the next transaction */
-            pHwInit->uFinData = pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData;
-                               
-            TRACE1(pHwInit->hReport, REPORT_SEVERITY_INIT , "CHIP ID IS %x\n", pHwInit->uFinData);
-
-            TRACE0(pHwInit->hReport, REPORT_SEVERITY_INIT , "Wait init complete\n");
-
-        case 3:
-            pHwInit->uTxnIndex = 0;
-
-            /* 
-             * Wait for init complete 
-             */
-            if (pHwInit->uFinLoop < FIN_LOOP)
-            {           
-                pHwInit->uFinStage = 4;
-
-#ifndef DOWNLOAD_TIMER_REQUIERD
-				os_StalluSec (pHwInit->hOs, 50);
-#endif
-
-                /* Read interrupt status register */
-                BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, ACX_REG_INTERRUPT_NO_CLEAR, 0, 
-                               REGISTER_SIZE, TXN_DIRECTION_READ, (TTxnDoneCb)hwInit_FinalizeDownloadSm, hHwInit)
-                status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-                EXCEPT (pHwInit, status)
-            }
-            else
-			{
-				pHwInit->uFinStage = 5;
-			}                
-            continue;
-
-        case 4:
-            /* We don't zero pHwInit->uTxnIndex at the begining because we need it's value to the next transaction */
-            pHwInit->uFinData = pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData;
-            /* Now we can zero the index */
-            pHwInit->uTxnIndex = 0;
-            
-            if (pHwInit->uFinData == 0xffffffff) /* error */
-            {
-                TRACE0(pHwInit->hReport, REPORT_SEVERITY_ERROR , "Error reading hardware complete init indication\n");
-
-                pHwInit->DownloadStatus = TXN_STATUS_ERROR;
-                EXCEPT (pHwInit, TXN_STATUS_ERROR)
-            }
-
-            if (IS_MASK_ON (pHwInit->uFinData, ACX_INTR_INIT_COMPLETE))
-            {
-                pHwInit->uFinStage = 5;
-
-                /* Interrupt ACK */
-                BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, ACX_REG_INTERRUPT_ACK, ACX_INTR_INIT_COMPLETE, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-                twIf_Transact(pHwInit->hTwIf, pTxn);
-
-                break;
-            }
-            else
-            {
-                pHwInit->uFinStage = 3;
-                pHwInit->uFinLoop ++;
-
-#ifdef DOWNLOAD_TIMER_REQUIERD
-                tmr_StartTimer (pHwInit->hStallTimer, hwInit_StallTimerCb, hHwInit, STALL_TIMEOUT, TI_FALSE);
-                return TXN_STATUS_PENDING;
-#endif
-            }
-#ifndef DOWNLOAD_TIMER_REQUIERD
-            continue;
-#endif
-
-        case 5:  
-            pHwInit->uFinStage++;
-
-            if (pHwInit->uFinLoop >= FIN_LOOP)
-            {
-                TRACE0(pHwInit->hReport, REPORT_SEVERITY_ERROR , "Timeout waiting for the hardware to complete initialization\n");
-
-                pHwInit->DownloadStatus = TXN_STATUS_ERROR;
-                EXCEPT (pHwInit, TXN_STATUS_ERROR);
-            }
-        
-            TRACE0(pHwInit->hReport, REPORT_SEVERITY_INIT , "Firmware init complete...\n");
-
-            /* 
-             * There are valid addresses of the command and event mailbox 
-             * on the scratch pad registers 
-             */
-            /* Hardware config command mail box */
-            status = cmdMbox_ConfigHw (pTWD->hCmdMbox,
-                                       (fnotify_t)hwInit_FinalizeDownloadSm, 
-                                       hHwInit);
-            EXCEPT (pHwInit, status)
-            
-        case 6:  
-            pHwInit->uFinStage++;
-
-            /* Hardware config event mail box */
-            status = eventMbox_InitMboxAddr (pTWD->hEventMbox,
-                                         (fnotify_t)hwInit_FinalizeDownloadSm, 
-                                         hHwInit);
-            EXCEPT (pHwInit, status);
-            
-        case 7: 
-            pHwInit->uFinStage++;
-            pHwInit->uTxnIndex = 0;
-
-            SET_WORK_PARTITION(pHwInit->aPartition)
-            /* Set the bus addresses partition to its "running" mode */
-            SET_WORK_PARTITION(pHwInit->aPartition)
-            hwInit_SetPartition (pHwInit,pHwInit->aPartition);
-
-            /* Unmask interrupts needed in the FW configuration phase */
-            fwEvent_SetInitMask (pTWD->hFwEvent);
-
-            /* Get FW static information from mailbox area */
-            BUILD_HW_INIT_FW_STATIC_TXN(pHwInit, pTxn, cmdMbox_GetMboxAddress (pTWD->hCmdMbox),
-                                        (TTxnDoneCb)hwInit_FinalizeDownloadSm, hHwInit)
-            status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            EXCEPT (pHwInit, status);
-            continue;
-
-        case 8:
-            
-            pHwInit->uFinStage = 0;
-
-            cmdBld_FinalizeDownload (pTWD->hCmdBld, &pHwInit->tBootAttr, &(pHwInit->tFwStaticTxn.tFwStaticInfo));
-
-            /* Set the Download Status to COMPLETE */
-            pHwInit->DownloadStatus = TXN_STATUS_COMPLETE;
-
-            return TXN_STATUS_COMPLETE;
-
-        } /* End switch */
-
-    } /* End while */
-
-}
-
-
-/****************************************************************************
- *                      hwInit_ResetSm()
- ****************************************************************************
- * DESCRIPTION: Reset hardware state machine
- * 
- * INPUTS:  None    
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-static TI_STATUS hwInit_ResetSm (TI_HANDLE hHwInit)
-{
-    THwInit *pHwInit = (THwInit *)hHwInit;
-    TI_STATUS status = TI_OK;
-    TTxnStruct* pTxn;
-
-    pHwInit->uTxnIndex = 0;
-
-        /* Disable Rx/Tx */
-    BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, REG_ENABLE_TX_RX, 0x0, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-    status = twIf_Transact(pHwInit->hTwIf, pTxn);
-	pHwInit->uTxnIndex++;
-	return status;
-}
-
-
-/****************************************************************************
- *                      hwInit_EepromlessStartBurstSm()
- ****************************************************************************
- * DESCRIPTION: prepare eepromless configuration before boot
- * 
- * INPUTS:  
- * 
- * OUTPUT:  
- * 
- * RETURNS: 
- ****************************************************************************/
-static TI_STATUS hwInit_EepromlessStartBurstSm (TI_HANDLE hHwInit)
-{
-    THwInit   *pHwInit = (THwInit *)hHwInit;
-    TI_STATUS  status = TI_OK;
-    TI_UINT8   *uAddr;
-    TI_UINT32  uDeltaLength;
-    TTxnStruct* pTxn;
-
-    pHwInit->uTxnIndex = 0;
-
-    while (TI_TRUE)
-    {
-        switch (pHwInit->uEEPROMStage)
-        {
-        /* 
-         * Stages 0, 1 handles the eeprom format parameters: 
-         * ------------------------------------------------
-         * Length  - 8bit       --> The length is counted in 32bit words
-         * Address - 16bit
-         * Data    - (Length * 4) bytes
-         * 
-         * Note: The nvs is in big endian format and we need to change it to little endian
-         */
-        case 0: 
-            /* Check if address LSB = 1 --> Register address */
-            if ((pHwInit->uEEPROMRegAddr = pHwInit->pEEPROMCurPtr[1]) & 1)
-            {
-                /* Mask the register's address LSB before writing to it */
-                pHwInit->uEEPROMRegAddr &= 0xfe;
-                /* Change the address's endian */
-                pHwInit->uEEPROMRegAddr |= (TI_UINT32)pHwInit->pEEPROMCurPtr[2] << 8;
-                /* Length of burst data */
-                pHwInit->uEEPROMBurstLen = pHwInit->pEEPROMCurPtr[0];
-                pHwInit->pEEPROMCurPtr += 3;
-                pHwInit->uEEPROMBurstLoop = 0; 
-                /* 
-                 * We've finished reading the burst information.
-                 * Go to stage 1 in order to write it 
-                 */
-                pHwInit->uEEPROMStage = 1;
-            }
-            /* If address LSB = 0 --> We're not in the burst section */
-            else
-            {
-                /* End of Burst transaction: we should see 7 zeroed bytes */
-                if (pHwInit->pEEPROMCurPtr[0] == 0)
-                {
-                    pHwInit->pEEPROMCurPtr += 7;
-                }
-                pHwInit->uEEPROMCurLen -= (pHwInit->pEEPROMCurPtr - pHwInit->pEEPROMBuf + 1);
-                pHwInit->uEEPROMCurLen = (pHwInit->uEEPROMCurLen + NVS_DATA_BUNDARY_ALIGNMENT - 1) & 0xfffffffc;
-                /* End of Burst transaction, go to TLV section */
-                pHwInit->uEEPROMStage = 2;
-            }
-            continue;            
-
-        case 1: 
-            if (pHwInit->uEEPROMBurstLoop < pHwInit->uEEPROMBurstLen)
-            {
-                /* Change the data's endian */
-                TI_UINT32 val = (pHwInit->pEEPROMCurPtr[0] | 
-                                (pHwInit->pEEPROMCurPtr[1] << 8) | 
-                                (pHwInit->pEEPROMCurPtr[2] << 16) | 
-                                (pHwInit->pEEPROMCurPtr[3] << 24));
-
-                TRACE2(pHwInit->hReport, REPORT_SEVERITY_INIT , "NVS::BurstRead: *(%08x) = %x\n", pHwInit->uEEPROMRegAddr, val);
-
-                BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, (REGISTERS_BASE+pHwInit->uEEPROMRegAddr), val, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, (TTxnDoneCb)hwInit_EepromlessStartBurstSm, hHwInit)
-                status = twIf_Transact(pHwInit->hTwIf, pTxn);
- 
-                pHwInit->uEEPROMStatus = status;
-                pHwInit->uEEPROMRegAddr += WORD_SIZE;
-                pHwInit->pEEPROMCurPtr +=  WORD_SIZE;
-                /* While not end of burst, we stay in stage 1 */
-                pHwInit->uEEPROMStage = 1;
-                pHwInit->uEEPROMBurstLoop ++;
-
-                EXCEPT (pHwInit, status);
-            }
-            else
-            {
-                /* If end of burst return to stage 0 to read the next one */
-                pHwInit->uEEPROMStage = 0;
-            }
-             
-            continue;
-
-        case 2:
-
-
-            pHwInit->uEEPROMStage = 3;
-    
-            /* Set the bus addresses partition to its "running" mode */
-            SET_WORK_PARTITION(pHwInit->aPartition)
-            hwInit_SetPartition (pHwInit,pHwInit->aPartition);
-            continue;
- 
-        case 3:
-            TRACE0(pHwInit->hReport, REPORT_SEVERITY_INIT , "Reached TLV section\n");
-
-            /* Align the host address */
-            if (((TI_UINT32)pHwInit->pEEPROMCurPtr & WORD_ALIGNMENT_MASK) && (pHwInit->uEEPROMCurLen > 0) )
-            {
-                uAddr = (TI_UINT8*)(((TI_UINT32)pHwInit->pEEPROMCurPtr & 0xFFFFFFFC)+WORD_SIZE);
-                uDeltaLength = uAddr - pHwInit->pEEPROMCurPtr + 1;
-
-                pHwInit->pEEPROMCurPtr = uAddr;
-                pHwInit->uEEPROMCurLen-= uDeltaLength;
-            }
-
-            TRACE2(pHwInit->hReport, REPORT_SEVERITY_INIT , "NVS::WriteTLV: pEEPROMCurPtr= %x, Length=%d\n", pHwInit->pEEPROMCurPtr, pHwInit->uEEPROMCurLen);
-
-            if (pHwInit->uEEPROMCurLen)
-            {
-                /* Save the 4 bytes before the NVS data for WSPI case where they are overrun by the WSPI BusDrv */
-                pHwInit->uSavedDataForWspiHdr = *(TI_UINT32 *)(pHwInit->pEEPROMCurPtr - WSPI_PAD_LEN_WRITE);
-
-                /* Prepare the Txn structure for the NVS transaction to the CMD_MBOX */
-                HW_INIT_PTXN_SET(pHwInit, pTxn)
-                TXN_PARAM_SET_DIRECTION(pTxn, TXN_DIRECTION_WRITE);
-                BUILD_TTxnStruct(pTxn, CMD_MBOX_ADDRESS, pHwInit->pEEPROMCurPtr, pHwInit->uEEPROMCurLen, 
-                                 (TTxnDoneCb)hwInit_EepromlessStartBurstSm, hHwInit)
-
-                /* Transact the NVS data to the CMD_MBOX */
-                status = twIf_Transact(pHwInit->hTwIf, pTxn);
-                
-                pHwInit->uEEPROMCurLen = 0;
-                pHwInit->uNVSStatus = status;
-
-                EXCEPT (pHwInit, status); 
-            }
-            else
-            {
-                /* Restore the 4 bytes before the NVS data for WSPI case were they are overrun by the WSPI BusDrv */
-                *(TI_UINT32 *)(pHwInit->pEEPROMCurPtr - WSPI_PAD_LEN_WRITE) = pHwInit->uSavedDataForWspiHdr;
-
-                /* Call the upper level state machine */
-                if (pHwInit->uEEPROMStatus == TXN_STATUS_PENDING || 
-                    pHwInit->uNVSStatus == TXN_STATUS_PENDING)
-                {
-                    hwInit_BootSm (hHwInit);
-                }
-
-                return TXN_STATUS_COMPLETE;
-            }
-        } /* End switch */
- 
-    } /* End while */
-}
-
-/****************************************************************************
- *                      hwInit_LoadFwImageSm()
- ****************************************************************************
- * DESCRIPTION: Load image from the host and download into the hardware 
- * 
- * INPUTS:  None    
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-
-
-#define ADDRESS_SIZE		(sizeof(TI_INT32))
-
-static TI_STATUS hwInit_LoadFwImageSm (TI_HANDLE hHwInit)
-{
-    THwInit *pHwInit 			= (THwInit *)hHwInit;
-    TI_STATUS status 			= TI_OK;
-	ETxnStatus	TxnStatus;
-	TI_UINT32 uMaxPartitionSize	= PARTITION_DOWN_MEM_SIZE;
-    TTxnStruct* pTxn;
-
-    pHwInit->uTxnIndex = 0;
-
-    while (TI_TRUE)
-    {
-        switch (pHwInit->uLoadStage)
-        {
-		case 0:
-            pHwInit->uLoadStage = 1; 
-
-			/* Check the Downloaded FW alignment */
-			if ((pHwInit->uFwLength % ADDRESS_SIZE) != 0)
-			{
-				TRACE1(pHwInit->hReport, REPORT_SEVERITY_ERROR , "Length of downloaded Portion (%d) is not aligned\n",pHwInit->uFwLength);
-				EXCEPT_L (pHwInit, TXN_STATUS_ERROR);
-			}
-
-			TRACE2(pHwInit->hReport, REPORT_SEVERITY_INIT , "Image addr=0x%x, Len=0x%x\n", pHwInit->pFwBuf, pHwInit->uFwLength);
-
-			/* Set bus memory partition to current download area */
-           SET_FW_LOAD_PARTITION(pHwInit->aPartition,pHwInit->uFwAddress)
-           hwInit_SetPartition (pHwInit,pHwInit->aPartition);
-            status = TI_OK;
-			break;
-
-        case 1:
-
-			pHwInit->uLoadStage = 2;
-			/* if initial size is smaller than MAX_SDIO_BLOCK - go strait to stage 4 to write partial block */
-			if (pHwInit->uFwLength < MAX_SDIO_BLOCK)
-			{
-				pHwInit->uLoadStage = 4; 
-			}
-
-			pHwInit->uBlockReadNum 		= 0;
-			pHwInit->uBlockWriteNum 	= 0;
-			pHwInit->uPartitionLimit 	= pHwInit->uFwAddress + uMaxPartitionSize;
-
-            continue;
-                    
-        case 2:
-
-            /* Load firmware by blocks */
- 			if (pHwInit->uBlockReadNum < (pHwInit->uFwLength / MAX_SDIO_BLOCK))
-            {            
-                pHwInit->uLoadStage = 3;
-
-                /* Change partition */
-				/* The +2 is for the last block and the block remainder */  
-				if ( ((pHwInit->uBlockWriteNum + 2) * MAX_SDIO_BLOCK + pHwInit->uFwAddress) > pHwInit->uPartitionLimit)
-                {                					
-					pHwInit->uFwAddress += pHwInit->uBlockWriteNum * MAX_SDIO_BLOCK;
-					/* update uPartitionLimit */
-					pHwInit->uPartitionLimit = pHwInit->uFwAddress + uMaxPartitionSize;
-                    /* Set bus memory partition to current download area */
-                    SET_FW_LOAD_PARTITION(pHwInit->aPartition,pHwInit->uFwAddress)
-                    hwInit_SetPartition (pHwInit,pHwInit->aPartition);
-                    TxnStatus = TXN_STATUS_OK;
-					pHwInit->uBlockWriteNum = 0;
-                    TRACE1(pHwInit->hReport, REPORT_SEVERITY_INIT , "Change partition to address offset = 0x%x\n", 									   pHwInit->uFwAddress + pHwInit->uBlockWriteNum * MAX_SDIO_BLOCK);
-                    EXCEPT_L (pHwInit, TxnStatus);                                                     
-                }
-            }
-            else
-            {
-                pHwInit->uLoadStage = 4;
-                TRACE0(pHwInit->hReport, REPORT_SEVERITY_INIT , "Load firmware with Portions\n");
-            }
-            continue;
-
-        case 3:        
-            pHwInit->uLoadStage = 2;
-
-            pHwInit->uTxnIndex = 0;
-
-            /* Copy image block to temporary buffer */
-            os_memoryCopy (pHwInit->hOs,
-                           (void *)&pHwInit->auFwTmpBuf[WSPI_PAD_LEN_WRITE],
-						   (void *)(pHwInit->pFwBuf + pHwInit->uBlockReadNum * MAX_SDIO_BLOCK),
-						   MAX_SDIO_BLOCK);
-
-            /* Load the block. Save WSPI_PAD_LEN_WRITE space for WSPI bus command */
-             BUILD_HW_INIT_FW_DL_TXN(pHwInit, pTxn, (pHwInit->uFwAddress + pHwInit->uBlockWriteNum * MAX_SDIO_BLOCK),
-                                     (pHwInit->auFwTmpBuf + WSPI_PAD_LEN_WRITE), MAX_SDIO_BLOCK, TXN_DIRECTION_WRITE,
-                                     (TTxnDoneCb)hwInit_LoadFwImageSm, hHwInit)
-            TxnStatus = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            /* Log ERROR if the transaction returned ERROR */
-            if (TxnStatus == TXN_STATUS_ERROR)
-            {
-                TRACE1(pHwInit->hReport, REPORT_SEVERITY_ERROR , "hwInit_LoadFwImageSm: twIf_Transact retruned status=0x%x\n", TxnStatus);
-            } 
-
-			pHwInit->uBlockWriteNum ++;
-			pHwInit->uBlockReadNum ++;
-            EXCEPT_L (pHwInit, TxnStatus);
-            continue;
-
-        case 4:    
-			pHwInit->uLoadStage 	= 5;
-
-            pHwInit->uTxnIndex = 0;
-
-			/* If No Last block to write */
-			if ( pHwInit->uFwLength % MAX_SDIO_BLOCK == 0 )
-			{
-				continue;
-			}
-
-
-            /* Copy the last image block */
-             os_memoryCopy (pHwInit->hOs,
-                           (void *)&pHwInit->auFwTmpBuf[WSPI_PAD_LEN_WRITE],
-						   (void *)(pHwInit->pFwBuf + pHwInit->uBlockReadNum * MAX_SDIO_BLOCK),
-						   pHwInit->uFwLength % MAX_SDIO_BLOCK);
-
-            /* Load the last block */
-             BUILD_HW_INIT_FW_DL_TXN(pHwInit, pTxn, (pHwInit->uFwAddress + pHwInit->uBlockWriteNum * MAX_SDIO_BLOCK),
-                                     (pHwInit->auFwTmpBuf + WSPI_PAD_LEN_WRITE), (pHwInit->uFwLength % MAX_SDIO_BLOCK), TXN_DIRECTION_WRITE,
-                                     (TTxnDoneCb)hwInit_LoadFwImageSm, hHwInit)
-            TxnStatus = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            if (TxnStatus == TXN_STATUS_ERROR)
-			{
-                TRACE1(pHwInit->hReport, REPORT_SEVERITY_ERROR , "hwInit_LoadFwImageSm: last block retruned status=0x%x\n", TxnStatus);
-			}
-
-            EXCEPT_L (pHwInit, TxnStatus);
-            continue;
-
-        case 5:
-            pHwInit->uLoadStage = 0;
-
-			/*If end of overall FW Download Process: Finalize download (run firmware)*/
-			if ( pHwInit->bFwBufLast == TI_TRUE )
-			{			
-				/* The download has completed */ 
-				WLAN_OS_REPORT (("Finished downloading firmware.\n"));
-				status = hwInit_FinalizeDownloadSm (hHwInit);
-			}
-			/* Have to wait to more FW Portions */
-			else
-			{
-				/* Call the upper layer callback */
-				if ( pHwInit->fFinalizeDownload != NULL )
-				{
-					(pHwInit->fFinalizeDownload) (pHwInit->hFinalizeDownload);
-				}
-
-				status = TI_OK;
-			}
-            return status;
-
-        } /* End switch */
-
-    } /* End while */
-
-} /* hwInit_LoadFwImageSm() */
-
-#define READ_TOP_REG_LOOP  32
-
-/****************************************************************************
- *                      hwInit_ReadRadioParamsSm ()
- ****************************************************************************
- * DESCRIPTION: hwInit_ReadRadioParamsSm 
- * INPUTS:  None    
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS hwInit_ReadRadioParamsSm (TI_HANDLE hHwInit)
-{ 
-    THwInit      *pHwInit = (THwInit *)hHwInit;
-    TTwd         *pTWD = (TTwd *)pHwInit->hTWD;
-   IniFileGeneralParam *pGenParams = &DB_GEN(pTWD->hCmdBld);
-    TI_UINT32  val= 0, value;
-    TI_UINT32  add = FUNC7_SEL;
-	TI_UINT32  retAddress;
-    TTxnStruct  *pTxn;
-    TI_STATUS   status = 0;
-    
-             
-    while (TI_TRUE)
-    {
-       switch (pHwInit->uRegStage)
-        {
-        case 0:
-            pHwInit->uRegStage = 1;
-            pHwInit->uTxnIndex++;
-
-            /*
-             * Select GPIO over Debug for BT_FUNC7 clear bit 17
-             */
-            BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, GPIO_SELECT, 0, 
-                               REGISTER_SIZE, TXN_DIRECTION_READ, (TTxnDoneCb)hwInit_ReadRadioParamsSm, hHwInit)
-            status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            EXCEPT (pHwInit, status)
-
-        case 1:
-            pHwInit->uRegStage ++;
-            pHwInit->uRegLoop = 0;
-
-            /* We don't zero pHwInit->uTxnIndex at the begining because we need it's value to the next transaction */
-            val = (pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData);                
-            val &= 0xFFFDFFFF; /*clear bit 17*/
-            /* Now we can zero the index */
-            pHwInit->uTxnIndex = 0;
-
-            BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, GPIO_SELECT, val, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-
-            twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            pHwInit->uTxnIndex++; 
-
-            pHwInit->uRegData = FUNC7_SEL;
-
-            continue;
-
-        case 2:
-
-            pHwInit->uRegStage ++;
-            add = pHwInit->uRegData;
-
-     
-            /* Select GPIO over Debug for BT_FUNC7*/
-            retAddress = (TI_UINT32)(add / 2);
-	        val = (retAddress & 0x7FF);
-        	val |= BIT_16 | BIT_17;
-
-            BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_POR_CTR, val, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-            twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            pHwInit->uTxnIndex++;  
-
-            BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_CMD, 0x2, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-            twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            continue;
-
-        case 3:
-
-            pHwInit->uRegStage ++;
-            pHwInit->uTxnIndex++; 
-
-            BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_DATA_RD, 0, 
-                               REGISTER_SIZE, TXN_DIRECTION_READ, (TTxnDoneCb)hwInit_ReadRadioParamsSm, hHwInit)
-            status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            EXCEPT (pHwInit, status)
-
-           
-        case 4:
-
-            val = (pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData);
-            
-            pHwInit->uTxnIndex = 0;
-            if (val & BIT_18)
-            {
-              if ((val & BIT_16) && (!(val & BIT_17)))
-              {
-                  pHwInit->uRegStage ++;
-                  pHwInit->uRegLoop = 0;
-
-              }
-              else 
-              {
-                TRACE0(pHwInit->hReport, REPORT_SEVERITY_ERROR , "can't writing bt_func7_sel\n");
-                               
-                TWD_FinalizeFEMRead(pHwInit->hTWD);
-
-                return TI_NOK;
-              }
-            }
-            else
-            {
-              if (pHwInit->uRegLoop < READ_TOP_REG_LOOP)
-              {
-                 pHwInit->uRegStage = 3;
-                 pHwInit->uRegLoop++;
-              }
-              else 
-              {
-
-                TRACE0(pHwInit->hReport, REPORT_SEVERITY_ERROR , "Timeout waiting for writing bt_func7_sel\n");
-               
-                TWD_FinalizeFEMRead(pHwInit->hTWD);
-
-                return TI_NOK;
-
-              }
-            }
-
-            continue;
-
-        case 5:
-               pHwInit->uRegStage ++;
-               add = pHwInit->uRegData;
-               retAddress = (TI_UINT32)(add / 2);
-	           value = (retAddress & 0x7FF);
-               value |= BIT_16 | BIT_17;
-
-               BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_POR_CTR, value, 
-                                  REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-               twIf_Transact(pHwInit->hTwIf, pTxn);
-
-               pHwInit->uTxnIndex++;  
-
-              if (pHwInit->uRegSeqStage == 0)
-              {
-                  if (pHwInit->uRegData == FUNC7_SEL)
-                    value = (val | 0x600);
-                  else
-                    value = (val | 0x1000);
-              }
-              else
-              {
-                  if (pHwInit->uRegData == FUNC7_SEL)
-                    value = (val & 0xF8FF);
-                  else
-                    value = (val & 0xCFFF);
-
-              }
-
-	      value &= 0xFFFF;
-          
-               BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_POR_WDATA, value, 
-                                  REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-               twIf_Transact(pHwInit->hTwIf, pTxn);
-
-               pHwInit->uTxnIndex++; 
-
-               BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_CMD, 0x1, 
-                                  REGISTER_SIZE, TXN_DIRECTION_WRITE, (TTxnDoneCb)hwInit_ReadRadioParamsSm, hHwInit)
-
-               /*BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, INDIRECT_REG5, 0x1, 
-                                  REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL) */
-
-               status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-               pHwInit->uTxnIndex++;                
-
-               if ((pHwInit->uRegData == FUNC7_SEL)&& (pHwInit->uRegSeqStage == 0))
-               {
-                 pHwInit->uRegData = FUNC7_PULL;
-                 pHwInit->uRegStage = 2;
-               }
-               else
-               {
-                  if ((pHwInit->uRegData == FUNC7_PULL)&& (pHwInit->uRegSeqStage == 1))
-                   {
-                     pHwInit->uRegData = FUNC7_SEL;
-                     pHwInit->uRegStage = 2;
-                   }
-               }
-
-               EXCEPT (pHwInit, status)                 
-               continue;
-
-        case 6:
-
-              if (pHwInit->uRegSeqStage == 1)
-              {
-                  pHwInit->uRegStage = 8;
-              }
-              else
-              {
-                pHwInit->uRegStage ++;
-                pHwInit->uTxnIndex++; 
-
-                BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, GPIO_OE_RADIO, 0, 
-                               REGISTER_SIZE, TXN_DIRECTION_READ, (TTxnDoneCb)hwInit_ReadRadioParamsSm, hHwInit)
-                status = twIf_Transact(pHwInit->hTwIf, pTxn);
-                EXCEPT (pHwInit, status)
-              }
-              continue;
-
-        case 7:
-            pHwInit->uRegStage ++;
-
-            /* We don't zero pHwInit->uTxnIndex at the begining because we need it's value to the next transaction */
-            val = (pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData);                
-            val |= 0x00020000;
-
-            pHwInit->uTxnIndex = 0; 
-            BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, GPIO_OE_RADIO, val, 
-                               REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-            twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            pHwInit->uTxnIndex++;  
-
-            BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, GPIO_IN, 0, 
-                               REGISTER_SIZE, TXN_DIRECTION_READ, (TTxnDoneCb)hwInit_ReadRadioParamsSm, hHwInit)
-            status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-            EXCEPT (pHwInit, status)
-
-            
-        case 8:
-            if (pHwInit->uRegSeqStage == 0)
-             {
-	       val = (pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData);                  
-	       val &= 0x20000;
-	       if(val)
-	      {
-		   pGenParams->TXBiPFEMManufacturer = FEM_TRIQUINT_TYPE_E;
-	      }
-	      else
-	      {
-	  	   pGenParams->TXBiPFEMManufacturer = FEM_RFMD_TYPE_E;
-	      }
-               WLAN_OS_REPORT (("FEM Type %d \n",pGenParams->TXBiPFEMManufacturer));
-			   pHwInit->uTxnIndex = 0;
-               pHwInit->uRegSeqStage = 1;
-               pHwInit->uRegStage = 2;
-               pHwInit->uRegData = FUNC7_PULL;
-               continue;
-             }
-             else
-             {
-              TRACE0(pHwInit->hReport, REPORT_SEVERITY_INFORMATION, "hwInit_ReadRadioParamsSm Ended Successfully\n");
-              
-              TWD_FinalizeFEMRead(pHwInit->hTWD);
-
-              return TI_OK;
-
-             }
-
-        } /* End switch */
-
-    } /* End while */
-
-}
-
-
-/****************************************************************************
- *                      hwInit_ReadRadioParams()
- ****************************************************************************
- * DESCRIPTION: hwInit_ReadRadioParamsSm 
- * initalizie hwInit_ReadRadioParamsSm parmaeters
-  ****************************************************************************/
-   
-TI_STATUS hwInit_ReadRadioParams (TI_HANDLE hHwInit)
-{
-  THwInit      *pHwInit = (THwInit *)hHwInit;
-
-  pHwInit->uRegStage = 0;
-  pHwInit->uRegSeqStage = 0;
- 
-  return hwInit_ReadRadioParamsSm (hHwInit);
-}
-
-/****************************************************************************
- *                      hwInit_InitPoalrity()
- ****************************************************************************
- * DESCRIPTION: hwInit_ReadRadioParamsSm 
- * initalizie hwInit_ReadRadioParamsSm parmaeters
-  ****************************************************************************/
-   
-TI_STATUS hwInit_InitPolarity(TI_HANDLE hHwInit)
-{
-  THwInit      *pHwInit = (THwInit *)hHwInit;
-
-  pHwInit->uRegStage = 0;
-  pHwInit->uRegSeqStage = 0;
- 
-  return hwInit_WriteIRQPolarity (hHwInit);
-}
-
-
-
-/****************************************************************************
- *                      hwInit_WriteIRQPolarity ()
- ****************************************************************************
- * DESCRIPTION: hwInit_WriteIRQPolarity
-  * INPUTS:  None    
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
- TI_STATUS hwInit_WriteIRQPolarity(TI_HANDLE hHwInit)
- {
-     THwInit     *pHwInit = (THwInit *)hHwInit;
-     TI_UINT32   Address,value;
-     TI_UINT32   val=0;
-     TTxnStruct  *pTxn;
-     TI_STATUS   status = 0;
-
-   /*  To write to a top level address from the WLAN IP:
-       Write the top level address to the OCP_POR_CTR register. 
-       Divide the top address by 2, and add 0x30000 to the result – for example for top address 0xC00, write to the OCP_POR_CTR 0x30600
-       Write the data to the OCP_POR_WDATA register
-       Write 0x1 to the OCP_CMD register. 
-
-      To read from a top level address:
-      Write the top level address to the OCP_POR_CTR register.
-      Divide the top address by 2, and add 0x30000 to the result – for example for top address 0xC00, write to the OCP_POR_CTR 0x30600 
-      Write 0x2 to the OCP_CMD register. 
-      Poll bit [18] of OCP_DATA_RD for data valid indication
-      Check bits 17:16 of OCP_DATA_RD:
-      00 – no response
-      01 – data valid / accept
-      10 – request failed
-      11 – response error
-      Read the data from the OCP_DATA_RD register
-   */
-      
-     while (TI_TRUE)
-     {
-         switch (pHwInit->uRegStage)
-         {
-         case 0:
-
-             pHwInit->uRegStage = 1;
-             pHwInit->uTxnIndex++;
-             pHwInit->uRegLoop = 0;
-
-             /* first read the IRQ Polarity register*/
-             Address = (TI_UINT32)(FN0_CCCR_REG_32 / 2);
-             val = (Address & 0x7FF);
-             val |= BIT_16 | BIT_17;
-
-             /* Write IRQ Polarity address register to OCP_POR_CTR*/
-             BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_POR_CTR, val, 
-                                REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-
-             twIf_Transact(pHwInit->hTwIf, pTxn);
-
-             pHwInit->uTxnIndex++;  
-
-             /* Write read (2)command to the OCP_CMD register. */
-
-             BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_CMD, 0x2, 
-                                REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-             twIf_Transact(pHwInit->hTwIf, pTxn);
-
-             continue;
-
-         case 1:
-             
-             pHwInit->uRegStage ++;
-             pHwInit->uTxnIndex++; 
-
-             BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_DATA_RD, 0, 
-                                REGISTER_SIZE, TXN_DIRECTION_READ, (TTxnDoneCb)hwInit_WriteIRQPolarity, hHwInit)
-             status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-             EXCEPT (pHwInit, status)
-
-
-         case 2:
-             /* get the value from  IRQ Polarity register*/
-             val = pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData;
-
-             pHwInit->uTxnIndex = 0;
-
-             /*Poll bit 18 of OCP_DATA_RD for data valid indication*/
-             if (val & BIT_18)
-             {
-               if ((val & BIT_16) && (!(val & BIT_17)))
-               {
-                   pHwInit->uRegStage ++;
-                   pHwInit->uRegLoop = 0;
-
-               }
-               else 
-               {
-                 TRACE0(pHwInit->hReport, REPORT_SEVERITY_ERROR , "can't writing bt_func7_sel\n");
-                 TWD_FinalizePolarityRead(pHwInit->hTWD);
-
-                return TI_NOK;
-               }
-             }
-             else
-             {
-               if (pHwInit->uRegLoop < READ_TOP_REG_LOOP)
-               {
-                  pHwInit->uRegStage = 1;
-                  pHwInit->uRegLoop++;
-               }
-               else 
-               {
-
-                 TRACE0(pHwInit->hReport, REPORT_SEVERITY_ERROR , "Timeout waiting for writing bt_func7_sel\n");
-                 TWD_FinalizePolarityRead(pHwInit->hTWD);
-
-                return TI_NOK;
-
-               }
-             }
-
-             continue;
-
-
-         case 3:
-               /* second, write new value of IRQ polarity due to complation flag 1 - active low, 0 - active high*/
-                pHwInit->uRegStage ++;
-                Address = (TI_UINT32)(FN0_CCCR_REG_32 / 2);
-                value = (Address & 0x7FF);
-                value |= BIT_16 | BIT_17;
-
-                /* Write IRQ Polarity address register to OCP_POR_CTR*/
-               
-                BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_POR_CTR, value, 
-                                   REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-
-                twIf_Transact(pHwInit->hTwIf, pTxn);
-
-                pHwInit->uTxnIndex++;  
-
-#ifdef USE_IRQ_ACTIVE_HIGH
-                TRACE0(pHwInit->hReport, REPORT_SEVERITY_INFORMATION , "Hwinit IRQ polarity active high\n");
-                val |= 0x0<<1;
-                    
-#else
-                TRACE0(pHwInit->hReport, REPORT_SEVERITY_INFORMATION , "Hwinit IRQ polarity active low\n");
-                val |= 0x01<<1;
-#endif
-
-              /* Write the new IRQ polarity value to the OCP_POR_WDATA register */
-                BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_POR_WDATA, val, 
-                                   REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-                twIf_Transact(pHwInit->hTwIf, pTxn);
-
-                pHwInit->uTxnIndex++; 
-
-               /* Write write (1)command to the OCP_CMD register. */
-                BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_CMD, 0x1, 
-                                   REGISTER_SIZE, TXN_DIRECTION_WRITE, (TTxnDoneCb)hwInit_WriteIRQPolarity, hHwInit)
-                status = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-                pHwInit->uTxnIndex++; 
-
-                EXCEPT (pHwInit, status)              
-                continue;
-
-         case 4:
-
-               TWD_FinalizePolarityRead(pHwInit->hTWD);
-
-              return TI_OK;
-
-          
-         } /* End switch */
-
-     } /* End while */
-
- }
-
-
-/****************************************************************************
- *                      hwInit_InitTopRegisterWrite()
- ****************************************************************************
- * DESCRIPTION: hwInit_InitTopRegisterWrite
- * initalizie hwInit_TopRegisterWrite SM parmaeters
-  ****************************************************************************/
-
-TI_STATUS hwInit_InitTopRegisterWrite(TI_HANDLE hHwInit, TI_UINT32 uAddress, TI_UINT32 uValue)
-{
-  THwInit      *pHwInit = (THwInit *)hHwInit;
-
-  pHwInit->uTopStage = 0;
-  uAddress = (TI_UINT32)(uAddress / 2);
-  uAddress = (uAddress & 0x7FF);
-  uAddress|= BIT_16 | BIT_17;
-  pHwInit->uTopRegAddr = uAddress;
-  pHwInit->uTopRegValue = uValue & 0xffff;
-  return hwInit_TopRegisterWrite (hHwInit);
-}
-
-
-/****************************************************************************
- *                      hwInit_TopRegisterWrite ()
- ****************************************************************************
- * DESCRIPTION: Generic function that writes to the top registers area
-  * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
- TI_STATUS hwInit_TopRegisterWrite(TI_HANDLE hHwInit)
- {
-     /*  To write to a top level address from the WLAN IP:
-         Write the top level address to the OCP_POR_CTR register.
-         Divide the top address by 2, and add 0x30000 to the result – for example for top address 0xC00, write to the OCP_POR_CTR 0x30600
-         Write the data to the OCP_POR_WDATA register
-         Write 0x1 to the OCP_CMD register.
-     */
-     THwInit *pHwInit = (THwInit *)hHwInit;
-     TTxnStruct *pTxn;
-
-     while (TI_TRUE)
-     {
-         switch (pHwInit->uTopStage)
-         {
-         case 0:
-             pHwInit->uTopStage = 1;
-
-             pHwInit->uTxnIndex++;
-             /* Write the address to OCP_POR_CTR*/
-             BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_POR_CTR, pHwInit->uTopRegAddr,
-                                    REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-             twIf_Transact(pHwInit->hTwIf, pTxn);
-
-             pHwInit->uTxnIndex++;
-             /* Write the new value to the OCP_POR_WDATA register */
-             BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_POR_WDATA, pHwInit->uTopRegValue,
-                                    REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-             twIf_Transact(pHwInit->hTwIf, pTxn);
-
-             pHwInit->uTxnIndex++;
-             /* Write write (1)command to the OCP_CMD register. */
-             BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_CMD, 0x1,
-                                    REGISTER_SIZE, TXN_DIRECTION_WRITE, (TTxnDoneCb)hwInit_TopRegisterWrite, hHwInit)
-             pHwInit->uTopStatus = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-             pHwInit->uTxnIndex++;
-
-             EXCEPT (pHwInit, pHwInit->uTopStatus)              
-             continue;
-
-         case 1:
-
-             pHwInit->uTxnIndex = 0;
-             
-             if (pHwInit->uTopStatus == TXN_STATUS_PENDING) 
-             {
-                 hwInit_BootSm (hHwInit);
-             }
-             
-             return TI_OK;
-
-         } /* End switch */
-
-     } /* End while */
-
- }
-
-
- /****************************************************************************
- *                      hwInit_InitTopRegisterRead()
- ****************************************************************************
- * DESCRIPTION: hwInit_InitTopRegisterRead 
- * initalizie hwInit_InitTopRegisterRead SM parmaeters
-  ****************************************************************************/
-
-TI_STATUS hwInit_InitTopRegisterRead(TI_HANDLE hHwInit, TI_UINT32 uAddress)
-{
-  THwInit      *pHwInit = (THwInit *)hHwInit;
-
-  pHwInit->uTopStage = 0;
-  uAddress = (TI_UINT32)(uAddress / 2);
-  uAddress = (uAddress & 0x7FF);
-  uAddress|= BIT_16 | BIT_17;
-  pHwInit->uTopRegAddr = uAddress;
-
-  return hwInit_TopRegisterRead (hHwInit);
-}
-
-
-/****************************************************************************
- *                      hwInit_TopRegisterRead ()
- ****************************************************************************
- * DESCRIPTION: Generic function that reads the top registers area
-  * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
- TI_STATUS hwInit_TopRegisterRead(TI_HANDLE hHwInit)
- {
-     /*
-        To read from a top level address:
-        Write the top level address to the OCP_POR_CTR register.
-        Divide the top address by 2, and add 0x30000 to the result – for example for top address 0xC00, write to the OCP_POR_CTR 0x30600
-        Write 0x2 to the OCP_CMD register.
-        Poll bit [18] of OCP_DATA_RD for data valid indication
-        Check bits 17:16 of OCP_DATA_RD:
-        00 – no response
-        01 – data valid / accept
-        10 – request failed
-        11 – response error
-        Read the data from the OCP_DATA_RD register
-     */
-
-     THwInit *pHwInit = (THwInit *)hHwInit;
-     TTxnStruct *pTxn;
-
-     while (TI_TRUE)
-     {
-         switch (pHwInit->uTopStage)
-         {
-         case 0:
-             pHwInit->uTopStage = 1;
-             pHwInit->uTxnIndex++;
-             pHwInit->uRegLoop = 0;
-
-             /* Write the address to OCP_POR_CTR*/
-             BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_POR_CTR, pHwInit->uTopRegAddr,
-                                    REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-             twIf_Transact(pHwInit->hTwIf, pTxn);
-
-             pHwInit->uTxnIndex++;
-             BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_CMD, 0x2,
-                                    REGISTER_SIZE, TXN_DIRECTION_WRITE, NULL, NULL)
-             twIf_Transact(pHwInit->hTwIf, pTxn);
-
-             continue;
-
-         case 1:
-             pHwInit->uTopStage ++;
-             pHwInit->uTxnIndex++;
-
-             BUILD_HW_INIT_TXN_DATA(pHwInit, pTxn, OCP_DATA_RD, 0,
-                                    REGISTER_SIZE, TXN_DIRECTION_READ, (TTxnDoneCb)hwInit_TopRegisterRead, hHwInit)
-             pHwInit->uTopStatus = twIf_Transact(pHwInit->hTwIf, pTxn);
-
-             EXCEPT (pHwInit, pHwInit->uTopStatus)
-
-         case 2:
-             /* get the value from  IRQ Polarity register*/
-             pHwInit->uTopRegValue = pHwInit->aHwInitTxn[pHwInit->uTxnIndex].uData;
-
-             pHwInit->uTxnIndex = 0;
-
-             /*Poll bit 18 of OCP_DATA_RD for data valid indication*/
-             if (pHwInit->uTopRegValue & BIT_18)
-             {
-               if ((pHwInit->uTopRegValue & BIT_16) && (!(pHwInit->uTopRegValue & BIT_17)))
-               {
-                   pHwInit->uTopRegValue &= 0xffff;
-                   pHwInit->uTxnIndex = 0;
-                   pHwInit->uRegLoop = 0;
-                   if (pHwInit->uTopStatus == TXN_STATUS_PENDING) 
-                   {
-                       hwInit_BootSm (hHwInit);
-                   }
-                   return TI_OK;
-               }
-               else
-               {
-                 TRACE0(pHwInit->hReport, REPORT_SEVERITY_ERROR , "can't write bt_func7_sel\n");                 
-                 if (pHwInit->uTopStatus == TXN_STATUS_PENDING) 
-                 {
-                       hwInit_BootSm (hHwInit);
-                 }
-                 return TI_NOK;
-               }
-             }
-             else
-             {
-               if (pHwInit->uRegLoop < READ_TOP_REG_LOOP)
-               {
-                  pHwInit->uTopStage = 1;
-                  pHwInit->uRegLoop++;
-               }
-               else
-               {
-                 TRACE0(pHwInit->hReport, REPORT_SEVERITY_ERROR , "Timeout waiting for writing bt_func7_sel\n");
-                 if (pHwInit->uTopStatus == TXN_STATUS_PENDING) 
-                 {
-                       hwInit_BootSm (hHwInit);
-                 }
-                 return TI_NOK;
-               }
-              }
-
-             continue;
-
-         } /* End switch */
-
-     } /* End while */
-
- }
-
-
-/****************************************************************************
-*                      hwInit_StallTimerCb ()
-****************************************************************************
-* DESCRIPTION: CB timer function in fTimerFunction format that calls hwInit_StallTimerCb
-* INPUTS:  TI_HANDLE hHwInit    
-* 
-* OUTPUT:  None
-* 
-* RETURNS: None
-****************************************************************************/
-#ifdef DOWNLOAD_TIMER_REQUIERD
- static void hwInit_StallTimerCb (TI_HANDLE hHwInit, TI_BOOL bTwdInitOccured)
-{
-	hwInit_FinalizeDownloadSm (hHwInit);
-}
-#endif
diff --git a/wl1271/TWD/FW_Transfer/HwInit.h b/wl1271/TWD/FW_Transfer/HwInit.h
deleted file mode 100644
index f34e684..0000000
--- a/wl1271/TWD/FW_Transfer/HwInit.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * HwInit.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   HwInit.h                                               */
-/*    PURPOSE:  HwInit module Header file                             */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef _HW_INIT_H_
-#define _HW_INIT_H_
-
-
-#endif /* _HW_INIT_H_ */
diff --git a/wl1271/TWD/FW_Transfer/RxXfer.c b/wl1271/TWD/FW_Transfer/RxXfer.c
deleted file mode 100644
index 9e82964..0000000
--- a/wl1271/TWD/FW_Transfer/RxXfer.c
+++ /dev/null
@@ -1,909 +0,0 @@
-/*
- * RxXfer.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  rxXfer.c
- *
- *   PURPOSE: Rx Xfer module implementation.Responsible for reading Rx from the FW
- *              and forward it to the upper layers.
- * 
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_106
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "rxXfer_api.h"
-#include "FwEvent_api.h"
-#include "TWDriverInternal.h"
-#include "RxQueue_api.h"
-#include "TwIf.h"
-#include "public_host_int.h"
-#include "bmtrace_api.h"
-
-#define RX_DRIVER_COUNTER_ADDRESS 0x300538
-#define PLCP_HEADER_LENGTH 8
-#define WORD_SIZE   4
-#define UNALIGNED_PAYLOAD   0x1
-#define RX_DESCRIPTOR_SIZE          (sizeof(RxIfDescriptor_t))
-#define MAX_PACKETS_NUMBER          8
-#define MAX_CONSECUTIVE_READ_TXN    16
-#define MAX_PACKET_SIZE             8192    /* Max Txn size */
-
-#ifdef PLATFORM_SYMBIAN	/* UMAC is using only one buffer and therefore we can't use consecutive reads */
-    #define MAX_CONSECUTIVE_READS   1
-#else
-    #define MAX_CONSECUTIVE_READS   8
-#endif
-
-#define SLV_MEM_CP_VALUE(desc, offset)  (((RX_DESC_GET_MEM_BLK(desc) << 8) + offset))
-#define ALIGNMENT_SIZE(desc)            ((RX_DESC_GET_UNALIGNED(desc) & UNALIGNED_PAYLOAD) ? 2 : 0)
-
-#if (NUM_RX_PKT_DESC & (NUM_RX_PKT_DESC - 1))
-    #error  NUM_RX_PKT_DESC is not a power of 2 which may degrade performance when we calculate modulo!!
-#endif
-
-
-#ifdef TI_DBG
-typedef struct
-{
-    TI_UINT32           uCountFwEvents;
-    TI_UINT32           uCountPktsForward;
-    TI_UINT32           uCountBufPend;
-    TI_UINT32           uCountBufNoMem;
-    TI_UINT32           uCountPktAggreg[MAX_XFER_BUFS];
-
-} TRxXferDbgStat;
-#endif
-
-typedef struct
-{
-    TTxnStruct          tTxnStruct;
-    TI_UINT32           uRegData;
-    TI_UINT32           uRegAdata;
-
-} TRegTxn;
-
-typedef struct
-{
-    TTxnStruct          tTxnStruct;
-    TI_UINT32           uCounter;
-
-} TCounterTxn;
-
-typedef struct
-{
-    TI_HANDLE           hOs;
-    TI_HANDLE           hReport;
-    TI_HANDLE           hTwIf;
-    TI_HANDLE           hFwEvent;
-    TI_HANDLE           hRxQueue;
-
-    TI_UINT32           aRxPktsDesc[NUM_RX_PKT_DESC];           /* Save Rx packets short descriptors from FwStatus */
-    TI_UINT32           uFwRxCntr;                              /* Save last FW packets counter from FwStatus */
-    TI_UINT32           uDrvRxCntr;                             /* The current driver processed packets counter */
-    TI_UINT32           uPacketMemoryPoolStart;                 /* The FW mem-blocks area base address */
-    TI_UINT32           uMaxAggregLen;                          /* The max length in bytes of aggregated packets transaction */
-    TI_UINT32           uMaxAggregPkts;                         /* The max number of packets that may be aggregated in one transaction */
-    TRequestForBufferCb RequestForBufferCB;                     /* Upper layer CB for allocating buffers for packets */
-    TI_HANDLE           RequestForBufferCB_handle;              /* The upper later CB handle */
-    TI_BOOL             bPendingBuffer;                         /* If TRUE, we exited the Rx handler upon pending-buffer */
-
-    TI_UINT32           uCurrTxnIndex;                          /* The current Txn structures index to use */
-    TI_UINT32           uAvailableTxn;                          /* Number of Txn structures currently available */
-    TRegTxn             aSlaveRegTxn[MAX_CONSECUTIVE_READ_TXN]; /* Txn structures for writing mem-block address reg */
-    TTxnStruct          aTxnStruct[MAX_CONSECUTIVE_READ_TXN];   /* Txn structures for reading the Rx packets */
-    TCounterTxn         aCounterTxn[MAX_CONSECUTIVE_READ_TXN];  /* Txn structures for writing the driver counter workaround */
-
-    TI_UINT8            aTempBuffer[MAX_PACKET_SIZE];           /* Dummy buffer to use if we couldn't get a buffer for the packet (so drop the packet) */
-    TFailureEventCb     fErrCb;                                 /* The upper layer CB function for error handling */
-    TI_HANDLE           hErrCb;                                 /* The CB function handle */
-
-#ifdef TI_DBG
-    TRxXferDbgStat      tDbgStat;
-#endif
-
-} TRxXfer;
-
-
-/************************ static function declaration *****************************/
-static TI_STATUS rxXfer_Handle(TI_HANDLE hRxXfer);
-static void rxXfer_TxnDoneCb (TI_HANDLE hRxXfer, TTxnStruct* pTxn);
-static void         rxXfer_PktDropTxnDoneCb (TI_HANDLE hRxXfer, TTxnStruct *pTxn);
-static ETxnStatus   rxXfer_IssueTxn (TI_HANDLE hRxXfer, TI_UINT32 uFirstMemBlkAddr);
-static void         rxXfer_ForwardPacket (TRxXfer* pRxXfer, TTxnStruct* pTxn);
-
-
-/****************************************************************************
- *                      RxXfer_Create()
- ****************************************************************************
- * DESCRIPTION: Create the RxXfer module object 
- * 
- * INPUTS:  None
- * 
- * OUTPUT:  None
- * 
- * RETURNS: The Created object
- ****************************************************************************/
-TI_HANDLE rxXfer_Create (TI_HANDLE hOs)
-{
-    TRxXfer *pRxXfer;
-
-    pRxXfer = os_memoryAlloc (hOs, sizeof(TRxXfer));
-    if (pRxXfer == NULL)
-        return NULL;
-
-    /* For all the counters */
-    os_memoryZero (hOs, pRxXfer, sizeof(TRxXfer));
-
-    pRxXfer->hOs = hOs;
-
-    return (TI_HANDLE)pRxXfer;
-}
-
-
-/****************************************************************************
- *                      RxXfer_Destroy()
- ****************************************************************************
- * DESCRIPTION: Destroy the RxXfer module object 
- * 
- * INPUTS:  hRxXfer - The object to free
- * 
- * OUTPUT:  None
- * 
- * RETURNS: 
- ****************************************************************************/
-void rxXfer_Destroy (TI_HANDLE hRxXfer)
-{
-    TRxXfer *pRxXfer = (TRxXfer *)hRxXfer;
-
-    if (pRxXfer)
-    {
-        os_memoryFree (pRxXfer->hOs, pRxXfer, sizeof(TRxXfer));
-    }
-}
-
-
-/****************************************************************************
- *                      rxXfer_init()
- ****************************************************************************
- * DESCRIPTION: Init the module object
- * 
- * INPUTS:      hRxXfer - module handle;
- *              other modules handles.
- * 
- * OUTPUT:  None
- * 
- * RETURNS: None
- ****************************************************************************/
-void rxXfer_Init(TI_HANDLE hRxXfer,
-                 TI_HANDLE hFwEvent, 
-                 TI_HANDLE hReport,
-                 TI_HANDLE hTwIf,
-                 TI_HANDLE hRxQueue)
-{
-    TRxXfer *pRxXfer        = (TRxXfer *)hRxXfer;
-    pRxXfer->hFwEvent       = hFwEvent;
-    pRxXfer->hReport        = hReport;
-    pRxXfer->hTwIf          = hTwIf;
-    pRxXfer->hRxQueue       = hRxQueue;
-
-    rxXfer_Restart (hRxXfer);
-
-#ifdef TI_DBG   
-    rxXfer_ClearStats (pRxXfer);
-#endif
-}
-
-
-/****************************************************************************
- *                      rxXfer_SetDefaults()
- ****************************************************************************
- * DESCRIPTION: Set module parameters default setting
- *
- * INPUTS:      hRxXfer - module handle;
- *
- * OUTPUT:  None
- *
- * RETURNS: None
- ****************************************************************************/
-void rxXfer_SetDefaults (TI_HANDLE hRxXfer, TTwdInitParams *pInitParams)
-{
-    TRxXfer *pRxXfer = (TRxXfer *)hRxXfer;
-
-    pRxXfer->uMaxAggregPkts = pInitParams->tGeneral.uRxAggregPktsLimit;
-}
-
-
-/****************************************************************************
- *                      rxXfer_SetBusParams()
- ****************************************************************************
- * DESCRIPTION: Configure bus driver DMA-able buffer length to be used as a limit to the aggragation length.
- * 
- * INPUTS:      hRxXfer    - module handle
- *              uDmaBufLen - The bus driver DMA-able buffer length
- * 
- * OUTPUT:  None
- * 
- * RETURNS: None
- ****************************************************************************/
-void rxXfer_SetBusParams (TI_HANDLE hRxXfer, TI_UINT32 uDmaBufLen)
-{
-    TRxXfer *pRxXfer = (TRxXfer *)hRxXfer;
-
-    pRxXfer->uMaxAggregLen = uDmaBufLen;
-}
-
-
-/****************************************************************************
- *                      rxXfer_Register_CB()
- ****************************************************************************
- * DESCRIPTION: Register the function to be called for request for buffer.
- * 
- * INPUTS:      hRxXfer       - RxXfer handle;
- * 
- * OUTPUT:  None
- * 
- * RETURNS: None
- ****************************************************************************/
-void rxXfer_Register_CB (TI_HANDLE hRxXfer, TI_UINT32 CallBackID, void *CBFunc, TI_HANDLE CBObj)
-{
-    TRxXfer *pRxXfer = (TRxXfer *)hRxXfer;
-
-    TRACE1(pRxXfer->hReport, REPORT_SEVERITY_INFORMATION , "rxXfer_Register_CB (Value = 0x%x)\n", CallBackID);
-
-    switch(CallBackID)
-    {
-    case TWD_INT_REQUEST_FOR_BUFFER:       
-        pRxXfer->RequestForBufferCB = (TRequestForBufferCb)CBFunc;
-        pRxXfer->RequestForBufferCB_handle = CBObj;
-        break;
-
-    default:
-        TRACE0(pRxXfer->hReport, REPORT_SEVERITY_ERROR, "rxXfer_Register_CB - Illegal value\n");
-        return;
-    }
-}
-
-
-/****************************************************************************
- *                      rxXfer_ForwardPacket()
- ****************************************************************************
- * DESCRIPTION:  Forward received packet(s) to the upper layers.
- *
- * INPUTS:      
- * 
- * OUTPUT:      
- * 
- * RETURNS:     
- ****************************************************************************/
-static void rxXfer_ForwardPacket (TRxXfer *pRxXfer, TTxnStruct *pTxn)
-{
-    TI_UINT32 uBufNum;
-    RxIfDescriptor_t *pRxInfo  = (RxIfDescriptor_t*)(pTxn->aBuf[0]);
-#ifdef TI_DBG   /* for packet sanity check */
-    TI_UINT16        uLenFromRxInfo;
-#endif
-
-    /* Go over all occupied Txn buffers and forward their Rx packets upward */
-    for (uBufNum = 0; uBufNum < MAX_XFER_BUFS; uBufNum++)
-    {
-        /* If no more buffers, exit the loop */
-        if (pTxn->aLen[uBufNum] == 0)
-        {
-            break;
-        }
-
-#ifdef TI_DBG   /* Packet sanity check */
-        /* Get length from RxInfo, handle endianess and convert to length in bytes */
-        pRxInfo = (RxIfDescriptor_t*)(pTxn->aBuf[uBufNum]);
-        uLenFromRxInfo = ENDIAN_HANDLE_WORD(pRxInfo->length) << 2;
-
-        /* If the length in the RxInfo is different than in the short descriptor, set error status */
-        if (pTxn->aLen[uBufNum] != uLenFromRxInfo)
-        {
-            TRACE3(pRxXfer->hReport, REPORT_SEVERITY_ERROR , "rxXfer_ForwardPacket: Bad Length!! RxInfoLength=%d, ShortDescLen=%d, RxInfoStatus=0x%x\n", uLenFromRxInfo, pTxn->aLen[uBufNum], pRxInfo->status);
-
-            pRxInfo->status &= ~RX_DESC_STATUS_MASK;
-            pRxInfo->status |= RX_DESC_STATUS_DRIVER_RX_Q_FAIL;
-            pRxInfo->length = ENDIAN_HANDLE_WORD(pTxn->aLen[uBufNum] >> 2);
-
-            /* If error CB available, trigger recovery !! */
-            if (pRxXfer->fErrCb)
-            {
-                pRxXfer->fErrCb (pRxXfer->hErrCb, RX_XFER_FAILURE);
-            }
-        }
-        else 
-        {
-            TRACE2(pRxXfer->hReport, REPORT_SEVERITY_INFORMATION , "rxXfer_ForwardPacket: RxInfoLength=%d, RxInfoStatus=0x%x\n", uLenFromRxInfo, pRxInfo->status);
-        }
-        pRxXfer->tDbgStat.uCountPktsForward++;
-#endif
-
-        /* This is the last packet in the Burst so mark its EndOfBurst flag */
-        if (TXN_PARAM_GET_END_OF_BURST(pTxn) && (uBufNum == (MAX_XFER_BUFS - 1) || pTxn->aLen[uBufNum + 1] == 0))
-        {
-            TXN_PARAM_SET_END_OF_BURST(pTxn, 0);
-            pRxInfo->driverFlags |= DRV_RX_FLAG_END_OF_BURST;
-        }
-        /* Forward received packet to the upper layers */
-        RxQueue_ReceivePacket (pRxXfer->hRxQueue, (const void *)pTxn->aBuf[uBufNum]);
-    }
-
-    /* reset the aBuf field for clean on recovery purpose */
-    pTxn->aBuf[0] = 0;
-}
-
-
-/****************************************************************************
- *                      rxXfer_RxEvent()
- ****************************************************************************
- * DESCRIPTION: Called upon Rx event from the FW.calls the SM  
- * 
- * INPUTS:      hRxXfer       - RxXfer handle;
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TWIF_OK in case of Synch mode, or TWIF_PENDING in case of Asynch mode
- *          (when returning TWIF_PENDING, FwEvent module expects the FwEvent_EventComplete()
- *          function call to finish the Rx Client handling 
- *
- ****************************************************************************/
-ETxnStatus rxXfer_RxEvent (TI_HANDLE hRxXfer, FwStatus_t *pFwStatus)
-{
-    TRxXfer        *pRxXfer = (TRxXfer *)hRxXfer;
-    TI_UINT32      uTempCounters;
-    FwStatCntrs_t  *pFwStatusCounters;
-    TI_UINT32       i;
-    TI_STATUS   rc;
-    CL_TRACE_START_L2();
-  
-    uTempCounters = ENDIAN_HANDLE_LONG (pFwStatus->counters);
-    pFwStatusCounters = (FwStatCntrs_t*)(&uTempCounters);
-
-    TRACE2(pRxXfer->hReport, REPORT_SEVERITY_INFORMATION , "rxXfer_RxEvent: NewFwCntr=%d, OldFwCntr=%d\n", pFwStatusCounters->fwRxCntr, pRxXfer->uFwRxCntr);
-
-    /* If no new Rx packets - exit */
-    if ((pFwStatusCounters->fwRxCntr % NUM_RX_PKT_DESC) == (pRxXfer->uFwRxCntr % NUM_RX_PKT_DESC))
-    {
-        CL_TRACE_END_L2("tiwlan_drv.ko", "CONTEXT", "RX", "");
-        return TXN_STATUS_COMPLETE;
-    }
-
-#ifdef TI_DBG
-    pRxXfer->tDbgStat.uCountFwEvents++;
-#endif
-
-    /* Save current FW counter and Rx packets short descriptors for processing */
-    pRxXfer->uFwRxCntr = pFwStatusCounters->fwRxCntr;
-    for (i = 0; i < NUM_RX_PKT_DESC; i++)
-    {
-        pRxXfer->aRxPktsDesc[i] = ENDIAN_HANDLE_LONG (pFwStatus->rxPktsDesc[i]); 
-    }
-
-    /* Handle all new Rx packets */
-    rc = rxXfer_Handle (pRxXfer);
-
-    CL_TRACE_END_L2("tiwlan_drv.ko", "CONTEXT", "RX", "");
-    return TXN_STATUS_COMPLETE;
-}
-
-
-/****************************************************************************
- *                      rxXfer_Handle()
- ****************************************************************************
- * DESCRIPTION: 
- *
- * INPUTS:      hRxXfer       - RxXfer handle;
- * 
- * OUTPUT:      
- * 
- * RETURNS:     
- ****************************************************************************/
-static TI_STATUS rxXfer_Handle(TI_HANDLE hRxXfer)
-{
-#ifndef _VLCT_
-    TRxXfer *        pRxXfer          = (TRxXfer *)hRxXfer;
-    TI_BOOL          bIssueTxn        = TI_FALSE; /* If TRUE transact current aggregated packets */
-    TI_BOOL          bDropLastPkt     = TI_FALSE; /* If TRUE, need to drop last packet (RX_BUF_ALLOC_OUT_OF_MEM) */
-    TI_BOOL          bExit            = TI_FALSE; /* If TRUE, can't process further packets so exit (after serving the other flags) */
-    TI_UINT32        uAggregPktsNum   = 0;        /* Number of aggregated packets */
-    TI_UINT32        uFirstMemBlkAddr = 0;
-    TI_UINT32        uRxDesc          = 0;
-    TI_UINT32        uBuffSize        = 0;
-    TI_UINT32        uTotalAggregLen  = 0;
-    TI_UINT32        uDrvIndex;
-    TI_UINT32        uFwIndex;
-    TI_UINT8 *       pHostBuf;
-    TTxnStruct *     pTxn = NULL;
-    ETxnStatus       eTxnStatus;
-    ERxBufferStatus  eBufStatus;
-    PacketClassTag_e eRxPacketType;
-    CL_TRACE_START_L2();
-
-
-    /* If no Txn structures available exit!! (fatal error - not expected to happen) */
-    if (pRxXfer->uAvailableTxn == 0 )
-    {
-        TRACE0(pRxXfer->hReport, REPORT_SEVERITY_ERROR, "rxXfer_Handle: No available Txn structures left!\n");
-        CL_TRACE_END_L2("tiwlan_drv.ko", "CONTEXT", "RX", "");
-        return TI_NOK;
-    }
-
-    uFwIndex = pRxXfer->uFwRxCntr % NUM_RX_PKT_DESC;
-
-    /* Loop while Rx packets can be transfered from the FW */
-    while (1)
-    {
-        uDrvIndex = pRxXfer->uDrvRxCntr % NUM_RX_PKT_DESC;
-
-        /* If there are unprocessed Rx packets */
-        if (uDrvIndex != uFwIndex)
-        {
-            /* Get next packte info */
-            uRxDesc       = pRxXfer->aRxPktsDesc[uDrvIndex];
-            uBuffSize     = RX_DESC_GET_LENGTH(uRxDesc) << 2;
-            eRxPacketType = (PacketClassTag_e)RX_DESC_GET_PACKET_CLASS_TAG (uRxDesc);
-
-            /* If new packet exceeds max aggregation length, set flag to send previous packets (postpone it to next loop) */
-            if ((uTotalAggregLen + uBuffSize) > pRxXfer->uMaxAggregLen)
-            {
-                bIssueTxn = TI_TRUE;
-            }
-
-            /* No length limit so try to aggregate new packet */
-            else
-            {
-                /* Allocate host read buffer */
-                /* The RxBufAlloc() add an extra word for MAC header alignment in case of QoS MSDU */
-                eBufStatus = pRxXfer->RequestForBufferCB(pRxXfer->RequestForBufferCB_handle,
-                                                         (void**)&pHostBuf,
-                                                         uBuffSize,
-                                                         (TI_UINT32)NULL,
-                                                         eRxPacketType);
-
-                TRACE6(pRxXfer->hReport, REPORT_SEVERITY_INFORMATION , "rxXfer_Handle: Index=%d, RxDesc=0x%x, DrvCntr=%d, FwCntr=%d, BufStatus=%d, BuffSize=%d\n", uDrvIndex, uRxDesc, pRxXfer->uDrvRxCntr, pRxXfer->uFwRxCntr, eBufStatus, uBuffSize);
-
-                /* If buffer allocated, add it to current Txn (up to 4 packets aggregation) */
-                if (eBufStatus == RX_BUF_ALLOC_COMPLETE)
-                {
-                    /* If first aggregated packet prepare the next Txn struct */
-                    if (uAggregPktsNum == 0)
-                    {
-                        pTxn = (TTxnStruct*)&(pRxXfer->aTxnStruct[pRxXfer->uCurrTxnIndex]);
-                        pTxn->uHwAddr = SLV_MEM_DATA;
-
-                        /* Save first mem-block of first aggregated packet! */
-                        uFirstMemBlkAddr = SLV_MEM_CP_VALUE(uRxDesc, pRxXfer->uPacketMemoryPoolStart);
-                    }
-                    pTxn->aBuf[uAggregPktsNum] = pHostBuf + ALIGNMENT_SIZE(uRxDesc);
-                    pTxn->aLen[uAggregPktsNum] = uBuffSize;
-                    uAggregPktsNum++;
-                    uTotalAggregLen += uBuffSize;
-                    if (uAggregPktsNum >= pRxXfer->uMaxAggregPkts)
-                    {
-                        bIssueTxn = TI_TRUE;
-                    }
-                    pRxXfer->uDrvRxCntr++;
-                }
-
-                /* If buffer pending until freeing previous buffer, set Exit flag and if needed set IssueTxn flag. */
-                else if (eBufStatus == RX_BUF_ALLOC_PENDING)
-                {
-                    bExit = TI_TRUE;
-                    pRxXfer->bPendingBuffer = TI_TRUE;
-                    if (uAggregPktsNum > 0)
-                    {
-                        bIssueTxn = TI_TRUE;
-                    }
-#ifdef TI_DBG
-                    pRxXfer->tDbgStat.uCountBufPend++;
-#endif
-                }
-
-                /* If no buffer due to out-of-memory, set DropLastPkt flag and if needed set IssueTxn flag. */
-                else
-                {
-                    bDropLastPkt = TI_TRUE;
-                    if (uAggregPktsNum > 0)
-                    {
-                        bIssueTxn = TI_TRUE;
-                    }
-#ifdef TI_DBG
-                    pRxXfer->tDbgStat.uCountBufNoMem++;
-#endif
-                }
-            }
-        }
-
-        /* If no more packets, set Exit flag and if needed set IssueTxn flag. */
-        else
-        {
-            bExit = TI_TRUE;
-            if (uAggregPktsNum > 0)
-            {
-                bIssueTxn = TI_TRUE;
-            }
-        }
-
-
-        /* If required to send Rx packet(s) transaction */
-        if (bIssueTxn)
-        {
-            if (bExit)
-            {
-                TXN_PARAM_SET_END_OF_BURST(pTxn, 1);
-            }
-            /* If not all 4 Txn buffers are used, reset first unused buffer length for indication */
-            if (uAggregPktsNum < MAX_XFER_BUFS)
-            {
-                pTxn->aLen[uAggregPktsNum] = 0;
-            }
-
-            eTxnStatus = rxXfer_IssueTxn (pRxXfer, uFirstMemBlkAddr);
-
-            if (eTxnStatus == TXN_STATUS_COMPLETE)
-            {
-                /* Forward received packet to the upper layers */
-                rxXfer_ForwardPacket (pRxXfer, pTxn);
-            }
-            else if (eTxnStatus == TXN_STATUS_PENDING)
-            {
-                /* Decrease the number of available txn structures */
-                pRxXfer->uAvailableTxn--;
-            }
-            else
-            {
-                TRACE3(pRxXfer->hReport, REPORT_SEVERITY_ERROR , "rxXfer_Handle: Status=%d, DrvCntr=%d, RxDesc=0x%x\n", eTxnStatus, pRxXfer->uDrvRxCntr, uRxDesc);
-            }
-
-#ifdef TI_DBG
-            pRxXfer->tDbgStat.uCountPktAggreg[uAggregPktsNum - 1]++;
-#endif
-
-            uAggregPktsNum  = 0;
-            uTotalAggregLen = 0;
-            bIssueTxn       = TI_FALSE;
-            pRxXfer->uCurrTxnIndex = (pRxXfer->uCurrTxnIndex + 1) % MAX_CONSECUTIVE_READ_TXN;
-        }
-
-        /* If last packet should be dropped (no memory for host buffer) */
-        if (bDropLastPkt)
-        {
-            /* Increment driver packets counter before calling rxXfer_IssueTxn() */
-            pRxXfer->uDrvRxCntr++;
-
-            /* Read packet to dummy buffer and ignore it (no callback needed) */
-            uFirstMemBlkAddr = SLV_MEM_CP_VALUE(uRxDesc, pRxXfer->uPacketMemoryPoolStart);
-            pTxn = (TTxnStruct*)&pRxXfer->aTxnStruct[pRxXfer->uCurrTxnIndex];
-            BUILD_TTxnStruct(pTxn, SLV_MEM_DATA, pRxXfer->aTempBuffer, uBuffSize, (TTxnDoneCb)rxXfer_PktDropTxnDoneCb, hRxXfer)
-            eTxnStatus = rxXfer_IssueTxn (pRxXfer, uFirstMemBlkAddr);
-            if (eTxnStatus == TXN_STATUS_PENDING)
-            {
-                pRxXfer->uAvailableTxn--;
-            }
-            pRxXfer->uCurrTxnIndex = (pRxXfer->uCurrTxnIndex + 1) % MAX_CONSECUTIVE_READ_TXN;
-            bDropLastPkt = TI_FALSE;
-        }
-
-        /* Can't process more packets so exit */
-        if (bExit)
-        {
-            CL_TRACE_END_L2("tiwlan_drv.ko", "CONTEXT", "RX", "");
-            return TI_OK;
-        }
-
-    } /* End of while(1) */
-
-    /* Unreachable code */
-
-#endif
-}
-
-
-/****************************************************************************
- *                      rxXfer_IssueTxn()
- ****************************************************************************
- * DESCRIPTION:
- *
- * INPUTS:
- *
- * OUTPUT:
- *
- * RETURNS:
- ****************************************************************************/
-static ETxnStatus rxXfer_IssueTxn (TI_HANDLE hRxXfer, TI_UINT32 uFirstMemBlkAddr)
-{
-    TRxXfer    *pRxXfer = (TRxXfer *)hRxXfer;
-    TI_UINT32   uIndex  = pRxXfer->uCurrTxnIndex;
-    TTxnStruct *pTxn;
-    ETxnStatus  eStatus;
-
-    /* Write the next mem block that we want to read */
-    pTxn = &pRxXfer->aSlaveRegTxn[uIndex].tTxnStruct;
-    pTxn->uHwAddr = SLV_REG_DATA;
-    pRxXfer->aSlaveRegTxn[uIndex].uRegData  = ENDIAN_HANDLE_LONG(uFirstMemBlkAddr);
-    pRxXfer->aSlaveRegTxn[uIndex].uRegAdata = ENDIAN_HANDLE_LONG(uFirstMemBlkAddr + 4);
-    twIf_Transact(pRxXfer->hTwIf, pTxn);
-
-    /* Issue the packet(s) read transaction (prepared in rxXfer_Handle) */
-    pTxn = &pRxXfer->aTxnStruct[uIndex];
-    eStatus = twIf_Transact(pRxXfer->hTwIf, pTxn);
-
-    /* Write driver packets counter to FW. This write automatically generates interrupt to FW */
-    /* Note: Workaround for WL6-PG1.0 is still needed for PG2.0   ==>  if (pRxXfer->bChipIs1273Pg10)  */
-    pTxn = &pRxXfer->aCounterTxn[uIndex].tTxnStruct;
-    pTxn->uHwAddr = RX_DRIVER_COUNTER_ADDRESS;
-    pRxXfer->aCounterTxn[uIndex].uCounter = ENDIAN_HANDLE_LONG(pRxXfer->uDrvRxCntr);
-    twIf_Transact(pRxXfer->hTwIf, pTxn);
-
-    TRACE5(pRxXfer->hReport, REPORT_SEVERITY_INFORMATION , "rxXfer_IssueTxn: Counter-Txn: HwAddr=0x%x, Len0=%d, Data0=%d, DrvCount=%d, TxnParams=0x%x\n", pTxn->uHwAddr, pTxn->aLen[0], *(TI_UINT32 *)(pTxn->aBuf[0]), pRxXfer->uDrvRxCntr, pTxn->uTxnParams);
-
-    /* Return the status of the packet(s) transaction - COMPLETE, PENDING or ERROR */
-    return eStatus;
-}
-  
-
-/****************************************************************************
- *                      rxXfer_SetRxDirectAccessParams()
- ****************************************************************************
- * DESCRIPTION: 
- *
- * INPUTS:      
- * 
- * OUTPUT:      
- * 
- * RETURNS:     
- ****************************************************************************/
-void rxXfer_SetRxDirectAccessParams (TI_HANDLE hRxXfer, TDmaParams *pDmaParams)
-{
-    TRxXfer *pRxXfer = (TRxXfer *)hRxXfer;
-
-    pRxXfer->uPacketMemoryPoolStart = pDmaParams->PacketMemoryPoolStart;
-}
-
-
-/****************************************************************************
- *                      rxXfer_TxnDoneCb()
- ****************************************************************************
- * DESCRIPTION: Forward the packet to the registered CB
- *
- * INPUTS:      
- * 
- * OUTPUT:      
- * 
- * RETURNS:     
- ****************************************************************************/
-static void rxXfer_TxnDoneCb (TI_HANDLE hRxXfer, TTxnStruct *pTxn)
-{
-    TRxXfer *pRxXfer = (TRxXfer *)hRxXfer;
-    CL_TRACE_START_L2();
-    
-    /* Increase the number of available txn structures */
-    pRxXfer->uAvailableTxn++;
-
-    /* Forward received packet to the upper layers */
-    rxXfer_ForwardPacket (pRxXfer, pTxn);
-
-    /* If we exited the handler upon pending-buffer, call it again to handle further packets if any */
-    if (pRxXfer->bPendingBuffer)
-    {
-        pRxXfer->bPendingBuffer = TI_FALSE;
-        rxXfer_Handle (hRxXfer);
-    }
-
-    CL_TRACE_END_L2("tiwlan_drv.ko", "INHERIT", "RX", "");
-}
-
-
-/****************************************************************************
- *                      rxXfer_PktDropTxnDoneCb()
- ****************************************************************************
- * DESCRIPTION: Dummy CB for case of dropping a packet due to out-of-memory.
- *
- * INPUTS:
- *
- * OUTPUT:
- *
- * RETURNS:
- ****************************************************************************/
-static void rxXfer_PktDropTxnDoneCb (TI_HANDLE hRxXfer, TTxnStruct *pTxn)
-{
-    TRxXfer *pRxXfer = (TRxXfer *)hRxXfer;
-
-    /* Increase the number of available txn structures */
-    pRxXfer->uAvailableTxn++;
-
-    /* Restore the regular TxnDone callback to the used structure */
-    pTxn->fTxnDoneCb = (TTxnDoneCb)rxXfer_TxnDoneCb;
-    pTxn->hCbHandle  = hRxXfer;
-}
-
-
-/****************************************************************************
- *                      rxXfer_Restart()
- ****************************************************************************
- * DESCRIPTION:	rxXfer_Restart the RxXfer module object (called by the recovery)
- * 
- * INPUTS:	hRxXfer - The object to free
- * 
- * OUTPUT:	None
- * 
- * RETURNS:	NONE 
- ****************************************************************************/
-void rxXfer_Restart(TI_HANDLE hRxXfer)
-{
-	TRxXfer *pRxXfer = (TRxXfer *)hRxXfer;
-    TTxnStruct* pTxn;
-    TI_UINT8    i;
-
-    pRxXfer->uFwRxCntr     = 0;
-    pRxXfer->uDrvRxCntr    = 0;
-    pRxXfer->uCurrTxnIndex = 0;
-    pRxXfer->uAvailableTxn = MAX_CONSECUTIVE_READ_TXN - 1;
-
-    /* Scan all transaction array and release only pending transaction */
-    for (i = 0; i < MAX_CONSECUTIVE_READ_TXN; i++)
-    {
-        pTxn = &(pRxXfer->aTxnStruct[i]);
-
-        /* Check if buffer allocated and not the dummy one (has a different callback) */
-        if ((pTxn->aBuf[0] != 0) && (pTxn->fTxnDoneCb == (TTxnDoneCb)rxXfer_TxnDoneCb))
-        {
-            TI_UINT32 uBufNum;
-            RxIfDescriptor_t *pRxParams;
-
-            /* Go over the Txn occupied  buffers and mark them as TAG_CLASS_UNKNOWN to be freed */
-            for (uBufNum = 0; uBufNum < MAX_XFER_BUFS; uBufNum++)
-            {
-                /* If no more buffers, exit the loop */
-                if (pTxn->aLen[uBufNum] == 0)
-                {
-                    break;
-                }
-
-                pRxParams = (RxIfDescriptor_t *)(pTxn->aBuf[uBufNum]);
-                pRxParams->packet_class_tag = TAG_CLASS_UNKNOWN;
-            }
-
-            /* Call upper layer only to release the allocated buffer */
-            rxXfer_ForwardPacket (pRxXfer, pTxn);
-        }
-    }
-
-    /* Fill the transaction structures fields that have constant values */
-    for (i = 0; i < MAX_CONSECUTIVE_READ_TXN; i++)
-    {
-        /* First mem-block address (two consecutive registers) */
-        pTxn = &(pRxXfer->aSlaveRegTxn[i].tTxnStruct);
-        TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-        BUILD_TTxnStruct(pTxn, SLV_REG_DATA, &pRxXfer->aSlaveRegTxn[i].uRegData, REGISTER_SIZE*2, NULL, NULL)
-
-        /* The packet(s) read transaction */
-        pTxn = &(pRxXfer->aTxnStruct[i]);
-        TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_READ, TXN_FIXED_ADDR)
-        pTxn->fTxnDoneCb = (TTxnDoneCb)rxXfer_TxnDoneCb;
-        pTxn->hCbHandle  = hRxXfer;
-
-        /* The driver packets counter */
-        pTxn = &(pRxXfer->aCounterTxn[i].tTxnStruct);
-        TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-        BUILD_TTxnStruct(pTxn, RX_DRIVER_COUNTER_ADDRESS, &pRxXfer->aCounterTxn[i].uCounter, REGISTER_SIZE, NULL, NULL)
-    }
-	
-}
-
-
-/****************************************************************************
- *                      rxXfer_RegisterErrCb()
- ****************************************************************************
- * DESCRIPTION: Register Error CB
- *
- * INPUTS:
- *          hRxXfer - The object
- *          ErrCb   - The upper layer CB function for error handling
- *          hErrCb  - The CB function handle
- *
- * OUTPUT:  None
- *
- * RETURNS: void
- ****************************************************************************/
-void rxXfer_RegisterErrCb (TI_HANDLE hRxXfer, void *fErrCb, TI_HANDLE hErrCb)
-{
-    TRxXfer *pRxXfer = (TRxXfer *)hRxXfer;
-
-    /* Save upper layer (health monitor) CB for recovery from fatal error */
-    pRxXfer->fErrCb = (TFailureEventCb)fErrCb;
-    pRxXfer->hErrCb = hErrCb;
-}
-
-
-#ifdef TI_DBG
-/****************************************************************************
- *                      rxXfer_ClearStats()
- ****************************************************************************
- * DESCRIPTION: 
- *
- * INPUTS:  
- *          pRxXfer The object
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK. 
- ****************************************************************************/
-void rxXfer_ClearStats (TI_HANDLE hRxXfer)
-{
-    TRxXfer *pRxXfer = (TRxXfer *)hRxXfer;
-
-    os_memoryZero (pRxXfer->hOs, &pRxXfer->tDbgStat, sizeof(TRxXferDbgStat));
-}
-
-
-/****************************************************************************
- *                      rxXfer_PrintStats()
- ****************************************************************************
- * DESCRIPTION: .
- *
- * INPUTS:  
- *          pRxXfer The object
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK. 
- ****************************************************************************/
-void rxXfer_PrintStats (TI_HANDLE hRxXfer)
-{
-#ifdef REPORT_LOG
-    TRxXfer *pRxXfer = (TRxXfer *)hRxXfer;
-    
-    WLAN_OS_REPORT(("Print RX Xfer module info\n"));
-    WLAN_OS_REPORT(("=========================\n"));
-    WLAN_OS_REPORT(("uMaxAggregPkts     = %d\n", pRxXfer->uMaxAggregPkts));
-    WLAN_OS_REPORT(("uMaxAggregLen      = %d\n", pRxXfer->uMaxAggregLen));
-    WLAN_OS_REPORT(("FW counter         = %d\n", pRxXfer->uFwRxCntr));
-    WLAN_OS_REPORT(("Drv counter        = %d\n", pRxXfer->uDrvRxCntr));
-    WLAN_OS_REPORT(("AvailableTxn       = %d\n", pRxXfer->uAvailableTxn));
-    WLAN_OS_REPORT(("uCountFwEvents     = %d\n", pRxXfer->tDbgStat.uCountFwEvents));
-    WLAN_OS_REPORT(("uCountPktsForward  = %d\n", pRxXfer->tDbgStat.uCountPktsForward));
-    WLAN_OS_REPORT(("uCountBufPend      = %d\n", pRxXfer->tDbgStat.uCountBufPend));
-    WLAN_OS_REPORT(("uCountBufNoMem     = %d\n", pRxXfer->tDbgStat.uCountBufNoMem));
-    WLAN_OS_REPORT(("uCountPktAggreg-1  = %d\n", pRxXfer->tDbgStat.uCountPktAggreg[0]));
-    WLAN_OS_REPORT(("uCountPktAggreg-2  = %d\n", pRxXfer->tDbgStat.uCountPktAggreg[1]));
-    WLAN_OS_REPORT(("uCountPktAggreg-3  = %d\n", pRxXfer->tDbgStat.uCountPktAggreg[2]));
-    WLAN_OS_REPORT(("uCountPktAggreg-4  = %d\n", pRxXfer->tDbgStat.uCountPktAggreg[3]));
-#endif
-}
-#endif
diff --git a/wl1271/TWD/FW_Transfer/RxXfer.h b/wl1271/TWD/FW_Transfer/RxXfer.h
deleted file mode 100644
index c075128..0000000
--- a/wl1271/TWD/FW_Transfer/RxXfer.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * RxXfer.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  rxXfer.h
- *
- *   PURPOSE: Rx Xfer module header file.
- * 
- ****************************************************************************/
-
-#ifndef _RX_XFER_H
-#define _RX_XFER_H
-
-#include "rxXfer_api.h"
-#include "TwIf.h"
-
-
-#define RX_DESCRIPTOR_SIZE (sizeof(RxIfDescriptor_t))
-#ifdef PLATFORM_SYMBIAN	/* UMAC is using only one buffer and therefore we can't use consecutive reads */
-    #define MAX_CONSECUTIVE_READS    1
-#else
-    #define MAX_CONSECUTIVE_READS    8
-#endif
-
-#define MAX_PACKETS_NUMBER  8
-#define MAX_CONSECUTIVE_READ_TXN   16
-/* Max Txn size */
-#define MAX_PACKET_SIZE     4096
-
-typedef struct 
-{
-    TI_UINT32      numPacketsRead;
-    TI_UINT32      numBytesRead;
-    TI_UINT32      numPacketsDroppedNoMem;
-    TI_UINT32      numPacketsDroppedPacketIDMismatch;
-    TI_UINT32      counters;
-    TI_UINT32      numAck0;
-} RxXferStats_T;
-
-
-typedef struct 
-{
-    TTxnStruct              tTxnStruct;
-    TI_UINT32               uRegData; 
-    TI_UINT32               uRegAdata; 
-
-} TRegTxn;
-
-typedef struct 
-{
-    TTxnStruct              tTxnStruct;
-    TI_UINT32               uCounter; 
-    
-} TCounterTxn;
-
-typedef struct 
-{
-    TTxnStruct              tTxnStruct;
-    TI_UINT32               uData; 
-    
-} TDummyTxn;
-
-typedef struct 
-{
-    TI_HANDLE               hOs;
-    TI_HANDLE               hReport;
-    TI_HANDLE               hTwIf;
-    TI_HANDLE               hFwEvent;
-    TI_HANDLE               hRxQueue;
-
-    TI_UINT32               aRxPktsDesc[NUM_RX_PKT_DESC]; /* Array of Rx packets short descriptors (see RX_DESC_SET/GET...) */
-    TI_UINT32               uFwRxCntr;
-    TI_UINT32               uDrvRxCntr;
-
-    TI_UINT32               uPacketMemoryPoolStart;
-
-    TRequestForBufferCb     RequestForBufferCB;
-    TI_HANDLE               RequestForBufferCB_handle;  
-
-    TRegTxn                 aSlaveRegTxn[MAX_CONSECUTIVE_READ_TXN];
-    TTxnStruct              aTxnStruct[MAX_CONSECUTIVE_READ_TXN];
-    TCounterTxn             aCounterTxn[MAX_CONSECUTIVE_READ_TXN];
-    TDummyTxn               aDummyTxn[MAX_CONSECUTIVE_READ_TXN];
-    TI_BOOL                 bChipIs1273Pg10;
-
-    TI_UINT8                aTempBuffer[MAX_PACKET_SIZE];
-
-    TI_UINT32               uAvailableTxn;
-    
-#ifdef TI_DBG
-    RxXferStats_T           DbgStats;
-#endif /* TI_DBG */
-
-} RxXfer_t;
-
-
-#endif /* _RX_XFER_H */
diff --git a/wl1271/TWD/FW_Transfer/eventMbox.c b/wl1271/TWD/FW_Transfer/eventMbox.c
deleted file mode 100644
index 571908a..0000000
--- a/wl1271/TWD/FW_Transfer/eventMbox.c
+++ /dev/null
@@ -1,754 +0,0 @@
-/*
- * eventMbox.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  eventMbox.c 
- *  \brief Handle any event interrupt from the FW
- *
- *  \see   
- */
-
-#define __FILE_ID__  FILE_ID_102
-#include "eventMbox_api.h"
-#include "TwIf.h"
-#include "osApi.h"
-#include "report.h"
-#include "CmdBld.h"
-#include "FwEvent_api.h"
-#include "TWDriver.h"
-#include "BusDrv.h"
-
-
-
-#define EVENT_MBOX_BUFFERS 2
-
-
-typedef enum
-{
-    EVENT_MBOX_STATE_IDLE,
-    EVENT_MBOX_STATE_READING
-} EEventMboxState;
-
-typedef struct {
-	void*		fCb;            /* Event Callback function */
-	TI_HANDLE	hCb;            /* Evant handle */
-	TI_UINT8*	pDataOffset;    /* Event Data Offset */
-	#ifdef TI_DBG
-	TI_UINT32	uCount;
-	#endif
-
-}TRegisteredEventCb;
-
-typedef struct 
-{
-    TI_UINT32           bitMask;/* Event bit mask */
-    char*               str;    /* Event trace string */
-    TI_UINT8            dataLen;/* Event data length */  
-
-} TEventEntry;
-
-
-typedef struct
-{
-	TTxnStruct	tTxnReg;
-	TI_UINT32	iRegBuffer;
-
-} tTxnGenReg;
-
-
-typedef struct
-{
-	TTxnStruct		tEventMbox;
-	EventMailBox_t	iEventMboxBuf;
-
-} tTxnEventMbox;
-
-
-
-typedef struct 
-{
-	TI_UINT32		   	EventMboxAddr[EVENT_MBOX_BUFFERS];  /* the Event Mbox addresses in the device */
-	TI_UINT8		   	ActiveMbox;                         /* The current active Mbox */
-	EEventMboxState		CurrentState;
-    TRegisteredEventCb  CbTable[TWD_OWN_EVENT_MAX];         /* Callback table */
-
-    /* Handles */
-	TI_HANDLE           hTwif;
-    TI_HANDLE           hOs;
-    TI_HANDLE           hReport;
-    TI_HANDLE           hCmdBld;
-
-	/* HW params */
-    /* use a struct to read or write register (4 byte size) from the bus */
-	tTxnGenReg			iTxnGenRegSize;
-
-	tTxnEventMbox		iTxnEventMbox;
-
-	#ifdef TI_DBG
-	TI_UINT32           uCompounEvCount;    /* Count the compound event */
-	TI_UINT32           uTotalEvCount;      /* Count total number of event sending in the compound */
-	#endif /* TI_DBG */
-	
-	fnotify_t			fCb;
-	TI_HANDLE		   	hCb;
-
-}TEventMbox;
-
-
-/********************************************************************************/
-/*                      Internal functions prototypes.                          */
-/********************************************************************************/
-
-static void eventMbox_ConfigCbTable(TI_HANDLE hEventMbox);
-static void eventMbox_ReadAddrCb(TI_HANDLE hEventMbox, TI_HANDLE hTxn);
-static void eventMbox_DummyCb(TI_HANDLE hEventMbox);
-static void eventMbox_ReadCompleteCB(TI_HANDLE hEventMbox, TTxnStruct *pTxnStruct);
-
-
-static const TEventEntry eventTable [TWD_OWN_EVENT_MAX] =
-{   
-/*==================================================================================
- *                                                                                     
- *                                    EVENT TABLE    
- *                                 
- *  Note that changes here should be reflected also in ETwdOwnEventId in TWDriver.h !!!
- *
- ===================================================================================
-| Id  |     Event Mask Bit                    |   Event String            | Length |
- ===================================================================================*/
-
-/* 0*/{ RSSI_SNR_TRIGGER_0_EVENT_ID,            "RSSI SNR TRIGGER 0 "     		, 1},
-/* 1*/{ RSSI_SNR_TRIGGER_1_EVENT_ID,            "RSSI SNR TRIGGER 1 "     		, 1},
-/* 2*/{ RSSI_SNR_TRIGGER_2_EVENT_ID,            "RSSI SNR TRIGGER 2 "     		, 1},
-/* 3*/{ RSSI_SNR_TRIGGER_3_EVENT_ID,            "RSSI SNR TRIGGER 3 "     		, 1},
-/* 4*/{ RSSI_SNR_TRIGGER_4_EVENT_ID,            "RSSI SNR TRIGGER 4 "     		, 1},
-/* 5*/{ RSSI_SNR_TRIGGER_5_EVENT_ID,            "RSSI SNR TRIGGER 5 "     		, 1},
-/* 6*/{ RSSI_SNR_TRIGGER_6_EVENT_ID,            "RSSI SNR TRIGGER 6 "     		, 1},
-/* 7*/{ RSSI_SNR_TRIGGER_7_EVENT_ID,            "RSSI SNR TRIGGER 7 "     		, 1},
-/* 8*/{ MEASUREMENT_START_EVENT_ID,             "MEASUREMENT START "      		, 0},    
-/* 9*/{ MEASUREMENT_COMPLETE_EVENT_ID,          "BSS LOSE "               		, 0},
-/*10*/{ SCAN_COMPLETE_EVENT_ID ,                "SCAN CMPLT "             		, 8},    
-/*11*/{ SCHEDULED_SCAN_COMPLETE_EVENT_ID,       "SPS SCAN CMPLT "         		, 3},
-/*12*/{ AP_DISCOVERY_COMPLETE_EVENT_ID,         "MAX TX RETRY "           		, 0},
-/*13*/{ PS_REPORT_EVENT_ID,                     "PS_REPORT "              		, 1},
-/*14*/{ PSPOLL_DELIVERY_FAILURE_EVENT_ID,       "PS-POLL DELIVERY FAILURE"		, 0},
-/*15*/{ DISCONNECT_EVENT_COMPLETE_ID,           "DISCONNECT COMPLETE "    		, 0},
-/*16*/{ JOIN_EVENT_COMPLETE_ID,                 "JOIN CMPLT "             		, 0},
-/*17*/{ CHANNEL_SWITCH_COMPLETE_EVENT_ID,       "SWITCH CHANNEL CMPLT "   		, 0},
-/*18*/{ BSS_LOSE_EVENT_ID,                      "BSS LOST "               		, 0},
-/*19*/{ REGAINED_BSS_EVENT_ID,                  "REGAINED BSS "           		, 0},
-/*20*/{ ROAMING_TRIGGER_MAX_TX_RETRY_EVENT_ID,  "MAX TX RETRY "           		, 0},
-/*21*/{ BIT_21,									"RESERVED"				  		, 0},
-/*22*/{ SOFT_GEMINI_SENSE_EVENT_ID,             "SOFT GEMINI SENSE "      		, 1},
-/*23*/{ SOFT_GEMINI_PREDICTION_EVENT_ID,        "SOFT GEMINI PREDICTION " 		, 1},
-/*24*/{ SOFT_GEMINI_AVALANCHE_EVENT_ID,         "SOFT GEMINI AVALANCHE "  		, 0},
-/*25*/{ PLT_RX_CALIBRATION_COMPLETE_EVENT_ID,   "PLT RX CALIBR. COMPLETE "		, 0},
-/*26*/{ DBG_EVENT_ID,							"DBG_EVENT_ID "			  		, 16},
-/*27*/{ HEALTH_CHECK_REPLY_EVENT_ID,			"HEALTH_CHECK_REPLY_EVENT_ID"	, 0},
-/*28*/{ PERIODIC_SCAN_COMPLETE_EVENT_ID,        "PERIODIC SCAN COMPLETE " 		, 8},
-/*29*/{ PERIODIC_SCAN_REPORT_EVENT_ID,          "PERIODIC SCAN REPORT "   		, 8},
-/*30*/{ BA_SESSION_TEAR_DOWN_EVENT_ID,			"BA_SESSION_TEAR_DOWN_EVENT_ID"	, 0},
-/*31*/{ EVENT_MBOX_ALL_EVENT_ID,                "ALL EVENTS "             		, 0}
-};
-
-
-/*
- * \brief	Create the Bus Access mailbox object
- * 
- * \param  hOs - OS Handle
- * \returnThe Created object
- *
- * \sa 
- */
-
-TI_HANDLE eventMbox_Create(TI_HANDLE hOs)
-{
-    TEventMbox *pEventMbox;
-	pEventMbox = (TEventMbox*)os_memoryAlloc(hOs,sizeof(TEventMbox));
-    if (pEventMbox == NULL)
-    {
-        WLAN_OS_REPORT (("eventMbox_Create: Error creating EventMbox object\n"));
-        return NULL;
-    }
-    os_memoryZero (hOs, pEventMbox, sizeof(TEventMbox));
-    pEventMbox->hOs = hOs;
-    pEventMbox->iTxnEventMbox.iEventMboxBuf.eventsMask = EVENT_MBOX_ALL_EVENT_ID;
-    return (TI_HANDLE)pEventMbox;
-}
-
-
-/*
- * \brief	Release all memory resource of EventMbox
- * 
- * \param  hEventMbox  - Handle to EventMbox
- * \return none
- * 
- * \par Description
- * This function should called after all interrupts was disabled.
- *
- * \sa 
- */
-void eventMbox_Destroy(TI_HANDLE hEventMbox)
-{
-    TEventMbox *pEventMbox = (TEventMbox *)hEventMbox;
-
-    if (pEventMbox)
-    {
-        os_memoryFree (pEventMbox->hOs, pEventMbox, sizeof(TEventMbox));
-    }
-}
-
-
-
-/*
- * \brief	Stop the EventMbox clear state and event vector
- * 
- * \param  hEventMbox  - Handle to EventMbox
- * \return none
- * 
- * \par Description
- * This function should called to stop the EventMb.
- * Do Not clear the mask Event could use us again when restart/recovery!!!!
- * \sa 
- */
-void eventMbox_Stop(TI_HANDLE hEventMbox)
-{
-	TEventMbox* pEventMbox 									= (TEventMbox*)hEventMbox;
-	pEventMbox->ActiveMbox									= 0;
-	pEventMbox->CurrentState								= EVENT_MBOX_STATE_IDLE;
-	pEventMbox->iTxnEventMbox.iEventMboxBuf.eventsVector	= 0;
-}
-
-
-
-/*
- * \brief	Configure the object
- * 
- * \param  hEventMbox  - Handle to EventMbox
- * \param  hTwif	   - Handle to TWIF
- * \param  hReport	   - Handle to Report module
- * \param  hFwEvent    - Handle to FW Event module
- * \param  hCmdBld     - Handle to Command Build module
- * \return none
- *
- * \par Description
- * This function should called to configure the module.
- * \sa 
- */
-
-void eventMbox_Config(TI_HANDLE hEventMbox, 
-                            TI_HANDLE hTwif, 
-                            TI_HANDLE hReport,    
-                            TI_HANDLE hFwEvent, 
-                            TI_HANDLE hCmdBld)
-{
-    TEventMbox *pEventMbox = (TEventMbox *)hEventMbox;
-	pEventMbox->hTwif			= hTwif;
-    pEventMbox->hReport = hReport;
-    pEventMbox->hCmdBld = hCmdBld;
-	pEventMbox->ActiveMbox		= 0;
-	pEventMbox->CurrentState	= EVENT_MBOX_STATE_IDLE;
-#ifdef TI_DBG
-	pEventMbox->uCompounEvCount	= 0;
-	pEventMbox->uTotalEvCount	= 0;
-#endif
-	eventMbox_ConfigCbTable(pEventMbox);
-}
-
-
-
-/* 
- * \brief	Initialization of callback table
- * 
- * \param  hEventMbox  - Handle to EventMbox
- * \return none
- * 
- * \par Description
- * This function is called to configure the CB table initialize the
- * CB functions and handle and set the Data offset.
- * 
- * \sa 
- */
-static void eventMbox_ConfigCbTable(TI_HANDLE hEventMbox)
-{
-	TEventMbox* pEventMbox;
-	TI_UINT8	EvID;
-	
-	pEventMbox = (TEventMbox*)hEventMbox;
-
-	/* for all events set a dummy func and data offset */
-	for (EvID = 0; EvID < TWD_OWN_EVENT_MAX;EvID++)
-	{
-		pEventMbox->CbTable[EvID].pDataOffset = (TI_UINT8*)&pEventMbox->iTxnEventMbox.iEventMboxBuf;
-		pEventMbox->CbTable[EvID].fCb		  = (void*)eventMbox_DummyCb;
-		pEventMbox->CbTable[EvID].hCb		  = pEventMbox;
-	}
-	/* set the data offset for Events with data only */
-	for (EvID = 0;EvID < NUM_OF_RSSI_SNR_TRIGGERS;EvID++)
-	{
-		pEventMbox->CbTable[EvID].pDataOffset += TI_FIELD_OFFSET (EventMailBox_t, RSSISNRTriggerMetric[EvID]);
-	}
-	pEventMbox->CbTable[TWD_DBG_EVENT                       ].pDataOffset += TI_FIELD_OFFSET (EventMailBox_t, dbgEventRep);
-	pEventMbox->CbTable[TWD_OWN_EVENT_SCAN_CMPLT            ].pDataOffset += TI_FIELD_OFFSET (EventMailBox_t,scanCompleteResults);
-	pEventMbox->CbTable[TWD_OWN_EVENT_SPS_SCAN_CMPLT        ].pDataOffset += TI_FIELD_OFFSET (EventMailBox_t,scheduledScanAttendedChannels);
-    pEventMbox->CbTable[TWD_OWN_EVENT_PERIODIC_SCAN_COMPLETE].pDataOffset += TI_FIELD_OFFSET (EventMailBox_t, scanCompleteResults);
-    pEventMbox->CbTable[TWD_OWN_EVENT_PERIODIC_SCAN_REPORT  ].pDataOffset += TI_FIELD_OFFSET (EventMailBox_t, scanCompleteResults);
-	pEventMbox->CbTable[TWD_OWN_EVENT_SOFT_GEMINI_SENSE     ].pDataOffset += TI_FIELD_OFFSET (EventMailBox_t,softGeminiSenseInfo);
-	pEventMbox->CbTable[TWD_OWN_EVENT_SOFT_GEMINI_PREDIC    ].pDataOffset += TI_FIELD_OFFSET (EventMailBox_t,softGeminiProtectiveInfo);
-	pEventMbox->CbTable[TWD_OWN_EVENT_SWITCH_CHANNEL_CMPLT  ].pDataOffset += TI_FIELD_OFFSET (EventMailBox_t,channelSwitchStatus);
-	pEventMbox->CbTable[TWD_OWN_EVENT_PS_REPORT             ].pDataOffset += TI_FIELD_OFFSET (EventMailBox_t,psStatus);
-}
-    
-
-
-static void eventMbox_DummyCb(TI_HANDLE hEventMbox)
-{
-	TEventMbox* pEventMbox = (TEventMbox*)hEventMbox;
-TRACE0(pEventMbox->hReport, REPORT_SEVERITY_ERROR, "eventMbox_DummyCb : Called for unregistered event");
-}
-
-
-/*
- * \brief	Read mailbox address
- * 
- * \param  hEventMbox  - Handle to EventMbox
- * \param  fCb		   - CB function to return in Async mode
- * \param  hCb		   - CB Habdle 
- * \return TXN_STATUS_COMPLETE, TXN_STATUS_PENDING, TXN_STATUS_ERROR
- * 
- * \par Description
- * This function is called for initialize the Event MBOX addresses.
- * It issues a read transaction from the Twif with a CB.
- * 
- * \sa 
- */
-TI_STATUS eventMbox_InitMboxAddr(TI_HANDLE hEventMbox, fnotify_t fCb, TI_HANDLE hCb)
-{
-	TTxnStruct  *pTxn;
-	TEventMbox* pEventMbox;
-	ETxnStatus  rc;
-	pEventMbox = (TEventMbox*)hEventMbox;
-	pTxn = &pEventMbox->iTxnGenRegSize.tTxnReg;
-
-	/* Store the Callabck address of the modules that called us in case of Asynchronuous transaction that will complete later */
-	pEventMbox->fCb = fCb;
-    pEventMbox->hCb = hCb;
-
-	/* Build the command TxnStruct */
-    TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_READ, TXN_INC_ADDR)
-	/* Applying a CB in case of an async read */
-    BUILD_TTxnStruct(pTxn, REG_EVENT_MAILBOX_PTR, &pEventMbox->iTxnGenRegSize.iRegBuffer, REGISTER_SIZE, eventMbox_ReadAddrCb, hEventMbox)
-	rc = twIf_Transact(pEventMbox->hTwif,pTxn);
-	if (rc == TXN_STATUS_COMPLETE)
-	{
-		pEventMbox->EventMboxAddr[0] = pEventMbox->iTxnGenRegSize.iRegBuffer;
-		pEventMbox->EventMboxAddr[1] = pEventMbox->EventMboxAddr[0] + sizeof(EventMailBox_t);
-TRACE3(pEventMbox->hReport, REPORT_SEVERITY_INIT , "eventMbox_ConfigHw: event A Address=0x%x, event B Address=0x%x, sizeof=%d\n", pEventMbox->EventMboxAddr[0], pEventMbox->EventMboxAddr[1], sizeof(EventMailBox_t));
-
-	}
-	return rc;
-}
-
-
-/*
- * \brief	Save the Event MBOX addresses
- * 
- * \param  hEventMbox  - Handle to EventMbox
- * \param  hTxn		   - Handle to TTxnStruct
- * \return none
- * 
- * \par Description
- * This function is called upon completion of thr read Event MBOX address register.
- * It save the addresses in EventMbox.
- * 
- * \sa 
- */
-static void eventMbox_ReadAddrCb(TI_HANDLE hEventMbox, TI_HANDLE hTxn)
-{
-    TEventMbox* pEventMbox;
-	
-	pEventMbox = (TEventMbox*)hEventMbox;
-
-	pEventMbox->EventMboxAddr[0] = pEventMbox->iTxnGenRegSize.iRegBuffer;
-	pEventMbox->EventMboxAddr[1] = pEventMbox->EventMboxAddr[0] + sizeof(EventMailBox_t);
- 
-    TRACE3(pEventMbox->hReport, REPORT_SEVERITY_INIT , "eventMbox_ConfigHw: event A Address=0x%x, event B Address=0x%x, sizeof=%d\n", pEventMbox->EventMboxAddr[0], pEventMbox->EventMboxAddr[1], sizeof(EventMailBox_t));
-
-	/* call back the module that called us before to read our self-address */
-	pEventMbox->fCb(pEventMbox->hCb,TI_OK);
-}
-
-
-/*
- * \brief	confige the Mask vector in FW 
- * 
- * \param  hEventMbox  - Handle to EventMbox
- * \return none
- * 
- * \par Description
- * This function is called upon exit from init it will set the mask vector.
- * this function is mostly use for recovery
- * Note that at Init stage the FW is already configured to have all events masked but at Recovery stage 
- * The driver whishes to just set back previous event mask configuration
- * 
- * \sa 
- */
-void eventMbox_InitComplete(TI_HANDLE hEventMbox)
-{
-
-    TEventMbox* pEventMbox;
-	pEventMbox = (TEventMbox*)hEventMbox;
-	
-    TRACE1(pEventMbox->hReport, REPORT_SEVERITY_INFORMATION, "eventMbox_InitComplete: mask = 0x%x\n", pEventMbox->iTxnEventMbox.iEventMboxBuf.eventsMask);
-
-	cmdBld_CfgEventMask(pEventMbox->hCmdBld,pEventMbox->iTxnEventMbox.iEventMboxBuf.eventsMask,NULL,NULL);
-}
-    
-
-
-/*
- * \brief	Register an event 
- * 
- * \param  hEventMbox  - Handle to EventMbox
- * \param  EvID - the event ID to register
- * \param  fCb - CB function of the registered event
- * \param  hCb - CB handle of the registered event
- * \return TI_OK,TI_NOK
- *
- * \par Description
- * This function is called from the user upon request to register for event.
- * an Event can only be register to one user.
- * This function doesn't change the mask vector in FW!!!
- * 
- * \sa 
- */
-TI_STATUS eventMbox_RegisterEvent(TI_HANDLE hEventMbox,TI_UINT32 EvID,void* fCb,TI_HANDLE hCb)
-{
-    TEventMbox *pEventMbox = (TEventMbox *)hEventMbox;
-    if (fCb == NULL || hCb == NULL)
-    { 
-TRACE0(pEventMbox->hReport, REPORT_SEVERITY_ERROR, "eventMbox_RegisterEvent : NULL parameters\n");
-        return TI_NOK;
-    }
-    if (EvID >= TWD_OWN_EVENT_ALL)
-    {
-TRACE0(pEventMbox->hReport, REPORT_SEVERITY_ERROR, "eventMbox_RegisterEvent : Event ID invalid\n");
-		return TI_NOK;
-    }
-	pEventMbox->CbTable[EvID].fCb = fCb;
-	pEventMbox->CbTable[EvID].hCb = hCb;
-	return TI_OK;
-}
-
-
-
-
-/*
- * \brief	Replace event callback 
- * 
- * \param  hEventMbox  - Handle to EventMbox
- * \param  EvID - the event ID to register
- * \param  fNewCb - the new CB function of the registered event
- * \param  hNewCb - the new CB handle of the registered event
- * \param  pPrevCb - the old CB to save
- * \param  pPrevHndl - the old handle to save
- * \return TI_OK,TI_NOK
- * 
- * \par Description
- * Replace event callback function by another one.
- *              Provide the previous CB to the caller.
- *
- * \sa 
- */
-TI_STATUS eventMbox_ReplaceEvent (TI_HANDLE hEventMbox,
-                                    TI_UINT32   EvID, 
-                                    void       *fNewCb, 
-                                    TI_HANDLE   hNewCb,                                   
-                                    void      **pPrevCb, 
-                                    TI_HANDLE  *pPrevHndl)                                    
-{
-    TEventMbox *pEventMbox = (TEventMbox *)hEventMbox;
-    if (fNewCb == NULL || hNewCb == NULL)
-    { 
-TRACE0(pEventMbox->hReport, REPORT_SEVERITY_ERROR , "eventMbox_ReplaceEvent: NULL parameters\n");
-        return TI_NOK;
-    }
-    if (EvID >= TWD_OWN_EVENT_ALL)
-    {
-TRACE1(pEventMbox->hReport, REPORT_SEVERITY_ERROR, "eventMbox_ReplaceEvent: invalid ID. ID is %d\n", EvID);
-        return TI_NOK;
-    }
-
-	/* Save the old CBs */
-	*pPrevCb   = pEventMbox->CbTable[EvID].fCb;
-	*pPrevHndl = pEventMbox->CbTable[EvID].hCb;
-
-	/* store the new CBs */
-	pEventMbox->CbTable[EvID].fCb = fNewCb;
-	pEventMbox->CbTable[EvID].hCb = hNewCb;
-
-    TRACE0(pEventMbox->hReport, REPORT_SEVERITY_INFORMATION, "eventMbox_ReplaceEvent: EVENT  has registered\n");
-	return TI_OK;
-}
-
-
-/*
- * \brief	Un mask an event
- * 
- * \param  hEventMbox  - Handle to EventMbox
- * \param  EvID - the event ID to un mask
- * \param  fCb - CB function
- * \param  hCb - CB handle
- * \return TI_COMPLETE,TI_PENDING,TI_ERROR
- *
- * \par Description
- * This function is called from the user upon request to un mask an event.
- * This function change the mask vector in FW but doesn't register for it in the driver and 
- * doesn't set Cb function and Cb Handle in case of un mask event without registered for it an 
- * error will be handling!!!
- * 
- * \sa 
- */
-TI_STATUS eventMbox_UnMaskEvent(TI_HANDLE hEventMbox,TI_UINT32 EvID,void* fCb,TI_HANDLE hCb)
-{
-	TI_UINT32*	pEventMask;
-	TI_STATUS	aStatus;
-    TEventMbox *pEventMbox = (TEventMbox *)hEventMbox;
-	pEventMask = (TI_UINT32*)&pEventMbox->iTxnEventMbox.iEventMboxBuf.eventsMask;
-
-    if (EvID >= TWD_OWN_EVENT_ALL)
-    {
-TRACE1(pEventMbox->hReport, REPORT_SEVERITY_ERROR, "eventMbox_UnMaskEvent : Un mask an Invalid event = 0x%x\n",EvID);
-		return TXN_STATUS_ERROR;
-    }
-TRACE0(pEventMbox->hReport, REPORT_SEVERITY_INFORMATION, "eventMbox_UnMaskEvent : EVENT  is unmasked\n");
-
-	*pEventMask &= ~eventTable[EvID].bitMask;
-
-	aStatus = cmdBld_CfgEventMask (pEventMbox->hCmdBld, *pEventMask, fCb, hCb);
-	return aStatus;
-}
-
-
-/*
- * \brief	mask an event
- *
- * \param  hEventMbox  - Handle to EventMbox
- * \param  EvID - the event ID to un mask
- * \param  fCb - CB function
- * \param  hCb - CB handle
- * \return TI_COMPLETE,TI_PENDING,TI_ERROR
- * 
- * \par Description
- * This function is called from the user upon request to mask an event.
- * This function change the mask vector in FW but doesn't unregister it in the driver. 
- * \sa 
- */
-TI_STATUS eventMbox_MaskEvent(TI_HANDLE hEventMbox,TI_UINT32 EvID,void* fCb,TI_HANDLE hCb)
-{
-	TI_UINT32*	pEventMask;
-	TI_STATUS	aStatus;
-    TEventMbox *pEventMbox = (TEventMbox *)hEventMbox;
-	pEventMask = (TI_UINT32*)&pEventMbox->iTxnEventMbox.iEventMboxBuf.eventsMask;
-    
-    if (EvID >= TWD_OWN_EVENT_ALL)
-    {
-TRACE1(pEventMbox->hReport, REPORT_SEVERITY_ERROR, "eventMbox_MaskEvent : Mask an Invalid event = 0x%x\n",EvID);
-		return TXN_STATUS_ERROR;
-    }
-
-	*pEventMask |= eventTable[EvID].bitMask;
-
-    TRACE0(pEventMbox->hReport, REPORT_SEVERITY_INFORMATION , "eventMbox_MaskEvent : EVENT  is masked\n");
-
-	aStatus = cmdBld_CfgEventMask(pEventMbox->hCmdBld,*pEventMask,fCb,hCb);
-	return aStatus;
-}
-
-
-
-/*
- * \brief	Handle the incoming event read the Mbox data
- * 
- * \param  hEventMbox  - Handle to EventMbox
- * \param  TFwStatus  - FW status
- * \return none
- *
- * \par Description
- * This function is called from the FW Event upon receiving MBOX event.
- * \sa 
- */
-ETxnStatus eventMbox_Handle(TI_HANDLE hEventMbox,FwStatus_t* pFwStatus)
-{
-	ETxnStatus	rc;
-	TTxnStruct  *pTxn;
-    TEventMbox *pEventMbox = (TEventMbox *)hEventMbox;
-
-	pTxn = &pEventMbox->iTxnEventMbox.tEventMbox;
-
-TRACE1(pEventMbox->hReport, REPORT_SEVERITY_INFORMATION, "eventMbox_Handle : Reading from MBOX -- %d",pEventMbox->ActiveMbox);
-
-#ifdef TI_DBG
-    /* Check if missmatch MBOX */
-	if (pEventMbox->ActiveMbox == 0)
-    {
-    	if (pFwStatus->intrStatus & ACX_INTR_EVENT_B)
-        {
-        TRACE0(pEventMbox->hReport, REPORT_SEVERITY_ERROR, "eventMbox_Handle : incorrect MBOX SW MBOX -- A FW MBOX -- B");
-        }
-    }
-	else if (pEventMbox->ActiveMbox == 1)
-    {
-        if (pFwStatus->intrStatus & ACX_INTR_EVENT_A)
-        {
-            TRACE0(pEventMbox->hReport, REPORT_SEVERITY_ERROR, "eventMbox_Handle : incorrect MBOX SW MBOX -- B FW MBOX -- A");
-        }
-    }
-#endif /* TI_DBG */
-    
-	if (pEventMbox->CurrentState != EVENT_MBOX_STATE_IDLE)
-	{
-TRACE0(pEventMbox->hReport, REPORT_SEVERITY_ERROR, "eventMbox_Handle : Receiving event not in Idle state");
-    }
-	pEventMbox->CurrentState = EVENT_MBOX_STATE_READING;
-
-	/* Build the command TxnStruct */
-    TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_READ, TXN_INC_ADDR)
-	/* Applying a CB in case of an async read */
-    BUILD_TTxnStruct(pTxn, pEventMbox->EventMboxAddr[pEventMbox->ActiveMbox], &pEventMbox->iTxnEventMbox.iEventMboxBuf, sizeof(EventMailBox_t),(TTxnDoneCb)eventMbox_ReadCompleteCB, pEventMbox)
-	rc = twIf_Transact(pEventMbox->hTwif,pTxn);
-
-	pEventMbox->ActiveMbox = 1 - pEventMbox->ActiveMbox;
-	if (rc == TXN_STATUS_COMPLETE)
-    {   
-		eventMbox_ReadCompleteCB(pEventMbox,pTxn);
-    }
-
-    return TXN_STATUS_COMPLETE;
-}
-
-
-/*
- * \brief	Process the event 
- *
- * \param  hEventMbox  - Handle to EventMbox
- * \param  pTxnStruct  - the Txn data
- * \return none
- * 
- * \par Description
- * This function is called from the upon reading completion of the event MBOX
- * it will call all registered event according to the pending bits in event MBOX vector.
- * \sa 
- */
-static void eventMbox_ReadCompleteCB(TI_HANDLE hEventMbox, TTxnStruct *pTxnStruct)
-{
-	TI_UINT32	EvID;
-	TTxnStruct*	pTxn;
-    TEventMbox *pEventMbox = (TEventMbox *)hEventMbox;
-	pTxn = &pEventMbox->iTxnGenRegSize.tTxnReg;
-
-TRACE1(pEventMbox->hReport, REPORT_SEVERITY_INFORMATION, "eventMbox_ReadCompleteCB : event vector -- 0x%x\n",pEventMbox->iTxnEventMbox.iEventMboxBuf.eventsVector);
-    
-	pEventMbox->iTxnGenRegSize.iRegBuffer = INTR_TRIG_EVENT_ACK;
-
-    for (EvID = 0; EvID < TWD_OWN_EVENT_ALL; EvID++)
-    {
-        if (pEventMbox->iTxnEventMbox.iEventMboxBuf.eventsVector & eventTable[EvID].bitMask)
-                {                  
-                    if (eventTable[EvID].dataLen)
-                    {
-                ((TEventMboxDataCb)pEventMbox->CbTable[EvID].fCb)(pEventMbox->CbTable[EvID].hCb,(TI_CHAR*)pEventMbox->CbTable[EvID].pDataOffset,eventTable[EvID].dataLen);
-            }
-            else
-            {
-                ((TEventMboxEvCb)pEventMbox->CbTable[EvID].fCb)(pEventMbox->CbTable[EvID].hCb);
-            }
-        }
-    }     
-
-    /* Check if the state is changed in the context of the event callbacks */
-    if (pEventMbox->CurrentState == EVENT_MBOX_STATE_IDLE)
-    {
-        /*
-         * When eventMbox_stop is called state is changed to IDLE
-         * This is done in the context of the above events callbacks
-         * Don't send the EVENT ACK transaction because the driver stop process includes power off
-         */ 
-        TRACE0(pEventMbox->hReport, REPORT_SEVERITY_WARNING, "eventMbox_ReadCompleteCB : State is IDLE ! don't send the EVENT ACK");
-        return;
-    }
-
-	pEventMbox->CurrentState = EVENT_MBOX_STATE_IDLE;
-
-	/* Build the command TxnStruct */
-    TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-	/* Applying a CB in case of an async read */
-    BUILD_TTxnStruct(pTxn, ACX_REG_INTERRUPT_TRIG, &pEventMbox->iTxnGenRegSize.iRegBuffer, sizeof(pEventMbox->iTxnGenRegSize.iRegBuffer), NULL, NULL)
-	twIf_Transact(pEventMbox->hTwif,pTxn);
-}    
-
-
-#ifdef TI_DBG
-
-/*
- *  eventMbox_Print: print the Event Mailbox statistic :Number 890
- */
-TI_STATUS eventMbox_Print (TI_HANDLE hEventMbox)
-{
-    TEventMbox *pEventMbox = (TEventMbox *)hEventMbox;
-    TI_UINT32 i;
-    TI_UINT32 EvMask   = pEventMbox->iTxnEventMbox.iEventMboxBuf.eventsMask;
-    TI_UINT32 EvVector = pEventMbox->iTxnEventMbox.iEventMboxBuf.eventsVector;
-
-    TRACE0(pEventMbox->hReport, REPORT_SEVERITY_CONSOLE, "------------------------- EventMbox  Print ----------------------------\n");
-
-    TRACE1(pEventMbox->hReport, REPORT_SEVERITY_INFORMATION, " eventMbox_HandleEvent: Event Vector = 0x%x\n", EvVector);
-    TRACE1(pEventMbox->hReport, REPORT_SEVERITY_INFORMATION, " eventMbox_HandleEvent: Event Mask = 0x%x\n", EvMask);
-    TRACE1(pEventMbox->hReport, REPORT_SEVERITY_CONSOLE, " Total Number Of Compound Event = %d: \n", pEventMbox->uCompounEvCount);
-    TRACE1(pEventMbox->hReport, REPORT_SEVERITY_CONSOLE, " Total Number Of Events = %d: \n", pEventMbox->uTotalEvCount);
-    TRACE0(pEventMbox->hReport, REPORT_SEVERITY_CONSOLE, "\t\t\t\t *** Event Counters *** :\n");
-    for (i = 0; i < TWD_OWN_EVENT_ALL; i++)
-    {
-        TRACE2(pEventMbox->hReport, REPORT_SEVERITY_CONSOLE, " %d) Event Name = EVENT , Number of Event = %d\n", i, pEventMbox->CbTable[i].uCount);
-    }
-
-    TRACE0(pEventMbox->hReport, REPORT_SEVERITY_CONSOLE, "------------------------- EventMbox  Print End ----------------------------\n");
-
-    return TI_OK;
-}
-
-
-#endif /* TI_DBG */
-
-
-
diff --git a/wl1271/TWD/FW_Transfer/fwDebug.c b/wl1271/TWD/FW_Transfer/fwDebug.c
deleted file mode 100644
index aab35e5..0000000
--- a/wl1271/TWD/FW_Transfer/fwDebug.c
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * fwDebug.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
- 
-/** \file  FWDebug.c 
- * 
- *  \see   FWDebug.h 
- */
-
-#define __FILE_ID__  FILE_ID_103
-#include "tidef.h"
-#include "fwDebug_api.h"
-#include "osApi.h"
-#include "report.h"
-#include "BusDrv.h"
-#include "TwIf.h"
-
-
-
-#define DMA_SIZE_BUF 256
-
-typedef struct 
-{
-    TI_HANDLE       hOs;
-    TI_HANDLE       hReport;
-	TI_HANDLE		hTwif;
-
-	TFwDubCallback	fCb;
-	TI_HANDLE hCb;
-
-	TI_UINT8*		pReadBuf;
-        
-	TTxnStruct		tTxn;
-	TI_UINT8*		pDMABuf;
-
-}TFwDebug;
-
-/* Local functions */
-static void     fwDbg_WriteAddrCb   (TI_HANDLE hFwDebug,TTxnStruct* pTxn);
-static void     fwDbg_ReadAddrCb    (TI_HANDLE hFwDebug,TTxnStruct* pTxn);
-
-
-
-/*
- * \brief	Create the FW Debug module
- * 
- * \param  hOs  - Handle to OS
- * \return The created object
- * 
- * \par Description
- * This function will allocate memory to FW Debug module.
- * 
- * \sa 
- */
-TI_HANDLE fwDbg_Create (TI_HANDLE hOs)
-{
-	TFwDebug *pFwDebug = (TFwDebug *)os_memoryAlloc(hOs,sizeof(TFwDebug));
-
-    if (pFwDebug == NULL)
-    {
-        WLAN_OS_REPORT (("FATAL ERROR: fwDbg_Create(): Error Creating TFwDebug - Aborting\n"));
-        return NULL;
-    }
-
-    /* reset module object */
-    os_memoryZero (hOs, pFwDebug, sizeof (TFwDebug));
-    pFwDebug->hOs = hOs;
-
-    return pFwDebug;
-}
-
-
-/*
- * \brief	Initialize the module
- * 
- * \param  hFwDebug  - Handle to FW Debug
- * \param  hReport - Handle to report
- * \param  hTwif - Handle to TWIF
- * \return none
- * 
- * \par Description
- * 
- * 
- * \sa 
- */
-void fwDbg_Init (TI_HANDLE hFwDebug,
-				 TI_HANDLE hReport,
-				 TI_HANDLE hTwif)
-{
-	TFwDebug* pFwDebug = (TFwDebug*)hFwDebug;
-	pFwDebug->hReport  = hReport;
-	pFwDebug->hTwif	   = hTwif;
-
-	/* Allocate DMA memory for read write transact */
-	pFwDebug->pDMABuf = (TI_UINT8*)os_memoryAlloc(pFwDebug->hOs,DMA_SIZE_BUF);
-}
-
-
-/*
- * \brief	Destroy the object
- * 
- * \param  hFwDebug  - Handle to FW Debug
- * \return none
- * 
- * \par Description
- * Deallocate the object memory
- * 
- * \sa 
- */
-void fwDbg_Destroy (TI_HANDLE hFwDebug)
-{
-	TFwDebug* pFwDebug = (TFwDebug*)hFwDebug;
-
-	if (pFwDebug)
-	{
-		if (pFwDebug->pDMABuf)
-    	{
-    		os_memoryFree(pFwDebug->hOs,pFwDebug->pDMABuf,DMA_SIZE_BUF);
-    	}
-        os_memoryFree(pFwDebug->hOs,pFwDebug,sizeof(pFwDebug));
-	}
-}
-
-
-/*
- * \brief	Write Address to FW
- * 
- * \param  hFwDebug  - Handle to FW Debug
- * \param  Address - Absolute HW address
- * \param  Length - Length in byte to write
- * \param  Buffer - Buffer to copy to FW
- * \param  fCb - CB function
- * \param  hCb - CB Handle
- * \return none
- * 
- * \par Description
- * Write buffer to HW must receive length in byte max size 256 bytes
- * address must be absolute HW address.
- * 
- * \sa 
- */
-TI_STATUS fwDbg_WriteAddr (TI_HANDLE hFwDebug,
-                           TI_UINT32 Address,
-                           TI_UINT32 Length,
-                           TI_UINT8* Buffer,
-                           TFwDubCallback fCb,
-                           TI_HANDLE hCb)
-{
-	TI_STATUS rc;
-	TTxnStruct *pTxn;
-	TFwDebug* pFwDebug = (TFwDebug*)hFwDebug;
-
-	pTxn = &pFwDebug->tTxn;
-
-	/* check if length is large than default threshold */
-	if (Length > DMA_SIZE_BUF)
-    {
-TRACE1(pFwDebug->hOs, REPORT_SEVERITY_ERROR, "fwDbg_WriteAddr : Buffer Length too large -- %d",Length);
-		return TXN_STATUS_ERROR;
-    }
-
-	pFwDebug->fCb = fCb;
-	pFwDebug->hCb = hCb;
-	/* copy the given buffer to DMA buffer */
-	os_memoryCopy(pFwDebug->hOs,pFwDebug->pDMABuf,Buffer,Length);
-	/* Build the command TxnStruct */
-    TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-	/* Applying a CB in case of an async read */
-    BUILD_TTxnStruct(pTxn, Address, pFwDebug->pDMABuf, Length,(TTxnDoneCb)fwDbg_WriteAddrCb, pFwDebug)
-	rc = twIf_Transact(pFwDebug->hTwif,pTxn);
-
-	return rc;
-}
-
-
-/*
- * \brief	Read Address to FW
- * 
- * \param  hFwDebug  - Handle to FW Debug
- * \param  Address - Absolute HW address
- * \param  Length - Length in byte to write
- * \param  Buffer - Buffer to copy to FW
- * \param  fCb - CB function
- * \param  hCb - CB Handle
- * \return none
- * 
- * \par Description
- * Read from HW, must receive length in byte max size 256 bytes
- * address must be absolute HW address.
- * 
- * \sa 
- */
-TI_STATUS fwDbg_ReadAddr (TI_HANDLE hFwDebug,
-                          TI_UINT32 Address,
-                          TI_UINT32 Length,
-                          TI_UINT8* Buffer,
-                          TFwDubCallback fCb,
-                          TI_HANDLE hCb)
-{
-	TI_STATUS rc;
-	TTxnStruct *pTxn;
-	TFwDebug *pFwDebug = (TFwDebug*)hFwDebug;
-	pTxn = &pFwDebug->tTxn;
-	/* check if length is large than default threshold */
-	if (Length > DMA_SIZE_BUF)
-	{
-TRACE1(pFwDebug->hOs, REPORT_SEVERITY_ERROR, "fwDbg_ReadAddr : Buffer Length too large -- %d",Length);
-		return TXN_STATUS_ERROR;
-	}
-
-	pFwDebug->fCb = fCb;
-	pFwDebug->hCb = hCb;
-	pFwDebug->pReadBuf = Buffer;
-
-	/* Build the command TxnStruct */
-    TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_READ, TXN_INC_ADDR)
-	/* Applying a CB in case of an async read */
-    BUILD_TTxnStruct(pTxn, Address, pFwDebug->pDMABuf, Length,(TTxnDoneCb)fwDbg_ReadAddrCb, pFwDebug)
-	rc = twIf_Transact(pFwDebug->hTwif,pTxn);
-	if (rc == TXN_STATUS_COMPLETE)
-    {
-		/* copy from DMA buufer to given buffer */
-		os_memoryCopy(pFwDebug->hOs,pFwDebug->pReadBuf,pFwDebug->pDMABuf,Length);
-	}
-	return rc;
-}
-
-
-/*
- * \brief	Write CB function
- * 
- * \param  hFwDebug  - Handle to FW Debug
- * \param  pTxn - pointer ti Transact
- * \return none
- * 
- * \par Description
- * This function called from TWIF upon Async Write
- * 
- * \sa 
- */
-static void fwDbg_WriteAddrCb (TI_HANDLE hFwDebug,TTxnStruct* pTxn)
-{
-	TFwDebug *pFwDebug = (TFwDebug*)hFwDebug;
-
-	if (pFwDebug->fCb && pFwDebug->hCb)
-    {
-		pFwDebug->fCb(pFwDebug->hCb);
-    }
-}
-
-
-/*
- * \brief	Read CB function
- * 
- * \param  hFwDebug  - Handle to FW Debug
- * \param  pTxn - pointer ti Transact
- * \return none
- * 
- * \par Description
- * This function called from TWIF upon Async Read
- * 
- * \sa 
- */
-static void fwDbg_ReadAddrCb (TI_HANDLE hFwDebug,TTxnStruct* pTxn)
-{
-	TFwDebug *pFwDebug = (TFwDebug*)hFwDebug;
-	/* copy from DMA buufer to given buffer */
-	os_memoryCopy(pFwDebug->hOs,pFwDebug->pReadBuf,pFwDebug->pDMABuf,pTxn->aLen[0]);
-
-	if (pFwDebug->fCb && pFwDebug->hCb)
-    {
-		pFwDebug->fCb(pFwDebug->hCb);
-    }
-}
-    
-
-/*
- * \brief	Check HW address
- * 
- * \param  hFwDebug  - Handle to FW Debug
- * \return TI_TRUE, TI_FALSE
- * 
- * \par Description
- * This function called to check the given address to be a valid memory address.
- * 
- * \sa 
- */
-TI_BOOL fwDbg_isValidMemoryAddr (TI_HANDLE hFwDebug, TI_UINT32 Address, TI_UINT32 Length)
-{
-	TFwDebug *pFwDebug = (TFwDebug*)hFwDebug; 
-
-	return twIf_isValidMemoryAddr(pFwDebug->hTwif, Address, Length);
-}
-
-
-/*
- * \brief	Check HW address
- * 
- * \param  hFwDebug  - Handle to FW Debug
- * \return TI_TRUE, TI_FALSE
- * 
- * \par Description
- * This function called to check the given address to be a valid register address.
- * 
- * \sa 
- */
-TI_BOOL fwDbg_isValidRegAddr (TI_HANDLE hFwDebug, TI_UINT32 Address, TI_UINT32 Length)
-{
-	TFwDebug *pFwDebug = (TFwDebug*)hFwDebug; 
-
-	return twIf_isValidRegAddr(pFwDebug->hTwif, Address, Length);
-}
-
diff --git a/wl1271/TWD/FW_Transfer/txResult.c b/wl1271/TWD/FW_Transfer/txResult.c
deleted file mode 100644
index b1b80db..0000000
--- a/wl1271/TWD/FW_Transfer/txResult.c
+++ /dev/null
@@ -1,463 +0,0 @@
-/*
- * txResult.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  txResult.c
- *   
- *   PURPOSE:  Handle packets Tx results upon Tx-complete from the FW. 
- * 
- *   DESCRIPTION:  
- *   ============
- *      This module is called upon Tx-complete from FW. 
- *      It retrieves the transmitted packets results from the FW TxResult table and
- *        calls the upper layer callback function for each packet with its results.
- *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_107
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "TwIf.h"
-#include "txCtrlBlk_api.h"
-#include "txResult_api.h"
-#include "TWDriver.h"
-#include "FwEvent_api.h"
-
-
-
-#define TX_RESULT_QUEUE_DEPTH_MASK  (TRQ_DEPTH - 1)
-
-#if (TX_RESULT_QUEUE_DEPTH_MASK & TRQ_DEPTH) 
-    #error  TRQ_DEPTH should be a power of 2 !!
-#endif
-
-
-/* Callback function definition for Tx sendPacketComplete */
-typedef void (* TSendPacketCompleteCb)(TI_HANDLE hCbObj, TxResultDescriptor_t *pTxResultInfo);
-
-/* Tx-Result SM states */
-typedef enum
-{
-    TX_RESULT_STATE_IDLE,
-    TX_RESULT_STATE_READING
-} ETxResultState;
-
-/* The host Tx-results counter write transaction structure. */
-typedef struct
-{
-    TTxnStruct tTxnStruct;
-    TI_UINT32  uCounter;              
-} THostCounterWriteTxn;
-
-/* The Tx-results counters and table read transaction structure. */
-typedef struct
-{
-    TTxnStruct          tTxnStruct;
-    TxResultInterface_t tTxResultInfo;
-} TResultsInfoReadTxn;
-
-/* The TxResult module object. */
-typedef struct
-{
-    TI_HANDLE               hOs;
-    TI_HANDLE               hReport;
-    TI_HANDLE               hTwIf;
-
-    TI_UINT32               uTxResultInfoAddr;       /* The HW Tx-Result Table address */
-    TI_UINT32               uTxResultHostCounterAddr;/* The Tx-Result host counter address in SRAM */
-    TI_UINT32               uHostResultsCounter;     /* Number of results read by host from queue since FW-init (updated to FW) */
-    ETxResultState          eState;                  /* Current eState of SM */
-    TSendPacketCompleteCb   fSendPacketCompleteCb;   /* Tx-Complete callback function */
-    TI_HANDLE               hSendPacketCompleteHndl; /* Tx-Complete callback function handle */
-    THostCounterWriteTxn    tHostCounterWriteTxn;    /* The structure used for writing host results counter to FW */
-    TResultsInfoReadTxn     tResultsInfoReadTxn;     /* The structure used for reading Tx-results counters and table from  FW */
-#ifdef TI_DBG
-    TI_UINT32               uInterruptsCounter;         /* Count number of Tx-results */
-#endif
-
-} TTxResultObj;
-
-
-static void txResult_Restart (TTxResultObj *pTxResult);
-static void txResult_HandleNewResults (TTxResultObj *pTxResult);
-static void txResult_StateMachine (TI_HANDLE hTxResult);
-
-
-
-/****************************************************************************
- *                      txResult_Create()
- ****************************************************************************
- * DESCRIPTION: Create the Tx-Result object 
- * 
- * INPUTS:  hOs
- * 
- * OUTPUT:  None
- * 
- * RETURNS: The Created object
- ****************************************************************************/
-TI_HANDLE txResult_Create(TI_HANDLE hOs)
-{
-    TTxResultObj *pTxResult;
-
-    pTxResult = os_memoryAlloc(hOs, sizeof(TTxResultObj));
-    if (pTxResult == NULL)
-        return NULL;
-
-    os_memoryZero(hOs, pTxResult, sizeof(TTxResultObj));
-
-    pTxResult->hOs = hOs;
-
-    return( (TI_HANDLE)pTxResult );
-}
-
-
-/****************************************************************************
- *                      txResult_Destroy()
- ****************************************************************************
- * DESCRIPTION: Destroy the Tx-Result object 
- * 
- * INPUTS:  hTxResult - The object to free
- * 
- * OUTPUT:  None
- * 
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-TI_STATUS txResult_Destroy(TI_HANDLE hTxResult)
-{
-    TTxResultObj *pTxResult = (TTxResultObj *)hTxResult;
-
-    if (pTxResult)
-        os_memoryFree(pTxResult->hOs, pTxResult, sizeof(TTxResultObj));
-
-    return TI_OK;
-}
-
-
-/****************************************************************************
- *               txResult_Init()
- ****************************************************************************
-   DESCRIPTION:  
-   ============
-     Initialize the txResult module.
- ****************************************************************************/
-TI_STATUS txResult_Init(TI_HANDLE hTxResult, TI_HANDLE hReport, TI_HANDLE hTwIf)
-{
-    TTxResultObj *pTxResult = (TTxResultObj *)hTxResult;
-    TTxnStruct   *pTxn;
-
-    pTxResult->hReport    = hReport;
-    pTxResult->hTwIf      = hTwIf;
-
-    /* Prepare Host-Results-Counter write transaction (HwAddr is filled before each transaction) */
-    pTxn = &pTxResult->tHostCounterWriteTxn.tTxnStruct;
-    TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-    BUILD_TTxnStruct(pTxn, 0, &pTxResult->tHostCounterWriteTxn.uCounter, REGISTER_SIZE, NULL, NULL)
-
-    /* Prepare Tx-Result counter and table read transaction (HwAddr is filled before each transaction) */
-    pTxn = &pTxResult->tResultsInfoReadTxn.tTxnStruct;
-    TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_READ, TXN_INC_ADDR)
-    BUILD_TTxnStruct(pTxn, 
-                     0, 
-                     &pTxResult->tResultsInfoReadTxn.tTxResultInfo, 
-                     sizeof(TxResultInterface_t), 
-                     (TTxnDoneCb)txResult_StateMachine, 
-                     hTxResult)
-
-    txResult_Restart (pTxResult);
-
-    return TI_OK;
-}
-
-
-/****************************************************************************
- *               txResult_Restart()
- ****************************************************************************
-   DESCRIPTION:  
-   ============
-     Restarts the Tx-Result module.
-     Called upon init and recovery.
-     Shouldn't be called upon disconnect, since the FW provides Tx-Complete
-       for all pending packets in FW!!
- ****************************************************************************/
-static void txResult_Restart (TTxResultObj *pTxResult)
-{
-	pTxResult->uHostResultsCounter = 0;
-    pTxResult->eState = TX_RESULT_STATE_IDLE;      
-}
-
-
-/****************************************************************************
- *                      txResult_setHwInfo()
- ****************************************************************************
- * DESCRIPTION:  
- *      Called after the HW configuration upon init or recovery.
- *      Store the Tx-result table HW address.
- ****************************************************************************/
-void  txResult_setHwInfo(TI_HANDLE hTxResult, TDmaParams *pDmaParams)
-{
-    TTxResultObj *pTxResult = (TTxResultObj *)hTxResult;
-
-    pTxResult->uTxResultInfoAddr = (TI_UINT32)(pDmaParams->fwTxResultInterface);
-	pTxResult->uTxResultHostCounterAddr = pTxResult->uTxResultInfoAddr + 
-		TI_FIELD_OFFSET(TxResultControl_t, TxResultHostCounter);
-
-    txResult_Restart (pTxResult);
-} 
-
-
-/****************************************************************************
- *                      txResult_TxCmpltIntrCb()
- ****************************************************************************
- * DESCRIPTION:   
- * ============
- *  Called upon DATA interrupt from the FW.
- *  If new Tx results are available, start handling them.
- * 
- * INPUTS:  hTxResult - the txResult object handle.
- *          pFwStatus - The FW status registers read by the FwEvent
- *  
- * OUTPUT:  None
- * 
- * RETURNS:  ETxnStatus 
- ***************************************************************************/
-ETxnStatus txResult_TxCmpltIntrCb (TI_HANDLE hTxResult, FwStatus_t *pFwStatus)
-{
-    TTxResultObj   *pTxResult = (TTxResultObj *)hTxResult;
-    TI_UINT32      uTempCounters;
-    FwStatCntrs_t  *pFwStatusCounters;
-
-#ifdef TI_DBG
-    pTxResult->uInterruptsCounter++;
-
-    if (pTxResult->eState != TX_RESULT_STATE_IDLE)
-    {
-        TRACE1(pTxResult->hReport, REPORT_SEVERITY_INFORMATION, ": called in eState %d, so exit\n", pTxResult->eState);
-        return TXN_STATUS_COMPLETE;
-    }
-#endif
-
-    /* If no new results - exit (may happen since Data interrupt is common to all Tx&Rx events) */
-    uTempCounters = ENDIAN_HANDLE_LONG(pFwStatus->counters);
-    pFwStatusCounters = (FwStatCntrs_t *)&uTempCounters;
-    if (pFwStatusCounters->txResultsCntr == (TI_UINT8)pTxResult->uHostResultsCounter)
-    {
-        TRACE0(pTxResult->hReport, REPORT_SEVERITY_INFORMATION, ": No new Tx results\n");
-        return TXN_STATUS_COMPLETE;
-    }
-
-    /* Call the SM to handle the new Tx results */
-    txResult_StateMachine (hTxResult);
-    return TXN_STATUS_COMPLETE;
-}
-
-
-/****************************************************************************
- *                      txResult_StateMachine()
- ****************************************************************************
- * DESCRIPTION:  
- *
- *  The main SM of the module. Called in IDLE eState by txResult_TxCmpltIntrCb() on 
- *      Data interrupt from the FW. 
- *  If no new results - exit (may happen since Data interrupt is common to all Tx&Rx events)
- *  Read all Tx-Result cyclic table.
- *  Go over the new Tx-results and call the upper layer callback function for each packet result.
- *  At the end - write the new host counter to the FW.
- *          
- * INPUTS:  
- *
- * OUTPUT:  
- * 
- * RETURNS: None 
- ****************************************************************************/
-static void txResult_StateMachine (TI_HANDLE hTxResult)
-{
-    TTxResultObj *pTxResult  = (TTxResultObj *)hTxResult;
-	ETxnStatus   eTwifStatus = TXN_STATUS_COMPLETE;  /* Last bus operation status: Complete (Sync) or Pending (Async). */
-    TTxnStruct   *pTxn       = &(pTxResult->tResultsInfoReadTxn.tTxnStruct);
- 
-    /* Loop while processing is completed in current context (sync), or until fully completed */
-    while (eTwifStatus == TXN_STATUS_COMPLETE)
-    {
-        TRACE2(pTxResult->hReport, REPORT_SEVERITY_INFORMATION, ": eState = %d, eTwifStatus = %d\n", pTxResult->eState, eTwifStatus);
-
-        switch(pTxResult->eState) 
-        {
-        case TX_RESULT_STATE_IDLE:
-            /* Read Tx-Result queue and counters. */
-            pTxn->uHwAddr = pTxResult->uTxResultInfoAddr;
-            eTwifStatus = twIf_Transact (pTxResult->hTwIf, pTxn);
-
-            pTxResult->eState = TX_RESULT_STATE_READING;
-            break;
-    
-        case TX_RESULT_STATE_READING:
-            /* Process new Tx results, call upper layers to handle them and update host-index in the FW. */
-            txResult_HandleNewResults (pTxResult);
-            pTxResult->eState = TX_RESULT_STATE_IDLE;
-            return;  /*********  Exit after all processing is finished  **********/
-
-        default:
-            TRACE1(pTxResult->hReport, REPORT_SEVERITY_ERROR, ": Unknown eState = %d\n", pTxResult->eState);
-            return;
-        }
-    }
-
-    if (eTwifStatus == TXN_STATUS_ERROR)
-    {   
-        TRACE2(pTxResult->hReport, REPORT_SEVERITY_ERROR, ": returning ERROR in eState %d, eTwifStatus=%d !!!\n", pTxResult->eState, eTwifStatus);
-    }
-}
-
-
-/****************************************************************************
- *                      txResult_HandleNewResults()
- ****************************************************************************
- * DESCRIPTION:   
- * ============
- *	We now have the Tx Result table info from the FW so do as follows:
- *	1.	Find the number of new results (FW counter minus host counter), and if 0 exit.
- *  2.	Call the upper layers callback per Tx result. 
- *	3.	Update Host-Counter to be equal to the FW-Counter, and write it to the FW.
- ***************************************************************************/
-static void txResult_HandleNewResults (TTxResultObj *pTxResult)
-{
-	TI_UINT32 uNumNewResults;    /* The number of new Tx-Result entries to be processed. */
-	TI_UINT32 uFwResultsCounter; /* The FW current results counter (accumulated). */
-	TI_UINT32 uTableIndex;
-	TI_UINT32 i;
-	TxResultDescriptor_t *pCurrentResult;
-    TTxnStruct *pTxn = &(pTxResult->tHostCounterWriteTxn.tTxnStruct);
-
-	/* The uFwResultsCounter is the accumulated number of Tx-Results provided by the FW, and the 
-	 *   uHostResultsCounter is the accumulated number of Tx-Results processed by the host.
-	 * The delta is the number of new Tx-results in the queue, waiting for host processing.
-	 * Since the difference is always a small positive number, a simple subtraction is good
-	 *   also for wrap around case.
-	 */
-	uFwResultsCounter = ENDIAN_HANDLE_LONG(pTxResult->tResultsInfoReadTxn.tTxResultInfo.TxResultControl.TxResultFwCounter);
-	uNumNewResults = uFwResultsCounter - pTxResult->uHostResultsCounter;
-
-#ifdef TI_DBG
-	/* Verify there are new entries (was already checked in txResult_TxCmpltIntrCb) */
-	if (uNumNewResults == 0)
-	{
-TRACE2(pTxResult->hReport, REPORT_SEVERITY_WARNING, ": No New Results although indicated by FwStatus!!  HostCount=%d, FwCount=%d\n", pTxResult->uHostResultsCounter, uFwResultsCounter);
-		return;
-	}
-#endif
-
-	/* Update host results-counter in FW to be equal to the FW counter (all new results were processed). */
-	pTxResult->tHostCounterWriteTxn.uCounter = ENDIAN_HANDLE_LONG(uFwResultsCounter);
-    pTxn->uHwAddr = pTxResult->uTxResultHostCounterAddr; 
-    twIf_Transact(pTxResult->hTwIf, pTxn);
-
-    TRACE3(pTxResult->hReport, REPORT_SEVERITY_INFORMATION, ": NumResults=%d, OriginalHostCount=%d, FwCount=%d\n", uNumNewResults, pTxResult->uHostResultsCounter, uFwResultsCounter);
-
-	/* Loop over all new Tx-results and call Tx-complete callback with current entry pointer. */
-    /* NOTE: THIS SHOULD COME LAST because it may lead to driver-stop process!! */
-	for (i = 0; i < uNumNewResults; i++)
-	{
-		uTableIndex = pTxResult->uHostResultsCounter & TX_RESULT_QUEUE_DEPTH_MASK;
-		pCurrentResult = &(pTxResult->tResultsInfoReadTxn.tTxResultInfo.TxResultQueue[uTableIndex]);
-        pTxResult->uHostResultsCounter++;
-
-        TRACE1(pTxResult->hReport, REPORT_SEVERITY_INFORMATION , ": call upper layer CB, Status = %d\n", pCurrentResult->status);
-
-		pTxResult->fSendPacketCompleteCb (pTxResult->hSendPacketCompleteHndl, pCurrentResult);
-	}
-}
-
-
-/****************************************************************************
- *                      txResult_RegisterCb()
- ****************************************************************************
- * DESCRIPTION:  Register the upper driver Tx-Result callback functions.
- ****************************************************************************/
-void txResult_RegisterCb (TI_HANDLE hTxResult, TI_UINT32 uCallBackId, void *CBFunc, TI_HANDLE hCbObj)
-{
-    TTxResultObj* pTxResult = (TTxResultObj*)hTxResult;
-
-    switch (uCallBackId)
-    {
-        /* Set Tx-Complete callback */
-        case TWD_INT_SEND_PACKET_COMPLETE:
-            pTxResult->fSendPacketCompleteCb   = (TSendPacketCompleteCb)CBFunc;
-            pTxResult->hSendPacketCompleteHndl = hCbObj;
-            break;
-
-        default:
-            TRACE0(pTxResult->hReport, REPORT_SEVERITY_ERROR, ": Illegal value\n");
-            return;
-    }
-}
-
-
-#ifdef TI_DBG      /*  Debug Functions   */
-
-/****************************************************************************
- *                      txResult_PrintInfo()
- ****************************************************************************
- * DESCRIPTION:  Prints TX result debug information.
- ****************************************************************************/
-void txResult_PrintInfo (TI_HANDLE hTxResult)
-{
-#ifdef REPORT_LOG
-    TTxResultObj* pTxResult = (TTxResultObj*)hTxResult;
-
-    WLAN_OS_REPORT(("Tx-Result Module Information:\n"));
-    WLAN_OS_REPORT(("=============================\n"));
-    WLAN_OS_REPORT(("uInterruptsCounter:     %d\n", pTxResult->uInterruptsCounter));
-    WLAN_OS_REPORT(("uHostResultsCounter:    %d\n", pTxResult->uHostResultsCounter));
-    WLAN_OS_REPORT(("=============================\n"));
-#endif
-}
-
-
-/****************************************************************************
- *                      txResult_ClearInfo()
- ****************************************************************************
- * DESCRIPTION:  Clears TX result debug information.
- ****************************************************************************/
-void txResult_ClearInfo (TI_HANDLE hTxResult)
-{
-    TTxResultObj* pTxResult = (TTxResultObj*)hTxResult;
-
-    pTxResult->uInterruptsCounter = 0;
-}
-
-#endif  /* TI_DBG */
-
-
diff --git a/wl1271/TWD/FW_Transfer/txXfer.c b/wl1271/TWD/FW_Transfer/txXfer.c
deleted file mode 100644
index 1497a09..0000000
--- a/wl1271/TWD/FW_Transfer/txXfer.c
+++ /dev/null
@@ -1,444 +0,0 @@
-/*
- * txXfer.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   txXfer.c 
- *  \brief  Handle Tx packets transfer to the firmware. 
- *
- *  This module gets the upper driver's Tx packets after FW resources were
- *    allocated for them, aggregates them if possible, and handles their transfer 
- *    to the FW via the host slave (indirect) interface, using the TwIf Transaction API.
- *  The aggregation processing is completed by the BusDrv where the packets are combined
- *    and sent to the FW in one transaction.
- * 
- *  \see    
- */
-
-
-#define __FILE_ID__  FILE_ID_108
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "TwIf.h"
-#include "TWDriver.h"
-#include "txXfer_api.h"
-
-
-#ifdef TI_DBG
-#define     DBG_MAX_AGGREG_PKTS     16
-#endif
-
-typedef struct 
-{
-    TTxnStruct              tTxnStruct;
-    TI_UINT32               uPktsCntr; 
-} TPktsCntrTxn;
-
-/* The TxXfer module object. */
-typedef struct 
-{
-    TI_HANDLE               hOs;
-    TI_HANDLE               hReport;
-    TI_HANDLE               hTwIf;
-
-    TI_UINT32               uAggregMaxPkts;          /* Max number of packets that may be aggregated */
-    TI_UINT32               uAggregMaxLen;           /* Max length in bytes of a single aggregation */ 
-    TI_UINT32               uAggregPktsNum;          /* Number of packets in current aggregation */
-    TI_UINT32               uAggregPktsLen;          /* Aggregated length of current aggregation */ 
-    TTxCtrlBlk *            pAggregFirstPkt;         /* Pointer to the first packet of current aggregation */
-    TTxCtrlBlk *            pAggregLastPkt;          /* Pointer to the last packet of current aggregation */
-    TSendPacketTranferCb    fSendPacketTransferCb;   /* Upper layer Xfer-Complete callback */
-    TI_HANDLE               hSendPacketTransferHndl; /* Upper layer Xfer-Complete callback handle */
-    TTxnDoneCb              fXferCompleteLocalCb;    /* TxXfer local CB for pkt transfer completion (NULL is not needed!) */
-    TI_UINT32               uPktsCntr;               /* Counts all Tx packets. Written to FW after each packet transaction */
-    TI_UINT32               uPktsCntrTxnIndex;       /* The current indext of the aPktsCntrTxn[] used for the counter workaround transactions */
-    TPktsCntrTxn            aPktsCntrTxn[CTRL_BLK_ENTRIES_NUM]; /* Transaction structures for sending the packets counter */
-#ifdef TI_DBG
-    TI_UINT32               aDbgCountPktAggreg[DBG_MAX_AGGREG_PKTS];
-#endif
-
-} TTxXferObj;
-
-static ETxnStatus txXfer_SendAggregatedPkts (TTxXferObj *pTxXfer, TI_BOOL bLastPktSentNow);
-static void       txXfer_TransferDoneCb     (TI_HANDLE hTxXfer, TTxnStruct *pTxn);
-
-
-/********************************************************************************
-*																				*
-*                       PUBLIC  FUNCTIONS  IMPLEMENTATION						*
-*																				*
-*********************************************************************************/
-
-
-TI_HANDLE txXfer_Create(TI_HANDLE hOs)
-{
-    TTxXferObj *pTxXfer;
-
-    pTxXfer = os_memoryAlloc (hOs, sizeof(TTxXferObj));
-    if (pTxXfer == NULL)
-    {
-        return NULL;
-    }
-
-    os_memoryZero (hOs, pTxXfer, sizeof(TTxXferObj));
-
-    pTxXfer->hOs = hOs;
-
-    return (TI_HANDLE)pTxXfer;
-}
-
-
-TI_STATUS txXfer_Destroy(TI_HANDLE hTxXfer)
-{
-    TTxXferObj *pTxXfer = (TTxXferObj *)hTxXfer;
-
-    if (pTxXfer)
-    {
-        os_memoryFree (pTxXfer->hOs, pTxXfer, sizeof(TTxXferObj));
-    }
-
-    return TI_OK;
-}
-
-
-TI_STATUS txXfer_Init (TI_HANDLE hTxXfer, TI_HANDLE hReport, TI_HANDLE hTwIf)
-{
-    TTxXferObj *pTxXfer = (TTxXferObj *)hTxXfer;
-    TTxnStruct *pTxn;
-    TI_UINT8    i;
-
-    pTxXfer->hReport = hReport;
-    pTxXfer->hTwIf   = hTwIf;
-    pTxXfer->fSendPacketTransferCb = NULL;
-    pTxXfer->fXferCompleteLocalCb  = NULL;
-
-    for (i = 0; i < CTRL_BLK_ENTRIES_NUM; i++)
-    {
-        pTxn = &(pTxXfer->aPktsCntrTxn[i].tTxnStruct);
-        TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-        BUILD_TTxnStruct(pTxn, HOST_WR_ACCESS_REG, &pTxXfer->aPktsCntrTxn[i].uPktsCntr, REGISTER_SIZE, NULL, NULL)
-    }
-
-    return txXfer_Restart(hTxXfer);
-}
-
-
-TI_STATUS txXfer_Restart (TI_HANDLE hTxXfer)
-{
-    TTxXferObj *pTxXfer = (TTxXferObj *)hTxXfer;
-
-    pTxXfer->uPktsCntr         = 0;
-    pTxXfer->uPktsCntrTxnIndex = 0;
-    pTxXfer->uAggregPktsNum    = 0;
-
-    return TI_OK;
-}
-
-
-void txXfer_SetDefaults (TI_HANDLE hTxXfer, TTwdInitParams *pInitParams)
-{
-    TTxXferObj *pTxXfer = (TTxXferObj *)hTxXfer;
-
-    pTxXfer->uAggregMaxPkts = pInitParams->tGeneral.uTxAggregPktsLimit;
-}
-
-
-void txXfer_SetBusParams (TI_HANDLE hTxXfer, TI_UINT32 uDmaBufLen)
-{
-    TTxXferObj *pTxXfer = (TTxXferObj *)hTxXfer;
-
-    pTxXfer->uAggregMaxLen = uDmaBufLen;
-}
-
-
-void txXfer_RegisterCb (TI_HANDLE hTxXfer, TI_UINT32 CallBackID, void *CBFunc, TI_HANDLE CBObj)
-{
-    TTxXferObj* pTxXfer = (TTxXferObj*)hTxXfer;
-
-    TRACE3(pTxXfer->hReport, REPORT_SEVERITY_INFORMATION, "txXfer_RegisterCb: CallBackID=%d, CBFunc=0x%x, CBObj=0x%x\n", CallBackID, CBFunc, CBObj);
-
-    switch(CallBackID)
-    {
-        /* Save upper layers Transfer-Done callback */
-        case TWD_INT_SEND_PACKET_TRANSFER:
-            pTxXfer->fSendPacketTransferCb   = (TSendPacketTranferCb)CBFunc;
-            pTxXfer->hSendPacketTransferHndl = CBObj;
-            /* Set also the local CB so we are called upon Async transaction completion to call the upper CB */
-            pTxXfer->fXferCompleteLocalCb = (TTxnDoneCb)txXfer_TransferDoneCb;
-            break;
-
-        default:
-            TRACE0(pTxXfer->hReport, REPORT_SEVERITY_ERROR, " - Illegal value\n");
-            break;
-    }
-}
-
-
-ETxnStatus txXfer_SendPacket (TI_HANDLE hTxXfer, TTxCtrlBlk *pPktCtrlBlk)
-{
-    TTxXferObj   *pTxXfer = (TTxXferObj *)hTxXfer;
-    TI_UINT32    uPktLen  = ENDIAN_HANDLE_WORD(pPktCtrlBlk->tTxDescriptor.length << 2); /* swap back for endianess if needed */
-    ETxnStatus   eStatus; 
-
-    /* If starting a new aggregation, prepare it, and send packet if aggregation is disabled. */
-    if (pTxXfer->uAggregPktsNum == 0)
-    {
-        pTxXfer->uAggregPktsNum  = 1;
-        pTxXfer->uAggregPktsLen  = uPktLen;
-        pTxXfer->pAggregFirstPkt = pPktCtrlBlk;
-        pTxXfer->pAggregLastPkt  = pPktCtrlBlk;
-        pPktCtrlBlk->pNextAggregEntry = pPktCtrlBlk;  /* First packet points to itself */
-        if (pTxXfer->uAggregMaxPkts <= 1)
-        {
-            eStatus = txXfer_SendAggregatedPkts (pTxXfer, TI_TRUE);
-            pTxXfer->uAggregPktsNum = 0;
-        }
-        else 
-        {
-            eStatus = TXN_STATUS_PENDING;
-        }
-    }
-
-    /* Else, if new packet can be added to aggregation, add it and set status as Pending. */
-    else if ((pTxXfer->uAggregPktsNum + 1 <= pTxXfer->uAggregMaxPkts)  && 
-             (pTxXfer->uAggregPktsLen + uPktLen <= pTxXfer->uAggregMaxLen))
-    {
-        pTxXfer->uAggregPktsNum++;
-        pTxXfer->uAggregPktsLen += uPktLen;
-        pTxXfer->pAggregLastPkt->pNextAggregEntry = pPktCtrlBlk;  /* Link new packet to last */
-        pTxXfer->pAggregLastPkt = pPktCtrlBlk;                    /* Save new packet as last */
-        pPktCtrlBlk->pNextAggregEntry = pTxXfer->pAggregFirstPkt; /* Point from last to first */
-        eStatus = TXN_STATUS_PENDING;
-    }
-
-    /* Else, we can't add the new packet, so send current aggregation and start a new one */
-    else 
-    {
-        txXfer_SendAggregatedPkts (pTxXfer, TI_FALSE);
-        eStatus = TXN_STATUS_PENDING;  /* The current packet is not sent yet so return Pending */
-        pTxXfer->uAggregPktsNum  = 1;
-        pTxXfer->uAggregPktsLen  = uPktLen;
-        pTxXfer->pAggregFirstPkt = pPktCtrlBlk;
-        pTxXfer->pAggregLastPkt  = pPktCtrlBlk;
-        pPktCtrlBlk->pNextAggregEntry = pPktCtrlBlk;  /* First packet points to itself */
-    }
-
-
-    /* Return the Txn result - COMPLETE or PENDING. */
-    /* Note: For PENDING, a callback function will be called only if registered (needed for WHA) */
-    return eStatus;
-}
-
-
-void txXfer_EndOfBurst (TI_HANDLE hTxXfer)
-{
-    TTxXferObj   *pTxXfer = (TTxXferObj *)hTxXfer;
-
-    if (pTxXfer->uAggregPktsNum > 0) 
-    {
-        /* No more packets from TxDataQ so send any aggregated packets and clear aggregation */
-        txXfer_SendAggregatedPkts (pTxXfer, TI_FALSE);
-        pTxXfer->uAggregPktsNum = 0;
-    }
-}
-
-
-/********************************************************************************
-*																				*
-*                       INTERNAL  FUNCTIONS  IMPLEMENTATION						*
-*																				*
-*********************************************************************************/
-
-/** 
- * \fn     txXfer_SendAggregatedPkts
- * \brief  Send aggregated Tx packets to bus Txn layer
- * 
- * Send aggregated Tx packets to bus Txn layer one by one.
- * Increase the packets counter by the number of packets and send it to the FW (generates an interrupt).
- * If xfer completion CB is registered and status is Complete, call CB for all packets (except last one if inseted now).
- * 
- * \note   The BusDrv combines the packets and sends them in one transaction.
- * \param  pTxXfer         - The module's object
- * \param  bLastPktSentNow - If TRUE, last packet in the aggregation was inserted in current call to txXfer_SendPacket.
- * \return COMPLETE if transaction completed in this context, PENDING if not, ERROR if failed
- * \sa     
- */ 
-static ETxnStatus txXfer_SendAggregatedPkts (TTxXferObj *pTxXfer, TI_BOOL bLastPktSentNow)
-{
-    TTxCtrlBlk   *pCurrPkt;
-    TTxnStruct   *pTxn;
-    TPktsCntrTxn *pPktsCntrTxn; 
-    ETxnStatus   eStatus = TXN_STATUS_COMPLETE; 
-    TI_UINT32    i;
-
-    /* Prepare and send all aggregated packets (combined and sent in one transaction by the BusDrv) */
-    pCurrPkt = pTxXfer->pAggregFirstPkt;
-    for (i = 0; i < pTxXfer->uAggregPktsNum; i++)
-    {
-        pTxn = (TTxnStruct *)pCurrPkt;
-
-        /* If not last packet, set aggregation flag, clear completion CB and progress to next packet */
-        if (i < pTxXfer->uAggregPktsNum - 1)
-        {
-            TXN_PARAM_SET_AGGREGATE(pTxn, TXN_AGGREGATE_ON);
-            pTxn->fTxnDoneCb = NULL;
-            pCurrPkt = pCurrPkt->pNextAggregEntry;
-        }
-        /* If last packet, clear aggregation flag and set completion CB (exist only if registered) */
-        else 
-        {
-            TXN_PARAM_SET_AGGREGATE(pTxn, TXN_AGGREGATE_OFF);
-            pTxn->fTxnDoneCb = pTxXfer->fXferCompleteLocalCb;
-            pTxn->hCbHandle  = (TI_HANDLE)pTxXfer;
-        }
-
-        /* Send packet */
-        pTxn->uHwAddr = SLV_MEM_DATA;
-        eStatus = twIf_Transact (pTxXfer->hTwIf, pTxn);
-    }
-
-#ifdef TI_DBG
-    pTxXfer->aDbgCountPktAggreg[pTxXfer->uAggregPktsNum]++;
-    TRACE5(pTxXfer->hReport, REPORT_SEVERITY_INFORMATION, "txXfer_SendAggregatedPkts: Status=%d, NumPkts=%d, AggregLen=%d, pFirstPkt=0x%x, pLastPkt=0x%x\n", eStatus, pTxXfer->uAggregPktsNum, pTxXfer->uAggregPktsLen, pTxXfer->pAggregFirstPkt, pTxXfer->pAggregLastPkt);
-    if (eStatus == TXN_STATUS_ERROR)
-    {
-        TRACE5(pTxXfer->hReport, REPORT_SEVERITY_ERROR, "txXfer_SendAggregatedPkts: Status=%d, NumPkts=%d, AggregLen=%d, pFirstPkt=0x%x, pLastPkt=0x%x\n", eStatus, pTxXfer->uAggregPktsNum, pTxXfer->uAggregPktsLen, pTxXfer->pAggregFirstPkt, pTxXfer->pAggregLastPkt);
-        return eStatus;
-    }
-#endif  /* TI_DBG */
-
-    /* Write packet counter to FW (generates an interrupt). 
-       Note: This may be removed once the host-slave HW counter functionality is verified */
-    pTxXfer->uPktsCntr += pTxXfer->uAggregPktsNum;
-    pTxXfer->uPktsCntrTxnIndex++;
-    if (pTxXfer->uPktsCntrTxnIndex == CTRL_BLK_ENTRIES_NUM) 
-    {
-        pTxXfer->uPktsCntrTxnIndex = 0;
-    }
-    pPktsCntrTxn = &(pTxXfer->aPktsCntrTxn[pTxXfer->uPktsCntrTxnIndex]);
-    pPktsCntrTxn->uPktsCntr = ENDIAN_HANDLE_LONG(pTxXfer->uPktsCntr);
-    pPktsCntrTxn->tTxnStruct.uHwAddr = HOST_WR_ACCESS_REG;
-    twIf_Transact(pTxXfer->hTwIf, &pPktsCntrTxn->tTxnStruct);
-
-    /* If xfer completion CB is registered and last packet status is Complete, call the CB for all 
-     *     packets except the input one (covered by the return code). 
-     */
-    if (pTxXfer->fSendPacketTransferCb && (eStatus == TXN_STATUS_COMPLETE)) 
-    {
-        /* Don't call CB for last packet if inserted in current Tx */
-        TI_UINT32 uNumCbCalls = bLastPktSentNow ? (pTxXfer->uAggregPktsNum - 1) : pTxXfer->uAggregPktsNum;
-
-        pCurrPkt = pTxXfer->pAggregFirstPkt;
-        for (i = 0; i < uNumCbCalls; i++)
-        {
-            pTxXfer->fSendPacketTransferCb (pTxXfer->hSendPacketTransferHndl, pCurrPkt);
-            pCurrPkt = pCurrPkt->pNextAggregEntry;
-        }
-    }
-
-    /* Return the Txn result - COMPLETE or PENDING. */
-    /* Note: For PENDING, a callback function will be called only if registered (needed for WHA) */
-    return eStatus;
-}
-
-
-/** 
- * \fn     txXfer_TransferDoneCb
- * \brief  Send aggregated Tx packets to bus Txn layer
- * 
- * Call the upper layers TranferDone CB for all packets of the completed aggregation
- * This function is called only if the upper layers registered their CB (used only by WHA)
- * 
- * \note   
- * \param  pTxXfer - The module's object
- * \return COMPLETE if completed in this context, PENDING if not, ERROR if failed
- * \sa     
- */ 
-static void txXfer_TransferDoneCb (TI_HANDLE hTxXfer, TTxnStruct *pTxn)
-{
-    TTxXferObj *pTxXfer   = (TTxXferObj*)hTxXfer;
-    TTxCtrlBlk *pInputPkt = (TTxCtrlBlk *)pTxn; /* This is the last packet of the aggregation */
-    TTxCtrlBlk *pCurrPkt;
-    TI_UINT32   i;
-
-    /* Call the upper layers TranferDone CB for all packets of the completed aggregation */
-    /* Note: If this CB was called it means that the upper CB exists */
-    pCurrPkt = pInputPkt->pNextAggregEntry;  /* The last packet of the aggregation point to the first one */
-    for (i = 0; i < pTxXfer->uAggregMaxPkts; i++)
-    {
-        pTxXfer->fSendPacketTransferCb (pTxXfer->hSendPacketTransferHndl, pCurrPkt);
-
-        /* If we got back to the input packet we went over all the aggregation */
-        if (pCurrPkt == pInputPkt)
-        {
-            break;   
-        }
-
-        pCurrPkt = pCurrPkt->pNextAggregEntry;
-    }
-
-    TRACE3(pTxXfer->hReport, REPORT_SEVERITY_INFORMATION, "txXfer_TransferDoneCb: NumPkts=%d, pInputPkt=0x%x, pCurrPkt=0x%x\n", i + 1, pInputPkt, pCurrPkt);
-}
-
-
-#ifdef TI_DBG
-
-void txXfer_ClearStats (TI_HANDLE hTxXfer)
-{
-    TTxXferObj *pTxXfer = (TTxXferObj*)hTxXfer;
-
-    os_memoryZero (pTxXfer->hOs, &pTxXfer->aDbgCountPktAggreg, sizeof(pTxXfer->aDbgCountPktAggreg));
-}
-
-void txXfer_PrintStats (TI_HANDLE hTxXfer)
-{
-#ifdef REPORT_LOG
-    TTxXferObj *pTxXfer = (TTxXferObj*)hTxXfer;
-    TI_UINT32   i;
-    
-    WLAN_OS_REPORT(("Print Tx Xfer module info\n"));
-    WLAN_OS_REPORT(("=========================\n"));
-    WLAN_OS_REPORT(("uAggregMaxPkts     = %d\n", pTxXfer->uAggregMaxPkts));
-    WLAN_OS_REPORT(("uAggregMaxLen      = %d\n", pTxXfer->uAggregMaxLen));
-    WLAN_OS_REPORT(("uAggregPktsNum     = %d\n", pTxXfer->uAggregPktsNum));
-    WLAN_OS_REPORT(("uAggregPktsLen     = %d\n", pTxXfer->uAggregPktsLen));
-    WLAN_OS_REPORT(("uPktsCntr          = %d\n", pTxXfer->uPktsCntr));
-    WLAN_OS_REPORT(("uPktsCntrTxnIndex  = %d\n", pTxXfer->uPktsCntrTxnIndex));
-    for (i = 1; i < DBG_MAX_AGGREG_PKTS; i++)
-    {
-        WLAN_OS_REPORT(("uCountPktAggreg-%2d = %d\n", i, pTxXfer->aDbgCountPktAggreg[i]));
-    }
-#endif
-}
-
-#endif /* TI_DBG */
diff --git a/wl1271/TWD/FirmwareApi/public_commands.h b/wl1271/TWD/FirmwareApi/public_commands.h
deleted file mode 100644
index fae3d77..0000000
--- a/wl1271/TWD/FirmwareApi/public_commands.h
+++ /dev/null
@@ -1,1580 +0,0 @@
-/*
- * public_commands.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**********************************************************************************************************************
-
-  FILENAME:       public_commands.h
-
-  DESCRIPTION:    Command definitions shared with host
-
-
-
-***********************************************************************************************************************/
-#ifndef PUBLIC_COMMANDS_H
-#define PUBLIC_COMMANDS_H
-
-
-#include "public_types.h"
-#include "public_radio.h"
-
-typedef enum
-{
-    CMD_INTERROGATE     = 1,    /*use this to read information elements*/
-    CMD_CONFIGURE       = 2,    /*use this to write information elements*/
-    CMD_ENABLE_RX       = 3,
-    CMD_ENABLE_TX       = 4,
-    CMD_DISABLE_RX      = 5,
-    CMD_DISABLE_TX      = 6,
-    CMD_SCAN            = 8,
-    CMD_STOP_SCAN       = 9,
-
-    CMD_START_JOIN      = 11,
-    CMD_SET_KEYS        = 12,
-    CMD_READ_MEMORY     = 13,
-    CMD_WRITE_MEMORY    = 14,
-
-    CMD_SET_TEMPLATE    = 19,
-    CMD_TEST            = 23,
-
-    CMD_NOISE_HIST      = 28,
-    
-    CMD_LNA_CONTROL     = 32,
-    CMD_SET_BCN_MODE    = 33,
-
-    CMD_MEASUREMENT      = 34,
-    CMD_STOP_MEASUREMENT = 35,
-    CMD_DISCONNECT       = 36,
-    CMD_SET_PS_MODE      = 37,
-
-    CMD_CHANNEL_SWITCH   = 38,
-    CMD_STOP_CHANNEL_SWICTH = 39,
-
-    CMD_AP_DISCOVERY     = 40,
-    CMD_STOP_AP_DISCOVERY = 41,
-
-    CMD_SPS_SCAN = 42,
-    CMD_STOP_SPS_SCAN = 43,
-    
-    CMD_HEALTH_CHECK     = 45,     
-    CMD_DEBUG            = 46, 
-    CMD_TRIGGER_SCAN_TO  = 47,
-
-    CMD_CONNECTION_SCAN_CFG        = 48,
-    CMD_CONNECTION_SCAN_SSID_CFG   = 49,
-    CMD_START_PERIODIC_SCAN        = 50,
-    CMD_STOP_PERIODIC_SCAN         = 51,
-    CMD_SET_STA_STATE              = 52,
-
-NUM_COMMANDS,
-    MAX_COMMAND_ID = 0xFFFF
-} Command_enum;
-
-#ifdef HOST_COMPILE
-typedef uint16 Command_e;
-#else
-typedef Command_enum Command_e;
-#endif
-
-
-#ifdef HOST_COMPILE
-
-#define     CMD_MAILBOX_IDLE               0
-#define     CMD_STATUS_SUCCESS             1
-#define     CMD_STATUS_UNKNOWN_CMD         2
-#define     CMD_STATUS_UNKNOWN_IE          3
-#define     CMD_STATUS_REJECT_MEAS_SG_ACTIVE    11
-#define     CMD_STATUS_RX_BUSY             13
-#define     CMD_STATUS_INVALID_PARAM       14
-#define     CMD_STATUS_TEMPLATE_TOO_LARGE  15 
-#define     CMD_STATUS_OUT_OF_MEMORY       16 
-#define     CMD_STATUS_STA_TABLE_FULL      17
-#define     CMD_STATUS_RADIO_ERROR         18
-#define     CMD_STATUS_WRONG_NESTING       19
-#define     CMD_STATUS_TIMEOUT             21 /* Driver internal use.*/
-#define     CMD_STATUS_FW_RESET            22 /* Driver internal use.*/
-#define     MAX_COMMAND_STATUS             MAX_POSITIVE16
-
-#else
-
-typedef enum
-{
-    CMD_MAILBOX_IDLE              =  0,
-    CMD_STATUS_SUCCESS            =  1,
-    CMD_STATUS_UNKNOWN_CMD        =  2,
-    CMD_STATUS_UNKNOWN_IE         =  3,
-    CMD_STATUS_REJECT_MEAS_SG_ACTIVE =  11,
-    CMD_STATUS_RX_BUSY            = 13,
-    CMD_STATUS_INVALID_PARAM      = 14,
-    CMD_STATUS_TEMPLATE_TOO_LARGE = 15, 
-    CMD_STATUS_OUT_OF_MEMORY      = 16, 
-    CMD_STATUS_STA_TABLE_FULL     = 17,
-    CMD_STATUS_RADIO_ERROR        = 18,
-    CMD_STATUS_WRONG_NESTING      = 19,
-    CMD_STATUS_TIMEOUT            = 21, /* Driver internal use.*/
-    CMD_STATUS_FW_RESET           = 22, /* Driver internal use.*/
-    MAX_COMMAND_STATUS            = MAX_POSITIVE16
-} CommandStatus_enum;
-
-#endif
-
-#ifdef HOST_COMPILE
-typedef uint16 CommandStatus_e;
-#else
-typedef CommandStatus_enum CommandStatus_e;
-#endif
-
-#define MAX_CMD_PARAMS 610
-
-#define DEBUG_INDICATOR      0x8000    
-
-typedef struct
-{
-    Command_e cmdID;
-    CommandStatus_e cmdStatus;
-    uint8 parameters[MAX_CMD_PARAMS];
-} Command_t;
-
-
-/******************************************************************************
-
-    ID:       CMD_INTERROGATE
-    Desc:     This command requests an information element from the WiLink. The 
-              interface for this command is somewhat different from other commands 
-              since the interface is bi-directional and asymmetric. 
-              The host structure consists of the Command ID, a Command Status 
-              (returned by WiLink) place holder, and the Information Element Heading
-              (ID and expected length).
-              The response to that command is a buffer of the information element's 
-              actual values returned by the WiLink just after the command is issued.
-              The response to that command is a buffer of the information element's 
-              actual values returned by the WiLink just after the command is issued.
-    Params:   InfoElement_t - see below.
-              
-    
-******************************************************************************/
-/*
-Description of InfoElement structure - defined in "public_infoele.h"
-offset  length  source  description
-======  ======  ======  ===========
-0       2       host    Information Element ID - contains the ID of the requested 
-                        information element (refer to InfoElement_enum in 
-                        pblic_infoele.h). In response to this command, the WiLink 
-                        writes the requested information element to the response area 
-                        for the command mailbox.
-2       4       wilink  Length - the length of the response (different for each IE
-                        according to definitions in public_infoele.h).
-4       Length  wilink  IE payload according to definition in public_infoele.h.
-*/
-
-
-
-/******************************************************************************
-
-    ID:       CMD_CONFIGURE
-    Desc:     This command configures an information element in the WiLink. 
-    Params:   InfoElement_t - see below.
-
-******************************************************************************/
-/*
-Description of InfoElement structure - defined in "public_infoele.h"
-offset  length  source  description
-======  ======  ======  ===========
-0       2       host    Information Element ID - contains the ID of the requested 
-                        information element (refer to InfoElement_enum in 
-                        pblic_infoele.h). In response to this command, the WiLink 
-                        writes the requested information element to the response area 
-                        for the command mailbox.
-2       4       host    Length - the length of the response (different for each IE
-                        according to definitions in public_infoele.h).
-4       Length  host    IE payload according to definition in public_infoele.h.
-*/
-
-
-/******************************************************************************
-
-    ID:       CMD_ENABLE_RX
-    Desc:     This command enables the normal reception of frames. 
-    Params:   Channel Number - this field indicates the radio channel on which to
-                               receive data. This parameter also sets the channel on
-                               which to transmit. The last channel number used, 
-                               regardless of the order in which the ENABLE_RX and 
-                               ENABLE_TX commands are issued, is the channel number 
-                               for both RX and TX. This command must be issued after 
-                               the host has set all necessary configuration elements 
-                               appropriately.
-    
-******************************************************************************/
-
-
-
-/******************************************************************************
-
-    ID:       CMD_ENABLE_TX
-    Desc:     This command enables the normal transmission of frames.  
-    Params:   Channel Number - this field indicates the radio channel on which to
-                               transmit data. This parameter also sets the channel on
-                               which to receive. The last channel number used, 
-                               regardless of the order in which the ENABLE_RX and 
-                               ENABLE_TX commands are issued, is the channel number 
-                               for both RX and TX. This command must be issued after
-                               the host has set all necessary configuration elements
-                               appropriately.
-    
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_DISABLE_RX
-    Desc:     This command disables the normal reception of packets over the 
-              Baseband interface. 
-    Params:   None
-    
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_DISABLE_TX
-    Desc:     This command disables the normal transmission of frames. 
-    Params:   None.
-    
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_SCAN
-    Desc:     This command instructs the WiLink to scan for BSS/IBSSs. The host 
-              may perform either an active scan or a passive scan. During an active
-              scan, the WiLink transmits a probe request on the specified channel(s) 
-              and then listens for beacon/probe responses. During a passive scan, the 
-              WiLink monitors the specified channel(s) for beacons.
-              The WiLink sends SCAN_COMPLETE event to notify the host when it has 
-              completed a scan.
-    Params:   ScanParameters_t - see below
-    
-******************************************************************************/
-/*
-Offset  Length  Definition
-0       8       RX filters for Scan (refer to ACXRxConfigStruct)
-8       2       Scan options (Band select, Voice mode and Scan type = Active/Passive)
-10      1       NumChannels 
-11      1       Number of Probe requests (used for Active scan)
-12      2       Probe request rate & modulation
-14      1       AC trigger (for Voice mode only)
-15      1       SSID length
-16      32      SSID string (Null terminated)
-48      2       Channel [0] ScanMinDuration
-50      2       Channel [0] ScanMaxDuration 
-52      6       Channel [0] BSSID (4 bytes LOW and 2 bytes HIGH)
-58      1       Channel [0].bit0-3: Early Termination count. Bit 4-5: Condition
-59      1       Channel [0] TX power level for Scan (0 means do not change - other values:1-5)
-60      1       Channel [0] Channel  
-61      3       Channel [0] Reserved
-64-404  340     Optional Channel [1] - Channel [15] - same format as Channel [0] fields above.
-*/
-
-/* Defines for Rx "ConfigOptions".*/
-/* Only bits 2-10 can be configured by the Driver".*/
-#define CFG_RX_SERIAL           BIT_0    /* 0 = use parallel interface,         1 = use serial interface from ACX101- not valid.*/
-#define CFG_RX_RAW              BIT_1    /* 1 = write all data from baseband to frame buffer including PHY header.*/
-#define CFG_RX_FCS              BIT_2    /* 1 = write FCS to end of frame in memory, 0 = do not write FCS to memory.*/
-#define CFG_RX_ALL_GOOD         BIT_3    /* promiscuous mode, receive all good frames.*/
-#define CFG_UNI_FILTER_EN       BIT_4    /* local MAC address filter enable.*/
-#define CFG_BSSID_FILTER_EN     BIT_5    /* BSSID filter enable.*/
-#define CFG_MC_FILTER_EN        BIT_6    /* 0 = receive all multicast,          1 = use one or both multicast address filters.*/
-#define CFG_MC_ADDR0_EN         BIT_7    /* 1 = receive frames from mc_addr0,   0 = do not use this filter.*/
-#define CFG_MC_ADDR1_EN         BIT_8    /* 1 = receive frames from mc_addr1,   0 = do not use this filter .*/
-#define CFG_BC_REJECT_EN        BIT_9    /* 0 = receive all broadcast,          1 = filter all broadcast.*/
-#define CFG_SSID_FILTER_EN      BIT_10   /* SSID Filter Enable.*/
-#define CFG_RX_INT_FCS_ERROR    BIT_11   /* 1 = give rx complete interrupt for FCS errors.*/
-#define CFG_RX_INT_ENCRYPTED    BIT_12   /* 1 = only give rx header interrupt if frame is encrypted.*/
-#define CFG_RX_WR_RX_STATUS     BIT_13   /* 0 = do not write three status words, 1 = write three receive status words to top of rx'd MPDU.*/
-#define CFG_RX_FILTER_NULTI     BIT_14   /* 1 = filter multicast/broadcast frame if SA matchs local MAC addr->.*/
-#define CFG_RX_RESERVE          BIT_15   /* reserve.*/
-#define CFG_RX_TIMESTAMP_TSF    BIT_16   /* 1 = sample frame's' arrival time in 32bits TSF, 0 = write it in MAC time stamp.*/
-
-
-/* Defines for Rx "FilterOptions".*/
-/* The rx filter enables control what type of receive frames will be rejected or received by the rx hardware*/
-/* 1 = frame is written to memory,*/
-/* 0 = not written to memory, rejected.*/
-#define CFG_RX_RSV_EN       BIT_0  /* reserved types and subtypes.*/
-#define CFG_RX_RCTS_ACK     BIT_1  /* rts, cts, ack frames.*/
-#define CFG_RX_PRSP_EN      BIT_2  /* probe response.*/
-#define CFG_RX_PREQ_EN      BIT_3  /* probe request.*/
-#define CFG_RX_MGMT_EN      BIT_4  /* type = management.*/
-#define CFG_RX_FCS_ERROR    BIT_5  /* frames with FCS errors.*/
-#define CFG_RX_DATA_EN      BIT_6  /* type = data.*/
-#define CFG_RX_CTL_EN       BIT_7  /* type = control.*/
-#define CFG_RX_CF_EN        BIT_8  /* contention free frames.*/
-#define CFG_RX_BCN_EN       BIT_9  /* beacons.*/
-#define CFG_RX_AUTH_EN      BIT_10 /* authentication, deauthentication.*/
-#define CFG_RX_ASSOC_EN     BIT_11 /* association related frames (all 5 subtypes – assoc req/resp,*/
-
-
-typedef struct
-{
-    uint32          ConfigOptions;
-    uint32          FilterOptions;
-} ACXRxConfigStruct;
-
-
-/* ScanOptions bit mask field.*/
-#define SCAN_ACTIVE         0
-#define SCAN_PASSIVE        1   /* 1 = passive scan, 0 = active scan*/
-/* #define SCAN_5GHZ_BAND      2  */  /* 1 = scan channel list in 5 Ghz band, 0 = scan channel list in 2.4 Ghz band*/ 
-#define TRIGGERED_SCAN      2   /* 1 = Triggered scan, 0 = Normal scan*/
-#define SCAN_PRIORITY_HIGH  4   /* 1 = High priority scan, 0 = Low priority scan*/
- 
-typedef uint8 TidTrigger_t;
-
-/* General scan parameters.*/
-typedef struct
-{
-    ACXRxConfigStruct  rxCfg;         /* Rx filter to be used for each channel scan. */
-                                      /* The BSSID filter enable will be set (by the */
-                                      /* scan process) to ON for a specific channel if*/
-                                      /* the BSSID of this channel is a unicast address.*/
-                                      /* Otherwise it will be set to OFF (Refer to */
-                                      /* ACXRxConfig IE in public_infoele.h).*/
-
-    uint16             scanOptions;   /* This bitwise field indicates the scan options. */
-                                      /* Bits [4:15] are reserved. */
-                                      /* Bits [0:3] are defined as follows: */
-                                      /* Scan Type (bit 0) - When this bit is set, the */
-                                      /*  WiLink performs a passive scan. When this bit*/
-                                      /*  is cleared, the WiLink performs an active scan. */
-                                      /* Band Select (bit 1) - When this bit is set, the*/
-                                      /*  WiLink scans the specified channels in the */
-                                      /*  5GHz band. When this bit is cleared, the */
-                                      /*  WiLink scans the specified channels in the */
-                                      /*  2.4GHz band. */
-                                      /* Voice mode (bit 2) - When this bit is set, */
-                                      /*  the request is for a voice scan. When this bit*/
-                                      /*  is cleared, the request is for a normal scan. */
-                                      /* Scan priority (bit 3) - When this bit is set, */
-                                      /*  the request is for a high priority scan. When*/
-                                      /*  this bit is cleared, the request is for a low*/
-                                      /*  priority scan.*/
-        
-    uint8              numChannels;   /* Number of scan channels in the list (minimum is*/
-                                      /* 1, maximum is 30).*/
-
-    uint8              numOfProbRqst; /* This field indicates the number of probe */
-                                      /* requests to send per channel, in active scan. */
-    
-    EHwRateBitFiled    txdRateSet;    /* This EHwRateBitFiled format field specifies the rate and */
-                                      /* modulation to transmit the probe request during*/
-	                                  /* an active scan. It is not used for passive scans.*/
-   
-    TidTrigger_t       tidTrigger;    /* used for TidTriggered scan only.*/
-
-    uint8              ssidLength;    /* This field specifies the size of the SSID, */
-                                      /* which can be up to 32 bytes long. If this field*/
-                                      /* equals to zero, SSID filter is not applied. */
-    
-    uint8              padding1[2];    /* in order to align */ 
-
-
-    uint32             ssidStr[8];    /* This field specifies the SSID packets from that*/
-                                      /* are relevant for the Scan result. The WiLink*/
-                                      /* uses this information to filter beacon, probe*/
-                                      /* response frames (if the SSID length field of */
-                                      /* this command structure is not zero) */
-
-    RadioBand_e         band;         /* Band to scan */
-
-    uint8               useSsidList;  /* Whether to use SSID list (configured seperately)
-                                         when transmitting probe-requests */
-
-    uint8               scanTag;      /* Scan results tag */
-
-    uint8               padding2;     /* in order to align */ 
-
-} BasicScanParameters_t;
-
-
-
-#define SCAN_ET_COND_MASK  0x30
-#define SCAN_ET_COUNT_MASK 0x0F
-
-#define SCAN_MAX_NUM_OF_CHANNELS 24
-
-/* Early Termination condition (bits 4-5) - This field can have one of the following */
-/* values (note that bits 0-3 indicates Early Termination count): */
-typedef enum 
-{
-    ET_COND_DISABLE = 0x00,          /* Disable - No early termination condition.*/
-
-    ET_COND_BEACON  = 0x10,          /* Beacon only. When this value is selected, the */
-                                     /* Early Termination count field specifies the */
-                                     /* maximum number of beacons to collect before */
-                                     /* ending a scan. */
-
-    ET_COND_PROBE_RESP = 0x20,       /* Probe responses only. When this value is */
-                                     /* selected, the Early Termination count field */
-                                     /* specifies the maximum number of probe responses*/
-                                     /* to collect before ending a scan. */
-
-    ET_COND_BEACON_PROBE_RESP = 0x30,/* Beacon/probe response. When this value is */
-                                     /* selected, the Early Termination count field */
-                                     /* specifies the maximum number of beacons or probe*/
-                                     /* responses to collect before ending a scan. */
-                                     
-    ET_COND_INVALID = 0xFF
-} ETCondition_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 ETCondition_e;
-#else
-typedef ETCondition_enum ETCondition_e;
-#endif
-
-
-typedef uint8 ETCondCount_t;
-
-
-
-#define PROCESS_SCAN_IS_HIGH(pScanParameters) ((pScanParameters)->basicScanParameters.scanOptions & SCAN_PRIORITY_HIGH)
-#define PROCESS_SCAN_IS_LOW(pScanParameters) ((PROCESS_SCAN_IS_HIGH(pScanParameters)) == 0)
-
-
-/* Per-Channel scan parameters.*/
-typedef struct
-{
-
-    uint32        scanMinDuration;    /* For active scans, this field specifies the */
-                                      /* minimum amount of time, in time units (TUs), */
-                                      /* to wait for a frame on a channel. This */
-                                      /* parameter is not used for passive scans. The*/
-                                      /*  value can range from 0 to 65535 TUs */
-                                      /* (67.1 seconds). */
-
-    uint32        scanMaxDuration;    /* For active scans, this field specifies the */
-                                      /* maximum amount of time, in time units (TUs), */
-                                      /* to wait for a probe response on a channel.*/
-                                      /* For passive scans, this field specifies the */
-                                      /* amount of time, in time units (TUs), to listen*/
-                                      /* on a channel. The value can range from 0 to */
-                                      /* 65535 TUs (67.1 seconds). */
-    
-
-    uint32        bssIdL;             /* 32 LSBits of BSSID of the AP to scan for. */
-                                      /* If scanning on this channel any BSSID, this */
-                                      /* field shall be set to broadcast BSSID. */
-
-    uint16        bssIdH;             /* 16 MSBits of BSSID of the AP to scan for.*/
-
-    ETCondCount_t ETCondCount;        /* bit 0-3: Early Termination count - This field */
-                                      /*          defines the maximum number of beacons*/
-                                      /*          or probe responses or both (according*/
-                                      /*          to condition) to collect before ending*/
-                                      /*          a scan.*/
-    
-                                      /* Bit 4-5: Early Termination Condition (refer */
-                                      /*          to ETCondition_enum).*/
-                
-    uint8         txPowerAttenuation; /* TX power level to be used per channel scanned. */
-                                      /* If 0, leave normal TX power level for this */
-                                      /* channel. Range: 0 - 20 [dB].*/
-    
-    Channel_e     channel;            /* Channel number to scan, valid range 0-255 */
-                                      /* (1-14 for 802.11b). */
-
-    Bool_e        dfsCandidate;       /* FW internal use only! */
-    Bool_e        activityDetected;   /* FW internal use only! */
-
-    uint8         padding[1];             /* for alignment to 32 bits boundry*/
-} BasicScanChannelParameters_t;
-
-/* The Scan command structure.*/
-typedef struct
-{
-    BasicScanParameters_t basicScanParameters; /* refer to BasicScanParameters_t */
-                                               /* definition*/
-
-    BasicScanChannelParameters_t basicScanChannelParameters[SCAN_MAX_NUM_OF_CHANNELS];
-} ScanParameters_t;
-
-/*****************************************************************************
-
-    ID:       CMD_TRIGGER_SCAN_TO
-    Desc:     This Command will configure the enhanced Trigger Scan Timeout 
-                information.
-              To use legacy Trigger Scan, configure the parameter to 0
-    Params:   None
-    
-******************************************************************************/
-typedef struct 
-{
-    uint32  slicedScanTimeOut;          /* 0 - Split Scan Disable
-                                           any other value will represent the timeout 
-                                           for each channel "mini scan" in uSec */
-}enhancedTriggerTO_t;
-
-
-
-/*****************************************************************************
-
-    ID:       CMD_STOP_SCAN
-    Desc:     This command instructs the WiLink to terminate any scan in progress. 
-              After processing this command, the WiLink returns to its previous state
-              (the state before the scan was started) and generates the SCAN_COMPLETE
-              information message. 
-    Params:   None
-    
-******************************************************************************/
-
-
-
-/******************************************************************************
-
-    ID:       CMD_START_JOIN
-    Desc:     This command instructs the WiLink to either join a BSS or IBSS, or 
-              start an IBSS. When the device has joined the BSS or IBSS the Join 
-              Complete event is raised to the host.  
-    Params:   StartJoinRequest_t - see below.
-
-******************************************************************************/
-
-/* 
- * Join command  control bit mask field:
- */
-
-
-
-/* Cyclic counter in range 1-7, advanced on every Join command to enable the FW distinguish 
-     between connection sessions and drop obsolete Tx packets. */
-#define JOIN_CMD_CTRL_TX_SESSION       (BIT_3 | BIT_2 | BIT_1)
-
-/* When this bit is set,the firmware will flush all Tx frames in the pipe and will not transmit them. */
-#define JOIN_CMD_CTRL_TX_FLUSH         BIT_7 
-
-/* Offsets of the above fields */
-#define JOIN_CMD_CTRL_OFFSET_TX_SESSION             1
-#define JOIN_CMD_CTRL_OFFSET_TX_FLUSH                      7 
-
-
-typedef enum
-{
-    BSS_TYPE_IBSS = 0,
-    BSS_TYPE_STA_BSS = 2,
-    BSS_TYPE_AP_BSS = 3,
-    MAX_BSS_TYPE = 0xFF
-} BssType_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 BSS_e;
-#else
-typedef BssType_enum BSS_e;
-#endif
-
-#define MAX_SSID_STR_LEN_BYTESX4 8
-
-typedef struct
-{
-    uint32            bssIdL;        /* This field indicates the 32 LSBits of the MAC*/
-                                     /* address of the BSS to join. */
-                                     /* Note: To correctly generate beacon frames, the */
-                                     /* byte order of the BSS ID field must be */
-                                     /* reversed. for example, if the MAC address of */
-                                     /* the AP is 00 7E 99 11 22 33, program the BSS */
-                                     /* ID field as 33 22 11 99 7E 00.*/
-        
-    uint16            bssIdH;        /* This field indicates the 16 MSBits of the MAC*/
-                                     /* address of the BSS to join. */
-
-    uint16            beaconInterval;/* This field specifies the time between target */
-                                     /* beacon transmission times (TBTTs), in time */
-                                     /* units (TUs). Valid values are 1 to 1024.*/
-    
-    ACXRxConfigStruct rxFilter;      /* This filed is the Rx filter configuration for*/
-                                     /* the device while connected to the BSS or IBSS.*/
-                                     /* This setting is overridden in case of a */
-                                     /* measurement or a scan activity and is reset */
-                                     /* after these activities end.*/
-
-    EHwRateBitFiled   basicRateSet;  /* For 802.11b, this field specifies the control*/
-                                     /* response frame rate for the BSS or IBSS (that*/
-                                     /* is, the BSSBasicRateSet parameter in the */
-                                     /* 802.11 Specification). The WiLink uses this */
-                                     /* field to determine the rate at which to */
-                                     /* transmit control frame responses (such as ACK */
-	                                 /* or CTS frames). */
-    
-    uint8             dtimInterval;  /* This field specifies the number of beacon */
-                                     /* intervals between DTIM beacon frames. The host*/
-                                     /* is only required to set this field when the */
-                                     /* BSS Type is infrastructure BSS (STA) or AP. */
-                                     /* For an independent BSS, the host should set */
-                                     /* this field to 1.*/
-    
-    BSS_e             bssType;       /* bits 0-2: This bitwise field specifies the type */
-                                     /*  of BSS to start or join (Refer to BssType_enum). */
-                                     /* bit 4: Band - The radio band in which to join*/
-                                     /*  or start.*/
-                                     /*  0 - 2.4GHz band    */
-                                     /*  1 - 5GHz band*/
-                                     /* bits 3, 5-7: Reserved*/
-
-    Channel_e         channelNumber; /* This field specifies the channel number of the*/
-                                     /* BSS to join or start. Valid values are 1 to 14. */
-                                     /* If the specified channel is not allowed in the*/
-                                     /* regulatory domain, the command is rejected and*/
-                                     /* the status code 0x0005 is returned in the */
-                                     /* Command Status field.*/
-    
-    uint8             ssidLength;    /* This field specifies the size of the SSID, which*/
-                                     /* can be up to 32 bytes long.*/
-    
-    uint32              ssidStr[MAX_SSID_STR_LEN_BYTESX4];
-                                     /* This field specifies the SSID of the BSS to */
-                                     /* start or join. The WiLink uses this information*/
-                                     /* to filter beacon, probe response and probe */
-                                     /* request frames (if configured to do so in bit 10*/
-                                     /* in the Receive Configuration field of the */
-                                     /* ACXRxConfig information element). */
-                                     /* It also uses this information to determine if a*/
-                                     /* probe response should be transmitted in */
-                                     /* response to a received probe request.*/
-    
-    uint8             ctrl;          /* Join command control field (refer to */
-                                     /* the JOIN_CMD_CTRL... specified above).*/
-
-    uint8             reserved[3];
-} StartJoinRequest_t;
-
-
-/******************************************************************************
-
-    ID:       CMD_SET_KEYS
-    Desc:     The host issues this command to manage the WEP key cache in the WiLink. 
-              The host can issue this command during the configuration or operation 
-              phase.  
-    Params:   SetKey_t - see below.
-
-******************************************************************************/
-
-#define NUM_ACCESS_CATEGORIES_COPY 4 
-
-#define MAX_KEY_SIZE 32
-
-typedef enum
-{
-    KEY_ADD_OR_REPLACE = 1,             /* Add or replace a key in the WEP cache*/
-    KEY_REMOVE         = 2,             /* Remove a key from the WEP cache*/
-    KEY_SET_ID         = 3,             /* Set Key ID*/
-    MAX_KEY_ACTION     = MAX_POSITIVE16 /* force this enum to be uint16*/
-} KeyAction_enum;
-
-#ifdef HOST_COMPILE
-typedef uint16 KeyAction_e;
-#else
-typedef KeyAction_enum KeyAction_e;
-#endif
-
-
-/*
-Key Size+Key Data table (valid value)
-KeyType_enum  Key Type                    Valid Key Size    Key Data Field Format
-============  ========                    ==============    =====================
-0x00          WEP default key             5, 13, 29         Key Size bytes of key data
-
-0x01          WEP key mapping key         5, 13, 29         Key Size bytes of key data
-
-0x04          AES Group Key               16                16 bytes of key data
-
-0x05          AES Pairwise Key            16                16 bytes of key data
-
-0x0A          TKIP and MIC Group Key      32                16 bytes of TKIP key data
-                                                        8 bytes of Rx MIC key data
-                                                        8 bytes of Tx MIC key data
-
-0x0B          TKIP and MIC Pairwise Key   32                16 bytes of TKIP key data
-                                                        8 bytes of Rx MIC key data
-                                                        8 bytes of Tx MIC key data
-
-0x0C          GEM and MIC Group Key      32                 16 bytes of GEM key data
-                                                            16 bytes of MIC key data
-
-0x0D          GEM and MIC Pairwise Key   32                 16 bytes of GEM key data
-                                                            16 bytes of MIC key data
-                                                            
-*/
-
-
-typedef enum
-{
-  CIPHER_SUITE_NONE = 0,
-  CIPHER_SUITE_WEP  = 1,
-  CIPHER_SUITE_TKIP = 2,
-  CIPHER_SUITE_AES  = 3,
-  CIPHER_SUITE_GEM  = 4,
-  MAX_KEY_TYPE
-} CipherSuite_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 CipherSuite_e;
-#else
-typedef CipherSuite_enum CipherSuite_e;
-#endif
-
-typedef enum
-{
-    NO_KEY            =  0,
-    KEY_SIZE_WEP_64   =  5,
-    KEY_SIZE_WEP_128  = 13,
-    KEY_SIZE_WEP_256  = 29,
-    KEY_SIZE_TKIP     = MAX_KEY_SIZE
-} KeySize_enum;                      /* WEP keysizes reflect 3 bytes appended from IV.*/
-
-#ifdef HOST_COMPILE
-typedef uint8 KeySize_e;
-#else
-typedef KeySize_enum KeySize_e;
-#endif
-
-
-typedef struct
-{
-    uint8 addr[MAC_ADDR_SIZE]; /* This field specifies the MAC address of the station to*/
-                               /* add or remove from the WEP key cache. This field is */
-                               /* ignored if a WEP default key is being added or removed.*/
-    
-    KeyAction_e action;        /* This field specifies the action to be performed.*/
-                               /* Refer to KeyAction_enum.*/
-
-    uint16      reserved;
-    KeySize_e   keySize;       /* This field indicates the size of the key in bytes */
-                               /* being added. Valid values are listed in the Valid Key */
-                               /* Size column in the above "Key Size+Key Data table". */
-
-    CipherSuite_e   type;          /* This field indicates the type of key being added.*/
-                               /* Valid values are listed in the Value column in the*/
-                               /* KeyType_enum.*/
-
-    uint8       ssidProfile;   /* This field indicates the SSID profile for which the */
-                               /* key is set.*/
-    uint8       id;            /* Key ID - For TKIP and AES key types, this field */
-                               /* indicates the value that should be inserted into the*/
-                               /* KeyID field of frames transmitted using this key */
-                               /* entry. For WEP default key types, this field indicates*/
-                               /* the ID of the key to add or remove. */
-                               /* For WEP key mapping key types, this field is ignored.*/
-                               /* Valid values for this field are 0 to 3.*/
-    
-    uint8       reserved2[6];  
-    uint8       key[MAX_KEY_SIZE];
-                               /* This field holds the security key data to add to the*/
-                               /* STA table. The format of this field varies depending*/
-                               /* on the type field. The format of this field for each*/
-                               /* key type is described in the Key Data Field Format */
-                               /* column in the "Key Size+Key Data table", above.*/
-
-    uint16      AcSeqNum16[NUM_ACCESS_CATEGORIES_COPY]; 
-                               /* This field indicates the lower part of the PN\IV */
-                               /* sequence number that is used, for the four Access*/
-                               /* Categories.*/
-
-    uint32      AcSeqNum32[NUM_ACCESS_CATEGORIES_COPY]; 
-                               /* This field indicates the higher part of the PN\IV */
-                               /* sequence number that is used, for four Access */
-                               /* Categories.*/
-    
-} SetKey_t;
-
-
-/******************************************************************************
-
-    ID:       CMD_READ_MEMORY
-    Desc:     The host issues this command to read the WiLink device 
-              memory/registers. 
-    Params:   ReadWriteCommand_t - see below.
-    Note:     The Base Band address has special handling (16 bits registers and
-              addresses). For more information, see the hardware specification.
-
-******************************************************************************/
-/******************************************************************************
-
-    ID:       CMD_WRITE_MEMORY
-    Desc:     The host issues this command to write the WiLink device memory/registers. 
-    Params:   ReadWriteCommand_t - see below.
-    Note:     The Base Band address has special handling (16 bits registers and
-              addresses). For more information, see the hardware specification.
-
-******************************************************************************/
-
-#define MAX_READ_SIZE 256
-
-typedef struct
-{
-    uint32 addr;                 /* The address of the memory to read from or write to.*/
-    uint32 size;                 /* The amount of data in bytes to read from or write */
-                                 /* to the WiLink device.*/
-    uint8  value[MAX_READ_SIZE]; /* The actual value read from or written to the Wilink.*/
-                                 /* The source of this field is the Host in WRITE */
-                                 /* command or the Wilink in READ command.*/
-} ReadWriteCommand_t;
-
-
-/******************************************************************************
-
-    ID:       CMD_BEACON
-    Desc:     This command specifies the contents of the beacon template stored in 
-              the WiLink. 
-    Params:   PktTemplate_t - see below.
-
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_PROBE_RESP
-    Desc:     This command specifies the contents of the probe response template
-              stored in the WiLink.  
-    Params:   PktTemplate_t - see below.
-    
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_NULL_DATA
-    Desc:     This command specifies the contents of the Null data template
-              stored in the WiLink. 
-    Params:   PktTemplate_t - see below.
-    
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_PROBE_REQ
-    Desc:     This command specifies the contents of the probe request template
-              stored in the WiLink.  
-    Params:   PktTemplate_t - see below.
-    
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_PS_POLL
-    Desc:     This command specifies the contents of the PS-poll template
-              stored in the WiLink.  
-    Params:   PktTemplate_t - see below.
-    
-******************************************************************************/
-
-
-/******************************************************************************
-
-    ID:       CMD_QOS_NULL_DATA
-    Desc:     This command specifies the contents of the QOS-Null template
-              stored in the WiLink.  
-    Params:   PktTemplate_t - see below.
-    
-******************************************************************************/
-/* Template command data structure.*/
-typedef enum
-{
-    TEMPLATE_NULL_DATA = 0,
-    TEMPLATE_BEACON,        
-    CFG_TEMPLATE_PROBE_REQ_2_4,
-    CFG_TEMPLATE_PROBE_REQ_5,
-    TEMPLATE_PROBE_RESPONSE,
-    TEMPLATE_QOS_NULL_DATA,
-    TEMPLATE_PS_POLL,
-    TEMPLATE_KLV,
-	TEMPLATE_DISCONNECT, 
-    TEMPLATE_PROBE_REQ_2_4, /*for firmware internal use only*/
-    TEMPLATE_PROBE_REQ_5, /*for firmware internal use only*/
-	TEMPLATE_BAR, /*for firmware internal use only*/
-    TEMPLATE_CTS, /* For CTS-to-self (FastCTS) mechanism for BT/WLAN coexistence (SoftGemini). */
-    TEMPLATE_ARP_RSP, /* Template for Automatic ARP reply by FW */
-
-    MAX_NUM_OF_TEMPLATES = 0xff
-} TemplateType_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 TemplateType_e;
-#else
-typedef TemplateType_enum TemplateType_e;
-#endif
-
-#define MAX_TEMPLATES_SIZE 252  /* according to max size of FW memblock */
-#define RATE_MASK_UNSPECIFIED   0    /* Let the FW select the rates mask internally */
-
-/* 
-aflag definition:
-bit field       description
-=========       ===========
-0               Truncate - If set, then attempts to send a frame stop when the total 
-                valid per-rate attempts have been exhausted; 
-                otherwise transmissions will continue at the lowest available rate 
-                until the appropriate one of the Short Retry Limit, Long Retry Limit, 
-                dot11MaxTransmitMsduLifetime, or MAX TX Life Time (in ACXTIDConfig), 
-                if supported and supplied, is exhausted.
-1               Preamble Override - Indicates if the preamble type should be used in TX. 
-2               Preamble Type - The type of the preamble to be used by the policy. 
-                0 - long preamble, 
-                1 - short preamble. 
-3-7             Reserved
-*/
-
-/* definition of single rate policy*/
-typedef struct 
-{
-
-    uint32              enabledRates;  				  /* A Bit Mask which indicates which Rates are enabled */
-                                                      /* The rates bitmap is defined in EHwBitRate. */
-                                                      /* If set to RATE_MASK_UNSPECIFIED, the FW sets it internally */
-
-    uint8               shortRetryLimit;              /* The dot11ShortRetryLimit used */
-                                                      /* for Tx retries.*/
-
-    uint8               longRetryLimit;               /* The dot11LongRetryLimit used */
-                                                      /* for Tx retries.  */
-    
-    uint8               aflags;                       /* Flags controlling attributes */
-                                                      /* of the transmission. */
-                                                      /* see above description for the */
-                                                      /* structure of this field.*/
-
-    uint8               reserved;
-}txAttrClass_t;
-     
-/* Template command data structure.*/
-typedef struct 
-{
-    uint16 len;
-    TemplateType_e templateType;
-    uint8 index;    /* relevant only for KLV_TEMPLATE type */
-    txAttrClass_t templateTxAttribute;
-    uint8  templateStart[MAX_TEMPLATES_SIZE]; 
-} PktTemplate_t;
-
-
-/******************************************************************************
-
-    ID:       CMD_NOISE_HIST
-    Desc:     This command starts/stops the noise histogram measurements.
-    Params:   NoiseHistRequest_t - see below.
-
-******************************************************************************/
-#define NOISE_HIST_LEN 8
-
-typedef enum 
-{
-    NOISE_HIST_STOP,
-    NOISE_HIST_START,
-    NOISE_HIST_INVALID = MAX_POSITIVE16 /* Force to be 16 bits enum*/
-} NoiseHistMode_enum;
-
-#ifdef HOST_COMPILE
-typedef uint16 NoiseHistMode_e;
-#else
-typedef NoiseHistMode_enum NoiseHistMode_e;
-#endif
-
-typedef struct
-{
-    NoiseHistMode_e mode;             /* Start or stop the FW engine. */
-                                      /* Possible values are 1 (Start) and 0 (Stop).*/
-
-    uint16 sampleIntervalUSec;        /* The time interval in usec between measurements.*/
-                                      /* Valid values are between 100us (default) and */
-                                      /* 2ms (with 100us jumps). This parameter is */
-                                      /* relevant only when Mode is Start (1).*/
-        
-    uint8  thresholds[NOISE_HIST_LEN];/* An array of eight 8 bit thresholds. The FW */
-                                      /* takes noise measurements, once every */
-                                      /* SampleIntervalUSec interval. If the measured */
-                                      /* noise level is between the threshold[X] and */
-                                      /* threshold[X 1], then the FW increments the */
-                                      /* noise histogram counter[X]. */
-                                      /* The counters are read via the */
-                                      /* ACXNoiseHistogramResults IE. This parameter is */
-                                      /* relevant only when Mode is Start (1).*/
-} NoiseHistRequest_t;
-
-
-/******************************************************************************
-
-    ID:       CMD_LNA_CONTROL
-    Desc:     This command controls the LNA state. 
-    Params:   LNAControl_t - see below.
-
-******************************************************************************/
-
-typedef enum
-{
-    LNA_MODE_MANUAL,    /* 0: The LNA is set to manual mode and is turned off.*/
-    LNA_MODE_AUTO,      /* 1: The LNA is set to automatic mode.*/
-    LNA_MODE_INVALID = 0xFF
-} LnaMode_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 LnaMode_e;
-#else
-typedef LnaMode_enum LnaMode_e;
-#endif
-
-typedef struct
-{
-    LnaMode_e LNAControlField; /* refer to LnaMode_enum*/
-    uint8     padding[3];      /* for alignment to 32 bits boundry*/
-} LNAControl_t;
-
-
-/******************************************************************************
-
-    ID:       CMD_MEASUREMENT
-    Desc:     This command instructs the WiLink device to begin a basic channel 
-              load measurement on the specified channel. When the measurement 
-              process actually starts running the WilLink device will raise the 
-              Measurement Started event. When the measurement process completes as
-              a result of the end of the measurement duration or a STOP_MEASUREMENT
-              command, the WilLink device will raise a Measurement Complete event. 
-    Params:   MeasurementParameters_t - see below.
-
-******************************************************************************/
-typedef struct 
-{
-    ACXRxConfigStruct rxFilter; /* This field is the Rx filter configuration for the */
-                                /* device while the measurement process is running. */
-                                /* When the process ends the previous Rx filter */
-                                /* configuration is reset. The filter configuration is*/
-                                /* composed of two 32 bit registers. When they are set*/
-                                /* to 0xFFFFFFFF the Rx filter configuration is not*/
-                                /* changed.*/
-    
-    uint32 duration;            /* Specifies the measurement process duration in */
-                                /* microseconds. The value of 0 means infinite duration*/
-                                /* in which only a STOP_MEASUREMENT command can*/
-                                /* stop the measurement process.*/
-    
-    Channel_e channel;          /* Channel number on which the measurement is performed,*/
-                                /* valid range 0-255 (1-14 for 802.11b).*/
-    
-    RadioBand_e band;           /* Specifies the band to which the channel belongs. */
-                                /* 0 - 2.4GHz */
-                                /* 1 - 5GHz , */
-                                /* 0xFF - Current band.*/
-
-    uint8 scanTag;              /* results tag */
-
-    uint8 padding[1];           /* for alignment to 32 bits boundry*/
-} MeasurementParameters_t;
-
-/******************************************************************************
-
-    ID:       CMD_STOP_MEASUREMENT
-    Desc:     This command instructs the WiLink to terminate any measurement in 
-              progress. After processing this command, the WiLink returns to its 
-              previous state (the state before the measurement was started) and 
-              generates the Measurment Complete event. 
-    Params:   None.
-
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_DISCONNECT
-    Desc:     This command instructs the WiLink device to stop all BSS or IBSS activity.
-              The device will cancel all of its TSF dependent events and activities. 
-              Power Save dependent activities are an exception to this, therefore 
-              the host must exit Power Save mode by issuing the SET_PS_MODE command 
-              before calling this command. When this command is complete the Disconnect
-              Complete event is raised to the host and the WiLink device is allowed 
-              to enter the configured low power state. 
-    Params:   DisconnectParameters_t - see below.
-    
-******************************************************************************/
-
-typedef enum
-{
-    DISCONNECT_IMMEDIATE,    /* Disconnect without sending any frame */
-    DISCONNECT_DE_AUTH,      /* Send deauthentication frame upon disconnecting */
-    DISCONNECT_DIS_ASSOC     /* Send disassociation frame upon disconnecting */
-} DisconnectType_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 DisconnectType_e;
-#else
-typedef DisconnectType_enum DisconnectType_e;
-#endif
-
-
-
-typedef struct
-{
-    ACXRxConfigStruct rxFilter;
-    uint16 disconnectReason;
-    DisconnectType_e   disconnectType; 
-    uint8 padding[1];  /* for alignment to 32 bits boundry */
-} DisconnectParameters_t;
-
-
-
-
-/******************************************************************************
-
-    ID:       CMD_SET_PS_MODE
-    Desc:     This command turns ON/OFF Power save protocol on the WiLink. 
-              After HW configuration, FW sends Null data packet to the AP with Power 
-              Management bit set accordingly to the field "Mode" of this command 
-              structure. After processing this command, the FW generates the 
-              PS_COMPLETE event.
-    Params:   PSModeParameters_t - see below.
-
-******************************************************************************/
-
-typedef enum
-{
-    STATION_ACTIVE_MODE,
-    STATION_POWER_SAVE_MODE
-} StationPSMode_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 StationPowerSaveMode_e;
-#else
-typedef StationPSMode_enum StationPowerSaveMode_e;
-#endif
-
-
-typedef struct
-{
-    StationPowerSaveMode_e mode;         /* This field specifies the future Power save*/
-                                         /* protocol mode of the system. */
-                                         /* When set, Power save protocol is enabled. */
-                                         /* When cleared, Power save protocol is */
-                                         /* disabled (refer to StationPSMode_enum).*/
-    
-    uint8                  needToSendNullData;
-    uint8 numberOfRetries;               /* This field specifies the maximum allowed */
-                                         /* number of retries of the Null data packet */
-                                         /* that FW will send after switching the */
-                                         /* Power Save Protocol mode.*/
-
-    uint8 hangOverPeriod;                /* This field specifies the hangover period, */
-                                         /* which is the time in TUs during which the */
-                                         /* WiLink remains awake after sending an MPDU */
-                                         /* with the Power Save bit set, indicating that*/
-                                         /* the station is to go into Power Save mode. */
-                                         /* Setting bit 0 does not affect the hangover */
-                                         /* period.*/
-    
-    EHwRateBitFiled rateToTransmitNullData; /* This EHwBitRate format field specifies the rate and */
-                                         /* modulation to transmit the Null data packet*/
-	                                     /* to the AP. */
-    
-} PSModeParameters_t;
-
-/******************************************************************************
-
-    ID:       CMD_CHANNEL_SWITCH
-    Desc:     This command instructs the WiLink to switch serving channel at the given
-              time. Once the channel switch is performed, the Channel Switch Complete
-              event is raised to the host.  
-    Params:   ChannelSwitchParameters_t - see below.
-
-******************************************************************************/
-typedef struct
-{
-    Channel_e channel;  /* The new serving channel.*/
-    uint8 switchTime;   /* Relative time of the serving channel switch in TBTT units.*/
-    Bool_e txSuspend;   /* 1: Suspend TX till switch time; */
-                        /* 0: Do not suspend TX*/
-    Bool_e flush;       /* 1: Flush TX at switch time; */
-                        /* 0: Do not flush*/
-    
-} ChannelSwitchParameters_t;
-
-/******************************************************************************
-
-    ID:       CMD_STOP_CHANNEL_SWICTH
-    Desc:     This command instructs the WiLink device to cancel performing a 
-              pending channel switch event command. 
-    Params:   None.
-    
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_AP_DISCOVERY
-    Desc:     This command instructs the WiLink device to perform an AP discovery 
-              measurement on a single channel. This command can only be issued after 
-              a measurement process has been started by the WiLink device as a result
-              of a previous Measurement command. The Measurement command specifies the 
-              channel on which the AP discovery is performed. Once the "AP discovery" 
-              measurement is completed either by a STOP_AP_DISCOVERY command or when 
-              the duration has expired, it will send an "AP discovery complete event" 
-              to the host.  
-    Params:   ApDiscoveryParameters_t - see below.
-
-******************************************************************************/
-
-
-typedef struct
-{
-    ACXRxConfigStruct rxFilter; /* This field is the Rx filter configuration for the */
-                                /* device while the AP Discovery process is running. */
-                                /* When the process ends the previous Rx filter */
-                                /* configuration is reset. The filter configuration is*/
-                                /* composed of two 32 bit registers. When they are set */
-                                /* to 0xFFFFFFFF the Rx filter configuration is not */
-                                /* changed.*/
-    
-    uint32 scanDuration;        /* This field specifies the amount of time, in time*/
-                                /* units (TUs), to perform the AP discovery. The value*/
-                                /* can range from 0 to 65535 TUs (67.1 seconds). */
-    
-    uint16 scanOptions;         /* This field specifies whether the AP discovery is */
-                                /* performed by an active scan or a passive scan. */
-                                /* 0 - ACTIVE, 1 - PASSIVE.*/
-    
-    uint8  numOfProbRqst;       /* This field indicates the number of probe requests to*/
-                                /* send per channel, when active scan is specified. */
-                                /* Note: for XCC measurement this value should be set */
-                                /*       to 1.*/
-    
-    uint8 txPowerAttenuation;   /* TX power level to be used for sending probe requests*/
-                                /* when active scan is specified. */
-                                /* If 0, leave normal TX power level for this channel. */
-
-    EHwRateBitFiled txdRateSet; /* This EHwBitRate format field specifies the rate and modulation*/
-                                /* to transmit the probe request when an active scan is*/
-	                            /* specified. */
-
-} ApDiscoveryParameters_t;
-
-/******************************************************************************
-
-    ID:       CMD_STOP_AP_DISCOVERY
-    Desc:     This command instructs the WiLink to terminate the AP Discovery 
-              measurement in progress. After processing this command, the WiLink 
-              returns to its previous state  and generates the AP Discovery Complete
-              Event. 
-    Params:   None.
-    
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_SPS_SCAN
-    Desc:     This command instructs the WiLink to perform a scheduled passive 
-              scan for BSS/IBSSs. The WiLink monitors the specified channel(s) 
-              for beacons. The WiLink sends Scheduled Scan Complete event to notify
-              the host when it has completed a scan. 
-    Params:   InfoElement_t - see below.
-
-******************************************************************************/
-/* Scheduled - General scan parameters.*/
-typedef struct
-{
-    ACXRxConfigStruct rxCfg;         /* Rx filter to be used for each channel scan. */
-                                     /* The BSSID filter enable will be set (by the scan*/
-                                     /* process) to ON for a specific channel if the*/
-                                     /* BSSID of this channel is a unicast address. */
-                                     /* Otherwise it will be set to OFF (Refer to */
-                                     /* ACXRxConfigStruct).*/
-    
-    uint32            scanCmdTime_h; /* This filed is the latest 32 MSBits of TSF known*/
-                                     /* at the time the SPS command was issued. When the*/
-                                     /* scan process is about to begin, this value is */
-                                     /* used to determine if the AP has performed a */
-                                     /* recovery by comparing this value to the current*/
-                                     /* TSF. (An AP that has performed a recovery should*/
-                                     /* have a lower TSF then the one that was saved).*/
-    
-    uint32            scanCmdTime_l; /* This filed is the latest 32 LSBits of TSF known*/
-                                     /* at the time the SPS command was issued. */
-
-    uint16            scanOptions;   /* This bitwise field indicates the scan options. */
-                                     /* 0 - ACTIVE, 1 - PASSIVE.*/
-    
-    uint8             numChannels;   /* Number of scan channels in the list (minimum */
-                                     /* (minimumis 1, maximum is 30).*/
-    
-    RadioBand_e       band;          /* Band to scan */
-    uint8             scanTag;       /* results tag */
-} ScheduledGeneralParameters_t;
-
-
-/* Scheduled - Per-Channel scan parameters.*/
-typedef struct
-{
-    uint32 scanStartTime;      /* Duration in microseconds of the scan on this channel */
-                               /* (Scan could be aborted before this duration in case of*/
-                               /* early termination condition met on the channel). */
-    
-    uint32 scanMaxDuration;    /* Lower 4 bytes of TSF time in microseconds when the */
-                               /* scan should start listening on the desired channel. */
-
-    uint32 bssIdL;             /* 32 LSBits of BSSID of the AP to scan for. If scanning */
-                               /* on this  channel any BSSID, this field shall be set */
-                               /* to broadcast BSSID. */
-    
-    uint16 bssIdH;             /* 16 MSBits of BSSID of the AP to scan for. */
-
-    ETCondCount_t ETCondCount; /* bit 0-3: Early Termination count - This field */
-                               /*          defines the maximum number of beacons*/
-                               /*          or probe responses or both (according*/
-                               /*          to condition) to collect before ending*/
-                               /*          a scan.*/
-    
-                               /* Bit 4-5: Early Termination Condition (refer */
-                               /*          to ETCondition_enum).*/
-    Channel_e     channel;     /* Channel number to scan, valid range 0-255 */
-                               /* (1-14 for 802.11b).*/
-} ScheduledChannelParameters_t;
-
-
-/* The Scheduled Scan command structure.*/
-typedef struct
-{
-    ScheduledGeneralParameters_t scheduledGeneralParameters;
-    ScheduledChannelParameters_t scheduledChannelParameters[SCAN_MAX_NUM_OF_CHANNELS];
-} ScheduledScanParameters_t;
-
-/******************************************************************************
-
-    ID:       CMD_STOP_SPS_SCAN
-    Desc:     This command instructs the WiLink to terminate a currently running 
-              SPS or a pending SPS.. After processing this command, the WiLink 
-              returns to its previous state and generates the Scheduled Scan 
-              Complete Event. 
-    Params:   None.
-
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_HEALTH_CHECK
-    Desc:     This command instructs the WiLink to raise a MAC status event 
-              which contains the current FCS Error counter. 
-    Params:   None.
-    
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_DEBUG
-    Desc:      
-    Params:   debugCommnad_t - see below.
-
-******************************************************************************/
-#define MAX_DEBUG_PARAMETERS 10
-
-typedef struct
-{
-    uint32  id;
-    uint32  params[MAX_DEBUG_PARAMETERS];
-} debugCommnad_t;
-
-
-/******************************************************************************
-
-    ID:       CMD_CONNECTION_SCAN_CFG
-    Desc:     This command configures the periodic connection scan feature 
-    Params:   ConnectionScanParameters_t followed by active and passive channel
-              lists (variable size structure)
-    
-******************************************************************************/
-
-typedef enum
-{
-    BSS_INDEPENDENT                     = 0,
-    BSS_INFRASTRUCTURE                  = 1,
-    BSS_ANY                             = 2,
-    BSS_MAX = 0xFF
-} ScanBssType_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 ScanBssType_e;
-#else
-typedef ScanBssType_enum ScanBssType_e;
-#endif
-
-typedef enum
-{
-    SCAN_SSID_FILTER_TYPE_ANY = 0,
-    SCAN_SSID_FILTER_TYPE_SPECIFIC = 1,
-    SCAN_SSID_FILTER_TYPE_LIST = 2,
-    SCAN_SSID_FILTER_TYPE_LIST_FILTER_DISABLED = 3,
-    MAX_SCAN_SSID_FILTER_TYPE = 0xFF
-} ScanSsidFilterType_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 ScanSsidFilterType_e;
-#else
-typedef ScanSsidFilterType_enum ScanSsidFilterType_e;
-#endif
-
-#define CONN_SCAN_MAX_CHANNELS_BG  14
-#define CONN_SCAN_MAX_CHANNELS_J    4
-#define CONN_SCAN_MAX_CHANNELS_A   23
-#define CONN_SCAN_MAX_CHANNELS_ALL_BANDS        ((CONN_SCAN_MAX_CHANNELS_BG) + (CONN_SCAN_MAX_CHANNELS_A) + (CONN_SCAN_MAX_CHANNELS_J))
-#define CONN_SCAN_MAX_NUM_OF_CYCLES_INTERVALS   (16)        /* Maximum number of configured inter-cycle intervals */
-
-#define CONN_SCAN_MAX_BAND                      (3)         /* Maximum number of bands in scan configuration */
-
-#define CONN_SCAN_DFS_CANDIDATE_CHANNEL     BIT_0
-#define CONN_SCAN_DFS_ENABLED_CHANNEL       BIT_1
-
-typedef struct
-{
-    uint16       scanMinDuration;     /* Min duration (in ms)*/
-    uint16       scanMaxDuration;     /* Max duration (in ms)*/
-    uint16       passiveScanDuration; /* Duration to use for passive scans (in ms)*/
-    uint8        channel;             /* channel number (channel_e) */
-    uint8        txPowerLevelDbm;    /* TX power level in dbm */
-    uint8        channelFlags;        /* BIT 0: DFS channel */
-                                      /* BIT 1: DFS enabled (to be included in active scan) */
-    uint8        padding[3];
-} ConnScanChannelInfo_t;
-
-typedef struct
-{
-    uint32                  cycleIntervals[CONN_SCAN_MAX_NUM_OF_CYCLES_INTERVALS];      /* Intervals between each scan cycle */
-    int8                    rssiThreshold;          /* RSSI threshold */
-    int8                    snrThreshold;           /* SNR threshold */
-    uint8                   maxNumOfCycles;         /* number of cycles to run */
-    uint8                   reportThreshold;        /* Report after N results are received */
-    uint8                   terminateOnReport;      /* Terminate after report */
-    uint8                   resultsTag;             /* Tag for filtered scan results */
-    ScanBssType_e           bssType;                /* BSS type to filter (0 - Infra, 1 - IBSS, 2 - Any) */
-    ScanSsidFilterType_e    ssidFilterType;         /* SSID filter Type (0 - Any, 1 - specified in command, 2 - use SSID list, 3 - use SSID list no filter) */
-    uint8                   ssidLength;             /* SSID Length (if ssidType is specified in command) */
-    uint8                   ssid[32];               /* SSID (if ssidType is specified in command) */
-    uint8                   numProbe;               /* Number of probe requests to transmit per (hidden) SSID per channel */
-
-    uint8                   numOfPassive[CONN_SCAN_MAX_BAND];
-    uint8                   numOfActive[CONN_SCAN_MAX_BAND];
-    uint8                   numOfDfs;
-    uint8                   padding[ 3 ];
-    ConnScanChannelInfo_t   channelList[CONN_SCAN_MAX_CHANNELS_ALL_BANDS];
-} ConnScanParameters_t;
-
-/******************************************************************************
-
-    ID:       CMD_CONNECTION_SCAN_SSID_CFG
-    Desc:     This command configures the SSID filter list to be used in the
-              periodic connection scan
-    Params:   None.
-    
-******************************************************************************/
-
-#define CONN_SCAN_MAX_NUMBER_OF_SSID_ENTRIES        (8)
-
-typedef enum
-{
-    SCAN_SSID_TYPE_PUBLIC = 0,
-    SCAN_SSID_TYPE_HIDDEN = 1,
-    MAX_SCAN_SSID_TYPE = 0xFF
-} ScanSsidType_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 ScanSsidType_e;
-#else
-typedef ScanSsidType_enum ScanSsidType_e;
-#endif
-
-typedef struct
-{
-    ScanSsidType_e      ssidType;
-    uint8               ssidLength; 
-    uint8               ssid[32];
-} ConnScanSSID_t;
-
-
-typedef struct
-{
-    uint8               numOfSSIDEntries;
-    ConnScanSSID_t      SSIDList[CONN_SCAN_MAX_NUMBER_OF_SSID_ENTRIES];
-} ConnScanSSIDList_t;
-
-
-/******************************************************************************
-
-    ID:       CMD_START_PERIODIC_SCAN
-    Desc:     This command instructs the WiLink to start a periodic scan
-              process (either connection-scan or discovery)
-    Params:   None.
-    
-******************************************************************************/
-
-typedef struct
-{
-    uint8   scanTag;
-    uint8   uReserved[3];
-} PeriodicScanTag;
-
-/******************************************************************************
-
-    ID:       CMD_STOP_PERIODIC_SCAN
-    Desc:     This command instructs the WiLink to stop a periodic scan
-              process (either connection-scan or discovery)
-    Params:   None.
-    
-******************************************************************************/
-
-/******************************************************************************
-
-    ID:       CMD_SET_STATUS
-    Desc:     This command instructs the station state
-    Params:   None.
-    
-******************************************************************************/
-
-#define STA_STATE_CONNECTED 1
-
-typedef struct
-{
-    uint8   staState;
-    uint8   pad[3];
-} SetStaState_t; 
-
-/* PLT public definitions*/
-#define TEST_CONTINUOUS 0x04       /* transmit frames contimuously */
-
-
-/*This typedef corresponds to the Fig 1 Frame Format for PER test given in PER test doc.*/
-#define PER_MODE_TX 1
-#define PER_MODE_RX 2
-#define INFRA   0x2         /* BSS is in Infrastructure mode */
-#define LOCAL_MEM_LAST      0x02000000
-#define PBCC_MODULATION_MASK 0x80
-#define OFDM_MODULATION_MASK 0x40
-#define BAND_SELECT_5GHZ     0x10
-#define CTL_PREAMBLE         0x01
-
-
-
-#endif /* PUBLIC_COMMANDS_H*/
diff --git a/wl1271/TWD/FirmwareApi/public_descriptors.h b/wl1271/TWD/FirmwareApi/public_descriptors.h
deleted file mode 100644
index 408297c..0000000
--- a/wl1271/TWD/FirmwareApi/public_descriptors.h
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * public_descriptors.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**********************************************************************************************************************
-
-  FILENAME:       public_descriptors.h
-
-  DESCRIPTION:    Contains the host interface descriptor types in use.
-
-
-
-***********************************************************************************************************************/
-#ifndef PUBLIC_DESCRIPTORS_H
-#define PUBLIC_DESCRIPTORS_H
-
-
-#include "public_types.h"
-
-
-
-/******************************************************************************
-
-		TX PATH
-	 
-******************************************************************************/
-
-#define AID_BROADCAST 0x0       /* broadcast frames AID */
-#define AID_GLOBAL    0xFF      /* unassociated STAs AID */
-
-#define TRQ_DEPTH           16      /* depth of TX Result Queue */
-
-#define NUM_TX_DESCRIPTORS  32      /* Total number of Tx descriptors in the FW */
-
-/* TX attributes masks and offset used in the txAttr of TxIfDescriptor_t. */
-#define     TX_ATTR_SAVE_RETRIES          BIT_0
-#define     TX_ATTR_HEADER_PAD            BIT_1
-#define     TX_ATTR_SESSION_COUNTER       (BIT_2 | BIT_3 | BIT_4)
-#define     TX_ATTR_RATE_POLICY           (BIT_5 | BIT_6 | BIT_7 | BIT_8 | BIT_9)
-#define     TX_ATTR_LAST_WORD_PAD         (BIT_10 | BIT_11)
-#define     TX_ATTR_TX_CMPLT_REQ          BIT_12
-
-#define     TX_ATTR_OFST_SAVE_RETRIES     0
-#define     TX_ATTR_OFST_HEADER_PAD       1
-#define     TX_ATTR_OFST_SESSION_COUNTER  2
-#define     TX_ATTR_OFST_RATE_POLICY      5
-#define     TX_ATTR_OFST_LAST_WORD_PAD    10
-#define     TX_ATTR_OFST_TX_CMPLT_REQ     12
-
-/* The packet transmission result, written in the status field of TxResultDescriptor_t */
-typedef enum
-{
-    TX_SUCCESS              = 0,     
-	TX_HW_ERROR             = 1,
-	TX_DISABLED             = 2,
-	TX_RETRY_EXCEEDED       = 3,
-	TX_TIMEOUT              = 4,
-	TX_KEY_NOT_FOUND        = 5,
-	TX_PEER_NOT_FOUND       = 6,
-    TX_SESSION_MISMATCH     = 7 
-} TxDescStatus_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 TxDescStatus_e;
-#else
-typedef TxDescStatus_enum TxDescStatus_e;
-#endif
-
-/* The Tx Descriptor preceding each Tx packet copied to the FW (before the packet). */
-typedef struct TxIfDescriptor_t
-{
-    uint16          length;		/* Length of packet in words, including descriptor+header+data */
-    uint8           extraMemBlks; /* Number of extra memory blocks to allocate for this packet in addition 
-                                       to the number of blocks derived from the packet length */
-    uint8           totalMemBlks;   /* Total number of memory blocks allocated by the host for this packet. 
-                                    Must be equal or greater than the actual blocks number allocated by HW!! */
-    uint32          startTime;  /* Device time (in us) when the packet arrived to the driver */
-    uint16          lifeTime;   /* Max delay in TUs until transmission. The last device time the 
-                                      packet can be transmitted is: startTime+(1024*LifeTime) */ 
-    uint16          txAttr;		/* Bitwise fields - see TX_ATTR... definitions above. */
-    uint8           descID;		/* Packet identifier used also in the Tx-Result. */
-    uint8           tid;		/* The packet TID value (as User-Priority) */
-    uint8           aid;	    /* Identifier of the remote STA in IBSS, 1 in infra-BSS */
-    uint8           reserved;       /* For HW use, set to 0 */
-
-} TxIfDescriptor_t;
-
-
-/* The Tx result retrieved from FW upon TX completion. */
-typedef struct TxResultDescriptor_t
-{
-    uint8			descID;		 /* Packet Identifier - same value used in the Tx descriptor.*/
-	TxDescStatus_e	status;		 /* The status of the transmission, indicating success or one of several
-									 possible reasons for failure. Refer to TxDescStatus_enum above.*/
-    uint16 			mediumUsage; /* Total air access duration including all retrys and overheads.*/
-    uint32 			fwHandlingTime;	/* The time passed from host xfer to Tx-complete.*/
-    uint32 			mediumDelay; /* Total media delay (from 1st EDCA AIFS counter until TX Complete). */
-    uint8  			lsbSecuritySequenceNumber; /* LS-byte of last TKIP seq-num (saved per AC for recovery).*/
-    uint8  			ackFailures; /* Retry count - number of transmissions without successful ACK.*/
-    TxRateIndex_t	rate;		 /* The rate that succeeded getting ACK (Valid only if status=SUCCESS). */
-    uint8  			spare;       /* for 4-byte alignment. */  
-} TxResultDescriptor_t;
-
-/* The Host-FW Tx-Result control counters */
-typedef struct
-{
-	uint32 TxResultFwCounter;	/* FW updates num of results written to results-queue since FW-init. */
-    uint32 TxResultHostCounter;	/* Host updates num of results read from results-queue since FW-init. */
-} TxResultControl_t;
-
-/* The Host-FW Tx-Result Interface */
-typedef struct 
-{
-	TxResultControl_t TxResultControl;  		   /* See above. */
-	TxResultDescriptor_t TxResultQueue[TRQ_DEPTH];
-} TxResultInterface_t;
-
-
-/******************************************************************************
-
-		RX PATH
-
-******************************************************************************/
-/* ------------------------------------- */
-/* flags field in the RxIfDescriptor_t   */
-/* ------------------------------------- */
-/*   Bit5-7: Encryption type:            */
-/*           0 - none                    */
-/*           1 - WEP                     */
-/*           2 - TKIP                    */
-/*           3 - AES                     */
-/*           4 - GEM                     */
-/*   Bit4: HT                            */
-/*   Bit3: Was part of A-MPDU            */
-/*   Bit2: STBC                          */
-/*   Bit0-1: Band the frame was received */
-/*           from (0=2.4, 1=4.9, 2=5.0)  */
-/* ------------------------------------- */
-#define    RX_DESC_BAND_MASK        0x03  /* Band is in Bits 0-1 */
-#define    RX_DESC_BAND_BG          0x00  
-#define    RX_DESC_BAND_J           0x01  
-#define    RX_DESC_BAND_A           0x02
-#define    RX_DESC_STBC             0x04
-#define    RX_DESC_A_MPDU           0x08
-#define    RX_DESC_HT               0x10
-#define    RX_DESC_ENCRYPT_MASK     0xE0  /* Encryption is in Bits 5-7 */
-#define    RX_DESC_ENCRYPT_WEP      0x20
-#define    RX_DESC_ENCRYPT_TKIP     0x40
-#define    RX_DESC_ENCRYPT_AES      0x60
-#define    RX_DESC_ENCRYPT_GEM      0x80
-
-
-/* ------------------------------------- */
-/* Status field in the RxIfDescriptor_t  */
-/* ------------------------------------- */
-/*   Bit3-7: reserved (0)                */
-/*   Bit0-2: 0 - Success,                */
-/*           1 - RX_DECRYPT_FAIL,        */
-/*           2 - RX_MIC_FAIL             */ 
-/* ------------------------------------- */
-#define    RX_DESC_STATUS_SUCCESS           0  
-#define    RX_DESC_STATUS_DECRYPT_FAIL      1  
-#define    RX_DESC_STATUS_MIC_FAIL          2
-#define    RX_DESC_STATUS_DRIVER_RX_Q_FAIL  3
-
-#define    RX_DESC_STATUS_MASK              7
-
-
-/**********************************************
-    clasify tagging 
-***********************************************/
-typedef enum
-{
-    TAG_CLASS_UNKNOWN       = 0,
-    TAG_CLASS_MANAGEMENT    = 1, /* other than Beacon or Probe Resp */
-    TAG_CLASS_DATA          = 2,
-    TAG_CLASS_QOS_DATA      = 3,
-    TAG_CLASS_BCN_PRBRSP    = 4,
-    TAG_CLASS_EAPOL         = 5, 
-    TAG_CLASS_BA_EVENT      = 6,
-    TAG_CLASS_AMSDU         = 7
-} PacketClassTag_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 PacketClassTag_e;
-#else
-typedef PacketClassTag_enum PacketClassTag_e;
-#endif
-
-typedef uint8 ProcessIDTag_e;
-
-
-/* ------------------------------------------------------- */
-/* flags field in the driverFlags of the RxIfDescriptor_t  */
-/* ------------------------------------------------------- */
-/*   Bit0   :  EndOfBurst flag                              */
-/*   Bit1-7 : - not in use                                 */
-/* ------------------------------------------------------- */
-
-#define DRV_RX_FLAG_END_OF_BURST  0x01
-
-
-
-/******************************************************************************
-
-    RxIfDescriptor_t
-
-    the structure of the Rx Descriptor recieved by HOST.
-
-******************************************************************************/
-typedef struct
-{    
-	uint16              length;             /* Length of payload (including headers)*/
-    
-    uint8               status;             /* 0 = Success, 1 = RX Decrypt Fail, 2 = RX MIC Fail */
-
-    uint8               flags;              /* See RX_DESC_xxx above */
-
-    TxRateIndex_t       rate;               /* Recevied Rate:at ETxRateClassId format */
-
-    uint8               channel;            /* The received channel*/
-    
-    int8                rx_level;           /* The computed RSSI value in db of current frame */  
-    
-    uint8               rx_snr;             /* The computed SNR value in db of current frame */
-                                            
-    uint32              timestamp;          /* Timestamp in microseconds,     */
-
-    PacketClassTag_e    packet_class_tag;   /* Packet classification tagging info */
-
-    ProcessIDTag_e      proccess_id_tag;    /* Driver defined ID */
-
-    uint8               extraBytes;         /* Number of padding bytes added to actual packet length */
-
-    uint8               driverFlags;        /* holds the driver flags to be used internally */
-    
-} RxIfDescriptor_t;
-
-
-
-#endif /* PUBLIC_DESCRIPTORS_H*/
-
-
-
diff --git a/wl1271/TWD/FirmwareApi/public_event_mbox.h b/wl1271/TWD/FirmwareApi/public_event_mbox.h
deleted file mode 100644
index fd8f905..0000000
--- a/wl1271/TWD/FirmwareApi/public_event_mbox.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * public_event_mbox.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**********************************************************************************************************************
-
-  FILENAME:       public_event_mbox.h
- 
-  DESCRIPTION:    Public header for the Event Mailbox FW<->Driver interface
-
-
-
-***********************************************************************************************************************/
-#ifndef PUBLIC_EVENT_MBOX_H
-#define PUBLIC_EVENT_MBOX_H
-
-/******************************************************************************
-
-	EVENT MBOX
-	 
-    The event mechanism is based on a pair of event buffers (buffers "A" and "B") in fixed locations
-    in the device's memory. The host processes one buffer (buffer "A") while the other buffer 
-    (buffer "B") continues to collect events. When the host is finished, it begins processing the 
-    other buffer ("B") while the first buffer ("A") collects, and so on.
-    If the host is not processing events, an interrupt is issued to the host signaling that a 
-    buffer is ready. The interrupt that the host receives indicates the appropriate event structure
-    buffer. Once the host finishes processing events from one buffer, 
-    it signals with an acknowledge interrupt (bit 0 in the INT_TRIG register) that the event buffer
-    is free. This interrupt triggers the device to send the next event structure if there are any 
-    collected events in it.
-
-    Note: Only one instance (the last) of each type of event is collected.
-       
-******************************************************************************/
-
-
-#include "public_types.h"
-#include "public_commands.h"
-#include "public_infoele.h"
-
-
-
-/*************************************************************************
-
-  Events Enumeration 
-
-**************************************************************************/
-typedef enum 
-{
-    RSSI_SNR_TRIGGER_0_EVENT_ID              = BIT_0, 
-    RSSI_SNR_TRIGGER_1_EVENT_ID              = BIT_1, 
-    RSSI_SNR_TRIGGER_2_EVENT_ID              = BIT_2, 
-    RSSI_SNR_TRIGGER_3_EVENT_ID              = BIT_3, 
-    RSSI_SNR_TRIGGER_4_EVENT_ID              = BIT_4, 
-    RSSI_SNR_TRIGGER_5_EVENT_ID              = BIT_5, 
-    RSSI_SNR_TRIGGER_6_EVENT_ID              = BIT_6, 
-    RSSI_SNR_TRIGGER_7_EVENT_ID              = BIT_7, 
-
-    MEASUREMENT_START_EVENT_ID               = BIT_8,
-    MEASUREMENT_COMPLETE_EVENT_ID            = BIT_9,
-    SCAN_COMPLETE_EVENT_ID                   = BIT_10,
-    SCHEDULED_SCAN_COMPLETE_EVENT_ID         = BIT_11,
-    AP_DISCOVERY_COMPLETE_EVENT_ID           = BIT_12,
-    PS_REPORT_EVENT_ID                       = BIT_13,
-    PSPOLL_DELIVERY_FAILURE_EVENT_ID 	     = BIT_14,
-    DISCONNECT_EVENT_COMPLETE_ID             = BIT_15,
-    JOIN_EVENT_COMPLETE_ID                   = BIT_16,
-    CHANNEL_SWITCH_COMPLETE_EVENT_ID         = BIT_17,
-    BSS_LOSE_EVENT_ID                        = BIT_18,
-    REGAINED_BSS_EVENT_ID                    = BIT_19,
-    ROAMING_TRIGGER_MAX_TX_RETRY_EVENT_ID    = BIT_20,
-    RESERVED_21                              = BIT_21,
-    SOFT_GEMINI_SENSE_EVENT_ID               = BIT_22,
-    SOFT_GEMINI_PREDICTION_EVENT_ID          = BIT_23,
-    SOFT_GEMINI_AVALANCHE_EVENT_ID           = BIT_24,
-    PLT_RX_CALIBRATION_COMPLETE_EVENT_ID     = BIT_25,
-    DBG_EVENT_ID                             = BIT_26,
-    HEALTH_CHECK_REPLY_EVENT_ID              = BIT_27,
-
-    PERIODIC_SCAN_COMPLETE_EVENT_ID          = BIT_28,
-    PERIODIC_SCAN_REPORT_EVENT_ID            = BIT_29,
-
-    BA_SESSION_TEAR_DOWN_EVENT_ID	         = BIT_30,
-
-    EVENT_MBOX_ALL_EVENT_ID                  = MAX_POSITIVE32
-} EventMBoxId_e;
-
-/*************************************************************************
-
-  Specific Event Parameters 
-
-**************************************************************************/
-typedef enum
-{
-    SCHEDULED_SCAN_COMPLETED_OK = 0,
-    SCHEDULED_SCAN_TSF_ERROR    = 1
-} ScheduledScanReportStatus_enum;
-
-
-typedef enum
-{
-    CHANNEL_SWITCH_COMPLETE_OK,
-    CHANNEL_SWITCH_TSF_ERROR
-} ChannelSwitchReportStatus_enum;
-
-
-typedef enum
-{
-    ENTER_POWER_SAVE_FAIL    =  0,
-    ENTER_POWER_SAVE_SUCCESS =  1,
-    EXIT_POWER_SAVE_FAIL     =  2,
-    EXIT_POWER_SAVE_SUCCESS  =  3,
-    POWER_SAVE_STATUS_NUMBER
-} EventsPowerSave_enum;
-
-typedef enum
-{
-    TEST1_DBG_EVENT_ID = 0,
-    TEST2_DBG_EVENT_ID = 0x11,
-    LAST_DBG_EVENT_ID= 0xff
-}dbgEventId_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 ScheduledScanReportStatus_e;
-typedef uint8 ChannelSwitchReportStatus_e;
-typedef uint8 EventsPowerSave_e;
-typedef uint8 dbgEventId_e;
-#else
-typedef ScheduledScanReportStatus_enum ScheduledScanReportStatus_e;
-typedef ChannelSwitchReportStatus_enum ChannelSwitchReportStatus_e;
-typedef EventsPowerSave_enum EventsPowerSave_e;
-typedef dbgEventId_enum dbgEventId_e;
-#endif
-
-
-#define MAX_EVENT_REPORT_PARAMS 5
-typedef struct
-{ 
-    dbgEventId_e dbgEventId;  /*uint8*/
-    uint8       numberOfRelevantParams;
-    uint16      reservedPad16;
-    uint32      eventReportP1;
-    uint32      eventReportP2;
-    uint32      eventReportP3;
-}dbgEventRep_t;
-
-typedef struct 
-{
-	uint8		numberOfScanResults;   /* How many results were parsed */
-	uint8       scanTag;               /* Tag of scan */
-    uint8       padding[2];            /* for alignment to 32 bits boundry*/
-    uint32      scheduledScanStatus;   /* [0-7] scan completed status, [8-23] Attended Channels map, [24-31] reserved. */
-} scanCompleteResults_t;
-
-/*************************************************************************
-
-  The Event Mailbox structure in memory 
-
-**************************************************************************/
-typedef struct EventMailBox_t
-{
-    /* Events Bit Mask */
-    uint32 eventsVector;
-    uint32 eventsMask;
-    uint32 reserved1;
-    uint32 reserved2;
-
-    /* Events Data */
-
-
-    dbgEventRep_t      dbgEventRep;         /* refer to dbgEventRep_t*/
-                                            /* [DBG_EVENT_ID]*/
-    
-    scanCompleteResults_t scanCompleteResults; /* Scan complete results (counter and scan tag) */
-    
-    uint16 scheduledScanAttendedChannels;   /* Channels scanned by the Scheduled Scan. */
-                                            /* [SCHEDULED_SCAN_COMPLETE_EVENT_ID]*/
-
-    uint8  softGeminiSenseInfo;             /* Contains the type of the BT Coexistence sense event.*/
-                                            /* [SOFT_GEMINI_SENSE_EVENT_ID]*/    
-
-    uint8  softGeminiProtectiveInfo;        /* Contains information from the BT activity prediction */
-                                            /* machine [SOFT_GEMINI_PREDICTION_EVENT_ID]*/
-
-    int8   RSSISNRTriggerMetric[NUM_OF_RSSI_SNR_TRIGGERS];   /* RSSI and SNR Multiple Triggers Array */
-                                            /* machine [RSSI_SNR_TRIGGER_0-8_EVENT_ID]*/
-
-    uint8  channelSwitchStatus;             /* Status of channel switch. Refer to*/
-                                            /* ChannelSwitchReportStatus_enum.*/
-                                            /* [CHANNEL_SWITCH_COMPLETE_EVENT_ID]*/
-
-    uint8  scheduledScanStatus;             /* Status of scheduled scan. Refer to */
-                                            /* ScheduledScanReportStatus_enum.*/
-                                            /* [SCHEDULED_SCAN_COMPLETE_EVENT_ID]*/
-    
-    uint8  psStatus;                        /* refer to EventsPowerSave_enum.*/
-                                            /* [PS_REPORT_EVENT_ID].*/
-
-    
-
-    uint8  padding[29];                     /* for alignment to 32 bits boundry*/
-
-    
-} EventMailBox_t;
-
-#endif /* PUBLIC_EVENT_MBOX_H*/
-
-
diff --git a/wl1271/TWD/FirmwareApi/public_host_int.h b/wl1271/TWD/FirmwareApi/public_host_int.h
deleted file mode 100644
index 3ac4270..0000000
--- a/wl1271/TWD/FirmwareApi/public_host_int.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * public_host_int.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**********************************************************************************************************************
-
-  FILENAME:       public_host_int.h
-
-  DESCRIPTION:    Contains the host interface fw interrupt structure in use.
-
-
-
-***********************************************************************************************************************/
-#ifndef PUBLIC_HOST_INT_H
-#define PUBLIC_HOST_INT_H
-
-#include "public_types.h"
-
-                
-/*************************************************************************
-
-    Host Interrupt Register (WiLink -> Host)
- 
-**************************************************************************/
-#define ACX_INTR_WATCHDOG           BIT_0   /* HW Initiated interrupt Watchdog timer expiration */
-#define ACX_INTR_INIT_COMPLETE      BIT_1   /* Init sequence is done (masked interrupt, detection through polling only ) */
-    #define ACX_INTR_EVENT_A            BIT_2   /* Event was entered to Event MBOX #A*/
-    #define ACX_INTR_EVENT_B            BIT_3   /* Event was entered to Event MBOX #B*/
-#define ACX_INTR_CMD_COMPLETE       BIT_4   /* Command processing completion*/
-    #define ACX_INTR_HW_AVAILABLE       BIT_5   /* Signaling the host on HW wakeup */
-    #define ACX_INTR_DATA               BIT_6   /* The MISC bit is used for aggregation of RX, TxComplete and TX rate update */
-    #define ACX_INTR_TRACE_A	        BIT_7   /* Trace meassge on MBOX #A */
-    #define ACX_INTR_TRACE_B            BIT_8   /* Trace meassge on MBOX #B */
-
-#define ACX_INTR_ALL                0xFFFFFFFF
-
-
-/*************************************************************************
-
-    Interrupt Trigger Register (Host -> WiLink)              
-  
-**************************************************************************/
-
-/******** Hardware to Embedded CPU Interrupts - first 32-bit register set ********/ 
-   
-#define INTR_TRIG_CMD       BIT_0   /* Host Command Interrupt. Setting this bit masks*/
-                                    /* the interrupt that the host issues to inform*/
-                                    /* the FW that it has sent a command*/
-                                    /* to the Wlan hardware Command Mailbox.*/
-    
-#define INTR_TRIG_EVENT_ACK BIT_1   /* Host Event Acknowlegde Interrupt. The host */
-                                    /* sets this bit to acknowledge that it received*/
-                                    /* the unsolicited information from the event*/
-                                    /* mailbox.*/
-                                       
-#define INTR_TRIG_TX_PROC0  BIT_2   /* OBSOLETE (automatic end-of-transaction interrupt is used instead) */
-                                       
-#define INTR_TRIG_RX_PROC   BIT_3   /* The host sets this bit to inform the FW that */
-                                    /* it read a packet from the RX cyclic buffer */
-
-#define INTR_TRIG_DEBUG_ACK BIT_4 
-    
-#define INTR_TRIG_STATE_CHANGED BIT_5
-        
-
-/******** Hardware to Embedded CPU Interrupts - second 32-bit register set ********/
-
-#define INTR_TRIG_RX_PROC1  BIT_17  /* OBSOLETE */
-
-#define INTR_TRIG_TX_PROC1  BIT_18  /* OBSOLETE */
-
-
-/*************************************************************************
-
-    FW status registers (Host reads from FW upon interrupt from FW)              
-                                                        
-**************************************************************************/
-#define NUM_TX_QUEUES	    4   /* Number of Tx HW Queues (same as ACs). */
-#define NUM_RX_PKT_DESC     8   /* Number of Rx packets short descriptors in the W status */
-
-/* Get field from FwStatus_t->rxPktsDesc[i] */
-#define RX_DESC_GET_MEM_BLK(desc)            ( (desc & 0x000000FF) >>  0 )  /* The first mem-block of the Rx packet */
-#define RX_DESC_GET_LENGTH(desc)             ( (desc & 0x000FFF00) >>  8 )  /* The length of the packet in words */
-#define RX_DESC_GET_UNALIGNED(desc)          ( (desc & 0x00100000) >> 20 )  /* If set, the payload is not 4 bytes aligned */
-#define RX_DESC_GET_PACKET_CLASS_TAG(desc)   ( (desc & 0xFF000000) >> 24 )  /* Get the RX packet class tag */
-
-
-/* Set field in FwStatus_t->rxPktsDesc[i] */
-#define RX_DESC_SET_MEM_BLK(desc, value)     ( desc = (desc & ~0x000000FF) | (value <<  0 ) )
-#define RX_DESC_SET_LENGTH(desc, value)      ( desc = (desc & ~0x000FFF00) | (value <<  8 ) )
-#define RX_DESC_SET_UNALIGNED(desc, value)   ( desc = (desc & ~0x00100000) | (value << 20 ) )
-
-/* The content of the "counters" field in FwStatus_t - see below */
-typedef struct 
-{
-    uint8       fwRxCntr;       /* Incremented by FW upon adding pending Rx entry to aRxPktsDesc */
-    uint8       drvRxCntr;      /* Incremented by FW upon RX host slave interrupt (for debug) */
-    uint8       reserved;        
-    uint8       txResultsCntr;  /* Incremented by FW upon adding Tx-Result to the TxResultQueue */
-} FwStatCntrs_t;
-
-/* The FW status registers structure read by the host upon interrupt from the FW */
-typedef struct 
-{
-    uint32      intrStatus;     /* HINT register content (will be cleared upon the read) */
-    uint32      counters;       /* The counters defined in FwStatCntrs_t - see above */
-    uint32      rxPktsDesc[NUM_RX_PKT_DESC];   /* Array of Rx packets short descriptors (see RX_DESC_SET/GET...) */
-	uint32      txReleasedBlks[NUM_TX_QUEUES]; /* Per queue released blocks count since FW-reset */
-    uint32      fwLocalTime;    /* FW time in usec, used for clock synchronization with the host */
-    uint32      spare[2];       /* Total structure size is 68 bytes */
-} FwStatus_t;
-
-#endif
-
-
diff --git a/wl1271/TWD/FirmwareApi/public_infoele.h b/wl1271/TWD/FirmwareApi/public_infoele.h
deleted file mode 100644
index 96696df..0000000
--- a/wl1271/TWD/FirmwareApi/public_infoele.h
+++ /dev/null
@@ -1,2402 +0,0 @@
-/*
- * public_infoele.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**********************************************************************************************************************
-
-  FILENAME:       public_infoele.h
-
-  DESCRIPTION:    Contains information element defines/structures used by the FW and host.
-
-
-
-***********************************************************************************************************************/
-#ifndef PUBLIC_INFOELE_H
-#define PUBLIC_INFOELE_H
-
-
-#include "public_types.h"
-#include "public_commands.h"
-#include "public_radio.h" 
-
-typedef enum
-{
-    ACX_WAKE_UP_CONDITIONS      = 0x0002,
-    ACX_MEM_CFG                 = 0x0003,
-    ACX_SLOT                    = 0x0004,
-
-    ACX_AC_CFG                  = 0x0007,
-    ACX_MEM_MAP                 = 0x0008,
-    ACX_AID                     = 0x000A,
-
-    ACX_MEDIUM_USAGE            = 0x000F,
-    ACX_RX_CFG                  = 0x0010,
-    ACX_TX_QUEUE_CFG            = 0x0011,
-    ACX_STATISTICS              = 0x0013, /* Debug API*/
-    ACX_PWR_CONSUMPTION_STATISTICS       =0x0014,
-    ACX_FEATURE_CFG             = 0x0015,
-    ACX_TID_CFG                 = 0x001A,
-    ACX_PS_RX_STREAMING         = 0x001B, 
-    ACX_BEACON_FILTER_OPT       = 0x001F,
-    ACX_NOISE_HIST              = 0x0021,
-    ACX_HDK_VERSION             = 0x0022, /* ???*/
-    ACX_PD_THRESHOLD            = 0x0023,
-    ACX_TX_CONFIG_OPT           = 0x0024,
-    ACX_CCA_THRESHOLD           = 0x0025,
-    ACX_EVENT_MBOX_MASK         = 0x0026,
-    ACX_CONN_MONIT_PARAMS       = 0x002D,
-    ACX_CONS_TX_FAILURE         = 0x002F,
-    ACX_BCN_DTIM_OPTIONS        = 0x0031,
-    ACX_SG_ENABLE               = 0x0032,
-    ACX_SG_CFG                  = 0x0033,
-    ACX_FM_COEX_CFG             = 0x0034,
-
-    ACX_BEACON_FILTER_TABLE     = 0x0038,
-    ACX_ARP_IP_FILTER           = 0x0039,
-    ACX_ROAMING_STATISTICS_TBL  = 0x003B,
-    ACX_RATE_POLICY             = 0x003D, 
-    ACX_CTS_PROTECTION          = 0x003E, 
-    ACX_SLEEP_AUTH              = 0x003F,
-    ACX_PREAMBLE_TYPE           = 0x0040,
-    ACX_ERROR_CNT               = 0x0041,
-    ACX_IBSS_FILTER             = 0x0044,
-    ACX_SERVICE_PERIOD_TIMEOUT  = 0x0045,
-    ACX_TSF_INFO                = 0x0046,
-    ACX_CONFIG_PS_WMM           = 0x0049,
-    ACX_ENABLE_RX_DATA_FILTER   = 0x004A,
-    ACX_SET_RX_DATA_FILTER      = 0x004B,
-    ACX_GET_DATA_FILTER_STATISTICS = 0x004C,
-    ACX_RX_CONFIG_OPT           = 0x004E,
-    ACX_FRAG_CFG                = 0x004F,
-    ACX_BET_ENABLE              = 0x0050,
-	
-#ifdef RADIO_SCOPE  /* RADIO MODULE SECTION START */
-
-	ACX_RADIO_MODULE_START      = 0x0500,
-	ACX_RS_ENABLE				= ACX_RADIO_MODULE_START,
-	ACX_RS_RX					= 0x0501,
-
-    /* Add here ... */
-
-	ACX_RADIO_MODULE_END        = 0x0600,
-
-#endif /* RADIO MODULE SECTION END */
-
-    ACX_RSSI_SNR_TRIGGER        = 0x0051,
-    ACX_RSSI_SNR_WEIGHTS        = 0x0052,
-    ACX_KEEP_ALIVE_MODE         = 0x0053,
-    ACX_SET_KEEP_ALIVE_CONFIG   = 0x0054,
-    ACX_BA_SESSION_RESPONDER_POLICY = 0x0055,
-    ACX_BA_SESSION_INITIATOR_POLICY = 0x0056,
-    ACX_PEER_HT_CAP             = 0x0057,
-    ACX_HT_BSS_OPERATION        = 0x0058,
-    ACX_COEX_ACTIVITY           = 0x0059,
-	ACX_BURST_MODE				= 0x005C,
-
-    ACX_SET_RATE_MAMAGEMENT_PARAMS = 0x005D,
-    ACX_GET_RATE_MAMAGEMENT_PARAMS = 0x005E,
-
-    ACX_SET_DCO_ITRIM_PARAMS   = 0x0061,
-   
-    DOT11_RX_MSDU_LIFE_TIME     = 0x1004,
-    DOT11_CUR_TX_PWR            = 0x100D,
-    DOT11_RX_DOT11_MODE         = 0x1012,
-    DOT11_RTS_THRESHOLD         = 0x1013, 
-    DOT11_GROUP_ADDRESS_TBL     = 0x1014,
-    ACX_SET_RADIO_PARAMS		= 0x1015,
-	ACX_PM_CONFIG               = 0x1016,
-     
-    MAX_DOT11_IE = ACX_PM_CONFIG,
-    
-    MAX_IE = 0xFFFF   /*force enumeration to 16bits*/
-} InfoElement_enum;
-
-
-#ifdef HOST_COMPILE
-typedef uint16 InfoElement_e;
-#else
-typedef InfoElement_enum InfoElement_e;
-#endif
-
-
-typedef struct
-{
-    InfoElement_e id;
-    uint16 length;
-    uint32 dataLoc; /*use this to point to for following variable-length data*/
-} InfoElement_t;
-
-
-typedef struct 
-{
-    uint16 id;
-    uint16 len;
-} EleHdrStruct;
-
-#define MAX_NUM_AID     4 /* max number of STAs in IBSS */  
-
-
-#ifdef HOST_COMPILE
-#define INFO_ELE_HDR    EleHdrStruct    EleHdr;
-#else
-#define INFO_ELE_HDR
-#endif
-
-/******************************************************************************
-
-    Name:   ACX_WAKE_UP_CONDITIONS
-    Type:   Configuration
-    Access: Write Only
-    Length: 2
-
-******************************************************************************/
-typedef enum
-{
-    WAKE_UP_EVENT_BEACON_BITMAP     = 0x01, /* Wake on every Beacon*/
-    WAKE_UP_EVENT_DTIM_BITMAP       = 0x02, /* Wake on every DTIM*/
-    WAKE_UP_EVENT_N_DTIM_BITMAP     = 0x04, /* Wake on every Nth DTIM (Listen interval)*/
-    WAKE_UP_EVENT_N_BEACONS_BITMAP  = 0x08, /* Wake on every Nth Beacon (Nx Beacon)*/
-    WAKE_UP_EVENT_BITS_MASK         = 0x0F
-} WakeUpEventBitMask_e;
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint8  wakeUpConditionBitmap;   /* The host can set one bit only. */
-                                    /* WakeUpEventBitMask_e describes the Possible */
-                                    /* Wakeup configuration bits*/
-
-    uint8  listenInterval;          /* 0 for Beacon and Dtim, */
-                                    /* xDtims (1-10) for Listen Interval and */
-                                    /* xBeacons (1-255) for NxBeacon*/
-    uint8  padding[2];              /* alignment to 32bits boundry   */
-}WakeUpCondition_t;
-
-/******************************************************************************
-
-    Name:   ACX_MEM_CFG
-    Type:   Configuration
-    Access: Write Only
-    Length: 12
-
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint8   rxMemblockNumber;           /* specifies the number of memory buffers that */
-                                        /* is allocated to the Rx memory pool. The */
-                                        /* actual number allocated may be less than*/
-                                        /* this number if there are not enough memory */
-                                        /* blocks left over for the Minimum Number of */
-                                        /* Tx Blocks. Returns the actual number of RX */
-                                        /* buffers allocated in the memory map*/
-
-    uint8   txMinimumMemblockNumber;    /* specifies the minimum number of blocks that */
-                                        /* must be allocated to the TX pool. Follows */
-                                        /* this limit even if the Number of Rx Memory */
-                                        /* Blocks parameter is ignored.*/
-
-    uint8   numStations;                /* The number of STAs supported in IBSS mode. */
-                                        /* The FW uses this field to allocate memory */
-                                        /* for STA context data such as security keys*/
-
-    uint8   numSsidProfiles;            /* The number of SSID profiles used in IBSS mode */
-                                        /* Enables different profiles for different STAs */
-
-    uint32  totalTxDescriptors;         /* Total TX Descriptors - in the past it was configured per AC */
-} ACXConfigMemory_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_SLOT
-    Type:   Configuration
-    Access: Write Only
-    Length: 8
-
-******************************************************************************/
-
-typedef enum
-{
-    SLOT_TIME_LONG = 0,     /* the WiLink uses long (20 us) slots*/
-    SLOT_TIME_SHORT = 1,    /* the WiLink uses short (9 us) slots*/
-    DEFAULT_SLOT_TIME = SLOT_TIME_SHORT,
-    MAX_SLOT_TIMES = 0xFF
-} SlotTime_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 SlotTime_e;
-#else
-typedef SlotTime_enum SlotTime_e;
-#endif
-
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint8      woneIndex;   /* reserved*/
-
-    SlotTime_e slotTime;    /* The slot size to be used. refer to SlotTime_enum.    */
-    uint8      reserved[6];
-} ACXSlot_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_AC_CFG
-    Type:   Configuration
-    Access: Write Only
-    Length: 8
-
-******************************************************************************/
-typedef enum
-{
-    AC_BE = 0,          /* Best Effort/Legacy*/
-    AC_BK = 1,          /* Background*/
-    AC_VI = 2,          /* Video*/
-    AC_VO = 3,          /* Voice*/
-    /* AC_BCAST    = 4, */  /* Broadcast dummy access category      */ 
-    AC_CTS2SELF = 4,        /* CTS2Self fictitious AC,              */  
-                            /* uses #4 to follow AC_VO, as          */
-                            /* AC_BCAST does not seem to be in use. */
-        AC_ANY_TID = 0x1F,
-	AC_INVALID = 0xFF,  /* used for gTxACconstraint */
-    NUM_ACCESS_CATEGORIES = 4
-} AccessCategory_enum;
-
-typedef enum
-{
-	TID0 = 0,			/* Best Effort/Legacy*/
-	TID1 = 1,			/* Best Effort/Legacy*/
-	TID2 = 2,			/* Background*/
-	TID3 = 3,			/* Video*/
-	TID4 = 4,			/* Voice*/
-	TID5 = 5,		/* Broadcast dummy access category*/
-	TID6 = 6,
-	TID7 = 7,           /* managment */
-	NUM_TRAFFIC_CATEGORIES = 8
-} TrafficCategory_enum;
-
-
-#define AC_REQUEST                      0xfe    /* Special access category type for */
-                                                /* requests*/
-
-
-/* following are defult values for the IE fields*/
-#define CWMIN_BK  15
-#define CWMIN_BE  15
-#define CWMIN_VI  7
-#define CWMIN_VO  3
-#define CWMAX_BK  1023
-#define CWMAX_BE  63
-#define CWMAX_VI  15
-#define CWMAX_VO  7
-#define AIFS_PIFS 1 /* slot number setting to start transmission at PIFS interval */
-#define AIFS_DIFS 2 /* slot number setting to start transmission at DIFS interval - */
-                    /* normal DCF access */
-
-#define AIFS_MIN AIFS_PIFS
-
-#define AIFSN_BK  7
-#define AIFSN_BE  3
-#define AIFSN_VI  AIFS_PIFS
-#define AIFSN_VO  AIFS_PIFS
-#define TXOP_BK   0
-#define TXOP_BE   0
-#define TXOP_VI   3008
-#define TXOP_VO   1504
-#define DEFAULT_AC_SHORT_RETRY_LIMIT 7
-#define DEFAULT_AC_LONG_RETRY_LIMIT 4
-
-/* rxTimeout values */
-#define NO_RX_TIMEOUT 0
-
-typedef struct 
-{
-    INFO_ELE_HDR
-    uint8   ac;         /* Access Category - The TX queue's access category */
-                        /* (refer to AccessCategory_enum)*/
-    uint8   cwMin;      /* The contention window minimum size (in slots) for */
-                        /* the access class.*/
-    uint16  cwMax;      /* The contention window maximum size (in slots) for */
-                        /* the access class.*/
-    uint8   aifsn;      /* The AIF value (in slots) for the access class.*/
-    uint8   reserved;
-    uint16  txopLimit;  /* The TX Op Limit (in microseconds) for the access class.*/
-} ACXAcCfg_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_MEM_MAP
-    Type:   Configuration
-    Access: Read Only
-    Length: 72
-    Note:   Except for the numTxMemBlks, numRxMemBlks fields, this is
-            used in MASTER mode only!!!
-    
-******************************************************************************/
-#define MEM_MAP_NUM_FIELDS  24
-
-typedef struct 
-{
-    uint32 *controlBlock; /* array of two 32-bit entries in the following order:
-                            1. Tx-Result entries counter written by the FW
-                            2. Tx-Result entries counter read by the host */
-    void   *txResultQueueStart; /* points t first descriptor in TRQ */
-} TxResultPointers_t;
-
-
-typedef struct
-{
-    INFO_ELE_HDR
-    void *codeStart;                
-    void *codeEnd;                  
-    void *wepDefaultKeyStart;
-    void *wepDefaultKeyEnd;         
-    void *staTableStart;
-    void *staTableEnd;              
-    void *packetTemplateStart;
-    void *packetTemplateEnd;        
-    TxResultPointers_t  trqBlock;             
- 
-    void *queueMemoryStart;
-    void *queueMemoryEnd; 
-    void *packetMemoryPoolStart;
-    void *packetMemoryPoolEnd;
-    void *debugBuffer1Start;
-    void *debugBuffer1End;
-    void *debugBuffer2Start;
-    void *debugBuffer2End;
-
-    uint32 numTxMemBlks;    /* Number of blocks that FW allocated for TX packets.*/
-    uint32 numRxMemBlks;    /* Number of blocks that FW allocated for RX packets.   */
-
-    /* the following 4 fields are valid in SLAVE mode only */
-    uint8   *txCBufPtr;
-    uint8   *rxCBufPtr;
-    void    *rxControlPtr;
-    void    *txControlPtr;
-
-} MemoryMap_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_AID
-    Type:   Configuration
-    Access: Write Only
-    Length: 2
-    
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint16  Aid;    /* The Association ID to the WiLink. The WiLink uses this */
-                    /* field to determine when the STA's AID bit is set in a */
-                    /* received beacon and when a PS Poll frame should be */
-                    /* transmitted to the AP. The host configures this information */
-                    /* element after it has associated with an AP. This information */
-                    /* element does not need to be set in Ad Hoc mode.*/
-    uint8  padding[2];  /* alignment to 32bits boundry   */
-} ACXAid_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_ERROR_CNT
-    Type:   Operation
-    Access: Read Only
-    Length: 12
-    
-******************************************************************************/
-typedef struct
-{
-    INFO_ELE_HDR
-    uint32 PLCPErrorCount;  /* The number of PLCP errors since the last time this */
-                            /* information element was interrogated. This field is */
-                            /* automatically cleared when it is interrogated.*/
-    
-    uint32 FCSErrorCount;   /* The number of FCS errors since the last time this */
-                            /* information element was interrogated. This field is */
-                            /* automatically cleared when it is interrogated.*/
-    
-    uint32 validFrameCount; /* The number of MPDUÂ’s without PLCP header errors received*/
-                            /* since the last time this information element was interrogated. */
-                            /* This field is automatically cleared when it is interrogated.*/
-
-    uint32 seqNumMissCount; /* the number of missed sequence numbers in the squentially */
-                            /* values of frames seq numbers */
-
-} ACXErrorCounters_t;
-
-/******************************************************************************
-
-    Name:   ACX_MEDIUM_USAGE
-    Type:   Configuration
-    Access: Read Only
-    Length: 8
-
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint32 mediumUsage; /* report to the host the value of medium usage registers*/
-    uint32 period;      /* report to the host the value of medium period registers*/
-} ACXMediumUsage_t;
-
-/******************************************************************************
-
-    Name:   ACX_RX_CFG
-    Type:   Filtering Configuration
-    Access: Write Only
-    Length: 8
-    
-******************************************************************************/
-/*
- * Rx configuration (filter) information element
- * ---------------------------------------------
- */
-/*
-    RX ConfigOptions Table
-    Bit     Definition
-    ===     ==========
-    31:14   Reserved
-    13      Copy RX Status - when set, write three receive status words to top of 
-            rx'd MPDU.
-            When clear, do not write three status words (added rev 1.5)
-    12      Reserved
-    11      RX Complete upon FCS error - when set, give rx complete interrupt for 
-            FCS errors, after the rx filtering, e.g. unicast frames not to us with 
-            FCS error will not generate an interrupt
-    10      SSID Filter Enable - When set, the WiLink discards all beacon, 
-            probe request, and probe response frames with an SSID that does not 
-            match the SSID specified by the host in the START/JOIN command. 
-            When clear, the WiLink receives frames with any SSID.
-    9       Broadcast Filter Enable - When set, the WiLink discards all broadcast 
-            frames. When clear, the WiLink receives all received broadcast frames.
-    8:6     Reserved
-    5       BSSID Filter Enable - When set, the WiLink discards any frames with a 
-            BSSID that does not match the BSSID specified by the host. 
-            When clear, the WiLink receives frames from any BSSID.
-    4       MAC Addr Filter - When set, the WiLink discards any frames with a 
-            destination address that does not match the MAC address of the adaptor. 
-            When clear, the WiLink receives frames destined to any MAC address.
-    3       Promiscuous - When set, the WiLink receives all valid frames 
-            (i.e., all frames that pass the FCS check). 
-            When clear, only frames that pass the other filters specified are received.
-    2       FCS - When set, the WiLink includes the FCS with the received frame. 
-            When clear, the FCS is discarded.
-    1       PLCP header - When set, write all data from baseband to frame buffer 
-            including PHY header.
-    0       Reserved - Always equal to 0.
-
-    RX FilterOptions Table
-    Bit     Definition
-    ===     ==========
-    31:12   Reserved - Always equal to 0.
-    11      Association - When set, the WiLink receives all association related frames 
-            (association request/response, reassocation request/response, and 
-            disassociation). When clear, these frames are discarded.
-    10      Auth/De auth - When set, the WiLink receives all authentication and 
-            de-authentication frames. When clear, these frames are discarded.
-    9       Beacon - When set, the WiLink receives all beacon frames. When clear, 
-            these frames are discarded.
-    8       Contention Free - When set, the WiLink receives all contention free frames. 
-            When clear, these frames are discarded.
-    7       Control - When set, the WiLink receives all control frames. 
-            When clear, these frames are discarded.
-    6       Data - When set, the WiLink receives all data frames.   
-            When clear, these frames are discarded.
-    5       FCS Error - When set, the WiLink receives frames that have FCS errors. 
-            When clear, these frames are discarded.
-    4       Management - When set, the WiLink receives all management frames. 
-            When clear, these frames are discarded.
-    3       Probe Request - When set, the WiLink receives all probe request frames. 
-            When clear, these frames are discarded.
-    2       Probe Response - When set, the WiLink receives all probe response frames. 
-            When clear, these frames are discarded.
-    1       RTS/CTS/ACK - When set, the WiLink receives all RTS, CTS and ACK frames. 
-            When clear, these frames are discarded.
-    0       Rsvd Type/Sub Type - When set, the WiLink receives all frames that 
-            have reserved frame types and sub types as defined by the 802.11 
-            specification. 
-            When clear, these frames are discarded.
-*/
-typedef struct
-{
-    INFO_ELE_HDR
-    uint32          ConfigOptions;  /* The configuration of the receiver in the WiLink. */
-                                    /* "RX ConfigOptions Table" describes the format of */
-                                    /* this field.*/
-    uint32          FilterOptions;  /* The types of frames that the WiLink can receive. */
-                                    /* "RX FilterOptions Table" describes the format of */
-                                    /* this field.*/
-} ACXRxConfig_t;
-
-/******************************************************************************
-
-    Name:   ACX_BEACON_FILTER_OPT
-    Desc:   This information element enables the host to activate beacon filtering. 
-            The filter can only be activated when the STA is in PS mode. 
-            When activated, either the host is not notified about beacons whose 
-            unicast TIM bit is not set, or these beacons are buffered first and 
-            the host is notified only after the buffer reaches a predetermined size.
-            The host should not activate the filter if it configures the firmware 
-            to listen to broadcasts (see the VBM Options field in the 
-            ACXPowerMgmtOptions information element). The filter only affects beacons, 
-            and not other MSDUs - the firmware notifies the host immediately about 
-            their arrival.
-    Type:   Filtering Configuration
-    Access: Write Only
-    Length: 2
- 
-******************************************************************************/
-typedef struct  
-{
-    INFO_ELE_HDR
-    uint8   enable;                /* Indicates whether the filter is enabled. */
-                                   /* 1 - enabled, 0 - disabled. */
-    uint8   maxNumOfBeaconsStored; /* The number of beacons without the unicast TIM */
-                                   /* bit set that the firmware buffers before */
-                                   /* signaling the host about ready frames. */
-                                   /* When set to 0 and the filter is enabled, beacons */
-                                   /* without the unicast TIM bit set are dropped.*/
-    uint8  padding[2];             /* alignment to 32bits boundry   */
-} ACXBeaconFilterOptions_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_BEACON_FILTER_TABLE
-    Desc:   This information element configures beacon filtering handling for the
-            set of information elements. An information element in a beacon can be 
-            set to be: ignored (never compared, and changes will not cause beacon 
-            transfer), checked (compared, and transferred in case of a change), or 
-            transferred (transferred to the host for each appearance or disappearance).
-            The table contains all information elements that are subject to monitoring 
-            for host transfer. 
-            All information elements that are not in the table should be ignored for 
-            monitoring.
-            This functionality is only enabled when beacon filtering is enabled by 
-            ACX_BEACON_FILTER_OPT.
-    Type:   Filtering Configuration
-    Access: Write Only
-    Length: 101
-    Notes:  the field measuring the value of received beacons for which the device 
-            wakes up the host in ACX_BEACON_FILTER_OPT does not affect 
-            this information element.
-    
-******************************************************************************/
-
-/*
-    ACXBeaconFilterEntry (not 221)
-    Byte Offset     Size (Bytes)    Definition 
-    ===========     ============    ==========
-    0               1               IE identifier
-    1               1               Treatment bit mask
-
-    ACXBeaconFilterEntry (221)
-    Byte Offset     Size (Bytes)    Definition 
-    ===========     ============    ==========
-    0               1               IE identifier
-    1               1               Treatment bit mask
-    2               3               OUI
-    5               1               Type
-    6               2               Version
-
-
-    Treatment bit mask - The information element handling:
-                         bit 0 - The information element is compared and transferred
-                                 in case of change.
-                         bit 1 - The information element is transferred to the host 
-                                 with each appearance or disappearance.
-                         Note that both bits can be set at the same time.
-*/
-#define BEACON_FILTER_TABLE_MAX_IE_NUM                      (32)
-#define BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM      (6)
-#define BEACON_FILTER_TABLE_IE_ENTRY_SIZE                   (2)
-#define BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE   (6)
-#define BEACON_FILTER_TABLE_MAX_SIZE    ((BEACON_FILTER_TABLE_MAX_IE_NUM * BEACON_FILTER_TABLE_IE_ENTRY_SIZE) + \
-                                         (BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM * BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE))
-
-typedef struct ACXBeaconFilterIETableStruct {
-    INFO_ELE_HDR
-    uint8 NumberOfIEs;                          /* The number of IE's in the table*/
-                                                /* 0 - clears the table.*/
-
-    uint8 padding[3];  /* alignment to 32bits boundry   */
-    uint8 IETable[BEACON_FILTER_TABLE_MAX_SIZE];
-} ACXBeaconFilterIETable_t;
-
-/******************************************************************************
-
-    Name:   ACX_COEX_ACTIVITY_TABLE
-    
-******************************************************************************/
-
-typedef enum
-{
-    COEX_IP_BT = 0,
-    COEX_IP_WLAN, 
-    COEX_IP_DUAL_MODE,   /* That define isn't valid value in DR&FW interface and use just in the FW */
-    MAX_COEX_IP
-} CoexIp_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 CoexIp_e;
-#else
-typedef CoexIp_enum CoexIp_e;
-#endif
-
-typedef struct ACXCoexActivityIEStruct {
-    INFO_ELE_HDR
-    CoexIp_e coexIp;         /* 0-BT, 1-WLAN (according to CoexIp_e in FW) */
-    uint8  activityId;       /* According to BT/WLAN activity numbering in FW */ 
-    uint8  defaultPriority;  /* 0-255, activity default priority */
-    uint8  raisedPriority;   /* 0-255, activity raised priority */
-    uint16 minService;       /* 0-65535, The minimum service requested either in
-                                requests or in milliseconds depending on activity ID */
-    uint16 maxService;       /* 0-65535, The maximum service allowed either in
-                            requests or in milliseconds depending on activity ID */
-} ACXCoexActivityIE_t;
-
-/******************************************************************************
-
-    Name:   ACX_ARP_IP_FILTER 
-    Type:   Filtering Configuration
-    Access: Write Only
-    Length: 20
-
-******************************************************************************/
-
-#define ARP_FILTER_DISABLED                    (0)
-#define ARP_FILTER_ENABLED                  (0x01)
-#define ARP_FILTER_AUTO_ARP_ENABLED         (0x03)
-
-typedef struct  
-{    
-    INFO_ELE_HDR
-    uint8     ipVersion;       /* The IP version of the IP address: 4 - IPv4, 6 - IPv6.*/
-    uint8     arpFilterEnable; /* 0x00 - No ARP features */
-                               /* 0x01 - Only ARP filtering */
-                               /* 0x03 - Both ARP filtering and Auto-ARP */
-                               /* For IPv6 it MUST be 0 */
-    uint8     padding[2];      /* alignment to 32bits boundry   */
-    uint8     address[16];     /* The IP address used to filter ARP packets. ARP packets */
-                               /* that do not match this address are dropped. */
-                               /* When the IP Version is 4, the last 12 bytes of */
-                               /* the address are ignored.*/
-    
-} ACXConfigureIP_t;
-
-
-/******************************************************************************
-
-  Name:     ACX_IBSS_FILTER
-  Type:     Filtering Configuration
-  Access:   Write Only
-  Length:   1
-  
-******************************************************************************/
-typedef struct  
-{
-    INFO_ELE_HDR
-    uint8   enable; /* if set (i.e. IBSS mode), forward beacons from the same SSID*/
-                    /* (also from different BSSID), with bigger TSF then the this of */
-                    /* the current BSS.*/
-    uint8   padding[3]; /* alignment to 32bits boundry   */
-} ACXIBSSFilterOptions_t;
-
-
-/******************************************************************************
-
-  Name:     ACX_SERVICE_PERIOD_TIMEOUT
-  Type:     Configuration
-  Access:   Write Only
-  Length:   1
-  
-******************************************************************************/
-typedef struct 
-{    
-    INFO_ELE_HDR
-    uint16 PsPollTimeout; /* the maximum time that the device will wait to receive */
-                          /* traffic from the AP after transmission of PS-poll.*/
-    
-    uint16 UpsdTimeout;   /* the maximum time that the device will wait to receive */
-                          /* traffic from the AP after transmission from UPSD enabled*/
-                          /* queue.*/
-} ACXRxTimeout_t;
-
-/******************************************************************************
-
-    Name:   ACX_TX_QUEUE_CFG
-    Type:   Configuration
-    Access: Write Only
-    Length: 8
-    
-******************************************************************************/
-typedef struct
-{
-    INFO_ELE_HDR
-    uint8   qID;                        /* The TX queue ID number.*/
-    uint8   padding[3];                 /* alignment to 32bits boundry   */
-    uint16  numberOfBlockHighThreshold; /* The maximum memory blocks allowed in the */
-                                        /* queue.*/
-    uint16  numberOfBlockLowThreshold;  /* The minimum memory blocks that are */
-                                        /* guaranteed for this queue.*/
-} ACXTxQueueCfg_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_STATISTICS
-    Type:   Statistics
-    Access: Write Only
-    Length: 
-    Note:   Debug API
-
-******************************************************************************/
-typedef struct 
-{
-    uint32  debug1;
-    uint32  debug2;
-    uint32  debug3;
-    uint32  debug4;
-    uint32  debug5;
-    uint32  debug6;
-}DbgStatistics_t;
-
-typedef struct 
-{
-    uint32  numOfTxProcs;
-    uint32  numOfPreparedDescs;
-    uint32  numOfTxXfr;
-    uint32  numOfTxDma;    
-    uint32  numOfTxCmplt;
-    uint32  numOfRxProcs;
-    uint32  numOfRxData;
-}RingStatistics_t;
-
-typedef struct
-{
-    uint32 numOfTxTemplatePrepared;
-    uint32 numOfTxDataPrepared;
-    uint32 numOfTxTemplateProgrammed;
-    uint32 numOfTxDataProgrammed;
-    uint32 numOfTxBurstProgrammed;
-    uint32 numOfTxStarts;
-    uint32 numOfTxImmResp;
-    uint32 numOfTxStartTempaltes;
-    uint32 numOfTxStartIntTemplate;
-    uint32 numOfTxStartFwGen;
-    uint32 numOfTxStartData;
-    uint32 numOfTxStartNullFrame;
-    uint32 numOfTxExch;
-    uint32 numOfTxRetryTemplate;
-    uint32 numOfTxRetryData;
-    uint32 numOfTxExchPending;
-    uint32 numOfTxExchExpiry;
-    uint32 numOfTxExchMismatch;
-    uint32 numOfTxDoneTemplate;
-    uint32 numOfTxDoneData;
-    uint32 numOfTxDoneIntTemplate;
-    uint32 numOfTxPreXfr;
-    uint32 numOfTxXfr;
-    uint32 numOfTxXfrOutOfMem;
-    uint32 numOfTxDmaProgrammed;
-    uint32 numOfTxDmaDone;
-} TxStatistics_t;
-
-
-typedef struct
-{
-    uint32 RxOutOfMem;
-    uint32 RxHdrOverflow;
-    uint32 RxHWStuck;
-    uint32 RxDroppedFrame;
-    uint32 RxCompleteDroppedFrame;
-    uint32 RxAllocFrame;
-	uint32 RxDoneQueue;
-	uint32 RxDone;
-	uint32 RxDefrag;
-	uint32 RxDefragEnd;
-	uint32 RxMic;
-	uint32 RxMicEnd;
-	uint32 RxXfr;
-    uint32 RxXfrEnd;
-    uint32 RxCmplt;
-    uint32 RxPreCmplt;
-    uint32 RxCmpltTask;
-	uint32 RxPhyHdr;
-    uint32 RxTimeout;
-} RxStatistics_t;
-
-
-typedef struct
-{
-    uint32 RxDMAErrors;
-    uint32 TxDMAErrors;
-} DMAStatistics_t;
-
-
-typedef struct
-{
-    uint32 IRQs;              /* irqisr() */
-} IsrStatistics_t;
-
-
-typedef struct WepStatistics_t
-{
-    uint32 WepAddrKeyCount;      /* Count of WEP address keys configured*/
-    uint32 WepDefaultKeyCount;   /* Count of default keys configured*/
-    uint32 WepKeyNotFound;       /* count of number of times that WEP key not found on lookup*/
-    uint32 WepDecryptFail;       /* count of number of times that WEP key decryption failed*/
-    uint32 WepEncryptFail;       /* count of number of times that WEP key encryption failed*/
-    uint32 WepDecPackets;        /* WEP Packets Decrypted*/
-    uint32 WepDecInterrupt;      /* WEP Decrypt Interrupts*/
-    uint32 WepEnPackets;         /* WEP Packets Encrypted*/
-    uint32 WepEnInterrupt;       /* WEP Encrypt Interrupts*/
-} WepStatistics_t;
-
-
-#define PWR_STAT_MAX_CONT_MISSED_BCNS_SPREAD 10
-typedef struct PwrStatistics_t
-{
-    uint32 MissingBcnsCnt;      /* Count the amount of missing beacon interrupts to the host.*/
-    uint32 RcvdBeaconsCnt;      /* Count the number of received beacons.*/
-    uint32 ConnectionOutOfSync;         /* Count the number of times TSF Out Of Sync occures, meaning we lost more consecutive beacons that defined by the host's threshold.*/
-    uint32 ContMissBcnsSpread[PWR_STAT_MAX_CONT_MISSED_BCNS_SPREAD];  /* Gives statistics about the spread continuous missed beacons.*/
-                                    /* The 16 LSB are dedicated for the PS mode.*/
-                                    /* The 16 MSB are dedicated for the PS mode.*/
-                                    /* ContMissBcnsSpread[0] - single missed beacon.*/
-                                    /* ContMissBcnsSpread[1] - two continuous missed beacons.*/
-                                    /* ContMissBcnsSpread[2] - three continuous missed beacons.*/
-                                    /* ...*/
-                                    /* ContMissBcnsSpread[9] - ten and more continuous missed beacons.*/
-    uint32 RcvdAwakeBeaconsCnt; /* Count the number of beacons in awake mode.*/
-} PwrStatistics_t;
-
-
-typedef struct MicStatistics_t
-{
-    uint32 MicRxPkts;
-    uint32 MicCalcFailure;
-} MicStatistics_t;
-
-
-typedef struct AesStatisticsStruct
-{
-    uint32 AesEncryptFail;
-    uint32 AesDecryptFail;
-    uint32 AesEncryptPackets;
-    uint32 AesDecryptPackets;
-    uint32 AesEncryptInterrupt;
-    uint32 AesDecryptInterrupt;
-} AesStatistics_t;
-
-typedef struct GemStatisticsStruct
-{
-    uint32 GemEncryptFail;
-    uint32 GemDecryptFail;
-    uint32 GemEncryptPackets;
-    uint32 GemDecryptPackets;
-    uint32 GemEncryptInterrupt;
-    uint32 GemDecryptInterrupt;
-} GemStatistics_t;
-
-typedef struct EventStatistics_t
-{
-    uint32 calibration;
-    uint32 rxMismatch;
-    uint32 rxMemEmpty;
-} EventStatistics_t;
-
-
-typedef struct PsPollUpsdStatistics_t
-{
-    uint32 psPollTimeOuts;
-    uint32 upsdTimeOuts;
-    uint32 upsdMaxAPturn;
-    uint32 psPollMaxAPturn;
-    uint32 psPollUtilization;
-    uint32 upsdUtilization;
-} PsPollUpsdStatistics_t;
-
-typedef struct RxFilterStatistics_t
-{
-    uint32 beaconFilter;
-    uint32 arpFilter;
-    uint32 MCFilter;
-    uint32 dupFilter;
-    uint32 dataFilter;
-    uint32 ibssFilter;
-} RxFilterStatistics_t;
-
-typedef struct ClaibrationFailStatistics_t
-{
-	uint32 initCalTotal;
-	uint32 initRadioBandsFail;
-	uint32 initSetParams;
-	uint32 initTxClpcFail;
-	uint32 initRxIqMmFail;
-	uint32 tuneCalTotal;
-	uint32 tuneDrpwRTrimFail;
-	uint32 tuneDrpwPdBufFail;
-	uint32 tuneDrpwTxMixFreqFail;
-	uint32 tuneDrpwTaCal;
-	uint32 tuneDrpwRxIf2Gain;
-	uint32 tuneDrpwRxDac;
-	uint32 tuneDrpwChanTune;
-	uint32 tuneDrpwRxTxLpf;
-	uint32 tuneDrpwLnaTank;
-	uint32 tuneTxLOLeakFail;
-	uint32 tuneTxIqMmFail;
-	uint32 tuneTxPdetFail;
-	uint32 tuneTxPPAFail;
-	uint32 tuneTxClpcFail;
-	uint32 tuneRxAnaDcFail;
-	uint32 tuneRxIqMmFail;
-	uint32 calStateFail;
-}ClaibrationFailStatistics_t;
-
-typedef struct ACXStatisticsStruct
-{
-    INFO_ELE_HDR
-    RingStatistics_t ringStat;
-    DbgStatistics_t  debug;
-    TxStatistics_t   tx;
-    RxStatistics_t   rx;
-    DMAStatistics_t  dma;
-    IsrStatistics_t  isr;
-    WepStatistics_t  wep;
-    PwrStatistics_t  pwr;
-    AesStatistics_t  aes;
-    MicStatistics_t  mic;
-    EventStatistics_t event;
-    PsPollUpsdStatistics_t ps;
-    RxFilterStatistics_t rxFilter;
-	ClaibrationFailStatistics_t radioCal;
-    GemStatistics_t  gem;
-} ACXStatistics_t;
-
-/******************************************************************************
-
-    Name:   ACX_ROAMING_STATISTICS_TBL
-    Desc:   This information element reads the current roaming triggers 
-            counters/metrics. 
-    Type:   Statistics
-    Access: Read Only
-    Length: 6
-
-******************************************************************************/
-typedef struct 
-{
-    INFO_ELE_HDR
-    uint32 MissedBeacons; /* The current number of consecutive lost beacons*/
-	uint8  snrData;       /* The current average SNR in db - For Data Packets*/
-	uint8  snrBeacon;     /* The current average SNR in db - For Beacon Packets*/
-    int8   rssiData;      /* The current average RSSI  - For Data Packets*/
-    int8   rssiBeacon;    /* The current average RSSI - For Beacon Packets*/
-}ACXRoamingStatisticsTable_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_FEATURE_CFG
-    Desc:   Provides expandability for future features
-    Type:   Configuration
-    Access: Write Only
-    Length: 8
-    
-******************************************************************************/
-
-/* bit defines for Option: */
-#define FEAT_PCI_CLK_RUN_ENABLE     0x00000002  /* Enable CLK_RUN on PCI bus */
-
-/* bit defines for dataflowOptions: */
-#define DF_ENCRYPTION_DISABLE       0x00000001  /* When set, enable encription in FW.*/
-                                                /* when clear, disable encription. */
-#define DF_SNIFF_MODE_ENABLE        0x00000080  /* When set, enable decryption in FW.*/
-                                                /* when clear, disable decription. */
-typedef struct
-{
-    INFO_ELE_HDR
-    uint32 Options;         /* Data flow options - refer to above definitions*/
-    uint32 dataflowOptions; /* Data flow options - refer to above definitions*/
-} ACXFeatureConfig_t;
-
-
-
-/******************************************************************************
-
-    Name:   ACX_TID_CFG
-    Type:   Configuration
-    Access: Write Only
-    Length: 16
-    
-******************************************************************************/
-typedef enum
-{
-    CHANNEL_TYPE_DCF = 0,   /* DC/LEGACY*/
-    CHANNEL_TYPE_EDCF = 1,  /* EDCA*/
-    CHANNEL_TYPE_HCCA = 2,  /* HCCA*/
-    MAX_CHANNEL_TYPE = CHANNEL_TYPE_HCCA
-} ChannelType_enum;
-
-typedef enum
-{
-    PS_SCHEME_LEGACY         = 0, /* Regular PS: simple sending of packets*/
-    PS_SCHEME_UPSD_TRIGGER   = 1, /* UPSD: sending a packet triggers a UPSD downstream*/
-    PS_SCHEME_LEGACY_PSPOLL  = 2, /* Legacy PSPOLL: a PSPOLL packet will be sent before */
-                                  /* every data packet transmission in this queue.*/
-    PS_SCHEME_SAPSD          = 3, /* Scheduled APSD mode.*/
-    MAX_PS_SCHEME = PS_SCHEME_SAPSD
-} PSScheme_enum;
-
-typedef enum
-{
-    ACK_POLICY_LEGACY = 0,   /* ACK immediate policy*/
-    ACK_POLICY_NO_ACK = 1,   /* no ACK policy*/
-    ACK_POLICY_BLOCK  = 2,   /* block ack policy*/
-    MAX_ACK_POLICY = ACK_POLICY_BLOCK
-} AckPolicy_enum;
-
-
-#ifdef HOST_COMPILE
-typedef uint8 ChannelType_e;
-typedef uint8 PSScheme_e;
-typedef uint8 AckPolicy_e;
-#else
-typedef ChannelType_enum ChannelType_e;
-typedef PSScheme_enum PSScheme_e;
-typedef AckPolicy_enum AckPolicy_e;
-#endif
-
-
-
-/* Michal recommendation:
-   in the ACXTIDConfig_t structure we need only the fields psScheme, and one other field for AC id (queue? tsid?).
-   the rest are obsolete. see IEPsDeliveryTriggerType_t in CE2.0.
-   */
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint8   queueID;        /* The TX queue ID number (0-7).*/
-    uint8   channelType;    /* Channel access type for the queue.*/
-                            /* Refer to ChannelType_enum.*/
-    uint8   tsid;           /* for EDCA - the AC Index (0-3, refer to*/
-                            /* AccessCategory_enum).*/
-                            /* For HCCA - HCCA Traffic Stream ID (TSID) of */
-                            /* the queue (8-15).*/
-    PSScheme_e  psScheme;   /* The power save scheme of the specified queue.*/
-                            /* Refer to PSScheme_enum.*/
-    AckPolicy_e ackPolicy;  /* The TX queue ACK policy. */
-    uint8  padding[3];      /* alignment to 32bits boundry   */
-    uint32 APSDConf[2];     /* Not supported in this version !!!*/
-}ACXTIDConfig_t;
-
-
-
-/******************************************************************************
-
-    Name:	ACX_PS_RX_STREAMING
-	Type:	Configuration
-	Access:	Write Only
-	Length: 32
-	
-******************************************************************************/
-typedef struct
-{
-    INFO_ELE_HDR
-    uint8 	TID;            /* The TID index*/
-    Bool_e 	rxPSDEnabled;   /* indicates if this traffic stream requires */
-                            /* employing an RX Streaming delivery mechanism for the TID*/
-
-    uint8   streamPeriod;   /* the time period for which a trigger needs to be transmitted*/
-                            /* in case no data TX triggers are sent by host*/
-    uint8   txTimeout;      /* the timeout from last TX trigger after which FW*/
-                            /* starts generating triggers by itself*/
-}ACXPsRxStreaming_t;
-
-/************************************************************
-*      MULTIPLE RSSI AND SNR                                *
-*************************************************************/
-
-typedef enum
-{
-    RX_QUALITY_EVENT_LEVEL = 0,  /* The event is a "Level" indication which keeps */
-                               /* triggering as long as the average RSSI is below*/
-                               /* the threshold.*/
-
-	RX_QUALITY_EVENT_EDGE = 1    /* The event is an "Edge" indication which triggers*/
-                               /* only when the RSSI threshold is crossed from above.*/
-}rxQualityEventType_enum;
-
-/* The direction in which the trigger is active */
-typedef enum
-{
-    RSSI_EVENT_DIR_LOW = 0,
-    RSSI_EVENT_DIR_HIGH = 1,
-    RSSI_EVENT_DIR_BIDIR = 2
-}RssiEventDir_e;
-
-/******************************************************************************
-
-    RSSI/SNR trigger configuration:
-
-    ACX_RSSI_SNR_TRIGGER
-    ACX_RSSI_SNR_WIGHTS
-
-******************************************************************************/
-#define NUM_OF_RSSI_SNR_TRIGGERS 8
-typedef struct
-{
-    int16  threshold;
-    uint16 pacing; /* Minimum delay between consecutive triggers in milliseconds (0 - 60000) */
-    uint8  metric; /* RSSI Beacon, RSSI Packet, SNR Beacon, SNR Packet */
-    uint8  type;   /* Level / Edge */
-    uint8  direction; /* Low, High, Bidirectional */
-    uint8  hystersis; /* Hysteresis range in dB around the threshold value (0 - 255) */
-    uint8  index; /* Index of Event. Values 0 - 7 */
-    uint8  enable; /* 1 - Configured, 2 - Not Configured;  (for recovery using) */
-    uint8  padding[2];
-}RssiSnrTriggerCfg_t;
-
-typedef struct
-{
-    INFO_ELE_HDR
-    RssiSnrTriggerCfg_t param;
-}ACXRssiSnrTriggerCfg_t;
-
-/* Filter Weight for every one of 4 RSSI /SNR Trigger Metrics  */
-typedef struct
-{
-    uint8 rssiBeaconAverageWeight;
-    uint8 rssiPacketAverageWeight;
-    uint8 snrBeaconAverageWeight;
-    uint8 snrPacketAverageWeight;
-}RssiSnrAverageWeights_t;
-
-typedef struct
-{
-    INFO_ELE_HDR
-    RssiSnrAverageWeights_t param;
-}ACXRssiSnrAverageWeights_t;
-
-typedef enum
-{
-    METRIC_EVENT_RSSI_BEACON = 0,
-    METRIC_EVENT_RSSI_DATA   = 1,
-    METRIC_EVENT_SNR_BEACON  = 2,
-    METRIC_EVENT_SNR_DATA     = 3, 
-	METRIC_EVENT_TRIGGER_SIZE = 4
-}MetricEvent_e;
-
-/******************************************************************************
-
-    Name:   ACX_NOISE_HIST
-    Desc:   Noise Histogram activation is done by special command from host which
-            is responsible to read the results using this IE.
-    Type:   Configuration
-    Access: Read Only
-    Length: 48 (NOISE_HIST_LEN=8)
-    
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint32 counters[NOISE_HIST_LEN]; /* This array of eight 32 bit counters describes */
-                                     /* the histogram created by the FW noise */
-                                     /* histogram engine.*/
-
-    uint32 numOfLostCycles;          /* This field indicates the number of measurement */
-                                     /* cycles with failure because Tx was active.*/
-
-    uint32 numOfTxHwGenLostCycles;   /* This field indicates the number of measurement */
-                                     /* cycles with failure because Tx (FW Generated)*/
-                                     /* was active.*/
-
-    uint32 numOfRxLostCycles;        /* This field indicates the number of measurement */
-                                     /* cycles because the Rx CCA was active. */
-} NoiseHistResult_t;
-
-/******************************************************************************
-
-    Name:   ACX_PD_THRESHOLD
-    Type:   Configuration
-    Access: Write Only
-    Length: 4
-
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint32 pdThreshold; /* The packet detection threshold in the PHY.*/
-} ACXPacketDetection_t;
-
-
-/******************************************************************************
-
-    Name:	ACX_RATE_POLICY
-	Type:	Configuration
-	Access:	Write Only
-	Length: 132
-
-******************************************************************************/
-
-#define HOST_MAX_RATE_POLICIES       (8)
-
-
-typedef struct 
-{
-    INFO_ELE_HDR
-    uint32        numOfClasses;                    /* The number of transmission rate */
-                                                   /* fallback policy classes.*/
-
-    txAttrClass_t rateClasses[HOST_MAX_RATE_POLICIES];  /* Rate Policies table*/
-}ACXTxAttrClasses_t;
-
-
-
-/******************************************************************************
-
-    Name:   ACX_CTS_PROTECTION
-    Type:   Configuration
-    Access: Write Only
-    Length: 1
-    
-******************************************************************************/
-
-typedef struct 
-{
-    INFO_ELE_HDR
-    uint8   ctsProtectMode; /* This field is a flag enabling or disabling the*/
-                                /* CTS-to-self protection mechanism:*/
-                                /* 0 - disable, 1 - enable*/
-    uint8  padding[3];          /* alignment to 32bits boundry   */
-}ACXCtsProtection_t;
-
-/******************************************************************************
-
-    ACX_FRAG_CFG
-
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint16  fragThreshold;
-    uint8   padding[2];          /* alignment toIE_RTS_CTS_CFG 32bits boundry   */
-   
-} ACXFRAGThreshold_t;
-
-
-/******************************************************************************
-
-    ACX_RX_CONFIG_OPT
-
-******************************************************************************/
-typedef enum  
-{
-    RX_QUEUE_TYPE_RX_LOW_PRIORITY,    /* All except the high priority */
-    RX_QUEUE_TYPE_RX_HIGH_PRIORITY,   /* Management and voice packets */
-    RX_QUEUE_TYPE_NUM,
-    RX_QUEUE_TYPE_MAX = MAX_POSITIVE8
-} RxQueueType_enum;
-
-
-#ifdef HOST_COMPILE
-    typedef uint8 RxQueueType_e;
-#else
-    typedef RxQueueType_enum RxQueueType_e;
-#endif
-
-
-typedef struct 
-{
-    INFO_ELE_HDR
-    uint16         rxMblkThreshold;   /* Occupied Rx mem-blocks number which requires interrupting the host (0 = no buffering) */
-    uint16         rxPktThreshold;    /* Rx packets number which requires interrupting the host  (0 = no buffering) */ 
-    uint16         rxCompleteTimeout; /* Max time in msec the FW may delay Rx-Complete interrupt */
-    RxQueueType_e  rxQueueType;       /* see above */   
-    uint8          reserved;
-} ACXRxBufferingConfig_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_SLEEP_AUTH
-    Desc:   configuration of sleep authorization level
-    Type:   System Configuration
-    Access: Write Only
-    Length: 1
-
-******************************************************************************/
-
-typedef struct 
-{
-    INFO_ELE_HDR
-    uint8   sleepAuth; /* The sleep level authorization of the device. */
-                       /* 0 - Always active*/
-                       /* 1 - Power down mode: light / fast sleep*/
-                       /* 2 - ELP mode: Deep / Max sleep*/
-        
-    uint8  padding[3]; /* alignment to 32bits boundry   */
-}ACXSleepAuth_t;
-
-/******************************************************************************
-
-    Name:	ACX_PM_CONFIG
-	Desc:   configuration of power management
-	Type:	System Configuration
-	Access:	Write Only
-	Length: 1
-
-******************************************************************************/
-
-typedef struct 
-{
-    INFO_ELE_HDR
-	uint32	hostClkSettlingTime;	/* Host CLK settling time (in uSec units) */
-	uint8	hostFastWakeupSupport;	/* 0 - not supported */
-									/* 1 - supported */
-    uint8  padding[3]; 				/* alignment to 32bits boundry   */
-}ACXPMConfig_t;
-
-/******************************************************************************
-
-    Name:   ACX_PREAMBLE_TYPE
-    Type:   Configuration
-    Access: Write Only
-    Length: 1
-    
-******************************************************************************/
-
-typedef enum
-{
-	LONG_PREAMBLE			= 0,
-	SHORT_PREAMBLE			= 1,
-	OFDM_PREAMBLE			= 4,
-	N_MIXED_MODE_PREAMBLE	= 6,
-	GREENFIELD_PREAMBLE		= 7,
-	PREAMBLE_INVALID		= 0xFF
-} Preamble_enum;
-
-
-#ifdef HOST_COMPILE
-typedef uint8 Preamble_e;
-#else
-typedef Preamble_enum Preamble_e;
-#endif
-
-
-typedef struct
-{
-    INFO_ELE_HDR
-    Preamble_e preamble; /* When set, the WiLink transmits beacon, probe response, */
-                         /* RTS and PS Poll frames with a short preamble. */
-                         /* When clear, the WiLink transmits the frame with a long */
-                         /* preamble.*/
-    uint8  padding[3];  /* alignment to 32bits boundry   */
-} ACXPreamble_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_CCA_THRESHOLD
-    Type:   Configuration
-    Access: Write Only
-    Length: 2
-    
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint16 rxCCAThreshold; /* The Rx Clear Channel Assessment threshold in the PHY*/
-                           /* (the energy threshold).*/
-    Bool_e txEnergyDetection;  /* The Tx ED value for TELEC Enable/Disable*/
-    uint8  padding;
-} ACXEnergyDetection_t;
-      
-
-/******************************************************************************
-
-    Name:   ACX_EVENT_MBOX_MASK
-    Type:   Operation
-    Access: Write Only
-    Length: 8
-    
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint32 lowEventMask;   /* Indicates which events are masked and which are not*/
-                           /* Refer to EventMBoxId_enum in public_event_mbox.h.*/
-    
-    uint32 highEventMask;  /* Not in use (should always be set to 0xFFFFFFFF).*/
-} ACXEventMboxMask_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_CONN_MONIT_PARAMS
-    Desc:   This information element configures the SYNCHRONIZATION_TIMEOUT 
-            interrupt indicator. It configures the number of missed Beacons 
-            before issuing the SYNCHRONIZATION_TIMEOUT event.
-    Type:   Configuration
-    Access: Write Only
-    Length: 8
-
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint32 TSFMissedThreshold; /* The number of consecutive beacons that can be */
-                               /* lost before the WiLink raises the */
-                               /* SYNCHRONIZATION_TIMEOUT event.*/
-
-    uint32 BSSLossTimeout;     /* The delay (in time units) between the time at */
-                               /* which the device issues the SYNCHRONIZATION_TIMEOUT*/
-                               /* event until, if no probe response or beacon is */
-                               /* received a BSS_LOSS event is issued.*/
-} AcxConnectionMonitorOptions;
-
-/******************************************************************************
-
-    Name:   ACX_CONS_TX_FAILURE
-    Desc:   This information element configures the number of frames transmission
-            failures before issuing the "Max Tx Retry" event. The counter is 
-            incremented only for unicast frames or frames that require Ack 
-    Type:   Configuration
-    Access: Write Only
-    Length: 1
-    
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint8 maxTxRetry; /* the number of frames transmission failures before */
-                      /* issuing the "Max Tx Retry" event*/
-    uint8  padding[3];  /* alignment to 32bits boundry   */
-} ACXConsTxFailureTriggerParameters_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_BCN_DTIM_OPTIONS
-    Type:   Configuration
-    Access: Write Only
-    Length: 5
-    
-******************************************************************************/
-
-typedef struct 
-{    
-    INFO_ELE_HDR
-    uint16 beaconRxTimeOut;
-    uint16 broadcastTimeOut;
-    uint8  rxBroadcastInPS;  /* if set, enables receive of broadcast packets */
-                             /* in Power-Save mode.*/
-    uint8  consecutivePsPollDeliveryFailureThr;         /* Consecutive PS Poll Fail before updating the Driver */
-    uint8  padding[2];       /* alignment to 32bits boundry   */
-} ACXBeaconAndBroadcastOptions_t;
-
-
-/******************************************************************************
-
-    Name:   ACX_SG_ENABLE
-    Desc:   This command instructs the WiLink to set the Soft Gemini (BT co-existence)
-            state to either enable/disable or sense mode. 
-    Type:   Configuration
-    Access: Write Only
-    Length: 1
-    
-******************************************************************************/
-typedef struct
-{
-    INFO_ELE_HDR
-	uint8	coexOperationMode; /* 0- Co-ex operation is Disabled
-								  1- Co-ex operation is configured to Protective mode
-								  2- Co-ex operation is configured to Opportunistic mode 
-			                      
-								  Default Value: 0- Co-ex operation is Disabled
-								*/
-
-    uint8  padding[3];  /* alignment to 32bits boundry   */
-
-} ACXBluetoothWlanCoEnableStruct;
-
-
-
-/** \struct TSoftGeminiParams
- * \brief Soft Gemini Parameters
- *
- * \par Description
- * Used for Setting/Printing Soft Gemini Parameters
- *
- * \sa
- */
-
-typedef enum
-{
-	SOFT_GEMINI_BT_PER_THRESHOLD = 0,
-	SOFT_GEMINI_HV3_MAX_OVERRIDE,
-	SOFT_GEMINI_BT_NFS_SAMPLE_INTERVAL,
-	SOFT_GEMINI_BT_LOAD_RATIO,
-	SOFT_GEMINI_AUTO_PS_MODE,
-	SOFT_GEMINI_AUTO_SCAN_PROBE_REQ,
-	SOFT_GEMINI_ACTIVE_SCAN_DURATION_FACTOR_HV3,
-	SOFT_GEMINI_ANTENNA_CONFIGURATION,
-	SOFT_GEMINI_BEACON_MISS_PERCENT,
-	SOFT_GEMINI_RATE_ADAPT_THRESH,
-	SOFT_GEMINI_RATE_ADAPT_SNR,
-    SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_BR,
-    SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_BR,
-    SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_BR,
-    SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_BR,
-    SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_BR,
-    SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_BR,
-    SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_EDR,
-	SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_EDR,
-	SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_EDR,
-    SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_EDR,
-	SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_EDR,
-	SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_EDR,
-	SOFT_GEMINI_RXT,
-	SOFT_GEMINI_TXT,
-	SOFT_GEMINI_ADAPTIVE_RXT_TXT,
-	SOFT_GEMINI_PS_POLL_TIMEOUT,
-	SOFT_GEMINI_UPSD_TIMEOUT,
-	SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR,
-	SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR,
-	SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR,
-    SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR,
-	SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR,
-	SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR,
-    SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MIN_BR,   
-    SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MAX_BR, 
-    SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_BR, 
-    SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_HV3,
-    SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_A2DP,
-	SOFT_GEMINI_PASSIVE_SCAN_A2DP_BT_TIME,
-	SOFT_GEMINI_PASSIVE_SCAN_A2DP_WLAN_TIME,
-	SOFT_GEMINI_HV3_MAX_SERVED, 
-	SOFT_GEMINI_DHCP_TIME,
-    SOFT_GEMINI_ACTIVE_SCAN_DURATION_FACTOR_A2DP,
-	SOFT_GEMINI_TEMP_PARAM_1,
-	SOFT_GEMINI_TEMP_PARAM_2,
-	SOFT_GEMINI_TEMP_PARAM_3,
-	SOFT_GEMINI_TEMP_PARAM_4,
-	SOFT_GEMINI_TEMP_PARAM_5,
-	SOFT_GEMINI_PARAMS_MAX
-} softGeminiParams;
-
-typedef struct
-{
-  uint32   coexParams[SOFT_GEMINI_PARAMS_MAX];
-  uint8    paramIdx;       /* the param index which the FW should update, if it equals to 0xFF - update all */ 
-  uint8       padding[3];
-} TSoftGeminiParams;
-
-
-/******************************************************************************
-
-    Name:   ACX_SG_CFG
-    Desc:   This command instructs the WiLink to set the Soft Gemini (BT co-existence) 
-            parameters to the desired values. 
-    Type:   Configuration
-	Access:	Write (Read For GWSI - disable for now)
-    Length: 1
-    
-******************************************************************************/
-typedef struct
-
-{
-    INFO_ELE_HDR
-	
-	TSoftGeminiParams softGeminiParams;
-} ACXBluetoothWlanCoParamsStruct;
-  
-/******************************************************************************
-
-    Name:   ACX_FM_COEX_CFG
-    Desc:   This command instructs the WiLink to set the FM co-existence
-            parameters to the desired values. 
-    Type:   Configuration
-	Access:	Write
-    Length: 
-    
-******************************************************************************/
-typedef struct
-
-{
-    INFO_ELE_HDR
-	
-    uint8   enable;                     /* enable(1) / disable(0) the FM Coex feature */
-
-    uint8   swallowPeriod;              /* Swallow period used in COEX PLL swallowing mechanism,
-                                           Range: 0-0xFF,  0xFF = use FW default
-                                        */
-
-    uint8   nDividerFrefSet1;           /* The N divider used in COEX PLL swallowing mechanism for Fref of 38.4/19.2 Mhz.  
-                                           Range: 0-0xFF,  0xFF = use FW default
-                                        */
-
-    uint8   nDividerFrefSet2;           /* The N divider used in COEX PLL swallowing mechanism for Fref of 26/52 Mhz.
-                                           Range: 0-0xFF,  0xFF = use FW default
-                                        */
-
-    uint16  mDividerFrefSet1;           /* The M divider used in COEX PLL swallowing mechanism for Fref of 38.4/19.2 Mhz.
-                                           Range: 0-0x1FF,  0xFFFF = use FW default
-                                        */
-
-    uint16  mDividerFrefSet2;           /* The M divider used in COEX PLL swallowing mechanism for Fref of 26/52 Mhz.
-                                           Range: 0-0x1FF,  0xFFFF = use FW default
-                                        */
-
-    uint32  coexPllStabilizationTime;   /* The time duration in uSec required for COEX PLL to stabilize.
-                                           0xFFFFFFFF = use FW default
-                                        */
-
-    uint16  ldoStabilizationTime;       /* The time duration in uSec required for LDO to stabilize.
-                                           0xFFFFFFFF = use FW default
-                                        */
-
-    uint8   fmDisturbedBandMargin;      /* The disturbed frequency band margin around the disturbed 
-                                             frequency center (single sided). 
-                                           For example, if 2 is configured, the following channels 
-                                             will be considered disturbed channel: 
-                                             80 +- 0.1 MHz, 91 +- 0.1 MHz, 98 +- 0.1 MHz, 102 +- 0.1 MHz
-                                           0xFF = use FW default
-                                        */
-
-	uint8	swallowClkDif;              /* The swallow clock difference of the swallowing mechanism.
-                                           0xFF = use FW default
-                                        */
-
-} ACXWlanFmCoexStruct;
-  
-
-
-/******************************************************************************
-
-    Name:   ACX_TSF_INFO
-    Type:   Operation
-    Access: Read Only
-    Length: 20
-
-******************************************************************************/
-typedef struct ACX_fwTSFInformation
-{
-    INFO_ELE_HDR
-    uint32 CurrentTSFHigh;
-    uint32 CurrentTSFLow;
-    uint32 lastTBTTHigh;
-    uint32 lastTBTTLow;
-    uint8 LastDTIMCount;
-    uint8  padding[3];  /* alignment to 32bits boundry   */
-}ACX_fwTSFInformation_t;
-
- 
-/******************************************************************************
-
-Name:   ACX_BET_ENABLE
-Desc:   Enable or Disable the Beacon Early Termination module. In addition initialized the
-        Max Dropped beacons parameter
-Type:   Configuration
-Access: Write 
-Length: 6
-Note:  
-******************************************************************************/
-typedef struct
-
-{
-    INFO_ELE_HDR
-    uint8           Enable;                                     /* specifies if beacon early termination procedure is enabled or disabled: 0 – disabled, 1 – enabled */
-    uint8           MaximumConsecutiveET;           /* specifies the maximum number of consecutive beacons that may be early terminated. After this number is reached 
-                                                       at least one full beacon must be correctly received in FW before beacon ET resumes.  Legal range: 0 – 255 */
-    uint8           padding[2];
-}ACXBet_Enable_t;
-
-
-/******************************************************************************
-
-    Name:   DOT11_RX_MSDU_LIFE_TIME
-    Type:   Operation
-    Access: Write Only
-    Length: 4
-    
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint32 RxMsduLifeTime; /* The maximum amount of time, in TU, that the WiLink */
-                           /* should attempt to collect fragments of an MSDU before */
-                           /* discarding them. */
-                           /* The default value for this field is 512.*/
-} dot11RxMsduLifeTime_t;
-
-
-/******************************************************************************
-
-    Name:   DOT11_CUR_TX_PWR
-    Desc:   This IE indicates the maximum TxPower in Dbm/10 currently being used to transmit data.
-    Type:   Operation
-    Access: Write Only
-    Length: 1
-    
-******************************************************************************/
-
-typedef struct
-{ 
-    INFO_ELE_HDR
-    uint8 dot11CurrentTxPower; /* the max Power in Dbm/10 to be used to transmit data.*/
-    uint8  padding[3];  /* alignment to 32bits boundry   */
-} dot11CurrentTxPowerStruct ;
-
-
-/******************************************************************************
-
-    Name:   DOT11_RX_DOT11_MODE
-    Desc:   This IE indicates the current Rx Mode used by DSSS PHY.
-    Type:   Configuration
-    Access: Write Only
-    Length: 4
-    
-******************************************************************************/
-/*
-Possible values for Rx DOT11 Mode are the following:
-Value   Description
-=====   ===========
-3       11g - processing of both a and b packet formats is enabled
-2       11b - processing of b packet format is enabled
-1       11a - processing of a packet format is enabled
-0       undefined
-*/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint32 dot11RxDot11Mode; /* refer to above table*/
-} dot11RxDot11ModeStruct;
-
-
-/******************************************************************************
-
-    Name:   DOT11_RTS_THRESHOLD 
-    Type:   Configuration
-    Access: Write Only
-    Length: 2
-
-******************************************************************************/
-
-typedef struct 
-{
-    INFO_ELE_HDR
-    uint16  RTSThreshold; /* The number of octets in an MPDU, below which an */
-                          /* RTS/CTS handshake is not performed.*/
-    
-    uint8  padding[2];  /* alignment to 32bits boundry   */
-}dot11RTSThreshold_t;
-
-
-/******************************************************************************
-
-    Name:   DOT11_GROUP_ADDRESS_TBL
-    Desc:   The variable lengths of MAC addresses that are define as listening for
-            multicast. The field Number of groups identifies how many MAC Addresses 
-            are relevant in that information element.
-    Type:   Configuration
-    Access: Write Only
-    Length: up to 50 bytes
-
-******************************************************************************/
-#define ADDRESS_GROUP_MAX       (8)
-#define ADDRESS_GROUP_MAX_LEN   (6 * ADDRESS_GROUP_MAX)
-typedef struct 
-{
-    INFO_ELE_HDR
-    uint8   fltrState;                           /* 1 - multicast filtering is enabled. */
-                                                 /* 0 - multicast filtering is disabled.*/
-
-    uint8   numOfGroups;                         /* number of relevant multicast */
-                                                 /* addresses.*/
-
-    uint8   padding[2];  /* alignment to 32bits boundary   */
-    uint8   dataLocation[ADDRESS_GROUP_MAX_LEN]; /* table of MAC addresses.*/
-}dot11MulticastGroupAddrStart_t;
-
-/******************************************************************************
-
-   ACX_CONFIG_PS_WMM (Patch for Wi-Fi Bug)
-
-******************************************************************************/
-
-typedef struct 
-{    
-    INFO_ELE_HDR
-    uint32      ConfigPsOnWmmMode;  /* TRUE  - Configure PS to work on WMM mode - do not send the NULL/PS_POLL 
-                                               packets even if TIM is set.
-                                       FALSE - Configure PS to work on Non-WMM mode - work according to the 
-                                               standard. */
-} ACXConfigPsWmm_t;
-
-/******************************************************************************
-
-      
-    Name:   ACX_SET_RX_DATA_FILTER
-    Desc:   This IE configure one filter in the data filter module. can be used 
-            for add / remove / modify filter.
-    Type:   Filtering Configuration
-    Access: Write Only
-    Length: 4 + size of the fields of the filter (can vary between filters)
-
-******************************************************************************/
-/* data filter action */
-
-#ifdef HOST_COMPILE
-
-#define FILTER_DROP  0          /* Packet will be dropped by the FW and wont be delivered to the driver. */
-#define FILTER_SIGNAL  1        /* Packet will be delivered to the driver. */
-#define FILTER_FW_HANDLE  2     /* Packet will be handled by the FW and wont be delivered to the driver. */
-
-#else
-
-typedef enum {
-    FILTER_DROP = 0,
-    FILTER_SIGNAL  ,
-    FILTER_FW_HANDLE, 
-    FILTER_MAX  = 0xFF
-}filter_enum;
-
-#endif
-
-#ifdef HOST_COMPILE
-typedef uint8 filter_e;
-#else
-typedef filter_enum filter_e;
-#endif
-
-/* data filter command */
-#define REMOVE_FILTER   0       /* Remove filter */
-#define ADD_FILTER      1       /* Add filter */
-
-/* limitation */
-#define MAX_DATA_FILTERS 4
-#define MAX_DATA_FILTER_SIZE 98
-
-typedef struct 
-{
-    INFO_ELE_HDR
-    uint8                command;   /* 0-remove, 1-add */
-    uint8                index;     /* range 0-MAX_DATA_FILTERS */
-    filter_e             action;    /* action: FILTER_DROP, FILTER_SIGNAL, FILTER_FW_HANDLE */  
-    uint8                numOfFields; /* number of field in specific filter */
-    uint8                FPTable;   /* filter fields starts here. variable size. */
-} DataFilterConfig_t;
-
-/******************************************************************************
-      
-    Name:   ACX_ENABLE_RX_DATA_FILTER
-    Desc:   This IE disable / enable the data filtering feature. in case the
-            featue is enabled - default action should be set as well.
-    Type:   Filtering Configuration
-    Access: Write Only
-    Length: 2
-
-******************************************************************************/
-
-typedef struct  
-{
-    INFO_ELE_HDR
-    uint8       enable;     /* 1 - enable, 0 - disable the data data filtering feature */
-    filter_e    action;     /* default action that should be implemented for packets that wont
-                               match any of the filters, or in case no filter is configured */
-    uint8   padding[2];     /* alignment to 32bits boundary   */        
-} DataFilterDefault_t;
-
-
-/******************************************************************************
-      
-    Name:   ACX_GET_DATA_FILTER_STATISTICS
-    Desc:   get statistics of the data filtering module.
-    Type:   Statistics
-    Access: Read Only
-    Length: 20
-
-******************************************************************************/
-
-typedef struct 
-{
-    INFO_ELE_HDR
-    uint32  unmatchedPacketsCount;                  /* number of packets didn't match any filter (when the feature was enabled). */
-    uint32  matchedPacketsCount[MAX_DATA_FILTERS];  /* number of packets matching each of the filters */
-} ACXDataFilteringStatistics_t;
-
-
-#ifdef RADIO_SCOPE
-/******************************************************************************
-
-******************************************************************************
-
-    Name:	ACX_RS_ENABLE
-	Desc:   This command instructs the WiLink to set the Radio Scope functionality
-	        state to either enable/disable. 
-	Type:	Configuration
-	Access:	Write Only
-	Length: 1
-	
-******************************************************************************/
-typedef struct
-{
-    INFO_ELE_HDR
-	uint8   Enable; /* RadioScope feature will be enabled (1) or disabled(0) */
-    uint8  padding[3];  /* alignment to 32 bits  */
-} ACXRadioScopeEnableStruct;
-
-/******************************************************************************
-
-    Name:	ACX_RS_RX
-	Desc:   This command instructs the WiLink to set the Radio Scope 
-	        parameters to the desired values. 
-	Type:	Configuration
-	Access:	Read/Write 
-	Length: 1
-
-	We have the following available memory area:
-		
-			Information Element ID -		2 bytes
-			Information Element Length -	2 bytes			
-			
-				Now the rest is MAX_CMD_PARAMS
-				but 4 bytes must be subtracted
-				because of the IE in Buffer.
-			
-	
-******************************************************************************/
-typedef struct
-{	    
-	uint16  service;
-	uint16	length;
-	uint8	channel;
-	uint8	band;
-	uint8	status;
-	uint8   padding[1]; /*32 bit padding */
-}RxPacketStruct;
-
-typedef struct 
-{		
-    /*  We have the following available memory area:        */
-    /*                                                      */
-    /*  Information Element ID -        2 bytes             */
-    /*  Information Element Length -    2 bytes             */
-    /*  Number Of Packets in Buffer -    2 bytes            */
-    /*                                                      */
-    /*        Now the rest is MAX_CMD_PARAMS                */
-    /*        but 2 bytes must be subtracted                */
-    /*        because of the Number Of Packets in Buffer.   */
-	RxPacketStruct packet[(MAX_CMD_PARAMS-2)/sizeof(RxPacketStruct)];
-}RxCyclicBufferStruct;
-
-typedef struct
-
-{
-    INFO_ELE_HDR
-    /*uint8   padding[MAX_CMD_PARAMS-4]; */
-	RxCyclicBufferStruct buf;
-} ACXRadioScopeRxParamsStruct;
-
-#endif /* RADIO_SCOPE */
-/******************************************************************************
-    Name:   ACX_KEEP_ALIVE_MODE
-    Desc:   Set/Get the Keep Alive feature mode.
-    Type:   Configuration
-	Access:	Write
-    Length: 4 - 1 for the mode + 3 for padding.
-
-******************************************************************************/
-
-typedef struct
-{
-INFO_ELE_HDR
-    Bool_e  modeEnabled;
-    uint8 padding [3];
-}AcxKeepAliveMode;
-
-
-/******************************************************************************
-
-    Name:	ACX_SET_KEEP_ALIVE_CONFIG
-    Desc:   Configure a KLV template parameters.
-    Type:   Configuration
-    Access: Write Only
-    Length: 8
-
-******************************************************************************/
-
-typedef enum
-{
-    NO_TX = 0,
-    PERIOD_ONLY
-} KeepAliveTrigger_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 KeepAliveTrigger_e;
-#else
-typedef KeepAliveTrigger_enum KeepAliveTrigger_e;
-#endif
-
-typedef enum
-{
-    KLV_TEMPLATE_INVALID = 0,
-    KLV_TEMPLATE_VALID,
-    KLV_TEMPLATE_PENDING /* this option is FW internal only. host can only configure VALID or INVALID*/
-} KeepAliveTemplateValidation_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 KeepAliveTemplateValidation_e;
-#else
-typedef KeepAliveTemplateValidation_enum KeepAliveTemplateValidation_e;
-#endif
-
-typedef struct
-{
-    INFO_ELE_HDR
-	uint32 period; /*at range 1000-3600000 (msec). (To allow better range for debugging)*/
-    uint8 index;
-    KeepAliveTemplateValidation_e   valid;
-    KeepAliveTrigger_e  trigger;
-    uint8 padding;
-} AcxSetKeepAliveConfig_t;
-
-/*
- * BA sessen interface structure
- */
-typedef struct
-{
-    INFO_ELE_HDR
-    uint8 aMacAddress[6];           /* Mac address of: SA as receiver / RA as initiator */
-    uint8 uTid;                     /* TID */
-    uint8 uPolicy;                  /* Enable / Disable */
-    uint16 uWinSize;                /* windows size in num of packet */
-    uint16 uInactivityTimeout;      /* as initiator inactivity timeout in time units(TU) of 1024us / 
-                                       as receiver reserved */
-} TAxcBaSessionInitiatorResponderPolicy;
-
-/******************************************************************************
-
-    Name:	ACX_PEER_HT_CAP
-	Desc:   Configure HT capabilities - declare the capabilities of the peer 
-            we are connected to.
-	Type:	Configuration
-	Access:	Write Only
-    Length: 
-
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint32 uHtCapabilites;      /* 
-                                 * bit 0 – Allow HT Operation
-                                 * bit 1 - Allow Greenfield format in TX
-                                 * bit 2 – Allow Short GI in TX 
-                                 * bit 3 – Allow L-SIG TXOP Protection in TX
-                                 * bit 4 – Allow HT Control fields in TX. 
-                                 *         Note, driver will still leave space for HT control in packets regardless 
-                                 *         of the value of this field. FW will be responsible to drop the HT field 
-                                 *         from any frame when this Bit is set to 0.
-                                 * bit 5 - Allow RD initiation in TXOP. FW is allowed to initate RD. Exact policy 
-                                 *         setting for this feature is TBD.
-                                 *         Note, this bit can only be set to 1 if bit 3 is set to 1.
-                                 */
-
-     uint8  aMacAddress[6];     /*
-                                 * Indicates to which peer these capabilities are relevant.
-                                 * Note, currently this value will be set to FFFFFFFFFFFF to indicate it is 
-                                 * relevant for all peers since we only support HT in infrastructure mode. 
-                                 * Later on this field will be relevant to IBSS/DLS operation
-                                 */
-
-     uint8  uAmpduMaxLength;    /* 
-                                 * This the maximum a-mpdu length supported by the AP. The FW may not 
-                                 * exceed this length when sending A-MPDUs
-                                 */
-
-     uint8  uAmpduMinSpacing;   /* This is the minimal spacing required when sending A-MPDUs to the AP. */
-     
-} TAxcHtCapabilitiesIeFwInterface;
-
-/* EHtCapabilitesFwBitMask mapping */
-typedef enum
-{
-    FW_CAP_BIT_MASK_HT_OPERATION                      =  BIT_0,
-    FW_CAP_BIT_MASK_GREENFIELD_FRAME_FORMAT           =  BIT_1,
-    FW_CAP_BIT_MASK_SHORT_GI_FOR_20MHZ_PACKETS        =  BIT_2,
-    FW_CAP_BIT_MASK_LSIG_TXOP_PROTECTION              =  BIT_3,
-    FW_CAP_BIT_MASK_HT_CONTROL_FIELDS                 =  BIT_4,
-    FW_CAP_BIT_MASK_RD_INITIATION                     =  BIT_5
-} EHtCapabilitesFwBitMask;
-
-
-/******************************************************************************
-
-    Name:	ACX_HT_BSS_OPERATION
-	Desc:   Configure HT capabilities - AP rules for behavior in the BSS.
-	Type:	Configuration
-	Access:	Write Only
-    Length: 
-
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    uint8 uRifsMode;            /* Values: 0 – RIFS not allowed, 1 – RIFS allowed */
-    uint8 uHtProtection;        /* Values: 0 – 3 like in spec */
-    uint8 uGfProtection;        /* Values: 0 - GF protection not required, 1 – GF protection required */
-    uint8 uHtTxBurstLimit;      /* Values: 0 – TX Burst limit not required, 1 – TX Burst Limit required */
-    uint8 uDualCtsProtection;   /* 
-                                 * Values: 0 – Dual CTS protection not required, 1 Dual CTS Protection required
-                                 *             Note: When this value is set to 1 FW will protect all TXOP with RTS 
-                                 *             frame and will not use CTS-to-self regardless of the value of the 
-                                 *             ACX_CTS_PROTECTION information element 
-                                 */
-    uint8 padding[3];
-
-} TAxcHtInformationIeFwInterface;
-
-/******************************************************************************
- FwStaticData_t - information stored in command mailbox area after the Init 
-                  process is complete
-
- Note:  This structure is passed to the host via the mailbox at Init-Complete
-        without host request!!
-        The host reads this structure before sending any configuration to the FW.
-******************************************************************************/
-
-typedef struct
-{
-	/* dot11StationIDStruct */
-	uint8 dot11StationID[6]; /* The MAC address for the STA.*/
-    uint8 padding[2];       /* alignment to 32bits boundry   */
-	/* ACXRevision_t */
-	char FWVersion[20];		/* The WiLink firmware version, an ASCII string x.x.x.x.x */
-							/* that uniquely identifies the current firmware. */
-							/* The left most digit is incremented each time a */
-							/* significant change is made to the firmware, such as */
-							/* WLAN new project.*/
-							/* The second and third digit is incremented when major enhancements*/
-							/* are added or major fixes are made.*/
-							/* The fourth digit is incremented for each SP release */
-                            /* and it indicants the costumer private branch */
-							/* The fifth digit is incremented for each build.*/
-		
-    uint32 HardWareVersion; /* This 4 byte field specifies the WiLink hardware version. */
-							/* bits 0  - 15: Reserved.*/
-							/* bits 16 - 23: Version ID - The WiLink version ID  */
-							/*              (1 = first spin, 2 = second spin, and so on).*/
-							/* bits 24 - 31: Chip ID - The WiLink chip ID. */
-        uint8 txPowerTable[NUMBER_OF_SUB_BANDS_E][NUM_OF_POWER_LEVEL]; /* Maximun Dbm in Dbm/10 units */
-} FwStaticData_t;
-
-/******************************************************************************
-
-
-
-    ACX_TX_CONFIG_OPT
-
- 
-
-******************************************************************************/
-
-typedef struct 
-{
-    INFO_ELE_HDR
-    uint16  txCompleteTimeout;   /* Max time in msec the FW may delay frame Tx-Complete interrupt */
-    uint16  txCompleteThreshold; /* Tx-Complete packets number which requires interrupting the host (0 = no buffering) */
-} ACXTxConfigOptions_t;
-
-
-/******************************************************************************
-
-Name:	ACX_PWR_CONSUMPTION_STATISTICS
-Desc:   Retrieve time statistics of the different power states.
-Type:	Configuration
-Access:	Read Only
-Length: 20 
-
-******************************************************************************/
-
-// Power Statistics
-typedef struct
-{
-    INFO_ELE_HDR
-    uint32 awakeTimeCnt_Low;
-    uint32 awakeTimeCnt_Hi;
-    uint32 powerDownTimeCnt_Low;
-    uint32 powerDownTimeCnt_Hi;
-    uint32 elpTimeCnt_Low;
-    uint32 elpTimeCnt_Hi;
-    uint32 ListenMode11BTimeCnt_Low;
-    uint32 ListenMode11BTimeCnt_Hi;
-    uint32 ListenModeOFDMTimeCnt_Low;
-    uint32 ListenModeOFDMTimeCnt_Hi;
-}ACXPowerConsumptionTimeStat_t;
-
-
-/******************************************************************************
-    Name:   ACX_BURST_MODE
-    Desc:   enable/disable burst mode in case TxOp limit != 0.
-    Type:   Configuration
-    Access:    Write
-    Length: 1 - 2 for the mode + 3 for padding.
-
-******************************************************************************/
-
-typedef struct
-{
-INFO_ELE_HDR
-    Bool_e  enable;
-    uint8 padding [3];
-}AcxBurstMode;
-
-
-/******************************************************************************
-    Name:   ACX_SET_RATE_MAMAGEMENT_PARAMS
-    Desc:   configure one of the configurable parameters in rate management module.
-    Type:   Configuration
-    Access:    Write
-    Length: 8 bytes
-
-******************************************************************************/
-typedef enum
-{
-    RATE_MGMT_RETRY_SCORE_PARAM,
-	RATE_MGMT_PER_ADD_PARAM,
-	RATE_MGMT_PER_TH1_PARAM,
-	RATE_MGMT_PER_TH2_PARAM,
-	RATE_MGMT_MAX_PER_PARAM,
-	RATE_MGMT_INVERSE_CURIOSITY_FACTOR_PARAM,
-	RATE_MGMT_TX_FAIL_LOW_TH_PARAM,
-	RATE_MGMT_TX_FAIL_HIGH_TH_PARAM,
-	RATE_MGMT_PER_ALPHA_SHIFT_PARAM,
-	RATE_MGMT_PER_ADD_SHIFT_PARAM,
-	RATE_MGMT_PER_BETA1_SHIFT_PARAM,
-	RATE_MGMT_PER_BETA2_SHIFT_PARAM,
-	RATE_MGMT_RATE_CHECK_UP_PARAM,
-	RATE_MGMT_RATE_CHECK_DOWN_PARAM,
-	RATE_MGMT_RATE_RETRY_POLICY_PARAM,
-	RATE_MGMT_ALL_PARAMS = 0xff
-} rateAdaptParam_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 rateAdaptParam_e;
-#else
-typedef rateAdaptParam_enum rateAdaptParam_e;
-#endif
-
-typedef struct
-{
-    INFO_ELE_HDR
-	rateAdaptParam_e paramIndex;
-	uint16 RateRetryScore;
-	uint16 PerAdd;
-	uint16 PerTh1;
-	uint16 PerTh2;
-	uint16 MaxPer;
-	uint8 InverseCuriosityFactor;
-	uint8 TxFailLowTh;
-	uint8 TxFailHighTh;
-	uint8 PerAlphaShift;
-	uint8 PerAddShift;
-	uint8 PerBeta1Shift;
-	uint8 PerBeta2Shift;
-	uint8 RateCheckUp;
-	uint8 RateCheckDown;
-	uint8 RateRetryPolicy[13];
-}AcxRateMangeParams;
-
-/******************************************************************************
-    Name:   ACX_GET_RATE_MAMAGEMENT_PARAMS
-    Desc:   read the configurable parameters of rate management module.
-    Type:
-    Access: read
-    Length: 8 bytes
-
-******************************************************************************/
-typedef struct
-{
-    INFO_ELE_HDR
-    int32  SNRCorrectionHighLimit;
-    int32  SNRCorrectionLowLimit;
-    int32  PERErrorTH;
-    int32  attemptEvaluateTH;
-    int32  goodAttemptTH;
-    int32  curveCorrectionStep;
-}AcxRateMangeReadParams;
-
-
-/******************************************************************************
-
-    Name:   ACX_SET_DCO_ITRIM_PARAMS    
-    Desc:   Configure DCO Itrim operational parameters:               
-            1. Enable/disable of the entire feature.                                     
-            2. Moderation timeout (usec) - how much time to wait from last TX
-            until DCO Itrim can be set low.
-    Type:   Configuration
-    Access: Write Only
-    Length: 
-
-******************************************************************************/
-
-typedef struct
-{
-    INFO_ELE_HDR
-    Bool_e enable;
-    uint32 moderation_timeout_usec;
-}ACXDCOItrimParams_t ;
-
-#endif /* PUBLIC_INFOELE_H */
-
diff --git a/wl1271/TWD/FirmwareApi/public_radio.h b/wl1271/TWD/FirmwareApi/public_radio.h
deleted file mode 100644
index 47ddfc3..0000000
--- a/wl1271/TWD/FirmwareApi/public_radio.h
+++ /dev/null
@@ -1,1792 +0,0 @@
-/*
- * public_radio.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**********************************************************************************************************************
-  FILENAME:       public_radio.h
-
-  DESCRIPTION:    Contains information element defines/structures used by the TNETxxxx and host and Radio Module.
-                  This is a PUBLIC header, which customers will use.
-***********************************************************************************************************************/
-/*
-=======================================================================================================================
-                      R E V I S I O N    H I S T O R Y
-
-  04/29/05  BRK  1. retrieved from ClearCase and added this rev. history
-                 2. added two new entries to RadioParamType_e  enum
-                 3. increased MAX_RADIO_PARAM_POWER_TABLE (from 20 to 56)
-                    - this is sort of a kludge, struct RadioParam_t  should have used an
-                      array pointer instead of an actual data block
-  06/10/05  BRK  changed MAX_RADIO_PARAM_POWER_TABLE for 1251 support (sort of a KLUDGE)
-  07/15/05  BRK  added RADIO_PABIAS_TABLE entry to RadioParamType_e  enum
-  04/12/06  MH   Added new run-time calibration state: RFPLL_CALIBRATION_NEEDED
-
-  Note: This code should only be edited with TAB stops set at 4
-=======================================================================================================================
- */
-#ifndef PUBLIC_RADIO
-#define PUBLIC_RADIO
-
-#include "public_types.h"
-#define MAC_ADDR_SIZE 6
-/* typedef uint8 TMacAddr[MAC_ADDR_SIZE]; */
-/*defined in tiDefs.h*/
-/************************************************************************/
-/*																		*/	
-/*							Definitions section                         */
-/*																		*/
-/************************************************************************/
-/* radio parameter to set */
-#ifdef TNETW1251
-#define MAX_RADIO_PARAM_POWER_TABLE  			(4*48)		/* cPowLmtTbl[] max size for ABG radios */
-#else
-#define MAX_RADIO_PARAM_POWER_TABLE  			(56)     	/* cPowLmtTbl[] max size for BG radios*/
-#endif
-#define MAX_RADIO_PARAM_LEN          			(MAX_RADIO_PARAM_POWER_TABLE)
-
-#define RADIO_PARAM_POWER_TABLE_ENABLE        	(0x01)  	/* mask for RADIO_PARAM_POWER_ENABLES usage*/
-#define RADIO_PARAM_POWER_LIMIT_TABLE_ENABLE  	(0x02)  	/* mask for RADIO_PARAM_POWER_ENABLES usage*/
-#define RADIO_PARAM_POWER_ADJ_TABLE_ENABLE    	(0x04)  	/* mask for RADIO_PARAM_POWER_ENABLES usage*/
-
-#define NUM_OF_POWER_LEVEL      				(4)
-
-
-#define TX_TEMPLATE_MAX_BUF_LEN					(512)
-
-#define RX_PLT_LNA_STEPS_BUF_LEN				(4)
-#define RX_PLT_TA_STEPS_BUF_LEN					(4)
-
-#define RX_STAT_PACKETS_PER_MESSAGE           	(20) 
-
-#define MULTIPLE_PACKET_SIZE		1024
-#define MAX_TX_PACKET_SIZE_11_B		(2 * MULTIPLE_PACKET_SIZE)
-#define MAX_TX_PACKET_SIZE_11_G		(4 * MULTIPLE_PACKET_SIZE)
-#define MAX_TX_PACKET_SIZE_11_N		(8 * MULTIPLE_PACKET_SIZE) /* must be PDU */
-
-/* Radio Band */
-typedef enum
-{
-	eELEVEN_A_B,
-	eELEVEN_A_G,
-	eELEVEN_N,
-
-	MAX_MODULATION
-}Modulation;
-
-/************************************************************************/
-/*																		*/	
-/*							Enumerations section                        */
-/*																		*/
-/************************************************************************/
-
-/* Radio band types. */
-typedef enum RADIO_BAND_TYPE_ENMT
-{		
-	FIRST_BAND_TYPE_E,
-/*______________________________________*/
-
-	_2_4_G_BAND_TYPE_E = FIRST_BAND_TYPE_E,
-	_5_G_BAND_TYPE_E,
-/*_______________________________________________*/
-    UNUSED_BAND_TYPE_E,
-	NUMBER_OF_BANDS_E = UNUSED_BAND_TYPE_E,				
-	LAST_BAND_TYPE_E = (NUMBER_OF_BANDS_E - 1)
-
-}RADIO_BAND_TYPE_ENM;
-
-
-#define RADIO_BAND_2_4GHZ_BASE_FREQUENCY					2407
-#define RADIO_BAND_JAPAN_4_9_GHZ_BASE_FREQUENCY				5000
-#define RADIO_BAND_5GHZ_BASE_FREQUENCY						5000
-
-#define RADIO_BAND_2_4GHZ_MULTIPLE_BASE_FREQUENCY			5
-#define RADIO_BAND_JAPAN_4_9_GHZ_MULTIPLE_BASE_FREQUENCY	(-5)
-#define RADIO_BAND_5GHZ_MULTIPLE_BASE_FREQUENCY				5
-
-#define GIGA_HZ_TO_MEGA_HZ									1000
-
-
-
-/* Radio sub-band types. */
-typedef enum RADIO_SUB_BAND_TYPE_ENMT
-{
-	FIRST_SUB_BAND_TYPE_E,
-/*______________________________________*/
-
-	_2_4_G_SUB_BAND_TYPE_E = FIRST_SUB_BAND_TYPE_E, /* band b/g */
-	FIRST_SUB_BANDS_IN_5G_BAND_E,
-	LOW_JAPAN_4_9_G_SUB_BAND_TYPE_E = FIRST_SUB_BANDS_IN_5G_BAND_E,	/* band 4.9Ghz (Japan) low sub-band (J1-J4) */
-	MID_JAPAN_4_9_G_SUB_BAND_TYPE_E,                /* band 4.9Ghz (Japan) mid sub-band(J8,J12,J16) */
-	HIGH_JAPAN_4_9_G_SUB_BAND_TYPE_E,               /* band 4.9Ghz (Japan) high sub-band(J34,36,J38,40, J42, 44, J46,48) */
-	_5_G_FIRST_SUB_BAND_TYPE_E,                     /* band 5GHz 1st sub-band(52->64 in steps of 4) */
-	_5_G_SECOND_SUB_BAND_TYPE_E,                    /* band 5GHz 2nd sub-band(100->116 in steps of 4) */
-	_5_G_THIRD_SUB_BAND_TYPE_E,                     /* band 5GHz 3rd sub-band(120->140 in steps of 4) */
-    _5_G_FOURTH_SUB_BAND_TYPE_E,                    /* band 5GHz 4th sub-band(149->165 in steps of 4) */
-	LAST_SUB_BANDS_IN_5G_BAND_E = _5_G_FOURTH_SUB_BAND_TYPE_E,
-/*_______________________________________________*/
-    UNUSED_SUB_BAND_TYPE_E,
-	NUMBER_OF_SUB_BANDS_E = UNUSED_SUB_BAND_TYPE_E,				
-	LAST_SUB_BAND_TYPE_E = (NUMBER_OF_SUB_BANDS_E - 1)
-
-}RADIO_SUB_BAND_TYPE_ENM;
-
-#define NUMBER_OF_SUB_BANDS_IN_5G_BAND_E	(LAST_SUB_BANDS_IN_5G_BAND_E - FIRST_SUB_BANDS_IN_5G_BAND_E + 1)	
-
-typedef struct
-{
-	uint8					uDbm[NUMBER_OF_SUB_BANDS_E][NUM_OF_POWER_LEVEL]; 
-} TpowerLevelTable_t;
-
-/* Channel number */
-typedef enum RADIO_CHANNEL_NUMBER_ENMT
-{
-	/*---------------------------------*/
-	/* _2_4_G_SUB_BAND_TYPE_E          */
-	/*---------------------------------*/
-	
-	/* index 0 */ RADIO_CHANNEL_INDEX_0_NUMBER_1_E = 1,
-	/* index 1 */ RADIO_CHANNEL_INDEX_1_NUMBER_2_E = 2,	
-	/* index 2 */ RADIO_CHANNEL_INDEX_2_NUMBER_3_E = 3,	
-	/* index 3 */ RADIO_CHANNEL_INDEX_3_NUMBER_4_E = 4,	
-	/* index 4 */ RADIO_CHANNEL_INDEX_4_NUMBER_5_E = 5,	
-	/* index 5 */ RADIO_CHANNEL_INDEX_5_NUMBER_6_E = 6,	
-	/* index 6 */ RADIO_CHANNEL_INDEX_6_NUMBER_7_E = 7,	
-	/* index 7 */ RADIO_CHANNEL_INDEX_7_NUMBER_8_E = 8,	
-	/* index 8 */ RADIO_CHANNEL_INDEX_8_NUMBER_9_E = 9,	
-	/* index 9 */ RADIO_CHANNEL_INDEX_9_NUMBER_10_E = 10,	
-	/* index 10 */ RADIO_CHANNEL_INDEX_10_NUMBER_11_E = 11,	
-	/* index 11 */ RADIO_CHANNEL_INDEX_11_NUMBER_12_E = 12,	
-	/* index 12 */ RADIO_CHANNEL_INDEX_12_NUMBER_13_E = 13,	
-	/* index 13 */ RADIO_CHANNEL_INDEX_13_NUMBER_14_E = 14,	
-	
-	/*---------------------------------*/
-	/* LOW_JAPAN_4_9_G_SUB_BAND_TYPE_E */
-	/*---------------------------------*/
-	/* index 14 */ RADIO_CHANNEL_INDEX_14_NUMBER_J1_E = 16,	
-	/* index 15 */ RADIO_CHANNEL_INDEX_15_NUMBER_J2_E = 12,	
-	/* index 16 */ RADIO_CHANNEL_INDEX_16_NUMBER_J3_E = 8,		
-	/* index 17 */ RADIO_CHANNEL_INDEX_17_NUMBER_J4_E = 4,	
-    
-	/*---------------------------------*/
-	/* MID_JAPAN_4_9_G_SUB_BAND_TYPE_E */
-	/*---------------------------------*/
-	/* index 18 */ RADIO_CHANNEL_INDEX_18_NUMBER_J8_E = 8,
-	/* index 19 */ RADIO_CHANNEL_INDEX_19_NUMBER_J12_E = 12,
-	/* index 20 */ RADIO_CHANNEL_INDEX_20_NUMBER_J16_E = 16,
-
-	/*----------------------------------*/
-	/* HIGH_JAPAN_4_9_G_SUB_BAND_TYPE_E */
-	/*----------------------------------*/
-	/* index 21 */ RADIO_CHANNEL_INDEX_21_NUMBER_J34_E = 34,
-	/* index 22 */ RADIO_CHANNEL_INDEX_22_NUMBER_36_E = 36,
-	/* index 23 */ RADIO_CHANNEL_INDEX_23_NUMBER_J38_E = 38,
-	/* index 24 */ RADIO_CHANNEL_INDEX_24_NUMBER_40_E = 40,
-	/* index 25 */ RADIO_CHANNEL_INDEX_25_NUMBER_J42_E = 42,
-	/* index 26 */ RADIO_CHANNEL_INDEX_26_NUMBER_44_E = 44,
-	/* index 27 */ RADIO_CHANNEL_INDEX_27_NUMBER_J46_E = 46,
-	/* index 28 */ RADIO_CHANNEL_INDEX_28_NUMBER_48_E = 48, 
-
-	/*---------------------------------*/
-	/* _5_G_FIRST_SUB_BAND_TYPE_E      */
-	/*---------------------------------*/
-	/* index 29 */ RADIO_CHANNEL_INDEX_29_NUMBER_52_E = 52,
-	/* index 30 */ RADIO_CHANNEL_INDEX_30_NUMBER_56_E = 56,
-	/* index 31 */ RADIO_CHANNEL_INDEX_31_ENUMBER_60_E = 60,
-	/* index 32 */ RADIO_CHANNEL_INDEX_32_ENUMBER_64_E = 64,
-
-	/*---------------------------------*/
-	/* _5_G_SECOND_SUB_BAND_TYPE_E     */
-	/*---------------------------------*/
-	/* index 33 */ RADIO_CHANNEL_INDEX_33_NUMBER_100_E = 100,
-	/* index 34 */ RADIO_CHANNEL_INDEX_34_NUMBER_104_E = 104,
-	/* index 35 */ RADIO_CHANNEL_INDEX_35_NUMBER_108_E = 108,
-	/* index 36 */ RADIO_CHANNEL_INDEX_36_NUMBER_112_E = 112,
-	/* index 37 */ RADIO_CHANNEL_INDEX_37_NUMBER_116_E = 116,
-
-	/*---------------------------------*/
-	/* _5_G_THIRD_SUB_BAND_TYPE_E      */
-	/*---------------------------------*/
-	/* index 38 */ RADIO_CHANNEL_INDEX_38_NUMBER_120_E = 120,
-	/* index 39 */ RADIO_CHANNEL_INDEX_39_NUMBER_124_E = 124,
-	/* index 40 */ RADIO_CHANNEL_INDEX_40_NUMBER_128_E = 128,
-	/* index 41 */ RADIO_CHANNEL_INDEX_41_NUMBER_132_E = 132,
-	/* index 42 */ RADIO_CHANNEL_INDEX_42_NUMBER_136_E = 136,
-	/* index 43 */ RADIO_CHANNEL_INDEX_43_NUMBER_140_E = 140,
-
-
-	/*---------------------------------*/
-	/* _5_G_FOURTH_SUB_BAND_TYPE_E     */
-	/*---------------------------------*/
-	/* index 44 */ RADIO_CHANNEL_INDEX_44_NUMBER_149_E = 149,
-	/* index 45 */ RADIO_CHANNEL_INDEX_45_NUMBER_153_E = 153,
-	/* index 46 */ RADIO_CHANNEL_INDEX_46_NUMBER_157_E = 157,
-	/* index 47 */ RADIO_CHANNEL_INDEX_47_NUMBER_161_E = 161,
-	/* index 48 */ RADIO_CHANNEL_INDEX_48_NUMBER_165_E = 165
-    
-}RADIO_CHANNEL_NUMBER_ENM;
-
-/* Radio channels */
-typedef enum RADIO_CHANNEL_INDEX_ENMT
-{		
-	FIRST_RADIO_CHANNEL_INDEX_E,
-/*______________________________________*/
-
-	/*---------------------------------*/
-	/* _2_4_G_SUB_BAND_TYPE_E          */
-	/*---------------------------------*/
-	FIRST_2_4_G_BAND_RADIO_CHANNEL_INDEX_E = FIRST_RADIO_CHANNEL_INDEX_E,					/* 0 */
-	FIRST_2_4_G_SUB_BAND_RADIO_CHANNEL_INDEX_E = FIRST_2_4_G_BAND_RADIO_CHANNEL_INDEX_E,	/* 0 */
-	
-	/* Channels 0-13 indexes in the FW are 1-14 channels number in the RS */
-	RADIO_CHANNEL_INDEX_0_E = FIRST_2_4_G_SUB_BAND_RADIO_CHANNEL_INDEX_E,/* 0 */
-	RADIO_CHANNEL_INDEX_1_E,	/* 1 */
-	RADIO_CHANNEL_INDEX_2_E,	/* 2 */
-	RADIO_CHANNEL_INDEX_3_E,	/* 3 */
-	RADIO_CHANNEL_INDEX_4_E,	/* 4 */
-	RADIO_CHANNEL_INDEX_5_E,	/* 5 */
-	RADIO_CHANNEL_INDEX_6_E,	/* 6 */
-	RADIO_CHANNEL_INDEX_7_E,	/* 7 */
-	RADIO_CHANNEL_INDEX_8_E,	/* 8 */
-	RADIO_CHANNEL_INDEX_9_E,	/* 9 */
-	RADIO_CHANNEL_INDEX_10_E,	/* 10 */
-	RADIO_CHANNEL_INDEX_11_E,	/* 11 */
-	RADIO_CHANNEL_INDEX_12_E,	/* 12 */
-	RADIO_CHANNEL_INDEX_13_E,	/* 13 */	
-	LAST_2_4_G_SUB_BAND_RADIO_CHANNEL_INDEX_E = RADIO_CHANNEL_INDEX_13_E,				/* 13 */
-    LAST_2_4_G_BAND_RADIO_CHANNEL_INDEX_E = LAST_2_4_G_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 13 */
-	NUMBER_OF_2_4_G_CHANNEL_INDICES_E = LAST_2_4_G_BAND_RADIO_CHANNEL_INDEX_E,			/* 13 */
-
-	/*---------------------------------*/
-	/* LOW_JAPAN_4_9_G_SUB_BAND_TYPE_E */
-	/*---------------------------------*/
-	FIRST_5_G_BAND_RADIO_CHANNEL_INDEX_E,	/* 14 */
-	FIRST_LOW_JAPAN_4_9_G_SUB_BAND_RADIO_CHANNEL_INDEX_E = FIRST_5_G_BAND_RADIO_CHANNEL_INDEX_E,	/* 14 */
-
-	/* Channels 14-17 indexes in the FW are J1-J4 channels number in the RS */
-	RADIO_CHANNEL_INDEX_14_E = FIRST_LOW_JAPAN_4_9_G_SUB_BAND_RADIO_CHANNEL_INDEX_E,				/* 14 */
-	RADIO_CHANNEL_INDEX_15_E,	/* 15 */
-	RADIO_CHANNEL_INDEX_16_E,	/* 16 */
-	RADIO_CHANNEL_INDEX_17_E,	/* 17 */
-    LAST_LOW_JAPAN_4_9_G_SUB_BAND_RADIO_CHANNEL_INDEX_E = RADIO_CHANNEL_INDEX_17_E,	/* 17 */
-	
-	/*---------------------------------*/
-	/* MID_JAPAN_4_9_G_SUB_BAND_TYPE_E */
-	/*---------------------------------*/
-	FIRST_MID_JAPAN_4_9_G_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 18 */
-
-	/* Channel 18 index in the FW is channel number J8 in the RS */
-    RADIO_CHANNEL_INDEX_18_E = FIRST_MID_JAPAN_4_9_G_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 18 */ 
-
-	/* Channel 19 index in the FW is channel number J12 in the RS */
-	RADIO_CHANNEL_INDEX_19_E,	/* 19 */
-	
-	/* Channel 20 index in the FW is channel number J16 in the RS */
-	RADIO_CHANNEL_INDEX_20_E,	/* 20 */
-    LAST_MID_JAPAN_4_9_G_SUB_BAND_RADIO_CHANNEL_INDEX_E = RADIO_CHANNEL_INDEX_20_E,		/* 20 */
-    
-	/*----------------------------------*/
-	/* HIGH_JAPAN_4_9_G_SUB_BAND_TYPE_E */
-	/*----------------------------------*/
-	FIRST_HIGH_JAPAN_4_9_G_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 21 */
-
-	/* Channel 21 index in the FW is channel number J34 in the RS */
-    RADIO_CHANNEL_INDEX_21_E = FIRST_HIGH_JAPAN_4_9_G_SUB_BAND_RADIO_CHANNEL_INDEX_E, /* 21 */
-
-	/* Channel 22 index in the FW is channel number 36 in the RS */
-	RADIO_CHANNEL_INDEX_22_E,	/* 22 */
-
-	/* Channel 23 index in the FW is channel number J38 in the RS */
-	RADIO_CHANNEL_INDEX_23_E,	/* 23 */
-
-	/* Channel 24 index in the FW is channel number 40 in the RS */
-	RADIO_CHANNEL_INDEX_24_E,	/* 24 */
-
-	/* Channel 25 index in the FW is channel number J42 in the RS */
-	RADIO_CHANNEL_INDEX_25_E,	/* 25 */
-
-	/* Channel 26 index in the FW is channel number 44 in the RS */
-	RADIO_CHANNEL_INDEX_26_E,	/* 26 */
-
-	/* Channel 27 index in the FW is channel number J46 in the RS */
-	RADIO_CHANNEL_INDEX_27_E,	/* 27 */
-
-	/* Channel 28 index in the FW is channel number 48 in the RS */
-	RADIO_CHANNEL_INDEX_28_E,	/* 28 */
-    LAST_HIGH_JAPAN_4_9_G_SUB_BAND_RADIO_CHANNEL_INDEX_E = RADIO_CHANNEL_INDEX_28_E, /* 28 */
-    LAST_JAPAN_4_9_G_SUB_BAND_RADIO_CHANNEL_INDEX_E = LAST_HIGH_JAPAN_4_9_G_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 28 */
-	/*---------------------------------*/
-	/* _5_G_FIRST_SUB_BAND_TYPE_E      */
-	/*---------------------------------*/
-	FIRST_5_G_FIRST_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 29 */
-
-	/* Channel 29 index in the FW is channel number 52 in the RS */
-	RADIO_CHANNEL_INDEX_29_E = FIRST_5_G_FIRST_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 29 */
-
-	/* Channel 30 index in the FW is channel number 56 in the RS */
-	RADIO_CHANNEL_INDEX_30_E,	/* 30 */
-
-	/* Channel 31 index in the FW is channel number 60 in the RS */
-	RADIO_CHANNEL_INDEX_31_E,	/* 31 */
-
-	/* Channel 32 index in the FW is channel number 64 in the RS */
-	RADIO_CHANNEL_INDEX_32_E,	/* 32 */
-	LAST_5_G_FIRST_SUB_BAND_RADIO_CHANNEL_INDEX_E = RADIO_CHANNEL_INDEX_32_E,	/* 32 */
-	
-	/*---------------------------------*/
-	/* _5_G_SECOND_SUB_BAND_TYPE_E     */
-	/*---------------------------------*/
-	FIRST_5_G_SECOND_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 33 */
-
-	/* Channel 33 index in the FW is channel number 100 in the RS */
-	RADIO_CHANNEL_INDEX_33_E = FIRST_5_G_SECOND_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 33 */
-
-	/* Channel 34 index in the FW is channel number 104 in the RS */
-	RADIO_CHANNEL_INDEX_34_E,	/* 34 */
-
-	/* Channel 35 index in the FW is channel number 108 in the RS */
-	RADIO_CHANNEL_INDEX_35_E,	/* 35 */
-
-	/* Channel 36 index in the FW is channel number 112 in the RS */
-	RADIO_CHANNEL_INDEX_36_E,	/* 36 */
-
-	/* Channel 37 index in the FW is channel number 116 in the RS */
-	RADIO_CHANNEL_INDEX_37_E,	/* 37 */
-	LAST_5_G_SECOND_SUB_BAND_RADIO_CHANNEL_INDEX_E = RADIO_CHANNEL_INDEX_37_E,	/* 37 */
-	
-	/*---------------------------------*/
-	/* _5_G_THIRD_SUB_BAND_TYPE_E      */
-	/*---------------------------------*/
-	FIRST_5_G_THIRD_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 38 */
-
-	/* Channel 38 index in the FW is channel number 120 in the RS */
-	RADIO_CHANNEL_INDEX_38_E = FIRST_5_G_THIRD_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 38 */
-
-	/* Channel 39 index in the FW is channel number 124 in the RS */
-	RADIO_CHANNEL_INDEX_39_E,	/* 39 */
-
-	/* Channel 40 index in the FW in the FW is channel number 128 in the RS */
-	RADIO_CHANNEL_INDEX_40_E,	/* 40 */
-
-	/* Channel 41 index in the FW is channel number 132 in the RS */
-	RADIO_CHANNEL_INDEX_41_E,	/* 41 */
-
-	/* Channel 42 index in the FW is channel number 136 in the RS */
-	RADIO_CHANNEL_INDEX_42_E,	/* 42 */
-
-	/* Channel 43 index in the FW is channel number 140 in the RS */
-	RADIO_CHANNEL_INDEX_43_E,	/* 43 */
-	LAST_5_G_THIRD_SUB_BAND_RADIO_CHANNEL_INDEX_E = RADIO_CHANNEL_INDEX_43_E,	/* 43 */
-	
-	/*---------------------------------*/
-	/* _5_G_FOURTH_SUB_BAND_TYPE_E     */
-	/*---------------------------------*/
-	FIRST_5_G_FOURTH_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 44 */
-
-	/* Channel 44 index in the FW is channel number 149 in the RS */
-    RADIO_CHANNEL_INDEX_44_E = FIRST_5_G_FOURTH_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 44 */
-
-	/* Channel 45 index in the FW is channel number 153 in the RS */
-	RADIO_CHANNEL_INDEX_45_E,	/* 45 */
-
-	/* Channel 46 index in the FW is channel number 157 in the RS */
-	RADIO_CHANNEL_INDEX_46_E,	/* 46 */
-
-	/* Channel 47 index in the FW is channel number 161 in the RS */
-	RADIO_CHANNEL_INDEX_47_E,	/* 47 */
-
-	/* Channel 48 index in the FW is channel number 165 in the RS */
-	RADIO_CHANNEL_INDEX_48_E,	/* 48 */
-	LAST_5_G_FOURTH_SUB_BAND_RADIO_CHANNEL_INDEX_E = RADIO_CHANNEL_INDEX_48_E,	/* 48 */
-	LAST_5_G_BAND_RADIO_CHANNEL_INDEX_E = LAST_5_G_FOURTH_SUB_BAND_RADIO_CHANNEL_INDEX_E,	/* 48 */	
-/*_______________________________________________*/
-
-    UNUSED_RADIO_CHANNEL_INDEX_E,               /* 49 */
-	NUMBER_OF_RADIO_CHANNEL_INDEXS_E = UNUSED_RADIO_CHANNEL_INDEX_E,	/* 49 */
-	LAST_RADIO_CHANNEL_INDEX_E = (NUMBER_OF_RADIO_CHANNEL_INDEXS_E - 1)	/* 48 */
-
-}RADIO_CHANNEL_INDEX_ENM;
-
-#define NUMBER_OF_2_4_G_CHANNELS    	(NUMBER_OF_2_4_G_CHANNEL_INDICES_E + 1)
-#define NUMBER_OF_5G_CHANNELS       	(NUMBER_OF_RADIO_CHANNEL_INDEXS_E - NUMBER_OF_2_4_G_CHANNELS)
-#define HALF_NUMBER_OF_2_4_G_CHANNELS 	(NUMBER_OF_2_4_G_CHANNELS / 2)
-#define HALF_NUMBER_OF_5G_CHANNELS  	((NUMBER_OF_5G_CHANNELS + 1) / 2)
-
-typedef enum RADIO_RATE_GROUPS_ENMT
-{		
-	FIRST_RATE_GROUP_E,
-/*______________________________________*/
-
-	MCS7_RATE_GROUP_E = FIRST_RATE_GROUP_E,
-	_54_48_RATE_GROUP_E,                /* band 4.9Ghz (Japan) low sub-band (J1-J4) */
-	_36_24_RATE_GROUP_E,                /* band 4.9Ghz (Japan) mid sub-band(J8,J12,J16) */
-	_18_12_RATE_GROUP_E,                /* band 4.9Ghz (Japan) high sub-band(J34,36,J38,40, J42, 44, J46,48) */
-	_9_6_RATE_GROUP_E,                  /* band 5GHz 1st sub-band(52->64 in steps of 4) */
-	_11b_RATE_GROUP_E,                  /* band 5GHz 2nd sub-band(100->116 in steps of 4) */
-/*_______________________________________________*/
-    UNUSED_RATE_GROUPS_E,
-	NUMBER_OF_RATE_GROUPS_E = UNUSED_RATE_GROUPS_E,				
-	LAST_RATE_GROUP_E = (NUMBER_OF_RATE_GROUPS_E - 1)
-
-}RADIO_RATE_GROUPS_ENM;
-
-
-typedef enum
-{
-    RADIO_BAND_2_4_GHZ                  = 0,
-    RADIO_BAND_5_0_GHZ                  = 1,
-    RADIO_BAND_DUAL                     = 2,
-    RADIO_BAND_NUM_OF_BANDS             = 2
-
-} ERadioBand;
-
-
-/******************************************************************************
- TTestCmdRunCalibration - Calibration manager message
-                  
- Note:  
-******************************************************************************/
-
-typedef enum CALIBRATION_COMMANDS_ENMT
-{
-	/* RX */
-	CM_space1_e,
-	CM_RX_IQ_MM_calibration_e,
-	CM_RX_IQ_MM_correction_upon_channel_change_e,
-	CM_RX_IQ_MM_correction_upon_temperature_change_e,
-	CM_RX_IQ_MM_duplicate_VGA_e,
-	CM_space2_e,
-
-	CM_RX_analog_DC_Correction_calibration_e,
-	CM_RX_DC_AUX_cal_mode_e,
-	CM_RX_DC_AUX_normal_mode_e,
-	CM_space3_e,
-
-	CM_RX_BIP_enter_mode_e,
-	CM_RX_BIP_perform_e,
-	CM_RX_BIP_exit_mode_e,
-	CM_space4_e,
-
-	/* TX */
-	CM_TX_power_detector_calibration_e,
-	CM_TX_power_detector_buffer_calibration_e,
-	CM_space5_e,
-
-	CM_TX_LO_Leakage_calibration_e,
-	CM_TX_PPA_Steps_calibration_e,
-	CM_TX_CLPC_calibration_e,
-	CM_TX_IQ_MM_calibration_e,
-	CM_TX_BIP_calibration_e,
-    /* DRPw */
-	CM_RX_TANK_TUNE_calibration_e,
-/*    CM_PD_BUFF_TUNE_calibration_e,*/
-    CM_RX_DAC_TUNE_calibration_e,
-    CM_RX_IQMM_TUNE_calibration_e,
-    CM_RX_LPF_TUNE_calibration_e,
-    CM_TX_LPF_TUNE_calibration_e,
-    CM_TA_TUNE_calibration_e,
-    CM_TX_MIXERFREQ_calibration_e,
-    CM_RX_IF2GAIN_calibration_e,
-    CM_RTRIM_calibration_e,
-    CM_RX_LNAGAIN_calibration_e,
-
-	CM_SMART_REFLEX_calibration_e,
-	CM_CHANNEL_RESPONSE_calibration_e
-
-}CALIBRATION_COMMANDS_ENM;
-
-
-typedef enum CALIBRATIONS_ENMT
-{
-	FIRST_CALIBRATION_TYPE_E,
-/*----------------------------------------------------------*/
-	/**** GENERAL ****/
-	DRPW_RFCALIBFXN_RXTXLPF_TYPE_E = FIRST_CALIBRATION_TYPE_E,
-	DRPW_TUNE_TYPE_E,	/* TUNE will perform DCO_freq, AB/TB, KDCO, TDC_inverter */
-	DRPW_RFCALIBFXN_RTRIM_TYPE_E,
-	/**** TX ****/
-	CM_TX_LO_LEAKAGE_CALIBRATION_TYPE_E,
-    CM_TX_IQ_MM_CALIBRATION_TYPE_E,
-	DRPW_RFCALIBFXN_TXMIXERFREQ_TYPE_E,
-	/**** RX ****/
-	DRPW_RFCALIBFXN_TA_TYPE_E,
-	DRPW_RFCALIBFXN_RXLNAGAIN_TYPE_E,
-	DRPW_RFCALIBFXN_RXIF2GAIN_TYPE_E,
-	DRPW_RFCALIBFXN_RXDAC_TYPE_E,
-	DRPW_RFCALIBFXN_LNATANK_TYPE_E,
-	RX_ANALOG_DC_CORRECTION_CALIBRATION_TYPE_E,
-	CM_RX_IQ_MM_CORRECTION_CALIBRATION_TYPE_E,
-    SMART_REFLEX_CALIBRATION_TYPE_E,
-    CHANNEL_RESPONSE_CALIBRATION_TYPE_E,
-	/* ... */
-/*----------------------------------------------------------*/
-	NUMBER_OF_CALIBRATIONS_E,
-	LAST_CALIBRATION_TYPE_E = (NUMBER_OF_CALIBRATIONS_E - 1)
-} CALIBRATIONS_ENMT;
-
-/******************************************************************************
-
-    Name:	ACX_CAL_ASSESSMENT
-	Type:	Configuration
-	Access:	Write Only
-	Length: 4
-	Note:	OBSOLETE !!! (DO_CALIBRATION_IN_DRIVER is not defined)
-	
-******************************************************************************/
-typedef enum
-{
-    RUNTIME_CALIBRATION_NOT_NEEDED = 1,
-    RUNTIME_CALIBRATION_NEEDED = 2,
-    RFPLL_CALIBRATION_NEEDED = 3,
-    MAX_RUNTIME_CALIBRATION_OPTIONS = 0x7FFFFFFF /* force this enum to be uint32 */
-} RadioRuntimeCalState_enum;
-
-
-#ifdef HOST_COMPILE
-typedef uint32 RadioRuntimeCalState_e;
-#else
-typedef RadioRuntimeCalState_enum RadioRuntimeCalState_e;
-#endif
-
-/************************************************************************/
-/*																		*/	
-/*							Commands section                            */
-/*																		*/
-/************************************************************************/
-typedef struct PltGainGet_t
-{
-            uint8 TxGain;            /*Total TX chain gain according to the current setting*/
-            uint8 TxUpperBound;      /*the max gain setting allowed*/
-            uint8 TxLowerBound;      /*the min gain setting allowed*/
-            uint8 padding;           /* padding to 32 bit */
-}PltGainGet_t;
-
-typedef struct 
-{
-    uint8 refTxPower;
-    uint8 band;
-    uint8 channel;
-    uint8 padding;
-}RadioPltTxCalibrationRequest_t;
-
-
-/******************************************************************************
-
-Name:	PowerLevelTable_t
-Desc:   Retrieve Maximum Dbm per power level and sub-band.
-Type:	Configuration
-Access:	Read Only
-Length: 20 
-
-******************************************************************************/
-typedef struct
-{
-	uint8 txPowerTable[NUMBER_OF_SUB_BANDS_E][NUM_OF_POWER_LEVEL]; /* Maximun Dbm in Dbm/10 units */
-} PowerLevelTable_t;
-
-/* DORONS [4/27/2008] testing the 2nd auxiliary function */
-typedef struct
-{
-    int8 desiredTone;
-    int8 desiredGain;
-    uint8 mode;
-    uint8 padding;
-} TestToneParams_t;
-
-typedef enum
-{
-	ePM_AWAKE,
-	ePM_LISTEN_ENTER,
-	ePM_LISTEN_EXIT,
-	ePM_POWER_DOWN_ENTER,
-	ePM_POWER_DOWN_EXIT,
-	ePM_ELP_ENTER,
-	ePM_ELP_EXIT,
-	ePM_CORTEX_GATE_ENTER,
-	ePM_CORTEX_GATE_EXIT
-}PowerMode;
-
-typedef struct 
-
-{
-	uint8	iPowerMode;		/* Awake					- 0 */
-							/* Enter Listen Mode		- 1 */
-							/* Exit Listen Mode			- 2 */
-							/* Enter Power Down Mode	- 3 */
-							/* Exit Power Down Mode		- 4 */
-							/* ELP Mode					- 5 */							
-							/* Enter Cortex Gate Mode	- 6 */
-							/* Exit Cortex Gate Mode	- 7 */
-	uint8	  padding[3];
-}TTestCmdPowerMode;
-
-/************************************************************************
-                PLT  DBS
-				To modify these DBs Latter - according to Architecture Document, 
-				and move it to public_commands.h
-************************************************************************/
-
-/******************************************************************************
-
-      ID:     CMD_TEST
-    Desc:   The TEST command can be issued immediately after the firmware has 
-          been downloaded, with no further configuration of the WiLink required.
-          Full initialization of the WiLink is not required to invoke the TEST 
-          command and perform the radio test function.
-          After testing, the system must be reset.
-          Test parameters can be modified while a test is executing. 
-          For instance, the host program can change the channel without resetting
-          the system.
-    
-      Params:     TestCmdID_enum - see below.
-          The returned values are copied to the cmd/sts MB replacing  the command
-          (similar to the interrogate mechanism).
-
-******************************************************************************/
-/* Efil -	when adding parameter here fill the switch case sentence in function
-			"cmdBld_CmdIeTest" in module "TWD\Ctrl\CmdBldCmdIE.c" */
-typedef enum
-{	
-/*	0x01	*/  TEST_CMD_PD_BUFFER_CAL = 0x1,	/* TX PLT */
-/*	0x02	*/  TEST_CMD_P2G_CAL,				/* TX BiP */
-/*	0x03	*/  TEST_CMD_RX_PLT_ENTER,
-/*	0x04	*/  TEST_CMD_RX_PLT_CAL,			/* RSSI Cal */
-/*	0x05	*/  TEST_CMD_RX_PLT_EXIT,
-/*	0x06	*/  TEST_CMD_RX_PLT_GET,
-/*	0x07	*/  TEST_CMD_FCC,					/* Continuous TX */ 
-/*	0x08	*/  TEST_CMD_TELEC,					/* Carrier wave in a specific channel and band */
-/*	0x09	*/  TEST_CMD_STOP_TX,				/* Stop FCC or TELEC */
-/*	0x0A	*/  TEST_CMD_PLT_TEMPLATE,			/* define Template for TX */
-/*	0x0B	*/  TEST_CMD_PLT_GAIN_ADJUST,
-/*	0x0C	*/  TEST_CMD_PLT_GAIN_GET,
-/*	0x0D	*/	TEST_CMD_CHANNEL_TUNE,
-/*	0x0E	*/	TEST_CMD_FREE_RUN_RSSI,         /* Free running RSSI measurement */
-/*	0x0F	*/  TEST_CMD_DEBUG,					/* test command for debug using the struct: */
-/*	0x10	*/  TEST_CMD_CLPC_COMMANDS,
-/*	0x11	*/  RESERVED_4,
-/*	0x12	*/  TEST_CMD_RX_STAT_STOP,
-/*	0x13	*/  TEST_CMD_RX_STAT_START,
-/*	0x14	*/  TEST_CMD_RX_STAT_RESET,
-/*	0x15	*/  TEST_CMD_RX_STAT_GET,
-/*	0x16	*/	TEST_CMD_LOOPBACK_START,		/* for FW Test Debug */
-/*	0x17	*/  TEST_CMD_LOOPBACK_STOP,			/* for FW Test Debug */
-/*	0x18	*/	TEST_CMD_GET_FW_VERSIONS,
-/*  0x19    */  TEST_CMD_INI_FILE_RADIO_PARAM,
-/*  0x1A	*/  TEST_CMD_RUN_CALIBRATION_TYPE,
-/*  0x1B    */	TEST_CMD_TX_GAIN_ADJUST,
-/*	0x1C	*/	TEST_CMD_UPDATE_PD_BUFFER_ERRORS,
-/*	0x1D	*/	TEST_CMD_UPDATE_PD_REFERENCE_POINT,
-/*  0x1E    */	TEST_CMD_INI_FILE_GENERAL_PARAM,
-/*	0x1F	*/	TEST_CMD_SET_EFUSE,
-/*	0x20	*/	TEST_CMD_GET_EFUSE, 
-/* DORONS [4/27/2008] testing the 2nd auxiliary function */
-/*0x21 */   TEST_CMD_TEST_TONE,
-/*	0x22	*/	TEST_CMD_POWER_MODE,
-/*	0x23	*/	TEST_CMD_SMART_REFLEX,
-/*	0x24	*/	TEST_CMD_CHANNEL_RESPONSE,
-/*	0x25	*/	TEST_CMD_DCO_ITRIM_FEATURE,
-/*	0x26	*/	TEST_CMD_INI_FILE_RF_EXTENDED_PARAM,
-
-    MAX_TEST_CMD_ID = 0xFF	/* Dummy - must be last!!! (make sure that Enum variables are type of int) */
-        
-} TestCmdID_enum;
-
-/************************************************************************/
-/* radio test result information struct									*/
-/************************************************************************/	
-#define DEFAULT_MULTIPLE_ACTIVATION_TIME		5
-
-#define MULTIPLE_ACTIVATION_TIME				1000000		
-
-#define DEFAULT_RSMODE_CALIBRATION_INTERVAL		(DEFAULT_MULTIPLE_ACTIVATION_TIME * MULTIPLE_ACTIVATION_TIME)	/* RadioScope calibration interval - 5 sec */
-
-typedef enum
-{
-	eCMD_GET_CALIBRAIONS_INFO,
-	eCMD_GET_CLPC_VBAT_TEMPERATURE_INFO
-}TTestCmdDeubug_enum;
-
-/* struct of calibration status, indication if RM performed calibration */
-typedef struct  
-{
-	uint8		operateCalibration;									/* RM performed calibration */
-	int8		calibrationsResult[NUMBER_OF_CALIBRATIONS_E];		/* Calibrations status	*/
-}CalibrationInfo;
-
-/* struct of CLPC output, temperature, battery voltage */
-typedef struct  
-{
-	int					ClpcOffset[NUMBER_OF_RATE_GROUPS_E];		 /* CLPC */
-	int8				CurrentTemperature;							 /* current temperature in Celsius */
-	uint16				CurrentVbat;								 /* VBat	*/
-	
-}CLPCTempratureVbatStruct;
-
-typedef struct  
-{
-	int16			oRadioStatus;
-	uint8			iCommand; /* command to check */
-	
-	CalibrationInfo				calibInfo;			/* for eCMD_GET_CALIBRAIONS_INFO */
-	CLPCTempratureVbatStruct	CLPCTempVbatInfo;	/* for eCMD_GET_CLPC_VBAT_TEMPERATURE_INFO */
-
-	uint8			padding[3];
-	
-}TTestCmdDebug;
-
-/************************************************************************/
-/* end radio test result information struct								*/
-/************************************************************************/	
-
-
-#ifdef HOST_COMPILE
-typedef uint8 TestCmdID_e;
-#else
-typedef TestCmdID_enum TestCmdID_e;
-#endif
-
-/******************************************************************************/
-typedef enum
-{
-    TEST_MODE_HOST_ORIGINATED_DATA      = 0x00,
-    TEST_MODE_FIXED_SEQ_NUMBER          = 0x00,
-    TEST_MODE_FW_ORIGINATED_DATA     	= 0x01,
-    TEST_MODE_RANDOM_DATA               = 0x05,
-    TEST_MODE_ZOZO_DATA                 = 0x09,
-    TEST_MODE_FILLING_PATERN_MASK       = 0x0F,
-    TEST_MODE_DELAY_REQUIRED            = 0x10,
-    TEST_MODE_DISABLE_SRCRAMBLING_FLAG  = 0x20
-}TestModeCtrlTypes_e;
-
-#ifdef HOST_COMPILE
-typedef uint8 FccTestType_e;
-#else
-typedef TestModeCtrlTypes_e FccTestType_e;
-#endif
-
-/******************************************************************************/
-#define     TEST_SEQ_NUM_MODE_FIXED             (0)
-#define     TEST_SEQ_NUM_MODE_INCREMENTED       (1)
-
-/******************************************************************************/
-/* DORONS [4/23/2008] RX Tone activation for DRPw cals */
-#define     ACTIVE_TONE_CAL_MODE                (0)
-#define     ACTIVE_TONE_NORM_MODE               (1)
-/******************************************************************************
-
-  TestCmdId :   TEST_CMD_FCC - Tx continuous test
-
-  Description:  Continuous transmit series of numbers with a valid MAC header
-                as was received from driver.
-                However there is no 802.11 air access compliance. 
-
-  Params:       PERTxCfg_t fcc - see below.
-
-******************************************************************************/
-#define NUM_OF_MAC_ADDR_ELEMENTS 6
-typedef struct PERTxCfg_t
-{
-            /*input parameters*/
-            uint32 numFrames;       				/* number of frams to transmit, 0 = endless*/
-            uint32 interFrameGap;   				/* time gap in uSec */          
-            uint32 seqNumMode;      				/* Fixed / Incremented */
-            uint32 frameBodySize;    				/* length of Mac Payload */       
-            uint8 channel;          				/*channel number*/
-            uint8 dataRate;         				/* MBps 1,2,11,22,... 54           */
-            uint8 modPreamble;      				/* CTL_PREAMBLE 0x01 */           
-            uint8 band;             				/* {BAND_SELECT_24GHZ 0x00 | BAND_SELECT_5GHZ 0x01} */          
-            uint8 modulation;       				/* {PBCC_MODULATION_MASK |OFDM_MODULATION_MASK }*/      
-            FccTestType_e testModeCtrl;     
-            uint8 dest[NUM_OF_MAC_ADDR_ELEMENTS];  	/* set to hard codded default {0,0,0xde,0xad,0xbe,0xef}; */        
-} PERTxCfg_t;
-
-/******************************************************************************
-
-  TestCmdId :   TEST_CMD_SET_EFUSE, TEST_CMD_GET_EFUSE
-
-  Description:  Get and set the eFuse parameters 
-
-******************************************************************************/
-typedef enum EFUSE_PARAMETER_TYPE_ENMT
-{
-	EFUSE_FIRST_PARAMETER_E,
-/*_______________________________________________*/
-
-	/* RX PARAMETERS */
-    EFUSE_FIRST_RX_PARAMETER_E = EFUSE_FIRST_PARAMETER_E,
-	RX_BIP_MAX_GAIN_ERROR_BAND_B_E = EFUSE_FIRST_RX_PARAMETER_E,		/* MaxGainErrBandB */
-																		
-	RX_BIP_MAX_GAIN_ERROR_J_LOW_MID_E,									/* MaxGainErrJLowMid */
-	RX_BIP_MAX_GAIN_ERROR_J_HIGH_E,										/* MaxGainErrJHigh  */
-																		
-	RX_BIP_MAX_GAIN_ERROR_5G_1ST_E,										/* MaxGainErr5G1st  */
-	RX_BIP_MAX_GAIN_ERROR_5G_2ND_E,										/* MaxGainErr5G2nd  */
-	RX_BIP_MAX_GAIN_ERROR_5G_3RD_E,										/* MaxGainErr5G3rd  */
-	RX_BIP_MAX_GAIN_ERROR_5G_4TH_E,										/* MaxGainErr5G4th  */
-																		
-	RX_BIP_LNA_STEP_CORR_BAND_B_4TO3_E,									/* LnaStepCorrBandB (Step 4To3) */
-	RX_BIP_LNA_STEP_CORR_BAND_B_3TO2_E,									/* LnaStepCorrBandB (Step 3To2) */
-	RX_BIP_LNA_STEP_CORR_BAND_B_2TO1_E,									/* LnaStepCorrBandB (Step 2To1) */
-	RX_BIP_LNA_STEP_CORR_BAND_B_1TO0_E,									/* LnaStepCorrBandB (Step 1To0) */
-																		
-	RX_BIP_LNA_STEP_CORR_BAND_A_4TO3_E,									/* LnaStepCorrBandA (Step 4To3) */
-	RX_BIP_LNA_STEP_CORR_BAND_A_3TO2_E,									/* LnaStepCorrBandA (Step 3To2) */
-	RX_BIP_LNA_STEP_CORR_BAND_A_2TO1_E,									/* LnaStepCorrBandA (Step 2To1) */
-	RX_BIP_LNA_STEP_CORR_BAND_A_1TO0_E,									/* LnaStepCorrBandA (Step 1To0) */
-																		
-	RX_BIP_TA_STEP_CORR_BAND_B_2TO1_E,									/* TaStepCorrBandB (Step 2To1) */
-	RX_BIP_TA_STEP_CORR_BAND_B_1TO0_E,									/* TaStepCorrBandB (Step 1To0) */
-																		
-	RX_BIP_TA_STEP_CORR_BAND_A_2TO1_E,									/* TaStepCorrBandA (Step 2To1) */
-	RX_BIP_TA_STEP_CORR_BAND_A_1TO0_E,									/* TaStepCorrBandA (Step 1To0) */
-																		
-	NUMBER_OF_RX_BIP_EFUSE_PARAMETERS_E,								/* Number of RX parameters */
-
-	/* TX PARAMETERS */
-	TX_BIP_PD_BUFFER_GAIN_ERROR_E = NUMBER_OF_RX_BIP_EFUSE_PARAMETERS_E,/* PD_Buffer_Gain_error */
-	TX_BIP_PD_BUFFER_VBIAS_ERROR_E,										/* PD_Buffer_Vbias_error */
-
-/*_______________________________________________*/
-	EFUSE_NUMBER_OF_PARAMETERS_E,
-    EFUSE_LAST_PARAMETER_E = (EFUSE_NUMBER_OF_PARAMETERS_E - 1)
-
-}EFUSE_PARAMETER_TYPE_ENM;
-
-typedef struct 
-{
-	int8	EfuseParameters[EFUSE_NUMBER_OF_PARAMETERS_E];
-
-	int16	oRadioStatus;
-    int8	padding[3];     /* Align to 32bit */
-
-} EfuseParameters_t;
-
-/******************************************************************************/
-
-/******************************************************************************
-
-  TestCmdId :       TEST_CMD_PLT_GAIN_GET
-
-    Description: Retrieves the TX chain gain settings.         
-
-  Params:           PltGainGet_t       gainGet - see public_radio.h
-
-
-******************************************************************************/
-
-/******************************************************************************
-
-    TestCmdId:  TEST_CMD_PLT_GET_NVS_UPDATE_BUFFER
-    
-    Description: This PLT function provides the all information required by 
-                    the upper driver in order to update the NVS image.
-                    It received a parameter defining the type of update 
-                    information required and provides an array of elements 
-                    defining the data bytes to be written to the NVS image 
-                    and the byte offset in which they should be written.         
- Params:     PltNvsResultsBuffer_t nvsUpdateBuffer  - see public_radio.h
-    
-
-*****************************************************************************/
-
-
-/******************************************************************************
-
-  TestCmdId :   TEST_CMD_PLT_GAIN_ADJUST
-
-    Description: retrieves the TX chain gain settings.                        
-
-    Params:     int32                txGainAdjust
-
-*****************************************************************************/
-
-/******************************************************************************
-
-  TestCmdId :   TEST_CMD_PLT_RX_CALIBRATION
-
-    Description: Used as part of the  RX calibration procedure, call this 
-            function for every calibration channel. 
-            The response for that function indicates only that command had been received by th FW,
-            and not that the calibration procedure had been finished.
-            The upper layer need to wait amount of ((numOfSamples*intervalBetweenSamplesUsec).
-            To make sure that the RX  calibration  completed. before calling to the next command.
-            
-    Params:     PltRxCalibrationRequest_t    rxCalibration 
-  
-  ******************************************************************************/
-
-typedef struct
-{
-	uint8 iBand;
-	uint8 iChannel;
-	int16 oRadioStatus;
-} TTestCmdChannel;
-
-typedef struct TTestCmdPdBufferCalStruct
-{
-	uint8   iGain;
-	uint8   iVBias; 
-	int16	oAdcCodeword;
-	int16	oRadioStatus;
-	uint8	Padding[2];
-} TTestCmdPdBufferCal;
-
-typedef struct 
-{
-	int8	vBIASerror;
-	int8	gainError;
-	uint8	padding[2];
-}TTestCmdPdBufferErrors;
-
-typedef struct 
-{
-	int32     iReferencePointPower;
-	int32     iReferencePointDetectorValue;
-	uint8     isubBand;
-	uint8     padding[3];
-}TTestCmdUpdateReferncePoint;
-
-typedef struct
-{
-	int16 oRadioStatus;
-	uint8 iCalibratonType;
-	uint8 Padding;
-
-} TTestCmdRunCalibration;
-
-typedef struct 
-{
-    uint8   DCOItrimONOff;
-	uint8	padding[3];
-}TTestCmdDCOItrimOnOff;
-
-typedef enum
-{
-	eDISABLE_LIMIT_POWER,
-	eENABLE_LIMIT_POWER
-}UseIniFileLimitPower;
-
-typedef struct 
-{
-	int32	iTxGainValue;
-	int16	oRadioStatus;
-	uint8	iUseinifilelimitPower;
-	uint8	padding;
-} TTxGainAdjust;
-
-/* TXPWR_CFG0__VGA_STEP_GAIN_E */
-typedef enum TXPWR_CFG0__VGA_STEP_ENMT
-{
-	TXPWR_CFG0__VGA_STEP__FIRST_E,					
-/*_______________________________________________*/
-	TXPWR_CFG0__VGA_STEP__MINIMUM_E = TXPWR_CFG0__VGA_STEP__FIRST_E,
-	TXPWR_CFG0__VGA_STEP__0_E = TXPWR_CFG0__VGA_STEP__MINIMUM_E,	
-	TXPWR_CFG0__VGA_STEP__1_E,						
-	TXPWR_CFG0__VGA_STEP__2_E,						
-	TXPWR_CFG0__VGA_STEP__3_E,						
-	TXPWR_CFG0__VGA_STEP__4_E,					
-	TXPWR_CFG0__VGA_STEP__MAXIMUM_E = TXPWR_CFG0__VGA_STEP__4_E,
-/*_______________________________________________*/
-	TXPWR_CFG0__VGA_STEP__NUMBER_OF_STEPS_E,				
-	TXPWR_CFG0__VGA_STEP__LAST_E = (TXPWR_CFG0__VGA_STEP__NUMBER_OF_STEPS_E - 1)
-
-} TXPWR_CFG0__VGA_STEP_ENM;
-
-
-/******************************************************************************
-
-	Name:	ACX_PLT_NVS_BUFFER_UPDATE 
-	TestCmdId:	TEST_CMD_PLT_GET_NVS_UPDATE_BUFFER
-	Description: This PLT function provides the all information required by 
-					the upper driver in order to update the NVS image.
-					It received a parameter defining the type of update 
-					information required and provides an array of elements defining 
-					the data bytes to be written to the NVS image and the byte 
-					offset in which they should be written.         
-	Type:	PLT
-	Access:	Read Only
-	Length: 420
-
-******************************************************************************/
-
-/* default efuse value */
-#define DEFAULT_EFUSE_VALUE				0
-
-/* Default hard-coded power to gain offsets (these values will be overridden by NVS) */
-#define DB_FACTOR						1000			/* factor because we can't use float */
-
-/* TX BIP default parameters */
-#define CALIBRATION_STEP_SIZE			1000
-#define CALIBRATION_POWER_HIGHER_RANGE	22000
-#define CALIBRATION_POWER_LOWER_RANGE	(-3000)
-
-#define FIRST_PD_CURVE_TO_SET_2_OCTET	(10 * CALIBRATION_STEP_SIZE)/* dBm */
-
-#define SIZE_OF_POWER_DETECTOR_TABLE	((((CALIBRATION_POWER_HIGHER_RANGE) - (CALIBRATION_POWER_LOWER_RANGE))\
-	                                      / (CALIBRATION_STEP_SIZE)) + 1)
-
-/* default PPA steps value */
-#define DEFAULT_PPA_STEP_VALUE			(-6000)
-
-#define P2G_TABLE_TO_NVS				(-1) * 8 / DB_FACTOR
-
-#define DEF_2_4_G_SUB_BAND_P2G_OFFSET           (-25000)
-#define DEF_LOW_JAPAN_4_9_G_SUB_BAND_P2G_OFFSET (-25*DB_FACTOR)
-#define DEF_MID_JAPAN_4_9_G_SUB_BAND_OFFSET     (-25*DB_FACTOR)
-#define DEF_HIGH_JAPAN_4_9_G_SUB_BAND_OFFSET    (-25*DB_FACTOR)
-#define DEF_5_G_FIRST_SUB_BAND_P2G_OFFSET       (-25*DB_FACTOR)
-#define DEF_5_G_SECOND_SUB_BAND_P2G_OFFSET      (-25*DB_FACTOR)
-#define DEF_5_G_THIRD_SUB_BAND_P2G_OFFSET       (-25*DB_FACTOR)
-#define DEF_5_G_FOURTH_SUB_BAND_P2G_OFFSET      (-25*DB_FACTOR)
-
-
-/* NVS definition start here */
-
-#define	NVS_TX_TYPE_INDEX		0 
-#define        NVS_TX_LENGTH_INDEX                             ((NVS_TX_TYPE_INDEX) + 1) /* 1 (26) */
-#define        NVS_TX_PARAM_INDEX                              ((NVS_TX_LENGTH_INDEX) + 2) /* 3  (28) */
-
-#define START_TYPE_INDEX_IN_TLV	0
-#define TLV_TYPE_LENGTH			1
-#define START_LENGTH_INDEX		(START_TYPE_INDEX_IN_TLV + TLV_TYPE_LENGTH) /* 1 */
-#define TLV_LENGTH_LENGTH		2
-#define START_PARAM_INDEX		(START_LENGTH_INDEX + TLV_LENGTH_LENGTH) /* 3 */
-
-#define	NVS_VERSION_1			1
-#define	NVS_VERSION_2			2
-
-#define	NVS_MAC_FIRST_LENGTH_INDEX			0
-#define	NVS_MAC_FIRST_LENGHT_VALUE			1
-
-#define NVS_MAC_L_ADDRESS_INDEX				((NVS_MAC_FIRST_LENGTH_INDEX) + 1) /* 1*/
-#define NVS_MAC_L_ADDRESS_LENGTH			2
-
-#define NVS_MAC_L_VALUE_INDEX				((NVS_MAC_L_ADDRESS_INDEX) + (NVS_MAC_L_ADDRESS_LENGTH)) /* 3 */
-#define NVS_MAC_L_VALUE_LENGTH				4
-
-#define	NVS_MAC_SECONDE_LENGTH_INDEX		((NVS_MAC_L_VALUE_INDEX) + 4) /* 7 */
-#define	NVS_MAC_SECONDE_LENGHT_VALUE		1
-
-#define NVS_MAC_H_ADDRESS_INDEX				((NVS_MAC_SECONDE_LENGTH_INDEX) + 1) /* 8*/
-#define NVS_MAC_H_ADDRESS_LENGTH			2
-
-#define NVS_MAC_H_VALUE_INDEX				((NVS_MAC_H_ADDRESS_INDEX) + (NVS_MAC_H_ADDRESS_LENGTH)) /* 10 */
-#define NVS_MAC_H_VALUE_LENGTH				4
-
-#define NVS_END_BURST_TRANSACTION_INDEX		((NVS_MAC_H_VALUE_INDEX) + (NVS_MAC_H_VALUE_LENGTH))	/* 14 */
-#define NVS_END_BURST_TRANSACTION_VALUE		0
-#define NVS_END_BURST_TRANSACTION_LENGTH	7
-
-#define NVS_ALING_TLV_START_ADDRESS_INDEX	((NVS_END_BURST_TRANSACTION_INDEX) + (NVS_END_BURST_TRANSACTION_LENGTH))	/* 21 */
-#define NVS_ALING_TLV_START_ADDRESS_VALUE	0
-#define NVS_ALING_TLV_START_ADDRESS_LENGTH	3
-
-
-/* NVS pre TLV length */
-#define NVS_PRE_PARAMETERS_LENGTH			((NVS_ALING_TLV_START_ADDRESS_INDEX) + (NVS_ALING_TLV_START_ADDRESS_LENGTH)) /* 24 */
-
-/* NVS P2G table */
-#define NVS_TX_P2G_TABLE_LENGTH			((NUMBER_OF_SUB_BANDS_E) * 1 /* byte */) /* 8 */
-
-/* NVS PPA table */
-#define NVS_TX_PPA_STEPS_TABLE_LENGTH	((NUMBER_OF_SUB_BANDS_E) * \
-                                         ((TXPWR_CFG0__VGA_STEP__NUMBER_OF_STEPS_E) \
-                                          - 1) * 1 /* byte */) 	/* 32 */
-
-/* NVS version 1 TX PD curve table length */
-#define NVS_TX_PD_TABLE_LENGTH_NVS_V1	(1 /* byte to set size of table */ + \
-                                         ((NUMBER_OF_SUB_BANDS_E) * (2 /* 1 byte offset, 1 byte low range */ + \
-                                          2 /* first index in table */ + (((SIZE_OF_POWER_DETECTOR_TABLE) - 1) * 1 /* 1 byte */)))) /* 233 */
-
-/* NVS version 2 TX PD curve table length */ 
-#define NVS_TX_PD_TABLE_LENGTH_NVS_V2	((NUMBER_OF_SUB_BANDS_E) * (12 /* 12index of one byte -2 dBm - 9dBm */ +\
-                                        28 /* 14 indexes of 2 byte -3dBm, 10dBm - 22 dBm */)) /* 320 */
-
-/* NVS version 1 TX parameters Length */
-#define	NVS_TX_PARAM_LENGTH_NVS_V1		((NVS_TX_P2G_TABLE_LENGTH) + (NVS_TX_PPA_STEPS_TABLE_LENGTH) +\
-                                         (NVS_TX_PD_TABLE_LENGTH_NVS_V1)) /* 273 */
-
-/* NVS version 2 TX parameters Length */
-#define NVS_TX_PARAM_LENGTH_NVS_V2		((NVS_TX_P2G_TABLE_LENGTH) + (NVS_TX_PPA_STEPS_TABLE_LENGTH) +\
-                                         (NVS_TX_PD_TABLE_LENGTH_NVS_V2) +\
-                                         (NUMBER_OF_RADIO_CHANNEL_INDEXS_E /* for Per Channel power Gain Offset table */)) /* 409 */
-
-/* NVS TX version */
-#define NVS_TX_PARAM_LENGTH				NVS_TX_PARAM_LENGTH_NVS_V2
-
-/* NVS RX version */
-#define        NVS_RX_TYPE_INDEX                               ((NVS_TX_PARAM_INDEX) + (NVS_TX_PARAM_LENGTH)) /* 316 (341) */
-#define        NVS_RX_LENGTH_INDEX                             ((NVS_RX_TYPE_INDEX) + 1) /* 317 (342) */
-#define        NVS_RX_PARAM_INDEX                              ((NVS_RX_LENGTH_INDEX) + 2) /* 319 (344) */
-#define	NVS_RX_PARAM_LENGTH				NUMBER_OF_RX_BIP_EFUSE_PARAMETERS_E				/* 19		 */
-
-/* NVS version parameter length */
-#define NVS_VERSION_TYPE_INDEX                 ((NVS_RX_PARAM_INDEX) + (NVS_RX_PARAM_LENGTH)) /* 338 (363) */
-#define NVS_VERSION_LENGTH_INDEX               ((NVS_VERSION_TYPE_INDEX) + 1) /* 339 (364) */
-#define NVS_VERSION_PARAMETER_INDEX            ((NVS_VERSION_LENGTH_INDEX) + 2) /* 340 (365) */
-#define NVS_VERSION_PARAMETER_LENGTH	3
-
-/* NVS max length */
-#define NVS_TOTAL_LENGTH				500 /* original ((NVS_TOTAL_LENGTH) + 4 - ((NVS_TOTAL_LENGTH) % 4)) */
-
-/* TLV max length */
-#define  MAX_TLV_LENGTH 				NVS_TOTAL_LENGTH  
- 
-#define	 MAX_NVS_VERSION_LENGTH			12
-
-/* type to set in the NVS for each mode of work */ 
-typedef enum
-{
-	eNVS_VERSION = 0xaa,
-	eNVS_RADIO_TX_PARAMETERS = 1,
-	eNVS_RADIO_RX_PARAMETERS = 2,
-
-	eNVS_RADIO_INI = 16,
-
-
-	eNVS_NON_FILE = 0xFE,
-
-	/* last TLV type */
-	eTLV_LAST = 0xFF
-}NVSType;
-
-/* type to set parameter type buffers for each mode of work */
-typedef enum
-{
-	eFIRST_RADIO_TYPE_PARAMETERS_INFO,											/* 0 */
-	eNVS_RADIO_TX_TYPE_PARAMETERS_INFO = eFIRST_RADIO_TYPE_PARAMETERS_INFO,		/* 0 */
-	eNVS_RADIO_RX_TYPE_PARAMETERS_INFO,											/* 1 */
-	eLAST_RADIO_TYPE_PARAMETERS_INFO = eNVS_RADIO_RX_TYPE_PARAMETERS_INFO,		/* 1 */
-	UNUSED_RADIO_TYPE_PARAMETERS_INFO,											/* 2 */
-	eNUMBER_RADIO_TYPE_PARAMETERS_INFO = UNUSED_RADIO_TYPE_PARAMETERS_INFO,		/* 2 */
-	LAST_RADIO_TYPE_PARAMETERS_INFO = (eNUMBER_RADIO_TYPE_PARAMETERS_INFO - 1)	/* 1 */
-}NVSTypeInfo;
-
-/* NVS definition end here */
-
-
-typedef enum
-{
-	eCURRENT_SUB_BAND,
-	eALL_SUB_BANDS	
-}TxBipCurrentAllSubBand;
-
-typedef struct 
-{
-	uint16 	Length;			       	/* TLV length in bytes */
-	uint8 	Buffer[MAX_TLV_LENGTH]; /* TLV buffer content to be burned */
-    uint8   Type;                   /* TLV Type Index */ 
-	uint8   padding;
-}TNvsStruct;
-
-typedef struct
-{
-	uint32		oNVSVersion;
-	TNvsStruct	oNvsStruct; 	/* output (P2G array) */
-	int16		oRadioStatus;
-    uint8             iSubBandMask;             /* 7 sub-band bit mask (asserted bit - calibration required) */
-    uint8             Padding;
-} TTestCmdP2GCal;
-
-typedef struct
-{
-	int16			oRadioStatus;
-	uint16			Pad;
-	uint32			iDelay;			/* between packets (usec) */
-	uint32	     	iRate; 			/* 1MBPS	= 0x00000001,
-										2MBPS   = 0x00000002,
-										5.5MBPS	= 0x00000004,
-										6MBPS   = 0x00000008,
-										9MBPS   = 0x00000010,
-										11MBPS  = 0x00000020,
-										12MBPS  = 0x00000040,
-										18MBPS  = 0x00000080,
-										24MBPS  = 0x00000200,
-										36MBPS  = 0x00000400,
-										48MBPS  = 0x00000800,
-										54MBPS  = 0x00001000,
-										MCS_0  	= 0x00002000,
-										MCS_1  	= 0x00004000,
-										MCS_2  	= 0x00008000,
-										MCS_3  	= 0x00010000,
-										MCS_4  	= 0x00020000,
-										MCS_5  	= 0x00040000,
-										MCS_6  	= 0x00080000,
-										MCS_7  	= 0x00100000 */
-	uint16	     	iSize; 			/* size of packet (bytes) */
-	uint16			iAmount; 		/* in case of multiple (# of packets) */
-	int32			iPower;			/* upper power limit (dBm) */
-	uint16			iSeed;	
-	uint8			iPacketMode; 	/* single, multiple, InfiniteLength, Continuous, FCC */
-	uint8	     	iDcfOnOff; 		/* use DCF access (1) */
-	uint8	     	iGI;			/* Guard Interval: long:800ns (0), short:400ns (1) */
-	uint8	     	iPreamble;		/* long (0), short (1),  OFDM (4), GF (7), Mixed (6) */
-	uint8	     	iType;			/* Data (0), Ack (1), Probe-request(2), Random (3), User-defined (4), PER (5) */
-	uint8	     	iScrambler;		/* Off (0), On (1) */
-	uint8	     	iEnableCLPC; 	/* range 0-100. 0 - disable calibration										/
-									   range 1-99 - enable Cal asses periodic time, every step is 200msecond 
-	                                   periodic of cal assess for example: 1.2 second put the value 6.
-									   if the value is out of range it will be change to 25 represent 
-	                                   5 second of cal assess periodical */	
-	uint8 	     	iSeqNumMode; 	/* Fixed sequence number (0), incremental (1) - used for PER test only */
-	TMacAddr	 	iSrcMacAddr; 	/* Source address (BSSID) - used for PER test only */
-	TMacAddr	    iDstMacAddr; 	/* Destination address - used for PER test only */
-	
-} TPacketParam;
-
-typedef struct
-{
-	int16			 oRadioStatus;
-	uint16			 Pad;
-	int32		     iPower;
-	uint8	    	 iToneType;
-	uint8		     iPpaStep;
-	uint8		     iToneNumberSingleTones;
-	uint8 	    	 iToneNumberTwoTones;
-	uint8		     iUseDigitalDC;
-	uint8 		     iInvert;
-	uint8	    	 iElevenNSpan;
-	uint8		     iDigitalDC;
-	uint8		     iAnalogDCFine;
-	uint8	    	 iAnalogDCCoarse;
-} TToneParam;
-
-typedef  struct 
-{
-	uint16 	bufferOffset;
-	uint16 	bufferLength;
-	int16	oRadioStatus;
-	int8 	buffer[TX_TEMPLATE_MAX_BUF_LEN];
-	uint8	padding[2];
-} TTxTemplate;
-
-typedef enum
-{
-	eDISABLE_CLPC,
-	eENABLE_CLPC,
-	eRESET_CLPC_TABLES,
-	eINIDCATE_CLPC_ACTIVATION_TIME
-}CLPCCommands;
-
-typedef struct 
-{
-	int16	oStatus;
-	uint8	iCLPCActivationTime; /* range 0-100. 0 - disable calibration										/
-									range 1-99 - enable Cal asses periodic time, every step is 200msecond 
-	                                periodic of cal assess for example: 1.2 second put the value 6.
-									if the value is out of range it will be change to 25 represent 
-	                                5 second of cal assess periodical */
-	uint8	iCLPCCommands;
-}TTestCmdCLPCCommands;
-
-
-/************************************************************************
-                PLT  DBS
-				Theses DBs were moved from the TWDExternalIf.h because of
-				redundency.
-************************************************************************/
-typedef struct 
-{
-	uint8   oAbsoluteGain; 	/* Per Sub-Band (output) */
-	uint8   oLNASteps[RX_PLT_LNA_STEPS_BUF_LEN]; 	/* 4 steps per Band (output) */
-	uint8   oTASteps[RX_PLT_TA_STEPS_BUF_LEN]; 	/* 2 steps per Band (output) */
-	uint8   Padding; 
-} TTestCmdRxPlt;
-
-typedef struct 
-{
-	uint32  ReceivedValidPacketsNumber;
-    uint32  ReceivedFcsErrorPacketsNumber;
-    uint32  ReceivedPlcpErrorPacketsNumber;
-    uint32 	SeqNumMissCount; /* For PER calculation */
-    int16   AverageSnr;
-    int16   AverageRssi;
-    int16  AverageEvm;
-    uint8   Padding[2];
-} RxPathStatistics_t;
-
-typedef struct 
-{
-	uint16  Length; 
-    uint16  EVM; 
-    uint16  RSSI;
-    uint16  FrequencyDelta; 
-    uint16  Flags;
-    int8	Type;
-    uint8   Rate;
-    uint8   Noise;
-    uint8   AgcGain;
-    uint8   Padding[2];
-} RxPacketStatistics_t;
-
-#define RX_STAT_PACKETS_PER_MESSAGE           (20) 
-typedef struct 
-{
-	RxPathStatistics_t		oRxPathStatistics;
-    uint32           		oBasePacketId; 
-    uint32           		ioNumberOfPackets; 			/* input/output: number of following packets */
-	uint32					oNumberOfMissedPackets;		/* number of following packet statistic entries that were dropped */
-    /*RxPacketStatistics_t    RxPacketStatistics[RX_STAT_PACKETS_PER_MESSAGE];*/
-	int16					oRadioStatus;
-} RadioRxStatistics;
-
-/* RX RF gain values */
-typedef enum PHY_RADIO_RX_GAIN_VALUES_ENMT
-{
-	FIRST_RX_GAIN_VALUE_E,					
-/*_______________________________________________*/
-	RX_GAIN_VALUE_0_E = FIRST_RX_GAIN_VALUE_E,	
-	RX_GAIN_VALUE_1_E,						
-	RX_GAIN_VALUE_2_E,						
-	RX_GAIN_VALUE_3_E,						
-	RX_GAIN_VALUE_4_E,					
-	RX_GAIN_VALUE_5_E,					
-	RX_GAIN_VALUE_6_E,					
-	RX_GAIN_VALUE_7_E,					
-/*_______________________________________________*/
-	NUMBER_OF_RX_GAIN_VALUES_E,				
-	LAST_RX_GAIN_VALUE_E = (NUMBER_OF_RX_GAIN_VALUES_E - 1)
-
-}PHY_RADIO_RX_GAIN_VALUES_ENM;
-
-/* RX BIP */
-typedef struct 
-{
-	uint32		oNVSVersion;
-	int32		iExternalSignalPowerLevel;
-	int32		oLnaTaCompensationValues[NUMBER_OF_RX_GAIN_VALUES_E-1];
-	TNvsStruct	oNvsStruct; 
-	int16		oRadioStatus;
-	int8		padding[2];
-}RadioRxPltCal;
-
-
-typedef enum
-{
-	eSINGLE_BAND_INI_FILE,
-	eDUAL_BAND_INI_FILE
-}IniFileSingleDualBand;
-
-#define SMART_REFLEX_LENGTH_INDEX				0
-#define SMART_REFLEX_UPPER_LIMIT_INDEX			1	
-#define SMART_REFLEX_START_ERROR_VALUE_INDEX	2
-
-#define MAX_SMART_REFLEX_FUB_VALUES		14
-/* 1. first index is the number of param	*/
-/* 2. second is the higher value			*/
-/* 3. 14 parameter of the correction		*/
-#define MAX_SMART_REFLEX_PARAM					(MAX_SMART_REFLEX_FUB_VALUES + SMART_REFLEX_START_ERROR_VALUE_INDEX)
-
-
-
-typedef struct 
-{
-	uint8	RefClk;                                 
-	uint8	SettlingTime;                                                                 
-	uint8	ClockValidOnWakeup;                      
-	uint8	DC2DCMode;                               
-	uint8	Single_Dual_Band_Solution;  
-	uint8	TXBiPFEMAutoDetect;
-	uint8	TXBiPFEMManufacturer;  
-/*	GeneralSettingsByte	Settings; */
-    uint8   GeneralSettings;
-
-
-    /* smart reflex state*/
-    uint8 SRState; 
-    /* FUB parameters */
-    int8	SRF1[MAX_SMART_REFLEX_PARAM];
-    int8	SRF2[MAX_SMART_REFLEX_PARAM];
-    int8	SRF3[MAX_SMART_REFLEX_PARAM];
-
-
-    /* FUB debug parameters */
-    int8	SR_Debug_Table[MAX_SMART_REFLEX_PARAM];
-    uint8	SR_SEN_N_P;
-    uint8	SR_SEN_N_P_Gain;
-    uint8	SR_SEN_NRN;
-    uint8	SR_SEN_PRN;
-    uint8	padding[3];
-
-}IniFileGeneralParam;  
-
-typedef enum 
-{		
-	FEM_MANUAL_DETECT_MODE_E,
-	FEM_AUTO_DETECT_MODE_E
-
-}FEM_DETECT_MODE_ENM;
-
-typedef enum 
-{		
-	FEM_RFMD_TYPE_E,
-	FEM_TRIQUINT_TYPE_E,
-	NUMBER_OF_FEM_TYPES_E
-
-}FEM_TYPE_ENM;
-
-typedef enum 
-{		
-	eREF_CLK_19_2_E,
-	eREF_CLK_26_E,
-	eREF_CLK_38_4_E,
-	eREF_CLK_52_E
-
-}REF_CLK_ENM;
-
-typedef enum 
-{		
-	REF_CLK_NOT_VALID_E,
-	REF_CLK_VALID_AND_STABLE_E
-
-}CLK_VALID_ON_WAKEUP_ENM;
-
-typedef enum 
-{		
-	BT_SPI_IS_NOT_USED_E,
-	MUX_DC2DC_TO_BT_FUNC2_E
-
-}DC2DC_MODE_ENM;
-
-typedef enum 
-{		
-	SINGLE_BAND_SOLUTION_E,
-	DUAL_BAND_SOLUTION_E
-
-}SINGLE_DUAL_BAND_SOLUTION_ENM;
-
-/* General settings byte */
-typedef enum 
-{		
-	TELEC_CHAN_14_OFF_E,
-	TELEC_CHAN_14_ON_E
-
-}TELEC_CHAN_14_ENM;
-
-typedef enum 
-{		
-	NBI_OFF_E,
-	NBI_ON_E
-
-}NBI_ENM;
-
-#define RSSI_AND_PROCESS_COMPENSATION_TABLE_SIZE   (15)
-
-typedef struct 
-{
-	/* SECTION 1: 2.4G parameters */
-	uint8 RxTraceInsertionLoss_2_4G;																							
-	uint8 TXTraceLoss_2_4G;																							
-	int8  RxRssiAndProcessCompensation_2_4G[RSSI_AND_PROCESS_COMPENSATION_TABLE_SIZE];						
-	
-	/* SECTION 2: 5G parameters */										 
-	uint8 RxTraceInsertionLoss_5G[NUMBER_OF_SUB_BANDS_IN_5G_BAND_E];																
-	uint8 TXTraceLoss_5G[NUMBER_OF_SUB_BANDS_IN_5G_BAND_E];																
-	int8  RxRssiAndProcessCompensation_5G[RSSI_AND_PROCESS_COMPENSATION_TABLE_SIZE];									
-
-}TStatRadioParams;  
-
-typedef struct 
-{  
-	/* SECTION 1: 2.4G parameters */
-	uint16  TXBiPReferencePDvoltage_2_4G;								
-	uint8   TxBiPReferencePower_2_4G;		
-	int8  	TxBiPOffsetdB_2_4G;
-	int8  	TxPerRatePowerLimits_2_4G_Normal[NUMBER_OF_RATE_GROUPS_E];							
-	int8  	TxPerRatePowerLimits_2_4G_Degraded[NUMBER_OF_RATE_GROUPS_E];							
-	int8    TxPerRatePowerLimits_2_4G_Extreme[NUMBER_OF_RATE_GROUPS_E];
-	int8  	TxPerChannelPowerLimits_2_4G_11b[NUMBER_OF_2_4_G_CHANNELS];	
-	int8    TxPerChannelPowerLimits_2_4G_OFDM[NUMBER_OF_2_4_G_CHANNELS];	
-	int8    TxPDVsRateOffsets_2_4G[NUMBER_OF_RATE_GROUPS_E];												
-	uint8   TxIbiasTable_2_4G[NUMBER_OF_RATE_GROUPS_E];														
-	uint8   RxFemInsertionLoss_2_4G;
-        uint8 	DegradedLowToNormalThr_2_4G;
-        uint8 	NormalToDegradedHighThr_2_4G;
-
-	/* SECTION 2: 5G parameters */
-	uint16 	TXBiPReferencePDvoltage_5G[NUMBER_OF_SUB_BANDS_IN_5G_BAND_E];
-	uint8  	TxBiPReferencePower_5G[NUMBER_OF_SUB_BANDS_IN_5G_BAND_E];			
-	int8   	TxBiPOffsetdB_5G[NUMBER_OF_SUB_BANDS_IN_5G_BAND_E];								
-	int8   	TxPerRatePowerLimits_5G_Normal[NUMBER_OF_RATE_GROUPS_E];							
-	int8   	TxPerRatePowerLimits_5G_Degraded[NUMBER_OF_RATE_GROUPS_E];
-    int8   	TxPerRatePowerLimits_5G_Extreme[NUMBER_OF_RATE_GROUPS_E];
-	int8   	TxPerChannelPowerLimits_5G_OFDM[NUMBER_OF_5G_CHANNELS];                         
-	int8   	TxPDVsRateOffsets_5G[NUMBER_OF_RATE_GROUPS_E];										
-	int8   	TxIbiasTable_5G[NUMBER_OF_RATE_GROUPS_E];											
-	uint8  	RxFemInsertionLoss_5G[NUMBER_OF_SUB_BANDS_IN_5G_BAND_E];	
-    uint8  	DegradedLowToNormalThr_5G;			
-    uint8   NormalToDegradedHighThr_5G;
- 
-}TDynRadioParams;  
-
-typedef struct 
-{
-	TStatRadioParams	tStatRadioParams;
-	TDynRadioParams		tDynRadioParams;
-    uint8                   Padding[2];
-
-}IniFileRadioParam;  
-
-typedef struct 
-{
-	int8  TxPerChannelPowerCompensation_2_4G[HALF_NUMBER_OF_2_4_G_CHANNELS]; /* 7 */	
-	int8  TxPerChannelPowerCompensation_5G_OFDM[HALF_NUMBER_OF_5G_CHANNELS]; /* 18 */
-	uint8 Padding[3];
-
-}IniFileExtendedRadioParam;  
-	
-/*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
-
-/* Describes a reference design supported by the HDK Module */
-typedef struct HDKReferenceDesign_t
-{
-    uint16  referenceDesignId;          /* Reference design Id supported */
-    uint8   nvsMajorVersion;            /* First EEPROM version supported */
-    uint8   nvsMinorVersion;
-    uint8   nvsMinorMinorVersion;
-} THDKReferenceDesign;
-
-typedef struct HDKModuleVersion_t
-{
-    uint8               ProductName;				/* '6' for WiLink6, '4' for WiLink4 */
-    uint8               PgNumber;                   /* Hardware tag */
-    uint8               SoftwareVersionLevel;       /* SW level number (Major SW change) */
-    uint8               SoftwareVersionDelivery;    /* Delivery number inside any (Inside any level) */
-
-    uint8					radioModuleType;                    /* The radio that is currently supported by the HDK module */
-    uint8					numberOfReferenceDesignsSupported;  /* The number of reference designs supported by the HDK module */
-    THDKReferenceDesign*   referenceDesignsSupported;			/* Array of reference_design supported */
-	
-} THDKModuleVersion;
-
-#define FW_VERSION_LENGTH 5
-
-typedef struct 
-{	
-	THDKModuleVersion	hdkVersion;
-	uint8				FWVersion[FW_VERSION_LENGTH];		
-    uint32               drpwVersion;
-	int16				oRadioStatus;
-	uint8				padding[3];		
-}TFWVerisons;
-
-typedef struct
-{
-    int16       RSSIVal;      /* free running RSSI value, 1dB resolution */
-    int16		oRadioStatus;   
-}TTestCmdFreeRSSI;
-
-typedef struct
-{
-    TestCmdID_e     testCmdId;
-	int8            padding[3];
-
-	/* Efil -	when adding parameter here fill the switch case sentence in function
-			"cmdBld_CmdIeTest" in module "TWD\Ctrl\CmdBldCmdIE.c" */
-    union
-    {
-		TTestCmdChannel 				Channel;
-		RadioRxPltCal 					RxPlt;          
-		TTestCmdPdBufferCal 			PdBufferCal;
-		TTestCmdP2GCal 					P2GCal;    
-		TTestCmdPdBufferErrors			PdBufferErrors;
-		TTestCmdUpdateReferncePoint		PdBufferCalReferencePoint;
-		TPacketParam 					TxPacketParams;
-		TToneParam 						TxToneParams;
-		TTxTemplate						TxTemplateParams;
-		/*uint32               			txGainAdjust; */
-		TTxGainAdjust					txGainAdjust;
-		RadioRxStatistics				Statistics;
-		TFWVerisons						fwVersions;
-		TTestCmdRunCalibration			RunCalibration;
-        IniFileRadioParam				IniFileRadioParams;
-		IniFileExtendedRadioParam		IniFileExtendedRadioParams;
-		IniFileGeneralParam				IniFileGeneralParams;
-		EfuseParameters_t				EfuseParams;
-		TestToneParams_t				TestToneParams;
-		TTestCmdPowerMode				powerMode;
-        TTestCmdFreeRSSI                freeRSSI;
-		TTestCmdCLPCCommands			clpcCommands;
-		TTestCmdDCOItrimOnOff           DCOitrimFeatureOnOff;
-
-		TTestCmdDebug					testDebug;
-    }testCmd_u;
-}TTestCmd;
-
-
-#ifndef HOST_IF_ENUMS_DISABLED
-typedef enum RadioParamType_e
-{
-    RADIO_PARAM_POWER_TABLE = 1,
-    RADIO_PARAM_POWER_LIMIT_TABLE,
-    RADIO_PARAM_POWER_ADJ_TABLE,
-    RADIO_PARAM_POWER_ENABLES,
-    RADIO_PABIAS_TABLE,
-    RADIO_PARAM_POWER_LEVELS,
-
-    MAX_RADIO_PARAM_TYPE = 0x7FFFFFFF /* force this enum to be uint32 */
-    
-} RadioParamType_e;
-#else
-typedef uint32 RadioParamType_e;
-#endif
-
-typedef struct RadioParam_t
-{
-    RadioParamType_e parameterType;
-    int8  parameter[MAX_RADIO_PARAM_LEN];
-} RadioParam_t;
-
-typedef enum RadioState_e
-{
-    RADIO_STATE_INIT = 1,           /* Completed radio initialization */
-    RADIO_STATE_TUNE = 2,           /* Completed channel tuning */
-    RADIO_STATE_DC_CAL = 3,         /* Completed radio DC calibration */
-    RADIO_STATE_AFE_DC_CAL =4,      /* Completed AFE DC calibration */
-    RADIO_STATE_TX_MM = 5,          /* Completed transmit IQ mismatch calibration */
-    RADIO_STATE_TX_EQUAL = 6,       /* Completed transmit equalization  calibration */
-    RADIO_STATE_CARR_SUPP = 7,      /* Completed carrier suppression calibration */
-    RADIO_STATE_TX_PWR_CTRL = 8     /* Completed transmit power control calibration (only for bg and abg radios) */
-
-} RadioState_e;
-
-typedef enum
-{
-    PS_MODE_ENTER_ELP = 0x0,
-    PS_MODE_ENTER_PD = 0x1,
-    PS_MODE_EXIT_FROM_ELP = 0x2,
-    PS_MODE_EXIT_FROM_PD = 0x4,
-    PS_MODE_ENTER_ELP_SG_EN = 0x10,
-    PS_MODE_ENTER_PD_SG_EN = 0x11,
-    PS_MODE_EXIT_FROM_ELP_SG_EN = 0x12,
-    PS_MODE_EXIT_FROM_PD_SG_EN = 0x14,
-    PS_MODE_INVALID = 0xFF
-
-}PowerSaveMode_e;
-
-typedef struct RadioTune_t
-{
-    Channel_e   channel;
-    RadioBand_e band;
-} RadioTune_t;
-
-typedef struct RadioRSSIAndSNR_t
-{
-    int16   rssi;
-    int16   snr;
-}RadioRSSIAndSNR_t;
-
-/* VBIAS values (in mili-volts) */
-typedef enum PHY_RADIO_VBIAS_MV_ENMT
-{
-	FIRST_VBIAS_VALUE_E = -1,
-
-	VBIAS_0MV_E = FIRST_VBIAS_VALUE_E,
-	VBIAS_100MV_E = 0,
-	VBIAS_200MV_E = 1,
-	VBIAS_300MV_E = 2,
-	VBIAS_400MV_E = 3,
-	VBIAS_500MV_E = 4,
-	VBIAS_600MV_E = 5,
-	VBIAS_700MV_E = 6,
-	VBIAS_800MV_E = 7,
-
-	NUMBER_OF_VBIAS_VALUES_E = 9,
-    LAST_VBIAS_VALUE_E = (NUMBER_OF_VBIAS_VALUES_E - 1)
-
-}PHY_RADIO_VBIAS_MV_ENM;
-
-/* Gain monitor values */
-typedef enum PHY_RADIO_GAIN_MONITOR_TYPES_ENMT
-{
-	FIRST_GAIN_MONITOR_TYPE_E,
-	GAIN_MONITOR_DISABLE = 0,
-	GAIN_MONITOR_RESERVED = 1,
-/*_______________________________________________*/
-	GAIN_MONITOR_X0_5_E = 2,
-	GAIN_MONITOR_X1_E = 3,
-	GAIN_MONITOR_X2_E = 4,
-	GAIN_MONITOR_X4_E = 5,
-	GAIN_MONITOR_X8_E = 6,
-	GAIN_MONITOR_X16_E = 7,
-/*_______________________________________________*/
-	NUMBER_OF_GAIN_MONITOR_TYPES_E = GAIN_MONITOR_X16_E,				
-	LAST_GAIN_MONITOR_TYPE_E = (NUMBER_OF_GAIN_MONITOR_TYPES_E - 1)	
-
-}PHY_RADIO_GAIN_MONITOR_TYPES_ENM;
-
-
-/* TX Packet Mode; */
-typedef enum
-{
-	eTX_MODE_SINGLE_PACKET,              /* 0 */
-	eTX_MODE_MULTIPLE_PACKET,            /* 1 */
-	eTX_MODE_INFINITE_LENGTH_PACKET,     /* 2 */
-	eTX_MODE_CONTINUES_PACKET,           /* 3 */
-	eTX_MODE_FCC_PACKET,                 /* 4 */
-	eTX_MODE_SENARIO_PACKET,	     /* 5 */
-
-	eMAX_PACKET_MODE_PACKET
-}PacketTypeMode;
-
-/* TX tone mode */
-typedef enum
-{
-	eSILENCE_TONE_MODE,
-	eCARRIER_FEED_THROUGH_MODE,
-	eSINGLE_TONE_MODE,
-	eTWO_TONE_MODE,
-	eMULTI_TONE_MODE,
-
-	eMax_TONE_MODE
-}ToneTypeMode;
-
-
-/**********************************************************************/
-/*		For RSSI Calculation - Save Parameters						  */
-/**********************************************************************/
-
-typedef struct 
-{
-	uint16 linerEvmVal;
-	uint16 ccaEcalcMonReg;
-	uint16 ccaEcalcRssi;
-	uint16 linerEvmPilVal;
-	uint8 lanTableIndex;
-	uint8 taTableIndex;
-	uint8 lnaTableIndex;
-	RADIO_SUB_BAND_TYPE_ENM currSubBand;
-	RADIO_BAND_TYPE_ENM		currBand;
-}rssiParamSave_t;
-
-
-
-#endif	/* #ifndef PUBLIC_RADIO */
diff --git a/wl1271/TWD/FirmwareApi/public_types.h b/wl1271/TWD/FirmwareApi/public_types.h
deleted file mode 100644
index d806b89..0000000
--- a/wl1271/TWD/FirmwareApi/public_types.h
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * public_types.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**********************************************************************************************************************
-
-  FILENAME:       public_types.h
-
-  DESCRIPTION:    Basic types and general macros, bit manipulations, etc.
-
-
-
-***********************************************************************************************************************/
-#ifndef PUBLIC_TYPES_H
-#define PUBLIC_TYPES_H
- 
-
-/******************************************************************************
-
-    Basic definitions
-
-******************************************************************************/
-#ifndef uint8
-typedef unsigned char   uint8;
-#endif
-#ifndef uint16
-typedef unsigned short  uint16;
-#endif
-#ifndef uint32
-typedef unsigned long int    uint32;
-#endif
-#ifndef uint64
-typedef unsigned long long    uint64;
-#endif
-
-
-#ifndef int8
-typedef signed char     int8;
-#endif
-#ifndef int16
-typedef short           int16;
-#endif
-#ifndef int32
-typedef long int        int32;
-#endif
-#ifndef int64
-typedef long long       int64;
-#endif
-
-
-#ifdef HOST_COMPILE
-    #ifndef TI_TRUE
-    #define TI_TRUE  1
-    #endif
-    #ifndef TI_FALSE
-    #define TI_FALSE 0
-    #endif
-#else
-    #ifndef TRUE
-    #define TRUE  1
-    #endif
-    #ifndef FALSE
-    #define FALSE 0
-    #endif
-    #define STATIC			static
-    #define INLINE			inline
-#endif
-
-/* !! LAC - NULL definition conflicts with the compilers version.
-   I redid this definition to the ANSI version....
-    #define NULL 0
-*/
-#if !defined( NULL )
-#if defined( __cplusplus )
-#define NULL 0
-#else
-#define NULL ((void *)0)
-#endif
-#endif
-
-/* Bool_e should be used when we need it to be a byte. */
-typedef uint8           Bool_e;
-
-/* Bool32 should be used whenever possible for efficiency */
-typedef uint32          Bool32;
-
-/* to align enum to 32/16 bits */
-#define MAX_POSITIVE32 0x7FFFFFFF
-#define MAX_POSITIVE16 0x7FFF
-#define MAX_POSITIVE8  0x7F
-
-#define MAC_ADDR_SIZE							6   /* In Bytes */
-#define MAC_ADDRESS_MANUFACTURE_TYPE_LENGHT		3   /* In Bytes */
-#define MAC_ADDRESS_STATION_ID_LENGHT			3   /* In Bytes */
-
-#ifdef HOST_COMPILE
-#else
-typedef struct macAddress_t
-{
-    uint8 addr[MAC_ADDR_SIZE];
-}macAddress_t;
-#endif
-
-
-#define  BIT_0    0x00000001
-#define  BIT_1    0x00000002
-#define  BIT_2    0x00000004
-#define  BIT_3    0x00000008
-#define  BIT_4    0x00000010
-#define  BIT_5    0x00000020
-#define  BIT_6    0x00000040
-#define  BIT_7    0x00000080
-#define  BIT_8    0x00000100
-#define  BIT_9    0x00000200
-#define  BIT_10   0x00000400
-#define  BIT_11   0x00000800
-#define  BIT_12   0x00001000
-#define  BIT_13   0x00002000
-#define  BIT_14   0x00004000
-#define  BIT_15   0x00008000
-#define  BIT_16   0x00010000
-#define  BIT_17   0x00020000
-#define  BIT_18   0x00040000
-#define  BIT_19   0x00080000
-#define  BIT_20   0x00100000
-#define  BIT_21   0x00200000
-#define  BIT_22   0x00400000
-#define  BIT_23   0x00800000
-#define  BIT_24   0x01000000
-#define  BIT_25   0x02000000
-#define  BIT_26   0x04000000
-#define  BIT_27   0x08000000
-#define  BIT_28   0x10000000
-#define  BIT_29   0x20000000
-#define  BIT_30   0x40000000
-#define  BIT_31   0x80000000
-
-#define  BIT_32   0x00000001
-#define  BIT_33   0x00000002
-#define  BIT_34   0x00000004
-#define  BIT_35   0x00000008
-#define  BIT_36   0x00000010
-#define  BIT_37   0x00000020
-#define  BIT_38   0x00000040
-#define  BIT_39   0x00000080
-#define  BIT_40   0x00000100
-#define  BIT_41   0x00000200
-#define  BIT_42   0x00000400
-#define  BIT_43   0x00000800
-#define  BIT_44   0x00001000
-#define  BIT_45   0x00002000
-#define  BIT_46   0x00004000
-#define  BIT_47   0x00008000
-#define  BIT_48   0x00010000
-#define  BIT_49   0x00020000
-#define  BIT_50   0x00040000
-#define  BIT_51   0x00080000
-#define  BIT_52   0x00100000
-#define  BIT_53   0x00200000
-#define  BIT_54   0x00400000
-#define  BIT_55   0x00800000
-#define  BIT_56   0x01000000
-#define  BIT_57   0x02000000
-#define  BIT_58   0x04000000
-#define  BIT_59   0x08000000
-#define  BIT_60   0x10000000
-#define  BIT_61   0x20000000
-#define  BIT_62   0x40000000
-#define  BIT_63   0x80000000
-
-
-/******************************************************************************
-
-    CHANNELS, BAND & REG DOMAINS definitions
-
-******************************************************************************/
-
-
-typedef uint8 Channel_e;
-
-typedef enum
-{
-    RADIO_BAND_2_4GHZ = 0,  /* 2.4 Ghz band */
-    RADIO_BAND_5GHZ = 1,    /* 5 Ghz band */
-    RADIO_BAND_JAPAN_4_9_GHZ = 2,
-    DEFAULT_BAND = RADIO_BAND_2_4GHZ,
-    INVALID_BAND = 0x7E,
-    MAX_RADIO_BANDS = 0x7F
-} RadioBand_enum;
-
-#ifdef HOST_COMPILE
-typedef uint8 RadioBand_e;
-#else
-typedef RadioBand_enum RadioBand_e;
-#endif
-
-/* The following enum is used in the FW for HIF interface only !!!!! */
-typedef enum
-{
-    HW_BIT_RATE_1MBPS   = BIT_0 ,
-    HW_BIT_RATE_2MBPS   = BIT_1 ,
-    HW_BIT_RATE_5_5MBPS = BIT_2 ,
-    HW_BIT_RATE_6MBPS   = BIT_3 ,
-    HW_BIT_RATE_9MBPS   = BIT_4 ,
-    HW_BIT_RATE_11MBPS  = BIT_5 ,
-    HW_BIT_RATE_12MBPS  = BIT_6 ,
-    HW_BIT_RATE_18MBPS  = BIT_7 ,
-    HW_BIT_RATE_22MBPS  = BIT_8 ,
-    HW_BIT_RATE_24MBPS  = BIT_9 ,
-    HW_BIT_RATE_36MBPS  = BIT_10,
-    HW_BIT_RATE_48MBPS  = BIT_11,
-    HW_BIT_RATE_54MBPS  = BIT_12,
-    HW_BIT_RATE_MCS_0  	= BIT_13,
-    HW_BIT_RATE_MCS_1  	= BIT_14,
-    HW_BIT_RATE_MCS_2  	= BIT_15,
-    HW_BIT_RATE_MCS_3  	= BIT_16,
-    HW_BIT_RATE_MCS_4  	= BIT_17,
-    HW_BIT_RATE_MCS_5  	= BIT_18,
-    HW_BIT_RATE_MCS_6  	= BIT_19,
-    HW_BIT_RATE_MCS_7  	= BIT_20
-} EHwBitRate;
-
-/* The following enum is used in the FW for HIF interface only !!!!! */
-typedef enum
-{
-    txPolicyMcs7 = 0,
-    txPolicyMcs6,
-    txPolicyMcs5,
-    txPolicyMcs4,
-    txPolicyMcs3,
-    txPolicyMcs2,
-    txPolicyMcs1,
-    txPolicyMcs0,
-    txPolicy54,
-    txPolicy48,
-    txPolicy36,
-    txPolicy24,
-    txPolicy22,
-    txPolicy18,
-    txPolicy12,
-    txPolicy11,
-    txPolicy9,
-    txPolicy6,
-    txPolicy5_5,
-    txPolicy2,
-    txPolicy1,
-    MAX_NUM_OF_TX_RATES_IN_CLASS,
-    TX_RATE_INDEX_ENUM_MAX_SIZE = 0xFF
-} ETxRateClassId;
-
-
-
-
-#define SHORT_PREAMBLE_BIT   BIT_0 /* CCK or Barker depending on the rate */
-#define OFDM_RATE_BIT        BIT_6
-#define PBCC_RATE_BIT        BIT_7
-
-
-typedef enum
-{
-    CCK_LONG = 0,
-    CCK_SHORT = SHORT_PREAMBLE_BIT,
-    PBCC_LONG = PBCC_RATE_BIT,
-    PBCC_SHORT = PBCC_RATE_BIT | SHORT_PREAMBLE_BIT,
-    OFDM = OFDM_RATE_BIT
-} Mod_enum;
-
-#ifdef HOST_COMPILE
-typedef  uint8 Mod_e;
-#else
-typedef  Mod_enum Mod_e;
-#endif
-
-
-typedef uint16 BasicRateSet_t;
-
-
-/******************************************************************************
-
-Transmit-Descriptor RATE-SET field definitions...
-
-******************************************************************************/
-
-typedef uint32 EHwRateBitFiled;/* set with EHwBitRate values */
-
-#ifdef HOST_COMPILE
-typedef uint8  TxRateIndex_t;  /* set with ETxRateClassId values */
-#else 
-typedef ETxRateClassId TxRateIndex_t;
-#endif
-
-/******************************************************************************
- 
-    CHIP_ID definitions
- 
-******************************************************************************/
-#define TNETW1150_PG10_CHIP_ID          0x04010101
-#define TNETW1150_PG11_CHIP_ID          0x04020101
-#define TNETW1150_CHIP_ID               0x04030101  /* 1150 PG2.0, 1250, 1350, 1450*/
-#define TNETW1350A_CHIP_ID              0x06010101
-#define TNETW1251_CHIP_ID_PG1_0         0x07010101
-#define TNETW1251_CHIP_ID_PG1_1         0x07020101
-#define TNETW1251_CHIP_ID_PG1_2	        0x07030101
-#define TNETW1273_CHIP_ID_PG1_0	        0x04030101
-#define TNETW1273_CHIP_ID_PG1_1	        0x04030111 
-
-#define CHECK_CHIP_ID(chipId) (CHIP_ID_B == chipId)
-
-/******************************************************************************
-Enable bits for SOC1251 PG1.2
-******************************************************************************/
-#define PDET_BINARY_OFFSET_EN   BIT_0
-#define STOP_TOGGLE_MONADC_EN   BIT_1
-#define RX_ADC_BIAS_DEC_EN      BIT_2
-#define RX_LNB_AND_DIGI_GAIN_EN BIT_3
-
-
-#endif /* PUBLIC_TYPES_H*/
diff --git a/wl1271/TWD/MacServices/Export_Inc/MacServices_api.h b/wl1271/TWD/MacServices/Export_Inc/MacServices_api.h
deleted file mode 100644
index e547615..0000000
--- a/wl1271/TWD/MacServices/Export_Inc/MacServices_api.h
+++ /dev/null
@@ -1,524 +0,0 @@
-/*
- * MacServices_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file MacServicesApi.h
- *  \brief This file include public definitions for the MacServices module, comprising its API.
- *  \author Yuval Adler
- *  \date 6-Oct-2005
- */
-
-#ifndef __MACSERVICESAPI_H__
-#define __MACSERVICESAPI_H__
-
-#include "osApi.h"
-
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Enums.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Typedefs.
- ***********************************************************************
- */
-
-
-
-/*
- ***********************************************************************
- *	Structure definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-/**
- * \author Yuval Adler\n
- * \date 6-Oct-2004\n
- * \brief Creates MacServices module
- *
- * Function Scope \e Public.\n
- * \param hOS - handle to the OS object.\n
- */
-TI_HANDLE MacServices_create( TI_HANDLE hOS );
-
-/**
- * \author Yuval Adler\n
- * \date 6-Oct-2004\n
- * \brief Destroys MacServices module
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- */
-void MacServices_destroy( TI_HANDLE hMacServices );
-
-/**
- * \author Yuval Adler\n
- * \date  6-Oct-2004\n
- * \brief Initializes the MacServices module
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the Mac Services object.\n
- * \param hReport - handle to the report object.\n
- * \param hTWD - handle to the HAL ctrl object.\n
- * \param hCmdBld - handle to the HAL ctrl object.\n
- * \param hEventMbpx - handle to the HAL ctrl object.\n
- */
-void MacServices_init (TI_HANDLE hMacServices, 
-                       TI_HANDLE hReport, 
-                       TI_HANDLE hTWD, 
-                       TI_HANDLE hCmdBld, 
-                       TI_HANDLE hEventMbox, 
-                       TI_HANDLE hTimer);
-void MacServices_config (TI_HANDLE hMacServices, TTwdInitParams *pInitParams);
-void MacServices_restart (TI_HANDLE hMacServices);
-
-void MacServices_registerFailureEventCB (TI_HANDLE hMacServices, void * failureEventCB, TI_HANDLE hFailureEventObj);
-
-
-/***********************************************************************
- *	Scan SRV API functions
- ***********************************************************************/
-
-
-/**
- * \author Ronen Kalish\n
- * \date 29-Dec-2004\n
- * \brief Registers a complete callback for scan complete notifications.
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \param scanCompleteCB - the complete callback function.\n
- * \param hScanCompleteObj - handle to the object passed to the scan complete callback function.\n
- */
-void MacServices_scanSRV_registerScanCompleteCB( TI_HANDLE hMacServices, 
-                                     TScanSrvCompleteCb scanCompleteCB, TI_HANDLE hScanCompleteObj );
-
-
-
-/**
- * \author Ronen Kalish\n
- * \date 29-Dec-2004\n
- * \brief Performs a scan
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \param scanParams - the scan specific parameters.\n
- * \param eScanTag - tag used for result and scan complete tracking
- * \param bHighPriority - whether to perform a high priority (overlaps DTIM) scan.\n
- * \param bDriverMode - whether to try to enter driver mode (with PS on) before issuing the scan command.\n
- * \param bScanOnDriverModeError - whether to proceed with the scan if requested to enter driver mode and failed.\n
- * \param bSendNullData - whether to send Null data when exiting driver mode on scan complete.\n
- * \param psRequest - Parameter sent to PowerSaveServer on PS request to indicate PS on or "keep current" 
- * \param commandResponseFunc - CB function which called after downloading the command. \n
- * \param commandResponseObj -  The CB function Obj (Notice : last 2 params are NULL in Legacy run). \n
-  * \return TI_OK if successful (various, TBD codes if not).\n
- */
-TI_STATUS MacServices_scanSRV_scan( TI_HANDLE hMacServices, TScanParams *scanParams, EScanResultTag eScanTag,
-                                    TI_BOOL bHighPriority, TI_BOOL bDriverMode, TI_BOOL bScanOnDriverModeError, 
-						E80211PsMode psRequest, TI_BOOL bSendNullData,
-						TCmdResponseCb commandResponseFunc, TI_HANDLE commandResponseObj );
-
-/**
- * \author Ronen Kalish\n
- * \date 29-Dec-2004\n
- * \brief Stops a scan in progress
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \param eScanTag - scan tag, used for scan complete and result tracking
- * \param bSendNullData - indicates whether to send Null data when exiting driver mode.\n
- * \param commandResponseFunc - CB function which called after downloading the command. \n
- * \param commandResponseObj -  The CB function Obj (Notice : last 2 params are NULL in Legacy run). \n
- * \return TI_OK if successful (various, TBD codes if not).\n
- */
-TI_STATUS MacServices_scanSRV_stopScan( TI_HANDLE hMacServices, EScanResultTag eScanTag, TI_BOOL bSendNullData,
-                                        TCmdResponseCb commandResponseFunc, TI_HANDLE commandResponseObj );
-
-/**
- * \author Ronen Kalish\n
- * \date 17-Jan-2005\n
- * \brief Notifies the scan SRV of a FW reset (that had originally been reported by a different module).\n
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \return TI_OK if successful (various, TBD codes if not).\n
- */
-TI_STATUS MacServices_scanSRV_stopOnFWReset( TI_HANDLE hMacServices );
-
-/**
- * \author Ronen Kalish\n
- * \date 29-Dec-2004\n
- * \brief callback function used by the power manager to notify driver mode result
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- * \param psStatus - the power save request status.\n
- */
-void MacServices_scanSRV_powerSaveCB( TI_HANDLE hScanSRV, TI_UINT8 PSMode,TI_UINT8 psStatus );
-
-/**
- * \author Ronen Kalish\n
- * \date 29-Dec-2004\n
- * \brief Callback function used by the HAL ctrl to notify scan complete
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- * \param str - pointer to scan result buffer (holding SPS status for SPS scan only!).\n
- * \param strLen - scan result buffer length (should ALWAYS be 2, even for non SPS scans).\n
- */
-void MacServices_scanSRV_scanCompleteCB( TI_HANDLE hScanSRV, char* str, TI_UINT32 strLen );
-
-/**
- * \author Ronen Kalish\n
- * \date 29-Dec-2004\n
- * \brief called when a scan timer expires. Completes the scan and starts a recovery process.
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- */
-void MacServices_scanSRV_scanTimerExpired (TI_HANDLE hScanSRV, TI_BOOL bTwdInitOccured);
-
-void MacServices_scanSrv_UpdateDtimTbtt (TI_HANDLE hMacServices, 
-                                         TI_UINT8  uDtimPeriod, 
-                                         TI_UINT16 uBeaconInterval);
-
-#ifdef TI_DBG
-/**
- * \author Shirit Brook\n
- * \date God knows when...\n
- * \brief Prints Scan Server SM status.\n
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the Mac Services object.\n
- */
-void MacServices_scanSrv_printDebugStatus(TI_HANDLE hMacServices);
-#endif
-
-/*Power server API*/
-
-
-/**
-  * \author Assaf Azulay
- * \date 24-Oct-2005\n
- * \brief request PS by User
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) hPowerSrv 						- handle to the PowerSrv object.\n		
- * 2) psMode							- Power save/Active request.\n
- * 3) sendNullDataOnExit				- \n
- * 4) powerSaveCompleteCBObject		- handle to the Callback functin module.\n
- * 5) powerSaveCompleteCB				- Calback function - for success/faild notification.\n
- * 6) powerSavecmdResponseCB			- Calback function - for GWSI success/faild notification.\n
- * Return Value: TI_STATUS - TI_OK / PENDING / TI_NOK.\n
- * \b Description:\n
- * This function is a user mode request from the Power Save Server./n
- * it will create a Request from typ "USER_REQUEST" and will try to perform the user request for PS/Active./n
- * this will be done in respect of priority to Driver request./n
- */
-TI_STATUS MacServices_powerSrv_SetPsMode(TI_HANDLE 	                hMacServices,
-                                		 E80211PsMode	            psMode,
- 									     TI_BOOL  						sendNullDataOnExit,
- 						        		 void * 					powerSaveCompleteCBObject,
- 						        		 TPowerSaveCompleteCb  		powerSaveCompleteCB,
- 						        		 TPowerSaveResponseCb	    powerSavecmdResponseCB);
-
-
-/**
-  * \author Assaf Azulay
- * \date 24-Oct-2005\n
- * \brief SW configure, use to override the current PowerMode (what ever it will be) to
- *        active/PS combined with awake/power-down. use for temporary change the system policy.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the powerSrv object.\n
- * 2) powerSrv_RequestFor_802_11_PS_e - the driver mode obliged to be in 802.11 PS or not change.\n
- * 3) PowerCtrl_PowerLevel_e - the desired driver power level (allowed: AWAKE or POWER DOWN).\n
- * 4) TI_HANDLE theObjectHandle - the handle the object that need the PS success/fail notification.\n
- * 5) ps802_11_NotificationCB_t - the callback function.\n
- * 6) char* - the clinet name that ask for driver mode.\n
- * Return Value: TI_STATUS - if success (already in power save) then TI_OK,\n
- *                           if pend (wait to ACK form AP for the null data frame) then PENDING\n
- *                           if PS isn't enabled then POWER_SAVE_802_11_NOT_ALLOWED\n
- *                           else TI_NOK.\n
- * \b Description:\n
- * enter in to configuration of the driver that in higher priority from the user.\n
- * the configuration is:\n
- *  - to enter to802.11 PS or not (if not this isn't a request to get out from 802.11 PS).\n
- *  - to change the HW power level to awake or power-down if not already there.
- *    this is a must request.\n
-*/
-TI_STATUS MacServices_powerSrv_ReservePS(	TI_HANDLE 	                hMacServices,
-                                            E80211PsMode 	            psMode,
-                                            TI_BOOL  						sendNullDataOnExit,
-                                            void * 						powerSaveCBObject,
-                                            TPowerSaveCompleteCb 		powerSaveCompleteCB);
-
-
-/**
- * \author Assaf Azulay
- * \date 24-Oct-2005\n
- * \brief end the temporary change of system policy, and returns to the user system policy.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the powerSrv object.\n
- * 2) char* - the clinet name that ask for driver mode.\n
- * Return Value: TI_STATUS - TI_OK on success else TI_NOK.\n
- * \b Description:\n
- * enter in to configuration of the driver that in higher priority from the user.\n
- * the configuration is:\n
- * end the user mode configuration (driver mode priority) and returns the user configuration
- * (user mode priority).
-*/
-TI_STATUS MacServices_powerSrv_ReleasePS( 	TI_HANDLE 	hMacServices,
-									TI_BOOL  						sendNullDataOnExit,
- 						 			void *  						powerSaveCBObject,
- 									TPowerSaveCompleteCb  			powerSaveCompleteCB);
-
-
-/**
- * \author Assaf Azulay
- * \date 24-Oct-2005\n
- * \brief reflects the actual state of the state machine
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the powerSrv object.\n
- * Return Value:\n 
- * TI_BOOL - thre is in PS false otherwise.\n
-*/
-TI_BOOL MacServices_powerSrv_getPsStatus(TI_HANDLE hMacServices);
-
-
-/**
- * \author Assaf Azulay
- * \date 24-Oct-2005\n
- * \sets the rate as got from user else sets default value.\n
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE 	- handle to the powerSrv object.\n
- * 2) TI_UINT16		- desierd rate .\n
- * Return Value:\n 
- * void.\n
-*/
-void MacServices_powerSrv_SetRateModulation(TI_HANDLE hMacServices, TI_UINT16  rate);
-/**
- * \Return the alrweady seted rate.\n
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * TI_HANDLE 	- handle to the powerSrv object.\n
- * Return Value: TI_UINT16		- desierd rate .\n
- * void.\n
-*/
-TI_UINT32 MacServices_powerSrv_GetRateModulation(TI_HANDLE hMacServices);
-
-
-
-
-/***********************************************************************
- *	Measurement SRV API functions
- ***********************************************************************/
-
-/**
- * \author Ronen Kalish\n
- * \date 09-November-2005\n
- * \brief Starts a measurement operation.\n
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \param pMsrRequest - a structure containing measurement parameters.\n
- * \param timeToRequestExpiryMs - the time (in milliseconds) the measurement SRV has to start the request.\n
- * \param cmdResponseCBFunc - callback function to used for command response.\n
- * \param cmdResponseCBObj - handle to pass to command response CB.\n
- * \param cmdCompleteCBFunc - callback function to be used for command complete.\n
- * \param cmdCompleteCBObj - handle to pass to command complete CB.\n
- * \return TI_OK if successful (various, TBD codes if not).\n
- */ 
-TI_STATUS MacServices_measurementSRV_startMeasurement( TI_HANDLE hMacServices, 
-                                                       TMeasurementRequest* pMsrRequest,
-													   TI_UINT32 timeToRequestExpiryMs,
-                                                       TCmdResponseCb cmdResponseCBFunc,
-                                                       TI_HANDLE cmdResponseCBObj,
-                                                       TMeasurementSrvCompleteCb cmdCompleteCBFunc,
-                                                       TI_HANDLE cmdCompleteCBObj );
-
-/**
- * \author Ronen Kalish\n
- * \date 09-November-2005\n
- * \brief Stops a measurement operation in progress.\n
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \param bSendNullData - whether to send NULL data when exiting driver mode.\n
- * \param cmdResponseCBFunc - callback function to used for command response.\n
- * \param cmdResponseCBObj - handle to pass to command response CB.\n
- * \return TI_OK if successful (various, TBD codes if not).\n
- */
-TI_STATUS MacServices_measurementSRV_stopMeasurement( TI_HANDLE hMacServices,
-													  TI_BOOL bSendNullData,
-                                                      TCmdResponseCb cmdResponseCBFunc,
-                                                      TI_HANDLE cmdResponseCBObj );
-
-/**
- * \author Ronen Kalish\n
- * \date 09-November-2005\n
- * \brief Notifies the measurement SRV of a FW reset (recovery).\n
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- */
-void MacServices_measurementSRV_FWReset( TI_HANDLE hMacServices );
-
-/** 
- * \author Ronen Kalish\n
- * \date 09-November-2005\n
- * \brief callback function used by the power manager to notify driver mode result
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param PSMode - the power save mode the STA is currently in.\n
- * \param psStatus - the power save request status.\n
- */
-void MacServices_measurementSRV_powerSaveCB( TI_HANDLE hMeasurementSRV, TI_UINT8 PSMode,TI_UINT8 psStatus );
-
-/** 
- * \author Ronen Kalish\n
- * \date 14-November-2005\n
- * \brief callback function used by the HAL for measure start event (sent when the FW 
- * has started measurement operation, i.e. switched channel and changed RX filters).\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- */
-void MacServices_measurementSRV_measureStartCB( TI_HANDLE hMeasurementSRV );
-
-/** 
- * \author Ronen Kalish\n
- * \date 14-November-2005\n
- * \brief callback function used by the HAL for measure stop event (sent when the FW 
- * has finished measurement operation, i.e. switched channel to serving channel and changed back RX filters).\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- */
-void MacServices_measurementSRV_measureCompleteCB( TI_HANDLE hMeasurementSRV );
-
-/** 
- * \author Ronen Kalish\n
- * \date 14-November-2005\n
- * \brief callback function used by the HAL for AP discovery stop event (sent when the FW 
- * has finished AP discovery operation).\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- */
-void MacServices_measurementSRV_apDiscoveryCompleteCB( TI_HANDLE hMeasurementSRV );
-
-/** 
- * \author Ronen Kalish\n
- * \date 16-November-2005\n
- * \brief Callback for channel load get param call.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param status - the get_param call status.\n
- * \param CB_buf - pointer to the results buffer (already on the measurement SRV object)
- */
-void MacServices_measurementSRV_channelLoadParamCB( TI_HANDLE hMeasurementSRV, TI_STATUS status, TI_UINT8* CB_buf );
-
-/** 
- * \date 03-January-2005\n
- * \brief Dummy callback for channel load get param call. Used to clear the channel load tracker.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param status - the get_param call status.\n
- * \param CB_buf - pointer to the results buffer (already on the measurement SRV object)
- */
-void MacServices_measurementSRV_dummyChannelLoadParamCB( TI_HANDLE hMeasurementSRV, TI_STATUS status, TI_UINT8* CB_buf );
-
-/** 
- * \author Ronen Kalish\n
- * \date 16-November-2005\n
- * \brief Callback for noise histogram get param call.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param status - the get_param call status.\n
- * \param CB_buf - pointer to the results buffer (already on the measurement SRV object)
- */
-void MacServices_measurementSRV_noiseHistCallBack(TI_HANDLE hMeasurementSRV, TI_STATUS status, TI_UINT8* CB_buf);
-
-/**
- * \author Ronen Kalish\n
- * \date 14-November-2005\n
- * \brief called when a measurement FW guard timer expires.
- *
- * Function Scope \e Public.\n
- * \param hMeasuremntSRV - handle to the measurement SRV object.\n
- */
-void MacServices_measurementSRV_startStopTimerExpired (TI_HANDLE hMeasurementSRV, TI_BOOL bTwdInitOccured);
-
-/**
- * \author Ronen Kalish\n
- * \date 15-November-2005\n
- * \brief called when a measurement type timer expires.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasuremntSRV - handle to the measurement SRV object.\n
- */
-void MacServices_measurementSRV_requestTimerExpired (TI_HANDLE hMeasurementSRV, TI_BOOL bTwdInitOccured);
-
-#endif /* __MACSERVICESAPI_H__ */
diff --git a/wl1271/TWD/MacServices/Export_Inc/measurementSrvDbgPrint.h b/wl1271/TWD/MacServices/Export_Inc/measurementSrvDbgPrint.h
deleted file mode 100644
index d76f4da..0000000
--- a/wl1271/TWD/MacServices/Export_Inc/measurementSrvDbgPrint.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * measurementSrvDbgPrint.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file MeasurementSrv.h
- *  \brief This file include definitions for the measurmeent SRV module debug print functions.
- *  \author Ronen Kalish
- *  \date 23-december-2005
- */
-
-#ifndef __MEASUREMENT_SRV__SBG_PRINT_H__
-#define __MEASUREMENT_SRV__SBG_PRINT_H__
-
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Enums.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Structure definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-/** 
- * \author Ronen Kalish\n
- * \date 23-December-2005\n
- * \brief Prints a measurement request.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param pMsrRequest - the measurement request.\n
- */
-void measurementSRVPrintRequest( TI_HANDLE hMeasurementSRV, TMeasurementRequest *pMsrRequest );
-
-/** 
- * \author Ronen Kalish\n
- * \date 23-December-2005\n
- * \brief Prints a measurement type request.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param pMsrTypeRequest - the measurement type request.\n
- */
-void measurementSRVPrintTypeRequest( TI_HANDLE hMeasurementSRV, TMeasurementTypeRequest* pMsrTypeRequest );
-
-#endif /* __MEASUREMENT_SRV__SBG_PRINT_H__ */
-
diff --git a/wl1271/TWD/MacServices/MacServices.c b/wl1271/TWD/MacServices/MacServices.c
deleted file mode 100644
index 697be33..0000000
--- a/wl1271/TWD/MacServices/MacServices.c
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- * MacServices.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file MacServices.c
- *  \brief This file include public definitions for the scan SRV module, comprising its API.
- *  \author Yuval Adler
- *  \date 6-Oct-2005
- */
-
-#define __FILE_ID__  FILE_ID_109
-#include "report.h"
-#include "ScanSrv.h"
-#include "MeasurementSrv.h"
-#include "MacServices.h"
-#include "PowerSrv_API.h"
-
-
-/****************************************************************************************
- *                        MacServices_create                                                     *
- *****************************************************************************************
-DESCRIPTION: Creates MacServices module
-                                                                                                                               
-INPUT:          hOS - handle to the OS object.
-OUTPUT:     
-RETURN:     handle to MacServices Object, NULL on failure .
-****************************************************************************************/
-
-TI_HANDLE MacServices_create( TI_HANDLE hOS) 
-{
-    MacServices_t *pMacServices = (MacServices_t*)os_memoryAlloc( hOS, sizeof(MacServices_t) );
-    if ( NULL == pMacServices )
-    {
-        WLAN_OS_REPORT( ("ERROR: Failed to create Mac SRV module") );
-        return NULL;
-    }
-
-    /* nullify all handles, so that only handles in existence will be released */
-    pMacServices->hScanSRV = NULL;
-    pMacServices->hPowerSrv = NULL;
- 
-    /* create the scanSRV handle */ 
-    pMacServices->hScanSRV = MacServices_scanSRV_create(hOS);
-    if ( NULL == pMacServices->hScanSRV )
-    {
-        MacServices_destroy( pMacServices );
-        return NULL;
-    }
-
-/* create the measurment handle */
-    pMacServices->hMeasurementSRV = MacServices_measurementSRV_create( hOS );
-    if ( NULL == pMacServices->hMeasurementSRV )
-    {
-            MacServices_destroy(pMacServices);
-        return NULL;
-    }
-
-    pMacServices->hPowerSrv = powerSrv_create(hOS);
-    if (NULL == pMacServices->hPowerSrv  )
-    {
-        MacServices_destroy(pMacServices);
-        return NULL;
-     }
-
-    /* store OS handle */
-    pMacServices->hOS      = hOS;
-
-    return pMacServices;
-}
-
-
- 
-/****************************************************************************************
- *                        MacServices_destroy                                                    *
- *****************************************************************************************
-DESCRIPTION: destroys MacServices module
-                                                                                                                               
-INPUT:          hMacServices - handle to the Mac Services object.
-OUTPUT:     
-RETURN:     
-****************************************************************************************/
-void MacServices_destroy( TI_HANDLE hMacServices ) 
-{
-    MacServices_t *pMacServices = (MacServices_t*)hMacServices;
-    
-    /* destroy all SRV modules */
-    if ( NULL != pMacServices->hScanSRV )
-    {
-        MacServices_scanSRV_destroy( pMacServices->hScanSRV );
-    }
-    if ( NULL != pMacServices->hMeasurementSRV )
-    {
-        MacServices_measurementSRV_destroy( pMacServices->hMeasurementSRV );
-    }
-
-    if(pMacServices->hPowerSrv)
-    powerSrv_destroy(pMacServices->hPowerSrv);
-
-    /* free the Mac services allocated context */
-    os_memoryFree( pMacServices->hOS, (TI_HANDLE)pMacServices , sizeof(MacServices_t) );
-}
-
-
- /****************************************************************************************
- *                        MacServices_init                                                   *
- *****************************************************************************************
-DESCRIPTION: Initializes the MacServices module
-                                                                                                                               
-INPUT:    hMacServices - handle to the Mac Services object.\n   
-        hReport - handle to the report object.\n
-        hHalCtrl - handle to the HAL ctrl object.\n
-OUTPUT:     
-RETURN:     
-****************************************************************************************/
-void MacServices_init (TI_HANDLE hMacServices, 
-                       TI_HANDLE hReport, 
-                       TI_HANDLE hTWD, 
-                       TI_HANDLE hCmdBld, 
-                       TI_HANDLE hEventMbox, 
-                       TI_HANDLE hTimer) 
-{
-    MacServices_t *pMacServices = (MacServices_t*)hMacServices;
-
-    MacServices_scanSRV_init (hMacServices, hReport, hTWD, hTimer, hEventMbox, hCmdBld);
-
-    MacServices_measurementSRV_init (pMacServices->hMeasurementSRV, 
-                                     hReport, 
-                                     hCmdBld, 
-                                     hEventMbox, 
-                                     pMacServices->hPowerSrv,
-                                     hTimer);
-    
-    if (powerSrv_init (pMacServices->hPowerSrv, 
-                       hReport, 
-                       hEventMbox, 
-                       hCmdBld,
-                       hTimer) != TI_OK)
-    {
-        WLAN_OS_REPORT(("\n.....PowerSRV_init configuration failure \n"));
-        /*return TI_NOK;*/
-    }
-}
-
-
- /****************************************************************************************
- *                        MacServices_config                                                     *
- *****************************************************************************************
-DESCRIPTION: config the MacServices moduleand sub modules
-                                                                                                                               
-INPUT:    hMacServices - handle to the Mac Services object.\n   
-        pInitParams  - pointer to the init params
-OUTPUT:     
-RETURN:     
-****************************************************************************************/
-void MacServices_config( TI_HANDLE hMacServices, TTwdInitParams *pInitParams) 
-{
-    MacServices_t *pMacServices = (MacServices_t*)hMacServices;
-
-    if (powerSrv_config(pMacServices->hPowerSrv,&pInitParams->tPowerSrv) != TI_OK)
-    {
-        WLAN_OS_REPORT(("\n.....PowerSRV_config failure \n"));
-    }
-
-    MacServices_scanSrv_config (pMacServices, &pInitParams->tScanSrv);
-}
-
- /****************************************************************************************
- *                        MacServices_restart                                                     *
- *****************************************************************************************
-DESCRIPTION: restart the MacServices moduleand sub modules upon recovery
-                                                                                                                               
-INPUT:    hMacServices - handle to the Mac Services object.\n   
-OUTPUT:     
-RETURN:     
-****************************************************************************************/
-void MacServices_restart (TI_HANDLE hMacServices) 
-{
-    MacServices_t *pMacServices = (MacServices_t*)hMacServices;
-
-    scanSRV_restart (pMacServices->hScanSRV);
-    measurementSRV_restart (pMacServices->hMeasurementSRV);
-    powerSrv_restart (pMacServices->hPowerSrv);
-}
-
-
-/****************************************************************************************
- *                        MacServices_registerFailureEventCB                                                     *
- *****************************************************************************************
-DESCRIPTION: register the centeral error function from the health monitor to the MacService's sub modules
-                                                                                                                               
-INPUT:    hMacServices      - handle to the Mac Services object.    
-        failureEventCB  - pointer ro the call back
-        hFailureEventObj    -handle of the Callback Object
-OUTPUT:     
-RETURN:     
-****************************************************************************************/
-
-void MacServices_registerFailureEventCB (TI_HANDLE hMacServices, 
-                                         void * failureEventCB, 
-                                         TI_HANDLE hFailureEventObj)
-{
-    MacServices_t *pMacServices = (MacServices_t*)hMacServices;
-
-    powerSrvRegisterFailureEventCB (pMacServices->hPowerSrv,
-                                    failureEventCB,
-                                    hFailureEventObj);
-
-    measurementSRVRegisterFailureEventCB (pMacServices->hMeasurementSRV,
-                                          failureEventCB,
-                                          hFailureEventObj);
-
-    scanSRV_registerFailureEventCB (pMacServices->hScanSRV,
-                                    failureEventCB,
-                                    hFailureEventObj);
-
-}
-
-/****************************************************************************************
- *                        MacServices_powerSrv_SetPsMode                                                            *
- ****************************************************************************************
-DESCRIPTION: This function is a wrapper for the power server's powerSrv_SetPsMode function
-                                                                                                                   
-INPUT:      - hMacServices          - handle to the Mac services object.        
-            - psMode                    - Power save/Active request
-            - sendNullDataOnExit        - 
-            - powerSaveCBObject     - handle to the Callback function module.
-            - powerSaveCompleteCB   - Callback function - for success/faild notification.
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK / PENDING / TI_NOK.
-****************************************************************************************/
-
-TI_STATUS MacServices_powerSrv_SetPsMode (TI_HANDLE                   hMacServices,
-                                          E80211PsMode                psMode,
-                                          TI_BOOL                        sendNullDataOnExit,
-                                          void *                      powerSaveCompleteCBObject,
-                                          TPowerSaveCompleteCb        powerSaveCompleteCB,
-                                          TPowerSaveResponseCb        powerSavecmdResponseCB)
-{
-    MacServices_t *pMacServices = (MacServices_t*)hMacServices;
-
-    return powerSrv_SetPsMode (pMacServices->hPowerSrv,
-                               psMode,
-                               sendNullDataOnExit,
-                               powerSaveCompleteCBObject,
-                               powerSaveCompleteCB,
-                               powerSavecmdResponseCB);
-}
-
-
-/****************************************************************************************
- *                        MacServices_powerSrv_ReservePS                                                        *
- ****************************************************************************************
-DESCRIPTION: This function is a wrapper for the power server's powerSrv_ReservePS function
-                                                                                                                   
-INPUT:      - hMacServices                  - handle to the Mac services object.        
-            - psMode                            - Power save/Active request
-            - sendNullDataOnExit                - 
-            - powerSaveCBObject             - handle to the Callback function module.
-            - powerSaveCompleteCB           - Callback function - for success/faild notification.
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK / PENDING / TI_NOK.
-****************************************************************************************/
-TI_STATUS MacServices_powerSrv_ReservePS(   TI_HANDLE               hMacServices,
-                                            E80211PsMode psMode,
-                                            TI_BOOL                    sendNullDataOnExit,
-                                            void *                  powerSaveCBObject,
-                                            TPowerSaveCompleteCb    powerSaveCompleteCB)
-{
-    MacServices_t *pMacServices = (MacServices_t*)hMacServices;
-
-    return powerSrv_ReservePS(pMacServices->hPowerSrv,psMode,sendNullDataOnExit,powerSaveCBObject,powerSaveCompleteCB);
-}
-
-
-/****************************************************************************************
- *                        MacServices_powerSrv_ReleasePS                                                        *
- ****************************************************************************************
-DESCRIPTION: This function is a wrapper for the power server's powerSrv_ReleasePS function
-                                                                                                                   
-INPUT:      - hPowerSrv                         - handle to the PowerSrv object.        
-            - sendNullDataOnExit                - 
-            - powerSaveCBObject     - handle to the Callback function module.
-            - powerSaveCompleteCB           - Callback function - for success/faild notification.
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK / PENDING / TI_NOK.
-****************************************************************************************/
-
-TI_STATUS MacServices_powerSrv_ReleasePS(   TI_HANDLE                   hMacServices,
-                                    TI_BOOL                        sendNullDataOnExit,
-                                    void *                          powerSaveCBObject,
-                                    TPowerSaveCompleteCb              powerSaveCompleteCB)
-{
-    MacServices_t *pMacServices = (MacServices_t*)hMacServices;
-
-    return powerSrv_ReleasePS(pMacServices->hPowerSrv,sendNullDataOnExit,powerSaveCBObject,powerSaveCompleteCB);
-}
-
-
-/****************************************************************************************
- *                        MacServices_powerSrv_getPsStatus                                                       *
- *****************************************************************************************
-DESCRIPTION: This function is a wrapper for the power server's powerSrv_getPsStatus function
-                                                                                                                                                                       
-INPUT:      - hPowerSrv                         - handle to the PowerSrv object.        
-            
-OUTPUT: 
-RETURN:    TI_BOOL - true if the SM is in PS state -  false otherwise
-****************************************************************************************/
-TI_BOOL MacServices_powerSrv_getPsStatus(TI_HANDLE hMacServices)
-{
-    MacServices_t *pMacServices = (MacServices_t*)hMacServices;
-
-    return powerSrv_getPsStatus( pMacServices->hPowerSrv);
-}
-
-
- /****************************************************************************************
- *                        MacServices_powerSrv_SetRateModulation                                                         *
- *****************************************************************************************
-DESCRIPTION: This function is a wrapper for the power server's powerSrv_SetRateModulation function
-                                                                                                                                                                       
-INPUT:      - hPowerSrv                         - handle to the PowerSrv object.
-            - dot11mode_e - The current radio mode (A or G)
-            
-OUTPUT: 
-RETURN:    TI_BOOL - true if the SM is in PS state -  false otherwise
-****************************************************************************************/
-void MacServices_powerSrv_SetRateModulation(TI_HANDLE hMacServices, TI_UINT16  rate)
-{
-    MacServices_t *pMacServices = (MacServices_t*)hMacServices;
-
-    powerSrv_SetRateModulation( pMacServices->hPowerSrv,   rate);
-}
-
-
-TI_UINT32 MacServices_powerSrv_GetRateModulation(TI_HANDLE hMacServices)
-{
-    MacServices_t *pMacServices = (MacServices_t*)hMacServices;
-
-    return powerSrv_GetRateModulation( pMacServices->hPowerSrv);
-}
-
-
-
-
-
-
diff --git a/wl1271/TWD/MacServices/MacServices.h b/wl1271/TWD/MacServices/MacServices.h
deleted file mode 100644
index a92551c..0000000
--- a/wl1271/TWD/MacServices/MacServices.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * MacServices.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file MacServices.h
- *  \brief This file include internal definitions for the MacServices module
- *  \author Yuval Adler
- *  \date 6-Oct-2005
- */
-
-
-#ifndef __MACSERVICES_H__
-#define __MACSERVICES_H__
-
-typedef struct 
-{
-	TI_HANDLE hOS;
-	TI_HANDLE hScanSRV;
-    TI_HANDLE hMeasurementSRV;
-	TI_HANDLE hPowerSrv;
-} MacServices_t ;
-
-#endif /* __MACSERVICES_H__ */
diff --git a/wl1271/TWD/MacServices/MeasurementSrv.c b/wl1271/TWD/MacServices/MeasurementSrv.c
deleted file mode 100644
index d780a79..0000000
--- a/wl1271/TWD/MacServices/MeasurementSrv.c
+++ /dev/null
@@ -1,1080 +0,0 @@
-/*
- * MeasurementSrv.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file measurementSrv.c
- *  \brief This file include the measurement SRV interface functions implementation.
- *  \author Ronen Kalish
- *  \date 09-November-2005
- */
-
-#define __FILE_ID__  FILE_ID_110
-#include "tidef.h"
-#include "MeasurementSrv.h"
-#include "MeasurementSrvSM.h"
-#include "report.h"
-#include "timer.h"
-#include "osApi.h"
-#include "MacServices.h"
-#include "measurementSrvDbgPrint.h"
-#include "eventMbox_api.h"
-#include "CmdBld.h"
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Creates the measurement SRV object
- *
- * Function Scope \e Public.\n
- * \param hOS - handle to the OS object.\n
- * \return a handle to the measurement SRV object, NULL if an error occurred.\n
- */
-TI_HANDLE MacServices_measurementSRV_create( TI_HANDLE hOS )
-{
-    measurementSRV_t* pMeasurementSRV;
-
-    /* allocate the measurement SRV object */
-    pMeasurementSRV = os_memoryAlloc( hOS, sizeof(measurementSRV_t));
-    if ( NULL == pMeasurementSRV )
-    {
-        WLAN_OS_REPORT( ("ERROR: Failed to create measurement SRV object."));
-        return NULL;
-    }
-    
-    /* nullify the object */
-    os_memoryZero( hOS, pMeasurementSRV, sizeof(measurementSRV_t));
-
-    /* store OS handle */
-    pMeasurementSRV->hOS = hOS;
-
-    /* allocate the SM */
-    if ( TI_OK != fsm_Create( hOS, &(pMeasurementSRV->SM), MSR_SRV_NUM_OF_STATES, MSR_SRV_NUM_OF_EVENTS ))
-    {
-        pMeasurementSRV->SM = NULL;
-        WLAN_OS_REPORT(("Failed to create measurement SRV state machine.\n"));
-        MacServices_measurementSRV_destroy( pMeasurementSRV );
-        return NULL;
-    }
-
-    return (TI_HANDLE)pMeasurementSRV;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Initializes the measurement SRV object
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param hReport - handle to the report object.\n
- * \param hCmdBld - handle to the Command Builder object.\n
- * \param hPowerSaveSRV - handle to the power save SRV object.\n
- */
-TI_STATUS MacServices_measurementSRV_init (TI_HANDLE hMeasurementSRV, 
-                                           TI_HANDLE hReport, 
-                                           TI_HANDLE hCmdBld,
-                                           TI_HANDLE hEventMbox,
-                                           TI_HANDLE hPowerSaveSRV,
-                                           TI_HANDLE hTimer)
-{ 
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-	TI_INT32 i;
-
-    /* store handles */
-    pMeasurementSRV->hReport = hReport;
-    pMeasurementSRV->hCmdBld = hCmdBld;
-    pMeasurementSRV->hEventMbox = hEventMbox;
-    pMeasurementSRV->hPowerSaveSRV = hPowerSaveSRV;
-    pMeasurementSRV->hTimer = hTimer;
-
-    /* Initialize the state machine */
-    measurementSRVSM_init (hMeasurementSRV);
-
-    /* allocate the module timers */
-    pMeasurementSRV->hStartStopTimer = tmr_CreateTimer (pMeasurementSRV->hTimer);
-	if (pMeasurementSRV->hStartStopTimer == NULL)
-	{
-        TRACE0(pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, "MacServices_measurementSRV_init(): Failed to create hStartStopTimer!\n");
-		return TI_NOK;
-	}
-    pMeasurementSRV->bStartStopTimerRunning = TI_FALSE;
-
-    for (i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++)
-    {
-        pMeasurementSRV->hRequestTimer[i] = tmr_CreateTimer (pMeasurementSRV->hTimer);
-        if (pMeasurementSRV->hRequestTimer[i] == NULL)
-        {
-            TRACE0(pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, "MacServices_measurementSRV_init(): Failed to create hRequestTimer!\n");
-            return TI_NOK;
-        }
-        pMeasurementSRV->bRequestTimerRunning[i] = TI_FALSE;
-    }
-
-    /* register HAL callbacks */
-    /* Register and Enable the Measure Start event in HAL */
-
-
-	eventMbox_RegisterEvent (pMeasurementSRV->hEventMbox, 
-                             TWD_OWN_EVENT_MEASUREMENT_START,
-                             (void *)MacServices_measurementSRV_measureStartCB, 
-                             hMeasurementSRV);
-    eventMbox_UnMaskEvent (pMeasurementSRV->hEventMbox, TWD_OWN_EVENT_MEASUREMENT_START, NULL, NULL);
-
-    /* Register and Enable the Measurement Complete event in HAL.
-    This event will be received when the Measurement duration expired,
-    or after Stop Measure command. */
-
-	eventMbox_RegisterEvent (pMeasurementSRV->hEventMbox,
-                             TWD_OWN_EVENT_MEASUREMENT_COMPLETE,
-                             (void *)MacServices_measurementSRV_measureCompleteCB,
-                             hMeasurementSRV);
-    eventMbox_UnMaskEvent (pMeasurementSRV->hEventMbox, TWD_OWN_EVENT_MEASUREMENT_COMPLETE, NULL, NULL);
-
-	/* Register and Enable the AP Discovery Complete event in HAL */
-    eventMbox_RegisterEvent (pMeasurementSRV->hEventMbox, 
-                             TWD_OWN_EVENT_AP_DISCOVERY_COMPLETE, 
-                             (void *)MacServices_measurementSRV_apDiscoveryCompleteCB, 
-                             hMeasurementSRV);
-    eventMbox_UnMaskEvent (pMeasurementSRV->hEventMbox, TWD_OWN_EVENT_AP_DISCOVERY_COMPLETE, NULL, NULL);
-
-    TRACE0(hReport, REPORT_SEVERITY_INIT , ".....Measurement SRV configured successfully.\n");
-
-    return TI_OK;
-}
-
-/**
- * \brief Restart the measurement SRV object upon recovery.
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- */
-void measurementSRV_restart( TI_HANDLE hMeasurementSRV)
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-	TI_INT32 i;
-
-	/* if a timer is running, stop it */
-	if (pMeasurementSRV->bStartStopTimerRunning)
-	{
-		tmr_StopTimer (pMeasurementSRV->hStartStopTimer);
-		pMeasurementSRV->bStartStopTimerRunning = TI_FALSE;
-	}
-	for (i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++)
-	{
-		if (pMeasurementSRV->bRequestTimerRunning[i])
-		{
-			tmr_StopTimer (pMeasurementSRV->hRequestTimer[i]);
-			pMeasurementSRV->bRequestTimerRunning[i] = TI_FALSE;
-		}
-	}
-
-
-    /* Initialize the state machine */
-	/* initialize current state */
-	pMeasurementSRV->SMState = MSR_SRV_STATE_IDLE;
-
-    /* mark that all timers are not running */
-    pMeasurementSRV->bStartStopTimerRunning = TI_FALSE;
-    for ( i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++ )
-    {
-        pMeasurementSRV->bRequestTimerRunning[ i ] = TI_FALSE;
-    }
-
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Destroys the measurement SRV object
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- */
-void MacServices_measurementSRV_destroy( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-    TI_INT32 i;
-
-    /* sanity cehcking */
-    if ( NULL == hMeasurementSRV )
-    {
-        return;
-    }
-
-    /* release state machine */
-    if ( NULL != pMeasurementSRV->SM )
-    {
-        fsm_Unload( pMeasurementSRV->hOS, pMeasurementSRV->SM );
-    }
-
-    /* release timers */
-    for ( i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++ )
-    {
-        if (pMeasurementSRV->hRequestTimer[i])
-        {
-            tmr_DestroyTimer (pMeasurementSRV->hRequestTimer[i]);
-        }
-    }
-    if (pMeasurementSRV->hStartStopTimer)
-    {
-        tmr_DestroyTimer (pMeasurementSRV->hStartStopTimer);
-    }
-
-    /* release object space */
-    os_memoryFree( pMeasurementSRV->hOS, (TI_HANDLE)pMeasurementSRV, sizeof(measurementSRV_t));
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 09-November-2005\n
- * \brief Starts a measurement operation.\n
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \param pMsrRequest - a structure containing measurement parameters.\n
- * \param timeToRequestexpiryMs - the time (in milliseconds) the measurement SRV has to start the request.\n
- * \param cmdResponseCBFunc - callback function to used for command response.\n
- * \param cmdResponseCBObj - handle to pass to command response CB.\n
- * \param cmdCompleteCBFunc - callback function to be used for command complete.\n
- * \param cmdCompleteCBObj - handle to pass to command complete CB.\n
- * \return TI_OK if successful (various, TBD codes if not).\n
- */ 
-TI_STATUS MacServices_measurementSRV_startMeasurement( TI_HANDLE hMacServices, 
-                                                       TMeasurementRequest* pMsrRequest,
-													   TI_UINT32 timeToRequestExpiryMs,
-                                                       TCmdResponseCb cmdResponseCBFunc,
-                                                       TI_HANDLE cmdResponseCBObj,
-                                                       TMeasurementSrvCompleteCb cmdCompleteCBFunc,
-                                                       TI_HANDLE cmdCompleteCBObj )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)((MacServices_t*)hMacServices)->hMeasurementSRV;
-	TI_INT32 i;
-
-#ifdef TI_DBG
-TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Received measurement request.\n");
-	measurementSRVPrintRequest( (TI_HANDLE)pMeasurementSRV, pMsrRequest );
-TRACE3( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "time to expiry: %d ms, cmd response CB: 0x%x, cmd response handle: 0x%x\n",							  timeToRequestExpiryMs,							  cmdResponseCBFunc,							  cmdResponseCBObj);
-TRACE2( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "cmd complete CB: 0x%x, cmd complete handle: 0x%x\n",							  cmdCompleteCBFunc,							  cmdCompleteCBObj);
-#endif
-
-	/* mark that request is in progress */
-    pMeasurementSRV->bInRequest = TI_TRUE;
-
-	/* mark to send NULL data when exiting driver mode (can be changed to TI_FALSE
-	   only when explictly stopping the measurement */
-	pMeasurementSRV->bSendNullDataWhenExitPs = TI_TRUE;
-
-    /* Nullify return status */
-    pMeasurementSRV->returnStatus = TI_OK;
-
-    /* copy request parameters */
-    os_memoryCopy (pMeasurementSRV->hOS, 
-                   (void *)&pMeasurementSRV->msrRequest, 
-                   (void *)pMsrRequest, 
-                   sizeof(TMeasurementRequest));
-
-	/* Mark the current time stamp and the duration to start to cehck expiry later */
-	pMeasurementSRV->requestRecptionTimeStampMs = os_timeStampMs( pMeasurementSRV->hOS );
-	pMeasurementSRV->timeToRequestExpiryMs = timeToRequestExpiryMs;
-
-	/* copy callbacks */
-    pMeasurementSRV->commandResponseCBFunc = cmdResponseCBFunc;
-    pMeasurementSRV->commandResponseCBObj = cmdResponseCBObj;
-    pMeasurementSRV->measurmentCompleteCBFunc = cmdCompleteCBFunc;
-    pMeasurementSRV->measurementCompleteCBObj = cmdCompleteCBObj;
-
-	/* initialize reply */
-	pMeasurementSRV->msrReply.numberOfTypes = pMsrRequest->numberOfTypes;
-	for ( i = 0; i < pMsrRequest->numberOfTypes; i++ )
-	{
-		pMeasurementSRV->msrReply.msrTypes[ i ].msrType = pMeasurementSRV->msrRequest.msrTypes[ i ].msrType;
-		pMeasurementSRV->msrReply.msrTypes[ i ].status = TI_OK;
-	}
-
-	/* nullify the pending CBs bitmap */
-	pMeasurementSRV->pendingParamCBs = 0;
-    
-    /* send a start measurement event to the SM */
-    measurementSRVSM_SMEvent( (TI_HANDLE)pMeasurementSRV, &(pMeasurementSRV->SMState), 
-                              MSR_SRV_EVENT_MEASURE_START_REQUEST );
-
-    /* mark that request has been sent */
-    pMeasurementSRV->bInRequest = TI_FALSE;
-
-    return pMeasurementSRV->returnStatus;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 09-November-2005\n
- * \brief Stops a measurement operation in progress.\n
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \param bSendNullData - whether to send NULL data when exiting driver mode.\n
- * \param cmdResponseCBFunc - callback function to used for command response.\n
- * \param cmdResponseCBObj - handle to pass to command response CB.\n
- * \return TI_OK if successful (various, TBD codes if not).\n
- */
-TI_STATUS MacServices_measurementSRV_stopMeasurement( TI_HANDLE hMacServices,
-													  TI_BOOL bSendNullData,
-                                                      TCmdResponseCb cmdResponseCBFunc,
-                                                      TI_HANDLE cmdResponseCBObj )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)((MacServices_t*)hMacServices)->hMeasurementSRV;
-    
-TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Received measurement stop request.\n");
-TRACE2( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "Send null data:, cmd response CB: 0x%x, cmd response handle: 0x%x\n",							  cmdResponseCBFunc,							  cmdResponseCBObj);
-
-	/* store callbacks */
-    pMeasurementSRV->commandResponseCBFunc = cmdResponseCBFunc;
-    pMeasurementSRV->commandResponseCBObj = cmdResponseCBObj;
-
-	/* store NULL data indication */
-	pMeasurementSRV->bSendNullDataWhenExitPs = bSendNullData;
-
-    /* mark that current return status is TI_OK */
-    pMeasurementSRV->returnStatus = TI_OK;
-
-	/* mark that a stop request is in progress */
-	pMeasurementSRV->bInRequest = TI_TRUE;
-
-    /* send a stop event to the SM */
-    measurementSRVSM_SMEvent( (TI_HANDLE)pMeasurementSRV, &(pMeasurementSRV->SMState),
-                              MSR_SRV_EVENT_MEASURE_STOP_REQUEST );
-
-	/*mark that stop request has completed */
-	pMeasurementSRV->bInRequest = TI_FALSE;
-
-    return pMeasurementSRV->returnStatus;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 09-November-2005\n
- * \brief Notifies the measurement SRV of a FW reset (recovery).\n
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- */
-void MacServices_measurementSRV_FWReset( TI_HANDLE hMacServices )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)((MacServices_t*)hMacServices)->hMeasurementSRV;
-    TI_INT32 i;
-
-TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Received FW reset indication.\n");
-
-	/* if a timer is running, stop it */
-    if (pMeasurementSRV->bStartStopTimerRunning)
-    {
-        tmr_StopTimer (pMeasurementSRV->hStartStopTimer);
-        pMeasurementSRV->bStartStopTimerRunning = TI_FALSE;
-    }
-    for (i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++)
-    {
-        if (pMeasurementSRV->bRequestTimerRunning[i])
-        {
-            tmr_StopTimer (pMeasurementSRV->hRequestTimer[i]);
-            pMeasurementSRV->bRequestTimerRunning[i] = TI_FALSE;
-        }
-    }
-
-    /* change SM state to idle */
-    pMeasurementSRV->SMState = MSR_SRV_STATE_IDLE;
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 09-November-2005\n
- * \brief callback function used by the power manager to notify driver mode result
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param PSMode - the power save mode the STA is currently in.\n
- * \param psStatus - the power save request status.\n
- */
-void MacServices_measurementSRV_powerSaveCB( TI_HANDLE hMeasurementSRV, TI_UINT8 PSMode, TI_UINT8 psStatus )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-
-TRACE2( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Power save SRV CB called. PS mode:%d status: %d\n", PSMode, psStatus);
-
-	/* if driver mode entry succeedded */
-    if ( ENTER_POWER_SAVE_SUCCESS == psStatus )
-    {
-        TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": PS successful.\n");
-
-        /* send a RIVER_MODE_SUCCESS event */
-        measurementSRVSM_SMEvent( (TI_HANDLE)pMeasurementSRV, &(pMeasurementSRV->SMState), 
-                                  MSR_SRV_EVENT_DRIVER_MODE_SUCCESS );
-    }
-    /* driver mode entry failed */
-    else
-    {
-        TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": PS failed, status %d.\n", psStatus);
-
-        /* Set the return status to TI_NOK */
-        pMeasurementSRV->returnStatus = (TI_STATUS)psStatus;
-
-        /* send a DRIVER_MODE_FAILURE event */
-        measurementSRVSM_SMEvent( (TI_HANDLE)pMeasurementSRV, &(pMeasurementSRV->SMState), 
-								  MSR_SRV_EVENT_DRIVER_MODE_FAILURE );
-    }
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 14-November-2005\n
- * \brief callback function used by the HAL for measure start event (sent when the FW 
- * has started measurement operation, i.e. switched channel and changed RX filters).\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- */
-void MacServices_measurementSRV_measureStartCB( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t *pMeasurementSRV  = (measurementSRV_t*)hMeasurementSRV;
-
-    TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": measure start CB called.\n");
-
-	/* stop the FW guard timer */
-    tmr_StopTimer (pMeasurementSRV->hStartStopTimer);
-	pMeasurementSRV->bStartStopTimerRunning = TI_FALSE;
-
-	/* clear the CB function, so that it won't be called on stop as well! */
-	pMeasurementSRV->commandResponseCBFunc = NULL;
-	pMeasurementSRV->commandResponseCBObj = NULL;
-
-    measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState), 
-							  MSR_SRV_EVENT_START_SUCCESS );
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 14-November-2005\n
- * \brief callback function used by the HAL for measure stop event (sent when the FW 
- * has finished measurement operation, i.e. switched channel to serving channel and changed back RX filters).\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- */
-void MacServices_measurementSRV_measureCompleteCB( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t *pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-
-    TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": measure complete CB called.\n");
-
-	/* stop the FW guard timer */
-    tmr_StopTimer (pMeasurementSRV->hStartStopTimer);
-	pMeasurementSRV->bStartStopTimerRunning = TI_FALSE;
-
-    measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState), 
-							  MSR_SRV_EVENT_STOP_COMPLETE );
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 14-November-2005\n
- * \brief callback function used by the HAL for AP discovery stop event (sent when the FW 
- * has finished AP discovery operation).\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- */
-void MacServices_measurementSRV_apDiscoveryCompleteCB( TI_HANDLE hMeasurementSRV )
-{
-#ifdef TI_DBG
-    measurementSRV_t *pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-
-    TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": AP Discovery complete CB called.\n");
-#endif /* TI_DBG */
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 14-November-2005\n
- * \brief called when a measurement FW guard timer expires.
- *
- * Function Scope \e Public.\n
- * \param hMeasuremntSRV - handle to the measurement SRV object.\n
- * \param bTwdInitOccured -   Indicates if TWDriver recovery occured since timer started.\n
- */
-void MacServices_measurementSRV_startStopTimerExpired (TI_HANDLE hMeasurementSRV, TI_BOOL bTwdInitOccured)
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-    TI_INT32 i;
-
-    TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": FW guard timer expired.\n");
-
-    /* mark that the FW guard timer is not running */
-    pMeasurementSRV->bStartStopTimerRunning = TI_FALSE;
-
-    /* if any other timer is running - stop it */
-    for (i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++)
-    {
-        if (pMeasurementSRV->bRequestTimerRunning[i])
-        {
-            tmr_StopTimer (pMeasurementSRV->hRequestTimer[i]);
-            pMeasurementSRV->bRequestTimerRunning[i] = TI_FALSE;
-        }
-    }
-
-    /* change SM state to idle */
-    pMeasurementSRV->SMState = MSR_SRV_STATE_IDLE;
-
-	/*Error Reporting - call the centeral error function in the health monitor if a request for measurement was faield*/
-	pMeasurementSRV->failureEventFunc(pMeasurementSRV->failureEventObj ,MEASUREMENT_FAILURE);
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 15-November-2005\n
- * \brief called when a measurement type timer expires.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasuremntSRV - handle to the measurement SRV object.\n
- * \param bTwdInitOccured -   Indicates if TWDriver recovery occured since timer started.\n
- */
-void MacServices_measurementSRV_requestTimerExpired (TI_HANDLE hMeasurementSRV, TI_BOOL bTwdInitOccured)
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-    TI_INT32 requestIndex;
-
-	/* find the expired measurement type */
-    requestIndex = measurementSRVFindMinDuration( hMeasurementSRV );
-	if ( -1 == requestIndex )
-	{
-		/* indicates we can't find the request in the requets array. Shouldn't happen, but nothing to do */
-TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": Request timer expired and request index from findMinDuration is -1?!?");
-		return;
-	}
-
-TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": request timer expired, request index: %d.\n", requestIndex);
-
-	/* mark that the timer is not running and that this request has completed */
-    pMeasurementSRV->bRequestTimerRunning[ requestIndex ] = TI_FALSE;
-
-    /* collect results and send stop command if necessary */
-    switch (pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].msrType)
-    {
-    case MSR_TYPE_BEACON_MEASUREMENT:
-        measurementSRVHandleBeaconMsrComplete( hMeasurementSRV, requestIndex );
-        break;
-
-    case MSR_TYPE_CCA_LOAD_MEASUREMENT:
-        measurementSRVHandleChannelLoadComplete( hMeasurementSRV, requestIndex );
-        break;
-
-    case MSR_TYPE_NOISE_HISTOGRAM_MEASUREMENT:
-        measurementSRVHandleNoiseHistogramComplete( hMeasurementSRV, requestIndex );
-        break;
-
-	/* used here to avoid compilation warning only, does nothing */
-	case MSR_TYPE_BASIC_MEASUREMENT:
-	case MSR_TYPE_FRAME_MEASUREMENT:
-	case MSR_TYPE_MAX_NUM_OF_MEASURE_TYPES:
-	default:
-TRACE2( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": measure type %d not supported for request %d\n", 							pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].msrType,							requestIndex);
-		break;
-    }
-
-	/* if no measurement are running and no CBs are pending, send ALL TYPES COMPLETE event */
-	if ( TI_TRUE == measurementSRVIsMeasurementComplete( hMeasurementSRV ))
-	{
-		/* send the event */
-		measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState), 
-								  MSR_SRV_EVENT_ALL_TYPES_COMPLETE );
-	}
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 13-November-2005\n
- * \brief Checks whether a beacon measurement is part of current measurement request
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \return TI_TRUE if a beacon measurement is part of current request, TI_FALSE otherwise.\n
- */
-TI_BOOL measurementSRVIsBeaconMeasureIncluded( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-    TI_INT32 i;
-
-    for ( i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++ )
-    {
-        if ( MSR_TYPE_BEACON_MEASUREMENT == pMeasurementSRV->msrRequest.msrTypes[ i ].msrType )
-        {
-            return TI_TRUE;
-        }
-    }
-    return TI_FALSE;
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 15-November-2005\n
- * \brief Finds the index for the measurement request with the shortest period 
- * (the one that has now completed).\n
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \return index of the measurement request with the shortest duration.\n
- */
-TI_INT32 measurementSRVFindMinDuration( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-    TI_INT32 i, minIndex;
-	TI_UINT32 minValue;
-
-
-    minIndex = minValue = 0; /* minIndex is initialized only to avoid compilation warning! */
-
-    /* find the index with the minimum duration */
-    for ( i = 0; i < pMeasurementSRV->msrRequest.numberOfTypes; i++ )
-    {
-        if ( TI_TRUE == pMeasurementSRV->bRequestTimerRunning[ i ] )
-        {
-			if ( (0 == minValue) ||
-				 (pMeasurementSRV->msrRequest.msrTypes[ i ].duration < minValue))
-			{
-				minValue = pMeasurementSRV->msrRequest.msrTypes[ i ].duration;
-				minIndex = i;
-			}
-        }
-    }
-
-    /* if no entry with positive duration exists, return -1 */
-    if ( 0 == minValue )
-    {
-        return -1;
-    }
-    else
-    { /* otherwise, return the index of the type with the shortest duration */
-        return minIndex;
-    }
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 15-November-2005\n
- * \brief Handles an AP discovery timer expiry, by setting necessary values in the
- * reply struct.\n
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param requestIndex - index of the beacon request in the request structure.\n
- */
-void measurementSRVHandleBeaconMsrComplete( TI_HANDLE hMeasurementSRV, TI_INT32 requestIndex )
-{
-	measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-	TI_INT32 status;
-
-
-TRACE0(pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Sending AP Discovery Stop to the HAL...");
-
-	/* send stop AP discovery command */
-	status = cmdBld_CmdApDiscoveryStop (pMeasurementSRV->hCmdBld, NULL, NULL);
-	if ( TI_OK != status )
-	{
-TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": status %d received from cmdBld_CmdApDiscoveryStop\n", status);
-	}
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 15-November-2005\n
- * \brief Handles a channel load timer expiry, by requesting channel load 
- * results from the FW.\n
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param requestIndex - index of the channel load request in the request structure.\n
- */
-void measurementSRVHandleChannelLoadComplete( TI_HANDLE hMeasurementSRV, TI_INT32 requestIndex )
-{
-	measurementSRV_t*		pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-	TTwdParamInfo			tTwdParam;
-	TI_STATUS               status;
-
-    /* Getting the Medium Occupancy Register */
-	tTwdParam.paramType = TWD_MEDIUM_OCCUPANCY_PARAM_ID;
-    tTwdParam.content.interogateCmdCBParams.fCb = (void *)MacServices_measurementSRV_channelLoadParamCB;
-    tTwdParam.content.interogateCmdCBParams.hCb = hMeasurementSRV;
-    tTwdParam.content.interogateCmdCBParams.pCb = (TI_UINT8*)(&(pMeasurementSRV->mediumOccupancyResults));
-	status = cmdBld_GetParam (pMeasurementSRV->hCmdBld, &tTwdParam);
-
-	if ( status != TI_OK )
-    {
-TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": whalCtrl_GetParam returned status %d\n", status);
-
-		/* mark that the specific measurment type has failed */
-		pMeasurementSRV->msrReply.msrTypes[ requestIndex ].status = TI_NOK;
-
-		/* if all measurement types has finished, an event will be send by request timer expired */
-    }
-    else
-    {
-		/* mark that channel load param CB is pending */
-		pMeasurementSRV->pendingParamCBs |= MSR_SRV_WAITING_CHANNEL_LOAD_RESULTS;
-	}
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 15-November-2005\n
- * \brief Handles a noise histogram timer expiry, by requesting noise histogram
- * reaults from the FW.\n
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param requestIndex - index of the beacon request in the request structure.\n
- */
-void measurementSRVHandleNoiseHistogramComplete( TI_HANDLE hMeasurementSRV, TI_INT32 requestIndex )
-{
-    measurementSRV_t		    *pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-	TTwdParamInfo	            tTwdParam;
-    TNoiseHistogram             pNoiseHistParams;
-	TI_STATUS	                status;
-	
-    /* Set Noise Histogram Cmd Params */
-    pNoiseHistParams.cmd = STOP_NOISE_HIST;
-    pNoiseHistParams.sampleInterval = 0;
-    os_memoryZero( pMeasurementSRV->hOS, &(pNoiseHistParams.ranges[0]), MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES );
-    
-    /* Send a Stop command to the FW */
-    status = cmdBld_CmdNoiseHistogram (pMeasurementSRV->hCmdBld, &pNoiseHistParams, NULL, NULL);
-    
-    if ( TI_OK != status )
-	{
-TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": whalCtrl_NoiseHistogramCmd returned status %d\n", status);
-
-		/* mark that the specific measurment type has failed */
-		pMeasurementSRV->msrReply.msrTypes[ requestIndex ].status = TI_NOK;
-
-		/* if all measurement types has finished, an event will be send by request timer expired */
-	}
-
-   	/* Get measurement results */
-	tTwdParam.paramType = TWD_NOISE_HISTOGRAM_PARAM_ID;
-    tTwdParam.content.interogateCmdCBParams.fCb = (void *)MacServices_measurementSRV_noiseHistCallBack;
-    tTwdParam.content.interogateCmdCBParams.hCb = hMeasurementSRV;
-    tTwdParam.content.interogateCmdCBParams.pCb = (TI_UINT8*)&pMeasurementSRV->noiseHistogramResults;
-	status = cmdBld_GetParam (pMeasurementSRV->hCmdBld, &tTwdParam);
-
-    if ( TI_OK == status )
-    {
-		/* setting On the Waitng for Noise Histogram Results Bit */
-		pMeasurementSRV->pendingParamCBs |= MSR_SRV_WAITING_NOISE_HIST_RESULTS;
-
-TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": sent noise histogram stop command.\n");
-	}
-    else
-    {
-TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": whalCtrl_GetParam returned status %d\n", status);
-
-		/* mark that the specific measurment type has failed */
-		pMeasurementSRV->msrReply.msrTypes[ requestIndex ].status = TI_NOK;
-
-		/* if all measurement types has finished, an event will be send by request timer expired */
-    }
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 16-November-2005\n
- * \brief Callback for channel load get param call.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param status - the get_param call status.\n
- * \param CB_buf - pointer to the results buffer (already on the measurement SRV object)
- */
-void MacServices_measurementSRV_channelLoadParamCB( TI_HANDLE hMeasurementSRV, TI_STATUS status, 
-													TI_UINT8* CB_buf )
-{
-    measurementSRV_t	    *pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-    TI_UINT32                  mediumUsageInMs, periodInMs;
-	TI_INT32 					requestIndex;
-
-	/* when this CB is called as a result of the nulify call at the measurement beginning,
-	   the handle will be NULL. In this case, nothing needs to be done. */
-	if ( NULL == hMeasurementSRV )
-	{
-		return;
-	}
-
-TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Channel load CB called, status:%d\n", status);
-TRACE2( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "result address (reported): 0x%x, result address (assumed): 0x%x, results (reported):\n",							  CB_buf, &(pMeasurementSRV->mediumOccupancyResults));
-	TRACE_INFO_HEX( pMeasurementSRV->hReport, CB_buf, sizeof(TMediumOccupancy));
-
-	/* setting Off the Waitng for Channel Load Results Bit */
-	pMeasurementSRV->pendingParamCBs &= ~MSR_SRV_WAITING_CHANNEL_LOAD_RESULTS;
-
-	/* find the request index */
-	requestIndex = measurementSRVFindIndexByType( hMeasurementSRV, MSR_TYPE_CCA_LOAD_MEASUREMENT );
-	if ( -1 == requestIndex )
-	{
-		/* indicates we can't find the request in the requets array. Shouldn't happen, but nothing to do */
-TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": request index from measurementSRVFindIndexByType is -1?!?");
-		return;
-	}
-
-	if ( (TI_OK == status) && (0 != pMeasurementSRV->mediumOccupancyResults.Period))
-	{		
-		/* calculate results */
-		mediumUsageInMs = pMeasurementSRV->mediumOccupancyResults.MediumUsage / 1000;
-		periodInMs      = pMeasurementSRV->mediumOccupancyResults.Period / 1000;
-
-TRACE2( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": MediumUsage = %d Period = %d\n",mediumUsageInMs, periodInMs);
-		
-		if ( periodInMs <= pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].duration )
-		{
-			pMeasurementSRV->msrReply.msrTypes[ requestIndex ].replyValue.CCABusyFraction = 
-				( 255 * pMeasurementSRV->mediumOccupancyResults.MediumUsage ) / 
-					pMeasurementSRV->mediumOccupancyResults.Period;
-		}
-		else
-		{       
-			pMeasurementSRV->msrReply.msrTypes[ requestIndex ].replyValue.CCABusyFraction = 
-				( 255 * pMeasurementSRV->mediumOccupancyResults.MediumUsage ) / 
-					(pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].duration * 1000);
-		}		
-	}
-	else
-	{
-TRACE2( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": channel load failed. Status=%d, period=%d\n",							status,							pMeasurementSRV->mediumOccupancyResults.Period);
-
-		/* mark result status */
-		pMeasurementSRV->msrReply.msrTypes[ requestIndex ].status = TI_NOK;
-	}
-	
-	/* if no measurement are running and no CBs are pending, 
-	   send ALL TYPES COMPLETE event */
-	if ( TI_TRUE == measurementSRVIsMeasurementComplete( hMeasurementSRV ))
-	{
-		/* send the event */
-		measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState), 
-								  MSR_SRV_EVENT_ALL_TYPES_COMPLETE );
-	}
-}
-
-/** 
- * \date 03-January-2005\n
- * \brief Dummy callback for channel load get param call. Used to clear the channel load tracker.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param status - the get_param call status.\n
- * \param CB_buf - pointer to the results buffer (already on the measurement SRV object)
- */
-void MacServices_measurementSRV_dummyChannelLoadParamCB( TI_HANDLE hMeasurementSRV, TI_STATUS status, 
-													TI_UINT8* CB_buf )
-{
-#ifdef TI_DBG
-    measurementSRV_t *pMeasurementSRV = (measurementSRV_t*) hMeasurementSRV;
-
-TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Dummy Channel Load callback called (status = %d)\n", status);
-#endif /* TI_DBG */
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 16-November-2005\n
- * \brief Callback for noise histogram get param call.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param status - the get_param call status.\n
- * \param CB_buf - pointer to the results buffer (already on the measurement SRV object)
- */
-void MacServices_measurementSRV_noiseHistCallBack( TI_HANDLE hMeasurementSRV, TI_STATUS status, 
-												   TI_UINT8* CB_buf )
-{
-    measurementSRV_t		    *pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-	TI_UINT8		                index;
-    TI_UINT32                      sumOfSamples;
-    TI_INT32							requestIndex;
-
-TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": noise histogram CB called, status: %d\n", status);
-TRACE2( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "result address (reported): 0x%x, result address (assumed): 0x%x, results (reported):\n",							  CB_buf, &(pMeasurementSRV->noiseHistogramResults));
-	TRACE_INFO_HEX( pMeasurementSRV->hReport, CB_buf, sizeof(TNoiseHistogramResults));
-
-	/* setting Off the Waitng for noise histogram Results Bit */
-	pMeasurementSRV->pendingParamCBs &= ~MSR_SRV_WAITING_NOISE_HIST_RESULTS;
-
-	/* find the request index */
-	requestIndex = measurementSRVFindIndexByType( hMeasurementSRV, MSR_TYPE_NOISE_HISTOGRAM_MEASUREMENT );
-	if ( -1 == requestIndex )
-	{
-		/* indicates we can't find the request in the requets array. Shouldn't happen, but nothing to do */
-TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": request index from measurementSRVFindIndexByType is -1?!?");
-		return;
-	}
-
-	if ( TI_OK == status )
-	{
-		sumOfSamples = pMeasurementSRV->noiseHistogramResults.numOfLostCycles;
-		
-		/* Print For Debug */
-TRACE4( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": numOfLostCycles = %d numOfTxHwGenLostCycles = %d numOfRxLostCycles = %d numOfExceedLastThresholdLostCycles = %d\n",			pMeasurementSRV->noiseHistogramResults.numOfLostCycles, 			pMeasurementSRV->noiseHistogramResults.numOfTxHwGenLostCycles,			pMeasurementSRV->noiseHistogramResults.numOfRxLostCycles,			pMeasurementSRV->noiseHistogramResults.numOfLostCycles - 			 (pMeasurementSRV->noiseHistogramResults.numOfTxHwGenLostCycles + 			  pMeasurementSRV->noiseHistogramResults.numOfRxLostCycles));
-		
-		for ( index = 0; index < NUM_OF_NOISE_HISTOGRAM_COUNTERS; index++ )
-		{
-			sumOfSamples += pMeasurementSRV->noiseHistogramResults.counters[ index ];
-			
-			/* Print For Debug */
-TRACE2( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Counter #%d = %x\n", index, pMeasurementSRV->noiseHistogramResults.counters[index]);
-		}
-		
-		/* If there weren't enough samples --> Reject the Request */
-		if ( (sumOfSamples - pMeasurementSRV->noiseHistogramResults.numOfLostCycles) < 
-				NOISE_HISTOGRAM_THRESHOLD )
-		{
-TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_WARNING, ": noise histogram CB, rejecting request because %d samples received.\n",								  sumOfSamples - pMeasurementSRV->noiseHistogramResults.numOfLostCycles);
-
-			/* set negative result status */
-			pMeasurementSRV->msrReply.msrTypes[ requestIndex ].status = TI_NOK;
-		}
-		else
-		{   
- 			for (index = 0; index < NUM_OF_NOISE_HISTOGRAM_COUNTERS; index++)
-			{
-				pMeasurementSRV->msrReply.msrTypes[ requestIndex ].replyValue.RPIDensity[ index ] = 
-					( 255 * pMeasurementSRV->noiseHistogramResults.counters[ index ]) / sumOfSamples;
-			}
-
-TRACE8( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Valid noise histogram reply. RPIDensity: %d %d %d %d %d %d %d %d\n",									  pMeasurementSRV->msrReply.msrTypes[ requestIndex ].replyValue.RPIDensity[ 0 ],									  pMeasurementSRV->msrReply.msrTypes[ requestIndex ].replyValue.RPIDensity[ 1 ],									  pMeasurementSRV->msrReply.msrTypes[ requestIndex ].replyValue.RPIDensity[ 2 ],									  pMeasurementSRV->msrReply.msrTypes[ requestIndex ].replyValue.RPIDensity[ 3 ],									  pMeasurementSRV->msrReply.msrTypes[ requestIndex ].replyValue.RPIDensity[ 4 ],									  pMeasurementSRV->msrReply.msrTypes[ requestIndex ].replyValue.RPIDensity[ 5 ],									  pMeasurementSRV->msrReply.msrTypes[ requestIndex ].replyValue.RPIDensity[ 6 ],									  pMeasurementSRV->msrReply.msrTypes[ requestIndex ].replyValue.RPIDensity[ 7 ]);
-		}
-	}
-	else
-	{
-TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_WARNING, ": noise histogram CB with status: %d, rejecting request.\n", status);
-		/* set negative result status */
-		pMeasurementSRV->msrReply.msrTypes[ requestIndex ].status = TI_NOK;
-	}
-	
-	/* if no measurement are running and no CBs are pending, 
-	   send ALL TYPES COMPLETE event */
-	if ( TI_TRUE == measurementSRVIsMeasurementComplete( hMeasurementSRV ))
-	{
-		/* send the event */
-		measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState), 
-								  MSR_SRV_EVENT_ALL_TYPES_COMPLETE );
-	}
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 16-November-2005\n
- * \brief Checks whether all measuremtn types had completed and all param CBs had been called.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param status - the get_param call status.\n
- * \param CB_buf - pointer to the results buffer (already on the measurement SRV object)
- */
-TI_BOOL measurementSRVIsMeasurementComplete( TI_HANDLE hMeasurementSRV )
-{
-	measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-	TI_INT32 i;
-
-	/* verify that no request is currently running */
-	for ( i = 0; i < pMeasurementSRV->msrRequest.numberOfTypes; i++ )
-	{
-		if ( TI_TRUE == pMeasurementSRV->bRequestTimerRunning[ i ] )
-		{
-			return TI_FALSE;
-		}
-	}
-
-	/* verify that no CBs are pending */
-	if ( 0 != (pMeasurementSRV->pendingParamCBs & 
-			   (MSR_SRV_WAITING_CHANNEL_LOAD_RESULTS | MSR_SRV_WAITING_NOISE_HIST_RESULTS)))
-	{
-		return TI_FALSE;
-	}
-
-	return TI_TRUE;
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 17-November-2005\n
- * \brief Finds a measure type index in the measure request array.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param type - the measure type to look for.\n
- * \return the type index, -1 if not found.\n
- */
-TI_INT32 measurementSRVFindIndexByType( TI_HANDLE hMeasurementSRV, EMeasurementType type )
-{
-	measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-	TI_INT32 i;
-
-	for ( i = 0; i < pMeasurementSRV->msrRequest.numberOfTypes; i++ )
-	{
-		if ( type == pMeasurementSRV->msrRequest.msrTypes[ i ].msrType )
-		{
-			return i;
-		}
-	}
-	return -1;
-}
-
-
-
-/****************************************************************************************
- *                        measurementSRVRegisterFailureEventCB													*
- ****************************************************************************************
-DESCRIPTION: Registers a failure event callback for scan error notifications.
-			    
-				                                                                                                   
-INPUT:     	- hMeasurementSRV	- handle to the Measurement SRV object.		
-			- failureEventCB 		- the failure event callback function.\n
-			- hFailureEventObj 	- handle to the object passed to the failure event callback function.
-
-OUTPUT:	
-RETURN:    void.
-****************************************************************************************/
-
-void measurementSRVRegisterFailureEventCB( TI_HANDLE hMeasurementSRV, 
-                                     void * failureEventCB, TI_HANDLE hFailureEventObj )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-
-    pMeasurementSRV->failureEventFunc	= (TFailureEventCb)failureEventCB;
-    pMeasurementSRV->failureEventObj	= hFailureEventObj;
-}
-
-
diff --git a/wl1271/TWD/MacServices/MeasurementSrv.h b/wl1271/TWD/MacServices/MeasurementSrv.h
deleted file mode 100644
index 7a852f4..0000000
--- a/wl1271/TWD/MacServices/MeasurementSrv.h
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * MeasurementSrv.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file MeasurementSrv.h
- *  \brief This file include private definitions for the Measurement SRV module.
- *  \author Ronen Kalish
- *  \date 08-November-2005
- */
-
-#ifndef __MEASUREMENT_SRV_H__
-#define __MEASUREMENT_SRV_H__
-
-#include "TWDriverInternal.h"
-#include "MacServices_api.h"
-#include "fsm.h"
-#include "MeasurementSrvSM.h"
-
-/*
- ***********************************************************************
- *  Constant definitions.
- ***********************************************************************
- */
-/* Time in milliseconds to receive a command complete for measure start / stop from the FW */
-#define MSR_FW_GUARD_TIME   100 
-#define DEF_SAMPLE_INTERVAL             (100)   /* expressed in microsec */
-#define NOISE_HISTOGRAM_THRESHOLD           100
-/* Get param callback flags  */
-#define MSR_SRV_WAITING_CHANNEL_LOAD_RESULTS        0x01 /* channel load results are still pending */
-#define MSR_SRV_WAITING_NOISE_HIST_RESULTS          0x02 /* noise histogram results are still pending */
-
-/*
- ***********************************************************************
- *  Enums.
- ***********************************************************************
- */
-
-
-/*
- ***********************************************************************
- *  Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  Structure definitions.
- ***********************************************************************
- */
-
-/** \struct measurementSRV_t
- * \brief This structure contains the measurement SRV object data
- */
-typedef struct
-{
-    TMediumOccupancy            mediumOccupancyResults; /**< channel load results buffer */
-    TNoiseHistogramResults      noiseHistogramResults;  /**< noise histogram results buffer */
-
-    /* module handles */
-    TI_HANDLE           hOS;                            /**< OS object handle */
-    TI_HANDLE           hReport;                        /**< report object handle */
-    TI_HANDLE           hPowerSaveSRV;                  /**< power save SRV object handle */
-    TI_HANDLE           hCmdBld;                        /**< Command Builder object handle */
-    TI_HANDLE           hEventMbox;                     /**< Event Mbox handle */
-    TI_HANDLE           hTimer    ;                     /**< Timer Module handle */
-    /* CB functions and objects */                                                        
-    TMeasurementSrvCompleteCb measurmentCompleteCBFunc;
-                                                        /**< 
-                                                         * upper layer (measurement manager) measurement complete 
-                                                         * callback function
-                                                         */
-    TI_HANDLE           measurementCompleteCBObj;       /**< 
-                                                         * upper layer (measurement manager) measurement complete
-                                                         * callback object
-                                                         */
-    
-    TCmdResponseCb      commandResponseCBFunc;          /**<
-                                                         * upper layer command response CB, used for both start
-                                                         * and stop. Passed down to the HAL and called when 
-                                                         * the measurement command has been received by the FW
-                                                         */
-    TI_HANDLE           commandResponseCBObj;           /**<
-                                                         * object parameter passed to the commandResposeFunc by 
-                                                         * the HAL when it is called 
-                                                         */
-
-    TFailureEventCb     failureEventFunc;   /**<
-                                            * upper layer Failure Event CB.
-                                            * called when the scan command has been Timer Expiry
-                                            */
-    TI_HANDLE           failureEventObj;        /**<
-                                            * object parameter passed to the failureEventFunc
-                                            * when it is called 
-                                            */
-    /* Timers */
-    TI_HANDLE           hRequestTimer[ MAX_NUM_OF_MSR_TYPES_IN_PARALLEL ];
-                                                        /**< Timers for different measurement types */
-    TI_BOOL             bRequestTimerRunning[ MAX_NUM_OF_MSR_TYPES_IN_PARALLEL ];
-                                                        /**< Indicates whether each request timer is running */
-    TI_HANDLE           hStartStopTimer;                /**< Timer for start / stop commands guard */
-    TI_BOOL             bStartStopTimerRunning;         /**< 
-                                                         * Indicates whether the start / stop command guard
-                                                         * timer is running
-                                                         */
-    /* Misc stuff */
-    TI_BOOL             bInRequest;                     /**<
-                                                         * Indicates whether the SM is run within
-                                                         * the measurement request context (if so, to avoid
-                                                         * re-entrance, the complete function shouldn't
-                                                         * be called on failure, but rather an invalid
-                                                         * status should be returned)
-                                                         */
-    TI_STATUS           returnStatus;                   /**< 
-                                                         * Holds the return code to the upper layer
-                                                         * Used to save errors during SM operation.
-                                                         */
-    TI_BOOL             bSendNullDataWhenExitPs;        /**< whether to send NULL data frame when exiting
-                                                         * driver mode
-                                                         */
-    /* state machine */
-    fsm_stateMachine_t* SM;                            /**< 
-                                                         * state machines for different
-                                                         * scan types
-                                                         */
-    measurements_SRVSMStates_e  SMState;                /**< state machine current states */
-    /* measurement request */
-    TMeasurementRequest     msrRequest;                 /**< measurement request parameters */
-    TMeasurementReply       msrReply;                   /**< measurement reply values */
-    TI_UINT32               requestRecptionTimeStampMs; /**< The time in which the request was received. */
-    TI_UINT32               timeToRequestExpiryMs;      /**<
-                                                         * The duration (in ms) from request receiption
-                                                         * until it should actually start. Request is
-                                                         * discarded if a longer period is required
-                                                         */
-    TI_UINT8                pendingParamCBs;            /**<
-                                                         * a bitmap indicating which get_param CBs are
-                                                         * currently pending (noise histogram and/or
-                                                         * channel load).
-                                                         */
-} measurementSRV_t;
-
-/*
- ***********************************************************************
- *  External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  External functions definitions
- ***********************************************************************
- */
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Creates the measurement SRV object
- *
- * Function Scope \e Public.\n
- * \param hOS - handle to the OS object.\n
- * \return a handle to the measurement SRV object, NULL if an error occurred.\n
- */
-TI_HANDLE MacServices_measurementSRV_create( TI_HANDLE hOS );
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Initializes the measurement SRV object
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param hReport - handle to the report object.\n
- * \param hCmdBld - handle to the Command Builder object.\n
- * \param hEventMbox - handle to the Event Mbox object.\n
- * \param hPowerSaveSRV - handle to the power save SRV object.\n
- * \param hTimer - handle to the Timer module object.\n
- */
-TI_STATUS MacServices_measurementSRV_init (TI_HANDLE hMeasurementSRV, 
-                                           TI_HANDLE hReport, 
-                                           TI_HANDLE hCmdBld,
-                                           TI_HANDLE hEventMbox,
-                                           TI_HANDLE hPowerSaveSRV,
-                                           TI_HANDLE hTimer);
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Destroys the measurement SRV object
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- */
-void MacServices_measurementSRV_destroy( TI_HANDLE hMeasurementSRV );
-
-/** 
- * \author Ronen Kalish\n
- * \date 13-November-2005\n
- * \brief Checks whether a beacon measurement is part of current measurement request
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \return TI_TRUE if a beacon measurement is part of current request, TI_FALSE otherwise.\n
- */
-TI_BOOL measurementSRVIsBeaconMeasureIncluded( TI_HANDLE hMeasurementSRV );
-
-/** 
- * \author Ronen Kalish\n
- * \date 15-November-2005\n
- * \brief Finds the index for the measurement request with the shortest period 
- * (the one that has now completed).\n
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \return index of the measurement request with the shortest duration.\n
- */
-TI_INT32 measurementSRVFindMinDuration( TI_HANDLE hMeasurementSRV );
-
-/** 
- * \author Ronen Kalish\n
- * \date 15-November-2005\n
- * \brief Handles an AP discovery timer expiry, by setting necessary values in the
- * reply struct.\n
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param requestIndex - index of the beacon request in the request structure.\n
- */
-void measurementSRVHandleBeaconMsrComplete( TI_HANDLE hMeasurementSRV, TI_INT32 requestIndex );
-
-/** 
- * \author Ronen Kalish\n
- * \date 15-November-2005\n
- * \brief Handles a channel load timer expiry, by requesting channel load 
- * results from the FW.\n
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param requestIndex - index of the channel load request in the request structure.\n
- */
-void measurementSRVHandleChannelLoadComplete( TI_HANDLE hMeasurementSRV, TI_INT32 requestIndex );
-
-/** 
- * \author Ronen Kalish\n
- * \date 15-November-2005\n
- * \brief Handles a nois histogram timer expiry, by requesting noise histogram
- * reaults from the FW.\n
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param requestIndex - indexof the beacon request in the request structure.\n
- */
-void measurementSRVHandleNoiseHistogramComplete( TI_HANDLE hMeasurementSRV, TI_INT32 requestIndex );
-
-/** 
- * \author Ronen Kalish\n
- * \date 16-November-2005\n
- * \brief Checks whether all measuremtn types had completed and all param CBs had been called.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param status - the get_param call status.\n
- * \param CB_buf - pointer to the results buffer (already on the measurement SRV object)
- */
-TI_BOOL measurementSRVIsMeasurementComplete( TI_HANDLE hMeasurementSRV );
-
-/** 
- * \author Ronen Kalish\n
- * \date 17-November-2005\n
- * \brief Finds a measure type index in the measure request array.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param type - the measure type to look for.\n
- * \return the type index, -1 if not found.\n
- */
-TI_INT32 measurementSRVFindIndexByType( TI_HANDLE hMeasurementSRV, EMeasurementType type );
-
-/****************************************************************************************
- *                        measurementSRVRegisterFailureEventCB                                                  *
- ****************************************************************************************
-DESCRIPTION: Registers a failure event callback for scan error notifications.
-                
-                                                                                                                   
-INPUT:      - hMeasurementSRV   - handle to the Measurement SRV object.     
-            - failureEventCB        - the failure event callback function.\n
-            - hFailureEventObj  - handle to the object passed to the failure event callback function.
-
-OUTPUT: 
-RETURN:    void.
-****************************************************************************************/
-void measurementSRVRegisterFailureEventCB( TI_HANDLE hMeasurementSRV, 
-                                     void * failureEventCB, TI_HANDLE hFailureEventObj );
-
-void measurementSRV_restart( TI_HANDLE hMeasurementSRV);
-
-
-#endif /* __MEASUREMENT_SRV_H__ */
-
diff --git a/wl1271/TWD/MacServices/MeasurementSrvSM.c b/wl1271/TWD/MacServices/MeasurementSrvSM.c
deleted file mode 100644
index e81d41d..0000000
--- a/wl1271/TWD/MacServices/MeasurementSrvSM.c
+++ /dev/null
@@ -1,1063 +0,0 @@
-/*
- * MeasurementSrvSM.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file measurementSrv.c
- *  \brief This file include the measurement SRV state machine implementation.
- *  \author Ronen Kalish
- *  \date 13-November-2005
- */
-
-#define __FILE_ID__  FILE_ID_112
-#include "osApi.h"
-#include "report.h"
-#include "MeasurementSrvSM.h"
-#include "MeasurementSrv.h"
-#include "PowerSrv_API.h"
-#include "timer.h"
-#include "fsm.h"
-#include "TWDriverInternal.h"
-#include "CmdBld.h"
-
-
-TI_STATUS actionUnexpected( TI_HANDLE hMeasurementSrv );
-TI_STATUS actionNop( TI_HANDLE hMeasurementSrv );
-static void measurementSRVSM_requestMeasureStartResponseCB(TI_HANDLE hMeasurementSRV, TI_UINT32 uMboxStatus);
-
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Initialize the measurement SRV SM.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS measurementSRVSM_init( TI_HANDLE hMeasurementSRV )
-{
-   measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-
-    fsm_actionCell_t    smMatrix[ MSR_SRV_NUM_OF_STATES ][ MSR_SRV_NUM_OF_EVENTS ] =
-    {
-        /* next state and actions for IDLE state */
-        {   
-            {MSR_SRV_STATE_WAIT_FOR_DRIVER_MODE, measurementSRVSM_requestDriverMode},     /*"MESSURE_START_REQUEST"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"DRIVER_MODE_SUCCESS"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"DRIVER_MODE_FAILURE"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"START_SUCCESS"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"START_FAILURE"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"ALL_TYPES_COMPLETE"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"STOP_COMPLETE"*/
-            {MSR_SRV_STATE_IDLE, measurementSRVSRVSM_dummyStop}                           /*"MEASURE_STOP_REQUEST"*/
-        },
-
-
-        /* next state and actions for WAIT_FOR_DRIVER_MODE state */
-        {   
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"MESSURE_START_REQUEST"*/
-            {MSR_SRV_STATE_WAIT_FOR_MEASURE_START, measurementSRVSM_requestMeasureStart}, /*"DRIVER_MODE_SUCCESS"*/
-            {MSR_SRV_STATE_IDLE, measurementSRVSM_DriverModeFailure},                     /*"DRIVER_MODE_FAILURE"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"START_SUCCESS"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"START_FAILURE"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"ALL_TYPES_COMPLETE"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"STOP_COMPLETE"*/
-            {MSR_SRV_STATE_IDLE, measurementSRVSM_stopFromWaitForDriverMode}              /*"MEASURE_STOP_REQUEST"*/
-        },
-
-        /* next state and actions for WAIT_FOR_MEASURE_START state */
-        {    
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"MESSURE_START_REQUEST"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"DRIVER_MODE_SUCCESS"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"DRIVER_MODE_FAILURE"*/
-            {MSR_SRV_STATE_MEASURE_IN_PROGRESS, measurementSRVSM_startMeasureTypes},      /*"START_SUCCESS"*/
-            {MSR_SRV_STATE_IDLE, measurementSRVSM_measureStartFailure},                   /*"START_FAILURE"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"ALL_TYPES_COMPLETE"*/
-            {MSR_SRV_STATE_IDLE, measurementSRVSM_completeMeasure},                       /*"STOP_COMPLETE"*/
-            {MSR_SRV_STATE_WAIT_FOR_MEASURE_STOP, measurementSRVSM_stopFromWaitForMeasureStart}
-                                                                                          /*"MEASURE_STOP_REQUEST"*/
-        },
-
-        /* next state and actions for MEASURE_IN_PROGRESS state */
-        {   
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"MESSURE_START_REQUEST"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"DRIVER_MODE_SUCCESS"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"DRIVER_MODE_FAILURE"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"START_SUCCESS"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"START_FAILURE"*/
-            {MSR_SRV_STATE_WAIT_FOR_MEASURE_STOP, measurementSRVSM_requestMeasureStop},   /*"ALL_TYPES_COMPLETE"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"STOP_COMPLETE"*/
-            {MSR_SRV_STATE_WAIT_FOR_MEASURE_STOP, measurementSRVSM_stopFromMeasureInProgress}
-                                                                                          /*"MEASURE_STOP_REQUEST"*/
-        },
-
-        /* next state and actions for WAIT_FOR_MEASURE_STOP state */
-        {   
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"MESSURE_START_REQUEST"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"DRIVER_MODE_SUCCESS"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"DRIVER_MODE_FAILURE"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"START_SUCCESS"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"START_FAILURE"*/
-            {MSR_SRV_STATE_IDLE, actionUnexpected},                                       /*"ALL_TYPES_COMPLETE"*/
-            {MSR_SRV_STATE_IDLE, measurementSRVSM_completeMeasure},                       /*"STOP_COMPLETE"*/
-            {MSR_SRV_STATE_WAIT_FOR_MEASURE_STOP, measurementSRVSRVSM_dummyStop}          /*"MEASURE_STOP_REQUEST"*/
-        }
-    };
-
-    /* initialize current state */
-    pMeasurementSRV->SMState = MSR_SRV_STATE_IDLE;
-
-    /* configure the state machine */
-    return fsm_Config( pMeasurementSRV->SM, (fsm_Matrix_t)smMatrix, 
-                       (TI_UINT8)MSR_SRV_NUM_OF_STATES, (TI_UINT8)MSR_SRV_NUM_OF_EVENTS, 
-                       (fsm_eventActivation_t)measurementSRVSM_SMEvent, pMeasurementSRV->hOS );
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Processes an event.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the measurement SRV object.\n
- * \param currentState - the current scan SRV SM state.\n
- * \param event - the event to handle.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS measurementSRVSM_SMEvent( TI_HANDLE hMeasurementSrv, measurements_SRVSMStates_e* currentState, 
-                                    measurement_SRVSMEvents_e event )
-{
-    measurementSRV_t *pMeasurementSRV = (measurementSRV_t *)hMeasurementSrv;
-    TI_STATUS status = TI_OK;
-    TI_UINT8 nextState;
-
-    /* obtain the next state */
-    status = fsm_GetNextState( pMeasurementSRV->SM, (TI_UINT8)*currentState, (TI_UINT8)event, &nextState );
-    if ( status != TI_OK )
-    {
-        TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "measurementSRVSM_SMEvent: State machine error, failed getting next state\n");
-        return TI_NOK;
-    }
-
-    /* report the move */
-	TRACE3( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "measurementSRVSM_SMEvent: <currentState = %d, event = %d> --> nextState = %d\n", currentState, event, nextState);
-
-    /* move */
-    return fsm_Event( pMeasurementSRV->SM, (TI_UINT8*)currentState, (TI_UINT8)event, hMeasurementSrv );
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Handle a MEASURE_START_REQUEST event by requesting driver mode.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_requestDriverMode( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t    *pMeasurementSRV  = (measurementSRV_t*)hMeasurementSRV;
-    TI_STATUS           PSStatus;
-    TTwdParamInfo       paramInfo;
-
-    /* get the current channel */
-    paramInfo.paramType = TWD_CURRENT_CHANNEL_PARAM_ID;
-    cmdBld_GetParam (pMeasurementSRV->hCmdBld, &paramInfo);
-    
-    /* check if the request is on the serving channel */
-    if ( paramInfo.content.halCtrlCurrentChannel == pMeasurementSRV->msrRequest.channel )
-    {
-        /* Switch Power Save SRV to driver mode w/o changing power save mode*/
-        PSStatus = powerSrv_ReservePS( pMeasurementSRV->hPowerSaveSRV, POWER_SAVE_KEEP_CURRENT,
-                                       TI_TRUE, hMeasurementSRV, MacServices_measurementSRV_powerSaveCB );
-    }
-    else
-    {
-        /* Switch Power Save SRV to driver mode with PS mode */      
-        PSStatus = powerSrv_ReservePS( pMeasurementSRV->hPowerSaveSRV, POWER_SAVE_ON,
-                                       TI_TRUE, hMeasurementSRV, MacServices_measurementSRV_powerSaveCB );
-    }
-
-    switch (PSStatus)
-    {
-        case POWER_SAVE_802_11_IS_CURRENT:
-            TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Driver mode entered successfully\n");
-            /* send a power save success event */
-            return measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
-                                             MSR_SRV_EVENT_DRIVER_MODE_SUCCESS );
-    
-        case POWER_SAVE_802_11_PENDING:
-        case TI_OK:
-            TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Driver mode pending\n");
-            break;
-        
-        default: /* Error */
-            TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": Error %d when requesting driver mode\n",PSStatus);
-
-            /* Set the return status to TI_NOK */
-            pMeasurementSRV->returnStatus = PSStatus;
-
-            /* send a power save failure event */
-            measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
-                                      MSR_SRV_EVENT_DRIVER_MODE_FAILURE );
-            break;
-    }
-    
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Handle a DRIVER_MODE_SUCCESS event by sending start measure command to the FW.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_requestMeasureStart( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t     *pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-    TMeasurementParams    pMeasurementCmd;
-    TI_STATUS             status;
-    TI_UINT32                currentTime = os_timeStampMs( pMeasurementSRV->hOS );
-
-    /* check if request time has expired (note: timer wrap-around is also handled)*/
-    if ( (pMeasurementSRV->requestRecptionTimeStampMs + pMeasurementSRV->timeToRequestExpiryMs)
-                    < currentTime )
-    {
-        TI_INT32 i;
-
-        TRACE2( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": request time has expired, request expiry time:%d, current time:%d\n", pMeasurementSRV->requestRecptionTimeStampMs + pMeasurementSRV->timeToRequestExpiryMs, currentTime);
-
-        /* mark that all measurement types has failed */
-        for ( i = 0; i < pMeasurementSRV->msrRequest.numberOfTypes; i++ )
-        {
-            pMeasurementSRV->msrReply.msrTypes[ i ].status = TI_NOK;
-        }
-
-        /* send a measurement complete event */
-        measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
-                                  MSR_SRV_EVENT_STOP_COMPLETE );
-        
-        return TI_OK;
-    }
-
-    pMeasurementCmd.channel = pMeasurementSRV->msrRequest.channel;
-    pMeasurementCmd.band = pMeasurementSRV->msrRequest.band;
-    pMeasurementCmd.duration = 0; /* Infinite */
-    pMeasurementCmd.eTag = pMeasurementSRV->msrRequest.eTag;
-
-    if ( measurementSRVIsBeaconMeasureIncluded( hMeasurementSRV ))
-    {  /* Beacon Measurement is one of the types */
-
-		/* get the current channel */
-		TTwdParamInfo	paramInfo;
-
-		paramInfo.paramType = TWD_CURRENT_CHANNEL_PARAM_ID;
-		cmdBld_GetParam (pMeasurementSRV->hCmdBld, &paramInfo);
-
-		pMeasurementCmd.ConfigOptions = RX_CONFIG_OPTION_FOR_MEASUREMENT; 
-
-		/* check if the request is on the serving channel */
-		if ( paramInfo.content.halCtrlCurrentChannel == pMeasurementSRV->msrRequest.channel )
-		{
-			/* Set the RX Filter to the join one, so that any packets will 
-            be received on the serving channel - beacons and probe requests for
-			the measurmenet, and also data (for normal operation) */
-            pMeasurementCmd.FilterOptions = RX_FILTER_OPTION_JOIN;
-		}
-		else
-		{
-			/* not on the serving channle - only beacons and rpobe responses are required */
-			pMeasurementCmd.FilterOptions = RX_FILTER_OPTION_DEF_PRSP_BCN; 
-		}
-    }
-    else
-    {  /* No beacon measurement - use the current RX Filter */
-        pMeasurementCmd.ConfigOptions = 0xffffffff;
-        pMeasurementCmd.FilterOptions = 0xffffffff;
-    }
-
-    /* Send start measurement command */
-    status = cmdBld_CmdMeasurement (pMeasurementSRV->hCmdBld,
-                                    &pMeasurementCmd,
-                                    (void *)measurementSRVSM_requestMeasureStartResponseCB, 
-                                    pMeasurementSRV);
-    
-    if ( TI_OK != status )
-    {
-        TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": Failed to send measurement start command, statud=%d,\n", status);
-
-        /* keep the faulty return status */
-        pMeasurementSRV->returnStatus = status;
-
-        /* send a measurement start fail event */
-        return measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
-                                         MSR_SRV_EVENT_START_FAILURE );
-    }
-
-    TRACE6( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": measure start command sent. Params:\n channel=%d, band=%d, duration=%d, \n configOptions=0x%x, filterOptions=0x%x, status=%d, \n", pMeasurementCmd.channel, pMeasurementCmd.band, pMeasurementCmd.duration, pMeasurementCmd.ConfigOptions, pMeasurementCmd.FilterOptions, status);
-
-    /* start the FW guard timer */
-    pMeasurementSRV->bStartStopTimerRunning = TI_TRUE;
-    tmr_StartTimer (pMeasurementSRV->hStartStopTimer,
-                    MacServices_measurementSRV_startStopTimerExpired,
-                    (TI_HANDLE)pMeasurementSRV,
-                    MSR_FW_GUARD_TIME,
-                    TI_FALSE);
-  
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Handle a START_SUCCESS event by starting different measure types and setting timers.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_startMeasureTypes( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t      *pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-    TI_UINT8                 requestIndex, rangeIndex;
-    TI_INT8                  rangeUpperBound;
-    TTwdParamInfo         tTwdParam;
-    TI_STATUS             status;
-    TNoiseHistogram       pNoiseHistParams;
-    TApDiscoveryParams    pApDiscoveryParams;
-    TI_UINT32                currentTime = os_timeStampMs( pMeasurementSRV->hOS );
-
-    /* check if request time has expired (note: timer wrap-around is also handled)*/
-    if ( (pMeasurementSRV->requestRecptionTimeStampMs + pMeasurementSRV->timeToRequestExpiryMs)
-                    < currentTime )
-    {
-        TI_INT32 i;
-
-        TRACE2( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": request time has expired, request expiry time:%d, current time:%d\n", pMeasurementSRV->requestRecptionTimeStampMs + pMeasurementSRV->timeToRequestExpiryMs, currentTime);
-
-        /* mark that all measurement types has failed */
-        for ( i = 0; i < pMeasurementSRV->msrRequest.numberOfTypes; i++ )
-        {
-            pMeasurementSRV->msrReply.msrTypes[ i ].status = MSR_REJECT_MAX_DELAY_PASSED;
-        }
-
-        /* send a measurement complete event */
-        measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
-                                  MSR_SRV_EVENT_ALL_TYPES_COMPLETE );
-        
-        return TI_OK;
-    }
-
-    /* Going over all request types that should be executed in parallel 
-    to start their timers and execute the measurement */
-    for ( requestIndex = 0; requestIndex < pMeasurementSRV->msrRequest.numberOfTypes ; requestIndex++ )
-    {
-        switch (pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].msrType)
-        {
-        case MSR_TYPE_CCA_LOAD_MEASUREMENT:    
-            /* Clearing the Medium Occupancy Register */
-            tTwdParam.paramType = TWD_MEDIUM_OCCUPANCY_PARAM_ID;
-            tTwdParam.content.interogateCmdCBParams.fCb = (void *)MacServices_measurementSRV_dummyChannelLoadParamCB;
-            tTwdParam.content.interogateCmdCBParams.hCb = hMeasurementSRV;
-            tTwdParam.content.interogateCmdCBParams.pCb = 
-                    (TI_UINT8*)&pMeasurementSRV->mediumOccupancyResults;
-            status = cmdBld_GetParam (pMeasurementSRV->hCmdBld, &tTwdParam);
-            if( TI_OK == status  )
-            {
-                TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Medium Usage has been nullified, starting timer.\n");
-
-                /* Start Timer */
-                tmr_StartTimer (pMeasurementSRV->hRequestTimer[requestIndex],
-                                MacServices_measurementSRV_requestTimerExpired,
-                                (TI_HANDLE)pMeasurementSRV,
-                                pMeasurementSRV->msrRequest.msrTypes[requestIndex].duration, 
-                                TI_FALSE);
-                pMeasurementSRV->bRequestTimerRunning[requestIndex] = TI_TRUE;
-            }
-            else
-            {
-                TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": TWD_GetParam (for channel load) returned status %d\n", status);
-            }
-
-            break;
-        
-        case MSR_TYPE_NOISE_HISTOGRAM_MEASUREMENT:
-            /* Set Noise Histogram Cmd Params */
-            pNoiseHistParams.cmd = START_NOISE_HIST;
-            pNoiseHistParams.sampleInterval = DEF_SAMPLE_INTERVAL;
-            os_memoryZero( pMeasurementSRV->hOS, &(pNoiseHistParams.ranges[0]), MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES );
-        
-            /* Set Ranges */
-            /* (-87) - First Range's Upper Bound */
-            rangeUpperBound = -87;
-
-            /* Previously we converted from RxLevel to dBm - now this isn't necessary */
-            /* rangeUpperBound = TWD_convertRSSIToRxLevel( pMeasurementSRV->hTWD, -87); */
-
-            for(rangeIndex = 0; rangeIndex < MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES -1; rangeIndex++)
-            {
-                if(rangeUpperBound > 0)
-                {
-                    pNoiseHistParams.ranges[rangeIndex] = 0;
-                }
-                else
-                {               
-                    pNoiseHistParams.ranges[rangeIndex] = rangeUpperBound;
-                }         
-                rangeUpperBound += 5; 
-            }
-            pNoiseHistParams.ranges[rangeIndex] = 0xFE;
-
-            /* Print for Debug */
-            TRACE8(pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ":Noise histogram Measurement Ranges:\n%d %d %d %d %d %d %d %d\n", (TI_INT8) pNoiseHistParams.ranges[0], (TI_INT8) pNoiseHistParams.ranges[1], (TI_INT8) pNoiseHistParams.ranges[2], (TI_INT8) pNoiseHistParams.ranges[3], (TI_INT8) pNoiseHistParams.ranges[4], (TI_INT8) pNoiseHistParams.ranges[5], (TI_INT8) pNoiseHistParams.ranges[6], (TI_INT8) pNoiseHistParams.ranges[7]);
-
-            /* Send a Start command to the FW */
-            status = cmdBld_CmdNoiseHistogram (pMeasurementSRV->hCmdBld, &pNoiseHistParams, NULL, NULL);
-
-            if ( TI_OK == status )
-            {
-                /* Print for Debug */
-                TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Sent noise histogram command. Starting timer\n");
-
-                /* Start Timer */
-                tmr_StartTimer (pMeasurementSRV->hRequestTimer[requestIndex],
-                                MacServices_measurementSRV_requestTimerExpired,
-                                (TI_HANDLE)pMeasurementSRV,
-                                pMeasurementSRV->msrRequest.msrTypes[requestIndex].duration, 
-                                TI_FALSE);
-                pMeasurementSRV->bRequestTimerRunning[requestIndex] = TI_TRUE;
-            }
-            else
-            {
-                TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": TWD_NoiseHistogramCmd returned status %d\n", status);
-            }
-            break;
-        
-        case MSR_TYPE_BEACON_MEASUREMENT:
-            /* set all parameters in the AP discovery command */
-            pApDiscoveryParams.scanDuration = pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].duration * 1000; /* TODO change this to an infinite value (was 0) */
-            pApDiscoveryParams.numOfProbRqst = 1;
-            pApDiscoveryParams.txdRateSet = HW_BIT_RATE_1MBPS;
-            pApDiscoveryParams.ConfigOptions = RX_CONFIG_OPTION_FOR_MEASUREMENT;
-            pApDiscoveryParams.FilterOptions = RX_FILTER_OPTION_DEF_PRSP_BCN;
-            pApDiscoveryParams.txPowerDbm = pMeasurementSRV->msrRequest.txPowerDbm;
-            pApDiscoveryParams.scanOptions = SCAN_ACTIVE; /* both scan type and band are 0 for active and */
-                                                          /* 2.4 GHz, respectively, but 2.4 is not defined */
-
-            /* band determined at the initiate measurement command not at that structure */
-
-            /* scan mode go into the scan option field */
-            if ( MSR_SCAN_MODE_PASSIVE == pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].scanMode )
-            {
-                pApDiscoveryParams.scanOptions |= SCAN_PASSIVE;
-            }
-
-            /* Send AP Discovery command */
-            status = cmdBld_CmdApDiscovery (pMeasurementSRV->hCmdBld, &pApDiscoveryParams, NULL, NULL);
-
-            if ( TI_OK == status )
-            {
-                TRACE7( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": AP discovery command sent. Params:\n scanDuration=%d, scanOptions=%d, numOfProbRqst=%d, txdRateSet=%d, txPowerDbm=%d, configOptions=%d, filterOptions=%d\n Starting timer...\n", pApDiscoveryParams.scanDuration, pApDiscoveryParams.scanOptions, pApDiscoveryParams.numOfProbRqst, pApDiscoveryParams.txdRateSet, pApDiscoveryParams.txPowerDbm, pApDiscoveryParams.ConfigOptions, pApDiscoveryParams.FilterOptions);
-        
-                /* Start Timer */
-                tmr_StartTimer (pMeasurementSRV->hRequestTimer[requestIndex],
-                                MacServices_measurementSRV_requestTimerExpired,
-                                (TI_HANDLE)pMeasurementSRV,
-                                pMeasurementSRV->msrRequest.msrTypes[requestIndex].duration, 
-                                TI_FALSE);
-                pMeasurementSRV->bRequestTimerRunning[ requestIndex ] = TI_TRUE;
-            }
-            else
-            {
-                TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": TWD_ApDiscoveryCmd returned status %d\n", status);
-            }
-            break;
-
-        case MSR_TYPE_BASIC_MEASUREMENT: /* not supported in current implemntation */
-        case MSR_TYPE_FRAME_MEASUREMENT: /* not supported in current implemntation */
-        default:
-            TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": Measurement type %d is not supported\n", pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].msrType);
-            break;
-        }        
-    }
-
-    /* if no measurement types are running, sen al types complete event.
-       This can happen if all types failed to start */
-    if ( TI_TRUE == measurementSRVIsMeasurementComplete( hMeasurementSRV ))
-    {
-        /* send the event */
-        measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState), 
-                                  MSR_SRV_EVENT_ALL_TYPES_COMPLETE );
-    }
-
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Handle an ALL_TYPE_COMPLETE event by sending a stop measure command to the FW.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_requestMeasureStop( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-    TI_STATUS status;
-
-    /* since this function may also be called when stop is requested and start complete event
-       has not yet been received from the FW, we may need to stop the FW guard timer */
-    if (pMeasurementSRV->bStartStopTimerRunning)
-    {
-		tmr_StopTimer (pMeasurementSRV->hStartStopTimer);
-        pMeasurementSRV->bStartStopTimerRunning = TI_FALSE;
-    }
-
-    /* Send Measurement Stop command to the FW */
-    status = cmdBld_CmdMeasurementStop (pMeasurementSRV->hCmdBld, 
-                                        (void *)pMeasurementSRV->commandResponseCBFunc,
-                                        pMeasurementSRV->commandResponseCBObj);
-
-    pMeasurementSRV->commandResponseCBFunc = NULL;
-    pMeasurementSRV->commandResponseCBObj = NULL;
-    
-    if ( TI_OK != status )
-    {
-        TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": Failed to send measurement stop command, statud=%d,\n", status);
-
-        /* send a measurement complete event - since it can't be stopped */
-        measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState), MSR_SRV_EVENT_STOP_COMPLETE );
-        return TI_OK;
-    }
-
-    TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": measure stop command sent.\n");
-
-    /* start the FW guard timer */
-    pMeasurementSRV->bStartStopTimerRunning = TI_TRUE;
-    tmr_StartTimer (pMeasurementSRV->hStartStopTimer,
-                    MacServices_measurementSRV_startStopTimerExpired,
-                    (TI_HANDLE)pMeasurementSRV,
-                    MSR_FW_GUARD_TIME,
-                    TI_FALSE);
-
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Handle a STOP_COMPLETE event by exiting driver mode and calling the complete CB.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_completeMeasure( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t *pMeasurementSRV = (measurementSRV_t *)hMeasurementSRV;
-
-    /* Switch Power Save SRV back to user mode */
-    powerSrv_ReleasePS( pMeasurementSRV->hPowerSaveSRV, pMeasurementSRV->bSendNullDataWhenExitPs, NULL, NULL );
-
-    /* if the response CB is still pending, call it (when requestExpiryTimeStamp was reached) */
-    if ( NULL != pMeasurementSRV->commandResponseCBFunc )
-    {
-        pMeasurementSRV->commandResponseCBFunc( pMeasurementSRV->commandResponseCBObj, TI_OK );
-    }
-
-    /* call the complete CB */
-    if ( NULL != pMeasurementSRV->measurmentCompleteCBFunc )
-    {
-        pMeasurementSRV->measurmentCompleteCBFunc( pMeasurementSRV->measurementCompleteCBObj, 
-                                                   &(pMeasurementSRV->msrReply));
-    }
-
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Handle a STOP_REQUEST event when in WAIT_FOR_DRIVER_MODE state by exiting driver mode.
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_stopFromWaitForDriverMode( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-
-    /* Switch Power Save SRV back to user mode */
-    powerSrv_ReleasePS( pMeasurementSRV->hPowerSaveSRV, pMeasurementSRV->bSendNullDataWhenExitPs, NULL, NULL );
-
-    /* if we are not running within a stop request context (shouldn't happen), call the CBs */
-    if ( TI_FALSE == pMeasurementSRV->bInRequest )
-    {
-        TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": stop from wait for driver mode: not within a request context?!? \n");
-
-        /* call the response CB - this shouldn't happen, as only GWSI has response CB, and it shouldn't call
-           stop before driver */
-        if ( NULL != pMeasurementSRV->commandResponseCBFunc )
-        {
-            TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": stop from wait for driver mode: command response CB is not NULL?!? \n");
-            pMeasurementSRV->commandResponseCBFunc( pMeasurementSRV->commandResponseCBObj, TI_OK );
-
-            pMeasurementSRV->commandResponseCBFunc = NULL;
-            pMeasurementSRV->commandResponseCBObj = NULL;
-        }
-        /* call the complete CB */
-        if ( NULL != pMeasurementSRV->measurmentCompleteCBFunc )
-        {
-            /* mark that all types has failed */
-            TI_INT32 i;
-            for ( i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++ )
-            {
-                pMeasurementSRV->msrReply.msrTypes[ i ].status = TI_NOK;
-            }
-            /* call the complete CB */
-            pMeasurementSRV->measurmentCompleteCBFunc( pMeasurementSRV->measurementCompleteCBObj, 
-                                                       &(pMeasurementSRV->msrReply));
-        }
-        else
-        {
-            TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": stop from wait for driver mode and response CB is NULL!!!\n");
-        }
-    }
-    /* we are within a stop request context */
-    else
-    {
-        /* if the command response Cb is valid, send a measure stop command to the FW - 
-           although it is not necessary, we need it to get a different context for the command response.
-           This shouldn't happen, as only GWSI has command response, and it shouldn't call stop measure
-           before it got the commadn response for start measure */
-        if ( NULL != pMeasurementSRV->commandResponseCBFunc )
-        {
-            /* shouldn't happen - a command response is valid (GWSI) and stop measure called 
-               before measure start response was received (driver) */
-            TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": stop from wait for driver mode - within request context and command response is not NULL?!?\n");
-
-            cmdBld_CmdMeasurementStop (pMeasurementSRV->hCmdBld, 
-                                       (void *)pMeasurementSRV->commandResponseCBFunc,
-                                       pMeasurementSRV->commandResponseCBObj);
-
-            pMeasurementSRV->commandResponseCBFunc = NULL;
-            pMeasurementSRV->commandResponseCBObj = NULL;
-        }
-        if ( NULL != pMeasurementSRV->measurmentCompleteCBFunc )
-        {
-            /* Note: this is being called from request context, but there's npthing else that can be done */
-            /* mark that all types has failed */
-            TI_INT32 i;
-            for ( i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++ )
-            {
-                pMeasurementSRV->msrReply.msrTypes[ i ].status = TI_NOK;
-            }
-            /* call the complete CB */
-            pMeasurementSRV->measurmentCompleteCBFunc( pMeasurementSRV->measurementCompleteCBObj, 
-                                                       &(pMeasurementSRV->msrReply));
-        }
-    }
-
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 27-November-2005\n
- * \brief handle a STOP_REQUEST event when in WAIT_FOR_DRIVER_MODE by marking negative result status
- * \brief and calling the ordinary stop function
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_stopFromWaitForMeasureStart( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-    TI_INT32 i;
-
-    /* mark that all types has failed */
-    for ( i = 0; i < pMeasurementSRV->msrRequest.numberOfTypes; i++ )
-    {
-        pMeasurementSRV->msrReply.msrTypes[ i ].status = TI_NOK;
-    }
-
-    /* call the ordinary stop function (will send a measure stop command to FW) */
-    measurementSRVSM_requestMeasureStop( hMeasurementSRV );
-
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief handle a STOP_REQUEST event when in MEASURE_IN_PROGRESS by stopping all measure types and
- * \brief requesting measure stop from the FW.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_stopFromMeasureInProgress( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-    TNoiseHistogram   pNoiseHistParams;
-    TI_STATUS         status;
-    TI_INT32          i;
-
-    /* stop all running measure types */
-    for (i = 0; i < pMeasurementSRV->msrRequest.numberOfTypes; i++)
-    {
-        if (pMeasurementSRV->bRequestTimerRunning[i])
-        {
-            /* stop timer */
-			tmr_StopTimer (pMeasurementSRV->hRequestTimer[i]);
-            pMeasurementSRV->bRequestTimerRunning[i] = TI_FALSE;
-
-            /* if necessary, stop measurement type */
-            switch ( pMeasurementSRV->msrRequest.msrTypes[ i ].msrType )
-            {
-            case MSR_TYPE_BEACON_MEASUREMENT:
-                /* send stop AP discovery command */
-                status = cmdBld_CmdApDiscoveryStop (pMeasurementSRV->hCmdBld, NULL, NULL);
-                if ( TI_OK != status )
-                {
-                    TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": TWD_ApDiscoveryStop returned status %d\n", status);
-                }
-                break;
-
-            case MSR_TYPE_NOISE_HISTOGRAM_MEASUREMENT:
-                /* Set Noise Histogram Cmd Params */
-                pNoiseHistParams.cmd = STOP_NOISE_HIST;
-                pNoiseHistParams.sampleInterval = 0;
-                os_memoryZero( pMeasurementSRV->hOS, &(pNoiseHistParams.ranges[ 0 ]), MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES );
-
-                /* Send a Stop command to the FW */
-                status = cmdBld_CmdNoiseHistogram (pMeasurementSRV->hCmdBld, &pNoiseHistParams, NULL, NULL);
-
-                if ( TI_OK != status )
-                {
-                    TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": TWD_NoiseHistogramCmd returned status %d\n", status);
-                }
-                break;
-
-            /* These are just to avoid compilation warnings, nothing is actualy done here! */
-            case MSR_TYPE_BASIC_MEASUREMENT:
-            case MSR_TYPE_CCA_LOAD_MEASUREMENT:
-            case MSR_TYPE_FRAME_MEASUREMENT:
-            case MSR_TYPE_MAX_NUM_OF_MEASURE_TYPES:
-            default:
-                TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": unsupported measurement type: %d\n", pMeasurementSRV->msrRequest.msrTypes[ i ].msrType);
-                break;
-            }
-
-            /* mark that measurement has failed */
-            pMeasurementSRV->msrReply.msrTypes[ i ].status = TI_NOK;
-        }
-    }
-
-    /* Send Measurement Stop command to the FW */
-    status = cmdBld_CmdMeasurementStop (pMeasurementSRV->hCmdBld,
-                                        (void *)pMeasurementSRV->commandResponseCBFunc,
-                                        pMeasurementSRV->commandResponseCBObj);
-
-    pMeasurementSRV->commandResponseCBFunc = NULL;
-    pMeasurementSRV->commandResponseCBObj = NULL;
-    
-    if ( TI_OK != status )
-    {
-        TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": Failed to send measurement stop command, statud=%d,\n", status);
-
-        /* send a measurement complete event - since it can't be stopped */
-        measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
-                                  MSR_SRV_EVENT_STOP_COMPLETE );
-        return TI_OK;
-    }
-
-    TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": measure stop command sent.\n");
-
-    /* start the FW guard timer */
-    pMeasurementSRV->bStartStopTimerRunning = TI_TRUE;
-    tmr_StartTimer (pMeasurementSRV->hStartStopTimer,
-                    MacServices_measurementSRV_startStopTimerExpired,
-                    (TI_HANDLE)pMeasurementSRV,
-                    MSR_FW_GUARD_TIME,
-                    TI_FALSE);
-
-    return TI_OK; 
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief handle a DRIVER_MODE_FAILURE event by calling the response and complete CBs.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_DriverModeFailure( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-
-    /* this function can be called from within a request (when the power save SRV returned an immediate error),
-       or in a different context, when power save entry failed. The latter is a valid status, whereas the former
-       indicates a severe error. However, as there is nothing to do with the former (other than debug it), the same
-       failure indication is used for both of them, which will make the upper layer (Palau driver or TI measurement
-       manager) to return to idle state. Still, for the former the error is returned as the return status from the
-       measurement start API call whereas for the latter the error is indicated both by the command response and
-       measurement complete CBs status */
-
-    /* if we are running within a request context, don't call the CBs! The startMeasurement function
-       will return an invalid status instead */
-    if ( TI_FALSE == pMeasurementSRV->bInRequest )
-    {
-        /* if a response CB is available (GWSI) call it */
-        if ( NULL != pMeasurementSRV->commandResponseCBFunc )
-        {
-            pMeasurementSRV->commandResponseCBFunc( pMeasurementSRV->commandResponseCBObj, TI_NOK );
-        }
-
-        /* if a complete CB is available (both GWSI and TI driver), call it */
-        if ( NULL != pMeasurementSRV->measurmentCompleteCBFunc )
-        {
-            /* mark that all types has failed */
-            TI_INT32 i;
-            for ( i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++ )
-            {
-                pMeasurementSRV->msrReply.msrTypes[ i ].status = TI_NOK;
-            }
-            /* call the complete CB */
-            pMeasurementSRV->measurmentCompleteCBFunc( pMeasurementSRV->measurementCompleteCBObj, 
-                                                       &(pMeasurementSRV->msrReply));
-        }
-        else
-        {
-            TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": driver mode failure and complete CB is NULL!!!\n");
-        }
-    }
-
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief handle a START_FAILURE event by exiting driver mode and calling the complete CB.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_measureStartFailure( TI_HANDLE hMeasurementSRV )
-{
-    measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-
-    /* This function can be called from within a request context (if the driver mode entry process
-       was immediate), or from the driver mode CB context. Regardless of teh context in which it runs,
-       The error indicates that something is wrong in the HAL. There is no way to solve this (other than debug it).
-       The error is either indicating by the measurement start API return status (if still in the request context),
-       or by calling the response (if available, only in GWSI) and complete CBs with invalid status */
-
-    /* Switch Power save SRV back to user mode */
-    powerSrv_ReleasePS( pMeasurementSRV->hPowerSaveSRV, pMeasurementSRV->bSendNullDataWhenExitPs, NULL, NULL );
-
-    /* if we are running within a request context, don't call the CB! The startMeasurement function
-       will return an invalid status instead */
-    if ( TI_FALSE == pMeasurementSRV->bInRequest )
-    {
-        /* if a response CB is available (GWSI) call it */
-        if ( NULL != pMeasurementSRV->commandResponseCBFunc )
-        {
-            pMeasurementSRV->commandResponseCBFunc( pMeasurementSRV->commandResponseCBObj, TI_NOK );
-        }
-
-        /* if a complete CB is available (both GWSI and TI driver), call it */
-        if ( NULL != pMeasurementSRV->measurmentCompleteCBFunc )
-        {
-            /* mark that all types has failed */
-            TI_INT32 i;
-            for ( i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++ )
-            {
-                pMeasurementSRV->msrReply.msrTypes[ i ].status = TI_NOK;
-            }
-            /* call the complete CB */
-            pMeasurementSRV->measurmentCompleteCBFunc( pMeasurementSRV->measurementCompleteCBObj, 
-                                                       &(pMeasurementSRV->msrReply));
-        }
-        else
-        {
-            TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_ERROR, ": Start measurement failure and response and complete CBs are NULL!!!\n");
-        }
-    }
-
-    return TI_OK;
-}
-
-
-static void measurementSRVSM_requestMeasureStartResponseCB(TI_HANDLE hMeasurementSRV, TI_UINT32 uMboxStatus)
-{
-	measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-	TI_INT32 i;
-
-TRACE1( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": FW has responded with CMD_STATUS = %d\n", uMboxStatus);
-
-	if (uMboxStatus == TI_OK) 
-	{
-TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": FW has responded with CMD_STATUS_SUCCESS!\n");
-
-		if ( NULL != pMeasurementSRV->commandResponseCBFunc )
-        {
-            pMeasurementSRV->commandResponseCBFunc( pMeasurementSRV->commandResponseCBObj, TI_OK );
-        }
-	}
-	else
-	{
-		if (uMboxStatus == SG_REJECT_MEAS_SG_ACTIVE) 
-		{
-TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": FW has responded with CMD_STATUS_REJECT_MEAS_SG_ACTIVE!\n");
-		}
-
-TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, ": FW has responded with CMD_STATUS NOK!!!\n");
-
-
-		/* if a timer is running, stop it */
-		if ( TI_TRUE == pMeasurementSRV->bStartStopTimerRunning )
-		{
-TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "***** STOP TIMER 8 *****\n");
-			tmr_StopTimer( pMeasurementSRV->hStartStopTimer );
-			pMeasurementSRV->bStartStopTimerRunning = TI_FALSE;
-		}
-		for ( i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++ )
-		{
-			if ( TI_TRUE == pMeasurementSRV->bRequestTimerRunning[ i ] )
-			{
-				tmr_StopTimer( pMeasurementSRV->hRequestTimer[ i ] );
-				pMeasurementSRV->bRequestTimerRunning[ i ] = TI_FALSE;
-			}
-		}
-		
-		measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
-											 MSR_SRV_EVENT_START_FAILURE );
-	}
-}
-
-
-/**
- * \author Ronen Kalish\n
- * \date 23-December-2005\n
- * \brief Handles a stop request when no stop is needed (SM is either idle or already send stop command to FW.\n
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSrv - handle to the measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSRVSM_dummyStop( TI_HANDLE hMeasurementSrv )
-{
-    measurementSRV_t *pMeasurementSRV = (measurementSRV_t*)hMeasurementSrv;
-
-    TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_WARNING, ": sending unnecessary stop measurement command to FW...\n");
-
-    /* send a stop command to FW, to obtain a different context in ehich to cal the command response CB */
-    cmdBld_CmdMeasurementStop (pMeasurementSRV->hCmdBld, 
-                               (void *)pMeasurementSRV->commandResponseCBFunc,
-                               pMeasurementSRV->commandResponseCBObj);
-
-    pMeasurementSRV->commandResponseCBFunc = NULL;
-    pMeasurementSRV->commandResponseCBObj = NULL;
-
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 17-November-2005\n
- * \brief Handles an unexpected event.\n
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSrv - handle to the measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS actionUnexpected( TI_HANDLE hMeasurementSrv ) 
-{
-    measurementSRV_t *pMeasurementSRV = (measurementSRV_t*)hMeasurementSrv;
-    TI_INT32 i;
-
-    TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_SM, ": measurement SRV state machine error, unexpected Event\n");
-
-    if (pMeasurementSRV->bStartStopTimerRunning)
-    {
-		tmr_StopTimer (pMeasurementSRV->hStartStopTimer);
-        pMeasurementSRV->bStartStopTimerRunning = TI_FALSE;
-    }
-
-    for (i = 0; i < MAX_NUM_OF_MSR_TYPES_IN_PARALLEL; i++)
-    {
-        if (pMeasurementSRV->bRequestTimerRunning[i])
-        {
-			tmr_StopTimer (pMeasurementSRV->hRequestTimer[i]);
-            pMeasurementSRV->bRequestTimerRunning[i] = TI_FALSE;
-        }
-    }
-
-    /* we must clean the old command response CB since they are no longer relevant 
-      since the state machine may be corrupted */
-    pMeasurementSRV->commandResponseCBFunc = NULL;
-    pMeasurementSRV->commandResponseCBObj = NULL;
-
-    /* indicate the unexpected event in the return status */
-    pMeasurementSRV->returnStatus = TI_NOK;
-    
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Handles an event that doesn't require any action.\n
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSrv - handle to the measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS actionNop( TI_HANDLE hMeasurementSrv )
-{   
-    return TI_OK;
-}
-
diff --git a/wl1271/TWD/MacServices/MeasurementSrvSM.h b/wl1271/TWD/MacServices/MeasurementSrvSM.h
deleted file mode 100644
index 6c502e9..0000000
--- a/wl1271/TWD/MacServices/MeasurementSrvSM.h
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * MeasurementSrvSM.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file MeasurementSrv.h
- *  \brief This file include private definitions for the Measurement SRV state machine.
- *  \author Ronen Kalish
- *  \date 08-November-2005
- */
-
-#ifndef __MEASUREMENT_SRV_SM_H__
-#define __MEASUREMENT_SRV_SM_H__
-
-
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-
-
-/*
- ***********************************************************************
- *	Enums.
- ***********************************************************************
- */
-
-/** \enum measurement_SRVSMEvents_e
- * \brief enumerates the different measurement SRV state machine events.
- */
-typedef enum
-{
-    MSR_SRV_EVENT_MEASURE_START_REQUEST       = 0,
-    MSR_SRV_EVENT_DRIVER_MODE_SUCCESS,
-    MSR_SRV_EVENT_DRIVER_MODE_FAILURE,
-    MSR_SRV_EVENT_START_SUCCESS,
-    MSR_SRV_EVENT_START_FAILURE,
-    MSR_SRV_EVENT_ALL_TYPES_COMPLETE,
-    MSR_SRV_EVENT_STOP_COMPLETE,
-    MSR_SRV_EVENT_MEASURE_STOP_REQUEST,
-    MSR_SRV_NUM_OF_EVENTS
-} measurement_SRVSMEvents_e;
-
-/** \enum measurement_SRVSMStates_e
- * \brief enumerates the different measurement SRV state machine states.
- */
-typedef enum
-{
-    MSR_SRV_STATE_IDLE                      =0,
-    MSR_SRV_STATE_WAIT_FOR_DRIVER_MODE,
-    MSR_SRV_STATE_WAIT_FOR_MEASURE_START,
-    MSR_SRV_STATE_MEASURE_IN_PROGRESS,
-    MSR_SRV_STATE_WAIT_FOR_MEASURE_STOP,
-    MSR_SRV_NUM_OF_STATES
-} measurements_SRVSMStates_e;
-
-
-/*
- ***********************************************************************
- *	Typedefs.
- ***********************************************************************
- */
-
-
-/*
- ***********************************************************************
- *	Structure definitions.
- ***********************************************************************
-*/
-
-/*
- ***********************************************************************
- *	External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Initialize the measurement SRV SM.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS measurementSRVSM_init( TI_HANDLE hMeasurementSRV );
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Processes an event.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the measurement SRV object.\n
- * \param currentState - the current scan SRV SM state.\n
- * \param event - the event to handle.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS measurementSRVSM_SMEvent( TI_HANDLE hMeasurementSrv, measurements_SRVSMStates_e* currentState, 
-                                    measurement_SRVSMEvents_e event );
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Handle a MEASURE_START_REQUEST event by requesting driver mode.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_requestDriverMode( TI_HANDLE hMeasurementSRV );
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Handle a DRIVER_MODE_SUCCESS event by sending start measure command to the FW.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_requestMeasureStart( TI_HANDLE hMeasurementSRV );
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Handle a START_SUCCESS event by starting different measure types and setting timers.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_startMeasureTypes( TI_HANDLE hMeasurementSRV );
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Handle an ALL_TYPE_COMPLETE event by sending a stop measure command to the FW.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_requestMeasureStop( TI_HANDLE hMeasurementSRV );
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Handle a STOP_COMPLETE event by exiting driver mode and calling the complete CB.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_completeMeasure( TI_HANDLE hMeasurementSRV );
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief Handle a STOP_REQUEST event when in WAIT_FOR_DRIVER_MODE state by exiting driver mode.
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_stopFromWaitForDriverMode( TI_HANDLE hMeasurementSRV );
-
-/**
- * \author Ronen Kalish\n
- * \date 27-November-2005\n
- * \brief handle a STOP_REQUEST event when in WAIT_FOR_DRIVER_MODE by marking negative result status
- * \brief and callin the ordinary stop function
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_stopFromWaitForMeasureStart( TI_HANDLE hMeasurementSRV );
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief handle a STOP_REQUEST event when in MEASURE_IN_PROGRESS by stopping all measure types and
- * \brief requesting measure stop from the FW.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_stopFromMeasureInProgress( TI_HANDLE hMeasurementSRV );
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief handle a DRIVER_MODE_FAILURE event by calling the response CB.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_DriverModeFailure( TI_HANDLE hMeasurementSRV );
-
-/**
- * \author Ronen Kalish\n
- * \date 08-November-2005\n
- * \brief handle a START_FAILURE event by exiting driver mode and calling the complete CB.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSrv - handle to the Measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSM_measureStartFailure( TI_HANDLE hMeasurementSRV );
-
-/**
- * \author Ronen Kalish\n
- * \date 23-December-2005\n
- * \brief Handles a stop request when no stop is needed (SM is either idle or already send stop command to FW.\n
- *
- * Function Scope \e Private.\n
- * \param hMeasurementSrv - handle to the measurement SRV object.\n
- * \return always TI_OK.\n
- */
-TI_STATUS measurementSRVSRVSM_dummyStop( TI_HANDLE hmeasurementSrv );
-
-#endif /* __MEASUREMENT_SRV_SM_H__ */
-
diff --git a/wl1271/TWD/MacServices/PowerSrv.c b/wl1271/TWD/MacServices/PowerSrv.c
deleted file mode 100644
index 71c33ac..0000000
--- a/wl1271/TWD/MacServices/PowerSrv.c
+++ /dev/null
@@ -1,812 +0,0 @@
-/*
- * PowerSrv.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file powerSrv.c
- *  \brief This is the powerSrv module implementation.
- *  \author Assaf Azulay
- *  \date 19-Oct-2005
- */
-
-/****************************************************************************
- *                                                                                                           *
- *   MODULE:  powerSrv                                                                                  *
- *   PURPOSE: powerSrv Module implementation.                                                   *
- *                                                                                                              *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_113
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "timer.h"
-#include "PowerSrv.h"
-#include "PowerSrv_API.h"
-#include "PowerSrvSM.h"
-#include "eventMbox_api.h"
-
-
-/*****************************************************************************
- **         Defines                                                         **
- *****************************************************************************/
-
-
-
-/****************************************************************************************
-**         Private Function prototypes                                                                              **
-****************************************************************************************/
-static void     powerSrv802_11PsReport  (TI_HANDLE hPowerSrv, char* str , TI_UINT32 strLen);
-TI_STATUS   powerSrvProcessRequest  (TI_HANDLE hPowerSrv, powerSrvMode_e requestMode);
-void powerSrvCreatePssRequest (TI_HANDLE                    hPowerSrv,
-                               powerSrvMode_e              requestMode,
-                               powerSrvRequestState_e      requestState,
-                               E80211PsMode                psMode,
-                               TI_BOOL                        sendNullDataOnExit,
-                               void *                      powerSaveCBObject,
-                               powerSaveCmpltCB_t          powerSaveCompleteCB,
-                               powerSaveCmdResponseCB_t    powerSaveCmdResponseCB);
-
-/***************************************************************************************
-**                                 Functions                                                                    **
-****************************************************************************************/
-
-
-
-/****************************************************************************************
- *                        powerSrv_create                                                           *
- ****************************************************************************************
-DESCRIPTION: Power Server module creation function, called by the MAC Services create in creation phase 
-                performs the following:
-                -   Allocate the Power Server handle
-                -   Creates the Power Server State Machine
-                                                                                                                   
-INPUT:          - hOs - Handle to OS        
-
-
-OUTPUT:     
-
-RETURN:     Handle to the Power Server module on success, NULL otherwise
-****************************************************************************************/
-TI_HANDLE powerSrv_create(TI_HANDLE hOs)
-{
-    powerSrv_t * pPowerSrv = NULL;
-    pPowerSrv = (powerSrv_t*) os_memoryAlloc (hOs, sizeof(powerSrv_t));
-    if ( pPowerSrv == NULL )
-    {
-        WLAN_OS_REPORT(("powerSrv_create - Memory Allocation Error!\n"));
-        return NULL;
-    }
-
-    os_memoryZero (hOs, pPowerSrv, sizeof(powerSrv_t));
-
-    pPowerSrv->hOS = hOs;
-
-    /*creation of the State Machine*/
-    pPowerSrv->hPowerSrvSM = powerSrvSM_create(hOs);
-    if ( pPowerSrv->hPowerSrvSM == NULL )
-    {
-        WLAN_OS_REPORT(("powerSrv_create - Error in create PowerSrvSM module!\n"));
-        powerSrv_destroy(pPowerSrv);
-        return NULL;
-    }
-
-    return pPowerSrv;
-
-}
-
-
-/****************************************************************************************
- *                        powerSrv_destroy                                                          *
- ****************************************************************************************
-DESCRIPTION: Power Server module destroy function, c
-                -   delete Power Server allocation
-                -   call the destroy function of the State machine
-                                                                                                                   
-INPUT:          - hPowerSrv - Handle to the Power Server    
-
-
-OUTPUT:     
-
-RETURN:    TI_STATUS - TI_OK on success else TI_NOK.
-****************************************************************************************/
-TI_STATUS powerSrv_destroy(TI_HANDLE hPowerSrv)
-{
-    powerSrv_t *pPowerSrv = (powerSrv_t*)hPowerSrv;
-
-    if ( pPowerSrv->hPowerSrvSM != NULL )
-    {
-        powerSrvSM_destroy(pPowerSrv->hPowerSrvSM);
-    }
-
-    os_memoryFree(pPowerSrv->hOS , pPowerSrv , sizeof(powerSrv_t));
-
-    return TI_OK;
-}
-
-
-/****************************************************************************************
- *                        powerSrvSM_init                                                           *
- ****************************************************************************************
-DESCRIPTION: Power Server module initialize function, called by the MAC Services in initialization phase 
-                performs the following:
-                -   init the Power server to active state.
-                -   call the init function of the state machine.
-                                                                                                                   
-INPUT:      - hPowerSrv         - handle to the PowerSrv object.        
-            - hReport           - handle to the Report object.
-            - hEventMbox        - handle to the Event Mbox object.    
-            - hCmdBld           - handle to the Command Builder object.    
-
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK on success else TI_NOK.
-****************************************************************************************/
-TI_STATUS powerSrv_init (TI_HANDLE hPowerSrv,
-                         TI_HANDLE hReport,
-                         TI_HANDLE hEventMbox,
-                         TI_HANDLE hCmdBld,
-                         TI_HANDLE hTimer)
-{
-    powerSrv_t* pPowerSrv = (powerSrv_t*)hPowerSrv;
-
-    pPowerSrv->hReport = hReport;
-    pPowerSrv->hEventMbox = hEventMbox;
-
-    /*
-    init PowerSrv state machine.
-    */
-    powerSrvSM_init (pPowerSrv->hPowerSrvSM, hReport, hCmdBld, hTimer);
-
-    pPowerSrv->currentMode = USER_MODE;
-
-    /*init all request with init values*/
-    powerSrvCreatePssRequest(hPowerSrv,
-                             USER_MODE,
-                             HANDLED_REQUEST,
-                             POWER_SAVE_OFF,
-                             TI_FALSE,
-                             NULL,
-                             NULL,
-                             NULL);
-    powerSrvCreatePssRequest(hPowerSrv,
-                             DRIVER_MODE,
-                             HANDLED_REQUEST,
-                             POWER_SAVE_OFF,
-                             TI_FALSE,
-                             NULL,
-                             NULL,
-                             NULL);
-    pPowerSrv->userLastRequestMode = (powerSrvMode_e)POWER_SAVE_OFF;
-    pPowerSrv->pCurrentRequest  = & pPowerSrv->userRequest;
-
-    /*
-    register for Event 
-    */
-
-	eventMbox_RegisterEvent (hEventMbox,
-                             TWD_OWN_EVENT_PS_REPORT,
-                             (void *)powerSrv802_11PsReport,
-                             hPowerSrv);
-
-    eventMbox_UnMaskEvent (hEventMbox, TWD_OWN_EVENT_PS_REPORT, NULL, NULL);
-
-    TRACE0(pPowerSrv->hReport, REPORT_SEVERITY_INIT, "powerSrv Initialized \n");
-
-    return TI_OK;
-}
-
-/****************************************************************************************
- *                        powerSrv_restart															*
- ****************************************************************************************
-DESCRIPTION: Restart the scan SRV module upon recovery.
-				-	init the Power server to active state.
-				-	call the init function of the state machine.
-				                                                                                                   
-INPUT:     	- hPowerSrv 			- handle to the PowerSrv object.		
-
-OUTPUT:	
-RETURN:    TI_STATUS - TI_OK on success else TI_NOK.
-****************************************************************************************/
-TI_STATUS powerSrv_restart(	TI_HANDLE hPowerSrv)
-{
-    powerSrv_t* pPowerSrv = (powerSrv_t*)hPowerSrv;
-	PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)pPowerSrv->hPowerSrvSM;
-    /*
-    init PowerSrv state machine.
-    */
-	/*
-	the PowerSrvSM start in active mode (POWER_SRV_STATE_ACTIVE)
-	the PowerSrvSM::currentState must be sync with the PowerSrv::desiredPowerModeProfile (POWER_MODE_ACTIVE).
-	*/
-	pPowerSrvSM->currentState = POWER_SRV_STATE_ACTIVE;
-    pPowerSrv->currentMode = USER_MODE;
-    tmr_StopTimer (pPowerSrvSM->hPwrSrvSmTimer);
-
-    /*init all request with init values*/
-    powerSrvCreatePssRequest(hPowerSrv,
-							USER_MODE,
-							HANDLED_REQUEST,
-							POWER_SAVE_OFF,
-							TI_FALSE,
-							NULL,
-							NULL,
-							NULL);
-    powerSrvCreatePssRequest(hPowerSrv,
-							DRIVER_MODE,
-							HANDLED_REQUEST,
-							POWER_SAVE_OFF,
-							TI_FALSE,
-							NULL,
-							NULL,
-							NULL);
-	pPowerSrv->userLastRequestMode = (powerSrvMode_e)POWER_SAVE_OFF;
-    pPowerSrv->pCurrentRequest 	= & pPowerSrv->userRequest;
-
-	/*
-	register for Event 
-	*/
-	eventMbox_RegisterEvent (pPowerSrv->hEventMbox,
-							 TWD_OWN_EVENT_PS_REPORT,
-							 (void *)powerSrv802_11PsReport,
-							 hPowerSrv);
-
-	eventMbox_UnMaskEvent (pPowerSrv->hEventMbox, TWD_OWN_EVENT_PS_REPORT, NULL, NULL);
-
-    return TI_OK;
-}
-
-/****************************************************************************************
- *                        powerSrv_config                                                           *
- ****************************************************************************************
-DESCRIPTION: Power Server module configuration function, called by the MAC Services in configure phase 
-                performs the following:
-                -   init the Power server to active state.
-                -   call the init function of the state machine.
-                                                                                                                   
-INPUT:      - hPowerSrv             - handle to the PowerSrv object.            
-            - pPowerSrvInitParams   - the Power Server initialize parameters.
-
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK on success else TI_NOK.
-****************************************************************************************/
-TI_STATUS powerSrv_config(  TI_HANDLE               hPowerSrv,
-                            TPowerSrvInitParams    *pPowerSrvInitParams)
-{
-    powerSrv_t* pPowerSrv = (powerSrv_t*)hPowerSrv;
-
-    /*
-    config PowerSrv state machine.
-    */
-    powerSrvSM_config(   pPowerSrv->hPowerSrvSM,
-                         pPowerSrvInitParams);
-
-    return TI_OK;
-}
-/****************************************************************************************
- *                        powerSrv_SetPsMode                                                            *
- ****************************************************************************************
-DESCRIPTION: This function is a user mode request from the Power Save Server.
-              it will create a Request from the "USER_REQUEST" and will try to perform the user request for PS/Active.
-              this will be done in respect of priority to Driver request.
-                                                                                                                   
-INPUT:      - hPowerSrv                         - handle to the PowerSrv object.        
-            - psMode                            - Power save/Active request
-            - sendNullDataOnExit                - 
-            - powerSaveCBObject     - handle to the Callback function module.
-            - powerSaveCompleteCB           - Callback function - for success/faild notification.
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK / PENDING / TI_NOK.
-****************************************************************************************/
-TI_STATUS powerSrv_SetPsMode(   TI_HANDLE                   hPowerSrv,
-                                E80211PsMode                psMode,
-                                TI_BOOL                        sendNullDataOnExit,
-                                void *                      powerSaveCBObject,
-                                powerSaveCmpltCB_t          powerSaveCompleteCB,
-                                powerSaveCmdResponseCB_t    powerSavecmdResponseCB)
-
-{
-    powerSrv_t *pPowerSrv = (powerSrv_t*)hPowerSrv;
-    TI_STATUS status;
-/*creating the request from type - "user"*/
-    powerSrvCreatePssRequest(hPowerSrv,
-                             USER_MODE,
-                             NEW_REQUEST,
-                             psMode,
-                             sendNullDataOnExit,
-                             powerSaveCBObject,
-                             powerSaveCompleteCB,
-                             powerSavecmdResponseCB);
-
-/*the request will be handled if the Power server is not in Driver mode.*/
-    if ( pPowerSrv->currentMode==USER_MODE )
-    {
-        status = powerSrvProcessRequest(hPowerSrv,pPowerSrv->userRequest.requestMode);
-    }
-    else/*driver mode*/
-    {
-        pPowerSrv->userRequest.requestState = PENDING_REQUEST;
-        status = POWER_SAVE_802_11_PENDING;
-    }
-    return status;
-
-}
-
-
-/****************************************************************************************
- *                        powerSrv_ReservePS                                                        *
- ****************************************************************************************
-DESCRIPTION: This function is a driver mode request to set the 802.11 Power Save state and reserve the module.
-              The module should not be in driver mode when this request is made. 
-              If this function is called when the module is already in driver mode the result is unexpected. 
-              If the request cannot be fulfilled because of currently executing user mode request, 
-              then the function will return PENDING and the powerSaveCompleteCB function will be called when the request is fulfilled. 
-              If the request can be fulfilled immediately and the Power Save state required is the current state 
-              (This is always the case when PSMode = KEEP_CURRENT),
-              then the module will be reserved and the function will return TI_OK - the callback function will not be called.?? 
-              If the request can be fulfilled immediately and requires a Power Save state transition,
-              then the return value will be TI_OK and the powerSaveCompleteCB function will be called by the Power Save Server
-              when the request is complete.
-                                                                                                                   
-INPUT:      - hPowerSrv                         - handle to the PowerSrv object.        
-            - psMode                            - Power save/Active request
-            - sendNullDataOnExit                - 
-            - powerSaveCBObject     - handle to the Callback function module.
-            - powerSaveCompleteCB           - Callback function - for success/faild notification.
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK / PENDING / TI_NOK.
-****************************************************************************************/
-TI_STATUS powerSrv_ReservePS(   TI_HANDLE               hPowerSrv,
-                                E80211PsMode            psMode,
-                                TI_BOOL                    sendNullDataOnExit,
-                                void *                  powerSaveCBObject,
-                                powerSaveCmpltCB_t      powerSaveCompleteCB)
-{
-    powerSrv_t *pPowerSrv = (powerSrv_t*)hPowerSrv;
-    TI_STATUS status;
-
-    /*creating the request from type - "driver"*/
-    if ( psMode == POWER_SAVE_KEEP_CURRENT )
-    {
-        psMode = pPowerSrv->userRequest.psMode;
-    }
-
-    powerSrvCreatePssRequest(hPowerSrv,
-                             DRIVER_MODE,
-                             NEW_REQUEST,
-                             psMode,
-                             sendNullDataOnExit,
-                             powerSaveCBObject,
-                             powerSaveCompleteCB,
-                             NULL);
-    /*try to execute the request*/
-    status = powerSrvProcessRequest(hPowerSrv,pPowerSrv->driverRequest.requestMode);
-    return status;
-
-}
-
-
-/****************************************************************************************
- *                        powerSrv_ReleasePS                                                        *
- ****************************************************************************************
-DESCRIPTION: This function is used to release a previous driver mode request issued with the ReservPS API. 
-              it creates a Driver request and the server act like it is a normal driver request.
-              the server will send the request with a simple optimization - if there is a pending or 
-              new user request - the request will be added in the driver request, in this way when the 
-              user request  will be executed there will be nothing to do, in the same manner if there 
-              are no user / driver request to execute we will send the last user request in Driver mode. 
-               
-              
-              
-                                                                                                                   
-INPUT:      - hPowerSrv                         - handle to the PowerSrv object.        
-            - sendNullDataOnExit                - 
-            - powerSaveCBObject     - handle to the Callback function module.
-            - powerSaveCompleteCB           - Callback function - for success/faild notification.
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK / PENDING / TI_NOK.
-****************************************************************************************/
-TI_STATUS powerSrv_ReleasePS(   TI_HANDLE                   hPowerSrv,
-                                TI_BOOL                        sendNullDataOnExit,
-                                void *                          powerSaveCBObject,
-                                powerSaveCmpltCB_t              powerSaveCompleteCB)
-{
-    powerSrv_t *pPowerSrv = (powerSrv_t*)hPowerSrv;
-    TI_STATUS status;
-
-    /*creating the request from type - "driver"*/
-
-    if (pPowerSrv->driverRequest.requestMode == POWER_SAVE_802_11_PENDING)
-    {
-        powerSrvCreatePssRequest(hPowerSrv,
-                                 DRIVER_MODE,
-                                 HANDLED_REQUEST,
-                                 POWER_SAVE_OFF,
-                                 TI_FALSE,
-                                 NULL,
-                                 NULL,
-                                 NULL);
-        return POWER_SAVE_802_11_IS_CURRENT;
-    }
-
-    /*creating the request from type - "driver"*/
-    powerSrvCreatePssRequest(hPowerSrv,
-                             DRIVER_MODE,
-                             NEW_REQUEST,
-                             POWER_SAVE_KEEP_CURRENT,
-                             sendNullDataOnExit,
-                             powerSaveCBObject,
-                             powerSaveCompleteCB,
-                             NULL);
-    if ( pPowerSrv->userRequest.requestState == NEW_REQUEST ||
-         pPowerSrv->userRequest.requestState == PENDING_REQUEST )
-    {
-        pPowerSrv->driverRequest.psMode = pPowerSrv->userRequest.psMode;
-    }
-    else
-    {
-        pPowerSrv->driverRequest.psMode = (E80211PsMode)pPowerSrv->userLastRequestMode;
-    }
-
-
-
-    status = powerSrvProcessRequest(hPowerSrv,pPowerSrv->driverRequest.requestMode);
-    /*if the request was not executed we should not change the mode*/
-    if (status != POWER_SAVE_802_11_PENDING)
-    {
-        pPowerSrv->currentMode = USER_MODE;
-    }
-    return status;
-}
-
-
-
-/****************************************************************************************
- *                        powerSrv_getPsStatus                                                       *
- *****************************************************************************************
-DESCRIPTION: This function returns the true state of power.
-                                                                                                                                                                       
-INPUT:      - hPowerSrv                         - handle to the PowerSrv object.        
-            
-OUTPUT: 
-RETURN:    TI_BOOL - true if the SM is in PS state -  false otherwise
-****************************************************************************************/
-TI_BOOL powerSrv_getPsStatus(TI_HANDLE hPowerSrv)
-{
-    powerSrv_t *pPowerSrv = (powerSrv_t*)hPowerSrv;
-    PowerSrvSMStates_e smState;
-    smState = powerSrvSM_getCurrentState(pPowerSrv->hPowerSrvSM);
-    return(smState == POWER_SRV_STATE_PS );
-}
-
-
-/****************************************************************************************
-*                        powerSrv_SetRateModulation                                                         *
-*****************************************************************************************
-DESCRIPTION: Sets the rate modulation according to the current Radio Mode.
-                                                                                                                                                                      
-INPUT:      - hPowerSrv                         - handle to the PowerSrv object.
-           - dot11mode_e - The current radio mode (A or G)
-           
-OUTPUT: 
-RETURN:    TI_BOOL - true if the SM is in PS state -  false otherwise
-****************************************************************************************/
-void powerSrv_SetRateModulation(TI_HANDLE hPowerSrv, TI_UINT16  rate)
-{
-    powerSrv_t *pPowerSrv = (powerSrv_t*)hPowerSrv;
-    powerSrvSM_setRateModulation(pPowerSrv->hPowerSrvSM,rate);
-
-    return;
-}
-
-/**
- * \Gets the rate modulation.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerSrvSM object.\n
- * 2) dot11mode_e - The current radio mode (A or G)
- * Return: None.\n
- */
-TI_UINT32 powerSrv_GetRateModulation(TI_HANDLE hPowerSrv)
-{
-    powerSrv_t *pPowerSrv = (powerSrv_t*)hPowerSrv;
-    return powerSrvSM_getRateModulation(pPowerSrv->hPowerSrvSM);
-}
-
-
-
-
-/*****************************************************************************
- **         Private Function prototypes                                                             **
- *****************************************************************************/
-
-
-/****************************************************************************************
- *                        powerSrv802_11PsReport                                                    *
- ****************************************************************************************
-DESCRIPTION:  This function is the call back for the TWD control when a PS event triggered
-              This function is responsible for the process "keep alive".
-              the function handles the event and sends it to the state machine, after sending the events 
-              the function handles the next request with respect to driver request priority.
-              if a request is already done then we will call the request call back (if exist!).
-               
-              
-              
-                                                                                                                   
-INPUT:      - hPowerSrv                         - handle to the PowerSrv object.        
-            - str                               - Event string   
-            - strLen                            - string length
-
-OUTPUT: 
-RETURN:    void.
-****************************************************************************************/
-static void powerSrv802_11PsReport(TI_HANDLE hPowerSrv, char* str , TI_UINT32 strLen)
-{
-    powerSrv_t *    pPowerSrv = (powerSrv_t*)hPowerSrv;
-    TI_UINT8           PowerSaveStatus;
-    E80211PsMode    currentPsMode;
-    TI_STATUS       status = TI_OK;
-
-    /*copy the event*/
-    os_memoryCopy(pPowerSrv->hOS, (void *)&PowerSaveStatus, (void *)str, strLen);
-
-    TRACE1( pPowerSrv->hReport, REPORT_SEVERITY_INFORMATION, "PS callback with status: %d\n", PowerSaveStatus);
-
-    /* Handling the event*/
-    switch ( (EventsPowerSave_e)PowerSaveStatus )
-    {
-    case ENTER_POWER_SAVE_FAIL:
-    case EXIT_POWER_SAVE_FAIL:
-        TRACE0( pPowerSrv->hReport, REPORT_SEVERITY_WARNING, "Power save enter or exit failed!\n");
-        powerSrvSM_SMApi(pPowerSrv->hPowerSrvSM,POWER_SRV_EVENT_FAIL);
-        break;
-
-    case ENTER_POWER_SAVE_SUCCESS:
-	case EXIT_POWER_SAVE_SUCCESS:
-        powerSrvSM_SMApi(pPowerSrv->hPowerSrvSM,POWER_SRV_EVENT_SUCCESS);
-        /*update the last user request if the request was a user request*/
-        if ( pPowerSrv->currentMode == USER_MODE )
-        {
-            pPowerSrv->userLastRequestMode= (powerSrvMode_e)pPowerSrv->userRequest.psMode;
-        }
-        break;
-
-    default:
-        TRACE1( pPowerSrv->hReport, REPORT_SEVERITY_ERROR, "Unrecognized status at PS callback %d\n", PowerSaveStatus );
-        break;
-    }
-
-    /*this reflects the true power save state - power save IFF state machine in PS state.*/
-    if ( (EventsPowerSave_e)PowerSaveStatus == ENTER_POWER_SAVE_SUCCESS )
-    {
-        currentPsMode = POWER_SAVE_ON;
-    }
-    else
-    {
-        currentPsMode = POWER_SAVE_OFF;
-    }
-
-    /*in case of  request has been already handled - calling the CB*/
-    if ( pPowerSrv->pCurrentRequest->requestState == HANDLED_REQUEST )
-    {
-        if ( pPowerSrv->pCurrentRequest->powerSrvCompleteCB != NULL )
-        {
-            pPowerSrv->pCurrentRequest->powerSrvCompleteCB( pPowerSrv->pCurrentRequest->powerSaveCBObject,
-                                                            currentPsMode,
-                                                            (EventsPowerSave_e)PowerSaveStatus);
-
-        }
-    }
-
-    /*starting again to handle waiting requests  */
-    /*priority to driver request*/
-    if ( pPowerSrv->driverRequest.requestState == NEW_REQUEST ||
-         pPowerSrv->driverRequest.requestState == PENDING_REQUEST )
-    {
-        status = powerSrvProcessRequest(hPowerSrv,pPowerSrv->driverRequest.requestMode);
-    }
-    else/*user request*/
-    {
-        if ( pPowerSrv->currentMode==USER_MODE )
-        {
-            if ( pPowerSrv->userRequest.requestState == NEW_REQUEST||
-                 pPowerSrv->userRequest.requestState == PENDING_REQUEST )
-            {
-                status = powerSrvProcessRequest(hPowerSrv,pPowerSrv->userRequest.requestMode);
-            }
-
-        }
-    }
-    if ( status == POWER_SAVE_802_11_IS_CURRENT )/*in case of already or habdled*/
-    {
-        if ( pPowerSrv->pCurrentRequest->powerSrvCompleteCB != NULL )
-        {
-            pPowerSrv->pCurrentRequest->powerSrvCompleteCB(pPowerSrv->pCurrentRequest->powerSaveCBObject,
-                                                           pPowerSrv->pCurrentRequest->psMode,
-                                                           ((pPowerSrv->pCurrentRequest->psMode == POWER_SAVE_ON) ? 
-                                                            ENTER_POWER_SAVE_SUCCESS : 
-                                                            EXIT_POWER_SAVE_SUCCESS));
-        }
-    }
-
-
-}
-
-
-/****************************************************************************************
- *                        powerSrvProcessRequest                                                    *
- ****************************************************************************************
-DESCRIPTION: This function receive the request before sending it to the state machine, checks if it 
-              possible to be applied and pass it to the state machine.
-              
-              
-                                                                                                                   
-INPUT:      - hPowerSrv                         - handle to the PowerSrv object.        
-            - requestMode                   - Driver or User mode
-
-
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK / PENDING / TI_NOK.
-****************************************************************************************/
-TI_STATUS powerSrvProcessRequest (TI_HANDLE hPowerSrv, powerSrvMode_e requestMode)
-{
-    PowerSrvSMStates_e powerSrvSmState;
-    powerSrvRequest_t*      pPrcessedRequest;
-    TI_STATUS smApiStatus;
-    powerSrv_t *pPowerSrv = (powerSrv_t*)hPowerSrv;
-
-
-
-/*determine what is the current request*/
-    if ( requestMode == DRIVER_MODE )
-    {
-        pPrcessedRequest = &(pPowerSrv->driverRequest);     
-    }
-    else
-    {
-        pPrcessedRequest = &(pPowerSrv->userRequest);
-    }
-
-/*in case that the state machine is in a pending state and it is a driver 
-   request we will return Pending and not call the SM. the request will 
-   be processed in the next event - according to the 802_11_Report.*/
-    powerSrvSmState = powerSrvSM_getCurrentState(pPowerSrv->hPowerSrvSM);
-
-    if ( (powerSrvSmState == POWER_SRV_STATE_PEND_ACTIVE || 
-          powerSrvSmState == POWER_SRV_STATE_PEND_PS) &&
-         pPowerSrv->pCurrentRequest->requestMode == DRIVER_MODE )
-    {
-        pPrcessedRequest->requestState = PENDING_REQUEST;
-        return POWER_SAVE_802_11_PENDING;
-    }
-    /*Set the correct request to the SM*/
-    powerSrvSm_setSmRequest(pPowerSrv->hPowerSrvSM ,pPrcessedRequest);      
-
-    /*call the SM with the correct request*/
-
-    if ( pPrcessedRequest->psMode == POWER_SAVE_ON )
-    {
-        smApiStatus = powerSrvSM_SMApi(pPowerSrv->hPowerSrvSM,POWER_SRV_EVENT_REQUEST_PS);
-    }
-    else
-    {
-        smApiStatus = powerSrvSM_SMApi(pPowerSrv->hPowerSrvSM,POWER_SRV_EVENT_REQUEST_ACTIVE);
-    }
-
-    /*if =! pending updating the current request pointer.*/
-    if ( pPrcessedRequest->requestState != PENDING_REQUEST )
-    {
-        pPowerSrv->pCurrentRequest = pPrcessedRequest;
-        pPowerSrv->currentMode = pPowerSrv->pCurrentRequest->requestMode;
-    }
-
-
-    return smApiStatus;
-}
-
-
-/****************************************************************************************
- *                        powerSrvCreatePssRequest                                                  *
- ****************************************************************************************
-DESCRIPTION: This function create a request acording to it's type:
-                                                        - User
-                                                        -Driver
-                
-                                                                                                                   
-INPUT:      - hPowerSrv                         - handle to the PowerSrv object.        
-            - requestMode                   - request type : Driver/User
-            - psMode                            - Power save/Active request
-            - sendNullDataOnExit                - 
-            - powerSaveCBObject     - handle to the Callback functin module.
-            - powerSaveCompleteCB           - Calback function - for success/faild notification.
-
-OUTPUT: 
-RETURN:    void.
-****************************************************************************************/
-void powerSrvCreatePssRequest (TI_HANDLE                    hPowerSrv,
-                               powerSrvMode_e              requestMode,
-                               powerSrvRequestState_e      requestState,
-                               E80211PsMode                psMode,
-                               TI_BOOL                        sendNullDataOnExit,
-                               void *                      powerSaveCBObject,
-                               powerSaveCmpltCB_t          powerSaveCompleteCB,
-                               powerSaveCmdResponseCB_t    powerSaveCmdResponseCB)
-{
-    powerSrv_t *pPowerSrv = (powerSrv_t*)hPowerSrv;
-    if ( requestMode==USER_MODE )
-    {
-        pPowerSrv->userRequest.requestState             = requestState;
-        pPowerSrv->userRequest.requestMode              = requestMode;
-        pPowerSrv->userRequest.psMode                   = psMode;
-        pPowerSrv->userRequest.sendNullDataOnExit           = sendNullDataOnExit;
-        pPowerSrv->userRequest.powerSaveCBObject            = powerSaveCBObject;
-        pPowerSrv->userRequest.powerSrvCompleteCB       = powerSaveCompleteCB;
-        pPowerSrv->userRequest.powerSaveCmdResponseCB   = powerSaveCmdResponseCB;
-    }
-    else /*driver request*/
-    {
-        pPowerSrv->driverRequest.requestState               = requestState;
-        pPowerSrv->driverRequest.requestMode                = requestMode;
-        pPowerSrv->driverRequest.psMode                 = psMode;
-        pPowerSrv->driverRequest.sendNullDataOnExit             = sendNullDataOnExit;
-        pPowerSrv->driverRequest.powerSaveCBObject      = powerSaveCBObject;
-        pPowerSrv->driverRequest.powerSrvCompleteCB         = powerSaveCompleteCB;
-        pPowerSrv->driverRequest.powerSaveCmdResponseCB     = NULL;
-    }
-}
-
-
-
-/****************************************************************************************
- *                        powerSrvRegisterFailureEventCB                                                    *
- ****************************************************************************************
-DESCRIPTION: Registers a failure event callback for scan error notifications.
-                
-                                                                                                                   
-INPUT:      - hPowerSrv         - handle to the PowerSrv object.        
-            - failureEventCB    - the failure event callback function.\n
-            - hFailureEventObj - handle to the object passed to the failure event callback function.
-
-OUTPUT: 
-RETURN:    void.
-****************************************************************************************/
-void powerSrvRegisterFailureEventCB( TI_HANDLE hPowerSrv, 
-                                     void * failureEventCB, TI_HANDLE hFailureEventObj )
-{
-    powerSrv_t *pPowerSrv = (powerSrv_t*)hPowerSrv;
-
-    pPowerSrv->failureEventFunc = (TFailureEventCb)failureEventCB;
-    pPowerSrv->failureEventObj  = hFailureEventObj;
-
-    /* register the failure event CB also with the PS SM */
-    powerSrvSM_RegisterFailureEventCB( pPowerSrv->hPowerSrvSM, failureEventCB, hFailureEventObj );
-}
-
diff --git a/wl1271/TWD/MacServices/PowerSrv.h b/wl1271/TWD/MacServices/PowerSrv.h
deleted file mode 100644
index b5f19da..0000000
--- a/wl1271/TWD/MacServices/PowerSrv.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * PowerSrv.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file powerSrv.h
- *  \brief This is the Power Manager module private (internal).
- *  \author Yaron Menashe
- *  \date 27-Apr-2004
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Power Manager                                                 *
- *   PURPOSE: Power Manager Module private                                      *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _POWER_SRV_H_
-#define _POWER_SRV_H_
-
-#include "TWDriverInternal.h"
-#include "PowerSrv_API.h"
-
-/*#include "PowerSrvSM.h"*/
-
-/*****************************************************************************
- **         Constants                                                       **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         Enumerations                                                    **
- *****************************************************************************/
-
-
-
-
-
-/*new Power*/
-
-
-typedef enum 
-{
-	DRIVER_MODE,
-	USER_MODE
-}powerSrvMode_e;  
-
-typedef enum 
-{
-	NEW_REQUEST,
-	PENDING_REQUEST,
-	RUNNING_REQUEST,
-	HANDLED_REQUEST
-}powerSrvRequestState_e;
-
-
-/*****************************************************************************
- **         Typedefs                                                        **
- *****************************************************************************/
-
-
-
-
-/*****************************************************************************
- **         Structures                                                      **
- *****************************************************************************/
-
-
-
-typedef struct
-{
-	powerSrvRequestState_e 		requestState;
-	powerSrvMode_e				requestMode;
-	E80211PsMode	            psMode;
-	TI_BOOL 						sendNullDataOnExit;
-	void* 						powerSaveCBObject;
-	powerSaveCmpltCB_t    		powerSrvCompleteCB;
-	powerSaveCmdResponseCB_t	powerSaveCmdResponseCB;
-}	powerSrvRequest_t;   
-
-/** \struct powerSrv_t
- * this structure contain the data of the PowerSrv object.
- */
-
-
-typedef struct
-{
-	TI_HANDLE   			hPowerSrvSM;            /**<
-                                             					* Hnadle to the Power Server State Machine object.
-                                            			 		*/
-
-	TI_HANDLE   			hOS;                        	/**<
-                                             					* Handle to the OS object.
-                                             					*/
-
-    TI_HANDLE   			hReport;                    	/**<
-                                            	 				* Handle to the Report module.
-                                             					*/
-
-	TI_HANDLE   			hEventMbox;         		/**< Handle to the power controller object via the WhalCtrl.
-											 * Need for configure the desired power mode policy in the system.
-											 */
-    TI_HANDLE               hCmdBld;
-											 
-	powerSrvMode_e 		currentMode; 		/**<
-											*holds the current mode of the PSS - driver or user...
-											*/
-
-	powerSrvMode_e 		userLastRequestMode;
-											/**<
-											*
-											*/
-
-	powerSrvRequest_t 	userRequest;		/**<
-											*user request struct.
-											*/
-
-	powerSrvRequest_t 	driverRequest;		/**<
-											*driver request struct
-											*/
-
-	powerSrvRequest_t*  	pCurrentRequest;	/**<
-											*pointer to the current request - user/driver request
-											*/
-	
-	TFailureEventCb		failureEventFunc;	/**<
-											* upper layer Failure Event CB.
-											* called when the scan command has been Timer Expiry
-											*/
-	TI_HANDLE			failureEventObj;		/**<
-											* object parameter passed to the failureEventFunc
-											* when it is called 
-											*/
-	
-} powerSrv_t;
-
-
-
-/*****************************************************************************
- **         External data definitions                                       **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         External functions definitions                                  **
- *****************************************************************************/
-
-
-
-
-
-/*****************************************************************************
- **         Public Function prototypes                                      **
- *****************************************************************************/
-
-/*****************************************************************************
- **         Private Function prototypes                                     **
- *****************************************************************************/
-
-/*****************************************************************************
- **         Private Function prototypes                                     **
- *****************************************************************************/
-
-#endif /*  _POWER_SRV_H_  */
-
diff --git a/wl1271/TWD/MacServices/PowerSrvSM.c b/wl1271/TWD/MacServices/PowerSrvSM.c
deleted file mode 100644
index 173a080..0000000
--- a/wl1271/TWD/MacServices/PowerSrvSM.c
+++ /dev/null
@@ -1,814 +0,0 @@
-/*
- * PowerSrvSM.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file PowerSrvSM.c
- *  \brief This is the PowerSrvSM module implementation.
- *  \author Assaf Azulay
- *  \date 19-OCT-2005
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  PowerSrvSM                                                    *
- *   PURPOSE: PowerSrvSM Module implementation.                             *
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_114
-#include "tidef.h"
-#include "osApi.h"
-#include "timer.h"
-#include "fsm.h"
-#include "report.h"
-#include "TWDriver.h"
-#include "PowerSrvSM.h"
-#include "CmdBld.h"
-
-
-/*****************************************************************************
- **         Defines                                                         **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         structs                                                         **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         Private Function prototypes                                     **
- *****************************************************************************/
-
-static TI_STATUS powerSrvSmSMEvent(TI_UINT8* pCurrentState,
-                                   TI_UINT8 event,
-                                   TI_HANDLE hPowerSrvSM);
-static TI_STATUS powerSrvSmDoUpdateRequest(TI_HANDLE hPowerSrvSM);
-static TI_STATUS powerSrvSmDoEnterPowerSave(TI_HANDLE hPowerSrvSM);
-static TI_STATUS powerSrvSmDoExitPowerSave(TI_HANDLE hPowerSrvSM);
-static TI_STATUS powerSrvSmDoPending(TI_HANDLE hPowerSrvSM);
-static TI_STATUS powerSrvSmDoAllready(TI_HANDLE hPowerSrvSM);
-static TI_STATUS powerSrvSMActionUnexpected(TI_HANDLE hPowerSrvSM);
-static TI_STATUS powerSrvSMSendMBXConfiguration(TI_HANDLE hPowerSrvSM, TI_BOOL PS_disableEnable);
-static void      powerSrvSMTimerExpired (TI_HANDLE hPowerSrvSM, TI_BOOL bTwdInitOccured);
-
-/***************************************************************************************
- **         Public Function prototypes                                      **
- ****************************************************************************************/
-
-
-/****************************************************************************************
- *                        powerSrvSM_create                                                         *
- ****************************************************************************************
-DESCRIPTION: Power Server SM module creation function, called by the Power Server create in creation phase 
-                performs the following:
-                -   Allocate the Power Server SM handle
-                -   Creates the fsm.
-                                                                                                                   
-INPUT:          - hOs - Handle to OS        
-
-
-OUTPUT:     
-
-RETURN:     Handle to the Power Server SM module on success, NULL otherwise
-****************************************************************************************/
-TI_HANDLE powerSrvSM_create(TI_HANDLE hOsHandle)
-{
-    PowerSrvSM_t *pPowerSrvSM = NULL;
-    fsm_stateMachine_t *pFsm = NULL;
-    TI_STATUS status;
-
-    pPowerSrvSM = (PowerSrvSM_t*) os_memoryAlloc (hOsHandle, sizeof(PowerSrvSM_t));
-    if ( pPowerSrvSM == NULL )
-    {
-        WLAN_OS_REPORT(("%s(%d) - Memory Allocation Error!\n",__FUNCTION__,__LINE__));
-        return NULL;
-    }
-
-    os_memoryZero (hOsHandle, pPowerSrvSM, sizeof(PowerSrvSM_t));
-
-    pPowerSrvSM->hOS = hOsHandle;
-
-    /* create the generic state-machine */
-    status = fsm_Create(hOsHandle,
-                        &pFsm,
-                        (TI_UINT8)POWER_SRV_SM_STATE_NUM,
-                        (TI_UINT8)POWER_SRV_SM_EVENT_NUM);
-    if ( status != TI_OK )
-    {
-        WLAN_OS_REPORT(("%s(%d) - Error in create FSM!\n",__FUNCTION__,__LINE__));
-        powerSrvSM_destroy(pPowerSrvSM);
-        return NULL;
-    }
-
-    pPowerSrvSM->hFSM = (TI_HANDLE)pFsm;
-
-    return pPowerSrvSM;
-}
-
- 
-/****************************************************************************************
- *                        powerSrvSM_destroy                                                            *
- ****************************************************************************************
-DESCRIPTION: Power Server SM module destroy function, 
-                -   delete Power Server SM allocation
-                
-                                                                                                                   
-INPUT:          - hPowerSrvSM - Handle to the Power Server  SM
-
-
-OUTPUT:     
-
-RETURN:    TI_STATUS - TI_OK on success else TI_NOK.
-****************************************************************************************/
-TI_STATUS powerSrvSM_destroy(TI_HANDLE hPowerSrvSM)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-
-    TI_HANDLE osHandle = pPowerSrvSM->hOS;
-
-    /* free the timer */
-    if (pPowerSrvSM->hPwrSrvSmTimer)
-    {
-        tmr_DestroyTimer (pPowerSrvSM->hPwrSrvSmTimer);
-    }
-
-    /* free the generic SM */
-    if ( pPowerSrvSM->hFSM != NULL )
-    {
-        fsm_Unload(osHandle, (fsm_stateMachine_t*)pPowerSrvSM->hFSM);
-    }
-
-    /* free the Power Save SRV object */
-    os_memoryFree(osHandle , pPowerSrvSM , sizeof(PowerSrvSM_t));
-
-    return TI_OK;
-}
-
-
-/****************************************************************************************
-*                        powerSrvSM_init                                                           *
-****************************************************************************************
-DESCRIPTION: Power Server SM module initialize function, called by the Power Server init in configure phase 
-               performs the following:
-               -   init the Stet machine states.
-               -   set Active as start state.
-                                                                                                                  
-INPUT:     - hPowerSrvSM       - handle to the PowerSrvSM object.
-           - hReport           - handle to the Report object.
-           - hCmdBld           - handle to the Command Builder object.    
-           - hTimer            - handle to the Timer module object.    
-
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK on success else TI_NOK.
-****************************************************************************************/
-TI_STATUS powerSrvSM_init (TI_HANDLE hPowerSrvSM,
-                           TI_HANDLE hReport,
-                           TI_HANDLE hCmdBld,
-                           TI_HANDLE hTimer)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-
-    fsm_actionCell_t smMatrix[POWER_SRV_SM_STATE_NUM][POWER_SRV_SM_EVENT_NUM] =
-    {
-        /*
-        next state and transition action for POWER_SRV_STATE_ACTIVE state
-        */
-        {
-            /* POWER_SRV_EVENT_REQUEST_ACTIVE */
-            {POWER_SRV_STATE_ACTIVE             , powerSrvSmDoAllready},
-
-            /* POWER_SRV_EVENT_REQUEST_PS */
-            {POWER_SRV_STATE_PEND_PS                , powerSrvSmDoEnterPowerSave},
-
-            /* POWER_SRV_EVENT_SUCCESS */
-            {POWER_SRV_STATE_ACTIVE                 , powerSrvSMActionUnexpected},
-
-            /* POWER_SRV_EVENT_FAIL */
-            {POWER_SRV_STATE_ACTIVE                 , powerSrvSMActionUnexpected}
-
-        },
-
-        /*
-        next state and transition action for POWER_SRV_STATE_PEND_PS state
-        */
-        {
-            /* POWER_SRV_EVENT_REQUEST_ACTIVE */
-            {POWER_SRV_STATE_PEND_PS            , powerSrvSmDoPending},
-
-            /* POWER_SRV_EVENT_REQUEST_PS */
-            {POWER_SRV_STATE_PEND_PS        , powerSrvSmDoPending},
-
-            /* POWER_SRV_EVENT_SUCCESS */
-            {POWER_SRV_STATE_PS                 , powerSrvSmDoUpdateRequest},
-
-            /* POWER_SRV_EVENT_FAIL */
-            {POWER_SRV_STATE_ACTIVE             , powerSrvSmDoUpdateRequest}
-
-        },
-        /*
-        next state and transition action for POWER_SRV_STATE_PS state
-        */
-        {
-            /* POWER_SRV_EVENT_REQUEST_ACTIVE */
-            {POWER_SRV_STATE_PEND_ACTIVE        , powerSrvSmDoExitPowerSave},
-
-            /* POWER_SRV_EVENT_REQUEST_PS */
-            {POWER_SRV_STATE_PS                 , powerSrvSmDoAllready},
-
-            /* POWER_SRV_EVENT_SUCCESS */
-            {POWER_SRV_STATE_PS                 , powerSrvSMActionUnexpected},
-
-            /* POWER_SRV_EVENT_FAIL */
-            {POWER_SRV_STATE_PS                 , powerSrvSMActionUnexpected}
-
-        },
-        /*
-        next state and transition action for POWER_SRV_STATE_PEND_ACTIVE state
-        */
-        {
-            /* POWER_SRV_EVENT_REQUEST_ACTIVE */
-            {POWER_SRV_STATE_PEND_ACTIVE            , powerSrvSmDoPending},
-
-            /* POWER_SRV_EVENT_REQUEST_PS */
-            {POWER_SRV_STATE_PEND_ACTIVE        , powerSrvSmDoPending},
-
-            /* POWER_SRV_EVENT_SUCCESS */
-            {POWER_SRV_STATE_ACTIVE             , powerSrvSmDoUpdateRequest},
-
-            /* POWER_SRV_EVENT_FAIL */
-            {POWER_SRV_STATE_ERROR_ACTIVE       , powerSrvSmDoUpdateRequest}
-
-        },
-        /*
-        next state and transition action for POWER_SRV_STATE_ERROR_ACTIVE state
-        */
-        {
-            /* POWER_SRV_EVENT_REQUEST_ACTIVE */
-            {POWER_SRV_STATE_PEND_ACTIVE            , powerSrvSmDoExitPowerSave},
-
-            /* POWER_SRV_EVENT_REQUEST_PS */
-            {POWER_SRV_STATE_PEND_PS        , powerSrvSmDoEnterPowerSave},
-
-            /* POWER_SRV_EVENT_SUCCESS */
-            {POWER_SRV_STATE_ERROR_ACTIVE       , powerSrvSMActionUnexpected},
-
-            /* POWER_SRV_EVENT_FAIL */
-            {POWER_SRV_STATE_ERROR_ACTIVE       , powerSrvSMActionUnexpected}
-
-        },
-
-    };
-
-    pPowerSrvSM->hReport = hReport;
-    pPowerSrvSM->hCmdBld = hCmdBld;
-    pPowerSrvSM->hTimer  = hTimer;
-
-    /* create the timer */
-    pPowerSrvSM->hPwrSrvSmTimer = tmr_CreateTimer (pPowerSrvSM->hTimer);
-	if (pPowerSrvSM->hPwrSrvSmTimer == NULL)
-	{
-        TRACE0(pPowerSrvSM->hReport, REPORT_SEVERITY_ERROR, "powerSrvSM_init(): Failed to create hPwrSrvSmTimer!\n");
-		return TI_NOK;
-	}
-
-    fsm_Config(pPowerSrvSM->hFSM,
-               (fsm_Matrix_t)smMatrix,
-               POWER_SRV_SM_STATE_NUM,
-               POWER_SRV_SM_EVENT_NUM,
-               powerSrvSmSMEvent,
-               pPowerSrvSM->hOS);
-
-    /*
-    the PowerSrvSM start in active mode (POWER_SRV_STATE_ACTIVE)
-    the PowerSrvSM::currentState must be sync with the PowerSrv::desiredPowerModeProfile (POWER_MODE_ACTIVE).
-    */
-    pPowerSrvSM->currentState = POWER_SRV_STATE_ACTIVE;
-
-
-    /*
-    Null packet rate : 2,5.5 M
-    Probe Request : Not PBCC modulation, Long Preamble */
-    pPowerSrvSM->NullPktRateModulation= (DRV_RATE_MASK_1_BARKER | DRV_RATE_MASK_2_BARKER); 
-
-    TRACE0(pPowerSrvSM->hReport, REPORT_SEVERITY_INIT, "PowerSrvSM Initialized\n");
-
-    return TI_OK;
-}
-
-/****************************************************************************************
-*                        powerSrvSM_config                                                         *
-****************************************************************************************
-DESCRIPTION: Power Server SM module configuration function, called by the Power Server init in configure phase 
-               performs the following:
-               -   init the Stet machine states.
-               -   set Active as start state.
-                                                                                                                  
-INPUT:      - hPowerSrvSM       - handle to the PowerSrvSM object.  
-           - pPowerSrvInitParams   - the Power Server initialize parameters.
-
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK on success else TI_NOK.
-****************************************************************************************/
-TI_STATUS powerSrvSM_config(TI_HANDLE hPowerSrvSM,
-                            TPowerSrvInitParams *pPowerSrvInitParams)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-
-    /*
-    init PowerMgmtConfigration
-    */
-    pPowerSrvSM->hangOverPeriod =   pPowerSrvInitParams->hangOverPeriod;
-    pPowerSrvSM->numNullPktRetries =    pPowerSrvInitParams->numNullPktRetries;
-
-    return TI_OK;
-}
-/****************************************************************************************
- *                        powerSrvSM_SMApi                                                           *
- *****************************************************************************************
-DESCRIPTION: This function triggers events from the outside of the module into the state machine.
-              
-                                                                                                                                                                       
-INPUT:      - hPowerSrvSM                   - handle to the PowerSrvSM object.  
-            - theSMEvent                    - event from TWD.
-            
-
-OUTPUT: 
-RETURN:    TI_STATUS TI_OK / PENDING / TI_NOK
-****************************************************************************************/
-TI_STATUS powerSrvSM_SMApi(TI_HANDLE hPowerSrvSM,
-                           PowerSrvSMEvents_e theSMEvent)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-    TI_STATUS status;
-
-    switch ( theSMEvent )
-    {
-    case POWER_SRV_EVENT_REQUEST_ACTIVE :
-    case POWER_SRV_EVENT_REQUEST_PS :
-    case POWER_SRV_EVENT_FAIL :
-    case POWER_SRV_EVENT_SUCCESS :
-
-        TRACE1(pPowerSrvSM->hReport, REPORT_SEVERITY_INFORMATION, "powerSrvSM_SMApi(%d) called - legal input parameter.\n",theSMEvent);
-        break;
-
-    default:
-        TRACE1(pPowerSrvSM->hReport, REPORT_SEVERITY_WARNING, "powerSrvSM_SMApi(%d) called,                            input parameter is illegal.",theSMEvent);
-        return TI_NOK;
-    }
-
-
-    status = powerSrvSmSMEvent((TI_UINT8*)&pPowerSrvSM->currentState,
-                               (TI_UINT8)theSMEvent,
-                               hPowerSrvSM);
-
-    return status;
-}
-
-
-/****************************************************************************************
- *                        powerSrvSm_setSmRequest                                                    *
- *****************************************************************************************
-DESCRIPTION: This function sets the current SM working request.
-                                                                                                                   
-INPUT:      - hPowerSrvSM                       - handle to the PowerSrvSM object.
-            -powerSrvRequest_t*                 - pointer to the correct request in the Power server.
-
-OUTPUT: 
-RETURN:    TI_STATUS -  TI_OK
-****************************************************************************************/
-TI_STATUS powerSrvSm_setSmRequest(TI_HANDLE hPowerSrvSM,powerSrvRequest_t* pSmRequest)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-    pPowerSrvSM->pSmRequest = pSmRequest;
-    return TI_OK;
-}
-
-
-/****************************************************************************************
- *                        powerSrvSM_getCurrentState                                                         *
- *****************************************************************************************
-DESCRIPTION: This function returns the current state of the SM.
-                                                       
-                                                                                                                   
-INPUT:      - hPowerSrvSM                       - handle to the PowerSrvSM object.      
-            
-
-OUTPUT: 
-RETURN:    PowerSrvSMStates_e current state
-****************************************************************************************/
-PowerSrvSMStates_e powerSrvSM_getCurrentState(TI_HANDLE hPowerSrvSM)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-
-    return pPowerSrvSM->currentState; 
-}
-
-/****************************************************************************************
- *                        powerSrvSM_setRateModulation                                               *
- *****************************************************************************************
-DESCRIPTION: This function sets the Rate Modulation
-                                                       
-                                                                                                                   
-INPUT:      - hPowerSrvSM                       - handle to the PowerSrvSM object.      
-            - rateModulation                        - desired rate
-
-OUTPUT: 
-RETURN:      void
-****************************************************************************************/
-
-void powerSrvSM_setRateModulation(TI_HANDLE hPowerSrvSM, TI_UINT16 rateModulation)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-    pPowerSrvSM->NullPktRateModulation= rateModulation; 
-}
-
-/****************************************************************************************
- *                        powerSrvSM_getRateModulation                                               *
- *****************************************************************************************
-DESCRIPTION: This function sets the Rate Modulation
-                                                       
-                                                                                                                   
-INPUT:      - hPowerSrvSM                       - handle to the PowerSrvSM object.      
-
-OUTPUT: 
-RETURN:      -  desired rate
-****************************************************************************************/
-
-TI_UINT32 powerSrvSM_getRateModulation(TI_HANDLE hPowerSrvSM)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-    return pPowerSrvSM->NullPktRateModulation;
-}
-
-/****************************************************************************************
- *                        powerSrvSM_printObject                                                         *
- *****************************************************************************************
-DESCRIPTION: This function prints the SM object
-                                                       
-                                                                                                                   
-INPUT:      - hPowerSrvSM                       - handle to the PowerSrvSM object.      
-            
-
-OUTPUT: 
-RETURN:   void
-****************************************************************************************/
-void powerSrvSM_printObject(TI_HANDLE hPowerSrvSM)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-    char *pString;
-
-    WLAN_OS_REPORT(("\n+++++ powerSrvSM_printObject +++++\n"));
-    WLAN_OS_REPORT(("Handle to the CmdBld is 0x%08X\n", pPowerSrvSM->hCmdBld));
-    WLAN_OS_REPORT(("Handle to the OS is 0x%08X\n", pPowerSrvSM->hOS));
-    WLAN_OS_REPORT(("Handle to the Report is 0x%08X\n", pPowerSrvSM->hReport));
-    WLAN_OS_REPORT(("Handle to the FSM is 0x%08X\n", pPowerSrvSM->hFSM));
-
-    switch ( pPowerSrvSM->currentState )
-    {
-    case POWER_SRV_STATE_ACTIVE:
-        pString = "POWER_SRV_STATE_ACTIVE";
-        break;
-
-    case POWER_SRV_STATE_PEND_PS:
-        pString = "POWER_SRV_STATE_PEND_PS";
-        break;
-
-    case POWER_SRV_STATE_PS:
-        pString = "POWER_SRV_STATE_PS";
-        break;
-
-    case POWER_SRV_STATE_PEND_ACTIVE:
-        pString = "POWER_SRV_STATE_PEND_ACTIVE";
-        break;
-
-    case POWER_SRV_STATE_ERROR_ACTIVE:
-        pString = "POWER_SRV_STATE_ERROR_ACTIVE";
-        break;
-
-
-    default:
-        pString = "UNKWON PARAMETER";
-        break;
-    }
-    WLAN_OS_REPORT(("The current state of the state machine is %s (=%d)\n",
-                    pString,
-                    pPowerSrvSM->currentState));
-
-}
-
-
-
-
-/*****************************************************************************
- **         Private Function prototypes                                                             **
- *****************************************************************************/
-
-
-
-
-
-
-/****************************************************************************************
- *                        powerSrvSmDoEnterPowerSave                                                 *
- *****************************************************************************************
-DESCRIPTION: This function is an action of the state machine to move from active state to PS
-                                                                                                                   
-INPUT:      - hPowerSrvSM                       - handle to the PowerSrvSM object.
-
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK / TI_NOK
-****************************************************************************************/
-
-static TI_STATUS powerSrvSmDoEnterPowerSave(TI_HANDLE hPowerSrvSM)
-{
-    TI_STATUS status;
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-    pPowerSrvSM->pSmRequest->requestState = RUNNING_REQUEST;
-    status = powerSrvSMSendMBXConfiguration(hPowerSrvSM, TI_TRUE);
-    return status;
-}
-
-
-/****************************************************************************************
- *                        powerSrvSmDoExitPowerSave                                              *
- *****************************************************************************************
-DESCRIPTION: This function is an action of the state machine to move from PS state to Active
-                                                                                                                   
-INPUT:      - hPowerSrvSM                       - handle to the PowerSrvSM object.
-
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK / TI_NOK
-****************************************************************************************/
-static TI_STATUS powerSrvSmDoExitPowerSave(TI_HANDLE hPowerSrvSM)
-{
-    TI_STATUS status;
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-    pPowerSrvSM->pSmRequest->requestState = RUNNING_REQUEST;
-    status = powerSrvSMSendMBXConfiguration(hPowerSrvSM, TI_FALSE);
-    return status;
-}
-
-
-/****************************************************************************************
- *                        powerSrvSmDoUpdateRequest                                                  *
- *****************************************************************************************
-DESCRIPTION: This function is an action of the state machine to update a request when the SM 
-              is already in the requested state is already 
-                                                                                                                   
-INPUT:      - hPowerSrvSM                       - handle to the PowerSrvSM object.
-
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK / TI_NOK
-****************************************************************************************/
-
-static TI_STATUS powerSrvSmDoUpdateRequest(TI_HANDLE hPowerSrvSM)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-
-    /* request has completed - stop the guard timer */
-    tmr_StopTimer (pPowerSrvSM->hPwrSrvSmTimer);
-
-    /*powerSrv_SetRequestState  will update the correct request (acording to the current active request)*/
-    if ( pPowerSrvSM->pSmRequest->requestState == RUNNING_REQUEST )
-    {
-        pPowerSrvSM->pSmRequest->requestState = HANDLED_REQUEST;
-    }
-
-    return TI_OK;
-}
-
-
-/****************************************************************************************
- *                        powerSrvSmDoPending                                                        *
- *****************************************************************************************
-DESCRIPTION: This function is an action of the state machine returns Pending in case that there is a request 
-              waiting to be finished (already sent to FW)
-                                                                                                                   
-INPUT:      - hPowerSrvSM                       - handle to the PowerSrvSM object.
-
-OUTPUT: 
-RETURN:    TI_STATUS - PENDING
-****************************************************************************************/
-
-static TI_STATUS powerSrvSmDoPending(TI_HANDLE hPowerSrvSM)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-
-    /*powerSrv_SetRequestState will check the mode and will update the correct request (Driver of user)*/
-    pPowerSrvSM->pSmRequest->requestState = PENDING_REQUEST;
-    return POWER_SAVE_802_11_PENDING;
-}
-
-
-
-/****************************************************************************************
- *                        powerSrvSmDoAllready                                                       *
- *****************************************************************************************
-DESCRIPTION: This function is an action of the state machine stays in the same state since it the requested
-              one in the request
-                                                                                                                   
-INPUT:      - hPowerSrvSM                       - handle to the PowerSrvSM object.
-
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK
-****************************************************************************************/
-static TI_STATUS powerSrvSmDoAllready(TI_HANDLE hPowerSrvSM)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-
-    /*powerSrv_SetRequestState will check the mode and will update the correct request (Driver of user)*/
-    pPowerSrvSM->pSmRequest->requestState = HANDLED_REQUEST;
-    return POWER_SAVE_802_11_IS_CURRENT;
-}
-
-
-/****************************************************************************************
- *                        powerSrvSMActionUnexpected                                                 *
- *****************************************************************************************
-DESCRIPTION: This function is an action of the state machine stays in the same state and return that action
-              was not expected
-                                                                                                                   
-INPUT:      - hPowerSrvSM                       - handle to the PowerSrvSM object.
-
-OUTPUT: 
-RETURN:    TI_STATUS - TI_OK
-****************************************************************************************/
-static TI_STATUS powerSrvSMActionUnexpected(TI_HANDLE hPowerSrvSM)
-{
-#ifdef TI_DBG
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-
-    TRACE0(pPowerSrvSM->hReport, REPORT_SEVERITY_ERROR, "called: powerSrvSMActionUnexpected");
-#endif /* TI_DBG */
-
-    return TI_OK;
-}
-
-
-/****************************************************************************************
- *                        powerSrvSmSMEvent                                                      *
- *****************************************************************************************
-DESCRIPTION: This function is the manager of the state macine. its move the state machine
-              from one state to the other depend on the receive event, and call to the appropriate
-              action (function) for the move between the states.
-                                                                                                                   
-INPUT:      - pCurrentState
-            - event
-            - hPowerSrvSM                       - handle to the PowerSrvSM object.
-
-OUTPUT: 
-RETURN:    TI_STATUS 
-****************************************************************************************/
-static TI_STATUS powerSrvSmSMEvent(TI_UINT8* pCurrentState,
-                                   TI_UINT8 event,
-                                   TI_HANDLE hPowerSrvSM)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-    TI_STATUS status = TI_OK;
-    TI_UINT8 nextState;
-
-    status = fsm_GetNextState((fsm_stateMachine_t*)pPowerSrvSM->hFSM,
-                              (TI_UINT8)pPowerSrvSM->currentState,
-                              event,
-                              &nextState);
-    if ( status != TI_OK )
-    {
-        TRACE0(pPowerSrvSM->hReport, REPORT_SEVERITY_SM, "PowerSrvSM - State machine error, failed getting next state\n");
-        return(status);
-    }
-
-
-	TRACE3( pPowerSrvSM->hReport, REPORT_SEVERITY_INFORMATION, "powerSrvSmSMEvent: <currentState = %d, event = %d> --> nextState = %d\n", *pCurrentState, event, nextState);
-
-    status = fsm_Event(pPowerSrvSM->hFSM,
-                       pCurrentState,
-                       event,
-                       (void*)pPowerSrvSM);
-
-    return status;
-}
-
-
-/****************************************************************************************
-*                        powerSrvSMSendMBXConfiguration                                             *
-*****************************************************************************************
-DESCRIPTION: This function send configuration of the power save option that holds in the command
-                mailbox inner sturcture.
-                                                                                                                  
-INPUT:      - hPowerSrvSM                       - handle to the PowerSrvSM object.
-           - PS_disableEnable                      - true = PS , false = active
-
-OUTPUT: 
-RETURN:    TI_STATUS 
-****************************************************************************************/
-static TI_STATUS    powerSrvSMSendMBXConfiguration(TI_HANDLE hPowerSrvSM, TI_BOOL PS_disableEnable)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-    TPowerSaveParams powerSaveParams;
-    TI_STATUS status;
-
-    /*setting the params for the Hal*/
-    powerSaveParams.hangOverPeriod          = pPowerSrvSM->hangOverPeriod;
-    powerSaveParams.numNullPktRetries       = pPowerSrvSM->numNullPktRetries;
-    powerSaveParams.NullPktRateModulation   = pPowerSrvSM->NullPktRateModulation;
-    powerSaveParams.needToSendNullData      = pPowerSrvSM->pSmRequest->sendNullDataOnExit;
-    powerSaveParams.ps802_11Enable          = PS_disableEnable;
-
-    /* start the FW guard timer, which is used to protect from FW stuck */
-    tmr_StartTimer (pPowerSrvSM->hPwrSrvSmTimer,
-                    powerSrvSMTimerExpired,
-                    (TI_HANDLE)pPowerSrvSM,
-                    POWER_SAVE_GUARD_TIME_MS,
-                    TI_FALSE);
-
-    /* that command should be sent to FW just in case we moved from Active to one of the PS modes
-     * and vice versa, it shoul not be sent when moving between different PS modes */
-    status = cmdBld_CmdSetPsMode (pPowerSrvSM->hCmdBld, 
-                                  &powerSaveParams,
-                                  (void *)pPowerSrvSM->pSmRequest->powerSaveCmdResponseCB,
-                                  (pPowerSrvSM->pSmRequest->powerSaveCmdResponseCB == NULL) ? NULL : pPowerSrvSM->pSmRequest->powerSaveCBObject);
-                                      
-    if ( status != TI_OK )
-    {
-        TRACE0(pPowerSrvSM->hReport, REPORT_SEVERITY_ERROR, "Error in configuring Power Manager paramters!\n");
-    }
-
-    return status;
-}
-
-/****************************************************************************************
-*                               powerSrvSMTimerExpired                                  *
-*****************************************************************************************
-DESCRIPTION: This function is called upon timer expiry - when the FW has not returned
-             a response within the defined tme (50 ms)
-                                                                                                                  
-INPUT:      hPowerSrvSM     - handle to the PowerSrvSM object.
-            bTwdInitOccured - Indicates if TWDriver recovery occured since timer started 
-
-OUTPUT:    None
-
-RETURN:    None
-****************************************************************************************/
-static void powerSrvSMTimerExpired (TI_HANDLE hPowerSrvSM, TI_BOOL bTwdInitOccured)
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-
-    /* Print an error message */
-    TRACE0(pPowerSrvSM->hReport, REPORT_SEVERITY_ERROR, "PS guard timer expired!\n");
-
-    /* Call the error notification callback (triggering recovery) */
-    pPowerSrvSM->failureEventCB( pPowerSrvSM->hFailureEventObj ,POWER_SAVE_FAILURE );
-}
-
-/****************************************************************************************
- *                        powerSrvRegisterFailureEventCB                                                    *
- ****************************************************************************************
-DESCRIPTION: Registers a failure event callback for PS SM error notifications.
-                
-                                                                                                                   
-INPUT:      - hPowerSrv         - handle to the PowerSrv object.        
-            - failureEventCB    - the failure event callback function.\n
-            - hFailureEventObj - handle to the object passed to the failure event callback function.
-
-OUTPUT: 
-RETURN:    void.
-****************************************************************************************/
-void powerSrvSM_RegisterFailureEventCB( TI_HANDLE hPowerSrvSM, 
-                                        void *failureEventCB, TI_HANDLE hFailureEventObj )
-{
-    PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)hPowerSrvSM;
-
-    pPowerSrvSM->failureEventCB = (TFailureEventCb)failureEventCB;
-    pPowerSrvSM->hFailureEventObj = hFailureEventObj;
-}
-
diff --git a/wl1271/TWD/MacServices/PowerSrvSM.h b/wl1271/TWD/MacServices/PowerSrvSM.h
deleted file mode 100644
index 97464ac..0000000
--- a/wl1271/TWD/MacServices/PowerSrvSM.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * PowerSrvSM.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file PowerSrvSM.h
- *  \brief This is the PowerSrv module API.
- *  \author Assaf Azulay
- *  \date 6-Oct-2005
- */
-
-/****************************************************************************
- *                                                                                                        *
- *   MODULE:  PowerSrv                                                                              *
- *   PURPOSE: Power Server State machine API                                                    *
- *                                                                                                              *
- ****************************************************************************/
-
-#ifndef _POWER_SRV_SM_H_
-#define _POWER_SRV_SM_H_
-
-#include "PowerSrv_API.h"
-#include "PowerSrv.h"
-
-
-
-/*****************************************************************************
- **         Constants                                                       **
- *****************************************************************************/
-
-#define POWER_SAVE_GUARD_TIME_MS            5000       /* The gaurd time used to protect from FW stuck */
-
-/*****************************************************************************
- **         Enumerations                                                    **
- *****************************************************************************/
-
-/** \enum PowerSrvSMEvents_e */
-typedef enum 
-{
-        POWER_SRV_EVENT_REQUEST_ACTIVE , 
-    POWER_SRV_EVENT_REQUEST_PS ,
-    POWER_SRV_EVENT_SUCCESS,
-    POWER_SRV_EVENT_FAIL ,
-    POWER_SRV_SM_EVENT_NUM
-}PowerSrvSMEvents_e;
-
-/** \enum PowerSrvSMStates_e */
-typedef enum 
-{
-    POWER_SRV_STATE_ACTIVE = 0,
-    POWER_SRV_STATE_PEND_PS ,
-    POWER_SRV_STATE_PS ,
-    POWER_SRV_STATE_PEND_ACTIVE ,
-    POWER_SRV_STATE_ERROR_ACTIVE,
-    POWER_SRV_SM_STATE_NUM
-}PowerSrvSMStates_e;
-
-
-
-/*****************************************************************************
- **         Structures                                                      **
- *****************************************************************************/
-
-/** \struct PowerSrvSM_t */
-typedef struct
-{
-    TI_HANDLE               hCmdBld;                    /**< 
-                                                         * Handle to the power controller object via the command builder.
-                                                         * Need for configure the desired power mode policy in the system.
-                                                         */
-
-    TI_HANDLE               hOS;                        /**< Handle to the OS object. */
-
-    TI_HANDLE               hReport;                    /**< Handle to the Report module. */
-
-    TI_HANDLE               hFSM;                       /**< Handle to the State machine module. */
-
-    TI_HANDLE               hTimer;                     /**< Handle to the Timer module. */
-
-    TI_HANDLE               hPwrSrvSmTimer;             /**< Guard timer for PS commands sent to the FW */
-
-    PowerSrvSMStates_e      currentState;               /**< the current state of the state machine. */
-
-    powerSrvRequest_t*      pSmRequest;                 /**< pointer to the relevant request in the power server. */
-
-    TI_UINT8                hangOverPeriod;             /**< parameter for the FW */
-
-    TI_UINT8                numNullPktRetries;          /**< parameter for the FW */
-    
-    EHwRateBitFiled         NullPktRateModulation;      /**< parameter for the FW */
-
-    TFailureEventCb         failureEventCB;             /**< Failure event callback */
-
-    TI_HANDLE               hFailureEventObj;           /**< Failure event object (supplied to the above callback) */
-} PowerSrvSM_t;
-
-
-
-
-
-
-
-/*****************************************************************************
- **         External data definitions                                       **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         External functions definitions                                  **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         Public Function prototypes                                      **
- *****************************************************************************/
-
-/**
- * \author Assaf Azulay
- * \date 6-Oct-2005\n
- * \brief Creates the object of the PowerSrv.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the OS.\n
- * Return Value: TI_HANDLE - handle to the PowerSrv object.\n
- */
-TI_HANDLE powerSrvSM_create(TI_HANDLE hOsHandle);
-
-/**
- * \author Assaf Azulay
- * \date 6-Oct-2005\n
- * \brief Destroy the object of the PowerSrvSM.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerSrv object.\n
- * Return Value: TI_STATUS - TI_OK on success else TI_NOK.\n
- */
-TI_STATUS powerSrvSM_destroy(TI_HANDLE thePowerSrvSMHandle);
-
-/**
- * \author Assaf Azulay
- * \date 6-Oct-2005\n
- * \brief Initialize the PowerSrvSM module.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerSrvSM object.\n
- * 2) TI_HANDLE - handle to the Report object.
- * 3) TI_HANDLE - handle to the Command Builder object.
- * 4) TI_HANDLE - handle to the Timer module object.
- * Return Value: TI_STATUS - TI_OK on success else TI_NOK.\n
- */
-TI_STATUS powerSrvSM_init (TI_HANDLE hPowerSrvSM,
-                           TI_HANDLE hReport,
-                           TI_HANDLE hCmdBld,
-                           TI_HANDLE hTimer);
-
-TI_STATUS powerSrvSM_config(TI_HANDLE hPowerSrvSM,
-                            TPowerSrvInitParams *pPowerSrvInitParams);
-/**
- * \author Assaf Azulay
- * \date 6-Oct-2005\n
- * \brief return the component version.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerSrvSM object.\n
- * Return Value: TI_UINT32 - component version code.\n
- */
-
-TI_STATUS powerSrvSM_SMApi(TI_HANDLE hPowerSrvSM,
-                                            PowerSrvSMEvents_e theSMEvent);
-
-
-/**
- * \author Assaf Azulay
- * \date 020-Oct-2005\n
- * \brief This function sets the current SM working request.\n
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerSrvSM object.\n
- * 2) powerSrvRequest_t* pSmRequest - desierd request./n
- * Return Value: TI_STATUS -  TI_OK.\n
- */
-TI_STATUS powerSrvSm_setSmRequest(TI_HANDLE hPowerSrvSM,powerSrvRequest_t* pSmRequest);
-
-
-
-/**
- * \author Assaf Azulay
- * \date 09-Jun-2004\n
- * \brief get the current state of the state machine.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerSrvSM object.\n
- * Return Value: PowerCtrlSMStates_e.\n
- */
-PowerSrvSMStates_e powerSrvSM_getCurrentState(TI_HANDLE hPowerSrvSM);
-
-
-/**
- * \author Assaf Azulay
- * \date 20-July-2004\n
- * \brief sets rate modulation
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerSrvSM object.\n
- * 2) rate_e rate modulation
- * Return Value: void.\n
- */
-void powerSrvSM_setRateModulation(TI_HANDLE hPowerSrvSM, TI_UINT16 rateModulation);
-
-/**
- * \brief sets rate modulation
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerSrvSM object.\n* 
- * Return Value: TI_UINT16 Rate.\n
- */
-TI_UINT32 powerSrvSM_getRateModulation(TI_HANDLE hPowerSrvSM);
-
-/**
- * \author Assaf Azulay
- * \date 20-July-2004\n
- * \brief print configuration of the PowerSrvSM object - use for debug!
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerSrvSM object.\n
- * Return Value: void.\n
- */
-void powerSrvSM_printObject(TI_HANDLE hPowerSrvSM);
-
-/**
- * \author Ronen Kalish
- * \date 21-August-2006\n
- * \brief Registers a failure event callback for power save error notifications (timer expiry).\n
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * - hPowerSrvSM      - handle to the PowerSrv object.        
- * - failureEventCB     - the failure event callback function.
- * - hFailureEventObj   - handle to the object passed to the failure event callback function.
-*/
-void powerSrvSM_RegisterFailureEventCB( TI_HANDLE hPowerSrvSM, 
-                                        void* failureEventCB, TI_HANDLE hFailureEventObj );
-#endif /*  _POWER_SRV_SM_H_  */
-
diff --git a/wl1271/TWD/MacServices/PowerSrv_API.h b/wl1271/TWD/MacServices/PowerSrv_API.h
deleted file mode 100644
index 9aca40e..0000000
--- a/wl1271/TWD/MacServices/PowerSrv_API.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * PowerSrv_API.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file powerSrv_API.h
- *  \brief This is the Power Manager module API.
- *  \author Yaron Menashe
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Power Server                                                 *
- *   PURPOSE: Power Server Module API                                      *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _POWER_SRV_API_H_
-#define _POWER_SRV_API_H_
-
-#include "MacServices_api.h"
-
-/*****************************************************************************
- **         Constants                                                       **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         Enumerations                                                    **
- *****************************************************************************/
-
-
-
-/*****************************************************************************
- **         Typedefs                                                        **
- *****************************************************************************/
-/*typedef void (*powerSaveCmdResponseCB_t )(TI_HANDLE cmdResponseHandle,TI_UINT8 MboxStatus);*/
-typedef TPowerSaveResponseCb powerSaveCmdResponseCB_t;
-/*typedef void (*powerSaveCmpltCB_t )(TI_HANDLE powerSaveCmpltHandle,TI_UINT8 PSMode,TI_UINT8 transStatus);*/
-typedef TPowerSaveCompleteCb powerSaveCmpltCB_t;
-/*****************************************************************************
- **         Structures                                                      **
- *****************************************************************************/
-
-
-
-
-/*****************************************************************************
- **         External data definitions                                       **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         External functions definitions                                  **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         Public Function prototypes                                      **
- *****************************************************************************/
-
-
-/**
- * \author Assaf Azulay
- * \date 20-Oct-2005\n
- * \brief Creates the object of the power Server.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the OS.\n
- * Return Value: TI_HANDLE - handle to the powerSrv object.\n
- */
-TI_HANDLE powerSrv_create(TI_HANDLE hOs);
-
-
-/**
- * \author Assaf Azulay
- * \date 27-Apr-2005\n
- * \brief Destroy the object of the power Server.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the powerSrv object.\n
- * Return Value: TI_STATUS - TI_OK on success else TI_NOK.\n
- */
-TI_STATUS powerSrv_destroy(TI_HANDLE hPowerSrv);
-
-
-/**
-  * \author Assaf Azulay
- * \date 24-Oct-2005\n
- * \brief Initialization of the powerSrv module.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the powerSrv object.\n
- * 3) TI_HANDLE - handle to the Report object.\n
- * 2) TI_HANDLE - handle to the EventMbox object.\n
- * 4) TI_HANDLE - handle to the CommandBuilder object.\n
- * 5) TI_HANDLE - handle to the Timer module object.\n
- * Return Value: TI_STATUS - TI_OK on success else TI_NOK.\n
- */
-TI_STATUS powerSrv_init (TI_HANDLE hPowerSrv,
-                         TI_HANDLE hReport,
-                         TI_HANDLE hEventMbox,
-                         TI_HANDLE hCmdBld,
-                         TI_HANDLE hTimer);
-
-
-TI_STATUS powerSrv_config(TI_HANDLE 				hPowerSrv,
-				          TPowerSrvInitParams      *pPowerSrvInitParams);
-
-/**
-  * \author Assaf Azulay
- * \date 24-Oct-2005\n
- * \brief request PS by User
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) hPowerSrv 						- handle to the PowerSrv object.\n		
- * 2) psMode							- Power save/Active request.\n
- * 3) sendNullDataOnExit				- \n
- * 4) powerSaveCompleteCBObject		- handle to the Callback functin module.\n
- * 5) powerSaveCompleteCB				- Calback function - for success/faild notification.\n
- * 6) powerSavecmdResponseCB			- Calback function - for GWSI success/faild notification.\n
- * Return Value: TI_STATUS - TI_OK / PENDING / TI_NOK.\n
- * \b Description:\n
- * This function is a user mode request from the Power Save Server./n
- * it will create a Request from typ "USER_REQUEST" and will try to perform the user request for PS/Active./n
- * this will be done in respect of priority to Driver request./n
- */
-TI_STATUS powerSrv_SetPsMode (TI_HANDLE 					hPowerSrv,
-                              E80211PsMode	                psMode,
- 							  TI_BOOL  						sendNullDataOnExit,
- 						      void * 						powerSaveCompleteCBObject,
- 						      powerSaveCmpltCB_t  			powerSaveCompleteCB,
- 						      powerSaveCmdResponseCB_t	    powerSavecmdResponseCB);
-
-
-/**
-  * \author Assaf Azulay
- * \date 24-Oct-2005\n
- * \brief SW configure, use to override the current PowerMode (what ever it will be) to
- *        active/PS combined with awake/power-down. use for temporary change the system policy.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the powerSrv object.\n
- * 2) powerSrv_RequestFor_802_11_PS_e - the driver mode obliged to be in 802.11 PS or not change.\n
- * 3) PowerCtrl_PowerLevel_e - the desired driver power level (allowed: AWAKE or POWER DOWN).\n
- * 4) TI_HANDLE theObjectHandle - the handle the object that need the PS success/fail notification.\n
- * 5) ps802_11_NotificationCB_t - the callback function.\n
- * 6) char* - the clinet name that ask for driver mode.\n
- * Return Value: TI_STATUS - if success (already in power save) then TI_OK,\n
- *                           if pend (wait to ACK form AP for the null data frame) then PENDING\n
- *                           if PS isn't enabled then POWER_SAVE_802_11_NOT_ALLOWED\n
- *                           else TI_NOK.\n
- * \b Description:\n
- * enter in to configuration of the driver that in higher priority from the user.\n
- * the configuration is:\n
- *  - to enter to802.11 PS or not (if not this isn't a request to get out from 802.11 PS).\n
- *  - to change the HW power level to awake or power-down if not already there.
- *    this is a must request.\n
-*/
-TI_STATUS powerSrv_ReservePS (TI_HANDLE 				hPowerSrv,
-							  E80211PsMode              psMode,
- 						 	  TI_BOOL  					sendNullDataOnExit,
- 							  void * 					powerSaveCBObject,
-							  powerSaveCmpltCB_t 		powerSaveCompleteCB);
-
-
-/**
- * \author Assaf Azulay
- * \date 24-Oct-2005\n
- * \brief end the temporary change of system policy, and returns to the user system policy.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the powerSrv object.\n
- * 2) char* - the clinet name that ask for driver mode.\n
- * Return Value: TI_STATUS - TI_OK on success else TI_NOK.\n
- * \b Description:\n
- * enter in to configuration of the driver that in higher priority from the user.\n
- * the configuration is:\n
- * end the user mode configuration (driver mode priority) and returns the user configuration
- * (user mode priority).
-*/
-TI_STATUS powerSrv_ReleasePS( 	TI_HANDLE 					hPowerSrv,
-									TI_BOOL  						sendNullDataOnExit,
- 						 			void *  						powerSaveCBObject,
- 									powerSaveCmpltCB_t  			powerSaveCompleteCB);
-
-
-/**
- * \author Assaf Azulay
- * \date 24-Oct-2005\n
- * \brief reflects the actual state of the state machine
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the powerSrv object.\n
- * Return Value:\n 
- * TI_BOOL - thre is in PS false otherwise.\n
-*/
-TI_BOOL powerSrv_getPsStatus(TI_HANDLE hPowerSrv);
-
-
-/**
- * \author Assaf Azulay
- * \date 24-Oct-2005\n
- * \sets the rate as got from user else sets default value.\n
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE 	- handle to the powerSrv object.\n
- * 2) TI_UINT16		- desierd rate .\n
- * Return Value:\n 
- * void.\n
-*/
-void powerSrv_SetRateModulation(TI_HANDLE hPowerSrv, TI_UINT16  rate);
-
-
-
-/**
- * \author Assaf Azulay
- * \date 9-Mar-2006\n
- * \brief Registers a failure event callback for scan error notifications.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * - hPowerSrv 		- handle to the PowerSrv object.		
- * - failureEventCB 	- the failure event callback function.
- * - hFailureEventObj 	- handle to the object passed to the failure event callback function.
-*/
-void powerSrvRegisterFailureEventCB( TI_HANDLE hPowerSrv, 
-                                     void * failureEventCB, TI_HANDLE hFailureEventObj );
-
-
-/**
- * \date 03-Jul-2006\n
- * \return the rate as it was seted by powerSrv_SetRateModulation.\n
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE 	- handle to the powerSrv object.\n
- * Return Value: TI_UINT16		- desierd rate .\n
- * void.\n
-*/
-TI_UINT32 powerSrv_GetRateModulation(TI_HANDLE hPowerSrv);
-
-TI_STATUS powerSrv_restart(	TI_HANDLE hPowerSrv);
-
-#endif /*  _POWER_SRV_API_H_  */
diff --git a/wl1271/TWD/MacServices/ScanSrv.c b/wl1271/TWD/MacServices/ScanSrv.c
deleted file mode 100644
index cdb6464..0000000
--- a/wl1271/TWD/MacServices/ScanSrv.c
+++ /dev/null
@@ -1,756 +0,0 @@
-/*
- * ScanSrv.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file ScanSrv.c
- *  \brief This file include the scan SRV module implementation
- *
- *  \see   ScanSrv.h, ScanSrvSm.h, ScanSrvSm.c
- */
-
-
-#define __FILE_ID__  FILE_ID_115
-#include "report.h"
-#include "timer.h"
-#include "ScanSrv.h"
-#include "ScanSrvSM.h"
-#include "MacServices.h"
-#include "MacServices_api.h"
-#include "eventMbox_api.h"
-#include "CmdBld.h"
-
-/**
- * \\n
- * \date 16-Oct-2004\n
- * \brief Creates the scan SRV object
- *
- * Function Scope \e Public.\n
- * \param hOS - handle to the OS object.\n
- * \return a handle to the scan SRV object, NULL if an error occurred.\n
- */
-TI_HANDLE MacServices_scanSRV_create( TI_HANDLE hOS )
-{
-    /* allocate the scan SRV object */
-    scanSRV_t *pScanSRV = os_memoryAlloc( hOS, sizeof(scanSRV_t));
-    if ( NULL == pScanSRV )
-    {
-        WLAN_OS_REPORT( ("ERROR: Failed to create scan SRV module"));
-        return NULL;
-    }
-
-    os_memoryZero( pScanSRV->hOS, pScanSRV, sizeof(scanSRV_t));
-
-    /* allocate the state machine */
-    if ( TI_OK != fsm_Create( hOS, &(pScanSRV->SM), SCAN_SRV_NUM_OF_STATES, SCAN_SRV_NUM_OF_EVENTS ))
-    {
-        WLAN_OS_REPORT( ("ERROR: Failed to allocate scan SRV state machine"));
-        os_memoryFree( hOS, pScanSRV, sizeof(scanSRV_t));
-        return NULL;
-    }
- 
-    /* store the OS handle */
-    pScanSRV->hOS = hOS;
-
-    return pScanSRV;
-}
-
-/**
- * \\n
- * \date 29-Dec-2004\n
- * \brief Finalizes the scan SRV module (releasing memory and timer)
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- */
-void MacServices_scanSRV_destroy( TI_HANDLE hScanSRV )
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)hScanSRV;
-
-    /* free timer */
-	if (pScanSRV->hScanSrvTimer)
-	{
-		tmr_DestroyTimer (pScanSRV->hScanSrvTimer);
-	}
-    
-    /* free memory */
-    fsm_Unload( pScanSRV->hOS, pScanSRV->SM );
-    os_memoryFree( pScanSRV->hOS, (TI_HANDLE)pScanSRV , sizeof(scanSRV_t));
-}
-
-/**
- * \\n
- * \date 29-Dec-2004\n
- * \brief Initializes the scan SRV module, registers SCAN_COMPLETE to HAL.
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- * \param Handles of other modules.\n
-  */
-TI_STATUS MacServices_scanSRV_init (TI_HANDLE hMacServices,
-                                    TI_HANDLE hReport,
-                                    TI_HANDLE hTWD,
-                                    TI_HANDLE hTimer,
-                                    TI_HANDLE hEventMbox,
-                                    TI_HANDLE hCmdBld)
-{
-    MacServices_t* pMacServices =  (MacServices_t*)hMacServices;
-    scanSRV_t *pScanSRV =  pMacServices->hScanSRV;
-
-    /* store handles */
-    pScanSRV->hTWD = hTWD;
-    pScanSRV->hTimer = hTimer;
-    pScanSRV->hReport = hReport;
-    pScanSRV->hEventMbox = hEventMbox;
-    pScanSRV->hPowerSrv = pMacServices->hPowerSrv;
-    pScanSRV->hCmdBld = hCmdBld;
-    pScanSRV->commandResponseFunc = NULL;
-    pScanSRV->commandResponseObj = NULL;  
-
-    /* create the timer */
-    pScanSRV->hScanSrvTimer = tmr_CreateTimer (pScanSRV->hTimer);
-	if (pScanSRV->hScanSrvTimer == NULL)
-	{
-        TRACE0(pScanSRV->hReport, REPORT_SEVERITY_ERROR, "MacServices_scanSRV_init(): Failed to create hScanSrvTimer!\n");
-		return TI_NOK;
-	}
-
-    /* init state machine */
-    scanSRVSM_init ((TI_HANDLE)pScanSRV);
-
-    /* Register our scan complete handler to the HAL events mailbox */
-    eventMbox_RegisterEvent (pScanSRV->hEventMbox, 
-                              TWD_OWN_EVENT_SCAN_CMPLT, 
-                              (void *)MacServices_scanSRV_scanCompleteCB, 
-                              (TI_HANDLE)pScanSRV); 
-    eventMbox_RegisterEvent (pScanSRV->hEventMbox, 
-                              TWD_OWN_EVENT_SPS_SCAN_CMPLT, 
-                              (void *)MacServices_scanSRV_scanCompleteCB, 
-                              (TI_HANDLE)pScanSRV);
-
-    /* init other stuff */
-    pScanSRV->currentNumberOfConsecutiveNoScanCompleteEvents = 0;
-
-    TRACE0( hReport, REPORT_SEVERITY_INIT, ".....Scan SRV configured successfully.\n");
-
-    return TI_OK;
-}
-
-/**
- * \brief Restart the scan SRV module upon recovery.
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- */
-void scanSRV_restart (TI_HANDLE hScanSRV)
-{
-	scanSRV_t *pScanSRV =  (scanSRV_t *)hScanSRV;
-    /* init state machine */
-	/* initialize current state */
-	pScanSRV->SMState = SCAN_SRV_STATE_IDLE;
-
-    if (pScanSRV->bTimerRunning)
-    {
-        tmr_StopTimer (pScanSRV->hScanSrvTimer);
-        pScanSRV->bTimerRunning = TI_FALSE;
-    }
-}
-
-/**
- * \\n
- * \date 26-July-2006\n
- * \brief Configures the scan SRV module with initialization values
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- * \param hReport - handle to the report object.\n
- * \param hTWD - handle to the HAL ctrl object.\n
-  */
-void MacServices_scanSrv_config( TI_HANDLE hMacServices, TScanSrvInitParams* pInitParams )
-{
-    MacServices_t* pMacServices =  (MacServices_t*)hMacServices;
-    scanSRV_t *pScanSRV =  pMacServices->hScanSRV;
-
-    pScanSRV->numberOfNoScanCompleteToRecovery = pInitParams->numberOfNoScanCompleteToRecovery;
-
-    /* Set Triggered scan time out per channel */
-    pScanSRV->uTriggeredScanTimeOut = pInitParams->uTriggeredScanTimeOut;
-	TWD_CmdSetSplitScanTimeOut (pScanSRV->hTWD, pScanSRV->uTriggeredScanTimeOut);
-}
-
-/**
- * \\n
- * \date 29-Dec-2004\n
- * \brief Registers a complete callback for scan complete notifications.
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \param scanCompleteCB - the complete callback function.\n
- * \param hScanCompleteObj - handle to the object passed to the scan complete callback function.\n
- */
-void MacServices_scanSRV_registerScanCompleteCB( TI_HANDLE hMacServices, 
-                                     TScanSrvCompleteCb scanCompleteCB, TI_HANDLE hScanCompleteObj )
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)((MacServices_t*)hMacServices)->hScanSRV;
-
-    pScanSRV->scanCompleteNotificationFunc = scanCompleteCB;
-    pScanSRV->scanCompleteNotificationObj = hScanCompleteObj;
-}
-
-/**
- * \brief Registers a failure event callback for scan error notifications.
- *
- * Function Scope \e member.\n
- * \param hScanSRV - handle to the Scan SRV object.\n
- * \param failureEventCB - the failure event callback function.\n
- * \param hFailureEventObj - handle to the object passed to the failure event callback function.\n
- */
-void scanSRV_registerFailureEventCB( TI_HANDLE hScanSRV, 
-                                     void * failureEventCB, TI_HANDLE hFailureEventObj )
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)(hScanSRV);
-
-    pScanSRV->failureEventFunc  = (TFailureEventCb)failureEventCB;
-    pScanSRV->failureEventObj   = hFailureEventObj;
-}
-
-/**
- * \\n
- * \date 27-Sep-2005\n
- * \brief This function is the CB which is called as response to 'StartScan' or 'StopScan' \n.
- *        here we check if there is a GWSI command response , and call it if necessary .\n
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \param MboxStatus - mailbox status. \n
- */
-void MacServices_scanSRVCommandMailBoxCB(TI_HANDLE hScanSrv,TI_UINT16 MboxStatus)
-{
-    scanSRV_t* pScanSRV = (scanSRV_t*)hScanSrv;
-    TI_UINT16 responseStatus;
-    TCmdResponseCb CB_Func;
-    TI_HANDLE  CB_Handle;
-
-    TRACE1( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, " status %u\n",MboxStatus);
-
-    /* set response to TI_OK or TI_NOK */
-    responseStatus = ((MboxStatus > 0) ? TI_NOK : TI_OK);
-    
-    /* if we have a Response Function (only in GWSI) we set it back to NULL and then 
-        we call it */
-    if (pScanSRV->commandResponseFunc != NULL)
-    {
-        CB_Func = pScanSRV->commandResponseFunc;
-        CB_Handle = pScanSRV->commandResponseObj;
-
-        pScanSRV->commandResponseFunc = NULL;
-        pScanSRV->commandResponseObj = NULL;
-
-        CB_Func(CB_Handle, responseStatus);
-    }
-     /* if scan request failed */
-    if ( TI_OK != responseStatus )
-    {
-        TRACE0( pScanSRV->hReport, REPORT_SEVERITY_ERROR, "Mail box returned error , quitting scan.\n");
-
-        /* send a scan complete event. This will do all necessary clean-up (timer, power manager, notifying scan complete) */
-        scanSRVSM_SMEvent( hScanSrv, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_SCAN_COMPLETE );
-    }
-}
-
-/**
- * \\n
- * \date 29-Dec-2004\n
- * \brief Performs a scan
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \param scanParams - the scan specific parameters.\n
- * \param eScanresultTag - tag used for result and scan complete tracking
- * \param bHighPriority - whether to perform a high priority (overlaps DTIM) scan.\n
- * \param bDriverMode - whether to try to enter driver mode (with PS on) before issuing the scan command.\n
- * \param bScanOnDriverModeError - whether to proceed with the scan if requested to enter driver mode and failed.\n
- * \param psRequest - Parameter sent to PowerSaveServer on PS request to indicate PS on or "keep current" 
- * \param bSendNullData - whether to send Null data when exiting driver mode on scan complete.\n
- * \param commandResponseFunc - CB function which called after downloading the command. \n
- * \param commandResponseObj -  The CB function Obj (Notice : last 2 params are NULL in Legacy run). \n
- * \param psRequest - Parameter sent to PowerSaveServer on PS request to indicate PS on or "keep current" 
- * \return TI_OK if successful (various, TBD codes if not).\n
- */
-TI_STATUS MacServices_scanSRV_scan( TI_HANDLE hMacServices, TScanParams *scanParams, EScanResultTag eScanTag,
-                                    TI_BOOL bHighPriority, TI_BOOL bDriverMode, TI_BOOL bScanOnDriverModeError, 
-                        E80211PsMode psRequest, TI_BOOL bSendNullData,
-                        TCmdResponseCb commandResponseFunc, TI_HANDLE commandResponseObj)
-{
-   scanSRV_t *pScanSRV = (scanSRV_t*)((MacServices_t*)hMacServices)->hScanSRV;
-
-
-    TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "Scan request received.\n");
-
-    /* sanity check - scan can only start if the scan SRV is idle */
-    if ( SCAN_SRV_STATE_IDLE != pScanSRV->SMState )
-    {
-        TRACE0( pScanSRV->hReport, REPORT_SEVERITY_WARNING, "Scan request while scan is running!\n");
-        return TI_NOK;
-    }
-
-    /* Response function for GWSI only. In Legacy run we get NULL and never use it. */
-    pScanSRV->commandResponseFunc = commandResponseFunc;
-    pScanSRV->commandResponseObj  = commandResponseObj;
-
-    pScanSRV->bInRequest = TI_TRUE;
-    pScanSRV->returnStatus = TI_OK;
-
-    /* copy scan paramaters */
-    pScanSRV->scanParams = scanParams;
-    pScanSRV->eScanTag = eScanTag;
-    pScanSRV->uResultCount = 0;
-    pScanSRV->bHighPriority = bHighPriority;
-    pScanSRV->bScanOnDriverModeFailure = bScanOnDriverModeError;
-    pScanSRV->bSendNullData = bSendNullData;
-    pScanSRV->psRequest = psRequest;
-
-    if ( SCAN_TYPE_SPS == scanParams->scanType )
-    {
-        pScanSRV->bSPSScan = TI_TRUE;
-
-    }
-    else
-    {
-        pScanSRV->bSPSScan = TI_FALSE;
-    }
-
-
-    /* check whether the scan will overlap DTIM frame */
-    if ( (TI_FALSE == bHighPriority) && (TI_TRUE == bDriverMode))
-    {
-        pScanSRV->bDtimOverlapping = TI_FALSE;
-    }
-    else
-    {
-        pScanSRV->bDtimOverlapping = TI_TRUE;
-    }
-
-    /* mark the no scan complete flag. The purpose of this flag is to be able to identify
-       whether the scan complete is a normal process, or was it generated because a no scan ocmplete
-       was identified, a stop scan command was snet to the FW, and thus a scan complete was received.
-       In the former case we nullify the consecutive no scan complete counter, whereas in the latter
-       we do not. */
-    pScanSRV->bNoScanCompleteFlag = TI_FALSE;
-
-    /* if required to enter driver mode */
-    if ( TI_TRUE == bDriverMode )
-    {
-        pScanSRV->bExitFromDriverMode = TI_TRUE;
-        /* send a PS_REQUEST event */
-        scanSRVSM_SMEvent( (TI_HANDLE)pScanSRV, (scan_SRVSMStates_e*)&(pScanSRV->SMState), SCAN_SRV_EVENT_REQUEST_PS );
-    }
-    /* no driver mode required */
-    else
-    {
-        pScanSRV->bExitFromDriverMode = TI_FALSE;
-        /* send a PS_SUCCESS event - will start the scan */
-        scanSRVSM_SMEvent( (TI_HANDLE)pScanSRV, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_PS_SUCCESS );
-    }
-
-    pScanSRV->bInRequest = TI_FALSE;
-    
-    return pScanSRV->returnStatus;
-}
-
-/**
- * \\n
- * \date 29-Dec-2004\n
- * \brief Sends a Stop Scan command to FW, no matter if we are in scan progress or not
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \param eScanTag - scan tag, used for scan complete and result tracking
- * \param bSendNullData - indicates whether to send Null data when exiting driver mode.\n
- * \param commandResponseFunc - CB function which called after downloading the command. \n
- * \param commandResponseObj -  The CB function Obj (Notice : last 2 params are NULL in Legacy run). \n
- * \return TI_OK if successful (various, TBD codes if not).\n
- */
-TI_STATUS MacServices_scanSRV_stopScan( TI_HANDLE hMacServices, EScanResultTag eScanTag, TI_BOOL bSendNullData,
-                                        TCmdResponseCb ScanCommandResponseCB, TI_HANDLE CB_handle )
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)((MacServices_t*)hMacServices)->hScanSRV;
-    TI_INT32 stopScanStatus;
-
-    TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "Stop scan request received.\n");
-
-    /* update the driver mode exit flag */
-    pScanSRV->bSendNullData = bSendNullData;
-
-    if ( TI_TRUE == pScanSRV->bSPSScan )
-    {
-        stopScanStatus = cmdBld_CmdStopSPSScan (pScanSRV->hCmdBld, eScanTag, (void *)ScanCommandResponseCB, CB_handle);
-    }
-    else
-    {
-        stopScanStatus = cmdBld_CmdStopScan (pScanSRV->hCmdBld, eScanTag, (void *)ScanCommandResponseCB, CB_handle);
-    }
-
-    if (TI_OK != stopScanStatus)
-    {
-        return TI_NOK;
-    }
-    
-    /* send a stop scan event */
-    scanSRVSM_SMEvent( (TI_HANDLE)pScanSRV, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_STOP_SCAN );
-
-    return pScanSRV->returnStatus;
-}
-
-/**
- * \\n
- * \date 17-Jan-2005\n
- * \brief Notifies the scan SRV of a FW reset (that had originally been reported by a different module).\n
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \return TI_OK if successful (various, TBD codes if not).\n
- */
-TI_STATUS MacServices_scanSRV_stopOnFWReset( TI_HANDLE hMacServices )
-{
-   scanSRV_t *pScanSRV = (scanSRV_t*)((MacServices_t*)hMacServices)->hScanSRV;
-
-    TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "FW reset notification received.\n");
-
-    /* mark the return status */
-    pScanSRV->returnStatus = TI_NOK;
-
-    /* send a FW reset event */
-    return scanSRVSM_SMEvent( (TI_HANDLE)pScanSRV, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_FW_RESET );
-}
-
-/**
- * \\n
- * \date 29-Dec-2004\n
- * \brief callback function used by the power server to notify driver mode result
- *          this CB is used in requesting PS and exiting PS.
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- * \param psStatus - the power save request status.\n
- */
-void MacServices_scanSRV_powerSaveCB( TI_HANDLE hScanSRV, TI_UINT8 PSMode,TI_UINT8 psStatus )
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)hScanSRV;
-
-    TRACE1( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "PS Call Back status %d .\n",psStatus);
-
-    /* if driver mode enter/exit succeedded */
-    if ( (ENTER_POWER_SAVE_SUCCESS == psStatus) || (EXIT_POWER_SAVE_SUCCESS == psStatus))
-    {
-        TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "PS successful.\n");
-
-        /* send a PS_SUCCESS event */
-        scanSRVSM_SMEvent( (TI_HANDLE)pScanSRV, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_PS_SUCCESS );
-    }
-    /* driver mode entry failed, and scan is requested even on PS failure but we are entering PS and not Exiting */
-    else if ( (TI_TRUE == pScanSRV->bScanOnDriverModeFailure) && ( ENTER_POWER_SAVE_FAIL == psStatus))
-    {
-        TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "PS enter failed, continune scan .\n");
-
-        /* send a PS_SUCCESS event */
-        scanSRVSM_SMEvent( (TI_HANDLE)pScanSRV, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_PS_SUCCESS );
-    }
-    /* driver mode enter or exit failed */
-    else
-    {
-        /* if we are trying to enter PS and fail to do so - return error on scan complete */
-        if ( ENTER_POWER_SAVE_FAIL == psStatus) 
-        {
-            TRACE0( pScanSRV->hReport, REPORT_SEVERITY_WARNING, "PS enter failed . quiting scan .\n");
-            /* Set the return status  */
-            pScanSRV->returnStatus = TI_NOK;
-        }
-
-        /* send a PS FAIL event */
-        scanSRVSM_SMEvent( (TI_HANDLE)pScanSRV, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_PS_FAIL );
-    }
-}
-
-
-/**
- * \\n
- * \date 29-Dec-2004\n
- * \brief Callback function used by the HAL ctrl to notify scan complete
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- * \param str - pointer to scan result buffer (holding SPS status for SPS scan only!).\n
- * \param strLen - scan result buffer length (should ALWAYS be 2, even for non SPS scans).\n
- */
-void MacServices_scanSRV_scanCompleteCB( TI_HANDLE hScanSRV, char* str, TI_UINT32 strLen )
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)hScanSRV;
-    scanCompleteResults_t   *pResult = (scanCompleteResults_t*)str;
-
-    TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "Scan complete notification from TNET.\n");
-
-	/* nullify the consecutive no scan complete events counter  - only if this is a scan complete that
-       does not happen afetr a stop scan (due to a timer expiry) */
-	if ( TI_FALSE == pScanSRV->bNoScanCompleteFlag )
-    {
-        pScanSRV->currentNumberOfConsecutiveNoScanCompleteEvents = 0;
-    }
-
-    /* copy result counter and scan tag */
-    pScanSRV->uResultCount = pResult->numberOfScanResults;
-    pScanSRV->eScanTag = (EScanResultTag)pResult->scanTag;
-
-    /* copy scan SPS addmitted channels and SPS result */
-    if (TI_FALSE == pScanSRV->bSPSScan) 
-    {
-        /* normal scan - no result is available */
-        pScanSRV->bTSFError = TI_FALSE;
-        TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "Normal scan completed.\n");
-    }
-    else
-    {
-        /* SPS scan - first byte indicates whether a TSF error (AP recovery) occured */
-        if ( 0 != (pResult->scheduledScanStatus >> 24))
-        {
-            pScanSRV->bTSFError = TI_TRUE;
-        }
-        else
-        {
-            pScanSRV->bTSFError = TI_FALSE;
-        }
-
-        /* next two bytes indicates on which channels scan was attempted */
-        pScanSRV->SPSScanResult = (TI_UINT16)(pResult->scheduledScanStatus >> 16) | 0xff;
-        pScanSRV->SPSScanResult = ENDIAN_HANDLE_WORD( pScanSRV->SPSScanResult );
-        TRACE1( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "SPS scan completed. TSF error: , SPS result: %x\n", pScanSRV->SPSScanResult);
-    }
-
-    /* send a SCAN_COMPLETE event  */
-    scanSRVSM_SMEvent( (TI_HANDLE)pScanSRV, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_SCAN_COMPLETE );
-}
-
-/**
- * \\n
- * \date 29-Dec-2004\n
- * \brief called when a scan timer expires. Completes the scan and starts a recovery process.
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- * \param bTwdInitOccured - Indicates if TWDriver recovery occured since timer started.\n
- */
-void MacServices_scanSRV_scanTimerExpired (TI_HANDLE hScanSRV, TI_BOOL bTwdInitOccured)
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)hScanSRV;
-
-    /* mark that no scan complete occured (see sanSRV_scan for more detailed explanation) */
-    pScanSRV->bNoScanCompleteFlag = TI_TRUE;
-
-    /* send a TIMER_EXPIRED event */
-    scanSRVSM_SMEvent( (TI_HANDLE)pScanSRV, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_TIMER_EXPIRED );
-}
-
-/**
- * \\n
- * \date 29-Dec-2004\n
- * \brief Calculates the maximal time required for a scan operation
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- * \param scanParams - the scan parameters
- * \param bConsiderDTIM - whether this scan overlaps DTIM
- * \return the time (in milliseconds)
- */
-TI_UINT32 MacServices_scanSRVcalculateScanTimeout( TI_HANDLE hScanSRV, TScanParams* scanParams, TI_BOOL bConsiderDTIM )
-{
-    TI_UINT32 i, uDtimPeriodMs, uBeaconIntervalMs, timeout = 0;
-    scanSRV_t *pScanSRV = (scanSRV_t*)hScanSRV;
-
-    /********************************************************************************
-        timeout calculation is performed according to scan type:
-        1. for normal scan, multiply the channel time by the number of channels.
-           if this scan is not overlapping DTIM, add the DTIM period (in case
-           starting the scan right now will cause the very last milliseconds of the
-           scan to overlap the next DTIM). Add the guard time.
-        2. for triggered scan, multiply the channel time plus the trigger time
-           constant (the maximum time between two frames from the Tid
-           according to which the scan is triggered) by the number of channels.
-           DTIM period is added only as precaution - since the scan is divided to
-           channels, only very few of them will be delayed due to DTIM (in the worst 
-           case), and this delay would be only the length of one channel scan.
-           Eventually, Add the guard time.
-        3. for SPS scan: Measure the time from current TSF to the TSF at which the 
-           scan is scheduled to finish (done by the scan manager, and passed as 
-           a parameter in the scan structure). Add guard time. DTIM overlapping is not 
-           considered because if the scan overlaps DTIM the channels which are 
-           scheduled during the DTIM (if any) won't be scanned.
-     ********************************************************************************/
-
-    /* get DTIM time, if scanning in connected mode and need to consider DTIM */
-    if ( bConsiderDTIM ) 
-    {  
-        /* new dtimPeriod calculation */
-        uBeaconIntervalMs = MacServices_scanSRVConvertTUToMsec (pScanSRV->uBeaconInterval);
-        uDtimPeriodMs     = uBeaconIntervalMs * pScanSRV->uDtimPeriod; 
-    }
-    else
-    {
-        uDtimPeriodMs = 0;
-    }
-
-    switch (scanParams->scanType)
-    {
-    case SCAN_TYPE_NORMAL_ACTIVE:
-    case SCAN_TYPE_NORMAL_PASSIVE:
-        /* the timeout is the scan duration on all channels */
-        for ( i = 0; i < scanParams->numOfChannels; i++ )
-        {
-            timeout += scanParams->channelEntry[ i ].normalChannelEntry.maxChannelDwellTime;
-        }
-        timeout = (timeout / 1000) + uDtimPeriodMs + SCAN_SRV_FW_GUARD_TIME_MS;
-        break;
-
-    case SCAN_TYPE_TRIGGERED_ACTIVE:
-    case SCAN_TYPE_TRIGGERED_PASSIVE:
-        /* the timeout is the scan duration on all channels, plus the maximum time that can pass 
-           between two different frames from the same Tid */
-        for ( i = 0; i < scanParams->numOfChannels; i++ )
-        {
-            timeout += scanParams->channelEntry[ i ].normalChannelEntry.maxChannelDwellTime;
-        }
-        timeout = (timeout / 1000) + uDtimPeriodMs + 
-                  ((pScanSRV->uTriggeredScanTimeOut / 1000 + 1) * scanParams->numOfChannels) + 
-                  SCAN_SRV_FW_GUARD_TIME_MS;
-        break;
-
-    case SCAN_TYPE_SPS:
-        timeout = scanParams->SPSScanDuration + SCAN_SRV_FW_GUARD_TIME_MS;
-        break;
-
-    default:
-        TRACE1( pScanSRV->hReport, REPORT_SEVERITY_ERROR, "Trying to calculate timeout for undefined scan type %d\n", scanParams->scanType);
-        break;
-    }
-    TRACE1( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "scanSRVcalculateScanTimeout, timeout = %d\n", timeout);
-
-    return timeout;
-}
-
-/**
- * \\n
- * \date 16-Jan-2005\n
- * \brief Convert time units (1024 usecs) to millisecs
- *
- * Function Scope \e Private.\n
- * \param tu - the time in time units
- * \return the time in milliseconds
- */
-TI_UINT32 MacServices_scanSRVConvertTUToMsec( TI_UINT32 tu )
-{
-    return (tu * 1024) / 1000;
-}
-
-
-/**
- * \\n
- * \brief Save DTIM and Beacon periods for scan timeout calculations
- *
- * Function Scope \e Public.\n
- * \param hMacServices    - module object
- * \param uDtimPeriod     - DTIM period in number of beacons
- * \param uBeaconInterval - Beacon perios in TUs (1024 msec)
- * \return void
- */
-void MacServices_scanSrv_UpdateDtimTbtt (TI_HANDLE hMacServices, 
-                                         TI_UINT8  uDtimPeriod, 
-                                         TI_UINT16 uBeaconInterval)
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)((MacServices_t*)hMacServices)->hScanSRV;
-
-    pScanSRV->uDtimPeriod     = uDtimPeriod;
-    pScanSRV->uBeaconInterval = uBeaconInterval;
-}
-
-
-#ifdef TI_DBG
-/**
- * \\n
- * \date God knows when...\n
- * \brief Prints Scan Server SM status.\n
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the Mac Services object.\n
- * \return always TI_OK.\n
- */
-void MacServices_scanSrv_printDebugStatus(TI_HANDLE hMacServices)
-{
-   scanSRV_t *pScanSRV = (scanSRV_t*)((MacServices_t*)hMacServices)->hScanSRV;
-
-    WLAN_OS_REPORT(("scanSrv State="));
-    switch (pScanSRV->SMState)
-    {
-    case SCAN_SRV_STATE_IDLE:
-        WLAN_OS_REPORT((" IDLE\n"));
-        break;
-    case SCAN_SRV_STATE_PS_WAIT:
-        WLAN_OS_REPORT((" PS_WAIT\n"));
-        break;
-    case SCAN_SRV_STATE_PS_EXIT:
-        WLAN_OS_REPORT((" PS_EXIT\n"));
-        break;
-    case SCAN_SRV_STATE_SCANNING:
-        WLAN_OS_REPORT((" SCANNING\n"));
-        break;
-    case SCAN_SRV_STATE_STOPPING:
-        WLAN_OS_REPORT((" STOPPING\n"));
-        break;
-    default:
-        WLAN_OS_REPORT((" Invalid State=%d\n",pScanSRV->SMState));
-        break;
-
-    }
-
-    if (NULL != pScanSRV->scanParams)
-    {
-        WLAN_OS_REPORT(("scanSrv bExitFromDriverMode=%d, bHighPriority=%d, bInRequest=%d,\n \
-                        bScanOnDriverModeFailure=%d, bSendNullData=%d, bSPSScan=%d, bTimerRunning=%d, \n \
-                        psRequest=%d, scanType=%d\n", 
-                        pScanSRV->bExitFromDriverMode,
-                        pScanSRV->bHighPriority,
-                        pScanSRV->bInRequest,
-                        pScanSRV->bScanOnDriverModeFailure,
-                        pScanSRV->bSendNullData,
-                        pScanSRV->bSPSScan,
-                        pScanSRV->bTimerRunning,
-                        pScanSRV->psRequest,
-                        pScanSRV->scanParams->scanType));
-    }
-}
-#endif
-
diff --git a/wl1271/TWD/MacServices/ScanSrv.h b/wl1271/TWD/MacServices/ScanSrv.h
deleted file mode 100644
index 3370cef..0000000
--- a/wl1271/TWD/MacServices/ScanSrv.h
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * ScanSrv.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file ScanSrv.h
- *  \brief This file include private definitions for the scan SRV module.
- *
- *  \see   ScanSrv.c, ScanSrvSM.c, ScanSrvSM.h
- */
-
-
-#ifndef __SCANSRV_H__
-#define __SCANSRV_H__
-
-#include "TWDriverInternal.h"
-#include "MacServices_api.h"
-#include "fsm.h"
-#include "ScanSrvSM.h"
-
-/*
- ***********************************************************************
- *  Constant definitions.
- ***********************************************************************
- */
-/* guard time for scan (added to calculated scan duration) */
-#define SCAN_SRV_FW_GUARD_TIME_MS                       62000
-/* module name for driver mode requests */
-#define SCAN_SRV_NAME                                   "SSRV"
-
-
-/*
- ***********************************************************************
- *  Enums.
- ***********************************************************************
- */
-
-
-/*
- ***********************************************************************
- *  Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  Structure definitions.
- ***********************************************************************
- */
-
-/** \struct scanSRV_t
- * \brief This structure contains the scan SRV object data
- */
-typedef struct
-{
-    TI_HANDLE           hOS;                           /**< OS object handle */
-    TI_HANDLE           hReport;                       /**< report object handle */
-    TI_HANDLE           hPowerSrv;                     /**< power Server object handle */
-    TI_HANDLE           hTWD;                          /**< TWD layer handle */
-    TI_HANDLE           hTimer;                        /**< Timer module object handle */
-    TI_HANDLE           hEventMbox;                    /**< EventMbox module object handle */
-    TI_HANDLE           hCmdBld;                       /**< Command builder object handle */
-    TScanSrvCompleteCb  scanCompleteNotificationFunc;  /**< 
-                                                         * upper layer (scan concentrator) scan complete 
-                                                         * callback function
-                                                         */
-    TI_HANDLE           scanCompleteNotificationObj;    /**< 
-                                                         * upper layer (scan concentrator) scan complete
-                                                         * callback function
-                                                         */
-    
-    TCmdResponseCb      commandResponseFunc;            /**<
-                                                         * upper layer command response CB. Passed down into the HAL
-                                                         * and called when the scan command has been received by the FW
-                                                         */
-    TI_HANDLE           commandResponseObj;             /**<
-                                                         * object parameter passed to the commandResposeFunc by the HAL
-                                                         * when it is called 
-                                                         */
-    TFailureEventCb     failureEventFunc;               /**<
-                                                         * upper layer Failure Event CB.
-                                                         * called when the scan command has been Timer Expiry
-                                                         */
-    TI_HANDLE           failureEventObj;                /**<
-                                                         * object parameter passed to the failureEventFunc
-                                                         * when it is called 
-                                                         */
-    TI_UINT16           SPSScanResult;                  /**< 
-                                                         * bitmap indicating which channels were scanned
-                                                         * in an SPS scan
-                                                         */
-    TI_BOOL             bTSFError;                      /** indicates whether a TSF error occured */                                                        /**< 
-                                                         * scan result: indicates a TSF error event and 
-                                                         * which channels were scanned in SPS
-                                                         */
-    TI_BOOL             bDtimOverlapping;               /**< Indicates whether the scan is overlapping DTIM */
-    TI_BOOL             bExitFromDriverMode;            /**< 
-                                                         * Indicates whether to exit driver mode once scan 
-                                                         * is finished
-                                                         */
-    TI_BOOL             bSendNullData;                  /**< 
-                                                         * Indicates whether to send Null data when exiting driver  
-                                                         * mode once scan is finished
-                                                         */
-    TI_BOOL             bScanOnDriverModeFailure;       /**< 
-                                                         * Indicates whether to scan if driver mode entry
-                                                         * wasn't successful
-                                                         */
-    TI_BOOL             bHighPriority;                  /**<
-                                                         * Indicates whether to request high priority 
-                                                         * (overlapping DTIM) scan
-                                                         */
-    TI_BOOL             bSPSScan;                       /**< 
-                                                         * whether the running scan type is SPS (TI_TRUE)
-                                                         * or something else (TI_FALSE). Used to stop a
-                                                         * running scan.
-                                                         */
-    TScanParams*        scanParams;                     /**< scan parameters */
-    EScanResultTag      eScanTag;                       /**< scan result tag */
-    TI_UINT32           uResultCount;                   /**< number of scan results (received from the FW) */
-    TI_HANDLE           hScanSrvTimer;                  /**< scan operation timer */
-    TI_BOOL             bTimerRunning;                  /**< whether the above timer is running */
-    TI_BOOL             bInRequest;                     /**<
-                                                         * Indicates whether the SM is run within
-                                                         * the scan request context (if so, to avoid
-                                                         * re-entrance, the complete function shouldn't
-                                                         * be called on failure, but rather an invalid
-                                                         * status should be returned)
-                                                         */
-    TI_STATUS           returnStatus;                   /**< 
-                                                         * Holds the return code to the upper layer
-                                                         * Used to save errors during SM operation.
-                                                         */
-    /* state machine */
-    fsm_stateMachine_t* SM;                             /**< 
-                                                         * state machines for different
-                                                         * scan types
-                                                         */
-    scan_SRVSMStates_e  SMState;                        /**< 
-                                                         * state machine current states 
-                                                         * for different scan types
-                                                         */
-    E80211PsMode        psRequest;                      /**< 
-                                                         * Indicates if PS was requested or not
-                                                         * for current scan
-                                                         */
-    TI_UINT32           numberOfNoScanCompleteToRecovery;
-                                                        /**< 
-                                                         * The number of consecutive no scan complete
-                                                         * that will trigger a recovery notification
-                                                         */
-    TI_UINT32           currentNumberOfConsecutiveNoScanCompleteEvents;
-                                                        /**<
-                                                         * The number of consecutivre no scan complete 
-                                                         * events at present
-                                                         */
-    TI_BOOL             bNoScanCompleteFlag;            /**<
-                                                         * Indicates if the last event was start scan
-                                                         * (true) or no scan complete (false) to be able
-                                                         * to nullify correctly the above counter */
-    TI_UINT32           uTriggeredScanTimeOut;          /**<
-                                                         * Time out for starting triggered scan between 
-                                                         * 2 channels */
-    TI_UINT8                uDtimPeriod;
-    TI_UINT16               uBeaconInterval;
-} scanSRV_t;
-
-/*
- ***********************************************************************
- *  External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  External functions definitions
- ***********************************************************************
- */
-
-/**
- * \\n
- * \date 16-Oct-2004\n
- * \brief Creates the scan SRV object
- *
- * Function Scope \e Public.\n
- * \param hOS - handle to the OS object.\n
- * \return a handle to the scan SRV object, NULL if an error occurred.\n
- */
-TI_HANDLE MacServices_scanSRV_create( TI_HANDLE hOS );
-
-/**
- * \\n
- * \date 29-Dec-2004\n
- * \brief Finalizes the scan SRV module (releasing memory and timer)
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- */
-void MacServices_scanSRV_destroy( TI_HANDLE hScanSRV );
-
-/**
- * \\n
- * \date 29-Dec-2004\n
- * \brief Initializes the scan SRV module, registers SCAN_COMPLETE to HAL.
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- * \param Handles of other modules.\n
-  */
-TI_STATUS MacServices_scanSRV_init (TI_HANDLE hMacServices,
-                                    TI_HANDLE hReport,
-                                    TI_HANDLE hTWD,
-                                    TI_HANDLE hTimer,
-                                    TI_HANDLE hEventMbox,
-                                    TI_HANDLE hCmdBld);
-
-/**
- * \\n
- * \date 26-July-2006\n
- * \brief Configures the scan SRV module with initialization values
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- * \param hReport - handle to the report object.\n
- * \param hHalCtrl - handle to the HAL ctrl object.\n
-  */
-void MacServices_scanSrv_config( TI_HANDLE hMacServices, TScanSrvInitParams* pInitParams );
-
-/**
- * \\n
- * \date 29-Dec-2004\n
- * \brief Calculates the maximal time required for a scan operation
- *
- * Function Scope \e Public.\n
- * \param hScanSRV - handle to the scan SRV object.\n
- * \param scanParams - the scan parameters
- * \param bConsiderDTIM - whether this scan overlaps DTIM
- * \return the time (in milliseconds)
- */
-TI_UINT32 MacServices_scanSRVcalculateScanTimeout( TI_HANDLE hScanSrv, TScanParams* scanParams, TI_BOOL bConsiderDTIM );
-
-/**
- * \\n
- * \date 16-Jan-2005\n
- * \brief Convert time units (1024 usecs) to millisecs
- *
- * Function Scope \e Private.\n
- * \param tu - the time in time units
- * \return the time in milliseconds
- */
-TI_UINT32 MacServices_scanSRVConvertTUToMsec( TI_UINT32 tu );
-
-/**
- * \\n
- * \date 27-Sep-2005\n
- * \brief This function is the CB which is called as response to 'StartScan' or 'StopScan' \n.
- *        here we check if there is a GWSI command response , and call it if necessary .\n
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \param MboxStatus - mailbox status. \n
- */
-
-void MacServices_scanSRVCommandMailBoxCB(TI_HANDLE hScanSrv,TI_UINT16 MboxStatus);
-
-
-/**
- * \brief Registers a failure event callback for scan error notifications.
- *
- * Function Scope \e Public.\n
- * \param hMacServices - handle to the MacServices object.\n
- * \param failureEventCB - the failure event callback function.\n
- * \param hFailureEventObj - handle to the object passed to the failure event callback function.\n
- */
-void scanSRV_registerFailureEventCB( TI_HANDLE hScanSRV, 
-                                     void * failureEventCB, TI_HANDLE hFailureEventObj );
-
-void scanSRV_restart( TI_HANDLE hScanSRV);
-
-
-#endif /* __SCANSRV_H__ */
diff --git a/wl1271/TWD/MacServices/ScanSrvSM.c b/wl1271/TWD/MacServices/ScanSrvSM.c
deleted file mode 100644
index 8d96fea..0000000
--- a/wl1271/TWD/MacServices/ScanSrvSM.c
+++ /dev/null
@@ -1,584 +0,0 @@
-/*
- * ScanSrvSM.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file ScanSrvSM.c
- *  \brief This file include the scan SRV Sm implementation
- *  \author Ronen Kalish
- *  \date 10-Jan-2005 
- */
-
-#define __FILE_ID__  FILE_ID_116
-#include "ScanSrvSM.h"
-#include "ScanSrv.h"
-#include "report.h"
-#include "timer.h"
-#include "MacServices_api.h"
-#include "PowerSrv_API.h"
-#include "CmdBld.h"
-
-
-/********************************************************************************/
-/*                      Internal functions prototypes.                          */
-/********************************************************************************/
-
-static TI_STATUS scanSRVSM_PsFailWhileScanning( TI_HANDLE hScanSrv );
-static TI_STATUS actionNop( TI_HANDLE hScanSrv );
-static TI_STATUS actionUnexpected( TI_HANDLE hScanSrv );
-
-
-/********************************************************************************/
-/*                      Interface functions Implementation.                     */
-/********************************************************************************/
-
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Initialize the scan SRV SM.
- *
- * Function Scope \e Public.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_init( TI_HANDLE hScanSrv )
-{
-    scanSRV_t* pScanSRV = (scanSRV_t*)hScanSrv;
-
-    fsm_actionCell_t    smMatrix[ SCAN_SRV_NUM_OF_STATES ][ SCAN_SRV_NUM_OF_EVENTS ] =
-    {
-        /* next state and actions for IDLE state */
-        {   
-            {SCAN_SRV_STATE_PS_WAIT, scanSRVSM_requestPS},                                /*"REQUEST_PS",*/
-            {SCAN_SRV_STATE_IDLE, actionUnexpected},                                      /*"PS_FAIL",*/
-            {SCAN_SRV_STATE_SCANNING, scanSRVSM_startActualScan},                         /*"PS_SUCCESS",  */
-            {SCAN_SRV_STATE_IDLE, actionUnexpected},                                      /*"PS_PEND",*/
-            {SCAN_SRV_STATE_IDLE, actionUnexpected},                                      /*"STOP_SCAN"*/
-            {SCAN_SRV_STATE_IDLE, actionNop},                                             /*"FW_RESET"*/
-            {SCAN_SRV_STATE_IDLE, actionUnexpected},                                      /*"TIMER_EXPIRED"*/
-            {SCAN_SRV_STATE_IDLE, actionUnexpected},                                      /*"SCAN_COMPLETE"*/
-        },
-
-
-        /* next state and actions for PS_WAIT state */
-        {   
-            {SCAN_SRV_STATE_PS_WAIT, actionUnexpected},                                   /*"REQUEST_PS",*/
-            {SCAN_SRV_STATE_PS_EXIT, scanSRVSM_releasePS},                                /*"PS_FAIL",*/
-            {SCAN_SRV_STATE_SCANNING, scanSRVSM_startActualScan},                         /*"PS_SUCCESS",  */
-            {SCAN_SRV_STATE_PS_WAIT, actionNop},                                          /*"PS_PEND",*/
-            {SCAN_SRV_STATE_STOPPING, actionNop},                                         /*"STOP_SCAN"*/
-            {SCAN_SRV_STATE_IDLE, scanSRVSM_handleRecovery},                              /*"FW_RESET"*/
-            {SCAN_SRV_STATE_PS_WAIT, actionUnexpected},                                   /*"TIMER_EXPIRED"*/
-            {SCAN_SRV_STATE_PS_WAIT, actionUnexpected},                                   /*"SCAN_COMPLETE"*/
-        },
-
-        /* next state and actions for SCANNING state */
-        {    
-            {SCAN_SRV_STATE_SCANNING, actionUnexpected},                                  /*"REQUEST_PS",*/
-            {SCAN_SRV_STATE_SCANNING, scanSRVSM_PsFailWhileScanning},                     /*"PS_FAIL",*/
-            {SCAN_SRV_STATE_SCANNING, actionUnexpected},                                  /*"PS_SUCCESS",  */
-            {SCAN_SRV_STATE_SCANNING, actionUnexpected},                                  /*"PS_PEND",*/
-            {SCAN_SRV_STATE_STOPPING, actionNop   },                                      /*"STOP_SCAN"*/
-            {SCAN_SRV_STATE_IDLE, scanSRVSM_handleRecovery},                              /*"FW_RESET"*/
-            {SCAN_SRV_STATE_SCANNING, scanSRVSM_handleTimerExpiry},                       /*"TIMER_EXPIRED"*/
-            {SCAN_SRV_STATE_PS_EXIT, scanSRVSM_releasePS},                                /*"SCAN_COMPLETE"*/
-
-        },
-
-        /* next state and actions for STOPPING state */
-        {   
-            {SCAN_SRV_STATE_STOPPING, actionUnexpected},                                  /*"REQUEST_PS",*/
-            {SCAN_SRV_STATE_PS_EXIT, scanSRVSM_releasePS},                                /*"PS_FAIL",*/
-            {SCAN_SRV_STATE_PS_EXIT, scanSRVSM_releasePS},                                /*"PS_SUCCESS",  */
-            {SCAN_SRV_STATE_STOPPING, actionUnexpected},                                  /*"PS_PEND",*/
-            {SCAN_SRV_STATE_STOPPING, actionNop     },                                    /*"STOP_SCAN"*/
-            {SCAN_SRV_STATE_IDLE, scanSRVSM_handleRecovery},                              /*"FW_RESET"*/
-            {SCAN_SRV_STATE_STOPPING, scanSRVSM_handleTimerExpiry},                       /*"TIMER_EXPIRED"*/
-            {SCAN_SRV_STATE_PS_EXIT, scanSRVSM_releasePS}                                 /*"SCAN_COMPLETE"*/
-
-        } ,
-
-        /* next state and actions for PS_EXIT state */
-        {   
-            {SCAN_SRV_STATE_PS_EXIT, actionUnexpected},                                   /*"REQUEST_PS",*/
-            {SCAN_SRV_STATE_IDLE, scanSRVSM_notifyScanComplete},                          /*"PS_FAIL",*/
-            {SCAN_SRV_STATE_IDLE, scanSRVSM_notifyScanComplete},                          /*"PS_SUCCESS",  */
-            {SCAN_SRV_STATE_PS_EXIT, actionNop},                                          /*"PS_PEND",*/
-            {SCAN_SRV_STATE_PS_EXIT, actionNop},                                          /*"STOP_SCAN"*/
-            {SCAN_SRV_STATE_IDLE, scanSRVSM_handleRecovery},                              /*"FW_RESET"*/
-            {SCAN_SRV_STATE_PS_EXIT, actionUnexpected},                                   /*"TIMER_EXPIRED"*/
-            {SCAN_SRV_STATE_PS_EXIT, actionUnexpected},                                   /*"SCAN_COMPLETE"*/
-        }
-    };
-
-    /* initialize current state */
-    pScanSRV->SMState = SCAN_SRV_STATE_IDLE;
-
-    /* configure the state machine */
-    return fsm_Config( pScanSRV->SM, (fsm_Matrix_t)smMatrix, 
-                       (TI_UINT8)SCAN_SRV_NUM_OF_STATES, (TI_UINT8)SCAN_SRV_NUM_OF_EVENTS, 
-                       (fsm_eventActivation_t)scanSRVSM_SMEvent, pScanSRV->hOS );
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Processes an event.
- *
- * Function Scope \e Public.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \param currentState - the current scan SRV SM state.\n
- * \param event - the event to handle.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_SMEvent( TI_HANDLE hScanSrv, scan_SRVSMStates_e* currentState, 
-                             scan_SRVSMEvents_e event )
-{
-    scanSRV_t *pScanSRV = (scanSRV_t *)hScanSrv;
-    TI_STATUS status = TI_OK;
-    TI_UINT8 nextState;
-
-    /* obtain the next state */
-    status = fsm_GetNextState( pScanSRV->SM, *(TI_UINT8*)currentState, (TI_UINT8)event, &nextState );
-    if ( status != TI_OK )
-    {
-        TRACE2(pScanSRV->hReport, REPORT_SEVERITY_ERROR, "Failed getting scan SRV next state. state = %d event = %d\n", (TI_UINT8)*currentState,(TI_UINT8)event);
-        return TI_NOK;
-    }
-
-	TRACE3(pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "scanSRVSM_SMEvent: <currentState = %d, event = %d> --> nextState = %d\n", *currentState, event, nextState);
-
-    /* move */
-    return fsm_Event( pScanSRV->SM, (TI_UINT8*)currentState, (TI_UINT8)event, hScanSrv );
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Request to enter driver mode from the power manager module.\n
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_requestPS( TI_HANDLE hScanSrv )
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)hScanSrv;
-    TI_STATUS psStatus;
-
-    TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "Requesting Driver mode from PowerSave Srv.\n");
-   
-    psStatus = powerSrv_ReservePS(  pScanSRV->hPowerSrv,
-                                    pScanSRV->psRequest,
-                                    pScanSRV->bSendNullData,
-                                    hScanSrv,
-                                    MacServices_scanSRV_powerSaveCB);
-
-    switch (psStatus)
-    {
-    /* if successful */
-    case POWER_SAVE_802_11_IS_CURRENT:
-        /* send a PS_SUCCESS event */
-        TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "Driver mode successful, continuing to scan.\n");
-        return scanSRVSM_SMEvent( hScanSrv, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_PS_SUCCESS );
-
-    /* if pending */
-    case POWER_SAVE_802_11_PENDING:
-    case TI_OK:
-        /* send a PS_PEND event */
-        TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "Driver mode pending, Waiting.\n");
-        return scanSRVSM_SMEvent( hScanSrv, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_PS_PEND );
-
-    /* if not successful */
-    default:
-
-        /* mark not to exit from driver mode (no entry was performed) */
-        pScanSRV->bExitFromDriverMode = TI_FALSE;
-
-        /* if still wishing to scan */
-        if ( pScanSRV->bScanOnDriverModeFailure )
-        {
-            /* send a PS_SUCCESS event - scan will proceed regardless of the error */
-            TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "Driver mode failed, continuing to scan.\n");
-            scanSRVSM_SMEvent( hScanSrv, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_PS_SUCCESS );
-        }
-        /* otherwise, return */
-        else
-        {
-            /* mark the return code */
-            pScanSRV->returnStatus = TI_NOK;
-            /* send a PS_FAIL event */
-            TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "Driver mode failed, aborting scan.\n");
-            scanSRVSM_SMEvent( hScanSrv, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_PS_FAIL );
-        }
-        break;
-    }
-
-    return TI_OK;
-}
-
-/**
- * \author Yuval Adler\n
- * \date 6-Oct-2005\n
- * \brief Request to release PS mode from the PowerSRV , and wait for answer.\n\n
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-
-TI_STATUS scanSRVSM_releasePS( TI_HANDLE hScanSrv )
-{
-      scanSRV_t *pScanSRV = (scanSRV_t*)hScanSrv;
-      TI_STATUS psStatus;
-    
-     /* stop timer */
-    if ( TI_TRUE == pScanSRV->bTimerRunning )
-    {
-        tmr_StopTimer (pScanSRV->hScanSrvTimer);
-        pScanSRV->bTimerRunning = TI_FALSE;
-    }
-  
-    /* if exit from driver mode requested, do so */
-    if ( TI_TRUE == pScanSRV->bExitFromDriverMode )
-    {
-        /* here we need to get an answer if we succeeded to exit driver mode */
-        TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Releasing Driver mode from Power Srv.\n");
- 
-        psStatus = powerSrv_ReleasePS(  pScanSRV->hPowerSrv,
-                                pScanSRV->bSendNullData,
-                                hScanSrv,
-                                MacServices_scanSRV_powerSaveCB);
-
-
-    }
-    else            /* no need to exit PS - send PS_SUCCESS */
-    {
-        return scanSRVSM_SMEvent( hScanSrv, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_PS_SUCCESS );
-    }
-
-
-    switch (psStatus)
-    {
-        /* if successful */
-    case POWER_SAVE_802_11_IS_CURRENT:
-        /* send a PS_SUCCESS event */
-        TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Driver mode exit successful, scan done.\n");
-        return scanSRVSM_SMEvent( hScanSrv, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_PS_SUCCESS );
-        
-        /* if pending */
-    case POWER_SAVE_802_11_PENDING:
-    case TI_OK:
-        /* stay in the PS_EXIT state */
-        TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Driver mode exit pending, Waiting.\n");
-        break; 
-        
-        /* if not successful */
-    default:
-        
-        /* send a PS_FAIL event */
-        TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, ": Driver mode exit failed, scan done.");
-        return scanSRVSM_SMEvent( hScanSrv, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_PS_FAIL );
-
-    }
-
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Send the scan command to the firmware.\n
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_startActualScan( TI_HANDLE hScanSrv )
-{ 
-    scanSRV_t *pScanSRV = (scanSRV_t*)hScanSrv;
-
- 
-    /* start the timer */
-    pScanSRV->bTimerRunning = TI_TRUE;
-    tmr_StartTimer (pScanSRV->hScanSrvTimer,
-                    MacServices_scanSRV_scanTimerExpired,
-                    (TI_HANDLE)pScanSRV,
-                    MacServices_scanSRVcalculateScanTimeout (hScanSrv, pScanSRV->scanParams, !pScanSRV->bDtimOverlapping), 
-                    TI_FALSE);
-    
-    TRACE1( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "Sending scan , type: %x to HAL.\n",pScanSRV->scanParams->scanType);
-    
-    /* start the scan */
-            /* we send the MacServices_scanSRVCommandMailBoxCB to be called when this command is recieved */
-    if ( SCAN_TYPE_SPS == pScanSRV->scanParams->scanType )
-    {
-        pScanSRV->returnStatus = cmdBld_CmdStartSPSScan (pScanSRV->hCmdBld, pScanSRV->scanParams, pScanSRV->eScanTag,
-                                                         (void *)MacServices_scanSRVCommandMailBoxCB, hScanSrv);
-    }
-    else
-    {    
-        pScanSRV->returnStatus = cmdBld_CmdStartScan (pScanSRV->hCmdBld, pScanSRV->scanParams, pScanSRV->eScanTag, 
-                                                      pScanSRV->bHighPriority , (void *)MacServices_scanSRVCommandMailBoxCB, 
-                                                      hScanSrv);
-    }
-    /* if scan request failed */
-    if ( TI_OK != pScanSRV->returnStatus )
-    {
-        TRACE1( pScanSRV->hReport, REPORT_SEVERITY_ERROR, "HAL returned code %d for scan request, quitting scan.\n", pScanSRV->returnStatus);
-
-        /* send a scan complete event. This will do all necessary clean-up (timer, power manager, notifying scan complete) */
-        scanSRVSM_SMEvent( hScanSrv, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_SCAN_COMPLETE );
-    }
-    
-    return TI_OK;
-}
-
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Notifies scan complete to upper layer.\n
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_notifyScanComplete( TI_HANDLE hScanSrv )
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)hScanSrv;
-    TCmdResponseCb CB_Func;
-    TI_HANDLE  CB_Handle;
-    TI_STATUS PSMode;
-
-    /* call the scan complete CB - only if not currently running from within a request context! */
-    if ( TI_FALSE == pScanSRV->bInRequest )
-    {   
-        /* this means that ResponseFunc was not called yet , so we call it before ScanComplete */
-        if (pScanSRV->commandResponseFunc) 
-        {
-            /* must erase CB function before calling it to enable nested scans */
-            CB_Func = pScanSRV->commandResponseFunc;
-            CB_Handle = pScanSRV->commandResponseObj;
-
-            pScanSRV->commandResponseFunc = NULL;
-            pScanSRV->commandResponseObj = NULL;
-            
-            /* if we reached here than response status was TI_OK */
-            CB_Func(CB_Handle, TI_OK);
-             
-        }
-        /* if function returns TI_TRUE than we are in PS mode , else - not */
-        PSMode = powerSrv_getPsStatus(pScanSRV->hPowerSrv) ? POWER_SAVE_802_11_SUCCESS : POWER_SAVE_802_11_FAIL;
-
-        TRACE2( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "scanSRVSM_notifyScanComplete status = 0x%x PSMode = 0x%x\n",pScanSRV->returnStatus,PSMode);
-
-
-        TRACE0(pScanSRV->hReport, REPORT_SEVERITY_INFORMATION , "scanSRVSM_notifyScanComplete: call TWD_OWN_EVENT_SCAN_CMPLT CB. In std MacServices_scanSRV_scanCompleteCB()\n");
-
-        pScanSRV->scanCompleteNotificationFunc( pScanSRV->scanCompleteNotificationObj,
-                                    pScanSRV->eScanTag,
-                                    pScanSRV->uResultCount,
-                                    pScanSRV->SPSScanResult, 
-                                    pScanSRV->bTSFError,
-                                    pScanSRV->returnStatus, 
-                                    PSMode );
-    }
-
-    return TI_OK;
-}
-
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Handles a timer expiry event - starts a recovery process.
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_handleTimerExpiry( TI_HANDLE hScanSrv )
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)hScanSrv;
-
-    /* 
-     * No scan complete bug workaround:
-     * Only after a consecutive configurable number of no scan complete events the recovery trigger
-     * will be issued. This is done as a workaround for a bug in the FW where if a channel is too
-     * loaded it wouldn't be able to send a probe request and will get stuck waiting for this channel
-     */
-
-    pScanSRV->currentNumberOfConsecutiveNoScanCompleteEvents++;
-
-    if ( pScanSRV->currentNumberOfConsecutiveNoScanCompleteEvents >= 
-         pScanSRV->numberOfNoScanCompleteToRecovery )
-    {
-        TRACE0( pScanSRV->hReport, REPORT_SEVERITY_ERROR, ": Timer expired. Starting recovery process.\n");
-
-        pScanSRV->currentNumberOfConsecutiveNoScanCompleteEvents = 0;
-
-        /* mark the return status */
-        pScanSRV->returnStatus = TI_NOK;
-
-        /* mark that the timer is no longer running */
-        pScanSRV->bTimerRunning = TI_FALSE;
-
-        /* call the recovery module */
-        pScanSRV->failureEventFunc(pScanSRV->failureEventObj ,NO_SCAN_COMPLETE_FAILURE);
-    }
-    else
-    {
-        TRACE2( pScanSRV->hReport, REPORT_SEVERITY_ERROR, ": Timer expired. consecutive failures:%d, threshold:%d, still not calling recovery.\n", pScanSRV->currentNumberOfConsecutiveNoScanCompleteEvents, pScanSRV->numberOfNoScanCompleteToRecovery);
-
-        /* send a top scan command, which can help solving the FW bug described above */
-        if ( TI_FALSE == pScanSRV->bSPSScan )
-        {
-            cmdBld_CmdStopScan (pScanSRV->hCmdBld, pScanSRV->eScanTag, NULL, NULL);
-        }
-        else
-        {
-            cmdBld_CmdStopSPSScan (pScanSRV->hCmdBld, pScanSRV->eScanTag, NULL, NULL);
-        }
-
-        /* imitate a scan complete event to the SM */
-        pScanSRV->bTSFError = TI_FALSE;
-        pScanSRV->SPSScanResult = 0xffff;
-        scanSRVSM_SMEvent( (TI_HANDLE)pScanSRV, (scan_SRVSMStates_e*)&pScanSRV->SMState, SCAN_SRV_EVENT_SCAN_COMPLETE );
-    }
-
-    return TI_OK;
-}
-
-/**
- * \author Shirit Brook\n
- * \date 10-Jan-2005\n
- * \brief Handles PS Fail event while in Scanning - Indicate not to Exit PS.
- * This event can be reached when Roaming is invoked while in Scanning state.
- * The PM Module is stopped and generates PS Fail to all its clients.
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-static TI_STATUS scanSRVSM_PsFailWhileScanning( TI_HANDLE hScanSrv )
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)hScanSrv;
-
-    TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "scanSRVSM_PsFailWhileScanning. Indicate not to Enter PS.\n");
-
-    pScanSRV->bExitFromDriverMode = TI_FALSE;
-
-    return TI_OK;
-}
-
-
-/**
- * \author Ronen Kalish\n
- * \date 17-Jan-2005\n
- * \brief Handles a FW reset event (one that was detected outside the scan SRV) by stopping the timer.
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_handleRecovery( TI_HANDLE hScanSrv )
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)hScanSrv;
-
-    TRACE0( pScanSRV->hReport, REPORT_SEVERITY_INFORMATION, "FW reset event from outside.\n");
- 
-    /* The Power Manager is responsible to exit PS mode in recovery. Also, the scan CB is not called - 
-       The SCR is responsible to notify scan concentrator of the event (which actually notifies scan SRV */
-
-    /* if timer is running - stop it */
-    if ( TI_TRUE == pScanSRV->bTimerRunning )
-    {
-        tmr_StopTimer (pScanSRV->hScanSrvTimer);
-        pScanSRV->bTimerRunning = TI_FALSE;
-    }
-    else
-    {
-        /* shouldn't happen - only called if timer is supposedly running */
-        TRACE1( pScanSRV->hReport, REPORT_SEVERITY_WARNING, "SM: External FW reset in state %d and timer is not running?", pScanSRV->SMState);
-    }
-
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 11-Jan-2005\n
- * \brief Handles an unexpected event.\n
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return always TI_OK.\n
- */
-static TI_STATUS actionUnexpected( TI_HANDLE hScanSrv ) 
-{
-    scanSRV_t *pScanSRV = (scanSRV_t*)hScanSrv;
-
-    TRACE1( pScanSRV->hReport, REPORT_SEVERITY_ERROR, "Scan SRV state machine error, unexpected Event, state=%d\n\n", pScanSRV->SMState);
-
-    if ( pScanSRV->bTimerRunning )
-    {
-        tmr_StopTimer (pScanSRV->hScanSrvTimer);
-        pScanSRV->bTimerRunning = TI_FALSE;
-    }
-
-    /* we must clean the old command response CB since they are no longer relevant 
-      since the state machine may be corrupted */
-    pScanSRV->commandResponseFunc = NULL;
-    pScanSRV->commandResponseObj = NULL;
-
-    /* indicate the unexpected event in the return status */
-    pScanSRV->returnStatus = TI_NOK;
-    
-    return TI_OK;
-}
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Handles an event that doesn't require any action.\n
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return always TI_OK.\n
- */
-static TI_STATUS actionNop( TI_HANDLE hScanSrv )
-{   
-    return TI_OK;
-}
-
-
diff --git a/wl1271/TWD/MacServices/ScanSrvSM.h b/wl1271/TWD/MacServices/ScanSrvSM.h
deleted file mode 100644
index 0b87e9f..0000000
--- a/wl1271/TWD/MacServices/ScanSrvSM.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * ScanSrvSM.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file ScanSrvSM.h
- *  \brief This file include definitions for the scan SRV SM module.
- *  \author Ronen Kalish
- *  \date 10-Jan-2005
- */
-
-#ifndef __SCANSRVSM_H__
-#define __SCANSRVSM_H__
-
-#include "fsm.h"
-
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Enums.
- ***********************************************************************
- */
-
-/** \enum scan_SRVSMEvents_e
- * \brief enumerates the different scan SRV SM events
- */
-typedef enum
-{
-    SCAN_SRV_EVENT_REQUEST_PS = 0,
-    SCAN_SRV_EVENT_PS_FAIL,
-    SCAN_SRV_EVENT_PS_SUCCESS,
-    SCAN_SRV_EVENT_PS_PEND,
-    SCAN_SRV_EVENT_STOP_SCAN,
-    SCAN_SRV_EVENT_FW_RESET,
-    SCAN_SRV_EVENT_TIMER_EXPIRED,
-    SCAN_SRV_EVENT_SCAN_COMPLETE,
-    SCAN_SRV_NUM_OF_EVENTS
-} scan_SRVSMEvents_e;
-
-/** \enum scan_SRVSMStates_e
- * \brief enumerates the different scan SRV SM states
- */
-typedef enum
-{
-	SCAN_SRV_STATE_IDLE = 0,
-    SCAN_SRV_STATE_PS_WAIT,
-	SCAN_SRV_STATE_SCANNING,
-	SCAN_SRV_STATE_STOPPING,
-	SCAN_SRV_STATE_PS_EXIT,
-	SCAN_SRV_NUM_OF_STATES
-} scan_SRVSMStates_e;
-
-/*
- ***********************************************************************
- *	Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Structure definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Initialize the scan SRV SM.
- *
- * Function Scope \e Public.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_init( TI_HANDLE hScanSrv );
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Processes an event.
- *
- * Function Scope \e Public.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \param currentState - the current scan SRV SM state.\n
- * \param event - the event to handle.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_SMEvent( TI_HANDLE hScanSrv, scan_SRVSMStates_e* currentState, 
-                             scan_SRVSMEvents_e event );
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Request to enter driver mode from the power manager module.\n
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_requestPS( TI_HANDLE hScanSrv );
-
-/**
- * \author Yuval Adler\n
- * \date 6-Oct-2005\n
- * \brief Request to release PS mode from the PowerSRV , and wait for answer.\n
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_releasePS( TI_HANDLE hScanSrv );
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Send the scan command to the firmware.\n
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_startActualScan( TI_HANDLE hScanSrv );
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Send a stop scan command to the firmware.\n
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_stopActualScan( TI_HANDLE hScanSrv );
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Notifies scan complete to upper layer.\n
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_notifyScanComplete( TI_HANDLE hScanSrv );
-
-/**
- * \author Ronen Kalish\n
- * \date 10-Jan-2005\n
- * \brief Handles a timer expiry event - starts a recovery process.
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_handleTimerExpiry( TI_HANDLE hScanSrv );
-
-/**
- * \author Ronen Kalish\n
- * \date 17-Jan-2005\n
- * \brief Handles a FW reset event (one that was detected outside the scan SRV) by stopping the timer.
- *
- * Function Scope \e Private.\n
- * \param hScanSrv - handle to the scan SRV object.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-TI_STATUS scanSRVSM_handleRecovery( TI_HANDLE hScanSrv );
-
-#endif /* __SCANSRVSM_H__ */
diff --git a/wl1271/TWD/MacServices/measurementSrvDbgPrint.c b/wl1271/TWD/MacServices/measurementSrvDbgPrint.c
deleted file mode 100644
index aef3263..0000000
--- a/wl1271/TWD/MacServices/measurementSrvDbgPrint.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * measurementSrvDbgPrint.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file measurementSrvDbgPrint.c
- *  \brief This file include variuos measurement SRV debug print facilities
- *  \author Ronen Kalish
- *  \date 23-December-2005
- */
-
-#define __FILE_ID__  FILE_ID_111
-#include "report.h"
-#include "TWDriver.h"
-#include "MeasurementSrvSM.h"
-#include "MeasurementSrv.h"
-#include "measurementSrvDbgPrint.h"
-
-
-/** 
- * \author Ronen Kalish\n
- * \date 23-December-2005\n
- * \brief Prints a measurement request.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param pMsrRequest - the measurement request.\n
- */
-void measurementSRVPrintRequest( TI_HANDLE hMeasurementSRV, TMeasurementRequest *pMsrRequest )
-{
-#ifdef TI_DBG    
-	measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-	TI_INT32 i;
-
-TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "Measurement request:\n");
-TRACE5( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "band: %d, channel:%d, TX power level: %d, start time: %x-%x\n", pMsrRequest->band, pMsrRequest->channel, pMsrRequest->txPowerDbm, INT64_HIGHER(pMsrRequest->startTime), INT64_LOWER(pMsrRequest->startTime));
-	for ( i = 0; i < pMsrRequest->numberOfTypes; i++ )
-	{
-		measurementSRVPrintTypeRequest( hMeasurementSRV, &(pMsrRequest->msrTypes[ i ]));
-	}
-#endif /* TI_DBG */
-
-}
-
-/** 
- * \author Ronen Kalish\n
- * \date 23-December-2005\n
- * \brief Prints a measurement type request.\n
- *
- * Function Scope \e Public.\n
- * \param hMeasurementSRV - handle to the measurement SRV object.\n
- * \param pMsrTypeRequest - the measurement type request.\n
- */
-void measurementSRVPrintTypeRequest( TI_HANDLE hMeasurementSRV, TMeasurementTypeRequest* pMsrTypeRequest )
-{
-#ifdef TI_DBG    
-	measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
-
-TRACE4( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "Measurement type request: type: %d, duration:%d, scan mode: %d, reserved: %d", pMsrTypeRequest->msrType, pMsrTypeRequest->duration, pMsrTypeRequest->scanMode, pMsrTypeRequest->reserved);
-
-#endif /* TI_DBG */
-}
-
diff --git a/wl1271/TWD/TWDriver/Device.h b/wl1271/TWD/TWDriver/Device.h
deleted file mode 100644
index 625911e..0000000
--- a/wl1271/TWD/TWDriver/Device.h
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
- * Device.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  Device.h
- *   PURPOSE: Contains Wlan hardware registers defines/structures
- *   
- ****************************************************************************/
-
-#ifndef DEVICE_H
-#define DEVICE_H
-
-#include "Device1273.h"
-
-
-#define ACX_PHI_CCA_THRSH_ENABLE_ENERGY_D	0x140A
-#define ACX_PHI_CCA_THRSH_DISABLE_ENERGY_D	0xFFEF
-
-/*
- * Wlan hardware Registers.
- */
-
-/*======================================================================
-                      Interrupt Registers                               
-=======================================================================*/
-
-#define ACX_REG_INTERRUPT_TRIG		( INT_TRIG )
-
-#define ACX_REG_INTERRUPT_TRIG_H	 ( INT_TRIG_H )
-
-/*=============================================
-  Host Interrupt Mask Register - 32bit (RW)
-  ------------------------------------------  
-  Setting a bit in this register masks the
-  corresponding interrupt to the host.
-  0 - RX0		- Rx first dubble buffer Data Interrupt
-  1 - TXD		- Tx Data Interrupt
-  2 - TXXFR		- Tx Transfer Interrupt
-  3 - RX1		- Rx second dubble buffer Data Interrupt
-  4 - RXXFR		- Rx Transfer Interrupt
-  5 - EVENT_A	- Event Mailbox interrupt
-  6 - EVENT_B	- Event Mailbox interrupt
-  7 - WNONHST	- Wake On Host Interrupt
-  8 - TRACE_A	- Debug Trace interrupt
-  9 - TRACE_B	- Debug Trace interrupt
- 10 - CDCMP		- Command Complete Interrupt
- 11 -
- 12 -
- 13 -
- 14 - ICOMP		- Initialization Complete Interrupt
- 16 - SG SE		- Soft Gemini - Sense enable interrupt
- 17 - SG SD		- Soft Gemini - Sense disable interrupt
- 18 -			- 
- 19 -			- 
- 20 -			- 
- 21-			- 
- Default: 0x0001
-*==============================================*/
-#define ACX_REG_INTERRUPT_MASK				( HINT_MASK )
-
-/*=============================================
-  Host Interrupt Mask Set 16bit, (Write only) 
-  ------------------------------------------  
- Setting a bit in this register sets          
- the corresponding bin in ACX_HINT_MASK register
- without effecting the mask                   
- state of other bits (0 = no effect).         
-==============================================*/
-#define ACX_HINT_MASK_SET_REG          HINT_MASK_SET
-
-/*=============================================
-  Host Interrupt Mask Clear 16bit,(Write only)
-  ------------------------------------------  
- Setting a bit in this register clears        
- the corresponding bin in ACX_HINT_MASK register
- without effecting the mask                   
- state of other bits (0 = no effect).         
-=============================================*/
-#define ACX_HINT_MASK_CLR_REG          HINT_MASK_CLR
-
-/*=============================================
-  Host Interrupt Status Nondestructive Read   
-  16bit,(Read only)                           
-  ------------------------------------------  
- The host can read this register to determine 
- which interrupts are active.                 
- Reading this register doesn't                
- effect its content.                          
-=============================================*/
-#define ACX_REG_INTERRUPT_NO_CLEAR			( HINT_STS_ND )
-
-/*=============================================
-  Host Interrupt Status Clear on Read  Register
-  16bit,(Read only)                           
-  ------------------------------------------  
- The host can read this register to determine 
- which interrupts are active.                 
- Reading this register clears it,             
- thus making all interrupts inactive.         
-==============================================*/
-#define ACX_REG_INTERRUPT_CLEAR				( HINT_STS_CLR )
-
-/*=============================================
-  Host Interrupt Acknowledge Register         
-  16bit,(Write only)                          
-  ------------------------------------------  
- The host can set individual bits in this     
- register to clear (acknowledge) the corresp. 
- interrupt status bits in the HINT_STS_CLR and
- HINT_STS_ND registers, thus making the       
- assotiated interrupt inactive. (0-no effect) 
-==============================================*/
-#define ACX_REG_INTERRUPT_ACK				( HINT_ACK )
-
-
-/*===============================================
-   Host Software Reset - 32bit RW 
- ------------------------------------------
-    [31:1] Reserved 
-        0  SOFT_RESET Soft Reset  - When this bit is set,
-         it holds the Wlan hardware in a soft reset state. 
-         This reset disables all MAC and baseband processor 
-         clocks except the CardBus/PCI interface clock. 
-         It also initializes all MAC state machines except 
-         the host interface. It does not reload the
-         contents of the EEPROM. When this bit is cleared 
-         (not self-clearing), the Wlan hardware
-         exits the software reset state.
-===============================================*/
-#define ACX_REG_SLV_SOFT_RESET				( SLV_SOFT_RESET )
-	#define SLV_SOFT_RESET_BIT		0x00000001
-
-/*===============================================
- EEPROM Burst Read Start  - 32bit RW 
- ------------------------------------------
- [31:1] Reserved 
-     0  ACX_EE_START -  EEPROM Burst Read Start 0
-        Setting this bit starts a burst read from 
-        the external EEPROM. 
-        If this bit is set (after reset) before an EEPROM read/write, 
-        the burst read starts at EEPROM address 0.
-        Otherwise, it starts at the address 
-        following the address of the previous access. 
-        TheWlan hardware hardware clears this bit automatically.
-        
-        Default: 0x00000000
-*================================================*/
-#define ACX_REG_EE_START					( EE_START )
-	#define START_EEPROM_MGR	0x00000001
-
-/*=======================================================================
-                        Embedded ARM CPU Control
-========================================================================*/
-/*===============================================
- Halt eCPU   - 32bit RW 
- ------------------------------------------
-    0 HALT_ECPU Halt Embedded CPU - This bit is the 
-      compliment of bit 1 (MDATA2) in the SOR_CFG register. 
-      During a hardware reset, this bit holds 
-      the inverse of MDATA2.
-      When downloading firmware from the host, 
-      set this bit (pull down MDATA2). 
-      The host clears this bit after downloading the firmware into 
-      zero-wait-state SSRAM.
-      When loading firmware from Flash, clear this bit (pull up MDATA2) 
-      so that the eCPU can run the bootloader code in Flash
-    HALT_ECPU eCPU State
-    --------------------
-    1 halt eCPU
-    0 enable eCPU
-===============================================*/
-#define ACX_REG_ECPU_CONTROL				( ECPU_CTRL )
-
-
-/*=======================================================================
-                    Command/Information Mailbox Pointers
-========================================================================*/
-
-/*===============================================
-   Command Mailbox Pointer - 32bit RW 
- ------------------------------------------
-    This register holds the start address of 
-    the command mailbox located in the Wlan hardware memory. 
-    The host must read this pointer after a reset to 
-    find the location of the command mailbox. 
-    The Wlan hardware initializes the command mailbox 
-    pointer with the default address of the command mailbox.
-    The command mailbox pointer is not valid until after 
-    the host receives the Init Complete interrupt from 
-    the Wlan hardware.
-===============================================*/
-#define REG_COMMAND_MAILBOX_PTR				( SCR_PAD0 ) 
-
-/*===============================================
-   Information Mailbox Pointer - 32bit RW 
- ------------------------------------------
-    This register holds the start address of 
-    the information mailbox located in the Wlan hardware memory. 
-    The host must read this pointer after a reset to find 
-    the location of the information mailbox. 
-    The Wlan hardware initializes the information mailbox pointer 
-    with the default address of the information mailbox. 
-    The information mailbox pointer is not valid 
-    until after the host receives the Init Complete interrupt from
-    the Wlan hardware.
-===============================================*/
-#define REG_EVENT_MAILBOX_PTR				( SCR_PAD1 ) 
-
-
-/*=======================================================================
-                   Misc
-========================================================================*/
-
-
-#define REG_ENABLE_TX_RX				( IO_CONTROL_ENABLE ) 
-/*
- * Rx configuration (filter) information element
- * ---------------------------------------------
- */
-#define REG_RX_CONFIG				( RX_CFG ) 
-#define REG_RX_FILTER				( RX_FILTER_CFG ) 
-
-#define RX_CFG_ENABLE_PHY_HEADER_PLCP	0x0002	
-#define RX_CFG_PROMISCUOUS				0x0008	/* promiscuous - receives all valid frames */
-#define RX_CFG_BSSID					0x0020	/* receives frames from any BSSID */
-#define RX_CFG_MAC						0x0010	/* receives frames destined to any MAC address */
-#define RX_CFG_ENABLE_ONLY_MY_DEST_MAC	0x0010	
-#define RX_CFG_ENABLE_ANY_DEST_MAC		0x0000	
-#define RX_CFG_ENABLE_ONLY_MY_BSSID		0x0020  
-#define RX_CFG_ENABLE_ANY_BSSID			0x0000  
-#define RX_CFG_DISABLE_BCAST			0x0200	/* discards all broadcast frames */
-#define RX_CFG_ENABLE_ONLY_MY_SSID		0x0400
-#define RX_CFG_ENABLE_RX_CMPLT_FCS_ERROR 0x0800
-#define RX_CFG_COPY_RX_STATUS			0x2000
-#define RX_CFG_TSF						 0x10000
-
-#define RX_CONFIG_OPTION_ANY_DST_MY_BSS		( RX_CFG_ENABLE_ANY_DEST_MAC     | RX_CFG_ENABLE_ONLY_MY_BSSID)
-#define RX_CONFIG_OPTION_MY_DST_ANY_BSS		( RX_CFG_ENABLE_ONLY_MY_DEST_MAC | RX_CFG_ENABLE_ANY_BSSID)
-#define RX_CONFIG_OPTION_ANY_DST_ANY_BSS	( RX_CFG_ENABLE_ANY_DEST_MAC     | RX_CFG_ENABLE_ANY_BSSID)
-#define RX_CONFIG_OPTION_MY_DST_MY_BSS		( RX_CFG_ENABLE_ONLY_MY_DEST_MAC | RX_CFG_ENABLE_ONLY_MY_BSSID)
-
-#define RX_CONFIG_OPTION_FOR_SCAN           ( RX_CFG_ENABLE_PHY_HEADER_PLCP  | RX_CFG_ENABLE_RX_CMPLT_FCS_ERROR | RX_CFG_COPY_RX_STATUS | RX_CFG_TSF)
-#define RX_CONFIG_OPTION_FOR_MEASUREMENT    ( RX_CFG_ENABLE_ANY_DEST_MAC )
-#define RX_CONFIG_OPTION_FOR_JOIN    		( RX_CFG_ENABLE_ONLY_MY_BSSID | RX_CFG_ENABLE_ONLY_MY_DEST_MAC )
-#define RX_CONFIG_OPTION_FOR_IBSS_JOIN    	( RX_CFG_ENABLE_ONLY_MY_SSID  | RX_CFG_ENABLE_ONLY_MY_DEST_MAC )
-
-#define RX_FILTER_OPTION_DEF			( CFG_RX_MGMT_EN | CFG_RX_DATA_EN | CFG_RX_CTL_EN | CFG_RX_RCTS_ACK | CFG_RX_BCN_EN  | CFG_RX_AUTH_EN  | CFG_RX_ASSOC_EN)
-#define RX_FILTER_OPTION_FILTER_ALL		0
-#define RX_FILTER_OPTION_DEF_PRSP_BCN	( CFG_RX_PRSP_EN | CFG_RX_MGMT_EN | CFG_RX_CTL_EN | CFG_RX_RCTS_ACK | CFG_RX_BCN_EN)
-#define RX_FILTER_OPTION_JOIN			( CFG_RX_MGMT_EN | CFG_RX_DATA_EN | CFG_RX_CTL_EN | CFG_RX_BCN_EN   | CFG_RX_AUTH_EN | CFG_RX_ASSOC_EN | CFG_RX_RCTS_ACK | CFG_RX_PRSP_EN)
-
-
-/*===============================================
-   Phy regs
- ===============================================*/
-#define ACX_PHY_ADDR_REG                SBB_ADDR
-#define ACX_PHY_DATA_REG                SBB_DATA
-#define ACX_PHY_CTRL_REG                SBB_CTL
-#define ACX_PHY_REG_WR_MASK             0x00000001ul
-#define ACX_PHY_REG_RD_MASK             0x00000002ul    
-
-
-/*===============================================
- EEPROM Read/Write Request 32bit RW 
- ------------------------------------------
- 1 EE_READ - EEPROM Read Request 1 - Setting this bit 
-   loads a single byte of data into the EE_DATA 
-   register from the EEPROM location specified in 
-   the EE_ADDR register. 
-   The Wlan hardware hardware clears this bit automatically. 
-   EE_DATA is valid when this bit is cleared.
- 0 EE_WRITE  - EEPROM Write Request  - Setting this bit 
-   writes a single byte of data from the EE_DATA register into the
-   EEPROM location specified in the EE_ADDR register. 
-   The Wlan hardware hardware clears this bit automatically.
-*===============================================*/
-#define ACX_EE_CTL_REG                      EE_CTL
-#define EE_WRITE                            0x00000001ul
-#define EE_READ                             0x00000002ul
-
-/*===============================================
- EEPROM Address  - 32bit RW 
- ------------------------------------------
- This register specifies the address 
- within the EEPROM from/to which to read/write data.
-===============================================*/
-#define ACX_EE_ADDR_REG                     EE_ADDR
-
-/*===============================================
- EEPROM Data  - 32bit RW 
- ------------------------------------------
-    This register either holds the read 8 bits of 
-    data from the EEPROM or the write data 
-    to be written to the EEPROM.
-===============================================*/
-#define ACX_EE_DATA_REG                     EE_DATA
-
-/*===============================================
- EEPROM Base Address  - 32bit RW 
- ------------------------------------------
-    This register holds the upper nine bits 
-    [23:15] of the 24-bit Wlan hardware memory 
-    address for burst reads from EEPROM accesses. 
-    The EEPROM provides the lower 15 bits of this address. 
-    The MSB of the address from the EEPROM is ignored.
-===============================================*/
-#define ACX_EE_CFG                          EE_CFG  
-
-/*===============================================
-  GPIO Output Values  -32bit, RW
- ------------------------------------------
-    [31:16]  Reserved 
-    [15: 0]  Specify the output values (at the output driver inputs) for
-             GPIO[15:0], respectively.
-===============================================*/
-#define ACX_GPIO_OUT_REG            GPIO_OUT
-#define ACX_MAX_GPIO_LINES          15
-
-/*===============================================
-  Contention window  -32bit, RW
- ------------------------------------------
-    [31:26]  Reserved 
-    [25:16]  Max (0x3ff)
-    [15:07]  Reserved
-    [06:00]  Current contention window value - default is 0x1F
-===============================================*/
-#define ACX_CONT_WIND_CFG_REG    CONT_WIND_CFG
-#define ACX_CONT_WIND_MIN_MASK   0x0000007f
-#define ACX_CONT_WIND_MAX        0x03ff0000
-
-/*
- * Indirect slave register/memory registers
- * ----------------------------------------
- */
-#define HW_SLAVE_REG_ADDR_REG		0x00000004
-#define HW_SLAVE_REG_DATA_REG		0x00000008
-#define HW_SLAVE_REG_CTRL_REG		0x0000000c
-
-#define SLAVE_AUTO_INC				0x00010000
-#define SLAVE_NO_AUTO_INC			0x00000000
-#define SLAVE_HOST_LITTLE_ENDIAN	0x00000000
-
-#define HW_SLAVE_MEM_ADDR_REG		SLV_MEM_ADDR
-#define HW_SLAVE_MEM_DATA_REG		SLV_MEM_DATA
-#define HW_SLAVE_MEM_CTRL_REG		SLV_MEM_CTL
-#define HW_SLAVE_MEM_ENDIAN_REG		SLV_END_CTL
-
-#define HW_FUNC_EVENT_INT_EN		0x8000
-#define HW_FUNC_EVENT_MASK_REG		0x00000034
-
-#define ACX_MAC_TIMESTAMP_REG	(MAC_TIMESTAMP)
-
-/*===============================================
-  HI_CFG Interface Configuration Register Values
- ------------------------------------------
-===============================================*/
-#define HI_CFG_UART_ENABLE          0x00000004
-#define HI_CFG_RST232_ENABLE        0x00000008
-#define HI_CFG_CLOCK_REQ_SELECT     0x00000010
-#define HI_CFG_HOST_INT_ENABLE      0x00000020
-#define HI_CFG_VLYNQ_OUTPUT_ENABLE  0x00000040
-#define HI_CFG_HOST_INT_ACTIVE_LOW  0x00000080
-#define HI_CFG_UART_TX_OUT_GPIO_15  0x00000100
-#define HI_CFG_UART_TX_OUT_GPIO_14  0x00000200
-#define HI_CFG_UART_TX_OUT_GPIO_7   0x00000400
-
-/*
- * NOTE: USE_ACTIVE_HIGH compilation flag should be defined in makefile
- *       for platforms using active high interrupt level
- */
-#ifdef USE_IRQ_ACTIVE_HIGH
-#define HI_CFG_DEF_VAL              \
-        HI_CFG_UART_ENABLE |        \
-        HI_CFG_RST232_ENABLE |      \
-        HI_CFG_CLOCK_REQ_SELECT |   \
-        HI_CFG_HOST_INT_ENABLE
-#else
-#define HI_CFG_DEF_VAL              \
-        HI_CFG_UART_ENABLE |        \
-        HI_CFG_RST232_ENABLE |      \
-        HI_CFG_CLOCK_REQ_SELECT |   \
-        HI_CFG_HOST_INT_ENABLE |    \
-        HI_CFG_HOST_INT_ACTIVE_LOW
-#endif
-
-#endif   /* DEVICE_H */
-
diff --git a/wl1271/TWD/TWDriver/Device1273.h b/wl1271/TWD/TWDriver/Device1273.h
deleted file mode 100644
index ccfa7d0..0000000
--- a/wl1271/TWD/TWDriver/Device1273.h
+++ /dev/null
@@ -1,981 +0,0 @@
-/*
- * Device1273.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/**********************************************************************************************************************
-
-  FILENAME:       Device1273.h
-
-  DESCRIPTION:    TNETW1273 Registes addresses/defintion
-
-
-
-***********************************************************************************************************************/
-
-#ifndef DEVICE1273_H
-#define DEVICE1273_H
-
-
-/* Base addresses*/
-/* They are not used inside registers definition in purpose to allow this header file*/
-/* to be used as an easy reference to register -> address date base. Keep this as it*/
-/* is very powerful for debugging purpose.*/
-#define REGISTERS_BASE	0x00300000
-#define INT_BASE		0x00300400
-#define REG_CONFIG_BASE	0x00300800
-#define CLK_BASE		0x00300C00
-#define SDMA_BASE		0x00301000
-#define AES_BASE		0x00301400
-#define WEP_BASE		0x00301800
-#define TKIP_BASE		0x00301C00
-#define SEEPROM_BASE	0x00302000
-#define PAR_HOST_BASE	0x00302400
-#define SDIO_BASE		0x00302800
-#define UART_BASE		0x00302C00
-#define USB11_BASE		0x00304000
-#define LDMA_BASE		0x00304400
-#define RX_BASE			0x00304800
-#define ACCESS_BASE		0x00304c00
-#define TX_BASE			0x00305000
-#define RMAC_CSR_BASE	0x00305400
-#define AFE_PM			0x00305800
-#define VLYNQ_BASE		0x00308000
-#define PCI_BASE		0x00308400
-#define USB20_BASE		0x0030A000
-#define DRPW_BASE		0x00310000
-#define PHY_BASE		0x003C0000
-
-/* DRPw init scratch register */
-#define DRPW_SCRATCH_START             (DRPW_BASE + 0x002C)
-
-/* System DMA registers*/
-/* Order of registers was changed*/
-#define DMA_GLB_CFG                    (REGISTERS_BASE + 0x1000)
-#define DMA_HDESC_OFFSET               (REGISTERS_BASE + 0x1004)
-#define DMA_HDATA_OFFSET               (REGISTERS_BASE + 0x1008)
-#define DMA_CFG0                       (REGISTERS_BASE + 0x100C) /* SDMA_HOST_CFG0 changed*/
-#define DMA_CTL0                       (REGISTERS_BASE + 0x1010) /* SDMA_CTRL0 changed*/
-#define DMA_LENGTH0                    (REGISTERS_BASE + 0x1014)
-#define DMA_L_ADDR0                    (REGISTERS_BASE + 0x1018) /* SDMA_RD_ADDR ?*/
-#define DMA_L_PTR0                     (REGISTERS_BASE + 0x101C) /* SDMA_RD_OFFSET ?*/
-#define DMA_H_ADDR0                    (REGISTERS_BASE + 0x1020) /* SDMA_WR_ADDR ?*/
-#define DMA_H_PTR0                     (REGISTERS_BASE + 0x1024) /* SDMA_WR_OFFSET ?*/
-#define DMA_STS0                       (REGISTERS_BASE + 0x1028) /* Changed*/
-#define DMA_CFG1                       (REGISTERS_BASE + 0x1030) /* SDMA_HOST_CFG1 changed*/
-#define DMA_CTL1                       (REGISTERS_BASE + 0x1034) /* SDMA_CTRL1 changed*/
-#define DMA_LENGTH1                    (REGISTERS_BASE + 0x1038)
-#define DMA_L_ADDR1                    (REGISTERS_BASE + 0x103C)
-#define DMA_L_PTR1                     (REGISTERS_BASE + 0x1040)
-#define DMA_H_ADDR1                    (REGISTERS_BASE + 0x1044)
-#define DMA_H_PTR1                     (REGISTERS_BASE + 0x1048)
-#define DMA_STS1                       (REGISTERS_BASE + 0x104C)
-#define DMA_HFRM_PTR                   (REGISTERS_BASE + 0x1050) /* New ?*/
-#define DMA_DEBUG                      (REGISTERS_BASE + 0x1054) /* Changed*/
-
-/* Local DMA registers*/
-/* number changed from 4 to 2*/
-#define LDMA_DEBUG                     (REGISTERS_BASE + 0x4400)
-#define LDMA_CTL0                      (REGISTERS_BASE + 0x4404) /* Add 2 bits to support fix address (FIFO)*/
-#define LDMA_STATUS0                   (REGISTERS_BASE + 0x4408)
-#define LDMA_LENGTH0                   (REGISTERS_BASE + 0x440c)
-#define LDMA_RD_ADDR0                  (REGISTERS_BASE + 0x4410)
-#define LDMA_RD_OFFSET0                (REGISTERS_BASE + 0x4414)
-#define LDMA_WR_ADDR0                  (REGISTERS_BASE + 0x4418)
-#define LDMA_WR_OFFSET0                (REGISTERS_BASE + 0x441c)
-#define LDMA_CTL1                      (REGISTERS_BASE + 0x4428) /* Add 2 bits to support fix address (FIFO)*/
-#define LDMA_STATUS1                   (REGISTERS_BASE + 0x442c)
-#define LDMA_LENGTH1                   (REGISTERS_BASE + 0x4430)
-#define LDMA_RD_ADDR1                  (REGISTERS_BASE + 0x4434)
-#define LDMA_RD_OFFSET1                (REGISTERS_BASE + 0x4438)
-#define LDMA_WR_ADDR1                  (REGISTERS_BASE + 0x443c)
-#define LDMA_WR_OFFSET1                (REGISTERS_BASE + 0x4440)
-/* For TNETW compatability (if willbe )*/
-#define LDMA_CUR_RD_PTR0               LDMA_RD_ADDR0
-#define LDMA_CUR_WR_PTR0               LDMA_WR_ADDR0
-#define LDMA_CUR_RD_PTR1               LDMA_RD_ADDR1
-#define LDMA_CUR_WR_PTR1               LDMA_WR_ADDR1
-
-/* Host Slave registers*/
-#define SLV_SOFT_RESET                 (REGISTERS_BASE + 0x0000) /* self clearing*/
-#define SLV_REG_ADDR                   (REGISTERS_BASE + 0x0004)
-#define SLV_REG_DATA                   (REGISTERS_BASE + 0x0008)
-#define SLV_REG_ADATA                  (REGISTERS_BASE + 0x000c)
-#define SLV_MEM_CP                     (REGISTERS_BASE + 0x0010)
-#define SLV_MEM_ADDR                   (REGISTERS_BASE + 0x0014)
-#define SLV_MEM_DATA                   (REGISTERS_BASE + 0x0018)
-#define SLV_MEM_CTL                    (REGISTERS_BASE + 0x001c) /* bit 19 moved to PCMCIA_CTL*/
-#define SLV_END_CTL                    (REGISTERS_BASE + 0x0020) /* 2 bits moved to ENDIAN_CTL*/
-
-/* Timer registers*/
-/* Timer1/2 count MAC clocks*/
-/* Timer3/4/5 count usec*/
-#define TIM1_CTRL                      (REGISTERS_BASE + 0x0918)
-#define TIM1_LOAD                      (REGISTERS_BASE + 0x091C)
-#define TIM1_CNT                       (REGISTERS_BASE + 0x0920)
-#define TIM2_CTRL                      (REGISTERS_BASE + 0x0924)
-#define TIM2_LOAD                      (REGISTERS_BASE + 0x0928)
-#define TIM2_CNT                       (REGISTERS_BASE + 0x092C)
-#define TIM3_CTRL                      (REGISTERS_BASE + 0x0930)
-#define TIM3_LOAD                      (REGISTERS_BASE + 0x0934)
-#define TIM3_CNT                       (REGISTERS_BASE + 0x0938)
-#define TIM4_CTRL                      (REGISTERS_BASE + 0x093C)
-#define TIM4_LOAD                      (REGISTERS_BASE + 0x0940)
-#define TIM4_CNT                       (REGISTERS_BASE + 0x0944)
-#define TIM5_CTRL                      (REGISTERS_BASE + 0x0948)
-#define TIM5_LOAD                      (REGISTERS_BASE + 0x094C)
-#define TIM5_CNT                       (REGISTERS_BASE + 0x0950)
-
-/* Watchdog registers*/
-#define WDOG_CTRL                      (REGISTERS_BASE + 0x0954)
-#define WDOG_LOAD                      (REGISTERS_BASE + 0x0958)
-#define WDOG_CNT                       (REGISTERS_BASE + 0x095C)
-#define WDOG_STS                       (REGISTERS_BASE + 0x0960)
-#define WDOG_FEED                      (REGISTERS_BASE + 0x0964)
-
-/* Interrupt registers*/
-/* 64 bit interrupt sources registers ws ced. sme interupts were removed and new ones were added*/
-/* Order was changed*/
-#define FIQ_MASK                       (REGISTERS_BASE + 0x0400)
-#define FIQ_MASK_L                     (REGISTERS_BASE + 0x0400)
-#define FIQ_MASK_H                     (REGISTERS_BASE + 0x0404)
-#define FIQ_MASK_SET                   (REGISTERS_BASE + 0x0408)
-#define FIQ_MASK_SET_L                 (REGISTERS_BASE + 0x0408)
-#define FIQ_MASK_SET_H                 (REGISTERS_BASE + 0x040C)
-#define FIQ_MASK_CLR                   (REGISTERS_BASE + 0x0410)
-#define FIQ_MASK_CLR_L                 (REGISTERS_BASE + 0x0410)
-#define FIQ_MASK_CLR_H                 (REGISTERS_BASE + 0x0414)
-#define IRQ_MASK                       (REGISTERS_BASE + 0x0418)
-#define IRQ_MASK_L                     (REGISTERS_BASE + 0x0418)
-#define IRQ_MASK_H                     (REGISTERS_BASE + 0x041C)
-#define IRQ_MASK_SET                   (REGISTERS_BASE + 0x0420)
-#define IRQ_MASK_SET_L                 (REGISTERS_BASE + 0x0420)
-#define IRQ_MASK_SET_H                 (REGISTERS_BASE + 0x0424)
-#define IRQ_MASK_CLR                   (REGISTERS_BASE + 0x0428)
-#define IRQ_MASK_CLR_L                 (REGISTERS_BASE + 0x0428)
-#define IRQ_MASK_CLR_H                 (REGISTERS_BASE + 0x042C)
-#define ECPU_MASK                      (REGISTERS_BASE + 0x0448)
-#define FIQ_STS_L                      (REGISTERS_BASE + 0x044C)
-#define FIQ_STS_H                      (REGISTERS_BASE + 0x0450)
-#define IRQ_STS_L                      (REGISTERS_BASE + 0x0454)
-#define IRQ_STS_H                      (REGISTERS_BASE + 0x0458)
-#define INT_STS_ND                     (REGISTERS_BASE + 0x0464)
-#define INT_STS_RAW_L                  (REGISTERS_BASE + 0x0464)
-#define INT_STS_RAW_H                  (REGISTERS_BASE + 0x0468)
-#define INT_STS_CLR                    (REGISTERS_BASE + 0x04B4)
-#define INT_STS_CLR_L                  (REGISTERS_BASE + 0x04B4)
-#define INT_STS_CLR_H                  (REGISTERS_BASE + 0x04B8)
-#define INT_ACK                        (REGISTERS_BASE + 0x046C)
-#define INT_ACK_L                      (REGISTERS_BASE + 0x046C)
-#define INT_ACK_H                      (REGISTERS_BASE + 0x0470)
-#define INT_TRIG                       (REGISTERS_BASE + 0x0474)
-#define INT_TRIG_L                     (REGISTERS_BASE + 0x0474)
-#define INT_TRIG_H                     (REGISTERS_BASE + 0x0478)
-#define HOST_STS_L                     (REGISTERS_BASE + 0x045C)
-#define HOST_STS_H                     (REGISTERS_BASE + 0x0460)
-#define HOST_MASK                      (REGISTERS_BASE + 0x0430)
-#define HOST_MASK_L                    (REGISTERS_BASE + 0x0430)
-#define HOST_MASK_H                    (REGISTERS_BASE + 0x0434)
-#define HOST_MASK_SET                  (REGISTERS_BASE + 0x0438)
-#define HOST_MASK_SET_L                (REGISTERS_BASE + 0x0438)
-#define HOST_MASK_SET_H                (REGISTERS_BASE + 0x043C)
-#define HOST_MASK_CLR                  (REGISTERS_BASE + 0x0440)
-#define HOST_MASK_CLR_L                (REGISTERS_BASE + 0x0440)
-#define HOST_MASK_CLR_H                (REGISTERS_BASE + 0x0444)
-
-/* GPIO Interrupts*/
-#define GPIO_INT_STS                   (REGISTERS_BASE + 0x0484) /* 22 GPIOs*/
-#define GPIO_INT_ACK                   (REGISTERS_BASE + 0x047C)
-#define GPIO_INT_MASK                  (REGISTERS_BASE + 0x0480)
-#define GPIO_POS_MASK                  (REGISTERS_BASE + 0x04BC) /* New*/
-#define GPIO_NEG_MASK                  (REGISTERS_BASE + 0x04C0) /* New*/
-
-/* Protocol Interrupts*/
-#define PROTO_INT_STS                  (REGISTERS_BASE + 0x0490) /* Add 2 PHY->MAC source interrupts*/
-#define PROTO_INT_ACK                  (REGISTERS_BASE + 0x0488)
-#define PROTO_INT_MASK                 (REGISTERS_BASE + 0x048C)
-
-/* Host Interrupts - The following Addresses are for 1273 */
-#define HINT_MASK                      (REGISTERS_BASE + 0x04DC)
-#define HINT_MASK_SET                  (REGISTERS_BASE + 0x04E0)
-#define HINT_MASK_CLR                  (REGISTERS_BASE + 0x04E4)
-#define HINT_STS_ND_MASKED             (REGISTERS_BASE + 0x04EC)
-#define HINT_STS_ND  		           (REGISTERS_BASE + 0x04E8)	/* 1150 spec calls this HINT_STS_RAW*/
-#define HINT_STS_CLR                   (REGISTERS_BASE + 0x04F8)
-#define HINT_ACK                       (REGISTERS_BASE + 0x04F0)
-#define HINT_TRIG                      (REGISTERS_BASE + 0x04F4)
-
-/* Clock registers*/
-#define CLK_CFG                        (REGISTERS_BASE + 0x0C00) /* new ARM clock bit */
-#define CLK_CTRL                       (REGISTERS_BASE + 0x0C04) /* changed*/
-#define BLK_RST                        (REGISTERS_BASE + 0x0C08) /* changed*/
-#define CFG_USEC_STB                   (REGISTERS_BASE + 0x0C0C)
-#define ARM_GATE_CLK_REG               (REGISTERS_BASE + 0x0C10) /* new*/
-#define BUSY_STAT_REG                  (REGISTERS_BASE + 0x0C14) /* new*/
-#define CFG_PHY_CLK88                  (REGISTERS_BASE + 0x0C18)
-#define DYNAMIC_CLKGATE                (REGISTERS_BASE + 0x0C1C) /* new*/
-
-/* AES registers*/
-/* Major changes to this module*/
-#define AES_START                      (REGISTERS_BASE + 0x1400)
-#define AES_CFG                        (REGISTERS_BASE + 0x1404)
-#define AES_CTL                        (REGISTERS_BASE + 0x1408)
-#define AES_STATUS                     (REGISTERS_BASE + 0x140C)
-#define AES_LENGTH                     (REGISTERS_BASE + 0x1410)
-#define AES_RD_ADDR                    (REGISTERS_BASE + 0x1414)
-#define AES_RD_OFFSET                  (REGISTERS_BASE + 0x1418)
-#define AES_WR_ADDR                    (REGISTERS_BASE + 0x141C)
-#define AES_WR_OFFSET                  (REGISTERS_BASE + 0x1420)
-#define AES_CUR_RD_PTR                 (REGISTERS_BASE + 0x1424)
-#define AES_CUR_WR_PTR                 (REGISTERS_BASE + 0x1428)
-#define AES_KEY_0                      (REGISTERS_BASE + 0x142C)
-#define AES_KEY_1                      (REGISTERS_BASE + 0x1430)
-#define AES_KEY_2                      (REGISTERS_BASE + 0x1434)
-#define AES_KEY_3                      (REGISTERS_BASE + 0x1438)
-#define AES_NONCE_0                    (REGISTERS_BASE + 0x143C)
-#define AES_NONCE_1                    (REGISTERS_BASE + 0x1440)
-#define AES_NONCE_2                    (REGISTERS_BASE + 0x1444)
-#define AES_NONCE_3                    (REGISTERS_BASE + 0x1448)
-#define AES_MIC_0                      (REGISTERS_BASE + 0x144C)
-#define AES_MIC_1                      (REGISTERS_BASE + 0x1450)
-#define AES_MIC_2                      (REGISTERS_BASE + 0x1454)
-#define AES_MIC_3                      (REGISTERS_BASE + 0x1458)
-#define AES_ASSO_DATA_0                (REGISTERS_BASE + 0x145C)
-#define AES_ASSO_DATA_1                (REGISTERS_BASE + 0x1460)
-#define AES_ASSO_DATA_2                (REGISTERS_BASE + 0x1464)
-#define AES_ASSO_DATA_3                (REGISTERS_BASE + 0x1468)
-#define AES_NUM_OF_ROUNDS              (REGISTERS_BASE + 0x146C)
-#define AES_TX_QUEUE_PTR               (REGISTERS_BASE + 0x1470)
-#define AES_RX_QUEUE_PTR               (REGISTERS_BASE + 0x1474)
-#define AES_STACK                      (REGISTERS_BASE + 0x1478)
-#define AES_INT_RAW                    (REGISTERS_BASE + 0x147C)
-#define AES_INT_MASK                   (REGISTERS_BASE + 0x1480)
-#define AES_INT_STS                    (REGISTERS_BASE + 0x1484)
-
-/* WEP registers*/
-/* Order was changed*/
-#define DEC_CTL                        (REGISTERS_BASE + 0x1800)
-#define DEC_STATUS                     (REGISTERS_BASE + 0x1804)
-#define DEC_MBLK                       (REGISTERS_BASE + 0x1808)
-#define DEC_KEY_ADDR                   (REGISTERS_BASE + 0x180C)
-#define DEC_KEY_LEN                    (REGISTERS_BASE + 0x1810)
-#define DEC_ADDR_UPPER_BYTE            (REGISTERS_BASE + 0x1814) /* new*/
-#define DEC_LEN                        (REGISTERS_BASE + 0x1818)
-#define DEC_OFFSET                     (REGISTERS_BASE + 0x181C)
-#define DEC_WR_MBLK                    (REGISTERS_BASE + 0x1820)
-#define DEC_WR_OFFSET                  (REGISTERS_BASE + 0x1824)
-
-/* TKIP MICHAEL reisters*/
-/* order changed*/
-#define MCHL_START0                    (REGISTERS_BASE + 0x1C00)
-#define MCHL_DMV_START_MBLK0           (REGISTERS_BASE + 0x1C04) /* Changed to 23:5 format*/
-#define MCHL_DMV_CUR_MBLK0             (REGISTERS_BASE + 0x1C10)
-#define MCHL_DMV_OFFSET0               (REGISTERS_BASE + 0x1C08)
-#define MCHL_DMV_LENGTH0               (REGISTERS_BASE + 0x1C0C)
-#define MCHL_DMV_CFG0                  (REGISTERS_BASE + 0x1C14)
-#define MCHL_KEY_L0                    (REGISTERS_BASE + 0x1C18)
-#define MCHL_KEY_H0                    (REGISTERS_BASE + 0x1C1C)
-#define MCHL_MIC_L0                    (REGISTERS_BASE + 0x1C20)
-#define MCHL_MIC_H0                    (REGISTERS_BASE + 0x1C24)
-#define MCHL_START1                    (REGISTERS_BASE + 0x1C28)
-#define MCHL_DMV_START_MBLK1           (REGISTERS_BASE + 0x1C2C) /* Changed to 23:5 format*/
-#define MCHL_DMV_CUR_MBLK1             (REGISTERS_BASE + 0x1C38)
-#define MCHL_DMV_OFFSET1               (REGISTERS_BASE + 0x1C30)
-#define MCHL_DMV_LENGTH1               (REGISTERS_BASE + 0x1C34)
-#define MCHL_DMV_CFG1                  (REGISTERS_BASE + 0x1C3C)
-#define MCHL_KEY_L1                    (REGISTERS_BASE + 0x1C40)
-#define MCHL_KEY_H1                    (REGISTERS_BASE + 0x1C44)
-#define MCHL_MIC_L1                    (REGISTERS_BASE + 0x1C48)
-#define MCHL_MIC_H1                    (REGISTERS_BASE + 0x1C4C)
-#define MCHL_CTL0                      (REGISTERS_BASE + 0x1C50) /* new name MCHL_CTRL0*/
-#define MCHL_CTL1                      (REGISTERS_BASE + 0x1C54) /* new name MCHL_CTRL1*/
-#define MCHL_UPPER_BYTE_ADDR0          (REGISTERS_BASE + 0x1C58) /* new*/
-#define MCHL_UPPER_BYTE_ADDR1          (REGISTERS_BASE + 0x1C5C) /* new*/
-
-/* SEEPROM registers*/
-#define EE_CFG                         (REGISTERS_BASE + 0x0820)
-#define EE_CTL                         (REGISTERS_BASE + 0x2000)
-#define EE_DATA                        (REGISTERS_BASE + 0x2004)
-#define EE_ADDR                        (REGISTERS_BASE + 0x2008)
-
-/* Parallel Host (PCI/CARDBUS/PCMCIA/GS*/
-#define CIS_LADDR                      (REGISTERS_BASE + 0x2400)
-#define HI_CTL                         (REGISTERS_BASE + 0x2404)
-#define LPWR_MGT                       (REGISTERS_BASE + 0x2408)
-/*#define PDR0                         (REGISTERS_BASE + 0x04ec)*/
-/*#define PDR1                         (REGISTERS_BASE + 0x04f0)*/
-/*#define PDR2                         (REGISTERS_BASE + 0x04f4)*/
-/*#define PDR3                         (REGISTERS_BASE + 0x04f8)*/
-/*#define BAR2_ENABLE                  (REGISTERS_BASE + 0x04fc)*/
-/*#define BAR2_TRANS                   (REGISTERS_BASE + 0x0500)*/
-/*#define BAR2_MASK                    (REGISTERS_BASE + 0x0504)*/
-#define PCI_MEM_SIZE1                  (REGISTERS_BASE + 0x2428)
-#define PCI_MEM_OFFSET1                (REGISTERS_BASE + 0x242C)
-#define PCI_MEM_OFFSET2                (REGISTERS_BASE + 0x2430)
-/*#define PCI_IO_SIZE1                 (REGISTERS_BASE + 0x0514)*/
-/*#define PCI_IO_OFFSET1               (REGISTERS_BASE + 0x0518)*/
-/*#define PCI_IO_OFFSET2               (REGISTERS_BASE + 0x051c)*/
-/*#define PCI_CFG_OFFSET               (REGISTERS_BASE + 0x0520)*/
-#define PCMCIA_CFG                     (REGISTERS_BASE + 0x2444)
-#define PCMCIA_CTL                     (REGISTERS_BASE + 0x2448)
-#define PCMCIA_CFG2                    (REGISTERS_BASE + 0x244C) /* new*/
-#define SRAM_PAGE                      (REGISTERS_BASE + 0x2450)
-#define CFG_PULLUPDN                   (REGISTERS_BASE + 0x2454)
-#define CIS_MAP                        (REGISTERS_BASE + 0x2458) /* new*/
-#define ENDIAN_CTRL                    (REGISTERS_BASE + 0x245C) /* new*/
-#define GS_SLEEP_ACCESS                (REGISTERS_BASE + 0x2480) /* new*/
-#define PCMCIA_PWR_DN                  (REGISTERS_BASE + 0x04C4) 
-#define PCI_OUTPUT_DLY_CFG             (REGISTERS_BASE + 0x2464) /* new*/
-
-/* VLYNQ registers*/
-/* VLYNQ2 was removed from hardware*/
-#define VL1_REV_ID                     (REGISTERS_BASE + 0x8000) /* VLYNQ_REVISION*/
-#define VL1_CTL                        (REGISTERS_BASE + 0x8004) /* VLYNQ_ CONTROL*/
-#define VL1_STS                        (REGISTERS_BASE + 0x8008) /* VLYNQ_STATUS*/
-#define VLYNQ_INTVEC                   (REGISTERS_BASE + 0x800C)
-#define VL1_INT_STS                    (REGISTERS_BASE + 0x8010) /* VLYNQ_INTCR*/
-#define VL1_INT_PEND                   (REGISTERS_BASE + 0x8014) /* VLYNQ_INTSR*/
-#define VL1_INT_PTR                    (REGISTERS_BASE + 0x8018) /* VLYNQ_INTPTR*/
-#define VL1_TX_ADDR                    (REGISTERS_BASE + 0x801C) /* VLYNQ_TX_MAP_ADDR*/
-#define VL1_RX_SIZE1                   (REGISTERS_BASE + 0x8020) /* VLYNQ_RX_MAP_SIZE1*/
-#define VL1_RX_OFF1                    (REGISTERS_BASE + 0x8024) /* VLYNQ_RX_MAP_OFFSET1*/
-#define VL1_RX_SIZE2                   (REGISTERS_BASE + 0x8028) /* VLYNQ_RX_MAP_SIZE2*/
-#define VL1_RX_OFF2                    (REGISTERS_BASE + 0x802C) /* VLYNQ_RX_MAP_OFFSET2*/
-#define VL1_RX_SIZE3                   (REGISTERS_BASE + 0x8030) /* VLYNQ_RX_MAP_SIZE3*/
-#define VL1_RX_OFF3                    (REGISTERS_BASE + 0x8034) /* VLYNQ_RX_MAP_OFFSET3*/
-#define VL1_RX_SIZE4                   (REGISTERS_BASE + 0x8038) /* VLYNQ_RX_MAP_SIZE4*/
-#define VL1_RX_OFF4                    (REGISTERS_BASE + 0x803C) /* VLYNQ_RX_MAP_OFFSET4*/
-#define VL1_CHIP_VER                   (REGISTERS_BASE + 0x8040) /* VLYNQ_CHIP_VER*/
-#define VLYNQ_AUTONEG                  (REGISTERS_BASE + 0x8044)
-#define VLYNQ_MANNEG                   (REGISTERS_BASE + 0x8048)
-#define VLYNQ_NEGSTAT                  (REGISTERS_BASE + 0x804C)
-#define VLYNQ_ENDIAN                   (REGISTERS_BASE + 0x805C)
-#define VL1_INT_VEC3_0                 (REGISTERS_BASE + 0x8060) /* VLYNQ_HW_INT3TO0_CFG*/
-#define VL1_INT_VEC7_4                 (REGISTERS_BASE + 0x8064) /* VLYNQ_HW_INT7TO4_CFG*/
-/* VLYNQ Remote configuration registers*/
-#define VL1_REM_REV_ID                 (REGISTERS_BASE + 0x8080) /* VLYNQ_REM_REVISION*/
-#define VL1_REM_CTL                    (REGISTERS_BASE + 0x8084) /* VLYNQ_REM_ CONTROL*/
-#define VL1_REM_STS                    (REGISTERS_BASE + 0x8088) /* VLYNQ_REM_STATUS*/
-#define VLYNQ_REM_INTVEC               (REGISTERS_BASE + 0x808C)
-#define VL1_REM_INT_STS                (REGISTERS_BASE + 0x8090) /* VLYNQ_REM_INTCR*/
-#define VL1_REM_INT_PEND               (REGISTERS_BASE + 0x8094) /* VLYNQ_REM_INTSR*/
-#define VL1_REM_INT_PTR                (REGISTERS_BASE + 0x8098) /* VLYNQ_REM_INTPTR*/
-#define VL1_REM_TX_ADDR                (REGISTERS_BASE + 0x809C) /* VLYNQ_REM_TX_MAP_ADDR*/
-#define VL1_REM_RX_SIZE1               (REGISTERS_BASE + 0x80A0) /* VLYNQ_REM_RX_MAP_SIZE1*/
-#define VL1_REM_RX_OFF1                (REGISTERS_BASE + 0x80A4) /* VLYNQ_REM_RX_MAP_OFFSET1*/
-#define VL1_REM_RX_SIZE2               (REGISTERS_BASE + 0x80A8) /* VLYNQ_REM_RX_MAP_SIZE2*/
-#define VL1_REM_RX_OFF2                (REGISTERS_BASE + 0x80AC) /* VLYNQ_REM_RX_MAP_OFFSET2*/
-#define VL1_REM_RX_SIZE3               (REGISTERS_BASE + 0x80B0) /* VLYNQ_REM_RX_MAP_SIZE3*/
-#define VL1_REM_RX_OFF3                (REGISTERS_BASE + 0x80B4) /* VLYNQ_REM_RX_MAP_OFFSET3*/
-#define VL1_REM_RX_SIZE4               (REGISTERS_BASE + 0x80B8) /* VLYNQ_REM_RX_MAP_SIZE4*/
-#define VL1_REM_RX_OFF4                (REGISTERS_BASE + 0x80BC) /* VLYNQ_REM_RX_MAP_OFFSET4*/
-#define VL1_REM_CHIP_VER               (REGISTERS_BASE + 0x80C0) /* VLYNQ_REM_CHIP_VER*/
-#define VLYNQ_REM_AUTONEG              (REGISTERS_BASE + 0x80C4)
-#define VLYNQ_REM_MANNEG               (REGISTERS_BASE + 0x80C8)
-#define VLYNQ_REM_NEGSTAT              (REGISTERS_BASE + 0x80CC)
-#define VLYNQ_REM_ENDIAN               (REGISTERS_BASE + 0x80DC)
-#define VL1_REM_INT_VEC3_0             (REGISTERS_BASE + 0x80E0) /* VLYNQ_REM_HW_INT3TO0_CFG*/
-#define VL1_REM_INT_VEC7_4             (REGISTERS_BASE + 0x80E4) /* VLYNQ_REM_HW_INT7TO4_CFG*/
-
-/* PCIIF*/
-/**/
-#define PCI_ID_REG                     (REGISTERS_BASE + 0x8400)
-#define PCI_STATUS_SET_REG             (REGISTERS_BASE + 0x8410)
-#define PCI_STATUS_CLR_REG             (REGISTERS_BASE + 0x8414)
-#define PCI_HIMASK_SET_REG             (REGISTERS_BASE + 0x8420)
-#define PCI_HIMASK_CLR_REG             (REGISTERS_BASE + 0x8424)
-#define PCI_AMASK_SET_REG              (REGISTERS_BASE + 0x8430)
-#define PCI_AMASK_CLR_REG              (REGISTERS_BASE + 0x8434)
-#define PCI_CLKRUN_REG                 (REGISTERS_BASE + 0x8438)
-#define PCI_BE_VENDOR_ID_REG           (REGISTERS_BASE + 0x8500)
-#define PCI_BE_COMMAND_REG             (REGISTERS_BASE + 0x8504)
-#define PCI_BE_REVISION_REG            (REGISTERS_BASE + 0x8508)
-#define PCI_BE_CL_SIZE_REG             (REGISTERS_BASE + 0x850C)
-#define PCI_BE_BAR0_MASK_REG           (REGISTERS_BASE + 0x8510)
-#define PCI_BE_BAR1_MASK_REG           (REGISTERS_BASE + 0x8514)
-#define PCI_BE_BAR2_MASK_REG           (REGISTERS_BASE + 0x8518)
-#define PCI_BE_BAR3_MASK_REG           (REGISTERS_BASE + 0x851C)
-#define PCI_BE_CIS_PTR_REG             (REGISTERS_BASE + 0x8528)
-#define PCI_BE_SUBSYS_ID_REG           (REGISTERS_BASE + 0x852C)
-#define PCI_BE_CAP_PTR_REG             (REGISTERS_BASE + 0x8534)
-#define PCI_BE_INTR_LINE_REG           (REGISTERS_BASE + 0x853C)
-#define PCI_BE_PM_CAP_REG              (REGISTERS_BASE + 0x8540)
-#define PCI_BE_PM_CTRL_REG             (REGISTERS_BASE + 0x8544)
-#define PCI_BE_PM_D0_CTRL_REG          (REGISTERS_BASE + 0x8560)
-#define PCI_BE_PM_D1_CTRL_REG          (REGISTERS_BASE + 0x8564)
-#define PCI_BE_PM_D2_CTRL_REG          (REGISTERS_BASE + 0x8568)
-#define PCI_BE_PM_D3_CTRL_REG          (REGISTERS_BASE + 0x856C)
-#define PCI_BE_SLV_CFG_REG             (REGISTERS_BASE + 0x8580)
-#define PCI_BE_ARB_CTRL_REG            (REGISTERS_BASE + 0x8584)
-                                       
-#define FER                            (REGISTERS_BASE + 0x85A0) /* PCI_BE_STSCHG_FE_REG*/
-#define FEMR                           (REGISTERS_BASE + 0x85A4) /* PCI_BE_STSCHG_FEM_REG*/
-#define FPSR                           (REGISTERS_BASE + 0x85A8) /* PCI_BE_STSCHG_FPS_REG*/
-#define FFER                           (REGISTERS_BASE + 0x85AC) /* PCI_BE_STSCHG_FFE_REG*/
-
-#define PCI_BE_BAR0_TRANS_REG          (REGISTERS_BASE + 0x85C0)
-#define PCI_BE_BAR1_TRANS_REG          (REGISTERS_BASE + 0x85C4)
-#define PCI_BE_BAR2_TRANS_REG          (REGISTERS_BASE + 0x85C8)
-#define PCI_BE_BAR3_TRANS_REG          (REGISTERS_BASE + 0x85CC)
-#define PCI_BE_BAR4_TRANS_REG          (REGISTERS_BASE + 0x85D0)
-#define PCI_BE_BAR5_TRANS_REG          (REGISTERS_BASE + 0x85D4)
-#define PCI_BE_BAR0_REG                (REGISTERS_BASE + 0x85E0)
-#define PCI_BE_BAR1_REG                (REGISTERS_BASE + 0x85E4)
-#define PCI_BE_BAR2_REG                (REGISTERS_BASE + 0x85E8)
-#define PCI_BE_BAR3_REG                (REGISTERS_BASE + 0x85EC)
-
-#define PCI_PROXY_DATA                 (REGISTERS_BASE + 0x8700)
-#define PCI_PROXY_ADDR                 (REGISTERS_BASE + 0x8704)
-#define PCI_PROXY_CMD                  (REGISTERS_BASE + 0x8708)
-#define PCI_CONTROL                    (REGISTERS_BASE + 0x8710)
-
-/* USB1.1 registers*/
-/**/
-#define USB_STS_CLR                    (REGISTERS_BASE + 0x4000)
-#define USB_STS_ND                     (REGISTERS_BASE + 0x4004)
-#define USB_INT_ACK                    (REGISTERS_BASE + 0x4008)
-#define USB_MASK                       (REGISTERS_BASE + 0x400c)
-#define USB_MASK_SET                   (REGISTERS_BASE + 0x4010)
-#define USB_MASK_CLR                   (REGISTERS_BASE + 0x4014)
-#define USB_WU                         (REGISTERS_BASE + 0x4018)
-#define USB_EP0_OUT_PTR                (REGISTERS_BASE + 0x401c)
-#define USB_EP0_OUT_VLD                (REGISTERS_BASE + 0x4020)
-#define USB_EP0_OUT_LEN                (REGISTERS_BASE + 0x4024)
-#define USB_EP0_IN_PTR                 (REGISTERS_BASE + 0x4028)
-#define USB_EP0_IN_VLD                 (REGISTERS_BASE + 0x402c)
-#define USB_EP0_IN_LEN                 (REGISTERS_BASE + 0x4030)
-#define USB_EP1_CFG                    (REGISTERS_BASE + 0x4034)
-#define USB_EP1_OUT_INT_CFG            (REGISTERS_BASE + 0x4038)
-#define USB_EP1_OUT_PTR                (REGISTERS_BASE + 0x403c)
-#define USB_EP1_OUT_VLD                (REGISTERS_BASE + 0x4040)
-#define USB_EP1_OUT_CUR_MBLK           (REGISTERS_BASE + 0x4044)
-#define USB_EP1_OUT_LEN                (REGISTERS_BASE + 0x4048)
-#define USB_EP1_IN_START_MBLK          (REGISTERS_BASE + 0x404c)
-#define USB_EP1_IN_LAST_MBLK           (REGISTERS_BASE + 0x4050)
-#define USB_EP1_IN_VLD                 (REGISTERS_BASE + 0x4054)
-
-#define USB_EP2_PTR                    (REGISTERS_BASE + 0x405c)
-#define USB_EP2_VLD                    (REGISTERS_BASE + 0x4060)
-#define USB_EP2_LEN                    (REGISTERS_BASE + 0x4064)
-#define USB_EP3_OUT_PTR0               (REGISTERS_BASE + 0x4068)
-#define USB_EP3_OUT_VLD0               (REGISTERS_BASE + 0x406c)
-#define USB_EP3_OUT_LEN0               (REGISTERS_BASE + 0x4070)
-#define USB_EP3_OUT_PTR1               (REGISTERS_BASE + 0x4074)
-#define USB_EP3_OUT_VLD1               (REGISTERS_BASE + 0x4078)
-#define USB_EP3_OUT_LEN1               (REGISTERS_BASE + 0x407c)
-#define USB_EP3_IN_PTR0                (REGISTERS_BASE + 0x4080)
-#define USB_EP3_IN_VLD0                (REGISTERS_BASE + 0x4084)
-#define USB_EP3_IN_LEN0                (REGISTERS_BASE + 0x4088)
-#define USB_EP3_IN_PTR1                (REGISTERS_BASE + 0x408c)
-#define USB_EP3_IN_VLD1                (REGISTERS_BASE + 0x4090)
-#define USB_EP3_IN_LEN1                (REGISTERS_BASE + 0x4094)
-#define USB_EP1_OUT_END_MBLK           (REGISTERS_BASE + 0x4098)
-#define USB_EP0_OUT_SETUP              (REGISTERS_BASE + 0x409c)
-#define USB_EP0_STALL                  (REGISTERS_BASE + 0x40a0)
-#define USB_EP1_IN_OFFSET              (REGISTERS_BASE + 0x40a4)
-
-/* Device Configuration registers*/
-#define SOR_CFG                        (REGISTERS_BASE + 0x0800)
-#define ECPU_CTRL                      (REGISTERS_BASE + 0x0804)
-#define HI_CFG                         (REGISTERS_BASE + 0x0808)
-#define EE_START                       (REGISTERS_BASE + 0x080C)
-
-/* IO Control registers*/
-#define SERIAL_HOST_IOCFG0             (REGISTERS_BASE + 0x0894) /* new*/
-#define SERIAL_HOST_IOCFG1             (REGISTERS_BASE + 0x0898) /* new*/
-#define SERIAL_HOST_IOCFG2             (REGISTERS_BASE + 0x089C) /* new*/
-#define SERIAL_HOST_IOCFG3             (REGISTERS_BASE + 0x08A0) /* new*/
-#define GPIO_IOCFG0                    (REGISTERS_BASE + 0x08F4) /* new*/
-#define GPIO_IOCFG1                    (REGISTERS_BASE + 0x08F8) /* new*/
-#define GPIO_IOCFG2                    (REGISTERS_BASE + 0x08FC) /* new*/
-#define GPIO_IOCFG3                    (REGISTERS_BASE + 0x0900) /* new*/
-#define CHIP_ID_B                      (REGISTERS_BASE + 0x5674) /* new*/
-#define CHIP_ID                        CHIP_ID_B/* Leave for TNETW compatability*/
-#define CHIP_ID_1273_PG10              (0x04030101)
-#define CHIP_ID_1273_PG20              (0x04030111)
-
-#define SYSTEM                         (REGISTERS_BASE + 0x0810)
-#define PCI_ARB_CFG                    (REGISTERS_BASE + 0x0814)
-#define BOOT_IRAM_CFG                  (REGISTERS_BASE + 0x0818)
-#define IO_CONTROL_ENABLE              (REGISTERS_BASE + 0x5450)
-#define MBLK_CFG                       (REGISTERS_BASE + 0x5460)
-#define RS232_BITINTERVAL              (REGISTERS_BASE + 0x0824)
-#define TEST_PORT                      (REGISTERS_BASE + 0x096C)
-#define DEBUG_PORT                     (REGISTERS_BASE + 0x0970)
-#define HOST_WR_ACCESS_REG             (REGISTERS_BASE + 0x09F8)
-
-/* GPIO registers*/
-#define GPIO_OE                        (REGISTERS_BASE + 0x082C) /* 22 GPIOs*/
-#define GPIO_OUT                       (REGISTERS_BASE + 0x0834)
-#define GPIO_IN                        (REGISTERS_BASE + 0x0830)
-#define GPO_CFG                        (REGISTERS_BASE + 0x083C)
-#define GPIO_SELECT                    (REGISTERS_BASE + 0x614C)
-#define GPIO_OE_RADIO                  (REGISTERS_BASE + 0x6140)
-#define PWRDN_BUS_L                    (REGISTERS_BASE + 0x0844)
-#define PWRDN_BUS_H                    (REGISTERS_BASE + 0x0848)
-#define DIE_ID_L                       (REGISTERS_BASE + 0x088C)
-#define DIE_ID_H                       (REGISTERS_BASE + 0x0890)
-
-/* Power Management registers*/
-/* */
-#define ELP_START                      (REGISTERS_BASE + 0x5800)
-#define ELP_CFG_MODE                   (REGISTERS_BASE + 0x5804)
-#define ELP_CMD                        (REGISTERS_BASE + 0x5808)
-#define PLL_CAL_TIME                   (REGISTERS_BASE + 0x5810)
-#define CLK_REQ_TIME                   (REGISTERS_BASE + 0x5814)
-#define CLK_BUF_TIME                   (REGISTERS_BASE + 0x5818)
-
-#define CFG_PLL_SYNC_CNT               (REGISTERS_BASE + 0x5820) /* Points to the CFG_PLL_SYNC_CNT_xx registers set*/
-#define CFG_PLL_SYNC_CNT_I             (REGISTERS_BASE + 0x5820)
-#define CFG_PLL_SYNC_CNT_II            (REGISTERS_BASE + 0x5824)
-#define CFG_PLL_SYNC_CNT_III           (REGISTERS_BASE + 0x5828)
-
-#define CFG_ELP_SLEEP_CNT              (REGISTERS_BASE + 0x5830) /* Points to the CFG_ELP_SLEEP_CNT_xx registers set*/
-#define CFG_ELP_SLEEP_CNT_I            (REGISTERS_BASE + 0x5830)
-#define CFG_ELP_SLEEP_CNT_II           (REGISTERS_BASE + 0x5834)
-#define CFG_ELP_SLEEP_CNT_III          (REGISTERS_BASE + 0x5838)
-#define CFG_ELP_SLEEP_CNT_IV           (REGISTERS_BASE + 0x583c)
-
-#define ELP_SLEEP_CNT                  (REGISTERS_BASE + 0x5840) /* Points to the ELP_SLEEP_CNT_xx registers set*/
-#define ELP_SLEEP_CNT_I                (REGISTERS_BASE + 0x5840)
-#define ELP_SLEEP_CNT_II               (REGISTERS_BASE + 0x5844)
-#define ELP_SLEEP_CNT_III              (REGISTERS_BASE + 0x5848)
-#define ELP_SLEEP_CNT_IV               (REGISTERS_BASE + 0x584c)
-
-#define ELP_WAKE_UP_STS                (REGISTERS_BASE + 0x5850)
-#define CFG_SLP_CLK_SEL                (REGISTERS_BASE + 0x5860)
-#define CFG_SLP_CLK_EN                 (REGISTERS_BASE + 0x5870)
-
-#define CFG_WAKE_UP_EN_I               (REGISTERS_BASE + 0x5880)
-#define CFG_WAKE_UP_EN_II              (REGISTERS_BASE + 0x5884)
-#define CFG_WAKE_UP_EN_III             (REGISTERS_BASE + 0x5888)
-
-#define CFG_ELP_PWRDN_I                (REGISTERS_BASE + 0x5890)
-#define CFG_ELP_PWRDN_II               (REGISTERS_BASE + 0x5894)
-#define CFG_ELP_PWRDN_III              (REGISTERS_BASE + 0x5898)
-
-#define CFG_POWER_DOWN_I               (REGISTERS_BASE + 0x58a0)
-#define CFG_POWER_DOWN_II              (REGISTERS_BASE + 0x58a4)
-#define CFG_POWER_DOWN_III             (REGISTERS_BASE + 0x58a8)
-
-#define CFG_BUCK_TESTMODE_I            (REGISTERS_BASE + 0x58b0)
-#define CFG_BUCK_TESTMODE_II           (REGISTERS_BASE + 0x58b4)
-
-#define POWER_STATUS_I                 (REGISTERS_BASE + 0x58C0)
-#define POWER_STATUS_II                (REGISTERS_BASE + 0x58C4)
-
-#define DIGLDO_BIAS_PROG_I             (REGISTERS_BASE + 0x58d0)
-#define DIGLDO_BIAS_PROG_II            (REGISTERS_BASE + 0x58d4)
-
-#define LDO2P8_BIAS_PROG_I             (REGISTERS_BASE + 0x58e0)
-#define LDO2P8_BIAS_PROG_II            (REGISTERS_BASE + 0x58e4)
-
-#define ADCLDO_BIAS_PROG               (REGISTERS_BASE + 0x58f0)
-
-#define REFSYS_PROG_I                  (REGISTERS_BASE + 0x5910)
-#define REFSYS_PROG_II                 (REGISTERS_BASE + 0x5914)
-
-#define PM_TEST_I                      (REGISTERS_BASE + 0x5920)
-#define PM_TEST_II                     (REGISTERS_BASE + 0x5924)
-
-#define POR_PROG                       (REGISTERS_BASE + 0x5930)
-
-#define TEST_PIN_DIR_I                 (REGISTERS_BASE + 0x5940)
-#define TEST_PIN_DIR_II                (REGISTERS_BASE + 0x5944)
-
-#define PROC_CTL                       (REGISTERS_BASE + 0x5950)
-
-#define ADC_REF_WAKEUP_I               (REGISTERS_BASE + 0x5960)
-#define ADC_REF_WAKEUP_II              (REGISTERS_BASE + 0x5964)
-#define ADC_REF_WAKEUP_III             (REGISTERS_BASE + 0x5968)
-#define ADC_REF_WAKEUP_IV              (REGISTERS_BASE + 0x596C)
-
-#define VREG_WAKEUP_I                  (REGISTERS_BASE + 0x5970)
-#define VREG_WAKEUP_II                 (REGISTERS_BASE + 0x5974)
-#define VREG_WAKEUP_III                (REGISTERS_BASE + 0x5978)
-#define VREG_WAKEUP_IV                 (REGISTERS_BASE + 0x597C)
-
-#define PLL_WAKEUP_I                   (REGISTERS_BASE + 0x5980)
-#define PLL_WAKEUP_II                  (REGISTERS_BASE + 0x5984)
-#define PLL_WAKEUP_III                 (REGISTERS_BASE + 0x5988)
-#define PLL_WAKEUP_IV                  (REGISTERS_BASE + 0x598C)
-
-#define XTALOSC_WAKEUP_I               (REGISTERS_BASE + 0x5990)
-#define XTALOSC_WAKEUP_II              (REGISTERS_BASE + 0x5994)
-#define XTALOSC_WAKEUP_III             (REGISTERS_BASE + 0x5998)
-#define XTALOSC_WAKEUP_IV              (REGISTERS_BASE + 0x599C)
-
-/* ----------*/
-
-#define PLL_PARAMETERS                 (REGISTERS_BASE + 0x6040)
-#define WU_COUNTER_PAUSE               (REGISTERS_BASE + 0x6008)
-#define WELP_ARM_COMMAND               (REGISTERS_BASE + 0x6100)
-
-/* ----------*/
-
-#define POWER_MGMT2                    (REGISTERS_BASE + 0x0840)
-#define POWER_MGMT                     (REGISTERS_BASE + 0x5098)
-#define MAC_HW_DOZE                    (REGISTERS_BASE + 0x090c)
-#define ECPU_SLEEP                     (REGISTERS_BASE + 0x0840)
-#define DOZE_CFG                       (REGISTERS_BASE + 0x54bc)
-#define DOZE2_CFG                      (REGISTERS_BASE + 0x081c)
-#define WAKEUP_CFG                     (REGISTERS_BASE + 0x54c0)
-#define WAKEUP_TIME_L                  (REGISTERS_BASE + 0x54c8)
-#define WAKEUP_TIME_H                  (REGISTERS_BASE + 0x54c4)
-
-/**/
-
-/*#define CPU_WAIT_CFG                 (f0020)*/
-/*#define CFG_QOS_ACM                  (f0046)*/
-
-/* Scratch Pad registers*/
-#define SCR_PAD0                       (REGISTERS_BASE + 0x5608)
-#define SCR_PAD1                       (REGISTERS_BASE + 0x560C)
-#define SCR_PAD2                       (REGISTERS_BASE + 0x5610)
-#define SCR_PAD3                       (REGISTERS_BASE + 0x5614)
-#define SCR_PAD4                       (REGISTERS_BASE + 0x5618)
-#define SCR_PAD4_SET                   (REGISTERS_BASE + 0x561C)
-#define SCR_PAD4_CLR                   (REGISTERS_BASE + 0x5620)
-#define SCR_PAD5                       (REGISTERS_BASE + 0x5624)
-#define SCR_PAD5_SET                   (REGISTERS_BASE + 0x5628)
-#define SCR_PAD5_CLR                   (REGISTERS_BASE + 0x562C)
-#define SCR_PAD6                       (REGISTERS_BASE + 0x5630)
-#define SCR_PAD7                       (REGISTERS_BASE + 0x5634)
-#define SCR_PAD8                       (REGISTERS_BASE + 0x5638)
-#define SCR_PAD9                       (REGISTERS_BASE + 0x563C)
-
-/* Spare registers*/
-#define SPARE_A1                       (REGISTERS_BASE + 0x0994)
-#define SPARE_A2                       (REGISTERS_BASE + 0x0998)
-#define SPARE_A3                       (REGISTERS_BASE + 0x099C)
-#define SPARE_A4                       (REGISTERS_BASE + 0x09A0)
-#define SPARE_A5                       (REGISTERS_BASE + 0x09A4)
-#define SPARE_A6                       (REGISTERS_BASE + 0x09A8)
-#define SPARE_A7                       (REGISTERS_BASE + 0x09AC)
-#define SPARE_A8                       (REGISTERS_BASE + 0x09B0)
-#define SPARE_B1                       (REGISTERS_BASE + 0x5420)
-#define SPARE_B2                       (REGISTERS_BASE + 0x5424)
-#define SPARE_B3                       (REGISTERS_BASE + 0x5428)
-#define SPARE_B4                       (REGISTERS_BASE + 0x542C)
-#define SPARE_B5                       (REGISTERS_BASE + 0x5430)
-#define SPARE_B6                       (REGISTERS_BASE + 0x5434)
-#define SPARE_B7                       (REGISTERS_BASE + 0x5438)
-#define SPARE_B8                       (REGISTERS_BASE + 0x543C)
-
-/* RMAC registers (Raleigh MAC)*/
-
-/* Station registers*/
-#define DEV_MODE                       (REGISTERS_BASE + 0x5464)
-#define STA_ADDR_L                     (REGISTERS_BASE + 0x546C)
-#define STA_ADDR_H                     (REGISTERS_BASE + 0x5470)
-#define BSSID_L                        (REGISTERS_BASE + 0x5474)
-#define BSSID_H                        (REGISTERS_BASE + 0x5478)
-#define AID_CFG                        (REGISTERS_BASE + 0x547C)
-#define BASIC_RATE_CFG                 (REGISTERS_BASE + 0x4C6C)
-#define BASIC_RATE_TX_CFG              (REGISTERS_BASE + 0x55F0)
-
-/* Protocol timers registers*/
-#define IFS_CFG0                       (REGISTERS_BASE + 0x5494)
-#define IFS_CFG1                       (REGISTERS_BASE + 0x5498)
-#define TIMEOUT_CFG                    (REGISTERS_BASE + 0x549C)
-#define CONT_WIND_CFG                  (REGISTERS_BASE + 0x54A0)
-#define BCN_INT_CFG                    (REGISTERS_BASE + 0x54A4)
-#define RETRY_CFG                      (REGISTERS_BASE + 0x54A8)
-#define DELAY_CFG                      (REGISTERS_BASE + 0x54B0)
-
-/* Hardware Override registers*/
-#define CCA_CFG                        (REGISTERS_BASE + 0x54CC)
-#define CCA_FILTER_CFG                 (REGISTERS_BASE + 0x5480)
-#define RADIO_PLL_CFG                  (REGISTERS_BASE + 0x555C)
-#define CCA_MON                        (REGISTERS_BASE + 0x54D0)
-#define TX_FRM_CTL                     (REGISTERS_BASE + 0x54D4)
-#define CONT_TX_EN                     (REGISTERS_BASE + 0x50EC)
-#define PHY_STANDBY_EN                 (REGISTERS_BASE + 0x5668)
-
-/* Transmit Setup registers*/
-#define TX_PING_PONG                   (REGISTERS_BASE + 0x5090)
-#define TX_CFG0                        (REGISTERS_BASE + 0x5000)
-#define TX_CFG1                        (REGISTERS_BASE + 0x5004)
-#define TX_CFG2                        (REGISTERS_BASE + 0x5008)
-#define MAX_LIFETIME                   (REGISTERS_BASE + 0x50FC)
-#define TX_PANG_SEL                    (REGISTERS_BASE + 0x50E0)
-#define TX_PANG0                       (REGISTERS_BASE + 0x50A0)
-#define TX_PING0                       (REGISTERS_BASE + 0x5010)
-#define TX_PONG0                       (REGISTERS_BASE + 0x5050)
-#define TX_PANG1                       (REGISTERS_BASE + 0x50A4)
-#define TX_PING1                       (REGISTERS_BASE + 0x5014)
-#define TX_PONG1                       (REGISTERS_BASE + 0x5054)
-#define TX_PANG2                       (REGISTERS_BASE + 0x50A8)
-#define TX_PING2                       (REGISTERS_BASE + 0x5018)
-#define TX_PONG2                       (REGISTERS_BASE + 0x5058)
-#define TX_PANG3                       (REGISTERS_BASE + 0x50AC)
-#define TX_PING3                       (REGISTERS_BASE + 0x501C)
-#define TX_PONG3                       (REGISTERS_BASE + 0x505C)
-#define TX_PANG4                       (REGISTERS_BASE + 0x50B0)
-#define TX_PING4                       (REGISTERS_BASE + 0x5020)
-#define TX_PONG4                       (REGISTERS_BASE + 0x5060)
-#define TX_PANG5                       (REGISTERS_BASE + 0x50B4)
-#define TX_PING5                       (REGISTERS_BASE + 0x5024)
-#define TX_PONG5                       (REGISTERS_BASE + 0x5064)
-#define TX_PANG6                       (REGISTERS_BASE + 0x50B8)
-#define TX_PING6                       (REGISTERS_BASE + 0x5028)
-#define TX_PONG6                       (REGISTERS_BASE + 0x5068)
-#define TX_PANG7                       (REGISTERS_BASE + 0x50BC)
-#define TX_PING7                       (REGISTERS_BASE + 0x502C)
-#define TX_PONG7                       (REGISTERS_BASE + 0x506C)
-#define TX_PANG8                       (REGISTERS_BASE + 0x50C0)
-#define TX_PING8                       (REGISTERS_BASE + 0x5030)
-#define TX_PONG8                       (REGISTERS_BASE + 0x5070)
-#define TX_PANG9                       (REGISTERS_BASE + 0x50C4)
-#define TX_PING9                       (REGISTERS_BASE + 0x5034)
-#define TX_PONG9                       (REGISTERS_BASE + 0x5074)
-#define TX_PANG10                      (REGISTERS_BASE + 0x50C8)
-#define TX_PING10                      (REGISTERS_BASE + 0x5038)
-#define TX_PONG10                      (REGISTERS_BASE + 0x5078)
-#define TX_PANG11                      (REGISTERS_BASE + 0x50CC)
-#define TX_PING11                      (REGISTERS_BASE + 0x503C)
-#define TX_PONG11                      (REGISTERS_BASE + 0x507C)
-
-/* Transmit Status registers*/
-#define TX_STATUS                      (REGISTERS_BASE + 0x509C)
-#define TX_PANG_EXCH                   (REGISTERS_BASE + 0x50D0)
-#define TX_PING_EXCH                   (REGISTERS_BASE + 0x5040)
-#define TX_PONG_EXCH                   (REGISTERS_BASE + 0x5080)
-#define TX_PANG_ATT                    (REGISTERS_BASE + 0x50D4)
-#define TX_PING_ATT                    (REGISTERS_BASE + 0x5044)
-#define TX_PONG_ATT                    (REGISTERS_BASE + 0x5084)
-#define TX_PANG_TIMESTAMP              (REGISTERS_BASE + 0x50DC)
-#define TX_PING_TIMESTAMP              (REGISTERS_BASE + 0x504C)
-#define TX_PONG_TIMESTAMP              (REGISTERS_BASE + 0x508C)
-
-/* Transmit State registers*/
-#define TX_STATE                       (REGISTERS_BASE + 0x5094)
-#define TX_PANG_OVRD_CFG               (REGISTERS_BASE + 0x50D8)
-#define TX_PING_OVRD_CFG               (REGISTERS_BASE + 0x5048)
-#define TX_PONG_OVRD_CFG               (REGISTERS_BASE + 0x5088)
-#define TX_HOLD_CFG                    (REGISTERS_BASE + 0x54D8)
-#define TSF_ADJ_CFG1                   (REGISTERS_BASE + 0x54DC)
-#define TSF_ADJ_CFG2                   (REGISTERS_BASE + 0x54E0)
-#define TSF_ADJ_CFG3                   (REGISTERS_BASE + 0x54E4)
-#define TSF_ADJ_CFG4                   (REGISTERS_BASE + 0x54E8)
-#define CFG_OFDM_TIMES0                (REGISTERS_BASE + 0x5648)
-#define CFG_OFDM_TIMES1                (REGISTERS_BASE + 0x564C)
-
-/* Beacon/Probe Response registers*/
-#define PRB_ADDR                       (REGISTERS_BASE + 0x54EC)
-#define PRB_LENGTH                     (REGISTERS_BASE + 0x54F0)
-#define BCN_ADDR                       (REGISTERS_BASE + 0x54F4)
-#define BCN_LENGTH                     (REGISTERS_BASE + 0x54F8)
-#define TIM_VALID0                     (REGISTERS_BASE + 0x54FC)
-#define TIM_ADDR0                      (REGISTERS_BASE + 0x5500)
-#define TIM_LENGTH0                    (REGISTERS_BASE + 0x5504)
-#define TIM_VALID1                     (REGISTERS_BASE + 0x5654)
-#define TIM_ADDR1                      (REGISTERS_BASE + 0x5658)
-#define TIM_LENGTH1                    (REGISTERS_BASE + 0x565C)
-#define TIM_SELECT                     (REGISTERS_BASE + 0x5660)
-#define TSF_CFG                        (REGISTERS_BASE + 0x5508)
-
-/* Other Hardware Generated Frames regi*/
-#define CTL_FRM_CFG                    (REGISTERS_BASE + 0x550C)
-#define MGMT_FRM_CFG                   (REGISTERS_BASE + 0x5510)
-#define CFG_ANT_SEL                    (REGISTERS_BASE + 0x5664)
-#define RMAC_ADDR_BASE                 (REGISTERS_BASE + 0x5680) /* new*/
-
-/* Protocol Interface Read Write Interf*/
-#define TXSIFS_TIMER                   (REGISTERS_BASE + 0x4C00)
-#define TXPIFS_TIMER                   (REGISTERS_BASE + 0x4C04)
-#define TXDIFS_TIMER                   (REGISTERS_BASE + 0x4C08)
-#define SLOT_TIMER                     (REGISTERS_BASE + 0x4C0C)
-#define BACKOFF_TIMER                  (REGISTERS_BASE + 0x4C10)
-#define BCN_PSP_TIMER                  (REGISTERS_BASE + 0x4C14)
-#define NAV                            (REGISTERS_BASE + 0x4C18)
-#define TSF_L                          (REGISTERS_BASE + 0x4C1C)
-#define TSF_H                          (REGISTERS_BASE + 0x4C20)
-#define TSF_PREV_L                     (REGISTERS_BASE + 0x4CC4) /* new */
-#define TSF_PREV_H                     (REGISTERS_BASE + 0x4CC8) /* new */
-#define TOUT_TIMER                     (REGISTERS_BASE + 0x4C2C)
-#define NEXT_TBTT_L                    (REGISTERS_BASE + 0x4C30)
-#define NEXT_TBTT_H                    (REGISTERS_BASE + 0x4C34)
-#define DTIM_CNT                       (REGISTERS_BASE + 0x4C38)
-#define CONT_WIND                      (REGISTERS_BASE + 0x4C3C)
-#define PRSP_REQ                       (REGISTERS_BASE + 0x4C40)
-#define PRSP_DA_L                      (REGISTERS_BASE + 0x4C44)
-#define PRSP_DA_H                      (REGISTERS_BASE + 0x4C48)
-#define PRSP_RETRY                     (REGISTERS_BASE + 0x4C4C)
-#define PSPOLL_REQ                     (REGISTERS_BASE + 0x4C50)
-#define NEXT_SEQ_NUM                   (REGISTERS_BASE + 0x4C54)
-#define PRSP_SEQ_NUM                   (REGISTERS_BASE + 0x4C58)
-#define BCN_SEQ_NUM                    (REGISTERS_BASE + 0x4C5C)
-#define MED_USAGE                      (REGISTERS_BASE + 0x4C24)
-#define MED_USAGE_TM                   (REGISTERS_BASE + 0x4C28)
-#define PRB_DLY                        (REGISTERS_BASE + 0x4C60)
-#define STA_SRC                        (REGISTERS_BASE + 0x4C64)
-#define STA_LRC                        (REGISTERS_BASE + 0x4C68)
-#define CFG_ACM                        (REGISTERS_BASE + 0x4C70)
-#define RAND_NUMB                      (REGISTERS_BASE + 0x4C6C)
-#define CFG_ACK_CTS_DOT11A             (REGISTERS_BASE + 0x4C74)
-#define CFG_ACK_CTS_DOT11B             (REGISTERS_BASE + 0x4C78)
-#define ACM_IFS_CFG0                   (REGISTERS_BASE + 0x4C7C)
-#define ACM_IFS_CFG1                   (REGISTERS_BASE + 0x4C80)
-#define ACM_IFS_CFG2                   (REGISTERS_BASE + 0x4C84)
-#define ACM_IFS_CFG3                   (REGISTERS_BASE + 0x4C88)
-#define ACK_CTS_FRM_CFG                (REGISTERS_BASE + 0x4C8C)
-#define CFG_RX_TSTMP_DLY0              (REGISTERS_BASE + 0x4C90)
-#define CFG_RX_TSTMP_DLY1              (REGISTERS_BASE + 0x4C94)
-#define CFG_RX_TSTMP_DLY2              (REGISTERS_BASE + 0x4C98)
-#define CFG_RX_TSTMP_DLY3              (REGISTERS_BASE + 0x4C9C)
-#define CCA_BUSY                       (REGISTERS_BASE + 0x4CA0)
-#define CCA_BUSY_CLR                   (REGISTERS_BASE + 0x4CA4)
-#define CCA_IDLE                       (REGISTERS_BASE + 0x4CA8)
-#define CCA_IDLE_CLR                   (REGISTERS_BASE + 0x4CAC)
-
-/* Receive Manager registers*/
-#define RX_HEAD_PTR                    (REGISTERS_BASE + 0x567C) /* new*/
-#define RX_TAIL_PTR                    (REGISTERS_BASE + 0x4898) /* new*/
-#define RX_CURR_PTR                    (REGISTERS_BASE + 0x5678) /* new*/
-#define RX_RESET                       (REGISTERS_BASE + 0x4800)
-#define RX_MODMODE                     (REGISTERS_BASE + 0x4838) /* new*/
-#define MAC_HEADER_BYTECNT             (REGISTERS_BASE + 0x4890)
-#define RX_MAC_BYTECNT_INT             (REGISTERS_BASE + 0x489C)
-#define MAC_HEADER_WORD0               (REGISTERS_BASE + 0x4868)
-#define MAC_HEADER_WORD1               (REGISTERS_BASE + 0x486C)
-#define MAC_HEADER_WORD2               (REGISTERS_BASE + 0x4870)
-#define MAC_HEADER_WORD3               (REGISTERS_BASE + 0x4874)
-#define MAC_HEADER_WORD4               (REGISTERS_BASE + 0x4878)
-#define MAC_HEADER_WORD5               (REGISTERS_BASE + 0x487C)
-#define MAC_HEADER_WORD6               (REGISTERS_BASE + 0x4880)
-#define MAC_HEADER_WORD7               (REGISTERS_BASE + 0x4884)
-#define MAC_HEADER_WORD8               (REGISTERS_BASE + 0x4888)
-#define MAC_HEADER_WORD9               (REGISTERS_BASE + 0x488C)
-#define RX_CFG                         (REGISTERS_BASE + 0x5514)
-#define RX_FILTER_CFG                  (REGISTERS_BASE + 0x55B4)
-#define RX_MC0_L                       (REGISTERS_BASE + 0x5518)
-#define RX_MC0_H                       (REGISTERS_BASE + 0x551C)
-#define RX_MC1_L                       (REGISTERS_BASE + 0x5520)
-#define RX_MC1_H                       (REGISTERS_BASE + 0x5524)
-#define STA_SSID0                      (REGISTERS_BASE + 0x4804)
-#define STA_SSID1                      (REGISTERS_BASE + 0x4808)
-#define STA_SSID2                      (REGISTERS_BASE + 0x480C)
-#define STA_SSID3                      (REGISTERS_BASE + 0x4810)
-#define STA_SSID4                      (REGISTERS_BASE + 0x4814)
-#define STA_SSID5                      (REGISTERS_BASE + 0x4818)
-#define STA_SSID6                      (REGISTERS_BASE + 0x481C)
-#define STA_SSID7                      (REGISTERS_BASE + 0x4820)
-#define SSID_LEN                       (REGISTERS_BASE + 0x4824)
-#define RX_FREE_MEM                    (REGISTERS_BASE + 0x5528)
-#define RX_CURR_MEM                    (REGISTERS_BASE + 0x552C)
-#define MAC_TIMESTAMP                  (REGISTERS_BASE + 0x5560) /* Check place*/
-#define RX_TIMESTAMP                   (REGISTERS_BASE + 0x5564)
-#define RX_FRM_PTR                     (REGISTERS_BASE + 0x5568)
-#define RX_FRM_LEN                     (REGISTERS_BASE + 0x556C)
-#define RX_PLCP_HDR                    (REGISTERS_BASE + 0x5570)
-#define RX_PLCP_SIGNAL                 (REGISTERS_BASE + 0x5574)
-#define RX_PLCP_SERVICE                (REGISTERS_BASE + 0x5578) /* 16 bits ?*/
-#define RX_PLCP_LENGTH                 (REGISTERS_BASE + 0x557C)
-#define RX_FRM_CTL                     (REGISTERS_BASE + 0x5580)
-#define RX_DUR_ID                      (REGISTERS_BASE + 0x5584)
-#define RX_ADDR1_L                     (REGISTERS_BASE + 0x5588)
-#define RX_ADDR1_H                     (REGISTERS_BASE + 0x558C)
-#define RX_ADDR2_L                     (REGISTERS_BASE + 0x5590)
-#define RX_ADDR2_H                     (REGISTERS_BASE + 0x5594)
-#define RX_ADDR3_L                     (REGISTERS_BASE + 0x5598)
-#define RX_ADDR3_H                     (REGISTERS_BASE + 0x559C)
-#define RX_SEQ_CTL                     (REGISTERS_BASE + 0x55A0)
-#define RX_WEP_IV                      (REGISTERS_BASE + 0x55A4)
-#define RX_TIME_L                      (REGISTERS_BASE + 0x55A8)
-#define RX_TIME_H                      (REGISTERS_BASE + 0x55AC)
-#define RX_STATUS                      (REGISTERS_BASE + 0x55B0)
-#define PLCP_ERR_CNT                   (REGISTERS_BASE + 0x4828)
-#define FCS_ERR_CNT                    (REGISTERS_BASE + 0x482C)
-#define RX_OVERFLOW_CNT                (REGISTERS_BASE + 0x4830)
-#define RX_DEBUG1                      (REGISTERS_BASE + 0x4858)
-#define RX_DEBUG2                      (REGISTERS_BASE + 0x485C)
-#define RX_QOS_CFG                     (REGISTERS_BASE + 0x4848)
-#define RX_QOS_CTL                     (REGISTERS_BASE + 0x4844)
-#define RX_QOS_STATUS                  (REGISTERS_BASE + 0x4854) /* new name RX_QOS_STS*/
-#define RX_TXOP_HOLDER_L               (REGISTERS_BASE + 0x484C)
-#define RX_TXOP_HOLDER_H               (REGISTERS_BASE + 0x4850)
-#define RX_FRM_CNT                     (REGISTERS_BASE + 0x4834) /* what is RX_FRM_CTR*/
-#define CONS_FCS_ERR_CNT               (REGISTERS_BASE + 0x483C)
-#define CONS_FCS_ERR_CFG               (REGISTERS_BASE + 0x4840)
-#define RX_QOS_CTL_MASK                (REGISTERS_BASE + 0x48A0) /* new*/
-#define RX_QOS_ACK_EN                  (REGISTERS_BASE + 0x48A4) /* new*/
-#define RX_QOS_NOACK_EN                (REGISTERS_BASE + 0x48A8) /* new*/
-#define RX_QOS_ACK_BITMAP              (REGISTERS_BASE + 0x48AC) /* new*/
-
-/* Baseband Processor registers*/
-#define SBB_CFG                        (REGISTERS_BASE + 0x55C8)
-#define SBB_ADDR                       (REGISTERS_BASE + 0x55D0)
-#define SBB_DATA                       (REGISTERS_BASE + 0x55D4)
-#define SBB_CTL                        (REGISTERS_BASE + 0x55D8)
-
-/* Radio Control Interface registers*/
-#define RCI_CTL                        (REGISTERS_BASE + 0x55DC)
-#define RCI_DATA                       (REGISTERS_BASE + 0x55E0)
-#define RCI_CFG1                       (REGISTERS_BASE + 0x55E4)
-#define RCI_CFG2                       (REGISTERS_BASE + 0x55E8)
-#define RCI_CFG3                       (REGISTERS_BASE + 0x55EC)
-
-#define TNET1150_LAST_REG_ADDR			PCI_CONTROL
-
-#define ECPU_CONTROL_HALT			   0x00000101				
-
-/*0x03bc00 address is 1KB from end of FW RAM in 125x chip*/
-#define FW_STATIC_NVS_TRAGET_ADDRESS   0x03bc00
-
-/* Command mail box address */
-#define CMD_MBOX_ADDRESS               0x407B4
-
-/* Top Register */
-#define INDIRECT_REG1                  (REGISTERS_BASE + 0x9B0)
-#define OCP_POR_CTR                    (REGISTERS_BASE + 0x9B4)
-#define OCP_POR_WDATA                  (REGISTERS_BASE + 0x9B8)
-#define OCP_DATA_RD                    (REGISTERS_BASE + 0x9BC)
-#define OCP_CMD                        (REGISTERS_BASE + 0x9C0)
-#define FUNC7_SEL                      0xC8C
-#define FUNC7_PULL                     0xCB0
-#define FN0_CCCR_REG_32                0x64  
-
-#define PLL_PARAMETERS_CLK_VAL_19_2M   0x01			
-#define PLL_PARAMETERS_CLK_VAL_26M     0x02				
-#define PLL_PARAMETERS_CLK_VAL_38_4M   0x03				
-#define PLL_PARAMETERS_CLK_VAL_52M     0x04				
-
-#define WU_COUNTER_PAUSE_VAL           0x3FF
-
-/* Base band clocker register */
-#define WELP_ARM_COMMAND_VAL           0x4
-
-/* Command mail box address */
-#define CMD_MBOX_ADDRESS               0x407B4
-
-#endif
diff --git a/wl1271/TWD/TWDriver/TWDriver.c b/wl1271/TWD/TWDriver/TWDriver.c
deleted file mode 100644
index eebfcee..0000000
--- a/wl1271/TWD/TWDriver/TWDriver.c
+++ /dev/null
@@ -1,1808 +0,0 @@
-/*
- * TWDriver.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  TWDriver.c 
- *  \brief TI WLAN Hardware Access Driver
- *
- *  \see   TWDriver.h 
- */
-
-#define __FILE_ID__  FILE_ID_117
-#include "report.h"
-#include "TWDriver.h"
-#include "MacServices_api.h"
-#include "txCtrlBlk_api.h"
-#include "txHwQueue_api.h"
-#include "txXfer_api.h"
-#include "txResult_api.h"
-#include "rxXfer_api.h"
-#include "TwIf.h"
-#include "FwEvent_api.h"
-#include "CmdMBox_api.h"
-#include "CmdQueue_api.h"
-#include "eventMbox_api.h"
-#include "fwDebug_api.h"
-#include "osApi.h"
-#include "TWDriverInternal.h"
-#include "HwInit_api.h"
-#include "CmdBld.h"
-#include "RxQueue_api.h"
-
-
-
-#define TWD_CB_MODULE_OWNER_MASK    0xff00
-#define TWD_CB_TYPE_MASK            0x00ff
-
-
-
-
-TI_HANDLE TWD_Create (TI_HANDLE hOs)
-{
-    TTwd *pTWD;
-
-    /* Allocate the TNETW_Driver module */
-    pTWD = (TTwd *)os_memoryAlloc (hOs, sizeof(TTwd));
-    if (pTWD == NULL)
-    {
-        return NULL;
-    }
-
-    os_memoryZero (hOs, pTWD, sizeof(TTwd));
-
-    pTWD->hOs = hOs;
-
-    /* Create TwIf module */
-    pTWD->hTwIf = twIf_Create (hOs);
-    if (pTWD->hTwIf == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE,"twIf_Create failed\n");
-        WLAN_OS_REPORT(("twIf_Create failed\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-    /* Create command builder module */
-    pTWD->hCmdBld = cmdBld_Create (hOs);
-    if (pTWD->hCmdBld == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE,"cmdBld_Create failed\n");
-        WLAN_OS_REPORT(("cmdBld_Create failed\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-    /* Create the MAC Services module */
-    pTWD->hMacServices = MacServices_create (hOs);
-    if (pTWD->hMacServices == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE, "TWD MacServices_create failed!!!\n");
-        WLAN_OS_REPORT(("TWD MacServices_create failed!!!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-    /* Create the Ctrl module */
-    pTWD->hCmdQueue = cmdQueue_Create (hOs);
-    if (pTWD->hCmdQueue == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE, "TWD cmdQueue_Create failed!!!\n");
-        WLAN_OS_REPORT(("TWD cmdQueue_Create failed!!!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-    /* 
-     * Create the FW-Transfer modules:
-     */
-
-    pTWD->hTxXfer = txXfer_Create (hOs);
-    if (pTWD->hTxXfer == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE,"TWD txXfer_Create failed!!!\n");
-        WLAN_OS_REPORT(("TWD txXfer_Create failed!!!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-    pTWD->hTxResult = txResult_Create (hOs);
-    if (pTWD->hTxResult == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE,"TWD txResult_Create failed!!!\n");
-        WLAN_OS_REPORT(("TWD txResult_Create failed!!!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-    pTWD->hRxXfer = rxXfer_Create (hOs);
-    if (pTWD->hRxXfer == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE,"TWD rxXfer_Create failed!!!\n");
-        WLAN_OS_REPORT(("TWD rxXfer_Create failed!!!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-    pTWD->hFwEvent = fwEvent_Create (hOs);
-    if (pTWD->hFwEvent == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE, "TWD fwEvent_Create failed!!!\n");
-        WLAN_OS_REPORT(("TWD fwEvent_Create failed!!!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-    pTWD->hEventMbox = eventMbox_Create (hOs);
-    if (pTWD->hEventMbox == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE, "TWD eventMbox_Create failed!!!\n");
-        WLAN_OS_REPORT(("TWD eventMbox_Create failed!!!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-#ifdef TI_DBG
-    pTWD->hFwDbg = fwDbg_Create (hOs);
-    if (pTWD->hFwDbg == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE,"TWD fwDbg_Create failed!!!\n");
-        WLAN_OS_REPORT(("TWD fwDbg_Create failed!!!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-#endif /* TI_DBG */
-
-    pTWD->hCmdMbox = cmdMbox_Create (hOs);
-    if (pTWD->hCmdMbox == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE,"TWD cmdMbox_Create failed!!!\n");
-        WLAN_OS_REPORT(("TWD cmdMbox_Create failed!!!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-    pTWD->hRxQueue = RxQueue_Create (hOs);
-    if (pTWD->hRxQueue == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE, "TWD RxQueue_Create failed!!!\n");
-        WLAN_OS_REPORT(("TWD RxQueue_Create failed!!!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-
-    /* 
-     * Create the Data-Services modules:
-     */
-
-    pTWD->hTxCtrlBlk = txCtrlBlk_Create (hOs);
-    if (pTWD->hTxCtrlBlk == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE, "TWD txCtrlBlk_Create failed!!!\n");
-        WLAN_OS_REPORT(("TWD txCtrlBlk_Create failed!!!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-    pTWD->hTxHwQueue = txHwQueue_Create (hOs);
-    if (pTWD->hTxHwQueue == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE, "TWD txHwQueue_Create failed!!!\n");
-        WLAN_OS_REPORT(("TWD txHwQueue_Create failed!!!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-    pTWD->hHwInit = hwInit_Create (hOs);
-    if (pTWD->hHwInit == NULL)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_CONSOLE,"wInit_Create failed!\n"); 
-        WLAN_OS_REPORT (("wInit_Create failed!\n"));
-        TWD_Destroy ((TI_HANDLE)pTWD);
-        return NULL;
-    }
-
-    WLAN_INIT_REPORT (("TWD_Create: CREATED !!!\n"));
-
-    return (TI_HANDLE)pTWD;
-}
-
-TI_STATUS TWD_Destroy (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-    
-    WLAN_INIT_REPORT(("TWD_Destroy: called\n"));
-    if (pTWD == NULL) 
-    {
-        return TI_NOK;
-    }
-
-    if (pTWD->hTwIf != NULL)
-    {
-        twIf_Destroy (pTWD->hTwIf);
-        pTWD->hTwIf = NULL;
-    }
-
-    /* Free the Command Builder */
-    if (pTWD->hCmdBld != NULL)
-    {
-        cmdBld_Destroy (pTWD->hCmdBld);
-        pTWD->hCmdBld = NULL;
-    }
-    WLAN_INIT_REPORT(("TWD_Destroy: Command Builder released\n"));
-    
-    /* Free the MAC Services */
-    if (pTWD->hMacServices != NULL)
-    {
-        MacServices_destroy(pTWD->hMacServices);
-        pTWD->hMacServices = NULL;
-    }
-    WLAN_INIT_REPORT(("TWD_Destroy: Mac Services released\n"));
-    
-    /*
-     * Free the Ctrl modules
-     */
-    if (pTWD->hCmdQueue != NULL)
-    {
-        cmdQueue_Destroy(pTWD->hCmdQueue);
-        pTWD->hCmdQueue = NULL;
-    }
-
-    /* 
-     * Free the FW-Transfer modules:
-     */
-    if (pTWD->hTxXfer != NULL)
-    {
-        txXfer_Destroy (pTWD->hTxXfer);
-        pTWD->hTxXfer = NULL;
-    }
-
-    if (pTWD->hTxResult != NULL)
-    {
-        txResult_Destroy (pTWD->hTxResult);
-        pTWD->hTxResult = NULL;
-    }
-
-    if (pTWD->hRxXfer != NULL)
-    {
-        rxXfer_Destroy (pTWD->hRxXfer);
-        pTWD->hRxXfer = NULL;
-    }
-
-    if (pTWD->hEventMbox != NULL) 
-    {
-        eventMbox_Destroy (pTWD->hEventMbox);
-        pTWD->hEventMbox = NULL;
-    }
-
-#ifdef TI_DBG
-    if (pTWD->hFwDbg != NULL)
-    {
-        fwDbg_Destroy (pTWD->hFwDbg);
-        pTWD->hFwDbg = NULL;
-    }
-#endif /* TI_DBG */
-
-    if (pTWD->hFwEvent != NULL)
-    {
-        fwEvent_Destroy (pTWD->hFwEvent);
-        pTWD->hFwEvent = NULL;
-    }
-
-    if (pTWD->hCmdMbox != NULL)
-    {
-        cmdMbox_Destroy (pTWD->hCmdMbox);
-        pTWD->hCmdMbox = NULL;
-    }
-
-    if (pTWD->hRxQueue != NULL)
-    {
-        RxQueue_Destroy (pTWD->hRxQueue);
-		pTWD->hRxQueue = NULL;
-    }
-
-    /* 
-     * Free the Data-Services modules:
-     */
-
-    if (pTWD->hTxCtrlBlk != NULL)
-    {
-        txCtrlBlk_Destroy (pTWD->hTxCtrlBlk);
-        pTWD->hTxCtrlBlk = NULL;
-    }
-
-    if (pTWD->hTxHwQueue != NULL)
-    {
-        txHwQueue_Destroy (pTWD->hTxHwQueue);
-        pTWD->hTxHwQueue = NULL;
-    }
-    
-    if (pTWD->hHwInit != NULL)
-    {
-        hwInit_Destroy (pTWD->hHwInit);
-        pTWD->hHwInit = NULL;
-    }
-
-    os_memoryFree (pTWD->hOs, (TI_HANDLE)pTWD, sizeof(TTwd));
-    
-    WLAN_INIT_REPORT(("TWD_Destroy pTNETW_Driver released!!!\n"));
-    
-    return TI_OK;
-}
-
-
-/**
- * \brief HW Init Callback
- * 
- * \param  hTWD         - TWD module object handle
- * \return void 
- * 
- * \par Description
- * Static CB function
- * Called during TWD Module Init by hwInit_Init in order to complete the HW Configuration init
- * 
- * \sa     TWD_InitHw
- */ 
-static void TWD_InitHwCb (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_InitHwCb: call fInitHwCb CB. In std drvMain_InitHwCb()\n");
-
-    hwInit_InitPolarity(pTWD->hHwInit);
-   
-}
-
-void TWD_Init (TI_HANDLE    hTWD, 
-			   TI_HANDLE 	hReport, 
-               TI_HANDLE 	hUser, 
-			   TI_HANDLE 	hTimer, 
-			   TI_HANDLE 	hContext, 
-			   TI_HANDLE 	hTxnQ, 
-               TTwdCallback fInitHwCb, 
-               TTwdCallback fInitFwCb, 
-               TTwdCallback fConfigFwCb,
-			   TTwdCallback	fStopCb,
-			   TTwdCallback fInitFailCb)
-{ 
-    TTwd *pTWD 				= (TTwd *)hTWD;
-    pTWD->bInitSuccess 		= TI_FALSE;
-    pTWD->bRecoveryEnabled 	= TI_FALSE;
-    pTWD->hReport           = hReport;
-    pTWD->hUser 			= hUser;
-    pTWD->hTimer            = hTimer;
-    pTWD->hContext          = hContext;
-    pTWD->hTxnQ             = hTxnQ;
-    pTWD->fInitHwCb 		= fInitHwCb;
-    pTWD->fInitFwCb 		= fInitFwCb;
-    pTWD->fConfigFwCb 		= fConfigFwCb;
-    pTWD->fStopCb 			= fStopCb;
-    pTWD->fInitFailCb       = fInitFailCb;
-
-    TRACE1(pTWD->hReport, REPORT_SEVERITY_INIT , "TWD_Init: %x\n", hTWD);
-
-    /* FwEvent should be configured first */
-    fwEvent_Init (pTWD->hFwEvent, hTWD);
-
-    eventMbox_Config (pTWD->hEventMbox, pTWD->hTwIf, pTWD->hReport, pTWD->hFwEvent, pTWD->hCmdBld);
-
-    cmdQueue_Init (pTWD->hCmdQueue, 
-                     pTWD->hCmdMbox, 
-                     pTWD->hReport, 
-                     pTWD->hTwIf,
-                     pTWD->hTimer);
-
-    /* Configure Command Builder */ 
-    cmdBld_Config (pTWD->hCmdBld, 
-                   pTWD->hReport, 
-                   (void *)TWD_FinalizeDownload, 
-                   hTWD, 
-                   pTWD->hEventMbox, 
-                   pTWD->hCmdQueue,
-                   pTWD->hTwIf);
-
-    hwInit_Init (pTWD->hHwInit,
-                 pTWD->hReport, 
-                 pTWD->hTimer, 
-                 hTWD, 
-	             hTWD, 
-		         (TFinalizeCb)TWD_FinalizeDownload, 
-                 TWD_InitHwCb);
-
-    /*
-     * Initialize the FW-Transfer modules
-     */
-    txXfer_Init (pTWD->hTxXfer, pTWD->hReport, pTWD->hTwIf);
-
-    txResult_Init (pTWD->hTxResult, pTWD->hReport, pTWD->hTwIf);
-
-    rxXfer_Init (pTWD->hRxXfer, pTWD->hFwEvent, pTWD->hReport, pTWD->hTwIf, pTWD->hRxQueue);
-
-    RxQueue_Init (pTWD->hRxQueue, pTWD->hReport, pTWD->hTimer);
-
-#ifdef TI_DBG
-    fwDbg_Init (pTWD->hFwDbg, pTWD->hReport, pTWD->hTwIf);
-#endif /* TI_DBG */
-
-    /* Initialize the MAC Services */
-    MacServices_init (pTWD->hMacServices, 
-                      pTWD->hReport, 
-                      hTWD, 
-                      pTWD->hCmdBld, 
-                      pTWD->hEventMbox,
-                      pTWD->hTimer);
-
-    /*
-     * Initialize the Data-Services modules
-     */
-    txCtrlBlk_Init (pTWD->hTxCtrlBlk, pTWD->hReport, pTWD->hContext);
-    txHwQueue_Init (pTWD->hTxHwQueue, pTWD->hReport);
-
-    /* Initialize the TwIf module */
-    twIf_Init (pTWD->hTwIf, 
-               pTWD->hReport, 
-               pTWD->hContext, 
-               pTWD->hTimer, 
-               pTWD->hTxnQ, 
-               (TRecoveryCb)TWD_StopComplete, 
-               hTWD);
-}
-
- TI_STATUS TWD_InitHw (TI_HANDLE hTWD, 
-					   TI_UINT8  *pbuf, 
-					   TI_UINT32 length,
-                       TI_UINT32 uRxDmaBufLen,
-                       TI_UINT32 uTxDmaBufLen)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-    TI_STATUS eStatus;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INIT , "TWD_InitHw: called\n");
-
-    /* Provide bus related parameters to Xfer modules before any usage of the bus! */
-    rxXfer_SetBusParams (pTWD->hRxXfer, uRxDmaBufLen);
-    txXfer_SetBusParams (pTWD->hTxXfer, uTxDmaBufLen);
-
-    hwInit_SetNvsImage (pTWD->hHwInit, pbuf, length);
-
-    /* 
-     * Update the TwIf that the HW is awake 
-     * This will protect the initialization process from going to sleep
-     * After the firmware initializations completed (TWD_EnableExternalEvents), the sleep will be enabled 
-     */
-    twIf_Awake (pTWD->hTwIf);
-    twIf_HwAvailable (pTWD->hTwIf);
-
-    /* This initiates the HW init sequence */
-    eStatus = hwInit_Boot(pTWD->hHwInit);
-    if (eStatus == TXN_STATUS_ERROR)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_ERROR , "TWD_InitHw: hwInit_Boot failed\n");
-        return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-TI_STATUS TWD_BusOpen (TI_HANDLE hTWD, void* pParams)
-{
-	TTwd *pTWD = (TTwd *)hTWD;
-	TI_STATUS uStatus;
-	
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INIT , "TWD_BusOpen: called\n");
-
-    /*uStatus = TNETWIF_Open(pTWD->hTNETWIF, pParams);*/
-    uStatus = TI_OK;
-
-	return uStatus;	
-}
-
-TI_STATUS TWD_BusClose (TI_HANDLE hTWD)
-{
-	TTwd *pTWD = (TTwd *)hTWD;
-	TI_STATUS uStatus;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_BusClose: called\n");
-
-	/*uStatus = TNETWIF_Close(pTWD->hTNETWIF);*/
-    uStatus = TI_OK;
-
-	return uStatus;	
-}
-
-TI_STATUS TWD_InitFw (TI_HANDLE hTWD, TFileInfo *pFileInfo)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-    TI_STATUS status;
-
-    /* check Parameters */
-    if (( pTWD == NULL ) || ( pFileInfo == NULL ))
-    {
-        return (TI_NOK);
-    }
-
-	TRACE0(pTWD->hReport, REPORT_SEVERITY_INIT , "TWD_InitFw: called\n");
-
-    hwInit_SetFwImage (pTWD->hHwInit, pFileInfo);
-    
-    /* This will initiate the download to the FW */
-    status = hwInit_LoadFw(pTWD->hHwInit);
-
-    if (status == TXN_STATUS_ERROR)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_ERROR , "TWD_InitFw: failed to initialize FW\n");
-
-        return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-/**
- * \brief  Propagate interrogate results
- * 
- * \param  hTWD         - TWD module object handle
- * \param  status       - callback status
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Static CB function
- * Propagate interrogate results between TX and RX modules
- * Called by TWD_ConfigFw
- * 
- * \sa
- */ 
-static TI_STATUS TWD_ConfigFwCb (TI_HANDLE hTWD, TI_STATUS status)
-{
-    TTwd        *pTWD = (TTwd *)hTWD;
-    TDmaParams  *pDmaParams = &DB_DMA(pTWD->hCmdBld);
-
-    /* 
-     * Store the addresses of the cyclic buffer (Rx/Tx) 
-     * and the path status and control (Tx/Rx) in the corresponding modules
-     */
-    txResult_setHwInfo (pTWD->hTxResult, pDmaParams);
-
-    rxXfer_Restart (pTWD->hRxXfer);
-    txXfer_Restart (pTWD->hTxXfer);
-
-    rxXfer_SetRxDirectAccessParams (pTWD->hRxXfer, pDmaParams);
-
-    /* Provide number of HW Tx-blocks and descriptors to Tx-HW-Queue module */
-    txHwQueue_SetHwInfo (pTWD->hTxHwQueue, pDmaParams);
-
-    /* If the configure complete function was registered, we call it here - end of TWD_Configure stage */
-    if (pTWD->fConfigFwCb) 
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_ConfigFwCb: call TWD_OWNER_SELF_CONFIG CB. In std drvMain_ConfigFwCb()\n");
-
-        pTWD->fConfigFwCb (pTWD->hUser, TI_OK);
-    }   
-
-    return TI_OK;
-}
-
-
-TI_STATUS TWD_SetDefaults (TI_HANDLE hTWD, TTwdInitParams *pInitParams)
-{
-    TTwd         *pTWD = (TTwd *)hTWD;
-
-    TWlanParams         		*pWlanParams = &DB_WLAN(pTWD->hCmdBld);
-    TKeepAliveList      		*pKlvParams = &DB_KLV(pTWD->hCmdBld);
-    IniFileRadioParam   		*pRadioParams = &DB_RADIO(pTWD->hCmdBld);
-	IniFileExtendedRadioParam   *pExtRadioParams = &DB_EXT_RADIO(pTWD->hCmdBld);
-    IniFileGeneralParam 		*pGenParams = &DB_GEN(pTWD->hCmdBld);
-	TRateMngParams      		*pRateMngParams = &DB_RM(pTWD->hCmdBld);
-    TDmaParams          		*pDmaParams = &DB_DMA(pTWD->hCmdBld);
-
-    TI_UINT32            k, uIndex;
-    int iParam;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INIT , "TWD_SetDefaults: called\n");
-
-    pTWD->bRecoveryEnabled = pInitParams->tGeneral.halCtrlRecoveryEnable;
-
-    pWlanParams->PacketDetectionThreshold   = pInitParams->tGeneral.packetDetectionThreshold;
-    pWlanParams->qosNullDataTemplateSize    = pInitParams->tGeneral.qosNullDataTemplateSize;
-    pWlanParams->PsPollTemplateSize         = pInitParams->tGeneral.PsPollTemplateSize;
-    pWlanParams->probeResponseTemplateSize  = pInitParams->tGeneral.probeResponseTemplateSize;
-    pWlanParams->probeRequestTemplateSize   = pInitParams->tGeneral.probeRequestTemplateSize;
-    pWlanParams->beaconTemplateSize         = pInitParams->tGeneral.beaconTemplateSize;
-    pWlanParams->nullTemplateSize           = pInitParams->tGeneral.nullTemplateSize;
-    pWlanParams->disconnTemplateSize        = pInitParams->tGeneral.disconnTemplateSize;
-    pWlanParams->ArpRspTemplateSize         = pInitParams->tGeneral.ArpRspTemplateSize;
-
-    /* Beacon broadcast options */
-    pWlanParams->BcnBrcOptions.BeaconRxTimeout      = pInitParams->tGeneral.BeaconRxTimeout;
-    pWlanParams->BcnBrcOptions.BroadcastRxTimeout   = pInitParams->tGeneral.BroadcastRxTimeout;
-    pWlanParams->BcnBrcOptions.RxBroadcastInPs      = pInitParams->tGeneral.RxBroadcastInPs;
-    pWlanParams->ConsecutivePsPollDeliveryFailureThreshold = pInitParams->tGeneral.ConsecutivePsPollDeliveryFailureThreshold;
-    
-    pWlanParams->RxDisableBroadcast         = pInitParams->tGeneral.halCtrlRxDisableBroadcast;
-    pWlanParams->calibrationChannel2_4      = pInitParams->tGeneral.halCtrlCalibrationChannel2_4;
-    pWlanParams->calibrationChannel5_0      = pInitParams->tGeneral.halCtrlCalibrationChannel5_0;
-    
-    /* Not used but need by Palau */
-    pWlanParams->RtsThreshold               = pInitParams->tGeneral.halCtrlRtsThreshold;
-    pWlanParams->CtsToSelf                  = CTS_TO_SELF_DISABLE; 
-    
-    pWlanParams->WiFiWmmPS                  = pInitParams->tGeneral.WiFiWmmPS;
-    
-    pWlanParams->MaxTxMsduLifetime          = pInitParams->tGeneral.halCtrlMaxTxMsduLifetime;  
-    pWlanParams->MaxRxMsduLifetime          = pInitParams->tGeneral.halCtrlMaxRxMsduLifetime;  
-    
-    pWlanParams->rxTimeOut.psPoll           = pInitParams->tGeneral.rxTimeOut.psPoll;  
-    pWlanParams->rxTimeOut.UPSD             = pInitParams->tGeneral.rxTimeOut.UPSD;  
-    
-    /* RSSI/SNR Weights for Average calculations */
-    pWlanParams->tRssiSnrWeights.rssiBeaconAverageWeight = pInitParams->tGeneral.uRssiBeaconAverageWeight;
-    pWlanParams->tRssiSnrWeights.rssiPacketAverageWeight = pInitParams->tGeneral.uRssiPacketAverageWeight;
-    pWlanParams->tRssiSnrWeights.snrBeaconAverageWeight  = pInitParams->tGeneral.uSnrBeaconAverageWeight ;
-    pWlanParams->tRssiSnrWeights.snrPacketAverageWeight  = pInitParams->tGeneral.uSnrPacketAverageWeight ;
-    
-    /* PM config params */
-    pWlanParams->uHostClkSettlingTime       = pInitParams->tGeneral.uHostClkSettlingTime;
-    pWlanParams->uHostFastWakeupSupport     = pInitParams->tGeneral.uHostFastWakeupSupport;
-    
-    /* No used */
-    pWlanParams->FragmentThreshold          = pInitParams->tGeneral.halCtrlFragThreshold;
-    pWlanParams->ListenInterval             = (TI_UINT8)pInitParams->tGeneral.halCtrlListenInterval;
-    pWlanParams->RateFallback               = pInitParams->tGeneral.halCtrlRateFallbackRetry;        
-    pWlanParams->MacClock                   = pInitParams->tGeneral.halCtrlMacClock;     
-    pWlanParams->ArmClock                   = pInitParams->tGeneral.halCtrlArmClock;
-
-	pWlanParams->ch14TelecCca = pInitParams->tGeneral.halCtrlCh14TelecCca;
-
-    /* Data interrupts pacing */
-    pWlanParams->TxCompletePacingThreshold  = pInitParams->tGeneral.TxCompletePacingThreshold; 
-    pWlanParams->TxCompletePacingTimeout    = pInitParams->tGeneral.TxCompletePacingTimeout;  
-    pWlanParams->RxIntrPacingThreshold      = pInitParams->tGeneral.RxIntrPacingThreshold;     
-    pWlanParams->RxIntrPacingTimeout        = pInitParams->tGeneral.RxIntrPacingTimeout;      
-
-    /* Number of Rx mem-blocks to allocate in FW */
-    pDmaParams->NumRxBlocks                 = pInitParams->tGeneral.uRxMemBlksNum;
-
-
-    /* Configure ARP IP */
-    pWlanParams->arpFilterType    = pInitParams->tArpIpFilter.filterType;
-    IP_COPY (pWlanParams->arp_IP_addr, pInitParams->tArpIpFilter.addr);
-    
-    /* Configure address group */
-    pWlanParams->numGroupAddrs = pInitParams->tMacAddrFilter.numOfMacAddresses;
-    pWlanParams->isMacAddrFilteringnabled = pInitParams->tMacAddrFilter.isFilterEnabled;
-    
-    for (k = 0; k < pWlanParams->numGroupAddrs; k++)
-    {
-        MAC_COPY (pWlanParams->aGroupAddr[k], pInitParams->tMacAddrFilter.macAddrTable[k]); 
-    }
-
-  
-    /* CoexActivity Table */
-    TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_SetDefaults: coex numOfElements %d\n", pInitParams->tGeneral.halCoexActivityTable.numOfElements);
-
-    pWlanParams->tWlanParamsCoexActivityTable.numOfElements = 0;
-    for (iParam=0; iParam < (int)pInitParams->tGeneral.halCoexActivityTable.numOfElements; iParam++)
-    {
-        TCoexActivity *pSaveCoex = &pWlanParams->tWlanParamsCoexActivityTable.entry[0];
-        TCoexActivity *pParmCoex = &pInitParams->tGeneral.halCoexActivityTable.entry[0];
-        int i, saveIndex;
-
-        /* Check if to overwrite existing entry or put on last index */
-        for (i=0; i<iParam; i++)
-        {
-            if ((pSaveCoex[i].activityId == pParmCoex[iParam].activityId) && (pSaveCoex[i].coexIp == pParmCoex[iParam].coexIp))
-            {
-                break;
-            }
-        }
-
-        if (i == iParam)
-        {
-            /* new entry */
-            saveIndex = pWlanParams->tWlanParamsCoexActivityTable.numOfElements;
-            pWlanParams->tWlanParamsCoexActivityTable.numOfElements++; 
-        }
-        else
-        {
-            /* overwrite existing */
-            saveIndex = i;
-        }
-
-        TRACE4(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_SetDefaults: save coex Param %d in index %d, %d %d\n", iParam, saveIndex, pParmCoex[iParam].coexIp, pParmCoex[iParam].activityId);
-
-        pSaveCoex[saveIndex].coexIp          = pParmCoex[iParam].coexIp;
-        pSaveCoex[saveIndex].activityId      = pParmCoex[iParam].activityId;
-        pSaveCoex[saveIndex].defaultPriority = pParmCoex[iParam].defaultPriority;
-        pSaveCoex[saveIndex].raisedPriority  = pParmCoex[iParam].raisedPriority;
-        pSaveCoex[saveIndex].minService      = pParmCoex[iParam].minService;
-        pSaveCoex[saveIndex].maxService      = pParmCoex[iParam].maxService;
-    }
-
-    /* configure keep-alive default mode to enabled */
-    pKlvParams->enaDisFlag = TI_TRUE;
-    for (uIndex = 0; uIndex < KLV_MAX_TMPL_NUM; uIndex++)
-    {
-        pKlvParams->keepAliveParams[ uIndex ].enaDisFlag = TI_FALSE;
-    }
-
-    /* Configure the TWD modules */
-    rxXfer_SetDefaults (pTWD->hRxXfer, pInitParams);
-    txXfer_SetDefaults (pTWD->hTxXfer, pInitParams);
-    txHwQueue_Config (pTWD->hTxHwQueue, pInitParams);
-    MacServices_config (pTWD->hMacServices, pInitParams);   
-
-    /* 
-     * 802.11n
-     */
-    pWlanParams->tTwdHtCapabilities.b11nEnable =            pInitParams->tGeneral.b11nEnable;
-    
-    /* Configure HT capabilities setting */
-    pWlanParams->tTwdHtCapabilities.uChannelWidth = CHANNEL_WIDTH_20MHZ;                  
-    pWlanParams->tTwdHtCapabilities.uRxSTBC       = RXSTBC_NOT_SUPPORTED;
-    pWlanParams->tTwdHtCapabilities.uMaxAMSDU     = MAX_MSDU_3839_OCTETS;                         
-    pWlanParams->tTwdHtCapabilities.uMaxAMPDU     = pInitParams->tGeneral.uMaxAMPDU;
-
-    pWlanParams->tTwdHtCapabilities.uAMPDUSpacing =         AMPDU_SPC_8_MICROSECONDS;
-    pWlanParams->tTwdHtCapabilities.aRxMCS[0] =             (MCS_SUPPORT_MCS_0 |
-                                                             MCS_SUPPORT_MCS_1 |
-                                                             MCS_SUPPORT_MCS_2 |
-                                                             MCS_SUPPORT_MCS_3 |
-                                                             MCS_SUPPORT_MCS_4 |
-                                                             MCS_SUPPORT_MCS_5 |
-                                                             MCS_SUPPORT_MCS_6 |
-                                                             MCS_SUPPORT_MCS_7);
-    os_memoryZero (pTWD->hOs, pWlanParams->tTwdHtCapabilities.aRxMCS + 1, RX_TX_MCS_BITMASK_SIZE - 1);
-    pWlanParams->tTwdHtCapabilities.aTxMCS[0]  =             (MCS_SUPPORT_MCS_0 |
-                                                              MCS_SUPPORT_MCS_1 |
-                                                              MCS_SUPPORT_MCS_2 |
-                                                              MCS_SUPPORT_MCS_3 |
-                                                              MCS_SUPPORT_MCS_4 |
-                                                              MCS_SUPPORT_MCS_5 |
-                                                              MCS_SUPPORT_MCS_6 |
-                                                              MCS_SUPPORT_MCS_7);
-    os_memoryZero (pTWD->hOs, pWlanParams->tTwdHtCapabilities.aTxMCS + 1, RX_TX_MCS_BITMASK_SIZE - 1);
-    pWlanParams->tTwdHtCapabilities.uRxMaxDataRate =         MCS_HIGHEST_SUPPORTED_RECEPTION_DATA_RATE_IN_MBIT_S;          
-    pWlanParams->tTwdHtCapabilities.uPCOTransTime =          PCO_TRANS_TIME_NO_TRANSITION;
-    pWlanParams->tTwdHtCapabilities.uHTCapabilitiesBitMask = (CAP_BIT_MASK_GREENFIELD_FRAME_FORMAT |
-                                                              CAP_BIT_MASK_SHORT_GI_FOR_20MHZ_PACKETS);
-    pWlanParams->tTwdHtCapabilities.uMCSFeedback =           MCS_FEEDBACK_NO; 
-
-    os_memoryCopy(pTWD->hOs, (void*)pRadioParams, (void*)&pInitParams->tIniFileRadioParams, sizeof(IniFileRadioParam));
-	os_memoryCopy(pTWD->hOs, (void*)pExtRadioParams, (void*)&pInitParams->tIniFileExtRadioParams, sizeof(IniFileExtendedRadioParam));
-    os_memoryCopy(pTWD->hOs, (void*)pGenParams, (void*)&pInitParams->tPlatformGenParams, sizeof(IniFileGeneralParam));
-    
-    os_memoryCopy (pTWD->hOs,
-                   (void*)&(pWlanParams->tFmCoexParams),
-                   (void*)&(pInitParams->tGeneral.tFmCoexParams),
-                   sizeof(TFmCoexParams));
-
-	/* Rate management params */
-	pRateMngParams->rateMngParams.InverseCuriosityFactor = pInitParams->tRateMngParams.InverseCuriosityFactor;
-	pRateMngParams->rateMngParams.MaxPer = pInitParams->tRateMngParams.MaxPer;
-	pRateMngParams->rateMngParams.PerAdd = pInitParams->tRateMngParams.PerAdd;
-	pRateMngParams->rateMngParams.PerAddShift = pInitParams->tRateMngParams.PerAddShift;
-	pRateMngParams->rateMngParams.PerAlphaShift = pInitParams->tRateMngParams.PerAlphaShift;
-	pRateMngParams->rateMngParams.PerBeta1Shift = pInitParams->tRateMngParams.PerBeta1Shift;
-	pRateMngParams->rateMngParams.PerBeta2Shift = pInitParams->tRateMngParams.PerBeta2Shift;
-	pRateMngParams->rateMngParams.PerTh1 = pInitParams->tRateMngParams.PerTh1;
-	pRateMngParams->rateMngParams.PerTh2 = pInitParams->tRateMngParams.PerTh2;
-	pRateMngParams->rateMngParams.RateCheckDown = pInitParams->tRateMngParams.RateCheckDown;
-	pRateMngParams->rateMngParams.RateCheckUp = pInitParams->tRateMngParams.RateCheckUp;
-	pRateMngParams->rateMngParams.RateRetryScore = pInitParams->tRateMngParams.RateRetryScore;
-	pRateMngParams->rateMngParams.TxFailHighTh = pInitParams->tRateMngParams.TxFailHighTh;
-	pRateMngParams->rateMngParams.TxFailLowTh = pInitParams->tRateMngParams.TxFailLowTh;
-
-	/* RATE_MNG_MAX_RETRY_POLICY_PARAMS_LEN */
-	for (uIndex = 0; uIndex < 13; uIndex++)
-	{
-        pRateMngParams->rateMngParams.RateRetryPolicy[uIndex] = pInitParams->tRateMngParams.RateRetryPolicy[uIndex];
-	}
-
-	/* DCO Itrim params */
-    pWlanParams->dcoItrimEnabled = pInitParams->tDcoItrimParams.enable;
-    pWlanParams->dcoItrimModerationTimeoutUsec = pInitParams->tDcoItrimParams.moderationTimeoutUsec;
-
-    return TI_OK;
-}
-
-TI_STATUS TWD_ConfigFw (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INIT , "TWD_ConfigFw: called\n");
-
-    /*
-     * Configure the WLAN firmware after config all the hardware objects
-     */
-    if (cmdBld_ConfigFw (pTWD->hCmdBld, (void *)TWD_ConfigFwCb, hTWD) != TI_OK)
-    {
-        return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-void TWD_FinalizeDownload (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INIT , "TWD_FinalizeDownload: called\n");
-
-	if ( pTWD == NULL )
-	{
-		return;
-	}
-    /* Here at the end call the Initialize Complete callback that will release the user Init semaphore */
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INIT, "Before sending the Init Complet callback !!!!!\n");
-
-    /* Sign that init has succeeded */
-    pTWD->bInitSuccess = TI_TRUE;    
-
-    /* Call user application configuration callback */
-    if (pTWD->fInitFwCb)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_FinalizeDownload: call fInitFwCb CB. In std drvMain_InitFwCb()\n");
-
-        (*pTWD->fInitFwCb) (pTWD->hUser, TI_OK);
-    }
-}
-
-void TWD_FinalizeOnFailure (TI_HANDLE hTWD)
-{
-    TTwd  *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_FinalizeOnFailure: called\n");
-
-	/* Call the upper layer callback for init failure case */
-    if (pTWD->fInitFailCb) 
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_FinalizeOnFailure: call fInitFailCb CB. In std drvMain_InitFailCb()\n");
-
-        pTWD->fInitFailCb (pTWD->hUser, TI_OK);
-    }   
-}
-
-TI_STATUS TWD_CheckMailboxCb (TI_HANDLE hTWD, TI_UINT16 uMboxStatus, void *pItrParamBuf)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CheckMailboxCb: called\n");
-
-    if (uMboxStatus != TI_OK)
-    {
-        ++pTWD->uNumMboxFailures;
-        TRACE1(pTWD->hReport, REPORT_SEVERITY_WARNING, "TWD_CheckMailboxCb: Periodic intorregate check - Command mailbox failure was occur \n errors failure # %d", pTWD->uNumMboxFailures);
-
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CheckMailboxCb: call TWD_INT_EVENT_FAILURE CB. In std healthMonitor_sendFailureEvent()\n");
-
-        /* Indicating Upper Layer about Mbox Error */
-        pTWD->fFailureEventCb (pTWD->hFailureEventCb, MBOX_FAILURE);
-    }
-
-    return TI_OK;
-}
-#ifdef RS_OVER_TWD
-extern	void (*gBusTxn_ErrorCb)(TI_HANDLE , int);
-extern  void *gBusTxn_ErrorHndle;
-#endif
-
-/**
- * \brief Registers TWD Module Callbacks
- * 
- * \param  hTWD         - TWD module object handle
- * \param  uCallBackID  - Registered Callback ID
- * \param  fCb 	        - Pointer to Input Registered CB function
- * \param  hCb 	        - Handle to Input Registered CB parameters
- * \return void 
- * 
- * \par Description
- * Static CB function
- * This CB Registers TWD CB functions for future use:
- * CB which handles failure to the CMD Queue, MAC Service and TwIf
- * CB which handles Command Complete for the CMD Queue
- * Called by TWD_RegisterCb
- * 
- * \sa TWD_RegisterCb
- */ 
-static void TWD_RegisterOwnCb (TI_HANDLE hTWD, TI_UINT32 uCallBackID, void *fCb, TI_HANDLE hCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_RegisterOwnCB: callback ID=0x%x\n", uCallBackID);
-
-    switch (uCallBackID)
-    {
-    case TWD_INT_EVENT_FAILURE:
-        /* Save Health-Moitor callback */
-        pTWD->fFailureEventCb = (TFailureEventCb)fCb;
-        pTWD->hFailureEventCb = hCb;
-
-        /* Register For Error Of Mailbox in case of timeout */
-        cmdQueue_RegisterForErrorCb (pTWD->hCmdQueue, (void *)TWD_CheckMailboxCb, hTWD);
-
-        /* Forward the Health-Moitor callback to the MAC-Services modules */
-        MacServices_registerFailureEventCB(pTWD->hMacServices, fCb, hCb);
-
-        /* Forward the Health-Moitor callback to the TwIf for bus errors */
-        twIf_RegisterErrCb (pTWD->hTwIf, fCb, hCb);
-
-        /* Forward the Health-Moitor callback to the RxXfer for Rx packet errors */
-        rxXfer_RegisterErrCb (pTWD->hRxXfer, fCb, hCb);
-        break;
-
-    case TWD_INT_COMMAND_COMPLETE:
-        cmdQueue_RegisterCmdCompleteGenericCb (pTWD->hCmdQueue, fCb, hCb);
-        break;
-
-    default:
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_ERROR, "TWD_RegisterOwnCb - Illegal value\n");
-    }
-}
-
-TI_STATUS TWD_RegisterCb (TI_HANDLE hTWD, TI_UINT32 event, TTwdCB *fCb, void *pData)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-    TI_UINT32 uModuleId    = event & TWD_CB_MODULE_OWNER_MASK;
-    TI_UINT32 uCallbackId  = event & TWD_CB_TYPE_MASK;
-
-	if ((fCb == NULL) || (pData == NULL))
-	{
-TRACE0(pTWD->hReport, REPORT_SEVERITY_ERROR, "TWD_Register_CB: Invalid NULL Parameter\n");
-
-	}
-
-    TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_Register_CB: (Value = 0x%x)\n", event);
-
-   /* First detect which module is the owner */
-
-    switch (uModuleId)
-    {
-    case TWD_OWNER_TX_HW_QUEUE:
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_Register_CB: TWD_OWNER_TX_HW_QUEUE\n");
-        txHwQueue_RegisterCb (pTWD->hTxHwQueue, uCallbackId, fCb, pData);
-        break;
-
-    case TWD_OWNER_DRIVER_TX_XFER:
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_Register_CB: TWD_OWNER_DRIVER_TX_XFER\n");
-        txXfer_RegisterCb (pTWD->hTxXfer, uCallbackId, fCb, pData);
-        break;
-
-    case TWD_OWNER_TX_RESULT:
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_Register_CB: TWD_OWNER_TX_RESULT\n");
-        txResult_RegisterCb (pTWD->hTxResult, uCallbackId, fCb, pData);
-        break;
-
-    case TWD_OWNER_RX_XFER:
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_Register_CB: TWD_OWNER_RX_XFER\n");
-        rxXfer_Register_CB(pTWD->hRxXfer, uCallbackId, fCb, pData);
-        break;
-
-    case TWD_OWNER_RX_QUEUE:
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_Register_CB: TWD_OWNER_RX_QUEUE\n");
-        RxQueue_Register_CB(pTWD->hRxQueue, uCallbackId, fCb, pData);
-        break;
-
-    case TWD_OWNER_SELF:
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_Register_CB: TWD_OWNER_SELF\n");
-        TWD_RegisterOwnCb (hTWD, uCallbackId, fCb, pData);
-        break;
- 
-    case TWD_OWNER_MAC_SERVICES:
-        switch (uCallbackId)
-        {
-        case TWD_OWN_EVENT_SCAN_CMPLT:
-            MacServices_scanSRV_registerScanCompleteCB (pTWD->hMacServices, (TScanSrvCompleteCb)fCb, pData);
-            break;
-        default:
-            TRACE0(pTWD->hReport, REPORT_SEVERITY_ERROR, "TWD_Register_CB: TWD_OWNER_MAC_SERVICES - Illegal value\n");
-        }
-        break;
-
-    case TWD_OWNER_SELF_CONFIG:    
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_Register_CB: TWD_OWNER_SELF_CONFIG\n");
-        pTWD->fConfigFwCb  = (TTwdCallback)fCb;
-        break;
-
-    default:
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_ERROR, "TWD_Register_CB - Illegal value\n");
-    }
-
-    return TI_OK;
-}
-
-TI_STATUS TWD_ExitFromInitMode (TI_HANDLE hTWD)
-{
-    TTwd    *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_ExitFromInitMode: called\n");
-
-    /* Notify Event MailBox about init complete */
-    eventMbox_InitComplete (pTWD->hEventMbox);
-
-    /* Enable Mailbox */
-    cmdQueue_EnableMbox (pTWD->hCmdQueue);
-
-    return TI_OK; 
-}
-
-
-#ifdef TI_DBG
-TI_STATUS TWD_PrintTxInfo (TI_HANDLE hTWD, ETwdPrintInfoType ePrintInfo)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_PrintTxInfo: called\n");
-
-    switch (ePrintInfo) 
-    {
-        case TWD_PRINT_TX_CTRL_BLK_TBL:
-            txCtrlBlk_PrintTable (pTWD->hTxCtrlBlk);
-            break;
-
-        case TWD_PRINT_TX_HW_QUEUE_INFO:
-            txHwQueue_PrintInfo (pTWD->hTxHwQueue);
-            break;
-
-        case TWD_PRINT_TX_XFER_INFO:
-            txXfer_PrintStats (pTWD->hTxXfer);
-            break;
-
-        case TWD_PRINT_TX_RESULT_INFO:
-            txResult_PrintInfo (pTWD->hTxResult);
-            break;
-
-        case TWD_CLEAR_TX_RESULT_INFO:
-            txResult_ClearInfo (pTWD->hTxResult);
-            break;
-
-        case TWD_CLEAR_TX_XFER_INFO:
-            txXfer_ClearStats (pTWD->hTxXfer);
-            break;
-
-        default:
-            TRACE1(pTWD->hReport, REPORT_SEVERITY_ERROR, ": invalid print info request code: %d\n", ePrintInfo);
-    }
-
-    return TI_OK;
-}
-
-#endif /* TI_DBG */
-
-TI_STATUS TWD_InterruptRequest (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_InterruptRequest: called\n");
-
-    fwEvent_InterruptRequest (pTWD->hFwEvent);
-
-    return TI_OK;
-}
- 
-TI_STATUS TWD_RegisterEvent (TI_HANDLE hTWD, TI_UINT32 event, void *fCb, TI_HANDLE hCb)
-{
-    TTwd  *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_RegisterEvent: called\n");
-
-    return eventMbox_RegisterEvent (pTWD->hEventMbox, event, fCb, hCb);
-}
-
-TI_STATUS TWD_DisableEvent (TI_HANDLE hTWD, TI_UINT32 event)
-{
-    TTwd  *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_DisableEvent: called\n");
-
-    return eventMbox_MaskEvent (pTWD->hEventMbox, event, NULL, NULL);
-}
-
-TI_STATUS TWD_EnableEvent (TI_HANDLE hTWD, TI_UINT32 event)
-{
-    TTwd  *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_EnableEvent: called\n");
-
-    return eventMbox_UnMaskEvent (pTWD->hEventMbox, event, NULL, NULL);
-}
-
-void TWD_StopComplete (TI_HANDLE hTWD)
-{
-    TTwd  *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_StopComplete: called\n");
-
-
-    /* reinit last ELP mode flag in recovery */
-    cmdBld_Restart(pTWD->hCmdBld); 
-
-    /* Call upper layer callback */
-    if (pTWD->fStopCb) 
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_StopComplete: call fStopCb CB. In std drvMain_TwdStopCb()\n");
-
-        (*pTWD->fStopCb) (pTWD->hUser, TI_OK);
-    }
-}
-
-TI_STATUS TWD_Stop (TI_HANDLE hTWD)
-{
-    TTwd        *pTWD = (TTwd *)hTWD;
-    ETxnStatus   status;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_Stop: called\n");
-
-    fwEvent_Stop (pTWD->hFwEvent);
-
-   
-    /* close all BA sessions */
-    TWD_CloseAllBaSessions(hTWD);
-
-    cmdMbox_Restart (pTWD->hCmdMbox);
-    cmdQueue_Restart (pTWD->hCmdQueue);
-    cmdQueue_DisableMbox (pTWD->hCmdQueue);
-    eventMbox_Stop (pTWD->hEventMbox);
-    MacServices_restart (pTWD->hMacServices); 
-
-    status = twIf_Restart(pTWD->hTwIf);
-    
-    /* Call user stop callback */
-    if (status != TXN_STATUS_PENDING) 
-    {
-        TWD_StopComplete (hTWD);
-    }
-  
-    return TI_OK;
-}
-
-void TWD_EnableExternalEvents (TI_HANDLE hTWD)
-{
-    TTwd        *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_EnableExternalEvents: called\n");
-
-    /* 
-     * Enable sleep after all firmware initializations completed 
-     * The awake was in the TWD_initHw phase
-     */
-    twIf_Sleep (pTWD->hTwIf);
-
-    fwEvent_EnableExternalEvents (pTWD->hFwEvent);
-}
-
-TI_BOOL TWD_RecoveryEnabled (TI_HANDLE hTWD)
-{
-    TTwd  *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_RecoveryEnabled: called\n");
-
-    return pTWD->bRecoveryEnabled;
-}
-
-TI_UINT32 TWD_GetMaxNumberOfCommandsInQueue (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_GetMaxNumberOfCommandsInQueue: called\n");
-
-    return cmdQueue_GetMaxNumberOfCommands (pTWD->hCmdQueue);
-}
-
-TI_STATUS TWD_SetPsMode (TI_HANDLE                   hTWD,
-						 E80211PsMode ePsMode, 
-						 TI_BOOL bSendNullDataOnExit, 
-                         TI_HANDLE                   hPowerSaveCompleteCb,
-                         TPowerSaveCompleteCb        fPowerSaveCompleteCb,
-                         TPowerSaveResponseCb        fPowerSaveResponseCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_SetPsMode: called\n");
-
-    return MacServices_powerSrv_SetPsMode (pTWD->hMacServices,
-                                           ePsMode,
-                                           bSendNullDataOnExit,
-                                           hPowerSaveCompleteCb,
-                                           fPowerSaveCompleteCb,
-                                           fPowerSaveResponseCb);
-}
-
-TI_BOOL TWD_GetPsStatus (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_GetPsStatus: called\n");
-
-    return MacServices_powerSrv_getPsStatus (pTWD->hMacServices);
-}
-
-TI_STATUS TWD_SetNullRateModulation (TI_HANDLE hTWD, TI_UINT16 rate)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_SetRateModulation: called\n");
-
-    MacServices_powerSrv_SetRateModulation (pTWD->hMacServices, rate); 
-
-    return TI_OK;
-}
-
-void TWD_UpdateDtimTbtt (TI_HANDLE hTWD, TI_UINT8 uDtimPeriod, TI_UINT16 uBeaconInterval)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_UpdateDtimTbtt: called\n");
-
-    MacServices_scanSrv_UpdateDtimTbtt (pTWD->hMacServices, uDtimPeriod, uBeaconInterval); 
-}
-
-TI_STATUS TWD_StartMeasurement (TI_HANDLE                   hTWD, 
-                                TMeasurementRequest        *pMsrRequest,
-                                TI_UINT32                   uTimeToRequestExpiryMs,
-                                TCmdResponseCb              fResponseCb,
-                                TI_HANDLE                   hResponseCb,
-                                TMeasurementSrvCompleteCb   fCompleteCb,
-                                TI_HANDLE                   hCompleteCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_StartMeasurement: called\n");
-
-    return MacServices_measurementSRV_startMeasurement (pTWD->hMacServices, 
-                                                        pMsrRequest,
-                                                        uTimeToRequestExpiryMs,
-                                                        fResponseCb,
-                                                        hResponseCb,
-                                                        fCompleteCb,
-                                                        hCompleteCb);
-}
-
-TI_STATUS TWD_StopMeasurement (TI_HANDLE       	hTWD,
-                               TI_BOOL        	bSendNullData,
-                               TCmdResponseCb  	fResponseCb,
-                               TI_HANDLE       	hResponseCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_StopMeasurement: called\n");
-
-    return MacServices_measurementSRV_stopMeasurement (pTWD->hMacServices,
-                                                       bSendNullData,
-                                                       fResponseCb,
-                                                       hResponseCb);
-}
-
-TI_STATUS TWD_RegisterScanCompleteCb (TI_HANDLE            hTWD, 
-                                      TScanSrvCompleteCb   fScanCompleteCb, 
-                                      TI_HANDLE            hScanCompleteCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_RegisterScanCompleteCb: called\n");
-
-    MacServices_scanSRV_registerScanCompleteCB (pTWD->hMacServices, 
-                                                fScanCompleteCb, 
-                                                hScanCompleteCb);
-
-    return TI_OK;
-}
-
-#ifdef TI_DBG
-TI_STATUS TWD_PrintMacServDebugStatus (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_PrintMacServDebugStatus: called\n");
-
-    MacServices_scanSrv_printDebugStatus (pTWD->hMacServices);
-
-    return TI_OK;
-}
-#endif
-
-TI_STATUS TWD_Scan (TI_HANDLE       hTWD, 
-                    TScanParams    	*pScanParams,
-                    EScanResultTag 	eScanTag, 
-                    TI_BOOL        	bHighPriority,
-                    TI_BOOL        	bDriverMode, 
-                    TI_BOOL        	bScanOnDriverModeError, 
-                    E80211PsMode   	ePsRequest, 
-                    TI_BOOL        	bSendNullData,
-                    TCmdResponseCb 	fResponseCb, 
-                    TI_HANDLE      	hResponseCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_Scan: called\n");
-
-    return MacServices_scanSRV_scan (pTWD->hMacServices,
-                                     pScanParams,
-                                     eScanTag,
-                                     bHighPriority,
-                                     bDriverMode, 
-                                     bScanOnDriverModeError, 
-                                     ePsRequest, 
-                                     bSendNullData,
-                                     fResponseCb, 
-                                     hResponseCb);
-}
-
-TI_STATUS TWD_StopScan (TI_HANDLE       hTWD, 
-                        EScanResultTag  eScanTag,
-                        TI_BOOL         bSendNullData, 
-                        TCmdResponseCb  fScanCommandResponseCb, 
-                        TI_HANDLE       hCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_StopScan: called\n");
-
-    return MacServices_scanSRV_stopScan (pTWD->hMacServices,
-                                         eScanTag,
-                                         bSendNullData, 
-                                         fScanCommandResponseCb, 
-                                         hCb);
-}
-
-TI_STATUS TWD_StopScanOnFWReset (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_StopScanOnFWReset: called\n");
-
-    return MacServices_scanSRV_stopOnFWReset (pTWD->hMacServices);
-}
-
-TI_STATUS TWD_StartConnectionScan (TI_HANDLE              hTWD,
-                                 TPeriodicScanParams    *pPeriodicScanParams,
-                                 EScanResultTag         eScanTag,
-                                 TI_UINT32              uPassiveScanDfsDwellTimeMs,
-                                 TCmdResponseCb         fResponseCb, 
-                                 TI_HANDLE              hResponseCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_StartConnectionScan: called\n");
-
-    return cmdBld_StartPeriodicScan (pTWD->hCmdBld, pPeriodicScanParams, eScanTag, uPassiveScanDfsDwellTimeMs, 
-                                     (void*)fResponseCb, hResponseCb);
-}
-
-TI_STATUS TWD_StopPeriodicScan  (TI_HANDLE              hTWD,
-                                 EScanResultTag         eScanTag,
-                                 TCmdResponseCb         fResponseCb, 
-                                 TI_HANDLE              hResponseCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_StopPeriodicScan: called\n");
-
-    return cmdBld_StopPeriodicScan (pTWD->hCmdBld, eScanTag, (void*)fResponseCb, hResponseCb);
-}
-
-TI_STATUS TWD_readMem (TI_HANDLE hTWD, TFwDebugParams* pMemDebug, void* fCb, TI_HANDLE hCb)
-{
-    if (hTWD == NULL || pMemDebug == NULL)
-	{
-		return (TI_NOK);
-	}
-
-	TRACE0(((TTwd *)hTWD)->hReport, REPORT_SEVERITY_INFORMATION , "TWD_readMem: called\n");
-
-	if (fwDbg_ReadAddr(((TTwd *)hTWD)->hFwDbg,pMemDebug->addr,pMemDebug->length,pMemDebug->UBuf.buf8,(TFwDubCallback)fCb,hCb) == TI_NOK)
-	{
-        TRACE0(((TTwd *)hTWD)->hReport, REPORT_SEVERITY_CONSOLE ,"TWD_readMem Error: fwDbg_handleCommand failed\n");
-		WLAN_OS_REPORT(("TWD_readMem Error: fwDbg_handleCommand failed\n"));	
-		return TI_NOK;
-	}
-
-	return (TI_OK);
-}
-
-TI_STATUS TWD_writeMem (TI_HANDLE hTWD, TFwDebugParams* pMemDebug, void* fCb, TI_HANDLE hCb)
-{
-    if (hTWD == NULL || pMemDebug == NULL)
-	{
-		return (TI_NOK);
-	}
-
-	TRACE0(((TTwd *)hTWD)->hReport, REPORT_SEVERITY_INFORMATION , "TWD_writeMem: called\n");
-
-	if (fwDbg_WriteAddr(((TTwd *)hTWD)->hFwDbg,pMemDebug->addr,pMemDebug->length,pMemDebug->UBuf.buf8,(TFwDubCallback)fCb,hCb) == TI_NOK)
-	{
-        TRACE0(((TTwd *)hTWD)->hReport, REPORT_SEVERITY_CONSOLE ,"TWD_writeMem Error: fwDbg_handleCommand failed\n");
-		WLAN_OS_REPORT(("TWD_writeMem Error: fwDbg_handleCommand failed\n"));	
-		return TI_NOK;
-	}
-
-	return(TI_OK);
-}
-
-TI_BOOL TWD_isValidMemoryAddr (TI_HANDLE hTWD, TFwDebugParams* pMemDebug)
-{
-	if (hTWD == NULL || pMemDebug == NULL)
-	{
-		return TI_FALSE;
-	}
-
-	TRACE0(((TTwd *)hTWD)->hReport, REPORT_SEVERITY_INFORMATION , "TWD_isValidMemoryAddr: called\n");
-
-	return fwDbg_isValidMemoryAddr(((TTwd *)hTWD)->hFwDbg,pMemDebug->addr,pMemDebug->length);
-}
-
-TI_BOOL TWD_isValidRegAddr (TI_HANDLE hTWD, TFwDebugParams* pMemDebug)
-{
-    if (hTWD == NULL || pMemDebug == NULL )
-	{
-		return TI_FALSE;
-	}
-
-	TRACE0(((TTwd *)hTWD)->hReport, REPORT_SEVERITY_INFORMATION , "TWD_isValidRegAddr: called\n");
-
-	return fwDbg_isValidRegAddr(((TTwd *)hTWD)->hFwDbg,pMemDebug->addr,pMemDebug->length);
-}
-
-/**
- * \brief Set Template Frame
- * 
- * \param hTWD 				- TWD module object handle
- * \param pMib      		- Pointer to Input MIB Structure
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Static function
- * Configure/Interrogate/Modulate the Frame Rate if needed (according to Templete Type) 
- * and then write the MIB TemplateFrame to the FW
- *
- * \sa
- */ 
-static TI_STATUS TWD_WriteMibTemplateFrame (TI_HANDLE hTWD, TMib* pMib)
-{
-    TTwd  *pTWD = (TTwd *)hTWD;
-    TSetTemplate  tSetTemplate;
-    TI_UINT32  uRateMask = RATE_TO_MASK(pMib->aData.TemplateFrame.Rate);
-
-    /* 
-     * Construct the template MIB element
-     */
-    switch(pMib->aData.TemplateFrame.FrameType)
-    {
-    case TEMPLATE_TYPE_BEACON:
-        tSetTemplate.type = BEACON_TEMPLATE;
-        break;
-        
-    case TEMPLATE_TYPE_PROBE_REQUEST:
-        tSetTemplate.type = PROBE_REQUEST_TEMPLATE;
-        tSetTemplate.eBand = RADIO_BAND_2_4_GHZ; /* needed for GWSI, if so band must also be passed to choose correct template (G or A) */
-        break;
-        
-    case TEMPLATE_TYPE_NULL_FRAME:
-        tSetTemplate.type = NULL_DATA_TEMPLATE;
-        MacServices_powerSrv_SetRateModulation (pTWD->hMacServices, (TI_UINT16)uRateMask);
-        break;
-        
-    case TEMPLATE_TYPE_PROBE_RESPONSE:
-        tSetTemplate.type = PROBE_RESPONSE_TEMPLATE;
-        break;
-        
-    case TEMPLATE_TYPE_QOS_NULL_FRAME:
-        tSetTemplate.type = QOS_NULL_DATA_TEMPLATE;
-        break;
-        
-    case TEMPLATE_TYPE_PS_POLL:
-        tSetTemplate.type = PS_POLL_TEMPLATE;
-        break;
-        
-    default:
-        TRACE1(pTWD->hReport, REPORT_SEVERITY_ERROR, "TWD_WriteMibTemplateFrame - ERROR - template is not supported, %d\n", pMib->aData.TemplateFrame.FrameType);
-        return PARAM_NOT_SUPPORTED;
-    }
-    
-    tSetTemplate.len = pMib->aData.TemplateFrame.Length;
-    tSetTemplate.ptr = (TI_UINT8 *) &(pMib->aData.TemplateFrame.Data);
-    tSetTemplate.uRateMask = uRateMask;
-
-    return TWD_CmdTemplate (hTWD, &tSetTemplate, NULL, NULL);
-}
-
-/**
- * \brief Set Beacon Filter IE Table
- * 
- * \param hTWD 				- TWD module object handle
- * \param pMib      		- Pointer to Input MIB Structure
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Static function
- * Configure the MIB Beacon Filter IE table
- *
- * \sa
- */ 
-static TI_STATUS TWD_WriteMibBeaconFilterIETable (TI_HANDLE hTWD, TMib *pMib)
-{
-    TTwd  *pTWD = (TTwd *)hTWD;
-    TI_UINT8 numOf221IE = 0;
-    TI_UINT8 i = 0;
-    TI_UINT8 IETableLen = 0;
-    TI_UINT8 numOfIEs = 0;
-    TI_UINT8 *IETable = NULL;
-
-    numOfIEs = pMib->aData.BeaconFilter.iNumberOfIEs;
-    IETable = pMib->aData.BeaconFilter.iIETable;
-    /* Find the actual IETableLen */
-    for (i = 0; i < numOfIEs; i++)
-    {
-        if (IETable[IETableLen] == 0xdd)
-        {
-             IETableLen += 8;
-             numOf221IE++;
-        }
-        else
-        {
-            IETableLen += 2;
-        }
-    }
-    
-    TRACE4(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_WriteMibBeaconFilterIETable: IETable=0x%x Num Of IE=%d ( including %d 221 ) - Table Len=%d\n", IETable, numOfIEs, numOf221IE, IETableLen);
-    
-    return TWD_CfgBeaconFilterTable (hTWD, numOfIEs, IETable, IETableLen);
-}
-
-/**
- * \brief Set Tx Rate Policy
- * 
- * \param hTWD 				- TWD module object handle
- * \param pMib      		- Pointer to Input MIB Structure
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Static function
- * Coordinates between legacy TxRatePolicy implementation and the MIB format:
- * Converts the pGwsi_txRatePolicy back to command builder commands. 
- * Activates the TWD_set function.
- *
- * \sa
- */ 
-static TI_STATUS TWD_WriteMibTxRatePolicy (TI_HANDLE hTWD, TMib* pMib)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-#ifdef TI_DBG
-    if (NULL == pMib)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_ERROR, "ERROR: TWD_WriteMibTxRatePolicy pMib=NULL !!!");
-		return TI_NOK;
-    }
-#endif /* TI_DBG */
-
-    return cmdBld_CfgTxRatePolicy (pTWD->hCmdBld, &pMib->aData.txRatePolicy, NULL, NULL);
-}
-
-TI_STATUS TWD_WriteMib (TI_HANDLE hTWD, TMib *pMib)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-   
-#ifdef TI_DBG
-    TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_WriteMib :pMib %p:\n",pMib);
-    
-    TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_WriteMib :aMib %x:\n",pMib->aMib);
-
-    TRACE_INFO_HEX(pTWD->hReport, (TI_UINT8*)pMib, TI_MIN (sizeof(TMib), pMib->Length));
-#endif /* TI_DBG */
-    
-    if (NULL == pMib)
-    {
-        TRACE0(pTWD->hReport, REPORT_SEVERITY_ERROR, "TWD_WriteMib :pMib = NULL !!\n");
-        return PARAM_VALUE_NOT_VALID;
-    }
-
-    switch (pMib->aMib)
-    {   
-    case MIB_dot11MaxReceiveLifetime:
-        return cmdBld_CfgRxMsduLifeTime (pTWD->hCmdBld, pMib->aData.MaxReceiveLifeTime * 1024, (void *)NULL, (void *)NULL);
-        
-    case MIB_ctsToSelf:
-        return cmdBld_CfgCtsProtection (pTWD->hCmdBld, (TI_UINT8)pMib->aData.CTSToSelfEnable, (void *)NULL, (TI_HANDLE)NULL);
-        
-    case MIB_dot11GroupAddressesTable: 
-        {
-            if (NULL == pMib->aData.GroupAddressTable.aGroupTable)
-            {
-                TRACE0(pTWD->hReport, REPORT_SEVERITY_ERROR, "TWD_WriteMib(MIB_dot11GroupAddressesTable) :GroupTable = NULL !!\n");
-                return PARAM_VALUE_NOT_VALID;
-            }
-            
-            return TWD_CfgGroupAddressTable (hTWD, 
-                                             pMib->aData.GroupAddressTable.nNumberOfAddresses,
-                                             pMib->aData.GroupAddressTable.aGroupTable,
-                                             pMib->aData.GroupAddressTable.bFilteringEnable);
-        }
-        
-    case MIB_arpIpAddressesTable:
-        {
-            TIpAddr IpAddress;
-
-            IP_COPY (IpAddress, pMib->aData.ArpIpAddressesTable.addr);
-
-            TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_WriteMib(MIB_arpIpAddressesTable) IpAddress:\n");
-            TRACE_INFO_HEX(pTWD->hReport, (TI_UINT8*)&IpAddress, 4);
-
-            return cmdBld_CfgArpIpAddrTable (pTWD->hCmdBld, 
-                                             IpAddress,
-                                             (TI_BOOL)pMib->aData.ArpIpAddressesTable.FilteringEnable,
-                                             IP_VER_4, 
-                                             NULL, 
-                                             NULL);
-        }
-        
-    case MIB_templateFrame:
-        return TWD_WriteMibTemplateFrame (hTWD, pMib);
-        
-    case MIB_beaconFilterIETable:
-        return TWD_WriteMibBeaconFilterIETable (hTWD, pMib);
-        
-    case MIB_rxFilter:
-        {
-            TI_UINT32  uRxFilter = 0;
-            TI_UINT8   uMibRxFilter = pMib->aData.RxFilter;
-            
-            if (uMibRxFilter & MIB_RX_FILTER_PROMISCOUS_SET)
-            {
-                TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "\n TWD_WriteMib MIB_rxFilter - RX_CFG_ENABLE_ANY_DEST_MAC\n");
-                uRxFilter = RX_CFG_ENABLE_ANY_DEST_MAC;
-            }
-            else
-            {
-                uRxFilter = RX_CFG_ENABLE_ONLY_MY_DEST_MAC;
-                TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "\n halCtrl_WriteMib MIB_rxFilter - RX_CFG_ENABLE_ONLY_MY_DEST_MAC\n");
-            }
-            
-            if ((uMibRxFilter & MIB_RX_FILTER_BSSID_SET) != 0)
-            {
-                uRxFilter = uRxFilter | RX_CFG_ENABLE_ONLY_MY_BSSID;
-                TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "\n halCtrl_WriteMib MIB_rxFilter - RX_CFG_ENABLE_ONLY_MY_BSSID\n");
-            }
-            else
-            {
-                uRxFilter = uRxFilter | RX_CFG_ENABLE_ANY_BSSID;
-                TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "\n halCtrl_WriteMib MIB_rxFilter - RX_CFG_ENABLE_ANY_BSSID\n");
-            }
-            
-            /*
-             * Activates the TWD_setRxFilters function 
-             */
-            return TWD_CfgRx (hTWD, uRxFilter, RX_FILTER_OPTION_DEF);
-        }
-
-    case MIB_txRatePolicy:
-        return TWD_WriteMibTxRatePolicy (hTWD, pMib);
-
-    default:
-        TRACE1(pTWD->hReport, REPORT_SEVERITY_ERROR, "TWD_WriteMib - ERROR - MIB element not supported, %d\n", pMib->aMib);
-        
-        return TI_NOK;
-        
-    } /* switch */   
-}
-
-TI_STATUS TWD_ReadMib (TI_HANDLE hTWD, TI_HANDLE hCb, void* fCb, void* pCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_ReadMib: called\n");
-
-    return cmdBld_ReadMib (pTWD->hCmdBld, hCb, fCb, pCb);
-}
-
-void TWD_DisableInterrupts(TI_HANDLE hTWD)
-{
-    TTwd    *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_DisableInterrupts: called\n");
-
-    fwEvent_DisableInterrupts(pTWD->hFwEvent);
-}
-
-void TWD_EnableInterrupts(TI_HANDLE hTWD)
-{
-    TTwd    *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_EnableInterrupts: called\n");
-
-    fwEvent_EnableInterrupts(pTWD->hFwEvent);
-}
-
-TI_UINT32 TWD_TranslateToFwTime (TI_HANDLE hTWD, TI_UINT32 uHostTime)
-{
-    TTwd    *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_TranslateToFwTime: called\n");
-
-    return fwEvent_TranslateToFwTime (pTWD->hFwEvent, uHostTime);
-}
-
-void TWD_GetTwdHtCapabilities (TI_HANDLE hTWD, TTwdHtCapabilities **pTwdHtCapabilities)
-{
-    TTwd        *pTWD        = (TTwd *)hTWD;
-    TWlanParams *pWlanParams = &DB_WLAN(pTWD->hCmdBld);
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_GetTwdHtCapabilities: called\n");
-
-    *pTwdHtCapabilities = &(pWlanParams->tTwdHtCapabilities);
-}
-
-/** 
- *  \brief TWD get FEM type
- *  * 
- * \param  Handle        	- handle to object
- * \return uint8 
- * 
- * \par Description
- * The function return the Front end module that was read frm FW register * 
- * \sa
- */ 
-TI_UINT8 TWD_GetFEMType (TI_HANDLE hTWD)
-{
-  TTwd        *pTWD        = (TTwd *)hTWD;
-  IniFileGeneralParam *pGenParams = &DB_GEN(pTWD->hCmdBld);
-
-  return pGenParams->TXBiPFEMManufacturer;
-
-}
-
-/** 
- *  \brief TWD end function of read radio state machine
- *  *  * 
- * \param  Handle        	- handle to object
- * \return void
- * 
- * \par Description
- * The function calling to HwInit call back function, after finish reading FEM registers * 
- * \sa
- */ 
-void TWD_FinalizeFEMRead(TI_HANDLE hTWD)
-{
-  TTwd *pTWD = (TTwd *)hTWD;
-
-  (*pTWD->fInitHwCb) (pTWD->hUser, TI_OK);
-}
-
-
-
-
-void TWD_FinalizePolarityRead(TI_HANDLE hTWD)
-{
-  TTwd *pTWD = (TTwd *)hTWD;
-  /*  allways read FEM type from Radio Registers */ 
-   hwInit_ReadRadioParams(pTWD->hHwInit);   
-}
diff --git a/wl1271/TWD/TWDriver/TWDriver.h b/wl1271/TWD/TWDriver/TWDriver.h
deleted file mode 100644
index 225a103..0000000
--- a/wl1271/TWD/TWDriver/TWDriver.h
+++ /dev/null
@@ -1,4750 +0,0 @@
-/*
- * TWDriver.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/** \file  TWDriver.h 
- *  \brief TWDriver APIs
- *
- *  \see 
- */
-
-/** @defgroup Control Control group
- * \brief The Control group includes the list of functions which perform TWD Control
- */
-/** @defgroup Measurement Measurement group
- * \brief The Measurement group includes the list of functions which gets measurements from FW / TWD
- */
-/** @defgroup Data_Path Data Path group
- * \brief The Data Path group includes the list of functions which perform the TWD Data Path
- */
-/**	@defgroup Power_Management Power Management group 	
- * \brief The Power Management group includes the list of functions which set the power management mode
- */
-/** @defgroup QoS Quality  Of Service group 
- * \brief The Quality of Service group includes the list of functions which perform the TWD QoS
- */
-/** @defgroup Radio Radio (PHY) group
- * \brief The Radio group includes the list of functions which handle the Radio
- */
-/** @defgroup BSS BSS group
- * \brief The BSS group includes the list of functions which handle the Basic Service Set
- */
-/** @defgroup Misc Miscellaneous group
- * \brief The Miscellaneous group includes the list of functions which handle miscellaneous issues
- */
-#ifdef TI_DBG
-/**	@defgroup Test Debug Test group
- * \brief The Debug Test group includes the list of functions which Test the TWD and FW
- */
-#endif
-
-#ifndef TWDRIVER_H
-#define TWDRIVER_H
-
-
-#include "802_11Defs.h"
-#include "TWDriverMsr.h"
-#include "TWDriverScan.h"
-#include "TWDriverRate.h"
-#include "fwDebug_api.h"
-#include "TwIf.h"
-/* 
- * original firmware h-files 
- */
-#include "public_commands.h"
-#include "public_event_mbox.h"
-#include "public_infoele.h"
-#include "public_host_int.h"
-#include "public_descriptors.h"   
-#include "public_radio.h"
-
-/*
- * Firmware types defintions
- */ 
-#ifndef uint8
-#define uint8   TI_UINT8
-#endif
-#ifndef uint16
-#define uint16  TI_UINT16
-#endif
-#ifndef uint32
-#define uint32  TI_UINT32
-#endif
-#ifndef int8
-#define int8    TI_INT8
-#endif
-#ifndef int16
-#define int16   TI_INT16
-#endif
-#ifndef int32
-#define int32   TI_INT32
-#endif
-
-
-
-/*
- * --------------------------------------------------------------
- *	Definitions
- * --------------------------------------------------------------
- */
-
-/* PALAU Group Address Default Values */
-#define NUM_GROUP_ADDRESS_VALUE_DEF     4   
-#define NUM_GROUP_ADDRESS_VALUE_MIN     0
-#define NUM_GROUP_ADDRESS_VALUE_MAX     8
-
-/* Early Wakeup Default Values */
-#define EARLY_WAKEUP_ENABLE_MIN         (TI_FALSE)
-#define EARLY_WAKEUP_ENABLE_MAX         (TI_TRUE)
-#define EARLY_WAKEUP_ENABLE_DEF         (TI_TRUE)
-
-/* ARP IP Filter Default Values */
-#define MIN_FILTER_ENABLE_VALUE         0
-#define MAX_FILTER_ENABLE_VALUE         3
-#define DEF_FILTER_ENABLE_VALUE         0
-#define FILTER_ENABLE_FLAG_LEN          1
-
-/* Beacon filter Deafult Values */
-#define DEF_BEACON_FILTER_ENABLE_VALUE  1
-#define DEF_BEACON_FILTER_IE_TABLE_NUM  16
-#define MIN_BEACON_FILTER_ENABLE_VALUE  0
-#define MAX_BEACON_FILTER_ENABLE_VALUE  1
-#define BEACON_FILTER_IE_TABLE_DEF_SIZE 37
-#define BEACON_FILTER_IE_TABLE_MAX_SIZE 100
-#define BEACON_FILTER_IE_TABLE_MIN_SIZE 0 
-#define BEACON_FILTER_IE_TABLE_MAX_NUM  (6+32)
-#define BEACON_FILTER_IE_TABLE_MIN_NUM  0 
-
-/* CoexActivity Table Deafult Values */
-#define COEX_ACTIVITY_TABLE_DEF_NUM     0
-#define COEX_ACTIVITY_TABLE_MIN_NUM     0
-#define COEX_ACTIVITY_TABLE_MAX_NUM     24*2
-#define COEX_ACTIVITY_TABLE_SIZE        ((2+1)+(2+1)+(2+1)+(2+1)+(4+1)+(4+1)) /* includes spaces between bytes */
-
-#define DEF_NUM_STORED_FILTERS          1
-#define MIN_NUM_STORED_FILTERS          1
-#define MAX_NUM_STORED_FILTERS          8
-
-#define TWD_HW_ACCESS_METHOD_MIN   0
-#define TWD_HW_ACCESS_METHOD_MAX   2
-#define TWD_HW_ACCESS_METHOD_DEF   1
-
-#define TWD_SITE_FRAG_COLLECT_MIN  2
-#define TWD_SITE_FRAG_COLLECT_MAX  10
-#define TWD_SITE_FRAG_COLLECT_DEF  3
-
-#define TWD_TX_MIN_MEM_BLKS_NUM    40   /* The MINIMUM number of Tx memory blocks configured to FW */
-
-#define TWD_RX_BLOCKS_RATIO_MIN    0
-#define TWD_RX_BLOCKS_RATIO_MAX    100
-#define TWD_RX_BLOCKS_RATIO_DEF    50
-
-#define TWD_TX_FLASH_ENABLE_MIN         TI_FALSE
-#define TWD_TX_FLASH_ENABLE_MAX         TI_TRUE
-#define TWD_TX_FLASH_ENABLE_DEF         TI_TRUE
-
-#define TWD_USE_INTR_TRHESHOLD_MIN 0
-#define TWD_USE_INTR_TRHESHOLD_MAX 1
-#define TWD_USE_INTR_TRHESHOLD_DEF 0
-
-#define TWD_USE_TX_DATA_INTR_MIN   0
-#define TWD_USE_TX_DATA_INTR_MAX   1
-
-#define NUM_OF_CHANNELS_24              14
-#define NUM_OF_CHANNELS_5               180
-
-#define TWD_CALIBRATION_CHANNEL_2_4_MIN 1
-#define TWD_CALIBRATION_CHANNEL_2_4_MAX NUM_OF_CHANNELS_24
-#define TWD_CALIBRATION_CHANNEL_2_4_DEF 1
-
-#define A_5G_BAND_MIN_CHANNEL       36
-#define A_5G_BAND_MAX_CHANNEL       180
-#define A_5G_BAND_NUM_CHANNELS  	(A_5G_BAND_MAX_CHANNEL-A_5G_BAND_MIN_CHANNEL+1)
-
-#define TWD_CALIBRATION_CHANNEL_5_0_MIN 34
-#define TWD_CALIBRATION_CHANNEL_5_0_MAX  A_5G_BAND_MAX_CHANNEL
-#define TWD_CALIBRATION_CHANNEL_5_0_DEF 36
-
-#define TWD_CALIBRATION_CHANNEL_4_9_MIN 8
-#define TWD_CALIBRATION_CHANNEL_4_9_MAX 16
-#define TWD_CALIBRATION_CHANNEL_4_9_DEF 12
-
-#define TWD_RTS_THRESHOLD_MIN           0
-#define TWD_RTS_THRESHOLD_MAX           4096
-#define TWD_RTS_THRESHOLD_DEF           4096
-
-#define TWD_BCN_RX_TIME_OUT_MIN         10      /* ms */
-#define TWD_BCN_RX_TIME_OUT_MAX         1000    /* ms */
-#define TWD_BCN_RX_TIME_OUT_DEF         10      /* ms */
-
-#define TWD_RX_DISABLE_BROADCAST_MIN    TI_FALSE
-#define TWD_RX_DISABLE_BROADCAST_MAX    TI_TRUE
-#define TWD_RX_DISABLE_BROADCAST_DEF    TI_FALSE
-
-/* Indicate if the recovery process is active or not */
-#define TWD_RECOVERY_ENABLE_MIN         TI_FALSE
-#define TWD_RECOVERY_ENABLE_MAX         TI_TRUE
-#define TWD_RECOVERY_ENABLE_DEF         TI_TRUE
-
-/* Indicate if working with Burst Mode or not */
-#define BURST_MODE_ENABLE_MIN         TI_FALSE
-#define BURST_MODE_ENABLE_MAX         TI_TRUE
-#define BURST_MODE_ENABLE_DEF         TI_FALSE
-
-#define SMART_REFLEX_STATE_MIN        TI_FALSE
-#define SMART_REFLEX_STATE_MAX        TI_TRUE
-#define SMART_REFLEX_STATE_DEF        TI_TRUE
-
-#define SMART_REFLEX_CONFIG_PARAMS_DEF_TABLE  "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
-#define SMART_REFLEX_CONFIG_PARAMS_DEF_TABLE_SRF1  "07,03,18,10,05,fb,f0,e8, 0,0,0,0,0,0,0f,3f"
-#define SMART_REFLEX_CONFIG_PARAMS_DEF_TABLE_SRF2  "07,03,18,10,05,f6,f0,e8"
-#define SMART_REFLEX_CONFIG_PARAMS_DEF_TABLE_SRF3  "07,03,18,10,05,fb,f0,e8"
-
-#define TWD_FRAG_THRESHOLD_MIN          256
-#define TWD_FRAG_THRESHOLD_MAX          4096
-#define TWD_FRAG_THRESHOLD_DEF          4096
-
-#define TWD_MAX_TX_MSDU_LIFETIME_MIN    0
-#define TWD_MAX_TX_MSDU_LIFETIME_MAX    3000
-#define TWD_MAX_TX_MSDU_LIFETIME_DEF    512
-
-#define TWD_MAX_RX_MSDU_LIFETIME_MIN    0
-#define TWD_MAX_RX_MSDU_LIFETIME_MAX    0xFFFFFFFF
-#define TWD_MAX_RX_MSDU_LIFETIME_DEF    512000
-
-
-#define TWD_LISTEN_INTERVAL_MIN         1
-#define TWD_LISTEN_INTERVAL_MAX         10
-#define TWD_LISTEN_INTERVAL_DEF         3
-
-/* This field indicates the number of transmit retries to attempt at
-    the rate specified in the TNETW Tx descriptor before
-    falling back to the next lowest rate.
-    If this field is set to 0xff, then rate fallback is disabled.
-    If this field is 0, then there will be 0 retries before starting fallback.*/
-#define TWD_RATE_FB_RETRY_LIMIT_MIN     0   /* => No retries before starting RateFallBack */
-#define TWD_RATE_FB_RETRY_LIMIT_MAX     255 /* =>0xff for disabling Rate fallback */
-#define TWD_RATE_FB_RETRY_LIMIT_DEF     0
-
-#define TWD_TX_ANTENNA_MIN              TX_ANTENNA_2
-#define TWD_TX_ANTENNA_MAX              TX_ANTENNA_1
-#define TWD_TX_ANTENNA_DEF              TX_ANTENNA_1
-
-#define TWD_RX_ANTENNA_MIN              RX_ANTENNA_1
-#define TWD_RX_ANTENNA_MAX              RX_ANTENNA_PARTIAL
-#define TWD_RX_ANTENNA_DEF              RX_ANTENNA_FULL
-
-/*
- * Tx and Rx interrupts pacing (threshold in packets, timeouts in milliseconds)
- */
-#define TWD_TX_CMPLT_THRESHOLD_DEF      4   /* 0 means no pacing so send interrupt on every event */
-#define TWD_TX_CMPLT_THRESHOLD_MIN      0
-#define TWD_TX_CMPLT_THRESHOLD_MAX      30
-
-#define TWD_TX_CMPLT_TIMEOUT_DEF        700 /* The Tx Complete interrupt pacing timeout in microseconds! */
-#define TWD_TX_CMPLT_TIMEOUT_MIN        1
-#define TWD_TX_CMPLT_TIMEOUT_MAX        50000
-
-#define TWD_RX_INTR_THRESHOLD_DEF       0   /* 0 means no pacing so send interrupt on every event */
-#define TWD_RX_INTR_THRESHOLD_MIN       0
-#define TWD_RX_INTR_THRESHOLD_MAX       30
-#define TWD_RX_INTR_THRESHOLD_DEF_WIFI_MODE  0 /* No Rx interrupt pacing so send interrupt on every event */
-
-#define TWD_RX_INTR_TIMEOUT_DEF         600  /* The Rx interrupt pacing timeout in microseconds! */  
-#define TWD_RX_INTR_TIMEOUT_MIN         1 
-#define TWD_RX_INTR_TIMEOUT_MAX         50000
-
-/* Rx aggregation packets number limit (max packets in one aggregation) */
-#define TWD_RX_AGGREG_PKTS_LIMIT_DEF    4
-#define TWD_RX_AGGREG_PKTS_LIMIT_MIN    0 
-#define TWD_RX_AGGREG_PKTS_LIMIT_MAX    4
-
-/* Tx aggregation packets number limit (max packets in one aggregation) */
-#define TWD_TX_AGGREG_PKTS_LIMIT_DEF    0
-#define TWD_TX_AGGREG_PKTS_LIMIT_MIN    0 
-#define TWD_TX_AGGREG_PKTS_LIMIT_MAX    32
-
-/*
- * Tx power level 
- */
-#define DBM_TO_TX_POWER_FACTOR			10
-
-/* TX_POWER is in Dbm/10 units */
-#define MAX_TX_POWER					250 
-#define MIN_TX_POWER					0   
-#define DEF_TX_POWER					205   
-
-
-#define MIN_DEFAULT_KEY_ID              0
-#define MAX_DEFAULT_KEY_ID              3
-
-#define KEY_RSC_LEN                     8
-#define MIN_KEY_LEN                     5
-#define MAX_KEY_LEN                     32
-
-#define TWD_RSSI_BEACON_WEIGHT_MIN       0   
-#define TWD_RSSI_BEACON_WEIGHT_MAX     100
-#define TWD_RSSI_BEACON_WEIGHT_DEF      20
-
-#define TWD_RSSI_PACKET_WEIGHT_MIN       0   
-#define TWD_RSSI_PACKET_WEIGHT_MAX     100
-#define TWD_RSSI_PACKET_WEIGHT_DEF      10
-
-#define TWD_SNR_BEACON_WEIGHT_MIN        0   
-#define TWD_SNR_BEACON_WEIGHT_MAX      100
-#define TWD_SNR_BEACON_WEIGHT_DEF       20
-
-#define TWD_SNR_PACKET_WEIGHT_MIN        0   
-#define TWD_SNR_PACKET_WEIGHT_MAX      100
-#define TWD_SNR_PACKET_WEIGHT_DEF       10
-
-#define TWD_DCO_ITRIM_ENABLE_MIN  TI_FALSE
-#define TWD_DCO_ITRIM_ENABLE_MAX  TI_TRUE
-#define TWD_DCO_ITRIM_ENABLE_DEF  TI_FALSE
-
-#define TWD_DCO_ITRIM_MODERATION_TIMEOUT_MIN    10000
-#define TWD_DCO_ITRIM_MODERATION_TIMEOUT_MAX  1000000
-#define TWD_DCO_ITRIM_MODERATION_TIMEOUT_DEF    50000
-
-
-#define MAX_NUM_OF_AC                   4
-
-/************************************/      
-/*      Rates values                */  
-/************************************/
-/* The next definitions are used to decide which encryption is used by the Rx flags */
-#define RX_FLAGS_NO_SECURITY                0  
-#define RX_FLAGS_WEP                        1
-#define RX_FLAGS_TKIP                       2
-#define RX_FLAGS_AES                        3
-
-
-#define RX_DESC_FLAGS_ENCRYPTION            8
-#define RX_PACKET_FLAGS_ENCRYPTION_SHIFT    16
-#define RX_PACKET_FLAGS_ENCRYPTION_SHIFT_FROM_DESC      (RX_PACKET_FLAGS_ENCRYPTION_SHIFT - RX_DESC_FLAGS_ENCRYPTION)
-
-/* Tx packet Control-Block flags bit-mask. */
-#define TX_CTRL_FLAG_XFER_DONE_ISSUED      0x0001  /* Xfer-Done already issued to upper driver   - for WHA. */
-#define TX_CTRL_FLAG_TX_COMPLETE_ISSUED    0x0002  /* Tx-Complete already issued to upper driver - for WHA. */
-#define TX_CTRL_FLAG_LINK_TEST             0x0004  /* XCC link test packet */
-#define TX_CTRL_FLAG_SENT_TO_FW            0x0008  /* Set after the packet is allowed to be sent to FW (by TxHwQueue) */
-#define TX_CTRL_FLAG_PKT_IN_RAW_BUF        0x0010  /* The input packet is in a raw buffer (as opposed to OS packet) */
-#define TX_CTRL_FLAG_MULTICAST             0x0020  /* A multicast ethernet packet */
-#define TX_CTRL_FLAG_BROADCAST             0x0040  /* A broadcast ethernet packet */
-
-#define TX_PKT_TYPE_MGMT                   1   /* Management Packet						  */
-#define TX_PKT_TYPE_EAPOL                  2   /* EAPOL packet (Ethernet)				  */
-#define TX_PKT_TYPE_ETHER                  3   /* Data packet from the Network interface  */
-#define TX_PKT_TYPE_WLAN_DATA	           4   /* Driver generated WLAN Data Packet (currently used for IAPP packet) */
-
-
-#define ALIGN_4BYTE_MASK                   0x3 /* Masked LS bits for 4-bytes aligned addresses or lengths. */
-#define SHIFT_BETWEEN_TU_AND_USEC          10  /* Shift factor to convert between TU (1024 uSec) and uSec. */
-
-/* Packet header + extensions structure ranges between 24 and 48 bytes as follows:
- * ------------------------------------------------------------------------------
- * Alignment Padding:   0/2 bytes,      added for 4 bytes alignment of this structure.
- * Mac-Header:          24 bytes,       802.11 basic header.
- * Qos header:          0/2 bytes,      for QoS-data or QoS-Null the two QoS bytes are added.
- * Security Pad:        0/0/4/8/18 bytes,  for None/WEP/TKIP/AES/GEM.
- * LLC/SNAP:            0/8 bytes,      added only for data packets.
- * HT control:          0/4             added only for packte support QoS and HT
- */
-#define MAX_HEADER_SIZE                 48  
-
-/* Data body max length */
-#define MAX_DATA_BODY_LENGTH            4096
-
-
-
-/* The weight in % of the new packet relative to the previous average value of RSSI */
-#define RSSI_DEFAULT_WEIGHT             20 
-
-#define RSSI_DEFAULT_THRESHOLD          -80 
-#define SNR_DEFAULT_THRESHOLD           0 
-
-/* 
- * 'No beacon' roaming trigger configuration
- * Number of consecutive beacons (or DTIM periods) missed before 
- * 'Out of Sync' event is raised 
- */
-#define OUT_OF_SYNC_DEFAULT_THRESHOLD   10
-/* 
- * IBSS - Number of consecutive beacons (or DTIM periods) missed before 
- * 'Out of Sync' event is raised 
- */
-#define OUT_OF_SYNC_IBSS_THRESHOLD      200
-/* Period of time between 'Out of sync' and 'No beacon' events */
-#define NO_BEACON_DEFAULT_TIMEOUT       100 /* in tu-s*/
-
-/* Consecutive NACK roaming trigger configuration */
-#define NO_ACK_DEFAULT_THRESHOLD        20 
-
-/* Low Rx rate roaming trigger configuration */
-#define LOW_RATE_DEFAULT_THRESHOLD      2 
-
-#define MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES       8
-#define MAX_CHANNELS_IN_REG_DOMAIN      40
-
-#define CTS_TO_SELF_DISABLE             0
-#define CTS_TO_SELF_ENABLE              1
-
-#define MAX_TEMPLATE_SIZE               256
-
-/* Scan constants */
-#define MAX_NUMBER_OF_CHANNELS_PER_SCAN                     16
-#define SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND         MAX_NUMBER_OF_CHANNELS_PER_SCAN
-#define SCAN_MAX_NUM_OF_SPS_CHANNELS_PER_COMMAND            16
-#define SCAN_DEFAULT_MIN_CHANNEL_DWELL_TIME                 30000
-#define SCAN_DEFAULT_MAX_CHANNEL_DWELL_TIME                 60000
-#define SCAN_DEFAULT_EARLY_TERMINATION_EVENT                SCAN_ET_COND_DISABLE
-#define SCAN_DEFAULT_EARLY_TERMINATION_NUM_OF_FRAMES        0
-
-#define NUM_OF_NOISE_HISTOGRAM_COUNTERS 8
-
-#define TX_DESCRIPTOR_SIZE             sizeof(TxIfDescriptor_t)
-
-#define CTRL_BLK_ENTRIES_NUM            160
-
-#define HT_CAP_AMPDU_PARAMETERS_FIELD_OFFSET   2
-#define HT_CAP_HT_EXTENDED_FIELD_OFFSET        19
-#define HT_CAP_AMPDU_MAX_RX_FACTOR_BITMASK     0x3
-#define HT_CAP_AMPDU_MIN_START_SPACING_BITMASK 0x7
-#define HT_CAP_GREENFIELD_FRAME_FORMAT_BITMASK 0x0010
-#define HT_CAP_SHORT_GI_FOR_20MHZ_BITMASK      0x0020
-#define HT_CAP_LSIG_TXOP_PROTECTION_BITMASK    0x8000
-#define HT_EXT_HT_CONTROL_FIELDS_BITMASK       0x0400
-#define HT_EXT_RD_INITIATION_BITMASK           0x0800
-#define HT_INF_RIFS_MOD_BITMASK                0x08
-#define HT_INF_OPERATION_MOD_BITMASK           0x03
-#define HT_INF_NON_GF_PRES_BITMASK             0x04
-#define HT_INF_TX_BURST_LIMIT_BITMASK          0x08
-#define HT_INF_DUAL_BEACON_BITMASK             0x40
-#define HT_INF_DUAL_CTS_PROTECTION_BITMASK     0x80
-
-/* 
- * TWD HT capabilities, physical capabilities of the STA.
- * The structure is defined like that in order to simplify the interface with WHA layer.
- */
-#define RX_TX_MCS_BITMASK_SIZE      10
-
-#define  DSSS_CCK_MODE         					1
-
-#define MCS_HIGHEST_SUPPORTED_RECEPTION_DATA_RATE_IN_MBIT_S 0x48
-
-#define IMPLICIT_TXBF_REC_CAPABLE             	1
-#define TRANSMIT_STAGGERED_SOUNDING_CAPABLE   	1
-
-/* Firmware version name length */
-#define FW_VERSION_LEN                  		20
-
-/*the max table sized is : ( number of 221 * 8 bytes ) + ( non-221 * 2 bytes )
-  Must be synchronized with the size of ACX defined in public_infoele.h interface
-  with the FW
-*/
-#define MIB_MAX_SIZE_OF_IE_TABLE 				112 
-#define MIB_TEMPLATE_DATA_MAX_LEN   			256
-#define MIB_MAX_MULTICAST_GROUP_ADDRS			8
-
-#define MAX_MULTICAST_GROUP_ADDRS				8
-
-/* Max numver of policies */
-#define MAX_NUM_OF_TX_RATE_CLASS_POLICIES   	8 
-
-#define NUM_POWER_LEVELS                		4
-#define MAX_POWER_LEVEL                 		1
-#define MIN_POWER_LEVEL                 		NUM_POWER_LEVELS
-
-/*
- * --------------------------------------------------------------
- *	Enumerations
- * --------------------------------------------------------------
- */
-/** \enum EFileType
- * \brief TWD input/output files
- *
- * \par Description
- * Indicates which File (or part of file) to read or write
- *
- * \sa TFileInfo
- */
-typedef enum
-{
-    FILE_TYPE_INI = 0, 	/**< */
-    FILE_TYPE_NVS, 		/**< */
-    FILE_TYPE_FW, 		/**< */
-    FILE_TYPE_FW_NEXT 	/**< */
-} EFileType;
-
-/** \enum EKeepAliveTriggerType
- * \brief Keep Alive Trigger Types
- * 
- * \par Description
- * Indicates when to trigger Keep Alive
- * 
- * \sa TKeepAliveParams
- * 
- */
-typedef enum
-{
-    KEEP_ALIVE_TRIG_TYPE_NO_TX = 0,		/**< */
-    KEEP_ALIVE_TRIG_TYPE_PERIOD_ONLY	/**< */
-
-} EKeepAliveTriggerType;
-
-/** \enum ESlotTime
- * \brief Radio (PHY) Slot Time Type
- * 
- * \par Description
- * Used for configuring PHY Slot Time for FW
- * 
- * \sa TWD_CfgPreamble
- */
-typedef enum
-{
-	PHY_SLOT_TIME_LONG		= 0,	/**< 	Long PHY Slot Time  */ 
-    PHY_SLOT_TIME_SHORT     = 1		/**< 	Short PHY Slot Time  */ 
-
-} ESlotTime;
-
-/** \enum EMib
- * \brief MIB Element Type
- * 
- * \par Description
- * Used for R/W MIB to FW
- * 
- * \sa TMib
- */
-typedef enum
-{
-/*	0x00	*/	MIB_dot11MaxReceiveLifetime = 0,	/**< */
-/*	0x01	*/  MIB_dot11SlotTime,					/**< */
-/*	0x02	*/  MIB_dot11GroupAddressesTable,		/**< */
-/*	0x03	*/  MIB_dot11WepDefaultKeyId,			/**< */
-/*	0x04	*/  MIB_dot11CurrentTxPowerLevel,		/**< */
-/*	0x05	*/  MIB_dot11RTSThreshold,				/**< */
-/*	0x06	*/  MIB_ctsToSelf,						/**< */
-/*	0x07	*/  MIB_arpIpAddressesTable,			/**< */
-/*	0x08	*/  MIB_templateFrame,					/**< */
-/*	0x09	*/  MIB_rxFilter,						/**< */
-/*	0x0A	*/  MIB_beaconFilterIETable,			/**< */
-/*	0x0B	*/  MIB_beaconFilterEnable,				/**< */
-/*	0x0C	*/  MIB_sleepMode,						/**< */
-/*	0x0D	*/  MIB_wlanWakeUpInterval,				/**< */
-/*	0x0E	*/  MIB_beaconLostCount,				/**< */
-/*	0x0F	*/  MIB_rcpiThreshold,					/**< */
-/*	0x10	*/  MIB_statisticsTable,				/**< */
-/*	0x11	*/  MIB_ibssPsConfig,					/**< */
-/*	0x12	*/  MIB_txRatePolicy,					/**< */
-/*	0x13	*/  MIB_countersTable,					/**< */
-/*	0x14	*/  MIB_btCoexsitenceMode,				/**< */
-/*	0x15	*/  MIB_btCoexistenceParameters,		/**< */
-
-				/* must be last!!! */
-				MIB_lastElem	= 0xFFFF			/**< */
-
-} EMib;
-
-/** \enum ETwdParam
- * \brief TWD Control parameter ID
- * 
- * \par Description
- * FW Parmaeter Information Identifier
- * 
- * \sa TWD_SetParam, TWD_GetParam
- */
-typedef enum
-{
-/*	0x01	*/	TWD_RTS_THRESHOLD_PARAM_ID          = 0x01,		/**< */
-/*	0x02	*/  TWD_FRAG_THRESHOLD_PARAM_ID,					/**< */
-/*	0x03	*/  TWD_COUNTERS_PARAM_ID,							/**< */
-/*	0x04	*/  TWD_LISTEN_INTERVAL_PARAM_ID,					/**< */
-/*	0x05	*/  TWD_BEACON_INTERVAL_PARAM_ID,					/**< */
-/*	0x06	*/  TWD_TX_POWER_PARAM_ID,    						/**< */
-/*	0x07	*/  TWD_CLK_RUN_ENABLE_PARAM_ID,					/**< */
-/*	0x08	*/  TWD_QUEUES_PARAM_ID, 							/**< */
-/*	0x09	*/  TWD_TX_RATE_CLASS_PARAM_ID,						/**< */
-/*	0x0A	*/  TWD_MAX_TX_MSDU_LIFE_TIME_PARAM_ID,				/**< */
-/*	0x0B	*/  TWD_MAX_RX_MSDU_LIFE_TIME_PARAM_ID,				/**< */
-/*	0x0C	*/  TWD_CTS_TO_SELF_PARAM_ID,						/**< */
-/*	0x0D	*/  TWD_RX_TIME_OUT_PARAM_ID,						/**< */
-/*	0x0E	*/  TWD_BCN_BRC_OPTIONS_PARAM_ID,					/**< */
-/*	0x0F	*/	TWD_AID_PARAM_ID,								/**< */
-/*	0x10	*/  TWD_RSN_HW_ENC_DEC_ENABLE_PARAM_ID,  			/**< */
-/*	0x11	*/  TWD_RSN_KEY_ADD_PARAM_ID,						/**< */
-/*	0x12	*/  TWD_RSN_KEY_REMOVE_PARAM_ID,					/**< */
-/*	0x13	*/  TWD_RSN_DEFAULT_KEY_ID_PARAM_ID,				/**< */
-/*	0x14	*/  TWD_RSN_SECURITY_MODE_PARAM_ID,					/**< */
-/*	0x15	*/  TWD_RSN_SECURITY_ALARM_CB_SET_PARAM_ID,			/**< */
-/*	0x16	*/  TWD_ACX_STATISTICS_PARAM_ID,					/**< */
-/*	0x17	*/  TWD_MEDIUM_OCCUPANCY_PARAM_ID,					/**< */
-/*	0x18	*/  TWD_DISABLE_POWER_MANAGEMENT_AUTO_CONFIG_PARAM_ID,	/**< */
-/*	0x19	*/  TWD_ENABLE_POWER_MANAGEMENT_AUTO_CONFIG_PARAM_ID,	/**< */
-/*	0x1A	*/  TWD_SG_ENABLE_PARAM_ID,							/**< */
-/*	0x1B	*/  TWD_SG_CONFIG_PARAM_ID,							/**< */
-#ifdef XCC_MODULE_INCLUDED
-/*	0x1C	*/  TWD_RSN_XCC_SW_ENC_ENABLE_PARAM_ID,				/**< */
-/*	0x1D	*/  TWD_RSN_XCC_MIC_FIELD_ENABLE_PARAM_ID,			/**< */
-#endif /* XCC_MODULE_INCLUDED*/
-/*	0x1E	*/  TWD_TX_OP_LIMIT_PARAM_ID,						/**< */
-/*	0x1F	*/  TWD_NOISE_HISTOGRAM_PARAM_ID,					/**< */
-/*	0x20	*/  TWD_TSF_DTIM_MIB_PARAM_ID,						/**< */
-/*	0x21	*/  TWD_REVISION_PARAM_ID,							/**< */
-/*	0x22	*/  TWD_CURRENT_CHANNEL_PARAM_ID,					/**< */
-/*	0x23	*/	TWD_RADIO_TEST_PARAM_ID,						/**< */
-/*	0x24	*/	TWD_RSSI_LEVEL_PARAM_ID,						/**< */
-/*	0x25	*/	TWD_SNR_RATIO_PARAM_ID,							/**< */
-/*	0x26	*/	TWD_COEX_ACTIVITY_PARAM_ID,	    				/**< */
-/*	0x27	*/	TWD_FM_COEX_PARAM_ID,	    				    /**< */
-/*	0x28	*/	TWD_DCO_ITRIM_PARAMS_ID,    				    /**< */
-
-				/* must be last!!! */
-/*	0x29    */	TWD_LAST_PARAM_ID								/**< */
-} ETwdParam;
-
-/** \enum ETwdCallbackOwner
- * \brief TWD Callback Module owner ID
- * 
- * \par Description
- * The Owner ID defines a specific TWD Module
- * 
- * \sa ETwdEventId, TWD_RegisterCb
- */
-typedef enum
-{
-    TWD_OWNER_DRIVER_TX_XFER            = 0x0100,	/**< 	TX Xfer Owner ID  		*/    
-    TWD_OWNER_RX_XFER                   = 0x0200,	/**< 	RX Xfer Owner ID  		*/    
-    TWD_OWNER_SELF                      = 0x0300,	/**< 	Self Owner ID  			*/    
-    TWD_OWNER_MAC_SERVICES              = 0x0400,	/**< 	MAC Services Owner ID  	*/    
-    TWD_OWNER_TX_RESULT                 = 0x0500,	/**< 	TX Result Owner ID  	*/    
-    TWD_OWNER_SELF_CONFIG               = 0x0600,	/**< 	Self configuration of Owner ID  	*/    
-    TWD_OWNER_RX_QUEUE                  = 0x0700,	/**< 	RX Queue Owner ID  		*/    
-    TWD_OWNER_TX_HW_QUEUE               = 0x0800	/**< 	TX HW Queue Owner ID  	*/    
-
-} ETwdCallbackOwner;
-
-/** \enum ETwdIntCallbackId
- * \brief TWD Internal Callbacks ID
- * 
- * \par Description
- * The Owner ID defines a specific TWD Internal CB
- * 
- * \sa ETwdEventId
- */
-typedef enum
-{
-    TWD_INT_SEND_PACKET_TRANSFER        =  0x00 ,	/**< 	Tx Data Path Send Callback  	*/    
-    TWD_INT_SEND_PACKET_COMPLETE                , 	/**< 	Tx Data Path Complete Callback 	*/   
-    TWD_INT_UPDATE_BUSY_MAP                     , 	/**< 	Tx Data Path Update-Busy-Map Callback 	*/   
-
-    /* Rx Data Path Callbacks */
-    TWD_INT_RECEIVE_PACKET              =  0x10 ,	/**< 	Rx Data Path Receive Packet Callback 	   	*/    
-    TWD_INT_REQUEST_FOR_BUFFER                  , 	/**< 	Rx Data Path Request for buffer Callback  	*/   
-    
-    /* TWD Callbacks */
-    TWD_INT_COMMAND_COMPLETE            =  0x20 , 	/**< 	TWD internal Command Complete Callback  	*/   
-    TWD_INT_EVENT_FAILURE  							/**< 	TWD internal Event Failure handle Callback 	*/        
-
-} ETwdIntCallbackId;
-
-/** \enum ETwdOwnEventId
- * \brief Event Mail Box ID
- * 
- * \par Description
- * Clients That expects an event should register for it, 
- * and Mask/UnMask Events with this ID
- * 
- * \sa
- */
-/* Note: changes here should be reflected also in eventTable in eventMbox.c !!! */
-typedef enum 
-{
-			/*Regular events*/
-/*	0	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_0 = 0,       /**< */
-/*	1	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_1,           /**< */
-/*	2	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_2,           /**< */
-/*	3	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_3,           /**< */
-/*	4	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_4,          	/**< */
-/*	5	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_5,           /**< */
-/*	6	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_6,           /**< */
-/*	7	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_7,           /**< */
-/*	8	*/	TWD_OWN_EVENT_MEASUREMENT_START,            /**< */
-/*	9	*/  TWD_OWN_EVENT_MEASUREMENT_COMPLETE,         /**< */
-/*	10	*/	TWD_OWN_EVENT_SCAN_CMPLT,                   /**< */
-/*	11	*/  TWD_OWN_EVENT_SPS_SCAN_CMPLT,               /**< */
-/*	12	*/  TWD_OWN_EVENT_AP_DISCOVERY_COMPLETE,        /**< */
-/*	13	*/  TWD_OWN_EVENT_PS_REPORT,                    /**< */
-/*	14	*/	TWD_OWN_EVENT_PSPOLL_DELIVERY_FAILURE, 		/**< */
-/*	15	*/  TWD_OWN_EVENT_DISCONNECT_COMPLETE,          /**< */
-/*	16	*/  TWD_OWN_EVENT_JOIN_CMPLT,                   /**< */
-/*	17	*/  TWD_OWN_EVENT_SWITCH_CHANNEL_CMPLT,         /**< */
-/*	18	*/  TWD_OWN_EVENT_BSS_LOSE,                     /**< */
-/*	19	*/  TWD_OWN_EVENT_BSS_REGAIN,                   /**< */
-/*	20	*/  TWD_OWN_EVENT_MAX_TX_RETRY,                 /**< */
-/*  21  */  RESERVED21,									/**< */
-/*	22	*/  TWD_OWN_EVENT_SOFT_GEMINI_SENSE,            /**< */
-/*	23	*/  TWD_OWN_EVENT_SOFT_GEMINI_PREDIC,           /**< */
-/*	24	*/  TWD_OWN_EVENT_SOFT_GEMINI_AVALANCHE,        /**< */
-/*	25	*/  TWD_OWN_EVENT_PLT_RX_CALIBRATION_COMPLETE,  /**< */
-/*  26  */  TWD_DBG_EVENT,								/**< */
-/*  27  */  TWD_HEALTH_CHECK_REPLY_EVENT,				/**< */
-/*	28	*/  TWD_OWN_EVENT_PERIODIC_SCAN_COMPLETE,       /**< */
-/*	29	*/  TWD_OWN_EVENT_PERIODIC_SCAN_REPORT,         /**< */
-/*  30  */  TWD_BA_SESSION_TEAR_DOWN_EVENT,				/**< */
-/*	31	*/  TWD_OWN_EVENT_ALL,                          /**< */
-/*	32	*/  TWD_OWN_EVENT_MAX                          	/**< */ 
-
-} ETwdOwnEventId;   
-
-/** \enum ETwdEventId
- * \brief TNETW Driver Event ID
- * 
- * \par Description
- * The TWD Event ID is used by user for registering a TWD Internal CB 
- * which will handle a TWD Event.
- * Each field in this enum is an ID of TWD Event, and is combined of two IDs: 
- * TWD CB Owner (Module) ID and TWD Internal CB ID. Therefore, the CB is registered accordeing to
- * Module (Owner) and Internal CB Id.
- * 
- * \sa TWD_RegisterCb, ETwdCallbackOwner, ETwdIntCallbackId
- */
-typedef enum
-{
-    /* Internal Failure Event Callbacks */
-    TWD_EVENT_FAILURE                   	=  TWD_OWNER_SELF | TWD_INT_EVENT_FAILURE, 					/**< 	Failure Internal Event ID 			*/
-    TWD_EVENT_COMMAND_COMPLETE          	=  TWD_OWNER_SELF | TWD_INT_COMMAND_COMPLETE,  				/**< 	Command Complete Internal Event ID */
-    
-    /* Tx Data Path Callbacks */
-    TWD_EVENT_TX_XFER_SEND_PKT_TRANSFER 	=  TWD_OWNER_DRIVER_TX_XFER | TWD_INT_SEND_PACKET_TRANSFER,	/**< 	TX Data Path Send Packet Event ID 			*/
-    TWD_EVENT_TX_RESULT_SEND_PKT_COMPLETE	=  TWD_OWNER_TX_RESULT | TWD_INT_SEND_PACKET_COMPLETE,      /**< 	TX Data Path Send Packet Complete Event ID 	*/
-    TWD_EVENT_TX_HW_QUEUE_UPDATE_BUSY_MAP   =  TWD_OWNER_TX_HW_QUEUE | TWD_INT_UPDATE_BUSY_MAP,         /**< 	TX Data Path Update-Busy-Map Event ID 	*/
-
-    /* Rx Data Path Callbacks */
-    TWD_EVENT_RX_REQUEST_FOR_BUFFER     	=  TWD_OWNER_RX_XFER | TWD_INT_REQUEST_FOR_BUFFER,         	/**< 	RX Data Path Request for Buffer Internal Event ID 	*/
-    TWD_EVENT_RX_RECEIVE_PACKET         	=  TWD_OWNER_RX_QUEUE | TWD_INT_RECEIVE_PACKET             	/**< 	RX Data Path Receive Packet Internal Event ID  	*/
-
-} ETwdEventId;
-
-#ifdef TI_DBG
-/** \enum ETwdPrintInfoType
- * \brief TWD print functions codes
- * 
- * \par Description
- * Used for Debug - determines which Tx Info to print
- * 
- * \sa TWD_PrintTxInfo
- */
-typedef enum
-{
-/*	0	*/	TWD_PRINT_TX_CTRL_BLK_TBL = 0,	/**< 	Print TX Control Block Information	*/
-/*	1	*/  TWD_PRINT_TX_HW_QUEUE_INFO,		/**< 	Print TX HW Queue Information 		*/
-/*	2	*/  TWD_PRINT_TX_XFER_INFO,			/**< 	Print TX XFER Information 			*/
-/*	3	*/  TWD_PRINT_TX_RESULT_INFO,		/**< 	Print TX Result Information 		*/
-/*	4	*/  TWD_CLEAR_TX_RESULT_INFO,		/**< 	Clear TX Result Information			*/
-/*	5	*/  TWD_CLEAR_TX_XFER_INFO          /**< 	Clear TX Xfer Information           */
-
-} ETwdPrintInfoType;
-#endif
-
-/** \enum EIpVer
- * \brief IP Version
- * 
- * \par Description
- * 
- * \sa TWD_PrintTxInfo
- */
-typedef enum
-{
-/*	0	*/	IP_VER_4 = 0, 	/**< */	
-/*	1	*/  IP_VER_6	 	/**< */
-
-} EIpVer;
-
-/** \enum EKeyType
- * \brief Key Type
- * 
- * \par Description
- * Security Key Type
- * 
- * \sa TSecurityKeys
- */
-typedef enum
-{
-/*	0	*/  KEY_NULL = 0,	/**< */
-/*	1	*/  KEY_WEP,		/**< */
-/*	2	*/  KEY_TKIP,		/**< */
-/*	3	*/  KEY_AES,		/**< */
-/*	4	*/  KEY_XCC,    	/**< */
-#ifdef GEM_SUPPORTED
-    /*  5   */  KEY_GEM
-#endif
-
-} EKeyType;
-
-/** \enum ERegistryTxRate
- * \brief TX Rate Type
- * 
- * \par Description
- * 
- * \sa
- */
-/* Make it same as "rate_e" */
-typedef enum
-{
-/* This value is reserved if this enum is used for MgmtCtrlTxRate - the auto mode is only valid for data packets */  
-/*	0	*/	REG_RATE_AUTO_BIT = 0, 		/**< */
-/*	1	*/	REG_RATE_1M_BIT,			/**< */
-/*	2	*/	REG_RATE_2M_BIT,			/**< */
-/*	3	*/	REG_RATE_5_5M_CCK_BIT,		/**< */
-/*	4	*/	REG_RATE_11M_CCK_BIT,		/**< */
-/*	5	*/	REG_RATE_22M_PBCC_BIT,		/**< */
-/*	6	*/	REG_RATE_6M_OFDM_BIT,		/**< */
-/*	7	*/	REG_RATE_9M_OFDM_BIT,		/**< */
-/*	8	*/	REG_RATE_12M_OFDM_BIT,		/**< */
-/*	9	*/	REG_RATE_18M_OFDM_BIT,		/**< */
-/*	10	*/	REG_RATE_24M_OFDM_BIT,		/**< */
-/*	11	*/	REG_RATE_36M_OFDM_BIT,		/**< */
-/*	12	*/	REG_RATE_48M_OFDM_BIT,		/**< */
-/*	13	*/	REG_RATE_54M_OFDM_BIT,		/**< */
-/*	14	*/	REG_RATE_MCS0_OFDM_BIT,		/**< */
-/*	15	*/	REG_RATE_MCS1_OFDM_BIT,		/**< */
-/*	16	*/	REG_RATE_MCS2_OFDM_BIT,		/**< */
-/*	17	*/	REG_RATE_MCS3_OFDM_BIT,		/**< */
-/*	18	*/	REG_RATE_MCS4_OFDM_BIT,		/**< */
-/*	19	*/	REG_RATE_MCS5_OFDM_BIT,		/**< */
-/*	20	*/	REG_RATE_MCS6_OFDM_BIT,		/**< */
-/*	21	*/	REG_RATE_MCS7_OFDM_BIT		/**< */
-
-} ERegistryTxRate;
-
-/** \enum EFailureEvent
- * \brief Failure Event
- * 
- * \par Description
- * Used as a parameter for Failure Event CB - 
- * Inicates Failure Event ID, according which the Failure 
- * Event's data is driven
- * 
- * \sa TWD_RegisterOwnCb, TFailureEventCb
- */
-typedef enum
-{
-/*	-1	*/	NO_FAILURE = -1,				/**< 	No Failure Event					*/
-/*	0	*/	NO_SCAN_COMPLETE_FAILURE = 0,	/**< 	No Scan Complete Failure Event		*/
-/*	1	*/	MBOX_FAILURE,					/**< 	Mail Box Failure Event				*/
-/*	2	*/	HW_AWAKE_FAILURE,				/**< 	HW Awake Failure Event				*/
-/*	3	*/	TX_STUCK,						/**< 	TX STUCK Failure Event				*/
-/*	4	*/	DISCONNECT_TIMEOUT,				/**< 	Disconnect Timeout Failure Event	*/
-/*	5	*/	POWER_SAVE_FAILURE,				/**< 	Power Save Failure Event			*/
-/*	6	*/	MEASUREMENT_FAILURE,			/**< 	Measurement Failure Event			*/
-/*	7	*/	BUS_FAILURE,					/**< 	Bus Failure Event					*/
-/*	8	*/	HW_WD_EXPIRE,					/**< 	HW Watchdog Expire Event			*/
-/*	9	*/	RX_XFER_FAILURE,			    /**< 	Rx pkt xfer failure                 */
-
-/* must be last!!! */
-/* 10	*/	MAX_FAILURE_EVENTS				/**< 	Maximum number of Failure Events	*/
-
-} EFailureEvent;
-
-/** \enum ETemplateType
- * \brief Template Type
- * 
- * \par Description
- * Used for setting/Getting a Template to/from FW
- * 
- * \sa TWD_CmdTemplate, TWD_WriteMibTemplateFrame, TSetTemplate TWD_GetTemplate
- */
-typedef enum
-{
-/*	0	*/	NULL_DATA_TEMPLATE = 0,		/**< NULL Data Template						*/
-/*	1	*/	BEACON_TEMPLATE,        	/**< Beacon Template						*/
-/*	2	*/	PROBE_REQUEST_TEMPLATE,     /**< PROBE Request Template					*/
-/*	3	*/	PROBE_RESPONSE_TEMPLATE,	/**< PROBE Response Template				*/
-/*	4	*/	QOS_NULL_DATA_TEMPLATE,		/**< Quality Of Service NULL Data Template	*/
-/*	5	*/	PS_POLL_TEMPLATE,			/**< Power Save Poll Template				*/
-/*	6	*/	KEEP_ALIVE_TEMPLATE,		/**< Keep Alive Template 					*/
-/*	7	*/	DISCONN_TEMPLATE,			/**< Disconn (Deauth/Disassoc) Template		*/
-/*	8	*/	ARP_RSP_TEMPLATE			/**< ARP Ressponse Template		            */
-} ETemplateType;
-
-
-
-
-typedef enum
-{
-    KEY_WEP_DEFAULT       = 0,
-    KEY_WEP_ADDR          = 1,
-    KEY_AES_GROUP         = 4,
-    KEY_AES_PAIRWISE      = 5,
-    KEY_WEP_GROUP         = 6,
-    KEY_TKIP_MIC_GROUP    = 10,
-    KEY_TKIP_MIC_PAIRWISE = 11
-} KeyType_enum;
-
-
-/** \enum ECipherSuite
- * \brief CHIPHER Suite
- * 
- * \par Description
- * Available cipher suites for admission control
- * 
- * \sa 
- */
-typedef enum
-{
-/*	0	*/	TWD_CIPHER_NONE = 0,			/**< no cipher suite 		*/
-/*	1	*/	TWD_CIPHER_WEP,        			/**< WEP-40 cipher suite 	*/
-/*	2	*/	TWD_CIPHER_TKIP,        		/**< TKIP cipher suite      */
-/*	3	*/	TWD_CIPHER_AES_WRAP,    		/**< AES WRAP cipher suite  */
-/*	4	*/	TWD_CIPHER_AES_CCMP,    		/**< AES CCMP cipher suite  */
-/*	5	*/	TWD_CIPHER_WEP104,      		/**< WEP-104 cipher suite 	*/
-/*	6	*/	TWD_CIPHER_CKIP,        		/**< CKIP cipher suite      */
-#ifdef GEM_SUPPORTED
-    /*	7	*/	TWD_CIPHER_GEM,         		/**< GEM cipher suite       */
-#endif
-            TWD_CIPHER_MAX,         		
-
-			TWD_CIPHER_UNKNOWN	= 255       /**< UNKNOWN chpiher suite 	*/
-
-} ECipherSuite;
-
-/** \enum E80211PsMode
- * \brief 802.11 Power Save Mode
- * 
- * \par Description
- * 
- * \sa TWD_Scan, TWD_SetPsMode
- */
-typedef enum 
-{
-/*	0	*/	POWER_SAVE_OFF = 0,		/**< 	power save 802.11 OFF   		*/
-/*	1	*/	POWER_SAVE_ON,			/**< 	power save 802.11 ON  			*/    
-/*	2	*/	POWER_SAVE_KEEP_CURRENT	/**< 	power save 802.11 don't change 	*/
-
-} E80211PsMode;
-
-/** \enum E80211PsStatus
- * \brief Set Power Save mode status
- * 
- * \par Description
- * 
- * \sa 
- */
-typedef enum
-{
-/*	1	*/	POWER_SAVE_802_11_SUCCESS = 1,	/**< 	power save mode Success   	*/
-/*	2	*/	POWER_SAVE_802_11_FAIL,			/**< 	power save mode Fail    	*/
-/*	3	*/	POWER_SAVE_802_11_NOT_ALLOWED,	/**< 	power save mode Not Allowed	*/
-/*	4	*/	POWER_SAVE_802_11_PENDING,		/**< 	power save mode Pending    	*/
-/*	5	*/	POWER_SAVE_802_11_IS_CURRENT	/**< 	power save mode Is Current 	*/
-
-} E80211PsStatus;
-
-/** \enum EElpCtrlMode
- * \brief ELP Control Mode
- * 
- * \par Description
- * 
- * \sa 
- */
-typedef enum 
-{
-/*	0	*/	ELPCTRL_MODE_NORMAL = 0,	/**< ALP Control mode Normal   		*/
-/*	1	*/	ELPCTRL_MODE_KEEP_AWAKE		/**< ALP Control mode Keep Awake   	*/
-
-} EElpCtrlMode;
-
-/** \enum EPreamble
- * \brief Preamble Type
- * 
- * \par Description
- * 
- * \sa TWD_CfgPreamble
- */
-typedef enum
-{
-    PREAMBLE_LONG       	= 0,	/**< Preamble type Long   			*/
-    PREAMBLE_SHORT          = 1,	/**< Preamble type Short   			*/
-
-    PREAMBLE_UNSPECIFIED    = 0xFF	/**< Preamble type Not Specified   	*/
-
-} EPreamble;
-
-/** \enum ENoiseHistogramCmd
- * \brief Noise Histogram Type
- * 
- * \par Description
- * 
- * \sa TNoiseHistogram, TWD_CmdNoiseHistogram
- */
-typedef enum
-{
-     STOP_NOISE_HIST                    = 0,	/**< Stop Noise Histogram	*/
-     START_NOISE_HIST                   = 1		/**< Start Noise Histogram	*/
-
-} ENoiseHistogramCmd;
-
-/** \enum ETnetWakeOn
- * \brief ACX Wake Up Condition
- * 
- * \par Description
- * 
- * \sa TPowerMgmtConfig, TWD_CfgWakeUpCondition
- */
-typedef enum 
-{
-    
-/*	0	*/	TNET_WAKE_ON_BEACON = 0,       	/**< Indicate the wake on event of the HW - beacon.
-											* In this event the HW configure to be awake on every beacon.
-											*/
-
-/*	1	*/	TNET_WAKE_ON_DTIM,             /**< Indicate the wake on event of the HW - DTIM. In this event
-											* the HW configure to be awake on every DITM (configure by the AP).
-											*/
-
-/*	2	*/	TNET_WAKE_ON_N_BEACON,          /**< Indicate the wake on event of the HW - listen interval.
-											* In this event the HW configure to be awake on every
-											* configured number of beacons.
-											*/
-
-/*	3	*/	TNET_WAKE_ON_N_DTIM,            /**< Indicate the wake on event of the HW - listen interval.
-											* In this event the HW configure to be awake on every
-											* configured number of beacons.
-											*/
-
-/*	4	*/	TNET_WAKE_ON_HOST              /**< Indicate the wake on event of the HW - Host access only
-											*/
-                                
-} ETnetWakeOn;
-
-/** \enum ETxAntenna
- * \brief TX Antenna Types
- * 
- * \par Description
- * 
- * \sa TGeneralInitParams, TTwdParamContents
- */
-typedef enum
-{
-    TX_ANTENNA_2	= 0, 	/**< */   
-    TX_ANTENNA_1    = 1		/**< */
-
-} ETxAntenna;
-
-/** \enum ERxAntenna
- * \brief RX Antenna Types
- * 
- * \par Description
- * 
- * \sa TGeneralInitParams, TTwdParamContents
- */
-typedef enum
-{
-/*	0	*/	RX_ANTENNA_1 = 0,	/**< */
-/*	1	*/	RX_ANTENNA_2,		/**< */
-/*	2	*/	RX_ANTENNA_FULL,	/**< */
-/*	3	*/	RX_ANTENNA_PARTIAL	/**< */
-
-} ERxAntenna;
-
-/** \enum EPowerPolicy
- * \brief Save Power Level Policy
- * 
- * \par Description
- * 
- * \sa TWD_CfgSleepAuth
- */
-typedef enum 
-{
-/*	0	*/	POWERAUTHO_POLICY_ELP = 0,	/**< */
-/*	1	*/	POWERAUTHO_POLICY_PD,		/**< */
-/*	2	*/	POWERAUTHO_POLICY_AWAKE,	/**< */
-/*	3	*/	POWERAUTHO_POLICY_NUM		/**< */
-
-} EPowerPolicy;
-
-/** \enum ESoftGeminiEnableModes
- * \brief Soft-Gemini Enable Modes
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum
-{
-/*	0	*/	SG_DISABLE = 0,			/**< */
-/*	1	*/	SG_PROTECTIVE,			    /**< */
-/*	2	*/	SG_OPPORTUNISTIC,	/**< */
-
-
-} ESoftGeminiEnableModes;
-/** \enum ESoftGeminiEnableProfile
- * \brief Soft-Gemini Profile Modes for S60 configuration
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum
-{
-    BtCoexProfData = 0,
-    BtCoexProfDataLowLatency,
-    BtCoexProfA2DP
-}ESoftGeminiEnableProfile;
-
-
-/** \enum EMibTemplateType
- * \brief MIB Template type
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum
-{                                       	
-/*	0	*/ 	TEMPLATE_TYPE_BEACON = 0,           /**< 	BEACON template 			*/
-/*	1	*/  TEMPLATE_TYPE_PROBE_REQUEST,        /**< 	PROB template 				*/
-/*	2	*/  TEMPLATE_TYPE_NULL_FRAME,           /**< 	NULL FRAM template 			*/
-/*	3	*/  TEMPLATE_TYPE_PROBE_RESPONSE,       /**< 	PROB Response template 		*/
-/*	4	*/  TEMPLATE_TYPE_QOS_NULL_FRAME,       /**< 	QOS Null Frame template 	*/
-/*	5	*/  TEMPLATE_TYPE_PS_POLL               /**< 	Power Save Poll template	*/
-
-} EMibTemplateType;
-
-
-/** \enum ERxFailure
- * \brief RX Failure/Error
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum
-{
-/*	0	*/	RX_FAILURE_NONE = 0,		/**< No Failure		*/
-/*	1	*/	RX_FAILURE_DECRYPT,         /**< DeCrypt Failure	*/
-/*	2	*/	RX_FAILURE_MIC_ERROR,		/**< MIC Error		*/
-} ERxFailure;
-
-/** \enum ETwdChannelWidth
- * \brief TWD Channel Width
- * 
- * \par Description
- * Used for Configure HT Capabilities Settings
- * 
- * \sa TWD_SetDefaults, TTwdHtCapabilities
- */
-typedef enum
-{   
-/*	0	*/	CHANNEL_WIDTH_20MHZ = 0,		/**< 20MHZ Channel Width	*/
-/*	1	*/  CHANNEL_WIDTH_40MHZ_20MHZ		/**< 40-20MHZ Channel Width	*/
-} ETwdChannelWidth;
-
-/** \enum ETwdRxSTBC
- * \brief RX STBC Spatial Stream Supported
- * 
- * \par Description
- * Indicates how many RX STBC Spatial Stream are Supported
- * Used for Configure HT Capabilities Settings
- * 
- * \sa TWD_SetDefaults, TTwdHtCapabilities
- */
-typedef enum
-{   
-/*	0	*/	RXSTBC_NOT_SUPPORTED  =   0,							/**< No Spatial Stream Supported					*/
-/*	1	*/  RXSTBC_SUPPORTED_ONE_SPATIAL_STREAM, 					/**< One Spatial Stream Supported					*/
-/*	2	*/  RXSTBC_SUPPORTED_ONE_AND_TWO_SPATIAL_STREAMS,			/**< One and Two Spatial Stream Supported			*/
-/*	3	*/  RXSTBC_SUPPORTED_ONE_TWO_AND_THREE_SPATIAL_STREAMS	/**< One, Two and Three Spatial Stream Supported	*/
-
-} ETwdRxSTBC;
-
-/** \enum ETwdMaxAMSDU
- * \brief Maximum MSDU Octets
- * 
- * \par Description
- * Used for Configure HT Capabilities Settings
- * 
- * \sa TWD_SetDefaults, TTwdHtCapabilities
- */
-typedef enum
-{   
-/*	0	*/	MAX_MSDU_3839_OCTETS = 0,	/**< Maximum MSDU Octets Number: 3839	*/
-/*	1	*/  MAX_MSDU_7935_OCTETS		/**< Maximum MSDU Octets Number: 7935	*/
-
-} ETwdMaxAMSDU;
-
-/** \enum ETwdMaxAMPDU
- * \brief Maximum MPDU Octets
- * 
- * \par Description
- * Indicates What is the Maximum MPDU Octets Number
- * Used for Configure HT Capabilities Settings
- * 
- * \sa TWD_SetDefaults, TTwdHtCapabilities
- */
-
-/*
- ==============
-
- IMPORTANT NOTE - Changes to this enumeration must check weather MIN and MAX values 
-                  should be updated
- ==============
-*/
-typedef enum
-{   
-            MAX_MPDU_MIN_VALUE = 0,
-
-/*	0	*/	MAX_MPDU_8191_OCTETS = MAX_MPDU_MIN_VALUE,	/**< Maximum MPDU Octets Number: 8191	*/
-/*	1	*/  MAX_MPDU_16383_OCTETS,		                /**< Maximum MPDU Octets Number: 16383	*/
-/*	2	*/  MAX_MPDU_32767_OCTETS,		                /**< Maximum MPDU Octets Number: 32767	*/
-/*	3	*/  MAX_MPDU_65535_OCTETS,		                /**< Maximum MPDU Octets Number: 65535	*/
-
-            MAX_MPDU_MAX_VALUE = MAX_MPDU_65535_OCTETS
-
-} ETwdMaxAMPDU;
-
-
-/** \enum ETwdAMPDUSpacing
- * \brief TWD AMPDU Spacing
- * 
- * \par Description
- * Indicates What is the Time Spacing of AMPDU
- * Used for Configure HT Capabilities Settings
- * 
- * \sa TWD_SetDefaults, TTwdHtCapabilities
- */
-typedef enum
-{   
-/*	0	*/	AMPDU_SPC_NO_RESTRCITION =  0,	/**< No Restriction on AMPDU Time Spacing	*/ 	    
-/*	1	*/	AMPDU_SPC_1_4_MICROSECONDS, 	/**< 1/4 Microsecond AMPDU Time Spacing   	*/
-/*	2	*/	AMPDU_SPC_1_2_MICROSECONDS, 	/**< 1/2 Microsecond AMPDU Time Spacing   	*/
-/*	3	*/	AMPDU_SPC_1_MICROSECOND,  		/**< 1 Microsecond AMPDU Time Spacing   	*/
-/*	4	*/	AMPDU_SPC_2_MICROSECONDS,		/**< 2 Microsecond AMPDU Time Spacing   	*/
-/*	5	*/	AMPDU_SPC_4_MICROSECONDS,		/**< 4 Microsecond AMPDU Time Spacing   	*/
-/*	6	*/	AMPDU_SPC_8_MICROSECONDS,		/**< 8 Microsecond AMPDU Time Spacing   	*/
-/*	7	*/	AMPDU_SPC_16_MICROSECONDS 		/**< 16 Microsecond AMPDU Time Spacing   	*/
-
-} ETwdAMPDUSpacing;
-
-/** \enum ETwdMcsSupport
- * \brief TWD MCS Support
- * 
- * \par Description
- * BIT Mapp which Indicates What is the Tx/rx MCS Support Enabled
- * Used for Configure HT Capabilities Settings
- * 
- * \sa TWD_SetDefaults, TTwdHtCapabilities
- */
-typedef enum
-{   
-/*	1	*/	MCS_SUPPORT_MCS_0   =  BIT_0,	/**< BIT 0	*/
-/*	2	*/	MCS_SUPPORT_MCS_1   =  BIT_1,	/**< BIT 1	*/
-/*	3	*/	MCS_SUPPORT_MCS_2   =  BIT_2,	/**< BIT 2	*/
-/*	4	*/	MCS_SUPPORT_MCS_3   =  BIT_3,	/**< BIT 3	*/
-/*	5	*/	MCS_SUPPORT_MCS_4   =  BIT_4,	/**< BIT 4	*/
-/*	6	*/	MCS_SUPPORT_MCS_5   =  BIT_5,	/**< BIT 5	*/
-/*	7	*/	MCS_SUPPORT_MCS_6   =  BIT_6,	/**< BIT 6	*/
-/*	8	*/	MCS_SUPPORT_MCS_7   =  BIT_7	/**< BIT 7	*/
-
-} ETwdMcsSupport;
-
-/** \enum ETwdPCOTransTime
- * \brief TWD PCO Transition Time
- * 
- * \par Description
- * Indicates What is the PCO Transition Time
- * Used for Configure HT Capabilities Settings
- * 
- * \sa TWD_SetDefaults, TTwdHtCapabilities
- */
-typedef enum
-{   
-/*	0	*/	PCO_TRANS_TIME_NO_TRANSITION = 0, 	/**< No PCO Transition Time					*/    
-/*	1	*/	PCO_TRANS_TIME_400_MICROSECONDS, 	/**< PCO Transition Time: 400 Microsecond	*/
-/*	2	*/	PCO_TRANS_TIME_1_5_MILLISECONDS, 	/**< PCO Transition Time: 1.5 Millisecond	*/
-/*	3	*/	PCO_TRANS_TIME_5_MILLISECONDS		/**< PCO Transition Time: 5 Millisecond		*/
-
-} ETwdPCOTransTime;
-
-/** \enum ETwdHTCapabilitiesBitMask
- * \brief TWD HT Capabilities Bit Mask Mapping
- * 
- * \par Description
- * Mapps the Bit Mask which are used for Making (Enabling/Disabling) 
- * HT Capabilities 
- * 
- * \sa TWD_SetDefaults, TTwdHtCapabilities
- */
-typedef enum
-{
-/*	1	*/	CAP_BIT_MASK_GREENFIELD_FRAME_FORMAT           =  BIT_0,	/**< BIT 0	*/
-/*	2	*/	CAP_BIT_MASK_SHORT_GI_FOR_20MHZ_PACKETS        =  BIT_1,	/**< BIT 1	*/
-/*	3	*/	CAP_BIT_MASK_SHORT_GI_FOR_40MHZ_PACKETS        =  BIT_2,	/**< BIT 2	*/
-/*	4	*/	CAP_BIT_MASK_SUPPORT_FOR_STBC_IN_TRANSMISSION  =  BIT_3,	/**< BIT 3	*/
-/*	5	*/	CAP_BIT_MASK_DELAYED_BLOCK_ACK                 =  BIT_4,	/**< BIT 4	*/
-/*	6	*/	CAP_BIT_MASK_DSSS_CCK_IN_40_MHZ                =  BIT_5,	/**< BIT 5	*/
-/*	7	*/	CAP_BIT_MASK_LSIG_TXOP_PROTECTION              =  BIT_6,	/**< BIT 6	*/
-/*	8	*/	CAP_BIT_MASK_PCO                               =  BIT_7,	/**< BIT 7	*/
-/*	9	*/	CAP_BIT_MASK_LDPC_CODING                       =  BIT_8		/**< BIT 8	*/
-
-} ETwdHTCapabilitiesBitMask;
-
-/** \enum ETwdMCSFeedback
- * \brief TWD MCS FeedBack
- * 
- * \par Description
- * Indicates what is the MCS FeedBack Policy 
- * Used for Configure HT Capabilities Settings
- * 
- * \sa TWD_SetDefaults, TTwdHtCapabilities
- */
-typedef enum
-{   
-/*	0	*/	MCS_FEEDBACK_NO = 0,						/**< */
-/*	1	*/	MCS_FEEDBACK_RESERVED,						/**< */
-/*	2	*/	MCS_FEEDBACK_UNSOLICTED_ONLY,				/**< */
-/*	3	*/	MCS_FEEDBACK_BOTH_SOLICTED_AND_UNSOLICTED	/**< */
-} ETwdMCSFeedback;
-
-/** \enum ETwdTxMcsSet
- * \brief TWD TX MCS Set
- * 
- * \par Description
- * Indicates Whether to set Tx MCS
- * 
- * \sa
- */
-typedef enum
-{   
-    TX_MCS_SET_NO   =   0, 	/**< Don't Set Tx MCS	*/ 
-    TX_MCS_SET_YES  =   1	/**< Set Tx MCS			*/
-} ETwdTxMcsSet;
-
-/** \enum ETwdTxRxNotEqual
- * \brief TWD TX RX Not Equal
- * 
- * \par Description
- * Indicates Whether the TX and RX channels are equal
- * 
- * \sa
- */
-typedef enum
-{   
-    TX_RX_NOT_EQUAL_NO   =   0,	/**< TX and RX Channels are not equal	*/ 
-    TX_RX_NOT_EQUAL_YES  =   1	/**< TX and RX Channels are equal		*/ 
-} ETwdTxRxNotEqual;
-
-/** \enum ETwdHtcSupport
- * \brief TWD HTc Support
- * 
- * \par Description
- * Indicates Whether the HT Capability is Supported
- * 
- * \sa
- */
-typedef enum
-{   
-    HTC_SUPPORT_NO   =   0,	/**< HT Capability is not Supported		*/ 
-    HTC_SUPPORT_YES  =   1	/**< HT Capability is Supported			*/ 
-} ETwdHtcSupport;
-
-/** \enum ESendCompleteStatus
- * \brief Send complete status
- * 
- * \par Description
- * Indicates the current Success/Failure Status of Completion of Send Operation
- * 
- * \sa
- */
-typedef enum
-{
-/*	0	*/	SEND_COMPLETE_SUCCESS = 0,			/**< Send Complete Success: Completion of Send Operation is OK					
-												*/
-/*	1	*/	SEND_COMPLETE_RETRY_EXCEEDED,		/**< Send Complete Retry Exceeded: 
-												* Completion of Send Operation filed because it Exceeded Allowed retries Number	
-												*/
-/*	2	*/	SEND_COMPLETE_LIFETIME_EXCEEDED,	/**< Send Complete Lifetiem Exceeded: 
-												* Completion of Send Operation failed because it Exceeded Allowed Lifetime	
-												*/
-/*	3	*/	SEND_COMPLETE_NO_LINK,				/**< Send Complete No Link: 
-												* Completion of Send Operation failed because No Link was found  					
-												*/
-/*	4	*/	SEND_COMPLETE_MAC_CRASHED			/**< Send Complete MAC Crashed: 
-												* Completion of Send Operation failed because MAC Crashed							
-												*/
-} ESendCompleteStatus;
-
-/** \enum EPacketType
- * \brief Packet type
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum 
-{ 
-/*	0	*/	PACKET_DATA = 0, 	/**< */
-/*	1	*/	PACKET_CTRL, 		/**< */
-/*	2	*/	PACKET_MGMT 		/**< */
-
-} EPacketType;
-
-/** \enum ETxHwQueStatus
- * \brief Status returned by txHwQueue_AllocResources 
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum
-{   
-    TX_HW_QUE_STATUS_SUCCESS,       /* Resources available on current queue */
-    TX_HW_QUE_STATUS_STOP_CURRENT,  /* No resources, stop current queue and requeue the packet */
-    TX_HW_QUE_STATUS_STOP_NEXT      /* Resources available for this packet but not for another one, 
-                                          so just stop the current queue */
-} ETxHwQueStatus;
-
-/** \enum ERxBufferStatus
- * \brief Status returned by TRequestForBufferCb 
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum
-{   
-    RX_BUF_ALLOC_PENDING,
-    RX_BUF_ALLOC_COMPLETE,
-    RX_BUF_ALLOC_OUT_OF_MEM
-
-}ERxBufferStatus;
-
-
-typedef enum
-{
-    ArpFilterDisabled,
-    ArpFilterEnabled,
-    ArpFilterEnabledAutoMode = 3
-} EArpFilterType;
-
-/*
- * --------------------------------------------------------------
- *	Structures
- * --------------------------------------------------------------
- */
-/**
- * \brief Get File Callback
- * 
- * \param  hCbHndl	- Handle to CB Object
- * \return void 
- * 
- * \par Description
- * The callback function type for GetFile users
- * 
- * \sa 	TFileInfo
- */ 
-typedef void (*TGetFileCbFunc)(TI_HANDLE hCbHndl);
-
-/** \struct TFileInfo
- * \brief File Information
- * 
- * \par Description
- * Contains all needed information and structures for Getting file
- * 
- * \sa	TWD_InitFw
- */ 
-typedef struct
-{
-    EFileType   	eFileType;  		/**< Requested file type */
-    TI_UINT8   		*pBuffer;    		/**< Pointer to Buffer into the file (or file portion) is copied from user space */
-    TI_UINT32   	uLength;    		/**< Length of data currently held in pBuffer */
-    TI_UINT32   	uOffset;    		/**< Offset in File of data currently held in pBuffer */
-    TI_UINT32   	uAddress;    		/**< Offset in File of data currently held in pBuffer */
-    TI_BOOL     	bLast;      		/**< TRUE indicates that we reached end of file */
-    void       		*hOsFileDesc;		/**< OAL file-descriptor handle for repeated access to same file (FW) */
-    TGetFileCbFunc  fCbFunc;			/**< CB function to call if file read is finished in a later context (future option) */
-    TI_HANDLE       hCbHndl;			/**< Handle to provide when calling fCbFunc */
-    TI_UINT32		uChunksLeft;		/**< Chunks Left to read from File (used if file is read in chunks) */
-    TI_UINT32		uChunkBytesLeft;	/**< Number of bytes of Last read chunk, which were not yet handled  */
-    TI_UINT32		uCrcCalc;			/**< Current Calculated CRC  */
-} TFileInfo;
-
-/** \struct T80211Header
- * \brief 802.11 MAC header
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-    TI_UINT16                           fc;			/**< */
-    TI_UINT16                           dur;		/**< */
-    TMacAddr                            address1;	/**< */
-    TMacAddr                            address2;	/**< */
-    TMacAddr                            address3;	/**< */
-    TI_UINT16                           seq;		/**< */
-    TI_UINT16                           qos;		/**< */
-
-}  T80211Header;
-
-/** \struct TKeepAliveParams
- * \brief Keep Alive Parameters
- * 
- * \par Description
- * 
- * \sa	TWD_CfgKeepAlive
- */ 
-typedef struct
-{
-    TI_UINT8                index;		/**< */
-    TI_UINT8                enaDisFlag;	/**< */
-    TI_UINT32               interval;	/**< */
-    EKeepAliveTriggerType   trigType;	/**< */
-
-} TKeepAliveParams;
-
-/** \struct TPsRxStreaming
- * \brief Power Save RX Streaming
- * 
- * \par Description
- * The configuration of Rx streaming delivery in PS mode per TID
- * 
- * \sa	TWD_CfgKeepAlive
- */ 
-typedef struct
-{
-    TI_UINT32               uTid;           /**< The configured TID (0-7) */
-    TI_UINT32               uStreamPeriod;  /**< The expected period between two packets of the delivered stream */
-    TI_UINT32               uTxTimeout;     /**< Start sending triggers if no Tx traffic triggers arrive for this priod */
-    TI_BOOL                 bEnabled;       /**< If TRUE enable this TID streaming, if FALSE disable it. */
-
-} TPsRxStreaming;
-
-/** \struct TDmaParams
- * \brief DMA Parameters
- * 
- * \par Description
- * Struct which holds DMA Rx/Tx Queues and Bufffers params
- * 
- * \sa
- */ 
-typedef struct
-{
-    TI_UINT32                           NumRxBlocks;				/**< Allocated RX memory blocks number 	    */
-    TI_UINT32                           NumTxBlocks;				/**< Allocated TX memory blocks number      */
-    TI_UINT8                            NumStations;				/**< Number of Stations						*/
-    void                                *fwTxResultInterface;		/**< RX minimum Memory block number 		*/
-    TI_UINT8                            *fwRxCBufPtr;				/**< Pointer to FW RX Control Buffer		*/
-    TI_UINT8                            *fwTxCBufPtr;				/**< Pointer to FW TX Control Buffer		*/
-	void                                *fwRxControlPtr;			/**< Pointer to FW TX Control 				*/
-	void                                *fwTxControlPtr;			/**< Pointer to FW RX Control 				*/
-    TI_UINT32                           PacketMemoryPoolStart;      /**< RX Memory block offset 				*/  
-} TDmaParams;
-
-/** \struct TSecurityKeys
- * \brief Security Key
- * 
- * \par Description
- * Struct which holds Security Key Parameters
- * Used for handling DMA
- * 
- * \sa
- */ 
-typedef struct
-{
-    EKeyType                            keyType; 				/**< Security Key Type (WEP, TKIP etc.)			*/               
-    TI_UINT32                           encLen;					/**< Security Key length in bytes				*/
-    TI_UINT8                            encKey[MAX_KEY_LEN];	/**< Security Key Encoding						*/
-    TI_UINT8                            micRxKey[MAX_KEY_LEN];	/**< MIC RX Security Key 						*/
-    TI_UINT8                            micTxKey[MAX_KEY_LEN];	/**< MIC TX Security Key						*/
-    TI_UINT32                           keyIndex;     			/**< Security Key Index (id=0 is broadcast key)	*/                  
-    TMacAddr                            macAddress;				/**< Security Key MAC Address					*/
-    TI_UINT8                            keyRsc[KEY_RSC_LEN];	/**< Security Key RSC							*/
-
-} TSecurityKeys;
-
-/** \struct TxPktParams_t
- * \brief TX Packet Parameters
- * 
- * \par Description
- * Tx Control-Block Packet parameters that are not included in the Tx-descriptor
- * 
- * \sa
- */ 
-typedef struct
-{
-    void *         pInputPkt;       /**< The input packet to the Tx path, either OS packet or raw buffer (see RAW_BUF_PKT flag) */         
-    TI_UINT32      uInputPktLen;    /**< The input packet length in bytes (for freeing it in case of raw buffer)  */         
-    TI_UINT32      uDriverDelay;    /**< The time in uSec the pkt was delayed in the driver until Xfer 			  */
-    TI_UINT8       uPktType;        /**< See TX_PKT_TYPE_xxxx above                                               */          
-    TI_UINT8       uHeadroomSize;   /**< Only for WHA - headroom in bytes before the payload in the packet buffer */          
-    TI_UINT16      uFlags;          /**< See TX_CTRL_FLAG__xxxx above 										      */          
-
-} TTxPktParams;
-
-
-/** \struct TTxCtrlBlk
- * \brief TX Control Block Entry
- * 
- * \par Description
- * Contains the Tx packet parameters required for the Tx process, including
- * the Tx descriptor and the attributes required for HW-queue calculations.
- * TX Control Block Entry is allocated for each packet sent from the upper 
- * driver and freed upon Tx-complete.
- * The entry index is the descriptor-ID. It is written in the descriptor and 
- * copied back into the tx-complete results
- * 
- * \sa	SendPacketTranferCB_t, SendPacketDebugCB_t, TWD_txCtrlBlk_alloc, TWD_txCtrlBlk_free, TWD_txCtrlBlk_GetPointer, TWD_txXfer_sendPacket
- */ 
-typedef struct _TTxCtrlBlk
-{
-    TTxnStruct          tTxnStruct;               /**< The transaction structure for packet queueing and transaction via the bus driver */ 
-    TxIfDescriptor_t    tTxDescriptor;            /**< The packet descriptor copied to the FW  */    
-    TI_UINT8            aPktHdr[MAX_HEADER_SIZE]; /**< The packet header + extensions (see description of MAX_HEADER_SIZE above) */    
-    TTxPktParams        tTxPktParams;             /**< Per packet parameters not included in the descriptor */
-    struct _TTxCtrlBlk  *pNextFreeEntry;          /**< Pointer to the next free entry */ 
-    struct _TTxCtrlBlk  *pNextAggregEntry;        /**< Pointer to the next aggregated packet entry */
-
-} TTxCtrlBlk;
-
-
-/** \struct TTemplateParams
- * \brief Template Parameters
- * 
- * \par Description
- * 
- * \sa	TWD_GetTemplate
- */ 
-typedef struct
-{
-    TI_UINT32            Size;		   				/**< Template size					*/  			
-    TI_UINT32            uRateMask;                 /**< The rates bitmap for the frame */ 			
-    TI_UINT8             Buffer[MAX_TEMPLATE_SIZE];	/**< Buffer which holds Template	*/  			
-
-} TTemplateParams;
-
-/** \struct TFwInfo
- * \brief FW Information
- * 
- * \par Description
- * 
- * \sa	TWD_GetFWInfo
- */ 
-typedef struct
-{
-    TI_UINT8                            fwVer[FW_VERSION_LEN];  /**< Firmware version - null terminated string 	*/
-    TMacAddr                            macAddress;				/**< MAC Address								*/
-    TI_UINT8                            txPowerTable[NUMBER_OF_SUB_BANDS_E][NUM_OF_POWER_LEVEL]; /**< Maximun Dbm in Dbm/10 units */
-    TI_UINT32                           uHardWareVersion;		/**< HW Version									*/
-
-} TFwInfo;  
-
-/** \struct TJoinBss
- * \brief Join BSS Parameters
- * 
- * \par Description
- * 
- * \sa	TWD_CmdJoinBss
- */ 
-typedef struct
-{
-    ScanBssType_e                       bssType;			/**< */
-    TI_UINT16                           beaconInterval;		/**< */
-    TI_UINT16                           dtimInterval;		/**< */
-    TI_UINT8                            channel;			/**< */
-    TI_UINT8*                           pBSSID;				/**< */
-    TI_UINT8*                           pSSID;				/**< */
-    TI_UINT8                            ssidLength;			/**< */
-    TI_UINT32                           basicRateSet;      	/**< */ 
-    ERadioBand                          radioBand;			/**< */
-    /* Current Tx-Session index as configured to FW in last Join command */
-    TI_UINT16                           txSessionCount;    	/**< */     
-
-} TJoinBss;
-
-/** \struct TSetTemplate
- * \brief Set Template Parameters
- * 
- * \par Description
- * 
- * \sa	TWD_CmdTemplate, TWD_WriteMibTemplateFrame
- */ 
-typedef struct
-{
-    ETemplateType                       type;	/**< Template Type							*/
-    TI_UINT8                            index;  /**< only valid for keep-alive templates	*/
-    TI_UINT8*                           ptr;	/**< Pointer to Template Data		  		*/
-    TI_UINT32                           len;	/**< Template Length            	  		*/
-    ERadioBand                          eBand; 	/**< only valid for probe request templates	*/
-    TI_UINT32                           uRateMask;/**< The rate mask to use for this frame  */
-    
-} TSetTemplate;
-
-/** \struct TNoiseHistogram
- * \brief Noise Histogram Parameters
- * 
- * \par Description
- * 
- * \sa	TWD_CmdNoiseHistogram
- */ 
-typedef struct
-{
-    ENoiseHistogramCmd                  cmd;												/**< Noise Histogram Command (Start/Atop)	*/
-    TI_UINT16                           sampleInterval;										/**< Sample Interval (in microsec)			*/
-    TI_UINT8                            ranges [MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES];	/**< Noise Histogram Ranges					*/
-
-} TNoiseHistogram;
-
-/** \struct TInterogateCmdHdr
- * \brief Interrogate Command Header
- * 
- * \par Description
- * 
- * \sa	TNoiseHistogramResults, TMediumOccupancy, TTsfDtim
- */ 
-typedef struct
-{
-    TI_UINT16                           id;		/**< */
-    TI_UINT16                           len;	/**< */
-
-} TInterogateCmdHdr;
-
-/** \struct TNoiseHistogramResults
- * \brief Noise Histogram Results
- * 
- * \par Description
- * Used for Getting Noise Histogram Parameters from FW
- * 
- * \sa
- */ 
-typedef struct
-{
-    TInterogateCmdHdr                   noiseHistResCmdHdr;							/**< Results Header						*/
-    TI_UINT32                           counters[NUM_OF_NOISE_HISTOGRAM_COUNTERS];	/**< Counters							*/
-    TI_UINT32                           numOfLostCycles;							/**< Number of Lost Cycles				*/
-    TI_UINT32                           numOfTxHwGenLostCycles;						/**< Number of Tx Hw Gen Lost Cycles	*/
-    TI_UINT32                           numOfRxLostCycles;							/**< Number of RX Hw Gen Lost Cycles	*/
-
-} TNoiseHistogramResults;
-
-/** \struct TMediumOccupancy
- * \brief Medium Occupancy Parameters
- * 
- * \par Description
- * Used for Getting Medium Occupancy (Channal Load) from FW
- * or print Medium Occupancy (Channal Load) Debug Information
- * 
- * \sa
- */ 
-typedef struct
-{
-    TInterogateCmdHdr                   mediumOccupCmdHdr;	/**< Command Header						*/
-    TI_UINT32                           MediumUsage;		/**< Medium Occupancy Usage Time		*/
-    TI_UINT32                           Period;				/**< Medium Occupancy Period Time		*/
-
-} TMediumOccupancy;
-
-/** \struct TTsfDtim
- * \brief Beacon TSF and DTIM count
- * 
- * \par Description
- * Used for Getting updated current TSF and last Beacon TSF and DTIM Count from FW
- * for Scan Purposes
- * 
- * \sa
- */ 
-typedef struct
-{
-    TInterogateCmdHdr                   tsf_dtim_mibCmdHdr;	/**< Command Header						*/
-    TI_UINT32                           CurrentTSFHigh;		/**< Current TSF High (of INT64) Value	*/
-    TI_UINT32                           CurrentTSFLow;		/**< Current TSF Low (of INT64) Value	*/
-    TI_UINT32                           lastTBTTHigh;		/**< Last TBTT High (of INT64) Value	*/
-    TI_UINT32                           lastTBTTLow;		/**< Last TBTT Low (of INT64) Value		*/
-    TI_UINT8                            LastDTIMCount;		/**< Last DTIM Count			      	*/
-    TI_UINT8                            Reserved[3];		/**< Reserved							*/
-
-} TTsfDtim;
-
-/** \struct TBcnBrcOptions
- * \brief Beacon broadcast options
- * 
- * \par Description
- * Used for Getting/Configuring updated Beacon broadcast options from/to FW
- * 
- * \sa	TWD_SetDefaults
- */ 
-typedef struct 
-{
-    TI_UINT16                           BeaconRxTimeout;		/**< Beacon RX Timeout			*/
-    TI_UINT16                           BroadcastRxTimeout;		/**< Broadcast RX Timeout		*/
-    TI_UINT8                            RxBroadcastInPs;		/**< RX Broadcast In Power Save	*/
-
-} TBcnBrcOptions;
-
-/** \struct TBeaconFilterIeTable
- * \brief Beacon Filter Information Elements Table
- * 
- * \par Description
- * Used for Getting/Configuring Beacon Filter IE Table From/To FW
- * 
- * \sa	TWD_SetDefaults
- */ 
-typedef struct
-{
-    TI_UINT8                            numberOfIEs;							/**< Number of IE Tables 			*/
-    TI_UINT8                            IETable[BEACON_FILTER_TABLE_MAX_SIZE];	/**< The IE table					*/
-    TI_UINT8                            IETableSize;							/**< number of elements in IE table	*/
-
-} TBeaconFilterIeTable;
-
-/** \struct TBeaconFilterInitParams
- * \brief Beacon Filter Init Parameters
- * 
- * \par Description
- * Used for Init Beacon Filter IE Table in FW
- * 
- * \sa
- */ 
-typedef struct
-{
-    TI_UINT8                            desiredState;								/**< Desigred state (required/not required)			*/
-    TI_UINT8                            numOfStored;								/**< Number of desigred Beacon Filters stored in FW	*/
-    TI_UINT8                            numOfElements;								/**< Number of Beacon Filter Elements stored in FW	*/
-    TI_UINT8                            IETableSize;								/**< The IE Table size								*/
-    TI_UINT8                            reserve[3];									/**< Reserved										*/
-    TI_UINT8                            IETable[BEACON_FILTER_IE_TABLE_MAX_SIZE]; 	/**< The IE table							   		*/
-
-} TBeaconFilterInitParams;
-
-/** \struct TPowerMgmtConfig
- * \brief Power Management Configuration Parameters
- * 
- * \par Description
- * Used for Configuring Wake-Up Conditions or Beacon Broadcast Options to FW
- * 
- * \sa	TWD_CfgWakeUpCondition, TWD_CfgBcnBrcOptions
- */ 
-typedef struct
-{
-	/* power management options */
-    TI_UINT8                            beaconListenInterval;		/**< Beacon Listen Interavl:
-																	* specify how often the TNET wakes up to listen to beacon frames. 
-																	* the value is expressed in units of "beacon interval"	
-																	*/
-    TI_UINT8                            beaconFiltering;			/**< Beacon Filtering Desigred state (required/not required)			*/
-    TI_UINT8                            DTIMListenInterval;			/**< DTIM Listen Interavl:
-																	* specify how often the TNET wakes up to listen to DTIM frames. the value 
-																	* is expressed in units of "dtim interval"
-																	*/
-    TI_UINT8                            NConsecutiveBeaconMiss;		/**< Consecutive Beacon Miss											*/
-    TI_UINT8                            hangoverPeriod;				/**< Hang Over Period													*/
-    TI_UINT8                            HwPsPollResponseTimeout;	/**< Power-Save Polling Response Time Out								*/
-    TI_UINT32                           BaseBandWakeUpTime;			/**< Base Band Wakeup Time												*/
-    TI_UINT32                           beaconReceiveTime;			/**< Beacon Receive Time												*/
-    TI_BOOL                             beaconMissInterruptEnable;	/**< Enable/Disable Beacon Miss Interrupt   							*/
-    TI_BOOL                             rxBroadcast;				/**< Enable/Disable receive of broadcast packets in Power-Save mode   	*/
-    TI_BOOL                             hwPsPoll;					/**< Enable/Disable Power-Save Polling								   	*/    
-    /* Power Management Configuration IE */
-    TI_BOOL                             ps802_11Enable;				/**< Enable/Disable 802.11 Power-Save 									*/
-    TI_UINT8                            needToSendNullData;  		/**< Indicates if need to send NULL data								*/
-    TI_UINT8                            numNullPktRetries; 			/**< Number of NULL Packets allowed retries 							*/
-    TI_UINT8                            hangOverPeriod;				/**< HangOver period:
-																	* Indicates what is the time in TUs during which the WiLink remains awake 
-																	* after sending an MPDU with the Power Save bit set (indicating that the 
-																	* station is to go into Power Save mode). Setting bit 0 does not affect 
-																	* the hangover period 
-																	*/
-    TI_UINT16                           NullPktRateModulation; 		/**< Null Packet Rate Modulation										*/
-    /* PMConfigStruct */
-    TI_BOOL                             ELPEnable;					/**< Enable/Disable ELP				 									*/
-    TI_UINT32                           BBWakeUpTime;				/**< Base Band Wakeup Time				 								*/
-    TI_UINT32                           PLLlockTime;				/**< PLL Lock Time						 								*/
-    /* AcxBcnBrcOptions */						
-    TBcnBrcOptions                      BcnBrcOptions;				/**< Beacon broadcast options	 		 								*/
-    /* ACXWakeUpCondition */
-    ETnetWakeOn                         tnetWakeupOn;  				/**< ACX Wake Up Condition		 		 								*/
-    TI_UINT8                            listenInterval;				/**< ACX Listen Interval		 		 								*/
-	/* No answer after Ps-Poll work-around */
-    TI_UINT8  							ConsecutivePsPollDeliveryFailureThreshold;	/**< Power-Save Polling Delivery Failure Threshold		*/
-
-} TPowerMgmtConfig;
-
-/** \struct TPowerSaveParams
- * \brief Power Save Parameters 
- * 
- * \par Description 
- * 
- * \sa
- */ 
-typedef struct
-{
-    /* powerMgmtConfig IE */
-    TI_BOOL                             ps802_11Enable;			/**< Enable/Disable 802.11 Power-Save 									*/
-    TI_UINT8                            needToSendNullData;  	/**< Indicates if need to send NULL data								*/
-    TI_UINT8                            numNullPktRetries; 		/**< Number of NULL Packets allowed retries 							*/
-    TI_UINT8                            hangOverPeriod;			/**< HangOver period:
-																* Indicates what is the time in TUs during which the WiLink remains awake 
-																* after sending an MPDU with the Power Save bit set (indicating that the 
-																* station is to go into Power Save mode). Setting bit 0 does not affect 
-																* the hangover period 
-																*/
-    EHwRateBitFiled                     NullPktRateModulation;	/**< Null Packet Rate Modulation										*/
-
-} TPowerSaveParams;
-
-/** \struct TAcQosParams
- * \brief AC QoS Parameters 
- * 
- * \par Description 
- * Used for Configuring AC Parameters (For Quality Of Service) to FW
- * 
- * \sa	TWD_CfgAcParams
- */ 
-typedef struct  
-{
-    TI_UINT8                            ac;			/**< Access Category - The TX queue's access category	*/
-    TI_UINT8                            cwMin;		/**< The contention window minimum size (in slots) 		*/
-    TI_UINT16                           cwMax;		/**< The contention window maximum size (in slots)		*/
-    TI_UINT8                            aifsn;		/**< The AIF value (in slots)							*/
-    TI_UINT16                           txopLimit;	/**< The TX Op Limit (in microseconds)					*/
-
-} TAcQosParams;
-
-/** \struct TMeasurementParams
- * \brief AC Queues Parameters 
- * 
- * \par Description 
- * Used When Send Start Measurment Command to FW
- * 
- * \sa	TWD_CmdMeasurement
- */ 
-typedef struct 
-{
-    TI_UINT32                           ConfigOptions;	/**< RX Filter Configuration Options													*/
-    TI_UINT32                           FilterOptions;	/**< RX Filter Options																	*/
-    TI_UINT32                           duration;		/**< Specifies the measurement process duration in microseconds. The value of 0 means 
-														* infinite duration in which only a STOP_MEASUREMENT command can stop the measurement 
-														* process
-														*/
-    Channel_e                           channel;		/**< Channel number on which the measurement is performed								*/
-    RadioBand_e                         band;			/**< Specifies the band to which the channel belongs									*/
-    EScanResultTag                      eTag;			/**< Scan Result Tag																	*/
-
-} TMeasurementParams;
-
-/** \struct TApDiscoveryParams
- * \brief AP Discovery Parameters
- * 
- * \par Description 
- * Used When Performing AP Discovery
- * 
- * \sa	TWD_CmdApDiscovery
- */ 
-typedef struct 
-{
-    TI_UINT32                           ConfigOptions;	/**< RX Configuration Options for measurement														*/
-    TI_UINT32                           FilterOptions;	/**< RX Filter Configuration Options for measurement												*/
-    TI_UINT32                           scanDuration;	/**< This field specifies the amount of time, in time units (TUs), to perform the AP discovery		*/
-    TI_UINT16                           scanOptions;	/**< This field specifies whether the AP discovery is performed by an active scan or a passive scan 
-														* 0 - ACTIVE, 1 - PASSIVE
-														*/
-    TI_UINT8                            numOfProbRqst;	/**< This field indicates the number of probe requests to send per channel, when active scan is specified 
-														* Note: for XCC measurement this value should be set to 1
-														*/
-    TI_UINT8                            txPowerDbm;    	/**< TX power level to be used for sending probe requests when active scan is specified.
-														* If 0, leave normal TX power level for this channel
-														*/
-    EHwRateBitFiled                     txdRateSet;		/**< This EHwBitRate format field specifies the rate and modulation to transmit the probe request when 
-														* an active scan is specifie
-														*/
-    ERadioBand                          eBand;			/**< Specifies the band to which the channel belongs												*/
-} TApDiscoveryParams;
-
-/** \struct TRroamingTriggerParams
- * \brief Roaming Trigger Parameters
- * 
- * \par Description 
- * 
- * \sa	TWD_CfgMaxTxRetry, TWD_CfgConnMonitParams
- */ 
-typedef struct
-{
-    /* ACXConsNackTriggerParameters */
-    TI_UINT8                            maxTxRetry;			/**< The number of frames transmission failures before issuing the "Max Tx Retry" event			*/
-
-    /* ACXBssLossTsfSynchronize */
-    TI_UINT16                           TsfMissThreshold;	/**< The number of consecutive beacons that can be lost before the WiLink raises the 
-															* SYNCHRONIZATION_TIMEOUT event	
-															*/
-    TI_UINT16                           BssLossTimeout;		/**< The delay (in time units) between the time at which the device issues the SYNCHRONIZATION_TIMEOUT 
-															* event until, if no probe response or beacon is received a BSS_LOSS event is issued
-															*/
-} TRroamingTriggerParams;
-
-/** \struct TSwitchChannelParams
- * \brief Switch Channel Parameters
- * 
- * \par Description
- * Used for Switch channel Command
- * 
- * \sa	TWD_CmdSwitchChannel
- */ 
-typedef struct
-{
-    TI_UINT8                            channelNumber;		/**< The new serving channel										*/         	
-    TI_UINT8                            switchTime;			/**< Relative time of the serving channel switch in TBTT units   	*/
-    TI_UINT8                            txFlag;				/**< 1: Suspend TX till switch time; 0: Do not suspend TX			*/
-    TI_UINT8                            flush;				/**< 1: Flush TX at switch time; 0: Do not flush  					*/
-
-} TSwitchChannelParams;
-
-/** \struct TRxCounters
- * \brief RX Counters
- * 
- * \par Description
- * Used for Getting RX Counters from FW
- * 
- * \sa
- */ 
-typedef struct
-{    
-    TI_UINT32                           RecvError; 			/**< Number of frames that a NIC receives but does not indicate to the protocols due to errors 	*/
-    TI_UINT32                           RecvNoBuffer;   	/**< Number of frames that the NIC cannot receive due to lack of NIC receive buffer space 		*/      
-    TI_UINT32                           FragmentsRecv;    	/**< Number of Fragments Received 																*/      
-    TI_UINT32                           FrameDuplicates;	/**< Number of Farme Duplicates																	*/
-    TI_UINT32                           FcsErrors;			/**< Number of frames that a NIC receives but does not indicate to the protocols due to errors	*/
-
-} TRxCounters;
-
-/** \struct TApPowerConstraint
- * \brief AP Power Constraint
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct  
-{
-    INFO_ELE_HDR												/**< Information Element Header		*/
-    int8                      			powerConstraintOnBss;	/**< The attenuation from the regulatory power constraint as declared by the AP 
-																* Units: dBm	;	Range: -20 - 30
-																*/
-} TApPowerConstraint;
-
-/*
- * TConfigCmdCbParams, TInterrogateCmdCbParams:
- * Note that this structure is used by the GWSI 
- * both for setting (writing to the device) and
- * for retreiving (Reading from the device),
- * while being called with a completion CB
- */
-/** \struct TConfigCmdCbParams
- * \brief Config Command CB Parameters
- * 
- * \par Description
- * The CB Parameters (Completino CB, Handle to CB Parameters and buffer of Input/Output Parameters) 
- * are used for Setting Parameters
- * 
- * \sa	TWD_SetParam
- */ 
-typedef struct
-{
-    void*                               fCb;	/**< Completion CB function													*/
-    TI_HANDLE                           hCb;	/**< CB handle																*/
-    void*                               pCb;	/**< CBuffer contains the content to be written or the retrieved content	*/
-
-} TConfigCmdCbParams;
-
-/** \struct TInterrogateCmdCbParams
- * \brief Interrogate Command Parameters
- * 
- * \par Description
- * Interrogate Command Parameters are the same as configuration Command CB Parameters
- *
- * \sa	TWD_SetParam 
- */ 
-typedef TConfigCmdCbParams TInterrogateCmdCbParams;
-
-/** \struct TRxTimeOut
- * \brief RX Time Out
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-    TI_UINT16                           psPoll;		/**< The maximum time that the device will wait to receive traffic from the AP after transmission of PS-poll	*/
-    TI_UINT16                           UPSD;		/**< The maximum time that the device will wait to receive traffic from the AP after transmission from UPSD 
-													* enabled queue
-													*/
-} TRxTimeOut;
-
-/** \struct TQueueTrafficParams
- * \brief RX Time Out
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-    TI_UINT8                            queueID;					/**< The TX queue ID number (0-7)											*/
-    TI_UINT8                            channelType;				/**< Channel access type for the queue Refer to ChannelType_enum			*/
-    TI_UINT8                            tsid;						/**< for EDCA - the AC Index (0-3, refer to AccessCategory_enum). 
-																	* For HCCA - HCCA Traffic Stream ID (TSID) of the queue (8-15)	
-																	*/
-    TI_UINT32                           dot11EDCATableMSDULifeTime;	/**< 802.11 EDCA Table MSDU Life Time 										*/
-    TI_UINT8                            psScheme;					/**< The power save scheme of the specified queue. Refer to PSScheme_enum	*/
-    TI_UINT8                            ackPolicy;					/**< ACK policy per AC 														*/
-    TI_UINT32                           APSDConf[2];				/**< APSD Configuration 													*/
-
-} TQueueTrafficParams;
-
-
-
-/** \struct TFmCoexParams
- * \brief FM Coexistence Parameters
- *
- * \par Description
- * Used for Setting/Printing FM Coexistence Parameters
- * 
- * \sa
- */ 
-typedef struct
-{	
-    TI_UINT8   uEnable;                 /* enable(1) / disable(0) the FM Coex feature */
-
-    TI_UINT8   uSwallowPeriod;          /* Swallow period used in COEX PLL swallowing mechanism,
-                                           Range: 0-0xFF,  0xFF = use FW default
-                                        */
-
-    TI_UINT8   uNDividerFrefSet1;       /* The N divider used in COEX PLL swallowing mechanism for Fref of 38.4/19.2 Mhz.
-                                           Range: 0-0xFF,  0xFF = use FW default
-                                        */
-
-    TI_UINT8   uNDividerFrefSet2;       /* The N divider used in COEX PLL swallowing mechanism for Fref of 26/52 Mhz.
-                                           Range: 0-0xFF,  0xFF = use FW default
-                                        */
-
-    TI_UINT16  uMDividerFrefSet1;       /* The M divider used in COEX PLL swallowing mechanism for Fref of 38.4/19.2 Mhz.
-                                           Range: 0-0x1FF,  0xFFFF = use FW default
-                                        */
-
-    TI_UINT16  uMDividerFrefSet2;       /* The M divider used in COEX PLL swallowing mechanism for Fref of 26/52 Mhz.
-                                           Range: 0-0x1FF,  0xFFFF = use FW default
-                                        */
-
-    TI_UINT32  uCoexPllStabilizationTime;/* The time duration in uSec required for COEX PLL to stabilize.
-                                           0xFFFFFFFF = use FW default
-                                        */
-
-    TI_UINT16  uLdoStabilizationTime;   /* The time duration in uSec required for LDO to stabilize.
-                                           0xFFFFFFFF = use FW default
-                                        */
-
-    TI_UINT8   uFmDisturbedBandMargin;  /* The disturbed frequency band margin around the disturbed
-                                             frequency center (single sided).
-                                           For example, if 2 is configured, the following channels
-                                             will be considered disturbed channel:
-                                             80 +- 0.1 MHz, 91 +- 0.1 MHz, 98 +- 0.1 MHz, 102 +- 0.1 MHz
-                                           0xFF = use FW default
-                                        */
-
-	TI_UINT8   uSwallowClkDif;          /* The swallow clock difference of the swallowing mechanism.
-                                           0xFF = use FW default
-                                        */
-
-} TFmCoexParams;
-
-
-/** \struct TMibBeaconFilterIeTable
- * \brief MIB Beacon Filter IE table
- * 
- * \par Description
- * Used for Read/Write the MIB/IE Beacon Filter
- * NOTE: This struct is only meant to be used as a pointer reference to an actual buffer. 
- * Table size is not a constant and is derived from the buffer size given with the 
- * user command
- * 
- * \sa	TWD_WriteMibBeaconFilterIETable
- */ 
-typedef struct 
-{
-    /* Number of information elements in table  */
-    TI_UINT8                            iNumberOfIEs;   					/**< Input Number of IE Tables	*/    
-    TI_UINT8                            iIETable[MIB_MAX_SIZE_OF_IE_TABLE]; /**< Input IE Table				*/          
-
-} TMibBeaconFilterIeTable;
-
-/** \struct TMibCounterTable
- * \brief MIB Counter Table
- * 
- * \par Description
- * Used for Getting Counters of MIB Table
- * 
- * \sa
- */ 
-typedef struct 
-{
-    TI_UINT32                           PLCPErrorCount;	  	/**< The number of PLCP errors since the last time this information element was interrogated. 
-															* This field is automatically cleared when it is interrogated  
-															*/
-    TI_UINT32                           FCSErrorCount;		/**< The number of FCS errors since the last time this information element was interrogated. 
-															* This field is automatically cleared when it is interrogated
-															*/
-    TI_UINT32                           SeqNumMissCount;	/**< The number of missed sequence numbers in the squentially values of frames seq numbers	*/
-} TMibCounterTable;
-
-/** \struct TMibWlanWakeUpInterval
- * \brief MIB WLAN Wake-Up Interval
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct 
-{
-    TI_UINT32                           WakeUpInterval;		/**< Wake Up Interval 								*/ 
-    TI_UINT8                            ListenInterval; 	/**< Listen interval in unit of the beacon/DTIM 	*/   
-
-} TMibWlanWakeUpInterval;
-
-/** \struct TMibTemplateFrame
- * \brief MIB Template Frame
- * 
- * \par Description
- * Used for Writing MIB Frame Template to FW
- * 
- * \sa	TWD_WriteMibTemplateFrame
- */ 
-typedef struct 
-{
-    EMibTemplateType                 	FrameType;							/**< MIB Farme Template type	*/
-    TI_UINT32                           Rate;								/**< Frame Rate					*/
-    TI_UINT16                           Length;								/**< Frame Length				*/
-    TI_UINT8                            Data [MIB_TEMPLATE_DATA_MAX_LEN];	/**< Frame Template Data		*/
-
-} TMibTemplateFrame;
-
-/** \struct TMibArpIpAddressesTable
- * \brief MIB ARP Address Table
- * 
- * \par Description
- * Used for Writing MIB ARP Table Template to FW
- * 
- * \sa	TWD_WriteMib
- */ 
-typedef struct 
-{
-    TI_UINT32                           FilteringEnable;	/**< Enable/Disable Filtering	*/
-    TIpAddr                             addr;				/**< IP Address Table			*/
-
-} TMibArpIpAddressesTable;
-
-/** \struct TMibGroupAdressTable
- * \brief MIB Group Address Table
- * 
- * \par Description
- * Used for Writing MIB Group Table Template to FW
- * 
- * \sa	TWD_WriteMib
- */ 
-typedef struct 
-{
-    TMacAddr                            aGroupTable[MIB_MAX_MULTICAST_GROUP_ADDRS]; 	/**< Table of Multicast Group Addresses */       
-    TI_UINT8                            bFilteringEnable;								/**< Enable/Disable Filtering			*/  
-    TI_UINT8                            nNumberOfAddresses;								/**< Number of Multicast Addresses		*/
-
-} TMibGroupAdressTable;
-
-/** \struct TTxRateClass
- * \brief TX Rate Class
- * 
- * \par Description
- * Used for Set/Get TX Rate Policy Class to/from FW
- * 
- * \sa
- */ 
-typedef struct
-{
-    TI_UINT32                           txEnabledRates;			/**< A Bit Mask which indicates which Rates are enabled */
-    TI_UINT8                            shortRetryLimit;		/**< */
-    TI_UINT8                            longRetryLimit;			/**< */
-    TI_UINT8                            flags;					/**< */
-    TI_UINT8                            reserved;				/**< for alignment with the FW API */
-
-} TTxRateClass;
-
-/** \struct TTxRatePolicy
- * \brief TX Rate Policy
- * 
- * \par Description
- * Used for Set/Get TX Rate Policy to/from FW
- * 
- * \sa
- */ 
-typedef struct
-{
-    TI_UINT32                           numOfRateClasses;								/**< */
-    TTxRateClass                        rateClass[MAX_NUM_OF_TX_RATE_CLASS_POLICIES];	/**< */
-
-} TTxRatePolicy;
-
-/** \struct TCoexActivity
- * \brief CoexActivity Parameters
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct {
-    uint8  coexIp;           /* 0-BT, 1-WLAN (according to CoexIp_e in FW) */
-    uint8  activityId;       /* According to BT/WLAN activity numbering in FW */ 
-    uint8  defaultPriority;  /* 0-255, activity default priority */
-    uint8  raisedPriority;   /* 0-255, activity raised priority */
-    uint16 minService;       /* 0-65535, The minimum service requested either in
-                                requests or in milliseconds depending on activity ID */
-    uint16 maxService;       /* 0-65535, The maximum service allowed either in
-                            requests or in milliseconds depending on activity ID */
-} TCoexActivity;
-
-/** \struct THalCoexActivityTable
- * \brief CoexActivity Table Initialization Parameters
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-    uint32 numOfElements;
-    TCoexActivity entry[COEX_ACTIVITY_TABLE_MAX_NUM];
-    
-} THalCoexActivityTable;
-
-/** \struct DcoItrimParams_t
- * \brief DCO Itrim params structure
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-    Bool_e enable;
-    uint32 moderationTimeoutUsec;
-}DcoItrimParams_t;
-
-/** \union TMibData
- * \brief MIB Data
- * 
- * \par Description
- * Union which defines all MIB Data types
- * Used for write MIB Configuration to FW
- * 
- * \sa	TWD_WriteMib
- */ 
-typedef union 
-{
-    TMacAddr                            StationId;				/**< Station ID MAC Address								*/
-    TI_UINT32                           MaxReceiveLifeTime;		/**< HAl Control Max Rx MSDU Life Time, in TUs Units	*/
-    TI_UINT32                           SlotTime;				/**< Radio (PHY) Slot Time Type							*/
-    TMibGroupAdressTable             	GroupAddressTable;		/**< MIB Group Address Table							*/
-    TI_UINT8                            WepDefaultKeyId;		/**< WEP Defualt Security Key ID						*/
-    TI_UINT8                            PowerLevel;				/**< */
-    TI_UINT16                           RTSThreshold;			/**< */
-    TI_UINT32                           CTSToSelfEnable;		/**< Enable/Disable CTS to Self							*/
-    TMibArpIpAddressesTable          	ArpIpAddressesTable;	/**< MIB ARP Address Table								*/
-    TMibTemplateFrame                	TemplateFrame;			/**< MIB Template Frame		 							*/
-    TI_UINT8                            RxFilter;				/**< */
-    TMibWlanWakeUpInterval           	WlanWakeUpInterval;		/**< MIB WLAN Wake-Up Interval							*/
-    TMibCounterTable                 	CounterTable;			/**< MIB Counter Table									*/
-    TMibBeaconFilterIeTable          	BeaconFilter;			/**< MIB Beacon Filter IE table				   			*/
-    TTxRatePolicy                       txRatePolicy;			/**< TX Rate Policy			   		 					*/
-
-} TMibData;
-
-/** \struct TMib
- * \brief MIB Structure
- * 
- * \par Description
- * Used for writing MIB Configuration to FW
- * 
- * \sa	TWD_WriteMib, TWD_WriteMibTemplateFrame, TWD_WriteMibBeaconFilterIETable, TWD_WriteMibTxRatePolicy
- */ 
-typedef struct
-{
-    EMib			aMib;  		/**< MIB Element Type	*/
-    TI_UINT16       Length;		/**< MIB Data Length	*/
-    TMibData     	aData; 		/**< MIB Data			*/
-
-} TMib;
-
-/** \union TTwdParamContents
- * \brief TWD Parameters Content
- * 
- * \par Description
- * All FW Parameters contents
- * 
- * \sa	TWD_SetParam
- */ 
-typedef union
-{
-    TI_UINT16                           halCtrlRtsThreshold;			/**< */
-    TI_UINT8                            halCtrlCtsToSelf;				/**< */
-    TRxTimeOut                          halCtrlRxTimeOut;				/**< */
-    TI_UINT16                           halCtrlFragThreshold;			/**< */
-    TI_UINT16                           halCtrlListenInterval;			/**< */
-    TI_UINT16                           halCtrlCurrentBeaconInterval;	/**< */
-    TI_UINT8                            halCtrlTxPowerDbm;				/**< */
-    ETxAntenna                          halCtrlTxAntenna;				/**< */
-    ERxAntenna                          halCtrlRxAntenna;				/**< */
-    TI_UINT8                            halCtrlAifs;					/**< */
-    TI_BOOL                             halCtrlTxMemPoolQosAlgo;		/**< */
-    TI_BOOL                             halCtrlClkRunEnable;			/**< */
-    TRxCounters                         halCtrlCounters;				/**< */
-
-    TMib*          		                pMib;							/**< */
-    TI_UINT8                            halCtrlCurrentChannel;			/**< */
-  
-    /* AC Qos parameters */
-    TQueueTrafficParams                 *pQueueTrafficParams;			/**< */
-    
-    /* Security related parameters */
-#ifdef XCC_MODULE_INCLUDED
-    TI_BOOL                             rsnXCCSwEncFlag;				/**< */
-    TI_BOOL                             rsnXCCMicFieldFlag;				/**< */
-#endif
-    ECipherSuite                        rsnEncryptionStatus;			/**< */
-    TI_UINT8                            rsnHwEncDecrEnable; 			/**< 0- disable, 1- enable */
-    TSecurityKeys                       *pRsnKey;						/**< */
-    TI_UINT8                            rsnDefaultKeyID;				/**< */
-
-    /* Measurements section */
-    TMediumOccupancy                    mediumOccupancy;				/**< */
-    TI_BOOL                             halTxOpContinuation;			/**< */
-
-    TTsfDtim                            fwTsfDtimInfo;					/**< */
-
-    TInterrogateCmdCbParams             interogateCmdCBParams;			/**< */
-    TConfigCmdCbParams                  configureCmdCBParams;			/**< */
-
-    TTxRatePolicy                       *pTxRatePlicy;					/**< */
-
-    /* WARNING!!! This section is used to set/get internal params only. */
-    TI_UINT16                           halCtrlAid;						/**< */
-    
-    ESoftGeminiEnableModes              SoftGeminiEnable;				/**< */
-    TSoftGeminiParams                   SoftGeminiParam;				/**< */
-
-    TFmCoexParams                       tFmCoexParams;                  /**< */
-
-    TI_UINT32                           halCtrlMaxRxMsduLifetime;		/**< */
-
-    /* Beacon Broadcast options */
-    TBcnBrcOptions                      BcnBrcOptions;					/**< */
-
-	/* PLT tests */
-	TI_STATUS             				PltRxCalibrationStatus;			/**< */
-
-	/* CoexActivity */
-	TCoexActivity                       tTwdParamsCoexActivity;         /**< */
-
-    /* DCO Itrim */
-    DcoItrimParams_t                    tDcoItrimParams;                /**< */
-
-} TTwdParamContents;
-
-/** \struct TTwdParamInfo
- * \brief TWD Parameters Information
- * 
- * \par Description
- * 
- * \sa	TWD_SetParam
- */ 
-typedef struct
-{
-    TI_UINT32                           paramType;					/**< FW Parameter Information Identifier	*/
-    TI_UINT32                           paramLength;				/**< FW Parameter Length					*/
-    TTwdParamContents                   content;					/**< FW Parameter content					*/
-
-} TTwdParamInfo;
-
-/** \struct TRxXferReserved
- * \brief RX Xfer Reserved
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-    ProcessIDTag_e                      packetType;		/**< */
-    TI_UINT8                            rxLevel;		/**< */
-    TI_INT8                             rssi;			/**< */
-    TI_UINT8                            SNR;			/**< */
-    TI_UINT8                            band;			/**< */
-    TI_UINT32                           TimeStamp;		/**< */
-    EScanResultTag                      eScanTag;		/**< */
-
-} TRxXferReserved;
-
-/** \struct TRxAttr
- * \brief RX Attributes
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-    PacketClassTag_e                    ePacketType;    /**< */
-    TI_STATUS                           status;			/**< */
-    ERate                               Rate;   		/**< */
-    TI_UINT8                            SNR;			/**< */
-    TI_INT8                             Rssi;   		/**< */
-    TI_UINT8                            channel;		/**< */
-    TI_UINT32                           packetInfo;		/**< */
-    ERadioBand                          band;			/**< */
-    TI_UINT32                           TimeStamp;		/**< */
-    EScanResultTag                      eScanTag;		/**< */
-
-} TRxAttr;
-
-
-/** \struct TGeneralInitParams
- * \brief General Initialization Parameters
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-    TI_UINT16                           halCtrlListenInterval;				/**< */
-    TI_UINT8                            halCtrlCalibrationChannel2_4;		/**< */
-    TI_UINT8                            halCtrlCalibrationChannel5_0;	  	/**< */  	
-    TI_UINT16                           halCtrlRtsThreshold;				/**< */
-    TI_UINT16                           halCtrlFragThreshold;				/**< */
-    TI_UINT32                           halCtrlMaxTxMsduLifetime;			/**< */
-    TI_UINT32                           halCtrlMaxRxMsduLifetime;			/**< */
-    ETxAntenna                          halCtrlTxAntenna;					/**< */
-    ERxAntenna                          halCtrlRxAntenna;					/**< */
-    TI_UINT8                            halCtrlMacClock;					/**< */
-    TI_UINT8                            halCtrlArmClock;					/**< */
-    TI_UINT16                           halCtrlBcnRxTime;					/**< */
-    TI_BOOL                             halCtrlRxEnergyDetection;    		/**< */
-    TI_BOOL                             halCtrlCh14TelecCca;				/**< */
-    TI_BOOL                             halCtrlEepromLessEnable;			/**< */
-    TI_BOOL                             halCtrlRxDisableBroadcast;			/**< */
-    TI_BOOL                             halCtrlRecoveryEnable;				/**< */
-    TI_BOOL                             halCtrlFirmwareDebug;				/**< */
-    TI_BOOL                             WiFiWmmPS;							/**< */
-    TRxTimeOut                          rxTimeOut;							/**< */
-    TI_UINT8                            halCtrlRateFallbackRetry;			/**< */
-    TI_BOOL                             b11nEnable;							/**< */
-
-    TI_UINT16                           TxCompletePacingThreshold;			/**< */
-    TI_UINT16                           TxCompletePacingTimeout;			/**< */
-    TI_UINT16                           RxIntrPacingThreshold;			    /**< */
-    TI_UINT16                           RxIntrPacingTimeout;			    /**< */
-
-    TI_UINT32                           uRxAggregPktsLimit;					/**< */
-    TI_UINT32                           uTxAggregPktsLimit;					/**< */
-    TI_UINT8                            hwAccessMethod;						/**< */
-    TI_UINT8                            maxSitesFragCollect;				/**< */
-    TI_UINT8                            packetDetectionThreshold;			/**< */
-    TI_UINT32                           nullTemplateSize;					/**< */
-    TI_UINT32                           disconnTemplateSize;				/**< */
-    TI_UINT32                           beaconTemplateSize;					/**< */
-    TI_UINT32                           probeRequestTemplateSize;			/**< */
-    TI_UINT32                           probeResponseTemplateSize;			/**< */
-    TI_UINT32                           PsPollTemplateSize;				   	/**< */ 	
-    TI_UINT32                           qosNullDataTemplateSize;			/**< */
-    TI_UINT32                           ArpRspTemplateSize;                 /**< */
-    TI_UINT32                           tddRadioCalTimout;					/**< */
-    TI_UINT32                           CrtRadioCalTimout;					/**< */
-    TI_UINT32                           UseMboxInterrupt;					/**< */
-    TI_UINT32                           TraceBufferSize;					/**< */
-    TI_BOOL                             bDoPrint;							/**< */
-    TI_UINT8                            StaMacAddress[MAC_ADDR_LEN];		/**< */
-    TI_BOOL                             TxFlashEnable;						/**< */
-    TI_UINT8                            RxBroadcastInPs;					/**< */
-	TI_UINT8       						ConsecutivePsPollDeliveryFailureThreshold;	/**< */
-    TI_UINT8                            TxBlocksThresholdPerAc[MAX_NUM_OF_AC];/**< */
-    TI_UINT8                            uRxMemBlksNum;                      /**< */
-    TI_UINT16                           BeaconRxTimeout;					/**< */
-    TI_UINT16                           BroadcastRxTimeout;					/**< */
-
-    TI_UINT8                            uRssiBeaconAverageWeight;			/**< */
-    TI_UINT8                            uRssiPacketAverageWeight;			/**< */
-    TI_UINT8                            uSnrBeaconAverageWeight;			/**< */
-    TI_UINT8                            uSnrPacketAverageWeight;			/**< */
-
-    TI_UINT32                           uHostClkSettlingTime;				/**< */
-    TI_UINT8                            uHostFastWakeupSupport;             /**< */
-    THalCoexActivityTable               halCoexActivityTable;               /**< */
-    TFmCoexParams                       tFmCoexParams;                      /**< */
-    TI_UINT8                            uMaxAMPDU;                          /**< */
-
-} TGeneralInitParams;
-
-/** \struct TPowerSrvInitParams
- * \brief Power Service Init Parameters
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct 
-{
-    TI_UINT8                            numNullPktRetries; 			/**< */
-    TI_UINT8                            hangOverPeriod;				/**< */
-    TI_UINT16                           reserve;					/**< */
-
-} TPowerSrvInitParams;
-
-/** \struct TScanSrvInitParams
- * \brief Scan Service Init Parameters
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-    TI_UINT32                           numberOfNoScanCompleteToRecovery;	/**< The number of consecutive no scan complete that will trigger a recovery notification 	*/
-    TI_UINT32                      		uTriggeredScanTimeOut; 				/**< i.e. split scan. Time out for starting triggered scan between 2 channels 				*/
-
-} TScanSrvInitParams;
-
-/** \struct TArpIpFilterInitParams
- * \brief ARP IP Filter Init Parameters
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-    EArpFilterType     filterType;	/**< */
-    TIpAddr            addr;    			/**< */
-
-} TArpIpFilterInitParams;
-
-/** \struct TMacAddrFilterInitParams
- * \brief AMC Address Filter Init Parameters
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-    TI_UINT8                            isFilterEnabled;							/**< */
-    TI_UINT8                            numOfMacAddresses;							/**< */
-    TI_UINT16                           reserve;									/**< */
-    TMacAddr                            macAddrTable[MAX_MULTICAST_GROUP_ADDRS];	/**< */
-
-} TMacAddrFilterInitParams;
-
-/** \struct RateMangeParams_t
- * \brief Rate Maangement params structure
- *
- * \par Description
- *
- * \sa
- */
-typedef struct
-{
-	rateAdaptParam_e paramIndex;
-	uint16 RateRetryScore;
-	uint16 PerAdd;
-	uint16 PerTh1;
-	uint16 PerTh2;
-	uint16 MaxPer;
-	uint8 InverseCuriosityFactor;
-	uint8 TxFailLowTh;
-	uint8 TxFailHighTh;
-	uint8 PerAlphaShift;
-	uint8 PerAddShift;
-	uint8 PerBeta1Shift;
-	uint8 PerBeta2Shift;
-	uint8 RateCheckUp;
-	uint8 RateCheckDown;
-	uint8 RateRetryPolicy[13];
-}RateMangeParams_t;
-
-/*
- * IMPORTANT NOTE:
- * ===============
- * This structure encapsulates the initialization data required by the TnetwDrv layer.
- * All structures in it are arranged so no padding will be added by the compiler!!
- * This is required to avoid missalignment when compiled by customers using GWSI API!!
- */
-/** \struct TTwdInitParams
- * \brief TWD Init Parameters
- * 
- * \par Description
- * All TWD Initialization Parameters
- * 
- * \sa	TWD_SetDefaults
- */ 
-typedef struct
-{
-    TGeneralInitParams                  tGeneral;			 /**< General Initialization Parameters			*/
-    TPowerSrvInitParams                 tPowerSrv;			 /**< Power Service Initialization Parameters	*/
-    TScanSrvInitParams                  tScanSrv;			 /**< Scan Service Initialization Parameters    */
-    TArpIpFilterInitParams              tArpIpFilter;		 /**< ARP IP filter Initialization Parameters	*/
-    TMacAddrFilterInitParams            tMacAddrFilter;		 /**< MAC Address Initialization Parameters		*/
-    IniFileRadioParam                   tIniFileRadioParams; /**< Radio Initialization Parameters   		*/
-	IniFileExtendedRadioParam			tIniFileExtRadioParams; /**< Radio Initialization Parameters   		*/
-    IniFileGeneralParam                 tPlatformGenParams;  /**< Radio Initialization Parameters           */
-	RateMangeParams_t					tRateMngParams;			  
-    DcoItrimParams_t                    tDcoItrimParams;     /**< Dco Itrim Parameters                      */
-   
-} TTwdInitParams;
-
-/** \struct TTwdHtCapabilities
- * \brief TWD HT Capabilities
- * 
- * \par Description
- * 
- * \sa	TWD_SetDefaults, TWD_GetTwdHtCapabilities
- */ 
-typedef struct
-{
-    TI_BOOL     b11nEnable;       					/**< Enable/Disable 802.11n flag	*/
-    TI_UINT8    uChannelWidth;						/**< */
-    TI_UINT8    uRxSTBC;							/**< */
-    TI_UINT8    uMaxAMSDU;						  	/**< */  	
-    TI_UINT8    uMaxAMPDU;							/**< */
-	TI_UINT8    uAMPDUSpacing;					   	/**< */ 	
-	TI_UINT8    aRxMCS[RX_TX_MCS_BITMASK_SIZE];		/**< */    
-	TI_UINT8    aTxMCS[RX_TX_MCS_BITMASK_SIZE];		/**< */    
-	TI_UINT16   uRxMaxDataRate;						/**< */    
-	TI_UINT8    uPCOTransTime;						/**< */    
-	TI_UINT32   uHTCapabilitiesBitMask;				/**< */    
-	TI_UINT8    uMCSFeedback;						/**< */    
-} TTwdHtCapabilities;
-
-typedef struct
-{
-    int32  SNRCorrectionHighLimit;
-    int32  SNRCorrectionLowLimit;
-    int32  PERErrorTH;
-    int32  attemptEvaluateTH;
-    int32  goodAttemptTH;
-    int32  curveCorrectionStep;
-
- }RateMangeReadParams_t;
-
-
-/*
- * --------------------------------------------------------------
- *	APIs
- * --------------------------------------------------------------
- */
-/** @ingroup Control
- * \brief Send Packet Transfer CB
- * 
- * \param  CBObj        - object handle
- * \param  pPktCtrlBlk  - Pointer to Input Packet Control Block
- * \return void
- * 
- * \par Description
- * The Transfer-Done callback
- * User registers the CB for Send Packet Transfer done
- *
- * \sa	TWD_RegisterCb
- */ 
-typedef void (* TSendPacketTranferCb)(TI_HANDLE CBObj, TTxCtrlBlk *pPktCtrlBlk);
-/** @ingroup Control
- * \brief Send Packet Debug CB
- * 
- * \param  CBObj        - object handle
- * \param  pPktCtrlBlk  - Pointer to Input Packet Control Block
- * uDebugInfo			- Debug Information
- * \return void
- * 
- * \par Description
- * The Transfer-Done Debug callback
- *
- * \sa
- */ 
-typedef void (* TSendPacketDebugCb)  (TI_HANDLE CBObj, TTxCtrlBlk *pPktCtrlBlk, TI_UINT32 uDebugInfo);
-/** @ingroup Control
- * \brief Send Packet Debug CB
- * 
- * \param  CBObj        - object handle
- * \param  pPktCtrlBlk  - Pointer to Input Packet Control Block
- * uDebugInfo			- Debug Information
- * \return void
- * 
- * \par Description
- *
- * \sa	TWD_RegisterCb
- */ 
-typedef ERxBufferStatus (*TRequestForBufferCb) (TI_HANDLE hObj, void **pRxBuffer, TI_UINT16 aLength, TI_UINT32 uEncryptionFlag, PacketClassTag_e ePacketClassTag);
-/** @ingroup Control
- * \brief Send Packet Debug CB
- * 
- * \param  hObj        	- object handle
- * \param  pBuffer	    - Pointer to Received buffer frame
- * \return void
- * 
- * \par Description
- * This function CB will be called when Received packet from RX Queue
- * User registers the CB for RX Buffer Request
- *
- * \sa	TWD_RegisterCb
- */ 
-typedef void (*TPacketReceiveCb) (TI_HANDLE 	hObj,
-                                  const void 	*pBuffer);
-/** @ingroup Control
- * \brief Failure Event CB
- * 
- * \param  handle        	- object handle
- * \param  eFailureEvent  	- Failure Event Type
- * \return void
- * 
- * \par Description
- * Callback clled for Failure event
- * User registers the CB for Health-Moitoring
- *
- * \sa	TWD_RegisterCb
- */ 
-typedef void (*TFailureEventCb)  (TI_HANDLE handle, EFailureEvent eFailureEvent);
-
-/** \union TTwdCB
- * \brief TWD Callback
- * 
- * \par Description
- * Union which holds all TWD Internal Callbacks which are registered by user
- * per Module and Event IDs
- * 
- * \sa	TWD_RegisterCb
- */ 
-typedef union
-{
-	TSendPacketTranferCb	sendPacketCB;		/**< Transfer-Done callback			*/
-	TSendPacketDebugCb		sendPacketDbgCB;	/**< Transfer-Done Debug callback	*/
-	TRequestForBufferCb		requestBufferCB;	/**< Transfer-Done Debug callback	*/
-	TPacketReceiveCb		recvPacketCB;		/**< RX Buffer Request callback		*/
-	TFailureEventCb			failureEventCB;		/**< Failure Event callback			*/
-}TTwdCB;
-
-
-/** @ingroup Control
- * \brief Scan Service complete CB
- * 
- * \param  hCb        	- handle to the scan object
- * \param  eTag  		- the scan results type tag
- * \param  uResultCount - number of results received during this scan
- * \param  SPSStatus  	- bitmap indicating which channels were attempted (if this is an SPS scan)
- * \param  TSFError  	- whether a TSF error occurred (if this is an SPS scan)
- * \param  ScanStatus  	- scan SRV status (OK / NOK)
- * \param  PSMode		- Power Save Mode
- * \return void
- * 
- * \par Description
- * This function CB will be called when Scan Service is complete
- * User registers the Scan Service Complete CB
- * 
- * \sa	TWD_RegisterScanCompleteCb
- */ 
-typedef void (*TScanSrvCompleteCb) (TI_HANDLE 		hCb, 
-									EScanResultTag 	eTag, 
-									TI_UINT32 		uResultCount,
-                                    TI_UINT16 		SPSStatus, 
-									TI_BOOL 		TSFError, 
-									TI_STATUS 		ScanStatus,
-                                    TI_STATUS 		PSMode);
-/** @ingroup Control
- * \brief TWD Callback
- * 
- * \param  hCb        	- handle to object
- * \param  status  		- completion status
- * \return void
- * 
- * \par Description
- * Initialising Complete Callaback (exapmle: Init HW/FW CB etc.)
- * User can use its own Complete CB which will be called when
- * the suitable module id & event number will arrive
- * 
- * \sa	TWD_Init
- */ 
-typedef void (*TTwdCallback) (TI_HANDLE hCb, TI_STATUS status); 
-/** @ingroup Control
- * \brief TWD Callback
- * 
- * \param  hCb        	- handle to object
- * \param  msrReply  	- Pointer to input measurement (which ended) Reply
- * \return void
- * 
- * \par Description
- * The function prototype for the measurement complete callback
- * User can use its own measurement complete CB
- * which will be called when measurement end
- * 
- * \sa	TWD_StartMeasurement
- */ 
-typedef void (*TMeasurementSrvCompleteCb) (TI_HANDLE hCb, TMeasurementReply* msrReply);
-/** @ingroup Control
- * \brief Command Response Callback
- * 
- * \param  hCb        	- handle to object
- * \param  status  		- status of Command ended
- * \return void
- * 
- * \par Description
- * The function prototype for the Command Response CB
- * Enables user to implement and use its own Response CB
- * which will be called when TWD Command end
- * 
- * \sa	TWD_StartMeasurement, TWD_StopMeasurement, TWD_Scan, TWD_StopScan, TWD_StartPeriodicScan, TWD_StopPeriodicScan
- */ 
-typedef void (*TCmdResponseCb) (TI_HANDLE hCb, TI_UINT16 status);
-/** @ingroup Control
- * \brief Command Response Callback
- * 
- * \param  hCb        	- handle to object
- * \param  status  		- status of Command ended
- * \return void
- * 
- * \par Description
- * The function prototype for the Power Save Set Response CB
- * Enables user to implement and use its own Response CB which 
- * will be called when Power Save Set Command end
- * 
- * \sa	TWD_SetPsMode
- */ 
-typedef void (*TPowerSaveResponseCb)(TI_HANDLE hCb, TI_UINT8 status);
-/** @ingroup Control
- * \brief Command Complete Callback
- * 
- * \param  hCb        	- handle to object
- * \param  PsMode		- Power Save Mode
- * \param  status  		- status of Command ended
- * \return void
- * 
- * \par Description
- * The function prototype for the Power Save Set Complete CB
- * Enables user to implement and use its own Complete CB which 
- * will be called when Power Save Set Command end (for success/faild notification)
- * 
- * \sa	TWD_SetPsMode
- */ 
-typedef void (*TPowerSaveCompleteCb )(TI_HANDLE hCb, TI_UINT8 PsMode, TI_UINT8 status);
-/** @ingroup Control
- * \brief  Create TWD Module
- * 
- * \param  hOs   	- OS module object handle
- * \return TWD Module object handle on success or NULL on failure
- * 
- * \par Description
- * Calling this function Creates a TWD object and all its sub-modules. 
- * 
- * \sa     TWD_Destroy, TWD_Init
- */
-TI_HANDLE TWD_Create (TI_HANDLE hOs);
-/** @ingroup Control
- * \brief  Destroy TWD Module
- * 
- * \param  hTWD   	- hTWD module object handle
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Calling this function Destroys TWD object and all its sub-modules. 
- * 
- * \sa     TWD_Create
- */ 
-TI_STATUS TWD_Destroy (TI_HANDLE hTWD);
-/** Control
- * \brief  Init TWD module
- * 
- * \param  hTWD         - TWD module object handle
- * \param  hReport      - Report module object handle
- * \param  hUser        - Master (User) module object handle
- * \param  hTimer       - Timer module object handle
- * \param  hContext     - context-engine module object handle
- * \param  hTxnQ        - TxnQueue module object handle
- * \param  fInitHwCb    - Init HW callback called when init HW phase is done
- * \param  fInitFwCb    - Init FW callback called when init FW phase is done
- * \param  fConfigFwCb  - Configuration FW callback called when configuring FW phase is done
- * \param  fStopCb      - Stop callback called when TWD is stopped
- * \param  fInitFailCb  - Fail callback called when TWD is Failed
- * \return void 
- * 
- * \par Description
- * Start hardware Init and Config process. 
- * This is the first function that must be called after TWD_Create.
- * 
- * \sa     TWD_Create, TWD_Stop
- */ 
-void TWD_Init (TI_HANDLE    hTWD, 
-			   TI_HANDLE 	hReport, 
-               TI_HANDLE 	hUser, 
-			   TI_HANDLE 	hTimer, 
-			   TI_HANDLE 	hContext, 
-			   TI_HANDLE 	hTxnQ, 
-               TTwdCallback fInitHwCb, 
-               TTwdCallback fInitFwCb, 
-               TTwdCallback fConfigFwCb,
-			   TTwdCallback	fStopCb,
-			   TTwdCallback fInitFailCb);
-/** @ingroup Control
- * \brief  Init HW module
- * 
- * \param  hTWD         - TWD module object handle
- * \param  pbuf         - Pointer to Input NVS Buffer
- * \param  length       - Length of NVS Buffer
- * \param  uRxDmaBufLen - The Rx DMA buffer length in bytes (needed as a limit for Rx aggregation length)
- * \param  uTxDmaBufLen - The Tx DMA buffer length in bytes (needed as a limit for Tx aggregation length)
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Performs the HW init process. 
- * 
- * \sa
- */ 
-TI_STATUS TWD_InitHw (TI_HANDLE hTWD, 
-                      TI_UINT8 *pbuf, 
-                      TI_UINT32 length, 
-                      TI_UINT32 uRxDmaBufLen,
-                      TI_UINT32 uTxDmaBufLen);
-/** @ingroup Control
- * \brief Set Defults to TWD Init Params
- * 
- * \param  hTWD         - TWD module object handle
- * \param  pInitParams  - Pointer to Input init default parameters
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- *
- * \sa
- */
-TI_STATUS TWD_SetDefaults (TI_HANDLE hTWD, TTwdInitParams *pInitParams);
-/** @ingroup Control
- * \brief  Init FW
- * 
- * \param  hTWD         - TWD module object handle
- * \param  pFileInfo    - Pointer to Input Buffer contains part of FW Image to Download 
- * 							The Following Field should be filled:
- * 							pFileInfo->pBuffer
- * 							pFileInfo->uLength
- * 							pFileInfo->uAddress
- * 							pFileInfo->bLast
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Performs FW Download, and Run FW
- * 
- * \sa
- */ 
-TI_STATUS TWD_InitFw (TI_HANDLE hTWD, TFileInfo *pFileInfo);
-/** @ingroup Control
- * \brief  Open UART Bus Txn
- * 
- * \param  hTWD         - TWD module object handle
- * \param  pParams      - Pointer to Input parameters 
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS TWD_BusOpen (TI_HANDLE hTWD, void* pParams);
-/** @ingroup Control
- * \brief  Close UART Bus Txn
- * 
- * \param  hTWD         - TWD module object handle
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS TWD_BusClose (TI_HANDLE hTWD);
-/** @ingroup Control
- * \brief Halt firmware
- * 
- * \param  hTWD         - TWD module object handle
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- *
- * \sa
- */
-TI_STATUS TWD_Stop (TI_HANDLE hTWD);
-/** @ingroup Control
- * \brief Enable external events from FW
- * 
- * \param  hTWD         - TWD module object handle
- * \return void
- * 
- * \par Description
- * Enable external events from FW upon driver start or recovery completion
- *
- * \sa
- */ 
-void TWD_EnableExternalEvents (TI_HANDLE hTWD);
-/** @ingroup Control
- * \brief Registers TWD internal callback function
- * 
- * \param  hTWD         - TWD module object handle
- * \param  event        - event on which the registrated CB will be called
- * \param  fCb 	        - Pointer to Registered CB function
- * \param  pData 	    - Pointer to Registered CB data
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * This CB enables user to register TWD Internal CB functions of different Modules,
- * with their data.
- * The function identifies which TWD Module owns the Registered CB, and what the specific Registered CB
- * according to event input parameter.
- * Once the Module and specific CB function are identified, the CB is registerd in the TWD Module 
- * by calling suitable registration CB function
- * 
- * \sa
- */ 
-TI_STATUS TWD_RegisterCb (TI_HANDLE hTWD, TI_UINT32 event, TTwdCB *fCb, void *pData);
-/** @ingroup Control
- * \brief Exit from init mode
- * 
- * \param  hTWD         - TWD module object handle
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Exit From Init Mode enable sending command to the MboxQueue (which store a command),
- * while the interrupts are masked. 
- * The interrupt would be enable at the end of the init process
- * 
- * \sa
- */ 
-TI_STATUS TWD_ExitFromInitMode (TI_HANDLE hTWD);
-/** @ingroup Control
- * \brief Finalize FW init and download
- * 
- * \param  hTWD         - TWD module object handle
- * \return void 
- * 
- * \par Description
- * Init all the remaining initialization after the FW download has finished
- * 
- * \sa
- */ 
-void TWD_FinalizeDownload (TI_HANDLE hTWD);
-/** @ingroup Control
- * \brief Finalize of faulty FW init and download
- * 
- * \param  hTWD         - TWD module object handle
- * \return void 
- * 
- * \par Description
- * Call the upper layer failure callback after Init or FW download has finished with failure.
- * 
- * \sa
- */ 
-void TWD_FinalizeOnFailure (TI_HANDLE hTWD);
-/** @ingroup Control
- * \brief Perform FW Configuration
- * 
- * \param  hTWD         - TWD module object handle
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Configure the FW from the TWD DB - after configuring all HW objects
- * 
- * \sa
- */ 
-TI_STATUS TWD_ConfigFw (TI_HANDLE hTWD);
-/** @ingroup Control
- * \brief Handle FW interrupt from ISR context
- * 
- * \param  hTWD         - TWD module object handle
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * This is the FW-interrupt ISR context. The driver task is scheduled to hadnle FW-Events
- * 
- * \sa
- */ 
-TI_STATUS TWD_InterruptRequest (TI_HANDLE hTWD);
-/** @ingroup Control
- * \brief Enable Recovery
- * 
- * \param  hTWD         - TWD module object handle
- * \return TRUE if recovery Enables, FALSE otherwise
- * 
- * \par Description
- * Return Recovery E/D status
- *
- * \sa
- */ 
-TI_BOOL TWD_RecoveryEnabled (TI_HANDLE hTWD);
-/** @ingroup Measurement
- * \brief Starts a measurement 
- * 
- * \param  hTWD         			- TWD module object handle
- * \param  pMsrRequest         		- Pointer to Input structure which contains the measurement parameters
- * \param  uTimeToRequestExpiryMs   - The time (in milliseconds) the measurement SRV has to start the request
- * \param  fResponseCb         		- The Command response CB Function
- * \param  hResponseCb         		- Handle to Command response CB Function Obj
- * \param  fCompleteCb         		- The Command Complete CB Function
- * \param  hCompleteCb         		- Handle to Command Complete CB Function Obj
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Starts a measurement operation 
- *
- * \sa
- */ 
-TI_STATUS TWD_StartMeasurement (TI_HANDLE hTWD, 
-								TMeasurementRequest *pMsrRequest, 
-								TI_UINT32 uTimeToRequestExpiryMs, 
-								TCmdResponseCb fResponseCb, 
-								TI_HANDLE hResponseCb, 
-								TMeasurementSrvCompleteCb fCompleteCb, 
-								TI_HANDLE hCompleteCb);
-/** @ingroup Measurement
- * \brief Stops a measurement
- * 
- * \param  hTWD         			- TWD module object handle
- * \param  bSendNullData         	- Indicates whether to send NULL data when exiting driver mode
- * \param  fResponseCb         		- Pointer to Command response CB function
- * \param  hResponseCb         		- Handle to Command response CB parameters
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Stops a measurement operation in progress
- *
- * \sa
- */ 
-TI_STATUS TWD_StopMeasurement (TI_HANDLE hTWD, 
-							   TI_BOOL bSendNullData, 
-							   TCmdResponseCb fResponseCb, 
-							   TI_HANDLE hResponseCb);
-/** @ingroup Measurement
- * \brief Start scan
- * 
- * \param hTWD                		- TWD module object handle
- * \param pScanParams            	- Pointer to Input Scan specific parameters
- * \param eScanTag               	- Scan tag, used for result and scan complete tracking
- * \param bHighPriority          	- Indicates whether to perform a high priority (overlaps DTIM) scan
- * \param bDriverMode            	- Indicates whether to try to enter driver mode (with PS on) before issuing the scan command
- * \param bScanOnDriverModeError 	- Indicates whether to proceed with the scan if requested to enter driver mode and failed 
- * \param ePsRequest             	- Parameter sent to PowerSaveServer. 
- * 										Should indicates PS ON or "keep current" only when driver mode is requested, 
- * 										Otherwise should indicate OFF
- * \param bSendNullData          	- Indicates whether to send Null data when exiting driver mode on scan complete
- * \param fResponseCb            	- The Response CB Function which called after downloading the command
- * \param hResponseCb            	- Handle to the Response CB Function Obj (Notice : last 2 params are NULL in Legacy run)
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Start scan. enter driver mode (PS) only if station is connected
- *
- * \sa
- */ 
-TI_STATUS TWD_Scan (TI_HANDLE hTWD, 
-					TScanParams *pScanParams, 
-					EScanResultTag eScanTag, 
-					TI_BOOL bHighPriority, 
-					TI_BOOL bDriverMode, 
-					TI_BOOL bScanOnDriverModeError, 
-					E80211PsMode ePsRequest, 
-					TI_BOOL bSendNullData, 
-					TCmdResponseCb fResponseCb, 
-					TI_HANDLE hResponseCb);
-/** @ingroup Measurement
- * \brief Stop scan
- * 
- * \param hTWD                		- TWD module object handle
- * \param eScanTag               	- Scan tag, used to track scan complete and result
- * \param bSendNullData          	- Indicates whether to send Null data when exiting driver mode
- * \param fScanCommandResponseCb 	- The Response CB Function which called after downloading the command
- * \param hCb                    	- Handle to the Response CB Function Obj (Notice : last 2 params are NULL in Legacy run)
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Sends a Stop Scan command to FW, no matter if we are in scan progress or not
- *
- * \sa
- */ 
-TI_STATUS TWD_StopScan (TI_HANDLE hTWD, 
-						EScanResultTag eScanTag, 
-						TI_BOOL bSendNullData, 
-						TCmdResponseCb fScanCommandResponseCb, 
-						TI_HANDLE hCb);
-/** @ingroup Measurement
- * \brief Stop Scan on FW Reset
- * 
- * \param hTWD		- TWD module object handle
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Stop scan operation when a FW reset (recovery) situation is detected (by all processes 
- * other than scan)
- *
- * \sa
- */ 
-TI_STATUS TWD_StopScanOnFWReset (TI_HANDLE hTWD);
-/** @ingroup Measurement
- * \brief Start Connection Periodic Scan operation
- * 
- * \param hTWD                			- TWD module object handle
- * \param  pPeriodicScanParams    		- Pointer to Input Parameters Structures for the Periodic Scan operation
- * \param  eScanTag               		- Scan tag, used for scan complete and result tracking
- * \param  uPassiveScanDfsDwellTimeMs 	- Passive dwell time for DFS channels (in milli-secs)
- * \param  fResponseCb            		- Response CB Function which is called after downloading the command
- * \param  hResponseCb            		- Handle to Response CB Function Obj (Notice : last 2 params are NULL in Legacy run)
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Perform Connection Scan periodically
- *
- * \sa
- */ 
-TI_STATUS TWD_StartConnectionScan (TI_HANDLE hTWD, 
-								 TPeriodicScanParams *pPeriodicScanParams, 
-								 EScanResultTag eScanTag, 
-								 TI_UINT32 uPassiveScanDfsDwellTimeMs, 
-								 TCmdResponseCb fResponseCb, 
-								 TI_HANDLE hResponseCb);
-/** @ingroup Measurement
- * \brief Stop Periodic Scan operation
- * 
- * \param hTWD 					- TWD module object handle
- * \param eScanTag              - scan tag, used for scan complete and result tracking
- * \param  fResponseCb          - Response CB Function which is called after downloading the command
- * \param  hResponseCb          - Handle to Response CB Function Obj (Notice : last 2 params are NULL in Legacy run)
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Stop Periodic Connection Scan
- *
- * \sa
- */ 
-TI_STATUS TWD_StopPeriodicScan (TI_HANDLE hTWD, 
-								EScanResultTag eScanTag, 
-								TCmdResponseCb fResponseCb, 
-								TI_HANDLE hResponseCb);
-/** @ingroup Measurement
- * \brief Register CB for Scan Complete
- * 
- * \param  hTWD         		- TWD module object handle
- * \param  fScanCompleteCb     	- The Complete CB Function
- * \param  hScanCompleteCb   	- Handle to the Complete CB Function Obj
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Registers a Complete CB Function for Scan Complete notifications
- *
- * \sa
- */ 
-TI_STATUS TWD_RegisterScanCompleteCb (TI_HANDLE hTWD, 
-									  TScanSrvCompleteCb fScanCompleteCb, 
-									  TI_HANDLE hScanCompleteCb); 
-/** @ingroup Misc
- * \brief  Set Parameters in FW
- * 
- * \param hTWD 			- TWD module object handle
- * \param  pParamInfo   - Pointer to Input TWD Parameters Information Structure
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- *  Set/Configure Parameters Information in FW via Mail BOX
- * 
- * \sa	TTwdParamInfo
- */ 
-TI_STATUS TWD_SetParam (TI_HANDLE hTWD, TTwdParamInfo *pParamInfo);
-/** @ingroup Misc
- * \brief  Get Parameters from FW
- * 
- * \param hTWD 			- TWD module object handle
- * \param  pParamInfo   - Pointer to Input TWD Parameters Information Structure
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- *  Get Parameters Information from FW  via Mail BOX
- * 
- * \sa
- */ 
-TI_STATUS TWD_GetParam (TI_HANDLE hTWD, TTwdParamInfo *pParamInfo);
-/** @ingroup Control
- * \brief Callback which Checks MBOX
- * 
- * \param  hTWD         - TWD module object handle
- * \param  uMboxStatus  - Mailbox status
- * \param  pItrParamBuf - Pointer to Interrogate parameters buffer
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Perform FW validation by calling CB function which is used for handling MBOX error.
- * If command MBOX queue identify MBOX error or timeout, it will call 
- * a failure-callback with MBOX_FAILURE type (FW failed)
- * 
- * \sa
- */ 
-TI_STATUS TWD_CheckMailboxCb (TI_HANDLE hTWD, TI_UINT16 uMboxStatus, void *pItrParamBuf);
-/** @ingroup Control
- * \brief Write MIB
- * 
- * \param hTWD 		- TWD module object handle
- * \param pMib      - Pointer to Input MIB Structure
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Write configuration information to FW
- *
- * \sa TWD_ReadMib
- */ 
-TI_STATUS   TWD_WriteMib (TI_HANDLE hTWD, TMib* pMib);
-/** @ingroup Control
- * \brief Read MIB
- * 
- * \param hTWD 			- TWD module object handle
- * \param  hCb          - Handle to Request MIB CB Function Obj
- * \param  fCb          - Pinter to Request MIB CB Function
- * \param  pCb          - Pointer to read parameters
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Read configuration information from FW
- *
- * \sa TWD_WriteMib
- */ 
-TI_STATUS   TWD_ReadMib                 (TI_HANDLE hTWD, TI_HANDLE hCb, void* fCb, void* pCb);
-/** @ingroup Control
- * \brief TWD Debug
- * 
- * \param hTWD 			- TWD module object handle
- * \param  funcType    	- TWD Function Debuged
- * \param  pParam     	- Pointer to Input parameters of Debug function
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Use for Debug TWD
- *
- * \sa
- */ 
-TI_STATUS TWD_Debug (TI_HANDLE hTWD, TI_UINT32 funcType, void *pParam);
-/** @ingroup Control
- * \brief Register event
- * 
- * \param  hTWD         - TWD module object handle
- * \param  event        - Event ID
- * \param  fCb          - Event Callback function pointer
- * \param  hCb          - Event Callback object handle
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Register FW event callback function
- * 
- * \sa
- */ 
-TI_STATUS TWD_RegisterEvent (TI_HANDLE hTWD, TI_UINT32 event, void *fCb, TI_HANDLE hCb);
-/** @ingroup Control
- * \brief Disable event
- * 
- * \param  hTWD         - TWD module object handle
- * \param  event        - Event ID
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Disable specific FW event
- * Note: Currently not in use
- * 
- * \sa
- */ 
-TI_STATUS TWD_DisableEvent (TI_HANDLE hTWD, TI_UINT32 event);
-/** @ingroup Control
- * \brief Enable event
- * 
- * \param  hTWD         - TWD module object handle
- * \param  event        - Event ID
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Enable specific FW event
- * 
- * \sa
- */ 
-TI_STATUS TWD_EnableEvent (TI_HANDLE hTWD, TI_UINT32 event);
-/** @ingroup Control
- * \brief Convert RSSI to RX Level
- * 
- * \param hTWD 			- TWD module object handle
- * \param  iRssiVal     - RSSI Input Value
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Note: Currently not in use!
- *
- * \sa
- */ 
-TI_INT8 TWD_ConvertRSSIToRxLevel (TI_HANDLE hTWD, TI_INT32 iRssiVal);
-/** @ingroup Control
- * \brief Complete TWD Stop
- * 
- * \param  hTWD	- TWD module object handle
- * \return void
- * 
- * \par Description
- * 
- * \sa TWD_Stop, TWD_Init
- */ 
-void TWD_StopComplete (TI_HANDLE hTWD);
-/** @ingroup Control
- * \brief Disable Interrupts
- * 
- * \param hTWD	- TWD module object handle
- * \return void 
- * 
- * \par Description
- * Disable the FW Event client of the context thread handler
- *
- * \sa
- */ 
-void TWD_DisableInterrupts (TI_HANDLE hTWD);
-/** @ingroup Control
- * \brief Enable Interrupts
- * 
- * \param hTWD 		- TWD module object handle
- * \return void 
- * 
- * \par Description
- * Enable the FW Event client of the context thread handler
- *
- * \sa
- */ 
-void TWD_EnableInterrupts (TI_HANDLE hTWD);
-/** @ingroup Control
- * \brief	Translate host to FW time (Usec)
- * 
- * \param  hTWD 	 - TWD module object handle
- * \param  uHostTime - The host time in MS to translate
- *
- * \return FW Time in Usec
- * 
- * \par Description
- * 
- * \sa
- */
-TI_UINT32 TWD_TranslateToFwTime (TI_HANDLE hTWD, TI_UINT32 uHostTime);
-/** @ingroup BSS
- * \brief Get TWD HT Capabilities
- * 
- * \param hTWD 					- TWD module object handle
- * \param  pTwdHtCapabilities  	- Pointer read structure Output
- * \return TI_OK
- * 
- * \par Description
- * 
- *
- * \sa
- */ 
-void TWD_GetTwdHtCapabilities (TI_HANDLE hTWD, TTwdHtCapabilities **pTwdHtCapabilities);
-#ifdef TI_DBG
-/** @ingroup Measurement
- * \brief Prints Scan Server Debug status
- * 
- * \param  hTWD         - TWD module object handle
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- *
- * \sa
- */ 
-TI_STATUS TWD_PrintMacServDebugStatus (TI_HANDLE hTWD);
-
-/** @ingroup Test
- * \brief Prints Tx Info
- * 
- * \param  hTWD         - TWD module object handle
- * \param  ePrintInfo   - Information type
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Call the requested print function - used for Debug Test
- * 
- * \sa 
- */ 
-TI_STATUS TWD_PrintTxInfo (TI_HANDLE hTWD, ETwdPrintInfoType ePrintInfo);
-#endif
-
-/*-----*/
-/* Get */
-/*-----*/
-
-/** @ingroup Control
- * \brief Get number of Commands in CMD Queue 
- * 
- * \param  hTWD         - TWD module object handle
- * \return Maximum Number of Commands currently in CMD Queue 
- * 
- * \par Description
- *
- * \sa
- */ 
-TI_UINT32 TWD_GetMaxNumberOfCommandsInQueue (TI_HANDLE hTWD);
-/** @ingroup Power_Management
- * \brief Get Power Save Status 
- * 
- * \param  hTWD         		- TWD module object handle
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- *
- * \sa
- */ 
-TI_BOOL TWD_GetPsStatus (TI_HANDLE hTWD);
-
-
-/** @ingroup Control
- * \brief  Get FW Information
- * 
- * \param  hTWD    	- TWD module object handle
- * \return TFwInfo 	- Pointer to Output FW Information Structure
- * 
- * \par Description
- * Gets the TFwInfo pointer
- * 
- * \sa TFwInfo
- */ 
-TFwInfo* TWD_GetFWInfo (TI_HANDLE hTWD);
-/** @ingroup BSS
- * \brief	Get Group Address Table
- * 
- * \param  hTWD    			- TWD module object handle
- * \param  pEnabled  		- Pointer to Output Indicatore if MAC Address Filter is Enabled
- * \param  pNumGroupAddrs   - Pointer to Output Number of Group Address
- * \param  pGroupAddr   	- Pointer to Output Group Address Table
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa TWD_WriteMib, TMacAddr
- */
-TI_STATUS TWD_GetGroupAddressTable (TI_HANDLE hTWD, TI_UINT8* pEnabled, TI_UINT8* pNumGroupAddrs, TMacAddr *pGroupAddr);
-/** @ingroup Control
- * \brief Read Memory
- * 
- * \param hTWD 			- TWD module object handle
- * \param pMemDebug     - Pointer to read Output
- * \param fCb			- Pointer to function Callback
- * \param hCb			- Handle to function Callback Parameters
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- *
- * \sa
- */ 
-TI_STATUS TWD_readMem (TI_HANDLE hTWD, TFwDebugParams* pMemDebug, void* fCb, TI_HANDLE hCb);
-/** @ingroup Control
- * \brief Write Memory
- * 
- * \param hTWD 			- TWD module object handle
- * \param pMemDebug     - Pointer to write Input
- * \param fCb			- Pointer to function Callback
- * \param hCb			- Handle to function Callback Parameters
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- *
- * \sa
- */ 
-TI_STATUS TWD_writeMem (TI_HANDLE hTWD, TFwDebugParams* pMemDebug, void* fCb, TI_HANDLE hCb);
-
-/** @ingroup Control
- * \brief Check if addr is a valid memory address
- * 
- * \param hTWD 			- TWD module object handle
- * \param pMemDebug     - Pointer to addr & length
- * \return TI_TRUE on success or TI_FALSE on failure 
- * 
- * \par Description
- *
- * \sa
- */ 
-TI_BOOL TWD_isValidMemoryAddr (TI_HANDLE hTWD, TFwDebugParams* pMemDebug);
-
-/** @ingroup Control
- * \brief Check if addr is a valid register address
- * 
- * \param hTWD 			- TWD module object handle
- * \param pMemDebug     - Pointer to addr & length
- * \return TI_TRUE on success or TI_FALSE on failure 
- * 
- * \par Description
- *
- * \sa
- */ 
-TI_BOOL TWD_isValidRegAddr (TI_HANDLE hTWD, TFwDebugParams* pMemDebug);
-
-/*-----*/
-/* Set */
-/*-----*/
-
-/** @ingroup Power_Management
- * \brief Set Power Save Mode 
- * 
- * \param  hTWD         		- TWD module object handle
- * \param  ePsMode       		- Power Save Mode
- * \param  bSendNullDataOnExit  - Indicates whether to send NULL data when exiting driver mode
- * \param  hPowerSaveCompleteCb - Handle to PS Complete CB Parameters Obj 
- * \param  fPowerSaveCompleteCb - The PS Complete CB function
- * \param  fPowerSaveResponseCb - The PS Response CB function
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- *
- * \sa
- */ 
-TI_STATUS TWD_SetPsMode (TI_HANDLE hTWD, 
-						 E80211PsMode ePsMode, 
-						 TI_BOOL bSendNullDataOnExit, 
-						 TI_HANDLE hPowerSaveCompleteCb, 
-						 TPowerSaveCompleteCb fPowerSaveCompleteCb, 
-						 TPowerSaveResponseCb fPowerSaveResponseCb);
-/** @ingroup Radio
- * \brief Set Rate Modulation 
- * 
- * \param  hTWD         - TWD module object handle
- * \param  rate         - Rate Modulation Value
- * \return TRUE if Power Service State is Pwer Save, FALSE otherwise 
- * 
- * \par Description
- *
- * \sa
- */ 
-TI_STATUS TWD_SetNullRateModulation (TI_HANDLE hTWD, TI_UINT16 rate);
-/** @ingroup Radio
- * \brief	Set Radio Band
- * 
- * \param  hTWD    			- TWD module object handle
- * \param  eRadioBand  		- Radio Band Type
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */
-TI_STATUS TWD_SetRadioBand (TI_HANDLE hTWD, ERadioBand eRadioBand);
-/** @ingroup Data_Path
- * \brief	Set Security Sequance Number
- * 
- * \param  hTWD    				- TWD module object handle
- * \param  securitySeqNumLsByte - LS Byte of Security Sequance Number
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Update the TKIP/AES sequence-number according to the Tx data packet security-sequance-number
- * Note: The FW always provides the last used sequance-number so no need to check if the current 
- * packet is data and WEP is on
- *
- * \sa
- */
-TI_STATUS TWD_SetSecuritySeqNum (TI_HANDLE hTWD, TI_UINT8 securitySeqNumLsByte);
-/** @ingroup BSS
- * \brief Update DTIM & TBTT 
- * 
- * \param  hTWD         	- TWD module object handle
- * \param  uDtimPeriod     	- DTIM period in number of beacons
- * \param  uBeaconInterval 	- Beacon perios in TUs (1024 msec)
- * \return void 
- * 
- * \par Description
- * Update DTIM and Beacon periods for scan timeout calculations
- *
- * \sa
- */ 
-void TWD_UpdateDtimTbtt (TI_HANDLE hTWD, TI_UINT8 uDtimPeriod, TI_UINT16 uBeaconInterval);
-
-/*---------*/
-/* Command */
-/*---------*/
-
-
-/** @ingroup Measurement
- * \brief  Set Split scan time out
- * 
- * \param hTWD 			- TWD module object handle
- * \param  uTimeOut   	- Scan Time Out
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Set Triggered scan time out per channel
- * 
- * \sa
- */ 
-TI_STATUS TWD_CmdSetSplitScanTimeOut (TI_HANDLE hTWD, TI_UINT32 uTimeOut);
-/** @ingroup BSS
- * \brief  Join BSS
- * 
- * \param hTWD 				- TWD module object handle
- * \param  pJoinBssParams   - Pointer to Join BSS Input parameters structure
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS TWD_CmdJoinBss (TI_HANDLE hTWD, TJoinBss *pJoinBssParams);
-/** @ingroup Control
- * \brief  Command Template
- * 
- * \param hTWD 				- TWD module object handle
- * \param  pTemplateParams  - Pointer to Input Template Parameters Structure
- * \param  fCb  			- Pointer to Command Callback Function
- * \param  hCb  			- Handle to Command Callback Function Obj. Parameters
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Sets a template to the FW
- * 
- * \sa
- */ 
-/* 6.1.08 - for future WHA measurement command */
-TI_STATUS TWD_CmdTemplate (TI_HANDLE hTWD, TSetTemplate *pTemplateParams, void *fCb, TI_HANDLE hCb);
-/** @ingroup Data_Path
- * \brief  Enable Tx path
- * 
- * \param  hTWD     	- TWD module object handle
- * \param  channel     	- Channel Number
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Enable tx path on the hardware
- * 
- * \sa
- */ 
-TI_STATUS TWD_CmdEnableTx (TI_HANDLE hTWD, TI_UINT8 channel);
-/** @ingroup Data_Path
- * \brief  Disable Tx path
- * 
- * \param  hTWD     	- TWD module object handle
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS TWD_CmdDisableTx (TI_HANDLE hTWD);
-/** @ingroup Measurement
- * \brief  Command Noise Histogram
- * 
- * \param  hTWD     		- TWD module object handle
- * \param  pNoiseHistParams - Pointer Input Noise Histogram Parameters: 
- * 							  holds Start/Stop Noise Histogram Measure Indication, 
- * 							  Sample Interval & Sample Ranges 
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Send a Start/Stop Noise Histogram Measure Command to the FW with measure parameters
- * 
- * \sa	TNoiseHistogram
- */ 
-TI_STATUS TWD_CmdNoiseHistogram (TI_HANDLE hTWD, TNoiseHistogram *pNoiseHistParams);
-
-/** @ingroup Radio
- * \brief  Command Switch Channel
- * 
- * \param  hTWD    				- TWD module object handle
- * \param  pSwitchChannelCmd    - Pointer to Switch Channel Parameters Structure
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa TSwitchChannelParams
- */ 
-TI_STATUS TWD_CmdSwitchChannel (TI_HANDLE hTWD, TSwitchChannelParams *pSwitchChannelCmd);
-/** @ingroup Radio
- * \brief  Command Switch Channel Cancel
- * 
- * \param  hTWD    		- TWD module object handle
- * \param  channel    	- Channek Number
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS TWD_CmdSwitchChannelCancel (TI_HANDLE hTWD, TI_UINT8 channel);
-/** @ingroup Control
- * \brief  FW Disconnect
- * 
- * \param  hTWD    	- TWD module object handle
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa 
- */ 
-TI_STATUS TWD_CmdFwDisconnect (TI_HANDLE hTWD, DisconnectType_e uDisconType, TI_UINT16 uDisconReason);
-/** @ingroup Measurement
- * \brief  Start Measurement Command
- * 
- * \param  hTWD    				- TWD module object handle
- * \param  uDisconReason		- 2 bytes of disconnect reason to be use in deauth/disassoc frmaes
- * \param  uDisconType    		- Immediate (dont send frames) or send Deauth or send Disassoc frmae
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * send Command for start measurement to FW
- * 
- * \sa TMeasurementParams
- */ 
-TI_STATUS TWD_CmdMeasurement (TI_HANDLE hTWD, 
-							  TMeasurementParams *pMeasurementParams, 
-							  void *fCommandResponseCb, 
-							  TI_HANDLE hCb);
-/** @ingroup Measurement
- * \brief  Stop Measurement Command
- * 
- * \param  hTWD    	- TWD module object handle
- * \param  fCb  	- Pointer to Callback Function
- * \param  hCb    	- Handle to Callback Function Object Parameters
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * send Command for stop measurement to FW
- * 
- * \sa
- */ 
-TI_STATUS TWD_CmdMeasurementStop (TI_HANDLE hTWD, void* fCb, TI_HANDLE hCb);
-/** @ingroup UnKnown
- * \brief  AP Discovery
- * 
- * \param  hTWD    				- TWD module object handle
- * \param  pApDiscoveryParams  	- Pointer to Input AP Discovery Parameters Structure
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS TWD_CmdApDiscovery (TI_HANDLE hTWD, TApDiscoveryParams *pApDiscoveryParams);
-/** @ingroup UnKnown
- * \brief	AP Discovery Stop
- * 
- * \param  hTWD    				- TWD module object handle
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS TWD_CmdApDiscoveryStop (TI_HANDLE hTWD);
-
-/** @ingroup Control
- * \brief	Helth Check
- * 
- * \param  hTWD    			- TWD module object handle
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Trigger the FW health test command and wait for results
- *
- * \sa
- */
-TI_STATUS TWD_CmdHealthCheck (TI_HANDLE hTWD);
-/** @ingroup UnKnown
- * \brief  AP Discovery
- * 
- * \param  hTWD    		- TWD module object handle
- * \param  staState  	- stat of the station (CONNECTED)
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS TWD_CmdSetStaState (TI_HANDLE hTWD, TI_UINT8 staState, void *fCb, TI_HANDLE hCb);
-
-/*-----------*/
-/* Configure */
-/*-----------*/
-
-/** @ingroup UnKnown
- * \brief  Configure ARP table
- * 
- * \param hTWD 			- TWD module object handle
- * \param  tIpAddr   	- IP Address Input Buffer
- * \param  bEnabled   	- Indicates if ARP filtering is Enabled (1) or Disabled (0)
- * \param  eIpVer   	- IP Version
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Configure ARP IP Address table
- * 
- * \sa
- */ 
-TI_STATUS TWD_CfgArpIpAddrTable (TI_HANDLE hTWD, 
-								 TIpAddr tIpAddr, 
-								 EArpFilterType filterType, 
-								 EIpVer eIpVer);
-
-TI_STATUS TWD_CfgArpIpFilter    (TI_HANDLE hTWD, 
-                                 TIpAddr tIpAddr);
-
-/** @ingroup BSS
- * \brief	Configure Group Address Table
- * 
- * \param  hTWD    			- TWD module object handle
- * \param  uNumGroupAddrs  	- Number of Group Address
- * \param  pGroupAddr   	- Pointer to Input Group Address Table
- * \param  bEnabled    		- Indicates if MAC Address Filter is Enabled
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa TWD_WriteMib
- */
-TI_STATUS TWD_CfgGroupAddressTable (TI_HANDLE hTWD, 
-									TI_UINT8 uNumGroupAddrs, 
-									TMacAddr *pGroupAddr, 
-									TI_BOOL bEnabled);
-/** @ingroup Data_Path
- * \brief  Configure RX Filters
- * 
- * \param hTWD 				- TWD module object handle
- * \param  uRxConfigOption  - RX Configuration Option
- * \param  uRxFilterOption 	- RX Filter Option
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa	TWD_WriteMib
- */ 
-TI_STATUS TWD_CfgRx (TI_HANDLE hTWD, TI_UINT32 uRxConfigOption, TI_UINT32 uRxFilterOption);
-/** @ingroup UnKnown
- * \brief  Configure Packet Detection Threshold
- * 
- * \param hTWD 			- TWD module object handle
- * \param  threshold 	- Threshold Value
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa ERate
- */ 
-TI_STATUS TWD_CfgPacketDetectionThreshold (TI_HANDLE hTWD, TI_UINT32 threshold);
-/** @ingroup Radio
- * \brief  Configure Slot Time
- * 
- * \param hTWD 				- TWD module object handle
- * \param  eSlotTimeVal 	- Slot Time Value
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS TWD_CfgSlotTime (TI_HANDLE hTWD, ESlotTime eSlotTimeVal);
-/** @ingroup Radio
- * \brief  Configure Preamble
- * 
- * \param hTWD 			- TWD module object handle
- * \param  ePreamble 	- Preamble Value
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS TWD_CfgPreamble (TI_HANDLE hTWD, EPreamble ePreamble);
-/** @ingroup Power_Management
- * \brief  Configure Beacon Filter State
- * 
- * \param  hTWD     				- TWD module object handle
- * \param  uBeaconFilteringStatus   - Beacon Filtering Status. Indicates whether the filter is enabled:
- * 									  1 - enabled, 0 - disabled
- * \param  uNumOfBeaconsToBuffer 	- Determines the number of beacons without the unicast TIM bit set,
- * 									  that the firmware buffers before signaling the host about ready frames.
- *									  When thi snumber is set to 0 and the filter is enabled, beacons without 
- *									  the unicast TIM bit set are dropped. 
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Configure Beacon Filter State to the FW
- * 
- * \sa
- */ 
-TI_STATUS TWD_CfgBeaconFilterOpt (TI_HANDLE hTWD, TI_UINT8 uBeaconFilteringStatus, TI_UINT8 uNumOfBeaconsToBuffer);
-/** @ingroup Power_Management
- * \brief  Configure Beacon Filter Table
- * 
- * \param  hTWD     	- TWD module object handle
- * \param  uNumOfIe   	- The number of IE's in the table
- * \param  pIeTable 	- Pointer to Input IE Table
- * \param  uIeTableSize - Size of Input IE Table
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Configure Beacon Filter Table to the FW
- * 
- * \sa
- */ 
-TI_STATUS TWD_CfgBeaconFilterTable (TI_HANDLE hTWD, TI_UINT8 uNumOfIe, TI_UINT8 *pIeTable, TI_UINT8 uIeTableSize);
-/** @ingroup Power_Management
- * \brief  Configure Wake Up Condition
- * 
- * \param  hTWD     		- TWD module object handle
- * \param  pPowerMgmtConfig	- Pointer to Input Power Management Configuration Parameters
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Configure Power Manager's Wake Up Condition
- * 
- * \sa
- */ 
-TI_STATUS TWD_CfgWakeUpCondition (TI_HANDLE hTWD, TPowerMgmtConfig *pPowerMgmtConfig);
-/** @ingroup UnKnown
- * \brief  Configure Beacon Broadcast Options
- * 
- * \param  hTWD     		- TWD module object handle
- * \param  pPowerMgmtConfig	- Pointer to Input Power Management Configuration Parameters Structure
- * 							  The Following Field should be filled: 
- * 							  pPowerMgmtConfig->BcnBrcOptions.BeaconRxTimeout
- * 							  pPowerMgmtConfig->BcnBrcOptions.BroadcastRxTimeout
- * 							  pPowerMgmtConfig->BcnBrcOptions.RxBroadcastInPs - if set, enables receive of broadcast packets in Power-Save mode
- * 							  pPowerMgmtConfig->ConsecutivePsPollDeliveryFailureThreshold - No answer after Ps-Poll work-around 					   	  
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Configure Power Manager's Beacon Broadcast Options:
- * Beacon RX time Out, Broadcast RX Timeout, RX Broadcast In Power Save, 
- * Consecutive Power Save Poll Delivery Failure Threshold
- * 
- * 
- * \sa TPowerMgmtConfig, TBcnBrcOptions
- */ 
-TI_STATUS TWD_CfgBcnBrcOptions (TI_HANDLE hTWD, TPowerMgmtConfig *pPowerMgmtConfig);
-
-/** @ingroup BSS
- * \brief  Configure Max TX Retry
- * 
- * \param  hTWD    				- TWD module object handle
- * \param  pRoamingTriggerCmd   - Pointer to Input Configuration Parameters Structure
- * 							  	  The Following Field should be filled: 
- * 								  pRoamingTriggerCmd->maxTxRetry
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Configure the Max Tx Retry parameters
- * 
- * \sa
- */ 
-TI_STATUS TWD_CfgMaxTxRetry (TI_HANDLE hTWD, TRroamingTriggerParams *pRoamingTriggerCmd);
-/** @ingroup BSS
- * \brief  Configure Connection Monitoring
- * 
- * \param  hTWD    				- TWD module object handle
- * \param  pRoamingTriggerCmd   - Pointer to Input Configuration Parameters Structure
- * 							  	  The Following Field should be filled: 
- * 								  pRoamingTriggerCmd->BssLossTimeout
- * 								  pRoamingTriggerCmd->TsfMissThreshold
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Configure the Bss Lost Timeout & TSF miss threshold Parameters
- * 
- * \sa
- */ 
-TI_STATUS TWD_CfgConnMonitParams (TI_HANDLE hTWD, TRroamingTriggerParams *pRoamingTriggerCmd);
-/** @ingroup Power_Management
- * \brief	Configure Sleep Auth
- * 
- * \param  hTWD    			- TWD module object handle
- * \param  eMinPowerPolicy  - Minimum Power Policy Type
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Configure the minimum power policy to the FW
- * 
- * \sa EPowerPolicy
- */
-TI_STATUS TWD_CfgSleepAuth (TI_HANDLE hTWD, EPowerPolicy eMinPowerPolicy);
-/** @ingroup Control
- * \brief	Configure MAC Clock
- * 
- * \param  hTWD    		- TWD module object handle
- * \param  uMacClock    - MAC Clock value
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- *
- * \sa
- */
-TI_STATUS TWD_CfgMacClock (TI_HANDLE hTWD, TI_UINT32 uMacClock);
-/** @ingroup Control
- * \brief	Configure ARM Clock
- * 
- * \param  hTWD    		- TWD module object handle
- * \param  uArmClock    - ARM Clock value
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- *
- * \sa
- */
-TI_STATUS TWD_CfgArmClock (TI_HANDLE hTWD, TI_UINT32 uArmClock);
-/** @ingroup Data_Path
- * \brief	Configure RX Data Filter
- * 
- * \param  hTWD    				- TWD module object handle
- * \param  index    			- Index of the Rx Data filter
- * \param  command    			- Command: Add/remove the filter
- * \param  eAction    			- Action to take when packets match the pattern
- * \param  uNumFieldPatterns   	- Number of field patterns in the filter
- * \param  uLenFieldPatterns    - Length of the field pattern series
- * \param  pFieldPatterns    	- Series of field patterns
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Add/remove Rx Data filter information element
- *
- * \sa
- */
-TI_STATUS TWD_CfgRxDataFilter (TI_HANDLE hTWD, 
-							   TI_UINT8 index, 
-							   TI_UINT8 command, 
-							   filter_e eAction, 
-							   TI_UINT8 uNumFieldPatterns, 
-							   TI_UINT8 uLenFieldPatterns, 
-							   TI_UINT8 *pFieldPatterns);
-/** @ingroup Data_Path
- * \brief	Configure Enable RX Data Filter
- * 
- * \param  hTWD    			- TWD module object handle
- * \param  bEnabled      	- Indicates if Rx data filtering is enabled or Disabled
- * 							  (0: data filtering disabled, Otherwise: enabled)
- * \param  eDefaultAction   - The default action taken on non-matching packets
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Configure Enable/Disable RX Data Filter, and which default action to perform if it is enabled
- *
- * \sa
- */
-TI_STATUS TWD_CfgEnableRxDataFilter (TI_HANDLE hTWD, TI_BOOL bEnabled, filter_e eDefaultAction);
-/** @ingroup BSS
- * \brief	Configure RRSSI/SNR Trigger parameters
- * 
- * \param  hTWD    			- TWD module object handle
- * \param  pRssiSnrTrigger  - Pointer to RRSSI/SNR Input parameter Structure
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- *
- * \sa
- */
-TI_STATUS TWD_CfgRssiSnrTrigger (TI_HANDLE hTWD, RssiSnrTriggerCfg_t* pRssiSnrTrigger);
-/** @ingroup QoS
- * \brief	Configure AC parameters
- * 
- * \param  hTWD    			- TWD module object handle
- * \param  pAcQosParams  	- Pointer to Input AC Quality Of Service Parameters Structure
- * 								Fields that should be filled:
- * 								pAcQosParams->ac
- * 								pAcQosParams->aifsn
- * 								pAcQosParams->cwMax
- * 								pAcQosParams->cwMin
- * 								pAcQosParams->txopLimit
- * \param  fCb      		- Pointer to Command CB Function
- * \param  hCb      		- Handle to Command CB Function Obj Parameters
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- *
- * \sa
- */
-TI_STATUS TWD_CfgAcParams (TI_HANDLE hTWD, TAcQosParams *pAcQosParams, void *fCb, TI_HANDLE hCb);
-/** @ingroup QoS
- * \brief	Configure Power Save RX Streaming
- * 
- * \param  hTWD    			- TWD module object handle
- * \param  pPsRxStreaming  	- Pointer to Input Power Save RX Straeming Parameters Structure
- * 								Fields that should be filled:
- * 								pPsRxStreaming->uTid
- * 								pPsRxStreaming->bEnabled
- * 								pPsRxStreaming->uStreamPeriod
- * 								pPsRxStreaming->uTxTimeout
- * \param  fCb      		- Pointer to Command CB Function
- * \param  hCb      		- Handle to Command CB Function Obj Parameters
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- *
- * \sa TPsRxStreaming
- */
-TI_STATUS TWD_CfgPsRxStreaming (TI_HANDLE hTWD, TPsRxStreaming *pPsRxStreaming, void *fCb, TI_HANDLE hCb);
-/** @ingroup Power_Management
- * \brief	Configure BET
- * 
- * \param  hTWD    				- TWD module object handle
- * \param  Enable    			- 0: disable BET, Otherwirs: Enable BET
- * \param  MaximumConsecutiveET - Max number of consecutive beacons that may be early terminated
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- *
- * \sa
- */
-TI_STATUS TWD_CfgBet (TI_HANDLE hTWD, TI_UINT8 Enable, TI_UINT8 MaximumConsecutiveET);
-/** @ingroup UnKnown
- * \brief  Configure Keep Alive
- * 
- * \param hTWD 				- TWD module object handle
- * \param  pKeepAliveParams - Pointer to Keep Alive parameters structure
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Configures the keep-alive paramters
- * 
- * \sa
- */ 
-TI_STATUS TWD_CfgKeepAlive (TI_HANDLE hTWD, TKeepAliveParams *pKeepAliveParams);
-/** @ingroup Power_Management
- * \brief  Configure Keep Alive Enable/Disable flag
- * 
- * \param hTWD 			- TWD module object handle
- * \param  enaDisFlag  	- Indicates whether to Enable (TI_TRUE) or Disable Keep Alive
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS TWD_CfgKeepAliveEnaDis (TI_HANDLE hTWD, TI_UINT8 enaDisFlag);
-/** @ingroup Data_Path
- * \brief	Configure Set BA Initiator
- * 
- * \param  hTWD    				- TWD module object handle
- * \param  uTid 				- TID number
- * \param  uState 				- Policy : Enable / Disable 
- * \param  tRa 					- Mac address of: SA as receiver / RA as initiator
- * \param  uWinSize 			- windows size in number of packet
- * \param  uInactivityTimeout 	- as initiator inactivity timeout in time units(TU) of 1024us / as receiver reserved
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * configure BA session initiator parameters setting in the FW
- * called after join in order to init the parameters for negotiating BA sessions as initiator.
- * Parameters initialized: RA, TID, WinSize, Inactivity Timeout and state = Enable/Disable.
- * In case the host sends a broadcast address as RA the FW is allowed to Set or Deleted BA sessions 
- * to any receiver for that TID.
- * In case of disassociate the FW allowed to establish BA session just after get that command.
- * That command will not need any respond from the FW. In case DELBA send to STA or from the 
- * STA as initiator the FW doesn't send event to the host
- * 
- * \sa
- */
-TI_STATUS TWD_CfgSetBaInitiator (TI_HANDLE hTWD, 
-								 TI_UINT8 uTid, 
-								 TI_UINT8 uState, 
-								 TMacAddr tRa, 
-								 TI_UINT16 uWinSize, 
-								 TI_UINT16 uInactivityTimeout);
-/** @ingroup Data_Path
- * \brief	Configure Set BA Receiver
- * 
- * \param  hTWD    				- TWD module object handle
- * \param  uTid 				- TID number
- * \param  uState 				- Policy : Enable / Disable 
- * \param  tRa 					- Mac address of: SA as receiver / RA as initiator
- * \param  uWinSize 			- windows size in number of packet
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * configure BA session receiver parameters setting in the FW
- * called after join in order to init the parameters for incoming BA session, as a responder.
- * Parameters initialized: SA, TID, winSize and state = Enable/Disable.
- * In case the host sends a broadcast address as SA the FW is allowed to Set/Deleted BA sessions 
- * to any sender for that TID.
- * In case of disassociate the FW allowed to establish BA session just after get that command.
- * The events of that command will respond via the RX path from the FW: ADDBA, DELBA, BAR packets. 
- * 
- * \sa
- */
-TI_STATUS TWD_CfgSetBaReceiver (TI_HANDLE hTWD, 
-								TI_UINT8 uTid, 
-								TI_UINT8 uState, 
-								TMacAddr tRa, 
-								TI_UINT16 uWinSize);
-
-/** @ingroup Data_Path
- * \brief	Close all BA receiver sessions
- * 
- * \param  hTWD    				- TWD module object handle
- * \return None
- * 
- * \par Description
- * Close all BA receiver sessions and pass all packets in the TID queue to upper layer. 
- * 
- * \sa
- */
-void TWD_CloseAllBaSessions(TI_HANDLE hTWD); 
-
-/** @ingroup BSS
- * \brief	Set FW HT Capabilities
- * 
- * \param  hTWD    				- TWD module object handle
- * \param  pHtCapabilitiesIe 	- Pointer to string of HT capability IE unparsed
- * \param  bAllowHtOperation 	- TI_TRUE: HT operation allowed, Otherwise: HT operation NOT allowed
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Parse HT capability IE and set the current AP HT Capabilities to the FW
- * 
- * \sa
- */
-TI_STATUS TWD_CfgSetFwHtCapabilities (TI_HANDLE hTWD, 
-									  Tdot11HtCapabilitiesUnparse *pHtCapabilitiesIe, 
-									  TI_BOOL bAllowHtOperation);
-/** @ingroup BSS
- * \brief Set FW HT Information
- * 
- * \param  hTWD    				- TWD module object handle
- * \param  pHtInformationIe 	- Pointer to string of HT information IE unparsed
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Parse HT Information IE and set the current AP HT Information to the FW
- * 
- * \sa
- */
-TI_STATUS TWD_CfgSetFwHtInformation (TI_HANDLE hTWD, Tdot11HtInformationUnparse *pHtInformationIe);
-
-
-/** @ingroup UnKnown
- * \brief Enable/Disabel burst mode
- *
- * \param  hTWD    				- TWD module object handle
- * \param  bEnabled 	        - burst mode: Enable/Disable
- * \return TI_OK
- *
- * \par Description
- *
- * \sa
- */
-TI_STATUS TWD_CfgBurstMode (TI_HANDLE hTWD, TI_BOOL bEnabled);
-
-/*-------------*/
-/* Interrogate */
-/*-------------*/
-
-/** @ingroup UnKnown
- * \brief  Interrogate Roamming Statistics
- * 
- * \param  hTWD     	- TWD module object handle
- * \param  fCb          - Pointer to Command CB Function
- * \param  hCb          - Handle to Command CB Function Obj Parameters
- * \param  pCb          - Pointer to read parameters
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Interrogate ACX Roamming Statistics
- * 
- * \sa
- */ 
-TI_STATUS TWD_ItrRoammingStatisitics (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void *pCb);
-/** @ingroup UnKnown
- * \brief  Configure/Interrogate RSSI
- * 
- * \param  hTWD    	- TWD module object handle
- * \param  fCb      - Pointer to Command CB Function
- * \param  hCb      - Handle to Command CB Function Obj Parameters
- * \param  pCb      - Pointer to read parameters
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Configure/Interrogate StationId information element to/from FW
- * This information element specifies the MAC Address assigned to the STATION or AP.
- * The RSSI is Configed to default value which is the permanent MAC address which 
- * is stored in the adaptor's non-volatile memory.
- * 
- * \sa 
- */ 
-TI_STATUS TWD_ItrRSSI (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void *pCb);
-/** @ingroup UnKnown
- * \brief	Interrogate Memory Map
- * 
- * \param  hTWD    	- TWD module object handle
- * \param  pMap    	- Pointer to Output Memory Map
- * \param  fCb    	- Pointer to Callback Function
- * \param  hCb    	- Handle to Callback Function Parameters Object 
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Interrogate Memory Map from FW
- *
- * \sa MemoryMap_t
- */TI_STATUS TWD_ItrMemoryMap (TI_HANDLE hTWD, MemoryMap_t *pMap, void *fCb, TI_HANDLE hCb);
-/** @ingroup UnKnown
- * \brief	Interrogate Statistics
- * 
- * \param  hTWD    	- TWD module object handle
- * \param  fCb      - Pointer to Command CB Function
- * \param  hCb      - Handle to Command CB Function Obj Parameters
- * \param  pCb      - Pointer to read parameters
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- *
- * \sa
- */
-TI_STATUS TWD_ItrStatistics (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void *pCb);
-/** @ingroup Data_Path
- * \brief	Interrogate Data Filter Statistics
- * 
- * \param  hTWD    	- TWD module object handle
- * \param  fCb      - Pointer to Command CB Function
- * \param  hCb      - Handle to Command CB Function Obj Parameters
- * \param  pCb      - Pointer to read parameters
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- *
- * \sa
- */TI_STATUS TWD_ItrDataFilterStatistics (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void *pCb);
-
-/*
- * --------------------------------------------------------------
- *	TNETW-Driver  Tx  API  Functions
- * --------------------------------------------------------------
- */
-
-/** @ingroup Data_Path
- * \brief  TWD TX Control Block Allocation
- * 
- * \param  hTWD   	- TWD module object handle
- * \return Pointer to Control Block Entry on success or NULL on failure
- * 
- * \par Description
- * Use this function for Allocate a Control-Block for the packet Tx parameters and descriptor
- * 
- * \sa
- */ 
-TTxCtrlBlk *TWD_txCtrlBlk_Alloc (TI_HANDLE hTWD);
-/** @ingroup Data_Path
- * \brief  TWD TX Control Block Free
- * 
- * \param  hTWD   			- TWD module object handle
- * \param  pCurrentEntry   	- Pointer to TX Control Block Entry to Free
- * \return void
- * 
- * \par Description
- * Use this function for Free a Control-Block of packet Tx parameters and descriptor
- * 
- * \sa
- */ 
-void TWD_txCtrlBlk_Free (TI_HANDLE hTWD, TTxCtrlBlk *pCurrentEntry);
-/** @ingroup Data_Path
- * \brief  TWD TX Control Get Pointer
- * 
- * \param  hTWD   	- TWD module object handle
- * \param  descId  	- Id of TX Control Block Descriptor
- * \return Pointer to Control Block Entry on success or NULL on failure
- * 
- * \par Description
- * Use this function for Get a Pointer to a Control-Block of packet Tx parameters and descriptor
- * 
- * \sa
- */ 
-TTxCtrlBlk *TWD_txCtrlBlk_GetPointer (TI_HANDLE hTWD, TI_UINT8 descId);
-
-/** @ingroup Data_Path
- * \brief  Allocate Resources for TX HW Queue
- * 
- * \param  hTWD   			- TWD module object handle
- * \param  pTxCtrlBlk  		- The Tx packet control block
- * \return see - ETxHwQueStatus
- * 
- * \par Description
- * Allocates Resources (HW-blocks number required) for TX HW Queue 
- * 
- * \sa
- */ 
-ETxHwQueStatus TWD_txHwQueue_AllocResources (TI_HANDLE hTWD, TTxCtrlBlk *pTxCtrlBlk);
-
-/** @ingroup Data_Path
- * \brief  TX Xfer Send Packet
- * 
- * \param  hTWD   			- TWD module object handle
- * \param  pPktCtrlBlk   	- Pointer to TX Control Block Entry to Free
- * \return see ETxnStatus
- * 
- * \par Description
- * Send Packet via TX Xfer 
- * 
- * \sa
- */ 
-ETxnStatus TWD_txXfer_SendPacket (TI_HANDLE hTWD, TTxCtrlBlk *pPktCtrlBlk);
-
-/** @ingroup Data_Path
- * \brief  Indicates that current packets burst stopped
- * 
- * \param  hTWD   			- TWD module object handle
- * \return void
- * 
- * \par Description
- * Indicates that current packets burst stopped, so the TxXfer will send its aggregated packets to FW. 
- * 
- * \sa
- */ 
-void TWD_txXfer_EndOfBurst (TI_HANDLE hTWD);
-
-/** @ingroup Control
- * \brief  Watch Dog Expire Event
- * 
- * \param  hTWD   			- TWD module object handle
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * This function handles the Event of Watch Dog Expire (FW stopped)
- * 
- * \sa
- */ 
-ETxnStatus TWD_WdExpireEvent (TI_HANDLE hTWD);
-/*
- * --------------------------------------------------------------
- *	BIT API Functions
- * --------------------------------------------------------------
- */
-/** @ingroup Control
- * \brief TWD Test Command Complete CB
- * 
- * \param  Handle        	- handle to object
- * \param  eStatus			- Status of Driver Test Performed
- * \param  pTestCmdParams  	- Pointer to Output of Test Command Parameters
- * \return void
- * 
- * \par Description
- * The function prototype for the BIT Test Command Complete CB
- * Enables user to implement and use its own BIT Test Command Complete CB 
- * which will be called when Driver Test end
- * 
- * \sa	TWDriverTest
- */ 
-typedef void (*TTestCmdCB)(TI_HANDLE Handle, 
-						   TI_STATUS eStatus, 
-						   TI_HANDLE pTestCmdParams);
-/** @ingroup Control
- * \brief TWD Test Command Complete CB
- * 
- * \param  Handle        	- handle to object
- * \param  eStatus			- Status of Driver Test Performed (Complete/Pending/Error)
- * \param  pTestCmdParams  	- Pointer to Output of Test Command Parameters
- * \return void
- * 
- * \par Description
- * The function implementation for the BIT Test Command Complete CB
- * 
- * \sa
- */ 
-void TWDriverTestCB(TI_HANDLE Handle, 
-					TI_STATUS eStatus, 
-					TI_HANDLE pTestCmdParams);
-/** @ingroup Control
- * \brief TWD Driver Test
- * 
- * \param  hTWD        		- handle to TWD object
- * \param  eTestCmd			- Identifier of test Command to Perform
- * \param  pTestCmdParams  	- Pointer to Input/Output Test Command Parameters
- * \param  fCb  			- Test Command Complete CB
- * \param  hCb	  			- Handle to Test Command Complete CB Parameters
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * The implementation of the BIT Test Command
- * 
- * \sa
- */ 
-TI_STATUS TWDriverTest(TI_HANDLE hTWD, 
-					   TestCmdID_enum eTestCmd, 
-					   void* pTestCmdParams, 
-					   TTestCmdCB fCb, 
-					   TI_HANDLE hCb);
-
-
-
-/** 
- *  \brief TWD get FEM type
- *  * 
- * \param  Handle        	- handle to object
- * \return uint8 
- * 
- * \par Description
- * The function return the Front end module that was read frm FW register * 
- * \sa
- */ 
-
-TI_UINT8 TWD_GetFEMType (TI_HANDLE hTWD);
-
-
-/** 
- *  \brief TWD end function of read radio state machine
- *  *  * 
- * \param  Handle        	- handle to object
- * \return void
- * 
- * \par Description
- * The function calling to HwInit call back function, after finish reading FEM registers * 
- * \sa
- */ 
-
-void TWD_FinalizeFEMRead(TI_HANDLE hTWD);
-void TWD_FinalizePolarityRead(TI_HANDLE hTWD);
-
-/** @ingroup Data_Path
- * \brief  TWD_CfgBurstMode
- * 
- * \param  hTWD   	- TWD module object handle
- * \param  bEnabled  - is Burst mode enabled
- * \return TI_OK
- * 
- * \par Description
- * Use this function to enable/disbale the burst mode
- * 
- * \sa
- */ 
-TI_STATUS TWD_CfgBurstMode (TI_HANDLE hTWD, TI_BOOL bEnabled);
-TI_STATUS TWD_SetRateMngDebug(TI_HANDLE hTWD, RateMangeParams_t *pRateMngParams);
-TI_STATUS TWD_GetRateMngDebug(TI_HANDLE hTWD, RateMangeReadParams_t  *pParamInfo);
-
-#endif  /* TWDRIVER_H */
diff --git a/wl1271/TWD/TWDriver/TWDriverCtrl.c b/wl1271/TWD/TWDriver/TWDriverCtrl.c
deleted file mode 100644
index 8cb89e9..0000000
--- a/wl1271/TWD/TWDriver/TWDriverCtrl.c
+++ /dev/null
@@ -1,923 +0,0 @@
-/*
- * TWDriverCtrl.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  TWDriver.c 
- *  \brief TI WLAN Hardware Access Driver, Parameters control
- *
- *  \see   TWDriver.h 
- */
-
-#define __FILE_ID__  FILE_ID_118
-#include "TWDriver.h"
-#include "tidef.h"
-#include "report.h"
-#include "txHwQueue_api.h"
-#include "txXfer_api.h"
-#include "txResult_api.h"
-#include "eventMbox_api.h" 
-#include "TWDriver.h"
-#include "TWDriverInternal.h"
-#include "FwEvent_api.h"
-#include "CmdBld.h"
-#include "RxQueue_api.h"
-
-
-TI_STATUS TWD_SetParam (TI_HANDLE hTWD, TTwdParamInfo *pParamInfo)
-{
-    TTwd           *pTWD = (TTwd *)hTWD;
-    TWlanParams    *pWlanParams = &DB_WLAN(pTWD->hCmdBld);
-
-    TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_SetParam: paramType=0x%X\n", pParamInfo->paramType);
-
-    switch (pParamInfo->paramType)
-    {
-        case TWD_RTS_THRESHOLD_PARAM_ID:
-
-            if  (pParamInfo->content.halCtrlRtsThreshold > TWD_RTS_THRESHOLD_MAX)
-            {
-                TRACE1(pTWD->hReport, REPORT_SEVERITY_ERROR, "TWD########TWD_RTS_THRESHOLD_PARAM: Value out of permitted range 0x%x\n", pParamInfo->content.halCtrlRtsThreshold);
-                return (PARAM_VALUE_NOT_VALID);
-            }
-
-            if (cmdBld_CfgRtsThreshold (pTWD->hCmdBld, pParamInfo->content.halCtrlRtsThreshold, NULL, NULL) == TI_OK)
-            {
-                TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD########TWD_RTS_THRESHOLD_PARAM 0x%x\n", pParamInfo->content.halCtrlRtsThreshold);
-                pWlanParams->RtsThreshold = pParamInfo->content.halCtrlRtsThreshold;
-            }
-            break;
-
-        case TWD_CTS_TO_SELF_PARAM_ID:
-            return cmdBld_CfgCtsProtection (pTWD->hCmdBld, pParamInfo->content.halCtrlCtsToSelf, NULL, NULL);
-
-        case TWD_RX_TIME_OUT_PARAM_ID:
-            if (cmdBld_CfgServicePeriodTimeout (pTWD->hCmdBld, &pParamInfo->content.halCtrlRxTimeOut, NULL, NULL) == TI_OK)
-            {
-                pWlanParams->rxTimeOut.psPoll = pParamInfo->content.halCtrlRxTimeOut.psPoll;
-                pWlanParams->rxTimeOut.UPSD   = pParamInfo->content.halCtrlRxTimeOut.UPSD;  
-            }
-            break;
-
-        case TWD_FRAG_THRESHOLD_PARAM_ID:
-            if (pParamInfo->content.halCtrlFragThreshold < TWD_FRAG_THRESHOLD_MIN ||
-                pParamInfo->content.halCtrlFragThreshold > TWD_FRAG_THRESHOLD_MAX)
-                return PARAM_VALUE_NOT_VALID;
-
-            cmdBld_CfgFragmentThreshold (pTWD->hCmdBld, pParamInfo->content.halCtrlFragThreshold, NULL, NULL);
-            break;
-
-        case TWD_MAX_RX_MSDU_LIFE_TIME_PARAM_ID:
-            cmdBld_CfgRxMsduLifeTime (pTWD->hCmdBld, pParamInfo->content.halCtrlMaxRxMsduLifetime, NULL, NULL);
-            break;
-
-        case TWD_ACX_STATISTICS_PARAM_ID:
-            if (cmdBld_CfgStatisitics (pTWD->hCmdBld, NULL, NULL) != TI_OK)
-                return TI_NOK;
-            break;
-
-        case TWD_LISTEN_INTERVAL_PARAM_ID:
-            if (pParamInfo->content.halCtrlListenInterval < TWD_LISTEN_INTERVAL_MIN ||
-                pParamInfo->content.halCtrlListenInterval > TWD_LISTEN_INTERVAL_MAX)
-                return PARAM_VALUE_NOT_VALID;
-
-            pWlanParams->ListenInterval = (TI_UINT8)pParamInfo->content.halCtrlListenInterval;
-            break;
-
-        case TWD_AID_PARAM_ID:
-            pWlanParams->Aid = pParamInfo->content.halCtrlAid;
-
-            /* Configure the ACXAID info element*/
-            if (cmdBld_CfgAid (pTWD->hCmdBld, pParamInfo->content.halCtrlAid, NULL, NULL) != TI_OK)
-               return TI_NOK;
-            break;
-
-        case TWD_RSN_HW_ENC_DEC_ENABLE_PARAM_ID:
-            TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD########HW_ENC_DEC_ENABLE %d\n", pParamInfo->content.rsnHwEncDecrEnable);
-
-            /* Set the Encryption/Decryption on the HW*/
-            if (cmdBld_CfgHwEncDecEnable (pTWD->hCmdBld, pParamInfo->content.rsnHwEncDecrEnable, NULL, NULL) != TI_OK)
-                return (TI_NOK);
-            break;
-
-        case TWD_RSN_KEY_ADD_PARAM_ID:
-            TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD########KEY_ADD\n");
-
-            if (cmdBld_CmdAddKey (pTWD->hCmdBld,
-                                  (TSecurityKeys *) pParamInfo->content.configureCmdCBParams.pCb,
-                                  TI_FALSE,
-                                  pParamInfo->content.configureCmdCBParams.fCb, 
-                                  pParamInfo->content.configureCmdCBParams.hCb) != TI_OK)
-                return TI_NOK;
-            break;
-
-        case TWD_RSN_KEY_REMOVE_PARAM_ID:
-            TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD########KEY_REMOVE\n");
-
-            if (cmdBld_CmdRemoveKey (pTWD->hCmdBld, 
-                                     (TSecurityKeys *) pParamInfo->content.configureCmdCBParams.pCb,
-                                     pParamInfo->content.configureCmdCBParams.fCb, 
-                                     pParamInfo->content.configureCmdCBParams.hCb) != TI_OK)
-                return TI_NOK;
-            break;
-
-        case TWD_RSN_DEFAULT_KEY_ID_PARAM_ID:
-            if (*((TI_UINT8 *)pParamInfo->content.configureCmdCBParams.pCb) > MAX_DEFAULT_KEY_ID)
-                return PARAM_VALUE_NOT_VALID;
-
-            TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD########DEFAULT_KEY_ID %d\n", (TI_UINT8)pParamInfo->content.rsnDefaultKeyID);
-
-			if (cmdBld_CmdSetWepDefaultKeyId (pTWD->hCmdBld,
-									  *((TI_UINT8 *)pParamInfo->content.interogateCmdCBParams.pCb),
-									  pParamInfo->content.interogateCmdCBParams.fCb, 
-									  pParamInfo->content.interogateCmdCBParams.hCb) != TI_OK) 
-                return TI_NOK;
-
-            break;
-
-        case TWD_RSN_SECURITY_MODE_PARAM_ID:
-            TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD########SECURITY_MODE_SET %d\n", pParamInfo->content.rsnEncryptionStatus);
-            if (cmdBld_CfgSecureMode (pTWD->hCmdBld, (ECipherSuite)pParamInfo->content.rsnEncryptionStatus, NULL, NULL) != TI_OK)
-                return TI_NOK;
-            break;
-
-#ifdef XCC_MODULE_INCLUDED
-        case TWD_RSN_XCC_SW_ENC_ENABLE_PARAM_ID:
-        
-            TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD: XCC_SW_ENC_ENABLE %d\n", pParamInfo->content.rsnXCCSwEncFlag);
-
-            /* when SW encryption is ON, HW encryption should be turned OFF and vice versa */
-
-            TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD: Set HwEncDecrEnable to %d\n", !pParamInfo->content.rsnXCCSwEncFlag);
-
-            /* Set the Encryption/Decryption on the HW*/
-            if (cmdBld_CfgHwEncDecEnable (pTWD->hCmdBld, !pParamInfo->content.rsnXCCSwEncFlag, NULL, NULL) != TI_OK)
-                return TI_NOK;
-            break;
-             /* not supported - CKIP*/
-        case TWD_RSN_XCC_MIC_FIELD_ENABLE_PARAM_ID:
-            break;
-#endif /* XCC_MODULE_INCLUDED*/
-
-        case TWD_TX_POWER_PARAM_ID:
-
-            TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_TX_POWER_PARAM_ID %d\n", pParamInfo->content.halCtrlTxPowerDbm);
-
-            pWlanParams->TxPowerDbm = pParamInfo->content.halCtrlTxPowerDbm;
-
-            /* Configure the wlan hardware */
-            if (cmdBld_CfgTxPowerDbm (pTWD->hCmdBld, pWlanParams->TxPowerDbm, NULL, NULL) != TI_OK)
-                return TI_NOK;
-            break;
-
-        case TWD_SG_ENABLE_PARAM_ID:
-            return cmdBld_CfgSgEnable (pTWD->hCmdBld, 
-                                       (ESoftGeminiEnableModes)pParamInfo->content.SoftGeminiEnable, 
-                                       NULL, 
-                                       NULL);
-
-        case TWD_SG_CONFIG_PARAM_ID:
-            return cmdBld_CfgSg (pTWD->hCmdBld, &pParamInfo->content.SoftGeminiParam, NULL, NULL);
-
-        case TWD_FM_COEX_PARAM_ID:
-            return cmdBld_CfgFmCoex (pTWD->hCmdBld, &pParamInfo->content.tFmCoexParams, NULL, NULL);
-
-        /*
-         *  TX Parameters 
-         */ 
-
-        case TWD_TX_RATE_CLASS_PARAM_ID:
-            return cmdBld_CfgTxRatePolicy (pTWD->hCmdBld, pParamInfo->content.pTxRatePlicy, NULL, NULL);
-
-        case TWD_QUEUES_PARAM_ID:
-            return cmdBld_CfgTid (pTWD->hCmdBld, pParamInfo->content.pQueueTrafficParams, NULL, NULL);
-
-        case TWD_CLK_RUN_ENABLE_PARAM_ID:
-            TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION, "TWD_SetParam: CLK_RUN_ENABLE %d\n", pParamInfo->content.halCtrlClkRunEnable);
-
-            /* Set the Encryption/Decryption on the HW*/
-            if (cmdBld_CfgClkRun (pTWD->hCmdBld, pParamInfo->content.halCtrlClkRunEnable, NULL, NULL) != TI_OK)
-                return TI_NOK;
-            break;
-
-        case TWD_COEX_ACTIVITY_PARAM_ID:
-            cmdBld_CfgCoexActivity (pTWD->hCmdBld, &pParamInfo->content.tTwdParamsCoexActivity, NULL, NULL);
-            break;
-
-        case TWD_DCO_ITRIM_PARAMS_ID:
-            cmdBld_CfgDcoItrimParams (pTWD->hCmdBld, pParamInfo->content.tDcoItrimParams.enable, 
-                                      pParamInfo->content.tDcoItrimParams.moderationTimeoutUsec, NULL, NULL);
-            break;
-
-        default:
-            TRACE1(pTWD->hReport, REPORT_SEVERITY_ERROR, "TWD_SetParam - ERROR - Param is not supported, 0x%x\n", pParamInfo->paramType);
-            return PARAM_NOT_SUPPORTED;
-    }
-
-    return TI_OK;
-}
-
-TI_STATUS TWD_GetParam (TI_HANDLE hTWD, TTwdParamInfo *pParamInfo)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_GetParam: called\n");
-
-    return cmdBld_GetParam (pTWD->hCmdBld, pParamInfo);
-}
-
-TI_STATUS TWD_CfgRx (TI_HANDLE hTWD, TI_UINT32 uRxConfigOption, TI_UINT32 uRxFilterOption)
-{
-    TTwd     *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgRx: called\n");
-
-    return cmdBld_CfgRx (pTWD->hCmdBld, uRxConfigOption, uRxFilterOption, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgArpIpAddrTable (TI_HANDLE hTWD, TIpAddr tIpAddr, EArpFilterType filterType, EIpVer eIpVer)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgArpIpAddrTable: called\n");
-
-    return cmdBld_CfgArpIpAddrTable (pTWD->hCmdBld, tIpAddr, (TI_UINT8)filterType, eIpVer, NULL, NULL);
-}
-
-/** @ingroup Misc
- * \brief  Configure ARP IP Filter
- * 
- * \param hTWD 			- TWD module object handle
- * \param  bEnabled   	- Indicates if ARP filtering is Enabled (1) or Disabled (0)
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS TWD_CfgArpIpFilter (TI_HANDLE hTWD, TIpAddr staIp)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgArpIpFilter: called\n");
-
-    return cmdBld_CfgArpIpFilter (pTWD->hCmdBld, staIp, NULL, NULL);
-}
-
-TI_STATUS TWD_CmdSetSplitScanTimeOut  ( TI_HANDLE hTWD, TI_UINT32 uTimeOut )
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdSetSplitScanTimeOut: called\n");
-
-    return cmdBld_CmdSetSplitScanTimeOut (pTWD->hCmdBld, uTimeOut);
-}
-
-TI_STATUS TWD_CmdJoinBss (TI_HANDLE hTWD, TJoinBss *pJoinBssParams)
-{
-    TTwd      *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdJoinBss: called\n");
-
-    return cmdBld_CmdJoinBss (pTWD->hCmdBld, pJoinBssParams, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgKeepAlive (TI_HANDLE hTWD, TKeepAliveParams *pKeepAliveParams)
-{
-    TTwd      *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgKeepAlive: called\n");
-
-    return cmdBld_CfgKeepAlive (pTWD->hCmdBld, pKeepAliveParams, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgKeepAliveEnaDis(TI_HANDLE hTWD, TI_UINT8 enaDisFlag)
-{
-    TTwd      *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgKeepAliveEnaDis: called\n");
-
-    return cmdBld_CfgKeepAliveEnaDis (pTWD->hCmdBld, enaDisFlag, NULL, NULL);
-}
-
-TI_STATUS TWD_CmdTemplate (TI_HANDLE hTWD, TSetTemplate *pTemplateParams, void *fCb, TI_HANDLE hCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdTemplate: called\n");
-
-    return cmdBld_CmdTemplate (pTWD->hCmdBld, pTemplateParams, fCb, hCb);
-}
-
-TI_STATUS TWD_CfgSlotTime (TI_HANDLE hTWD, ESlotTime eSlotTimeVal)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgSlotTime: called\n");
-
-    return cmdBld_CfgSlotTime (pTWD->hCmdBld, eSlotTimeVal, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgPreamble (TI_HANDLE hTWD, EPreamble ePreamble)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgPreamble: called\n");
-
-    return cmdBld_CfgPreamble (pTWD->hCmdBld, (Preamble_e)ePreamble, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgPacketDetectionThreshold (TI_HANDLE hTWD, TI_UINT32 threshold)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgPacketDetectionThreshold: called\n");
-
-    return cmdBld_CfgPacketDetectionThreshold (pTWD->hCmdBld, threshold, NULL, NULL);
-}
-
-TI_STATUS TWD_CmdDisableTx (TI_HANDLE hTWD)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-    
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdDisableTx: called\n");
-
-    return cmdBld_CmdDisableTx (pTWD->hCmdBld, NULL, NULL);
-}
-    
-TI_STATUS TWD_CmdEnableTx (TI_HANDLE hTWD, TI_UINT8 channel)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-        
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdEnableTx: called\n");
-
-    return cmdBld_CmdEnableTx (pTWD->hCmdBld, channel, NULL, NULL);
-}
-
-TI_STATUS TWD_CmdSetStaState (TI_HANDLE hTWD, TI_UINT8 staState, void *fCb, TI_HANDLE hCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE1(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_SetStaState: %d\n", staState);
-
-    return cmdBld_CmdSetStaState (pTWD->hCmdBld, staState, fCb, hCb);
-}
-
-TI_STATUS TWD_ItrRoammingStatisitics (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void * pCb)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_ItrRoammingStatisitics: called\n");
-
-    return cmdBld_ItrRoamimgStatisitics (pTWD->hCmdBld, fCb, hCb, pCb);
-}
-
-/** @ingroup UnKnown
- * \brief	Interrogate Error Count
- * 
- * \param  hTWD     	- TWD module object handle
- * \param  fCb          - Pointer to Command CB Function
- * \param  hCb          - Handle to Command CB Function Obj Parameters
- * \param  pCb          - Pointer to read parameters
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Interrogate ACX Error counter
- * 
- * \sa
- */ 
-TI_STATUS TWD_ItrErrorCnt (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void *pCb)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_ItrErrorCnt: called\n");
-
-    return cmdBld_ItrErrorCnt (pTWD->hCmdBld, fCb, hCb, pCb);
-}
-
-TI_STATUS TWD_CmdNoiseHistogram (TI_HANDLE hTWD, TNoiseHistogram *pNoiseHistParams)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdNoiseHistogram: called\n");
-
-    return cmdBld_CmdNoiseHistogram (pTWD->hCmdBld, pNoiseHistParams, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgBeaconFilterOpt (TI_HANDLE hTWD, TI_UINT8 uBeaconFilteringStatus, TI_UINT8 uNumOfBeaconsToBuffer)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-       
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgBeaconFilterOpt: called\n");
-
-    return cmdBld_CfgBeaconFilterOpt (pTWD->hCmdBld, uBeaconFilteringStatus, uNumOfBeaconsToBuffer, NULL, NULL);
-}
-
-TI_STATUS TWD_SetRateMngDebug(TI_HANDLE hTWD, RateMangeParams_t *pRateMngParams)
-{
-  TTwd   *pTWD = (TTwd *)hTWD;
-
-   TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_SetRateMngDebug: called\n");
-
-   return cmdBld_CfgRateMngDbg (pTWD->hCmdBld, pRateMngParams, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgBeaconFilterTable (TI_HANDLE hTWD, TI_UINT8 uNumOfIe, TI_UINT8 *pIeTable, TI_UINT8 uIeTableSize)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-      
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgBeaconFilterTable: called\n");
-
-    return cmdBld_CfgBeaconFilterTable (pTWD->hCmdBld, uNumOfIe, pIeTable, uIeTableSize, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgWakeUpCondition (TI_HANDLE hTWD, TPowerMgmtConfig *pPowerMgmtConfig)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgWakeUpCondition: called\n");
-
-    return cmdBld_CfgWakeUpCondition (pTWD->hCmdBld, pPowerMgmtConfig, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgBcnBrcOptions (TI_HANDLE hTWD, TPowerMgmtConfig *pPowerMgmtConfig)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgBcnBrcOptions: called\n");
-
-    return cmdBld_CfgBcnBrcOptions (pTWD->hCmdBld, pPowerMgmtConfig, NULL, NULL);
-}
-
-TFwInfo * TWD_GetFWInfo (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_GetFWInfo: called\n");
-
-    return cmdBld_GetFWInfo (pTWD->hCmdBld);
-}
-
-TI_STATUS TWD_CmdSwitchChannel (TI_HANDLE hTWD, TSwitchChannelParams *pSwitchChannelCmd)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdSwitchChannel: called\n");
-
-    return cmdBld_CmdSwitchChannel (pTWD->hCmdBld, pSwitchChannelCmd, NULL, NULL);
-}
-
-TI_STATUS TWD_CmdSwitchChannelCancel (TI_HANDLE hTWD, TI_UINT8 channel)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdSwitchChannelCancel: called\n");
-
-    return cmdBld_CmdSwitchChannelCancel (pTWD->hCmdBld, channel, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgMaxTxRetry (TI_HANDLE hTWD, TRroamingTriggerParams *pRoamingTriggerCmd)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgMaxTxRetry: called\n");
-
-    return cmdBld_CfgMaxTxRetry (pTWD->hCmdBld, pRoamingTriggerCmd, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgConnMonitParams (TI_HANDLE hTWD, TRroamingTriggerParams *pRoamingTriggerCmd)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgConnMonitParams: called\n");
-
-    return cmdBld_CfgConnMonitParams (pTWD->hCmdBld, pRoamingTriggerCmd, NULL, NULL);
-}
-
-TI_STATUS TWD_ItrRSSI (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void *pCb)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_ItrRSSI: called\n");
-
-    return cmdBld_ItrRSSI (pTWD->hCmdBld, fCb, hCb, pCb);
-}
-
-TI_STATUS TWD_CmdFwDisconnect (TI_HANDLE hTWD, DisconnectType_e uDisconType, TI_UINT16 uDisconReason)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    return cmdBld_CmdFwDisconnect (pTWD->hCmdBld, 
-                                   RX_CONFIG_OPTION_MY_DST_MY_BSS, 
-                                   RX_FILTER_OPTION_FILTER_ALL, 
-                                   uDisconType, 
-                                   uDisconReason, 
-                                   NULL, 
-                                   NULL);
-}
-
-TI_STATUS TWD_CmdMeasurement (TI_HANDLE           hTWD, 
-                              TMeasurementParams *pMeasurementParams,
-                              void               *fCommandResponseCb, 
-                              TI_HANDLE           hCb)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdMeasurement: called\n");
-
-    return cmdBld_CmdMeasurement (pTWD->hCmdBld, pMeasurementParams, fCommandResponseCb, hCb);
-}
-
-TI_STATUS TWD_CmdMeasurementStop (TI_HANDLE hTWD, void* fCb, TI_HANDLE hCb)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdMeasurementStop: called\n");
-
-    return cmdBld_CmdMeasurementStop (pTWD->hCmdBld, fCb, hCb);
-}
-
-TI_STATUS TWD_CmdApDiscovery (TI_HANDLE hTWD, TApDiscoveryParams *pApDiscoveryParams)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdApDiscovery: called\n");
-
-    return cmdBld_CmdApDiscovery (pTWD->hCmdBld, pApDiscoveryParams, NULL, NULL);
-}
-
-TI_STATUS TWD_CmdApDiscoveryStop (TI_HANDLE hTWD)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdApDiscoveryStop: called\n");
-
-    return cmdBld_CmdApDiscoveryStop (pTWD->hCmdBld, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgGroupAddressTable (TI_HANDLE     hTWD, 
-                                    TI_UINT8      uNumGroupAddrs, 
-                                    TMacAddr      *pGroupAddr,
-                                    TI_BOOL       bEnabled)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgGroupAddressTable: called\n");
-
-    return cmdBld_CfgGroupAddressTable (pTWD->hCmdBld, uNumGroupAddrs, pGroupAddr, bEnabled, NULL, NULL);
-}
-
-TI_STATUS TWD_GetGroupAddressTable (TI_HANDLE hTWD, TI_UINT8* pEnabled, TI_UINT8* pNumGroupAddrs, TMacAddr *pGroupAddr)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_GetGroupAddressTable: called\n");
-
-    return cmdBld_GetGroupAddressTable (pTWD->hCmdBld, pEnabled, pNumGroupAddrs, pGroupAddr);
-}
-
-TI_STATUS TWD_SetRadioBand (TI_HANDLE hTWD, ERadioBand eRadioBand)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_SetRadioBand: called\n");
-
-    return cmdBld_SetRadioBand (pTWD->hCmdBld, eRadioBand);
-}
-
-TI_STATUS TWD_CfgSleepAuth (TI_HANDLE hTWD, EPowerPolicy eMinPowerPolicy)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgSleepAuth: called\n");
-
-    /* Configure the new power policy to the FW */
-    cmdBld_CfgSleepAuth (pTWD->hCmdBld, eMinPowerPolicy, NULL, NULL);
-
-    return TI_OK;
-}
-
-TI_STATUS TWD_CfgBurstMode (TI_HANDLE hTWD, TI_BOOL bEnabled)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "cmdBld_CfgBurstMode: called\n");
-
-    /* Configure the burst mode to the FW */
-    cmdBld_CfgBurstMode (pTWD->hCmdBld, bEnabled, NULL, NULL);
-
-    return TI_OK;
-}
-
-
-
-TI_STATUS TWD_CmdHealthCheck (TI_HANDLE hTWD)
-{
-    TTwd   *pTWD = (TTwd *)hTWD;
-    
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CmdHealthCheck: called\n");
-
-    return cmdBld_CmdHealthCheck (pTWD->hCmdBld, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgMacClock (TI_HANDLE hTWD, TI_UINT32 uMacClock)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgMacClock: called\n");
-
-    return cmdBld_CfgMacClock (pTWD->hCmdBld, uMacClock, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgArmClock (TI_HANDLE hTWD, TI_UINT32 uArmClock)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgArmClock: called\n");
-
-    return cmdBld_CfgArmClock (pTWD->hCmdBld, uArmClock, NULL, NULL);
-}
-
-TI_STATUS TWD_ItrMemoryMap (TI_HANDLE hTWD, MemoryMap_t *pMap, void *fCb, TI_HANDLE hCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_ItrMemoryMap: called\n");
-
-    return cmdBld_ItrMemoryMap (pTWD->hCmdBld, pMap, fCb, hCb);
-}
-
-TI_STATUS TWD_ItrStatistics (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void *pCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_ItrStatistics: called\n");
-
-    return cmdBld_ItrStatistics (pTWD->hCmdBld, fCb, hCb, pCb);
-}
-
-TI_STATUS TWD_ItrDataFilterStatistics (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void *pCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_ItrDataFilterStatistics: called\n");
-
-    return cmdBld_ItrDataFilterStatistics (pTWD->hCmdBld, fCb, hCb, pCb);
-}
-
-TI_STATUS TWD_CfgEnableRxDataFilter (TI_HANDLE hTWD, TI_BOOL bEnabled, filter_e eDefaultAction)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgEnableRxDataFilter: called\n");
-
-    return cmdBld_CfgEnableRxDataFilter (pTWD->hCmdBld, bEnabled, eDefaultAction, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgRxDataFilter (TI_HANDLE    hTWD, 
-                               TI_UINT8     index, 
-                               TI_UINT8     command, 
-                               filter_e     eAction, 
-                               TI_UINT8     uNumFieldPatterns, 
-                               TI_UINT8     uLenFieldPatterns, 
-                               TI_UINT8     *pFieldPatterns)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgRxDataFilter: called\n");
-
-    return cmdBld_CfgRxDataFilter (pTWD->hCmdBld, 
-                                   index, 
-                                   command, 
-                                   eAction, 
-                                   uNumFieldPatterns, 
-                                   uLenFieldPatterns, 
-                                   pFieldPatterns, 
-                                   NULL, 
-                                   NULL);
-}
-
-TI_STATUS TWD_CfgRssiSnrTrigger (TI_HANDLE hTWD, RssiSnrTriggerCfg_t* pRssiSnrTrigger)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgRssiSnrTrigger: called\n");
-
-    return cmdBld_CfgRssiSnrTrigger (pTWD->hCmdBld, pRssiSnrTrigger, NULL, NULL);
-}
-
-TI_STATUS TWD_CfgAcParams (TI_HANDLE hTWD, TAcQosParams *pAcQosParams, void *fCb, TI_HANDLE hCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgAcParams: called\n");
-
-    return cmdBld_CfgAcParams (pTWD->hCmdBld, pAcQosParams, fCb, hCb);
-}
-
-TI_STATUS TWD_CfgPsRxStreaming (TI_HANDLE hTWD, TPsRxStreaming *pPsRxStreaming, void *fCb, TI_HANDLE hCb)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgPsRxStreaming: called\n");
-
-    return cmdBld_CfgPsRxStreaming (pTWD->hCmdBld, pPsRxStreaming, fCb, hCb);
-}
-
-TI_STATUS TWD_CfgBet (TI_HANDLE hTWD, TI_UINT8 Enable, TI_UINT8 MaximumConsecutiveET)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgBet: called\n");
-
-    return cmdBld_CfgBet (pTWD->hCmdBld, Enable, MaximumConsecutiveET, NULL, NULL);
-}
-
-TI_STATUS TWD_SetSecuritySeqNum (TI_HANDLE hTWD, TI_UINT8 securitySeqNumLsByte)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_SetSecuritySeqNum: called\n");
-
-    return cmdBld_SetSecuritySeqNum (pTWD->hCmdBld, securitySeqNumLsByte);
-}
-
-TI_STATUS TWD_CfgSetFwHtCapabilities (TI_HANDLE hTWD, 
-									  Tdot11HtCapabilitiesUnparse *pHtCapabilitiesIe, 
-									  TI_BOOL bAllowHtOperation)
-{
-    TTwd        *pTWD           = (TTwd *)hTWD;
-    TI_UINT32   uHtCapabilites;
-    TI_UINT8    uAmpduMaxLeng = 0;
-    TI_UINT8    uAmpduMinSpac = 0; 
-    TI_UINT16   uHtCapabilitesField;
-
-    /* Note, currently this value will be set to FFFFFFFFFFFF to indicate it is relevant for all peers 
-       since we only support HT in infrastructure mode. Later on this field will be relevant to IBSS/DLS operation */
-    TMacAddr    tMacAddress = {0xff,0xff,0xff,0xff,0xff,0xff};
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgSetFwHtCapabilities: called\n");
-
-    /* Allow HT Operation ? */
-    if (bAllowHtOperation == TI_TRUE)
-    {
-       /* get date from HT capabilities field */
-       /* Handle endian for the field */
-       COPY_WLAN_WORD(&uHtCapabilitesField, pHtCapabilitiesIe->aHtCapabilitiesIe);
-       uHtCapabilites = FW_CAP_BIT_MASK_HT_OPERATION |
-                        ((uHtCapabilitesField & HT_CAP_GREENFIELD_FRAME_FORMAT_BITMASK)    ? FW_CAP_BIT_MASK_GREENFIELD_FRAME_FORMAT       : 0) |
-                        ((uHtCapabilitesField & HT_CAP_SHORT_GI_FOR_20MHZ_BITMASK)         ? FW_CAP_BIT_MASK_SHORT_GI_FOR_20MHZ_PACKETS    : 0) |
-                        ((uHtCapabilitesField & HT_CAP_LSIG_TXOP_PROTECTION_BITMASK)       ? FW_CAP_BIT_MASK_LSIG_TXOP_PROTECTION          : 0);
-
-       /* get date from HT capabilities field */
-       uHtCapabilites |= ((uHtCapabilitesField & HT_EXT_HT_CONTROL_FIELDS_BITMASK) ? FW_CAP_BIT_MASK_HT_CONTROL_FIELDS : 0) |
-                         ((uHtCapabilitesField & HT_EXT_RD_INITIATION_BITMASK)     ? FW_CAP_BIT_MASK_RD_INITIATION     : 0);
-
-       /* get date from A-MPDU parameters field */
-       uAmpduMaxLeng = pHtCapabilitiesIe->aHtCapabilitiesIe[HT_CAP_AMPDU_PARAMETERS_FIELD_OFFSET] & HT_CAP_AMPDU_MAX_RX_FACTOR_BITMASK;
-       uAmpduMinSpac = (pHtCapabilitiesIe->aHtCapabilitiesIe[HT_CAP_AMPDU_PARAMETERS_FIELD_OFFSET] >> 2) & HT_CAP_AMPDU_MIN_START_SPACING_BITMASK;
-    }
-    /* not Allow HT Operation */
-    else
-    {
-        uHtCapabilites = 0;
-    }
-
-    return cmdBld_CfgSetFwHtCapabilities (pTWD->hCmdBld,
-                                          uHtCapabilites,
-                                          tMacAddress,
-                                          uAmpduMaxLeng,
-                                          uAmpduMinSpac,
-                                          NULL, 
-                                          NULL);
-}
-
-TI_STATUS TWD_CfgSetFwHtInformation (TI_HANDLE hTWD, Tdot11HtInformationUnparse *pHtInformationIe)
-{
-    TTwd        *pTWD           = (TTwd *)hTWD;
-    TI_UINT8    uRifsMode;
-    TI_UINT8    uHtProtection; 
-    TI_UINT8    uGfProtection;
-    TI_UINT8    uHtTxBurstLimit;
-    TI_UINT8    uDualCtsProtection;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgSetFwHtInformation: called\n");
-
-    uRifsMode = (pHtInformationIe->aHtInformationIe[1] & HT_INF_RIFS_MOD_BITMASK) >> 3;
-
-    uHtProtection = (pHtInformationIe->aHtInformationIe[2] & HT_INF_OPERATION_MOD_BITMASK);
-
-    uGfProtection = (pHtInformationIe->aHtInformationIe[2] & HT_INF_NON_GF_PRES_BITMASK) >> 2; 
-
-    uHtTxBurstLimit = 0; /* not in use */
-
-    uDualCtsProtection = (pHtInformationIe->aHtInformationIe[4] & HT_INF_DUAL_CTS_PROTECTION_BITMASK) >> 7; 
-
-    return cmdBld_CfgSetFwHtInformation (pTWD->hCmdBld,
-                                         uRifsMode,
-                                         uHtProtection,
-                                         uGfProtection,
-                                         uHtTxBurstLimit,
-                                         uDualCtsProtection,
-                                         NULL, 
-                                         NULL);
-}
-
-TI_STATUS TWD_CfgSetBaInitiator (TI_HANDLE hTWD,
-                                 TI_UINT8 uTid,
-                                 TI_UINT8 uState,
-                                 TMacAddr tRa,
-                                 TI_UINT16 uWinSize,
-                                 TI_UINT16 uInactivityTimeout)
-
-{
-	TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgSetBaInitiator: called\n");
-
-    return cmdBld_CfgSetBaSession (pTWD->hCmdBld,
-                                   ACX_BA_SESSION_INITIATOR_POLICY,
-                                   uTid,               
-                                   uState,             
-                                   tRa,                
-                                   uWinSize,          
-                                   uInactivityTimeout,
-                                   NULL, 
-                                   NULL);
-}
-
-TI_STATUS TWD_CfgSetBaReceiver (TI_HANDLE hTWD,
-                                TI_UINT8 uTid,
-                                TI_UINT8 uState,
-                                TMacAddr tRa,
-                                TI_UINT16 uWinSize)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CfgSetBaReceiver: called\n");
-
-    return cmdBld_CfgSetBaSession (pTWD->hCmdBld,
-                                   ACX_BA_SESSION_RESPONDER_POLICY,
-                                   uTid,               
-                                   uState,             
-                                   tRa,                
-                                   uWinSize,          
-                                   0,
-                                   (void *)NULL, 
-                                   (TI_HANDLE)NULL);
-}
-
-void TWD_CloseAllBaSessions(TI_HANDLE hTWD) 
-{
-    TTwd        *pTWD = (TTwd *)hTWD;
-    TI_UINT32    i;
-
-    TRACE0(pTWD->hReport, REPORT_SEVERITY_INFORMATION , "TWD_CloseAllBaSessions: called\n");
-
-    /* close all BA sessions */
-    for(i=0; i <MAX_NUM_OF_802_1d_TAGS; ++i)
-    {
-        RxQueue_CloseBaSession(pTWD->hRxQueue, i);
-    }
-}
-
-ETxnStatus TWD_WdExpireEvent(TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd*)hTWD;
-
-	if ((pTWD->fFailureEventCb != NULL) && (pTWD->hFailureEventCb != NULL))
-	{
-        pTWD->fFailureEventCb(pTWD->hFailureEventCb, HW_WD_EXPIRE);
-	}
-
-    return TXN_STATUS_COMPLETE;
-}
diff --git a/wl1271/TWD/TWDriver/TWDriverInternal.h b/wl1271/TWD/TWDriver/TWDriverInternal.h
deleted file mode 100644
index 5e5a82b..0000000
--- a/wl1271/TWD/TWDriver/TWDriverInternal.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * TWDriverInternal.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-/** \file TWDriverInternal.h
- *  \brief TWD Driver internal common internal declarations
- *
- *  \see TWDriver.h
- */
-
-
-#ifndef TWDRIVERINTERNAL_H
-#define TWDRIVERINTERNAL_H
-
-
-#include "TWDriver.h"
-#include "Device.h"
-
-
-/* Shift factor to conver between TU (1024 uSec) and uSec. */
-#define SHIFT_BETWEEN_TU_AND_USEC       10  
-
-/* keep-alive templates definitions */
-#define KLV_MAX_TMPL_NUM                4
-
-/* Definitions for Rx Filter MIB */
-
-/* Set A—Enable: Forward all frames to host driver */
-#define MIB_RX_FILTER_PROMISCOUS_SET    0x01       
-/* Cleared A— Disable: Do not orward all frames to the host driver */
-#define MIB_RX_FILTER_PROMISCOUS_CLEAR  0x00       
-/* Set A—filter enabled: receive only those frames that match the BSSID given in the Join command */
-#define MIB_RX_FILTER_BSSID_SET         0x02       
-/* Cleared A—filter disabled: ignore BSSID in receiving */
-#define MIB_RX_FILTER_BSSID_CLEAR       0x00       
-
-/* Asynchronous init mode callback function type */
-typedef void (*fnotify_t)(TI_HANDLE module, TI_STATUS status);
-
-        /* Callback function definition for EndOfRecovery */
-typedef void (*TEndOfRecoveryCb) (TI_HANDLE handle);
-
-
-/* TWD Driver Structure */
-typedef struct
-{
-    TI_HANDLE           hOs;
-    TI_HANDLE           hUser;
-    TI_HANDLE           hReport;
-    TI_HANDLE           hTimer;
-    TI_HANDLE           hContext;
-    TI_HANDLE           hMacServices;
-    TI_HANDLE           hTxCtrlBlk;
-    TI_HANDLE           hTxHwQueue;
-    TI_HANDLE           hHwIntr;
-    TI_HANDLE           hHealthMonitor;
-    TI_HANDLE           hTwIf;
-    TI_HANDLE           hTxnQ;
-    TI_HANDLE           hCmdQueue;
-    TI_HANDLE           hCmdBld;
-    TI_HANDLE           hTxXfer;
-    TI_HANDLE           hTxResult;
-    TI_HANDLE           hRxXfer;
-    TI_HANDLE           hFwEvent;
-    TI_HANDLE           hHwInit;
-    TI_HANDLE           hCmdMbox;
-    TI_HANDLE           hEventMbox;
-    TI_HANDLE           hFwDbg;
-    TI_HANDLE           hRxQueue;
-    
-    /* If true it means that we are in recovery process */  
-    TI_BOOL             bRecoveryEnabled;
-
-    /* Init success flag */
-    TI_BOOL             bInitSuccess;
-
-    ReadWriteCommand_t  tPrintRegsBuf;    
-
-    /* Init/Recovery/Stop callbacks */
-    TTwdCallback        fInitHwCb;
-    TTwdCallback        fInitFwCb;
-    TTwdCallback        fConfigFwCb;
-    TTwdCallback        fStopCb;
-    TTwdCallback        fInitFailCb;
-
-    TFailureEventCb     fFailureEventCb;
-    TI_HANDLE          	hFailureEventCb;
-
-    TI_UINT32           uNumMboxFailures;
-
-#ifdef TI_DBG  /* Just for debug. */
-    /* Packets sequence counter (common for all queues). */
-    TI_UINT32           dbgPktSeqNum;                               
-    /* Tx counters per queue:*/
-    /* Count packets sent from upper driver. */
-    TI_UINT32           dbgCountSentPackets[MAX_NUM_OF_AC];  
-    /* Count packets sent and queue not busy. */
-    TI_UINT32           dbgCountQueueAvailable[MAX_NUM_OF_AC];
-    /* Count XferDone return values from Xfer. */
-    TI_UINT32           dbgCountXferDone[MAX_NUM_OF_AC];     
-    /* Count Success return values from Xfer. */
-    TI_UINT32           dbgCountXferSuccess[MAX_NUM_OF_AC];  
-    /* Count Pending return value from Xfer. */
-    TI_UINT32           dbgCountXferPending[MAX_NUM_OF_AC];  
-    /* Count Error return value from Xfer. */
-    TI_UINT32           dbgCountXferError[MAX_NUM_OF_AC];    
-    /* Count XferDone callback calls. */
-    TI_UINT32           dbgCountXferDoneCB[MAX_NUM_OF_AC];   
-    /* Count TxComplete callback calls. */
-    TI_UINT32           dbgCountTxCompleteCB[MAX_NUM_OF_AC]; 
-
-    MemoryMap_t         MemMap;
-    ACXStatistics_t     acxStatistic;
-#endif
-
-	TTestCmdCB	fRadioCb;
-	void		*pRadioCb;
-	TI_HANDLE	hRadioCb;
-	TTestCmd 	testCmd; 
-
-} TTwd;
-
-
-/* External Functions Prototypes */
-
-void  SendPacketTransfer (TI_HANDLE         hUser,  
-                          TI_UINT32         aPacketId);
-void  SendPacketComplete (TI_HANDLE         hUser, 
-                          TI_STATUS         aStatus, 
-                          TI_UINT32         aPacketId, 
-                          TI_UINT32         aRate, 
-                          TI_UINT8          aAckFailures, 
-                          TI_UINT32         durationInAir, 
-                          TI_UINT32         fwHandlingTime, 
-                          TI_UINT32         mediumDelay);
-
-
-
-
-#endif /* TNETW_DRIVER_H */
-
diff --git a/wl1271/TWD/TWDriver/TWDriverMsr.h b/wl1271/TWD/TWDriver/TWDriverMsr.h
deleted file mode 100644
index 4b0772b..0000000
--- a/wl1271/TWD/TWDriver/TWDriverMsr.h
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * TWDriverMsr.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TWDDRIVERMSR_H
-#define TWDDRIVERMSR_H
-
-/** \file  TWDriverMsr.h 
- *  \brief TWDriver Measurement APIs
- *
- *  \see 
- */
-
-#include "TWDriverScan.h"
-#include "tidef.h"
-#include "public_radio.h"
-
-#define NOISE_HISTOGRAM_LENGTH              8
-#define MAX_NUM_OF_MSR_TYPES_IN_PARALLEL    3
-
-/* The size of the time frame in which we must start the */
-/* measurement request or give up */
-#define MSR_START_MAX_DELAY             50
-
-/* In non unicast measurement requests a random delay */
-/* between 4 and 40 milliseconds */
-#define MSR_ACTIVATION_DELAY_RANDOM     36
-#define MSR_ACTIVATION_DELAY_OFFSET     4
-
-
-/** \enum EMeasurementType
- * \brief different measurement types
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum 
-{
-/*	0	*/	MSR_TYPE_BASIC_MEASUREMENT  = 0,			/**< */
-/*	1	*/	MSR_TYPE_CCA_LOAD_MEASUREMENT,				/**< */
-/*	2	*/	MSR_TYPE_NOISE_HISTOGRAM_MEASUREMENT,		/**< */
-/*	3	*/	MSR_TYPE_BEACON_MEASUREMENT,				/**< */
-/*	4	*/	MSR_TYPE_FRAME_MEASUREMENT,					/**< */
-/*	5	*/	MSR_TYPE_MAX_NUM_OF_MEASURE_TYPES			/**< */
-
-} EMeasurementType;
-
-/** \enum EMeasurementScanMode
- * \brief Measurement Scan Modes
- * 
- * \par Description
- * enumerates the different scan modes available for beacon measurement
- * 
- * \sa
- */
-typedef enum
-{
-/*	0	*/	MSR_SCAN_MODE_PASSIVE = 0,				/**< Passive Scan Mode			*/
-/*	1	*/	MSR_SCAN_MODE_ACTIVE,					/**< Active Scan Mode			*/
-/*	2	*/	MSR_SCAN_MODE_BEACON_TABLE,				/**< Beacon Table Scan Mode		*/
-/*	3	*/	MSR_SCAN_MODE_MAX_NUM_OF_SCAN_MODES		/**< Max number of Scan Modes	*/
-
-} EMeasurementScanMode;
-
-/** \enum EMeasurementFrameType
- * \brief Measurement Frame Types
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum 
-{
-/*	0	*/	MSR_FRAME_TYPE_NO_ACTIVE = 0,	/**< */
-/*	1	*/	MSR_FRAME_TYPE_BROADCAST,		/**< */
-/*	2	*/	MSR_FRAME_TYPE_MULTICAST,		/**< */
-/*	3	*/	MSR_FRAME_TYPE_UNICAST			/**< */
-
-} EMeasurementFrameType;
-
-/** \enum EMeasurementMode
- * \brief Measurement Modes
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum
-{
-/*	0	*/	MSR_MODE_NONE = 0,				/**< */
-/*	1	*/	MSR_MODE_XCC,					/**< */
-/*	2	*/	MSR_MODE_SPECTRUM_MANAGEMENT	/**< */
-
-} EMeasurementMode;
-
-/** \enum EMeasurementRejectReason
- * \brief Measurement Reject Reason
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum 
-{
-/*	1	*/	MSR_REJECT_OTHER_REASON = 1, 				/**< */
-/*	2	*/	MSR_REJECT_INVALID_MEASUREMENT_TYPE,		/**< */		
-/*	3	*/	MSR_REJECT_DTIM_OVERLAP,					/**< */
-/*	4	*/	MSR_REJECT_DURATION_EXCEED_MAX_DURATION,	/**< */
-/*	5	*/	MSR_REJECT_TRAFFIC_INTENSITY_TOO_HIGH,		/**< */
-/*	6	*/	MSR_REJECT_SCR_UNAVAILABLE,					/**< */
-/*	7	*/	MSR_REJECT_MAX_DELAY_PASSED,				/**< */
-/*	8	*/	MSR_REJECT_INVALID_CHANNEL,					/**< */
-/*	9	*/	MSR_REJECT_NOISE_HIST_FAIL,					/**< */
-/*	10	*/	MSR_REJECT_CHANNEL_LOAD_FAIL,				/**< */
-/*	11	*/	MSR_REJECT_EMPTY_REPORT						/**< */
-
-} EMeasurementRejectReason;
-
- /*
- ***********************************************************************
- *  Unions.
- ***********************************************************************
- */
-/** \union TMeasurementReplyValue
- * \brief Measurement possible Reply Values 
- * 
- * \par Description
- * 
- * \sa
- */
-typedef union
-{
-    TI_UINT8                            CCABusyFraction;						/**< */
-    TI_UINT8                            RPIDensity[ NOISE_HISTOGRAM_LENGTH ];   /**< */
-
-} TMeasurementReplyValue;
-
-/***********************************************************************
- *  Structure definitions.
- ***********************************************************************
- */
-/** \struct TMeasurementTypeRequest
- * \brief Measurement Type Request 
- * 
- * \par Description
- * This structure defines single channel parameters for normal scan operation (inc. triggered)
- * 
- * \sa
- */
-typedef struct
-{
-    EMeasurementType                    msrType;	/**< */
-    EMeasurementScanMode                scanMode;	/**< */
-    TI_UINT32                           duration;	/**< */
-    TI_UINT8                            reserved;	/**< */
-
-} TMeasurementTypeRequest;
-
-/** \struct TMeasurementRequest
- * \brief Measurement Request 
- * 
- * \par Description
- * This structure defines measurement parameters of several measurement request types
- * for one channel
- * 
- * \sa
- */
-typedef struct
-{
-    ERadioBand                          band;												/**< */
-    TI_UINT8                            channel;											/**< */
-    TI_UINT64                           startTime;											/**< */
-    TI_UINT8                            txPowerDbm;								  			/**< */  			
-    EScanResultTag                      eTag;												/**< */
-    TI_UINT8                            numberOfTypes;										/**< */
-    TMeasurementTypeRequest             msrTypes[ MAX_NUM_OF_MSR_TYPES_IN_PARALLEL ];		/**< */
-
-} TMeasurementRequest;
-
-/** \struct TMeasurementTypeReply
- * \brief Measurement Type Reply 
- * 
- * \par Description
- * This structure defines the reply parameters for measurement of specific type performed
- * (the type is indicated in the msrType field)
- * 
- * \sa
- */
-typedef struct
-{
-    EMeasurementType                    msrType;		/**< The type of performed measurement the reply reffer to	*/
-    TI_UINT8                            status;			/**< The status of measurement performed					*/
-    TMeasurementReplyValue              replyValue;		/**< The Reply Value of performed measurement			 	*/
-    TI_UINT8                            reserved;		/**< */
-
-} TMeasurementTypeReply;
-
-/** \struct TMeasurementReply
- * \brief Measurement Reply 
- * 
- * \par Description
- * This structure defines the reply parameters for some measurements of some types performed
- * 
- * \sa
- */
-typedef struct 
-{
-    TI_UINT8                            numberOfTypes;									/**< Number of measurements types (equal to number of measurement replys)	*/
-    TMeasurementTypeReply               msrTypes[ MAX_NUM_OF_MSR_TYPES_IN_PARALLEL ];	/**< Measurements Replys buffer. One Reply per type							*/
-
-} TMeasurementReply;
-
-/** \struct TMeasurementFrameHdr
- * \brief Measurement Frame Header 
- * 
- * \par Description
- * This structure defines a Header of a measurement
- * 
- * \sa
- */
-typedef struct 
-{
-    TI_UINT16                           dialogToken;			/**< Indicates if the received Measurement is the same as the one that is being processed	*/
-    TI_UINT8                            activatioDelay;			/**< */
-    TI_UINT8                            measurementOffset;		/**< */
-
-} TMeasurementFrameHdr;
-
-/** \struct TMeasurementFrameRequest
- * \brief Measurement Frame Request 
- * 
- * \par Description
- * 
- * \sa
- */
-typedef struct 
-{
-    TMeasurementFrameHdr                 *hdr; 			/**< */
-    EMeasurementFrameType                frameType;		/**< */
-    TI_UINT8                             *requests;		/**< */
-    TI_INT32                             requestsLen;	/**< */
-
-} TMeasurementFrameRequest;
-
-
-#endif /* #define TWDDRIVERMSR_H */
diff --git a/wl1271/TWD/TWDriver/TWDriverRadio.c b/wl1271/TWD/TWDriver/TWDriverRadio.c
deleted file mode 100644
index 013a31d..0000000
--- a/wl1271/TWD/TWDriver/TWDriverRadio.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * TWDriverRadio.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  TWDriverRadio.c 
- *  \brief TI WLAN BIT
- *
- *  \see   TWDriver.h 
- */
-
-#define __FILE_ID__  FILE_ID_119
-#include "TWDriver.h"
-#include "osApi.h"
-#include "TWDriverInternal.h"
-#include "CmdBld.h"
-/*****************************************************************************
-*                                                                            *
-*                       Static functions                                     *
-*                                                                            *
-******************************************************************************/
-
-
-
-/*****************************************************************************
-*                                                                            *
-*                       API functions	                                     *
-*                                                                            *
-******************************************************************************/
-/****************************************************************************************
- *                        TWDriverTestCB                                    
- ****************************************************************************************/
-void TWDriverTestCB(TI_HANDLE hTWD, 
-					TI_STATUS eStatus, 
-					TI_HANDLE pTestCmdParams)
-{
-	TTwd *pTWD = (TTwd *)hTWD;
-
-	if (pTWD->pRadioCb != NULL)
-	{
-	os_memoryCopy(NULL, pTWD->pRadioCb, &pTWD->testCmd.testCmd_u, sizeof(pTWD->testCmd.testCmd_u));
-	}
-
-	if (pTWD->fRadioCb != NULL)
-	{
-	pTWD->fRadioCb(pTWD->hRadioCb, eStatus, pTWD->pRadioCb);
-}
-}
-
-/****************************************************************************************
- *                        TWDriverTest                                    
- ****************************************************************************************/
-TI_STATUS TWDriverTest(TI_HANDLE hTWD, 
-					   TestCmdID_enum eTestCmd, 
-					   void* pTestCmdParams, 
-					   TTestCmdCB fCb, 
-					   TI_HANDLE hCb)
-{
-	TTwd *pTWD = (TTwd *)hTWD;
-
-	/* check parameters */
-	if (( hTWD == NULL ) ||
-		( eTestCmd >= MAX_TEST_CMD_ID ) ||
-		( fCb == NULL ) ||
-		( hCb == NULL ))
-	{
-		return (TI_NOK);
-	}
-
-	pTWD->testCmd.testCmdId = eTestCmd;
-
-	if (pTestCmdParams != NULL)
-	{
-	os_memoryCopy(NULL, &pTWD->testCmd.testCmd_u, pTestCmdParams, sizeof(pTWD->testCmd.testCmd_u));
-	}
-
-	pTWD->fRadioCb = fCb;
-	pTWD->pRadioCb = pTestCmdParams;
-	pTWD->hRadioCb = hCb;
-
-	return(cmdBld_CmdTest (pTWD->hCmdBld, 
-						   (TI_HANDLE)TWDriverTestCB, 
-						   hTWD, 
-						   &pTWD->testCmd));
-}
diff --git a/wl1271/TWD/TWDriver/TWDriverRate.h b/wl1271/TWD/TWDriver/TWDriverRate.h
deleted file mode 100644
index f944aee..0000000
--- a/wl1271/TWD/TWDriver/TWDriverRate.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * TWDriverRate.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TWDRIVERRATE_H
-#define TWDRIVERRATE_H
-
-/** \file  TWDriverRate.h 
- *  \brief TWDriver Rate APIs
- *
- *  \see
- */
-
-/** \enum ERate
- * \brief Rate Types
- * 
- * \par Description
- * Driver's TX Control Frame Rate Format Type
- * 
- * \sa
- */
-typedef enum
-{
-    DRV_RATE_AUTO       = 0,				/**< Auto							*/
-    DRV_RATE_1M         = 1,				/**< 1M								*/
-    DRV_RATE_2M         = 2,				/**< 2M								*/
-    DRV_RATE_5_5M       = 3,				/**< 5.5M							*/
-    DRV_RATE_11M        = 4,				/**< 11M							*/
-    DRV_RATE_22M        = 5,				/**< 22M							*/
-    DRV_RATE_6M         = 6,				/**< 6M								*/
-    DRV_RATE_9M         = 7,				/**< 9M								*/	
-    DRV_RATE_12M        = 8,				/**< 12M							*/	
-    DRV_RATE_18M        = 9,				/**< 18M							*/
-    DRV_RATE_24M        = 10,				/**< 24M							*/
-    DRV_RATE_36M        = 11,				/**< 36M							*/
-    DRV_RATE_48M        = 12,				/**< 48M							*/
-    DRV_RATE_54M        = 13,				/**< 54M							*/
-    DRV_RATE_MCS_0      = 14,				/**< 6.5M or  7.2					*/ 	
-    DRV_RATE_MCS_1      = 15,				/**< 13.0M or 14.4					*/
-    DRV_RATE_MCS_2      = 16,				/**< 19.5M or 21.7 					*/
-    DRV_RATE_MCS_3      = 17,				/**< 26.0M or 28.9 					*/
-    DRV_RATE_MCS_4      = 18,				/**< 39.0M or 43.3 					*/
-    DRV_RATE_MCS_5      = 19,				/**< 52.0M or 57.8 					*/
-    DRV_RATE_MCS_6      = 20,				/**< 58.5M or 65.0 					*/
-    DRV_RATE_MCS_7      = 21,				/**< 65.0M or 72.2 					*/
-    DRV_RATE_MAX        = DRV_RATE_MCS_7,	/**< Maximum Driver's Rate Type 	*/
-    DRV_RATE_INVALID    = 0xFF				/**< Invalid Driver's Rate Type 	*/
-
-} ERate;
-
-#define RATE_TO_MASK(R)  (1 << ((R) - 1))
-
-/** \enum ERateMask
- * \brief Driver rate mask
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum
-{
-    DRV_RATE_MASK_AUTO          = DRV_RATE_AUTO,                  /**< 0x000000	*/
-    DRV_RATE_MASK_1_BARKER      = RATE_TO_MASK(DRV_RATE_1M),      /**< 0x000001	*/
-    DRV_RATE_MASK_2_BARKER      = RATE_TO_MASK(DRV_RATE_2M),      /**< 0x000002	*/
-    DRV_RATE_MASK_5_5_CCK       = RATE_TO_MASK(DRV_RATE_5_5M),    /**< 0x000004	*/
-    DRV_RATE_MASK_11_CCK        = RATE_TO_MASK(DRV_RATE_11M),     /**< 0x000008	*/
-    DRV_RATE_MASK_22_PBCC       = RATE_TO_MASK(DRV_RATE_22M),     /**< 0x000010	*/
-    DRV_RATE_MASK_6_OFDM        = RATE_TO_MASK(DRV_RATE_6M),      /**< 0x000020	*/
-    DRV_RATE_MASK_9_OFDM        = RATE_TO_MASK(DRV_RATE_9M),      /**< 0x000040	*/
-    DRV_RATE_MASK_12_OFDM       = RATE_TO_MASK(DRV_RATE_12M),     /**< 0x000080	*/
-    DRV_RATE_MASK_18_OFDM       = RATE_TO_MASK(DRV_RATE_18M),     /**< 0x000100	*/
-    DRV_RATE_MASK_24_OFDM       = RATE_TO_MASK(DRV_RATE_24M),     /**< 0x000200	*/
-    DRV_RATE_MASK_36_OFDM       = RATE_TO_MASK(DRV_RATE_36M),     /**< 0x000400	*/
-    DRV_RATE_MASK_48_OFDM       = RATE_TO_MASK(DRV_RATE_48M),     /**< 0x000800	*/
-    DRV_RATE_MASK_54_OFDM       = RATE_TO_MASK(DRV_RATE_54M),     /**< 0x001000	*/
-    DRV_RATE_MASK_MCS_0_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_0),   /**< 0x002000	*/
-    DRV_RATE_MASK_MCS_1_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_1),   /**< 0x004000	*/
-    DRV_RATE_MASK_MCS_2_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_2),   /**< 0x008000	*/
-    DRV_RATE_MASK_MCS_3_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_3),   /**< 0x010000	*/
-    DRV_RATE_MASK_MCS_4_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_4),   /**< 0x020000	*/
-    DRV_RATE_MASK_MCS_5_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_5),   /**< 0x040000	*/
-    DRV_RATE_MASK_MCS_6_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_6),   /**< 0x080000	*/
-    DRV_RATE_MASK_MCS_7_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_7)    /**< 0x100000	*/
-
-} ERateMask;
-
-#define PBCC_BIT        0x00000080 /* BIT_7 */
-
-#endif /* #define TWDRIVERRATE_H */
diff --git a/wl1271/TWD/TWDriver/TWDriverScan.h b/wl1271/TWD/TWDriver/TWDriverScan.h
deleted file mode 100644
index 4bc4619..0000000
--- a/wl1271/TWD/TWDriver/TWDriverScan.h
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * TWDriverScan.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TWDRIVERSCAN_H
-#define TWDRIVERSCAN_H
-
-/** \file  TWDriverScan.h 
- *  \brief TWDriver Scan APIs
- *
- *  \see
- */
-
-#include "tidef.h"
-#include "TWDriverRate.h"
-#include "public_commands.h"
-
-/*****************************************************************************************
-                          Scan Definitions
-                          ---------------
-This file is included by the TWDriver.h , it should not be included apart. !!!!!!!
-*****************************************************************************************/
-
-
-/*
- ***********************************************************************
- *  Constant definitions.
- ***********************************************************************
- */
-#define MAX_NUMBER_OF_CHANNELS_PER_SCAN                     16
-#define SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND         MAX_NUMBER_OF_CHANNELS_PER_SCAN
-#define SCAN_MAX_NUM_OF_SPS_CHANNELS_PER_COMMAND            16
-#define SCAN_DEFAULT_MIN_CHANNEL_DWELL_TIME                 30000
-#define SCAN_DEFAULT_MAX_CHANNEL_DWELL_TIME                 60000
-#define SCAN_DEFAULT_EARLY_TERMINATION_EVENT                SCAN_ET_COND_DISABLE
-#define SCAN_DEFAULT_EARLY_TERMINATION_NUM_OF_FRAMES        0
-
-#define PERIODIC_SCAN_MAX_SSID_NUM      					8
-#define PERIODIC_SCAN_MAX_INTERVAL_NUM  					16
-#define PERIODIC_SCAN_MAX_CHANNEL_NUM   					37 /* G-14 + A-23 */
-
-
- /*
- ***********************************************************************
- *  Enums.
- ***********************************************************************
- */
-/** \enum EScanType
- * \brief Scan Type
- *
- * \par Description
- * This Enumeration defines the available scan types.
- *
- * \sa TFileInfo
- */
-typedef enum
-{
-/*	0	*/	SCAN_TYPE_NORMAL_PASSIVE = 0,   /**< Normal passive scan 	*/
-/*	1	*/	SCAN_TYPE_NORMAL_ACTIVE,        /**< Normal active scan 	*/
-/*	2	*/	SCAN_TYPE_SPS,                  /**< Scheduled Passive scan */
-/*	3	*/	SCAN_TYPE_TRIGGERED_PASSIVE,    /**< Triggered Passive scan */
-/*	4	*/	SCAN_TYPE_TRIGGERED_ACTIVE,     /**< Triggered Active scan 	*/
-/*	5	*/	SCAN_TYPE_NO_SCAN,              /**< No Scan to perform 	*/
-/*	6	*/	SCAN_TYPE_PACTSIVE              /**< Passive + Active Scan (used for DFS - driver internal use only!!!) */
-
-} EScanType;
-
-/** \enum EScanEtCondition
- * \brief Scan Early Termonation Condition
- *
- * \par Description
- * This Enumeration defines the different early termination causes.
- *
- * \sa TFileInfo
- */
-typedef enum
-{
-    SCAN_ET_COND_DISABLE     = 0x00,        /**< No early termination is not disabled (Do not perform an early termination scan)*/
-    SCAN_ET_COND_BEACON      = 0x10,        /**< Early termination scan on beacon reception 									*/
-    SCAN_ET_COND_PROBE_RESP  = 0x20,        /**< Early termination scan on probe response reception 							*/
-    SCAN_ET_COND_ANY_FRAME   = 0x30,        /**< Early termination scan on both beacon or probe response reception 				*/
-    SCAN_ET_COND_NUM_OF_CONDS= 0x4          /**< Number of early termination conditions 										*/ 
-
-} EScanEtCondition;
-
-/** \enum EScanResultTag
- * \brief Scan Debug Tags
- * 
- * \par Description
- * Enumeration of the differnet Scan Result Tags possible
- * 
- * \sa	
- */
-typedef enum
-{
-/*	0	*/	SCAN_RESULT_TAG_CURENT_BSS = 0,			/**< */
-/*	1	*/	SCAN_RESULT_TAG_APPLICATION_ONE_SHOT,	/**< */
-/*	2	*/	SCAN_RESULT_TAG_DRIVER_PERIODIC,		/**< */
-/*	3	*/	SCAN_RESULT_TAG_APPLICATION_PEIODIC,	/**< */
-/*	4	*/	SCAN_RESULT_TAG_MEASUREMENT,			/**< */
-/*	5	*/	SCAN_RESULT_TAG_IMMEDIATE,				/**< */
-/*	6	*/	SCAN_RESULT_TAG_CONTINUOUS,				/**< */
- /*	7	*/	SCAN_RESULT_TAG_MAX_NUMBER				/**< */
-
-} EScanResultTag;
-
-/** \enum ESsidVisability
- * \brief SSID Visablility Type
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum
-{
-/*	0	*/	SCAN_SSID_VISABILITY_PUBLIC = 0,		/**< Visible	*/
-/*	1	*/	SCAN_SSID_VISABILITY_HIDDEN				/**< Hidden		*/
-} ESsidVisability;
-
-/***********************************************************************
- *  Structure definitions.
- ***********************************************************************
- */
-/** \struct TSsid
- * \brief SSID Parameters
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-    TI_UINT8    len;		  			/**< SSID Length		*/   		
-    char        str[ MAX_SSID_LEN ];	/**< SSID string buffer	*/
-
-}  TSsid;
-
-/** \struct TScanNormalChannelEntry
- * \brief Scan Normal Channel Entry
- * 
- * \par Description
- * This structure defines single channel parameters for normal scan operation other than SPS (inc. triggered)
- * 
- * \sa
- */ 
-typedef struct
-{
-    TMacAddr               bssId;                  	/**< BSSID (MAC address) to filter */
-    TI_UINT32              maxChannelDwellTime;     /**< Maximum time to stay on the channel if some frames were 
-													* received but the early termination limit has not been reached (microseconds) 
-													*/
-    TI_UINT32              minChannelDwellTime;     /**< Minimum time to stay on the channel if no frames were received (microseconds) */
-    EScanEtCondition       earlyTerminationEvent;   /**< Early termination frame type */
-    TI_UINT8               ETMaxNumOfAPframes;      /**< Number of frames from the early termination frame types according to the early 
-													* Termination Event setting, after which scan is stopped on this channel	
-													*/    
-    TI_UINT8               txPowerDbm;              /**< Power level used to transmit (for active scan only) (0: no change; 1-5: predefined power level */
-    TI_UINT8               channel;                 /**< Channel to scan */
-
-} TScanNormalChannelEntry;
-
-/** \struct TScanSpsChannelEntry
- * \brief Scan SPS Channel Entry
- * 
- * \par Description
- * This structure defines single channel parameters for an SPS scan operation
- * 
- * \sa
- */ 
-typedef struct
-{
-    TMacAddr               bssId;               	/**< BSSID (source is MAC address) to filter */
-    TI_UINT32              scanDuration;            /**< Length of time to start scanning the channel (TSF lower 4 bytes) */
-    TI_UINT32              scanStartTime;           /**< Exact time to start scanning the channel (TSF lower 4 bytes) */
-    EScanEtCondition       earlyTerminationEvent;   /**< Scan early termination frame type */
-    TI_UINT8               ETMaxNumOfAPframes;      /**< Number of frames from the early termination frame types according to 
-													* the early Termination Event setting, after which scan is stopped on this channel
-													*/
-    TI_UINT8               channel;                 /**< Channel to scan */
-
-} TScanSpsChannelEntry;
-
-/** \struct TScanChannelEntry
- * \brief Scan Channel Entry
- * 
- * \par Description
- * Holds single channel parameters single-channel parameters for all scan types,
- * either for normal scan or for SPS scan
- * 
- * \sa
- */ 
-typedef union
-{
-    TScanNormalChannelEntry   normalChannelEntry;	/**< Normal scan parameters: channel parameters for all scan types other than SPS 	*/
-    TScanSpsChannelEntry      SPSChannelEntry;      /**< SPS scan parameters: channel parameters for SPS type 	*/
-
-} TScanChannelEntry;
-
-/** \struct TScanParams
- * \brief scan operation parameters
- * 
- * \par Description
- * This structure defines parameters for a scan operation
- * 
- * \sa
- */ 
-typedef struct
-{
-    TSsid                  desiredSsid;    		/**< The SSID to search (optional) 												*/
-    EScanType              scanType;            /**< Desired scan type (normal - active or passive, SPS, triggered - active or passive)	*/
-    ERadioBand             band;             	/**< Band to scan (A / BG) 														*/
-    TI_UINT8               probeReqNumber;     	/**< Number of probe requests to send on each channel (for active scan) 		*/
-    ERateMask              probeRequestRate;    /**< The rate at which to send the probe requests 								*/
-    TI_UINT8               Tid;                 /**< Time at which to trigger the scan (for triggered scan)						*/
-    TI_UINT64              latestTSFValue;      /**< For SPS scan: the latest TSF at which a frame was received. Used to detect 
-												* TSF error (AP recovery). 
-												*/
-    TI_UINT32              SPSScanDuration;    	/**< For SPS scan ONLY: the time duration of the scan (in milliseconds), used to 
-												* Set timer according to. Used to set scan-complete timer 
-												*/
-    TI_UINT8               numOfChannels;       /**< Number of channels to scan 														*/
-    TScanChannelEntry      channelEntry[ MAX_NUMBER_OF_CHANNELS_PER_SCAN ];	/**< Channel data array, actual size according to the above field. */
-
-} TScanParams;
-
-/** \struct TPeriodicScanSsid
- * \brief Periodic Scan SSID
- * 
- * \par Description
- * This structure defines parameters for Periodic scan for SSID
- * 
- * \sa
- */ 
-typedef struct
-{
-    ESsidVisability eVisability;	/**< Indicates if SSID Visible or not	*/	
-    TSsid           tSsid;			/**< The Parameters of Scaned SSID 		*/
-} TPeriodicScanSsid;
-
-/** \struct TPeriodicChannelEntry
- * \brief Periodic Channel Entry
- * 
- * \par Description
- * This structure defines a Channel Entry of Periodic scan
- * (each scanned channel has its own Channel Entry)
- * 
- * \sa
- */
-typedef struct
-{
-    ERadioBand      eBand;			  	/**< Channel's Radio Band									*/  	
-    TI_UINT32       uChannel;			/**< Channel's Number										*/
-    EScanType       eScanType;			/**< The Type of Scan Performed on the channel				*/
-    TI_UINT32       uMinDwellTimeMs;	/**< minimum time to dwell on the channel, in microseconds	*/
-    TI_UINT32       uMaxDwellTimeMs;	/**< maximum time to dwell on the channel, in microseconds	*/
-    TI_UINT32       uTxPowerLevelDbm;	/**< Channel's Power Level In Dbm/10 units 		 			*/
-} TPeriodicChannelEntry;
-
-/** \struct TPeriodicScanParams
- * \brief Periodic Scan Parameters
- * 
- * \par Description
- * This structure defines all the parameters of Periodic scan
- * 
- * \sa
- */
-typedef struct
-{
-    TI_UINT32               uSsidNum;												/**< Number of Desired SSID scanned			 					*/
-    TI_UINT8				uSsidListFilterEnabled;										/** 1: eneable filtering according to the list; 0: disable  */
-    TPeriodicScanSsid       tDesiredSsid[ PERIODIC_SCAN_MAX_SSID_NUM ];				/**< Buffer of size of maximum possible Periodic Scanned SSIDs. 
-																					* This buffer holds the Parameters of Desired SSIDs (for each SSID: 
-																					* visibility, length, string buffer) --> number of init entries in 
-																					* buffer: uSsidNum	
-																					*/
-    TI_UINT32               uCycleNum;												/**< number of Scan cycles to run 						   		*/ 								
-    TI_UINT32               uCycleIntervalMsec[ PERIODIC_SCAN_MAX_INTERVAL_NUM ];	/**< Intervals (in Msec) between two sequential  scan cycle    	*/
-    TI_INT8                 iRssiThreshold;											/**< RSSI threshold 											*/
-    TI_INT8                 iSnrThreshold;											/**< SNR threshold	 											*/
-    TI_UINT32               uFrameCountReportThreshold;								/**< Report after N results are received 						*/
-    TI_BOOL                 bTerminateOnReport;										/**< Indicates if to Terminate after report 					*/
-    ScanBssType_e           eBssType;												/**< Scan BSS Type												*/
-    TI_UINT32               uProbeRequestNum;										/**< Number of probe requests to transmit per SSID				*/
-    TI_UINT32               uChannelNum;											/**< Number of Scaned Channels									*/
-    TPeriodicChannelEntry   tChannels[ PERIODIC_SCAN_MAX_CHANNEL_NUM ];				/**< Buffer of size of maximum possible Periodic Scanned Channels. 
-																					* This buffer holds the Parameters of each Scanned Channel	
-																					*/
-} TPeriodicScanParams;
-
-#endif /* TWDRIVERSCAN_H */
-
-
-
-
-
diff --git a/wl1271/TWD/TWDriver/TWDriverTx.c b/wl1271/TWD/TWDriver/TWDriverTx.c
deleted file mode 100644
index c3f179e..0000000
--- a/wl1271/TWD/TWDriver/TWDriverTx.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * TWDriverTx.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:    TNETW_Driver_Tx.c
- *
- *   PURPOSE:   TNETW_Driver Tx API functions needed externally to the driver.
- *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_120
-#include "report.h"
-#include "TWDriver.h"
-#include "txCtrlBlk_api.h"
-#include "txHwQueue_api.h"
-#include "txXfer_api.h"
-#include "txResult_api.h"
-#include "CmdBld.h"
-
-/** \file  TWDriverTx.c 
- *  \brief TI WLAN HW TX Access Driver
- *
- *  \see   TWDriver.h 
- */
-
-
-/****************************************************************************
- *                  Tx Control Block API functions                          *
- ****************************************************************************/
-
-TTxCtrlBlk *TWD_txCtrlBlk_Alloc (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    return txCtrlBlk_Alloc (pTWD->hTxCtrlBlk);
-}
-
-void TWD_txCtrlBlk_Free (TI_HANDLE hTWD, TTxCtrlBlk *pCurrentEntry)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    txCtrlBlk_Free (pTWD->hTxCtrlBlk, pCurrentEntry);
-}
-
-TTxCtrlBlk *TWD_txCtrlBlk_GetPointer (TI_HANDLE hTWD, TI_UINT8 descId)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    return txCtrlBlk_GetPointer (pTWD->hTxCtrlBlk, descId);
-}
-
-
-
-/****************************************************************************
- *                      Tx HW Queue API functions                           *
- ****************************************************************************/
-ETxHwQueStatus TWD_txHwQueue_AllocResources (TI_HANDLE hTWD, TTxCtrlBlk *pTxCtrlBlk)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    return txHwQueue_AllocResources (pTWD->hTxHwQueue, pTxCtrlBlk);
-}
-
-/****************************************************************************
- *                          Tx Xfer API functions                           *
- ****************************************************************************/
-
-ETxnStatus TWD_txXfer_SendPacket (TI_HANDLE hTWD, TTxCtrlBlk *pPktCtrlBlk)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    return txXfer_SendPacket (pTWD->hTxXfer, pPktCtrlBlk);
-}
-
-void TWD_txXfer_EndOfBurst (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;
-
-    txXfer_EndOfBurst (pTWD->hTxXfer);
-}
-
-
diff --git a/wl1271/TWD/TwIf/TwIf.c b/wl1271/TWD/TwIf/TwIf.c
deleted file mode 100644
index 08565de..0000000
--- a/wl1271/TWD/TwIf/TwIf.c
+++ /dev/null
@@ -1,1148 +0,0 @@
-/*
- * TwIf.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/** \file   TwIf.c 
- *  \brief  The TWD bottom API towards the Txn-Queue. 
- *
- * The TwIf module is the lowest WLAN-specific layer and presents a common interface to all Xfer modules.
- * As such, it is responsible for the common functionalities related to device access, which includes:
- *    - transactions submission
- *    - interface power control
- *    - address translation (paging) when needed (depends on bus attributes).
- * The TwIf has no OS, platform or bus type dependencies.
- * 
- *  \see    TwIf.h, TxnQueue.c, TxnQueue.h
- */
-
-#define __FILE_ID__  FILE_ID_121
-#include "tidef.h"
-#include "report.h"
-#include "context.h"
-#include "timer.h"
-#include "TxnDefs.h"
-#include "TxnQueue.h"
-#include "TwIf.h"
-#include "TWDriver.h"
- 
-
-/************************************************************************
- * Defines
- ************************************************************************/
-#define TXN_DONE_QUE_SIZE       QUE_UNLIMITED_SIZE
-#define PEND_RESTART_TIMEOUT    100   /* timeout in msec for completion of last DMA transaction during restart */
-
-/* Values to write to the ELP register for sleep/awake */
-#define ELP_CTRL_REG_SLEEP      0
-#define ELP_CTRL_REG_AWAKE      1
-
-/* 
- * Device interface-control registers addresses (at the end ot the 17-bit address space):
- */
-#define PARTITION_REGISTERS_ADDR        (0x1FFC0)   /* Four 32 bit register:                      */
-                                                    /*    Memory region size            (0x1FFC0) */
-                                                    /*    Memory region base address    (0x1FFC4) */
-                                                    /*    Registers region size         (0x1FFC8) */
-                                                    /*    Registers region base address (0x1FFCC) */
-
-#define ELP_CTRL_REG_ADDR		        (0x1FFFC)   /* ELP control register address */
-
-
-
-/************************************************************************
- * Types
- ************************************************************************/
-
-/* TwIf SM States */
-typedef enum
-{
-	SM_STATE_AWAKE,           /* HW is awake and Txn-Queue is running */
-	SM_STATE_SLEEP,           /* HW is asleep and Txn-Queue is stopped */
-	SM_STATE_WAIT_HW          /* Waiting for HW to wake up (after triggering it), Txn-Queue is stopped */
-} ESmState;
-
-/* TwIf SM Events */
-typedef enum
-{
-	SM_EVENT_START,           /* Need to wake up the device to handle transactions */
-	SM_EVENT_HW_AVAILABLE,    /* The device woke up */
-	SM_EVENT_SLEEP            /* Need to let the device go to sleep */
-} ESmEvent;
-
-/* The addresses partitioning configuration Txn data */
-typedef struct 
-{
-    TI_UINT32       uMemSize;        /* The HW memory region size. */
-    TI_UINT32       uMemAddr;        /* The HW memory region address. */
-    TI_UINT32       uRegSize;        /* The HW registers region size. */
-    TI_UINT32       uRegAddr;        /* The HW registers region address. */
-
-} TPartitionTxnData;
-
-/* The addresses partitioning configuration Txn */
-typedef struct 
-{
-    TTxnStruct          tHdr;        /* The generic transaction structure */
-    TPartitionTxnData   tData;       /* The addresses partitioning configuration data */
-
-} TPartitionTxn;
-
-/* The addresses partitioning configuration Txn */
-typedef struct 
-{
-    TTxnStruct      tHdr;           /* The generic transaction structure */
-    TI_UINT32   tData;       /* The addresses partitioning configuration data for one register */
-
-} TPartitionRegTxn;
-
-/* The addresses partitioning configuration Txn */
-typedef struct 
-{
-    TTxnStruct      tHdr;           /* The generic transaction structure */
-    TI_UINT8        uElpData;       /* The value to write to the ELP register */
-
-} TElpTxn;
-
-/* The TwIf module Object */
-typedef struct _TTwIfObj
-{
-    /* Other modules handles */
-    TI_HANDLE	    hOs;		   	 
-    TI_HANDLE	    hReport;
-	TI_HANDLE       hContext;
-	TI_HANDLE       hTimer;
-	TI_HANDLE	    hTxnQ;
-
-    ESmState        eState;          /* SM current state */
-    TI_HANDLE       hTxnDoneQueue;   /* Queue for completed transactions not reported yet to the upper layer */
-    TI_UINT32       uContextId;      /* The ID allocated to this module on registration to context module */
-    TFailureEventCb fErrCb;          /* The upper layer CB function for error handling */
-    TI_HANDLE       hErrCb;          /* The CB function handle */
-    TRecoveryCb     fRecoveryCb;     /* The upper layer CB for restart complete */
-    TI_HANDLE       hRecoveryCb;     /* The CB function handle */
-    TI_UINT32       uAwakeReqCount;  /* Increment on awake requests and decrement on sleep requests */
-    TI_UINT32       uPendingTxnCount;/* Count pending transactions (sent to TxnQ and not completed yet) */
-    TElpTxn         tElpTxnSleep;    /* Transaction structure for writing sleep to ELP register  */
-    TElpTxn         tElpTxnAwake;    /* Transaction structure for writing awake to ELP register  */
-
-    /* HW Addresses partitioning */
-    TI_UINT32       uMemAddr1;        /* The HW memory region start address. */
-    TI_UINT32       uMemSize1;        /* The HW memory region end address. */
-    TI_UINT32       uMemAddr2;        /* The HW registers region start address. */
-    TI_UINT32       uMemSize2;        /* The HW registers region end address. */
-    TI_UINT32       uMemAddr3;        /* The INT Status registers region start address. */
-    TI_UINT32       uMemSize3;        /* The INT Status registers region end address. */
-    TI_UINT32       uMemAddr4;        /* The FW Status mem registers region start address. */
-    
-
-#ifdef TI_DBG
-    /* Debug counters */
-    TI_UINT32       uDbgCountAwake;      /* Count calls to twIf_Awake */
-    TI_UINT32       uDbgCountSleep;      /* Count calls to twIf_Sleep */
-    TI_UINT32       uDbgCountTxn;        /* Count calls to twIf_SendTransaction (including TwIf internal Txns) */
-    TI_UINT32       uDbgCountTxnPending; /* Count transactions that returned PENDING */
-    TI_UINT32       uDbgCountTxnComplete;/* Count transactions that returned COMPLETE */
-    TI_UINT32       uDbgCountTxnDoneCb;  /* Count calls to twIf_TxnDoneCb */
-#endif
-   
-    TI_BOOL         bTxnDoneInRecovery;      /* Indicate that current TxnDone is within recovery process */
-    TI_BOOL         bPendRestartTimerRunning;/* Indicate that the restart guard timer is running */ 
-    TI_HANDLE       hPendRestartTimer;       /* The restart process guard timer */
-
-} TTwIfObj;
-
-
-/************************************************************************
- * Internal functions prototypes
- ************************************************************************/
-static void        twIf_WriteElpReg        (TTwIfObj *pTwIf, TI_UINT32 uValue);
-static void        twIf_PartitionTxnDoneCb (TI_HANDLE hTwIf, void *hTxn);
-static ETxnStatus  twIf_SendTransaction    (TTwIfObj *pTwIf, TTxnStruct *pTxn);
-static void        twIf_HandleSmEvent      (TTwIfObj *pTwIf, ESmEvent eEvent);
-static void        twIf_TxnDoneCb          (TI_HANDLE hTwIf, TTxnStruct *pTxn);
-static void        twIf_HandleTxnDone      (TI_HANDLE hTwIf);
-static void        twIf_ClearTxnDoneQueue  (TI_HANDLE hTwIf);
-static void        twIf_PendRestratTimeout (TI_HANDLE hTwIf, TI_BOOL bTwdInitOccured);
-
-
-/************************************************************************
- *
- *   Module functions implementation
- *
- ************************************************************************/
-
-/** 
- * \fn     twIf_Create 
- * \brief  Create the module
- * 
- * Allocate and clear the module's object.
- * 
- * \note   
- * \param  hOs - Handle to Os Abstraction Layer
- * \return Handle of the allocated object, NULL if allocation failed 
- * \sa     twIf_Destroy
- */ 
-TI_HANDLE twIf_Create (TI_HANDLE hOs)
-{
-    TI_HANDLE  hTwIf;
-    TTwIfObj  *pTwIf;
-
-    hTwIf = os_memoryAlloc (hOs, sizeof(TTwIfObj));
-    if (hTwIf == NULL)
-        return NULL;
-    
-    pTwIf = (TTwIfObj *)hTwIf;
-
-    os_memoryZero (hOs, hTwIf, sizeof(TTwIfObj));
-    
-    pTwIf->hOs = hOs;
-
-    return pTwIf;
-}
-
-
-/** 
- * \fn     twIf_Destroy
- * \brief  Destroy the module. 
- * 
- * Unregister from TxnQ and free the TxnDone-queue and the module's object.
- * 
- * \note   
- * \param  The module's object
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     twIf_Create
- */ 
-TI_STATUS twIf_Destroy (TI_HANDLE hTwIf)
-{
-    TTwIfObj *pTwIf = (TTwIfObj*)hTwIf;
-
-    if (pTwIf)
-    {
-        txnQ_Close (pTwIf->hTxnQ, TXN_FUNC_ID_WLAN);
-        if (pTwIf->hTxnDoneQueue)
-        {
-            que_Destroy (pTwIf->hTxnDoneQueue);
-        }
-        if (pTwIf->hPendRestartTimer)
-        {
-            tmr_DestroyTimer (pTwIf->hPendRestartTimer);
-        }
-        os_memoryFree (pTwIf->hOs, pTwIf, sizeof(TTwIfObj));     
-    }
-    return TI_OK;
-}
-
-
-/** 
- * \fn     twIf_Init 
- * \brief  Init module 
- * 
- * - Init required handles and module variables
- * - Create the TxnDone-queue
- * - Register to TxnQ
- * - Register to context module
- * 
- * \note    
- * \param  hTwIf       - The module's object
- * \param  hXxx        - Handles to other modules
- * \param  fRecoveryCb - Callback function for recovery completed after TxnDone
- * \param  hRecoveryCb - Handle for fRecoveryCb
- * \return void        
- * \sa     
- */ 
-void twIf_Init (TI_HANDLE hTwIf, 
-                TI_HANDLE hReport, 
-                TI_HANDLE hContext, 
-                TI_HANDLE hTimer, 
-                TI_HANDLE hTxnQ, 
-                TRecoveryCb fRecoveryCb, 
-                TI_HANDLE hRecoveryCb)
-{
-    TTwIfObj   *pTwIf = (TTwIfObj*)hTwIf;
-    TI_UINT32   uNodeHeaderOffset;
-    TTxnStruct *pTxnHdr;   /* The ELP transactions header (as used in the TxnQ API) */
-
-    pTwIf->hReport          = hReport;
-    pTwIf->hContext         = hContext;
-    pTwIf->hTimer           = hTimer;
-    pTwIf->hTxnQ            = hTxnQ;
-    pTwIf->fRecoveryCb      = fRecoveryCb;
-    pTwIf->hRecoveryCb      = hRecoveryCb;
-
-    /* Prepare ELP sleep transaction */
-    pTwIf->tElpTxnSleep.uElpData = ELP_CTRL_REG_SLEEP;
-    pTxnHdr = &(pTwIf->tElpTxnSleep.tHdr);
-    TXN_PARAM_SET(pTxnHdr, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-    TXN_PARAM_SET_MORE(pTxnHdr, 0);         /* Sleep is the last transaction! */
-    /* NOTE: Function id for single step will be replaced to 0 by the bus driver */
-    TXN_PARAM_SET_SINGLE_STEP(pTxnHdr, 1);  /* ELP write is always single step (TxnQ is topped)! */
-    BUILD_TTxnStruct(pTxnHdr, ELP_CTRL_REG_ADDR, &(pTwIf->tElpTxnSleep.uElpData), sizeof(TI_UINT8), NULL, NULL)
-
-    /* Prepare ELP awake transaction */
-    pTwIf->tElpTxnAwake.uElpData = ELP_CTRL_REG_AWAKE;
-    pTxnHdr = &(pTwIf->tElpTxnAwake.tHdr);
-    TXN_PARAM_SET(pTxnHdr, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-    TXN_PARAM_SET_MORE(pTxnHdr, 1);         
-    /* NOTE: Function id for single step will be replaced to 0 by the bus driver */
-    TXN_PARAM_SET_SINGLE_STEP(pTxnHdr, 1);  /* ELP write is always single step (TxnQ is topped)! */
-    BUILD_TTxnStruct(pTxnHdr, ELP_CTRL_REG_ADDR, &(pTwIf->tElpTxnAwake.uElpData), sizeof(TI_UINT8), NULL, NULL)
-
-    /* Create the TxnDone queue. */
-    uNodeHeaderOffset = TI_FIELD_OFFSET(TTxnStruct, tTxnQNode); 
-    pTwIf->hTxnDoneQueue = que_Create (pTwIf->hOs, pTwIf->hReport, TXN_DONE_QUE_SIZE, uNodeHeaderOffset);
-    if (pTwIf->hTxnDoneQueue == NULL)
-    {
-        TRACE0(pTwIf->hReport, REPORT_SEVERITY_ERROR, "twIf_Init: TxnDone queue creation failed!\n");
-    }
-
-    /* Register to the context engine and get the client ID */
-    pTwIf->uContextId = context_RegisterClient (pTwIf->hContext,
-                                                twIf_HandleTxnDone,
-                                                hTwIf,
-                                                TI_TRUE,
-                                                "TWIF",
-                                                sizeof("TWIF"));
-
-	/* Allocate timer */
-	pTwIf->hPendRestartTimer = tmr_CreateTimer (hTimer);
-	if (pTwIf->hPendRestartTimer == NULL)
-	{
-        TRACE0(pTwIf->hReport, REPORT_SEVERITY_ERROR, "twIf_Init: Failed to create PendRestartTimer!\n");
-        return;
-	}
-    pTwIf->bPendRestartTimerRunning = TI_FALSE;
-
-    /* Register to TxnQ */
-    txnQ_Open (pTwIf->hTxnQ, TXN_FUNC_ID_WLAN, TXN_NUM_PRIORITYS, (TTxnQueueDoneCb)twIf_TxnDoneCb, hTwIf);
-
-    /* Restart TwIf and TxnQ modules */
-    twIf_Restart (hTwIf);
-}
-
-
-/** 
- * \fn     twIf_Restart
- * \brief  Restart module upon driver stop or recovery
- * 
- * Called upon driver stop command or upon recovery. 
- * Calls txnQ_Restart to clear the WLAN queues and call the TxnDone CB on each tansaction.
- * If no transaction in progress, the queues are cleared immediately. 
- * If a transaction is in progress, it is done upon TxnDone.
- * The status in transactions that were dropped due to restart is TXN_STATUS_RECOVERY,
- *     and its originator (Xfer module) handles it if required (if its CB was written in the Txn).
- * 
- * \note   
- * \param  hTwIf - The module's object
- * \return COMPLETE if the WLAN queues were restarted, PENDING if waiting for TxnDone to restart queues
- * \sa     
- */ 
-ETxnStatus twIf_Restart (TI_HANDLE hTwIf)
-{
-    TTwIfObj    *pTwIf = (TTwIfObj*)hTwIf;
-    ETxnStatus  eStatus;
-
-    pTwIf->eState           = SM_STATE_SLEEP;
-    pTwIf->uAwakeReqCount   = 0;
-
-    pTwIf->uPendingTxnCount = 0;
-
-    /* Clear done queue */
-    twIf_ClearTxnDoneQueue(hTwIf);
-
-    /* Restart WLAN queues */
-    eStatus = txnQ_Restart (pTwIf->hTxnQ, TXN_FUNC_ID_WLAN);
-
-    /* If pending upon ongoing transaction, start guard timer in case SDIO does not call us back */
-    if (eStatus == TXN_STATUS_PENDING) 
-    {
-        pTwIf->bPendRestartTimerRunning = TI_TRUE;
-		tmr_StartTimer (pTwIf->hPendRestartTimer, twIf_PendRestratTimeout, hTwIf, PEND_RESTART_TIMEOUT, TI_FALSE);
-    }
-
-    /* Return result (COMPLETE if completed or PENDING if will be completed in TxnDone context) */
-    return eStatus;
-}
-
-
-/** 
- * \fn     twIf_RegisterErrCb
- * \brief  Register Error CB
- * 
- * Register upper layer (health monitor) CB for bus error
- * 
- * \note   
- * \param  hTwIf  - The module's object
- * \param  fErrCb - The upper layer CB function for error handling 
- * \param  hErrCb - The CB function handle
- * \return void
- * \sa     
- */ 
-void twIf_RegisterErrCb (TI_HANDLE hTwIf, void *fErrCb, TI_HANDLE hErrCb)
-{
-    TTwIfObj *pTwIf = (TTwIfObj*) hTwIf;
-
-    /* Save upper layer (health monitor) CB for bus error */
-    pTwIf->fErrCb = (TFailureEventCb)fErrCb;
-    pTwIf->hErrCb = hErrCb;
-}
-
-
-/** 
- * \fn     twIf_WriteElpReg
- * \brief  write ELP register
- * 
- * \note   
- * \param  pTwIf   - The module's object
- * \param  uValue  - ELP_CTRL_REG_SLEEP or ELP_CTRL_REG_AWAKE
- * \return void
- * \sa     
- */ 
-static void twIf_WriteElpReg (TTwIfObj *pTwIf, TI_UINT32 uValue)
-{
-    TRACE1(pTwIf->hReport, REPORT_SEVERITY_INFORMATION, "twIf_WriteElpReg:  ELP Txn data = 0x%x\n", uValue);
-    /* Send ELP (awake or sleep) transaction to TxnQ */
-    if (uValue == ELP_CTRL_REG_AWAKE)
-    {
-        txnQ_Transact (pTwIf->hTxnQ, &(pTwIf->tElpTxnAwake.tHdr));
-    }
-    else
-    {
-        txnQ_Transact (pTwIf->hTxnQ, &(pTwIf->tElpTxnSleep.tHdr));
-    }
-}
-
-
-/** 
- * \fn     twIf_SetPartition
- * \brief  Set HW addresses partition
- * 
- * Called by the HwInit module to set the HW address ranges for download or working access.
- * Generate and configure the bus access address mapping table.
- * The partition is split between register (fixed partition of 24KB size, exists in all modes), 
- *     and memory (dynamically changed during init and gets constant value in run-time, 104KB size).
- * The TwIf configures the memory mapping table on the device by issuing write transaction to 
- *     table address (note that the TxnQ and bus driver see this as a regular transaction). 
- * 
- * \note In future versions, a specific bus may not support partitioning (as in wUART), 
- *       In this case the HwInit module shall not call this function (will learn the bus 
- *       configuration from the INI file).
- *
- * \param  hTwIf          - The module's object
- * \param  uMemAddr  - The memory partition base address
- * \param  uMemSize  - The memory partition size
- * \param  uRegAddr  - The registers partition base address
- * \param  uRegSize  - The register partition size
- * \return void
- * \sa     
- */ 
-
-void twIf_SetPartition (TI_HANDLE hTwIf,
-                        TPartition *pPartition)
-{
-    TTwIfObj          *pTwIf = (TTwIfObj*) hTwIf;
-    TPartitionRegTxn  *pPartitionRegTxn;/* The partition transaction structure for one register */
-    TTxnStruct        *pTxnHdr;         /* The partition transaction header (as used in the TxnQ API) */
-    ETxnStatus         eStatus;
-    int i;
-
-    /* Save partition information for translation and validation. */
-    pTwIf->uMemAddr1 = pPartition[0].uMemAdrr;
-    pTwIf->uMemSize1 = pPartition[0].uMemSize;
-    pTwIf->uMemAddr2 = pPartition[1].uMemAdrr;
-    pTwIf->uMemSize2 = pPartition[1].uMemSize;
-    pTwIf->uMemAddr3 = pPartition[2].uMemAdrr;
-    pTwIf->uMemSize3 = pPartition[2].uMemSize;
-    pTwIf->uMemAddr4 = pPartition[3].uMemAdrr;
-
-    /* Allocate memory for the current 4 partition transactions */
-    pPartitionRegTxn = (TPartitionRegTxn *) os_memoryAlloc (pTwIf->hOs, 7*sizeof(TPartitionRegTxn));
-    pTxnHdr       = &(pPartitionRegTxn->tHdr);
-
-    /* Zero the allocated memory to be certain that unused fields will be initialized */
-    os_memoryZero(pTwIf->hOs, pPartitionRegTxn, 7*sizeof(TPartitionRegTxn));
-
-    /* Prepare partition transaction data */
-    pPartitionRegTxn[0].tData  = ENDIAN_HANDLE_LONG(pTwIf->uMemAddr1);
-    pPartitionRegTxn[1].tData  = ENDIAN_HANDLE_LONG(pTwIf->uMemSize1);
-    pPartitionRegTxn[2].tData  = ENDIAN_HANDLE_LONG(pTwIf->uMemAddr2);
-    pPartitionRegTxn[3].tData  = ENDIAN_HANDLE_LONG(pTwIf->uMemSize2);
-    pPartitionRegTxn[4].tData  = ENDIAN_HANDLE_LONG(pTwIf->uMemAddr3);
-    pPartitionRegTxn[5].tData  = ENDIAN_HANDLE_LONG(pTwIf->uMemSize3);
-    pPartitionRegTxn[6].tData  = ENDIAN_HANDLE_LONG(pTwIf->uMemAddr4);
-
-
-    /* Prepare partition Txn header */
-    for (i=0; i<7; i++)
-    {
-        pTxnHdr = &(pPartitionRegTxn[i].tHdr);
-        TXN_PARAM_SET(pTxnHdr, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_WRITE, TXN_INC_ADDR)
-        TXN_PARAM_SET_MORE(pTxnHdr, 1);         
-        TXN_PARAM_SET_SINGLE_STEP(pTxnHdr, 0);
-    }
-
-
-    /* Memory address */
-    pTxnHdr = &(pPartitionRegTxn[0].tHdr);
-    BUILD_TTxnStruct(pTxnHdr, PARTITION_REGISTERS_ADDR+4,  &(pPartitionRegTxn[0].tData), REGISTER_SIZE, 0, 0)
-    twIf_SendTransaction (pTwIf, pTxnHdr);
-
-    /* Memory size */
-    pTxnHdr = &(pPartitionRegTxn[1].tHdr);
-    BUILD_TTxnStruct(pTxnHdr, PARTITION_REGISTERS_ADDR+0,  &(pPartitionRegTxn[1].tData), REGISTER_SIZE, 0, 0)
-    twIf_SendTransaction (pTwIf, pTxnHdr);
-
-    /* Registers address */
-    pTxnHdr = &(pPartitionRegTxn[2].tHdr);
-    BUILD_TTxnStruct(pTxnHdr, PARTITION_REGISTERS_ADDR+12, &(pPartitionRegTxn[2].tData), REGISTER_SIZE, 0, 0)
-    twIf_SendTransaction (pTwIf, pTxnHdr);
-
-    /* Registers size */
-    pTxnHdr = &(pPartitionRegTxn[3].tHdr);
-    BUILD_TTxnStruct(pTxnHdr, PARTITION_REGISTERS_ADDR+8,  &(pPartitionRegTxn[3].tData), REGISTER_SIZE, 0, 0)
-    eStatus = twIf_SendTransaction (pTwIf, pTxnHdr);
-
- /* Registers address */
-    pTxnHdr = &(pPartitionRegTxn[4].tHdr);
-    BUILD_TTxnStruct(pTxnHdr, PARTITION_REGISTERS_ADDR+20,  &(pPartitionRegTxn[4].tData), REGISTER_SIZE, 0, 0)
-    twIf_SendTransaction (pTwIf, pTxnHdr);
-
- /* Registers size */
-    pTxnHdr = &(pPartitionRegTxn[5].tHdr);
-    BUILD_TTxnStruct(pTxnHdr, PARTITION_REGISTERS_ADDR+16,  &(pPartitionRegTxn[5].tData), REGISTER_SIZE, 0, 0)
-    eStatus = twIf_SendTransaction (pTwIf, pTxnHdr);
-
- /* Registers address */
-    pTxnHdr = &(pPartitionRegTxn[6].tHdr);
-    BUILD_TTxnStruct(pTxnHdr, PARTITION_REGISTERS_ADDR+24,  &(pPartitionRegTxn[6].tData), REGISTER_SIZE, twIf_PartitionTxnDoneCb, pTwIf)
-    twIf_SendTransaction (pTwIf, pTxnHdr);
-
-    /* If the transaction is done, free the allocated memory (otherwise freed in the partition CB) */
-    if (eStatus != TXN_STATUS_PENDING) 
-    {
-        os_memoryFree (pTwIf->hOs, pPartitionRegTxn,7*sizeof(TPartitionRegTxn));
-    }
-}
-
-
-static void twIf_PartitionTxnDoneCb (TI_HANDLE hTwIf, void *hTxn)
-{
-    TTwIfObj *pTwIf = (TTwIfObj*) hTwIf;
-
-    /* Free the partition transaction buffer after completed (see transaction above) */
-    os_memoryFree (pTwIf->hOs, 
-                   (char *)hTxn - (6 * sizeof(TPartitionRegTxn)),  /* Move back to the first Txn start */
-                   7 * sizeof(TPartitionRegTxn)); 
-}
-
-
-/** 
- * \fn     twIf_Awake
- * \brief  Request to keep the device awake
- * 
- * Used by the Xfer modules to request to keep the device awake until twIf_Sleep() is called.
- * Each call to this function increments AwakeReq counter. Once the device is awake (upon transaction), 
- *     the TwIf SM keeps it awake as long as this counter is not zero.
- * 
- * \note   
- * \param  hTwIf - The module's object
- * \return void
- * \sa     twIf_Sleep
- */ 
-void twIf_Awake (TI_HANDLE hTwIf)
-{
-    TTwIfObj *pTwIf = (TTwIfObj*) hTwIf;
-
-    /* Increment awake requests counter */
-    pTwIf->uAwakeReqCount++;
-
-#ifdef TI_DBG
-    pTwIf->uDbgCountAwake++;
-    TRACE1(pTwIf->hReport, REPORT_SEVERITY_INFORMATION, "twIf_Awake: uAwakeReqCount = %d\n", pTwIf->uAwakeReqCount);
-#endif
-}
-
-
-/** 
- * \fn     twIf_Sleep
- * \brief  Remove request to keep the device awake
- * 
- * Each call to this function decrements AwakeReq counter.
- * Once this counter is zeroed, if the TxnQ is empty (no WLAN transactions), the TwIf SM is 
- *     invoked to stop the TxnQ and enable the device to sleep (write 0 to ELP register).
- * 
- * \note   
- * \param  hTwIf - The module's object
- * \return void
- * \sa     twIf_Awake
- */ 
-void twIf_Sleep (TI_HANDLE hTwIf)
-{
-    TTwIfObj *pTwIf = (TTwIfObj*) hTwIf;
-
-    /* Decrement awake requests counter */
-    if (pTwIf->uAwakeReqCount > 0) /* in case of redundant call after recovery */
-    {   
-    pTwIf->uAwakeReqCount--;
-    }
-
-#ifdef TI_DBG
-    pTwIf->uDbgCountSleep++;
-    TRACE1(pTwIf->hReport, REPORT_SEVERITY_INFORMATION, "twIf_Sleep: uAwakeReqCount = %d\n", pTwIf->uAwakeReqCount);
-#endif
-
-    /* If Awake not required and no pending transactions in TxnQ, issue Sleep event to SM */
-    if ((pTwIf->uAwakeReqCount == 0) && (pTwIf->uPendingTxnCount == 0))
-    {
-        twIf_HandleSmEvent (pTwIf, SM_EVENT_SLEEP);
-    }
-}
-
-
-/** 
- * \fn     twIf_HwAvailable
- * \brief  The device is awake
- * 
- * This is an indication from the FwEvent that the device is awake.
- * Issue HW_AVAILABLE event to the SM.
- * 
- * \note   
- * \param  hTwIf - The module's object
- * \return void
- * \sa     
- */ 
-void twIf_HwAvailable (TI_HANDLE hTwIf)
-{
-    TTwIfObj *pTwIf = (TTwIfObj*) hTwIf;
-
-    TRACE0(pTwIf->hReport, REPORT_SEVERITY_INFORMATION, "twIf_HwAvailable: HW is Available\n");
-
-    /* Issue HW_AVAILABLE event to the SM */
-    twIf_HandleSmEvent (pTwIf, SM_EVENT_HW_AVAILABLE);
-}
-
-
-/** 
- * \fn     twIf_Transact
- * \brief  Issue a transaction
- * 
- * This method is used by the Xfer modules to issue all transaction types.
- * Translate HW address according to bus partition and call twIf_SendTransaction().
- * 
- * \note   
- * \param  hTwIf - The module's object
- * \param  pTxn  - The transaction object 
- * \return COMPLETE if the transaction was completed in this context, PENDING if not, ERROR if failed
- * \sa     twIf_SendTransaction
- */ 
-ETxnStatus twIf_Transact (TI_HANDLE hTwIf, TTxnStruct *pTxn)
-{
-    TTwIfObj  *pTwIf   = (TTwIfObj*)hTwIf;
-
-    /* Translate HW address for registers region */
-    if ((pTxn->uHwAddr >= pTwIf->uMemAddr2) && (pTxn->uHwAddr <= pTwIf->uMemAddr2 + pTwIf->uMemSize2))
-    {
-        pTxn->uHwAddr = pTxn->uHwAddr - pTwIf->uMemAddr2 + pTwIf->uMemSize1;
-    }
-    /* Translate HW address for memory region */
-    else 
-    {
-        pTxn->uHwAddr = pTxn->uHwAddr - pTwIf->uMemAddr1;
-    }
-
-    /* Regular transaction are not the last and are not single step (only ELP write is) */
-    TXN_PARAM_SET_MORE(pTxn, 1);
-    TXN_PARAM_SET_SINGLE_STEP(pTxn, 0);
-
-    /* Send the transaction to the TxnQ and update the SM if needed. */
-    return twIf_SendTransaction (pTwIf, pTxn);
-}
-
-ETxnStatus twIf_TransactReadFWStatus (TI_HANDLE hTwIf, TTxnStruct *pTxn)
-{
-    TTwIfObj  *pTwIf   = (TTwIfObj*)hTwIf;
-
-    /* Regular transaction are not the last and are not single step (only ELP write is) */
-    TXN_PARAM_SET_MORE(pTxn, 1);         
-    TXN_PARAM_SET_SINGLE_STEP(pTxn, 0);
-
-    /* Send the transaction to the TxnQ and update the SM if needed. */  
-    return twIf_SendTransaction (pTwIf, pTxn);
-}
-
-
-/** 
- * \fn     twIf_SendTransaction
- * \brief  Send a transaction to the device
- * 
- * This method is used by the Xfer modules and the TwIf to send all transaction types to the device.
- * Send the transaction to the TxnQ and update the SM if needed.
- * 
- * \note   
- * \param  pTwIf - The module's object
- * \param  pTxn  - The transaction object 
- * \return COMPLETE if the transaction was completed in this context, PENDING if not, ERROR if failed
- * \sa     
- */ 
-static ETxnStatus twIf_SendTransaction (TTwIfObj *pTwIf, TTxnStruct *pTxn)
-{
-    ETxnStatus eStatus;
-#ifdef TI_DBG
-    TI_UINT32  data = 0;
-
-    /* Verify that the Txn HW-Address is 4-bytes aligned */
-    if (pTxn->uHwAddr & 0x3)
-    {
-        TRACE2(pTwIf->hReport, REPORT_SEVERITY_ERROR, "twIf_SendTransaction: Unaligned HwAddr! HwAddr=0x%x, Params=0x%x\n", pTxn->uHwAddr, pTxn->uTxnParams);
-		return TXN_STATUS_ERROR;
-    }	
-#endif
-
-    context_EnterCriticalSection (pTwIf->hContext);
-    /* increment pending Txn counter */
-    pTwIf->uPendingTxnCount++;
-    context_LeaveCriticalSection (pTwIf->hContext);
-
-    /* Send transaction to TxnQ */
-    eStatus = txnQ_Transact(pTwIf->hTxnQ, pTxn);
-
-#ifdef TI_DBG
-    pTwIf->uDbgCountTxn++;
-    if      (eStatus == TXN_STATUS_COMPLETE) { pTwIf->uDbgCountTxnComplete++; }
-    else if (eStatus == TXN_STATUS_PENDING ) { pTwIf->uDbgCountTxnPending++;  }
-
-	COPY_WLAN_LONG(&data,&(pTxn->aBuf[0]));
-    TRACE8(pTwIf->hReport, REPORT_SEVERITY_INFORMATION, "twIf_SendTransaction: Status = %d, Params=0x%x, HwAddr=0x%x, Len0=%d, Len1=%d, Len2=%d, Len3=%d, Data=0x%x \n", eStatus, pTxn->uTxnParams, pTxn->uHwAddr, pTxn->aLen[0], pTxn->aLen[1], pTxn->aLen[2], pTxn->aLen[3],data);
-#endif
-
-    /* If Txn status is PENDING issue Start event to the SM */
-    if (eStatus == TXN_STATUS_PENDING)
-    {
-        twIf_HandleSmEvent (pTwIf, SM_EVENT_START);
-    }
-
-    /* Else (COMPLETE or ERROR) */
-    else
-    {
-        context_EnterCriticalSection (pTwIf->hContext);
-        /* decrement pending Txn counter in case of sync transact*/
-        pTwIf->uPendingTxnCount--;
-        context_LeaveCriticalSection (pTwIf->hContext);
-
-        /* If Awake not required and no pending transactions in TxnQ, issue Sleep event to SM */
-        if ((pTwIf->uAwakeReqCount == 0) && (pTwIf->uPendingTxnCount == 0))
-        {
-            twIf_HandleSmEvent (pTwIf, SM_EVENT_SLEEP);
-        }
-
-        /* If Txn failed and error CB available, call it to initiate recovery */
-        if (eStatus == TXN_STATUS_ERROR)
-        {
-            TRACE6(pTwIf->hReport, REPORT_SEVERITY_ERROR, "twIf_SendTransaction: Txn failed!!  Params=0x%x, HwAddr=0x%x, Len0=%d, Len1=%d, Len2=%d, Len3=%d\n", pTxn->uTxnParams, pTxn->uHwAddr, pTxn->aLen[0], pTxn->aLen[1], pTxn->aLen[2], pTxn->aLen[3]);
-
-            if (pTwIf->fErrCb)
-            {
-                pTwIf->fErrCb (pTwIf->hErrCb, BUS_FAILURE);
-            }
-        }
-    }
-
-    /* Return the Txn status (COMPLETE if completed in this context, PENDING if not, ERROR if failed) */
-    return eStatus;
-}
-
-/** 
- * \fn     twIf_HandleSmEvent
- * \brief  The TwIf SM implementation
- * 
- * Handle SM event.
- * Control the device awake/sleep states and the TxnQ run/stop states according to the event.
- *  
- * \note   
- * \param  hTwIf - The module's object
- * \return void
- * \sa     
- */ 
-static void twIf_HandleSmEvent (TTwIfObj *pTwIf, ESmEvent eEvent)
-{
-	ESmState eState = pTwIf->eState;  /* The state before handling the event */
-
-    /* Switch by current state and handle event */
-    switch (eState)
-    {
-    case SM_STATE_AWAKE:
-        /* SLEEP event:  AWAKE ==> SLEEP,  stop TxnQ and set ELP reg to sleep */
-        if (eEvent == SM_EVENT_SLEEP)
-        {
-            pTwIf->eState = SM_STATE_SLEEP;
-            txnQ_Stop (pTwIf->hTxnQ, TXN_FUNC_ID_WLAN);
-            twIf_WriteElpReg (pTwIf, ELP_CTRL_REG_SLEEP);
-        }
-        break;
-    case SM_STATE_SLEEP:
-        /* START event:  SLEEP ==> WAIT_HW,  set ELP reg to wake-up */
-        if (eEvent == SM_EVENT_START)
-        {
-            pTwIf->eState = SM_STATE_WAIT_HW;
-            twIf_WriteElpReg (pTwIf, ELP_CTRL_REG_AWAKE);
-        }
-        /* HW_AVAILABLE event:  SLEEP ==> AWAKE,  set ELP reg to wake-up and run TxnQ */
-        else if (eEvent == SM_EVENT_HW_AVAILABLE)
-        {
-            pTwIf->eState = SM_STATE_AWAKE;
-            twIf_WriteElpReg (pTwIf, ELP_CTRL_REG_AWAKE);
-            txnQ_Run (pTwIf->hTxnQ, TXN_FUNC_ID_WLAN);
-        }
-        break;
-    case SM_STATE_WAIT_HW:
-        /* HW_AVAILABLE event:  WAIT_HW ==> AWAKE,  run TxnQ */
-        if (eEvent == SM_EVENT_HW_AVAILABLE)
-        {
-            pTwIf->eState = SM_STATE_AWAKE;
-            txnQ_Run (pTwIf->hTxnQ, TXN_FUNC_ID_WLAN);
-        }
-        break;
-    }
-
-	TRACE3(pTwIf->hReport, REPORT_SEVERITY_INFORMATION, "twIf_HandleSmEvent: <currentState = %d, event = %d> --> nextState = %d\n", eState, eEvent, pTwIf->eState);
-}
-
-
-/** 
- * \fn     twIf_TxnDoneCb
- * \brief  Transaction completion CB
- * 
- * This callback is called by the TxnQ upon transaction completion, unless is was completed in
- *     the original context where it was issued.
- * It may be called from bus driver external context (TxnDone ISR) or from WLAN driver context.
- *  
- * \note   
- * \param  hTwIf - The module's object
- * \param  pTxn  - The completed transaction object 
- * \return void
- * \sa     twIf_HandleTxnDone
- */ 
-static void twIf_TxnDoneCb (TI_HANDLE hTwIf, TTxnStruct *pTxn)
-{
-    TTwIfObj *pTwIf = (TTwIfObj*)hTwIf;
-
-#ifdef TI_DBG
-    pTwIf->uDbgCountTxnDoneCb++;
-    TRACE6(pTwIf->hReport, REPORT_SEVERITY_INFORMATION, "twIf_TxnDoneCb: Params=0x%x, HwAddr=0x%x, Len0=%d, Len1=%d, Len2=%d, Len3=%d\n", pTxn->uTxnParams, pTxn->uHwAddr, pTxn->aLen[0], pTxn->aLen[1], pTxn->aLen[2], pTxn->aLen[3]);
-#endif
-
-    /* In case of recovery flag, Call directly restart callback */
-    if (TXN_PARAM_GET_STATUS(pTxn) == TXN_PARAM_STATUS_RECOVERY)
-    {
-        if (pTwIf->fRecoveryCb)
-        {
-            TRACE0(pTwIf->hReport, REPORT_SEVERITY_INFORMATION, "twIf_TxnDoneCb: During Recovery\n");
-            pTwIf->bTxnDoneInRecovery = TI_TRUE;
-            /* Request schedule to continue handling in driver context (will call twIf_HandleTxnDone()) */
-            context_RequestSchedule (pTwIf->hContext, pTwIf->uContextId);
-            return;
-        }
-    }
-
-    /* If the completed Txn is ELP, nothing to do (not counted) so exit */
-    if (TXN_PARAM_GET_SINGLE_STEP(pTxn)) 
-    {
-        return;
-    }
-
-    if (pTxn->fTxnDoneCb)
-    {
-        TI_STATUS eStatus;
-
-        /* In critical section, enqueue the completed transaction in the TxnDoneQ. */
-        context_EnterCriticalSection (pTwIf->hContext);
-        eStatus = que_Enqueue (pTwIf->hTxnDoneQueue, (TI_HANDLE)pTxn);
-        if (eStatus != TI_OK)
-        {
-            TRACE3(pTwIf->hReport, REPORT_SEVERITY_ERROR, "twIf_TxnDoneCb(): Enqueue failed, pTxn=0x%x, HwAddr=0x%x, Len0=%d\n", pTxn, pTxn->uHwAddr, pTxn->aLen[0]);
-        }
-        context_LeaveCriticalSection (pTwIf->hContext);
-    }
-    else
-    {
-        context_EnterCriticalSection (pTwIf->hContext);
-         /* Decrement pending Txn counter, It's value will be checked in twIf_HandleTxnDone() */
-        if (pTwIf->uPendingTxnCount > 0) /* in case of callback on recovery after restart */
-        {
-            pTwIf->uPendingTxnCount--;
-        }
-        context_LeaveCriticalSection (pTwIf->hContext);
-
-    }
-    
-    /* Request schedule to continue handling in driver context (will call twIf_HandleTxnDone()) */
-    context_RequestSchedule (pTwIf->hContext, pTwIf->uContextId);
-}
-
-/** 
- * \fn     twIf_HandleTxnDone
- * \brief  Completed transactions handler
- * 
- * The completed transactions handler, called upon TxnDone event, either from the context engine
- *     or directly from twIf_TxnDoneCb() if we are already in the WLAN driver's context.
- * Dequeue all completed transactions in critical section, and call their callbacks if available.
- * If awake is not required and no pending transactions in TxnQ, issue Sleep event to SM.
- *  
- * \note   
- * \param  hTwIf - The module's object
- * \return void
- * \sa     
- */ 
-static void twIf_HandleTxnDone (TI_HANDLE hTwIf)
-{
-    TTwIfObj   *pTwIf = (TTwIfObj*)hTwIf;
-    TTxnStruct *pTxn;
-
-    /* In case of recovery, call the recovery callback and exit */
-    if (pTwIf->bTxnDoneInRecovery)
-    {
-        TRACE0(pTwIf->hReport, REPORT_SEVERITY_INFORMATION, "twIf_HandleTxnDone: call RecoveryCb\n");
-        pTwIf->bTxnDoneInRecovery = TI_FALSE;
-        if (pTwIf->bPendRestartTimerRunning) 
-        {
-            tmr_StopTimer (pTwIf->hPendRestartTimer);
-            pTwIf->bPendRestartTimerRunning = TI_FALSE;
-        }
-        pTwIf->fRecoveryCb(pTwIf->hRecoveryCb);
-        return;
-    }
-
-    /* Loop while there are completed transactions to handle */
-    while (1) 
-    {
-        /* In critical section, dequeue completed transaction from the TxnDoneQ. */
-        context_EnterCriticalSection (pTwIf->hContext);
-        pTxn = (TTxnStruct *) que_Dequeue (pTwIf->hTxnDoneQueue);
-        context_LeaveCriticalSection (pTwIf->hContext);
-
-        /* If no more transactions to handle, exit */
-        if (pTxn != NULL)
-        {
-            context_EnterCriticalSection (pTwIf->hContext);
-            /* Decrement pending Txn counter */ 
-            if (pTwIf->uPendingTxnCount > 0) /* in case of callback on recovery after restart */
-            {   
-                pTwIf->uPendingTxnCount--;
-            }
-            context_LeaveCriticalSection (pTwIf->hContext);
-
-            TRACE4(pTwIf->hReport, REPORT_SEVERITY_INFORMATION, "twIf_HandleTxnDone: Completed-Txn: Params=0x%x, HwAddr=0x%x, Len0=%d, fTxnDoneCb=0x%x\n", pTxn->uTxnParams, pTxn->uHwAddr, pTxn->aLen[0], pTxn->fTxnDoneCb);
-    
-            /* If Txn failed and error CB available, call it to initiate recovery */
-            if (TXN_PARAM_GET_STATUS(pTxn) == TXN_PARAM_STATUS_ERROR)
-            {
-                TRACE6(pTwIf->hReport, REPORT_SEVERITY_ERROR, "twIf_HandleTxnDone: Txn failed!!  Params=0x%x, HwAddr=0x%x, Len0=%d, Len1=%d, Len2=%d, Len3=%d\n", pTxn->uTxnParams, pTxn->uHwAddr, pTxn->aLen[0], pTxn->aLen[1], pTxn->aLen[2], pTxn->aLen[3]);
-    
-                if (pTwIf->fErrCb)
-                {
-                    pTwIf->fErrCb (pTwIf->hErrCb, BUS_FAILURE);
-                }
-                /* in error do not continue */
-		return;
-            }
-    
-            /* If Txn specific CB available, call it (may free Txn resources and issue new Txns) */
-            if (pTxn->fTxnDoneCb != NULL)
-            {
-                ((TTxnDoneCb)(pTxn->fTxnDoneCb)) (pTxn->hCbHandle, pTxn);
-            } 
-        }
-
-        /*If uPendingTxnCount == 0 and awake not required, issue Sleep event to SM */
-        if ((pTwIf->uAwakeReqCount == 0) && (pTwIf->uPendingTxnCount == 0))
-        {
-            twIf_HandleSmEvent (pTwIf, SM_EVENT_SLEEP);
-        }
-
-        if (pTxn == NULL)
-        {
-            return;
-        }
-    }
-} 
-
-/** 
- * \fn     twIf_ClearTxnDoneQueue
- * \brief  Clean the DoneQueue
- * 
- * Clear the specified done queue - don't call the callbacks.
- *  
- * \note   
- * \param  hTwIf - The module's object
- * \return void
- * \sa     
- */ 
-static void twIf_ClearTxnDoneQueue (TI_HANDLE hTwIf)
-{
-    TTwIfObj   *pTwIf = (TTwIfObj*)hTwIf;
-    TTxnStruct *pTxn;
-
-    /* Loop while there are completed transactions to handle */
-    while (1) 
-    {
-        /* In critical section, dequeue completed transaction from the TxnDoneQ. */
-        context_EnterCriticalSection (pTwIf->hContext);
-        pTxn = (TTxnStruct *) que_Dequeue (pTwIf->hTxnDoneQueue);
-        context_LeaveCriticalSection (pTwIf->hContext);
-
-        /* If no more transactions to handle, exit */
-        if (pTxn != NULL)
-        {
-            /* Decrement pending Txn counter */ 
-            if (pTwIf->uPendingTxnCount > 0) /* in case of callback on recovery after restart */
-            {   
-                pTwIf->uPendingTxnCount--;
-            }
-            
-            /* 
-             * Drop on Recovery 
-             * do not call pTxn->fTxnDoneCb (pTxn->hCbHandle, pTxn) callback 
-             */
-        }
-
-        if (pTxn == NULL)
-        {
-            return;
-        }
-    }
-}
-
-
-/** 
- * \fn     twIf_PendRestratTimeout
- * \brief  Pending restart process timeout handler
- * 
- * Called if timer expires upon fail to complete the last bus transaction that was 
- *   pending during restart process.
- * Calls the recovery callback to continue the restart process.
- *  
- * \note   
- * \param  hTwIf - The module's object
- * \return void
- * \sa     
- */ 
-static void twIf_PendRestratTimeout (TI_HANDLE hTwIf, TI_BOOL bTwdInitOccured)
-{
-    TTwIfObj *pTwIf = (TTwIfObj*)hTwIf;
-
-    TRACE0(pTwIf->hReport, REPORT_SEVERITY_ERROR, "twIf_PendRestratTimeout: restart timer expired!\n");
-
-    pTwIf->bPendRestartTimerRunning = TI_FALSE;
-
-    /* Clear the Txn queues since TxnDone wasn't called so it wasn't done by the TxnQ module */
-    txnQ_ClearQueues (pTwIf->hTxnQ, TXN_FUNC_ID_WLAN);
-
-    /* Call the recovery callback to continue the restart process */
-    pTwIf->fRecoveryCb(pTwIf->hRecoveryCb);
-}
-
-
-TI_BOOL	twIf_isValidMemoryAddr(TI_HANDLE hTwIf, TI_UINT32 Address, TI_UINT32 Length)
-{
-    TTwIfObj   *pTwIf = (TTwIfObj*)hTwIf;
-
-	if ((Address >= pTwIf->uMemAddr1) &&
-			(Address + Length < pTwIf->uMemAddr1 + pTwIf->uMemSize1 ))
-	return TI_TRUE;
-
-	return TI_FALSE;
-}
-
-TI_BOOL	twIf_isValidRegAddr(TI_HANDLE hTwIf, TI_UINT32 Address, TI_UINT32 Length)
-{
-    TTwIfObj   *pTwIf = (TTwIfObj*)hTwIf;
-
-	if ((Address >= pTwIf->uMemAddr2 ) &&
-		( Address < pTwIf->uMemAddr2 + pTwIf->uMemSize2 ))
-	return TI_TRUE;
-
-	return TI_FALSE;
-}
-
-/*******************************************************************************
-*                       DEBUG  FUNCTIONS  IMPLEMENTATION					   *
-********************************************************************************/
-
-#ifdef TI_DBG
-
-/** 
- * \fn     twIf_PrintModuleInfo
- * \brief  Print module's parameters (debug)
- * 
- * This function prints the module's parameters.
- * 
- * \note   
- * \param  hTwIf - The module's object                                          
- * \return void 
- * \sa     
- */ 
-void twIf_PrintModuleInfo (TI_HANDLE hTwIf) 
-{
-#ifdef REPORT_LOG
-	TTwIfObj *pTwIf = (TTwIfObj*)hTwIf;
-	
-	WLAN_OS_REPORT(("-------------- TwIf Module Info-- ------------------------\n"));
-	WLAN_OS_REPORT(("==========================================================\n"));
-	WLAN_OS_REPORT(("eSmState             = %d\n",   pTwIf->eState					));
-	WLAN_OS_REPORT(("uContextId           = %d\n",   pTwIf->uContextId              ));
-	WLAN_OS_REPORT(("fErrCb               = %d\n",   pTwIf->fErrCb                  ));
-	WLAN_OS_REPORT(("hErrCb               = %d\n",   pTwIf->hErrCb                  ));
-	WLAN_OS_REPORT(("uAwakeReqCount       = %d\n",   pTwIf->uAwakeReqCount          ));
-	WLAN_OS_REPORT(("uPendingTxnCount     = %d\n",   pTwIf->uPendingTxnCount        ));
-	WLAN_OS_REPORT(("uMemAddr             = 0x%x\n", pTwIf->uMemAddr1               ));
-	WLAN_OS_REPORT(("uMemSize             = 0x%x\n", pTwIf->uMemSize1               ));
-	WLAN_OS_REPORT(("uRegAddr             = 0x%x\n", pTwIf->uMemAddr2               ));
-	WLAN_OS_REPORT(("uRegSize             = 0x%x\n", pTwIf->uMemSize2               ));
-	WLAN_OS_REPORT(("uDbgCountAwake       = %d\n",   pTwIf->uDbgCountAwake          ));
-	WLAN_OS_REPORT(("uDbgCountSleep       = %d\n",   pTwIf->uDbgCountSleep          ));
-	WLAN_OS_REPORT(("uDbgCountTxn         = %d\n",   pTwIf->uDbgCountTxn            ));
-	WLAN_OS_REPORT(("uDbgCountTxnPending  = %d\n",   pTwIf->uDbgCountTxnPending     ));
-	WLAN_OS_REPORT(("uDbgCountTxnComplete = %d\n",   pTwIf->uDbgCountTxnComplete    ));
-	WLAN_OS_REPORT(("uDbgCountTxnDone     = %d\n",   pTwIf->uDbgCountTxnDoneCb      ));
-	WLAN_OS_REPORT(("==========================================================\n\n"));
-#endif
-} 
-
-
-void twIf_PrintQueues (TI_HANDLE hTwIf)
-{
-    TTwIfObj *pTwIf = (TTwIfObj*)hTwIf;
-
-    txnQ_PrintQueues(pTwIf->hTxnQ);
-}
-
-#endif /* TI_DBG */
diff --git a/wl1271/TWD/TwIf/TwIf.h b/wl1271/TWD/TwIf/TwIf.h
deleted file mode 100644
index b0451cf..0000000
--- a/wl1271/TWD/TwIf/TwIf.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * TwIf.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-/** \file   TwIf.h 
- *  \brief  TwIf module API definition                                  
- *
- *  \see    TwIf.c
- */
-
-#ifndef __TWIF_API_H__
-#define __TWIF_API_H__
-
-
-#include "Device.h"
-#include "TxnDefs.h"
-#include "BusDrv.h"
-
-
-/************************************************************************
- * Defines
- ************************************************************************/
-
-
-/************************************************************************
- * Macros
- ************************************************************************/
-/* 
- * Defines a TNETWIF read/write field with padding.
- * A low level driver may use this padding internally
- */
-#define PADDING(field) \
-    TI_UINT8 padding [TNETWIF_READ_OFFSET_BYTES];  \
-    field;
-
-
-/************************************************************************
- * Types
- ************************************************************************/
-
-typedef void (*TTwIfCallback)(TI_HANDLE hCb);
-typedef void (*TRecoveryCb)(TI_HANDLE hCb);
-
-
-
-/************************************************************************
- * Functions
- ************************************************************************/
-TI_HANDLE   twIf_Create (TI_HANDLE hOs);
-TI_STATUS   twIf_Destroy (TI_HANDLE hTwIf);
-void        twIf_Init (TI_HANDLE hTwIf, 
-                       TI_HANDLE hReport, 
-                       TI_HANDLE hContext, 
-                       TI_HANDLE hTimer, 
-                       TI_HANDLE hTxnQ, 
-                       TRecoveryCb fRecoveryCb, 
-                       TI_HANDLE hRecoveryCb);
-void        twIf_RegisterErrCb (TI_HANDLE hTwIf, void *fErrCb, TI_HANDLE hErrCb);
-ETxnStatus  twIf_Restart (TI_HANDLE hTwIf);
-void        twIf_SetPartition (TI_HANDLE hTwIf,
-                               TPartition *pPartition);
-void        twIf_Awake (TI_HANDLE hTwIf);
-void        twIf_Sleep (TI_HANDLE hTwIf);
-void        twIf_HwAvailable (TI_HANDLE hTwIf);
-ETxnStatus  twIf_Transact (TI_HANDLE hTwIf, TTxnStruct *pTxn);
-ETxnStatus  twIf_TransactReadFWStatus (TI_HANDLE hTwIf, TTxnStruct *pTxn);
-
-TI_BOOL		twIf_isValidMemoryAddr(TI_HANDLE hTwIf, TI_UINT32 Address, TI_UINT32 Length);
-TI_BOOL		twIf_isValidRegAddr(TI_HANDLE hTwIf, TI_UINT32 Address, TI_UINT32 Length);
-
-#ifdef TI_DBG
-    void        twIf_PrintModuleInfo (TI_HANDLE hTwIf);
-    void        twIf_PrintQueues (TI_HANDLE hTwIf);
-#endif /* TI_DBG */
-
-
-
-
-#endif /*__TWIF_API_H__*/
diff --git a/wl1271/Test/HealthMonitorDbg.c b/wl1271/Test/HealthMonitorDbg.c
deleted file mode 100644
index 54c5ab5..0000000
--- a/wl1271/Test/HealthMonitorDbg.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * HealthMonitorDbg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file HealthMonitorDbg.c
- *  \brief This file include the HealthMonitordebug module implementation
- *  \
- *  \date 2-Apr-2006
- */
-
-#include "tidef.h"
-#include "MacServices.h"
-#include "ScanCncn.h"
-#include "scanCncnDbg.h"
-#include "healthMonitor.h"
-#include "ScanSrv.h"
-#include "ScanSrvSM.h"
-#include "TWDriver.h"
-#include "conn.h"
-#include "PowerSrv.h"
-#include "PowerSrvSM.h"
-#include "MacServices_api.h"
-#include "HealthMonitorDbg.h"
-#include "report.h"
-#include "timer.h"
-#include "DrvMain.h"
-#include "DrvMainModules.h"
-
-
-static void noScanCompleteTimer (TI_HANDLE hTWD);
-
-
-/** \file HealthMonitorDbg.c
- *  \
- *  \date 2-Apr-2006
- * \brief Main Recovery debug function
- *
- * Function Scope \e Public.\n
- * \param pStadHandles - modules handles list.\n
- * \param funcType       - the specific debug function.\n
- * \param pParam         - parameters for the debug function.\n
- */
-void healthMonitorDebugFunction (TStadHandlesList *pStadHandles, TI_UINT32 funcType, void *pParam)
-{
-    TI_HANDLE       hHealthMonitor  = pStadHandles->hHealthMonitor;
-    TI_HANDLE       hTWD            = pStadHandles->hTWD;
-    MacServices_t  *pMacServices    = ((TTwd *)hTWD)->hMacServices;
-    TI_HANDLE       hMeasurementSRV = pMacServices->hMeasurementSRV;
-    scanSRV_t      *pScanSRV        = (scanSRV_t *)pMacServices->hScanSRV; 
-    PowerSrvSM_t   *pPowerSrvSM     = (PowerSrvSM_t*)((powerSrv_t*)pMacServices->hPowerSrv)->hPowerSrvSM;
-
-    switch (funcType)
-    {
-    case DBG_HM_PRINT_HELP:
-        printHealthMonitorDbgFunctions();
-        break;
-
-    case DBG_HM_RECOVERY_NO_SCAN_COMPLETE: 
-        /* check if the no scan complete timer is running. if so - we can stop the timer and trigger recovery */
-        if (pScanSRV->bTimerRunning)
-        {
-            /* perform the recovery directly */
-            noScanCompleteTimer (hTWD);
-        }
-        else /* scan Srv is probably entering/exiting PowerSave. We won't handle this case since it happens rarely */
-        {
-            WLAN_OS_REPORT(("Scan isn't running at the moment, so try again (make sure it is enabled)\n"));
-        }
-        break;
-        
-    case DBG_HM_RECOVERY_MBOX_FAILURE:  
-        TWD_CheckMailboxCb (hTWD, TI_NOK, NULL);
-        break;
-
-    case DBG_HM_RECOVERY_HW_AWAKE_FAILURE:
-        healthMonitor_sendFailureEvent (hHealthMonitor, HW_AWAKE_FAILURE);
-        break;
-
-    case DBG_HM_RECOVERY_TX_STUCK:  
-        healthMonitor_sendFailureEvent (hHealthMonitor, TX_STUCK);
-        break;
-    
-    case DBG_HM_DISCONNECT_TIMEOUT:  
-        healthMonitor_sendFailureEvent (hHealthMonitor, DISCONNECT_TIMEOUT);
-        break;
-
-    case DBG_HM_RECOVERY_POWER_SAVE_FAILURE:  
-        tmr_StopTimer (pPowerSrvSM->hPwrSrvSmTimer);  /* stop the PS guard timer */
-        healthMonitor_sendFailureEvent (hHealthMonitor, POWER_SAVE_FAILURE);
-        break;
-
-    case DBG_HM_RECOVERY_MEASUREMENT_FAILURE:  
-        MacServices_measurementSRV_startStopTimerExpired (hMeasurementSRV, TI_FALSE);
-        break;
-
-    case DBG_HM_RECOVERY_BUS_FAILURE:  
-        healthMonitor_sendFailureEvent (hHealthMonitor, BUS_FAILURE);
-        break;
-
-    case DBG_HM_RECOVERY_FROM_CLI:
-        drvMain_Recovery (pStadHandles->hDrvMain);
-        break;
-
-	case DBG_HM_RECOVERY_FROM_HW_WD_EXPIRE:
-        healthMonitor_sendFailureEvent (hHealthMonitor, HW_WD_EXPIRE);
-        break;
-
-	case DBG_HM_RECOVERY_RX_XFER_FAILURE:
-        healthMonitor_sendFailureEvent (hHealthMonitor, RX_XFER_FAILURE);
-        break;
-
-    default:
-        WLAN_OS_REPORT(("Invalid function type in health monitor debug function: %d\n", funcType));
-        break;
-    }
-}
-
-
-/** \file HealthMonitorDbg.c
- *  \
- *  \date 2-Apr-2006
- * \brief Prints Recovery debug menu
- *
- * Function Scope \e Public.\n
- */
-void printHealthMonitorDbgFunctions(void)
-{
-    WLAN_OS_REPORT(("   HealthMonitor Debug Functions       \n"));
-    WLAN_OS_REPORT(("---------------------------------------\n"));
-    WLAN_OS_REPORT(("2000 - Print HealthMonitor Debug Help  \n"));
-    WLAN_OS_REPORT(("2001 - Trigger NO_SCAN_COMPLETE        \n"));
-    WLAN_OS_REPORT(("2002 - Trigger MBOX_FAILURE            \n"));
-    WLAN_OS_REPORT(("2003 - Trigger HW_AWAKE_FAILURE        \n"));
-    WLAN_OS_REPORT(("2004 - Trigger TX_STUCK                \n"));
-    WLAN_OS_REPORT(("2005 - Trigger DISCONNECT_TIMEOUT      \n"));
-    WLAN_OS_REPORT(("2006 - Trigger POWER_SAVE_FAILURE      \n"));
-    WLAN_OS_REPORT(("2007 - Trigger MEASUREMENT_FAILURE     \n"));
-    WLAN_OS_REPORT(("2008 - Trigger BUS_FAILURE             \n"));
-    WLAN_OS_REPORT(("2009 - Start RECOVERY_FROM_CLI         \n"));
-    WLAN_OS_REPORT(("2010 - Trigger HW_WD_EXPIRE            \n"));
-    WLAN_OS_REPORT(("2011 - Trigger RX_XFER_FAILURE         \n"));
-}
-
-static void noScanCompleteTimer (TI_HANDLE hTWD)
-{
-    MacServices_t *pMacServices = ((TTwd *)hTWD)->hMacServices;
-    scanSRV_t     *pScanSRV     = (scanSRV_t *)pMacServices->hScanSRV; 
-    
-
-    /* stop the no scan complete timer in the scan SRV */
-    tmr_StopTimer (pScanSRV->hScanSrvTimer);
-    pScanSRV->bTimerRunning = TI_FALSE;
-
-    /* simulate the timer expiry */
-    MacServices_scanSRV_scanTimerExpired ((TI_HANDLE)pScanSRV, TI_FALSE);
-}
diff --git a/wl1271/Test/HealthMonitorDbg.h b/wl1271/Test/HealthMonitorDbg.h
deleted file mode 100644
index c127b4a..0000000
--- a/wl1271/Test/HealthMonitorDbg.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * HealthMonitorDbg.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file SoftGeminiDbg.h
- *  \brief This file include private definitions for the soft Gemini debug module.
- *  \
- *  \date 30-Dec-2004
- */
-
-#ifndef __HEALTH_MONITOR_DBG_H__
-#define __HEALTH_MONITOR_DBG_H__
-
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-
-/* debug functions */
-#define DBG_HM_PRINT_HELP					  0 	
-#define DBG_HM_RECOVERY_NO_SCAN_COMPLETE	  1   
-#define DBG_HM_RECOVERY_MBOX_FAILURE		  2   
-#define DBG_HM_RECOVERY_HW_AWAKE_FAILURE	  3   
-#define DBG_HM_RECOVERY_TX_STUCK			  4   
-#define DBG_HM_DISCONNECT_TIMEOUT			  5   
-#define DBG_HM_RECOVERY_POWER_SAVE_FAILURE	  6   
-#define DBG_HM_RECOVERY_MEASUREMENT_FAILURE	  7   
-#define DBG_HM_RECOVERY_BUS_FAILURE	          8   
-#define DBG_HM_RECOVERY_FROM_CLI              9
-#define DBG_HM_RECOVERY_FROM_HW_WD_EXPIRE     10
-#define DBG_HM_RECOVERY_RX_XFER_FAILURE       11
-                                               
-/*                                            
- ***********************************************************************
- *	Enums.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Structure definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-
-/**
- * \\n
- * \date 14-Feb-2005\n
- * \brief Main soft Geminirdebug function
- *
- * Function Scope \e Public.\n
- * \param pStadHandles - modules handles list.\n
- * \param funcType - the specific debug function.\n
- * \param pParam - parameters for the debug function.\n
- */
-void healthMonitorDebugFunction (TStadHandlesList *pStadHandles, TI_UINT32 funcType, void *pParam);
-
-/**
- * \\n
- * \date 14-Feb-2005\n
- * \brief Prints scan concentrator debug menu
- *
- * Function Scope \e Public.\n
- */
-void printHealthMonitorDbgFunctions(void);
-
-
-
-#endif /* __HEALTH_MONITOR_DBG_H__ */
diff --git a/wl1271/Test/MibDbg.c b/wl1271/Test/MibDbg.c
deleted file mode 100644
index ffe48b6..0000000
--- a/wl1271/Test/MibDbg.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * MibDbg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   MibDbg.c                                                 */
-/*    PURPOSE:  MIB debug implementation                                    */
-/*                                                                         */
-/***************************************************************************/
-
-#include "MibDbg.h"
-#include "TWDriver.h"
-#include "report.h"
-#include "osApi.h"
-
-/*
- ***********************************************************************
- *	Internal functions definitions
- ***********************************************************************
- */
-
-static void mibDbgGetArpIpTable(TI_HANDLE hTWD)
-{
-	TI_STATUS status = TI_OK;
-    TMib mib;
-    TI_INT32 i;
-
-	/* init */
-	mib.aMib = MIB_arpIpAddressesTable;
-	mib.aData.ArpIpAddressesTable.FilteringEnable = 0;
-	for ( i = 0 ; i < IP_V4_ADDR_LEN ; i++ )
-	{
-		mib.aData.ArpIpAddressesTable.addr[i] = 0;
-	}
-
-	status = TWD_ReadMib(hTWD,NULL,NULL,(void*)&mib);
-	if (status != TI_OK)
-	{
-		WLAN_OS_REPORT(("Get ARP Table failed\n"));
-		return;
-	}
-
-	/* print ARP Table */
-    WLAN_OS_REPORT(("ARP IP Table:\n"));
-    WLAN_OS_REPORT(("FilteringEnable: %s (%d)\n", 
-				   (mib.aData.ArpIpAddressesTable.FilteringEnable)?"Enable":"Disable",
-				   mib.aData.ArpIpAddressesTable.FilteringEnable));
-    WLAN_OS_REPORT(("ArpIpAddress: %d.%d.%d.%d\n", 
-					mib.aData.ArpIpAddressesTable.addr[0],
-					mib.aData.ArpIpAddressesTable.addr[1],
-					mib.aData.ArpIpAddressesTable.addr[2],
-					mib.aData.ArpIpAddressesTable.addr[3]));
-}
-
-static void mibDbgGetGroupAddressTable(TI_HANDLE hTWD)
-{
-	TI_STATUS status = TI_OK;
-    TMib mib;
-    TI_INT32 i,j;
-
-	/* init */
-	mib.aMib 										= MIB_dot11GroupAddressesTable;
-	mib.aData.GroupAddressTable.bFilteringEnable 	= 0;
-	mib.aData.GroupAddressTable.nNumberOfAddresses 	= 0;
-    for ( i = 0 ; i < MIB_MAX_MULTICAST_GROUP_ADDRS ; i++ )
-	{
-		for ( j = 0 ; j < MAC_ADDR_LEN ; j++ )
-		{
-			mib.aData.GroupAddressTable.aGroupTable[i][j]	= 0;
-		}
-	}
-
-	status = TWD_ReadMib(hTWD,NULL,NULL,(void*)&mib);
-	if (status != TI_OK)
-	{
-		WLAN_OS_REPORT(("Get Group Address Table failed\n"));
-		return;
-	}
-
-	/* print Group Address Table */
-    WLAN_OS_REPORT(("Group addresses Table:\n"));
-    WLAN_OS_REPORT(("FilteringEnable: %s (%d)\n", 
-				   (mib.aData.GroupAddressTable.bFilteringEnable)?"Enable":"Disable",
-				   mib.aData.GroupAddressTable.bFilteringEnable));
-    WLAN_OS_REPORT(("nNumberOfAddresses: %d\n", 
-				   mib.aData.GroupAddressTable.nNumberOfAddresses));
-
-    WLAN_OS_REPORT(("Group addresses: \n"));
-    for ( i = 0 ; i < MIB_MAX_MULTICAST_GROUP_ADDRS ; i++ )
-		WLAN_OS_REPORT(("%x:%x:%x:%x:%x:%x\n",     
-						mib.aData.GroupAddressTable.aGroupTable[i][0],
-						mib.aData.GroupAddressTable.aGroupTable[i][1],
-						mib.aData.GroupAddressTable.aGroupTable[i][2],
-						mib.aData.GroupAddressTable.aGroupTable[i][3],
-						mib.aData.GroupAddressTable.aGroupTable[i][4],
-						mib.aData.GroupAddressTable.aGroupTable[i][5]));
-}
-
-static void mibDbgGetCounterTable(TI_HANDLE hTWD)
-{
-	TI_STATUS status = TI_OK;
-    TMib mib;
-
-	/* init */
-	mib.aMib 								= MIB_countersTable;
-	mib.aData.CounterTable.FCSErrorCount	= 0;
-	mib.aData.CounterTable.PLCPErrorCount	= 0;
-	mib.aData.CounterTable.SeqNumMissCount	= 0;
-
-	status = TWD_ReadMib(hTWD,NULL,NULL,(void*)&mib);
-	if (status != TI_OK)
-	{
-		WLAN_OS_REPORT(("Get Counter Table failed\n"));
-		return;
-	}
-
-	/* print Counter Table */
-    WLAN_OS_REPORT(("FCS error count= %d \nPLCP  error count = %d \nSeq error count= %d\n",     
-					mib.aData.CounterTable.FCSErrorCount,
-					mib.aData.CounterTable.PLCPErrorCount,
-					mib.aData.CounterTable.SeqNumMissCount));
-
-}
-
-static void mibDbgModifyCtsToSelf(TI_HANDLE hTWD, void* pParam)
-{
-	TI_STATUS status = TI_OK;
-    TMib mib;
-
-	if (pParam == NULL) 
-	{
-		WLAN_OS_REPORT(("Modify CTS To Self failed: No Parameter received\n"));
-		return;
-	}
-
-	/* init */
-	mib.aMib					= MIB_ctsToSelf;
-	mib.aData.CTSToSelfEnable 	= 0;
-	mib.aData.CTSToSelfEnable 	= *(TI_UINT32*)pParam;
-
-	status = TWD_WriteMib(hTWD, &mib);
-	if (status != TI_OK)
-	{
-		WLAN_OS_REPORT(("Modify CTS To Self failed\n"));
-		return;
-	}
-	WLAN_OS_REPORT(("Modify CTS To Self OK\n"));
-
-	WLAN_OS_REPORT(("CtsToSelf = %s (%d)\n",
-				   mib.aData.CTSToSelfEnable?"Enable":"Disable",
-				   mib.aData.CTSToSelfEnable));
-	WLAN_OS_REPORT(("CTS to self: [0 - Disable, 1 - Enable]\n"));
-}
-
-static void mibDbgGetCtsToSelf(TI_HANDLE hTWD)
-{
-	TI_STATUS status = TI_OK;
-    TMib mib;
-
-	/* init */
-	mib.aMib					= MIB_ctsToSelf;
-	mib.aData.CTSToSelfEnable 	= 0;
-
-	status = TWD_ReadMib(hTWD,NULL,NULL,(void*)&mib);
-	if (status != TI_OK)
-	{
-		WLAN_OS_REPORT(("Get CTS To Self failed\n"));
-		return;
-	}
-
-	WLAN_OS_REPORT(("CtsToSelf = %s (%d)\n",
-				   mib.aData.CTSToSelfEnable?"Enable":"Disable",
-				   mib.aData.CTSToSelfEnable));
-	WLAN_OS_REPORT(("CTS to self: [0 - Disable, 1 - Enable]\n"));
-}
-
-static void mibDbgSetMaxRxLifetime(TI_HANDLE hTWD, void* pParam)
-{
-	TI_STATUS status = TI_OK;
-    TMib mib;
-
-	if (pParam == NULL) 
-	{
-		WLAN_OS_REPORT(("Set Maximum Rx Life Time failed: No Parameter received\n"));
-		return;
-	}
-
-	/* init */
-	mib.aMib 						= MIB_dot11MaxReceiveLifetime;
-	mib.aData.MaxReceiveLifeTime 	= *(TI_UINT32*)pParam;
-
-	status = TWD_WriteMib(hTWD, &mib);
-	if (status != TI_OK)
-	{
-		WLAN_OS_REPORT(("Set Maximum Rx Life Time failed\n"));
-		return;
-	}
-}
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-void mibDbgPrintFunctions(void)
-{
-	WLAN_OS_REPORT(("\n          MIB Dbg Functions   \n"));
-	WLAN_OS_REPORT(("--------------------------------------\n"));
-
-	WLAN_OS_REPORT(("2101 - Print ARP Table\n"));
-	WLAN_OS_REPORT(("2102 - Print Group Address Table\n"));
-	WLAN_OS_REPORT(("2103 - Print Counter Table\n"));
-	WLAN_OS_REPORT(("2104 - Print Modify CTS to Self\n"));
-	WLAN_OS_REPORT(("2105 - Print Max RX Life Time\n"));
-}
-
-void MibDebugFunction(TI_HANDLE hTWD ,TI_UINT32 funcType, void* pParam)
-{
-	if (hTWD == NULL) 
-	{
-		return;
-	}
-
-	switch (funcType)
-	{
-	case DBG_MIB_PRINT_HELP:
-		mibDbgPrintFunctions();
-		break;
-	case DBG_MIB_GET_ARP_TABLE:
-		mibDbgGetArpIpTable(hTWD);
-		break;
-	case DBG_MIB_GET_GROUP_ADDRESS_TABLE:
-		mibDbgGetGroupAddressTable(hTWD);
-		break;
-	case DBG_MIB_GET_COUNTER_TABLE:
-		mibDbgGetCounterTable(hTWD);
-		break;
-	case DBG_MIB_MODIFY_CTS_TO_SELF:
-		mibDbgModifyCtsToSelf(hTWD, pParam);
-		break;
-	case DBG_MIB_GET_CTS_TO_SELF:
-		mibDbgGetCtsToSelf(hTWD);
-		break;
-	case DBG_MIB_SET_MAX_RX_LIFE_TIME:
-		mibDbgSetMaxRxLifetime(hTWD, pParam);
-		break;
-	default:
-        WLAN_OS_REPORT(("MIB Debug: Invalid function type in MIB Debug function: %d\n", funcType));
-		break;
-	}
-}
diff --git a/wl1271/Test/MibDbg.h b/wl1271/Test/MibDbg.h
deleted file mode 100644
index 5cc9844..0000000
--- a/wl1271/Test/MibDbg.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * MibDbg.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef __MIB_DBG_H__
-#define __MIB_DBG_H__
-
-#include "osTIType.h"
-#include "tidef.h"
-
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-
-/* debug functions */
-#define DBG_MIB_PRINT_HELP						0
-#define DBG_MIB_GET_ARP_TABLE					1
-#define DBG_MIB_GET_GROUP_ADDRESS_TABLE	   		2
-#define DBG_MIB_GET_COUNTER_TABLE	       		3
-#define DBG_MIB_MODIFY_CTS_TO_SELF 	        	4
-#define DBG_MIB_GET_CTS_TO_SELF 	        	5
-#define DBG_MIB_SET_MAX_RX_LIFE_TIME      		6
-
-
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-void MibDebugFunction(TI_HANDLE hTWD ,TI_UINT32 funcType, void* pParam);
-
-
-#endif	/* #define __MIB_DBG_H__ */
diff --git a/wl1271/Test/PowerMgrDebug.c b/wl1271/Test/PowerMgrDebug.c
deleted file mode 100644
index 028403e..0000000
--- a/wl1271/Test/PowerMgrDebug.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * PowerMgrDebug.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file PowerMgrDebug.c
- *  \brief This is the PowerMgrDebug module implementation.
- *  \
- *  \date 13-Jun-2004
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  PowerMgrDebug                                                      *
- *   PURPOSE: PowerMgrDebug Module implementation.                               *
- *                                                                          *
- ****************************************************************************/
-
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "PowerMgrDebug.h"
-#include "PowerMgr_API.h"
-#include "PowerMgr.h"
-
-
-/*****************************************************************************
- **         Private Function prototypes                                     **
- *****************************************************************************/
-static void PowerMgrDebug_printAllCommands(void);
-
-
-/*****************************************************************************
- **         Public Function prototypes                                      **
- *****************************************************************************/
-void powerMgrDebugFunction(TI_HANDLE thePowerMgrHandle,
-                           TI_UINT32 theDebugFunction,
-                           void* theParameter)
-{
-    switch (theDebugFunction)
-    {
-    case POWER_MGR_DEBUG_PRINT_ALL_COMMANDS:
-        PowerMgrDebug_printAllCommands();
-        break;
-
-    case POWER_MGR_DEBUG_START_PS:
-        PowerMgr_startPS(thePowerMgrHandle);
-        break;
-
-    case POWER_MGR_DEBUG_STOP_PS:
-        PowerMgr_stopPS(thePowerMgrHandle, TI_TRUE);
-        break;
-
-   case POWER_MGR_PRINT_OBJECTS:
-        PowerMgr_printObject(thePowerMgrHandle);
-        break;
-
-    default:
-        WLAN_OS_REPORT(("(%d) - ERROR - Invalid function type in POWER MANAGER DEBUG Function Command: %d\n",
-                        __LINE__,theDebugFunction));
-        break;
-    }
-}
-
-/*****************************************************************************
- **         Private Function prototypes                                     **
- *****************************************************************************/
-static void PowerMgrDebug_printAllCommands(void)
-{
-    WLAN_OS_REPORT(("\n\n"));
-    WLAN_OS_REPORT(("POWER MGR DEBUG module commands:\n"));
-    WLAN_OS_REPORT(("================================\n"));
-    WLAN_OS_REPORT(("syntax         description\n"));
-    WLAN_OS_REPORT(("%d -  POWER_MGR_DEBUG_PRINT_ALL_COMMANDS\n", POWER_MGR_DEBUG_PRINT_ALL_COMMANDS));
-    WLAN_OS_REPORT(("%d -  POWER_MGR_DEBUG_START_PS\n", POWER_MGR_DEBUG_START_PS));
-    WLAN_OS_REPORT(("%d -  POWER_MGR_DEBUG_STOP_PS\n", POWER_MGR_DEBUG_STOP_PS));
-    WLAN_OS_REPORT(("%d -  POWER_MGR_PRINT_OBJECTS\n", POWER_MGR_PRINT_OBJECTS));
-    WLAN_OS_REPORT(("\n\n"));
-}
-
diff --git a/wl1271/Test/PowerMgrDebug.h b/wl1271/Test/PowerMgrDebug.h
deleted file mode 100644
index 527179c..0000000
--- a/wl1271/Test/PowerMgrDebug.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * PowerMgrDebug.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file PowerMgrDebug.h
- *  \brief This is the Power Manager module private (internal).
- *  \
- *  \date 13-Jun-2004
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Power Manager Debug                                                *
- *   PURPOSE: Power Manager Debug Module private                                      *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _POWER_MGR_DEBUG_H_
-#define _POWER_MGR_DEBUG_H_
-
-#include "tidef.h"
-
-/*****************************************************************************
- **         Constants                                                       **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         Enumerations                                                    **
- *****************************************************************************/
-
-enum
-{
-    POWER_MGR_DEBUG_PRINT_ALL_COMMANDS,
-    POWER_MGR_DEBUG_START_PS,
-    POWER_MGR_DEBUG_STOP_PS,
-    POWER_MGR_PRINT_OBJECTS,
-    POWER_MGR_DEBUG_MAX_COMMANDS
-};
-
-/*****************************************************************************
- **         Typedefs                                                        **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         Structures                                                      **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         External data definitions                                       **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         External functions definitions                                  **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         Public Function prototypes                                      **
- *****************************************************************************/
-
-void powerMgrDebugFunction(TI_HANDLE thePowerMgrHandle,
-                           TI_UINT32 theDebugFunction,
-                           void* theParameter);
-
-#endif /*  _POWER_MGR_DEBUG_H_  */
-
diff --git a/wl1271/Test/RxDbg.c b/wl1271/Test/RxDbg.c
deleted file mode 100644
index b1b5c7e..0000000
--- a/wl1271/Test/RxDbg.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * RxDbg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																									*/
-/*		MODULE:																	*/
-/*    PURPOSE:										*/
-/*																									*/
-/***************************************************************************/
diff --git a/wl1271/Test/ScanMngrDbg.c b/wl1271/Test/ScanMngrDbg.c
deleted file mode 100644
index ddf1b13..0000000
--- a/wl1271/Test/ScanMngrDbg.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * ScanMngrDbg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file ScanMngrDbg.c
- *  \brief This file include the scan manager debug module implementation
- *  \
- *  \date 29-March-2005
- */
-
-#include "tidef.h"
-#include "report.h"
-#include "paramOut.h"
-#include "scanMngr.h"
-#include "ScanMngrDbg.h"
-#include "siteMgrApi.h"
-#include "DataCtrl_Api.h"
-
-
-/**
- * \\n
- * \date 29-March-2005\n
- * \brief Main scan manager debug function
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param funcType - the specific debug function.\n
- * \param pParam - parameters for the debug function.\n
- * \param hSiteMgr - handle to th esite manager object.\n
- * \param hCtrlData - handle to the data ctrl object.\n
- */
-void scanMngrDebugFunction( TI_HANDLE hScanMngr, TI_UINT32 funcType, void *pParam, TI_HANDLE hSiteMgr, TI_HANDLE hCtrlData )
-{
-  	switch (funcType)
-	{
-	case DBG_SCAN_MNGR_PRINT_HELP:
-		printScanMngrDbgFunctions();
-		break;
-
-	case DBG_SCAN_MNGR_START_CONT_SCAN:  
-		startContScan( hScanMngr, hSiteMgr, hCtrlData );
-		break;
-		
-	case DBG_SCAN_MNGR_STOP_CONT_SCAN:  
-		scanMngr_stopContScan( hScanMngr );
-		break;
-
-    case DBG_SCAN_MNGR_START_IMMED_SCAN:
-        scanMngr_startImmediateScan( hScanMngr, (1 == *((TI_INT32*)pParam) ? TI_TRUE : TI_FALSE) );
-        break;
-
-    case DBG_SCAN_MNGR_STOP_IMMED_SCAN:
-        scanMngr_stopImmediateScan( hScanMngr );
-        break;
-
-    case DBG_SCAN_MNGR_PRINT_TRACK_LIST:
-        scanMngrDebugPrintBSSList( hScanMngr );
-        break;
-        
-    case DBG_SCAN_MNGR_PRINT_STATS:
-        scanMngr_statsPrint( hScanMngr );
-        break;
-
-    case DBG_SCAN_MNGR_RESET_STATS:
-        scanMngr_statsReset( hScanMngr );
-        break;
-
-    case DBG_SCAN_MNGR_PIRNT_NEIGHBOR_APS:
-        scanMngrDebugPrintNeighborAPList( hScanMngr );
-        break;
-
-    case DBG_SCAN_MNGR_PRINT_POLICY:
-        scanMngrTracePrintScanPolicy( &(((scanMngr_t*)hScanMngr)->scanPolicy) );
-        break;
-
-    case DBG_SCAN_MNGR_PRINT_OBJECT:
-        scanMngrDebugPrintObject( hScanMngr );
-        break;
-
-    default:
-		WLAN_OS_REPORT(("Invalid function type in scan manager debug function: %d\n", funcType));
-		break;
-	}
-}
-
-/**
- * \\n
- * \date 29-March-2005\n
- * \brief Prints scan manager debug menu
- *
- * Function Scope \e Public.\n
- */
-void printScanMngrDbgFunctions(void)
-{
-    WLAN_OS_REPORT(("   Scan Manager Debug Functions   \n"));
-	WLAN_OS_REPORT(("---------------------------------------\n"));
-	WLAN_OS_REPORT(("1500 - Print the scan manager Debug Help\n"));
-	WLAN_OS_REPORT(("1501 - Start continuous scan\n"));
-	WLAN_OS_REPORT(("1502 - Stop continuous scan\n"));
-    WLAN_OS_REPORT(("1503 - Start immediate scan\n"));
-    WLAN_OS_REPORT(("1504 - Stop immediate scan\n"));
-    WLAN_OS_REPORT(("1505 - Print tracking list\n"));
-    WLAN_OS_REPORT(("1506 - Print statistics\n"));
-    WLAN_OS_REPORT(("1507 - Reset statistics\n"));
-    WLAN_OS_REPORT(("1508 - Print neighbor APs list\n"));
-    WLAN_OS_REPORT(("1509 - Print Scan Policy\n"));
-    WLAN_OS_REPORT(("1510 - Print scan manager object\n"));
-}
-
-/**
- * \\n
- * \date 29-March-2005\n
- * \brief Starts continuous scan process.\n
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param hSiteMgr - handle to the site manager object.\n\
- * \param hCtrlData - handle to the data ctrl object.\n
- */
-void startContScan( TI_HANDLE hScanMngr, TI_HANDLE hSiteMgr, TI_HANDLE hCtrlData )
-{
-    paramInfo_t param;
-    ERadioBand  radioBand;
-
-    /* get current band */
-    param.paramType = SITE_MGR_RADIO_BAND_PARAM;
-    siteMgr_getParam( hSiteMgr, &param );
-    radioBand = param.content.siteMgrRadioBand;
-
-    /* get current BSSID */
-	param.paramType = CTRL_DATA_CURRENT_BSSID_PARAM;
-	ctrlData_getParam( hCtrlData, &param );
-    
-    /* start continuous scan */
-    scanMngr_startContScan( hScanMngr, &(param.content.ctrlDataCurrentBSSID), radioBand );
-}
-
diff --git a/wl1271/Test/ScanMngrDbg.h b/wl1271/Test/ScanMngrDbg.h
deleted file mode 100644
index df8ca99..0000000
--- a/wl1271/Test/ScanMngrDbg.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * ScanMngrDbg.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file ScanMngrDbg.h
- *  \brief This file include private definitions for the scan manager debug module.
- *  \
- *  \date 29-March-2005
- */
-
-#ifndef __SCANMNGRDBG_H__
-#define __SCANMNGRDBG_H__
-
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-
-/* debug functions */
-#define DBG_SCAN_MNGR_PRINT_HELP		    	0
-#define DBG_SCAN_MNGR_START_CONT_SCAN           1
-#define DBG_SCAN_MNGR_STOP_CONT_SCAN            2
-#define DBG_SCAN_MNGR_START_IMMED_SCAN          3
-#define DBG_SCAN_MNGR_STOP_IMMED_SCAN           4
-#define DBG_SCAN_MNGR_PRINT_TRACK_LIST          5
-#define DBG_SCAN_MNGR_PRINT_STATS               6
-#define DBG_SCAN_MNGR_RESET_STATS               7
-#define DBG_SCAN_MNGR_PIRNT_NEIGHBOR_APS        8
-#define DBG_SCAN_MNGR_PRINT_POLICY              9
-#define DBG_SCAN_MNGR_PRINT_OBJECT              10
-
-/*
- ***********************************************************************
- *	Enums.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Structure definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-
-/**
- * \\n
- * \date 29-March-2005\n
- * \brief Main scan manager debug function
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param funcType - the specific debug function.\n
- * \param pParam - parameters for the debug function.\n
- * \param hSiteMgr - handle to th esite manager object.\n
- * \param hCtrlData - handle to the data ctrl object.\n
- */
-void scanMngrDebugFunction( TI_HANDLE hScanMngr, TI_UINT32 funcType, void *pParam, TI_HANDLE hSiteMgr, TI_HANDLE hCtrlData );
-
-/**
- * \\n
- * \date 29-March-2005\n
- * \brief Prints scan manager debug menu
- *
- * Function Scope \e Public.\n
- */
-void printScanMngrDbgFunctions(void);
-
-/**
- * \\n
- * \date 29-March-2005\n
- * \brief Starts continuous scan process.\n
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param hSiteMgr - handle to the site manager object.\n\
- * \param hCtrlData - handle to the data ctrl object.\n
- */
-void startContScan( TI_HANDLE hScanMngr, TI_HANDLE hSiteMgr, TI_HANDLE hCtrlData );
-
-#endif /* __SCANMNGRDBG_H__ */
diff --git a/wl1271/Test/SoftGeminiDbg.c b/wl1271/Test/SoftGeminiDbg.c
deleted file mode 100644
index 6123ec9..0000000
--- a/wl1271/Test/SoftGeminiDbg.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * SoftGeminiDbg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file ScanCncnDbg.c
- *  \brief This file include the soft gemini debug module implementation
- *  \
- *  \date 14-Dec-2005
- */
-
-#include "SoftGeminiApi.h"
-#include "SoftGeminiDbg.h"
-#include "report.h"
-#include "osApi.h"
-
-
-/**
- * \\n
- * \date 14-Dec-2005\n
- * \brief Main soft gemini debug function
- *
- * Function Scope \e Public.\n
- * \param hSoftGemini - handle to the soft gemini object.\n
- * \param funcType - the specific debug function.\n
- * \param pParam - parameters for the debug function.\n
- */
-void SoftGeminiDebugFunction( TI_HANDLE hSoftGemini,TI_UINT32 funcType, void *pParam )
-{
-  	switch (funcType)
-	{
-	case DBG_SG_PRINT_HELP:
-		printSoftGeminiDbgFunctions();
-		break;
-
-	case DBG_SG_PRINT_PARAMS:  
-		printSoftGeminiParams(hSoftGemini);
-		break;
-		
-	case DBG_SG_SENSE_MODE:
-		SoftGemini_SenseIndicationCB(hSoftGemini,(char*) pParam,1);
-		break;
-
-	case DBG_SG_PROTECTIVE_MODE:
-		SoftGemini_ProtectiveIndicationCB(hSoftGemini,(char*) pParam,1);
-		break;
-
-	default:
-		WLAN_OS_REPORT(("Invalid function type in soft gemini debug function: %d\n", funcType));
-		break;
-	}
-}
-
-/**
- * \\n
- * \date 14-Dec-2005\n
- * \brief Prints soft gemini debug menu
- *
- * Function Scope \e Public.\n
- */
-void printSoftGeminiDbgFunctions(void)
-{
-    WLAN_OS_REPORT(("   Scan Concentrator Debug Functions   \n"));
-	WLAN_OS_REPORT(("---------------------------------------\n"));
-	WLAN_OS_REPORT(("1800 - Print the soft gemini Debug Help\n"));
-	WLAN_OS_REPORT(("1801 - Print soft gemini parameters    \n"));
-	WLAN_OS_REPORT(("1802 - Trigger Sense Mode (enable - 1)	\n"));
-	WLAN_OS_REPORT(("1803 - Trigger Protective Mode	(ON - 1)\n"));
-
-}
-
-/**
- * \\n
- * \date 14-Dec-2005\n
- * \brief Performs a driver scan from within an app scan.\n
- *
- * Function Scope \e Public.\n
- * \param hSoftGemini - handle to the soft gemini object.\n
- */
-void printSoftGeminiParams( TI_HANDLE hSoftGemini )
-{
-   SoftGemini_printParams(hSoftGemini);
-}
diff --git a/wl1271/Test/SoftGeminiDbg.h b/wl1271/Test/SoftGeminiDbg.h
deleted file mode 100644
index 9f4559c..0000000
--- a/wl1271/Test/SoftGeminiDbg.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * SoftGeminiDbg.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file SoftGeminiDbg.h
- *  \brief This file include private definitions for the soft Gemini debug module.
- *  \
- *  \date 30-Dec-2004
- */
-
-#ifndef __SOFT_GEMINI_DBG_H__
-#define __SOFT_GEMINI_DBG_H__
-
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-
-/* debug functions */
-#define DBG_SG_PRINT_HELP					  	 0
-#define DBG_SG_PRINT_PARAMS						 1
-#define DBG_SG_SENSE_MODE						 2
-#define DBG_SG_PROTECTIVE_MODE					 3
-
-/*
- ***********************************************************************
- *	Enums.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Structure definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-
-/**
- * \\n
- * \date 14-Feb-2005\n
- * \brief Main soft Geminirdebug function
- *
- * Function Scope \e Public.\n
- * \param hSoftGemini - handle to the scan concentrator object.\n
- * \param funcType - the specific debug function.\n
- * \param pParam - parameters for the debug function.\n
- */
-void SoftGeminiDebugFunction( TI_HANDLE hSoftGemini, TI_UINT32 funcType, void *pParam );
-
-/**
- * \\n
- * \date 14-Feb-2005\n
- * \brief Prints scan concentrator debug menu
- *
- * Function Scope \e Public.\n
- */
-void printSoftGeminiDbgFunctions(void);
-
-/**
- * \\n
- * \date 14-Feb-2005\n
- * \brief Prints SoftGemini params.\n
- *
- * Function Scope \e Public.\n
- * \param hSoftGemini - handle to the SoftGemini object.\n
- */
-void printSoftGeminiParams( TI_HANDLE hSoftGemini );
-
-
-#endif /* __SOFT_GEMINI_DBG_H__ */
diff --git a/wl1271/Test/TWD_Debug.c b/wl1271/Test/TWD_Debug.c
deleted file mode 100644
index 63a9358..0000000
--- a/wl1271/Test/TWD_Debug.c
+++ /dev/null
@@ -1,995 +0,0 @@
-/*
- * TWD_Debug.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "tidef.h"
-#include "TWDriver.h"
-#include "rxXfer_api.h"
-#include "report.h"
-#include "osApi.h"
-#include "eventMbox_api.h"
-#include "CmdQueue_api.h"
-#include "CmdMBox_api.h"
-#include "FwEvent_api.h"
-#include "fwDebug_api.h"
-#include "CmdBld.h"
-
-
-/* Phony address used by host access */
-#define BB_REGISTER_ADDR_BASE              0x820000
-
-/* Used for TWD Debug Tests */
-typedef enum
-{
-/*
- * General
- */
-/*	0x00	*/	TWD_PRINT_HELP,
-/*	0x01	*/	TWD_PRINT_SYS_INFO,
-/*	0x02	*/	TWD_SET_GENERIC_ADDR,
-/*	0x03	*/	TWD_READ_MEM,
-/*	0x04	*/	TWD_WRITE_MEM,
-
-/*	0x05	*/	TWD_PRINT_ISTART,
-
-/*	0x06	*/	TWD_PRINT_MBOX_QUEUE_INFO,
-/*	0x07	*/	TWD_PRINT_MBOX_PRINT_CMD,
-/*	0x08	*/	TWD_MAILBOX_HISTORY_PRINT,
-
-/*	0x09	*/	TWD_MAC_REG,
-/*	0x0A	*/	TWD_SET_ARM_CLOCK,
-/*	0x0B	*/	TWD_SET_MAC_CLOCK,
-
-/*
- * Rx
- */
-/*	0x0C	*/	TWD_PRINT_RX_INFO,
-/*	0x0D	*/	TWD_CLEAR_RX_INFO,
-
-/*
- * Acx
- */
-/*	0x0E	*/	TWD_PRINT_ACX_MAP,
-/*	0x0F	*/	TWD_PRINT_ACX_STAT,
-
-/*
- * General Debug
- */
-/*	0x10	*/	TWD_PWR_SV_DBG,
-
-/*	0x11	*/	TWD_PRINT_LIST_REGS_THROG_MBOX,
-/*	0x12	*/	TWD_PRINT_LIST_MEM_THROG_MBOX,
-/*	0x13	*/	TWD_SET_MAC_REGISTER_THROG_MBOX,
-/*	0x14	*/	TWD_SET_PHY_REGISTER_THROG_MBOX,
-/*	0x15	*/	TWD_SET_MEMORY_THROG_MBOX,
-
-/*
- * Recover Debug
- */
-/*	0x16	*/	TWD_CHECK_HW,
-/*	0x17	*/	TWD_PRINT_HW_STATUS,
-
-/*
- * Event MailBox
- */
-/*	0x18	*/	TWD_PRINT_EVENT_MBOX_INFO,
-/*	0x19	*/	TWD_PRINT_EVENT_MBOX_MASK,
-/*	0x1A	*/	TWD_PRINT_EVENT_MBOX_UNMASK,
-
-/*
- * Other
- */
-TWD_PRINT_FW_EVENT_INFO,
-TWD_PRINT_TW_IF_INFO,
-TWD_PRINT_MBOX_INFO,
-TWD_FORCE_TEMPLATES_RATES,
-
-				TWD_DEBUG_TEST_MAX = 0xFF	/* mast be last!!! */
-
-} TWD_DebugTest_e;
-
-
-/* Used for Memory or Registers reading/writing*/
-typedef enum
-{
-   TNETW_INTERNAL_RAM,
-   TNETW_MAC_REGISTERS,
-   TNETW_PHY_REGISTERS
-
-} readWrite_MemoryType_e;
-    
-static void TWD_PrintMemRegsCB (TI_HANDLE hTWD, TI_UINT32 cmdCbStatus)
-{
-    TTwd    *pTWD = (TTwd *)hTWD;    
-    int      i;
-    TI_UINT8   *pBuf;
-    TI_UINT32   result;
-
-    if (cmdCbStatus != TI_OK)
-    {
-        WLAN_OS_REPORT(("Command complete error \n\n"));
-        return;
-    }
-
-    result = (((TI_UINT32)pTWD->tPrintRegsBuf.addr) & 0xFFFF0000);
-    
-    switch (result)
-    {
-        case REGISTERS_BASE:
-                WLAN_OS_REPORT(("MAC REGS (Base=0x%08x) = 0x%08x\n", 
-                               ((TI_UINT32)pTWD->tPrintRegsBuf.addr)&0xFFFF,
-                               *(TI_UINT32*)(pTWD->tPrintRegsBuf.value)));
-                break;
-
-        case BB_REGISTER_ADDR_BASE:
-                WLAN_OS_REPORT(("PHY REGS (Base=0x%08x) = 0x%08x\n", 
-                               ((TI_UINT32)pTWD->tPrintRegsBuf.addr)&0xFFFF,
-                               *(TI_UINT32*)(pTWD->tPrintRegsBuf.value)));
-                break;
-
-        default: /* Memory*/
-                for (i=0, pBuf = pTWD->tPrintRegsBuf.value; i < 256; i += 16, pBuf += 16)
-                {
-                    WLAN_OS_REPORT(("PrintBuf: 0x%08x: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", 
-									pTWD->tPrintRegsBuf.addr+i, 
-									pBuf[0], pBuf[1], pBuf[2], pBuf[3], pBuf[4], pBuf[5], pBuf[6], pBuf[7], 
-									pBuf[8], pBuf[9], pBuf[10], pBuf[11], pBuf[12], pBuf[13], pBuf[14], pBuf[15]));
-                }
-                break;
-    }
-}
-
-
-static void TWD_PrintMemRegs (TI_HANDLE hTWD, TI_UINT32 address, TI_UINT32 len, readWrite_MemoryType_e memType)
-{
-    TTwd  *pTWD = (TTwd *)hTWD;    
-    ReadWriteCommand_t  AcxCmd_ReadMemory; 
-    ReadWriteCommand_t* pCmd = &AcxCmd_ReadMemory;
-
-    os_memoryZero (pTWD->hOs, (void *)pCmd, sizeof (*pCmd));
-    
-    switch (memType)
-    {
-        case TNETW_INTERNAL_RAM:
-            pCmd->addr = (TI_UINT32)ENDIAN_HANDLE_LONG (address);
-            pCmd->size = ENDIAN_HANDLE_LONG (len);
-            break;
-             
-        case TNETW_MAC_REGISTERS:
-            pCmd->addr = (TI_UINT32)ENDIAN_HANDLE_LONG (((address&0xFFFF) | REGISTERS_BASE));
-            pCmd->size = 4;
-            break;
-    
-        case TNETW_PHY_REGISTERS:
-            pCmd->addr = (TI_UINT32)ENDIAN_HANDLE_LONG (((address&0xFFFF) | BB_REGISTER_ADDR_BASE));
-            pCmd->size = 4;
-            break;
-    
-        default:
-            WLAN_OS_REPORT(("Wrong memory type %d\n\n", memType));
-            return;
-    }
-    
-    os_memoryZero (pTWD->hOs, (void *)&pTWD->tPrintRegsBuf, sizeof(pTWD->tPrintRegsBuf));
-    
-    cmdQueue_SendCommand (pTWD->hCmdQueue, 
-                      CMD_READ_MEMORY, 
-                      (char *)pCmd, 
-                      sizeof(*pCmd), 
-                      (void *)TWD_PrintMemRegsCB, 
-                      hTWD, 
-                      &pTWD->tPrintRegsBuf);
-}
-
-static TI_STATUS TWD_PrintMemoryMapCb (TI_HANDLE hTWD, TI_STATUS status, void *pData)
-{
-#ifdef REPORT_LOG
-    TTwd        *pTWD = (TTwd *)hTWD;    
-    MemoryMap_t  *pMemMap = &pTWD->MemMap;
-
-    /* Print the memory map */
-    WLAN_OS_REPORT (("TWD_PrintMemoryMap:\n"));
-    WLAN_OS_REPORT (("\tCode  (0x%08x, 0x%08x)\n\tWep  (0x%08x, 0x%08x)\n\tTmpl (0x%08x, 0x%08x)\n "
-                    "\tQueue (0x%08x, 0x%08x)\n\tPool (0x%08x, 0x%08x)\n\tTraceBuffer (A = 0x%08x, B = 0x%08x)\n",
-                    pMemMap->codeStart, 
-                    pMemMap->codeEnd,
-                    pMemMap->wepDefaultKeyStart, 
-                    pMemMap->wepDefaultKeyEnd,
-                    pMemMap->packetTemplateStart, 
-                    pMemMap->packetTemplateEnd,
-                    pMemMap->queueMemoryStart, 
-                    pMemMap->queueMemoryEnd,
-                    pMemMap->packetMemoryPoolStart, 
-                    pMemMap->packetMemoryPoolEnd,
-                    pMemMap->debugBuffer1Start, 
-                    pMemMap->debugBuffer2Start));
-#endif
-
-    return TI_OK;
-}
-
-
-/****************************************************************************
- *                      TWD_PrintMemoryMap ()
- ****************************************************************************
- * DESCRIPTION: Print some of the MemoryMap information element fields
- *
- * INPUTS:
- *          HwMboxConfig_T* pHwMboxConfig pointer to the acx mailbox
- *
- * OUTPUT:  None
- *
- * RETURNS: None
- ****************************************************************************/
-static void TWD_PrintMemoryMap (TI_HANDLE hTWD)
-{
-    TTwd *pTWD = (TTwd *)hTWD;    
-
-    TWD_ItrMemoryMap (pTWD, &pTWD->MemMap, (void *)TWD_PrintMemoryMapCb, hTWD);
-}
-
-
-/****************************************************************************
- *                      TWD_StatisticsReadCB ()
- ****************************************************************************
- * DESCRIPTION: Interrogate Statistics from the wlan hardware
- *
- * INPUTS:  None
- *
- * OUTPUT:  None
- *
- * RETURNS: TI_OK or TI_NOK
- ****************************************************************************/
-static TI_STATUS TWD_StatisticsReadCB (TI_HANDLE hTWD, TI_UINT16 MboxStatus, ACXStatistics_t* pElem)
-{
-    if (MboxStatus != TI_OK)
-    {
-        return TI_NOK;
-    }
-
-    /* 
-     *  Handle FW statistics endianess
-     *  ==============================
-     */
-
-    /* Ring */
-    pElem->ringStat.numOfTxProcs       = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfTxProcs);
-    pElem->ringStat.numOfPreparedDescs = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfPreparedDescs);
-    pElem->ringStat.numOfTxXfr         = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfTxXfr);
-    pElem->ringStat.numOfTxDma         = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfTxDma);
-    pElem->ringStat.numOfTxCmplt       = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfTxCmplt);
-    pElem->ringStat.numOfRxProcs       = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfRxProcs);
-    pElem->ringStat.numOfRxData        = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfRxData);
-
-    /* Debug */
-    pElem->debug.debug1                = ENDIAN_HANDLE_LONG(pElem->debug.debug1);
-    pElem->debug.debug2                = ENDIAN_HANDLE_LONG(pElem->debug.debug2);
-    pElem->debug.debug3                = ENDIAN_HANDLE_LONG(pElem->debug.debug3);
-    pElem->debug.debug4                = ENDIAN_HANDLE_LONG(pElem->debug.debug4);
-    pElem->debug.debug5                = ENDIAN_HANDLE_LONG(pElem->debug.debug5);
-    pElem->debug.debug6                = ENDIAN_HANDLE_LONG(pElem->debug.debug6);
-
-    /* Isr */
-    pElem->isr.IRQs                    = ENDIAN_HANDLE_LONG(pElem->isr.IRQs);
-
-    /* Rx */
-    pElem->rx.RxOutOfMem               = ENDIAN_HANDLE_LONG(pElem->rx.RxOutOfMem            );
-    pElem->rx.RxHdrOverflow            = ENDIAN_HANDLE_LONG(pElem->rx.RxHdrOverflow         );
-    pElem->rx.RxHWStuck                = ENDIAN_HANDLE_LONG(pElem->rx.RxHWStuck             );
-    pElem->rx.RxDroppedFrame           = ENDIAN_HANDLE_LONG(pElem->rx.RxDroppedFrame        );
-    pElem->rx.RxCompleteDroppedFrame   = ENDIAN_HANDLE_LONG(pElem->rx.RxCompleteDroppedFrame);
-    pElem->rx.RxAllocFrame             = ENDIAN_HANDLE_LONG(pElem->rx.RxAllocFrame          );
-    pElem->rx.RxDoneQueue              = ENDIAN_HANDLE_LONG(pElem->rx.RxDoneQueue           );
-    pElem->rx.RxDone                   = ENDIAN_HANDLE_LONG(pElem->rx.RxDone                );
-    pElem->rx.RxDefrag                 = ENDIAN_HANDLE_LONG(pElem->rx.RxDefrag              );
-    pElem->rx.RxDefragEnd              = ENDIAN_HANDLE_LONG(pElem->rx.RxDefragEnd           );
-    pElem->rx.RxMic                    = ENDIAN_HANDLE_LONG(pElem->rx.RxMic                 );
-    pElem->rx.RxMicEnd                 = ENDIAN_HANDLE_LONG(pElem->rx.RxMicEnd              );
-    pElem->rx.RxXfr                    = ENDIAN_HANDLE_LONG(pElem->rx.RxXfr                 );
-    pElem->rx.RxXfrEnd                 = ENDIAN_HANDLE_LONG(pElem->rx.RxXfrEnd              );
-    pElem->rx.RxCmplt                  = ENDIAN_HANDLE_LONG(pElem->rx.RxCmplt               );
-    pElem->rx.RxPreCmplt               = ENDIAN_HANDLE_LONG(pElem->rx.RxPreCmplt            );
-    pElem->rx.RxCmpltTask              = ENDIAN_HANDLE_LONG(pElem->rx.RxCmpltTask           );
-    pElem->rx.RxPhyHdr                 = ENDIAN_HANDLE_LONG(pElem->rx.RxPhyHdr              );
-    pElem->rx.RxTimeout                = ENDIAN_HANDLE_LONG(pElem->rx.RxTimeout             );
-
-    /* Tx */
-    pElem->tx.numOfTxTemplatePrepared  	= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxTemplatePrepared);
-	pElem->tx.numOfTxDataPrepared  		= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDataPrepared);
-	pElem->tx.numOfTxTemplateProgrammed = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxTemplateProgrammed);
-	pElem->tx.numOfTxDataProgrammed  	= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDataProgrammed);
-	pElem->tx.numOfTxBurstProgrammed  	= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxBurstProgrammed);
-	pElem->tx.numOfTxStarts  			= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStarts);
-	pElem->tx.numOfTxImmResp  			= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxImmResp);
-	pElem->tx.numOfTxStartTempaltes  	= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartTempaltes);
-	pElem->tx.numOfTxStartIntTemplate  	= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartIntTemplate);
-	pElem->tx.numOfTxStartFwGen  		= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartFwGen);
-	pElem->tx.numOfTxStartData  		= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartData);
-	pElem->tx.numOfTxStartNullFrame  	= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartNullFrame);
-	pElem->tx.numOfTxExch  				= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxExch);
-	pElem->tx.numOfTxRetryTemplate  	= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxRetryTemplate);
-	pElem->tx.numOfTxRetryData  		= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxRetryData);
-	pElem->tx.numOfTxExchPending  		= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxExchPending);
-	pElem->tx.numOfTxExchExpiry  		= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxExchExpiry);
-	pElem->tx.numOfTxExchMismatch  		= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxExchMismatch);
-	pElem->tx.numOfTxDoneTemplate  		= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDoneTemplate);
-	pElem->tx.numOfTxDoneData  			= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDoneData);
-	pElem->tx.numOfTxDoneIntTemplate  	= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDoneIntTemplate);
-	pElem->tx.numOfTxPreXfr  			= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxPreXfr);
-	pElem->tx.numOfTxXfr  				= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxXfr);
-	pElem->tx.numOfTxXfrOutOfMem  		= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxXfrOutOfMem);
-	pElem->tx.numOfTxDmaProgrammed  	= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDmaProgrammed);
-	pElem->tx.numOfTxDmaDone  			= ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDmaDone);
-
-    /* Dma */
-    pElem->dma.RxDMAErrors             = ENDIAN_HANDLE_LONG(pElem->dma.RxDMAErrors);
-    pElem->dma.TxDMAErrors             = ENDIAN_HANDLE_LONG(pElem->dma.TxDMAErrors);
-
-    /* Wep */
-    pElem->wep.WepAddrKeyCount         = ENDIAN_HANDLE_LONG(pElem->wep.WepAddrKeyCount);
-    pElem->wep.WepDefaultKeyCount      = ENDIAN_HANDLE_LONG(pElem->wep.WepDefaultKeyCount);
-    pElem->wep.WepKeyNotFound          = ENDIAN_HANDLE_LONG(pElem->wep.WepKeyNotFound);
-    pElem->wep.WepDecryptFail          = ENDIAN_HANDLE_LONG(pElem->wep.WepDecryptFail);
-    
-    /* AES */
-    pElem->aes.AesEncryptFail          = ENDIAN_HANDLE_LONG(pElem->aes.AesEncryptFail);     
-    pElem->aes.AesDecryptFail          = ENDIAN_HANDLE_LONG(pElem->aes.AesDecryptFail);     
-    pElem->aes.AesEncryptPackets       = ENDIAN_HANDLE_LONG(pElem->aes.AesEncryptPackets);  
-    pElem->aes.AesDecryptPackets       = ENDIAN_HANDLE_LONG(pElem->aes.AesDecryptPackets);  
-    pElem->aes.AesEncryptInterrupt     = ENDIAN_HANDLE_LONG(pElem->aes.AesEncryptInterrupt);
-    pElem->aes.AesDecryptInterrupt     = ENDIAN_HANDLE_LONG(pElem->aes.AesDecryptInterrupt);
-
-    /* Events */
-    pElem->event.calibration           = ENDIAN_HANDLE_LONG(pElem->event.calibration);
-    pElem->event.rxMismatch            = ENDIAN_HANDLE_LONG(pElem->event.rxMismatch); 
-    pElem->event.rxMemEmpty            = ENDIAN_HANDLE_LONG(pElem->event.rxMemEmpty); 
-
-    /* PS */
-    pElem->pwr.MissingBcnsCnt          	= ENDIAN_HANDLE_LONG(pElem->pwr.MissingBcnsCnt);
-    pElem->pwr.RcvdBeaconsCnt          	= ENDIAN_HANDLE_LONG(pElem->pwr.RcvdBeaconsCnt);
-    pElem->pwr.ConnectionOutOfSync     	= ENDIAN_HANDLE_LONG(pElem->pwr.ConnectionOutOfSync);
-    pElem->pwr.ContMissBcnsSpread[0]   	= ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[0]);
-    pElem->pwr.ContMissBcnsSpread[1]   	= ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[1]);
-    pElem->pwr.ContMissBcnsSpread[2]   	= ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[2]);
-    pElem->pwr.ContMissBcnsSpread[3]   	= ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[3]);
-    pElem->pwr.ContMissBcnsSpread[4]   	= ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[4]);
-    pElem->pwr.ContMissBcnsSpread[5]   	= ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[5]);
-    pElem->pwr.ContMissBcnsSpread[6]   	= ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[6]);
-    pElem->pwr.ContMissBcnsSpread[7]   	= ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[7]);
-    pElem->pwr.ContMissBcnsSpread[8]   	= ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[8]);
-    pElem->pwr.ContMissBcnsSpread[9]   	= ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[9]);
-
-    pElem->ps.psPollTimeOuts           	= ENDIAN_HANDLE_LONG(pElem->ps.psPollTimeOuts);
-    pElem->ps.upsdTimeOuts             	= ENDIAN_HANDLE_LONG(pElem->ps.upsdTimeOuts);
-    pElem->ps.upsdMaxAPturn            	= ENDIAN_HANDLE_LONG(pElem->ps.upsdMaxAPturn); 
-    pElem->ps.psPollMaxAPturn          	= ENDIAN_HANDLE_LONG(pElem->ps.psPollMaxAPturn);
-    pElem->ps.psPollUtilization        	= ENDIAN_HANDLE_LONG(pElem->ps.psPollUtilization);
-    pElem->ps.upsdUtilization          	= ENDIAN_HANDLE_LONG(pElem->ps.upsdUtilization);
-
-	pElem->rxFilter.arpFilter		   	= ENDIAN_HANDLE_LONG(pElem->rxFilter.arpFilter);
-	pElem->rxFilter.beaconFilter	   	= ENDIAN_HANDLE_LONG(pElem->rxFilter.beaconFilter);
-	pElem->rxFilter.dataFilter		   	= ENDIAN_HANDLE_LONG(pElem->rxFilter.dataFilter);
-	pElem->rxFilter.dupFilter		   	= ENDIAN_HANDLE_LONG(pElem->rxFilter.dupFilter);
-	pElem->rxFilter.MCFilter		   	= ENDIAN_HANDLE_LONG(pElem->rxFilter.MCFilter);
-	pElem->rxFilter.ibssFilter		   	= ENDIAN_HANDLE_LONG(pElem->rxFilter.ibssFilter);
-
-	pElem->radioCal.calStateFail	   	= ENDIAN_HANDLE_LONG(pElem->radioCal.calStateFail);
-	pElem->radioCal.initCalTotal	   	= ENDIAN_HANDLE_LONG(pElem->radioCal.initCalTotal);
-	pElem->radioCal.initRadioBandsFail 	= ENDIAN_HANDLE_LONG(pElem->radioCal.initRadioBandsFail);
-	pElem->radioCal.initRxIqMmFail		= ENDIAN_HANDLE_LONG(pElem->radioCal.initRxIqMmFail);
-	pElem->radioCal.initSetParams		= ENDIAN_HANDLE_LONG(pElem->radioCal.initSetParams);
-	pElem->radioCal.initTxClpcFail		= ENDIAN_HANDLE_LONG(pElem->radioCal.initTxClpcFail);
-	pElem->radioCal.tuneCalTotal		= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneCalTotal);
-	pElem->radioCal.tuneDrpwChanTune	= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwChanTune);
-	pElem->radioCal.tuneDrpwLnaTank		= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwLnaTank);
-	pElem->radioCal.tuneDrpwPdBufFail	= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwPdBufFail);
-	pElem->radioCal.tuneDrpwRTrimFail	= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwRTrimFail);
-	pElem->radioCal.tuneDrpwRxDac		= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwRxDac);
-	pElem->radioCal.tuneDrpwRxIf2Gain	= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwRxIf2Gain);
-	pElem->radioCal.tuneDrpwRxTxLpf		= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwRxTxLpf);
-	pElem->radioCal.tuneDrpwTaCal		= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwTaCal);
-	pElem->radioCal.tuneDrpwTxMixFreqFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwTxMixFreqFail);
-	pElem->radioCal.tuneRxAnaDcFail		= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneRxAnaDcFail);
-	pElem->radioCal.tuneRxIqMmFail		= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneRxIqMmFail);
-	pElem->radioCal.tuneTxClpcFail		= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxClpcFail);
-	pElem->radioCal.tuneTxIqMmFail		= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxIqMmFail);
-	pElem->radioCal.tuneTxLOLeakFail	= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxLOLeakFail);
-	pElem->radioCal.tuneTxPdetFail		= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxPdetFail);
-	pElem->radioCal.tuneTxPPAFail		= ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxPPAFail);
-
-
-    /* 
-     *  Print FW statistics 
-     *  ===================
-     */
-
-    /* Ring */
-    WLAN_OS_REPORT(("------  Ring statistics  -------------------\n"));
-    WLAN_OS_REPORT(("numOfTxProcs       = %d\n", pElem->ringStat.numOfTxProcs));
-    WLAN_OS_REPORT(("numOfPreparedDescs = %d\n", pElem->ringStat.numOfPreparedDescs));
-    WLAN_OS_REPORT(("numOfTxXfr         = %d\n", pElem->ringStat.numOfTxXfr));
-    WLAN_OS_REPORT(("numOfTxDma         = %d\n", pElem->ringStat.numOfTxDma));
-    WLAN_OS_REPORT(("numOfTxCmplt       = %d\n", pElem->ringStat.numOfTxCmplt));
-    WLAN_OS_REPORT(("numOfRxProcs       = %d\n", pElem->ringStat.numOfRxProcs));
-    WLAN_OS_REPORT(("numOfRxData        = %d\n", pElem->ringStat.numOfRxData));
-
-    /* Debug */
-    WLAN_OS_REPORT(("------  Debug statistics  -------------------\n"));
-    WLAN_OS_REPORT(("debug1 = %d\n", pElem->debug.debug1));
-    WLAN_OS_REPORT(("debug2 = %d\n", pElem->debug.debug2));
-    WLAN_OS_REPORT(("debug3 = %d\n", pElem->debug.debug3));
-    WLAN_OS_REPORT(("debug4 = %d\n", pElem->debug.debug4));
-    WLAN_OS_REPORT(("debug5 = %d\n", pElem->debug.debug5));
-    WLAN_OS_REPORT(("debug6 = %d\n", pElem->debug.debug6));
-
-    /* Isr */
-    WLAN_OS_REPORT(("------  Isr statistics  -------------------\n"));
-    WLAN_OS_REPORT(("IRQs = %d\n", pElem->isr.IRQs));
-
-    /* Rx */
-    WLAN_OS_REPORT(("------  Rx  statistics  -------------------\n"));
-    WLAN_OS_REPORT(("RxOutOfMem             = %d\n", pElem->rx.RxOutOfMem            ));
-    WLAN_OS_REPORT(("RxHdrOverflow          = %d\n", pElem->rx.RxHdrOverflow         ));
-    WLAN_OS_REPORT(("RxHWStuck              = %d\n", pElem->rx.RxHWStuck             ));
-    WLAN_OS_REPORT(("RxDroppedFrame         = %d\n", pElem->rx.RxDroppedFrame        ));
-    WLAN_OS_REPORT(("RxCompleteDroppedFrame = %d\n", pElem->rx.RxCompleteDroppedFrame));
-    WLAN_OS_REPORT(("RxAllocFrame           = %d\n", pElem->rx.RxAllocFrame          ));
-    WLAN_OS_REPORT(("RxDoneQueue            = %d\n", pElem->rx.RxDoneQueue           ));
-    WLAN_OS_REPORT(("RxDone                 = %d\n", pElem->rx.RxDone                ));
-    WLAN_OS_REPORT(("RxDefrag               = %d\n", pElem->rx.RxDefrag              ));
-    WLAN_OS_REPORT(("RxDefragEnd            = %d\n", pElem->rx.RxDefragEnd           ));
-    WLAN_OS_REPORT(("RxMic                  = %d\n", pElem->rx.RxMic                 ));
-    WLAN_OS_REPORT(("RxMicEnd               = %d\n", pElem->rx.RxMicEnd              ));
-    WLAN_OS_REPORT(("RxXfr                  = %d\n", pElem->rx.RxXfr                 ));
-    WLAN_OS_REPORT(("RxXfrEnd               = %d\n", pElem->rx.RxXfrEnd              ));
-    WLAN_OS_REPORT(("RxCmplt                = %d\n", pElem->rx.RxCmplt               ));
-    WLAN_OS_REPORT(("RxPreCmplt             = %d\n", pElem->rx.RxPreCmplt            ));
-    WLAN_OS_REPORT(("RxCmpltTask            = %d\n", pElem->rx.RxCmpltTask           ));
-    WLAN_OS_REPORT(("RxPhyHdr               = %d\n", pElem->rx.RxPhyHdr              ));
-    WLAN_OS_REPORT(("RxTimeout              = %d\n", pElem->rx.RxTimeout             ));
-
-    WLAN_OS_REPORT(("------  RxFilters statistics  --------------\n"));
-	WLAN_OS_REPORT(("arpFilter    = %d\n", pElem->rxFilter.arpFilter));
-	WLAN_OS_REPORT(("beaconFilter = %d\n", pElem->rxFilter.beaconFilter));
-	WLAN_OS_REPORT(("dataFilter   = %d\n", pElem->rxFilter.dataFilter));
-	WLAN_OS_REPORT(("dupFilter    = %d\n", pElem->rxFilter.dupFilter));
-	WLAN_OS_REPORT(("MCFilter     = %d\n", pElem->rxFilter.MCFilter));
-	WLAN_OS_REPORT(("ibssFilter   = %d\n", pElem->rxFilter.ibssFilter));
-
-    /* Tx */
-    WLAN_OS_REPORT(("------  Tx  statistics  -------------------\n"));
-	WLAN_OS_REPORT(("numOfTxTemplatePrepared    = %d\n", pElem->tx.numOfTxTemplatePrepared));
-	WLAN_OS_REPORT(("numOfTxDataPrepared        = %d\n", pElem->tx.numOfTxDataPrepared));
-	WLAN_OS_REPORT(("numOfTxTemplateProgrammed  = %d\n", pElem->tx.numOfTxTemplateProgrammed));
-	WLAN_OS_REPORT(("numOfTxDataProgrammed      = %d\n", pElem->tx.numOfTxDataProgrammed));
-	WLAN_OS_REPORT(("numOfTxBurstProgrammed     = %d\n", pElem->tx.numOfTxBurstProgrammed));
-	WLAN_OS_REPORT(("numOfTxStarts              = %d\n", pElem->tx.numOfTxStarts));
-	WLAN_OS_REPORT(("numOfTxImmResp             = %d\n", pElem->tx.numOfTxImmResp));
-	WLAN_OS_REPORT(("numOfTxStartTempaltes      = %d\n", pElem->tx.numOfTxStartTempaltes));
-	WLAN_OS_REPORT(("numOfTxStartIntTemplate    = %d\n", pElem->tx.numOfTxStartIntTemplate));
-	WLAN_OS_REPORT(("numOfTxStartFwGen          = %d\n", pElem->tx.numOfTxStartFwGen));
-	WLAN_OS_REPORT(("numOfTxStartData           = %d\n", pElem->tx.numOfTxStartData));
-	WLAN_OS_REPORT(("numOfTxStartNullFrame      = %d\n", pElem->tx.numOfTxStartNullFrame));
-	WLAN_OS_REPORT(("numOfTxExch                = %d\n", pElem->tx.numOfTxExch));
-	WLAN_OS_REPORT(("numOfTxRetryTemplate       = %d\n", pElem->tx.numOfTxRetryTemplate));
-	WLAN_OS_REPORT(("numOfTxRetryData           = %d\n", pElem->tx.numOfTxRetryData));
-	WLAN_OS_REPORT(("numOfTxExchPending         = %d\n", pElem->tx.numOfTxExchPending));
-	WLAN_OS_REPORT(("numOfTxExchExpiry          = %d\n", pElem->tx.numOfTxExchExpiry));
-	WLAN_OS_REPORT(("numOfTxExchMismatch        = %d\n", pElem->tx.numOfTxExchMismatch));
-	WLAN_OS_REPORT(("numOfTxDoneTemplate        = %d\n", pElem->tx.numOfTxDoneTemplate));
-	WLAN_OS_REPORT(("numOfTxDoneData            = %d\n", pElem->tx.numOfTxDoneData));
-	WLAN_OS_REPORT(("numOfTxDoneIntTemplate     = %d\n", pElem->tx.numOfTxDoneIntTemplate));
-	WLAN_OS_REPORT(("numOfTxPreXfr              = %d\n", pElem->tx.numOfTxPreXfr));
-	WLAN_OS_REPORT(("numOfTxXfr                 = %d\n", pElem->tx.numOfTxXfr));
-	WLAN_OS_REPORT(("numOfTxXfrOutOfMem         = %d\n", pElem->tx.numOfTxXfrOutOfMem));
-	WLAN_OS_REPORT(("numOfTxDmaProgrammed       = %d\n", pElem->tx.numOfTxDmaProgrammed));
-	WLAN_OS_REPORT(("numOfTxDmaDone             = %d\n", pElem->tx.numOfTxDmaDone));
-
-    /* Dma */
-    WLAN_OS_REPORT(("------  Dma  statistics  -------------------\n"));
-    WLAN_OS_REPORT(("RxDMAErrors  = %d\n", pElem->dma.RxDMAErrors));
-    WLAN_OS_REPORT(("TxDMAErrors  = %d\n", pElem->dma.TxDMAErrors));
-
-    /* Wep */
-    WLAN_OS_REPORT(("------  Wep statistics  -------------------\n"));
-    WLAN_OS_REPORT(("WepAddrKeyCount   = %d\n", pElem->wep.WepAddrKeyCount));
-    WLAN_OS_REPORT(("WepDefaultKeyCount= %d\n", pElem->wep.WepDefaultKeyCount));
-    WLAN_OS_REPORT(("WepKeyNotFound    = %d\n", pElem->wep.WepKeyNotFound));
-    WLAN_OS_REPORT(("WepDecryptFail    = %d\n", pElem->wep.WepDecryptFail));
-
-    /* AES */
-    WLAN_OS_REPORT(("------------  AES Statistics --------------\n"));
-    WLAN_OS_REPORT(("AesEncryptFail      = %d\n", pElem->aes.AesEncryptFail));
-    WLAN_OS_REPORT(("AesDecryptFail      = %d\n", pElem->aes.AesDecryptFail));
-    WLAN_OS_REPORT(("AesEncryptPackets   = %d\n", pElem->aes.AesEncryptPackets));
-    WLAN_OS_REPORT(("AesDecryptPackets   = %d\n", pElem->aes.AesDecryptPackets));
-    WLAN_OS_REPORT(("AesEncryptInterrupt = %d\n", pElem->aes.AesEncryptInterrupt));
-    WLAN_OS_REPORT(("AesDecryptInterrupt = %d\n", pElem->aes.AesDecryptInterrupt));
-
-    /* Events */
-    WLAN_OS_REPORT(("------  Events  -------------------\n"));
-    WLAN_OS_REPORT(("Calibration   = %d\n", pElem->event.calibration));
-    WLAN_OS_REPORT(("rxMismatch    = %d\n", pElem->event.rxMismatch));
-    WLAN_OS_REPORT(("rxMemEmpty    = %d\n", pElem->event.rxMemEmpty));
-
-   /* PsPoll/Upsd */ 
-    WLAN_OS_REPORT(("----------- PsPoll / Upsd -----------\n"));
-    WLAN_OS_REPORT(("psPollTimeOuts     = %d\n",pElem->ps.psPollTimeOuts));
-    WLAN_OS_REPORT(("upsdTimeOuts       = %d\n",pElem->ps.upsdTimeOuts));
-    WLAN_OS_REPORT(("upsdMaxAPturn      = %d\n",pElem->ps.upsdMaxAPturn));
-    WLAN_OS_REPORT(("psPollMaxAPturn    = %d\n",pElem->ps.psPollMaxAPturn));
-    WLAN_OS_REPORT(("psPollUtilization  = %d\n",pElem->ps.psPollUtilization));
-    WLAN_OS_REPORT(("upsdUtilization    = %d\n",pElem->ps.upsdUtilization));
-
-
-
-	/* Calibration */
-	WLAN_OS_REPORT(("----------- Calibrations -------------\n"));
-	WLAN_OS_REPORT(("calStateFail         	= %d\n", pElem->radioCal.calStateFail));
-	WLAN_OS_REPORT(("initCalTotal   		= %d\n", pElem->radioCal.initCalTotal));   	 
-	WLAN_OS_REPORT(("initRadioBandsFail   	= %d\n", pElem->radioCal.initRadioBandsFail));
-	WLAN_OS_REPORT(("initRxIqMmFail   		= %d\n", pElem->radioCal.initRxIqMmFail));
-	WLAN_OS_REPORT(("initSetParams   		= %d\n", pElem->radioCal.initSetParams));
-	WLAN_OS_REPORT(("initTxClpcFail   		= %d\n", pElem->radioCal.initTxClpcFail));	
-	WLAN_OS_REPORT(("tuneCalTotal   		= %d\n", pElem->radioCal.tuneCalTotal));	
-	WLAN_OS_REPORT(("tuneDrpwChanTune		= %d\n", pElem->radioCal.tuneDrpwChanTune));
-	WLAN_OS_REPORT(("tuneDrpwLnaTank		= %d\n", pElem->radioCal.tuneDrpwLnaTank));
-	WLAN_OS_REPORT(("tuneDrpwPdBufFail		= %d\n", pElem->radioCal.tuneDrpwPdBufFail));
-	WLAN_OS_REPORT(("tuneDrpwRTrimFail		= %d\n", pElem->radioCal.tuneDrpwRTrimFail));
-	WLAN_OS_REPORT(("tuneDrpwRxDac			= %d\n", pElem->radioCal.tuneDrpwRxDac));
-	WLAN_OS_REPORT(("tuneDrpwRxIf2Gain		= %d\n", pElem->radioCal.tuneDrpwRxIf2Gain));
-	WLAN_OS_REPORT(("tuneDrpwRxTxLpf		= %d\n", pElem->radioCal.tuneDrpwRxTxLpf));
-	WLAN_OS_REPORT(("tuneDrpwTaCal			= %d\n", pElem->radioCal.tuneDrpwTaCal));
-	WLAN_OS_REPORT(("tuneDrpwTxMixFreqFail	= %d\n", pElem->radioCal.tuneDrpwTxMixFreqFail));
-	WLAN_OS_REPORT(("tuneRxAnaDcFail   		= %d\n", pElem->radioCal.tuneRxAnaDcFail));		
-	WLAN_OS_REPORT(("tuneRxIqMmFail   		= %d\n", pElem->radioCal.tuneRxIqMmFail));
-	WLAN_OS_REPORT(("tuneTxClpcFail   		= %d\n", pElem->radioCal.tuneTxClpcFail));
-	WLAN_OS_REPORT(("tuneTxIqMmFail   		= %d\n", pElem->radioCal.tuneTxIqMmFail));
-	WLAN_OS_REPORT(("tuneTxLOLeakFail   	= %d\n", pElem->radioCal.tuneTxLOLeakFail));
-	WLAN_OS_REPORT(("tuneTxPdetFail   		= %d\n", pElem->radioCal.tuneTxPdetFail));
-	WLAN_OS_REPORT(("tuneTxPPAFail   		= %d\n", pElem->radioCal.tuneTxPPAFail)); 
-
-
-
-    /* Power Save Counters */
-    WLAN_OS_REPORT(("------  Power management  ----------\n"));
-    if(pElem->pwr.RcvdBeaconsCnt != 0)
-    {
-        WLAN_OS_REPORT(("MissingBcnsCnt    = %d (percentage <= %d) \n", 
-                pElem->pwr.MissingBcnsCnt,
-                ((pElem->pwr.MissingBcnsCnt * 100) / (pElem->pwr.RcvdBeaconsCnt + pElem->pwr.MissingBcnsCnt)) ));
-    }
-    else
-    {
-        WLAN_OS_REPORT(("MissingBcnsCnt    = %d (percentage = 0) \n", pElem->pwr.MissingBcnsCnt));
-    }
-    WLAN_OS_REPORT(("RcvdBeaconsCnt    = %d\n", pElem->pwr.RcvdBeaconsCnt));
-    WLAN_OS_REPORT(("ConnectionOutOfSync    = %d\n\n", pElem->pwr.ConnectionOutOfSync));
-    WLAN_OS_REPORT(("Single Missed Beacon           = %d\n", (pElem->pwr.ContMissBcnsSpread[0] & 0xFFFF)));
-    WLAN_OS_REPORT(("2 Continuous Missed Beacons    = %d\n", (pElem->pwr.ContMissBcnsSpread[1] & 0xFFFF)));
-    WLAN_OS_REPORT(("3 Continuous Missed Beacons    = %d\n", (pElem->pwr.ContMissBcnsSpread[2] & 0xFFFF)));
-    WLAN_OS_REPORT(("4 Continuous Missed Beacons    = %d\n", (pElem->pwr.ContMissBcnsSpread[3] & 0xFFFF)));
-    WLAN_OS_REPORT(("5 Continuous Missed Beacons    = %d\n", (pElem->pwr.ContMissBcnsSpread[4] & 0xFFFF)));
-    WLAN_OS_REPORT(("6 Continuous Missed Beacons    = %d\n", (pElem->pwr.ContMissBcnsSpread[5] & 0xFFFF)));
-    WLAN_OS_REPORT(("7 Continuous Missed Beacons    = %d\n", (pElem->pwr.ContMissBcnsSpread[6] & 0xFFFF)));
-    WLAN_OS_REPORT(("8 Continuous Missed Beacons    = %d\n", (pElem->pwr.ContMissBcnsSpread[7] & 0xFFFF)));
-    WLAN_OS_REPORT(("9 Continuous Missed Beacons    = %d\n", (pElem->pwr.ContMissBcnsSpread[8] & 0xFFFF)));
-    WLAN_OS_REPORT((">=10 Continuous Missed Beacons = %d\n\n", (pElem->pwr.ContMissBcnsSpread[9] & 0xFFFF)));
-
-    WLAN_OS_REPORT(("RcvdAwakeBeaconsCnt    = %d\n", pElem->pwr.RcvdAwakeBeaconsCnt));
-    WLAN_OS_REPORT(("Single Missed Beacon        [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[0] >> 16)));
-    WLAN_OS_REPORT(("2 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[1] >> 16)));
-    WLAN_OS_REPORT(("3 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[2] >> 16)));
-    WLAN_OS_REPORT(("4 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[3] >> 16)));
-    WLAN_OS_REPORT(("5 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[4] >> 16)));
-    WLAN_OS_REPORT(("6 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[5] >> 16)));
-    WLAN_OS_REPORT(("7 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[6] >> 16)));
-    WLAN_OS_REPORT(("8 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[7] >> 16)));
-    WLAN_OS_REPORT(("9 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[8] >> 16)));
-    WLAN_OS_REPORT((">=10 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[9] >> 16)));
-
-    return TI_OK;  
-}
-
-TI_STATUS TWD_Debug (TI_HANDLE hTWD, TI_UINT32 funcType, void *pParam)
-{
-    TTwd *pTWD			= (TTwd *)hTWD;    
-    TI_UINT32 GenericVal;
-    TFwDebugParams* pMemDebug	= (TFwDebugParams*)pParam;
-
-    static TI_UINT32 GenericAddr;
-#ifdef REPORT_LOG
-    static int    iStart[100]; /* Note: it is not used properly anyway */
-#endif
-	/* check paramemters validity */
-	if (pMemDebug == NULL)
-	{
-		WLAN_OS_REPORT(("TWD_Debug: Error - pParam is NULL\n"));
-		return TI_NOK;
-	}
-
-    switch (funcType)
-    {
-	case TWD_PRINT_SYS_INFO:
-		WLAN_OS_REPORT(("PLATFORM = TNETW125x\n"));
-		WLAN_OS_REPORT(("ACCESS MODE = SLAVE\n"));
-		break;
-
-	case TWD_SET_GENERIC_ADDR:
-		/* check paramemters validity */
-		if (pParam == NULL)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_SET_GENERIC_ADDR Error: No Perameter received\n"));		
-			return TI_NOK;
-		}
-		GenericAddr = *(TI_UINT32 *)pParam;
-        break;
-
-	case TWD_READ_MEM:
-        WLAN_OS_REPORT(("TWD_Debug, TWD_READ_MEM, Addr:	0x%X\n", pMemDebug->addr));				
-
-		/* check paramemters validity */
-		if (pMemDebug == NULL)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_READ_MEM Error: No Perameters received\n"));		
-			return TI_NOK;
-		}
-  
-		/* validate length */
-		*(TI_UINT32*)&pMemDebug->length = 4;		
-
-		/* If Address in valid Memory area and there is enough space for Length to R/W */
-		if (TWD_isValidMemoryAddr(hTWD, pMemDebug) == TI_TRUE)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_READ_MEM: Reading Valid memory Address\n"));		
-
-			/* Init buf before reading */
-			os_memorySet(pTWD->hOs, (void*)pMemDebug->UBuf.buf8, 0, 4);
-			if ( TWD_readMem (hTWD, pMemDebug, NULL, NULL) != TI_OK )
-			{
-				WLAN_OS_REPORT(("TWD_Debug, read memory failed\n"));	
-				return TI_NOK;
-			}
-		}
-
-		else if (TWD_isValidRegAddr(hTWD, pMemDebug) == TI_TRUE)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_READ_MEM: Reading Valid register Address\n"));		
-
-			/* Init buf before reading */
-			*(TI_UINT32*)&pMemDebug->UBuf.buf32 = 0;
-
-			if ( TWD_readMem (hTWD, pMemDebug, NULL, NULL) != TI_OK )
-			{
-				WLAN_OS_REPORT(("TWD_Debug, read register failed\n"));	
-				return TI_NOK;
-			}
-
-		}
-
-		/* address Not in valid Area */ 
-		else
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_READ_MEM Address is not Valid\n"));		
-			return TI_NOK;
-		}
-
-		/* print read memory */
-		{
-
-			WLAN_OS_REPORT(("Read from MEM Addr 0x%x the following values:\n", ((TFwDebugParams*)pMemDebug)->addr));
-
-			WLAN_OS_REPORT(("0x%X	",((TFwDebugParams*)pMemDebug)->UBuf.buf32[0]));
-			WLAN_OS_REPORT(("\n"));
-		}
-
-		break;
-
-	case TWD_WRITE_MEM:
-        WLAN_OS_REPORT(("TWD_Debug, TWD_WRITE_MEM, Addr:	0x%X\n", pMemDebug->addr));				
-
-		/* check paramemters validity */
-		if (pMemDebug == NULL)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_WRITE_MEM Error: No Perameters received\n"));				
-			return TI_NOK;
-		}
-
-		/* validate length */
-		*(TI_UINT32*)&pMemDebug->length = 4;		
-
-		/* If Address in valid Memory area and there is enough space for Length to R/W */
-		if (TWD_isValidMemoryAddr(hTWD, pMemDebug) == TI_TRUE)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_WRITE_MEM:	Writing Valid memory Address\n"));		
-
-
-			return ( TWD_writeMem (hTWD, pMemDebug, NULL, NULL) );
-		}
-		
-		else if (TWD_isValidRegAddr(hTWD, pMemDebug) == TI_TRUE)
-		{
-
-			WLAN_OS_REPORT(("TWD_Debug, TWD_WRITE_MEM: Writing Valid register Address\n"));		
-
-			return ( TWD_writeMem (hTWD, pMemDebug, NULL, NULL) );
-		}
-		/* address Not in valid Area */ 
-
-		else
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_WRITE_MEM Address is not Valid\n"));		
-			return TI_NOK;
-		}
-
-		break;
-
-         /*  HAL Control functions */
-
-	case TWD_PRINT_MBOX_QUEUE_INFO:
-		cmdQueue_Print (pTWD->hCmdQueue);         
-        break;
-            
-	case TWD_PRINT_MBOX_PRINT_CMD:
-		/* check paramemters validity */
-		if (pParam == NULL)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_PRINT_MBOX_PRINT_CMD Error: No Perameter received\n"));				
-			return TI_NOK;
-		}
-		cmdQueue_PrintHistory (pTWD->hCmdQueue, *(int *)pParam);            
-        break;
-
-	case TWD_PRINT_EVENT_MBOX_INFO:
-		eventMbox_Print (pTWD->hEventMbox);         
-        break;
-        
-	case TWD_PRINT_EVENT_MBOX_MASK:
-		/* check paramemters validity */
-		if (pParam == NULL)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_PRINT_EVENT_MBOX_MASK Error: No Perameter received\n"));				
-			return TI_NOK;
-		}
-		if ( eventMbox_MaskEvent (pTWD->hEventMbox, *(int *)pParam, NULL, NULL) == TI_NOK )
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_PRINT_EVENT_MBOX_MASK Error: eventMbox_EvMask failed\n"));				
-			return(TI_NOK);
-		}
-        break;
-        
-	case TWD_PRINT_EVENT_MBOX_UNMASK:
-		/* check paramemters validity */
-		if (pParam == NULL)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_PRINT_EVENT_MBOX_UNMASK Error: No Perameter received\n"));				
-			return TI_NOK;
-		}
-		if ( eventMbox_UnMaskEvent (pTWD->hEventMbox, *(int *)pParam, NULL, NULL) == TI_NOK )
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_PRINT_EVENT_MBOX_UNMASK Error: eventMbox_EvUnMask failed\n"));				
-			return(TI_NOK);
-		}
-        break;
-
-	case TWD_PRINT_ISTART:
-		{
-			int i;
-            for (i=0; i<20; i+=4)
-            {
-				WLAN_OS_REPORT(("%4d: %08d %08d %08d %08d\n", 
-								i, iStart[i+0], iStart[i+1], iStart[i+2], iStart[i+3]));
-			}
-		}
-        break;
-
-	case TWD_PRINT_LIST_REGS_THROG_MBOX:
-		{
-			int i;
-            TI_UINT32 RegAddr;
-    
-			RegAddr = *(TI_UINT32 *)pParam;
-			WLAN_OS_REPORT (("PrintListRegsThroughMbox ---------------------\n"));
-    
-			for (i = 0; i < 8; i++, RegAddr += 16)
-            {
-				TWD_PrintMemRegs (hTWD, RegAddr +  0, 4, TNETW_MAC_REGISTERS);
-                TWD_PrintMemRegs (hTWD, RegAddr +  4, 4, TNETW_MAC_REGISTERS);
-				TWD_PrintMemRegs (hTWD, RegAddr +  8, 4, TNETW_MAC_REGISTERS);
-				TWD_PrintMemRegs (hTWD, RegAddr + 12, 4, TNETW_MAC_REGISTERS);
-			}
-		}
-        break;
-    
-	case TWD_PRINT_LIST_MEM_THROG_MBOX:
-		/* check paramemters validity */
-		if (pParam == NULL)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_PRINT_LIST_MEM_THROG_MBOX Error: No Perameter received\n"));				
-			return TI_NOK;
-		}
-		TWD_PrintMemRegs (hTWD, *(TI_UINT32*)pParam, 256, TNETW_INTERNAL_RAM);
-        break;
-                  
-	case TWD_SET_MAC_CLOCK:
-		/* check paramemters validity */
-		if (pParam == NULL)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_SET_MAC_CLOCK Error: No Perameter received\n"));				
-			return TI_NOK;
-		}
-
-		GenericVal = *(TI_UINT32*)pParam;
-        TWD_CfgMacClock (hTWD, GenericVal);
-        break;
-
-#if defined(TNETW1150)
-	case TWD_SET_ARM_CLOCK:
-		/* check paramemters validity */
-		if (pParam == NULL)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_SET_ARM_CLOCK Error: No Perameter received\n"));				
-			return TI_NOK;
-		}
-
-		GenericVal = *(TI_UINT32*)pParam;
-        TWD_ArmClockSet (hTWD, GenericVal);
-        break;
-#endif
-
-	/*
-    * Rx functions 
-    */
-#ifdef TI_DBG
-    case TWD_PRINT_RX_INFO:
-		rxXfer_PrintStats (pTWD->hRxXfer);  
-        break;
-
-	case TWD_CLEAR_RX_INFO:
-		rxXfer_ClearStats (pTWD->hRxXfer);  
-        break;
-
-#endif /* TI_DBG */
-
-	/*
-    * Acx functions 
-    */
-    case TWD_PRINT_ACX_MAP:
-		TWD_PrintMemoryMap (hTWD);           
-        break;
-            
-	case TWD_PRINT_ACX_STAT:
-		TWD_ItrStatistics (hTWD, (void*)TWD_StatisticsReadCB, hTWD, (void *)&pTWD->acxStatistic);          
-        break;
-            			
-	/*
-	* General functions 
-    */
-    case TWD_PRINT_HELP:
-
-		WLAN_OS_REPORT(("Registers: \n"));
-        WLAN_OS_REPORT(("        %02d - TWD_PRINT_SYS_INFO \n\n", TWD_PRINT_SYS_INFO));
-        WLAN_OS_REPORT(("        %02d - TWD_SET_GENERIC_ADDR \n", TWD_SET_GENERIC_ADDR));
-		WLAN_OS_REPORT(("        %02d - TWD_READ_REG_OR_4_BYTES_MEM <addr (reg base=0x300000, mem base=0x40000)>\n", TWD_READ_MEM));
-		WLAN_OS_REPORT(("        %02d - TWD_WRITE_REG_OR_4_BYTES_MEM <addr (reg base=0x300000, mem base=0x40000)> <val (chars<=4)>\n", TWD_WRITE_MEM));
-
-        WLAN_OS_REPORT(("Control: \n"));
-        WLAN_OS_REPORT(("        %02d - TWD_PRINT_MBOX_QUEUE_INFO \n",TWD_PRINT_MBOX_QUEUE_INFO));
-        WLAN_OS_REPORT(("        %02d - TWD_PRINT_MBOX_QUEUE_PRINT_CMD \n",TWD_PRINT_MBOX_PRINT_CMD));
-        WLAN_OS_REPORT(("        %02d - TWD_MAILBOX_HISTORY_PRINT \n", TWD_MAILBOX_HISTORY_PRINT));
-        WLAN_OS_REPORT(("        %02d - TWD_MAC_REG \n", TWD_MAC_REG));
-        WLAN_OS_REPORT(("        %02d - TWD_SET_ARM_CLOCK \n", TWD_SET_ARM_CLOCK));
-        WLAN_OS_REPORT(("        %02d - TWD_SET_MAC_CLOCK \n", TWD_SET_MAC_CLOCK));
-
-        WLAN_OS_REPORT(("Rx: \n"));
-        WLAN_OS_REPORT(("        %02d - TWD_PRINT_RX_INFO \n", TWD_PRINT_RX_INFO));
-        WLAN_OS_REPORT(("        %02d - TWD_CLEAR_RX_INFO \n", TWD_CLEAR_RX_INFO));
-
-        WLAN_OS_REPORT(("ACX: \n"));
-        WLAN_OS_REPORT(("        %02d - TWD_PRINT_ACX_MAP \n", TWD_PRINT_ACX_MAP));
-		WLAN_OS_REPORT(("        %02d - TWD_PRINT_ACX_STAT \n", TWD_PRINT_ACX_STAT));
-
-        WLAN_OS_REPORT(("General: \n")); 
-        WLAN_OS_REPORT(("        %02d - TWD_PRINT_LIST_REGS_THROG_MBOX \n",  TWD_PRINT_LIST_REGS_THROG_MBOX));
-        WLAN_OS_REPORT(("        %02d - TWD_PRINT_LIST_MEM_THROG_MBOX \n",  TWD_PRINT_LIST_MEM_THROG_MBOX));
-            
-        WLAN_OS_REPORT(("Recovery: \n")); 
-        WLAN_OS_REPORT(("        %02d - TWD_CHECK_HW \n", TWD_CHECK_HW));
-        WLAN_OS_REPORT(("        %02d - TWD_PRINT_HW_STATUS \n", TWD_PRINT_HW_STATUS));
-
-		WLAN_OS_REPORT(("Event Mail Box: \n"));
-        WLAN_OS_REPORT(("        %02d - PRINT EVENT MBOX INFO \n",  TWD_PRINT_EVENT_MBOX_INFO));
-        WLAN_OS_REPORT(("        %02d - PRINT EVENT MBOX MASK \n",  TWD_PRINT_EVENT_MBOX_MASK));
-        WLAN_OS_REPORT(("        %02d - PRINT EVENT MBOX UNMASK \n",TWD_PRINT_EVENT_MBOX_UNMASK));
-
-		WLAN_OS_REPORT(("Other: \n"));
-        WLAN_OS_REPORT(("        %02d - TWD_PRINT_FW_EVENT_INFO \n",  TWD_PRINT_FW_EVENT_INFO));
-        WLAN_OS_REPORT(("        %02d - TWD_PRINT_TW_IF_INFO \n",  TWD_PRINT_TW_IF_INFO));
-        WLAN_OS_REPORT(("        %02d - TWD_PRINT_MBOX_INFO \n",  TWD_PRINT_MBOX_INFO));
-        WLAN_OS_REPORT(("        %02d - TWD_FORCE_TEMPLATES_RATES \n",  TWD_FORCE_TEMPLATES_RATES));
-        break;
-       
-	case TWD_PRINT_FW_EVENT_INFO:
-        fwEvent_PrintStat(pTWD->hFwEvent);
-        break;
-	case TWD_PRINT_TW_IF_INFO:
-        twIf_PrintQueues(pTWD->hTwIf);
-        break;
-	case TWD_PRINT_MBOX_INFO:
-        cmdMbox_PrintInfo(pTWD->hCmdMbox);
-        break;
-
-    /*
-    * Recovery functions 
-    */       
-	case TWD_CHECK_HW:
-		{
-			int Stt;
-
-            Stt = TWD_CmdHealthCheck (hTWD);
-            WLAN_OS_REPORT(("CheckHwStatus=%d \n", Stt));
-		}
-        break;
-
-	case TWD_MAILBOX_HISTORY_PRINT:
-		WLAN_OS_REPORT (("PrintMailBoxHistory called \n"));
-#ifdef TI_DBG
-		/* check paramemters validity */
-		if (pParam == NULL)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_MAILBOX_HISTORY_PRINT Error: No Perameter received\n"));				
-			return TI_NOK;
-		}
-
-        cmdQueue_PrintHistory (pTWD->hCmdQueue, *(int *)pParam);
-#endif
-        break;
-
-	case TWD_FORCE_TEMPLATES_RATES:
-		if (pParam == NULL)
-		{
-			WLAN_OS_REPORT(("TWD_Debug, TWD_FORCE_TEMPLATES_RATES Error: No Perameter received\n"));		
-			return TI_NOK;
-		}
-		cmdBld_DbgForceTemplatesRates (pTWD->hCmdBld, *(TI_UINT32 *)pParam);
-        break;
-
-
-	default:
-		WLAN_OS_REPORT (("Invalid function type=%d\n\n", funcType));
-        break;
-
-	} /* switch (funcType) */
-
-    return TI_OK;
-} 
-
diff --git a/wl1271/Test/TwIfDebug.c b/wl1271/Test/TwIfDebug.c
deleted file mode 100644
index 057dcfb..0000000
--- a/wl1271/Test/TwIfDebug.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * TwIfDebug.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/** \file   TwIfDebug.c 
- *  \brief  TwIf debug commands 
- *
- * TwIf debug commands 
- * 
- *  \see    TwIf.c, TwIf.h
- */
-
-#include "tidef.h"
-#include "report.h"
-#include "TwIf.h"
-#include "TwIfDebug.h"
-#include "TWDriverInternal.h"
-
-
-static void printTwIfDbgFunctions (void);
-
-
-/** 
- * \fn     twifDebugFunction
- * \brief  Main TwIf debug function
- * 
- * Main TwIf debug function
- * 
- * \param  hTwIf     - handle to the TWIF object
- * \param  uFuncType - the specific debug function
- * \param  pParam    - parameters for the debug function
- * \return None
- */
-void twifDebugFunction (TI_HANDLE hTWD, TI_UINT32 uFuncType, void *pParam)
-{
-    TTwd      *pTWD  = (TTwd *)hTWD;
-    TI_HANDLE  hTwIf = pTWD->hTwIf;
-
-    switch (uFuncType)
-    {
-    case DBG_TWIF_PRINT_HELP:
-        printTwIfDbgFunctions();
-        break;
-
-    case DBG_TWIF_PRINT_INFO:
-        twIf_PrintModuleInfo (hTwIf);
-        break;
-
-	default:
-   		WLAN_OS_REPORT(("Invalid function type in TWIF debug function: %d\n", uFuncType));
-        break;
-    }
-}
-
-
-/** 
- * \fn     printTwIfDbgFunctions
- * \brief  Print the TwIf debug menu
- * 
- * Print the TwIf debug menu
- * 
- * \return None
- */
-static void printTwIfDbgFunctions (void)
-{
-    WLAN_OS_REPORT(("   TwIf Debug Functions   \n"));
-	WLAN_OS_REPORT(("--------------------------\n"));
-	WLAN_OS_REPORT(("2300 - Print the TwIf Debug Help\n"));
-	WLAN_OS_REPORT(("2301 - Print the TwIf Information\n"));
-}
-
-
-
-
-
-
-
diff --git a/wl1271/Test/TwIfDebug.h b/wl1271/Test/TwIfDebug.h
deleted file mode 100644
index 260880f..0000000
--- a/wl1271/Test/TwIfDebug.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * TwIfDebug.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   TwIfDebug.h 
- *  \brief  TwIf testing module API definitions                                  
- *
- *  \see    TwIf.c, TwIf.h
- */
-
-
-#ifndef __TWIF_DBG_H__
-#define __TWIF_DBG_H__
-
-
-/************************************************************************
- * Defines
- ************************************************************************/
-/* debug functions */
-#define DBG_TWIF_PRINT_HELP		    	0
-#define DBG_TWIF_PRINT_INFO	            1
-
-
-/************************************************************************
- * Types
- ************************************************************************/
-
-
-/************************************************************************
- * Functions
- ************************************************************************/
-void twifDebugFunction (TI_HANDLE hTWD, TI_UINT32 uFuncType, void *pParam);
-
-
-
-#endif /* __TWIF_DBG_H__ */
-
diff --git a/wl1271/Test/TxDbg.c b/wl1271/Test/TxDbg.c
deleted file mode 100644
index 47de85f..0000000
--- a/wl1271/Test/TxDbg.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * TxDbg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																									*/
-/*		MODULE:																	*/
-/*    PURPOSE:										*/
-/*																									*/
-/***************************************************************************/
-#include "tidef.h"
-#include "DataCtrl_Api.h"
-#include "dataCtrlDbg.h"
-#include "osApi.h"
-#include "report.h"
-#include "siteMgrApi.h"
-#include "TWDriver.h"
-#include "txCtrl.h"
-
-void printTxRxDbgFunctions(void);
-
-
-
-/*************************************************************************
- *							rxTxDebugFunction							 *
- *************************************************************************
-DESCRIPTION:   Call the requested Tx or Rx debug print function.               
-************************************************************************/
-
-void rxTxDebugFunction(TI_HANDLE hRxTxHandle, TI_UINT32 funcType, void *pParam)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hRxTxHandle;  /* Relevant only for some of the cases below! */
-
-	switch ((ERxTxDbgFunc)funcType)
-	{
-	case TX_RX_DBG_FUNCTIONS:
-		printTxRxDbgFunctions();
-		break;
-
-	/* 
-	 *  TX DEBUG FUNCTIONS:
-	 *  ===================
-	 */
-	case PRINT_TX_CTRL_INFO:
-		txCtrlParams_printInfo (hRxTxHandle);
-		break;
-
-    case PRINT_TX_CTRL_COUNTERS:
-        txCtrlParams_printDebugCounters (hRxTxHandle);
-        break;
-
-	case PRINT_TX_DATA_QUEUE_INFO:
-		txDataQ_PrintModuleParams (pTxCtrl->hTxDataQ);
-		break;
-
-	case PRINT_TX_DATA_QUEUE_COUNTERS:
-		txDataQ_PrintQueueStatistics (pTxCtrl->hTxDataQ);
-		break;
-
-	case PRINT_TX_MGMT_QUEUE_INFO:
-		txMgmtQ_PrintModuleParams (pTxCtrl->hTxMgmtQ);
-		break;
-
-	case PRINT_TX_MGMT_QUEUE_COUNTERS:
-		txMgmtQ_PrintQueueStatistics (pTxCtrl->hTxMgmtQ);
-		break;
-
-    case PRINT_TX_CTRL_BLK_INFO:
-		TWD_PrintTxInfo (pTxCtrl->hTWD, TWD_PRINT_TX_CTRL_BLK_TBL);
-        break;
-
-    case PRINT_TX_HW_QUEUE_INFO:
-		TWD_PrintTxInfo (pTxCtrl->hTWD, TWD_PRINT_TX_HW_QUEUE_INFO);
-        break;
-
-    case PRINT_TX_XFER_INFO:
-		TWD_PrintTxInfo (pTxCtrl->hTWD, TWD_PRINT_TX_XFER_INFO);
-        break;
-
-	case PRINT_TX_RESULT_INFO:
-		TWD_PrintTxInfo (pTxCtrl->hTWD, TWD_PRINT_TX_RESULT_INFO);
-        break;
-
-	case PRINT_TX_DATA_CLSFR_TABLE:
-        txDataClsfr_PrintClsfrTable (pTxCtrl->hTxDataQ);
-        break;
-
-
-	case RESET_TX_CTRL_COUNTERS:
-		txCtrlParams_resetDbgCounters (hRxTxHandle);
-		break;
-
-	case RESET_TX_DATA_QUEUE_COUNTERS:
-		txDataQ_ResetQueueStatistics (pTxCtrl->hTxDataQ);
-		break;
-
-    case RESET_TX_DATA_CLSFR_TABLE:
-        {
-            EClsfrType  myLocalType;
-
-            /* Setting again the current classifier type clears the table */
-            txDataClsfr_GetClsfrType (pTxCtrl->hTxDataQ, &myLocalType);
-            txDataClsfr_SetClsfrType (pTxCtrl->hTxDataQ, myLocalType);
-        }
-		break;
-
-	case RESET_TX_MGMT_QUEUE_COUNTERS:
-		txMgmtQ_ResetQueueStatistics (pTxCtrl->hTxMgmtQ);
-		break;
-
-	case RESET_TX_RESULT_COUNTERS:
-		TWD_PrintTxInfo (pTxCtrl->hTWD, TWD_CLEAR_TX_RESULT_INFO);
-		break;
-        
-	case RESET_TX_XFER_COUNTERS:
-		TWD_PrintTxInfo (pTxCtrl->hTWD, TWD_CLEAR_TX_XFER_INFO);
-		break;
-        
-
-	/* 
-	 *  RX DEBUG FUNCTIONS:
-	 *  ===================
-	 */
-	case PRINT_RX_BLOCK:
-		WLAN_OS_REPORT(("RX DBG - Print Rx Block \n\n"));
-		rxData_printRxBlock(hRxTxHandle);
-		break;
-
-	case PRINT_RX_COUNTERS:
-		WLAN_OS_REPORT(("RX DBG - Print Rx counters \n\n"));
-		rxData_printRxCounters(hRxTxHandle);
-		break;
-
-	case RESET_RX_COUNTERS:
-		WLAN_OS_REPORT(("RX DBG - Reset Rx counters \n\n"));
-		rxData_resetCounters(hRxTxHandle);
-		rxData_resetDbgCounters(hRxTxHandle);
-		break;
-
-    case PRINT_RX_THROUGHPUT_START:
-		rxData_startRxThroughputTimer (hRxTxHandle);
-		break;
-
-    case PRINT_RX_THROUGHPUT_STOP:
-		rxData_stopRxThroughputTimer (hRxTxHandle);
-		break;
-
-	default:
-		WLAN_OS_REPORT(("Invalid function type in Debug Tx Function Command: %d\n\n", funcType));
-		break;
-	}
-}
-
-
-void printTxRxDbgFunctions(void)
-{
-	WLAN_OS_REPORT(("\n          Tx Dbg Functions   \n"));
-	WLAN_OS_REPORT(("--------------------------------------\n"));
-
-	WLAN_OS_REPORT(("301 - Print TxCtrl info.\n"));
-	WLAN_OS_REPORT(("302 - Print TxCtrl Statistics.\n"));
-	WLAN_OS_REPORT(("303 - Print TxDataQueue info.\n"));
-	WLAN_OS_REPORT(("304 - Print TxDataQueue Statistics.\n"));
-	WLAN_OS_REPORT(("305 - Print TxMgmtQueue info.\n"));
-	WLAN_OS_REPORT(("306 - Print TxMgmtQueue Statistics.\n"));
-	WLAN_OS_REPORT(("307 - Print TxCtrlBlk table.\n"));
-	WLAN_OS_REPORT(("308 - Print TxHwQueue info.\n"));
-	WLAN_OS_REPORT(("309 - Print TxXfer info.\n"));
-	WLAN_OS_REPORT(("310 - Print TxResult info.\n"));
-	WLAN_OS_REPORT(("311 - Print TxDataClsfr Classifier Table.\n"));
-
-	WLAN_OS_REPORT(("320 - Reset TxCtrl Statistics.\n"));
-	WLAN_OS_REPORT(("321 - Reset TxDataQueue Statistics.\n"));
-	WLAN_OS_REPORT(("322 - Reset TxDataClsfr Classifier Table.\n"));
-	WLAN_OS_REPORT(("323 - Reset TxMgmtQueue Statistics.\n"));
-	WLAN_OS_REPORT(("324 - Reset TxResult Statistics.\n"));
-	WLAN_OS_REPORT(("325 - Reset TxXfer Statistics.\n"));
-
-	WLAN_OS_REPORT(("\n          Rx Dbg Functions   \n"));
-	WLAN_OS_REPORT(("--------------------------------------\n"));
-	WLAN_OS_REPORT(("350 - Print Rx block.\n"));
-	WLAN_OS_REPORT(("351 - Print Rx counters.\n"));
-	WLAN_OS_REPORT(("352 - Reset Rx counters.\n"));
-	WLAN_OS_REPORT(("353 - Start Rx throughput timer.\n"));
-	WLAN_OS_REPORT(("354 - Stop  Rx throughput timer.\n"));
-}
-
-
diff --git a/wl1271/Test/connDebug.c b/wl1271/Test/connDebug.c
deleted file mode 100644
index 9136c4e..0000000
--- a/wl1271/Test/connDebug.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * connDebug.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file reportReplvl.c
- *  \brief Report level implementation
- *
- *  \see reportReplvl.h
- */
-
-/***************************************************************************/
-/*																									*/
-/*		MODULE:	reportReplvl.c																*/
-/*    PURPOSE:	Report level implementation	 										*/
-/*																									*/
-/***************************************************************************/
-#include "tidef.h"
-#include "osApi.h"
-#include "paramOut.h"
-#include "connDebug.h"
-#include "conn.h"
-#include "connApi.h"
-#include "report.h"
-
-#ifdef REPORT_LOG
-void printConnDbgFunctions(void);
-#endif
-
-void connDebugSetParam(TI_HANDLE hConn, TI_UINT32 paramType, TI_UINT32 *value)
-{
-#ifdef REPORT_LOG
-	conn_t	*pConn = (conn_t *)hConn;
-
-	switch (paramType)
-	{
-	default:
-		WLAN_OS_REPORT(("Invalid param type in Set Debug Connection command: %d, curr state %d\n\n", value, pConn->state));
-		break;
-	}
-#endif
-}
-
-void connDebugGetParam(TI_HANDLE hConn, TI_UINT32 paramType, TI_UINT32 *value)
-{
-#ifdef REPORT_LOG
-	conn_t	*pConn = (conn_t *)hConn;
-
-	switch (paramType)
-	{
-	default:
-		WLAN_OS_REPORT(("Invalid param type in Get Debug Connection command: %d, curr state %d\n\n", value, pConn->state));
-		break;
-	}
-#endif
-}
-
-void connDebugFunction(TI_HANDLE hConn, 
-					   TI_UINT32	funcType, 
-					   void		*pParam)
-{
-#ifdef REPORT_LOG
-	conn_t	*pConn = (conn_t *)hConn;
-
-	switch (funcType)
-	{
-	case CONN_PRINT_TEST_FUNCTIONS:
-		printConnDbgFunctions();
-		break;
-
-	case CONN_PRINT_TEST:
-		WLAN_OS_REPORT(("Connection Print Test, param = %d , curr state %d\n\n", *((TI_UINT32 *)pParam), pConn->state));
-		break;
-
-	default:
-		WLAN_OS_REPORT(("Invalid function type in Debug Connection Function Command: %d\n\n", funcType));
-		break;
-	}
-#endif
-} 
-
-void printConnDbgFunctions(void)
-{
-#ifdef REPORT_LOG
-	WLAN_OS_REPORT(("  Conn Dbg Functions  \n"));
-	WLAN_OS_REPORT(("----------------------\n"));
-
-	WLAN_OS_REPORT(("601 - Connection Print Test.\n"));
-#endif
-}
diff --git a/wl1271/Test/connDebug.h b/wl1271/Test/connDebug.h
deleted file mode 100644
index c239ac7..0000000
--- a/wl1271/Test/connDebug.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * connDebug.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __CONN_DEBUG_H__
-#define __CONN_DEBUG_H__
-
-#include "tidef.h"
-#include "paramOut.h"
-
-#define CONN_PRINT_TEST_FUNCTIONS	0
-#define	CONN_PRINT_TEST				1
-
-void connDebugSetParam(TI_HANDLE hConn, TI_UINT32 paramType, TI_UINT32 *value);
-void connDebugGetParam(TI_HANDLE hConn, TI_UINT32 paramType, TI_UINT32 *value);
-void connDebugFunction(TI_HANDLE hConn, 
-					   TI_UINT32	funcType, 
-					   void		*pParam);
-
-#endif /* __CONN_DEBUG_H__ */
-
diff --git a/wl1271/Test/ctrlDbg.c b/wl1271/Test/ctrlDbg.c
deleted file mode 100644
index 6a2953a..0000000
--- a/wl1271/Test/ctrlDbg.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * ctrlDbg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																									*/
-/*		MODULE:																	*/
-/*    PURPOSE:										*/
-/*									*/
-/***************************************************************************/
-#include "tidef.h"
-#include "Ctrl.h"
-#include "DataCtrl_Api.h"
-#include "dataCtrlDbg.h"
-#include "osApi.h"
-#include "report.h"
-#include "TWDriver.h"
-#include "paramOut.h"
-
-void printCtrlDbgFunctions(void);
-
-
-/*************************************************************************
- *																		 *
- *************************************************************************
-DESCRIPTION:                  
-                                                      
-INPUT:       
-
-OUTPUT:      
-
-RETURN:     
-                                                   
-************************************************************************/
-void ctrlDebugFunction(TI_HANDLE hCtrlData, TI_UINT32 funcType, void *pParam)
-{
-	ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-	paramInfo_t paramInfo;
-
-	switch ((ECtrlDbgFunc)funcType)
-	{
-	case CTRL_PRINT_DBG_FUNCTIONS:
-		printCtrlDbgFunctions();
-		break;
-
-	case CTRL_PRINT_CTRL_BLOCK:
-		WLAN_OS_REPORT(("CTRL DBG - Print Ctrl Block \n\n"));
-		ctrlData_printCtrlBlock(pCtrlData);
-		break;
-
-	case CTRL_PRINT_TX_PARAMETERS:
-		WLAN_OS_REPORT(("CTRL DBG - Print tx paramters \n\n"));
-		ctrlData_printTxParameters(pCtrlData);
-		break;
-
-	case CTRL_SET_CTS_TO_SELF:
-		WLAN_OS_REPORT(("CTRL DBG - Set CtsToSelf = %s\n",((*(TI_UINT8*)pParam > 0) ? "TI_TRUE" : "TI_FALSE")));
-		paramInfo.paramType = CTRL_DATA_CURRENT_PROTECTION_STATUS_PARAM;
-		paramInfo.content.ctrlDataProtectionEnabled = ((*(TI_UINT8*)pParam > 0) ? 1 : 0);
-		ctrlData_setParam(pCtrlData,&paramInfo);
-		break;
-
-	default:
-		WLAN_OS_REPORT(("Invalid function type in Debug Ctrl Function Command: %d\n\n", funcType));
-		break;
-	}
-} 
-
-
-void printCtrlDbgFunctions(void)
-{
-	WLAN_OS_REPORT(("   Ctrl Dbg Functions   \n"));
-	WLAN_OS_REPORT(("------------------------\n"));
-	WLAN_OS_REPORT(("400 - Print this menu.\n"));
-	WLAN_OS_REPORT(("401 - Print Ctrl Block.\n"));
-	WLAN_OS_REPORT(("402 - Print Tx parameters.\n"));
-  	WLAN_OS_REPORT(("403 - Set CtsToSelf.\n"));
-}
-
-
-
diff --git a/wl1271/Test/dataCtrlDbg.h b/wl1271/Test/dataCtrlDbg.h
deleted file mode 100644
index 1737230..0000000
--- a/wl1271/Test/dataCtrlDbg.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * dataCtrlDbg.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __DATA_CTRL_DBG_H__
-#define __DATA_CTRL_DBG_H__
-
-
-/* RX/TX debug functions */
-typedef enum
-{
-/* Tx debug functions */
-/*	0	*/	TX_RX_DBG_FUNCTIONS,
-/*	1	*/	PRINT_TX_CTRL_INFO,
-/*	2	*/	PRINT_TX_CTRL_COUNTERS,
-/*	3	*/	PRINT_TX_DATA_QUEUE_INFO,
-/*	4	*/	PRINT_TX_DATA_QUEUE_COUNTERS,
-/*	5	*/	PRINT_TX_MGMT_QUEUE_INFO,
-/*	6	*/	PRINT_TX_MGMT_QUEUE_COUNTERS,
-/*	7	*/	PRINT_TX_CTRL_BLK_INFO,
-/*	8	*/	PRINT_TX_HW_QUEUE_INFO,
-/*	9	*/	PRINT_TX_XFER_INFO,
-/*	10	*/	PRINT_TX_RESULT_INFO,
-/*	11	*/	PRINT_TX_DATA_CLSFR_TABLE,
-/*	20	*/	RESET_TX_CTRL_COUNTERS          = 20,
-/*	21	*/	RESET_TX_DATA_QUEUE_COUNTERS,
-/*	22	*/	RESET_TX_DATA_CLSFR_TABLE,
-/*	23	*/	RESET_TX_MGMT_QUEUE_COUNTERS,
-/*	24	*/	RESET_TX_RESULT_COUNTERS,
-/*	25	*/	RESET_TX_XFER_COUNTERS,
-
-/* Rx debug functions */
-/*	50	*/	PRINT_RX_BLOCK                  = 50,
-/*	51	*/	PRINT_RX_COUNTERS,
-/*	52	*/	RESET_RX_COUNTERS,
-/*	53	*/	PRINT_RX_THROUGHPUT_START,
-/*	54	*/	PRINT_RX_THROUGHPUT_STOP
-
-} ERxTxDbgFunc;
-
-
-/* debg functions */
-typedef enum
-{
-/*	0	*/	CTRL_PRINT_DBG_FUNCTIONS,
-/*	1	*/	CTRL_PRINT_CTRL_BLOCK,
-/*	2	*/	CTRL_PRINT_TX_PARAMETERS,
-/*	3	*/	CTRL_SET_CTS_TO_SELF
-
-} ECtrlDbgFunc;
-
-
-void rxTxDebugFunction (TI_HANDLE hRxTxHandle, TI_UINT32 funcType, void *pParam);
-void ctrlDebugFunction (TI_HANDLE hCtrlData, TI_UINT32 funcType, void *pParam);
-
-
-#endif /* __DATA_CTRL_DBG_H__*/
-
-
diff --git a/wl1271/Test/debug.c b/wl1271/Test/debug.c
deleted file mode 100644
index 9a06a82..0000000
--- a/wl1271/Test/debug.c
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * debug.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file reportReplvl.c
- *  \brief Report level implementation
- *
- *  \see reportReplvl.h
- */
-
-/***************************************************************************/
-/*                                                                         */
-/*      MODULE: reportReplvl.c                                             */
-/*    PURPOSE:  Report level implementation                                */
-/*                                                                         */
-/***************************************************************************/
-#include "tidef.h"
-#include "debug.h"
-#include "connDebug.h"
-#include "siteMgrDebug.h"
-#include "dataCtrlDbg.h"
-#include "rsnDbg.h"
-#include "osApi.h"
-#include "report.h"
-#include "context.h"
-#include "timer.h"
-#include "qosMngrDbg.h"
-#include "PowerMgrDebug.h"
-#include "roamingMgrDebug.h"
-#include "scanCncnDbg.h"
-#include "ScanMngrDbg.h"
-#include "scrDbg.h"
-#include "SoftGeminiDbg.h"
-#include "HealthMonitorDbg.h"
-#include "smeDebug.h"
-#include "DrvMainModules.h"
-#include "TWDriver.h"
-#include "fwdriverdebug.h"
-#include "MibDbg.h"
-#include "TwIfDebug.h"
-#include "tracebuf_api.h"
-
-/* Following are the modules numbers */
-typedef enum
-{
-	GENERAL_DEBUG				= 0,
-	TEST_ASSOC_MODULE_PARAM		        = 1,
-	TEST_UTILS_MODULE_PARAM	                = 2,
-	TEST_RX_TX_DATA_MODULE_PARAM            = 3,
-	TEST_CTRL_DATA_MODULE_PARAM	        = 4,
-	TEST_SITE_MGR_MODULE_PARAM	        = 5,
-	TEST_CONN_MODULE_PARAM		        = 6,
-	TEST_RSN_MODULE_PARAM	         	= 7,
-	TEST_TWD_MODULE_PARAM	                = 8,
-	TEST_QOS_MNGR_MODULE_PARAM              = 10,
-    TEST_MEASUREMENT_MODULE_PARAM           = 11,
-    TEST_POWER_MGR_MODULE_PARAM             = 12,
-	TEST_HAL_CTRL_BUFFER_PARAM	        = 13,
-    TEST_SCAN_CNCN_MODULE_PARAM             = 14,
-    TEST_SCAN_MNGR_MODULE_PARAM             = 15,
-	TEST_ROAMING_MNGR_PARAM		        = 16,
-    TEST_SCR_PARAM                          = 17,
-    TEST_SG_PARAM				= 18,
-	TEST_SME_PARAM				= 19,
-	TEST_HEALTH_MONITOR_PARAM	        = 20,
-    TEST_MIB_DEBUG_PARAM	            = 21,
-    TEST_FW_DEBUG_PARAM	                = 22,
-    TEST_TWIF_DEBUG_PARAM	            = 23,
-	/*
-    last module - DO NOT TOUCH!
-    */
-    NUMBER_OF_TEST_MODULES
-
-}	testModuleParam_e;
-
-#define MAX_PARAM_TYPE  (NUMBER_OF_TEST_MODULES - 1)
-
-/* Utils debug functions */
-#define DBG_UTILS_PRINT_HELP		    	 0
-#define DBG_UTILS_PRINT_CONTEXT_INFO         1
-#define DBG_UTILS_PRINT_TIMER_MODULE_INFO    2
-#define DBG_UTILS_PRINT_TRACE_BUFFER         3
-/* General Parameters Structure */
-typedef struct 
-{
-	TI_UINT32	paramType;
-	TI_UINT32	value;
-} testParam_t;
-
-extern void measurementDebugFunction(TI_HANDLE hMeasurementMgr, TI_HANDLE hSwitchChannel, TI_HANDLE hRegulatoryDomain, TI_UINT32 funcType, void *pParam);
-static void printMenue(void);
-static void utilsDebugFunction (TStadHandlesList *pStadHandles, TI_UINT32 funcType, void *pParam);
-static void printUtilsDbgFunctions (void);
-
-
-/******************************************************************
-*                       FUNCTIONS  IMPLEMENTATION				  *
-*******************************************************************/
-
-/** 
- * \fn     debugFunction
- * \brief  The debug functions dispatcher
- * 
- * Decode from the debug functionNumber the relevant module and call its debug
- *   function with the provided parameters.
- * The functionNumber parameter is composed as follows:
- *   Module Number      = functionNumber / 100  
- *   Specific Functionc = functionNumber % 100  
- * 
- * \note   
- * \param  pStadHandles   - Pointer to the STAD modules handles                           
- * \param  functionNumber - The module and function numbers composed in a decimal number                           
- * \param  pParam         - The function parameters (optional).                           
- * \return 
- * \sa     
- */ 
-TI_STATUS debugFunction(TStadHandlesList *pStadHandles, TI_UINT32 functionNumber, void *pParam)
-{
-    TI_UINT32  moduleNumber;
-
-    moduleNumber = functionNumber / 100;
-
-    if  (moduleNumber > MAX_PARAM_TYPE)
-        return PARAM_MODULE_NUMBER_INVALID;
-
-    switch (moduleNumber)
-    {
-    case GENERAL_DEBUG:
-        printMenue();
-        break;
-
-    case TEST_ASSOC_MODULE_PARAM:
-        break;
-
-    case TEST_UTILS_MODULE_PARAM:
-        utilsDebugFunction (pStadHandles, functionNumber % 100, pParam);
-		break;
-
-    case TEST_RX_TX_DATA_MODULE_PARAM:
-        if( functionNumber < 350)
-            rxTxDebugFunction(pStadHandles->hTxCtrl, functionNumber % 100, pParam);
-        else
-            rxTxDebugFunction(pStadHandles->hRxData, functionNumber % 100, pParam);
-        break;
-
-    case TEST_CTRL_DATA_MODULE_PARAM:
-        ctrlDebugFunction(pStadHandles->hCtrlData, functionNumber % 100, pParam);
-        break;
-
-    case TEST_SITE_MGR_MODULE_PARAM:
-        siteMgrDebugFunction(pStadHandles->hSiteMgr, pStadHandles, functionNumber % 100, pParam);
-        break;
-
-    case TEST_CONN_MODULE_PARAM:
-        connDebugFunction(pStadHandles->hConn, functionNumber % 100, pParam);
-        break;
-
-    case TEST_RSN_MODULE_PARAM:
-        rsnDebugFunction(pStadHandles->hRsn, functionNumber % 100, pParam);
-        break;
-
-    case TEST_TWD_MODULE_PARAM:
-        TWD_Debug (pStadHandles->hTWD, functionNumber % 100, pParam);
-        break;
-
-    case TEST_QOS_MNGR_MODULE_PARAM:
-        qosMngrDebugFunction(pStadHandles->hQosMngr, functionNumber % 100, pParam);
-        break;
-
-    case TEST_MEASUREMENT_MODULE_PARAM:
-        measurementDebugFunction (pStadHandles->hMeasurementMgr, 
-                                  pStadHandles->hSwitchChannel, 
-                                  pStadHandles->hRegulatoryDomain, 
-                                  functionNumber % 100, 
-                                  pParam);
-        break;
-
-    case TEST_POWER_MGR_MODULE_PARAM:
-        powerMgrDebugFunction(pStadHandles->hPowerMgr,
-                              functionNumber % 100,
-                              pParam);
-        break;
-
-    case TEST_SCAN_CNCN_MODULE_PARAM:
-        scanConcentratorDebugFunction( pStadHandles->hScanCncn, pStadHandles->hTWD ,functionNumber % 100, pParam );
-        break;
-
-    case TEST_SCAN_MNGR_MODULE_PARAM:
-        scanMngrDebugFunction( pStadHandles->hScanMngr, functionNumber  % 100, pParam, pStadHandles->hSiteMgr, pStadHandles->hCtrlData );
-        break;
-
-    case TEST_ROAMING_MNGR_PARAM:
-        roamingMgrDebugFunction(pStadHandles->hRoamingMngr, functionNumber % 100, pParam);
-        break;
-
-    case TEST_SCR_PARAM:
-        scrDebugFunction( pStadHandles->hSCR, functionNumber % 100, pParam );
-        break;
-    
-    case TEST_SG_PARAM:
-        SoftGeminiDebugFunction( pStadHandles->hSoftGemini, functionNumber % 100, pParam );
-        break;
-
-    case TEST_SME_PARAM:
-        smeDebugFunction( pStadHandles->hSme, functionNumber % 100, pParam );
-        break;
-
-    case TEST_HEALTH_MONITOR_PARAM:
-        healthMonitorDebugFunction (pStadHandles, functionNumber % 100, pParam);
-        break;
-
-    case TEST_MIB_DEBUG_PARAM:
-         MibDebugFunction(pStadHandles->hTWD, functionNumber % 100, pParam);
-        break;
-
-    case TEST_FW_DEBUG_PARAM:
-         FWDebugFunction(pStadHandles->hDrvMain, 
-						 pStadHandles->hOs, 
-						 pStadHandles->hTWD, 
-						 pStadHandles->hMlmeSm, 
-						 pStadHandles->hTxMgmtQ,
-						 pStadHandles->hTxCtrl,
-						 functionNumber % 100, 
-						 pParam/*yael , packetNum*/);
-        break;
-
-    case TEST_TWIF_DEBUG_PARAM:
-         twifDebugFunction (pStadHandles->hTWD, functionNumber % 100, pParam);
-        break;
-
-    default:
-        WLAN_OS_REPORT(("Invalid debug function module number: %d\n\n", moduleNumber)); 
-        break;
-    }
-
-    return TI_OK;
-}
-
-static void printMenue(void)
-{
-    WLAN_OS_REPORT(("   Debug main menu (p <num>)\n"));
-    WLAN_OS_REPORT(("-----------------------------\n"));
-
-    WLAN_OS_REPORT(("Association             100\n")); 
-    WLAN_OS_REPORT(("Utils                   200\n"));
-    WLAN_OS_REPORT(("Tx                      300\n"));
-    WLAN_OS_REPORT(("Rx                      350\n"));
-    WLAN_OS_REPORT(("Ctrl                    400\n"));
-    WLAN_OS_REPORT(("SiteMgr                 500\n"));
-    WLAN_OS_REPORT(("Connection              600\n"));
-    WLAN_OS_REPORT(("Rsn                     700\n"));
-    WLAN_OS_REPORT(("Hal Ctrl                800\n"));
-    WLAN_OS_REPORT(("QOS                    1000\n"));
-    WLAN_OS_REPORT(("Measurement            1100\n"));
-    WLAN_OS_REPORT(("PowerMgr               1200\n"));
-    WLAN_OS_REPORT(("HAL Ctrl Buffer        1300\n"));
-    WLAN_OS_REPORT(("Scan concentrator      1400\n"));
-    WLAN_OS_REPORT(("Scan Manager           1500\n"));
-    WLAN_OS_REPORT(("Roaming Manager        1600\n"));
-    WLAN_OS_REPORT(("SCR                    1700\n"));
-    WLAN_OS_REPORT(("Soft Gemini            1800\n"));
-    WLAN_OS_REPORT(("SME                    1900\n"));
-    WLAN_OS_REPORT(("Health Monitor         2000\n"));
-    WLAN_OS_REPORT(("MIB                    2100\n"));
-    WLAN_OS_REPORT(("FW Debug               2200\n"));
-    WLAN_OS_REPORT(("TwIf                   2300\n"));
-}
-
-
-/**
- * \fn    utilsDebugFunction
- * \brief Utils debug function
- *
- * \param pDrvMain - handle to the DrvMain object.\n
- * \param funcType - the specific debug function.\n
- * \param pParam - parameters for the debug function.\n
- */
-static void utilsDebugFunction (TStadHandlesList *pStadHandles, TI_UINT32 funcType, void *pParam)
-{
-    switch (funcType)
-    {
-        case DBG_UTILS_PRINT_HELP:
-            printUtilsDbgFunctions ();
-            break;
-    
-        case DBG_UTILS_PRINT_CONTEXT_INFO:
-            context_Print (pStadHandles->hContext);
-            break;
-    
-        case DBG_UTILS_PRINT_TIMER_MODULE_INFO:
-            tmr_PrintModule (pStadHandles->hTimer);
-            break;
-    
-        case DBG_UTILS_PRINT_TRACE_BUFFER:
-/*          tb_printf(); */
-            break;
-    
-        default:
-       		WLAN_OS_REPORT(("utilsDebugFunction(): Invalid function type: %d\n", funcType));
-            break;
-    }
-}
-
-/**
- * \fn    printUtilsDbgFunctions
- * \brief Prints Utils debug menu
- *
- */
-static void printUtilsDbgFunctions (void)
-{
-    WLAN_OS_REPORT(("   Utils Debug Functions   \n"));
-	WLAN_OS_REPORT(("---------------------------\n"));
-	WLAN_OS_REPORT(("200 - Print the Utils Debug Help\n"));
-	WLAN_OS_REPORT(("201 - Print Context module info\n"));
-	WLAN_OS_REPORT(("202 - Print Timer module info\n"));
-	WLAN_OS_REPORT(("203 - Print the trace buffer\n"));
-}
-
diff --git a/wl1271/Test/debug.h b/wl1271/Test/debug.h
deleted file mode 100644
index b104aca..0000000
--- a/wl1271/Test/debug.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * debug.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   debug.h 
- *  \brief  debug module header file.                                  
- *
- *  \see    debug.c
- */
- 
-#ifndef __DEBUG_H__
-#define __DEBUG_H__
-
-#include "tidef.h"
-#include "commonTypes.h"
-#include "DrvMainModules.h"
-
-
-TI_STATUS debugFunction (TStadHandlesList *pStadHandles, TI_UINT32 functionNumber, void *hParam);
-
-
-#endif /* __DEBUG_H__ */
diff --git a/wl1271/Test/fwdriverdebug.c b/wl1271/Test/fwdriverdebug.c
deleted file mode 100644
index c7f1ba3..0000000
--- a/wl1271/Test/fwdriverdebug.c
+++ /dev/null
@@ -1,398 +0,0 @@
-/*
- * fwdriverdebug.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   FW_debug.c                                                 */
-/*    PURPOSE:  FW debug implementation                                    */
-/*                                                                         */
-/***************************************************************************/
-#include "tidef.h"
-#include "DrvMain.h"
-#include "CmdQueue_api.h"
-#include "debug.h"
-#include "connDebug.h"
-#include "siteMgrDebug.h"
-#include "dataCtrlDbg.h"
-#include "rsnDbg.h"
-#include "osApi.h"
-#include "report.h"
-#include "qosMngrDbg.h"
-#include "PowerMgrDebug.h"
-#include "roamingMgrDebug.h"
-#include "scanCncnDbg.h"
-#include "ScanMngrDbg.h"
-#include "scrDbg.h"
-#include "SoftGeminiDbg.h"
-#include "HealthMonitorDbg.h"
-#include "smeDebug.h"
-#include "TWDriver.h"
-#include "CmdBld.h"
-#include "commonTypes.h"
-#include "siteHash.h"
-#include "txCtrl.h"
-#include "802_11Defs.h"
-#include "fwdriverdebug.h"
-#include "mlmeBuilder.h"
-#include "Ethernet.h"
-
-static TI_HANDLE dTimer;
-static TI_HANDLE tmp_hMlme;
-static TI_HANDLE tmp_hTWD;
-static TI_HANDLE tmp_hTxCtrl;
-static TI_BOOL SendFlag = 0;
-static TI_BOOL bSendDataPkt;
-static volatile TI_UINT32 numOfPackets;
-static volatile TI_UINT8 infinitLoopFl = 0;
-static TI_UINT32 packetsNum;
-static TI_UINT32 packetLength;
-
-typedef TI_STATUS (*TCmdCfgFuncB) (TI_HANDLE);
-
-extern TI_STATUS cmdBld_CmdJoinBss (TI_HANDLE hCmdBld, TJoinBss *pJoinBssParams, void *fCb, TI_HANDLE hCb);
-void sendMgmtPacket (TI_HANDLE hOs);
-void sendDataPacket (TI_HANDLE hOs);
-
-void FWDebugFunction(TI_HANDLE hDrvMain, 
-					 TI_HANDLE hOs, 
-					 TI_HANDLE hTWD, 
-					 TI_HANDLE hMlme, 
-					 TI_HANDLE hTxMgmtQ,
-					 TI_HANDLE hTxCtrl,
-					 unsigned long funcType, 
-					 void *pParam)
-{
-	tmp_hMlme   = hMlme;
-    tmp_hTWD    = hTWD;
-    tmp_hTxCtrl = hTxCtrl;
-
-	switch (funcType)
-	{
-	case DBG_FW_PRINT_HELP:
-		 printFWDbgFunctions();
-		 break;
-	case DBG_FW_SEND_GENERAL_TEST_CMD:
-		 FW_debugSendGeneralTestCmd(hTWD, pParam);
-		 break;
-	case DBG_FW_IBSS_CONNECTION:
-		 FW_DebugSendJoinCommand(hTWD, hTxMgmtQ);
-		 break;
-	case DBG_FW_SEND_MGMT_PACKET:
-         bSendDataPkt = TI_FALSE;
-		 FW_DebugSendPacket(hDrvMain, hOs, hTxMgmtQ, pParam);
-		 break;
-    case DBG_FW_SEND_DATA_PACKET: 
-         bSendDataPkt = TI_TRUE;
-		 FW_DebugSendPacket(hDrvMain, hOs, hTxMgmtQ, pParam);
-		 break;
-	case DBG_FW_START_LOOPBACK:
-		 FW_DebugStartLoopBack (hDrvMain, hTWD);
-		 break;
-	case DBG_FW_STOP_LOOPBACK:
-		 FW_DebugStopLoopBack (hDrvMain, hTWD);
-		 break;
-	case DBG_FW_INFINIT_SEND:
-		 FW_DebugInfinitSendPacket (hDrvMain, hTWD);
-		 break;
-
-	case DBG_FW_GENERAL:
-		 FW_DebugGeneral (hTWD, pParam);
-		 break;
-	default:
-		break;
-
-
- }
-}
-
-void printFWDbgFunctions(void)
-{
-    WLAN_OS_REPORT(("    FW Debug Functions     	          	\n"));
-    WLAN_OS_REPORT(("---------------------------------------------------\n"));
-    WLAN_OS_REPORT(("2200 		- Print the FW Debug Help		\n"));
-    WLAN_OS_REPORT(("2201 		- Send General Test Command 	\n"));
-    WLAN_OS_REPORT(("2202 		- create IBSS connection   	 	\n"));
-    WLAN_OS_REPORT(("2203[n] 	- Send n<=999 Packets           \n"));
-    WLAN_OS_REPORT(("2205 		- Start LoopBack            	\n"));
-    WLAN_OS_REPORT(("2206 		- Stop LoopBack             	\n"));
-}
-
-
-void FW_debugSendGeneralTestCmd(TI_HANDLE hTWD, void *pParam)
-{
-	TTwd     *pTWD = (TTwd *)hTWD;
-	FWDebugTestCmdParamter_t Cfg;
-	unsigned char Len;
-	Len = *(unsigned char *)pParam;
-	
-	os_memoryCopy(pTWD->hOs, Cfg.buf,(unsigned long*)pParam + sizeof(TI_UINT8),Len * 4 );
-  
-	Cfg.len = Len;
-	
-	/* Set information element header */
-	Cfg.EleHdr.id = CMD_TEST;
-	Cfg.EleHdr.len = sizeof(Cfg) - sizeof(EleHdrStruct);
-	  
-    cmdQueue_SendCommand (pTWD->hCmdQueue, CMD_CONFIGURE, (void*)&Cfg, sizeof(Cfg), NULL, NULL, NULL);
-}
-
-void FW_DebugSendJoinCommand(TI_HANDLE hTWD, TI_HANDLE hTxMgmtQ)
-{
-	TTwd     *pTWD = (TTwd *)hTWD;
-	TCmdBld  *pCmdBld = (TCmdBld *)(pTWD->hCmdBld);
-	TI_STATUS res;
-	TJoinBss  JoinBss;
-	char ssid[10];
-	unsigned char Bssid[6] = {0x0,0x12,0x43,0xad,0xe5,0x10};
-
-	os_memoryCopy(pTWD->hOs,ssid,"ronit",5);
-  
-	JoinBss.basicRateSet = DRV_RATE_2M;
-	JoinBss.radioBand = RADIO_BAND_2_4_GHZ;
-	JoinBss.pBSSID = Bssid;
-	
-	JoinBss.bssType = BSS_INDEPENDENT;
-	JoinBss.pSSID =ssid;
-	JoinBss.ssidLength = 5;
-	JoinBss.channel = 1;
-	JoinBss.beaconInterval = 100;
-	JoinBss.dtimInterval = 2;
-  
-	pCmdBld->hReport = pTWD->hReport;
-	pCmdBld->tDb.bss.BssId[0] = 0x0;
-	pCmdBld->tDb.bss.BssId[1] = 0x12;
-	pCmdBld->tDb.bss.BssId[2] = 0x43;
-	pCmdBld->tDb.bss.BssId[3] = 0xad;
-	pCmdBld->tDb.bss.BssId[4] = 0xe5;
-	pCmdBld->tDb.bss.BssId[5] = 0x10;
-	pCmdBld->tDb.bss.RadioChannel = 1;
-   
-	txMgmtQ_SetConnState(hTxMgmtQ,TX_CONN_STATE_MGMT);
-  
-	res = cmdBld_CmdJoinBss  (pCmdBld, 
-							  &JoinBss, 
-							  NULL,//cmdBld_ConfigSeq, 
-							  NULL);//pTWD->hCmdBld
-  
-	if (res)
-	{
-		os_printf("\n failed to make IBSS connection\n");
-	}
-  
-	os_printf("\n res = %d\n", res);
-   
-	txMgmtQ_SetConnState(hTxMgmtQ, TX_CONN_STATE_MGMT);
-
-}
-
-
-void sendDataPacket (TI_HANDLE hOs)
-{
-    TI_UINT32       i;
-	TTxCtrlBlk *    pPktCtrlBlk;
-    TI_UINT8 *      pPktBuf;
-    TEthernetHeader tEthHeader;
-	char SrcBssid[6] = {0x88,0x88,0x88,0x88,0x88,0x88};
-	char DesBssid[6] = {0x22,0x22,0x22,0x22,0x22,0x22};
-
-	/* Allocate a TxCtrlBlk for the Tx packet and save timestamp, length and packet handle */
-    pPktCtrlBlk = TWD_txCtrlBlk_Alloc (tmp_hTWD);
-    pPktCtrlBlk->tTxDescriptor.startTime = os_timeStampMs (hOs);
-    pPktCtrlBlk->tTxDescriptor.length    = (TI_UINT16)packetLength + ETHERNET_HDR_LEN;
-    pPktCtrlBlk->tTxDescriptor.tid       = 0;
-    pPktCtrlBlk->tTxPktParams.uPktType   = TX_PKT_TYPE_ETHER;
-
-    /* Allocate buffer with headroom for getting the IP header in a 4-byte aligned address */
-    pPktBuf = txCtrl_AllocPacketBuffer (tmp_hTxCtrl, pPktCtrlBlk, packetLength + ETHERNET_HDR_LEN + 2);
-
-    /* Prepare Ethernet header */
-    tEthHeader.type = HTOWLANS(ETHERTYPE_IP);
-    MAC_COPY (tEthHeader.src, SrcBssid);
-    MAC_COPY (tEthHeader.dst, DesBssid);
-    os_memoryCopy (hOs, pPktBuf + 2, &tEthHeader, ETHERNET_HDR_LEN);
-
-    /* Build BDL */
-    BUILD_TX_TWO_BUF_PKT_BDL (pPktCtrlBlk, 
-                              pPktBuf + 2, 
-                              ETHERNET_HDR_LEN, 
-                              pPktBuf + 2 + ETHERNET_HDR_LEN, 
-                              packetLength)
-
-    /* Fill data buffer with incremented numbers */
-    for (i = 0; i < packetLength; i++) 
-    {
-        *(pPktBuf + 2 + ETHERNET_HDR_LEN + i) = i;
-    }
-
-    /* Send Ether packet to TxCtrl */
-    txCtrl_XmitData (tmp_hTxCtrl, pPktCtrlBlk);
-}
-
-
-
-void sendMgmtPacket(TI_HANDLE hOs)
-{
-    static TI_UINT8     aMsg[2000];
-    TI_UINT32           i;
-    dot11MgmtSubType_e  eMsgType = DE_AUTH;
-    
-    for (i = 0; i < packetLength; i++) 
-    {
-        aMsg[i] = i;
-    }
-
-    mlmeBuilder_sendFrame(tmp_hMlme, eMsgType, aMsg, packetLength, 0);
-    
-    numOfPackets++;
-    if ((infinitLoopFl == 0) && (numOfPackets > packetsNum))
-    {      
-        os_timerStop(hOs, dTimer);
-        os_printf("\n *********** Last Packet was sent **********");
-        os_timerDestroy(hOs, dTimer);
-    }
-    else
-    {
-        os_timerStart(hOs, dTimer, 1000); 
-    }
-}
-
-void FW_DebugSendPacket(TI_HANDLE hDrvMain ,TI_HANDLE hOs, TI_HANDLE hTxMgmtQ, void *pParam)
-{
-    void *fSendPkt;
-
-	if ( pParam == NULL )
-	{
-        os_printf("\nFW_DebugSendPacket Error: received NULL parameter\n");
-		return;
-	}
-
-    /* Open Tx path for all packet types */
-    txMgmtQ_SetConnState (hTxMgmtQ, TX_CONN_STATE_MGMT);
-    txMgmtQ_SetConnState (hTxMgmtQ, TX_CONN_STATE_EAPOL);
-    txMgmtQ_SetConnState (hTxMgmtQ, TX_CONN_STATE_OPEN);
-
-	infinitLoopFl	= 0;
-	numOfPackets 	= 1;
-	packetsNum 		= 1;
-	packetLength    = *(TI_UINT32*)pParam;
-    os_printf("\nFW_DebugSendPacket: packetsNum = %d, packetLength = %d\n",packetsNum, packetLength);
-    fSendPkt = bSendDataPkt ? sendDataPacket : sendMgmtPacket;
-    dTimer = os_timerCreate(hOs, fSendPkt, hDrvMain);
-    os_timerStart(hOs, dTimer, 1000);       
-    
-    SendFlag = TI_TRUE;   
-}
-
-void FW_DebugInfinitSendPacket(TI_HANDLE hDrvMain ,TI_HANDLE hOs)
-{
-	infinitLoopFl = 1;
-	numOfPackets = 1;
-
-    dTimer = os_timerCreate(hOs, sendMgmtPacket, hDrvMain); 
-    os_timerStart(hOs, dTimer, 1000);        
-    SendFlag = TI_TRUE;   
-}
-
-void FW_DebugStartLoopBack (TI_HANDLE hDrvMain, TI_HANDLE hTWD)
-{    
-	TTwd     *pTWD = (TTwd *)hTWD;
-	TTestCmd     Plt;
-	  
-	Plt.testCmdId = TEST_CMD_LOOPBACK_START;
-	os_printf("\n send loopback start command");  
-	cmdQueue_SendCommand (pTWD->hCmdQueue, CMD_TEST, (char*)&Plt, sizeof(Plt), NULL, NULL, NULL);
-}
-
-
-void FW_DebugStopLoopBack (TI_HANDLE hDrvMain, TI_HANDLE hTWD)
-{    
-	TTwd     *pTWD = (TTwd *)hTWD;
-	TTestCmd     Plt;
-		
-	Plt.testCmdId = TEST_CMD_LOOPBACK_STOP;
-	os_printf("\n send loopback stop command");
-	cmdQueue_SendCommand (pTWD->hCmdQueue, CMD_TEST, (char*)&Plt, sizeof(Plt), NULL, NULL, NULL);  
-}
-
-
-void FW_DebugGeneral(TI_HANDLE hTWD, void *pParam)
-{
-	TTwd     *pTWD = (TTwd *)hTWD;
-	TI_UINT32 size = *((TI_UINT32*) pParam) + sizeof(TI_UINT32);
-
-	cmdQueue_SendCommand (pTWD->hCmdQueue, CMD_DEBUG, (char*)pParam, size, NULL, NULL, NULL);
-}
-
-
-/*
-void FW_ComparePacket (char *buf)
- {
- char *ptemp;
- int i;
-
-   if (SendFlag)
-   {
-       ptemp = CompBuf;
-       os_printf("\n print before compare save buf");
-       os_printf("\n");
-       for (i=0;i<Len;i++) {
-           os_printf(" 0x%02x  ",*ptemp++);
-           if (i %5 == 0) { os_printf("\n");
-           }
-
-       }
-
-       os_printf("\n print before compare recived packet");
-       ptemp = buf;
-       os_printf("\n");
-       for (i=0;i<Len;i++) {
-           os_printf(" 0x%02x  ",*ptemp++);
-           if (i %5 == 0) { 
-           }
-
-       }
-
-
-     if(memcmp(CompBuf,buf,Len))
-       os_printf("\n LoopBack Packet failed");
-      else
-      os_printf("\n LoopBack Packet success");
-
-      SendFlag = TI_FALSE;
-   }
-
- }
-*/
-
-
diff --git a/wl1271/Test/fwdriverdebug.h b/wl1271/Test/fwdriverdebug.h
deleted file mode 100644
index ceca6f4..0000000
--- a/wl1271/Test/fwdriverdebug.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * fwdriverdebug.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/* \file FW_debug.h
- *  \brief This file include private definitions for the FW debug module.
- */
-
-#ifndef __FW_DEBUG_H__
-#define __FW_DEBUG_H__
-
-
-#include "tidef.h"
-#include "public_infoele.h"
-#include "TWDriver.h"
-#include "TWDriverInternal.h"
-
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-
-/* debug functions */
-#define DBG_FW_PRINT_HELP					 	0
-#define DBG_FW_SEND_GENERAL_TEST_CMD	    	1
-#define DBG_FW_IBSS_CONNECTION	        		2
-#define DBG_FW_SEND_MGMT_PACKET                	3
-#define DBG_FW_SEND_DATA_PACKET	                4
-#define DBG_FW_START_LOOPBACK      				5
-#define DBG_FW_STOP_LOOPBACK                    6
-#define DBG_FW_INFINIT_SEND	                    7
-#define DBG_FW_GENERAL		                    10
-
-/*
- ***********************************************************************
- *	Enums.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Structure definitions.
- ***********************************************************************
- */
- typedef struct {
- INFO_ELE_HDR  
- unsigned char len;
- unsigned long buf[20];
- }FWDebugTestCmdParamter_t;
-
- typedef struct {
- INFO_ELE_HDR  
- TTestCmd     Plt; 
- }FWDebugPLT_t;
-
-/*
- ***********************************************************************
- *	External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-
-void FWDebugFunction(TI_HANDLE hDrvMain, 
-					 TI_HANDLE hOs, 
-					 TI_HANDLE hTWD, 
-					 TI_HANDLE hMlme, 
-					 TI_HANDLE hTxMgmtQ,
-					 TI_HANDLE hTxCtrl,
-					 unsigned long funcType, 
-					 void *pParam 
-					 /*yael unsigned long packetNum*/);
-void FW_debugSendGeneralTestCmd(TI_HANDLE hTWD, void *pParam);
-void FW_DebugSendJoinCommand(TI_HANDLE hTWD, TI_HANDLE hTxMgmtQ);
-void FW_DebugSendPacket(TI_HANDLE hDrvMain ,TI_HANDLE hOs, TI_HANDLE hTxMgmtQ, void* pParam);
-void FW_DebugInfinitSendPacket(TI_HANDLE hDrvMain ,TI_HANDLE hOs);
-void FW_DebugStartLoopBack (TI_HANDLE hDrvMain, TI_HANDLE hTWD);
-void FW_DebugStopLoopBack (TI_HANDLE hDrvMain, TI_HANDLE hTWD);
-void FW_ComparePacket (char *buf);
-void printFWDbgFunctions(void);
-void FW_DebugGeneral(TI_HANDLE hTWD, void *pParam);
-
-
-
-#endif 
-
diff --git a/wl1271/Test/measurementDbg.c b/wl1271/Test/measurementDbg.c
deleted file mode 100644
index 9e0566b..0000000
--- a/wl1271/Test/measurementDbg.c
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- * measurementDbg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file measurementDbg.c
- *  \brief measurement module Debug interface
- *
- *  \see measurementDbg.h
- */
-
-/***************************************************************************/
-/*																	       */
-/*	  MODULE:	measurementDbg.c										   */
-/*    PURPOSE:	measurement module Debug interface						   */
-/*																		   */
-/***************************************************************************/
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "paramOut.h"
-#include "measurementDbg.h"
-#include "siteMgrApi.h"
-#include "measurementMgr.h"
-#include "MeasurementSrv.h"
-#include "MacServices_api.h"
-#include "MacServices.h"
-#include "sme.h"
-#ifdef XCC_MODULE_INCLUDED  
-#include "XCCRMMngr.h"
-#endif
-#include "SwitchChannelApi.h"
-#include "TWDriver.h"
-
-
-void printMeasurementDbgFunctions(void);   
-
-void regDomainPrintValidTables(TI_HANDLE hRegulatoryDomain);
-
-TI_UINT32			channelNum;
-TI_BOOL            flag;
-
-/*************************************************************************
- *					measurementDebugFunction							 *
- *************************************************************************
-DESCRIPTION:                  
-                                                      
-INPUT:       
-
-OUTPUT:      
-
-RETURN:     
-                                                   
-************************************************************************/
-void measurementDebugFunction(TI_HANDLE hMeasurementMgr, TI_HANDLE hSwitchChannel, TI_HANDLE hRegulatoryDomain, TI_UINT32 funcType, void *pParam)
-{
-    paramInfo_t		param;
-#ifdef XCC_MODULE_INCLUDED
-    TTwdParamInfo   tTwdParam;
-#endif
-    TI_STATUS	    status = TI_OK;
-    TI_UINT8           rangeUpperBound;
-    TI_UINT8           rangeIndex;
-    TI_UINT16          trafficThreshold;
-    TNoiseHistogram pNoiseHistParams;
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-    TI_UINT8			SwitchChannelParam = *(TI_UINT8*)pParam;
-#ifdef REPORT_LOG
-    siteMgr_t		*pSiteMgr = (siteMgr_t *) pMeasurementMgr->hSiteMgr;
-#endif
-#ifdef XCC_MODULE_INCLUDED
-    TI_UINT8           iappPacket[90] = {0xAA, 0xAA, 0x03, 0x00, 0x40, 0x96, 0x00, 0x00, 
-                                      0x00, 0x20, 0x32, 0x01, 
-                                      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-                                      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-                                      0x20, 0x00, 0x01, 0x02, 
-                                      0x26, 0x00, 0x08, 0x00, 0xA1, 0x00, 0x00, 0x01, 
-                                      0x0B, 0x00, 0x26, 0x26};
-    
-    TI_UINT8           iappPacket1[76] = {0xAA, 0xAA, 0x03, 0x00, 0x40, 0x96, 0x00, 0x00, 
-                                       0x00, 0x20, 0x32, 0x01, 
-                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-                                       0x30, 0x00, 0x01, 0x02, 
-                                       0x26, 0x00, 0x08, 0x00, 0xF1, 0x00, 0x00, 0x01, 
-                                       0x06, 0x00, 0x64, 0x00};
-
-    TI_UINT8           iappPacket2[76] = {0xAA, 0xAA, 0x03, 0x00, 0x40, 0x96, 0x00, 0x00, 
-                                       0x00, 0x20, 0x32, 0x01, 
-                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-                                       0x13, 0x00, 0x01, 0x02, 
-                                       0x26, 0x00, 0x08, 0x00, 0xA3, 0x00, 0x00, 0x03, 
-                                       0x0B, 0x02, 0xD1, 0x03};
-
-    TI_UINT8           iappPacket3[76] = {0xAA, 0xAA, 0x03, 0x00, 0x40, 0x96, 0x00, 0x00,
-                                       0x00, 0x38, 0x32, 0x01,
-                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                       0x20, 0x00, 0x01, 0x02,
-                                       0x26, 0x00, 0x08, 0x00, 0xA1, 0x00, 0x00, 0x03,
-                                       0x03,
-									   0X00, 0XFF, 0X00, 0X26, 0X00, 0X08,
-									   0X00, 0XC1, 0X00, 0X00, 0X02, 0X03,
-									   0X00, 0XFF, 0X00, 0X26, 0X00, 0X08,
-									   0X00, 0XB1, 0X00, 0X00, 0X01, 0X03,
-				                       0X00, 0XFF, 0X00};
-
-    TI_UINT8           iappPacket4[76] = {0xAA, 0xAA, 0x03, 0x00, 0x40, 0x96, 0x00, 0x00,
-                                       0x00, 0x38, 0x32, 0x01,
-                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                       0x20, 0x00, 0x01, 0x02,
-                                       0x26, 0x00, 0x08, 0x00, 0xA1, 0x00, 0x00, 0x03,
-                                       0x06,
-									   0X00, 0X32, 0X00, 0X26, 0X00, 0X08,
-									   0X00, 0XC1, 0X00, 0X00, 0X02, 0X01,
-									   0X00, 0XFF, 0X00, 0X26, 0X00, 0X08,
-									   0X00, 0XB1, 0X00, 0X01, 0X01, 0X01,
-				                       0X00, 0X96, 0X00};
-#endif
-
-	switch (funcType)
-	{
-	case DBG_MEASUREMENT_PRINT_HELP:
-		printMeasurementDbgFunctions();
-		break;
-	case DBG_MEASUREMENT_PRINT_STATUS:
-		param.paramType = MEASUREMENT_GET_STATUS_PARAM;
-		measurementMgr_getParam(hMeasurementMgr, &param);
-		break;
-
-#if 0
-
-	case DBG_MEASUREMENT_CHANNEL_LOAD_START:
-        
-        /* Clearing the Medium Occupancy Register */
-        tTwdParam.paramType = HAL_CTRL_MEDIUM_OCCUPANCY_PARAM;
-        tTwdParam.content.interogateCmdCBParams.CB_Func = measurement_mediumUsageCB;
-        tTwdParam.content.interogateCmdCBParams.CB_handle = hMeasurementMgr;
-        tTwdParam.content.interogateCmdCBParams.CB_buf = (TI_UINT8*)(&(pMeasurementMgr->mediumOccupancyStart));
-
-        if ((status = TWD_GetParam (pMeasurementMgr->hTWD, &tTwdParam)) == TI_OK)
-        {
-            WLAN_OS_REPORT(("%s: MEASUREMENT - Channel Load Started!\n", __FUNCTION__));            
-		}
-		
-		break;
-
-    case DBG_MEASUREMENT_CHANNEL_LOAD_STOP:
-        
-        /* Getting the Medium Occupancy Register */
-        tTwdParam.paramType = HAL_CTRL_MEDIUM_OCCUPANCY_PARAM;
-        tTwdParam.content.interogateCmdCBParams.CB_Func = measurement_channelLoadCallBackDbg;
-        tTwdParam.content.interogateCmdCBParams.CB_handle = hMeasurementMgr;
-        tTwdParam.content.interogateCmdCBParams.CB_buf = (TI_UINT8*)(&(pMeasurementMgr->mediumOccupancyEnd));
-        
-        if ((status = TWD_GetParam (pMeasurementMgr->hTWD, &tTwdParam)) == TI_OK)
-        {
-            WLAN_OS_REPORT(("%s: MEASUREMENT - Channel Load Stoped!", __FUNCTION__));            
-        }
-
-		break;
-
-#endif /* 0 */
-
-    case DBG_MEASUREMENT_SEND_FRAME_REQUEST:
-
-	    WLAN_OS_REPORT(("-----------------------------------------------------\n"));
-        WLAN_OS_REPORT(("   Measurement Debug Function: Sending Frame Request \n"));
-	    WLAN_OS_REPORT(("-----------------------------------------------------\n"));
-
-        WLAN_OS_REPORT(("beaconInterval = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->beaconInterval));
-		WLAN_OS_REPORT(("dtimPeriod = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->dtimPeriod));
-
-#ifdef XCC_MODULE_INCLUDED        
-        measurementMgr_XCCParse(hMeasurementMgr, iappPacket);
-#endif
-
-	    WLAN_OS_REPORT(("-----------------------------------------------------\n"));
-        WLAN_OS_REPORT(("   Measurement Debug Function: END                   \n"));
-	    WLAN_OS_REPORT(("-----------------------------------------------------\n"));
-
-        break;
-
-    case DBG_MEASUREMENT_START_NOISE_HIST:
-        /* Set Noise Histogram Cmd Params */
-        pNoiseHistParams.cmd = START_NOISE_HIST;
-        pNoiseHistParams.sampleInterval = 100;
-        os_memoryZero(pMeasurementMgr->hOs, &(pNoiseHistParams.ranges[0]), MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES);
-        
-        /* Set Ranges */
-        rangeUpperBound = (TI_UINT8)-87; /* TWD_convertRSSIToRxLevel(pMeasurementMgr->hTWD, -87);*/
-        for(rangeIndex = 0; rangeIndex < MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES - 1; rangeIndex++)
-        {
-            pNoiseHistParams.ranges[rangeIndex] = rangeUpperBound;
-            rangeUpperBound += 5; 
-        }
-        pNoiseHistParams.ranges[rangeIndex] = 0xFE;
-        
-        /* Send a Start command to the FW */
-        status = TWD_CmdNoiseHistogram (pMeasurementMgr->hTWD, &pNoiseHistParams);		
-
-        WLAN_OS_REPORT(("Measurement Debug Functions - Start Noise Hist Succeded"));
-        
-        if (status != TI_OK)
-            WLAN_OS_REPORT(("Measurement Debug Functions - Start Noise Hist FAILED"));
-        
-        break;
-        
-    case DBG_MEASUREMENT_STOP_NOISE_HIST:
-        /* Set Noise Histogram Cmd Params */
-        pNoiseHistParams.cmd = STOP_NOISE_HIST;
-        pNoiseHistParams.sampleInterval = 0;
-        os_memoryZero(pMeasurementMgr->hOs, &(pNoiseHistParams.ranges[0]), MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES);
-        
-        /* Send a Stop command to the FW */
-        status = TWD_CmdNoiseHistogram (pMeasurementMgr->hTWD, &pNoiseHistParams);
-			
-        WLAN_OS_REPORT(("Measurement Debug Functions - Stop Noise Hist Succeded"));
-        
-        if (status != TI_OK)
-            WLAN_OS_REPORT(("Measurement Debug Functions - Stop Noise Hist FAILED"));
-        
-        break;
-
-    case DBG_MEASUREMENT_GET_NOISE_HIST_RESULTS:
-		{
-	#ifdef XCC_MODULE_INCLUDED
-			TNoiseHistogramResults results;
-
-			/* Get measurement results */
-			tTwdParam.paramType = TWD_NOISE_HISTOGRAM_PARAM_ID;
-			tTwdParam.content.interogateCmdCBParams.fCb = (void *)measurement_noiseHistCallBackDbg;
-			tTwdParam.content.interogateCmdCBParams.hCb = 
-                ((MacServices_t *)(((TTwd *)pMeasurementMgr->hTWD)->hMacServices))->hMeasurementSRV;
-			tTwdParam.content.interogateCmdCBParams.pCb = (TI_UINT8 *)&results;
-
-			TWD_GetParam (pMeasurementMgr->hTWD, &tTwdParam);
-	#endif               
-
-			break;
-		}
-
-    case DBG_MEASUREMENT_SEND_CHANNEL_LOAD_FRAME:
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-        WLAN_OS_REPORT(("   Measurement Debug Function: Sending another Frame Request   \n"));
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-
-        WLAN_OS_REPORT(("beaconInterval = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->beaconInterval));
-		WLAN_OS_REPORT(("dtimPeriod = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->dtimPeriod));
-
-#ifdef XCC_MODULE_INCLUDED        
-        measurementMgr_XCCParse(hMeasurementMgr, iappPacket1);
-#endif
-
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-        WLAN_OS_REPORT(("   Measurement Debug Function: END                             \n"));
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-
-        break;
-
-
-
-
-        
-    case DBG_MEASUREMENT_SEND_BEACON_TABLE_FRAME:
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-        WLAN_OS_REPORT(("   Measurement Debug Function: Sending Beacon Table Request    \n"));
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-
-        WLAN_OS_REPORT(("beaconInterval = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->beaconInterval));
-		WLAN_OS_REPORT(("dtimPeriod = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->dtimPeriod));
-
-#ifdef XCC_MODULE_INCLUDED        
-        measurementMgr_XCCParse(hMeasurementMgr, iappPacket2);
-#endif
-
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-        WLAN_OS_REPORT(("   Measurement Debug Function: END                             \n"));
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-
-        break;
-
-		
-
-        
-    case DBG_MEASUREMENT_SEND_NOISE_HIST_1_FRAME:
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-        WLAN_OS_REPORT(("   Measurement Debug Function: Sending Unknown Request #1      \n"));
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-
-        WLAN_OS_REPORT(("beaconInterval = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->beaconInterval));
-		WLAN_OS_REPORT(("dtimPeriod = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->dtimPeriod));
-
-#ifdef XCC_MODULE_INCLUDED        
-        measurementMgr_XCCParse(hMeasurementMgr, iappPacket3);
-#endif
-
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-        WLAN_OS_REPORT(("   Measurement Debug Function: END                             \n"));
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-
-        break;
-
-
-
-
-
-    case DBG_MEASUREMENT_SEND_NOISE_HIST_2_FRAME:
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-        WLAN_OS_REPORT(("   Measurement Debug Function: Sending Unknown Request #1      \n"));
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-
-        WLAN_OS_REPORT(("beaconInterval = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->beaconInterval));
-		WLAN_OS_REPORT(("dtimPeriod = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->dtimPeriod));
-
-#ifdef XCC_MODULE_INCLUDED        
-        measurementMgr_XCCParse(hMeasurementMgr, iappPacket4);
-#endif
-
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-        WLAN_OS_REPORT(("   Measurement Debug Function: END                             \n"));
-	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
-
-        break;
-
-
-
-
-
-    case DBG_MEASUREMENT_SET_TRAFFIC_THRSLD:
-
-        trafficThreshold = *(TI_UINT16*)pParam;
-        param.paramType = MEASUREMENT_TRAFFIC_THRESHOLD_PARAM;
-        param.content.measurementTrafficThreshold = trafficThreshold;
-        measurementMgr_setParam(hMeasurementMgr, &param);
-        break;
-		
-
-	case DBG_SC_PRINT_STATUS:
-		switchChannelDebug_printStatus(hSwitchChannel);
-		break;
-	case DBG_SC_SET_SWITCH_CHANNEL_NUM:
-		switchChannelDebug_setCmdParams(hSwitchChannel, SC_SWITCH_CHANNEL_NUM , SwitchChannelParam);
-		break;
-	case DBG_SC_SET_SWITCH_CHANNEL_TBTT:
-		switchChannelDebug_setCmdParams(hSwitchChannel, SC_SWITCH_CHANNEL_TBTT , SwitchChannelParam);
-		break;
-	case DBG_SC_SET_SWITCH_CHANNEL_MODE:
-		switchChannelDebug_setCmdParams(hSwitchChannel, SC_SWITCH_CHANNEL_MODE , SwitchChannelParam);
-		break;
-	case DBG_SC_SET_CHANNEL_AS_VALID:
-		switchChannelDebug_setChannelValidity(hSwitchChannel, SwitchChannelParam, TI_TRUE);
-		break;
-	case DBG_SC_SET_CHANNEL_AS_INVALID:
-		switchChannelDebug_setChannelValidity(hSwitchChannel, SwitchChannelParam, TI_FALSE);
-		break;
-	case DBG_SC_SWITCH_CHANNEL_CMD:
-		{
-			switchChannelDebug_SwitchChannelCmdTest(hSwitchChannel, SwitchChannelParam);
-		}
-		break;
-	case DBG_SC_CANCEL_SWITCH_CHANNEL_CMD:
-		if ((SwitchChannelParam!=TI_TRUE) && (SwitchChannelParam!=TI_FALSE))
-		{	/* default is TI_TRUE */
-			SwitchChannelParam = TI_TRUE;
-		}
-		switchChannelDebug_CancelSwitchChannelCmdTest(hSwitchChannel, SwitchChannelParam);
-		break;
-
-	case DBG_REG_DOMAIN_PRINT_VALID_CHANNELS:
-		regDomainPrintValidTables(hRegulatoryDomain);
-		break;
-
-		
-	default:
-		WLAN_OS_REPORT(("Invalid function type in MEASUREMENT Function Command: %d\n", funcType));
-		break;
-	}
-} 
-
-void measurement_channelLoadCallBackDbg(TI_HANDLE hMeasurementMgr, TI_STATUS status, 
-                                        TI_UINT8* CB_buf)
-{
-#ifdef REPORT_LOG
-    TMediumOccupancy *pMediumOccupancy = (TMediumOccupancy*)(CB_buf+4);
-    
-    WLAN_OS_REPORT(("MediumUsage = %d\nPeriod = %d\n", 
-					pMediumOccupancy->MediumUsage/1000, pMediumOccupancy->Period/1000));
-#endif
-}
-
-void measurement_noiseHistCallBackDbg(TI_HANDLE hMeasurementSRV, TI_STATUS status, 
-                                      TI_UINT8* CB_buf)
-{
-    TI_UINT8		            index;
-    TNoiseHistogramResults *pNoiseHistogramResults = (TNoiseHistogramResults*)CB_buf;
-
-    if(status == TI_OK)
-    {
-		report_PrintDump ((TI_UINT8 *)pNoiseHistogramResults, sizeof(TNoiseHistogramResults));
- 
-        WLAN_OS_REPORT(("Noise Histogram Measurement Results:\nNum of Lost Cycles = %u\nNum Of Tx Hw Gen Lost Cycles = %u\n Num Of Rx Lost Cycles = %u\n Num Of 'Exceed Last Threshold' Lost Cycles = %u\n", 
-                         pNoiseHistogramResults->numOfLostCycles, 
-                         pNoiseHistogramResults->numOfTxHwGenLostCycles,
-                         pNoiseHistogramResults->numOfRxLostCycles,
-                         pNoiseHistogramResults->numOfLostCycles - (pNoiseHistogramResults->numOfRxLostCycles)));
-        
-        for(index = 0;index < NUM_OF_NOISE_HISTOGRAM_COUNTERS; index++)
-            WLAN_OS_REPORT(("Counter # %u = %u\n", index,
-            pNoiseHistogramResults->counters[index]));
-    }
-    else
-    {
-        WLAN_OS_REPORT(("Measurement Debug Functions - Interogate Noise Hist FAILED"));
-    }
-}
-
-void printMeasurementDbgFunctions(void)
-{
-	WLAN_OS_REPORT(("   Measurement Debug Functions   \n"));
-	WLAN_OS_REPORT(("-----------------------------\n"));
-	
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_PRINT_HELP\n", DBG_MEASUREMENT_PRINT_HELP));
-
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_PRINT_STATUS\n", DBG_MEASUREMENT_PRINT_STATUS));
-
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_CHANNEL_LOAD_START\n", DBG_MEASUREMENT_CHANNEL_LOAD_START));
-
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_CHANNEL_LOAD_STOP\n", DBG_MEASUREMENT_CHANNEL_LOAD_STOP));
-
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_SEND_FRAME_REQUEST\n", DBG_MEASUREMENT_SEND_FRAME_REQUEST));
-
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_START_NOISE_HIST\n", DBG_MEASUREMENT_START_NOISE_HIST));
-
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_STOP_NOISE_HIST\n", DBG_MEASUREMENT_STOP_NOISE_HIST));
-
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_GET_NOISE_HIST_RESULTS\n", DBG_MEASUREMENT_GET_NOISE_HIST_RESULTS));
-
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_SEND_CHANNEL_LOAD_FRAME\n", DBG_MEASUREMENT_SEND_CHANNEL_LOAD_FRAME));
-
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_SEND_BEACON_TABLE_FRAME\n", DBG_MEASUREMENT_SEND_BEACON_TABLE_FRAME));
-
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_SEND_NOISE_HIST_1_FRAME\n", DBG_MEASUREMENT_SEND_NOISE_HIST_1_FRAME));
-
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_SEND_NOISE_HIST_2_FRAME\n", DBG_MEASUREMENT_SEND_NOISE_HIST_2_FRAME));
-
-	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_SET_TRAFFIC_THRSLD\n", DBG_MEASUREMENT_SET_TRAFFIC_THRSLD));
-
-	WLAN_OS_REPORT(("%d - DBG_SC_PRINT_STATUS\n", DBG_SC_PRINT_STATUS));
-
-	WLAN_OS_REPORT(("%d - DBG_SC_SET_SWITCH_CHANNEL_NUM\n", DBG_SC_SET_SWITCH_CHANNEL_NUM));
-
-	WLAN_OS_REPORT(("%d - DBG_SC_SET_SWITCH_CHANNEL_TBTT\n", DBG_SC_SET_SWITCH_CHANNEL_TBTT));
-
-	WLAN_OS_REPORT(("%d - DBG_SC_SET_SWITCH_CHANNEL_MODE\n", DBG_SC_SET_SWITCH_CHANNEL_MODE));
-
-	WLAN_OS_REPORT(("%d - DBG_SC_SET_CHANNEL_AS_VALID\n", DBG_SC_SET_CHANNEL_AS_VALID));
-
-	WLAN_OS_REPORT(("%d - DBG_SC_SET_CHANNEL_AS_INVALID\n", DBG_SC_SET_CHANNEL_AS_INVALID));
-
-	WLAN_OS_REPORT(("%d - DBG_SC_SWITCH_CHANNEL_CMD\n", DBG_SC_SWITCH_CHANNEL_CMD));
-
-	WLAN_OS_REPORT(("%d - DBG_SC_CANCEL_SWITCH_CHANNEL_CMD\n", DBG_SC_CANCEL_SWITCH_CHANNEL_CMD));
-
-	WLAN_OS_REPORT(("%d - DBG_REG_DOMAIN_PRINT_VALID_CHANNELS\n", DBG_REG_DOMAIN_PRINT_VALID_CHANNELS));
-
-
-}
-
diff --git a/wl1271/Test/measurementDbg.h b/wl1271/Test/measurementDbg.h
deleted file mode 100644
index ff26c07..0000000
--- a/wl1271/Test/measurementDbg.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * measurementDbg.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef __MEASUREMENT_DBG_H__
-#define __MEASUREMENT_DBG_H__
-
-/* definitions for ctrl dbg */
-
-#define DBG_MEASUREMENT_PRINT_HELP		    	0
-#define DBG_MEASUREMENT_PRINT_STATUS			1
-#define	DBG_MEASUREMENT_CHANNEL_LOAD_START  	2 
-#define	DBG_MEASUREMENT_CHANNEL_LOAD_STOP	    3 
-#define DBG_MEASUREMENT_SEND_FRAME_REQUEST      4 
-#define DBG_MEASUREMENT_START_NOISE_HIST        5 
-#define DBG_MEASUREMENT_STOP_NOISE_HIST         6 
-#define DBG_MEASUREMENT_GET_NOISE_HIST_RESULTS  7 
-#define DBG_MEASUREMENT_SEND_CHANNEL_LOAD_FRAME 8 
-#define DBG_MEASUREMENT_SEND_BEACON_TABLE_FRAME 9
-#define DBG_MEASUREMENT_SEND_NOISE_HIST_1_FRAME 10
-#define DBG_MEASUREMENT_SEND_NOISE_HIST_2_FRAME 11
-#define DBG_MEASUREMENT_SET_TRAFFIC_THRSLD      12
-#define DBG_SC_PRINT_STATUS					    30
-#define DBG_SC_SET_SWITCH_CHANNEL_NUM			31
-#define DBG_SC_SET_SWITCH_CHANNEL_TBTT			32
-#define DBG_SC_SET_SWITCH_CHANNEL_MODE         33
-#define DBG_SC_SET_CHANNEL_AS_VALID			    34
-#define DBG_SC_SET_CHANNEL_AS_INVALID			35
-#define DBG_SC_SWITCH_CHANNEL_CMD				36
-#define DBG_SC_CANCEL_SWITCH_CHANNEL_CMD		37
-
-#define DBG_REG_DOMAIN_PRINT_VALID_CHANNELS		50
-
-
-
-
-void measurementDebugFunction(TI_HANDLE hMeasurementMgr, TI_HANDLE hSwitchChannel, TI_HANDLE hRegulatoryDomain, TI_UINT32 funcType, void *pParam);
-
-void measurement_channelLoadCallBackDbg(TI_HANDLE hMeasurementMgr, TI_STATUS status, 
-                                        TI_UINT8* CB_buf);
-
-void measurement_noiseHistCallBackDbg(TI_HANDLE hMeasurementMgr, TI_STATUS status, 
-                                      TI_UINT8* CB_buf);
-
-#endif /* __MEASUREMENT_DBG_H__*/
diff --git a/wl1271/Test/qosMngrDbg.c b/wl1271/Test/qosMngrDbg.c
deleted file mode 100644
index 9ac4b17..0000000
--- a/wl1271/Test/qosMngrDbg.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * qosMngrDbg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																									*/
-/*		MODULE:																	*/
-/*    PURPOSE:										*/
-/*																			*/
-/***************************************************************************/
-#include "tidef.h"
-#include "osApi.h"
-#include "qosMngr.h"
-#include "report.h"
-#include "paramOut.h"
-#include "qosMngrDbg.h"
-
-void printQosMngrParams(TI_HANDLE hQosMngr);
-void printQosDbgFunction(TI_HANDLE hQosMngr);
-
-
-void qosMngrDebugFunction(TI_HANDLE hQosMngr, TI_UINT32 funcType, void *pParam)
-{
-	switch (funcType)
-	{
-	case DBG_QOS_MNGR_PRINT_HELP:
-		printQosDbgFunction(hQosMngr);
-		break;
-
-	case DBG_QOS_MNGR_PRINT_PARAMS:
-		printQosMngrParams(hQosMngr);
-		break;
-
-	default:
-		WLAN_OS_REPORT(("\nInvalid function type in QOS MNGR Function Command: %d\n", funcType));
-		break;
-	}
-
-
-}
-void printQosDbgFunction(TI_HANDLE hQosMngr)
-{
-	WLAN_OS_REPORT(("\n   qosMngr Debug Functions   \n"));
-	WLAN_OS_REPORT(("-----------------------------\n"));
-	
-	WLAN_OS_REPORT(("1000 - Print the QOS MNGR Debug Help\n"));
-
-	WLAN_OS_REPORT(("1001 - print QOS parameters\n"));
-
-}
-
-void printQosMngrParams(TI_HANDLE hQosMngr)
-{
-	qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-    EQosProtocol protocol = QOS_NONE;
-
-	WLAN_OS_REPORT(("QOS Parameters :\n"));
-
-	switch(pQosMngr->activeProtocol){
-	case QOS_WME:
-		WLAN_OS_REPORT(("QOS protocol = QOS_WME\n"));
-		protocol = QOS_WME;
-
-		break;
-	case QOS_NONE:
-		WLAN_OS_REPORT(("QOS protocol = NONE\n"));
-		break;
-
-    default:
-		break;
-
-	}
-	if(protocol != QOS_NONE)
-	{
-		WLAN_OS_REPORT(("PS POLL Modes:\n"));
-		WLAN_OS_REPORT(("PS_POLL:	0\n"));
-		WLAN_OS_REPORT(("UPSD	:	1\n"));
-		WLAN_OS_REPORT(("Ps None: 2\n"));
-	}
-
-	if(pQosMngr->desiredPsMode == PS_SCHEME_UPSD_TRIGGER)
-		WLAN_OS_REPORT(("Desired Power Save Mode = UPSD\n"));
-	else
-		WLAN_OS_REPORT(("Desired Power Save Mode = Legacy\n"));
-
-	if(pQosMngr->currentPsMode == PS_SCHEME_UPSD_TRIGGER)
-		WLAN_OS_REPORT(("Current Power Save Mode = UPSD\n"));
-	else
-		WLAN_OS_REPORT(("Current Power Save Mode = Legacy\n"));
-
-	WLAN_OS_REPORT(("BK Parameters:\n"));
-	WLAN_OS_REPORT(("aifsn :%d\n",pQosMngr->acParams[QOS_AC_BK].acQosParams.aifsn));
-	WLAN_OS_REPORT(("cwMin :%d\n",pQosMngr->acParams[QOS_AC_BK].acQosParams.cwMin));
-	WLAN_OS_REPORT(("cwMax :%d\n",pQosMngr->acParams[QOS_AC_BK].acQosParams.cwMax));
-	WLAN_OS_REPORT(("txopLimit :%d\n",pQosMngr->acParams[QOS_AC_BK].acQosParams.txopLimit));
-	if(protocol == QOS_WME)
-	{
-		WLAN_OS_REPORT(("Desired PsMode :%d\n",pQosMngr->acParams[QOS_AC_BK].desiredWmeAcPsMode));
-		WLAN_OS_REPORT(("Current PsMode :%d\n",pQosMngr->acParams[QOS_AC_BK].currentWmeAcPsMode));
-	}
-
-	WLAN_OS_REPORT(("BE Parameters:\n"));
-	WLAN_OS_REPORT(("aifsn :%d\n",pQosMngr->acParams[QOS_AC_BE].acQosParams.aifsn));
-	WLAN_OS_REPORT(("cwMin :%d\n",pQosMngr->acParams[QOS_AC_BE].acQosParams.cwMin));
-	WLAN_OS_REPORT(("cwMax :%d\n",pQosMngr->acParams[QOS_AC_BE].acQosParams.cwMax));
-	WLAN_OS_REPORT(("txopLimit :%d\n",pQosMngr->acParams[QOS_AC_BE].acQosParams.txopLimit));
-	if(protocol == QOS_WME)
-	{
-		WLAN_OS_REPORT(("Desired PsMode :%d\n",pQosMngr->acParams[QOS_AC_BE].desiredWmeAcPsMode));
-		WLAN_OS_REPORT(("Current PsMode :%d\n",pQosMngr->acParams[QOS_AC_BE].currentWmeAcPsMode));
-	}
-
-	WLAN_OS_REPORT(("VI Parameters:\n"));
-	WLAN_OS_REPORT(("aifsn :%d\n",pQosMngr->acParams[QOS_AC_VI].acQosParams.aifsn));
-	WLAN_OS_REPORT(("cwMin :%d\n",pQosMngr->acParams[QOS_AC_VI].acQosParams.cwMin));
-	WLAN_OS_REPORT(("cwMax :%d\n",pQosMngr->acParams[QOS_AC_VI].acQosParams.cwMax));
-	WLAN_OS_REPORT(("txopLimit :%d\n",pQosMngr->acParams[QOS_AC_VI].acQosParams.txopLimit));
-	if(protocol == QOS_WME)
-	{
-		WLAN_OS_REPORT(("Desired PsMode :%d\n",pQosMngr->acParams[QOS_AC_VI].desiredWmeAcPsMode));
-		WLAN_OS_REPORT(("Current PsMode :%d\n",pQosMngr->acParams[QOS_AC_VI].currentWmeAcPsMode));
-	}
-
-	WLAN_OS_REPORT(("VO Parameters:\n"));
-	WLAN_OS_REPORT(("aifsn :%d\n",pQosMngr->acParams[QOS_AC_VO].acQosParams.aifsn));
-	WLAN_OS_REPORT(("cwMin :%d\n",pQosMngr->acParams[QOS_AC_VO].acQosParams.cwMin));
-	WLAN_OS_REPORT(("cwMax :%d\n",pQosMngr->acParams[QOS_AC_VO].acQosParams.cwMax));
-	WLAN_OS_REPORT(("txopLimit :%d\n",pQosMngr->acParams[QOS_AC_VO].acQosParams.txopLimit));
-	if(protocol == QOS_WME)
-	{
-		WLAN_OS_REPORT(("Desired PsMode :%d\n",pQosMngr->acParams[QOS_AC_VO].desiredWmeAcPsMode));
-		WLAN_OS_REPORT(("Current PsMode :%d\n",pQosMngr->acParams[QOS_AC_VO].currentWmeAcPsMode));
-	}
-}
-
diff --git a/wl1271/Test/qosMngrDbg.h b/wl1271/Test/qosMngrDbg.h
deleted file mode 100644
index bce1c03..0000000
--- a/wl1271/Test/qosMngrDbg.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * qosMngrDbg.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __QOSMNGR_DBG_H__
-#define __QOSMNGR_DBG_H__
-
-/* definitions for ctrl dbg */
-#define DBG_QOS_MNGR_PRINT_HELP 		0
-#define DBG_QOS_MNGR_PRINT_PARAMS		1
-
-void qosMngrDebugFunction(TI_HANDLE hQosMngr, TI_UINT32 funcType, void *pParam);
-
-
-#endif /* __XCCMNGR_DBG_H__*/
-
diff --git a/wl1271/Test/roamingMgrDebug.c b/wl1271/Test/roamingMgrDebug.c
deleted file mode 100644
index 959ac59..0000000
--- a/wl1271/Test/roamingMgrDebug.c
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
- * roamingMgrDebug.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file reportReplvl.c
- *  \brief Report level implementation
- * 
- *  \see reportReplvl.h
- */
-
-/***************************************************************************/
-/*																									*/
-/*		MODULE:	reportReplvl.c						 										*/
-/*    PURPOSE:	Report level implementation	 										*/
-/*																									*/
-/***************************************************************************/
-#include "tidef.h"
-#include "report.h"
-#include "paramOut.h"
-#include "roamingMgrDebug.h"
-#include "roamingMngrApi.h"
-#include "apConnApi.h"
-
-
-void printRoamingMgrHelpMenu(void);
-void PrintBssListGotAfterImemediateScan(TI_HANDLE hScanMgr);
-
-
-/*	Function implementation */
-void roamingMgrDebugFunction(TI_HANDLE hRoamingMngr, 
-					   TI_UINT32	funcType, 
-					   void		*pParam)
-{
-	paramInfo_t			param;
-
-	
-	switch (funcType)
-	{
-	case ROAMING_MGR_DEBUG_HELP_MENU:
-		printRoamingMgrHelpMenu();
-		break;
-
-	case PRINT_ROAMING_STATISTICS:
-		param.paramType = ROAMING_MNGR_PRINT_STATISTICS;
-		roamingMngr_getParam(hRoamingMngr, &param);
-		break;
-
-	case RESET_ROAMING_STATISTICS:
-		param.paramType = ROAMING_MNGR_RESET_STATISTICS;
-		roamingMngr_getParam(hRoamingMngr, &param);
-		break;
-
-	case PRINT_ROAMING_CURRENT_STATUS:
-		param.paramType = ROAMING_MNGR_PRINT_CURRENT_STATUS;
-		roamingMngr_getParam(hRoamingMngr, &param);
-		break;
-
-	case PRINT_ROAMING_CANDIDATE_TABLE:
-		param.paramType = ROAMING_MNGR_PRINT_CANDIDATE_TABLE;
-		roamingMngr_getParam(hRoamingMngr, &param);
-		break;
-
-	case TRIGGER_ROAMING_LOW_QUALITY_EVENT:
-		param.paramType = ROAMING_MNGR_TRIGGER_EVENT;
-		param.content.roamingTriggerType = ROAMING_TRIGGER_LOW_QUALITY;
-		roamingMngr_setParam(hRoamingMngr, &param);
-		break;
-
-    case TRIGGER_ROAMING_BSS_LOSS_EVENT:
-		param.paramType = ROAMING_MNGR_TRIGGER_EVENT;
-		param.content.roamingTriggerType = ROAMING_TRIGGER_BSS_LOSS;
-		roamingMngr_setParam(hRoamingMngr, &param);
-		break;
-
-	case TRIGGER_ROAMING_SWITCH_CHANNEL_EVENT:
-		param.paramType = ROAMING_MNGR_TRIGGER_EVENT;
-		param.content.roamingTriggerType = ROAMING_TRIGGER_SWITCH_CHANNEL;
-		roamingMngr_setParam(hRoamingMngr, &param);
-		break;
-
-	case TRIGGER_ROAMING_AP_DISCONNECT_EVENT:
-		param.paramType = ROAMING_MNGR_TRIGGER_EVENT;
-		param.content.roamingTriggerType = ROAMING_TRIGGER_AP_DISCONNECT;
-		roamingMngr_setParam(hRoamingMngr, &param);
-		break;
-
-	case TRIGGER_ROAMING_CONNECT_EVENT:
-		param.paramType = ROAMING_MNGR_CONN_STATUS;
-		param.content.roamingConnStatus = CONN_STATUS_CONNECTED;
-		roamingMngr_setParam(hRoamingMngr, &param);
-		break;
-
-	case TRIGGER_ROAMING_NOT_CONNECTED_EVENT:
-		param.paramType = ROAMING_MNGR_CONN_STATUS;
-		param.content.roamingConnStatus = CONN_STATUS_NOT_CONNECTED;
-		roamingMngr_setParam(hRoamingMngr, &param);
-		break;
-
-	case TRIGGER_ROAMING_HANDOVER_SUCCESS_EVENT:
-		param.paramType = ROAMING_MNGR_CONN_STATUS;
-		param.content.roamingConnStatus = CONN_STATUS_HANDOVER_SUCCESS;
-		roamingMngr_setParam(hRoamingMngr, &param);
-		break;
-
-	case TRIGGER_ROAMING_HANDOVER_FAILURE_EVENT:
-		param.paramType = ROAMING_MNGR_CONN_STATUS;
-		param.content.roamingConnStatus = CONN_STATUS_HANDOVER_FAILURE;
-		roamingMngr_setParam(hRoamingMngr, &param);
-		break;
-
-    case ROAMING_REGISTER_BSS_LOSS_EVENT: /* 1613 */
-        roamingMngr_setBssLossThreshold(hRoamingMngr, 10, 1);
-        break;
-    case ROAMING_START_IMMEDIATE_SCAN: /* 1614 */
-        {
-            int i=0,j =0;
-            channelList_t channels;
-            channels.numOfChannels = 14;
-
-
-            for ( i = 0; i < channels.numOfChannels; i++ )
-            {
-                for ( j = 0; j < 6; j++ )
-                {
-                    channels.channelEntry[i].normalChannelEntry.bssId[j] = 0xff;
-                }
-
-                channels.channelEntry[i].normalChannelEntry.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-                channels.channelEntry[i].normalChannelEntry.ETMaxNumOfAPframes = 0;
-                channels.channelEntry[i].normalChannelEntry.maxChannelDwellTime = 60000;
-                channels.channelEntry[i].normalChannelEntry.minChannelDwellTime = 30000;
-                channels.channelEntry[i].normalChannelEntry.txPowerDbm = DEF_TX_POWER;
-                channels.channelEntry[i].normalChannelEntry.channel = i + 1;
-            }
-
-            /* upon this call the scanMngr_reportImmediateScanResults() should be invoked and the BssList should be printed */
-            roamingMngr_startImmediateScan(hRoamingMngr, &channels); 
-        }
-
-        break;
-    case ROAMING_CONNECT: /* 1615 */
-        {
-            TargetAp_t targetAP;
-            bssList_t *bssList;
-            roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-
-            bssList = scanMngr_getBSSList(((roamingMngr_t*)hRoamingMngr)->hScanMngr);
-
-            WLAN_OS_REPORT(("Roaming connect: BSS LIST num of entries=%d \n", bssList->numOfEntries));
-            PrintBssListGotAfterImemediateScan(((roamingMngr_t*)hRoamingMngr)->hScanMngr);
-
-            /* The values below must be configured in manual mode */
-            targetAP.connRequest.requestType = AP_CONNECT_FULL_TO_AP;
-            targetAP.connRequest.dataBufLength = 0;
-            targetAP.transitionMethod = ReAssoc;
-
-            os_memoryCopy(((roamingMngr_t*)hRoamingMngr)->hOs, &(targetAP.newAP), &(bssList->BSSList[0]), sizeof(bssEntry_t));
-
-            /* test if no buffer is present */
-            targetAP.newAP.bufferLength =0;
-            targetAP.newAP.pBuffer = 0;
-            /* ----------------------------- */
-
-            os_memoryCopy(pRoamingMngr->hOs, &(pRoamingMngr->targetAP), &targetAP , sizeof(TargetAp_t));
-
-            roamingMngr_connect(hRoamingMngr, &(pRoamingMngr->targetAP));
-        }
-
-        break;
-
-    case ROAMING_START_CONT_SCAN_BY_APP: /* 1616 */
-        {
-            roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-            int i=0,j =0;
-            channelList_t channels;
-            channels.numOfChannels = 14;
-
-            for ( i = 0; i < channels.numOfChannels; i++ )
-            {
-                for ( j = 0; j < 6; j++ )
-                {
-                    channels.channelEntry[i].normalChannelEntry.bssId[j] = 0xff;
-                }
-
-                channels.channelEntry[i].normalChannelEntry.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-                channels.channelEntry[i].normalChannelEntry.ETMaxNumOfAPframes = 0;
-                channels.channelEntry[i].normalChannelEntry.maxChannelDwellTime = 60000;
-                channels.channelEntry[i].normalChannelEntry.minChannelDwellTime = 30000;
-                channels.channelEntry[i].normalChannelEntry.txPowerDbm = DEF_TX_POWER;
-                channels.channelEntry[i].normalChannelEntry.channel = i + 1;
-            }
-
-            scanMngr_startContinuousScanByApp(pRoamingMngr->hScanMngr, &channels);
-        }
-
-        break;
-
-    case ROAMING_STOP_CONT_SCAN_BY_APP:
-        {
-            roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-            scanMngr_stopContinuousScanByApp(pRoamingMngr->hScanMngr);
-        }
-        break;
-
-
-    case RAOMING_SET_DEFAULT_SCAN_POLICY: /* 1618 */
-        {
-            int i=0;
-            roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-            TScanPolicy scanPolicy;
-            param.paramType = SCAN_MNGR_SET_CONFIGURATION;
-            param.content.pScanPolicy = &scanPolicy;
-
-            // init default scan policy
-            scanPolicy.normalScanInterval = 10000;
-            scanPolicy.deterioratingScanInterval = 5000;
-            scanPolicy.maxTrackFailures = 3;
-            scanPolicy.BSSListSize = 4;
-            scanPolicy.BSSNumberToStartDiscovery = 1;
-            scanPolicy.numOfBands = 1;
-            scanPolicy.bandScanPolicy[ 0 ].band = RADIO_BAND_2_4_GHZ;
-            scanPolicy.bandScanPolicy[ 0 ].rxRSSIThreshold = -80;
-            scanPolicy.bandScanPolicy[ 0 ].numOfChannles = 14;
-            scanPolicy.bandScanPolicy[ 0 ].numOfChannlesForDiscovery = 3;
-
-            for ( i = 0; i < 14; i++ )
-            {
-                scanPolicy.bandScanPolicy[ 0 ].channelList[ i ] = i + 1;
-            }
-
-            scanPolicy.bandScanPolicy[ 0 ].trackingMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE;
-            scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-            scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0;
-            scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.maxChannelDwellTime = 30000;
-            scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.minChannelDwellTime = 15000;
-            scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.bitrate = RATE_MASK_UNSPECIFIED; /* Let the FW select */
-            scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3;
-            scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.txPowerDbm = DEF_TX_POWER;
-            scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE;
-            scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-            scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0;
-            scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.maxChannelDwellTime = 30000;
-            scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.minChannelDwellTime = 15000;
-            scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.bitrate = RATE_MASK_UNSPECIFIED; /* Let the FW select */;
-            scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3;
-            scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.txPowerDbm = DEF_TX_POWER;
-            scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE;
-            scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-            scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0;
-            scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.maxChannelDwellTime = 30000;
-            scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.minChannelDwellTime = 15000;
-            scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.bitrate = RATE_MASK_UNSPECIFIED; /* Let the FW select */;
-            scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3;
-            scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.txPowerDbm = DEF_TX_POWER;
-             /* we should noe store the scanPolicy now */
-            scanMngr_setParam(pRoamingMngr->hScanMngr, &param);
-
-
-            /* Enable roaming! */
-            param.paramType = ROAMING_MNGR_APPLICATION_CONFIGURATION;
-            param.content.roamingConfigBuffer.roamingMngrConfig.enableDisable = ROAMING_ENABLED;
-            roamingMngr_setParam(hRoamingMngr,&param);
-        }
-
-        break;
-
-    case ROAMING_PRINT_MANUAL_MODE: /* 1617 */
-        WLAN_OS_REPORT(("\n ROAMING MANUAL MODE IS: %d \n",((roamingMngr_t*)hRoamingMngr)->RoamingOperationalMode));
-        break;
-
-	default:
-		WLAN_OS_REPORT(("Invalid function type in Debug  Function Command, funcType= %d\n\n", funcType));
-		break;
-	}
-} 
-
-
-void printRoamingMgrHelpMenu(void)
-{
-	WLAN_OS_REPORT(("\n\n   Roaming Manager Debug Menu   \n"));
-	WLAN_OS_REPORT(("------------------------\n"));
-
-
-	WLAN_OS_REPORT(("        %02d - ROAMING_MGR_DEBUG_HELP_MENU \n", ROAMING_MGR_DEBUG_HELP_MENU));
-
-	WLAN_OS_REPORT(("        %02d - PRINT_ROAMING_STATISTICS \n", PRINT_ROAMING_STATISTICS));
-	WLAN_OS_REPORT(("        %02d - RESET_ROAMING_STATISTICS \n", RESET_ROAMING_STATISTICS));
-
-	WLAN_OS_REPORT(("        %02d - PRINT_ROAMING_CURRENT_STATUS \n", PRINT_ROAMING_CURRENT_STATUS));
-	WLAN_OS_REPORT(("        %02d - PRINT_ROAMING_CANDIDATE_TABLE \n", PRINT_ROAMING_CANDIDATE_TABLE));
-
-	WLAN_OS_REPORT(("        %02d - TRIGGER_ROAMING_LOW_QUALITY_EVENT \n", TRIGGER_ROAMING_LOW_QUALITY_EVENT));
-	WLAN_OS_REPORT(("        %02d - TRIGGER_ROAMING_BSS_LOSS_EVENT \n", TRIGGER_ROAMING_BSS_LOSS_EVENT));
-	WLAN_OS_REPORT(("        %02d - TRIGGER_ROAMING_SWITCH_CHANNEL_EVENT \n", TRIGGER_ROAMING_SWITCH_CHANNEL_EVENT));
-	WLAN_OS_REPORT(("        %02d - TRIGGER_ROAMING_AP_DISCONNECT_EVENT \n", TRIGGER_ROAMING_AP_DISCONNECT_EVENT));
-
-	WLAN_OS_REPORT(("        %02d - TRIGGER_ROAMING_CONNECT_EVENT \n", TRIGGER_ROAMING_CONNECT_EVENT));
-	WLAN_OS_REPORT(("        %02d - TRIGGER_ROAMING_NOT_CONNECTED_EVENT \n", TRIGGER_ROAMING_NOT_CONNECTED_EVENT));
-
-	WLAN_OS_REPORT(("        %02d - TRIGGER_ROAMING_HANDOVER_SUCCESS_EVENT \n", TRIGGER_ROAMING_HANDOVER_SUCCESS_EVENT));
-	WLAN_OS_REPORT(("        %02d - TRIGGER_ROAMING_HANDOVER_FAILURE_EVENT \n", TRIGGER_ROAMING_HANDOVER_FAILURE_EVENT));
-	
-
-	WLAN_OS_REPORT(("\n------------------------\n"));
-}
-
-void PrintBssListGotAfterImemediateScan(TI_HANDLE hScanMgr)
-{
-    bssList_t *bssList;
-    bssEntry_t* pBssEntry;
-    int i=0;
-
-    WLAN_OS_REPORT(("------ PRINTING BSS FOUND AFTER IMMEDIATE SCAN - MANUAL MODE----------\n"));
-
-    bssList = scanMngr_getBSSList(hScanMgr);
-
-    for (i=0 ; i< bssList->numOfEntries ; i++)
-    {
-        pBssEntry = &(bssList->BSSList[i]);
-
-        WLAN_OS_REPORT( ("BSSID: %02x:%02x:%02x:%02x:%02x:%02x, band: %d\n", pBssEntry->BSSID[ 0 ],
-                         pBssEntry->BSSID[ 1 ], pBssEntry->BSSID[ 2 ],
-                         pBssEntry->BSSID[ 3 ], pBssEntry->BSSID[ 4 ],
-                         pBssEntry->BSSID[ 5 ], pBssEntry->band));
-       WLAN_OS_REPORT( ("channel: %d, beacon interval: %d, average RSSI: %d dBm\n",
-                                      pBssEntry->channel, pBssEntry->beaconInterval, pBssEntry->RSSI));
-
-    }
-
-    WLAN_OS_REPORT(("-----------------------------------------------------------------------\n"));
-
-}
diff --git a/wl1271/Test/roamingMgrDebug.h b/wl1271/Test/roamingMgrDebug.h
deleted file mode 100644
index 9c8a079..0000000
--- a/wl1271/Test/roamingMgrDebug.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * roamingMgrDebug.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __ROAMIN_MGR_DEBUG_H__
-#define __ROAMIN_MGR_DEBUG_H__
-
-#include "tidef.h"
-#include "paramOut.h"
-
-#define ROAMING_MGR_DEBUG_HELP_MENU 			0
-#define PRINT_ROAMING_STATISTICS				1
-#define RESET_ROAMING_STATISTICS				2
-#define PRINT_ROAMING_CURRENT_STATUS			3
-#define PRINT_ROAMING_CANDIDATE_TABLE			4
-#define TRIGGER_ROAMING_LOW_QUALITY_EVENT		5
-#define TRIGGER_ROAMING_BSS_LOSS_EVENT			6 
-#define TRIGGER_ROAMING_SWITCH_CHANNEL_EVENT	7 
-#define TRIGGER_ROAMING_AP_DISCONNECT_EVENT		8 
-#define TRIGGER_ROAMING_CONNECT_EVENT			9 	
-#define TRIGGER_ROAMING_NOT_CONNECTED_EVENT		10
-#define TRIGGER_ROAMING_HANDOVER_SUCCESS_EVENT	11
-#define TRIGGER_ROAMING_HANDOVER_FAILURE_EVENT	12
-
-/* Added for EMP project */
-#define ROAMING_REGISTER_BSS_LOSS_EVENT         13
-#define ROAMING_START_IMMEDIATE_SCAN            14
-#define ROAMING_CONNECT                         15
-#define ROAMING_START_CONT_SCAN_BY_APP          16
-#define ROAMING_STOP_CONT_SCAN_BY_APP           17
-#define RAOMING_SET_DEFAULT_SCAN_POLICY         18
-#define ROAMING_PRINT_MANUAL_MODE               19
-
-void roamingMgrDebugFunction(TI_HANDLE hRoamingMngr, 
-					   TI_UINT32	funcType, 
-					   void		*pParam);
-
-
-#endif /* __ROAMIN_MGR_DEBUG_H__ */
diff --git a/wl1271/Test/rsnDbg.c b/wl1271/Test/rsnDbg.c
deleted file mode 100644
index 3a84856..0000000
--- a/wl1271/Test/rsnDbg.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * rsnDbg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************/
-/*																			*/
-/*		MODULE:																*/
-/*    PURPOSE:																*/
-/*												   							*/ 						
-/****************************************************************************/
-/* #include "osTITypes.h" */
-#include "osApi.h"
-#include "rsnApi.h"
-#include "rsn.h"
-#include "report.h"
-#include "paramOut.h"
-#include "rsnDbg.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#endif
-
-void printRsnDbgFunctions(void);
-void printRogueApTable(TI_HANDLE hRogueAp);
-
-static TI_UINT8 infoBuf[480];
-
-/*************************************************************************
- *																		 *
- *************************************************************************
-DESCRIPTION:                  
-                                                      
-INPUT:       
-
-OUTPUT:      
-
-RETURN:     
-                                                   
-************************************************************************/
-void rsnDebugFunction(TI_HANDLE hRsn, TI_UINT32 funcType, void *pParam)
-{
-	paramInfo_t 	param, *pRsnParam;
-	TI_UINT32			value;
-    rsnAuthEncrCapability_t rsnAuthEncrCap;
-
-	switch (funcType)
-	{
-	case DBG_RSN_PRINT_HELP:
-		printRsnDbgFunctions();
-		break;
-
-	case DBG_RSN_SET_DESIRED_AUTH:
-		WLAN_OS_REPORT(("RSN DBG - Set desired Authentication suite \n"));
-		value = *(TI_UINT32*)pParam;
-
-		param.paramType = RSN_EXT_AUTHENTICATION_MODE;
-		param.content.rsnDesiredAuthType = (EAuthSuite)value;
-
-		rsn_setParam(hRsn, &param);
-		break;
-
-	case DBG_RSN_SET_DESIRED_CIPHER:
-		WLAN_OS_REPORT(("RSN DBG - Set desired cipher suite \n"));
-		value = *(TI_UINT32*)pParam;
-
-		param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
-		param.content.rsnEncryptionStatus = (ECipherSuite)value;
-
-		rsn_setParam(hRsn, &param);
-		break;
-	
-
-	case DBG_RSN_GEN_MIC_FAILURE_REPORT:
-		value = *(TI_UINT32*)pParam;
-		/* generate unicast mic failure report to the OS and to the RSN module */
-		rsn_reportMicFailure(hRsn, (TI_UINT8*)&value,1);
-		break;
-
-	case DBG_RSN_GET_PARAM_802_11_CAPABILITY:
-			
-		param.paramType = RSN_AUTH_ENCR_CAPABILITY;
-        param.content.pRsnAuthEncrCapability = &rsnAuthEncrCap;
-	
-        /* Get 802_11 capability info */
-		rsn_getParam(hRsn, &param);
-		break;
-		
-	case DBG_RSN_GET_PMKID_CACHE:
-		
-		pRsnParam = (paramInfo_t *)&infoBuf;
-		pRsnParam->paramType = RSN_PMKID_LIST;
-		pRsnParam->paramLength = 480;
-
-		/* Get PMKID list */
-		rsn_getParam(hRsn, pRsnParam);
-		break;
-
-	case DBG_RSN_RESET_PMKID_CACHE:
-		
-		rsn_resetPMKIDList(hRsn);
-
-		break;
-#ifdef XCC_MODULE_INCLUDED
-    case DBG_RSN_PRINT_ROGUE_AP_TABLE:
-        printRogueApTable(((XCCMngr_t*)((rsn_t*)hRsn)->hXCCMngr)->hRogueAp);
-        break;
-#endif
-
-    case DBG_RSN_SET_PORT_STATUS:
-        WLAN_OS_REPORT(("Setting PORT STATUS to open\n"));
-        rsn_setPortStatus(hRsn,TI_TRUE);
-        break;
-
-    case DBG_RSN_PRINT_PORT_STATUS:
-        {
-            TI_BOOL portStatus = TI_FALSE;
-            portStatus = rsn_getPortStatus(((rsn_t*)hRsn));
-            WLAN_OS_REPORT(("\n\nPORT is %s !!\n",(portStatus)?"OPEN":"CLOSE"));
-        }
-
-        break;
-	default:
-		WLAN_OS_REPORT(("Invalid function type in RSN Function Command: %d\n", funcType));
-		break;
-	}
-
-} 
-
-
-void printRsnDbgFunctions(void)
-{
-	WLAN_OS_REPORT(("   Rsn Debug Functions   \n"));
-	WLAN_OS_REPORT(("-------------------------\n"));
-
-	WLAN_OS_REPORT(("702 - Set default key id \n"));
-	WLAN_OS_REPORT(("703 - Set desired Authentication suite \n"));
-	WLAN_OS_REPORT(("704 - Set desired cipher suite \n"));
-
-	WLAN_OS_REPORT(("706 - Generate MIC FAILURE report (after 2 clicks less then 1 minute - disassociate)\n"));
-	WLAN_OS_REPORT(("707 - Get 802.11 authentication/encryption capability\n"));
-	WLAN_OS_REPORT(("708 - Get PMKID cache \n"));
-	WLAN_OS_REPORT(("709 - ReSet PMKID cache  \n"));
-	WLAN_OS_REPORT(("710 - Print Rogue AP table\n"));
-
-
-}
diff --git a/wl1271/Test/rsnDbg.h b/wl1271/Test/rsnDbg.h
deleted file mode 100644
index 1774436..0000000
--- a/wl1271/Test/rsnDbg.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * rsnDbg.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef __RSN_DBG_H__
-#define __RSN_DBG_H__
-
-/* definitions for ctrl dbg */
-
-#define DBG_RSN_PRINT_HELP				0
-
-#define DBG_RSN_SET_DEF_KEY_ID			2
-#define DBG_RSN_SET_DESIRED_AUTH		3
-#define DBG_RSN_SET_DESIRED_CIPHER		4
-
-#define DBG_RSN_GEN_MIC_FAILURE_REPORT	6
-#define DBG_RSN_GET_PARAM_802_11_CAPABILITY  7
-#define DBG_RSN_GET_PMKID_CACHE              8
-#define DBG_RSN_RESET_PMKID_CACHE            9
-#define DBG_RSN_PRINT_ROGUE_AP_TABLE         10
-#define DBG_RSN_SET_PORT_STATUS              11
-#define DBG_RSN_PRINT_PORT_STATUS            12
-
-void rsnDebugFunction(TI_HANDLE hRsn, TI_UINT32 funcType, void *pParam);
-
-
-#endif /* __RSN_DBG_H__*/
-
diff --git a/wl1271/Test/scanCncnDbg.c b/wl1271/Test/scanCncnDbg.c
deleted file mode 100644
index 7919b9a..0000000
--- a/wl1271/Test/scanCncnDbg.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * scanCncnDbg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  ScanCncnDbg.c
- *  \brief This file include the scan concentrator debug module implementation
- *
- *  \see   ScanCncn.h, ScanCncn.c
- */
-
-
-#include "ScanCncn.h"
-#include "scanCncnDbg.h"
-#include "report.h"
-#include "TWDriver.h"
-
-
-/**
- * \\n
- * \date 14-Feb-2005\n
- * \brief Main scan concentrator debug function
- *
- * Function Scope \e Public.\n
- * \param hScanCncn - handle to the scan concentrator object.\n
- * \param funcType - the specific debug function.\n
- * \param pParam - parameters for the debug function.\n
- */
-void scanConcentratorDebugFunction( TI_HANDLE hScanCncn, TI_HANDLE hTWD, TI_UINT32 funcType, void *pParam )
-{
-    switch (funcType)
-    {
-    case DBG_SCAN_CNCN_PRINT_HELP:
-        printScanConcentratorDbgFunctions();
-        break;
-
-    case DBG_SCAN_SRV_PRINT_STATUS:
-        TWD_PrintMacServDebugStatus (hTWD);
-        break;
-
-    default:
-        WLAN_OS_REPORT(("Invalid function type in scan concentrator debug function: %d\n", funcType));
-        break;
-    }
-}
-
-/**
- * \\n
- * \date 14-Feb-2005\n
- * \brief Prints scan concentrator debug menu
- *
- * Function Scope \e Public.\n
- */
-void printScanConcentratorDbgFunctions(void)
-{
-    WLAN_OS_REPORT(("   Scan Concentrator Debug Functions   \n"));
-    WLAN_OS_REPORT(("---------------------------------------\n"));
-    WLAN_OS_REPORT(("1400 - Print the scan concentrator Debug Help\n"));
-    WLAN_OS_REPORT(("1401 - Print the scan SRV status\n"));
-}
-
diff --git a/wl1271/Test/scanCncnDbg.h b/wl1271/Test/scanCncnDbg.h
deleted file mode 100644
index 28a6f7e..0000000
--- a/wl1271/Test/scanCncnDbg.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * scanCncnDbg.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file ScanCncn.h
- *  \brief This file include private definitions for the scan concentrator debug module.
- *  \
- *  \date 30-Dec-2004
- */
-
-#ifndef __SCANCNCNDBG_H__
-#define __SCANCNCNDBG_H__
-
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-
-/* debug functions */
-#define DBG_SCAN_CNCN_PRINT_HELP		    	0
-#define DBG_SCAN_SRV_PRINT_STATUS               1
-
-/*
- ***********************************************************************
- *	Enums.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Structure definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-
-/**
- * \\n
- * \date 14-Feb-2005\n
- * \brief Main scan concentrator debug function
- *
- * Function Scope \e Public.\n
- * \param hScanCncn - handle to the scan concentrator object.\n
- * \param funcType - the specific debug function.\n
- * \param pParam - parameters for the debug function.\n
- */
-void scanConcentratorDebugFunction( TI_HANDLE hScanCncn, TI_HANDLE hScanSrv, TI_UINT32 funcType, void *pParam );
-
-/**
- * \\n
- * \date 14-Feb-2005\n
- * \brief Prints scan concentrator debug menu
- *
- * Function Scope \e Public.\n
- */
-void printScanConcentratorDbgFunctions(void);
-
-/**
- * \\n
- * \date 14-Feb-2005\n
- * \brief Performs a driver scan from within an app scan.\n
- *
- * Function Scope \e Public.\n
- * \param hScanCncn - handle to the scan concentrator object.\n
- */
-void appDriverScan( TI_HANDLE hScanCncn );
-
-/**
- * \\n
- * \date 14-Feb-2005\n
- * \brief Performs an app scan from within a driver scan.\n
- *
- * Function Scope \e Public.\n
- * \param hScanCncn - handle to the scan concentrator object.\n
- */
-void driverAppScan( TI_HANDLE hScanCncn );
-
-#endif /* __SCANCNCNDBG_H__ */
diff --git a/wl1271/Test/scrDbg.c b/wl1271/Test/scrDbg.c
deleted file mode 100644
index 6890975..0000000
--- a/wl1271/Test/scrDbg.c
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * scrDbg.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  scrDbg.c
- *  \brief This file include the SCR debug module implementation
- *
- *  \see   scrDbg.h, scrApi.h
- */
-
-
-#include "tidef.h"
-#include "scrDbg.h"
-#include "osApi.h"
-#include "report.h"
-
-#define MAX_DESC_LENGTH     50
-
-char clientDesc[ SCR_CID_NO_CLIENT + 1 ][ MAX_DESC_LENGTH ] = 
-{
-    "SCR_CID_APP_SCAN",
-    "SCR_CID_DRIVER_FG_SCAN",
-    "SCR_CID_CONT_SCAN",
-    "SCR_CID_XCC_MEASURE",
-    "SCR_CID_BASIC_MEASURE",
-    "SCR_CID_CONNECT",
-    "SCR_CID_IMMED_SCAN",
-    "SCR_CID_SWITCH_CHAN",
-    "SCR_CID_NUM_OF_CLIENTS",
-    "SCR_CID_NO_CLIENT"
-};
-
-char requestStatusDesc[ 4 ][ MAX_DESC_LENGTH ] = 
-{
-    "SCR_CRS_RUN",
-    "SCR_CRS_PEND",
-    "SCR_CRS_ABORT",
-    "SCR_CRS_FW_RESET"
-};
-
-char pendReasonDesc[ SCR_PR_NONE + 1 ][ MAX_DESC_LENGTH ] = 
-{
-    "SCR_PR_OTHER_CLIENT_ABORTING",
-    "SCR_PR_OTHER_CLIENT_RUNNING",
-    "SCR_PR_DIFFERENT_GROUP_RUNNING",
-    "SCR_PR_NONE"
-};
-
-char groupDesc[ SCR_GID_NUM_OF_GROUPS ][ MAX_DESC_LENGTH ] =
-{
-    "SCR_GID_IDLE",
-    "SCR_GID_DRV_SCAN",
-    "SCR_GID_APP_SCAN",
-    "SCR_GID_CONNECT",
-    "SCR_GID_CONNECTED",
-    "SCR_GID_ROAMING"
-};
-
-char stateDesc[ SCR_CS_ABORTING + 1 ][ MAX_DESC_LENGTH ] = 
-{
-    "SCR_CS_IDLE",
-    "SCR_CS_PENDING",
-    "SCR_CS_RUNNING",
-    "SCR_CS_ABORTING"
-};
-
-char modeDesc[ SCR_MID_NUM_OF_MODES][ MAX_DESC_LENGTH ] = 
-{
-    "SCR_MID_NORMAL",
-    "SCR_MID_SG",
-};
-
-char resourceDesc[ SCR_RESOURCE_NUM_OF_RESOURCES ][ MAX_DESC_LENGTH ]=
-{
-    "SCR_RESOURCE_SERVING_CHANNEL",
-    "SCR_RESOURCE_PERIODIC_SCAN"
-};
-
-/**
- * \\n
- * \date 01-May-2005\n
- * \brief Main SCR debug function
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param funcType - the specific debug function.\n
- * \param pParam - parameters for the debug function.\n
- */
-void scrDebugFunction( TI_HANDLE hScr, TI_UINT32 funcType, void *pParam )
-{
-    switch (funcType)
-    {
-    case DBG_SCR_PRINT_HELP:
-        printScrDbgFunctions();
-        break;
-
-    case DBG_SCR_CLIENT_REQUEST_SERVING_CHANNEL:
-        requestAsClient( hScr, *((EScrClientId*)pParam), SCR_RESOURCE_SERVING_CHANNEL );  
-        break;
-
-    case DBG_SCR_CLIENT_RELEASE_SERVING_CHANNEL:
-        releaseAsClient( hScr, *((EScrClientId*)pParam), SCR_RESOURCE_SERVING_CHANNEL );  
-        break;
-
-    case DBG_SCR_CLIENT_REQUEST_PERIODIC_SCAN:
-        requestAsClient( hScr, *((EScrClientId*)pParam), SCR_RESOURCE_PERIODIC_SCAN ); 
-        break;
-
-    case DBG_SCR_CLIENT_RELEASE_PERIODIC_SCAN:
-        releaseAsClient( hScr, *((EScrClientId*)pParam), SCR_RESOURCE_PERIODIC_SCAN ); 
-        break;
-
-    case DBG_SCR_SET_GROUP:
-        changeGroup( hScr, *((EScrGroupId*)pParam) );
-        break;
-
-    case DBG_SCR_PRINT_OBJECT:
-        printSCRObject( hScr );
-        break;
-
-    case DBG_SCR_SET_MODE:
-        changeMode(hScr, *((EScrModeId*)pParam));
-        break;
-
-    default:
-        WLAN_OS_REPORT(("Invalid function type in SCR debug function: %d\n", funcType));
-        break;
-    }
-}
-
-/**
- * \\n
- * \date 01-May-2005\n
- * \brief Prints SCR debug menu
- *
- * Function Scope \e Public.\n
- */
-void printScrDbgFunctions(void)
-{
-    WLAN_OS_REPORT(("   SCR Debug Functions   \n"));
-    WLAN_OS_REPORT(("-------------------------\n"));
-    WLAN_OS_REPORT(("1700 - Print the SCR Debug Help\n"));
-    WLAN_OS_REPORT(("1701 <client> - Request SCR as one shot scan (set client 0-7).\n"));
-    WLAN_OS_REPORT(("1702 <client> - Release SCR as one shot scan (set client 0-7).\n"));
-    WLAN_OS_REPORT(("1703 <client> - Request SCR as periodic scan (set client 0-7).\n"));
-    WLAN_OS_REPORT(("1704 <client> - Release SCR as periodic scan (set client 0-7).\n"));
-    WLAN_OS_REPORT(("1705 - Change SCR group\n"));
-    WLAN_OS_REPORT(("1706 - Print SCR object\n"));
-    WLAN_OS_REPORT(("1707 - Change SCR mode\n"));
-}
-
-/**
- * \\n
- * \date 29-March-2005\n
- * \brief Request the SCR with a given client ID.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param client - the client to request as.\n\
- * \param eResource - the requested resource.\n
- */
-void requestAsClient( TI_HANDLE hScr, EScrClientId client, EScrResourceId eResource )
-{
-    EScePendReason pendReason;
-    EScrClientRequestStatus requestStatus;
-
-    requestStatus = scr_clientRequest( hScr, client, eResource, &pendReason );
-    WLAN_OS_REPORT(("Resource %s was requested as client %s, result %s, pend reason %s\n",
-                    resourceDesc[ eResource ], clientDesc[ client ], requestStatusDesc[ requestStatus ],
-                    pendReasonDesc[ pendReason ]));
-}
-
-/**
- * \\n
- * \date 01-May-2005\n
- * \brief Stops continuous scan process.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param client - the client to release as.\n
- * \param eResource - the released resource.\n
- */
-void releaseAsClient( TI_HANDLE hScr, EScrClientId client, EScrResourceId eResource )
-{
-    scr_clientComplete( hScr, client, eResource );
-    WLAN_OS_REPORT(("Resource %s was released as client %s\n",
-                    resourceDesc[ eResource ], clientDesc[ client ]));
-}
-
-/**
- * \\n
- * \date 01-May-2005\n
- * \brief Change the SCR group.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param group - the group to change to.\n
- */
-void changeGroup( TI_HANDLE hScr, EScrGroupId group )
-{
-    scr_setGroup( hScr, group );
-    WLAN_OS_REPORT(("SCR group was changed to %s\n",
-                    groupDesc[ group ]));
-}
-
-/**
- * \\n
- * \date 23-Nov-2005\n
- * \brief Change the SCR mode.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param mode - the mode to change to.\n
- */
-void changeMode( TI_HANDLE hScr, EScrModeId mode )
-{
-    scr_setMode( hScr, mode );
-    WLAN_OS_REPORT(("SCR mode was changed to %s\n",
-                    modeDesc[ mode ]));
-}
-/**
- * \\n
- * \date 15-June-2005\n
- * \brief Prints the SCR object.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- */
-void printSCRObject( TI_HANDLE hScr )
-{
-#ifdef REPORT_LOG
-    TScr* pScr = (TScr*)hScr;
-    int i;
-
-    WLAN_OS_REPORT( ("SCR current group:%s, mode: %s, serving channel owner:%s, periodic scan owner: %s "
-                     "within request:%s\n", 
-                     groupDesc[ pScr->currentGroup ],modeDesc[ pScr->currentMode ],
-                     clientDesc[ pScr->runningClient[ SCR_RESOURCE_SERVING_CHANNEL ] ],
-                     clientDesc[ pScr->runningClient[ SCR_RESOURCE_PERIODIC_SCAN ] ],
-                     (TI_TRUE == pScr->statusNotficationPending ? "Yes" : "No" )) );
-    
-    WLAN_OS_REPORT( ("%-22s %-15s %-15s %-15s %-15s\n", "Client", "State (SC)", "State (PS)", "Pend Reason (SC)", "Pend Reason (PS)") );
-    WLAN_OS_REPORT( ("----------------------------------------------------------------------\n"));
-    for ( i = 0; i < SCR_CID_NUM_OF_CLIENTS; i++ )
-    {
-        WLAN_OS_REPORT( ("%-22s %-15s %-15s %-15s %-15s \n",
-                         clientDesc[ i ], stateDesc[ pScr->clientArray[ i ].state[ SCR_RESOURCE_SERVING_CHANNEL ] ], 
-                         stateDesc[ pScr->clientArray[ i ].state[ SCR_RESOURCE_PERIODIC_SCAN ] ],
-                         pendReasonDesc[ pScr->clientArray[ i ].currentPendingReason[ SCR_RESOURCE_SERVING_CHANNEL ] ],
-                         pendReasonDesc[ pScr->clientArray[ i ].currentPendingReason[ SCR_RESOURCE_PERIODIC_SCAN ] ]) );
-    }
-#endif
-}
diff --git a/wl1271/Test/scrDbg.h b/wl1271/Test/scrDbg.h
deleted file mode 100644
index 7835d31..0000000
--- a/wl1271/Test/scrDbg.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * scrDbg.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  scrDbg.h
- *  \brief This file include private definitions for the SCR debug module.
- *
- *  \see   scrDbg.c, scrApi.h
- */
-
-#ifndef __SCRDBG_H__
-#define __SCRDBG_H__
-
-#include "scr.h"
-
-/*
- ***********************************************************************
- *  Constant definitions.
- ***********************************************************************
- */
-
-/* debug functions */
-#define DBG_SCR_PRINT_HELP                      0
-#define DBG_SCR_CLIENT_REQUEST_SERVING_CHANNEL  1
-#define DBG_SCR_CLIENT_RELEASE_SERVING_CHANNEL  2
-#define DBG_SCR_CLIENT_REQUEST_PERIODIC_SCAN    3
-#define DBG_SCR_CLIENT_RELEASE_PERIODIC_SCAN    4
-#define DBG_SCR_SET_GROUP                       5
-#define DBG_SCR_PRINT_OBJECT                    6
-#define DBG_SCR_SET_MODE                        7
-
-/*
- ***********************************************************************
- *  Enums.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  Structure definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  External functions definitions
- ***********************************************************************
- */
-
-/**
- * \\n
- * \date 01-May-2005\n
- * \brief Main SCR debug function
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param funcType - the specific debug function.\n
- * \param pParam - parameters for the debug function.\n
- */
-void scrDebugFunction( TI_HANDLE hScanMngr, TI_UINT32 funcType, void *pParam );
-
-/**
- * \\n
- * \date 01-May-2005\n
- * \brief Prints SCR debug menu
- *
- * Function Scope \e Public.\n
- */
-void printScrDbgFunctions(void);
-
-/**
- * \\n
- * \date 29-March-2005\n
- * \brief Request the SCR with a given client ID.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param client - the client to request as.\n\
- * \param eResource - the requested resource.\n
- */
-void requestAsClient( TI_HANDLE hScr, EScrClientId client, EScrResourceId eResource );
-
-/**
- * \\n
- * \date 01-May-2005\n
- * \brief Stops continuous scan process.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param client - the client to release as.\n\
- */
-void releaseAsClient( TI_HANDLE hScr, EScrClientId client, EScrResourceId eResource );
-
-/**
- * \\n
- * \date 01-May-2005\n
- * \brief Change the SCR group.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param group - the group to change to.\n
- */
-void changeGroup( TI_HANDLE hScr, EScrGroupId group );
-
-/**
- * \\n
- * \date 23-Nov-2005\n
- * \brief Change the SCR mode.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param mode - the mode to change to.\n
- */
-void changeMode( TI_HANDLE hScr, EScrModeId mode );
-
-/**
- * \\n
- * \date 15-June-2005\n
- * \brief Prints the SCR object.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- */
-void printSCRObject( TI_HANDLE hScr );
-
-#endif /* __SCRDBG_H__ */
diff --git a/wl1271/Test/siteMgrDebug.c b/wl1271/Test/siteMgrDebug.c
deleted file mode 100644
index d5c2809..0000000
--- a/wl1271/Test/siteMgrDebug.c
+++ /dev/null
@@ -1,1224 +0,0 @@
-/*
- * siteMgrDebug.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file reportReplvl.c
- *  \brief Report level implementation
- * 
- *  \see reportReplvl.h
- */
-
-/** \file   siteMgrDebug.c 
- *  \brief  The siteMgrDebug module.
- *  
- *  \see    siteMgrDebug.h
- */
-
-#include "tidef.h"
-#include "osApi.h"
-#include "paramOut.h"
-#include "siteMgrDebug.h"
-#include "siteMgrApi.h"
-#include "siteHash.h"
-#include "report.h"
-#include "CmdDispatcher.h"
-#include "DrvMainModules.h"
-#include "sme.h"
-#include "apConn.h"
-#include "healthMonitor.h"
-#include "conn.h"
-#include "connApi.h"
-
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#endif
-
-
-static void printPrimarySite(siteMgr_t *pSiteMgr);
-
-void printSiteTable(siteMgr_t *pSiteMgr, char *desiredSsid);
-
-static void printDesiredParams(siteMgr_t *pSiteMgr, TI_HANDLE hCmdDispatch);
-
-static void printPrimarySiteDesc(siteMgr_t *pSiteMgr, OS_802_11_BSSID *pPrimarySiteDesc);
-
-static void setRateSet(TI_UINT8 maxRate, TRates *pRates);
-
-void printSiteMgrHelpMenu(void);
-
-/*	Function implementation */
-void siteMgrDebugFunction (TI_HANDLE         hSiteMgr, 
-                           TStadHandlesList *pStadHandles,
-                           TI_UINT32         funcType, 
-                           void             *pParam)
-{
-	siteMgr_t *pSiteMgr = (siteMgr_t *)hSiteMgr;
-	paramInfo_t		param;
-	TSsid			newDesiredSsid;
-	TI_UINT8		value;
-	TI_UINT8		i;
-	OS_802_11_BSSID primarySiteDesc;
-	TRates			ratesSet;
-
-
-	newDesiredSsid.len = 5;
-	os_memoryCopy(pSiteMgr->hOs, (void *)newDesiredSsid.str, "yaeli", 5);
-
-	
-	switch (funcType)
-	{
-	case SITE_MGR_DEBUG_HELP_MENU:
-		printSiteMgrHelpMenu();
-		break;
-
-	case PRIMARY_SITE_DBG:
-		printPrimarySite(pSiteMgr);
-		break;
-
-	case SITE_TABLE_DBG:
-		printSiteTable(pSiteMgr, NULL);
-		break;
-
-	case DESIRED_PARAMS_DBG:
-		printDesiredParams(pSiteMgr, pStadHandles->hCmdDispatch);
-		break;
-
-	case GET_PRIMARY_SITE_DESC_DBG:
-		param.paramType = SITE_MGR_GET_SELECTED_BSSID_INFO;
-		param.content.pSiteMgrPrimarySiteDesc = &primarySiteDesc;
-		cmdDispatch_GetParam(pStadHandles->hCmdDispatch, &param);
-		printPrimarySiteDesc(pSiteMgr, &primarySiteDesc);
-		break;
-
-	case SET_RSN_DESIRED_CIPHER_SUITE_DBG:
-		param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
-		value = *((TI_UINT32 *)pParam);
-		param.content.rsnEncryptionStatus = (ECipherSuite)value;
-		cmdDispatch_SetParam(pStadHandles->hCmdDispatch, &param); 
-		WLAN_OS_REPORT(("\nSetting RSN_DESIRED_CIPHER_SUITE_PARAM : %d\n", value));
-		break;
-
-	case GET_RSN_DESIRED_CIPHER_SUITE_DBG:
-		param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
-		cmdDispatch_GetParam(pStadHandles->hCmdDispatch, &param);
-		WLAN_OS_REPORT(("\nGetting RSN_DESIRED_CIPHER_SUITE_PARAM: %d\n", param.content.rsnEncryptionStatus));
-		break;
- 
-	case SET_RSN_DESIRED_AUTH_TYPE_DBG:
-		param.paramType = RSN_EXT_AUTHENTICATION_MODE;
-		value = *((TI_UINT32 *)pParam);
-		param.content.rsnDesiredAuthType = (EAuthSuite)value;
-		cmdDispatch_SetParam(pStadHandles->hCmdDispatch, &param); 
-		if (value == RSN_AUTH_OPEN)
-			WLAN_OS_REPORT(("\nSetting RSN_DESIRED_AUTH_TYPE_PARAM:	RSN_AUTH_OPEN\n"));
-		else if (value == RSN_AUTH_SHARED_KEY)
-			WLAN_OS_REPORT(("\nSetting RSN_DESIRED_AUTH_TYPE_PARAM:	RSN_AUTH_SHARED_KEY\n"));
-		else if (value == RSN_AUTH_AUTO_SWITCH)
-			WLAN_OS_REPORT(("\nSetting RSN_DESIRED_AUTH_TYPE_PARAM:	RSN_AUTH_AUTO_SWITCH\n"));
-		else 
-			WLAN_OS_REPORT(("\nSetting RSN_DESIRED_AUTH_TYPE_PARAM:	Invalid: %d\n", value));
-		break;
-
-	case GET_RSN_DESIRED_AUTH_TYPE_DBG:
-		param.paramType = RSN_EXT_AUTHENTICATION_MODE;
-		cmdDispatch_GetParam(pStadHandles->hCmdDispatch, &param);
-		if (param.content.rsnDesiredAuthType == RSN_AUTH_OPEN)
-			WLAN_OS_REPORT(("\nGetting RSN_DESIRED_AUTH_TYPE_PARAM:	RSN_AUTH_OPEN\n"));
-		else if (param.content.rsnDesiredAuthType == RSN_AUTH_SHARED_KEY)
-			WLAN_OS_REPORT(("\nGetting RSN_DESIRED_AUTH_TYPE_PARAM:	RSN_AUTH_SHARED_KEY\n"));
-		else if (param.content.rsnDesiredAuthType == RSN_AUTH_AUTO_SWITCH)
-			WLAN_OS_REPORT(("\nGetting RSN_DESIRED_AUTH_TYPE_PARAM:	RSN_AUTH_AUTO_SWITCH\n"));
-		else 
-			WLAN_OS_REPORT(("\nGetting RSN_DESIRED_AUTH_TYPE_PARAM:	Invalid: %d\n", param.content.rsnDesiredAuthType));
-
-		break;
-
-	case GET_CONNECTION_STATUS_DBG:
-		param.paramType = SME_CONNECTION_STATUS_PARAM;
-		cmdDispatch_GetParam(pStadHandles->hCmdDispatch, &param);
-		if (param.content.smeSmConnectionStatus == eDot11Idle)
-			WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM:	STATUS_IDLE\n"));
-		else if (param.content.smeSmConnectionStatus == eDot11Scaning)
-			WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM:	STATUS_SCANNING\n"));
-		else if (param.content.smeSmConnectionStatus == eDot11Connecting)
-			WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM:	STATUS_CONNECTING\n"));
-		else if (param.content.smeSmConnectionStatus == eDot11Associated)
-			WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM:	STATUS_ASSOCIATED\n"));
-		else if (param.content.smeSmConnectionStatus == eDot11Disassociated)
-			WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM:	STATUS_DIS_ASSOCIATED\n"));
-        else if (param.content.smeSmConnectionStatus == eDot11RadioDisabled)
-            WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM:	STATUS_RADIO_DISABLED\n"));
-        else 
-			WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM:	STATUS_ERROR\n"));
-		break;
-
-	case SET_SUPPORTED_RATE_SET_DBG:
-		param.paramType = SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM;
-		value = *((TI_UINT32 *)pParam);
-		setRateSet(value, &ratesSet);
-		os_memoryCopy(pSiteMgr->hOs, &(param.content.siteMgrDesiredSupportedRateSet), &(ratesSet), sizeof(TRates));
-		WLAN_OS_REPORT(("\nSetting SET_SUPPORTED_RATE_SET_DBG\n"));
-		cmdDispatch_SetParam(pStadHandles->hCmdDispatch, &param);
-		break;
-
-	case GET_SUPPORTED_RATE_SET_DBG:
-		param.paramType = SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM;
-		cmdDispatch_GetParam(pStadHandles->hCmdDispatch, &param);
-		WLAN_OS_REPORT(("\nGetting SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM\n"));
-		if(param.content.siteMgrDesiredSupportedRateSet.len == 0)
-			WLAN_OS_REPORT(("\nNo rates defined\n"));
-		else 
-		{	
-			/* It looks like it never happens. Anyway decided to check */
-            if ( param.content.siteMgrDesiredSupportedRateSet.len > DOT11_MAX_SUPPORTED_RATES )
-            {
-                WLAN_OS_REPORT(("siteMgrDebugFunction. param.content.siteMgrDesiredSupportedRateSet.len=%d exceeds the limit %d\n",
-                         param.content.siteMgrDesiredSupportedRateSet.len, DOT11_MAX_SUPPORTED_RATES));
-                handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-                param.content.siteMgrDesiredSupportedRateSet.len = DOT11_MAX_SUPPORTED_RATES;
-            }
-			for (i = 0; i < param.content.siteMgrDesiredSupportedRateSet.len; i++)
-				WLAN_OS_REPORT(("\nRate %d is 0x%X\n", i +1, param.content.siteMgrDesiredSupportedRateSet.ratesString[i]));
-		}
-		break;
-
-	case SET_MLME_LEGACY_AUTH_TYPE_DBG:
-		param.paramType = MLME_LEGACY_TYPE_PARAM;
-		value = *((TI_UINT32 *)pParam);
-		param.content.mlmeLegacyAuthType = (legacyAuthType_e)value;
-		cmdDispatch_SetParam(pStadHandles->hCmdDispatch, &param); 
-		if (value == AUTH_LEGACY_OPEN_SYSTEM)
-			WLAN_OS_REPORT(("\nSetting MLME_LEGACY_TYPE_PARAM:	AUTH_LEGACY_OPEN_SYSTEM\n"));
-		else if (value == AUTH_LEGACY_SHARED_KEY)
-			WLAN_OS_REPORT(("\nSetting MLME_LEGACY_TYPE_PARAM:	AUTH_LEGACY_SHARED_KEY\n"));
-		else if (value == AUTH_LEGACY_AUTO_SWITCH)
-			WLAN_OS_REPORT(("\nSetting MLME_LEGACY_TYPE_PARAM:	AUTH_LEGACY_AUTO_SWITCH\n"));
-		else 
-			WLAN_OS_REPORT(("\nSetting MLME_LEGACY_TYPE_PARAM:	Invalid: %d\n", value));
-		break;
-
-	case GET_MLME_LEGACY_AUTH_TYPE_DBG:
-		param.paramType = MLME_LEGACY_TYPE_PARAM;
-		cmdDispatch_GetParam(pStadHandles->hCmdDispatch, &param);
-		if (param.content.mlmeLegacyAuthType == AUTH_LEGACY_OPEN_SYSTEM)
-			WLAN_OS_REPORT(("\nGetting MLME_LEGACY_TYPE_PARAM:	AUTH_LEGACY_OPEN_SYSTEM\n"));
-		else if (param.content.rsnDesiredAuthType == AUTH_LEGACY_SHARED_KEY)
-			WLAN_OS_REPORT(("\nGetting MLME_LEGACY_TYPE_PARAM:	AUTH_LEGACY_SHARED_KEY\n"));
-		else if (param.content.rsnDesiredAuthType == AUTH_LEGACY_AUTO_SWITCH)
-			WLAN_OS_REPORT(("\nGetting MLME_LEGACY_TYPE_PARAM:	AUTH_AUTO_SWITCH\n"));
-		else 
-			WLAN_OS_REPORT(("\nGetting MLME_LEGACY_TYPE_PARAM:	Invalid: %d\n", param.content.rsnDesiredAuthType));
-
-		break;
-
-
-	case RADIO_STAND_BY_CHANGE_STATE:
-		WLAN_OS_REPORT(("\nChange GPIO-13 State...\n"));
-		break;
-		
-
-    case PRINT_FAILURE_EVENTS:
-        {
-
-	WLAN_OS_REPORT(("\n PRINT HEALTH MONITOR LOG\n"));
-	healthMonitor_printFailureEvents (pStadHandles->hHealthMonitor);
-	apConn_printStatistics(pStadHandles->hAPConnection);
-#ifdef REPORT_LOG		
-        conn_ibssPrintStatistics(pStadHandles->hConn);
-#endif
-        if (((conn_t*)pStadHandles->hConn)->currentConnType==CONNECTION_INFRA)
-        {
-            switch (((conn_t*)pStadHandles->hConn)->state)
-            {
-            case   0:  WLAN_OS_REPORT((" CONN state is IDLE\n")); 
-                break;       
-             case   1:  WLAN_OS_REPORT((" CONN state is SCR_WAIT\n")); 
-                break;             
-             case   2:  WLAN_OS_REPORT((" CONN state is WAIT_JOIN_CMPLT\n")); 
-                break;            
-             case   3:  WLAN_OS_REPORT((" CONN state is MLME_WAIT\n")); 
-                break;           
-             case   4:  WLAN_OS_REPORT((" CONN state is RSN_WAIT\n")); 
-                break;            
-             case   5:  WLAN_OS_REPORT((" CONN state is CONFIG_HW\n")); 
-                break;        
-             case   6:  WLAN_OS_REPORT((" CONN state is CONNECTED\n")); 
-                break; 
-            case   7:  WLAN_OS_REPORT((" CONN state is DISASSOCC\n")); 
-               break; 
-            default:
-                break;
-            }
-        }
-        }
-        break;
-
-	case FORCE_HW_RESET_RECOVERY:
-		WLAN_OS_REPORT(("\n Currently not supported!\n"));
-		break;
-
-	case FORCE_SOFT_RECOVERY:
-		WLAN_OS_REPORT(("\n FORCE Full Recovery (Soft)\n"));
-		break;
-
-
-	case PERFORM_HEALTH_TEST:
-		WLAN_OS_REPORT(("\n PERFORM_HEALTH_TEST \n"));
-		healthMonitor_PerformTest(pStadHandles->hHealthMonitor, TI_FALSE);	
-		break;
-
-	case PRINT_SITE_TABLE_PER_SSID:
-		printSiteTable(pSiteMgr, (char*)pParam);
-		break;
-
-	case SET_DESIRED_CHANNEL:
-		param.paramType = SITE_MGR_DESIRED_CHANNEL_PARAM;
-		param.content.siteMgrDesiredChannel = *(TI_UINT8*)pParam;
-		siteMgr_setParam(pStadHandles->hSiteMgr, &param);
-		break;
-
-	default:
-		WLAN_OS_REPORT(("Invalid function type in Debug Site Manager Function Command: %d\n\n", funcType));
-		break;
-	}
-} 
-
-static void printPrimarySite(siteMgr_t *pSiteMgr)
-{
-	siteEntry_t *pSiteEntry;	
-    TI_UINT8	len;
-	char	ssid[MAX_SSID_LEN + 1];
-	
-	pSiteEntry = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-	
-	if (pSiteEntry == NULL)
-	{
-		WLAN_OS_REPORT(("\n\n************************	PRIMARY SITE IS NULL	****************************\n\n\n"));
-		return;
-	}
-
-	WLAN_OS_REPORT(("\n\n************************	PRIMARY SITE	****************************\n\n\n"));
-	
-	WLAN_OS_REPORT(("BSSID			%2X-%2X-%2X-%2X-%2X-%2X	",	
-														pSiteEntry->bssid[0], 
-														pSiteEntry->bssid[1], 
-														pSiteEntry->bssid[2], 
-														pSiteEntry->bssid[3], 
-														pSiteEntry->bssid[4], 
-														pSiteEntry->bssid[5]));
-    len = pSiteEntry->ssid.len;
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pSiteEntry->ssid.len > MAX_SSID_LEN )
-    {
-        WLAN_OS_REPORT(("printPrimarySite. pSiteEntry->ssid.len=%d exceeds the limit %d\n",
-                   pSiteEntry->ssid.len, MAX_SSID_LEN));
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        len = MAX_SSID_LEN;
-    }
-	os_memoryCopy(pSiteMgr->hOs, ssid, (void *)pSiteEntry->ssid.str, len);
-	ssid[len] = '\0';
-	WLAN_OS_REPORT(("SSID			%s\n\n", ssid));
-
-	if (pSiteEntry->bssType == BSS_INFRASTRUCTURE)
-		WLAN_OS_REPORT(("BSS Type		INFRASTRUCTURE\n\n"));
-	else if (pSiteEntry->bssType == BSS_INDEPENDENT)
-		WLAN_OS_REPORT(("BSS Type		IBSS\n\n"));
-	else if (pSiteEntry->bssType == BSS_ANY)
-		WLAN_OS_REPORT(("BSS Type		ANY\n\n"));
-	else
-		WLAN_OS_REPORT(("BSS Type		INVALID\n\n"));
-
-
-	WLAN_OS_REPORT(("Channel			%d\n", pSiteEntry->channel));
-
-	WLAN_OS_REPORT(("\n"));
-
-	switch (pSiteEntry->maxBasicRate)
-	{
-	case DRV_RATE_1M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_1M_BIT\n"));
-		break;
-
-	case DRV_RATE_2M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_2M_BIT\n"));
-		break;
-
-	case DRV_RATE_5_5M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_5_5M_BIT\n"));
-		break;
-
-	case DRV_RATE_11M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_11M_BIT\n"));
-		break;
-
-	case DRV_RATE_6M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_6M_BIT\n"));
-		break;
-
-	case DRV_RATE_9M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_9M_BIT\n"));
-		break;
-
-	case DRV_RATE_12M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_12M_BIT\n"));
-		break;
-
-	case DRV_RATE_18M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_18M_BIT\n"));
-		break;
-
-	case DRV_RATE_24M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_24M_BIT\n"));
-		break;
-
-	case DRV_RATE_36M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_36M_BIT\n"));
-		break;
-
-	case DRV_RATE_48M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_48M_BIT\n"));
-		break;
-
-	case DRV_RATE_54M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_54M_BIT\n"));
-		break;
-
-	default:
-		WLAN_OS_REPORT(("Max Basic Rate		INVALID,  0x%X\n", pSiteEntry->maxBasicRate));
-		break;
-	}
-
-	switch (pSiteEntry->maxActiveRate)
-	{
-	case DRV_RATE_1M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_1M_BIT\n"));
-		break;
-
-	case DRV_RATE_2M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_2M_BIT\n"));
-		break;
-
-	case DRV_RATE_5_5M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_5_5M_BIT\n"));
-		break;
-
-	case DRV_RATE_11M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_11M_BIT\n"));
-		break;
-
-	case DRV_RATE_22M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_22M_BIT\n"));
-		break;
-
-	case DRV_RATE_6M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_6M_BIT\n"));
-		break;
-
-	case DRV_RATE_9M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_9M_BIT\n"));
-		break;
-
-	case DRV_RATE_12M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_12M_BIT\n"));
-		break;
-
-	case DRV_RATE_18M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_18M_BIT\n"));
-		break;
-
-	case DRV_RATE_24M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_24M_BIT\n"));
-		break;
-
-	case DRV_RATE_36M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_36M_BIT\n"));
-		break;
-
-	case DRV_RATE_48M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_48M_BIT\n"));
-		break;
-
-	case DRV_RATE_54M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_54M_BIT\n"));
-		break;
-
-	default:
-		WLAN_OS_REPORT(("Max Active Rate		INVALID,  0x%X\n", pSiteEntry->maxActiveRate));
-		break;
-	}
-
-	WLAN_OS_REPORT(("\n"));
-
-	if (pSiteEntry->probeModulation == DRV_MODULATION_QPSK)
-		WLAN_OS_REPORT(("Probe Modulation	QPSK\n"));
-	else if (pSiteEntry->probeModulation == DRV_MODULATION_CCK)
-		WLAN_OS_REPORT(("Probe Modulation	CCK\n"));
-	else if (pSiteEntry->probeModulation == DRV_MODULATION_PBCC)
-		WLAN_OS_REPORT(("Probe Modulation	PBCC\n"));
-	else if (pSiteEntry->probeModulation == DRV_MODULATION_OFDM)
-		WLAN_OS_REPORT(("Probe Modulation	OFDM\n"));
-	else
-		WLAN_OS_REPORT(("Probe Modulation	INVALID, %d\n", pSiteEntry->probeModulation));
-
-	if (pSiteEntry->beaconModulation == DRV_MODULATION_QPSK)
-		WLAN_OS_REPORT(("Beacon Modulation	QPSK\n"));
-	else if (pSiteEntry->beaconModulation == DRV_MODULATION_CCK)
-		WLAN_OS_REPORT(("Beacon Modulation	CCK\n"));
-	else if (pSiteEntry->beaconModulation == DRV_MODULATION_PBCC)
-		WLAN_OS_REPORT(("Beacon Modulation	PBCC\n"));
-	else if (pSiteEntry->beaconModulation == DRV_MODULATION_OFDM)
-		WLAN_OS_REPORT(("Beacon Modulation	OFDM\n"));
-	else
-		WLAN_OS_REPORT(("Beacon Modulation	INVALID, %d\n", pSiteEntry->beaconModulation));
-
-	WLAN_OS_REPORT(("\n"));
-
-	if (pSiteEntry->privacy == TI_TRUE)
-		WLAN_OS_REPORT(("Privacy							        On\n\n"));
-	else
-		WLAN_OS_REPORT(("Privacy							        Off\n\n"));
-
-	if (pSiteEntry->currentPreambleType == PREAMBLE_SHORT)
-		WLAN_OS_REPORT(("Cap Preamble Type     Short\n"));
-	else if (pSiteEntry->currentPreambleType == PREAMBLE_LONG)
-		WLAN_OS_REPORT(("Cap Preamble Type     Long\n"));
-	else
-		WLAN_OS_REPORT(("Preamble	INVALID, %d\n", pSiteEntry->currentPreambleType));
-
-
-	if(pSiteEntry->barkerPreambleType == PREAMBLE_UNSPECIFIED)
-		WLAN_OS_REPORT(("Barker preamble Type		Unspecified\n"));
-	else if(pSiteEntry->barkerPreambleType == PREAMBLE_SHORT)
-		WLAN_OS_REPORT(("Barker_Preamble Type		Short\n"));
-	else
-		WLAN_OS_REPORT(("Barker_Preamble Type		Long\n"));
-
-	if(pSiteEntry->currentSlotTime == PHY_SLOT_TIME_SHORT)
-		WLAN_OS_REPORT(("Slot time type					   Short\n"));
-	else
-		WLAN_OS_REPORT(("Slot time type					   Long\n"));
-
-
-	WLAN_OS_REPORT(("\n"));
-
-	WLAN_OS_REPORT(("Beacon interval		%d\n", pSiteEntry->beaconInterval));
-
-	WLAN_OS_REPORT(("Local Time Stamp	%d\n", pSiteEntry->localTimeStamp));
-
-	WLAN_OS_REPORT(("rssi			%d\n", pSiteEntry->rssi));
-
-	WLAN_OS_REPORT(("\n"));
-
-	WLAN_OS_REPORT(("Fail status		%d\n", pSiteEntry->failStatus));
-
-	WLAN_OS_REPORT(("\n---------------------------------------------------------------\n\n", NULL)); 
-
-}
-
-void printSiteTable(siteMgr_t *pSiteMgr, char *desiredSsid)
-{
-	TI_UINT8	i, numOfSites = 0;
-	siteEntry_t *pSiteEntry;	
-	char	ssid[MAX_SSID_LEN + 1];
-    siteTablesParams_t      *pCurrentSiteTable = pSiteMgr->pSitesMgmtParams->pCurrentSiteTable;
-    TI_UINT8                   tableIndex=2;
-
-    WLAN_OS_REPORT(("\n\n************************	SITE TABLE	****************************\n\n\n"));
-	
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pCurrentSiteTable->maxNumOfSites > MAX_SITES_BG_BAND )
-    {
-        WLAN_OS_REPORT(("printSiteTable. pCurrentSiteTable->maxNumOfSites=%d exceeds the limit %d\n",
-                   pCurrentSiteTable->maxNumOfSites, MAX_SITES_BG_BAND));
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        pCurrentSiteTable->maxNumOfSites = MAX_SITES_BG_BAND;
-    }
-
-    do
-	{
-        tableIndex--;
-		for (i = 0; i < pCurrentSiteTable->maxNumOfSites; i++)
-		{
-			pSiteEntry = &(pCurrentSiteTable->siteTable[i]);
-	
-			if (pSiteEntry->siteType == SITE_NULL)
-				continue;
-            /* It looks like it never happens. Anyway decided to check */
-            if ( pCurrentSiteTable->siteTable[i].ssid.len > MAX_SSID_LEN )
-            {
-                WLAN_OS_REPORT(("printSiteTable. pCurrentSiteTable->siteTable[%d].ssid.len=%d exceeds the limit %d\n",
-                         i, pCurrentSiteTable->siteTable[i].ssid.len, MAX_SSID_LEN));
-                handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-                pCurrentSiteTable->siteTable[i].ssid.len = MAX_SSID_LEN;
-            }
-			os_memoryCopy(pSiteMgr->hOs ,ssid, (void *)pCurrentSiteTable->siteTable[i].ssid.str, pCurrentSiteTable->siteTable[i].ssid.len);
-			ssid[pCurrentSiteTable->siteTable[i].ssid.len] = '\0';
-			
-			if (desiredSsid != NULL)
-			{
-				int desiredSsidLength = 0;
-				char * tmp = desiredSsid;
-
-				while (tmp != '\0')
-				{
-					desiredSsidLength++;
-					tmp++;
-				}
-
-				if (os_memoryCompare(pSiteMgr->hOs, (TI_UINT8 *)ssid, (TI_UINT8 *)desiredSsid, desiredSsidLength))
-					continue;
-			}
-			
-			WLAN_OS_REPORT(("SSID	%s\n\n", ssid));
-	
-			 
- 
-			if (pSiteEntry->siteType == SITE_PRIMARY)
-				WLAN_OS_REPORT( ("	 ENTRY PRIMARY %d \n", numOfSites));
-			else
-				WLAN_OS_REPORT( ("	ENTRY %d\n", i));
-	
-			WLAN_OS_REPORT(("BSSID			%2X-%2X-%2X-%2X-%2X-%2X	\n",	
-																pCurrentSiteTable->siteTable[i].bssid[0], 
-																pCurrentSiteTable->siteTable[i].bssid[1], 
-																pCurrentSiteTable->siteTable[i].bssid[2], 
-																pCurrentSiteTable->siteTable[i].bssid[3], 
-																pCurrentSiteTable->siteTable[i].bssid[4], 
-																pCurrentSiteTable->siteTable[i].bssid[5]));
-		
-		
-			if (pCurrentSiteTable->siteTable[i].bssType == BSS_INFRASTRUCTURE)
-				WLAN_OS_REPORT(("BSS Type		INFRASTRUCTURE\n\n"));
-			else if (pCurrentSiteTable->siteTable[i].bssType == BSS_INDEPENDENT)
-				WLAN_OS_REPORT(("BSS Type		IBSS\n\n"));
-			else if (pCurrentSiteTable->siteTable[i].bssType == BSS_ANY)
-				WLAN_OS_REPORT(("BSS Type		ANY\n\n"));
-			else
-				WLAN_OS_REPORT(("BSS Type		INVALID\n\n"));
-		
-		
-			WLAN_OS_REPORT(("Channel			%d\n", pCurrentSiteTable->siteTable[i].channel));
-		
-			WLAN_OS_REPORT(("\n"));
-		
-			switch (pCurrentSiteTable->siteTable[i].maxBasicRate)
-			{
-			case DRV_RATE_1M:
-				WLAN_OS_REPORT(("Max Basic Rate		RATE_1M_BIT\n"));
-				break;
-	
-			case DRV_RATE_2M:
-				WLAN_OS_REPORT(("Max Basic Rate		RATE_2M_BIT\n"));
-				break;
-	
-			case DRV_RATE_5_5M:
-				WLAN_OS_REPORT(("Max Basic Rate		RATE_5_5M_BIT\n"));
-				break;
-	
-			case DRV_RATE_11M:
-				WLAN_OS_REPORT(("Max Basic Rate		RATE_11M_BIT\n"));
-				break;
-	
-			case DRV_RATE_6M:
-				WLAN_OS_REPORT(("Max Basic Rate		RATE_6M_BIT\n"));
-				break;
-		
-			case DRV_RATE_9M:
-				WLAN_OS_REPORT(("Max Basic Rate		RATE_9M_BIT\n"));
-				break;
-		
-			case DRV_RATE_12M:
-				WLAN_OS_REPORT(("Max Basic Rate		RATE_12M_BIT\n"));
-				break;
-		
-			case DRV_RATE_18M:
-				WLAN_OS_REPORT(("Max Basic Rate		RATE_18M_BIT\n"));
-				break;
-		
-			case DRV_RATE_24M:
-				WLAN_OS_REPORT(("Max Basic Rate		RATE_24M_BIT\n"));
-				break;
-		
-			case DRV_RATE_36M:
-				WLAN_OS_REPORT(("Max Basic Rate		RATE_36M_BIT\n"));
-				break;
-		
-			case DRV_RATE_48M:
-				WLAN_OS_REPORT(("Max Basic Rate		RATE_48M_BIT\n"));
-				break;
-		
-			case DRV_RATE_54M:
-				WLAN_OS_REPORT(("Max Basic Rate		RATE_54M_BIT\n"));
-				break;
-
-			default:
-					WLAN_OS_REPORT(("Max Basic Rate		INVALID,  0x%X\n", pCurrentSiteTable->siteTable[i].maxBasicRate));
-				break;
-			}
-	
-				switch (pCurrentSiteTable->siteTable[i].maxActiveRate)
-			{
-			case DRV_RATE_1M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_1M_BIT\n"));
-				break;
-	
-			case DRV_RATE_2M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_2M_BIT\n"));
-				break;
-	
-			case DRV_RATE_5_5M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_5_5M_BIT\n"));
-				break;
-	
-			case DRV_RATE_11M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_11M_BIT\n"));
-				break;
-	
-			case DRV_RATE_22M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_22M_BIT\n"));
-				break;
-
-			case DRV_RATE_6M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_6M_BIT\n"));
-				break;
-		
-			case DRV_RATE_9M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_9M_BIT\n"));
-				break;
-		
-			case DRV_RATE_12M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_12M_BIT\n"));
-				break;
-		
-			case DRV_RATE_18M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_18M_BIT\n"));
-				break;
-		
-			case DRV_RATE_24M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_24M_BIT\n"));
-				break;
-		
-			case DRV_RATE_36M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_36M_BIT\n"));
-				break;
-		
-			case DRV_RATE_48M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_48M_BIT\n"));
-				break;
-		
-			case DRV_RATE_54M:
-				WLAN_OS_REPORT(("Max Active Rate		RATE_54M_BIT\n"));
-				break;
-	
-			default:
-					WLAN_OS_REPORT(("Max Active Rate		INVALID,  0x%X\n", pCurrentSiteTable->siteTable[i].maxActiveRate));
-				break;
-			}
-	
-			WLAN_OS_REPORT(("\n"));
-	
-				if (pCurrentSiteTable->siteTable[i].probeModulation == DRV_MODULATION_QPSK)
-				WLAN_OS_REPORT(("Probe Modulation	QPSK\n"));
-				else if (pCurrentSiteTable->siteTable[i].probeModulation == DRV_MODULATION_CCK)
-				WLAN_OS_REPORT(("Probe Modulation	CCK\n"));
-				else if (pCurrentSiteTable->siteTable[i].probeModulation == DRV_MODULATION_PBCC)
-					WLAN_OS_REPORT(("Probe Modulation	PBCC\n"));
-				else
-					WLAN_OS_REPORT(("Probe Modulation	INVALID, %d\n", pCurrentSiteTable->siteTable[i].probeModulation));
-		
-				if (pCurrentSiteTable->siteTable[i].beaconModulation == DRV_MODULATION_QPSK)
-					WLAN_OS_REPORT(("Beacon Modulation	QPSK\n"));
-				else if (pCurrentSiteTable->siteTable[i].beaconModulation == DRV_MODULATION_CCK)
-					WLAN_OS_REPORT(("Beacon Modulation	CCK\n"));
-				else if (pCurrentSiteTable->siteTable[i].beaconModulation == DRV_MODULATION_PBCC)
-					WLAN_OS_REPORT(("Beacon Modulation	PBCC\n"));
-				else
-					WLAN_OS_REPORT(("Beacon Modulation	INVALID, %d\n", pCurrentSiteTable->siteTable[i].beaconModulation));
-		
-				WLAN_OS_REPORT(("\n"));
-		
-				if (pCurrentSiteTable->siteTable[i].privacy == TI_TRUE)
-				WLAN_OS_REPORT(("Privacy			On\n"));
-			else
-				WLAN_OS_REPORT(("Privacy			Off\n"));
-	
-				if (pCurrentSiteTable->siteTable[i].currentPreambleType == PREAMBLE_SHORT)
-				WLAN_OS_REPORT(("Preamble Type		Short\n"));
-				else if (pCurrentSiteTable->siteTable[i].currentPreambleType == PREAMBLE_LONG)
-				WLAN_OS_REPORT(("Preamble Type		Long\n"));
-			else
-					WLAN_OS_REPORT(("Preamble	INVALID, %d\n", pCurrentSiteTable->siteTable[i].currentPreambleType));
-	
-	
-			WLAN_OS_REPORT(("\n"));
-	
-				WLAN_OS_REPORT(("Beacon interval		%d\n", pCurrentSiteTable->siteTable[i].beaconInterval));
-	
-				WLAN_OS_REPORT(("Local Time Stamp	%d\n", pCurrentSiteTable->siteTable[i].localTimeStamp));
-		
-				WLAN_OS_REPORT(("rssi			%d\n", pCurrentSiteTable->siteTable[i].rssi));
-		
-				WLAN_OS_REPORT(("\n"));
-		
-				WLAN_OS_REPORT(("Fail status		%d\n", pCurrentSiteTable->siteTable[i].failStatus));
-		
-				WLAN_OS_REPORT(("ATIM Window %d\n", pCurrentSiteTable->siteTable[i].atimWindow));
-	
-			WLAN_OS_REPORT(("\n---------------------------------------------------------------\n\n", NULL)); 
-	
-			numOfSites++;
-		}
-	
-		WLAN_OS_REPORT(("\n		Number Of Sites:	%d\n", numOfSites)); 
-		WLAN_OS_REPORT(("\n---------------------------------------------------------------\n", NULL)); 
-		
-		   if ((pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE) && (tableIndex==1))
-		   {   /* change site table */
-			   if (pCurrentSiteTable == &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables)
-				  {
-                   WLAN_OS_REPORT(("\n		dot11A_sitesTables	\n")); 
-
-                   pCurrentSiteTable = (siteTablesParams_t *)&pSiteMgr->pSitesMgmtParams->dot11A_sitesTables;
-				  }
-			   else
-				  {
-                   WLAN_OS_REPORT(("\n		dot11BG_sitesTables	\n")); 
-
-                   pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables;
-				  }
-		   }
-
-    } while (tableIndex>0);
-}
-
-static void printDesiredParams(siteMgr_t *pSiteMgr, TI_HANDLE hCmdDispatch)
-{  
-	paramInfo_t		param;
-	
-	WLAN_OS_REPORT(("\n\n*****************************************", NULL));
-	WLAN_OS_REPORT(("*****************************************\n\n", NULL));
-
-	WLAN_OS_REPORT(("Channel			%d\n", pSiteMgr->pDesiredParams->siteMgrDesiredChannel));
-	
-	WLAN_OS_REPORT(("\n*****************************************\n\n", NULL));
-
-	switch (pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxBasic)
-	{
-	case DRV_RATE_1M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_1M_BIT\n"));
-		break;
-
-	case DRV_RATE_2M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_2M_BIT\n"));
-		break;
-
-	case DRV_RATE_5_5M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_5_5M_BIT\n"));
-		break;
-
-	case DRV_RATE_11M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_11M_BIT\n"));
-		break;
-
-	case DRV_RATE_22M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_22M_BIT\n"));
-		break;
-
-	case DRV_RATE_6M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_6M_BIT\n"));
-		break;
-
-	case DRV_RATE_9M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_9M_BIT\n"));
-		break;
-
-	case DRV_RATE_12M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_12M_BIT\n"));
-		break;
-
-	case DRV_RATE_18M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_18M_BIT\n"));
-		break;
-
-	case DRV_RATE_24M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_24M_BIT\n"));
-		break;
-
-	case DRV_RATE_36M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_36M_BIT\n"));
-		break;
-
-	case DRV_RATE_48M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_48M_BIT\n"));
-		break;
-
-	case DRV_RATE_54M:
-		WLAN_OS_REPORT(("Max Basic Rate		RATE_54M_BIT\n"));
-		break;
-
-	default:
-		WLAN_OS_REPORT(("Invalid basic rate value	0x%X\n", pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxBasic));
-		break;
-	}
-
-	switch (pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxActive)
-	{
-	case DRV_RATE_1M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_1M_BIT\n"));
-		break;
-
-	case DRV_RATE_2M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_2M_BIT\n"));
-		break;
-
-	case DRV_RATE_5_5M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_5_5M_BIT\n"));
-		break;
-
-	case DRV_RATE_11M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_11M_BIT\n"));
-		break;
-
-	case DRV_RATE_22M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_22M_BIT\n"));
-		break;
-
-	case DRV_RATE_6M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_6M_BIT\n"));
-		break;
-
-	case DRV_RATE_9M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_9M_BIT\n"));
-		break;
-
-	case DRV_RATE_12M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_12M_BIT\n"));
-		break;
-
-	case DRV_RATE_18M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_18M_BIT\n"));
-		break;
-
-	case DRV_RATE_24M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_24M_BIT\n"));
-		break;
-
-	case DRV_RATE_36M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_36M_BIT\n"));
-		break;
-
-	case DRV_RATE_48M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_48M_BIT\n"));
-		break;
-
-	case DRV_RATE_54M:
-		WLAN_OS_REPORT(("Max Active Rate		RATE_54M_BIT\n"));
-		break;
-
-	default:
-		WLAN_OS_REPORT(("Invalid basic rate value	0x%X\n", pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxActive));
-		break;
-	}
-
-	if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_QPSK)
-		WLAN_OS_REPORT(("Modulation Type		QPSK\n"));
-	else if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_CCK)
-		WLAN_OS_REPORT(("Modulation Type		CCK\n"));
-	else if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_PBCC)
-		WLAN_OS_REPORT(("Modulation Type		PBCC\n"));
-	else if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_OFDM)
-		WLAN_OS_REPORT(("Modulation Type		OFDM\n"));
-	else
-		WLAN_OS_REPORT(("Invalid Modulation Type	%d\n", pSiteMgr->pDesiredParams->siteMgrDesiredModulationType));
-
-
-	WLAN_OS_REPORT(("\n*****************************************\n\n", NULL));
-
-	param.paramType = RSN_EXT_AUTHENTICATION_MODE;
-	cmdDispatch_GetParam(hCmdDispatch, &param);
-	if (param.content.rsnDesiredAuthType == RSN_AUTH_OPEN)
-		WLAN_OS_REPORT(("Authentication Type	Open System\n"));
-	else if (param.content.rsnDesiredAuthType == RSN_AUTH_SHARED_KEY)
-		WLAN_OS_REPORT(("Authentication Type	Shared Key\n"));
-	else 
-		WLAN_OS_REPORT(("Authentication Type	Invalid: %d\n", param.content.rsnDesiredAuthType));
-
-	param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
-	cmdDispatch_GetParam(hCmdDispatch, &param);
-	if (param.content.rsnEncryptionStatus == TWD_CIPHER_NONE)
-		WLAN_OS_REPORT(("WEP 				Off\n"));
-	else if (param.content.rsnEncryptionStatus == TWD_CIPHER_WEP)
-		WLAN_OS_REPORT(("WEP 				On\n"));
-	else 
-		WLAN_OS_REPORT(("WEP 		Invalid: %d\n", param.content.rsnEncryptionStatus));
-		
-	WLAN_OS_REPORT(("\n"));
-
-
-	WLAN_OS_REPORT(("\n*****************************************\n\n", NULL));
-	if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_B_MODE)
-		WLAN_OS_REPORT(("Desired dot11mode		11b\n"));
-	else if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_G_MODE)
-		WLAN_OS_REPORT(("Desired dot11mode		11g\n"));
-	else if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_A_MODE)
-		WLAN_OS_REPORT(("Desired dot11mode		11a\n"));
-	else if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE)
-		WLAN_OS_REPORT(("Desired dot11mode		dual 11a/g\n"));
-	else 
-		WLAN_OS_REPORT(("Desired dot11mode		INVALID\n"));
-
-	WLAN_OS_REPORT(("\n*****************************************\n\n", NULL));
-	if(pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime == PHY_SLOT_TIME_SHORT)
-		WLAN_OS_REPORT(("Desired slot time		short\n"));
-	else if(pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime == PHY_SLOT_TIME_LONG)
-		WLAN_OS_REPORT(("Desired slot time		long\n"));
-	else
-		WLAN_OS_REPORT(("Desired slot time		INVALID\n"));
-
-
-	WLAN_OS_REPORT(("\n*****************************************\n\n", NULL));
-	if (pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType == PREAMBLE_SHORT)
-		WLAN_OS_REPORT(("Desired Preamble		Short\n"));
-	else if (pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType == PREAMBLE_LONG)
-		WLAN_OS_REPORT(("Desired Preamble	Long\n"));
-	else
-		WLAN_OS_REPORT(("Invalid Desired Preamble	%d\n", pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType));
-
-	WLAN_OS_REPORT(("Beacon interval		%d\n", pSiteMgr->pDesiredParams->siteMgrDesiredBeaconInterval));
-
-	WLAN_OS_REPORT(("\n*****************************************", NULL));
-	WLAN_OS_REPORT(("*****************************************\n\n", NULL));
-
-}
-
-
-
-static void printPrimarySiteDesc(siteMgr_t *pSiteMgr, OS_802_11_BSSID *pPrimarySiteDesc)
-{
-	TI_UINT8 rateIndex, maxNumOfRates;
-	char ssid[MAX_SSID_LEN + 1];
-
-	
-	WLAN_OS_REPORT(("\n^^^^^^^^^^^^^^^	PRIMARY SITE DESCRIPTION	^^^^^^^^^^^^^^^^^^^\n\n")); 
-
-	
-	/* MacAddress */		
-	WLAN_OS_REPORT(("BSSID				0x%X-0x%X-0x%X-0x%X-0x%X-0x%X\n",	pPrimarySiteDesc->MacAddress[0], 
-																	pPrimarySiteDesc->MacAddress[1], 
-																	pPrimarySiteDesc->MacAddress[2], 
-																	pPrimarySiteDesc->MacAddress[3], 
-																	pPrimarySiteDesc->MacAddress[4], 
-																	pPrimarySiteDesc->MacAddress[5])); 
-
-	/* Capabilities */
-	WLAN_OS_REPORT(("Capabilities		0x%X\n",	pPrimarySiteDesc->Capabilities)); 
-
-	/* SSID */
-	os_memoryCopy(pSiteMgr->hOs, ssid, (void *)pPrimarySiteDesc->Ssid.Ssid, pPrimarySiteDesc->Ssid.SsidLength);
-	ssid[pPrimarySiteDesc->Ssid.SsidLength] = 0;
-	WLAN_OS_REPORT(("SSID				%s\n", ssid));
-
-	/* privacy */
-	if (pPrimarySiteDesc->Privacy == TI_TRUE)
-		WLAN_OS_REPORT(("Privacy				ON\n"));
-	else
-		WLAN_OS_REPORT(("Privacy				OFF\n"));
-
-	/* RSSI */				
-	WLAN_OS_REPORT(("RSSI					%d\n", ((pPrimarySiteDesc->Rssi)>>16)));
-
-	if (pPrimarySiteDesc->InfrastructureMode == os802_11IBSS)
-		WLAN_OS_REPORT(("BSS Type				IBSS\n"));
-	else
-		WLAN_OS_REPORT(("BSS Type				INFRASTRUCTURE\n"));
-
-
-	maxNumOfRates = sizeof(pPrimarySiteDesc->SupportedRates) / sizeof(pPrimarySiteDesc->SupportedRates[0]);
-	/* SupportedRates */
-	for (rateIndex = 0; rateIndex < maxNumOfRates; rateIndex++)
-	{
-		if (pPrimarySiteDesc->SupportedRates[rateIndex] != 0)
-			WLAN_OS_REPORT(("Rate					0x%X\n", pPrimarySiteDesc->SupportedRates[rateIndex]));
-	}
-
-	WLAN_OS_REPORT(("\n---------------------------------------------------------------\n\n", NULL)); 
-
-}
-
-static void setRateSet(TI_UINT8 maxRate, TRates *pRates)
-{
-	TI_UINT8 i = 0;
-
-	switch (maxRate)
-	{
-
-	case DRV_RATE_54M:
-		pRates->ratesString[i] = 108;
-		i++;
-
-	case DRV_RATE_48M:
-		pRates->ratesString[i] = 96;
-		i++;
-
-	case DRV_RATE_36M:
-		pRates->ratesString[i] = 72;
-		i++;
-
-	case DRV_RATE_24M:
-		pRates->ratesString[i] = 48;
-		i++;
-
-	case DRV_RATE_18M:
-		pRates->ratesString[i] = 36;
-		i++;
-
-	case DRV_RATE_12M:
-		pRates->ratesString[i] = 24;
-		i++;
-
-	case DRV_RATE_9M:
-		pRates->ratesString[i] = 18;
-		i++;
-
-	case DRV_RATE_6M:
-		pRates->ratesString[i] = 12;
-		i++;
-
-	case DRV_RATE_22M:
-		pRates->ratesString[i] = 44;
-		i++;
-
-	case DRV_RATE_11M:
-		pRates->ratesString[i] = 22;
-		pRates->ratesString[i] |= 0x80;
-		i++;
-
-	case DRV_RATE_5_5M:
-		pRates->ratesString[i] = 11;
-		pRates->ratesString[i] |= 0x80;
-		i++;
-
-	case DRV_RATE_2M:
-		pRates->ratesString[i] = 4;
-		pRates->ratesString[i] |= 0x80;
-		i++;
-
-	case DRV_RATE_1M:
-		pRates->ratesString[i] = 2;
-		pRates->ratesString[i] |= 0x80;
-		i++;
-		break;
-
-	default:
-		WLAN_OS_REPORT(("Set Rate Set, invalid max rate %d\n", maxRate));
-		pRates->len = 0;
-	}
-
-	pRates->len = i;
-
-}
-
-void printSiteMgrHelpMenu(void)
-{
-	WLAN_OS_REPORT(("\n\n   Site Manager Debug Menu   \n"));
-	WLAN_OS_REPORT(("------------------------\n"));
-
-	WLAN_OS_REPORT(("500 - Help.\n"));
-	WLAN_OS_REPORT(("501 - Primary Site Parameters.\n"));
-	WLAN_OS_REPORT(("502 - Sites List.\n"));
-	WLAN_OS_REPORT(("503 - Desired Parameters.\n"));
-	WLAN_OS_REPORT(("507 - Set Power save Mode.\n"));
-	WLAN_OS_REPORT(("508 - Get Power save Mode.\n"));
-	WLAN_OS_REPORT(("511 - Set Default Key Id.\n"));
-	WLAN_OS_REPORT(("512 - Get Default Key Id.\n"));
-	WLAN_OS_REPORT(("513 - Set Key.\n"));
-	WLAN_OS_REPORT(("514 - Get Key.\n"));
-	WLAN_OS_REPORT(("515 - Set Cypher Suite.\n"));
-	WLAN_OS_REPORT(("516 - Get Cypher Suite.\n"));
-	WLAN_OS_REPORT(("517 - Set Auth Mode.\n"));
-	WLAN_OS_REPORT(("518 - Get Auth Mode.\n"));
-	WLAN_OS_REPORT(("519 - Get Primary Site Description.\n"));
-	WLAN_OS_REPORT(("520 - Get Connection Status.\n"));
-	WLAN_OS_REPORT(("522 - Get Current Tx Rate.\n"));
-	WLAN_OS_REPORT(("525 - Set Supported Rate Set.\n"));
-	WLAN_OS_REPORT(("526 - Get Supported Rate Set.\n"));
-	WLAN_OS_REPORT(("527 - Set Auth type.\n"));
-	WLAN_OS_REPORT(("528 - Get Auth type.\n"));
-
-	WLAN_OS_REPORT(("        %03d - RADIO_STAND_BY_CHANGE_STATE \n", RADIO_STAND_BY_CHANGE_STATE));
-	WLAN_OS_REPORT(("        %03d - CONNECT_TO_BSSID \n", CONNECT_TO_BSSID));
-
-	WLAN_OS_REPORT(("        %03d - SET_START_CLI_SCAN_PARAM \n", SET_START_CLI_SCAN_PARAM));
-	WLAN_OS_REPORT(("        %03d - SET_STOP_CLI_SCAN_PARAM \n", SET_STOP_CLI_SCAN_PARAM));
-
-	WLAN_OS_REPORT(("        %03d - SET_BROADCAST_BACKGROUND_SCAN_PARAM \n", SET_BROADCAST_BACKGROUND_SCAN_PARAM));
-	WLAN_OS_REPORT(("        %03d - ENABLE_PERIODIC_BROADCAST_BBACKGROUND_SCAN_PARAM \n", ENABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM));
-	WLAN_OS_REPORT(("        %03d - DISABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM \n", DISABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM));
-
-	WLAN_OS_REPORT(("        %03d - SET_UNICAST_BACKGROUND_SCAN_PARAM \n", SET_UNICAST_BACKGROUND_SCAN_PARAM));
-	WLAN_OS_REPORT(("        %03d - ENABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM \n", ENABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM));
-	WLAN_OS_REPORT(("        %03d - DISABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM \n", DISABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM));
-
-	WLAN_OS_REPORT(("        %03d - SET_FOREGROUND_SCAN_PARAM \n", SET_FOREGROUND_SCAN_PARAM));
-	WLAN_OS_REPORT(("        %03d - ENABLE_PERIODIC_FOREGROUND_SCAN_PARAM \n", ENABLE_PERIODIC_FOREGROUND_SCAN_PARAM));
-	WLAN_OS_REPORT(("        %03d - DISABLE_PERIODIC_FOREGROUND_SCAN_PARAM \n", DISABLE_PERIODIC_FOREGROUND_SCAN_PARAM));
-	
-	WLAN_OS_REPORT(("        %03d - SET_CHANNEL_NUMBER \n", SET_CHANNEL_NUMBER));
-	WLAN_OS_REPORT(("        %03d - SET_RSSI_GAP_THRSH \n", SET_RSSI_GAP_THRSH));
-	WLAN_OS_REPORT(("        %03d - SET_FAST_SCAN_TIMEOUT \n", SET_FAST_SCAN_TIMEOUT));
-	WLAN_OS_REPORT(("        %03d - SET_INTERNAL_ROAMING_ENABLE \n", SET_INTERNAL_ROAMING_ENABLE));
-
-	WLAN_OS_REPORT(("        %03d - PERFORM_HEALTH_TEST \n", PERFORM_HEALTH_TEST));
-	WLAN_OS_REPORT(("        %03d - PRINT_FAILURE_EVENTS \n", PRINT_FAILURE_EVENTS));
-	WLAN_OS_REPORT(("        %03d - FORCE_HW_RESET_RECOVERY \n", FORCE_HW_RESET_RECOVERY));
-	WLAN_OS_REPORT(("        %03d - FORCE_SOFT_RECOVERY \n", FORCE_SOFT_RECOVERY));
-
-	WLAN_OS_REPORT(("        %03d - RESET_ROAMING_EVENTS \n", RESET_ROAMING_EVENTS));
-	WLAN_OS_REPORT(("        %03d - SET_DESIRED_CONS_TX_ERRORS_THREH\n", SET_DESIRED_CONS_TX_ERRORS_THREH));
-	
-	WLAN_OS_REPORT(("        %03d - GET_CURRENT_ROAMING_STATUS \n", GET_CURRENT_ROAMING_STATUS));
-	
-
-    WLAN_OS_REPORT(("        %03d - TOGGLE_LNA_ON \n", TEST_TOGGLE_LNA_ON));
-    WLAN_OS_REPORT(("        %03d - TOGGLE_LNA_OFF \n", TEST_TOGGLE_LNA_OFF));
-
-	WLAN_OS_REPORT(("        %03d - PRINT_SITE_TABLE_PER_SSID\n", PRINT_SITE_TABLE_PER_SSID));
-	
-	WLAN_OS_REPORT(("        %03d - SET_DESIRED_CHANNEL\n", SET_DESIRED_CHANNEL));
-	
-	WLAN_OS_REPORT(("        %03d - START_PRE_AUTH\n", START_PRE_AUTH));
-
-	WLAN_OS_REPORT(("\n------------------------\n"));
-}
-
-
-
diff --git a/wl1271/Test/siteMgrDebug.h b/wl1271/Test/siteMgrDebug.h
deleted file mode 100644
index 41c3ea3..0000000
--- a/wl1271/Test/siteMgrDebug.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * siteMgrDebug.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __SITE_MGR_DEBUG_H__
-#define __SITE_MGR_DEBUG_H__
-
-#include "tidef.h"
-#include "paramOut.h"
-#include "DrvMainModules.h"
-
-#define	SITE_MGR_DEBUG_HELP_MENU			0
-#define	PRIMARY_SITE_DBG					1
-#define	SITE_TABLE_DBG						2
-#define	DESIRED_PARAMS_DBG					3
-
-
-#define	SET_RSN_DESIRED_CIPHER_SUITE_DBG	15
-#define	GET_RSN_DESIRED_CIPHER_SUITE_DBG	16
-#define	SET_RSN_DESIRED_AUTH_TYPE_DBG		17
-#define	GET_RSN_DESIRED_AUTH_TYPE_DBG		18
-#define	GET_PRIMARY_SITE_DESC_DBG			19
-#define	GET_CONNECTION_STATUS_DBG			20
-#define	GET_CURRENT_TX_RATE_DBG				22
-#define	SET_SUPPORTED_RATE_SET_DBG			25
-#define	GET_SUPPORTED_RATE_SET_DBG			26
-#define	SET_MLME_LEGACY_AUTH_TYPE_DBG		27
-#define	GET_MLME_LEGACY_AUTH_TYPE_DBG		28
-#define RADIO_STAND_BY_CHANGE_STATE			31
-#define CONNECT_TO_BSSID					34
-
-
-#define SET_START_CLI_SCAN_PARAM							35
-#define SET_STOP_CLI_SCAN_PARAM								36
-
-#define SET_BROADCAST_BACKGROUND_SCAN_PARAM					37
-#define ENABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM		38
-#define DISABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM	39
-
-#define SET_UNICAST_BACKGROUND_SCAN_PARAM					40
-#define ENABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM		41
-#define DISABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM		42
-
-#define SET_FOREGROUND_SCAN_PARAM							43
-#define ENABLE_PERIODIC_FOREGROUND_SCAN_PARAM				44
-#define DISABLE_PERIODIC_FOREGROUND_SCAN_PARAM				45
-
-#define SET_CHANNEL_NUMBER									46
-#define SET_RSSI_GAP_THRSH									47
-#define SET_FAST_SCAN_TIMEOUT								48
-#define SET_INTERNAL_ROAMING_ENABLE							49
-
-#define PERFORM_HEALTH_TEST									50
-#define PRINT_FAILURE_EVENTS								51
-#define FORCE_HW_RESET_RECOVERY								52
-#define FORCE_SOFT_RECOVERY									53 
-
-
-#define RESET_ROAMING_EVENTS								55 
-#define SET_DESIRED_CONS_TX_ERRORS_THREH					56
-#define GET_CURRENT_ROAMING_STATUS							57
-#define SET_DESIRED_CHANNEL									58
-
-
-#define TEST_TOGGLE_LNA_ON                                  60 
-#define TEST_TOGGLE_LNA_OFF   								61 
-
-
-#define TEST_TOGGLE_LNA_ON                                  60 
-#define TEST_TOGGLE_LNA_OFF   								61 
-
-#define PRINT_SITE_TABLE_PER_SSID							70
-
-#define ROAM_TEST1											81
-#define ROAM_TEST2											82
-#define ROAM_TEST3											83
-#define ROAM_TEST4											84
-#define ROAM_TEST5											85
-#define ROAM_TEST6											86
-#define ROAM_TEST7											87
-
-
-#define START_PRE_AUTH										100
-
-
-void siteMgrDebugFunction (TI_HANDLE         hSiteMgr, 
-                           TStadHandlesList *pStadHandles,
-                           TI_UINT32         funcType, 
-                           void             *pParam);
-
-#endif /* __SITE_MGR_DEBUG_H__ */
diff --git a/wl1271/Test/smeDebug.c b/wl1271/Test/smeDebug.c
deleted file mode 100644
index 4133c17..0000000
--- a/wl1271/Test/smeDebug.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * smeDebug.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file smeDbg.c
- *  \brief This file include the SME debug module implementation
- *  \
- *  \date 13-February-2006
- */
-
-#include "smePrivate.h"
-#include "smeDebug.h"
-#include "report.h"
-
-void printSmeDbgFunctions (void);
-void sme_dbgPrintObject (TI_HANDLE hSme);
-void sme_printStats (TI_HANDLE hSme);
-void sme_resetStats(TI_HANDLE hSme);
-void sme_printBssidList(TI_HANDLE hSme);
-
-#define CHAN_FREQ_TABLE_SIZE        (sizeof(ChanFreq) / sizeof(struct CHAN_FREQ))
-
-struct  CHAN_FREQ {
-    unsigned char  chan;
-    unsigned long  freq;
-} ChanFreq[] = {
-    {1,2412000}, {2,2417000}, {3,2422000}, {4,2427000},
-    {5,2432000}, {6,2437000}, {7,2442000}, {8,2447000},
-    {9,2452000},
-    {10,2457000}, {11,2462000}, {12,2467000}, {13,2472000},
-    {14,2484000}, {36,5180000}, {40,5200000}, {44,5220000},
-    {48,5240000}, {52,5260000}, {56,5280000}, {60,5300000},
-    {64,5320000},
-    {100,5500000}, {104,5520000}, {108,5540000}, {112,5560000},
-    {116,5580000}, {120,5600000}, {124,5620000}, {128,5640000},
-    {132,5660000}, {136,5680000}, {140,5700000}, {149,5745000},
-    {153,5765000}, {157,5785000}, {161,5805000} };
-
-TI_UINT32 scanResultTable_CalculateBssidListSize (TI_HANDLE hScanResultTable, TI_BOOL bAllVarIes);
-TI_STATUS scanResultTable_GetBssidList (TI_HANDLE hScanResultTable, 
-                                        OS_802_11_BSSID_LIST_EX *pBssidList, 
-                                        TI_UINT32 *pLength, 
-                                        TI_BOOL bAllVarIes);
-
-/** 
- * \fn     smeDebugFunction
- * \brief  Main SME debug function
- * 
- * Main SME debug function
- * 
- * \param  hSme - handle to the SME object
- * \param  funcType - the specific debug function
- * \param  pParam - parameters for the debug function
- * \return None
- */
-void smeDebugFunction (TI_HANDLE hSme, TI_UINT32 funcType, void *pParam)
-{
-    switch (funcType)
-    {
-    case DBG_SME_PRINT_HELP:
-        printSmeDbgFunctions();
-        break;
-
-    case DBG_SME_PRINT_OBJECT:
-        sme_dbgPrintObject( hSme );
-        break;
-
-    case DBG_SME_PRINT_STATS:
-        sme_printStats( hSme );
-        break;
-
-    case DBG_SME_CLEAR_STATS:
-        sme_resetStats( hSme );
-        break;
-
-   case DBG_SME_BSSID_LIST:
-	sme_printBssidList( hSme );
-	break;
-
-	default:
-   		WLAN_OS_REPORT(("Invalid function type in SME debug function: %d\n", funcType));
-        break;
-    }
-}
-
-int sme_strlen(char *s)
-{
-    int x=0;
-    while (*s++)
-        x++;
-    return(x);
-}
-
-
-char* sme_strcpy(char *s1,char *s2)
-{
-    while (*s2)
-    {
-        *s1++ = *s2++;
-    }
-    *s1 = '\0';
-
-	return s1;
-}
-
-
-int sme_memcmp(char* s1, char* s2, int n)
-{
-	while(n-- > 0 && *s1 == *s2)
-		s1++, s2++;
-
-	return( n < 0 ? 0 : *s1 - *s2 );
-}
-
-
-
-
-/** 
- * \fn     printSmeDbgFunctions
- * \brief  Print the SME debug menu
- * 
- * Print the SME debug menu
- * 
- * \param  hSme - handle to the SME object
- * \return None
- */
-void printSmeDbgFunctions(void)
-{
-    WLAN_OS_REPORT(("   SME Debug Functions   \n"));
-	WLAN_OS_REPORT(("-------------------------\n"));
-	WLAN_OS_REPORT(("1900 - Print the SME Debug Help\n"));
-	WLAN_OS_REPORT(("1901 - Print the SME object\n"));
-	WLAN_OS_REPORT(("1902 - Print the SME statistics\n"));
-    WLAN_OS_REPORT(("1903 - Reset the SME statistics\n"));
-	WLAN_OS_REPORT(("1904 - Print BSSID list\n"));
-}
-
-#ifdef REPORT_LOG
-static TI_UINT8 Freq2Chan(TI_UINT32 freq)
-{
-    TI_UINT32 i;
-
-    for(i=0; i<CHAN_FREQ_TABLE_SIZE; i++)
-        if(ChanFreq[i].freq == freq) 
-            return ChanFreq[i].chan;
-
-    return 0;
-}
-#endif
-
-static void PrintBssidList(OS_802_11_BSSID_LIST_EX* bssidList, TI_UINT32 IsFullPrint, TMacAddr CurrentBssid)
-{
-    TI_UINT32 i;
-    TI_INT8  connectionTypeStr[50];
-    POS_802_11_BSSID_EX pBssid = &bssidList->Bssid[0];
-
-    WLAN_OS_REPORT(("BssId List: Num=%u\n", bssidList->NumberOfItems));
-    WLAN_OS_REPORT(("         MAC        Privacy Rssi  Mode    Channel    SSID\n"));
-    for(i=0; i<bssidList->NumberOfItems; i++)
-    {            
-        switch (pBssid->InfrastructureMode)
-        {
-            case os802_11IBSS:
-                sme_strcpy (connectionTypeStr, "Adhoc");
-                break;
-            case os802_11Infrastructure:
-                sme_strcpy (connectionTypeStr, "Infra");
-                break;
-            case os802_11AutoUnknown:
-                sme_strcpy (connectionTypeStr, "Auto");
-                break;
-            default:
-                sme_strcpy (connectionTypeStr, " --- ");
-                break;
-        }
-        WLAN_OS_REPORT(("%s%02x.%02x.%02x.%02x.%02x.%02x   %3u   %4d   %s %6d       %s\n",
-            (!sme_memcmp(CurrentBssid, pBssid->MacAddress, MAC_ADDR_LEN))?"*":" ",
-            pBssid->MacAddress[0],
-            pBssid->MacAddress[1],
-            pBssid->MacAddress[2],
-            pBssid->MacAddress[3],
-            pBssid->MacAddress[4],
-            pBssid->MacAddress[5],
-            pBssid->Privacy, 
-            pBssid->Rssi,
-            connectionTypeStr,
-            Freq2Chan(pBssid->Configuration.Union.channel),
-            (pBssid->Ssid.Ssid[0] == '\0')?(TI_INT8*)"****":((TI_INT8*)pBssid->Ssid.Ssid) ));
-
-        if (IsFullPrint)
-        {
-            WLAN_OS_REPORT(("   BeaconInterval %d\n",  pBssid->Configuration.BeaconPeriod));
-            WLAN_OS_REPORT(("   Capabilities   0x%x\n",  pBssid->Capabilities));
-        }
-#ifdef _WINDOWS /*temp fix until bringing the dual OS fix*/
-		pBssid = (POS_802_11_BSSID_EX)((TI_INT8*)pBssid + (pBssid->Length ? pBssid->Length : sizeof(OS_802_11_BSSID_EX)));
-#else /*for Linux*/
-		pBssid = &bssidList->Bssid[i+1];
-#endif
-    }        
-}
-
-void sme_printBssidList(TI_HANDLE hSme)
-{
-	TSme* sme = (TSme*) hSme;
-	TI_UINT32 length;
-	TI_UINT8* blist;
-	TMacAddr temp_bssid = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
-
-	length = scanResultTable_CalculateBssidListSize (sme->hScanResultTable, TI_FALSE);
-
-	blist = os_memoryAlloc(NULL, length);
-
-	if(!blist) 
-    {
-		WLAN_OS_REPORT(("ERROR. sme_printBssidList(): Cannot allocate memory!! length = %d\n", length));
-		return;
-	}
-
-	scanResultTable_GetBssidList (sme->hScanResultTable, (POS_802_11_BSSID_LIST_EX)blist, &length, TI_FALSE);
-
-	PrintBssidList((OS_802_11_BSSID_LIST_EX*)blist, 0, temp_bssid);
-
-	os_memoryFree(NULL, blist, length);
-}
-
-/** 
- * \fn     sme_dbgPrintObject
- * \brief  Print the SME object
- * 
- * Print the SME object
- * 
- * \param  hSme - handle to the SME object
- * \return None
- */
-void sme_dbgPrintObject (TI_HANDLE hSme)
-{
-    WLAN_OS_REPORT(("Not yet implemented!\n"));
-}
-
-/** 
- * \fn     sme_printStats
- * \brief  Print the SME statistics
- * 
- * Print the SME statistics
- * 
- * \param  hSme - handle to the SME object
- * \return None
- */
-void sme_printStats (TI_HANDLE hSme)
-{
-    WLAN_OS_REPORT(("Not yet implemented!\n"));
-}
-
-/** 
- * \fn     sme_resetStats
- * \brief  Reset the SME statistics
- * 
- * Reset the SME statistics
- * 
- * \param  hSme - handle to the SME object
- * \return None
- */
-void sme_resetStats(TI_HANDLE hSme)
-{
-    WLAN_OS_REPORT(("Not yet implemented!\n"));
-}
-
diff --git a/wl1271/Test/smeDebug.h b/wl1271/Test/smeDebug.h
deleted file mode 100644
index 91ef623..0000000
--- a/wl1271/Test/smeDebug.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * smeDebug.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file smeDebug.h
- *  \brief This file include private definitions for the SME debug module.
- *  \
- *  \date 13-february-2006
- */
-
-#ifndef __SMEDBG_H__
-#define __SMEDBG_H__
-
-#include "sme.h"
-
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-
-/* debug functions */
-#define DBG_SME_PRINT_HELP		    	0
-#define DBG_SME_PRINT_OBJECT	        1
-#define DBG_SME_PRINT_STATS             2
-#define DBG_SME_CLEAR_STATS             3
-#define DBG_SME_BSSID_LIST              4
-
-/*
- ***********************************************************************
- *	Enums.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Structure definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-
-/**
- * \\n
- * \date 13-February-2006\n
- * \brief Main SME debug function
- *
- * Function Scope \e Public.\n
- * \param hSmeSm - handle to the SME SM object.\n
- * \param funcType - the specific debug function.\n
- * \param pParam - parameters for the debug function.\n
- */
-void smeDebugFunction( TI_HANDLE hSmeSm, TI_UINT32 funcType, void *pParam );
-
-/**
- * \\n
- * \date 13-February-2006\n
- * \brief Prints SME debug menu
- *
- * Function Scope \e Public.\n
- */
-void printSmeDbgFunctions(void);
-
-#endif /* __SMEDBG_H__ */
-
diff --git a/wl1271/Txn/BusDrv.h b/wl1271/Txn/BusDrv.h
deleted file mode 100644
index 64a92d7..0000000
--- a/wl1271/Txn/BusDrv.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * BusDrv.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   BusDrv.h 
- *  \brief  Bus-Driver module API definition                                  
- *
- *  \see    SdioBusDrv.c, WspiBusDrv.c
- */
-
-#ifndef __BUS_DRV_API_H__
-#define __BUS_DRV_API_H__
-
-
-#include "TxnDefs.h"
-#include "queue.h"
-
-
-/************************************************************************
- * Defines
- ************************************************************************/
-
-#define WSPI_PAD_LEN_WRITE          4
-#define WSPI_PAD_LEN_READ           8                    
-#define MAX_XFER_BUFS               4
-
-#define TXN_PARAM_STATUS_OK         0
-#define TXN_PARAM_STATUS_ERROR      1
-#define TXN_PARAM_STATUS_RECOVERY   2
-
-#define TXN_DIRECTION_WRITE         0
-#define TXN_DIRECTION_READ          1
-
-#define TXN_HIGH_PRIORITY           0
-#define TXN_LOW_PRIORITY            1
-#define TXN_NUM_PRIORITYS           2
-
-#define TXN_INC_ADDR                0
-#define TXN_FIXED_ADDR              1
-
-#define TXN_AGGREGATE_OFF           0
-#define TXN_AGGREGATE_ON            1
-
-#define TXN_NON_SLEEP_ELP           1
-#define TXN_SLEEP_ELP               0
-
-#define NUM_OF_PARTITION            4
-
-/************************************************************************
- * Macros
- ************************************************************************/
-/* Get field from TTxnStruct->uTxnParams */
-#define TXN_PARAM_GET_PRIORITY(pTxn)            ( (pTxn->uTxnParams & 0x00000003) >> 0 )
-#define TXN_PARAM_GET_FUNC_ID(pTxn)             ( (pTxn->uTxnParams & 0x0000000C) >> 2 )
-#define TXN_PARAM_GET_DIRECTION(pTxn)           ( (pTxn->uTxnParams & 0x00000010) >> 4 )
-#define TXN_PARAM_GET_FIXED_ADDR(pTxn)          ( (pTxn->uTxnParams & 0x00000020) >> 5 )
-#define TXN_PARAM_GET_MORE(pTxn)                ( (pTxn->uTxnParams & 0x00000040) >> 6 )
-#define TXN_PARAM_GET_SINGLE_STEP(pTxn)         ( (pTxn->uTxnParams & 0x00000080) >> 7 )
-#define TXN_PARAM_GET_STATUS(pTxn)              ( (pTxn->uTxnParams & 0x00000F00) >> 8 )
-#define TXN_PARAM_GET_AGGREGATE(pTxn)           ( (pTxn->uTxnParams & 0x00001000) >> 12 )
-#define TXN_PARAM_GET_END_OF_BURST(pTxn)        ( (pTxn->uTxnParams & 0x00002000) >> 13 )
-
-
-
-/* Set field in TTxnStruct->uTxnParams */
-#define TXN_PARAM_SET_PRIORITY(pTxn, uValue)    ( pTxn->uTxnParams = (pTxn->uTxnParams & ~0x00000003) | (uValue << 0 ) )
-#define TXN_PARAM_SET_FUNC_ID(pTxn, uValue)     ( pTxn->uTxnParams = (pTxn->uTxnParams & ~0x0000000C) | (uValue << 2 ) )
-#define TXN_PARAM_SET_DIRECTION(pTxn, uValue)   ( pTxn->uTxnParams = (pTxn->uTxnParams & ~0x00000010) | (uValue << 4 ) )
-#define TXN_PARAM_SET_FIXED_ADDR(pTxn, uValue)  ( pTxn->uTxnParams = (pTxn->uTxnParams & ~0x00000020) | (uValue << 5 ) )
-#define TXN_PARAM_SET_MORE(pTxn, uValue)        ( pTxn->uTxnParams = (pTxn->uTxnParams & ~0x00000040) | (uValue << 6 ) )
-#define TXN_PARAM_SET_SINGLE_STEP(pTxn, uValue) ( pTxn->uTxnParams = (pTxn->uTxnParams & ~0x00000080) | (uValue << 7 ) )
-#define TXN_PARAM_SET_STATUS(pTxn, uValue)      ( pTxn->uTxnParams = (pTxn->uTxnParams & ~0x00000F00) | (uValue << 8 ) )
-#define TXN_PARAM_SET_AGGREGATE(pTxn, uValue)   ( pTxn->uTxnParams = (pTxn->uTxnParams & ~0x00001000) | (uValue << 12 ) )
-#define TXN_PARAM_SET_END_OF_BURST(pTxn, uValue)( pTxn->uTxnParams = (pTxn->uTxnParams & ~0x00002000) | (uValue << 13 ) )
-
-
-#define TXN_PARAM_SET(pTxn, uPriority, uId, uDirection, uAddrMode) \
-        TXN_PARAM_SET_PRIORITY(pTxn, uPriority); \
-        TXN_PARAM_SET_FUNC_ID(pTxn, uId); \
-        TXN_PARAM_SET_DIRECTION(pTxn, uDirection); \
-        TXN_PARAM_SET_FIXED_ADDR(pTxn, uAddrMode);
-
-#define BUILD_TTxnStruct(pTxn, uAddr, pBuf, uLen, fCB, hCB) \
-    pTxn->aBuf[0] = (TI_UINT8*)(pBuf); \
-    pTxn->aLen[0] = (TI_UINT16)(uLen); \
-    pTxn->aLen[1] = 0;                 \
-    pTxn->uHwAddr = uAddr;             \
-    pTxn->hCbHandle = (void*)hCB;      \
-    pTxn->fTxnDoneCb = (TTxnDoneCb)fCB;
-
-
-/************************************************************************
- * Types
- ************************************************************************/
-/* The TxnDone CB called by the bus driver upon Async Txn completion */
-typedef void (*TBusDrvTxnDoneCb)(TI_HANDLE hCbHandle, void *pTxn);
-
-/* The TxnDone CB called by the TxnQueue upon Async Txn completion */
-typedef void (*TTxnQueueDoneCb)(TI_HANDLE hCbHandle, void *pTxn);
-
-/* The TxnDone CB of the specific Txn originator (Xfer layer) called upon Async Txn completion */
-typedef void (*TTxnDoneCb)(TI_HANDLE hCbHandle, void *pTxn);
-
-/* The transactions structure */
-typedef struct
-{
-    TQueNodeHdr  tTxnQNode;                /* Header for queueing */
-    TI_UINT32    uTxnParams;               /* Txn attributes (bit fields) - see macros above */
-    TI_UINT32    uHwAddr;                  /* Physical (32 bits) HW Address */
-    TTxnDoneCb   fTxnDoneCb;               /* CB called by TwIf upon Async Txn completion (may be NULL) */
-    TI_HANDLE    hCbHandle;                /* The handle to use when calling fTxnDoneCb */
-    TI_UINT16    aLen[MAX_XFER_BUFS];      /* Lengths of the following aBuf data buffers respectively.
-                                              Zero length marks last used buffer, or MAX_XFER_BUFS of all are used. */
-    TI_UINT8*    aBuf[MAX_XFER_BUFS];      /* Host data buffers to be written to or read from the device */
-    TI_UINT8     aWspiPad[WSPI_PAD_LEN_READ]; /* Padding used by WSPI bus driver for its header or fixed-busy bytes */
-} TTxnStruct; 
-
-/* Parameters for all bus types configuration in ConnectBus process */
-
-typedef struct
-{
-    TI_UINT32    uBlkSizeShift;
-    TI_UINT32    uBusDrvThreadPriority;
-} TSdioCfg; 
-
-typedef struct
-{
-    TI_UINT32    uDummy;
-} TWspiCfg; 
-
-typedef struct
-{
-    TI_UINT32    uBaudRate;
-} TUartCfg; 
-
-typedef union
-{
-    TSdioCfg    tSdioCfg;       
-    TWspiCfg    tWspiCfg;       
-    TUartCfg    tUartCfg;       
-
-} TBusDrvCfg;
-
-
-typedef struct
-{
-    TI_UINT32   uMemAdrr;
-    TI_UINT32   uMemSize;
-} TPartition;
-
-
-/************************************************************************
- * Functions
- ************************************************************************/
-TI_HANDLE   busDrv_Create     (TI_HANDLE hOs);
-TI_STATUS   busDrv_Destroy    (TI_HANDLE hBusDrv);
-void        busDrv_Init       (TI_HANDLE hBusDrv, TI_HANDLE hReport);
-TI_STATUS   busDrv_ConnectBus (TI_HANDLE        hBusDrv, 
-                               TBusDrvCfg       *pBusDrvCfg,
-                               TBusDrvTxnDoneCb fCbFunc,
-                               TI_HANDLE        hCbArg,
-                               TBusDrvTxnDoneCb fConnectCbFunc,
-                               TI_UINT32        *pRxDmaBufLen,
-                               TI_UINT32        *pTxDmaBufLen);
-TI_STATUS   busDrv_DisconnectBus (TI_HANDLE hBusDrv);
-ETxnStatus  busDrv_Transact   (TI_HANDLE hBusDrv, TTxnStruct *pTxn);
-
-
-#endif /*__BUS_DRV_API_H__*/
-
diff --git a/wl1271/Txn/SdioBusDrv.c b/wl1271/Txn/SdioBusDrv.c
deleted file mode 100644
index 55a6462..0000000
--- a/wl1271/Txn/SdioBusDrv.c
+++ /dev/null
@@ -1,626 +0,0 @@
-/*
- * SdioBusDrv.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/** \file   SdioBusDrv.c 
- *  \brief  The SDIO bus driver upper layer. Platform independent. 
- *          Uses the SdioAdapter API. 
- *          Introduces a generic bus-independent API upwards.
- *  
- *  \see    BusDrv.h, SdioAdapter.h, SdioAdapter.c
- */
-
-#define __FILE_ID__  FILE_ID_122
-#include "tidef.h"
-#include "report.h"
-#include "osApi.h"
-#include "TxnDefs.h"
-#include "SdioAdapter.h"
-#include "BusDrv.h"
-#include "bmtrace_api.h"
-
-
-
-/************************************************************************
- * Defines
- ************************************************************************/
-#define MAX_TXN_PARTS     MAX_XFER_BUFS * 5   /* for aggregation we may need a few parts for each buffer */
-
-
-/************************************************************************
- * Types
- ************************************************************************/
-
-/* A single SDIO bus transaction which is a part of a complete transaction (TTxnStruct) */ 
-typedef struct
-{
-    TI_BOOL          bBlkMode;           /* If TRUE this is a block-mode SDIO transaction */
-    TI_UINT32        uLength;            /* Length in byte */
-    TI_UINT32        uHwAddr;            /* The device address to write to or read from */
-    void *           pHostAddr;          /* The host buffer address to write from or read into */
-    TI_BOOL          bMore;              /* If TRUE, indicates the lower driver to keep awake for more transactions */
-} TTxnPart; 
-
-
-/* The busDrv module Object */
-typedef struct _TBusDrvObj
-{
-    TI_HANDLE	     hOs;		   	 
-    TI_HANDLE	     hReport;
-
-	TBusDrvTxnDoneCb fTxnDoneCb;         /* The callback to call upon full transaction completion. */
-	TI_HANDLE        hCbHandle;          /* The callback handle */
-    TTxnStruct *     pCurrTxn;           /* The transaction currently being processed */
-    ETxnStatus       eCurrTxnStatus;     /* COMPLETE, PENDING or ERROR */
-    TTxnPart         aTxnParts[MAX_TXN_PARTS]; /* The actual bus transactions of current transaction */
-    TI_UINT32        uCurrTxnPartsNum;   /* Number of transaction parts composing the current transaction */
-    TI_UINT32        uCurrTxnPartsCount; /* Number of transaction parts already executed */
-    TI_UINT32        uCurrTxnPartsCountSync; /* Number of transaction parts completed in Sync mode (returned COMPLETE) */
-    TI_UINT32        uBlkSizeShift;      /* In block-mode:  uBlkSize = (1 << uBlkSizeShift) = 512 bytes */
-    TI_UINT32        uBlkSize;           /* In block-mode:  uBlkSize = (1 << uBlkSizeShift) = 512 bytes */
-    TI_UINT32        uBlkSizeMask;       /* In block-mode:  uBlkSizeMask = uBlkSize - 1 = 0x1FF*/
-    TI_UINT8 *       pRxDmaBuf;          /* The Rx DMA-able buffer for buffering all write transactions */
-    TI_UINT32        uRxDmaBufLen;       /* The Rx DMA-able buffer length in bytes */
-    TI_UINT8 *       pTxDmaBuf;          /* The Tx DMA-able buffer for buffering all write transactions */
-    TI_UINT32        uTxDmaBufLen;       /* The Tx DMA-able buffer length in bytes */
-    TI_UINT32        uTxnLength;         /* The current transaction accumulated length (including Tx aggregation case) */
-
-} TBusDrvObj;
-
-
-/************************************************************************
- * Internal functions prototypes
- ************************************************************************/
-static TI_BOOL  busDrv_PrepareTxnParts  (TBusDrvObj *pBusDrv, TTxnStruct *pTxn);
-static void     busDrv_SendTxnParts     (TBusDrvObj *pBusDrv);
-static void     busDrv_TxnDoneCb        (TI_HANDLE hBusDrv, TI_INT32 status);
- 
-
-
-/************************************************************************
- *
- *   Module functions implementation
- *
- ************************************************************************/
-
-/** 
- * \fn     busDrv_Create 
- * \brief  Create the module
- * 
- * Create and clear the bus driver's object, and the SDIO-adapter.
- * 
- * \note   
- * \param  hOs - Handle to Os Abstraction Layer
- * \return Handle of the allocated object, NULL if allocation failed 
- * \sa     busDrv_Destroy
- */ 
-TI_HANDLE busDrv_Create (TI_HANDLE hOs)
-{
-    TI_HANDLE   hBusDrv;
-    TBusDrvObj *pBusDrv;
-
-    hBusDrv = os_memoryAlloc(hOs, sizeof(TBusDrvObj));
-    if (hBusDrv == NULL)
-    {
-        return NULL;
-    }
-    
-    pBusDrv = (TBusDrvObj *)hBusDrv;
-
-    os_memoryZero(hOs, hBusDrv, sizeof(TBusDrvObj));
-    
-    pBusDrv->hOs = hOs;
-
-    return pBusDrv;
-}
-
-
-/** 
- * \fn     busDrv_Destroy
- * \brief  Destroy the module. 
- * 
- * Close SDIO lower bus driver and free the module's object.
- * 
- * \note   
- * \param  The module's object
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     busDrv_Create
- */ 
-TI_STATUS busDrv_Destroy (TI_HANDLE hBusDrv)
-{
-    TBusDrvObj *pBusDrv = (TBusDrvObj*)hBusDrv;
-
-    if (pBusDrv)
-    {
-        os_memoryFree (pBusDrv->hOs, pBusDrv, sizeof(TBusDrvObj));     
-    }
-    return TI_OK;
-}
-
-
-/** 
- * \fn     busDrv_Init
- * \brief  Init bus driver 
- * 
- * Init module parameters.
-
- * \note   
- * \param  hBusDrv - The module's handle
- * \param  hReport - report module handle
- * \return void
- * \sa     
- */ 
-void busDrv_Init (TI_HANDLE hBusDrv, TI_HANDLE hReport)
-{
-    TBusDrvObj *pBusDrv = (TBusDrvObj*) hBusDrv;
-
-    pBusDrv->hReport = hReport;
-}
-
-
-/** 
- * \fn     busDrv_ConnectBus
- * \brief  Configure bus driver
- * 
- * Called by TxnQ.
- * Configure the bus driver with its connection configuration (such as baud-rate, bus width etc) 
- *     and establish the physical connection. 
- * Done once upon init (and not per functional driver startup). 
- * 
- * \note   
- * \param  hBusDrv    - The module's object
- * \param  pBusDrvCfg - A union used for per-bus specific configuration. 
- * \param  fCbFunc    - CB function for Async transaction completion (after all txn parts are completed).
- * \param  hCbArg     - The CB function handle
- * \param  fConnectCbFunc - The CB function for the connect bus competion (if returned Pending)
- * \param  pRxDmaBufLen - The Rx DMA buffer length in bytes (needed as a limit of the Tx/Rx aggregation length)
- * \param  pTxDmaBufLen - The Tx DMA buffer length in bytes (needed as a limit of the Tx/Rx aggregation length)
- * \return TI_OK / TI_NOK
- * \sa     
- */ 
-TI_STATUS busDrv_ConnectBus (TI_HANDLE        hBusDrv, 
-                             TBusDrvCfg       *pBusDrvCfg,
-                             TBusDrvTxnDoneCb fCbFunc,
-                             TI_HANDLE        hCbArg,
-                             TBusDrvTxnDoneCb fConnectCbFunc,
-                             TI_UINT32        *pRxDmaBufLen,
-                             TI_UINT32        *pTxDmaBufLen)
-{
-    TBusDrvObj *pBusDrv = (TBusDrvObj*)hBusDrv;
-    int         iStatus;
-
-    /* Save the parameters (TxnQ callback for TxnDone events, and block-size) */
-    pBusDrv->fTxnDoneCb    = fCbFunc;
-    pBusDrv->hCbHandle     = hCbArg;
-    pBusDrv->uBlkSizeShift = pBusDrvCfg->tSdioCfg.uBlkSizeShift;
-    pBusDrv->uBlkSize      = 1 << pBusDrv->uBlkSizeShift;
-    pBusDrv->uBlkSizeMask  = pBusDrv->uBlkSize - 1;
-    /* This should cover stop send Txn parts in recovery */
-    pBusDrv->uCurrTxnPartsCount = 0;
-    pBusDrv->uCurrTxnPartsNum = 0;
-    pBusDrv->uCurrTxnPartsCountSync = 0;
-    pBusDrv->uTxnLength = 0;
-	
-    /*
-     * Configure the SDIO driver parameters and handle SDIO enumeration.
-     *
-     * Note: The DMA-able buffer address to use for write transactions is provided from the 
-     *           SDIO driver into pBusDrv->pDmaBuffer.
-     */
-
-    iStatus = sdioAdapt_ConnectBus ((void *)busDrv_TxnDoneCb, 
-                                    hBusDrv, 
-                                    pBusDrv->uBlkSizeShift, 
-                                    pBusDrvCfg->tSdioCfg.uBusDrvThreadPriority,
-                                    &pBusDrv->pRxDmaBuf,
-                                    &pBusDrv->uRxDmaBufLen,
-                                    &pBusDrv->pTxDmaBuf,
-                                    &pBusDrv->uTxDmaBufLen);
-
-    *pRxDmaBufLen = pBusDrv->uRxDmaBufLen;
-    *pTxDmaBufLen = pBusDrv->uTxDmaBufLen;
-
-    if ((pBusDrv->pRxDmaBuf == NULL) || (pBusDrv->pTxDmaBuf == NULL))
-    {
-        TRACE0(pBusDrv->hReport, REPORT_SEVERITY_ERROR, "busDrv_ConnectBus: Didn't get DMA buffer from SDIO driver!!");
-        return TI_NOK;
-    }
-
-    if (iStatus == 0) 
-    {
-        return TI_OK;
-    }
-    else 
-    {
-        TRACE2(pBusDrv->hReport, REPORT_SEVERITY_ERROR, "busDrv_ConnectBus: Status = 0x%x, BlkSize = %d\n", iStatus, pBusDrv->uBlkSize);
-        return TI_NOK;
-    }
-}
-
-
-/** 
- * \fn     busDrv_DisconnectBus
- * \brief  Disconnect SDIO driver
- * 
- * Called by TxnQ. Disconnect the SDIO driver.
- *  
- * \note   
- * \param  hBusDrv - The module's object
- * \return TI_OK / TI_NOK
- * \sa     
- */ 
-TI_STATUS busDrv_DisconnectBus (TI_HANDLE hBusDrv)
-{
-    TBusDrvObj *pBusDrv = (TBusDrvObj*)hBusDrv;
-
-    TRACE0(pBusDrv->hReport, REPORT_SEVERITY_INFORMATION, "busDrv_DisconnectBus()\n");
-
-    /* Disconnect SDIO driver */
-    return sdioAdapt_DisconnectBus ();
-}
-
-
-/** 
- * \fn     busDrv_Transact
- * \brief  Process transaction 
- * 
- * Called by the TxnQ module to initiate a new transaction.
- * Prepare the transaction parts (lower layer single transactions),
- *      and send them one by one to the lower layer.
- * 
- * \note   It's assumed that this function is called only when idle (i.e. previous Txn is done).
- * \param  hBusDrv - The module's object
- * \param  pTxn    - The transaction object 
- * \return COMPLETE if Txn completed in this context, PENDING if not, ERROR if failed
- * \sa     busDrv_PrepareTxnParts, busDrv_SendTxnParts
- */ 
-ETxnStatus busDrv_Transact (TI_HANDLE hBusDrv, TTxnStruct *pTxn)
-{
-    TBusDrvObj *pBusDrv = (TBusDrvObj*)hBusDrv;
-    TI_BOOL     bWithinAggregation;
-    CL_TRACE_START_L4();
-
-    pBusDrv->pCurrTxn               = pTxn;
-    pBusDrv->uCurrTxnPartsCount     = 0;
-    pBusDrv->uCurrTxnPartsCountSync = 0;
-
-    /* Prepare the transaction parts in a table. */
-    bWithinAggregation = busDrv_PrepareTxnParts (pBusDrv, pTxn);
-
-    /* If in the middle of Tx aggregation, return Complete (current Txn was coppied to buffer but not sent) */
-    if (bWithinAggregation)
-    {
-        TRACE1(pBusDrv->hReport, REPORT_SEVERITY_INFORMATION, "busDrv_Transact: In aggregation so exit, uTxnLength=%d\n", pBusDrv->uTxnLength);
-        CL_TRACE_END_L4("tiwlan_drv.ko", "INHERIT", "TXN", ".Transact");
-        return TXN_STATUS_COMPLETE;
-    }
-
-    /* Send the prepared transaction parts. */
-    busDrv_SendTxnParts (pBusDrv);
-
-    TRACE1(pBusDrv->hReport, REPORT_SEVERITY_INFORMATION, "busDrv_Transact: Status = %d\n", pBusDrv->eCurrTxnStatus);
-
-    CL_TRACE_END_L4("tiwlan_drv.ko", "INHERIT", "TXN", ".Transact");
-
-    /* return transaction status - COMPLETE, PENDING or ERROR */
-    /* The status is updated in busDrv_SendTxnParts(). It is Async (pending) if not completed in this context */
-    return pBusDrv->eCurrTxnStatus;
-}
-
-
-/** 
- * \fn     busDrv_PrepareTxnParts
- * \brief  Prepare write or read transaction parts
- * 
- * Called by busDrv_Transact().
- * Prepares the actual sequence of SDIO bus transactions in a table.
- * Use a DMA-able buffer for the bus transaction, so all data is copied
- *     to it from the host buffer(s) before write transactions,
- *     or copied from it to the host buffers after read transactions.
- * 
- * \note   
- * \param  pBusDrv - The module's object
- * \param  pTxn    - The transaction object 
- * \return TRUE if we are in the middle of a Tx aggregation
- * \sa     busDrv_Transact, busDrv_SendTxnParts, 
- */ 
-static TI_BOOL busDrv_PrepareTxnParts (TBusDrvObj *pBusDrv, TTxnStruct *pTxn)
-{
-    TI_UINT32 uPartNum     = 0;
-    TI_UINT32 uCurrHwAddr  = pTxn->uHwAddr;
-    TI_BOOL   bFixedHwAddr = TXN_PARAM_GET_FIXED_ADDR(pTxn);
-    TI_BOOL   bWrite       = (TXN_PARAM_GET_DIRECTION(pTxn) == TXN_DIRECTION_WRITE) ? TI_TRUE : TI_FALSE;
-    TI_UINT8 *pHostBuf     = bWrite ? pBusDrv->pTxDmaBuf : pBusDrv->pRxDmaBuf; /* Use DMA buffer (Rx or Tx) for actual transaction */
-    TI_UINT32 uBufNum;
-    TI_UINT32 uBufLen;
-    TI_UINT32 uRemainderLen;
-
-    /* Go over the transaction buffers */
-    for (uBufNum = 0; uBufNum < MAX_XFER_BUFS; uBufNum++) 
-    {
-        uBufLen = pTxn->aLen[uBufNum];
-
-        /* If no more buffers, exit the loop */
-        if (uBufLen == 0)
-        {
-            break;
-        }
-
-        /* For write transaction, copy the data to the DMA buffer */
-        if (bWrite) 
-        {
-            os_memoryCopy (pBusDrv->hOs, pHostBuf + pBusDrv->uTxnLength, pTxn->aBuf[uBufNum], uBufLen);
-        }
-
-        /* Add buffer length to total transaction length */
-        pBusDrv->uTxnLength += uBufLen;
-    }
-
-    /* If in a Tx aggregation, return TRUE (need to accumulate all parts before sending the transaction) */
-    if (TXN_PARAM_GET_AGGREGATE(pTxn) == TXN_AGGREGATE_ON)
-    {
-        TRACE6(pBusDrv->hReport, REPORT_SEVERITY_INFORMATION, "busDrv_PrepareTxnParts: In aggregation so exit, uTxnLength=%d, bWrite=%d, Len0=%d, Len1=%d, Len2=%d, Len3=%d\n", pBusDrv->uTxnLength, bWrite, pTxn->aLen[0], pTxn->aLen[1], pTxn->aLen[2], pTxn->aLen[3]);
-        return TI_TRUE;
-    }
-
-    /* If current buffer has a remainder, prepare its transaction part */
-    uRemainderLen = pBusDrv->uTxnLength & pBusDrv->uBlkSizeMask;
-    if (uRemainderLen > 0)
-    {
-        pBusDrv->aTxnParts[uPartNum].bBlkMode  = TI_FALSE;
-        pBusDrv->aTxnParts[uPartNum].uLength   = uRemainderLen;
-        pBusDrv->aTxnParts[uPartNum].uHwAddr   = uCurrHwAddr;
-        pBusDrv->aTxnParts[uPartNum].pHostAddr = (void *)pHostBuf;
-        pBusDrv->aTxnParts[uPartNum].bMore     = TI_TRUE;
-
-        /* If not fixed HW address, increment it by this part's size */
-        if (!bFixedHwAddr)
-        {
-            uCurrHwAddr += uRemainderLen;
-        }
-
-        uPartNum++;
-    }
-
-#ifdef  DISABLE_SDIO_MULTI_BLK_MODE
-
-    /* SDIO multi-block mode is disabled so split to 512 bytes blocks */
-    {
-        TI_UINT32 uLen;
-
-        for (uLen = uRemainderLen; uLen < pBusDrv->uTxnLength; uLen += pBusDrv->uBlkSize)
-        {
-            pBusDrv->aTxnParts[uPartNum].bBlkMode  = TI_FALSE;
-            pBusDrv->aTxnParts[uPartNum].uLength   = pBusDrv->uBlkSize;
-            pBusDrv->aTxnParts[uPartNum].uHwAddr   = uCurrHwAddr;
-            pBusDrv->aTxnParts[uPartNum].pHostAddr = (void *)(pHostBuf + uLen);
-            pBusDrv->aTxnParts[uPartNum].bMore     = TI_TRUE;
-
-            /* If not fixed HW address, increment it by this part's size */
-            if (!bFixedHwAddr)
-            {
-                uCurrHwAddr += pBusDrv->uBlkSize;
-            }
-
-            uPartNum++;
-        }
-    }
-
-#else  /* Use SDIO block mode (this is the default behavior) */
-
-    /* If current buffer has full SDIO blocks, prepare a block-mode transaction part */
-    if (pBusDrv->uTxnLength >= pBusDrv->uBlkSize)
-    {
-        pBusDrv->aTxnParts[uPartNum].bBlkMode  = TI_TRUE;
-        pBusDrv->aTxnParts[uPartNum].uLength   = pBusDrv->uTxnLength - uRemainderLen;
-        pBusDrv->aTxnParts[uPartNum].uHwAddr   = uCurrHwAddr;
-        pBusDrv->aTxnParts[uPartNum].pHostAddr = (void *)(pHostBuf + uRemainderLen);
-        pBusDrv->aTxnParts[uPartNum].bMore     = TI_TRUE;
-
-        uPartNum++;
-    }
-
-#endif /* DISABLE_SDIO_MULTI_BLK_MODE */
-
-    /* Set last More flag as specified for the whole Txn */
-    pBusDrv->aTxnParts[uPartNum - 1].bMore = TXN_PARAM_GET_MORE(pTxn);
-    pBusDrv->uCurrTxnPartsNum = uPartNum;
-
-    TRACE9(pBusDrv->hReport, REPORT_SEVERITY_INFORMATION, "busDrv_PrepareTxnParts: Txn prepared, PartsNum=%d, bWrite=%d, uTxnLength=%d, uRemainderLen=%d, uHwAddr=0x%x, Len0=%d, Len1=%d, Len2=%d, Len3=%d\n", uPartNum, bWrite, pBusDrv->uTxnLength, uRemainderLen, pTxn->uHwAddr, pTxn->aLen[0], pTxn->aLen[1], pTxn->aLen[2], pTxn->aLen[3]);
-
-    pBusDrv->uTxnLength = 0;
-
-    /* Return FALSE to indicate that we are not in the middle of a Tx aggregation so the Txn is ready to send */
-    return TI_FALSE;
-}
-
-
-/** 
- * \fn     busDrv_SendTxnParts
- * \brief  Send prepared transaction parts
- * 
- * Called first by busDrv_Transact(), and also from TxnDone CB after Async completion.
- * Sends the prepared transaction parts in a loop.
- * If a transaction part is Async, the loop continues later in the TxnDone ISR context.
- * When all parts are done, the upper layer TxnDone CB is called.
- * 
- * \note   
- * \param  pBusDrv - The module's object
- * \return void
- * \sa     busDrv_Transact, busDrv_PrepareTxnParts
- */ 
-static void busDrv_SendTxnParts (TBusDrvObj *pBusDrv)
-{
-    ETxnStatus  eStatus;
-    TTxnPart   *pTxnPart;
-    TTxnStruct *pTxn = pBusDrv->pCurrTxn;
-
-    /* While there are transaction parts to send */
-    while (pBusDrv->uCurrTxnPartsCount < pBusDrv->uCurrTxnPartsNum)
-    {
-        pTxnPart = &(pBusDrv->aTxnParts[pBusDrv->uCurrTxnPartsCount]);
-        pBusDrv->uCurrTxnPartsCount++;
-
-        /* Assume pending to be ready in case we are preempted by the TxnDon CB !! */
-        pBusDrv->eCurrTxnStatus = TXN_STATUS_PENDING;   
-
-        /* If single step, send ELP byte */
-        if (TXN_PARAM_GET_SINGLE_STEP(pTxn)) 
-        {
-            /* Overwrite the function id with function 0 - for ELP register !!!! */
-            eStatus = sdioAdapt_TransactBytes (TXN_FUNC_ID_CTRL,
-                                               pTxnPart->uHwAddr,
-                                               pTxnPart->pHostAddr,
-                                               pTxnPart->uLength,
-                                               TXN_PARAM_GET_DIRECTION(pTxn),
-                                               pTxnPart->bMore);
-
-            /* If first write failed try once again (may happen once upon chip wakeup) */
-            if (eStatus == TXN_STATUS_ERROR)
-            {
-                /* Overwrite the function id with function 0 - for ELP register !!!! */
-                eStatus = sdioAdapt_TransactBytes (TXN_FUNC_ID_CTRL,
-                                                   pTxnPart->uHwAddr,
-                                                   pTxnPart->pHostAddr,
-                                                   pTxnPart->uLength,
-                                                   TXN_PARAM_GET_DIRECTION(pTxn),
-                                                   pTxnPart->bMore);
-                TRACE0(pBusDrv->hReport, REPORT_SEVERITY_WARNING, "busDrv_SendTxnParts: SDIO Single-Step transaction failed once so try again");
-            }
-        }
-        else
-        {
-            eStatus = sdioAdapt_Transact (TXN_PARAM_GET_FUNC_ID(pTxn),
-                                          pTxnPart->uHwAddr,
-                                          pTxnPart->pHostAddr,
-                                          pTxnPart->uLength,
-                                          TXN_PARAM_GET_DIRECTION(pTxn),
-                                          pTxnPart->bBlkMode,
-                                          ((TXN_PARAM_GET_FIXED_ADDR(pTxn) == 1) ? 0 : 1),
-                                          pTxnPart->bMore);
-        }
-
-        TRACE7(pBusDrv->hReport, REPORT_SEVERITY_INFORMATION, "busDrv_SendTxnParts: PartNum = %d, SingleStep = %d, Direction = %d, HwAddr = 0x%x, HostAddr = 0x%x, Length = %d, BlkMode = %d\n", pBusDrv->uCurrTxnPartsCount-1, TXN_PARAM_GET_SINGLE_STEP(pTxn), TXN_PARAM_GET_DIRECTION(pTxn), pTxnPart->uHwAddr, pTxnPart->pHostAddr, pTxnPart->uLength, pTxnPart->bBlkMode);
-
-        /* If pending TxnDone (Async), continue this loop in the next TxnDone interrupt */
-        if (eStatus == TXN_STATUS_PENDING)
-        {
-            return; 
-        }
-
-        /* Update current transaction status to deduce if it is all finished in the original context (Sync) or not. */
-        pBusDrv->eCurrTxnStatus = eStatus;
-        pBusDrv->uCurrTxnPartsCountSync++;
-
-        /* If error, set error in Txn struct, call TxnDone CB if not fully sync, and exit */
-        if (eStatus == TXN_STATUS_ERROR)
-        {
-            TXN_PARAM_SET_STATUS(pTxn, TXN_PARAM_STATUS_ERROR);
-            if (pBusDrv->uCurrTxnPartsCountSync != pBusDrv->uCurrTxnPartsCount)
-            {
-                pBusDrv->fTxnDoneCb (pBusDrv->hCbHandle, pTxn);
-            }
-        	return;
-        }
-    }
-
-    /* If we got here we sent all buffers and we don't pend transaction end */
-    TRACE3(pBusDrv->hReport, REPORT_SEVERITY_INFORMATION, "busDrv_SendTxnParts: Txn finished successfully, Status = %d, PartsCount = %d, SyncCount = %d\n", pBusDrv->eCurrTxnStatus, pBusDrv->uCurrTxnPartsCount, pBusDrv->uCurrTxnPartsCountSync);
-
-    /* For read transaction, copy the data from the DMA-able buffer to the host buffer(s) */
-    if (TXN_PARAM_GET_DIRECTION(pTxn) == TXN_DIRECTION_READ)
-    {
-        TI_UINT32 uBufNum;
-        TI_UINT32 uBufLen;
-        TI_UINT8 *pDmaBuf = pBusDrv->pRxDmaBuf; /* After the read transaction the data is in the Rx DMA buffer */
-
-        for (uBufNum = 0; uBufNum < MAX_XFER_BUFS; uBufNum++)
-        {
-            uBufLen = pTxn->aLen[uBufNum];
-
-            /* If no more buffers, exit the loop */
-            if (uBufLen == 0)
-            {
-                break;
-            }
-
-            os_memoryCopy (pBusDrv->hOs, pTxn->aBuf[uBufNum], pDmaBuf, uBufLen);
-            pDmaBuf += uBufLen;
-        }
-    }
-
-    /* Set status OK in Txn struct, and call TxnDone CB if not fully sync */
-    TXN_PARAM_SET_STATUS(pTxn, TXN_PARAM_STATUS_OK);
-    if (pBusDrv->uCurrTxnPartsCountSync != pBusDrv->uCurrTxnPartsCount)
-    {
-        pBusDrv->fTxnDoneCb (pBusDrv->hCbHandle, pTxn);
-    }
-}
-
-
-/** 
- * \fn     busDrv_TxnDoneCb
- * \brief  Continue async transaction processing (CB)
- * 
- * Called back by the lower (BSP) bus-driver upon Async transaction completion (TxnDone ISR).
- * Call busDrv_SendTxnParts to continue sending the remained transaction parts.
- * 
- * \note   
- * \param  hBusDrv - The module's object
- * \param  status  - The last transaction result - 0 = OK, else Error
- * \return void
- * \sa     busDrv_SendTxnParts
- */ 
-static void busDrv_TxnDoneCb (TI_HANDLE hBusDrv, int iStatus)
-{
-    TBusDrvObj *pBusDrv = (TBusDrvObj*)hBusDrv;
-    CL_TRACE_START_L1();
-
-    /* If last transaction part failed, set error in Txn struct, call TxnDone CB and exit. */
-    if (iStatus != 0)
-    {
-        TRACE1(pBusDrv->hReport, REPORT_SEVERITY_ERROR, "busDrv_TxnDoneCb: Status = 0x%x\n", iStatus);
-
-        TXN_PARAM_SET_STATUS(pBusDrv->pCurrTxn, TXN_PARAM_STATUS_ERROR);
-        pBusDrv->fTxnDoneCb (pBusDrv->hCbHandle, pBusDrv->pCurrTxn);
-        CL_TRACE_END_L1("tiwlan_drv.ko", "TXN_DONE", "BusDrvCB", "");
-        return;
-    }
-
-    TRACE0(pBusDrv->hReport, REPORT_SEVERITY_INFORMATION, "busDrv_TxnDoneCb()\n");
-
-    /* Continue sending the remained transaction parts. */
-    busDrv_SendTxnParts (pBusDrv);
-
-    CL_TRACE_END_L1("tiwlan_drv.ko", "TXN_DONE", "BusDrvCB", "");
-}
diff --git a/wl1271/Txn/TxnDefs.h b/wl1271/Txn/TxnDefs.h
deleted file mode 100644
index 68f7c3a..0000000
--- a/wl1271/Txn/TxnDefs.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * TxnDefs.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   TxnDefs.h 
- *  \brief  Common TXN definitions                                  
- *
- * These defintions are used also by the SDIO/SPI adapters, so they shouldn't
- *     base on any non-standart types (e.g. use unsigned int and not TI_UINT32)
- * 
- *  \see    
- */
-
-#ifndef __TXN_DEFS_API_H__
-#define __TXN_DEFS_API_H__
-
-
-/************************************************************************
- * Defines
- ************************************************************************/
-#define TXN_FUNC_ID_CTRL         0
-#define TXN_FUNC_ID_BT           1
-#define TXN_FUNC_ID_WLAN         2
-
-
-/************************************************************************
- * Types
- ************************************************************************/
-/* Transactions status (shouldn't override TI_OK and TI_NOK values) */
-/** \enum ETxnStatus
- * \brief  Txn Transactions status
- *
- * \par Description
- * Txn Transactions status - shouldn't override TI_OK and TI_NOK values
- *
- * \sa
- */
-typedef enum
-{
-    TXN_STATUS_NONE = 2,	/**< */
-    TXN_STATUS_OK,         	/**< */
-    TXN_STATUS_COMPLETE,  	/**< */ 
-    TXN_STATUS_PENDING,    	/**< */
-    TXN_STATUS_ERROR     	/**< */
-
-} ETxnStatus;
-
-
-#endif /*__TXN_DEFS_API_H__*/
diff --git a/wl1271/Txn/TxnQueue.c b/wl1271/Txn/TxnQueue.c
deleted file mode 100644
index edfd437..0000000
--- a/wl1271/Txn/TxnQueue.c
+++ /dev/null
@@ -1,860 +0,0 @@
-/*
- * TxnQueue.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/** \file   TxnQueue.c 
- *  \brief  The transaction-queue module. 
- *
- * The Transaction Queue encapsulates the bus access from a functional driver (WLAN, BT).
- * This TI proprietary module presents the same interface and same behavior for different 
- *     bus configuration: SDIO (multi or single function) or SPI and for different modes 
- *     of operation: Synchronous, a-synchronous or combination of both. 
- * It will also be used over the RS232 interface (using wUART protocol) which is applicable 
- *     for RS applications (on PC).
- * 
- * The TxnQ module provides the following requirements:
- *     Inter process protection on queue's internal database and synchronization between 
- *         functional drivers that share the bus.
- *     Support multiple queues per function, handled by priority. 
- *     Support the TTxnStruct API (as the Bus Driver) with the ability to manage commands 
- *         queuing of multiple functions on top of the Bus Driver. 
- *     The TxnQ (as well as the layers above it) is agnostic to the bus driver used beneath it 
- *         (SDIO, WSPI or wUART), since all bus drivers introduce the same API and hide bus details. 
- *     The TxnQ has no OS dependencies. It supports access from multiple OS threads.
- * Note: It is assumed that any transaction forwarded to the TxnQ has enough resources in HW. 
- * 
- *  \see    TxnQueue.h
- */
-
-#define __FILE_ID__  FILE_ID_123
-#include "tidef.h"
-#include "report.h"
-#include "context.h"
-#include "osApi.h"
-#include "TxnDefs.h"
-#include "BusDrv.h"
-#include "TxnQueue.h"
-
-
-
-/************************************************************************
- * Defines
- ************************************************************************/
-#define MAX_FUNCTIONS       4   /* Maximum 4 functional drivers (including Func 0 which is for bus control) */
-#define MAX_PRIORITY        2   /* Maximum 2 prioritys per functional driver */
-#define TXN_QUE_SIZE        QUE_UNLIMITED_SIZE
-#define TXN_DONE_QUE_SIZE   QUE_UNLIMITED_SIZE
-
-
-/************************************************************************
- * Types
- ************************************************************************/
-
-/* Functional driver's SM States */
-typedef enum
-{
-    FUNC_STATE_NONE,              /* Function not registered */
-	FUNC_STATE_STOPPED,           /* Queues are stopped */
-	FUNC_STATE_RUNNING,           /* Queues are running */
-	FUNC_STATE_RESTART            /* Wait for current Txn to finish before restarting queues */
-} EFuncState;
-
-/* The functional drivers registered to TxnQ */
-typedef struct 
-{
-    EFuncState      eState;             /* Function crrent state */
-    TI_UINT32       uNumPrios;          /* Number of queues (priorities) for this function */
-	TTxnQueueDoneCb fTxnQueueDoneCb;    /* The CB called by the TxnQueue upon full transaction completion. */
-	TI_HANDLE       hCbHandle;          /* The callback handle */
-    TTxnStruct *    pSingleStep;        /* A single step transaction waiting to be sent */
-
-} TFuncInfo;
-
-
-/* The TxnQueue module Object */
-typedef struct _TTxnQObj
-{
-    TI_HANDLE	    hOs;		   	 
-    TI_HANDLE	    hReport;
-    TI_HANDLE	    hContext;
-	TI_HANDLE	    hBusDrv;
-
-    TFuncInfo       aFuncInfo[MAX_FUNCTIONS];  /* Registered functional drivers - see above */
-    TI_HANDLE       aTxnQueues[MAX_FUNCTIONS][MAX_PRIORITY];  /* Handle of the Transactions-Queue */
-    TI_HANDLE       hTxnDoneQueue;      /* Queue for completed transactions not reported to yet to the upper layer */
-    TTxnStruct *    pCurrTxn;           /* The transaction currently processed in the bus driver (NULL if none) */
-    TI_UINT32       uMinFuncId;         /* The minimal function ID actually registered (through txnQ_Open) */
-    TI_UINT32       uMaxFuncId;         /* The maximal function ID actually registered (through txnQ_Open) */
-    TI_BOOL         bSchedulerBusy;     /* If set, the scheduler is currently running so it shouldn't be reentered */
-    TI_BOOL         bSchedulerPend;     /* If set, a call to the scheduler was postponed because it was busy */
-    
-    /* Environment dependent: TRUE if needed and allowed to protect TxnDone in critical section */
-    TTxnDoneCb      fConnectCb;
-    TI_HANDLE       hConnectCb;
-
-#ifdef TI_DBG
-    TI_HANDLE       pAggregQueue;       /* While Tx aggregation in progress, saves its queue pointer to ensure continuity */
-#endif
-
-} TTxnQObj;
-
-
-/************************************************************************
- * Internal functions prototypes
- ************************************************************************/
-static void         txnQ_TxnDoneCb    (TI_HANDLE hTxnQ, void *hTxn);
-static ETxnStatus   txnQ_RunScheduler (TTxnQObj *pTxnQ, TTxnStruct *pInputTxn);
-static ETxnStatus   txnQ_Scheduler    (TTxnQObj *pTxnQ, TTxnStruct *pInputTxn);
-static TTxnStruct  *txnQ_SelectTxn    (TTxnQObj *pTxnQ);
-static void         txnQ_ConnectCB    (TI_HANDLE hTxnQ, void *hTxn);
-
-
-
-/************************************************************************
- *
- *   Module functions implementation
- *
- ************************************************************************/
-
-TI_HANDLE txnQ_Create (TI_HANDLE hOs)
-{
-    TI_HANDLE  hTxnQ;
-    TTxnQObj  *pTxnQ;
-    TI_UINT32  i;
-
-    hTxnQ = os_memoryAlloc(hOs, sizeof(TTxnQObj));
-    if (hTxnQ == NULL)
-        return NULL;
-    
-    pTxnQ = (TTxnQObj *)hTxnQ;
-
-    os_memoryZero(hOs, hTxnQ, sizeof(TTxnQObj));
-    
-    pTxnQ->hOs             = hOs;
-    pTxnQ->pCurrTxn        = NULL;
-    pTxnQ->uMinFuncId      = MAX_FUNCTIONS; /* Start at maximum and save minimal value in txnQ_Open */
-    pTxnQ->uMaxFuncId      = 0;             /* Start at minimum and save maximal value in txnQ_Open */
-#ifdef TI_DBG
-    pTxnQ->pAggregQueue    = NULL;
-#endif
-
-    for (i = 0; i < MAX_FUNCTIONS; i++)
-    {
-        pTxnQ->aFuncInfo[i].eState          = FUNC_STATE_NONE;
-        pTxnQ->aFuncInfo[i].uNumPrios       = 0;
-        pTxnQ->aFuncInfo[i].pSingleStep     = NULL;
-        pTxnQ->aFuncInfo[i].fTxnQueueDoneCb = NULL;
-        pTxnQ->aFuncInfo[i].hCbHandle       = NULL;
-    }
-    
-    /* Create the Bus-Driver module */
-    pTxnQ->hBusDrv = busDrv_Create (hOs);
-    if (pTxnQ->hBusDrv == NULL)
-    {
-        WLAN_OS_REPORT(("%s: Error - failed to create BusDrv\n", __FUNCTION__));
-        txnQ_Destroy (hTxnQ);
-        return NULL;
-    }
-
-    return pTxnQ;
-}
-
-TI_STATUS txnQ_Destroy (TI_HANDLE hTxnQ)
-{
-    TTxnQObj *pTxnQ = (TTxnQObj*)hTxnQ;
-
-    if (pTxnQ)
-    {
-        if (pTxnQ->hBusDrv) 
-        {
-            busDrv_Destroy (pTxnQ->hBusDrv);
-        }
-        if (pTxnQ->hTxnDoneQueue) 
-        {
-            que_Destroy (pTxnQ->hTxnDoneQueue);
-        }
-        os_memoryFree (pTxnQ->hOs, pTxnQ, sizeof(TTxnQObj));     
-    }
-    return TI_OK;
-}
-
-void txnQ_Init (TI_HANDLE hTxnQ, TI_HANDLE hOs, TI_HANDLE hReport, TI_HANDLE hContext)
-{
-    TTxnQObj  *pTxnQ = (TTxnQObj*)hTxnQ;
-    TI_UINT32  uNodeHeaderOffset;
-
-    pTxnQ->hOs             = hOs;
-    pTxnQ->hReport         = hReport;
-    pTxnQ->hContext        = hContext;
-
-    /* Create the TxnDone queue. */
-    uNodeHeaderOffset = TI_FIELD_OFFSET(TTxnStruct, tTxnQNode); 
-    pTxnQ->hTxnDoneQueue = que_Create (pTxnQ->hOs, pTxnQ->hReport, TXN_DONE_QUE_SIZE, uNodeHeaderOffset);
-    if (pTxnQ->hTxnDoneQueue == NULL)
-    {
-        TRACE0(pTxnQ->hReport, REPORT_SEVERITY_ERROR, ": TxnDone queue creation failed!\n");
-    }
-
-    busDrv_Init (pTxnQ->hBusDrv, hReport);
-}
-
-TI_STATUS txnQ_ConnectBus (TI_HANDLE  hTxnQ,
-                           TBusDrvCfg *pBusDrvCfg,
-                           TTxnDoneCb fConnectCb,
-                           TI_HANDLE  hConnectCb,
-                           TI_UINT32  *pRxDmaBufLen,
-                           TI_UINT32  *pTxDmaBufLen)
-{
-    TTxnQObj *pTxnQ = (TTxnQObj*) hTxnQ;
-
-    TRACE0(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_ConnectBus()\n");
-
-    pTxnQ->fConnectCb = fConnectCb;
-    pTxnQ->hConnectCb = hConnectCb;
-
-    return busDrv_ConnectBus (pTxnQ->hBusDrv, pBusDrvCfg, txnQ_TxnDoneCb, hTxnQ, txnQ_ConnectCB, pRxDmaBufLen, pTxDmaBufLen);
-}
-
-TI_STATUS txnQ_DisconnectBus (TI_HANDLE hTxnQ)
-{
-    TTxnQObj *pTxnQ = (TTxnQObj*) hTxnQ;
-
-    return busDrv_DisconnectBus (pTxnQ->hBusDrv);
-}
-
-TI_STATUS txnQ_Open (TI_HANDLE       hTxnQ, 
-                     TI_UINT32       uFuncId, 
-                     TI_UINT32       uNumPrios, 
-                     TTxnQueueDoneCb fTxnQueueDoneCb,
-                     TI_HANDLE       hCbHandle)
-{
-    TTxnQObj     *pTxnQ = (TTxnQObj*) hTxnQ;
-    TI_UINT32     uNodeHeaderOffset;
-    TI_UINT32     i;
-
-    if (uFuncId >= MAX_FUNCTIONS  ||  uNumPrios > MAX_PRIORITY) 
-    {
-        TRACE2(pTxnQ->hReport, REPORT_SEVERITY_ERROR, ": Invalid Params!  uFuncId = %d, uNumPrios = %d\n", uFuncId, uNumPrios);
-        return TI_NOK;
-    }
-
-    context_EnterCriticalSection (pTxnQ->hContext);
-
-    /* Save functional driver info */
-    pTxnQ->aFuncInfo[uFuncId].uNumPrios       = uNumPrios;
-    pTxnQ->aFuncInfo[uFuncId].fTxnQueueDoneCb = fTxnQueueDoneCb;
-    pTxnQ->aFuncInfo[uFuncId].hCbHandle       = hCbHandle;
-    pTxnQ->aFuncInfo[uFuncId].eState          = FUNC_STATE_STOPPED;
-    
-    /* Create the functional driver's queues. */
-    uNodeHeaderOffset = TI_FIELD_OFFSET(TTxnStruct, tTxnQNode); 
-    for (i = 0; i < uNumPrios; i++)
-    {
-        pTxnQ->aTxnQueues[uFuncId][i] = que_Create (pTxnQ->hOs, pTxnQ->hReport, TXN_QUE_SIZE, uNodeHeaderOffset);
-        if (pTxnQ->aTxnQueues[uFuncId][i] == NULL)
-        {
-            TRACE0(pTxnQ->hReport, REPORT_SEVERITY_ERROR, ": Queues creation failed!\n");
-            context_LeaveCriticalSection (pTxnQ->hContext);
-            return TI_NOK;
-        }
-    }
-
-    /* Update functions actual range (to optimize Txn selection loops - see txnQ_SelectTxn) */
-    if (uFuncId < pTxnQ->uMinFuncId) 
-    {
-        pTxnQ->uMinFuncId = uFuncId;
-    }
-    if (uFuncId > pTxnQ->uMaxFuncId) 
-    {
-        pTxnQ->uMaxFuncId = uFuncId;
-    }
-
-    context_LeaveCriticalSection (pTxnQ->hContext);
-
-    TRACE2(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, ": Function %d registered successfully, uNumPrios = %d\n", uFuncId, uNumPrios);
-
-    return TI_OK;
-}
-
-void txnQ_Close (TI_HANDLE  hTxnQ, TI_UINT32 uFuncId)
-{
-    TTxnQObj     *pTxnQ = (TTxnQObj*)hTxnQ;
-    TI_UINT32     i;
-
-    context_EnterCriticalSection (pTxnQ->hContext);
-
-    /* Destroy the functional driver's queues */
-    for (i = 0; i < pTxnQ->aFuncInfo[uFuncId].uNumPrios; i++)
-    {
-        que_Destroy (pTxnQ->aTxnQueues[uFuncId][i]);
-    }
-
-    /* Clear functional driver info */
-    pTxnQ->aFuncInfo[uFuncId].uNumPrios       = 0;
-    pTxnQ->aFuncInfo[uFuncId].fTxnQueueDoneCb = NULL;
-    pTxnQ->aFuncInfo[uFuncId].hCbHandle       = NULL;
-    pTxnQ->aFuncInfo[uFuncId].eState          = FUNC_STATE_NONE;
-    
-    /* Update functions actual range (to optimize Txn selection loops - see txnQ_SelectTxn) */
-    pTxnQ->uMinFuncId      = MAX_FUNCTIONS; 
-    pTxnQ->uMaxFuncId      = 0;             
-    for (i = 0; i < MAX_FUNCTIONS; i++) 
-    {
-        if (pTxnQ->aFuncInfo[i].eState != FUNC_STATE_NONE) 
-        {
-            if (i < pTxnQ->uMinFuncId) 
-            {
-                pTxnQ->uMinFuncId = i;
-            }
-            if (i > pTxnQ->uMaxFuncId) 
-            {
-                pTxnQ->uMaxFuncId = i;
-            }
-        }
-    }
-
-    context_LeaveCriticalSection (pTxnQ->hContext);
-
-    TRACE1(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, ": Function %d Unregistered\n", uFuncId);
-}
-
-ETxnStatus txnQ_Restart (TI_HANDLE hTxnQ, TI_UINT32 uFuncId)
-{
-    TTxnQObj *pTxnQ = (TTxnQObj*) hTxnQ;
-
-    TRACE0(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_Restart()\n");
-
-    context_EnterCriticalSection (pTxnQ->hContext);
-
-    /* If a Txn from the calling function is in progress, set state to RESTART return PENDING */
-    if (pTxnQ->pCurrTxn) 
-    {
-        if (TXN_PARAM_GET_FUNC_ID(pTxnQ->pCurrTxn) == uFuncId)
-        {
-            pTxnQ->aFuncInfo[uFuncId].eState = FUNC_STATE_RESTART;
-
-            context_LeaveCriticalSection (pTxnQ->hContext);
-
-            TRACE0(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_Restart(): pCurrTxn pending\n");
-
-            /* Return PENDING to indicate that the restart will be completed later (in TxnDone) */
-            return TXN_STATUS_PENDING;
-        }
-    }
-
-    context_LeaveCriticalSection (pTxnQ->hContext);
-
-    /* Clear the calling function's queues (call function CB with status=RECOVERY) */
-    txnQ_ClearQueues (hTxnQ, uFuncId);
-
-    /* Return COMPLETE to indicate that the restart was completed */
-    return TXN_STATUS_COMPLETE;
-}
-
-void txnQ_Run (TI_HANDLE hTxnQ, TI_UINT32 uFuncId)
-{
-    TTxnQObj *pTxnQ = (TTxnQObj*) hTxnQ;
-
-#ifdef TI_DBG
-    TRACE0(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_Run()\n");
-    if (pTxnQ->aFuncInfo[uFuncId].eState != FUNC_STATE_STOPPED) 
-    {
-        TRACE2(pTxnQ->hReport, REPORT_SEVERITY_WARNING, "txnQ_Run(): Called while func %d state is %d!\n", uFuncId, pTxnQ->aFuncInfo[uFuncId].eState);
-    }
-#endif
-
-    /* Enable function's queues */
-    pTxnQ->aFuncInfo[uFuncId].eState = FUNC_STATE_RUNNING;
-
-    /* Send queued transactions as possible */
-    txnQ_RunScheduler (pTxnQ, NULL); 
-}
-
-void txnQ_Stop (TI_HANDLE hTxnQ, TI_UINT32 uFuncId)
-{
-    TTxnQObj *pTxnQ = (TTxnQObj*) hTxnQ;
-
-#ifdef TI_DBG
-    TRACE0(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_Stop()\n");
-    if (pTxnQ->aFuncInfo[uFuncId].eState != FUNC_STATE_RUNNING) 
-    {
-        TRACE2(pTxnQ->hReport, REPORT_SEVERITY_ERROR, "txnQ_Stop(): Called while func %d state is %d!\n", uFuncId, pTxnQ->aFuncInfo[uFuncId].eState);
-    }
-#endif
-
-    /* Enable function's queues */
-    pTxnQ->aFuncInfo[uFuncId].eState = FUNC_STATE_STOPPED;
-}
-
-ETxnStatus txnQ_Transact (TI_HANDLE hTxnQ, TTxnStruct *pTxn)
-{
-    TTxnQObj    *pTxnQ   = (TTxnQObj*)hTxnQ;
-    TI_UINT32    uFuncId = TXN_PARAM_GET_FUNC_ID(pTxn);
-    ETxnStatus   rc;
-
-    if (TXN_PARAM_GET_SINGLE_STEP(pTxn)) 
-    {
-        pTxnQ->aFuncInfo[uFuncId].pSingleStep = pTxn;
-        TRACE0(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_Transact(): Single step Txn\n");
-    }
-    else 
-    {
-        TI_STATUS eStatus;
-        TI_HANDLE hQueue = pTxnQ->aTxnQueues[uFuncId][TXN_PARAM_GET_PRIORITY(pTxn)];
-        context_EnterCriticalSection (pTxnQ->hContext);
-        eStatus = que_Enqueue (hQueue, (TI_HANDLE)pTxn);
-        context_LeaveCriticalSection (pTxnQ->hContext);
-        if (eStatus != TI_OK)
-        {
-            TRACE3(pTxnQ->hReport, REPORT_SEVERITY_ERROR, "txnQ_Transact(): Enqueue failed, pTxn=0x%x, HwAddr=0x%x, Len0=%d\n", pTxn, pTxn->uHwAddr, pTxn->aLen[0]);
-            return TXN_STATUS_ERROR;
-        }
-        TRACE0(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_Transact(): Regular Txn\n");
-    }
-
-    /* Send queued transactions as possible */
-    rc = txnQ_RunScheduler (pTxnQ, pTxn); 
-
-    return rc;
-}
-
-
-/** 
- * \fn     txnQ_ConnectCB
- * \brief  Pending Connection completion CB
- * 
- *  txnQ_ConnectBus CB
- * 
- * \note   
- * \param  hTxnQ - The module's object
- * \param  pTxn  - The completed transaction object 
- * \return void
- * \sa     
- */ 
-static void txnQ_ConnectCB (TI_HANDLE hTxnQ, void *hTxn)
-{
-    TTxnQObj   *pTxnQ   = (TTxnQObj*)hTxnQ;
-
-    /* Call the Client Connect CB */
-    pTxnQ->fConnectCb (pTxnQ->hConnectCb, NULL);
-}
-
-
-/** 
- * \fn     txnQ_TxnDoneCb
- * \brief  Pending Transaction completion CB
- * 
- * Called back by bus-driver upon pending transaction completion in TxnDone context (external!).
- * Enqueue completed transaction in TxnDone queue and call scheduler to send queued transactions.
- * 
- * \note   
- * \param  hTxnQ - The module's object
- * \param  pTxn  - The completed transaction object 
- * \return void
- * \sa     
- */ 
-static void txnQ_TxnDoneCb (TI_HANDLE hTxnQ, void *hTxn)
-{
-    TTxnQObj   *pTxnQ   = (TTxnQObj*)hTxnQ;
-    TTxnStruct *pTxn    = (TTxnStruct *)hTxn;
-    TI_UINT32   uFuncId = TXN_PARAM_GET_FUNC_ID(pTxn);
-
-#ifdef TI_DBG
-    TRACE0(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_TxnDoneCb()\n");
-    if (pTxn != pTxnQ->pCurrTxn) 
-    {
-        TRACE2(pTxnQ->hReport, REPORT_SEVERITY_ERROR, "txnQ_TxnDoneCb(): CB returned pTxn 0x%x  while pCurrTxn is 0x%x !!\n", pTxn, pTxnQ->pCurrTxn);
-    }
-#endif
-
-    /* If the function of the completed Txn is waiting for restart */
-    if (pTxnQ->aFuncInfo[uFuncId].eState == FUNC_STATE_RESTART) 
-    {
-        TRACE0(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_TxnDoneCb(): Handling restart\n");
-
-        /* First, Clear the restarted function queues  */
-        txnQ_ClearQueues (hTxnQ, uFuncId);
-
-        /* Call function CB for current Txn with restart indication */
-        TXN_PARAM_SET_STATUS(pTxn, TXN_PARAM_STATUS_RECOVERY);
-        pTxnQ->aFuncInfo[uFuncId].fTxnQueueDoneCb (pTxnQ->aFuncInfo[uFuncId].hCbHandle, pTxn);
-    }
-
-    /* In the normal case (no restart), enqueue completed transaction in TxnDone queue */
-    else 
-    {
-        TI_STATUS eStatus;
-
-        context_EnterCriticalSection (pTxnQ->hContext);
-        eStatus = que_Enqueue (pTxnQ->hTxnDoneQueue, (TI_HANDLE)pTxn);
-        if (eStatus != TI_OK)
-        {
-            TRACE3(pTxnQ->hReport, REPORT_SEVERITY_ERROR, "txnQ_TxnDoneCb(): Enqueue failed, pTxn=0x%x, HwAddr=0x%x, Len0=%d\n", pTxn, pTxn->uHwAddr, pTxn->aLen[0]);
-        }
-        context_LeaveCriticalSection (pTxnQ->hContext);
-    }
-
-    /* Indicate that no transaction is currently processed in the bus-driver */
-    pTxnQ->pCurrTxn = NULL;
-
-    /* Send queued transactions as possible (TRUE indicates we are in external context) */
-    txnQ_RunScheduler (pTxnQ, NULL); 
-}
-
-
-/** 
- * \fn     txnQ_RunScheduler
- * \brief  Send queued transactions
- * 
- * Run the scheduler, which issues transactions as long as possible.
- * Since this function is called from either internal or external (TxnDone) context,
- *   it handles reentry by setting a bSchedulerPend flag, and running the scheduler again
- *   when its current iteration is finished.
- * 
- * \note   
- * \param  pTxnQ     - The module's object
- * \param  pInputTxn - The transaction inserted in the current context (NULL if none)
- * \return COMPLETE if pCurrTxn completed in this context, PENDING if not, ERROR if failed
- * \sa     
- */ 
-static ETxnStatus txnQ_RunScheduler (TTxnQObj *pTxnQ, TTxnStruct *pInputTxn)
-{
-    TI_BOOL bFirstIteration;  
-	ETxnStatus eStatus = TXN_STATUS_NONE;
-
-    TRACE0(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_RunScheduler()\n");
-
-    context_EnterCriticalSection (pTxnQ->hContext);
-
-    /* If the scheduler is currently busy, set bSchedulerPend flag and exit */
-    if (pTxnQ->bSchedulerBusy)
-    {
-        TRACE0(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_RunScheduler(): Scheduler is busy\n");
-        pTxnQ->bSchedulerPend = TI_TRUE;
-        context_LeaveCriticalSection (pTxnQ->hContext);
-        return TXN_STATUS_PENDING;
-    }
-
-    /* Indicate that the scheduler is currently busy */
-    pTxnQ->bSchedulerBusy = TI_TRUE;
-
-    context_LeaveCriticalSection (pTxnQ->hContext);
-
-    bFirstIteration = TI_TRUE;  
-
-    /* 
-     * Run the scheduler while it has work to do 
-     */
-    while (1)
-    {
-        /* If first scheduler iteration, save its return code to return the original Txn result */
-        if (bFirstIteration) 
-        {
-            eStatus = txnQ_Scheduler (pTxnQ, pInputTxn);
-            bFirstIteration = TI_FALSE;
-        }
-        /* This is for handling pending calls when the scheduler was busy (see above) */
-        else 
-        {
-            TRACE0(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_RunScheduler(): Handle pending scheduler call\n");
-            txnQ_Scheduler (pTxnQ, NULL);
-        }
-
-        context_EnterCriticalSection (pTxnQ->hContext);
-
-        /* If no pending calls, clear the busy flag and return the original caller Txn status */
-        if (!pTxnQ->bSchedulerPend) 
-        {
-            pTxnQ->bSchedulerBusy = TI_FALSE;
-            context_LeaveCriticalSection (pTxnQ->hContext);
-            return eStatus;
-        }
-        pTxnQ->bSchedulerPend = TI_FALSE;
-
-        context_LeaveCriticalSection (pTxnQ->hContext);
-    }
-}
-
-
-/** 
- * \fn     txnQ_Scheduler
- * \brief  Send queued transactions
- * 
- * Issue transactions as long as they are available and the bus is not occupied.
- * Call CBs of completed transactions, except completion of pInputTxn (covered by the return value).
- * Note that this function is called from either internal or external (TxnDone) context.
- * However, the txnQ_RunScheduler which calls it, prevents scheduler reentry.
- * 
- * \note   
- * \param  pTxnQ     - The module's object
- * \param  pInputTxn - The transaction inserted in the current context (NULL if none)
- * \return COMPLETE if pInputTxn completed in this context, PENDING if not, ERROR if failed
- * \sa     txnQ_RunScheduler
- */ 
-static ETxnStatus txnQ_Scheduler (TTxnQObj *pTxnQ, TTxnStruct *pInputTxn)
-{
-    ETxnStatus eInputTxnStatus;  
-
-    /* Use as return value the status of the input transaction (PENDING unless sent and completed here) */
-    eInputTxnStatus = TXN_STATUS_PENDING;  
-
-    /* if a previous transaction is in progress, return PENDING */
-    if (pTxnQ->pCurrTxn)
-    {
-        TRACE1(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_Scheduler(): pCurrTxn isn't null (0x%x) so exit\n", pTxnQ->pCurrTxn);
-        return TXN_STATUS_PENDING;
-    }
-
-    /* Loop while transactions are available and can be sent to bus driver */
-    while (1)
-    {
-        TTxnStruct   *pSelectedTxn;
-        ETxnStatus    eStatus;
-
-        /* Get next enabled transaction by priority. If none, exit loop. */
-        context_EnterCriticalSection (pTxnQ->hContext);
-        pSelectedTxn = txnQ_SelectTxn (pTxnQ);
-        context_LeaveCriticalSection (pTxnQ->hContext);
-        if (pSelectedTxn == NULL)
-        {
-            break;
-        }
-
-        /* Save transaction in case it will be async (to indicate that the bus driver is busy) */
-        pTxnQ->pCurrTxn = pSelectedTxn;
-
-        /* Send selected transaction to bus driver */
-        eStatus = busDrv_Transact (pTxnQ->hBusDrv, pSelectedTxn);
-
-        /* If we've just sent the input transaction, use the status as the return value */
-        if (pSelectedTxn == pInputTxn)
-        {
-            eInputTxnStatus = eStatus;
-        }
-
-        TRACE3(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_Scheduler(): Txn 0x%x sent, status = %d, eInputTxnStatus = %d\n", pSelectedTxn, eStatus, eInputTxnStatus);
-
-        /* If transaction completed */
-        if (eStatus != TXN_STATUS_PENDING)
-        {
-            pTxnQ->pCurrTxn = NULL;
-
-            /* If it's not the input transaction, enqueue it in TxnDone queue */
-            if (pSelectedTxn != pInputTxn)
-            {
-                TI_STATUS eStatus;
-
-                context_EnterCriticalSection (pTxnQ->hContext);
-                eStatus = que_Enqueue (pTxnQ->hTxnDoneQueue, (TI_HANDLE)pSelectedTxn);
-                if (eStatus != TI_OK)
-                {
-                    TRACE3(pTxnQ->hReport, REPORT_SEVERITY_ERROR, "txnQ_Scheduler(): Enqueue failed, pTxn=0x%x, HwAddr=0x%x, Len0=%d\n", pSelectedTxn, pSelectedTxn->uHwAddr, pSelectedTxn->aLen[0]);
-                }
-                context_LeaveCriticalSection (pTxnQ->hContext);
-            }
-        }
-
-        /* If pending Exit loop! */
-        else 
-        {
-            break;
-        }
-    }
-
-    /* Dequeue completed transactions and call their functional driver CB */
-    /* Note that it's the functional driver CB and not the specific CB in the Txn! */
-    while (1)
-    {
-        TTxnStruct      *pCompletedTxn;
-        TI_UINT32        uFuncId;
-        TTxnQueueDoneCb  fTxnQueueDoneCb;
-        TI_HANDLE        hCbHandle;
-
-        context_EnterCriticalSection (pTxnQ->hContext);
-        pCompletedTxn   = (TTxnStruct *) que_Dequeue (pTxnQ->hTxnDoneQueue);
-        context_LeaveCriticalSection (pTxnQ->hContext);
-        if (pCompletedTxn == NULL)
-        {
-            /* Return the status of the input transaction (PENDING unless sent and completed here) */
-            return eInputTxnStatus;
-        }
-
-        TRACE1(pTxnQ->hReport, REPORT_SEVERITY_INFORMATION, "txnQ_Scheduler(): Calling TxnDone for Txn 0x%x\n", pCompletedTxn);
-
-        uFuncId         = TXN_PARAM_GET_FUNC_ID(pCompletedTxn);
-        fTxnQueueDoneCb = pTxnQ->aFuncInfo[uFuncId].fTxnQueueDoneCb;
-        hCbHandle       = pTxnQ->aFuncInfo[uFuncId].hCbHandle;
-
-        fTxnQueueDoneCb (hCbHandle, pCompletedTxn);
-    }
-}
-
-
-/** 
- * \fn     txnQ_SelectTxn
- * \brief  Select transaction to send
- * 
- * Called from txnQ_RunScheduler() which is protected in critical section.
- * Select the next enabled transaction by priority.
- * 
- * \note   
- * \param  pTxnQ - The module's object
- * \return The selected transaction to send (NULL if none available)
- * \sa     
- */ 
-static TTxnStruct *txnQ_SelectTxn (TTxnQObj *pTxnQ)
-{
-    TTxnStruct *pSelectedTxn;
-    TI_UINT32   uFunc;
-    TI_UINT32   uPrio;
-
-#ifdef TI_DBG
-    /* If within Tx aggregation, dequeue Txn from same queue, and if not NULL return it */
-    if (pTxnQ->pAggregQueue)
-    {
-        pSelectedTxn = (TTxnStruct *) que_Dequeue (pTxnQ->pAggregQueue);
-        if (pSelectedTxn != NULL)
-        {
-            /* If aggregation ended, reset the aggregation-queue pointer */
-            if (TXN_PARAM_GET_AGGREGATE(pSelectedTxn) == TXN_AGGREGATE_OFF) 
-            {
-                if ((TXN_PARAM_GET_FIXED_ADDR(pSelectedTxn) != TXN_FIXED_ADDR) ||
-                    (TXN_PARAM_GET_DIRECTION(pSelectedTxn)  != TXN_DIRECTION_WRITE))
-                {
-                    TRACE2(pTxnQ->hReport, REPORT_SEVERITY_ERROR, "txnQ_SelectTxn: Mixed transaction during aggregation, HwAddr=0x%x, TxnParams=0x%x\n", pSelectedTxn->uHwAddr, pSelectedTxn->uTxnParams);
-                }
-                pTxnQ->pAggregQueue = NULL;
-            }
-            return pSelectedTxn;
-        }
-        return NULL;
-    }
-#endif
-
-    /* For all functions, if single-step Txn waiting, return it (sent even if function is stopped) */
-    for (uFunc = pTxnQ->uMinFuncId; uFunc <= pTxnQ->uMaxFuncId; uFunc++)
-    {
-        pSelectedTxn = pTxnQ->aFuncInfo[uFunc].pSingleStep;
-        if (pSelectedTxn != NULL)
-        {
-            pTxnQ->aFuncInfo[uFunc].pSingleStep = NULL;
-            return pSelectedTxn;
-        }
-    }
-
-    /* For all priorities from high to low */
-    for (uPrio = 0; uPrio < MAX_PRIORITY; uPrio++)
-    {
-        /* For all functions */
-        for (uFunc = pTxnQ->uMinFuncId; uFunc <= pTxnQ->uMaxFuncId; uFunc++)
-        {
-            /* If function running and uses this priority */
-            if (pTxnQ->aFuncInfo[uFunc].eState == FUNC_STATE_RUNNING  &&
-                pTxnQ->aFuncInfo[uFunc].uNumPrios > uPrio)
-            {
-                /* Dequeue Txn from current func and priority queue, and if not NULL return it */
-                pSelectedTxn = (TTxnStruct *) que_Dequeue (pTxnQ->aTxnQueues[uFunc][uPrio]);
-                if (pSelectedTxn != NULL)
-                {
-#ifdef TI_DBG
-                    /* If aggregation begins, save the aggregation-queue pointer to ensure continuity */
-                    if (TXN_PARAM_GET_AGGREGATE(pSelectedTxn) == TXN_AGGREGATE_ON) 
-                    {
-                        pTxnQ->pAggregQueue = pTxnQ->aTxnQueues[uFunc][uPrio];
-                    }
-#endif
-                    return pSelectedTxn;
-                }
-            }
-        }
-    }
-
-    /* If no transaction was selected, return NULL */
-    return NULL;
-}
-
-
-/** 
- * \fn     txnQ_ClearQueues
- * \brief  Clear the function queues
- * 
- * Clear the specified function queues and call its CB for each Txn with status=RECOVERY.
- * 
- * \note   Called in critical section.
- * \param  hTxnQ            - The module's object
- * \param  uFuncId          - The calling functional driver
- * \return void
- * \sa     
- */ 
-void txnQ_ClearQueues (TI_HANDLE hTxnQ, TI_UINT32 uFuncId)
-{
-    TTxnQObj        *pTxnQ = (TTxnQObj*)hTxnQ;
-    TTxnStruct      *pTxn;
-    TI_UINT32        uPrio;
-
-    context_EnterCriticalSection (pTxnQ->hContext);
-
-    pTxnQ->aFuncInfo[uFuncId].pSingleStep = NULL;
-
-    /* For all function priorities */
-    for (uPrio = 0; uPrio < pTxnQ->aFuncInfo[uFuncId].uNumPrios; uPrio++)
-    {
-        do
-        {
-            /* Dequeue Txn from current priority queue */
-            pTxn = (TTxnStruct *) que_Dequeue (pTxnQ->aTxnQueues[uFuncId][uPrio]);
-
-            /* 
-             * Drop on Restart 
-             * do not call fTxnQueueDoneCb (hCbHandle, pTxn) callback 
-             */
-        } while (pTxn != NULL);
-    }
-
-    /* Clear state - for restart (doesn't call txnQ_Open) */
-    pTxnQ->aFuncInfo[uFuncId].eState = FUNC_STATE_RUNNING;
-
-    context_LeaveCriticalSection (pTxnQ->hContext);
-}
-
-#ifdef TI_DBG
-void txnQ_PrintQueues (TI_HANDLE hTxnQ)
-{
-    TTxnQObj    *pTxnQ   = (TTxnQObj*)hTxnQ;
-
-    WLAN_OS_REPORT(("Print TXN queues\n"));
-    WLAN_OS_REPORT(("================\n"));
-    que_Print(pTxnQ->aTxnQueues[TXN_FUNC_ID_WLAN][TXN_LOW_PRIORITY]);
-    que_Print(pTxnQ->aTxnQueues[TXN_FUNC_ID_WLAN][TXN_HIGH_PRIORITY]);
-}
-#endif /* TI_DBG */
diff --git a/wl1271/Txn/TxnQueue.h b/wl1271/Txn/TxnQueue.h
deleted file mode 100644
index ee4987c..0000000
--- a/wl1271/Txn/TxnQueue.h
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * TxnQueue.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   TxnQueue.h 
- *  \brief  TxnQueue module API definition                                  
- *
- *  \see    TxnQueue.c
- */
-
-#ifndef __TXN_QUEUE_API_H__
-#define __TXN_QUEUE_API_H__
-
-
-#include "TxnDefs.h"
-#include "BusDrv.h"
-
-
-
-/************************************************************************
- * Defines
- ************************************************************************/
-
-
-/************************************************************************
- * Macros
- ************************************************************************/
-
-
-/************************************************************************
- * Types
- ************************************************************************/
-
-
-/************************************************************************
- * Functions
- ************************************************************************/
-/** \brief	Create the TxnQ module
- * 
- * \param  hOs - Handle to Os Abstraction Layer
- * \return Handle of the allocated object, NULL if allocation failed 
- * 
- * \par Description
- * Allocate and clear the module's object
- *
- * \sa	txnQ_Destroy
- */ 
-TI_HANDLE   txnQ_Create (TI_HANDLE hOs);
-/** \brief	Destroy the module
- * 
- * \param  The module's object
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Destroy bus driver and free the module's object
- *
- * \sa	txnQ_Create
- */ 
-TI_STATUS   txnQ_Destroy (TI_HANDLE hTxnQ);
-/** \brief	Init module
- * 
- * \param  hTxnQ     - The module's object
- * \param  hOs       - Handle to Os Abstraction Layer
- * \param  hReport   - Handle to report module
- * \param  hContext  - Handle to context module
- * \return void        
- * 
- * \par Description
- *
- * \sa
- */ 
-void        txnQ_Init (TI_HANDLE hTxnQ, 
-					   TI_HANDLE hOs, 
-					   TI_HANDLE hReport, 
-					   TI_HANDLE hContext);
-/** \brief	Configure bus driver
- * 
- * \param  hTxnQ      - The module's object
- * \param  pBusDrvCfg - A union used for per-bus specific configuration. 
- * \param  pRxDmaBufLen - The Rx DMA buffer length in bytes (needed as a limit of the Rx aggregation length)
- * \param  pTxDmaBufLen - The Tx DMA buffer length in bytes (needed as a limit of the Tx aggregation length)
- * \return TI_OK / TI_NOK
- * 
- * \par Description
- * Called by DrvMain (future - by Chip-Manager).
- * Configure the bus driver with its connection configuration (such as baud-rate, bus width etc) 
- * and establish the physical connection. Done once (and not per functional driver startup). 
- * 
- * \sa
- */ 
-TI_STATUS   txnQ_ConnectBus (TI_HANDLE hTxnQ, 
-							 TBusDrvCfg *pBusDrvCfg,
-							 TTxnDoneCb fConnectCb,
-							 TI_HANDLE  hConnectCb, 
-                             TI_UINT32  *pRxDmaBufLen,
-                             TI_UINT32  *pTxDmaBufLen);
-
-/** \brief	Disconnect bus driver
- * 
- * \param  hTxnQ      - The module's object
- * \return TI_OK / TI_NOK
- * 
- * \par Description
- * Called by DrvMain (future - by Chip-Manager).
- * Disconnect the bus driver.
- * 
- * \sa
- */ 
-TI_STATUS   txnQ_DisconnectBus (TI_HANDLE hTxnQ);
-/** \brief	Register functional driver to TxnQ
- * 
- * \param  hTxnQ           - The module's object
- * \param  uFuncId         - The calling functional driver
- * \param  uNumPrios       - The number of queues/priorities
- * \param  fTxnQueueDoneCb - The callback to call upon full transaction completion.
- * \param  hCbHandle       - The callback handle                              
- * \return TI_OK / TI_NOK
- * 
- * \par Description
- * Called by each functional driver (WLAN, future-BT) that uses the TxnQ.
- * Save driver's info and create its queues. 
- * Perform in critical section to prevent preemption from TxnDone.
- * 
- * \sa	txnQ_Close
- */ 
-TI_STATUS   txnQ_Open (TI_HANDLE       hTxnQ, 
-                       TI_UINT32       uFuncId, 
-                       TI_UINT32       uNumPrios, 
-                       TTxnQueueDoneCb fTxnQueueDoneCb,
-                       TI_HANDLE       hCbHandle);
-/** \brief	Unregister functional driver from TxnQ
- * 
- * \param  hTxnQ      - The module's object
- * \param  uFuncId    - The calling functional driver
- * \return void
- * \sa     txnQ_Open
- * 
- * \par Description
- * Called by registered functional driver that uses the TxnQ to unregister.
- * Clear the function's data and destroy its queues. 
- * Perform in critical section to prevent preemption from TxnDone.
- * 
- * \sa	txnQ_Open
- */ 
-void        txnQ_Close (TI_HANDLE  hTxnQ, TI_UINT32 uFuncId);
-/** \brief	Restart caller's queues
- * 
- * \param  hTxnQ      - The module's object
- * \param  uFuncId    - The calling functional driver
- * \return COMPLETE if queues were restarted, PENDING if waiting for TxnDone to restart queues
- * 
- * \par Description
- * Called upon functional driver stop command or upon recovery. 
- * If no transaction in progress for the calling function, clear its queues (call the CBs). 
- * If a transaction from this function is in progress, just set state to RESTART and when 
- * called back upon TxnDone clear the queues.
- * Perform in critical section to prevent preemption from TxnDone.
- * \note   
- * The Restart applies only to the calling function's queues.
- * 
- * \sa	txnQ_ClearQueues
- */ 
-ETxnStatus  txnQ_Restart (TI_HANDLE hTxnQ, TI_UINT32 uFuncId);
-/** \brief	Run caller's queues
- * 
- * \param  hTxnQ   - The module's object
- * \param  uFuncId - The calling functional driver
- * \return void
- * 
- * \par Description
- * Enable TxnQ scheduler to process transactions from the calling function's queues.
- * Run scheduler to issue transactions as possible.
- * Run in critical section to protect from preemption by TxnDone.
- * 
- * \sa	txnQ_ClearQueues
- */ 
-void        txnQ_Run (TI_HANDLE hTxnQ, TI_UINT32 uFuncId);
-/** \brief	Stop caller's queues
- * 
- * \param  hTxnQ   - The module's object
- * \param  uFuncId - The calling functional driver
- * \return void
- * 
- * \par Description
- * Disable TxnQ scheduler to process transactions from the calling function's queues.
- * 
- * \sa
- */ 
-void        txnQ_Stop (TI_HANDLE hTxnQ, TI_UINT32 uFuncId);
-/** \brief	Issue a new transaction
- * 
- * \param  hTxnQ - The module's object
- * \param  pTxn  - The transaction object 
- * \return COMPLETE if input pTxn completed in this context, PENDING if not, ERROR if failed
- * 
- * \par Description
- * Called by the functional driver to initiate a new transaction.
- * In critical section save transaction and call scheduler.
- * 
- * \sa
- */ 
-ETxnStatus  txnQ_Transact (TI_HANDLE hTxnQ, TTxnStruct *pTxn);
-
-/** 
- * \fn     txnQ_ClearQueues
- * \brief  Clear the function queues
- * 
- * Clear the specified function queues and call its CB for each Txn with status=RECOVERY.
- * 
- * \note   Called in critical section.
- * \param  hTxnQ            - The module's object
- * \param  uFuncId          - The calling functional driver
- * \return void
- * \sa     
- */ 
-void        txnQ_ClearQueues (TI_HANDLE hTxnQ, TI_UINT32 uFuncId);
-
-
-#ifdef TI_DBG
-/** \brief	Print Txn Queues
- * 
- * \param  hTxnQ - The module's object
- * \return void
- * 
- * \par Description
- * 
- * \sa
- */ 
-void txnQ_PrintQueues (TI_HANDLE hTxnQ);
-#endif
-
-
-
-#endif /*__TXN_QUEUE_API_H__*/
diff --git a/wl1271/Txn/WspiBusDrv.c b/wl1271/Txn/WspiBusDrv.c
deleted file mode 100644
index e6db7f7..0000000
--- a/wl1271/Txn/WspiBusDrv.c
+++ /dev/null
@@ -1,399 +0,0 @@
-/*
- * WspiBusDrv.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/** \file   WspiBusDrv.c 
- *  \brief  The WSPI bus driver upper layer. Platform independent. 
- *          Uses the SpiAdapter API. 
- *          Introduces a generic bus-independent API upwards.
- *  
- *  \see    BusDrv.h, SpiAdapter.h, SpiAdapter.c
- */
-
-#include "tidef.h"
-#include "report.h"
-#include "osApi.h"
-#include "wspi.h"
-#include "BusDrv.h"
-#include "TxnDefs.h"
-#define __FILE_ID__		FILE_ID_124
-
-/************************************************************************
- * Defines
- ************************************************************************/
-#define WSPI_FIXED_BUSY_LEN     1
-#define WSPI_INIT_CMD_MASK      0
-
-
-/************************************************************************
- * Types
- ************************************************************************/
-
-/* The busDrv module Object */
-typedef struct _TBusDrvObj
-{
-    TI_HANDLE	    hOs;		   	 
-    TI_HANDLE	    hReport;
-	TI_HANDLE	    hDriver;
-	TI_HANDLE	    hWspi;
-
-	TTxnDoneCb      fTxnDoneCb;         /* The callback to call upon full transaction completion. */
-	TI_HANDLE       hCbHandle;          /* The callback handle */
-    TTxnStruct *    pCurrTxn;           /* The transaction currently being processed */
-    TI_STATUS       eCurrTxnStatus;     /* COMPLETE, PENDING or ERROR */
-    TI_UINT32       uCurrTxnBufsCount;
-    TI_BOOL         bPendingByte;
-    TTxnDoneCb      fTxnConnectDoneCb;         /* The callback to call upon full transaction completion. */    
-    
-
-} TBusDrvObj;
-
-
-/************************************************************************
- * Internal functions prototypes
- ************************************************************************/
-
-static void asyncEnded_CB(TI_HANDLE hBusTxn, int status);
-static void ConnectDone_CB(TI_HANDLE hBusDrv, int status);
-
-/************************************************************************
- *
- *   Module functions implementation
- *
- ************************************************************************/
-
-/** 
- * \fn     busDrv_Create 
- * \brief  Create the module
- * 
- * Allocate and clear the module's object.
- * 
- * \note   
- * \param  hOs - Handle to Os Abstraction Layer
- * \return Handle of the allocated object, NULL if allocation failed 
- * \sa     busDrv_Destroy
- */ 
-TI_HANDLE busDrv_Create (TI_HANDLE hOs)
-{
-    TI_HANDLE   hBusDrv;
-    TBusDrvObj *pBusDrv;
-
-    hBusDrv = os_memoryAlloc(hOs, sizeof(TBusDrvObj));
-    if (hBusDrv == NULL)
-        return NULL;
-    
-    pBusDrv = (TBusDrvObj *)hBusDrv;
-
-    os_memoryZero(hOs, hBusDrv, sizeof(TBusDrvObj));
-    
-    pBusDrv->hOs = hOs;
-
-    // addapt to WSPI
-
-    pBusDrv->hWspi= WSPI_Open(hOs); 
-
-    return pBusDrv;
-}
-
-
-/** 
- * \fn     busDrv_Destroy
- * \brief  Destroy the module. 
- * 
- * Close SPI lower bus driver and free the module's object.
- * 
- * \note   
- * \param  The module's object
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     busDrv_Create
- */ 
-TI_STATUS busDrv_Destroy (TI_HANDLE hBusDrv)
-{
-    TBusDrvObj *pBusDrv = (TBusDrvObj*)hBusDrv;
-
-    if (pBusDrv)
-    {
-        // addapt to WSPI
-        WSPI_Close(pBusDrv->hWspi);
-        os_memoryFree (pBusDrv->hOs, pBusDrv, sizeof(TBusDrvObj));     
-    }
-    return TI_OK;
-}
-
-
-/****************************************************************************
- *                      busDrv_Init
- ****************************************************************************
- * DESCRIPTION: config the module.
- *
- * INPUTS:  hBusDrv - handle to the module context
- *          hReport - handle to report module context that is used when we output debug messages
- *          CBFunc  - The callback to call upon transaction complete (calls the tasklet).
- *          CBArg   - The handle for the CBFunc.
- *
- * OUTPUT:  none.
- *
- * RETURNS: one of the error codes (0 => TI_OK)
- ****************************************************************************/
-void busDrv_Init (TI_HANDLE    hBusDrv, 
-                       TI_HANDLE    hReport)
-{
-    TBusDrvObj *pBusDrv = (TBusDrvObj*) hBusDrv;
-
-    
-
-    pBusDrv->hReport    = hReport;
-    
-
-    
-}
-
-
-
-
-
-
-/** 
- * \fn     busDrv_ConnectBus
- * \brief  Configure bus driver
- * 
- * Called by TxnQ.
- * Configure the bus driver with its connection configuration (such as baud-rate, bus width etc) 
- *     and establish the physical connection. 
- * Done once upon init (and not per functional driver startup). 
- * 
- * \note   
- * \param  hBusDrv    - The module's object
- * \param  pBusDrvCfg - A union used for per-bus specific configuration. 
- * \param  fCbFunc    - CB function for Async transaction completion (after all txn parts are completed).
- * \param  hCbArg     - The CB function handle
- * \return TI_OK / TI_NOK
- * \sa     
- */ 
-TI_STATUS busDrv_ConnectBus (TI_HANDLE        hBusDrv, 
-                             TBusDrvCfg       *pBusDrvCfg,
-                             TBusDrvTxnDoneCb fCbFunc,
-                             TI_HANDLE        hCbArg,
-                             TBusDrvTxnDoneCb fConnectCbFunc
-                             )
-{
-    TBusDrvObj *pBusDrv = (TBusDrvObj*)hBusDrv;
-    int         iStatus;
-    WSPIConfig_t wspi_config;
-    WSPI_CB_T cb;
-
-    /* Save the parameters (TxnQ callback for TxnDone events) */
-    pBusDrv->fTxnDoneCb    = fCbFunc;
-    pBusDrv->hCbHandle     = hCbArg;
-    pBusDrv->fTxnConnectDoneCb = fConnectCbFunc;
-   
-    /* Configure the WSPI driver parameters  */
-   
-    wspi_config.isFixedAddress = TI_FALSE;
-    wspi_config.fixedBusyLength = WSPI_FIXED_BUSY_LEN;
-    wspi_config.mask = WSPI_INIT_CMD_MASK;
-
-    cb.CBFunc = ConnectDone_CB;/* The BusTxn callback called upon Async transaction end. */
-    cb.CBArg  = hBusDrv;   /* The handle for the BusDrv. */
- 
-    /* Configure the WSPI module */
-    iStatus = WSPI_Configure(pBusDrv->hWspi, pBusDrv->hReport, &wspi_config, &cb);
-
-
-    if ((iStatus == 0) || (iStatus == 1)) 
-    {
-        TRACE1 (pBusDrv->hReport, REPORT_SEVERITY_INIT, "busDrv_ConnectBus: called Status %d\n",iStatus);
-
-    
-        TRACE2 (pBusDrv->hReport, REPORT_SEVERITY_INFORMATION, "busDrv_ConnectBus: Successful Status %d\n",iStatus);
-        return TI_OK;
-    }
-    else 
-    {
-        TRACE2(pBusDrv->hReport, REPORT_SEVERITY_ERROR, "busDrv_ConnectBus: Status = %d,\n", iStatus);
-        return TI_NOK;
-    }
-}
-/** 
- * \fn     busDrv_DisconnectBus
- * \brief  Disconnect SDIO driver
- * 
- * Called by TxnQ. Disconnect the SDIO driver.
- *  
- * \note   
- * \param  hBusDrv - The module's object
- * \return TI_OK / TI_NOK
- * \sa     
- */ 
-TI_STATUS   busDrv_DisconnectBus   (TI_HANDLE hBusDrv)
-{   
-    return TI_OK;
-}
-
-
-/** 
- * \fn     busDrv_Transact
- * \brief  Process transaction 
- * 
- * Called by the TxnQ module to initiate a new transaction.
- * Call either write or read functions according to Txn direction field.
- * 
- * \note   It's assumed that this function is called only when idle (i.e. previous Txn is done).
- * \param  hBusDrv - The module's object
- * \param  pTxn    - The transaction object 
- * \return COMPLETE if Txn completed in this context, PENDING if not, ERROR if failed
- * \sa     busDrv_PrepareTxnParts, busDrv_SendTxnParts
- */ 
-ETxnStatus busDrv_Transact (TI_HANDLE hBusDrv, TTxnStruct *pTxn)
-{
-    TBusDrvObj *pBusDrv = (TBusDrvObj*)hBusDrv;
-    WSPI_CB_T cb;
-    TI_UINT8 * tempReadBuff;
-    TI_UINT8 * tempWriteBuff; 
-    pBusDrv->pCurrTxn       = pTxn;
-    pBusDrv->eCurrTxnStatus = TXN_STATUS_COMPLETE;  /* The Txn is Sync as long as it continues in this context */
-    cb.CBFunc = asyncEnded_CB;  /* The BusTxn callback called upon Async transaction end. */
-    cb.CBArg  = hBusDrv;   /* The handle for the BusTxnCB. */
-  
-    /* If write command */
-    if (TXN_PARAM_GET_DIRECTION(pTxn) == TXN_DIRECTION_WRITE)
-    {
-
-        //WLAN_REPORT_INIT(pBusDrv->hReport, TNETW_DRV_MODULE_LOG,
-        //    ("busDrv_Transact:  Write to pTxn->uHwAddr %x\n", pTxn->uHwAddr ));
-    
-
-         /*WLAN_REPORT_ERROR(pBusDrv->hReport, BUS_DRV_MODULE_LOG,
-            ("busDrv_Transact: Buff= %x, Len=%d\n", pTxn->aBuf[0], pTxn->aLen[0]));*/
-        /*1.write memory*/
-          /* Decrease the data pointer to the beginning of the WSPI padding */
-          tempWriteBuff = pTxn->aBuf[0];
-          tempWriteBuff -= WSPI_PAD_LEN_WRITE;
-
-          /* Write the data to the WSPI in Aync mode (not completed in the current context). */
-          pBusDrv->eCurrTxnStatus = WSPI_WriteAsync(pBusDrv->hWspi, pTxn->uHwAddr,tempWriteBuff,pTxn->aLen[0], &cb, TI_TRUE, TI_TRUE,TXN_PARAM_GET_FIXED_ADDR(pTxn));      
-          
-    }
-
-    /* If read command */
-    else 
-    {
-        //WLAN_REPORT_INIT(pBusDrv->hReport, TNETW_DRV_MODULE_LOG,
-        //    ("busDrv_Transact:  Read from pTxn->uHwAddr %x pTxn %x \n", pTxn->uHwAddr,pTxn));
-
-        /*1. Read mem */
-         /* Decrease the tempReadBuff pointer to the beginning of the WSPI padding */
-        tempReadBuff = pTxn->aBuf[0];
-        tempReadBuff -= WSPI_PAD_LEN_READ;
-        /* Read the required data from the WSPI in Aync mode (not completed in the current context). */
-        pBusDrv->eCurrTxnStatus  = WSPI_ReadAsync(pBusDrv->hWspi, pTxn->uHwAddr,tempReadBuff,pTxn->aLen[0], &cb, TI_TRUE, TI_TRUE,TXN_PARAM_GET_FIXED_ADDR(pTxn));
-
-        
-    }
-
-    /* return transaction status - COMPLETE, PENDING or ERROR */
-    return (pBusDrv->eCurrTxnStatus == WSPI_TXN_COMPLETE ? TXN_STATUS_COMPLETE : 
-			(pBusDrv->eCurrTxnStatus == WSPI_TXN_PENDING ? TXN_STATUS_PENDING : TXN_STATUS_ERROR));
-
-    
-}
-
-
-/****************************************************************************
- *                      asyncEnded_CB()
- ****************************************************************************
- * DESCRIPTION:  
- *      Called back by the WSPI driver from Async transaction end interrupt (ISR context).
- *      Calls the upper layers callback.
- * 
- * INPUTS:  status -    
- * 
- * OUTPUT:  None
- * 
- * RETURNS: None
- ****************************************************************************/
-static void asyncEnded_CB(TI_HANDLE hBusDrv, int status)
-{   
-    TBusDrvObj *pBusDrv = (TBusDrvObj*)hBusDrv;
-    /* If the last transaction failed, call failure CB and exit. */
-    if (status != 0)
-    {
-        TRACE2(pBusDrv->hReport, REPORT_SEVERITY_ERROR, "asyncEnded_CB : Status = %d, fTxnDoneCb = 0x%x\n", status,pBusDrv->fTxnDoneCb);
-
-        TXN_PARAM_SET_STATUS(pBusDrv->pCurrTxn, TXN_PARAM_STATUS_ERROR);
-    }
-	else
-	{
-		TRACE2(pBusDrv->hReport, REPORT_SEVERITY_INFORMATION,"asyncEnded_CB: Successful async cb done pBusDrv->pCurrTxn %x\n", pBusDrv->pCurrTxn);
-	}
-
-    /* Call the upper layer CB */
-    
-    pBusDrv->fTxnDoneCb(pBusDrv->hCbHandle,pBusDrv->pCurrTxn);
-}
-
-
-/****************************************************************************
- *                      ConnectDone_CB()
- ****************************************************************************
- * DESCRIPTION:  
- *      Called back by the WSPI driver from Async transaction end interrupt (ISR context).
- *      Calls the upper layers callback.
- * 
- * INPUTS:  status -    
- * 
- * OUTPUT:  None
- * 
- * RETURNS: None
- ****************************************************************************/
-static void ConnectDone_CB(TI_HANDLE hBusDrv, int status)
-{   
-    TBusDrvObj *pBusDrv = (TBusDrvObj*)hBusDrv;
-    /* If the last transaction failed, call failure CB and exit. */
-    if (status != 0)
-    {
-        TRACE2(pBusDrv->hReport, REPORT_SEVERITY_ERROR, "ConnectDone_CB : Status = %d, fTxnConnectDoneCb = 0x%x\n", status,pBusDrv->fTxnConnectDoneCb);
-
-        TXN_PARAM_SET_STATUS(pBusDrv->pCurrTxn, TXN_PARAM_STATUS_ERROR);
-    }
-	else
-	{
-		TRACE1 (pBusDrv->hReport, REPORT_SEVERITY_INIT, "ConnectDone_CB: Successful Connect Async cb done \n");
-	}
-
-    /* Call the upper layer CB */
-    
-    pBusDrv->fTxnConnectDoneCb(pBusDrv->hCbHandle,pBusDrv->pCurrTxn);
-}
-
-
diff --git a/wl1271/config/Android.mk b/wl1271/config/Android.mk
deleted file mode 100644
index feed99a..0000000
--- a/wl1271/config/Android.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (C) 2008 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-LOCAL_PATH := $(call my-dir)
-
-########################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := tiwlan.ini
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/wifi
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
-include $(BUILD_PREBUILT)
-
-########################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := dhcpcd.conf
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/dhcpcd
-LOCAL_SRC_FILES := android_dhcpcd.conf
-include $(BUILD_PREBUILT)
-
-########################
-
-WIFI_DRIVER_SOCKET_IFACE := tiwlan0
-ifeq ($(strip $(WPA_SUPPLICANT_VERSION)),VER_0_6_X)
-  include external/wpa_supplicant_6/wpa_supplicant/wpa_supplicant_conf.mk
-else
-  include external/wpa_supplicant/wpa_supplicant_conf.mk
-endif
-
-########################
diff --git a/wl1271/config/android_dhcpcd.conf b/wl1271/config/android_dhcpcd.conf
deleted file mode 100644
index 5aa418d..0000000
--- a/wl1271/config/android_dhcpcd.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# dhcpcd configuration for Android Wi-Fi interface
-# See dhcpcd.conf(5) for details.
-
-interface tiwlan0
-# dhcpcd-run-hooks uses these options.
-option subnet_mask, routers, domain_name_servers
diff --git a/wl1271/config/tiwlan.ini b/wl1271/config/tiwlan.ini
deleted file mode 100644
index f959d86..0000000
--- a/wl1271/config/tiwlan.ini
+++ /dev/null
@@ -1,281 +0,0 @@
-# The letters in this file are case sensitive, use lower case only !!!
-
-SmeConnectMode = 1               #0 - auto, 1 - manual
-ScanResultAging = 0              # in Second - range 0..1000
-WME_Enable = 1                   #0=diable WME support / 1=Enable
-dot11NetworkType = 3             #2 - A only mode, 3 - B/G mode, 4 - A/G Dual mode
-SmeScanGChannelList = 1,2,3,4,5,6,7,8,9,10,11,12,13,14
-SmeScanAChannelList = 36,40,44,48,52,56,60,64
-RecoveryEnable = 1               #0 -Disabled 1- Enabled
-BThWlanCoexistEnable = 1         #0 - SG disable, 1 - SG protective
-TxAggregationPktsLimit = 0       # Disable Tx packets aggregation for Linux (degrades TP)
-
-#
-# Power Manager
-#
-BeaconListenInterval = 1        # the number of N-Beacon or N-DTim
-DtimListenInterval = 1          #
-
-ReAuthActivePriority = 0
-
-dot11PowerMode = 0              #0 - Auto
-                                #1 - Active
-                                #2 - Short Doze
-                                #3 - Long Doze
-                    
-PowerMgmtHangOverPeriod = 10    #in mSec units 
-
-AutoPowerModeDozeMode = 3       #2 - Short Doze
-                                #3 - Long Doze
-
-AutoPowerModeActiveTh = 2       #packets per second (default 15)
-
-AutoPowerModeDozeTh = 4         #packets per seconds - threshold for entering ELP in Auto mode (default 8)
-
-defaultPowerLevel = 0   #0 - ELP
-                        #1 - PD
-                        #2 - AWAKE
-
-PowerSavePowerLevel = 0 #0 - ELP
-                        #1 - PD
-                        #2 - AWAKE
-
-DcoItrimEnabled = 0  # 0 - Disabled  1 - Enabled
-DcoItrimModerationTimeout = 50000
-
-TxPower = 205           #set Default Tx Power Level in DBM * 10
-dot11FragmentationThreshold = 4096
-dot11RTSThreshold = 4096
-WPAMixedMode= 1
-RSNPreAuthentication = 1
-
-CalibrationChannel24 = 7
-CalibrationChannel5 = 36
-
-# Regulatury Domain tables. 
-# Each byte correlates to one channel in sequential order.  Table 2.4 starts from channel 1, Table 5.0 starts from channel 36.
-# Bits 0..4 - Max power allowed in Dbm.
-# Bit 6 - Channel is allowed for Active scan
-# BIt 7 - Channel is allowed
-AllowedChannelsTable24 = FFFFFFFFFFFFFFFFFFFFFFFFFFFF
-AllowedChannelsTable5 = FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000000000000000000000000000000000000000000000000000000000000000000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000000000000000FF000000FF000000FF000000FF000000FF000000000000000000000000000000
-
-SpectrumManagement = 0          # 0 - Disable 802.11h, 1 - Enable
-
-RxBroadcastInPs = 1
-
-#arp ip filter - must be written 8 characters for example 10.2.43.3 -> 0a 02 2b 21 and not a 2 2b 21
-ArpIp_Addr = 0a 02 0a b7
-ArpIp_Filter_ena = 0
-
-
-#mac filter
-Mac_Filter_Enabled = 0
-numGroupAddrs = 4
-Group_addr0 = 10 01 02 03 04 05
-Group_addr1 = 11 11 12 13 14 15
-Group_addr2 = 12 21 22 23 24 25
-Group_addr3 = 13 31 32 33 34 35
-Group_addr4 = 14 41 42 43 44 45
-Group_addr5 = 15 51 52 53 54 55
-Group_addr6 = 16 61 62 63 64 65
-Group_addr7 = 17 71 72 73 74 75
-
-#beacon filter
-Beacon_Filter_Desired_State = 1
-Beacon_Filter_Stored = 1
-
-#beacon IE table
-#the size is the len of the string - spaces = number of bytes
-Beacon_IE_Num_Of_Elem = 16
-Beacon_IE_Table_Size = 37
-Beacon_IE_Table = 00 01 01 01 32 01 2a 01 03 01 06 01 07 01 20 01 25 01 23 01 30 01 28 01 2e 01 3d 01 85 01 dd 01 00 52 f2 02 00 01
-
-#Rate adaptation
-RateContThreshold       = 10
-RateStepUpThreshold     = 2
-FBShortInterval         = 40
-FBLongInterval          = 200
-RateAdaptationTimeout   = 300
-
-# rate policy - short / long retries
-RatePolicyUserShortRetryLimit   = 10
-RatePolicyUserLongRetryLimit    = 10
-
-#rate policies 
-#rates guide: -->>mcs7,msc6,mcs5,mcs4,mcs3,mcs2,mcs1,mcs0,54,58,36,24,22,18,12,11,9,6,5.5,2,1
-
-
-OsDbgState = 0x01e9003c         # -1 or 0xffffffff -all (opens debug messages in o.s. only - sevirity+modules)
-
-#############################################################
-#   Configure the severity table (0 = Disable/ 1 = Enable)
-#
-#   Byte #0: Init
-#   Byte #1: Information
-#   Byte #2: Warning
-#   Byte #3: Error
-#   Byte #4: Fatal Error
-#   Byte #5: SM
-#   Byte #6: Console
-#############################################################
-
-# LAUNCH Logging Mask
-ReportSeverityTable = 0000000
-# Default Logging Mask
-# ReportSeverityTable = 0001101
-
-BeaconReceiveTime = 50
-
-#
-# Mem blocks
-#
-RxMemBlksNum = 50
-QOS_txBlksThresholdBE = 20
-QOS_txBlksThresholdVI = 20
-QOS_txBlksThresholdVO = 20
-
-#
-# QOS UPSD
-#
-
-desiredPsMode       = 1          # Global Power save delivery protocol (1 - UPSD, 0 - Legacy)
-QOS_wmePsModeBE     = 1          # Power save delivery protocol for BE AC (1 - UPSD, 0 - Legacy)
-QOS_wmePsModeBK     = 1          # Power save delivery protocol for BK AC (1 - UPSD, 0 - Legacy)
-QOS_wmePsModeVI     = 1          # Power save delivery protocol for VI AC (1 - UPSD, 0 - Legacy)
-QOS_wmePsModeVO     = 1          # Power save delivery protocol for VO AC (1 - UPSD, 0 - Legacy)
-
-#
-# QOS Classifier
-#
-Clsfr_Type = 1                  # 1 - DSCP, 2 - Port, 3 - IP+port
-
-
-NumOfCodePoints = 4
-DSCPClassifier00_CodePoint = 0                #Best Effort          
-DSCPClassifier00_DTag = 0
-
-DSCPClassifier01_CodePoint = 8                #Background
-DSCPClassifier01_DTag = 1
-
-DSCPClassifier02_CodePoint = 40               #Video
-DSCPClassifier02_DTag = 5
-
-DSCPClassifier03_CodePoint = 56               #Voice
-DSCPClassifier03_DTag = 6
-
-dot11MaxReceiveLifetime=512000
-FracOfLifeTimeToDrop = 50
-
-WiFiAdhoc = 0
-WiFiWmmPS = 0	# Use 1 on WiFi test in order to configure PS to work in WMM mode 
-
-EarlyWakeUp = 1     # 0 - Disable , 1 - Enable
-
-TxEnergyDetection = 0	# Use 1 for enabling
-
-TriggeredScanTimeOut = 50000 # Maximum time in Us between 2 channels on triggered scan
-# PsPoll delivery failure solution
-PsPollDeliveryFailureRecoveryPeriod = 20		# Time in Ms to stay ACTIVE ('0' to disable feature)
-ConsecutivePsPollDeliveryFailureThreshold = 4   # Number of failed PsPoll's to start ACTIVE time out
-
-
-# Weights in percent for RSSI/SNR Average calculations
-RssiBeaconAverageWeight = 20
-RssiPacketAverageWeight = 10
-SnrBeaconAverageWeight = 20
-SnrPacketAverageWeight = 10
-
-HT_Enable=1                     #0=diable 802.11n support / 1=Enable
-IbssProtectionType = 1          # 0 = CTS protaction disable ; 1 = Standard CTS protaction
-BurstModeEnable = 0             # 0 - Disabled  1 - Enabled
-RoamScanEnable = 0              # 1- roaming and immidate scan enable by deafult 0- allowing roaming & scannig due to CLI confguration
-RoamingOperationalMode = 1      # 0=Manual , 1=Auto
-RSNExternalMode = 0             # 0=Internal , 1=External
-SendTspecInReassPkt = 0 # 0=do not send, 1=send
-
-
-FmCoexuSwallowPeriod = 5
-FmCoexuNDividerFrefSet2 = 12
-FmCoexuMDividerFrefSet2 = 148
-
-BaPolicyTid_0 = 3
-
-
-##############################################################################################################################
-################################################## Radio parameters data - Start ############################################# 
-##############################################################################################################################
-
-################################ General parameters ################################
-STRFRefClock = 9                # Unit: Options 5'bXX000 : Bit 0,1,2 - (0: 19.2MHz; 1: 26MHz; 2: 38.4MHz  (Default); 3: 52MHz;  4: 38.4MHz XTAL) ;
-                                # 5'bX0XXX : Bit 3 - CLK_REQ type;  0 = wired-OR (Default) , 1= push-pull
-                                # 5'b0XXXX : Bit 4 - CLK_REQ polarity; 0 = Normal (Default) , 1=Inverted, Format: Unsigned, Source: Customer
-STRFRefClockSettingTime = 5
-TXBiPFEMAutoDetect = 0          # Unit: Options (0: Manual Mode; 1: Automatic mode), Format: Unsigned, Source: Customer
-TXBiPFEMManufacturer = 1        # Unit: Options (0: RFMD; 1: Triquint), Format: Unsigned, Source: Customer
-ClockValidOnWakeup = 0
-DC2DCMode = 0                   # Unit: Options (0: btSPI is not used; 1: mux DC2DC mode to BT_FUNC2), Format: Unsigned, Source: Customer
-Single_Dual_Band_Solution = 0   # Unit: Options (0: Single band. 2.4GHz only; 1: Dual band = 2.4GHz and 5GHz solution), Format: Unsigned, Source: Customer
-Settings  = 65                  #  0x41 Unit: Options (Bit0: NBI (0: Off; 1: On), Bit1: Telec channel 14 (0: Off; 1: On), Format: Unsigned, Source: Customer
-                                # Bit2: FEM0-LB, Bit3: FEM0-HB, Bit4: FEM1-LB, Bit5: FEM1-HB - TX BiP load (0: Internal; 1: External), 
-                                # Bit6: LPD Low band, Bit7: LPD High band
-
-# Smart Reflex params
-SRState = 0                                 # Unit: Options ( 1 - Enabled     0- Disabled) Format: Decimal, Source: TI
-SRF1 = 07,03,18,10,05,fb,f0,e8, 0,0,0,0,0,0,0f,3f  # Unit: SRF1 values, Format: Signed, Source: TI
-SRF2 = 07,03,18,10,05,f6,f0,e8              # Unit: SRF2 values, Format: Signed, Source: TI
-SRF3 = 07,03,18,10,05,fb,f0,e8              # Unit: SRF3 values, Format: Signed, Source: TI
-
-################################ FEM dependents parameters #######################################
-###################### FEM1 parameters ######################
-
-# (for Single bend 2.4G parameters FEM1 (TQS 2.5) HDK20)
-
-RxTraceInsertionLoss_2_4G = 0
-TXTraceLoss_2_4G  = 0
-RxRssiAndProcessCompensation_2_4G = ec,f6,00,0c,18,f8,fc,00,08,10,f0,f8,00,0a,14
-TXBiPReferencePDvoltage_2_4G = 375  # 0x177
-TxBiPReferencePower_2_4G = 128      # 0x80
-TxBiPOffsetdB_2_4G = 0
-TxPerRatePowerLimits_2_4G_Normal = 1d, 1f, 22, 26, 28, 29
-TxPerRatePowerLimits_2_4G_Degraded = 1a, 1f, 22, 24, 26, 28
-TxPerRatePowerLimits_2_4G_Extreme = 16, 1d, 1e, 20, 24, 25 # Unit: 1/2dB, Format: Signed, Source: Customer
-DegradedLowToNormalThr_2_4G = 30 # 0x1e Unit: 1/10 volts, Format: Unsigned, Source: TI
-NormalToDegradedHighThr_2_4G = 45 # 0x2d Unit: 1/10 volts, Format: Unsigned, Source: TI
-TxPerChannelPowerLimits_2_4G_11b = 50,50,50,50,50,50,50,50,50,50,50,50,50,50
-TxPerChannelPowerLimits_2_4G_OFDM = 50,50,50,50,50,50,50,50,50,50,50,50,50,50
-TxPDVsRateOffsets_2_4G = 01,02,02,02,02,00
-TxIbiasTable_2_4G = 11,11,15,11,15,0f
-RxFemInsertionLoss_2_4G  = 14  # 0x0e
-
-
-###################### FEM0 parameters #########################
-
-# (for Single bend 2.4G parameters FEM0 (RFMD 3.0) HDK20)
-
-#RxTraceInsertionLoss_2_4G = 0
-#TXTraceLoss_2_4G = 0
-#RxRssiAndProcessCompensation_2_4G  = ec,f6,00,0c,18,f8,fc,00,08,10,f0,f8,00,0a,14
-#TXBiPReferencePDvoltage_2_4G = 356 # 0x0164 
-#TxBiPReferencePower_2_4G  = 128 # 0x80 
-#TxBiPOffsetdB_2_4G = 0 
-#TxPerRatePowerLimits_2_4G_Normal = 1c,1f,22,24,28,29
-#TxPerRatePowerLimits_2_4G_Degraded = 19,1f,22,23,27,28
-#TxPerRatePowerLimits_2_4G_Extreme = 50,50,50,50,50,50 # Unit: 1/2dB, Format: Signed, Source: Customer
-#DegradedLowToNormalThr_2_4G = 30 # 1e Unit: 1/10 volts, Format: Unsigned, Source: TI
-#NormalToDegradedHighThr_2_4G = 45 # 2d Unit: 1/10 volts, Format: Unsigned, Source: TI 
-#TxPerChannelPowerLimits_2_4G_11b = 50,50,50,50,50,50,50,50,50,50,50,50,50,50
-#TxPerChannelPowerLimits_2_4G_OFDM = 50,50,50,50,50,50,50,50,50,50,50,50,50,50
-#TxPDVsRateOffsets_2_4G = 01,02,02,02,02,00
-#TxIbiasTable_2_4G  = 1a,1a,1a,1a,1a,21
-#RxFemInsertionLoss_2_4G  = 16 # 0x10
-
-##############################################################################################################################
-################################################## Radio parameters data - End ###############################################
-##############################################################################################################################
-
-
-
-
-
-
diff --git a/wl1271/external_drivers/sdio/linux/SdioDrv.c b/wl1271/external_drivers/sdio/linux/SdioDrv.c
deleted file mode 100644
index 171c0a6..0000000
--- a/wl1271/external_drivers/sdio/linux/SdioDrv.c
+++ /dev/null
@@ -1,1350 +0,0 @@
-/*
- * SdioDrv.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *  * Neither the name Texas Instruments nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/version.h>
-#include <linux/moduleparam.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
-#include <linux/slab.h>
-#include <linux/types.h>
-#include <linux/dma-mapping.h>
-#include <linux/platform_device.h>
-#include <linux/i2c/twl4030.h>
-#include <linux/errno.h>
-#include <linux/clk.h>
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 31))
-#include <plat/hardware.h>
-#include <plat/board.h>
-#include <plat/clock.h>
-#include <plat/dma.h>
-#include <plat/io.h>
-#include <plat/resource.h>
-#define IO_ADDRESS(pa)	OMAP2_L4_IO_ADDRESS(pa)
-#else
-#include <mach/hardware.h>
-#include <mach/board.h>
-#include <mach/clock.h>
-#include <mach/dma.h>
-#include <mach/io.h>
-#include <mach/resource.h>
-#endif
-typedef void *TI_HANDLE;
-#include "host_platform.h"
-#include "SdioDrvDbg.h"
-#include "SdioDrv.h"
-
-/* #define TI_SDIO_DEBUG */
-
-#ifndef CONFIG_MMC_EMBEDDED_SDIO
-
-#define SDIOWQ_NAME			"sdio_wq"
-
-/*
- * HSMMC Address and DMA Settings
- */
-static unsigned long TIWLAN_MMC_CONTROLLER = 2; /* MMC3 */
-static unsigned long TIWLAN_MMC_CONTROLLER_BASE_ADDR = OMAP_HSMMC3_BASE;
-#define TIWLAN_MMC_CONTROLLER_BASE_SIZE	512
-#define TIWLAN_MMC_MAX_DMA		8192
-static unsigned long TIWLAN_MMC_DMA_TX = OMAP34XX_DMA_MMC3_TX;
-static unsigned long TIWLAN_MMC_DMA_RX = OMAP34XX_DMA_MMC3_RX;
-static unsigned long OMAP_MMC_IRQ = INT_MMC3_IRQ;
-
-#define OMAP_MMC_MASTER_CLOCK          96000000
-/*
- *  HSMMC Host Controller Registers
- */
-#define OMAP_HSMMC_SYSCONFIG           0x0010
-#define OMAP_HSMMC_SYSSTATUS           0x0014
-#define OMAP_HSMMC_CSRE                0x0024
-#define OMAP_HSMMC_SYSTEST             0x0028
-#define OMAP_HSMMC_CON                 0x002C
-#define OMAP_HSMMC_BLK                 0x0104
-#define OMAP_HSMMC_ARG                 0x0108
-#define OMAP_HSMMC_CMD                 0x010C
-#define OMAP_HSMMC_RSP10               0x0110
-#define OMAP_HSMMC_RSP32               0x0114
-#define OMAP_HSMMC_RSP54               0x0118
-#define OMAP_HSMMC_RSP76               0x011C
-#define OMAP_HSMMC_DATA                0x0120
-#define OMAP_HSMMC_PSTATE              0x0124
-#define OMAP_HSMMC_HCTL                0x0128
-#define OMAP_HSMMC_SYSCTL              0x012C
-#define OMAP_HSMMC_STAT                0x0130
-#define OMAP_HSMMC_IE                  0x0134
-#define OMAP_HSMMC_ISE                 0x0138
-#define OMAP_HSMMC_AC12                0x013C
-#define OMAP_HSMMC_CAPA                0x0140
-#define OMAP_HSMMC_CUR_CAPA            0x0148
-#define OMAP_HSMMC_REV                 0x01FC
-
-#define VS18                           (1 << 26)
-#define VS30                           (1 << 25)
-#define SRA                            (1 << 24)
-#define SDVS18                         (0x5 << 9)
-#define SDVS30                         (0x6 << 9)
-#define SDVSCLR                        0xFFFFF1FF
-#define SDVSDET                        0x00000400
-#define SIDLE_MODE                     (0x2 << 3)
-#define AUTOIDLE                       0x1
-#define SDBP                           (1 << 8)
-#define DTO                            0xE
-#define ICE                            0x1
-#define ICS                            0x2
-#define CEN                            (1 << 2)
-#define CLKD_MASK                      0x0000FFC0
-#define IE_EN_MASK                     0x317F0137
-#define INIT_STREAM                    (1 << 1)
-#define DP_SELECT                      (1 << 21)
-#define DDIR                           (1 << 4)
-#define DMA_EN                         0x1
-#define MSBS                           (1 << 5)
-#define BCE                            (1 << 1)
-#define ONE_BIT                        (~(0x2))
-#define EIGHT_BIT                      (~(0x20))
-#define CC                             0x1
-#define TC                             0x02
-#define OD                             0x1
-#define BRW                            0x400
-#define BRR                            0x800
-#define BRE                            (1 << 11)
-#define BWE                            (1 << 10)
-#define SBGR                           (1 << 16)
-#define CT                             (1 << 17)
-#define SDIO_READ                      (1 << 31)
-#define SDIO_BLKMODE                   (1 << 27)
-#define OMAP_HSMMC_ERR                 (1 << 15)  /* Any error */
-#define OMAP_HSMMC_CMD_TIMEOUT         (1 << 16)  /* Com mand response time-out */
-#define OMAP_HSMMC_DATA_TIMEOUT        (1 << 20)  /* Data response time-out */
-#define OMAP_HSMMC_CMD_CRC             (1 << 17)  /* Command CRC error */
-#define OMAP_HSMMC_DATA_CRC            (1 << 21)  /* Date CRC error */
-#define OMAP_HSMMC_CARD_ERR            (1 << 28)  /* Card ERR */
-#define OMAP_HSMMC_STAT_CLEAR          0xFFFFFFFF
-#define INIT_STREAM_CMD                0x00000000
-#define INT_CLEAR                      0x00000000
-#define BLK_CLEAR                      0x00000000
-
-/* SCM CONTROL_DEVCONF1 MMC1 overwrite but */
-
-#define MMC1_ACTIVE_OVERWRITE          (1 << 31)
-
-#define sdio_blkmode_regaddr           0x2000
-#define sdio_blkmode_mask              0xFF00
-
-#define IO_RW_DIRECT_MASK              0xF000FF00
-#define IO_RW_DIRECT_ARG_MASK          0x80001A00
-
-#define RMASK                          (MMC_RSP_MASK | MMC_RSP_CRC)
-#define MMC_TIMEOUT_MS                 100 /*on the new 2430 it was 20, i changed back to 100*//* obc */
-#define MMCA_VSN_4                     4
-
-#define VMMC1_DEV_GRP                  0x27
-#define P1_DEV_GRP                     0x20
-#define VMMC1_DEDICATED                0x2A
-#define VSEL_3V                        0x02
-#define VSEL_18V                       0x00
-#define PBIAS_3V                       0x03
-#define PBIAS_18V                      0x02
-#define PBIAS_LITE                     0x04A0
-#define PBIAS_CLR                      0x00
-
-#define OMAP_MMC_REGS_BASE             IO_ADDRESS(TIWLAN_MMC_CONTROLLER_BASE_ADDR)
-
-/*
- * MMC Host controller read/write API's.
- */
-#define OMAP_HSMMC_READ_OFFSET(offset) (__raw_readl((OMAP_MMC_REGS_BASE) + (offset)))
-#define OMAP_HSMMC_READ(reg)           (__raw_readl((OMAP_MMC_REGS_BASE) + OMAP_HSMMC_##reg))
-#define OMAP_HSMMC_WRITE(reg, val)     (__raw_writel((val), (OMAP_MMC_REGS_BASE) + OMAP_HSMMC_##reg))
-
-#define OMAP_HSMMC_SEND_COMMAND(cmd, arg) do \
-{ \
-	OMAP_HSMMC_WRITE(ARG, arg); \
-	OMAP_HSMMC_WRITE(CMD, cmd); \
-} while (0)
-
-#define OMAP_HSMMC_CMD52_WRITE     ((SD_IO_RW_DIRECT    << 24) | (OMAP_HSMMC_CMD_SHORT_RESPONSE << 16))
-#define OMAP_HSMMC_CMD52_READ      (((SD_IO_RW_DIRECT   << 24) | (OMAP_HSMMC_CMD_SHORT_RESPONSE << 16)) | DDIR)
-#define OMAP_HSMMC_CMD53_WRITE     (((SD_IO_RW_EXTENDED << 24) | (OMAP_HSMMC_CMD_SHORT_RESPONSE << 16)) | DP_SELECT)
-#define OMAP_HSMMC_CMD53_READ      (((SD_IO_RW_EXTENDED << 24) | (OMAP_HSMMC_CMD_SHORT_RESPONSE << 16)) | DP_SELECT | DDIR)
-#define OMAP_HSMMC_CMD53_READ_DMA  (OMAP_HSMMC_CMD53_READ  | DMA_EN)
-#define OMAP_HSMMC_CMD53_WRITE_DMA (OMAP_HSMMC_CMD53_WRITE | DMA_EN)
-
-/* Macros to build commands 52 and 53 in format according to SDIO spec */
-#define SDIO_CMD52_READ(v1,v2,v3,v4)        (SDIO_RWFLAG(v1)|SDIO_FUNCN(v2)|SDIO_RAWFLAG(v3)| SDIO_ADDRREG(v4))
-#define SDIO_CMD52_WRITE(v1,v2,v3,v4,v5)    (SDIO_RWFLAG(v1)|SDIO_FUNCN(v2)|SDIO_RAWFLAG(v3)| SDIO_ADDRREG(v4)|(v5))
-#define SDIO_CMD53_READ(v1,v2,v3,v4,v5,v6)  (SDIO_RWFLAG(v1)|SDIO_FUNCN(v2)|SDIO_BLKM(v3)| SDIO_OPCODE(v4)|SDIO_ADDRREG(v5)|(v6&0x1ff))
-#define SDIO_CMD53_WRITE(v1,v2,v3,v4,v5,v6) (SDIO_RWFLAG(v1)|SDIO_FUNCN(v2)|SDIO_BLKM(v3)| SDIO_OPCODE(v4)|SDIO_ADDRREG(v5)|(v6&0x1ff))
-
-#define SDIODRV_MAX_LOOPS	50000
-
-#define VMMC2_DEV_GRP		0x2B
-#define VMMC2_DEDICATED		0x2E
-#define VSEL_S2_18V		0x05
-#define LDO_CLR			0x00
-#define VSEL_S2_CLR		0x40
-#define GPIO_0_BIT_POS		1 << 0
-#define GPIO_1_BIT_POS		1 << 1
-#define VSIM_DEV_GRP		0x37
-#define VSIM_DEDICATED		0x3A
-#define TWL4030_MODULE_PM_RECIEVER	0x13
-
-typedef struct OMAP3430_sdiodrv
-{
-	struct clk    *fclk, *iclk, *dbclk;
-	int           ifclks_enabled;
-	spinlock_t    clk_lock;	
-	int           dma_tx_channel;
-	int           dma_rx_channel;
-	int           irq;
-	void          (*BusTxnCB)(void* BusTxnHandle, int status);
-	void*         BusTxnHandle;
-	unsigned int  uBlkSize;
-	unsigned int  uBlkSizeShift;
-	int           async_status;
-	int (*wlanDrvIf_pm_resume)(void);
-	int (*wlanDrvIf_pm_suspend)(void);
-	struct device *dev;
-	dma_addr_t dma_read_addr;
-	size_t dma_read_size;
-	dma_addr_t dma_write_addr;
-	size_t dma_write_size;
-	struct workqueue_struct *sdio_wq; /* Work Queue */
-	struct work_struct sdiodrv_work;
-	struct timer_list inact_timer;
-	int inact_timer_running;
-} OMAP3430_sdiodrv_t;
-
-struct omap_hsmmc_regs {
-        u32 hctl;
-        u32 capa;
-        u32 sysconfig;
-        u32 ise;
-        u32 ie;
-        u32 con;
-        u32 sysctl;
-};
-static struct omap_hsmmc_regs hsmmc_ctx;
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 31))
-static struct platform_device dummy_pdev = {
-	.dev = {
-		.bus = &platform_bus_type,
-	},
-};
-#endif
-
-#define SDIO_DRIVER_NAME 			"TIWLAN_SDIO"
-
-module_param(g_sdio_debug_level, int, 0644);
-MODULE_PARM_DESC(g_sdio_debug_level, "debug level");
-int g_sdio_debug_level = SDIO_DEBUGLEVEL_ERR;
-EXPORT_SYMBOL(g_sdio_debug_level);
-
-OMAP3430_sdiodrv_t g_drv;
-
-static int sdiodrv_irq_requested = 0;
-static int sdiodrv_iclk_got = 0;
-static int sdiodrv_fclk_got = 0;
-
-static void sdioDrv_hsmmc_save_ctx(void);
-static void sdioDrv_hsmmc_restore_ctx(void);
-static void sdiodrv_dma_shutdown(void);
-static void sdioDrv_inact_timer(unsigned long);
-
-#ifndef TI_SDIO_STANDALONE
-void sdio_init( int sdcnum )
-{
-	if( sdcnum <= 0 )
-		return;
-	TIWLAN_MMC_CONTROLLER = sdcnum - 1;
-	if( sdcnum == 2 ) {
-		TIWLAN_MMC_CONTROLLER_BASE_ADDR = OMAP_HSMMC2_BASE;
-		TIWLAN_MMC_DMA_TX = OMAP24XX_DMA_MMC2_TX;
-		TIWLAN_MMC_DMA_RX = OMAP24XX_DMA_MMC2_RX;
-		OMAP_MMC_IRQ = INT_MMC2_IRQ;
-	}
-	else if( sdcnum == 3 ) {
-		TIWLAN_MMC_CONTROLLER_BASE_ADDR	= OMAP_HSMMC3_BASE;
-		TIWLAN_MMC_DMA_TX = OMAP34XX_DMA_MMC3_TX;
-		TIWLAN_MMC_DMA_RX = OMAP34XX_DMA_MMC3_RX;
-		OMAP_MMC_IRQ = INT_MMC3_IRQ;
-	}
-}
-#endif
-
-static void sdioDrv_hsmmc_save_ctx(void)
-{
-	/* MMC : context save */
-	hsmmc_ctx.hctl = OMAP_HSMMC_READ(HCTL);
-	hsmmc_ctx.capa = OMAP_HSMMC_READ(CAPA);
-	hsmmc_ctx.sysconfig = OMAP_HSMMC_READ(SYSCONFIG);
-	hsmmc_ctx.ise = OMAP_HSMMC_READ(ISE);
-	hsmmc_ctx.ie = OMAP_HSMMC_READ(IE);
-	hsmmc_ctx.con = OMAP_HSMMC_READ(CON);
-	hsmmc_ctx.sysctl = OMAP_HSMMC_READ(SYSCTL);
-	OMAP_HSMMC_WRITE(ISE, 0);
-	OMAP_HSMMC_WRITE(IE, 0);
-}
-
-static void sdioDrv_hsmmc_restore_ctx(void)
-{
-        /* MMC : context restore */
-        OMAP_HSMMC_WRITE(HCTL, hsmmc_ctx.hctl);
-        OMAP_HSMMC_WRITE(CAPA, hsmmc_ctx.capa);
-        OMAP_HSMMC_WRITE(SYSCONFIG, hsmmc_ctx.sysconfig);
-        OMAP_HSMMC_WRITE(CON, hsmmc_ctx.con);
-        OMAP_HSMMC_WRITE(ISE, hsmmc_ctx.ise);
-        OMAP_HSMMC_WRITE(IE, hsmmc_ctx.ie);
-        OMAP_HSMMC_WRITE(SYSCTL, hsmmc_ctx.sysctl);
-        OMAP_HSMMC_WRITE(HCTL, OMAP_HSMMC_READ(HCTL) | SDBP);
-}
-
-static void sdioDrv_inact_timer(unsigned long data)
-{
-	sdioDrv_clk_disable();
-	g_drv.inact_timer_running = 0;
-}
-
-void sdioDrv_start_inact_timer(void)
-{
-	mod_timer(&g_drv.inact_timer, jiffies + msecs_to_jiffies(1000));
-	g_drv.inact_timer_running = 1;
-}
-
-void sdioDrv_cancel_inact_timer(void)
-{
-	if(g_drv.inact_timer_running) {
-		del_timer_sync(&g_drv.inact_timer);
-		g_drv.inact_timer_running = 0;
-	}
-}
-
-void sdiodrv_task(struct work_struct *unused)
-{
-	PDEBUG("sdiodrv_tasklet()\n");
-
-	if (g_drv.dma_read_addr != 0) {
-		dma_unmap_single(g_drv.dev, g_drv.dma_read_addr, g_drv.dma_read_size, DMA_FROM_DEVICE);
-		g_drv.dma_read_addr = 0;
-		g_drv.dma_read_size = 0;
-	}
-	
-	if (g_drv.dma_write_addr != 0) {
-		dma_unmap_single(g_drv.dev, g_drv.dma_write_addr, g_drv.dma_write_size, DMA_TO_DEVICE);
-		g_drv.dma_write_addr = 0;
-		g_drv.dma_write_size = 0;
-	}
-
-	if (g_drv.BusTxnCB != NULL) {
-		g_drv.BusTxnCB(g_drv.BusTxnHandle, g_drv.async_status);
-	}
-}
-
-irqreturn_t sdiodrv_irq(int irq, void *drv)
-{
-	int status;
-
-	PDEBUG("sdiodrv_irq()\n");
-
-	status = OMAP_HSMMC_READ(STAT);
-	OMAP_HSMMC_WRITE(ISE, 0);
-	g_drv.async_status = status & (OMAP_HSMMC_ERR);
-	if (g_drv.async_status) {
-		PERR("sdiodrv_irq: ERROR in STAT = 0x%x\n", status);
-	}
-	queue_work(g_drv.sdio_wq, &g_drv.sdiodrv_work);
-	return IRQ_HANDLED;
-}
-
-void sdiodrv_dma_read_cb(int lch, u16 ch_status, void *data)
-{
-	PDEBUG("sdiodrv_dma_read_cb() channel=%d status=0x%x\n", lch, (int)ch_status);
-
-	g_drv.async_status = ch_status & (1 << 7);
-
-	queue_work(g_drv.sdio_wq, &g_drv.sdiodrv_work);
-	sdiodrv_dma_shutdown();
-}
-
-void sdiodrv_dma_write_cb(int lch, u16 ch_status, void *data)
-{
-	sdiodrv_dma_shutdown();
-}
-
-int sdiodrv_dma_init(void)
-{
-	int rc;
-
-	rc = omap_request_dma(TIWLAN_MMC_DMA_TX, "SDIO WRITE", sdiodrv_dma_write_cb, &g_drv, &g_drv.dma_tx_channel);
-	if (rc != 0) {
-		PERR("sdiodrv_dma_init() omap_request_dma(TIWLAN_MMC_DMA_TX) FAILED\n");
-		goto out;
-	}
-
-	rc = omap_request_dma(TIWLAN_MMC_DMA_RX, "SDIO READ", sdiodrv_dma_read_cb, &g_drv, &g_drv.dma_rx_channel);
-	if (rc != 0) {
-		PERR("sdiodrv_dma_init() omap_request_dma(TIWLAN_MMC_DMA_RX) FAILED\n");
-		goto freetx;
-	}
-
-	omap_set_dma_src_params(g_drv.dma_rx_channel,
-  							0,			// src_port is only for OMAP1
-  							OMAP_DMA_AMODE_CONSTANT,
-  							(TIWLAN_MMC_CONTROLLER_BASE_ADDR) + OMAP_HSMMC_DATA, 0, 0);
-  
-	omap_set_dma_dest_params(g_drv.dma_tx_channel,
-							0,			// dest_port is only for OMAP1
-  	  						OMAP_DMA_AMODE_CONSTANT,
-  	  						(TIWLAN_MMC_CONTROLLER_BASE_ADDR) + OMAP_HSMMC_DATA, 0, 0);
-
-	return 0;
-
-freetx:
-	omap_free_dma(g_drv.dma_tx_channel);
-out:
-	return rc;
-}
-
-static void sdiodrv_dma_shutdown(void)
-{
-	omap_free_dma(g_drv.dma_tx_channel);
-	omap_free_dma(g_drv.dma_rx_channel);
-} /* sdiodrv_dma_shutdown() */
-
-static u32 sdiodrv_poll_status(u32 reg_offset, u32 stat, unsigned int msecs)
-{
-	u32 status=0, loops=0;
-
-	do
-	{
-		status = OMAP_HSMMC_READ_OFFSET(reg_offset);
-		if(( status & stat))
-		{
-			break;
-		}
-	} while (loops++ < SDIODRV_MAX_LOOPS);
-
-	return status;
-} /* sdiodrv_poll_status */
-
-void dumpreg(void)
-{
-	printk(KERN_ERR "\n MMCHS_SYSCONFIG   for mmc3 = %x  ", omap_readl( 0x480AD010 ));
-	printk(KERN_ERR "\n MMCHS_SYSSTATUS   for mmc3 = %x  ", omap_readl( 0x480AD014 ));
-	printk(KERN_ERR "\n MMCHS_CSRE	      for mmc3 = %x  ", omap_readl( 0x480AD024 ));
-	printk(KERN_ERR "\n MMCHS_SYSTEST     for mmc3 = %x  ", omap_readl( 0x480AD028 ));
-	printk(KERN_ERR "\n MMCHS_CON         for mmc3 = %x  ", omap_readl( 0x480AD02C ));
-	printk(KERN_ERR "\n MMCHS_PWCNT       for mmc3 = %x  ", omap_readl( 0x480AD030 ));
-	printk(KERN_ERR "\n MMCHS_BLK         for mmc3 = %x  ", omap_readl( 0x480AD104 ));
-	printk(KERN_ERR "\n MMCHS_ARG         for mmc3 = %x  ", omap_readl( 0x480AD108 ));
-	printk(KERN_ERR "\n MMCHS_CMD         for mmc3 = %x  ", omap_readl( 0x480AD10C ));
-	printk(KERN_ERR "\n MMCHS_RSP10       for mmc3 = %x  ", omap_readl( 0x480AD110 ));
-	printk(KERN_ERR "\n MMCHS_RSP32       for mmc3 = %x  ", omap_readl( 0x480AD114 ));
-	printk(KERN_ERR "\n MMCHS_RSP54       for mmc3 = %x  ", omap_readl( 0x480AD118 ));
-	printk(KERN_ERR "\n MMCHS_RSP76       for mmc3 = %x  ", omap_readl( 0x480AD11C ));
-	printk(KERN_ERR "\n MMCHS_DATA        for mmc3 = %x  ", omap_readl( 0x480AD120 ));
-	printk(KERN_ERR "\n MMCHS_PSTATE      for mmc3 = %x  ", omap_readl( 0x480AD124 ));
-	printk(KERN_ERR "\n MMCHS_HCTL        for mmc3 = %x  ", omap_readl( 0x480AD128 ));
-	printk(KERN_ERR "\n MMCHS_SYSCTL      for mmc3 = %x  ", omap_readl( 0x480AD12C ));
-	printk(KERN_ERR "\n MMCHS_STAT        for mmc3 = %x  ", omap_readl( 0x480AD130 ));
-	printk(KERN_ERR "\n MMCHS_IE          for mmc3 = %x  ", omap_readl( 0x480AD134 ));
-	printk(KERN_ERR "\n MMCHS_ISE         for mmc3 = %x  ", omap_readl( 0x480AD138 ));
-	printk(KERN_ERR "\n MMCHS_AC12        for mmc3 = %x  ", omap_readl( 0x480AD13C ));
-	printk(KERN_ERR "\n MMCHS_CAPA        for mmc3 = %x  ", omap_readl( 0x480AD140 ));
-	printk(KERN_ERR "\n MMCHS_CUR_CAPA    for mmc3 = %x  ", omap_readl( 0x480AD148 ));
-}
-
-//cmd flow p. 3609 obc
-static int sdiodrv_send_command(u32 cmdreg, u32 cmdarg)
-{
-	OMAP_HSMMC_WRITE(STAT, OMAP_HSMMC_STAT_CLEAR);
-	OMAP_HSMMC_SEND_COMMAND(cmdreg, cmdarg);
-
-	return sdiodrv_poll_status(OMAP_HSMMC_STAT, CC, MMC_TIMEOUT_MS);
-} /* sdiodrv_send_command() */
-
-/*
- *  Disable clock to the card
- */
-static void OMAP3430_mmc_stop_clock(void)
-{
-	OMAP_HSMMC_WRITE(SYSCTL, OMAP_HSMMC_READ(SYSCTL) & ~CEN);
-	if ((OMAP_HSMMC_READ(SYSCTL) & CEN) != 0x0)
-    {
-		PERR("MMC clock not stoped, clock freq can not be altered\n");
-    }
-} /* OMAP3430_mmc_stop_clock */
-
-/*
- *  Reset the SD system
- */
-int OMAP3430_mmc_reset(void)
-{
-	int status, loops=0;
-	//p. 3598 - need to set SOFTRESET to 0x1 0bc
-	OMAP_HSMMC_WRITE(SYSCTL, OMAP_HSMMC_READ(SYSCTL) | SRA);
-	while ((status = OMAP_HSMMC_READ(SYSCTL) &  SRA) && loops++ < SDIODRV_MAX_LOOPS);
-	if (status & SRA)
-	{
-	    PERR("OMAP3430_mmc_reset() MMC reset FAILED!! status=0x%x\n",status);
-	}
-
-	return status;
-
-} /* OMAP3430_mmc_reset */
-
-//p. 3611
-static void OMAP3430_mmc_set_clock(unsigned int clock, OMAP3430_sdiodrv_t *host)
-{
-	u16           dsor = 0;
-	unsigned long regVal;
-	int           status;
-
-	PDEBUG("OMAP3430_mmc_set_clock(%d)\n",clock);
-	if (clock) {
-		/* Enable MMC_SD_CLK */
-		dsor = OMAP_MMC_MASTER_CLOCK / clock;
-		if (dsor < 1) {
-			dsor = 1;
-		}
-		if (OMAP_MMC_MASTER_CLOCK / dsor > clock) {
-			dsor++;
-		}
-		if (dsor > 250) {
-			dsor = 250;
-		}
-	}
-	OMAP3430_mmc_stop_clock();
-	regVal = OMAP_HSMMC_READ(SYSCTL);
-	regVal = regVal & ~(CLKD_MASK);//p. 3652
-	regVal = regVal | (dsor << 6);
-	regVal = regVal | (DTO << 16);//data timeout
-	OMAP_HSMMC_WRITE(SYSCTL, regVal);
-	OMAP_HSMMC_WRITE(SYSCTL, OMAP_HSMMC_READ(SYSCTL) | ICE);//internal clock enable. obc not mentioned in the spec
-	/* 
-     * wait till the the clock is stable (ICS) bit is set
-	 */
-	status  = sdiodrv_poll_status(OMAP_HSMMC_SYSCTL, ICS, MMC_TIMEOUT_MS);
-	if(!(status & ICS)) {
-	    PERR("OMAP3430_mmc_set_clock() clock not stable!! status=0x%x\n",status);
-	}
-	/* 
-	 * Enable clock to the card
-	 */
-	OMAP_HSMMC_WRITE(SYSCTL, OMAP_HSMMC_READ(SYSCTL) | CEN);
-
-} /* OMAP3430_mmc_set_clock() */
-
-static void sdiodrv_free_resources(void)
-{
-	sdioDrv_cancel_inact_timer();
-
-	if(g_drv.ifclks_enabled) {
-		sdioDrv_clk_disable();
-	}
-
-	if (sdiodrv_fclk_got) {
-		clk_put(g_drv.fclk);
-		sdiodrv_fclk_got = 0;
-	}
-
-	if (sdiodrv_iclk_got) {
-		clk_put(g_drv.iclk);
-		sdiodrv_iclk_got = 0;
-	}
-
-        if (sdiodrv_irq_requested) {
-                free_irq(OMAP_MMC_IRQ, &g_drv);
-                sdiodrv_irq_requested = 0;
-        }
-}
-
-int sdioDrv_InitHw(void)
-{
-	int rc;
-	u32 status;
-#ifdef SDIO_1_BIT /* see also in SdioAdapter.c */
-	unsigned long clock_rate = 6000000;
-#else
-	unsigned long clock_rate = 24000000;
-#endif
-
-	printk(KERN_INFO "TIWLAN SDIO sdioDrv_InitHw()!!");
-
-        rc = sdioDrv_clk_enable();
-	if (rc) {
-		PERR("sdioDrv_InitHw : sdioDrv_clk_enable FAILED !!!\n");
-		goto err;
-	}
-
-	OMAP3430_mmc_reset();
-
-	//obc - init sequence p. 3600,3617
-	/* 1.8V */
-	OMAP_HSMMC_WRITE(CAPA, OMAP_HSMMC_READ(CAPA) | VS18);
-	OMAP_HSMMC_WRITE(HCTL, OMAP_HSMMC_READ(HCTL) | SDVS18);//SDVS fits p. 3650
-	/* clock gating */
-	OMAP_HSMMC_WRITE(SYSCONFIG, OMAP_HSMMC_READ(SYSCONFIG) | AUTOIDLE);
-
-	/* bus power */
-	OMAP_HSMMC_WRITE(HCTL, OMAP_HSMMC_READ(HCTL) | SDBP);//SDBP fits p. 3650
-	/* interrupts */
-	OMAP_HSMMC_WRITE(ISE, 0);
-	OMAP_HSMMC_WRITE(IE, IE_EN_MASK);
-
-	//p. 3601 suggests moving to the end
-	OMAP3430_mmc_set_clock(clock_rate, &g_drv);
-	printk("SDIO clock Configuration is now set to %dMhz\n",(int)clock_rate/1000000);
-
-	/* Bus width */
-#ifdef SDIO_1_BIT /* see also in SdioAdapter.c */
-	PDEBUG("%s() setting %d data lines\n",__FUNCTION__, 1);
-	OMAP_HSMMC_WRITE(HCTL, OMAP_HSMMC_READ(HCTL) & (ONE_BIT));
-#else
-	PDEBUG("%s() setting %d data lines\n",__FUNCTION__, 4);
-	OMAP_HSMMC_WRITE(HCTL, OMAP_HSMMC_READ(HCTL) | (1 << 1));//DTW 4 bits - p. 3650
-#endif
-
-	/* send the init sequence. 80 clocks of synchronization in the SDIO */
-	//doesn't match p. 3601,3617 - obc
-	OMAP_HSMMC_WRITE( CON, OMAP_HSMMC_READ(CON) | INIT_STREAM);
-	OMAP_HSMMC_SEND_COMMAND( 0, 0);
-	status = sdiodrv_poll_status(OMAP_HSMMC_STAT, CC, MMC_TIMEOUT_MS);
-	if (!(status & CC)) {
-		PERR("sdioDrv_InitHw() SDIO Command error status = 0x%x\n", status);
-		rc = status;
-		goto err;
-	}
-	OMAP_HSMMC_WRITE(CON, OMAP_HSMMC_READ(CON) & ~INIT_STREAM);
-
-	return 0;
-
-err:
-	/* Disabling clocks for now */
-	sdioDrv_clk_disable();
-
-	return rc;
-
-} /* sdiodrv_InitHw */
-
-void sdiodrv_shutdown(void)
-{
-	PDEBUG("entering %s()\n" , __FUNCTION__ );
-
-	sdiodrv_free_resources();
-
-	PDEBUG("exiting %s\n", __FUNCTION__);
-} /* sdiodrv_shutdown() */
-
-static int sdiodrv_send_data_xfer_commad(u32 cmd, u32 cmdarg, int length, u32 buffer_enable_status, unsigned int bBlkMode)
-{
-    int status;
-
-	PDEBUG("%s() writing CMD 0x%x ARG 0x%x\n",__FUNCTION__, cmd, cmdarg);
-
-    /* block mode */
-	if(bBlkMode) {
-        /* 
-         * Bits 31:16 of BLK reg: NBLK Blocks count for current transfer.
-         *                        in case of Block MOde the lenght is treated here as number of blocks 
-         *                        (and not as a length).
-         * Bits 11:0 of BLK reg: BLEN Transfer Block Size. in case of block mode set that field to block size. 
-         */
-        OMAP_HSMMC_WRITE(BLK, (length << 16) | (g_drv.uBlkSize << 0));
-
-        /*
-         * In CMD reg:
-         * BCE: Block Count Enable
-         * MSBS: Multi/Single block select
-         */
-        cmd |= MSBS | BCE ;
-	} else {
-        OMAP_HSMMC_WRITE(BLK, length);
-    }
-
-    status = sdiodrv_send_command(cmd, cmdarg);
-	if(!(status & CC)) {
-	    PERR("sdiodrv_send_data_xfer_commad() SDIO Command error! STAT = 0x%x\n", status);
-	    return 0;
-	}
-	PDEBUG("%s() length = %d(%dw) BLK = 0x%x\n",
-		   __FUNCTION__, length,((length + 3) >> 2), OMAP_HSMMC_READ(BLK));
-
-    return sdiodrv_poll_status(OMAP_HSMMC_PSTATE, buffer_enable_status, MMC_TIMEOUT_MS);
-
-} /* sdiodrv_send_data_xfer_commad() */
-
-int sdiodrv_data_xfer_sync(u32 cmd, u32 cmdarg, void *data, int length, u32 buffer_enable_status)
-{
-    u32 buf_start, buf_end, data32;
-	int status;
-
-    status = sdiodrv_send_data_xfer_commad(cmd, cmdarg, length, buffer_enable_status, 0);
-	if(!(status & buffer_enable_status)) 
-    {
-	    PERR("sdiodrv_data_xfer_sync() buffer disabled! length = %d BLK = 0x%x PSTATE = 0x%x\n", 
-			   length, OMAP_HSMMC_READ(BLK), status);
-	    return -1;
-	}
-	buf_end = (u32)data+(u32)length;
-
-	//obc need to check BRE/BWE every time, see p. 3605
-	/*
-	 * Read loop 
-	 */
-	if (buffer_enable_status == BRE)
-	{
-	  if (((u32)data & 3) == 0) /* 4 bytes aligned */
-	  {
-		for (buf_start = (u32)data; (u32)data < buf_end; data += sizeof(unsigned long))
-		{
-		  *((unsigned long*)(data)) = OMAP_HSMMC_READ(DATA);
-		}
-	  }
-	  else                      /* 2 bytes aligned */
-	  {
-		for (buf_start = (u32)data; (u32)data < buf_end; data += sizeof(unsigned long))
-		{
-		  data32 = OMAP_HSMMC_READ(DATA);
-		  *((unsigned short *)data)     = (unsigned short)data32;
-		  *((unsigned short *)data + 1) = (unsigned short)(data32 >> 16);
-		}
-	  }
-	}
-	/*
-	 * Write loop 
-	 */
-	else
-	{
-	  if (((u32)data & 3) == 0) /* 4 bytes aligned */
-	  {
-		for (buf_start = (u32)data; (u32)data < buf_end; data += sizeof(unsigned long))
-		{
-		  OMAP_HSMMC_WRITE(DATA,*((unsigned long*)(data)));
-		}
-	  }
-	  else                      /* 2 bytes aligned */
-	  {
-		for (buf_start = (u32)data; (u32)data < buf_end; data += sizeof(unsigned long))
-		{
-		  OMAP_HSMMC_WRITE(DATA,*((unsigned short*)data) | *((unsigned short*)data+1) << 16 );
-		}
-
-	  }
-	}
-	status  = sdiodrv_poll_status(OMAP_HSMMC_STAT, TC, MMC_TIMEOUT_MS);
-	if(!(status & TC)) 
-	{
-	    PERR("sdiodrv_data_xfer_sync() transfer error! STAT = 0x%x\n", status);
-	    return -1;
-	}
-
-	return 0;
-
-} /* sdiodrv_data_xfer_sync() */
-
-int sdioDrv_ConnectBus (void *       fCbFunc,
-                        void *       hCbArg,
-                        unsigned int uBlkSizeShift,
-                        unsigned int  uSdioThreadPriority)
-{
-	g_drv.BusTxnCB      = fCbFunc;
-	g_drv.BusTxnHandle  = hCbArg;
-	g_drv.uBlkSizeShift = uBlkSizeShift;  
-	g_drv.uBlkSize      = 1 << uBlkSizeShift;
-
-	INIT_WORK(&g_drv.sdiodrv_work, sdiodrv_task);
-
-	return sdioDrv_InitHw ();
-}
-
-/*--------------------------------------------------------------------------------------*/
-
-int sdioDrv_DisconnectBus (void)
-{
-	/* Disable clocks to handle driver stop command */
-	sdioDrv_clk_disable();
-	return 0;
-}
-
-//p.3609 cmd flow
-int sdioDrv_ExecuteCmd (unsigned int uCmd, 
-                        unsigned int uArg, 
-                        unsigned int uRespType, 
-                        void *       pResponse, 
-                        unsigned int uLen)
-{
-	unsigned int uCmdReg   = 0;
-	unsigned int uStatus   = 0;
-	unsigned int uResponse = 0;
-
-	PDEBUG("sdioDrv_ExecuteCmd() starting cmd %02x arg %08x\n", (int)uCmd, (int)uArg);
-
-	sdioDrv_clk_enable(); /* To make sure we have clocks enable */
-
-	uCmdReg = (uCmd << 24) | (uRespType << 16) ;
-
-	uStatus = sdiodrv_send_command(uCmdReg, uArg);
-
-	if (!(uStatus & CC)) 
-	{
-	    PERR("sdioDrv_ExecuteCmd() SDIO Command error status = 0x%x\n", uStatus);
-	    return -1;
-	}
-	if ((uLen > 0) && (uLen <= 4))/*obc - Len > 4 ? shouldn't read anything ? */
-	{
-	    uResponse = OMAP_HSMMC_READ(RSP10);
-		memcpy (pResponse, (char *)&uResponse, uLen);
-		PDEBUG("sdioDrv_ExecuteCmd() response = 0x%x\n", uResponse);
-	}
-	return 0;
-}
-
-/*--------------------------------------------------------------------------------------*/
-
-int sdioDrv_ReadSync (unsigned int uFunc, 
-                      unsigned int uHwAddr, 
-                      void *       pData, 
-                      unsigned int uLen,
-                      unsigned int bIncAddr,
-                      unsigned int bMore)
-{
-	unsigned int uCmdArg;
-	int          iStatus;
-
-//	printk(KERN_INFO "in sdioDrv_ReadSync\n");
-	uCmdArg = SDIO_CMD53_READ(0, uFunc, 0, bIncAddr, uHwAddr, uLen);
-
-	iStatus = sdiodrv_data_xfer_sync(OMAP_HSMMC_CMD53_READ, uCmdArg, pData, uLen, BRE);
-	if (iStatus != 0) {
-		PERR("sdioDrv_ReadSync() FAILED!!\n");
-	}
-#ifdef TI_SDIO_DEBUG
-	if (uLen == 1)
-		printk(KERN_INFO "R53: [0x%x](%u) = 0x%x\n", uHwAddr, uLen, (unsigned)(*(char *)pData));
-	else if (uLen == 2)
-		printk(KERN_INFO "R53: [0x%x](%u) = 0x%x\n", uHwAddr, uLen, (unsigned)(*(short *)pData));
-	else if (uLen == 4)
-		printk(KERN_INFO "R53: [0x%x](%u) = 0x%x\n", uHwAddr, uLen, (unsigned)(*(long *)pData));
-	else
-		printk(KERN_INFO "R53: [0x%x](%u)\n", uHwAddr, uLen);
-#endif
-	return iStatus;
-}
-
-/*--------------------------------------------------------------------------------------*/
-int sdioDrv_ReadAsync (unsigned int uFunc, 
-                       unsigned int uHwAddr, 
-                       void *       pData, 
-                       unsigned int uLen, 
-                       unsigned int bBlkMode,
-                       unsigned int bIncAddr,
-                       unsigned int bMore)
-{
-	int          iStatus;
-	unsigned int uCmdArg;
-	unsigned int uNumBlks;
-	unsigned int uDmaBlockCount;
-	unsigned int uNumOfElem;
-	dma_addr_t dma_bus_address;
-
-#ifdef TI_SDIO_DEBUG
-	printk(KERN_INFO "R53: [0x%x](%u) F[%d]\n", uHwAddr, uLen, uFunc);
-#endif
-
-	//printk(KERN_INFO "in sdioDrv_ReadAsync\n");
-
-    if (bBlkMode)
-    {
-        /* For block mode use number of blocks instead of length in bytes */
-        uNumBlks = uLen >> g_drv.uBlkSizeShift;
-        uDmaBlockCount = uNumBlks;
-        /* due to the DMA config to 32Bit per element (OMAP_DMA_DATA_TYPE_S32) the division is by 4 */ 
-        uNumOfElem = g_drv.uBlkSize >> 2;
-    }
-    else
-    {	
-        uNumBlks = uLen;
-        uDmaBlockCount = 1;
-        uNumOfElem = (uLen + 3) >> 2;
-    }
-
-    uCmdArg = SDIO_CMD53_READ(0, uFunc, bBlkMode, bIncAddr, uHwAddr, uNumBlks);
-
-    iStatus = sdiodrv_send_data_xfer_commad(OMAP_HSMMC_CMD53_READ_DMA, uCmdArg, uNumBlks, BRE, bBlkMode);
-
-    if (!(iStatus & BRE)) 
-    {
-        PERR("sdioDrv_ReadAsync() buffer disabled! length = %d BLK = 0x%x PSTATE = 0x%x, BlkMode = %d\n", 
-              uLen, OMAP_HSMMC_READ(BLK), iStatus, bBlkMode);
-	goto err;
-    }
-
-	sdiodrv_dma_init();
-
-	PDEBUG("sdiodrv_read_async() dma_ch=%d \n",g_drv.dma_rx_channel);
-
-	dma_bus_address = dma_map_single(g_drv.dev, pData, uLen, DMA_FROM_DEVICE);
-	if (!dma_bus_address) {
-		PERR("sdioDrv_ReadAsync: dma_map_single failed\n");
-		goto err;
-	}		
-
-	if (g_drv.dma_read_addr != 0) {
-		printk(KERN_ERR "sdioDrv_ReadAsync: previous DMA op is not finished!\n");
-		BUG();
-	}
-	
-	g_drv.dma_read_addr = dma_bus_address;
-	g_drv.dma_read_size = uLen;
-
-	omap_set_dma_dest_params    (g_drv.dma_rx_channel,
-									0,			// dest_port is only for OMAP1
-									OMAP_DMA_AMODE_POST_INC,
-									dma_bus_address,
-									0, 0);
-
-	omap_set_dma_transfer_params(g_drv.dma_rx_channel, OMAP_DMA_DATA_TYPE_S32, uNumOfElem , uDmaBlockCount , OMAP_DMA_SYNC_FRAME, TIWLAN_MMC_DMA_RX, OMAP_DMA_SRC_SYNC);
-
-	omap_start_dma(g_drv.dma_rx_channel);
-
-	/* Continued at sdiodrv_irq() after DMA transfer is finished */
-#ifdef TI_SDIO_DEBUG
-	printk(KERN_INFO "R53: [0x%x](%u) (A)\n", uHwAddr, uLen);
-#endif
-	return 0;
-err:
-	return -1;
-
-}
-
-
-/*--------------------------------------------------------------------------------------*/
-
-int sdioDrv_WriteSync (unsigned int uFunc, 
-                       unsigned int uHwAddr, 
-                       void *       pData, 
-                       unsigned int uLen,
-                       unsigned int bIncAddr,
-                       unsigned int bMore)
-{
-	unsigned int uCmdArg;
-	int          iStatus;
-
-//	printk(KERN_INFO "in sdioDrv_WriteSync\n");
-
-	uCmdArg = SDIO_CMD53_WRITE(1, uFunc, 0, bIncAddr, uHwAddr, uLen);
-
-	iStatus = sdiodrv_data_xfer_sync(OMAP_HSMMC_CMD53_WRITE, uCmdArg, pData, uLen, BWE);
-	if (iStatus != 0)
-	{
-		PERR("sdioDrv_WriteSync() FAILED!!\n");
-	}
-#ifdef TI_SDIO_DEBUG
-	if (uLen == 1)
-		printk(KERN_INFO "W53: [0x%x](%u) < 0x%x\n", uHwAddr, uLen, (unsigned)(*(char *)pData));
-	else if (uLen == 2)
-		printk(KERN_INFO "W53: [0x%x](%u) < 0x%x\n", uHwAddr, uLen, (unsigned)(*(short *)pData));
-	else if (uLen == 4)
-		printk(KERN_INFO "W53: [0x%x](%u) < 0x%x\n", uHwAddr, uLen, (unsigned)(*(long *)pData));
-	else
-		printk(KERN_INFO "W53: [0x%x](%u)\n", uHwAddr, uLen);
-#endif
-	return iStatus;
-}
-
-/*--------------------------------------------------------------------------------------*/
-int sdioDrv_WriteAsync (unsigned int uFunc, 
-                        unsigned int uHwAddr, 
-                        void *       pData, 
-                        unsigned int uLen, 
-                        unsigned int bBlkMode,
-                        unsigned int bIncAddr,
-                        unsigned int bMore)
-{
-	int          iStatus;
-	unsigned int uCmdArg;
-	unsigned int uNumBlks;
-	unsigned int uDmaBlockCount;
-	unsigned int uNumOfElem;
-	dma_addr_t dma_bus_address;
-
-#ifdef TI_SDIO_DEBUG
-	printk(KERN_INFO "W53: [0x%x](%u) F[%d] B[%d] I[%d]\n", uHwAddr, uLen, uFunc, bBlkMode, bIncAddr);
-#endif
-
-//	printk(KERN_INFO "in sdioDrv_WriteAsync\n");
-    if (bBlkMode)
-    {
-        /* For block mode use number of blocks instead of length in bytes */
-        uNumBlks = uLen >> g_drv.uBlkSizeShift;
-        uDmaBlockCount = uNumBlks;
-        /* due to the DMA config to 32Bit per element (OMAP_DMA_DATA_TYPE_S32) the division is by 4 */ 
-        uNumOfElem = g_drv.uBlkSize >> 2;
-    }
-    else
-    {
-        uNumBlks = uLen;
-        uDmaBlockCount = 1;
-        uNumOfElem = (uLen + 3) >> 2;
-    }
-
-    uCmdArg = SDIO_CMD53_WRITE(1, uFunc, bBlkMode, bIncAddr, uHwAddr, uNumBlks);
-
-    iStatus = sdiodrv_send_data_xfer_commad(OMAP_HSMMC_CMD53_WRITE_DMA, uCmdArg, uNumBlks, BWE, bBlkMode);
-    if (!(iStatus & BWE)) 
-    {
-        PERR("sdioDrv_WriteAsync() buffer disabled! length = %d, BLK = 0x%x, Status = 0x%x\n", 
-             uLen, OMAP_HSMMC_READ(BLK), iStatus);
-	goto err;
-    }
-
-	OMAP_HSMMC_WRITE(ISE, TC);
-
-	sdiodrv_dma_init();
-
-	dma_bus_address = dma_map_single(g_drv.dev, pData, uLen, DMA_TO_DEVICE);
-	if (!dma_bus_address) {
-		PERR("sdioDrv_WriteAsync: dma_map_single failed\n");
-		goto err;
-	}
-
-	if (g_drv.dma_write_addr != 0) {
-		PERR("sdioDrv_WriteAsync: previous DMA op is not finished!\n");
-		BUG();
-	}
-	
-	g_drv.dma_write_addr = dma_bus_address;
-	g_drv.dma_write_size = uLen;
-
-	omap_set_dma_src_params     (g_drv.dma_tx_channel,
-									0,			// src_port is only for OMAP1
-									OMAP_DMA_AMODE_POST_INC,
-									dma_bus_address,
-									0, 0);
-
-	omap_set_dma_transfer_params(g_drv.dma_tx_channel, OMAP_DMA_DATA_TYPE_S32, uNumOfElem, uDmaBlockCount, OMAP_DMA_SYNC_FRAME, TIWLAN_MMC_DMA_TX, OMAP_DMA_DST_SYNC);
-
-	omap_start_dma(g_drv.dma_tx_channel);
-
-	/* Continued at sdiodrv_irq() after DMA transfer is finished */
-	return 0;
-err:
-	return -1;
-}
-
-/*--------------------------------------------------------------------------------------*/
-
-int sdioDrv_ReadSyncBytes (unsigned int  uFunc, 
-                           unsigned int  uHwAddr, 
-                           unsigned char *pData, 
-                           unsigned int  uLen, 
-                           unsigned int  bMore)
-{
-	unsigned int uCmdArg;
-	unsigned int i;
-	int          iStatus;
-
-	for (i = 0; i < uLen; i++) {
-		uCmdArg = SDIO_CMD52_READ(0, uFunc, 0, uHwAddr);
-
-		iStatus = sdiodrv_send_command(OMAP_HSMMC_CMD52_READ, uCmdArg);
-
-		if (!(iStatus & CC)) {
-			PERR("sdioDrv_ReadSyncBytes() SDIO Command error status = 0x%x\n", iStatus);
-			return -1;
-		}
-		else {
-			*pData = (unsigned char)(OMAP_HSMMC_READ(RSP10));
-		}
-#ifdef TI_SDIO_DEBUG
-		printk(KERN_INFO "R52: [0x%x](%u) = 0x%x\n", uHwAddr, uLen, (unsigned)*pData);
-#endif
-		uHwAddr++;
-		pData++;
-	}
-
-	return 0;
-}
-
-/*--------------------------------------------------------------------------------------*/
-
-int sdioDrv_WriteSyncBytes (unsigned int  uFunc, 
-                            unsigned int  uHwAddr, 
-                            unsigned char *pData, 
-                            unsigned int  uLen, 
-                            unsigned int  bMore)
-{
-	unsigned int uCmdArg;
-	unsigned int i;
-	int          iStatus;
-
-	for (i = 0; i < uLen; i++) {
-#ifdef TI_SDIO_DEBUG
-		printk(KERN_INFO "W52: [0x%x](%u) < 0x%x\n", uHwAddr, uLen, (unsigned)*pData);
-#endif
-		uCmdArg = SDIO_CMD52_WRITE(1, uFunc, 0, uHwAddr, *pData);
-
-		iStatus = sdiodrv_send_command(OMAP_HSMMC_CMD52_WRITE, uCmdArg);
-		if (!(iStatus & CC)) {
-			PERR("sdioDrv_WriteSyncBytes() SDIO Command error status = 0x%x\n", iStatus);
-			return -1;
-		}
-		uHwAddr++;
-		pData++;
-	}
-
-	return 0;
-}
-
-static int sdioDrv_probe(struct platform_device *pdev)
-{
-	int rc;
-
-	printk(KERN_INFO "TIWLAN SDIO probe: initializing mmc%d device\n", pdev->id + 1);
-
-	/* remember device struct for future DMA operations */
-	g_drv.dev = &pdev->dev;
-	g_drv.irq = platform_get_irq(pdev, 0);
-	if (g_drv.irq < 0)
-		return -ENXIO;
-
-        rc= request_irq(OMAP_MMC_IRQ, sdiodrv_irq, 0, SDIO_DRIVER_NAME, &g_drv);
-        if (rc != 0) {
-                PERR("sdioDrv_probe() - request_irq FAILED!!\n");
-                return rc;
-        }
-        sdiodrv_irq_requested = 1;
-
-	spin_lock_init(&g_drv.clk_lock);
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 31))
-	dummy_pdev.id = TIWLAN_MMC_CONTROLLER;
-	dev_set_name(&dummy_pdev.dev, "mmci-omap-hs.%lu", TIWLAN_MMC_CONTROLLER);
-	g_drv.fclk = clk_get(&dummy_pdev.dev, "fck");
-#else
-	g_drv.fclk = clk_get(&pdev->dev, "mmchs_fck");
-#endif
-	if (IS_ERR(g_drv.fclk)) {
-		rc = PTR_ERR(g_drv.fclk);
-		PERR("clk_get(fclk) FAILED !!!\n");
-		goto err;
-	}
-	sdiodrv_fclk_got = 1;
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 31))
-	g_drv.iclk = clk_get(&dummy_pdev.dev, "ick");
-#else
-	g_drv.iclk = clk_get(&pdev->dev, "mmchs_ick");
-#endif
-	if (IS_ERR(g_drv.iclk)) {
-		rc = PTR_ERR(g_drv.iclk);
-		PERR("clk_get(iclk) FAILED !!!\n");
-		goto err;
-	}
-	sdiodrv_iclk_got = 1;
-	
-	printk("Configuring SDIO DMA registers!!!\n");
-	printk("pdev->id is %d!!!\n", pdev->id);
-	if ( pdev->id == 1 ) {
-		/* MMC2 */
-		TIWLAN_MMC_CONTROLLER_BASE_ADDR = OMAP_HSMMC2_BASE;
-		TIWLAN_MMC_DMA_TX = OMAP24XX_DMA_MMC2_TX;
-		TIWLAN_MMC_DMA_RX = OMAP24XX_DMA_MMC2_RX;
-        }
-	else if ( pdev->id == 2 ) {
-		/* MMC3 */
-		TIWLAN_MMC_CONTROLLER_BASE_ADDR	= OMAP_HSMMC3_BASE;
-		TIWLAN_MMC_DMA_TX = OMAP34XX_DMA_MMC3_TX;
-		TIWLAN_MMC_DMA_RX = OMAP34XX_DMA_MMC3_RX;
-	}
-
-	/* inactivity timer initialization*/
-	init_timer(&g_drv.inact_timer);
-	g_drv.inact_timer.function = sdioDrv_inact_timer;
-	g_drv.inact_timer_running = 0;
-
-	return 0;
-err:
-	sdiodrv_free_resources();
-	return rc;
-}
-
-static int sdioDrv_remove(struct platform_device *pdev)
-{
-	printk(KERN_INFO "sdioDrv_remove: calling sdiodrv_shutdown\n");
-	
-	sdiodrv_shutdown();
-	
-	return 0;
-}
-
-#ifdef CONFIG_PM
-static int sdioDrv_suspend(struct platform_device *pdev, pm_message_t state)
-{
-	printk(KERN_INFO "TISDIO: sdioDrv is suspending\n");
-	return 0;
-}
-
-/* Routine to resume the MMC device */
-static int sdioDrv_resume(struct platform_device *pdev)
-{
-	printk(KERN_INFO "TISDIO: sdioDrv is resuming\n");
-	return 0;
-}
-#else
-#define sdioDrv_suspend		NULL
-#define sdioDrv_resume		NULL
-#endif
-
-static struct platform_driver sdioDrv_struct = {
-	.probe		= sdioDrv_probe,
-	.remove		= sdioDrv_remove,
-	.suspend	= sdioDrv_suspend,
-	.resume		= sdioDrv_resume,
-	.driver		= {
-		.name = SDIO_DRIVER_NAME,
-	},
-};
-
-void sdioDrv_register_pm(int (*wlanDrvIf_Start)(void),
-						int (*wlanDrvIf_Stop)(void))
-{
-	g_drv.wlanDrvIf_pm_resume = wlanDrvIf_Start;
-	g_drv.wlanDrvIf_pm_suspend = wlanDrvIf_Stop;
-}
-
-int sdioDrv_clk_enable(void)
-{
-       unsigned long flags;
-       int ret = 0;
-
-       spin_lock_irqsave(&g_drv.clk_lock, flags);
-       if (g_drv.ifclks_enabled)
-               goto done;
-
-       ret = clk_enable(g_drv.iclk);
-       if (ret)
-              goto clk_en_err1;
-
-       ret = clk_enable(g_drv.fclk);
-       if (ret)
-               goto clk_en_err2;
-       g_drv.ifclks_enabled = 1;
-
-       sdioDrv_hsmmc_restore_ctx();
-
-done:
-       spin_unlock_irqrestore(&g_drv.clk_lock, flags);
-       return ret;
-
-clk_en_err2:
-       clk_disable(g_drv.iclk);
-clk_en_err1 :
-       spin_unlock_irqrestore(&g_drv.clk_lock, flags);
-       return ret;
-}
-
-void sdioDrv_clk_disable(void)
-{
-       unsigned long flags;
-
-       spin_lock_irqsave(&g_drv.clk_lock, flags);
-       if (!g_drv.ifclks_enabled)
-               goto done;
-
-       sdioDrv_hsmmc_save_ctx();
-
-       clk_disable(g_drv.fclk);
-       clk_disable(g_drv.iclk);
-       g_drv.ifclks_enabled = 0;
-done:
-       spin_unlock_irqrestore(&g_drv.clk_lock, flags);
-}
-
-#ifdef TI_SDIO_STANDALONE
-static int __init sdioDrv_init(void)
-#else
-int __init sdioDrv_init(int sdcnum)
-#endif
-{
-	memset(&g_drv, 0, sizeof(g_drv));
-	memset(&hsmmc_ctx, 0, sizeof(hsmmc_ctx));
-
-	printk(KERN_INFO "TIWLAN SDIO init\n");
-#ifndef TI_SDIO_STANDALONE
-	sdio_init( sdcnum );
-#endif
-	g_drv.sdio_wq = create_freezeable_workqueue(SDIOWQ_NAME);
-	if (!g_drv.sdio_wq) {
-		printk("TISDIO: Fail to create SDIO WQ\n");
-		return -EINVAL;
-	}
-	/* Register the sdio driver */
-	return platform_driver_register(&sdioDrv_struct);
-}
-
-#ifdef TI_SDIO_STANDALONE
-static
-#endif
-void __exit sdioDrv_exit(void)
-{
-	/* Unregister sdio driver */
-	platform_driver_unregister(&sdioDrv_struct);
-	if (g_drv.sdio_wq)
-		destroy_workqueue(g_drv.sdio_wq);
-}
-
-#ifdef TI_SDIO_STANDALONE
-module_init(sdioDrv_init);
-module_exit(sdioDrv_exit);
-#endif
-
-EXPORT_SYMBOL(sdioDrv_ConnectBus);
-EXPORT_SYMBOL(sdioDrv_DisconnectBus);
-EXPORT_SYMBOL(sdioDrv_ExecuteCmd);
-EXPORT_SYMBOL(sdioDrv_ReadSync);
-EXPORT_SYMBOL(sdioDrv_WriteSync);
-EXPORT_SYMBOL(sdioDrv_ReadAsync);
-EXPORT_SYMBOL(sdioDrv_WriteAsync);
-EXPORT_SYMBOL(sdioDrv_ReadSyncBytes);
-EXPORT_SYMBOL(sdioDrv_WriteSyncBytes);
-EXPORT_SYMBOL(sdioDrv_register_pm);
-MODULE_DESCRIPTION("TI WLAN SDIO driver");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS(SDIO_DRIVER_NAME);
-MODULE_AUTHOR("Texas Instruments Inc");
-#endif
diff --git a/wl1271/external_drivers/sdio/linux/SdioDrv.h b/wl1271/external_drivers/sdio/linux/SdioDrv.h
deleted file mode 100644
index 3851e3e..0000000
--- a/wl1271/external_drivers/sdio/linux/SdioDrv.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * SdioDrv.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *  * Neither the name Texas Instruments nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef __OMAP3430_SDIODRV_API_H
-#define __OMAP3430_SDIODRV_API_H
-
-#include <asm/types.h>
-#include <linux/mmc/mmc.h>
-
-/* Card Common Control Registers (CCCR) */
-
-#define CCCR_SDIO_REVISION                  0x00
-#define CCCR_SD_SPECIFICATION_REVISION      0x01
-#define CCCR_IO_ENABLE                      0x02
-#define CCCR_IO_READY                       0x03
-#define CCCR_INT_ENABLE                     0x04
-#define CCCR_INT_PENDING                    0x05
-#define CCCR_IO_ABORT                       0x06
-#define CCCR_BUS_INTERFACE_CONTOROL         0x07
-#define CCCR_CARD_CAPABILITY	            0x08
-#define CCCR_COMMON_CIS_POINTER             0x09 /*0x09-0x0B*/
-#define CCCR_FNO_BLOCK_SIZE	                0x10 /*0x10-0x11*/
-#define FN0_CCCR_REG_32                     0x64
-
-/* Pprotocol defined constants */  
-         
-#define SD_IO_GO_IDLE_STATE		  		    0  
-#define SD_IO_SEND_RELATIVE_ADDR	  	    3 
-#define SDIO_CMD5			  			    5
-#define SD_IO_SELECT_CARD		  		    7 
-#define SDIO_CMD52		 	 			    52		
-#define SDIO_CMD53		 	 			    53
-#define SD_IO_SEND_OP_COND		            SDIO_CMD5  
-#define SD_IO_RW_DIRECT			            SDIO_CMD52 
-#define SD_IO_RW_EXTENDED		            SDIO_CMD53 
-#define SDIO_SHIFT(v,n)                     (v<<n)
-#define SDIO_RWFLAG(v)                      (SDIO_SHIFT(v,31))
-#define SDIO_FUNCN(v)                       (SDIO_SHIFT(v,28))
-#define SDIO_RAWFLAG(v)                     (SDIO_SHIFT(v,27))
-#define SDIO_BLKM(v)                        (SDIO_SHIFT(v,27))
-#define SDIO_OPCODE(v)                      (SDIO_SHIFT(v,26))
-#define SDIO_ADDRREG(v)                     (SDIO_SHIFT(v,9))
-
-
-#define VDD_VOLTAGE_WINDOW                  0xffffc0
-#define FN2_OBI_INV                         0x0002
-
-#define MMC_RSP_NONE	                    (0 << 0)
-#define MMC_RSP_SHORT	                    (1 << 0)
-#define MMC_RSP_LONG	                    (2 << 0)
-#define MMC_RSP_MASK	                    (3 << 0)
-#define MMC_RSP_CRC	                        (1 << 3)
-#define MMC_RSP_BUSY	                    (1 << 4)
-
-#define MMC_RSP_R1	                        (MMC_RSP_SHORT|MMC_RSP_CRC)
-#define MMC_RSP_R1B	                        (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_BUSY)
-#define MMC_RSP_R2	                        (MMC_RSP_LONG|MMC_RSP_CRC)
-#define MMC_RSP_R3	                        (MMC_RSP_SHORT)
-
-/* HSMMC controller bit definitions
- * */
-#define OMAP_HSMMC_CMD_NO_RESPONSE          0 << 0
-#define OMAP_HSMMC_CMD_LONG_RESPONSE        1 << 0
-#define OMAP_HSMMC_CMD_SHORT_RESPONSE       2 << 0
-
-#define MMC_ERR_NONE	                    0
-#define MMC_ERR_TIMEOUT	                    1
-#define MMC_ERR_BADCRC	                    2
-#define MMC_ERR_FIFO	                    3
-#define MMC_ERR_FAILED	                    4
-#define MMC_ERR_INVALID	                    5
-
-#undef  MMC_RSP_R4
-#define MMC_RSP_R4 OMAP_HSMMC_CMD_SHORT_RESPONSE
-#undef  MMC_RSP_R5
-#define MMC_RSP_R5 OMAP_HSMMC_CMD_SHORT_RESPONSE
-#undef  MMC_RSP_R6
-#define MMC_RSP_R6 OMAP_HSMMC_CMD_SHORT_RESPONSE
-
-/********************************************************************/
-/*	SDIO driver functions prototypes                                */
-/********************************************************************/
-int sdioDrv_ConnectBus     (void *       fCbFunc,
-                            void *       hCbArg,
-                            unsigned int uBlkSizeShift,
-                            unsigned int uSdioThreadPriority);
-
-int sdioDrv_DisconnectBus  (void);
-
-int sdioDrv_ExecuteCmd     (unsigned int uCmd, 
-                            unsigned int uArg, 
-                            unsigned int uRespType, 
-                            void *       pResponse, 
-                            unsigned int uLen);
-                           
-int sdioDrv_ReadSync       (unsigned int uFunc, 
-                            unsigned int uHwAddr, 
-                            void *       pData, 
-                            unsigned int uLen, 
-                            unsigned int bIncAddr,
-                            unsigned int bMore);
-
-int sdioDrv_ReadAsync      (unsigned int uFunc, 
-                            unsigned int uHwAddr, 
-                            void *       pData, 
-                            unsigned int uLen, 
-                            unsigned int bBlkMode,
-                            unsigned int bIncAddr,
-                            unsigned int bMore);
-
-int sdioDrv_WriteSync      (unsigned int uFunc, 
-                            unsigned int uHwAddr, 
-                            void *       pData, 
-                            unsigned int uLen,
-                            unsigned int bIncAddr,
-                            unsigned int bMore);
-
-int sdioDrv_WriteAsync     (unsigned int uFunc, 
-                            unsigned int uHwAddr, 
-                            void *       pData, 
-                            unsigned int uLen, 
-                            unsigned int bBlkMode,
-                            unsigned int bIncAddr,
-                            unsigned int bMore);
-
-int sdioDrv_ReadSyncBytes  (unsigned int  uFunc, 
-                            unsigned int  uHwAddr, 
-                            unsigned char *pData, 
-                            unsigned int  uLen, 
-                            unsigned int  bMore);
-                           
-int sdioDrv_WriteSyncBytes (unsigned int  uFunc, 
-                            unsigned int  uHwAddr, 
-                            unsigned char *pData, 
-                            unsigned int  uLen, 
-                            unsigned int  bMore);
-
-void sdioDrv_register_pm(int (*wlanDrvIf_Start)(void),
-						int (*wlanDrvIf_Stop)(void));
-
-int sdioDrv_clk_enable(void);
-void sdioDrv_clk_disable(void);
-void sdioDrv_start_inact_timer(void);
-void sdioDrv_cancel_inact_timer(void);
-
-#endif/* _OMAP3430_SDIODRV_H */
diff --git a/wl1271/external_drivers/sdio/linux/SdioDrvDbg.h b/wl1271/external_drivers/sdio/linux/SdioDrvDbg.h
deleted file mode 100644
index 8d2bec5..0000000
--- a/wl1271/external_drivers/sdio/linux/SdioDrvDbg.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * SdioDrvDbg.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *  * Neither the name Texas Instruments nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef OMAP3430_SDIODRV_DEBUG_H
-#define OMAP3430_SDIODRV_DEBUG_H
-
-#include <linux/kernel.h>
-
-typedef enum{
-SDIO_DEBUGLEVEL_EMERG=1,
-SDIO_DEBUGLEVEL_ALERT,
-SDIO_DEBUGLEVEL_CRIT,
-SDIO_DEBUGLEVEL_ERR=4,
-SDIO_DEBUGLEVEL_WARNING,
-SDIO_DEBUGLEVEL_NOTICE,
-SDIO_DEBUGLEVEL_INFO,
-SDIO_DEBUGLEVEL_DEBUG=8
-}sdio_debuglevel;
-
-extern int g_sdio_debug_level;
-
-#ifdef SDIO_DEBUG
-
-#define PERR(format, args... ) if(g_sdio_debug_level >= SDIO_DEBUGLEVEL_ERR) printk(format , ##args)
-#define PDEBUG(format, args... ) if(g_sdio_debug_level >= SDIO_DEBUGLEVEL_DEBUG) printk(format , ##args)
-#define PINFO(format, ... ) if(g_sdio_debug_level >= SDIO_DEBUGLEVEL_INFO) printk( format , ##__VA_ARGS__)
-#define PNOTICE(format, ... ) if(g_sdio_debug_level >= SDIO_DEBUGLEVEL_NOTICE) printk( format , ##__VA_ARGS__)
-#define PWARNING(format, ... ) if(g_sdio_debug_level >= SDIO_DEBUGLEVEL_WARNING) printk(format , ##__VA_ARGS__)
-
-#else
-
-#define PERR(format, args... ) if(g_sdio_debug_level >= SDIO_DEBUGLEVEL_ERR) printk(format , ##args)
-#define PDEBUG(format, args... )
-#define PINFO(format, ... )
-#define PNOTICE(format, ... )
-#define PWARNING(format, ... )
-
-#endif
-
-/* we want errors reported anyway */
-
-#define PERR1 PERR
-#define PERR2 PERR
-#define PERR3 PERR
-
-#endif /* OMAP3430_SDIODRV_DEBUG_H */
diff --git a/wl1271/platforms/hw/linux/SdioAdapter.c b/wl1271/platforms/hw/linux/SdioAdapter.c
deleted file mode 100644
index 9b00e79..0000000
--- a/wl1271/platforms/hw/linux/SdioAdapter.c
+++ /dev/null
@@ -1,567 +0,0 @@
-/*
- * SdioAdapter.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.
- * Copyright(c) 2008 - 2009 Google, Inc. All rights reserved.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *  * Neither the name Texas Instruments nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file   SdioAdapter.c
- *  \brief  The SDIO driver adapter. Platform dependent.
- *
- * An adaptation layer between the lower SDIO driver (in BSP) and the upper Sdio
- * Used for issuing all SDIO transaction types towards the lower SDIO-driver.
- * Makes the decision whether to use Sync or Async transaction, and reflects it
- *     by the return value and calling its callback in case of Async.
- *
- *  \see    SdioAdapter.h, SdioDrv.c & h
- */
-
-#ifdef CONFIG_MMC_EMBEDDED_SDIO
-#include <linux/kernel.h>
-#include <linux/mutex.h>
-#include <linux/mmc/core.h>
-#include <linux/mmc/card.h>
-#include <linux/mmc/sdio_func.h>
-#include <linux/mmc/sdio_ids.h>
-#include "TxnDefs.h"
-
-#define TI_SDIO_DEBUG
-
-#define TIWLAN_MMC_MAX_DMA                 8192
-
-int wifi_set_carddetect( int on );
-
-static struct sdio_func *tiwlan_func = NULL;
-static struct completion sdio_wait;
-
-ETxnStatus sdioAdapt_TransactBytes (unsigned int  uFuncId,
-                                    unsigned int  uHwAddr,
-                                    void *        pHostAddr,
-                                    unsigned int  uLength,
-                                    unsigned int  bDirection,
-                                    unsigned int  bMore);
-
-static int sdio_wifi_probe(struct sdio_func *func,
-                           const struct sdio_device_id *id)
-{
-        int rc;
-
-        printk("%s: %d\n", __FUNCTION__, func->class);
-
-        if (func->class != SDIO_CLASS_WLAN)
-                return -EINVAL;
-
-        sdio_claim_host(func);
-
-        rc = sdio_enable_func(func);
-        if (rc)
-                goto err1;
-        rc = sdio_set_block_size(func, 512);
-
-        if (rc) {
-                printk("%s: Unable to set blocksize\n", __FUNCTION__);
-                goto err2;
-        }
-
-        tiwlan_func = func;
-        complete(&sdio_wait);
-        return 0;
-err2:
-        sdio_disable_func(func);
-err1:
-        sdio_release_host(func);
-        complete(&sdio_wait);
-        return rc;
-}
-
-static void sdio_wifi_remove(struct sdio_func *func)
-{
-}
-
-static const struct sdio_device_id sdio_wifi_ids[] = {
-        { SDIO_DEVICE_CLASS(SDIO_CLASS_WLAN)    },
-        {                                       },
-};
-
-MODULE_DEVICE_TABLE(sdio, sdio_wifi_ids);
-
-static struct sdio_driver sdio_wifi_driver = {
-        .probe          = sdio_wifi_probe,
-        .remove         = sdio_wifi_remove,
-        .name           = "sdio_wifi",
-        .id_table       = sdio_wifi_ids,
-};
-
-ETxnStatus sdioAdapt_TransactBytes (unsigned int  uFuncId,
-                                    unsigned int  uHwAddr,
-                                    void *        pHostAddr,
-                                    unsigned int  uLength,
-                                    unsigned int  bDirection,
-                                    unsigned int  bMore);
-
-int sdioAdapt_ConnectBus (void *        fCbFunc,
-                          void *        hCbArg,
-                          unsigned int  uBlkSizeShift,
-                          unsigned int  uSdioThreadPriority,
-                          unsigned char **pTxDmaSrcAddr)
-{
-	int rc;
-
-	init_completion(&sdio_wait);
-	wifi_set_carddetect( 1 );
-	rc = sdio_register_driver(&sdio_wifi_driver);
-	if (rc < 0) {
-		printk(KERN_ERR "%s: Fail to register sdio_wifi_driver\n", __func__);
-		return rc;
-	}
-	if (!wait_for_completion_timeout(&sdio_wait, msecs_to_jiffies(10000))) {
-		printk(KERN_ERR "%s: Timed out waiting for device detect\n", __func__);
-		sdio_unregister_driver(&sdio_wifi_driver);
-		return -ENODEV;
-	}
-	/* Provide the DMA buffer address to the upper layer so it will use it as the transactions host buffer. */
-	if (pTxDmaSrcAddr) { /* Dm: check what to do with it */
-		*pTxDmaSrcAddr = kmalloc(TIWLAN_MMC_MAX_DMA, GFP_KERNEL | GFP_DMA);
-	}
-	return 0;
-}
-
-int sdioAdapt_DisconnectBus (void)
-{
-	if (tiwlan_func) {
-		sdio_disable_func( tiwlan_func );
-		sdio_release_host( tiwlan_func );
-	}
-	wifi_set_carddetect( 0 );
-	sdio_unregister_driver(&sdio_wifi_driver);
-	return 0;
-}
-
-ETxnStatus sdioAdapt_TransactBytes (unsigned int  uFuncId,
-                                    unsigned int  uHwAddr,
-                                    void *        pHostAddr,
-                                    unsigned int  uLength,
-                                    unsigned int  bDirection,
-                                    unsigned int  bMore)
-{
-	unsigned char *pData = pHostAddr;
-	unsigned int i;
-	int rc = 0, final_rc = 0;
-
-	for (i = 0; i < uLength; i++) {
-		if( bDirection ) {
-			if (uFuncId == 0)
-				*pData = (unsigned char)sdio_f0_readb(tiwlan_func, uHwAddr, &rc);
-			else
-				*pData = (unsigned char)sdio_readb(tiwlan_func, uHwAddr, &rc);
-		}
-		else {
-			if (uFuncId == 0)
-				sdio_f0_writeb(tiwlan_func, *pData, uHwAddr, &rc);
-			else
-				sdio_writeb(tiwlan_func, *pData, uHwAddr, &rc);
-		}
-		if( rc ) {
-			final_rc = rc;
-		}
-#ifdef TI_SDIO_DEBUG
-		printk(KERN_INFO "%c52: [0x%x](%u) %c 0x%x\n", (bDirection ? 'R' : 'W'), uHwAddr, uLength, (bDirection ? '=' : '<'), (unsigned)*pData);
-#endif
-		uHwAddr++;
-		pData++;
-	}
-	/* If failed return ERROR, if succeeded return COMPLETE */
-	if (final_rc) {
-		return TXN_STATUS_ERROR;
-	}
-	return TXN_STATUS_COMPLETE;
-}
-
-ETxnStatus sdioAdapt_Transact (unsigned int  uFuncId,
-                               unsigned int  uHwAddr,
-                               void *        pHostAddr,
-                               unsigned int  uLength,
-                               unsigned int  bDirection,
-                               unsigned int  bBlkMode,
-                               unsigned int  bFixedAddr,
-                               unsigned int  bMore)
-{
-	int rc;
-
-	if (uFuncId == 0)
-		return sdioAdapt_TransactBytes (uFuncId, uHwAddr, pHostAddr,
-						uLength, bDirection, bMore);
-	if (bDirection) {
-		if (bFixedAddr)
-			rc = sdio_memcpy_fromio(tiwlan_func, pHostAddr, uHwAddr, uLength);
-		else
-			rc = sdio_readsb(tiwlan_func, pHostAddr, uHwAddr, uLength);
-
-	}
-	else {
-		if (bFixedAddr)
-			rc = sdio_memcpy_toio(tiwlan_func, uHwAddr, pHostAddr, uLength);
-		else
-			rc = sdio_writesb(tiwlan_func, uHwAddr, pHostAddr, uLength);
-	}
-#ifdef TI_SDIO_DEBUG
-	if (uLength == 1)
-	        printk(KERN_INFO "%c53: [0x%x](%u) %c 0x%x\n", (bDirection ? 'R' : 'W'), uHwAddr, uLength, (bDirection ? '=' : '<'), (unsigned)(*(char *)pHostAddr));
-	else if (uLength == 2)
-	        printk(KERN_INFO "%c53: [0x%x](%u) %c 0x%x\n", (bDirection ? 'R' : 'W'), uHwAddr, uLength, (bDirection ? '=' : '<'), (unsigned)(*(short *)pHostAddr));
-	else if (uLength == 4)
-	        printk(KERN_INFO "%c53: [0x%x](%u) %c 0x%x\n", (bDirection ? 'R' : 'W'), uHwAddr, uLength, (bDirection ? '=' : '<'), (unsigned)(*(long *)pHostAddr));
-	else
-		printk(KERN_INFO "%c53: [0x%x](%u) F[%d] B[%d] I[%d] = %d\n", (bDirection ? 'R' : 'W'), uHwAddr, uLength, uFuncId, bBlkMode, bFixedAddr, rc);
-#endif
-	/* If failed return ERROR, if succeeded return COMPLETE */
-	if (rc) {
-		return TXN_STATUS_ERROR;
-	}
-	return TXN_STATUS_COMPLETE;
-}
-
-#else
-
-#include "SdioDrvDbg.h"
-#include "TxnDefs.h"
-#include "SdioAdapter.h"
-#include "SdioDrv.h"
-#include "bmtrace_api.h"
-#include <linux/slab.h>
-
-#ifdef SDIO_1_BIT /* see also in SdioDrv.c */
-#define SDIO_BITS_CODE   0x80 /* 1 bits */
-#else
-#define SDIO_BITS_CODE   0x82 /* 4 bits */
-#endif
-
-static unsigned char *pDmaBufAddr = 0;
-
-/************************************************************************
- * Defines
- ************************************************************************/
-/* Sync/Async Threshold */
-#ifdef FULL_ASYNC_MODE
-#define SYNC_ASYNC_LENGTH_THRESH	0     /* Use Async for all transactions */
-#else
-#define SYNC_ASYNC_LENGTH_THRESH	360   /* Use Async for transactions longer than this threshold (in bytes) */
-#endif
-
-#define MAX_RETRIES                 10
-
-#define MAX_BUS_TXN_SIZE            8192  /* Max bus transaction size in bytes (for the DMA buffer allocation) */
-
-/* For block mode configuration */
-#define FN0_FBR2_REG_108                    0x210
-#define FN0_FBR2_REG_108_BIT_MASK           0xFFF
-
-int sdioAdapt_ConnectBus (void *        fCbFunc,
-                          void *        hCbArg,
-                          unsigned int  uBlkSizeShift,
-                          unsigned int  uSdioThreadPriority,
-                          unsigned char **pRxDmaBufAddr,
-                          unsigned int  *pRxDmaBufLen,
-                          unsigned char **pTxDmaBufAddr,
-                          unsigned int  *pTxDmaBufLen)
-{
-	unsigned char  uByte;
-	unsigned long  uLong;
-	unsigned long  uCount = 0;
-	unsigned int   uBlkSize = 1 << uBlkSizeShift;
-	int            iStatus;
-
-	if (uBlkSize < SYNC_ASYNC_LENGTH_THRESH)
-	{
-		PERR1("%s(): Block-Size should be bigger than SYNC_ASYNC_LENGTH_THRESH!!\n", __FUNCTION__ );
-	}
-
-	/* Enabling clocks if thet are not enabled */
-	sdioDrv_clk_enable();
-
-	/* Allocate a DMA-able buffer and provide it to the upper layer to be used for all read and write transactions */
-	if (pDmaBufAddr == 0) /* allocate only once (in case this function is called multiple times) */
-	{
-		pDmaBufAddr = kmalloc(MAX_BUS_TXN_SIZE, GFP_KERNEL | GFP_DMA);
-		if (pDmaBufAddr == 0)
-		{
-			iStatus = -1;
-			goto fail;
-		}
-	}
-	*pRxDmaBufAddr = *pTxDmaBufAddr = pDmaBufAddr;
-	*pRxDmaBufLen  = *pTxDmaBufLen  = MAX_BUS_TXN_SIZE;
-
-	/* Init SDIO driver and HW */
-	iStatus = sdioDrv_ConnectBus (fCbFunc, hCbArg, uBlkSizeShift, uSdioThreadPriority);
-	if (iStatus) { goto fail; }
-
-	/* Send commands sequence: 0, 5, 3, 7 */
-	iStatus = sdioDrv_ExecuteCmd (SD_IO_GO_IDLE_STATE, 0, MMC_RSP_NONE, &uByte, sizeof(uByte));
-	if (iStatus)
-	{
-		printk("%s %d command number: %d failed\n", __FUNCTION__, __LINE__, SD_IO_GO_IDLE_STATE);
-		goto fail;
-	}
-
-	iStatus = sdioDrv_ExecuteCmd (SDIO_CMD5, VDD_VOLTAGE_WINDOW, MMC_RSP_R4, &uByte, sizeof(uByte));
-	if (iStatus) {
-		printk("%s %d command number: %d failed\n", __FUNCTION__, __LINE__, SDIO_CMD5);
-		goto fail;
-	}
-
-	iStatus = sdioDrv_ExecuteCmd (SD_IO_SEND_RELATIVE_ADDR, 0, MMC_RSP_R6, &uLong, sizeof(uLong));
-	if (iStatus) {
-		printk("%s %d command number: %d failed\n", __FUNCTION__, __LINE__, SD_IO_SEND_RELATIVE_ADDR);
-		goto fail;
-	}
-
-	iStatus = sdioDrv_ExecuteCmd (SD_IO_SELECT_CARD, uLong, MMC_RSP_R6, &uByte, sizeof(uByte));
-	if (iStatus) {
-		printk("%s %d command number: %d failed\n", __FUNCTION__, __LINE__, SD_IO_SELECT_CARD);
-		goto fail;
-	}
-
-    /* NOTE:
-     * =====
-     * Each of the following loops is a workaround for a HW bug that will be solved in PG1.1 !!
-     * Each write of CMD-52 to function-0 should use it as follows:
-     * 1) Write the desired byte using CMD-52
-     * 2) Read back the byte using CMD-52
-     * 3) Write two dummy bytes to address 0xC8 using CMD-53
-     * 4) If the byte read in step 2 is different than the written byte repeat the sequence
-     */
-
-	/* set device side bus width to 4 bit (for 1 bit write 0x80 instead of 0x82) */
-	do
-	{
-		uByte = SDIO_BITS_CODE;
-		iStatus = sdioDrv_WriteSyncBytes (TXN_FUNC_ID_CTRL, CCCR_BUS_INTERFACE_CONTOROL, &uByte, 1, 1);
-		if (iStatus) { goto fail; }
-
-		iStatus = sdioDrv_ReadSyncBytes (TXN_FUNC_ID_CTRL, CCCR_BUS_INTERFACE_CONTOROL, &uByte, 1, 1);
-		if (iStatus) { goto fail; }
-        
-		iStatus = sdioDrv_WriteSync (TXN_FUNC_ID_CTRL, 0xC8, &uLong, 2, 1, 1);
-		if (iStatus) { goto fail; }
-
-		uCount++;
-
-	} while ((uByte != SDIO_BITS_CODE) && (uCount < MAX_RETRIES));
-
-	uCount = 0;
-
-	/* allow function 2 */
-	do
-	{
-		uByte = 4;
-		iStatus = sdioDrv_WriteSyncBytes (TXN_FUNC_ID_CTRL, CCCR_IO_ENABLE, &uByte, 1, 1);
-		if (iStatus) { goto fail; }
-
-		iStatus = sdioDrv_ReadSyncBytes (TXN_FUNC_ID_CTRL, CCCR_IO_ENABLE, &uByte, 1, 1);
-		if (iStatus) { goto fail; }
-        
-		iStatus = sdioDrv_WriteSync (TXN_FUNC_ID_CTRL, 0xC8, &uLong, 2, 1, 1);
-		if (iStatus) { goto fail; }
-
-		uCount++;
-
-	} while ((uByte != 4) && (uCount < MAX_RETRIES));
-
-
-#ifdef SDIO_IN_BAND_INTERRUPT
-
-	uCount = 0;
-
-	do
-	{
-		uByte = 3;
-		iStatus = sdioDrv_WriteSyncBytes (TXN_FUNC_ID_CTRL, CCCR_INT_ENABLE, &uByte, 1, 1);
-		if (iStatus) { goto fail; }
-
-		iStatus = sdioDrv_ReadSyncBytes (TXN_FUNC_ID_CTRL, CCCR_INT_ENABLE, &uByte, 1, 1);
-		if (iStatus) { goto fail; }
-
-		iStatus = sdioDrv_WriteSync (TXN_FUNC_ID_CTRL, 0xC8, &uLong, 2, 1, 1);
-		if (iStatus) { goto fail; }
-
-		uCount++;
-
-	} while ((uByte != 3) && (uCount < MAX_RETRIES));
-
-
-#endif
-
-	uCount = 0;
-
-	/* set block size for SDIO block mode */
-	do
-	{
-		uLong = uBlkSize;
-		iStatus = sdioDrv_WriteSync (TXN_FUNC_ID_CTRL, FN0_FBR2_REG_108, &uLong, 2, 1, 1);
-		if (iStatus) { goto fail; }
-
-		iStatus = sdioDrv_ReadSync (TXN_FUNC_ID_CTRL, FN0_FBR2_REG_108, &uLong, 2, 1, 1);
-		if (iStatus) { goto fail; }
-
-		iStatus = sdioDrv_WriteSync (TXN_FUNC_ID_CTRL, 0xC8, &uLong, 2, 1, 1);
-		if (iStatus) { goto fail; }
-
-		uCount++;
-
-	} while (((uLong & FN0_FBR2_REG_108_BIT_MASK) != uBlkSize) && (uCount < MAX_RETRIES));
-
-	if (uCount >= MAX_RETRIES)
-	{
-		/* Failed to write CMD52_WRITE to function 0 */
-		iStatus = (int)uCount;
-	}
-
-fail:
-	/* Disable the clocks for now */
-	sdioDrv_clk_disable();
-
-	return iStatus;
-}
-
-
-int sdioAdapt_DisconnectBus (void)
-{
-	if (pDmaBufAddr)
-	{
-		kfree (pDmaBufAddr);
-		pDmaBufAddr = 0;
-	}
-
-	return sdioDrv_DisconnectBus ();
-}
-
-ETxnStatus sdioAdapt_Transact (unsigned int  uFuncId,
-                               unsigned int  uHwAddr,
-                               void *        pHostAddr,
-                               unsigned int  uLength,
-                               unsigned int  bDirection,
-                               unsigned int  bBlkMode,
-                               unsigned int  bFixedAddr,
-                               unsigned int  bMore)
-{
-	int iStatus;
-
-	/* If transction length is below threshold, use Sync methods */
-	if (uLength < SYNC_ASYNC_LENGTH_THRESH)
-	{
-		/* Call read or write Sync method */
-		if (bDirection)
-		{
-			CL_TRACE_START_L2();
-			iStatus = sdioDrv_ReadSync (uFuncId, uHwAddr, pHostAddr, uLength, bFixedAddr, bMore);
-			CL_TRACE_END_L2("tiwlan_drv.ko", "INHERIT", "SDIO", ".ReadSync");
-		}
-		else
-		{
-			CL_TRACE_START_L2();
-			iStatus = sdioDrv_WriteSync (uFuncId, uHwAddr, pHostAddr, uLength, bFixedAddr, bMore);
-			CL_TRACE_END_L2("tiwlan_drv.ko", "INHERIT", "SDIO", ".WriteSync");
-		}
-
-		/* If failed return ERROR, if succeeded return COMPLETE */
-		if (iStatus)
-		{
-			return TXN_STATUS_ERROR;
-		}
-		return TXN_STATUS_COMPLETE;
-	}
-
-	/* If transction length is above threshold, use Async methods */
-	else
-	{
-		/* Call read or write Async method */
-		if (bDirection)
-		{
-			CL_TRACE_START_L2();
-			iStatus = sdioDrv_ReadAsync (uFuncId, uHwAddr, pHostAddr, uLength, bBlkMode, bFixedAddr, bMore);
-			CL_TRACE_END_L2("tiwlan_drv.ko", "INHERIT", "SDIO", ".ReadAsync");
-		}
-		else
-		{
-			CL_TRACE_START_L2();
-			iStatus = sdioDrv_WriteAsync (uFuncId, uHwAddr, pHostAddr, uLength, bBlkMode, bFixedAddr, bMore);
-			CL_TRACE_END_L2("tiwlan_drv.ko", "INHERIT", "SDIO", ".WriteAsync");
-		}
-
-		/* If failed return ERROR, if succeeded return PENDING */
-		if (iStatus)
-		{
-			return TXN_STATUS_ERROR;
-		}
-		return TXN_STATUS_PENDING;
-	}
-}
-         
-ETxnStatus sdioAdapt_TransactBytes (unsigned int  uFuncId,
-                                    unsigned int  uHwAddr,
-                                    void *        pHostAddr,
-                                    unsigned int  uLength,
-                                    unsigned int  bDirection,
-                                    unsigned int  bMore)
-{
-	static unsigned int lastMore = 0;
-	int iStatus;
-
-	if ((bMore == 1) || (lastMore == bMore))
-	{
-		sdioDrv_cancel_inact_timer();
-		sdioDrv_clk_enable();
-	}
-
-	/* Call read or write bytes Sync method */
-	if (bDirection)
-	{
-		iStatus = sdioDrv_ReadSyncBytes (uFuncId, uHwAddr, pHostAddr, uLength, bMore);
-	}
-	else
-	{
-		iStatus = sdioDrv_WriteSyncBytes (uFuncId, uHwAddr, pHostAddr, uLength, bMore);
-	}
-
-	if (bMore == 0)
-	{
-		sdioDrv_start_inact_timer();
-	}
-	lastMore = bMore;
-
-	/* If failed return ERROR, if succeeded return COMPLETE */
-	if (iStatus)
-	{
-		return TXN_STATUS_ERROR;
-	}
-	return TXN_STATUS_COMPLETE;
-}
-#endif
diff --git a/wl1271/platforms/hw/linux/SdioAdapter.h b/wl1271/platforms/hw/linux/SdioAdapter.h
deleted file mode 100644
index dacdcd5..0000000
--- a/wl1271/platforms/hw/linux/SdioAdapter.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * SdioAdapter.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file   SdioAdapter.h 
- *  \brief  SDIO adapter module API definition                                  
- *
- *  \see    SdioAdapter.c
- */
-
-#ifndef __SDIO_ADAPT_API_H__
-#define __SDIO_ADAPT_API_H__
-
-
-#include "TxnDefs.h"
-
-
-/************************************************************************
- * Defines
- ************************************************************************/
-
-/************************************************************************
- * Types
- ************************************************************************/
-
-/************************************************************************
- * Functions
- ************************************************************************/
-/** \brief	sdioAdapt_ConnectBus: Init SDIO driver and HW
- * 
- * \param  fCbFunc       - The bus driver's callback upon async transaction completion
- * \param  hCbArg        - The CB function handle
- * \param  uBlkSizeShift - In block-mode:   BlkSize = (1 << uBlkSizeShift)
- * \param  uSdioThreadPriority - The SDIO interrupt handler thread priority
- * \param  pRxDmaBufAddr - Pointer for providing the Rx DMA buffer address to the upper layers to use it directly
- * \param  pRxDmaBufLen  - The Rx DMA buffer length in bytes
- * \param  pTxDmaBufAddr - Pointer for providing the Tx DMA buffer address to the upper layers to use it directly
- * \param  pTxDmaBufLen  - The Tx DMA buffer length in bytes
- * \return 0 = OK, otherwise = error
- * 
- * \par Description
- * Called by BusDrv to initialize the SDIO driver and HW.
- *
- * \sa
- */ 
-int        sdioAdapt_ConnectBus    (void *        fCbFunc,
-                                    void *        hCbArg,
-                                    unsigned int  uBlkSizeShift,
-                                    unsigned int  uSdioThreadPriority,
-                                    unsigned char **pRxDmaBufAddr,
-                                    unsigned int  *pRxDmaBufLen,
-                                    unsigned char **pTxDmaBufAddr,
-                                    unsigned int  *pTxDmaBufLen);
-
-/** \brief	sdioAdapt_DisconnectBus: Disconnect SDIO driver
- * 
- * \param  void
- * \return 0 = OK, otherwise = error
- * 
- * \par Description
- * Called by BusDrv. Disconnect the SDIO driver.
- *
- * \sa
- */ 
-int        sdioAdapt_DisconnectBus (void);
-/** \brief	sdioAdapt_Transact: Process transaction
- * 
- * \param  uFuncId    - SDIO function ID (1- BT, 2 - WLAN)
- * \param  uHwAddr    - HW address where to write the data
- * \param  pHostAddr  - The data buffer to write from or read into
- * \param  uLength    - The data length in bytes
- * \param  bDirection - TRUE = Read,  FALSE = Write
- * \param  bBlkMode   - If TRUE - use block mode
- * \param  bMore      - If TRUE, more transactions are expected so don't turn off any HW
- * \return COMPLETE if Txn completed in this context, PENDING if not, ERROR if failed
- *
- * \par Description
- * Called by the BusDrv module to issue an SDIO transaction.
- * Call write or read SDIO-driver function according to the direction.
- * Use Sync or Async method according to the transaction length
- * 
- * \note   It's assumed that this function is called only when idle (i.e. previous Txn is done).
- * 
- * \sa
- */ 
-ETxnStatus sdioAdapt_Transact      (unsigned int  uFuncId,
-                                    unsigned int  uHwAddr,
-                                    void *        pHostAddr,
-                                    unsigned int  uLength,
-                                    unsigned int  bDirection,
-                                    unsigned int  bBlkMode,
-                                    unsigned int  bFixedAddr,
-                                    unsigned int  bMore);
-/** \brief	sdioAdapt_TransactBytes: Process bytes transaction
- * 
- * \param  uFuncId    - SDIO function ID (1- BT, 2 - WLAN)
- * \param  uHwAddr    - HW address where to write the data
- * \param  pHostAddr  - The data buffer to write from or read into
- * \param  uLength    - The data length in bytes
- * \param  bDirection - TRUE = Read,  FALSE = Write
- * \param  bMore      - If TRUE, more transactions are expected so don't turn off any HW
- * \return COMPLETE if Txn succeeded, ERROR if failed
- *
- * \par Description
- * Called by the BusDrv module to issue a bytes stream SDIO transaction.
- * Call write or read SDIO-driver Sync function according to the direction.
- * 
- * \note   It's assumed that this function is called only when idle (i.e. previous Txn is done).
- * 
- * \sa
- */ 
-ETxnStatus sdioAdapt_TransactBytes (unsigned int  uFuncId,
-                                    unsigned int  uHwAddr,
-                                    void *        pHostAddr,
-                                    unsigned int  uLength,
-                                    unsigned int  bDirection,
-                                    unsigned int  bMore);
-
-
-
-#endif /*__SDIO_ADAPT_API_H__*/
diff --git a/wl1271/platforms/hw/linux/host_platform.c b/wl1271/platforms/hw/linux/host_platform.c
deleted file mode 100644
index 2f95c6d..0000000
--- a/wl1271/platforms/hw/linux/host_platform.c
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * host_platform.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#include "tidef.h"
-#include <linux/kernel.h>
-#include <asm/io.h>
-#include <linux/delay.h>
-#include <linux/platform_device.h>
-#include <linux/wifi_tiwlan.h>
-
-#include "host_platform.h"
-#include "ioctl_init.h"
-#include "WlanDrvIf.h"
-#include "Device1273.h"
-
-#define OS_API_MEM_ADDR		0x0000000
-#define OS_API_REG_ADDR		0x0300000
-#define SDIO_ATTEMPT_LONGER_DELAY_LINUX  150
-
-static struct wifi_platform_data *wifi_control_data = NULL;
-static struct resource *wifi_irqres = NULL;
-
-static int wifi_probe( struct platform_device *pdev )
-{
-	struct wifi_platform_data *wifi_ctrl = (struct wifi_platform_data *)(pdev->dev.platform_data);
-
-	/* printk("%s\n", __FUNCTION__); */
-	wifi_irqres = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "device_wifi_irq");
-#if 0
-	if (wifi_irqres) {
-		printk("wifi_irqres->start = %lu\n", (unsigned long)(wifi_irqres->start));
-		printk("wifi_irqres->flags = %lx\n", wifi_irqres->flags);
-	}
-#endif
-	if( wifi_ctrl ) {
-		wifi_control_data = wifi_ctrl;
-#if 0
-		if( wifi_ctrl->set_power )
-			wifi_ctrl->set_power(1);	/* Power On */
-		if( wifi_ctrl->set_reset )
-			wifi_ctrl->set_reset(0);	/* Reset clear */
-		if( wifi_ctrl->set_carddetect )
-			wifi_ctrl->set_carddetect(1);	/* CardDetect (0->1) */
-#endif
-	}
-	return 0;
-}
-											
-static int wifi_remove( struct platform_device *pdev )
-{
-	struct wifi_platform_data *wifi_ctrl = (struct wifi_platform_data *)(pdev->dev.platform_data);
-
-	/* printk("%s\n", __FUNCTION__); */
-	if( wifi_ctrl ) {
-		if( wifi_ctrl->set_carddetect )
-			wifi_ctrl->set_carddetect(0);	/* CardDetect (1->0) */
-		if( wifi_ctrl->set_reset )
-			wifi_ctrl->set_reset(1);	/* Reset active */
-		if( wifi_ctrl->set_power )
-			wifi_ctrl->set_power(0);	/* Power Off */
-	}
-	return 0;
-}
-
-static struct platform_driver wifi_device = {
-	.probe          = wifi_probe,
-	.remove         = wifi_remove,
-	.suspend        = NULL,
-	.resume         = NULL,
-	.driver         = {
-		.name   = "device_wifi",
-	},
-};
-
-static int wifi_add_dev( void )
-{
-	/* printk("%s\n", __FUNCTION__); */
-	return platform_driver_register( &wifi_device );
-}
-
-static void wifi_del_dev( void )
-{
-	/* printk("%s\n", __FUNCTION__); */
-	platform_driver_unregister( &wifi_device );
-}
-
-int wifi_set_carddetect( int on )
-{
-	/* printk("%s = %d\n", __FUNCTION__, on); */
-	if( wifi_control_data && wifi_control_data->set_carddetect ) {
-		wifi_control_data->set_carddetect(on);
-	}
-	return 0;
-}
-
-int wifi_set_power( int on, unsigned long msec )
-{
-	/* printk("%s = %d\n", __FUNCTION__, on); */
-	if( wifi_control_data && wifi_control_data->set_power ) {
-		wifi_control_data->set_power(on);
-	}
-	else {
-		gpio_set_value(PMENA_GPIO, on);
-	}
-	if( msec )
-		mdelay(msec);
-	return 0;
-}
-
-int wifi_set_reset( int on, unsigned long msec )
-{
-	/* printk("%s = %d\n", __FUNCTION__, on); */
-	if( wifi_control_data && wifi_control_data->set_reset ) {
-		wifi_control_data->set_reset(on);
-	}
-	if( msec )
-		mdelay(msec);
-	return 0;
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name: hPlatform_hardResetTnetw
-Routine Description: set the GPIO to low after awaking the TNET from ELP.
-Arguments: None
-Return Value: 0 - Ok
------------------------------------------------------------------------------*/
-
-int hPlatform_hardResetTnetw( void )
-{
-	int err;
-
-	/* Turn power OFF */
-	if ((err = wifi_set_power(0, 15)) == 0) {
-		/* Turn power ON*/
-		err = wifi_set_power(1, 70);
-	}
-	return err;
-} /* hPlatform_hardResetTnetw() */
-
-/* Turn device power off */
-int hPlatform_DevicePowerOff( void )
-{
-	int err;
-
-	err = wifi_set_power(0, 15);
-	return err;
-}
-
-
-/* Turn device power off according to a given delay */
-int hPlatform_DevicePowerOffSetLongerDelay(void)
-{
-    int err;
-    
-    err = wifi_set_power(0, SDIO_ATTEMPT_LONGER_DELAY_LINUX);
-    
-    return err;
-}
-
-/* Turn device power on */
-int hPlatform_DevicePowerOn( void )
-{
-	int err;
-
-	wifi_set_power(1, 15); /* Fixed power sequence */
-	wifi_set_power(0, 1);
-	/* Should not be changed, 50 msec cause failures */
-	err = wifi_set_power(1, 70);
-	return err;
-}
-
-/*---------------------------------------------------------------------------*/
-
-int hPlatform_Wlan_Hardware_Init(void *tnet_drv)
-{
-	TWlanDrvIfObj *drv = tnet_drv;
-
-	printk("%s\n", __FUNCTION__);
-	wifi_add_dev();
-	if (wifi_irqres) {
-		drv->irq = wifi_irqres->start;
-		drv->irq_flags = wifi_irqres->flags & IRQF_TRIGGER_MASK;
-	}
-	else {
-		drv->irq = TNETW_IRQ;
-		drv->irq_flags = (unsigned long)IRQF_TRIGGER_FALLING;
-	}
-	return 0;
-}
-
-/*-----------------------------------------------------------------------------
-
-Routine Name:
-
-        InitInterrupt
-
-Routine Description:
-
-        this function init the interrupt to the Wlan ISR routine.
-
-Arguments:
-
-        tnet_drv - Golbal Tnet driver pointer.
-
-Return Value:
-
-        status
-
------------------------------------------------------------------------------*/
-
-int hPlatform_initInterrupt( void *tnet_drv, void* handle_add )
-{
-	TWlanDrvIfObj *drv = tnet_drv;
-	int rc;
-	
-	if (drv->irq == 0 || handle_add == NULL)
-	{
-		print_err("hPlatform_initInterrupt() bad param drv->irq=%d handle_add=0x%x !!!\n",drv->irq,(int)handle_add);
-		return -EINVAL;
-	}
-	printk("drv->irq = %u, %lx\n", drv->irq, drv->irq_flags);
-	if ((rc = request_irq(drv->irq, handle_add, drv->irq_flags, drv->netdev->name, drv)))
-	{
-		print_err("TIWLAN: Failed to register interrupt handler\n");
-		return rc;
-	}
-	set_irq_wake(drv->irq, 1);	
-	return rc;
-
-} /* hPlatform_initInterrupt() */
-
-/*--------------------------------------------------------------------------------------*/
-
-void hPlatform_freeInterrupt( void *tnet_drv )
-{
-	TWlanDrvIfObj *drv = tnet_drv;
-
-	set_irq_wake(drv->irq, 0);
-	free_irq(drv->irq, drv);
-}
-
-/****************************************************************************************
- *                        hPlatform_hwGetRegistersAddr()                                 
- ****************************************************************************************
-DESCRIPTION:	
-
-ARGUMENTS:		
-
-RETURN:			
-
-NOTES:         	
-*****************************************************************************************/
-void *hPlatform_hwGetRegistersAddr(TI_HANDLE OsContext)
-{
-	return (void *)OS_API_REG_ADDR;
-}
-
-/****************************************************************************************
- *                        hPlatform_hwGetMemoryAddr()                                 
- ****************************************************************************************
-DESCRIPTION:	
-
-ARGUMENTS:		
-
-RETURN:			
-
-NOTES:         	
-*****************************************************************************************/
-void *hPlatform_hwGetMemoryAddr(TI_HANDLE OsContext)
-{
-	return (void *)OS_API_MEM_ADDR;
-}
-
-
-void hPlatform_Wlan_Hardware_DeInit(void)
-{
-	wifi_del_dev();
-}
diff --git a/wl1271/platforms/hw/linux/host_platform.h b/wl1271/platforms/hw/linux/host_platform.h
deleted file mode 100644
index db9d6b0..0000000
--- a/wl1271/platforms/hw/linux/host_platform.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * host_platform.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*--------------------------------------------------------------------------
- Module:      host_platform_sdio.h
-
- Purpose:     This module defines unified interface to the host platform specific
-              sources and services.
-
---------------------------------------------------------------------------*/
-
-#ifndef __HOST_PLATFORM_SDIO__H__
-#define __HOST_PLATFORM_SDIO__H__
-
-#include <mach/hardware.h>
-
-
-#define OMAP_HSMMC1_BASE		0x4809C000
-#define OMAP_HSMMC2_BASE		0x480B4000
-#define OMAP_HSMMC3_BASE		0x480AD000
-
-#if 0
-#define CONTROL_PADCONF_CAM_D1		0x48002118	/* WLAN_EN */
-#define CONTROL_PADCONF_MCBSP1_CLKX	0x48002198	/* WLAN_IRQ */
-
-#define CONTROL_PADCONF_MMC3_CLK   	0x480025D8	/* mmc3_cmd */
-#define CONTROL_PADCONF_MMC3_CMD   	0x480021D0	/* mmc3_cmd */
-
-#define CONTROL_PADCONF_MMC3_DAT0	0x480025E4	/* mmc3_dat0, mmc3_dat1 */
-#define CONTROL_PADCONF_MMC3_DAT2	0x480025E8	/* mmc3_dat2 */
-#define CONTROL_PADCONF_MMC3_DAT3	0x480025E0	/* mmc3_dat3 */
-#endif
-
-#define INT_MMC2_IRQ			86
-#define INT_MMC3_IRQ			94
-
-/* Zoom2 */
-#define PMENA_GPIO                      101
-#define IRQ_GPIO                        162
-
-/* Sholes */
-/*
-#define PMENA_GPIO                      186
-#define IRQ_GPIO                        65
-*/
-
-#define TNETW_IRQ                       (OMAP_GPIO_IRQ(IRQ_GPIO))
-#define TIWLAN_IRQ_POLL_INTERVAL	HZ/100
-#define HZ_IN_MSEC			HZ/1000
-#define TIWLAN_IRQ_POLL_INTERVAL_MS	TIWLAN_IRQ_POLL_INTERVAL/HZ_IN_MSEC
-
-int 
-hPlatform_initInterrupt(
-	void* tnet_drv,
-	void* handle_add
-	);
-
-void*
-hPlatform_hwGetRegistersAddr(
-    TI_HANDLE OsContext
-    );
-
-void*
-hPlatform_hwGetMemoryAddr(
-    TI_HANDLE OsContext
-    );
-
-void hPlatform_freeInterrupt(void *tnet_drv);
-
-int  hPlatform_hardResetTnetw(void);
-int  hPlatform_Wlan_Hardware_Init(void *tnet_drv);
-void hPlatform_Wlan_Hardware_DeInit(void);
-int  hPlatform_DevicePowerOff(void);
-int  hPlatform_DevicePowerOffSetLongerDelay(void);
-int  hPlatform_DevicePowerOn(void);
-#endif /* __HOST_PLATFORM_SDIO__H__ */
diff --git a/wl1271/platforms/os/common/build/linux/Makefile b/wl1271/platforms/os/common/build/linux/Makefile
deleted file mode 100644
index 9e92d2a..0000000
--- a/wl1271/platforms/os/common/build/linux/Makefile
+++ /dev/null
@@ -1,135 +0,0 @@
-
-##
-##
-## File lists and locations
-##
-##
-
-#
-# DK_ROOT must be set prior to including common.inc
-#
-DK_ROOT = ../../../../..
-
-#
-# Includes common definitions and source file list
-#
-ifneq ($(KERNELRELEASE),)
-    include $(M)/$(DK_ROOT)/stad/build/linux/common.inc
-    include $(M)/$(DK_ROOT)/platforms/os/common/build/linux/os_sources.inc
-else
-    include $(DK_ROOT)/stad/build/linux/common.inc
-    include $(DK_ROOT)/platforms/os/common/build/linux/os_sources.inc
-endif
-
-
-#
-# List of platform independent OS files needed to be compiled
-#
-OS_SRCS = \
-    $(DK_ROOT)/platforms/os/common/src/osRgstry.c \
-    $(COMSRC)/Ctrl_Interface/CmdHndlr.c \
-
-ifeq ($(TI_TRACE_BUFFER),y)
-   OS_SRCS += $(DK_ROOT)/platforms/os/common/src/tracebuf.c
-endif
-
-OS_OBJS = $(patsubst %.c, %.o, $(OS_SRCS))
-
-#
-# OS include paths required for compilation.
-# 
-OS_INCS = $(DK_ROOT)/platforms/os/linux/inc $(DK_ROOT)/platforms/os/linux/src $(DK_ROOT)/platforms/os/common/inc
-
-#
-# Location and filename of the OS .lib file created by this makefile.
-#
-OUTPUT_DIR = $(DK_ROOT)/platforms/os/common/build/linux
-OUTPUT_FILE = $(OUTPUT_DIR)/libuadrv.a
-
-
-
-
-
-##
-##
-## Build process
-##
-##
-
-ifneq ($(KERNELRELEASE),)
-
-
-	##
-	##
-	## This is the kernel build phase - set the appropriate arguments
-    ##
-    ##
-
-	#
-	# Adds the current directory as a prefix to all include directories.
-	#
-	EXTRA_CFLAGS += $(addprefix -I$(M)/, $(OS_DK_INCS) $(OS_INCS))
-
-	#
-	# Intermediate object name - this should be converted to the appropriate library file
-	# after the kernel makefile finishes its work.
-	#
-	obj-m = tiwlan_drv.o
-
-	#
-	# List of object files the kernel makefile needs to compile.
-	#
-	tiwlan_drv-y = $(OS_OBJS) $(OS_AUXILIARY_LIBS)
-
-
-else	# ifneq ($(KERNELRELEASE),)
-
-
-##
-##
-## This is the regular build phase - act according to the make actions
-##
-##
-
-#
-# The location of the kernel makefile
-#
-KERNEL_DIR ?= 
-
-
-#
-# Build the OS lib file
-#
-.PHONY: all
-all: .depend $(OUTPUT_FILE)
-
-#
-# Prints variables
-#
-.PHONY: help
-help:
-	@echo Default Compilation:	PLATFORM=$(PLATFORM) DEBUG=$(DEBUG) INTR=$(INTR) WSPI=$(WSPI) XCC=$(XCC) EXTRA CFLAGS: $(EXTRA_CFLAGS)
-
-
-#
-# Recursively cleans the OS lib object files
-#
-.PHONY: clean
-clean:
-	$(MAKE) -C $(KERNEL_DIR) M=`pwd` ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) clean
-	@rm -f *.o .*.o.cmd *~ *.a *.~* core .depend dep $(OS_OBJS)
-#
-# Causes the library file to get rebuilt
-#
-.depend:
-	rm -f $(OUTPUT_FILE)
-
-#
-# Recursively builds the library file
-#
-$(OUTPUT_FILE):
-	$(MAKE) -C $(KERNEL_DIR) M=`pwd` ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) modules
-	@$(CROSS_COMPILE)$(AR) rcs $@ $(OS_OBJS)
-
-
-endif	# ifneq ($(KERNELRELEASE),)
diff --git a/wl1271/platforms/os/common/build/linux/common.inc b/wl1271/platforms/os/common/build/linux/common.inc
deleted file mode 100644
index 65fba0a..0000000
--- a/wl1271/platforms/os/common/build/linux/common.inc
+++ /dev/null
@@ -1,182 +0,0 @@
-
-
-##
-##
-## Directory Locations
-##
-##
-
-COMMON      := $(DK_ROOT)/stad
-COMSRC      := $(COMMON)/src
-TWD         := $(DK_ROOT)/TWD
-UTILS       := $(DK_ROOT)/utils
-TESTSRC     := $(DK_ROOT)/Test
-LINUX_PFORM := $(DK_ROOT)/platforms/os/linux
-PLATFORMS   := $(DK_ROOT)/platforms
-EXT_DRV     := $(DK_ROOT)/external_drivers
-EXT_APP     := $(DK_ROOT)/external_apps
-TXN         := $(DK_ROOT)/Txn
-
-##
-##
-## Make Flags
-##
-##
-
-#
-# Compile with FW1273 or FW1251
-#
-FW ?= 1273
-
-#
-# Compile with XCC support or not
-#
-XCC ?= n
-
-
-#
-# Compile with GEM support or not
-#
-GEM ?= n
-
-#
-# Choose the bus type (n for SDIO, y for WSPI)
-#
-WSPI ?= n
-
-#
-# Use periodic interrupt
-#
-INTR ?= y
-
-#
-# Enable or disable debugging
-#
-DEBUG ?= y
-KERNEL_DEBUGGER ?= n
-STRIP ?= y
-BMTRACE ?= n
-#
-# Enable or disable OS and init messages
-#
-INFO ?= n
-
-#
-# 1273 FPGA platform
-#
-FPGA1273 ?= n
-
-#
-# Enable trace buffer
-#
-TI_TRACE_BUFFER ?= n
-
-##
-##
-## Driver Compilation Directives
-##
-##
-ifeq "$(HOST_PLATFORM)" "omap2430"	
-	DK_DEFINES += -D HOST_PLATFORM_OMAP2430
-endif
-ifeq "$(HOST_PLATFORM)" "omap3430"
-	DK_DEFINES += -D HOST_PLATFORM_OMAP3430
-endif
-ifeq "$(HOST_PLATFORM)" "zoom2"
-	DK_DEFINES += -D HOST_PLATFORM_ZOOM2
-endif
-ifeq "$(HOST_PLATFORM)" "zoom1"
-	DK_DEFINES += -D HOST_PLATFORM_ZOOM1
-endif
-
-ifeq ($(XCC),y)
-    DK_DEFINES += -D XCC_MODULE_INCLUDED
-endif
-
-ifeq ($(GEM),y)
-    DK_DEFINES += -D GEM_SUPPORTED
-endif
-
-ifeq ($(INTR),n)
-    DK_DEFINES += -D PRIODIC_INTERRUPT
-endif    
-
-ifeq ($(DEBUG),y)
-    DK_DEFINES += -D TI_DBG
-    DK_DEFINES += -D REPORT_LOG
-    DK_DEFINES += -O2
-    DK_DEFINES += -D PRINTF_ROLLBACK    
-else
-    DK_DEFINES += -D TI_DBG
-    DK_DEFINES += -U REPORT_LOG
-    DK_DEFINES += -O2
-endif
-ifeq ($(KERNEL_DEBUGGER),y)
-    DK_DEFINES += -g -O2
-	STRIP = n
-endif
-export KERNEL_DEBUGGER
-
-DK_DEFINES += -D __BYTE_ORDER_LITTLE_ENDIAN
-
-ifeq ($(TI_TRACE_BUFFER),y)
-   DK_DEFINES += -D TI_TRACE_BUF
-endif
-
-ifeq ($(BMTRACE),y)
-   DK_DEFINES += -D TIWLAN_BMTRACE
-endif
-
-##
-##
-## Platform Compilation Directives
-##
-##
-
-#
-# Bus Driver
-#
-ifeq ($(WSPI),y)
-    BUS_DRV = spi
-    BUS_DRV_REMOVE = sdio
-    BUS_DRIVER_MODULE = spi.ko
-    PFORM_DEFINES += -D WSPI
-else
-    BUS_DRV = sdio
-    BUS_DRV_REMOVE = spi
-    BUS_DRV = sdio
-    BUS_DRV_REMOVE = spi
-    BUS_DRIVER_MODULE = sdio.ko
-endif
-
-ifeq ($(INFO),y)
-    PFORM_DEFINES += -D OS_INFO_MESSAGES
-    PFORM_DEFINES += -D INIT_MESSAGES
-endif
-
-PFORM_DEFINES += -D HOST_COMPILE
-PFORM_DEFINES += -D FW_RUNNING_AS_STA
-PFORM_DEFINES += -D TNETW1273
-
-ifeq ($(FPGA1273),y)
-    PFORM_DEFINES += -D FPGA1273_STAGE_
-endif
-
-ifeq ($(FULL_ASYNC),y)
-    PFORM_DEFINES += -D FULL_ASYNC_MODE
-endif
-
-ifeq ($(USE_IRQ_ACTIVE_HIGH),y)
-    PFORM_DEFINES += -D USE_IRQ_ACTIVE_HIGH
-endif
-
-##
-##
-## Miscellaneous Compilation Directivcs
-##
-##
-
-EXTRA_CFLAGS += -fsigned-char
-EXTRA_CFLAGS += -D __LINUX__
-EXTRA_CFLAGS += $(DK_DEFINES)
-EXTRA_CFLAGS += $(PFORM_DEFINES)
diff --git a/wl1271/platforms/os/common/build/linux/os_sources.inc b/wl1271/platforms/os/common/build/linux/os_sources.inc
deleted file mode 100644
index 7578954..0000000
--- a/wl1271/platforms/os/common/build/linux/os_sources.inc
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#start of OS_DK_INCS_FILES#   do not remove or change this comment
-OS_DK_INCS_FILES = \
-        $(COMMON)/Export_Inc/Ethernet.h \
-        $(COMMON)/Export_Inc/TI_IPC_Api.h \
-        $(COMMON)/Export_Inc/paramOut.h \
-        $(COMMON)/Export_Inc/tiwlnif.h \
-        $(COMMON)/Export_Inc/STADExternalIf.h \
-        $(COMMON)/Export_Inc/bssTypes.h \
-        $(COMMON)/Export_Inc/InternalCmdCodes.h \
-        $(COMMON)/Export_Inc/coreDefaultParams.h \
-        $(COMMON)/Export_Inc/TI_Results.h \
-        $(COMMON)/Export_Inc/privateCmd.h \
-        $(COMMON)/Export_Inc/p_buffer.h \
-        $(COMSRC)/Sta_Management/mlmeApi.h \
-        $(COMSRC)/Sta_Management/healthMonitor.h \
-        $(COMSRC)/Connection_Managment/rsnApi.h \
-        $(COMSRC)/Ctrl_Interface/DrvMain.h \
-        $(COMSRC)/Ctrl_Interface/CmdHndlr.h \
-        $(COMSRC)/Ctrl_Interface/CmdDispatcher.h \
-        $(COMSRC)/Ctrl_Interface/CmdInterpret.h \
-        $(COMSRC)/Ctrl_Interface/EvHandler.h \
-        $(COMSRC)/Data_link/txDataQueue_Api.h \
-        $(COMSRC)/Data_link/txMgmtQueue_Api.h \
-        $(COMSRC)/Ctrl_Interface/DrvMainModules.h \
-        $(COMSRC)/Application/roamingMngrTypes.h \
-        $(COMSRC)/Application/scanMngrTypes.h \
-        $(UTILS)/fsm.h \
-        $(UTILS)/report.h \
-        $(UTILS)/utils.h \
-        $(UTILS)/tidef.h \
-        $(UTILS)/rate.h \
-        $(UTILS)/802_11Defs.h \
-        $(UTILS)/osDot11.h \
-        $(UTILS)/commonTypes.h \
-        $(UTILS)/CmdInterfaceCodes.h \
-        $(UTILS)/tiQosTypes.h \
-        $(UTILS)/version.h \
-        $(TWD)/TWDriver/TWDriver.h \
-        $(TWD)/TWDriver/TWDriverMsr.h \
-        $(TWD)/TWDriver/TWDriverRate.h \
-        $(TWD)/TWDriver/TWDriverScan.h \
-        $(TWD)/TWDriver/Device.h \
-        $(TWD)/TWDriver/Device1273.h \
-        $(TWD)/Ctrl/Export_Inc/CmdQueue_api.h \
-        $(TWD)/MacServices/Export_Inc/MacServices_api.h \
-        $(TWD)/FW_Transfer/Export_Inc/rxXfer_api.h \
-        $(TWD)/FW_Transfer/Export_Inc/fwDebug_api.h \
-        $(TWD)/FirmwareApi/public_descriptors.h \
-        $(TWD)/FirmwareApi/public_infoele.h \
-        $(TWD)/FirmwareApi/public_types.h \
-        $(TWD)/FirmwareApi/public_host_int.h \
-        $(TWD)/FirmwareApi/public_radio.h \
-        $(TWD)/FirmwareApi/public_commands.h \
-        $(TWD)/FirmwareApi/public_event_mbox.h \
-        $(TWD)/TwIf/TwIf.h \
-        $(TXN)/BusDrv.h \
-        $(TXN)/TxnQueue.h \
-	$(EXT_APP)/Linux/bmtrace/Export_Inc \
-        $(TESTSRC)/debug.h
-
-#start of OS_DK_INCS_FILES_XCC#   do not remove or change this comment
-ifeq ($(XCC),y)
-    OS_DK_INCS_FILES_XCC = \
-        $(COMMON)/Export_Inc/XCC/paramOutXCC.h \
-        $(UTILS)/XCC/osDot11XCC.h
-
-    OS_DK_INCS_FILES += $(OS_DK_INCS_FILES_XCC)
-endif
-#end of OS_DK_INCS_FILES_XCC#   do not remove or change this comment
-
-#start of OS_DK_INCS_FILES#   do not remove or change this comment
-
-
-#start of OS_DK_INCS#   do not remove or change this comment
-OS_DK_INCS = \
-        $(COMMON)/Export_Inc \
-        $(COMSRC)/AirLink_Managment \
-        $(COMSRC)/Application \
-        $(COMSRC)/Connection_Managment \
-        $(COMSRC)/Ctrl_Interface \
-        $(COMSRC)/Data_link \
-        $(COMSRC)/Sta_Management \
-        $(UTILS) \
-        $(TWD) \
-        $(TWD)/Ctrl \
-        $(TWD)/Data_Service/Export_Inc \
-        $(TWD)/FW_Transfer/Export_Inc \
-        $(TWD)/Ctrl/Export_Inc \
-        $(TWD)/MacServices/Export_Inc \
-        $(TWD)/FirmwareApi \
-        $(TWD)/TwIf \
-        $(TWD)/MacServices \
-        $(TWD)/TWDriver \
-        $(TESTSRC) \
-        $(TXN)
-
-#start of OS_DK_INCS_XCC#   do not remove or change this comment
-ifeq ($(XCC),y)
-    OS_DK_INCS_XCC = \
-        $(COMMON)/Export_Inc/XCC \
-        $(COMSRC)/XCC \
-        $(UTILS)/XCC
-
-        OS_DK_INCS += $(OS_DK_INCS_XCC)
-endif
-#end of OS_DK_INCS_XCC#   do not remove or change this comment
-
-#start of OS_DK_INCS#   do not remove or change this comment
diff --git a/wl1271/platforms/os/common/inc/IPCKernelApi.h b/wl1271/platforms/os/common/inc/IPCKernelApi.h
deleted file mode 100644
index ad772c4..0000000
--- a/wl1271/platforms/os/common/inc/IPCKernelApi.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * IPCKernelApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _IPCKERNELAPI_H_
-#define _IPCKERNELAPI_H_
-#include "tidef.h"
-
-TI_UINT32 IPCKernelInit    (TI_HANDLE hAdapter,TI_HANDLE  hIPCEv);
-
-TI_UINT32 IPCKernelDeInit  (TI_HANDLE hAdapter);
-
- TI_INT32 IPC_EventSend    (TI_HANDLE hAdapter, TI_UINT8 *pEvData, TI_UINT32 EvDataSize);
-
-
-#endif
diff --git a/wl1271/platforms/os/common/inc/RxBuf.h b/wl1271/platforms/os/common/inc/RxBuf.h
deleted file mode 100644
index 062d333..0000000
--- a/wl1271/platforms/os/common/inc/RxBuf.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * RxBuf.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*	  MODULE:	buf.h												       */
-/*    PURPOSE:	manages the allocation/free and field access of the BUF    */
-/*																		   */
-/***************************************************************************/
-#ifndef _BUF_H_
-#define _BUF_H_
-
-#include "tidef.h"
-#include "queue.h"
-#include "public_descriptors.h"
-
-
-
-#define WSPI_PAD_BYTES          	16     /* Add padding before data buffer for WSPI overhead */
-#define PAYLOAD_ALIGN_PAD_BYTES   	4      /* Add an extra word for alignment the MAC payload in case of QoS MSDU */
-
-
-
-/**
- * \brief Buffer for Tx/Rx packets 
- */ 
-typedef void BUF, *PBUF;
-
-/* Packet types */
-
-
-/**
- * \def RX_BUF_DATA
- * \brief Macro which gets a pointer to BUF packet header and returns the pointer to the start address of the WLAN packet's data
- */
-#define RX_BUF_DATA(pBuf)   ((void*)((TI_UINT8 *)pBuf + sizeof(RxIfDescriptor_t)))
-/**
- * \def RX_BUF_LEN
- * \brief Macro which gets a pointer to BUF packet header and returns the buffer length (without Rx Descriptor) of the WLAN packet
- */
-#define RX_BUF_LEN(pBuf)    ( (((RxIfDescriptor_t *)(pBuf))->length << 2) -  \
-                              ((RxIfDescriptor_t *)(pBuf))->extraBytes -     \
-                              sizeof(RxIfDescriptor_t) )
-
-/**
- * \def RX_ETH_PKT_DATA
- * \brief Macro which gets a pointer to BUF packet header and returns the pointer to the start address of the ETH packet's data
- */
-#define RX_ETH_PKT_DATA(pBuf)   *((void **)(((TI_UINT32)pBuf + sizeof(RxIfDescriptor_t) + 2) & ~3))
-/**
- * \def RX_ETH_PKT_LEN
- * \brief Macro which gets a pointer to BUF packet header and returns the buffer length (without Rx Descriptor) of the ETH packet
- */
-#define RX_ETH_PKT_LEN(pBuf)    *((TI_UINT32 *)(((TI_UINT32)pBuf + sizeof(RxIfDescriptor_t) + 6) & ~3))
-
-
-/** \brief BUF Allocation
- * 
- * \param  hOs		- OS module object handle
- * \param  len		- Length of allocated WBUF
- * \param  ePacketClassTag	- The RX packet type (used only in EMP)
- * \return On success: Pointer to WBUF	;	Otherwise: NULL
- * 
- * \par Description
- * This function allocates BUF element for Tx/Rx packet
- * 
- * \sa
- */ 
-BUF* RxBufAlloc         (TI_HANDLE hOs, TI_UINT32 len, PacketClassTag_e ePacketClassTag);
-
-
-/** \brief BUF Free
- * 
- * \param  hOs		- OS module object handle
- * \param  pWbuf	- Pointer to WBUF which was previously created by user
- * \return void
- * 
- * \par Description
- * This function frees the memory allocated for BUF element
- * 
- * \sa
- */ 
-void  RxBufFree          (TI_HANDLE hOs, void* pBuf);
-
-
-/** \brief BUF Free
- * 
- * \param  hOs		- OS module object handle
- * \param  pWbuf	- Pointer to WBUF which was previously created by user
- * \return void
- * 
- * \par Description
- * This function increment the start address of data held in BUF element in len.
- * 
- * \sa
- */ 
-void  RxBufReserve       (TI_HANDLE hOs, void* pBuf, TI_UINT32 len); 
-
-#endif
-
diff --git a/wl1271/platforms/os/common/inc/WlanDrvCommon.h b/wl1271/platforms/os/common/inc/WlanDrvCommon.h
deleted file mode 100644
index 1fbd583..0000000
--- a/wl1271/platforms/os/common/inc/WlanDrvCommon.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * WlanDrvCommon.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-/** \file   WlanDrvCommon.h 
- *  \brief  Defines WlanDrvIf objects common to all OS types.                                  
- *
- *  \see    WlanDrvIf.h
- */
-
-#ifndef __WLAN_DRV_COMMON_H__
-#define __WLAN_DRV_COMMON_H__
-
-
-#include "tidef.h"
-#include "TWDriver.h"
-
-#define DRV_ADDRESS_SIZE					(sizeof(TI_INT32))
-#define MAX_CHUNKS_IN_FILE					(1000)
-#define OS_SPECIFIC_RAM_ALLOC_LIMIT			(0xFFFFFFFF)	/* assume OS never reach that limit */
-
-/* Driver steady states - for driver external users */
-typedef enum 
-{
-    DRV_STATE_IDLE,
-    DRV_STATE_RUNNING,
-    DRV_STATE_STOPING,
-    DRV_STATE_STOPPED,
-    DRV_STATE_FAILED
-} EDriverSteadyState;
-
-
-/* The driver Start/Stop actions */
-typedef enum
-{
-    ACTION_TYPE_NONE, 
-    ACTION_TYPE_START, 
-    ACTION_TYPE_STOP
-} EActionType;
-
-/* Initialization file info */
-typedef struct 
-{
-    void            *pImage;
-    unsigned long    uSize;
-} TInitImageInfo;
-
-/* WlanDrvIf object common part (included by TWlanDrvIfObj from each OS abstraction layer) */
-typedef struct 
-{
-    /* Other modules handles */
-    void               *hDrvMain;
-    void               *hCmdHndlr;
-    void               *hContext;
-    void               *hTxDataQ;
-    void               *hTxMgmtQ;
-    void               *hTxCtrl;
-    void               *hTWD;
-    void               *hEvHandler;
-    void               *hReport;
-    void               *hCmdDispatch;
-
-    /* Initialization files info */
-    TInitImageInfo      tIniFile;
-    TInitImageInfo      tNvsImage;
-    TInitImageInfo      tFwImage;
-
-    EDriverSteadyState  eDriverState;   /* The driver state as presented to the OS */
-    TI_UINT32           uLinkSpeed;
-
-} TWlanDrvIfCommon;
-
-
-/* The loader files interface */
-typedef struct
-{
-  TI_UINT32 uNvsFileLength;
-  TI_UINT32 uFwFileLength;
-  TI_UINT32 uIniFileLength;
-  char data[1];
-  /* eeprom image follows   */
-  /* firmware image follows */
-  /* init file follows      */
-} TLoaderFilesData;
-
-
-
-#endif /* __WLAN_DRV_COMMON_H__ */
diff --git a/wl1271/platforms/os/common/inc/cli_cu_common.h b/wl1271/platforms/os/common/inc/cli_cu_common.h
deleted file mode 100644
index ae755b7..0000000
--- a/wl1271/platforms/os/common/inc/cli_cu_common.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * cli_cu_common.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef common_h
-#define common_h
-
-#include "tidef.h"
-
-#ifdef _WINDOWS
-#define DRV_NAME "\\\\.\\tiwlnpci"
-#endif
-
-#ifndef TIWLAN_DRV_NAME
-#define TIWLAN_DRV_NAME  DRV_NAME
-#endif
-
-#define IN     /* input parameter          */
-#define OUT    /* output parameter         */
-#define INOUT  /* input & output parameter */
-
-#ifndef TI_TRUE
-#define TI_TRUE  1
-#endif
-
-#ifndef TI_FALSE
-#define TI_FALSE 0
-#endif
-
-#ifndef TI_PENDING
-#define TI_PENDING 2
-#endif
-
-
-#ifndef NULL
-# define NULL 0L
-#endif
-
-#ifndef TI_VOIDCAST
-#define TI_VOIDCAST(p) ((void)p)
-#endif
-
-#ifdef __LINUX__
-#ifndef print
-# define print(fmt, arg...) fprintf(stdout, fmt, ##arg)
-#endif
-
-#ifndef print_err
-# define print_err(fmt, arg...) fprintf(stderr, fmt, ##arg)
-#endif
-
-#ifndef print_deb
-# ifdef DEBUG_MESSAGES
-#  define print_deb(fmt, arg...) fprintf(stdout, fmt, ##arg)
-# else
-#  define print_deb(fmt, arg...)
-# endif	/* DEBUG_MESSAGES */
-#endif	/* print_deb */
-
-#endif /* __LINUX__ */
-
-#ifndef SIZE_ARR
-# define SIZE_ARR(a) (sizeof(a)/sizeof(a[0]) )
-#endif
-
-#ifndef min
-# define min(a, b)	(((a)<(b)) ? (a) : (b))
-#endif
-
-#ifndef max
-# define max(a, b)	(((a)>(b)) ? (a) : (b))
-#endif
-
-typedef struct
-{
-    TI_UINT32 value;
-    char *name;
-} named_value_t;
-
-#define print_available_values(arr) \
-        {   int i; for(i=0; i<SIZE_ARR(arr); i++) \
-            print("%d - %s%s", arr[i].value, arr[i].name, (i>=SIZE_ARR(arr)-1) ? "\n" : ", " ); \
-        }
-        
-void print_memory_dump(char *addr, int size );
-
-#endif	/* common_h */
-
diff --git a/wl1271/platforms/os/common/inc/convert.h b/wl1271/platforms/os/common/inc/convert.h
deleted file mode 100644
index 2880133..0000000
--- a/wl1271/platforms/os/common/inc/convert.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * convert.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if !defined _CONVERT_H
-#define _CONVERT_H
-
-#include "TWDriver.h"
-#include "STADExternalIf.h"
-#include "InternalCmdCodes.h"
-#include "cu_common.h"
-#include "TWDriverScan.h"
-
-/***********************/
-/* General definitions */
-/***********************/
-
-#define TIWLN_802_11_SUPPORTED_RATES                    SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM
-#define TIWLN_802_11_SUPPORTED_RATES_SET                SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM
-#define TIWLN_802_11_CURRENT_RATES_GET                  SITE_MGR_CURRENT_TX_RATE_PARAM
-#define TIWLN_802_11_CHANNEL_GET                        SITE_MGR_CURRENT_CHANNEL_PARAM /* wext in linux */
-#define TIWLN_REG_DOMAIN_ENABLE_DISABLE_802_11D         REGULATORY_DOMAIN_ENABLE_DISABLE_802_11D
-#define TIWLN_REG_DOMAIN_ENABLE_DISABLE_802_11H         REGULATORY_DOMAIN_ENABLE_DISABLE_802_11H
-#define TIWLN_REG_DOMAIN_GET_802_11D                    REGULATORY_DOMAIN_ENABLED_PARAM
-#define TIWLN_REG_DOMAIN_GET_802_11H                    REGULATORY_DOMAIN_MANAGEMENT_CAPABILITY_ENABLED_PARAM
-#define TIWLN_REG_DOMAIN_GET_COUNTRY_2_4	            REGULATORY_DOMAIN_COUNTRY_2_4_PARAM
-#define TIWLN_REG_DOMAIN_SET_COUNTRY_2_4	            REGULATORY_DOMAIN_COUNTRY_2_4_PARAM
-#define TIWLN_REG_DOMAIN_GET_COUNTRY_5	                REGULATORY_DOMAIN_COUNTRY_5_PARAM
-#define TIWLN_REG_DOMAIN_SET_COUNTRY_5	                REGULATORY_DOMAIN_COUNTRY_5_PARAM
-#define TIWLN_REG_DOMAIN_SET_DFS_RANGE	                REGULATORY_DOMAIN_DFS_CHANNELS_RANGE
-#define TIWLN_REG_DOMAIN_GET_DFS_RANGE	                REGULATORY_DOMAIN_DFS_CHANNELS_RANGE
-#define TIWLN_802_11_POWER_MODE_GET	                    POWER_MGR_POWER_MODE
-#define TIWLN_802_11_POWER_MODE_SET	                    POWER_MGR_POWER_MODE
-#define TIWLN_802_11_RSSI                       	    TWD_RSSI_LEVEL_PARAM
-#define TIWLN_802_11_TX_POWER_DBM_GET           	    REGULATORY_DOMAIN_CURRENT_TX_POWER_IN_DBM_PARAM
-#define TIWLN_802_11_POWER_MGR_PROFILE          	    POWER_MGR_POWER_MODE
-                                                        
-#define TIWLN_SHORT_SLOT_GET	                        SITE_MGR_DESIRED_SLOT_TIME_PARAM
-#define TIWLN_SHORT_SLOT_SET	                        SITE_MGR_DESIRED_SLOT_TIME_PARAM
-#define TIWLN_IBSS_PROTECTION_GET               	    CTRL_DATA_CURRENT_IBSS_PROTECTION_PARAM /* not implemented in CUDK */
-#define TIWLN_IBSS_PROTECTION_SET	                    CTRL_DATA_CURRENT_IBSS_PROTECTION_PARAM /* not implemented in CUDK */
-#define TIWLN_802_11_MIXED_MODE_SET	                    RSN_MIXED_MODE
-#define TIWLN_802_11_MIXED_MODE_GET	                    RSN_MIXED_MODE
-                                                        
-#define TIWLN_802_11_GET_AP_QOS_PARAMS	                QOS_MNGR_AP_QOS_PARAMETERS
-#define TIWLN_802_11_GET_AP_QOS_CAPABILITIES	        SITE_MGR_GET_AP_QOS_CAPABILITIES
-#define TIWLN_802_11_ADD_TSPEC	                        QOS_MNGR_ADD_TSPEC_REQUEST
-#define TIWLN_802_11_GET_TSPEC_PARAMS	                QOS_MNGR_OS_TSPEC_PARAMS
-#define TIWLN_802_11_DELETE_TSPEC               	    QOS_MNGR_DEL_TSPEC_REQUEST
-#define TIWLN_802_11_GET_CURRENT_AC_STATUS	            QOS_MNGR_AC_STATUS
-#define TIWLN_802_11_SET_MEDIUM_USAGE_THRESHOLD 	    TX_CTRL_SET_MEDIUM_USAGE_THRESHOLD
-#define TIWLN_802_11_GET_MEDIUM_USAGE_THRESHOLD 	    TX_CTRL_GET_MEDIUM_USAGE_THRESHOLD
-#define TIWLN_802_11_GET_DESIRED_PS_MODE                QOS_MNGR_GET_DESIRED_PS_MODE
-#define TIWLN_802_11_SET_RX_TIMEOUT                     QOS_SET_RX_TIME_OUT
-#define TIWLN_802_11_POWER_LEVEL_DEFAULT_GET            POWER_MGR_POWER_LEVEL_DEFAULT
-#define TIWLN_802_11_POWER_LEVEL_DEFAULT_SET            POWER_MGR_POWER_LEVEL_DEFAULT
-#define TIWLN_802_11_POWER_LEVEL_PS_SET                 POWER_MGR_POWER_LEVEL_PS
-#define TIWLN_802_11_POWER_LEVEL_PS_GET                 POWER_MGR_POWER_LEVEL_PS
-#define TIWLN_GET_POWER_CONSUMPTION_STATISTICS          POWER_MGR_GET_POWER_CONSUMPTION_STATISTICS
-#define TIWLN_802_11_BEACON_FILTER_DESIRED_STATE_SET    SITE_MGR_BEACON_FILTER_DESIRED_STATE_PARAM
-#define TIWLN_802_11_BEACON_FILTER_DESIRED_STATE_GET    SITE_MGR_BEACON_FILTER_DESIRED_STATE_PARAM
-#define TIWLN_802_11_POWER_LEVEL_DOZE_MODE_GET          POWER_MGR_POWER_LEVEL_DOZE_MODE
-#define TIWLN_802_11_POWER_LEVEL_DOZE_MODE_SET          POWER_MGR_POWER_LEVEL_DOZE_MODE
-#define TIWLN_802_11_SHORT_PREAMBLE_GET                 SITE_MGR_DESIRED_PREAMBLE_TYPE_PARAM
-#define TIWLN_802_11_SHORT_PREAMBLE_SET                 SITE_MGR_DESIRED_PREAMBLE_TYPE_PARAM
-#define TIWLN_ENABLE_DISABLE_RX_DATA_FILTERS            RX_DATA_ENABLE_DISABLE_RX_DATA_FILTERS
-#define TIWLN_ADD_RX_DATA_FILTER                        RX_DATA_ADD_RX_DATA_FILTER
-#define TIWLN_REMOVE_RX_DATA_FILTER                     RX_DATA_REMOVE_RX_DATA_FILTER
-#define TIWLN_GET_RX_DATA_FILTERS_STATISTICS            RX_DATA_GET_RX_DATA_FILTERS_STATISTICS
-#define TIWLN_GET_RX_DATA_RATE                          SITE_MGR_CURRENT_RX_RATE_PARAM
-#define TIWLN_REPORT_MODULE_SET                         REPORT_MODULE_TABLE_PARAM
-#define TIWLN_REPORT_MODULE_GET                         REPORT_MODULE_TABLE_PARAM
-#define TIWLN_REPORT_SEVERITY_SET                       REPORT_SEVERITY_TABLE_PARAM
-#define TIWLN_REPORT_SEVERITY_GET                       REPORT_SEVERITY_TABLE_PARAM
-#define TIWLN_DISPLAY_STATS                             DEBUG_ACTIVATE_FUNCTION
-#define TIWLN_RATE_MNG_SET                              SITE_MGRT_SET_RATE_MANAGMENT
-#define TIWLN_RATE_MNG_GET                              SITE_MGRT_GET_RATE_MANAGMENT
-#define TIWLN_802_11_GET_SELECTED_BSSID_INFO            SITE_MGR_GET_SELECTED_BSSID_INFO
-#define TIWLN_802_11_TX_STATISTICS                      TX_CTRL_COUNTERS_PARAM
-#define TIWLN_802_11_SET_TRAFFIC_INTENSITY_THRESHOLDS   CTRL_DATA_TRAFFIC_INTENSITY_THRESHOLD
-#define TIWLN_802_11_GET_TRAFFIC_INTENSITY_THRESHOLDS   CTRL_DATA_TRAFFIC_INTENSITY_THRESHOLD
-#define TIWLN_802_11_TOGGLE_TRAFFIC_INTENSITY_EVENTS    CTRL_DATA_TOGGLE_TRAFFIC_INTENSITY_EVENTS
-#define TIWLN_802_11_GET_PRIMARY_BSSID_INFO             SITE_MGR_PRIMARY_SITE_PARAM /* not implemented in CUDK */
-#define TIWLN_ENABLE_DISABLE_RX_DATA_FILTERS            RX_DATA_ENABLE_DISABLE_RX_DATA_FILTERS
-#define TIWLN_ADD_RX_DATA_FILTER                        RX_DATA_ADD_RX_DATA_FILTER
-#define TIWLN_REMOVE_RX_DATA_FILTER                     RX_DATA_REMOVE_RX_DATA_FILTER
-#define TIWLN_GET_RX_DATA_FILTERS_STATISTICS            RX_DATA_GET_RX_DATA_FILTERS_STATISTICS /* not implemented in CUDK */
-#define TIWLN_802_11_START_APP_SCAN_SET                 SCAN_CNCN_START_APP_SCAN           
-#define TIWLN_802_11_STOP_APP_SCAN_SET                  SCAN_CNCN_STOP_APP_SCAN
-#define TIWLN_802_11_SCAN_POLICY_PARAM_SET              SCAN_MNGR_SET_CONFIGURATION
-#define TIWLN_802_11_SCAN_BSS_LIST_GET                  SCAN_MNGR_BSS_LIST_GET
-#define TIWLN_802_11_SET_QOS_PARAMS                     QOS_MNGR_SET_OS_PARAMS
-#define TIWLN_802_11_CONFIG_TX_CLASS                    CTRL_DATA_CLSFR_CONFIG
-#define TIWLN_802_11_REMOVE_CLSFR_ENTRY                 CTRL_DATA_CLSFR_REMOVE_ENTRY
-#define TIWLN_DCO_ITRIM_PARAMS                          TWD_DCO_ITRIM_PARAMS
-
-
-/********************/
-/* Type definitions */
-/********************/
-
-typedef TRates                              rates_t;
-typedef EDraftNumber                        draftNumber_t;
-typedef TCountry                            country_t;
-typedef TDfsChannelRange                    DFS_ChannelRange_t;
-typedef ESlotTime                           slotTime_e;
-typedef TRxDataFilterRequest                TIWLAN_DATA_FILTER_REQUEST;
-typedef TCuCommon_RxDataFilteringStatistics TIWLAN_DATA_FILTER_STATISTICS;
-typedef TScanParams                         scan_Params_t;
-typedef TScanNormalChannelEntry             scan_normalChannelEntry_t;
-typedef EScanEtCondition                    scan_ETCondition_e;
-typedef TScanSpsChannelEntry                scan_SPSChannelEntry_t;
-typedef EScanType                           scan_Type_e;
-typedef ERadioBand                          radioBand_e;
-typedef ERateMask                           rateMask_e;
-typedef TSsid                               ssid_t;
-typedef TScanPolicy                         scan_Policy_t;
-typedef TScanBandPolicy                     scan_bandPolicy_t;
-typedef TScanProbReqParams                  scan_probReqParams_t;
-typedef TScanBasicMethodParams              scan_basicMethodParams_t;
-typedef TScanTidTriggeredMethodParams       scan_TidTriggeredMethodParams_t;
-typedef TScanSPSMethodParams                scan_SPSMethodParams_t;
-typedef TScanMethod                         scan_Method_t;
-typedef TClsfrTableEntry                    clsfr_tableEntry_t;
-typedef TIpPort                             IP_Port_t;
-
-#endif /* _CONVERT_H */
diff --git a/wl1271/platforms/os/common/inc/osApi.h b/wl1271/platforms/os/common/inc/osApi.h
deleted file mode 100644
index 4787a75..0000000
--- a/wl1271/platforms/os/common/inc/osApi.h
+++ /dev/null
@@ -1,703 +0,0 @@
-/*
- * osApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*--------------------------------------------------------------------------*/
-/* Module:      OSAPI.H*/
-/**/
-/* Purpose:     This module defines unified interface to the OS specific*/
-/*              sources and services.*/
-/**/
-/*--------------------------------------------------------------------------*/
-
-#ifndef __OS_API_H__
-#define __OS_API_H__
-
-/** \file  osApi.h 
- * \brief Operating System APIs	\n
- * This module defines unified interface to the OS specific sources and services
- */
-
-#include "tidef.h"
-#include "TI_IPC_Api.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/** \struct TI_CONNECTION_STATUS
- * \struct *PTI_CONNECTION_STATUS
- * \brief Ti Connection Status
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct 
-{
-    TI_UINT32      Event;
-    TI_UINT8*      Data;
-} TI_CONNECTION_STATUS, *PTI_CONNECTION_STATUS;
-
-typedef struct 
-{
-    TI_UINT8 	uFormat;
-    TI_UINT8 	uLevel;
-    TI_UINT8 	uParamsNum;
-    TI_UINT8 	uReserved;
-    TI_UINT16 	uFileId;
-    TI_UINT16 	uLineNum;
-} TTraceMsg;
-
-#define OS_PAGE_SIZE            4096
-#define MAX_MESSAGE_SIZE        500
-#define MICROSECOND_IN_SECONDS  1000000
-
-#define UINT16_MAX_VAL					0xffff
-#define UINT8_MAX_VAL					0xff
-
-#define TRACE_FORMAT_8_BITS_PARAMS		2
-#define TRACE_FORMAT_16_BITS_PARAMS		4
-#define TRACE_FORMAT_32_BITS_PARAMS		6
-
-#define TRACE_MSG_MAX_PARAMS			32
-#define TRACE_MSG_MIN_LENGTH			(sizeof(TTraceMsg))
-#define TRACE_MSG_MAX_LENGTH			((TRACE_MSG_MAX_PARAMS * 4) + sizeof(TTraceMsg))
-
-#define INSERT_BYTE(pBuf, dataByte)     (*((TI_UINT8  *)pBuf) = (TI_UINT8 )dataByte ); pBuf++;
-#define INSERT_2_BYTES(pBuf, dataBytes) (*((TI_UINT16 *)pBuf) = (TI_UINT16)dataBytes); pBuf+=2;
-#define INSERT_4_BYTES(pBuf, dataBytes) (*((TI_UINT32 *)pBuf) = (TI_UINT32)dataBytes); pBuf+=4;
-
-
-/****************************************************************************************
-						START OF OS API (Common to all GWSI LIB, Driver and TI Driver)				
-*****************************************************************************************/
-
-
-/****************************************************************************************
-                        OS HW API NEEDED BY DRIVER              
-*****************************************************************************************/
-
-/** \brief  OS Disable IRQ
- * 
- * \param  OsContext 	- Handle to the OS object
- * \return void
- * 
- * \par Description
- * This function disables the Interrupts
- * 
- * \sa
- */ 
-void os_disableIrq (TI_HANDLE OsContext);
-
-/** \brief  OS Enable IRQ
- * 
- * \param  OsContext 	- Handle to the OS object
- * \return void
- * 
- * \par Description
- * This function enables the Interrupts
- * 
- * \sa
- */ 
-void os_enableIrq (TI_HANDLE OsContext);
-
-/** \brief  OS  IRQ Serviced
- * 
- * \param  OsContext 	- Handle to the OS object
- * \return void
- * 
- * \par Description
- * This function is used in Level IRQ only. At this point the interrupt line is not asserted anymore
- * and we can inform the OS to enable IRQ again.
- * 
- * \sa
- */ 
-void os_InterruptServiced (TI_HANDLE OsContext);
-
-/****************************************************************************************
- *						OS Report API													*       
- ****************************************************************************************/
-
-/** \brief  OS Set Debug Mode
- * 
- * \param  enable 	- Indicates if debug mode should be enabled or disabled ( TI_TRUE | TI_FALSE )
- * \return void
- * 
- * \par Description
- * This function sets the Debug Mode flag to True or False - according to user's request
- * 
- * \sa
- */ 
-void os_setDebugMode (TI_BOOL enable);
-
-/** \brief  OS Printf
- * 
- * \param  format 	- String to print (with formatted parametrs in string if needed) and parameters values
- *					  if formatted parameters are used in string
- * \return void
- * 
- * \par Description
- * This function prints formatted output using OS available printf method
- * 
- * \sa
- */ 
-void os_printf (const char *format ,...);
-
-/****************************************************************************************
- *						OS Memory API													*       
- ****************************************************************************************/
-
-/** \brief  OS Memory Allocation
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  Size 		- Size (in bytes) to be allocated 
- * \return Pointer to the allocated memory on success	;  NULL on failure (there isn't enough memory available)
- * 
- * \par Description
- * This function allocates resident (nonpaged) system-space memory with calling specific OS allocation function.	\n 
- * It is assumed that this function will never be called in an interrupt context since the OS allocation function 
- * has the potential to put the caller to sleep  while waiting for memory to become available.
- * 
- * \sa
- */
-void *os_memoryAlloc (TI_HANDLE OsContext,TI_UINT32 Size);
-
-/** \brief  OS Memory CAllocation
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  Number 		- Number of element to be allocated
- * \param  Size 		- Size (in bytes) of one element 
- * \return Pointer to the allocated memory on success	;  NULL on failure (there isn't enough memory available)
- * 
- * \par Description
- * This function allocates an array in memory with elements initialized to 0.
- * Allocates resident (nonpaged) system-space memory for an array with elements initialized to 0, 
- * with specific OS allocation function.
- * It is assumed that this function will never be called in an interrupt context since the OS allocation function 
- * has the potential to put the caller to sleep  while waiting for memory to become available.
- * 
- * \sa
- */
-void *os_memoryCAlloc (TI_HANDLE OsContext, TI_UINT32 Number, TI_UINT32 Size);
-
-/** \brief  OS Memory Set
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  pMemPtr 		- Pointer to the base address of a memory block 
- * \param  Value 		- Value to set to memory block
- * \param  Length 		- Length (in bytes) of memory block
- * \return void
- * 
- * \par Description
- * This function fills a block of memory with a given value
- * 
- * \sa
- */
-void os_memorySet (TI_HANDLE OsContext, void *pMemPtr, TI_INT32 Value, TI_UINT32 Length);
-
-/** \brief  OS Memory Zero
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  pMemPtr 		- Pointer to the base address of a memory block 
- * \param  Length 		- Length (in bytes) of memory block
- * \return void
- * 
- * \par Description
- * This function fills a block of memory with zeros
- * 
- * \sa
- */
-void os_memoryZero (TI_HANDLE OsContext, void *pMemPtr, TI_UINT32 Length);
-
-/** \brief  OS Memory Copy
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  pDestination - Pointer to destination buffer
- * \param  pSource 		- Pointer to Source buffer
- * \param  Size 		- Size (in bytes) to copy
- * \return void
- * 
- * \par Description
- * This function copies a specified number of bytes from one caller-supplied location (source buffer) to another (destination buffer)
- * 
- * \sa
- */
-void os_memoryCopy (TI_HANDLE OsContext, void *pDestination, void *pSource, TI_UINT32 Size);
-
-/** \brief  OS Memory Free
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  pMemPtr 		- Pointer to the base address of a memory block 
- * \param  Size 		- Size (in bytes) to free
- * \return void
- * 
- * \par Description
- * This function releases a block of memory which was previously allocated by user
- * 
- * \sa
- */
-void os_memoryFree (TI_HANDLE OsContext, void *pMemPtr, TI_UINT32 Size);
-
-/** \brief  OS Memory Compare
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  Buf1 		- Pointer to the first buffer in comperation
- * \param  Buf2 		- Pointer to the second buffer in comperation
- * \param  Count 		- Count (in bytes) to compare
- * \return A value which indicates the relationship between the two compared buffers:
- *         value < 0:	Buf1 less than Buf2
- *         value == 0: 	Buf1 identical to Buf2
- *         value > 0: 	Buf1 greater than Buf2
- * 
- * \par Description
- * This function compares between two given buffers
- * 
- * \sa
- */
-TI_INT32 os_memoryCompare (TI_HANDLE OsContext, TI_UINT8* Buf1, TI_UINT8* Buf2, TI_INT32 Count);
-
-/** \brief  OS Memory Allocation for HW DMA
- * 
- * \param  pOsContext 	- Handle to the OS object
- * \param  Size 		- Size (in bytes) to allocate
- * \return Pointer to the allocated memory on success	;  NULL on failure (there isn't enough memory available)
- * 
- * \par Description
- * This function allocates resident (nonpaged) system-space memory for HW DMA operations
- * 
- * \sa
- */
-void *os_memoryAlloc4HwDma (TI_HANDLE pOsContext, TI_UINT32 Size);
-
-/** \brief  OS Memory for HW DMA Free
- * 
- * \param  pOsContext 	- Handle to the OS object
- * \param  pMem_ptr 	- Pointer to the base virtual address of allocated memory block 
- *                        This is the address that was returned to user when he allocated the memory for HW DMA usage
- * \param  Size 		- Size (in bytes) of the memory block to be released. This parameter must be identical to the Length 
- *						  which was given by the user when he allocated the memory block for HW DMA usage
- * \return Pointer to the allocated memory on success	;  NULL on failure (there isn't enough memory available)
- * 
- * \par Description
- * This function releases a block of memory previously allocated by user for HW DMA operations
- * 
- * \sa
- */
-void os_memory4HwDmaFree (TI_HANDLE pOsContext, void *pMem_ptr, TI_UINT32 Size);
-
-/** \brief  OS Memory Copy from User
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  pDstPtr 		- Pointer to destination buffer
- * \param  pSrcPtr 		- Pointer to Source buffer
- * \param  Size 		- Size (in bytes) to copy
- * \return TI_OK on success	;  TI_NOK otherwise
- * 
- * \par Description
- * This function copies a specified number of bytes from one caller-supplied location (Source) to another (Destination)
- * 
- * \sa
- */
-int os_memoryCopyFromUser (TI_HANDLE OsContext, void *pDstPtr, void *pSrcPtr, TI_UINT32 Size);
-
-/** \brief  OS Memory Copy To User
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  pDstPtr 		- Pointer to destination buffer
- * \param  pSrcPtr 		- Pointer to Source buffer
- * \param  Size 		- Size (in bytes) to copy
- * \return TI_OK on success	;  TI_NOK otherwise
- * 
- * \par Description
- * This function copies a specified number of bytes from one caller-supplied location (Source) to another (Destination)
- * 
- * \sa
- */
-int os_memoryCopyToUser (TI_HANDLE OsContext, void *pDstPtr, void *pSrcPtr, TI_UINT32 Size);
-
-/****************************************************************************************
- *							OS TIMER API												*
- ****************************************************************************************/
-/** \brief  Timer Callback Function
- * 
- * \param  Context 	- Handle to the OS object
- * \return void
- * 
- * \par Description
- * This callback is passed by user to OS timer when created, and is called directly from OS timer context when expired.
- * E.g. the user user the timer in order to operate this function after a defined time expires
- * 
- */
-typedef void (*fTimerFunction)(TI_HANDLE Context);
-
-/** \brief  OS Timer Create
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  pRoutine 	- Pointer to user's Timer Callback function
- * \param  hFuncHandle 	- Handle to user's Timer Callback function parameters
- * \return Handle to timer object on success	;  NULL on failure
- * 
- * \par Description
- * This function creates and initializes an OS timer object associated with a user's Timer Callback function	\n
- * \note   1) The user's callback is called directly from OS timer context when expired.
- * \note   2) In some OSs, it may be needed to use an intermediate callback in the 
- * \note      osapi layer (use os_timerHandlr for that).
- * 
- * \sa
- */
-TI_HANDLE os_timerCreate (TI_HANDLE OsContext, fTimerFunction pRoutine, TI_HANDLE hFuncHandle);
-
-/** \brief  OS Timer Destroy
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  TimerHandle 	- Handle to timer object which user got when created the timer
- * \return void
- * 
- * \par Description
- * This function destroys the OS timer object which was previously created by user
- * 
- * \sa
- */
-void os_timerDestroy (TI_HANDLE OsContext, TI_HANDLE TimerHandle);
-
-/** \brief  OS Timer Start
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  TimerHandle 	- Handle to timer object which user got when created the timer
- * \param  DelayMs 		- The time in MS untill the timer is awaken
- * \return void
- * 
- * \par Description
- * This function Start the OS timer object which was previously created by user
- * 
- * \sa
- */
-void os_timerStart (TI_HANDLE OsContext, TI_HANDLE TimerHandle, TI_UINT32 DelayMs);
-
-/** \brief  OS Timer Stop
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  TimerHandle 	- Handle to timer object which user got when created the timer
- * \return void
- * 
- * \par Description
- * This function Stops the OS timer object which was previously created by user
- * 
- * \sa
- */
-void os_timerStop (TI_HANDLE OsContext, TI_HANDLE TimerHandle);
-
-/** \brief  OS Periodic Interrupt Timer Start
- * 
- * \param  OsContext 	- Handle to the OS object
- * \return void
- * 
- * \par Description
- * This function starts the periodic interrupt mechanism. This function is used when PRIODIC_INTERRUPT mode is used. 
- * This Mode is enabled when interrupts that are usually received from the FW are masked, 
- * and there is need to check- in a given time periods - if handling of any FW interrupt is needed.
- * 
- * \sa
- */
-#ifdef PRIODIC_INTERRUPT
-void os_periodicIntrTimerStart (TI_HANDLE OsContext);
-#endif
-
-/** \brief  OS Time Stamp Ms
- * 
- * \param  OsContext 	- Handle to the OS object
- * \return The number of milliseconds that have elapsed since the system was booted
- * 
- * \par Description
- * This function returns the number of milliseconds that have elapsed since the system was booted.
- */
-TI_UINT32 os_timeStampMs (TI_HANDLE OsContext);
-
-/** \brief  OS Time Stamp Us
- * 
- * \param  OsContext 	- Handle to the OS object
- * \return The number of microseconds that have elapsed since the system was booted
- * 
- * \par Description
- * This function returns the number of microseconds that have elapsed since the system was booted.	\n
- * Note that sometimes this function will be called with NULL(!!!) as argument!
- */
-TI_UINT32 os_timeStampUs (TI_HANDLE OsContext);
-
-/** \brief  OS Stall uSec
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  uSec 		- The time to delay in microseconds
- * \return void
- * 
- * \par Description
- * This function makes delay in microseconds
- * 
- * \sa
- */
-void os_StalluSec (TI_HANDLE OsContext, TI_UINT32 uSec);
-
-
-/****************************************************************************************
- *							Protection services	API										*
- ****************************************************************************************/
-
-/** \brief  OS Protect Create
- * 
- * \param  OsContext 	- Handle to the OS object
- * \return Handle of the created mutex/spin lock object on Success	; NULL on Failure (not enough memory available or problems to initializing the mutex)
- * 
- * \par Description
- * This function allocates a mutex/spin lock object.
- * The mutex/spinlock object which is created by this function is used for mutual-exclusion and protection of resources which are shared between
- * multi-Tasks/Threads
- * 
- * \sa
- */
-TI_HANDLE os_protectCreate (TI_HANDLE OsContext);
-
-/** \brief  OS Protect Destroy
- * 
- * \param  OsContext 		- Handle to the OS object
- * \param  ProtectContext 	- Handle to the mutex/spin lock object
- * \return void
- * 
- * \par Description
- * This function destroys s a mutex/spin lock object which was previously created by user:
- * it frees the mutex/spin lock and then frees the object's memory
- * 
- * \sa
- */
-void os_protectDestroy (TI_HANDLE OsContext, TI_HANDLE ProtectContext);
-
-/** \brief  OS Protect Lock
- * 
- * \param  OsContext 		- Handle to the OS object
- * \param  ProtectContext 	- Handle to the mutex/spin lock object
- * \return void
- * 
- * \par Description
- * This function locks the mutex/spin lock object. E.g. the caller acquires a mutex/spin lock and gains exclusive
- * access to the shared resources, that the mutex/spin lock protects of.
- *
- * \sa
- */
-void os_protectLock (TI_HANDLE OsContext, TI_HANDLE ProtectContext);
-
-/** \brief  OS Protect Unlock
- * 
- * \param  OsContext 		- Handle to the OS object
- * \param  ProtectContext 	- Handle to the mutex/spin lock object
- * \return void
- * 
- * \par Description
- * This function unlocks the mutex/spin lock object.
- * 
- * \sa
- */
-void os_protectUnlock (TI_HANDLE OsContext, TI_HANDLE ProtectContext);
-
-/* Wakelock functionality */
-int os_wake_lock (TI_HANDLE OsContext);
-int os_wake_unlock (TI_HANDLE OsContext);
-int os_wake_lock_timeout (TI_HANDLE OsContext);
-int os_wake_lock_timeout_enable (TI_HANDLE OsContext);
-
-#define os_profile(hos,fn,par)
-
-
-/****************************************************************************************
-						START OF GWSI DRIVER API				
-*****************************************************************************************/
-
-/** \brief  OS Signaling Object Create
- * 
- * \param  OsContext 		- Handle to the OS object
- * \return Pointer to Signal Object on Success	;	NULL on Failure	
- * 
- * \par Description
- * This function creates a new Signaling Object or opens an already exists Signaling Object.
- * The Signaling Object created by this function is used for mutual-exclusion and protection 
- * of resources which are shared between multi-Tasks/Threads by using a signaling mechanism
- * 
- * \sa
- */
-void *os_SignalObjectCreate (TI_HANDLE OsContext);
-
-/** \brief  OS Signaling Object Wait
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  ptr 			- Pointer to Signaling Object previously created by user
- * \return TI_OK (0) on Success	;	TI_NOK (1) on Failure
- * 
- * \par Description
- * This function perform waiting on Signaling Object. The coller waits until signaled or until timeout
- * 
- * \sa
- */
-int os_SignalObjectWait (TI_HANDLE OsContext, void *ptr);
-
-/** \brief  OS Signaling Object Set
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  ptr 			- Pointer to Signaling Object previously created by user
- * \return TI_OK (0) on Success	;	TI_NOK (1) on Failure
- * 
- * \par Description
- * This function sets a Signaling Object to signaled state (e.g the siganeling object is released)
- * 
- * \sa
- */
-int os_SignalObjectSet (TI_HANDLE OsContext, void *ptr);
-
-/** \brief  OS Signaling Object Free
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  ptr 			- Pointer to Signaling Object previously created by user
- * \return TI_OK (0) on Success	;	TI_NOK (1) on Failure
- * 
- * \par Description
- * This function frees (closes) a Signaling Object Handle
- * 
- * \sa
- */
-int os_SignalObjectFree (TI_HANDLE OsContext, void *ptr);
-
-/** \brief  OS Schedule Request
- * 
- * \param  OsContext 	- Handle to the OS object
- * \return TI_OK (0) on Success	;	TI_NOK (1) on Failure
- * 
- * \par Description
- * This function performs scheduling (context switch) according to user request
- * 
- * \sa
- */
-int os_RequestSchedule (TI_HANDLE OsContext);
-
-
-/****************************************************************************************
-						START OF TI DRIVER API				
-*****************************************************************************************/
-
-/** \brief  OS Read Memory Register UINT32
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  Register		- Pointer to register address
- * \param  Data			- Pointer to output read data
- * \return void
- * 
- * \par Description
- * This function reads register in 32 bit length
- * 
- * \sa
- */
-void os_hwReadMemRegisterUINT32 (TI_HANDLE OsContext, TI_UINT32* Register, TI_UINT32* Data);
-
-/** \brief  OS Write Memory Register UINT32
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  Register		- Pointer to register address
- * \param  Data			- Data to write to register
- * \return void
- * 
- * \par Description
- * This function reads register in 32 bit length
- * 
- * \sa
- */
-void os_hwWriteMemRegisterUINT32 (TI_HANDLE OsContext, TI_UINT32* Register, TI_UINT32 Data);
-
-/** \brief  OS Receive Packet
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  pPacket 		- Pointer to received packet data
- * \param  Length 		- Length of received packet
- * \return TI_TRUE on Success	;	TI_FALSE on Failure
- * 
- * \par Description
- * This function transfers a packet from WLAN driver to OS
- * 
- * \sa
- */
-TI_BOOL os_receivePacket(TI_HANDLE OsContext, void *pRxDesc ,void *pPacket, TI_UINT16 Length);
-
-/** \brief  OS Indicate Event
- * 
- * \param  OsContext 	- Handle to the OS object
- * \param  pData 		- Pointer to event data
- * \return TI_OK (0) on Success	;
- * 
- * \par Description
- * This function indicate the OS about different connection driver's events,
- * The function performs the rewuired operations for the event - in the OS side
- * 
- * \sa
- */
-TI_INT32 os_IndicateEvent (TI_HANDLE OsContext, IPC_EV_DATA *pData);
-
-/** \brief  OS Send Trace Message to Logger
- * 
- * \param  OsContext    - The OS handle
- * \param  uLevel   	- Severity level of the trace message
- * \param  uFileId  	- Source file ID of the trace message
- * \param  uLineNum 	- Line number of the trace message
- * \param  uParamsNum   - Number of parameters in the trace message
- * \param  ...          - The trace message parameters
- * \return void
- * 
- * \par Description
- * This function sends trace message to logger
- * 
- * \sa
- */
-void os_Trace (TI_HANDLE OsContext, TI_UINT32 uLevel, TI_UINT32 uFileId, TI_UINT32 uLineNum, TI_UINT32 uParamsNum, ...);
-
-/** 
- * \fn     os_SetDrvThreadPriority
- * \brief  Called upon init to set WLAN driver thread priority.
- * 
- * \param  OsContext              - The OS handle
- * \param  uWlanDrvThreadPriority - The WLAN driver thread priority
- * \return 
- */
-void os_SetDrvThreadPriority (TI_HANDLE OsContext, TI_UINT32 uWlanDrvThreadPriority);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __OS_API_H__ */
diff --git a/wl1271/platforms/os/common/inc/osDebug.h b/wl1271/platforms/os/common/inc/osDebug.h
deleted file mode 100644
index 19275d7..0000000
--- a/wl1271/platforms/os/common/inc/osDebug.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * osDebug.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef __OSDEBUG_H_
-#define __OSDEBUG_H_
-
-#ifdef TI_DBG
-#ifndef _WINDOWS
-#include "windows_types.h"
-#endif /*_WINDOWS*/
-
-
-#define IF_TIDEBUG(f)  if (!((TiDebugFlag & (f))^(f))) 
-extern unsigned long TiDebugFlag;
-
-#define PRINT(F, A)		IF_TIDEBUG( F ) { os_printf(A); }
-#define PRINTF(F, A)	IF_TIDEBUG( F ) { os_printf A; }
-
-#define DBG_INIT				0x0001
-#define DBG_REGISTRY			0x0002
-#define DBG_NDIS_CALLS			0x0004
-#define DBG_NDIS_OIDS			0x0008
-#define DBG_PCI_RES				0x0010
-#define DBG_INTERRUPT			0x0020
-#define DBG_IOCTL				0x0040
-#define DBG_RECV				0x0080
-#define DBG_SEND				0x0100
-
-#define DBG_SEV_INFO			0x0001
-#define DBG_SEV_LOUD			0x0002
-#define DBG_SEV_VERY_LOUD		0x0004
-#define DBG_SEV_WARNING			0x0008
-#define DBG_SEV_ERROR			0x0010
-#define DBG_SEV_FATAL_ERROR		0x0020
-
-
-#define DBG_INIT_INFO				((DBG_INIT << 16) | DBG_SEV_INFO)
-#define DBG_INIT_LOUD				((DBG_INIT << 16) | DBG_SEV_LOUD)
-#define DBG_INIT_VERY_LOUD			((DBG_INIT << 16) | DBG_SEV_VERY_LOUD)
-#define DBG_INIT_WARNING			((DBG_INIT << 16) | DBG_SEV_WARNING)
-#define DBG_INIT_ERROR				((DBG_INIT << 16) | DBG_SEV_ERROR)
-#define DBG_INIT_FATAL_ERROR		((DBG_INIT << 16) | DBG_SEV_FATAL_ERROR)
-
-#define DBG_REGISTRY_INFO			((DBG_REGISTRY << 16) | DBG_SEV_INFO)
-#define DBG_REGISTRY_LOUD			((DBG_REGISTRY << 16) | DBG_SEV_LOUD)
-#define DBG_REGISTRY_VERY_LOUD		((DBG_REGISTRY << 16) | DBG_SEV_VERY_LOUD)
-#define DBG_REGISTRY_WARNING		((DBG_REGISTRY << 16) | DBG_SEV_WARNING)
-#define DBG_REGISTRY_ERROR			((DBG_REGISTRY << 16) | DBG_SEV_ERROR)
-#define DBG_REGISTRY_FATAL_ERROR	((DBG_REGISTRY << 16) | DBG_SEV_FATAL_ERROR)
-
-#define DBG_NDIS_CALLS_INFO			((DBG_NDIS_CALLS << 16) | DBG_SEV_INFO)
-#define DBG_NDIS_CALLS_LOUD			((DBG_NDIS_CALLS << 16) | DBG_SEV_LOUD)
-#define DBG_NDIS_CALLS_VERY_LOUD	((DBG_NDIS_CALLS << 16) | DBG_SEV_VERY_LOUD)
-#define DBG_NDIS_CALLS_WARNING		((DBG_NDIS_CALLS << 16) | DBG_SEV_WARNING)
-#define DBG_NDIS_CALLS_ERROR		((DBG_NDIS_CALLS << 16) | DBG_SEV_ERROR)
-#define DBG_NDIS_CALLS_FATAL_ERROR	((DBG_NDIS_CALLS << 16) | DBG_SEV_FATAL_ERROR)
-
-#define DBG_NDIS_OIDS_INFO			((DBG_NDIS_OIDS << 16) | DBG_SEV_INFO)
-#define DBG_NDIS_OIDS_LOUD			((DBG_NDIS_OIDS << 16) | DBG_SEV_LOUD)
-#define DBG_NDIS_OIDS_VERY_LOUD		((DBG_NDIS_OIDS << 16) | DBG_SEV_VERY_LOUD)
-#define DBG_NDIS_OIDS_WARNING		((DBG_NDIS_OIDS << 16) | DBG_SEV_WARNING)
-#define DBG_NDIS_OIDS_ERROR			((DBG_NDIS_OIDS << 16) | DBG_SEV_ERROR)
-#define DBG_NDIS_OIDS_FATAL_ERROR	((DBG_NDIS_OIDS << 16) | DBG_SEV_FATAL_ERROR)
-
-#define DBG_PCI_RES_INFO			((DBG_PCI_RES << 16) | DBG_SEV_INFO)
-#define DBG_PCI_RES_LOUD			((DBG_PCI_RES << 16) | DBG_SEV_LOUD)
-#define DBG_PCI_RES_VERY_LOUD		((DBG_PCI_RES << 16) | DBG_SEV_VERY_LOUD)
-#define DBG_PCI_RES_WARNING			((DBG_PCI_RES << 16) | DBG_SEV_WARNING)
-#define DBG_PCI_RES_ERROR			((DBG_PCI_RES << 16) | DBG_SEV_ERROR)
-#define DBG_PCI_RES_FATAL_ERROR		((DBG_PCI_RES << 16) | DBG_SEV_FATAL_ERROR)
-
-#define DBG_INTERRUPT_INFO			((DBG_INTERRUPT << 16) | DBG_SEV_INFO)
-#define DBG_INTERRUPT_LOUD			((DBG_INTERRUPT << 16) | DBG_SEV_LOUD)
-#define DBG_INTERRUPT_VERY_LOUD		((DBG_INTERRUPT << 16) | DBG_SEV_VERY_LOUD)
-#define DBG_INTERRUPT_WARNING		((DBG_INTERRUPT << 16) | DBG_SEV_WARNING)
-#define DBG_INTERRUPT_ERROR			((DBG_INTERRUPT << 16) | DBG_SEV_ERROR)
-#define DBG_INTERRUPT_FATAL_ERROR	((DBG_INTERRUPT << 16) | DBG_SEV_FATAL_ERROR)
-
-#define DBG_IOCTL_INFO				((DBG_IOCTL << 16) | DBG_SEV_INFO)
-#define DBG_IOCTL_LOUD				((DBG_IOCTL << 16) | DBG_SEV_LOUD)
-#define DBG_IOCTL_VERY_LOUD			((DBG_IOCTL << 16) | DBG_SEV_VERY_LOUD)
-#define DBG_IOCTL_WARNING			((DBG_IOCTL << 16) | DBG_SEV_WARNING)
-#define DBG_IOCTL_ERROR				((DBG_IOCTL << 16) | DBG_SEV_ERROR)
-#define DBG_IOCTL_FATAL_ERROR		((DBG_IOCTL << 16) | DBG_SEV_FATAL_ERROR)
-
-#define DBG_RECV_INFO				((DBG_RECV << 16) | DBG_SEV_INFO)
-#define DBG_RECV_LOUD				((DBG_RECV << 16) | DBG_SEV_LOUD)
-#define DBG_RECV_VERY_LOUD			((DBG_RECV << 16) | DBG_SEV_VERY_LOUD)
-#define DBG_RECV_WARNING			((DBG_RECV << 16) | DBG_SEV_WARNING)
-#define DBG_RECV_ERROR				((DBG_RECV << 16) | DBG_SEV_ERROR)
-#define DBG_RECV_FATAL_ERROR		((DBG_RECV << 16) | DBG_SEV_FATAL_ERROR)
-
-#define DBG_SEND_INFO				((DBG_SEND << 16) | DBG_SEV_INFO)
-#define DBG_SEND_LOUD				((DBG_SEND << 16) | DBG_SEV_LOUD)
-#define DBG_SEND_VERY_LOUD			((DBG_SEND << 16) | DBG_SEV_VERY_LOUD)
-#define DBG_SEND_WARNING			((DBG_SEND << 16) | DBG_SEV_WARNING)
-#define DBG_SEND_ERROR				((DBG_SEND << 16) | DBG_SEV_ERROR)
-#define DBG_SEND_FATAL_ERROR		((DBG_SEND << 16) | DBG_SEV_FATAL_ERROR)
-
-
-#else
-
-#define PRINT(F, A)
-#define PRINTF(F, A)
-
-#endif
-
-
-#endif /* __OSDEBUG_H_*/
-
diff --git a/wl1271/platforms/os/common/inc/osRgstry.h b/wl1271/platforms/os/common/inc/osRgstry.h
deleted file mode 100644
index 67382b4..0000000
--- a/wl1271/platforms/os/common/inc/osRgstry.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * osRgstry.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef __OSRGSTRY_H_
-#define __OSRGSTRY_H_
-
-typedef struct {
-
-    TI_UINT8*                  ParameterName;
-    NDIS_STRING             NdisParameterName;
-
-    NDIS_PARAMETER_TYPE     ParameterType;
-
-    TI_BOOL                 RangeCheck;
-
-    TI_UINT32                   DefaultValue;
-    TI_UINT32                   MinValue;
-    TI_UINT32                   MaxValue;
-
-    TI_UINT32                   FieldOffset;
-    TI_UINT32                   FieldSize;
-
-} REGISTRY_DATA, *PREGISTRY_DATA;
-
-
-void
-regFillInitTable(
-    TWlanDrvIfObjPtr pAdapter,
-    void* pInitTable
-    );
-
-#ifdef _WINDOWS
-void regReadParameters (TWlanDrvIfObjPtr pAdapter);
-#endif
-
-#ifdef TI_DBG
-
-void
-regReadLastDbgState(
-    TWlanDrvIfObjPtr pAdapter
-    );
-
-
-#endif
-
-#endif      /* __OSRGSTRY_H_*/
-
diff --git a/wl1271/platforms/os/common/inc/spi_api.h b/wl1271/platforms/os/common/inc/spi_api.h
deleted file mode 100644
index 48512d1..0000000
--- a/wl1271/platforms/os/common/inc/spi_api.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * spi_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * inc/spi_api.h
- *
- * Header for SPI API test interface
- *
- */
-
-#ifndef SPI_API_H
-#define SPI_API_H
-
-
-typedef void (*request_callback_t) (void *data, int status);
-
-
-typedef enum 
-{
-    SPI_OK                =  0,
-    SPI_TXN_COMPLETE      =  0,
-    SPI_TXN_PENDING       =  1,
-    SPI_ERR_UNKNOWN       = -1,
-    SPI_ERR_BUS_BUSY      = -2,
-    SPI_ERR_QUEUE_FULL    = -3,
-    SPI_ERR_ALLOC_MEM     = -4,
-    SPI_ERR_ASYNC_TIMEOUT = -5, 
-    SPI_ERR_WRONG_LENGTH  = -6,
-
-} SPI_Status_e; 
-
-
-void* SPI_Open         (void* hOS);
-int   SPI_Close        (void* hSPI);
-int   SPI_Write        (void* hSPI, TI_UINT8 *data, TI_UINT32 length, request_callback_t fCb, void *pCb, int more);                     
-int   SPI_Read         (void* hSPI, TI_UINT8 *data, TI_UINT32 length, request_callback_t fCb, void *pCb, int more);                      
-int   SPI_WriteRead    (void* hSPI, TI_UINT8 *data, TI_UINT32 length, TI_UINT8 *rdata, TI_UINT32 rlength, request_callback_t fCb, void* pCb, int more);
-int   SPI_WriteSync    (void* hSPI, TI_UINT8 *data, TI_UINT32 length, int more);
-int   SPI_ReadSync     (void* hSPI, TI_UINT8 *data, TI_UINT32 length);
-
-
-#endif /* SPI_API_H */
-
diff --git a/wl1271/platforms/os/common/inc/tracebuf_api.h b/wl1271/platforms/os/common/inc/tracebuf_api.h
deleted file mode 100644
index e19d826..0000000
--- a/wl1271/platforms/os/common/inc/tracebuf_api.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * tracebuf_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Benchmark tracing utility
- */
-
-#ifndef TB_TRACE_API_H
-
-#define TB_TRACE_API_H
-
-#ifdef TI_TRACE_BUF
-
-#define TB_NUM_ENTRIES 256
-#define MAX_TB_MSG 128
-
-#define TB_OPTION_NONE      0x00000000
-#define TB_OPTION_AUTOPRINT 0x00000001
-#define TB_OPTION_PRINTONCE 0x00000002
-#define TB_OPTION_STOP      0x80000000
-
-/* Initialization */
-int  tb_init(unsigned long options);
-int  tb_sprintf(const char *format ,...);
-int  tb_trace(int loc, unsigned long p1, unsigned long p2);
-void tb_destroy(void);
-void tb_scan(void);
-void tb_dump(void);
-void tb_printf(void);
-void tb_set_option(unsigned long option);
-void tb_reset_option(unsigned long option);
-
-#define tb_min(x,y) (((x)<(y)) ? (x) : (y)) 
-
-#else  /* #ifdef TI_TRACE_BUF */
-
-#define tb_init(options)
-#define tb_sprintf(format ,...)
-#define tb_trace(loc, p1, p2)
-#define tb_destroy()
-#define tb_scan()
-#define tb_dump()
-#define tb_printf()
-#define tb_set_option(option)
-#define tb_reset_option(option)
-
-#endif /* #ifdef TI_TRACE_BUF */
-
-#endif
diff --git a/wl1271/platforms/os/common/src/osRgstry.c b/wl1271/platforms/os/common/src/osRgstry.c
deleted file mode 100644
index 2723f94..0000000
--- a/wl1271/platforms/os/common/src/osRgstry.c
+++ /dev/null
@@ -1,5406 +0,0 @@
-/*
- * osRgstry.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#if defined(_WINDOWS)
-#include <ndis.h>
-#elif defined( __LINUX__ )
-#include "osRgstry_parser.h"
-#elif defined(__ARMCC__) 
-#include "osRgstry_parser.h"
-#include "string.h"
-#endif
-#include "WlanDrvIf.h"
-#include "osRgstry.h"
-#include "paramOut.h"
-#include "osDot11.h"
-#include "osApi.h"
-#include "rate.h"
-#include "802_11Defs.h"
-#include "TWDriver.h"
-
-
-#define MAX_KEY_BUFFER_LEN      256
-#define BIT_TO_BYTE_FACTOR      8
-#define MAX_SR_PARAM_LEN        14
-#define DRPw_MASK_CHECK         0xc0
-
-#define N_STR(str)              NDIS_STRING_CONST(str)
-#define INIT_TBL_OFF(field)     FIELD_OFFSET(TInitTable, field)
-
-/* Reports */
-NDIS_STRING STR_ReportSeverityTable          = NDIS_STRING_CONST( "ReportSeverityTable" );
-NDIS_STRING STR_ReportModuleTable            = NDIS_STRING_CONST( "ReportModuleTable" );
-
-
-NDIS_STRING STRFilterEnabled            = NDIS_STRING_CONST( "Mac_Filter_Enabled");
-NDIS_STRING STRnumGroupAddrs            = NDIS_STRING_CONST( "numGroupAddrs" );
-NDIS_STRING STRGroup_addr0              = NDIS_STRING_CONST( "Group_addr0" );
-NDIS_STRING STRGroup_addr1              = NDIS_STRING_CONST( "Group_addr1" );
-NDIS_STRING STRGroup_addr2              = NDIS_STRING_CONST( "Group_addr2" );
-NDIS_STRING STRGroup_addr3              = NDIS_STRING_CONST( "Group_addr3" );
-NDIS_STRING STRGroup_addr4              = NDIS_STRING_CONST( "Group_addr4" );
-NDIS_STRING STRGroup_addr5              = NDIS_STRING_CONST( "Group_addr5" );
-NDIS_STRING STRGroup_addr6              = NDIS_STRING_CONST( "Group_addr6" );
-NDIS_STRING STRGroup_addr7              = NDIS_STRING_CONST( "Group_addr7" );
-
-/* Beacon timing */
-/* If Early Wakeup is Enabled, 1251 wakes-up EARLY_WAKEUP_TIME before expected Beacon reception occasion */
-/* If Early Wakeup is Disabled, 1251 wakes-up at the expected Beacon reception occasion. */
-NDIS_STRING STREarlyWakeup                 = NDIS_STRING_CONST( "EarlyWakeup" );
-
-NDIS_STRING STRArp_Ip_Addr              = NDIS_STRING_CONST( "ArpIp_Addr" );
-NDIS_STRING STRArp_Ip_Filter_Ena        = NDIS_STRING_CONST( "ArpIp_Filter_ena");
-
-
-NDIS_STRING STRBeaconFilterDesiredState = NDIS_STRING_CONST( "Beacon_Filter_Desired_State");
-NDIS_STRING STRBeaconFilterStored       = NDIS_STRING_CONST( "Beacon_Filter_Stored");
-
-/*this is for configuring table from ini file*/
-NDIS_STRING STRBeaconIETableSize            = NDIS_STRING_CONST( "Beacon_IE_Table_Size");
-NDIS_STRING STRBeaconIETable                = NDIS_STRING_CONST( "Beacon_IE_Table") ;
-NDIS_STRING STRBeaconIETableNumOfElem       = NDIS_STRING_CONST( "Beacon_IE_Num_Of_Elem");
-
-NDIS_STRING STRCoexActivityTable            = NDIS_STRING_CONST( "Coex_Activity_Table");
-NDIS_STRING STRCoexActivityNumOfElem        = NDIS_STRING_CONST( "Coex_Activity_Num_Of_Elem");
-
-/* ------------------------------------------------------ */
-NDIS_STRING STRFirmwareDebug                = NDIS_STRING_CONST( "FirmwareDebug" );
-NDIS_STRING STRTraceBufferSize              = NDIS_STRING_CONST( "TraceBufferSize" );
-NDIS_STRING STRPrintTrace                   = NDIS_STRING_CONST( "PrintTrace" );
-
-NDIS_STRING STRHwACXAccessMethod            = NDIS_STRING_CONST( "HwACXAccessMethod" );
-NDIS_STRING STRMaxSitesFragCollect          = NDIS_STRING_CONST( "MaxSitesFragCollect" );
-
-NDIS_STRING STRTxFlashEnable                = NDIS_STRING_CONST( "TxFlashEnable" );
-
-NDIS_STRING STRBetEnable                    = NDIS_STRING_CONST( "BetEnable");
-NDIS_STRING STRBetMaxConsecutive            = NDIS_STRING_CONST( "BetMaxConsecutive");
-NDIS_STRING STRMaxFullBeaconInterval        = NDIS_STRING_CONST( "MaxlFullBeaconReceptionInterval" );
-NDIS_STRING STRBetEnableThreshold           = NDIS_STRING_CONST( "BetEnableThreshold");
-NDIS_STRING STRBetDisableThreshold          = NDIS_STRING_CONST( "BetDisableThreshold");
-
-NDIS_STRING STRNumHostRxDescriptors         = NDIS_STRING_CONST( "NumHostRxDescriptors" );
-NDIS_STRING STRNumHostTxDescriptors         = NDIS_STRING_CONST( "NumHostTxDescriptors" );
-
-NDIS_STRING STRACXMemoryBlockSize           = NDIS_STRING_CONST( "ACXMemoryBlockSize" );
-NDIS_STRING STRACXRxMemoryBlockSize         = NDIS_STRING_CONST( "ACXMemoryBlockSize" );
-NDIS_STRING STRACXTxMemoryBlockSize         = NDIS_STRING_CONST( "ACXMemoryBlockSize" );
-
-NDIS_STRING STRACXUseTxDataInterrupt        = NDIS_STRING_CONST( "ACXUseTxDataInterrupt" );
-NDIS_STRING STRACXUseInterruptThreshold     = NDIS_STRING_CONST( "ACXUseInterruptThreshold" );
-
-NDIS_STRING STRCalibrationChannel2_4        = NDIS_STRING_CONST( "CalibrationChannel24" );
-NDIS_STRING STRCalibrationChannel5_0        = NDIS_STRING_CONST( "CalibrationChannel5" );
-NDIS_STRING STRdot11RTSThreshold            = NDIS_STRING_CONST( "dot11RTSThreshold" );
-NDIS_STRING STRRxDisableBroadcast           = NDIS_STRING_CONST( "RxDisableBroadcast" );
-NDIS_STRING STRRecoveryEnable               = NDIS_STRING_CONST( "RecoveryEnable" );
-NDIS_STRING STRdot11TxAntenna               = NDIS_STRING_CONST( "dot11TxAntenna" );
-NDIS_STRING STRdot11RxAntenna               = NDIS_STRING_CONST( "dot11RxAntenna" );
-
-NDIS_STRING STRTxCompleteThreshold          = NDIS_STRING_CONST( "TxCompleteThreshold" );
-NDIS_STRING STRTxCompleteTimeout            = NDIS_STRING_CONST( "TxCompleteTimeout" );
-NDIS_STRING STRRxInterruptThreshold         = NDIS_STRING_CONST( "RxInterruptThreshold" );
-NDIS_STRING STRRxInterruptTimeout           = NDIS_STRING_CONST( "RxInterruptTimeout" );
-
-NDIS_STRING STRRxAggregationPktsLimit       = NDIS_STRING_CONST( "RxAggregationPktsLimit" );
-NDIS_STRING STRTxAggregationPktsLimit       = NDIS_STRING_CONST( "TxAggregationPktsLimit" );
-
-NDIS_STRING STRdot11FragThreshold           = NDIS_STRING_CONST( "dot11FragmentationThreshold" );
-NDIS_STRING STRdot11MaxTxMSDULifetime       = NDIS_STRING_CONST( "dot11MaxTransmitMSDULifetime" );
-NDIS_STRING STRdot11MaxReceiveLifetime      = NDIS_STRING_CONST( "dot11MaxReceiveLifetime" );
-NDIS_STRING STRdot11RateFallBackRetryLimit  = NDIS_STRING_CONST( "dot11RateFallBackRetryLimit");
-
-NDIS_STRING STRReAuthActivePriority         = NDIS_STRING_CONST( "ReAuthActivePriority" );
-
-NDIS_STRING STRListenInterval               = NDIS_STRING_CONST( "dot11ListenInterval" );
-NDIS_STRING STRExternalMode                 = NDIS_STRING_CONST( "DriverExternalMode" );
-NDIS_STRING STRWiFiAdHoc                    = NDIS_STRING_CONST( "WiFiAdhoc" );
-NDIS_STRING STRWiFiWmmPS                    = NDIS_STRING_CONST( "WiFiWmmPS" );
-NDIS_STRING STRWiFiMode                     = NDIS_STRING_CONST( "WiFiMode" );
-NDIS_STRING STRStopNetStackTx               = NDIS_STRING_CONST( "StopNetStackTx" );
-NDIS_STRING STRTxSendPaceThresh             = NDIS_STRING_CONST( "TxSendPaceThresh" );
-NDIS_STRING STRdot11DesiredChannel          = NDIS_STRING_CONST( "dot11DesiredChannel");
-NDIS_STRING STRdot11DesiredSSID             = NDIS_STRING_CONST( "dot11DesiredSSID" );
-NDIS_STRING STRdot11DesiredBSSType          = NDIS_STRING_CONST( "dot11DesiredBSSType" );
-NDIS_STRING STRdot11BasicRateMask_B           = NDIS_STRING_CONST( "dot11BasicRateMaskB");
-NDIS_STRING STRdot11SupportedRateMask_B       = NDIS_STRING_CONST( "dot11SupportedRateMaskB");
-NDIS_STRING STRdot11BasicRateMask_G           = NDIS_STRING_CONST( "dot11BasicRateMaskG");
-NDIS_STRING STRdot11SupportedRateMask_G       = NDIS_STRING_CONST( "dot11SupportedRateMaskG");
-NDIS_STRING STRdot11BasicRateMask_A           = NDIS_STRING_CONST( "dot11BasicRateMaskA");
-NDIS_STRING STRdot11SupportedRateMask_A       = NDIS_STRING_CONST( "dot11SupportedRateMaskA");
-NDIS_STRING STRdot11BasicRateMask_AG           = NDIS_STRING_CONST( "dot11BasicRateMaskAG");
-NDIS_STRING STRdot11SupportedRateMask_AG       = NDIS_STRING_CONST( "dot11SupportedRateMaskAG");
-NDIS_STRING STRdot11BasicRateMask_N           = NDIS_STRING_CONST( "dot11BasicRateMaskN");
-NDIS_STRING STRdot11SupportedRateMask_N       = NDIS_STRING_CONST( "dot11SupportedRateMaskN");
-
-NDIS_STRING STRRadio11_RxLevel              = NDIS_STRING_CONST( "Radio11_RxLevel");
-NDIS_STRING STRRadio11_LNA                  = NDIS_STRING_CONST( "Radio11_LNA");
-NDIS_STRING STRRadio11_RSSI                 = NDIS_STRING_CONST( "Radio11_RSSI");
-NDIS_STRING STRRadio0D_RxLevel              = NDIS_STRING_CONST( "Radio0D_RxLevel");
-NDIS_STRING STRRadio0D_LNA                  = NDIS_STRING_CONST( "Radio0D_LNA");
-NDIS_STRING STRRadio0D_RSSI                 = NDIS_STRING_CONST( "Radio0D_RSSI");
-
-NDIS_STRING STRdot11DesiredNetworkType      = NDIS_STRING_CONST( "dot11NetworkType");
-NDIS_STRING STRdot11DefaultNetworkType      = NDIS_STRING_CONST( "dot11DefaultNetworkType");
-NDIS_STRING STRdot11SlotTime                = NDIS_STRING_CONST( "ShortSlotTime");
-NDIS_STRING STRdot11IbssProtection          = NDIS_STRING_CONST( "IbssProtectionType");
-NDIS_STRING STRdot11RtsCtsProtection        = NDIS_STRING_CONST( "dot11RtsCtsProtection");
-
-NDIS_STRING STRRxEnergyDetection            = NDIS_STRING_CONST( "RxEnergyDetection" );
-NDIS_STRING STRCh14TelecCca                 = NDIS_STRING_CONST( "Ch14TelecCCA" );
-NDIS_STRING STRCrtCalibrationInterval       = NDIS_STRING_CONST( "CrtCalibrationInterval" );
-NDIS_STRING STRTddCalibrationInterval       = NDIS_STRING_CONST( "TddCalibrationInterval" );
-NDIS_STRING STRMacClockRate                 = NDIS_STRING_CONST( "MacClockRate" );
-NDIS_STRING STRArmClockRate                 = NDIS_STRING_CONST( "ArmClockRate" );
-NDIS_STRING STRg80211DraftNumber            = NDIS_STRING_CONST( "g80211DraftNumber" );
-
-NDIS_STRING STRdot11ShortPreambleInvoked    = NDIS_STRING_CONST( "dot11ShortPreambleInvoked" );
-
-NDIS_STRING STRdot11BeaconPeriod            = NDIS_STRING_CONST( "dot11BeaconPeriod" );
-NDIS_STRING STRdot11MaxScanTime             = NDIS_STRING_CONST( "dot11MaxScanTime" );
-NDIS_STRING STRdot11MinScanTime             = NDIS_STRING_CONST( "dot11MinScanTime" );
-NDIS_STRING STRdot11MaxSiteLifetime         = NDIS_STRING_CONST( "dot11MaxSiteLifetime" );
-
-NDIS_STRING STRdot11MaxAuthRetry            = NDIS_STRING_CONST( "dot11MaxAuthRetry" );
-NDIS_STRING STRdot11MaxAssocRetry           = NDIS_STRING_CONST( "dot11MaxAssocRetry" );
-NDIS_STRING STRdot11AuthRespTimeout         = NDIS_STRING_CONST( "dot11AuthenticationResponseTimeout" );
-NDIS_STRING STRdot11AssocRespTimeout        = NDIS_STRING_CONST( "dot11AssociationResponseTimeout" );
-
-NDIS_STRING STRConnSelfTimeout              = NDIS_STRING_CONST( "ConnSelfTimeout" );
-
-NDIS_STRING STRCreditCalcTimout             = NDIS_STRING_CONST( "CreditCalcTimout" );
-NDIS_STRING STRCreditCalcTimerEnabled       = NDIS_STRING_CONST( "CreditCalcTimerEnabled" );
-
-NDIS_STRING STRTrafficAdmControlTimeout     = NDIS_STRING_CONST("TrafficAdmControlTimeout");
-NDIS_STRING STRTrafficAdmControlUseFixedMsduSize = NDIS_STRING_CONST("TrafficAdmCtrlUseFixedMsduSize");
-NDIS_STRING STRDesiredMaxSpLen              = NDIS_STRING_CONST("DesiredMaxSpLen");
-
-NDIS_STRING STRCwFromUserEnable             = NDIS_STRING_CONST("CwFromUserEnable");
-NDIS_STRING STRDesireCwMin                  = NDIS_STRING_CONST("DesireCwMin");
-NDIS_STRING STRDesireCwMax                  = NDIS_STRING_CONST("DesireCwMax");
-
-NDIS_STRING STRRatePolicyUserShortRetryLimit   = NDIS_STRING_CONST( "RatePolicyUserShortRetryLimit" );
-NDIS_STRING STRRatePolicyUserLongRetryLimit    = NDIS_STRING_CONST( "RatePolicyUserLongRetryLimit" );
-
-NDIS_STRING STRRatePolicyUserEnabledRatesMaskCck     = NDIS_STRING_CONST( "RatePolicyUserEnabledRatesMaskCck" );
-NDIS_STRING STRRatePolicyUserEnabledRatesMaskOfdm    = NDIS_STRING_CONST( "RatePolicyUserEnabledRatesMaskOfdm" );
-NDIS_STRING STRRatePolicyUserEnabledRatesMaskOfdmA   = NDIS_STRING_CONST( "RatePolicyUserEnabledRatesMaskOfdmA" );
-NDIS_STRING STRRatePolicyUserEnabledRatesMaskOfdmN   = NDIS_STRING_CONST( "RatePolicyUserEnabledRatesMaskOfdmN" );
-
-NDIS_STRING STRdot11AuthenticationMode      = NDIS_STRING_CONST( "dot11AuthenticationMode" );
-NDIS_STRING STRdot11WEPStatus               = NDIS_STRING_CONST( "dot11WEPStatus" );
-NDIS_STRING STRdot11ExcludeUnencrypted      = NDIS_STRING_CONST( "dot11ExcludeUnencrypted" );
-NDIS_STRING STRdot11WEPKeymappingLength     = NDIS_STRING_CONST( "dot11WEPKeymappingLength" );
-NDIS_STRING STRdot11WEPDefaultKeyID         = NDIS_STRING_CONST( "dot11WEPDefaultKeyID" );
-
-NDIS_STRING STRMixedMode                    = NDIS_STRING_CONST( "MixedMode" );
-
-NDIS_STRING STRWPAMixedMode                 = NDIS_STRING_CONST( "WPAMixedMode");
-NDIS_STRING STRRSNPreAuth                   = NDIS_STRING_CONST( "RSNPreAuthentication");
-NDIS_STRING STRRSNPreAuthTimeout            = NDIS_STRING_CONST( "RSNPreAuthTimeout" );
-
-NDIS_STRING STRPairwiseMicFailureFilter     = NDIS_STRING_CONST( "PairwiseMicFailureFilter" );
-
-NDIS_STRING STRTimeToResetCountryMs         = NDIS_STRING_CONST( "TimeToResetCountryMs" );
-NDIS_STRING STRMultiRegulatoryDomainEnabled = NDIS_STRING_CONST( "MultiRegulatoryDomain" );
-NDIS_STRING STRSpectrumManagementEnabled    = NDIS_STRING_CONST( "SpectrumManagement" );
-NDIS_STRING STRScanControlTable24           = NDIS_STRING_CONST( "AllowedChannelsTable24" );
-NDIS_STRING STRScanControlTable5            = NDIS_STRING_CONST( "AllowedChannelsTable5" );
-
-NDIS_STRING STRBurstModeEnable              = NDIS_STRING_CONST( "BurstModeEnable" );
-/* Smart Reflex */
-NDIS_STRING STRSRState                      = NDIS_STRING_CONST( "SRState" );
-NDIS_STRING STRSRConfigParam1               = NDIS_STRING_CONST( "SRF1" );
-NDIS_STRING STRSRConfigParam2               = NDIS_STRING_CONST( "SRF2" );
-NDIS_STRING STRSRConfigParam3               = NDIS_STRING_CONST( "SRF3" );
-
-
-/*
-Power Manager
-*/
-NDIS_STRING STRPowerMode                    = NDIS_STRING_CONST( "dot11PowerMode" );
-NDIS_STRING STRBeaconReceiveTime            = NDIS_STRING_CONST( "BeaconReceiveTime" );
-NDIS_STRING STRBaseBandWakeUpTime           = NDIS_STRING_CONST( "BaseBandWakeUpTime" );
-NDIS_STRING STRHangoverPeriod               = NDIS_STRING_CONST( "HangoverPeriod" );
-NDIS_STRING STRBeaconListenInterval         = NDIS_STRING_CONST( "BeaconListenInterval" );
-NDIS_STRING STRDtimListenInterval         = NDIS_STRING_CONST( "DtimListenInterval" );
-NDIS_STRING STRNConsecutiveBeaconsMissed    = NDIS_STRING_CONST( "NConsecutiveBeaconsMissed" );
-NDIS_STRING STREnterTo802_11PsRetries       = NDIS_STRING_CONST( "EnterTo802_11PsRetries" );
-NDIS_STRING STRAutoPowerModeInterval        = NDIS_STRING_CONST( "AutoPowerModeInterval" );
-NDIS_STRING STRAutoPowerModeActiveTh        = NDIS_STRING_CONST( "AutoPowerModeActiveTh" );
-NDIS_STRING STRAutoPowerModeDozeTh          = NDIS_STRING_CONST( "AutoPowerModeDozeTh" );
-NDIS_STRING STRAutoPowerModeDozeMode        = NDIS_STRING_CONST( "AutoPowerModeDozeMode" );
-NDIS_STRING STRDefaultPowerLevel            = NDIS_STRING_CONST( "defaultPowerLevel" );
-NDIS_STRING STRPowerSavePowerLevel          = NDIS_STRING_CONST( "PowerSavePowerLevel" );
-NDIS_STRING STRHostClkSettlingTime          = NDIS_STRING_CONST( "HostClkSettlingTime" );
-NDIS_STRING STRHostFastWakeupSupport        = NDIS_STRING_CONST( "HostFastWakeupSupport" );
-NDIS_STRING STRDcoItrimEnabled              = NDIS_STRING_CONST( "DcoItrimEnabled" );
-NDIS_STRING STRDcoItrimModerationTimeout    = NDIS_STRING_CONST( "DcoItrimModerationTimeout" );
-
-NDIS_STRING STRPsPollDeliveryFailureRecoveryPeriod     = NDIS_STRING_CONST( "PsPollDeliveryFailureRecoveryPeriod" );
-
-NDIS_STRING STRPowerMgmtHangOverPeriod      = NDIS_STRING_CONST( "PowerMgmtHangOverPeriod" );
-NDIS_STRING STRPowerMgmtMode                = NDIS_STRING_CONST( "PowerMgmtMode" );
-NDIS_STRING STRPowerMgmtNeedToSendNullData  = NDIS_STRING_CONST( "PowerMgmtNeedToSendNullData" );
-NDIS_STRING STRPowerMgmtNullPktRateModulation = NDIS_STRING_CONST( "PowerMgmtNullPktRateModulation" );
-NDIS_STRING STRPowerMgmtNumNullPktRetries   = NDIS_STRING_CONST( "PowerMgmtNumNullPktRetries" );
-NDIS_STRING STRPowerMgmtPllLockTime         = NDIS_STRING_CONST( "PllLockTime" );
-
-NDIS_STRING STRBeaconRxTimeout     = NDIS_STRING_CONST( "BeaconRxTimeout" );
-NDIS_STRING STRBroadcastRxTimeout  = NDIS_STRING_CONST( "BroadcastRxTimeout" );
-NDIS_STRING STRRxBroadcastInPs     = NDIS_STRING_CONST( "RxBroadcastInPs" );
-
-NDIS_STRING STRConsecutivePsPollDeliveryFailureThreshold = NDIS_STRING_CONST( "ConsecutivePsPollDeliveryFailureThreshold" );
-
-NDIS_STRING STRTxPower                      = NDIS_STRING_CONST( "TxPower" );
-
-/* Scan SRV */
-NDIS_STRING STRNumberOfNoScanCompleteToRecovery         = NDIS_STRING_CONST( "NumberOfNoScanCompleteToRecovery" );
-NDIS_STRING STRTriggeredScanTimeOut                     = NDIS_STRING_CONST( "TriggeredScanTimeOut" );
-
-/*-----------------------------------*/
-/*   Coexistence params               */
-/*-----------------------------------*/
-NDIS_STRING STRBThWlanCoexistEnable                = NDIS_STRING_CONST( "BThWlanCoexistEnable" );
-
-NDIS_STRING STRBThWlanCoexistPerThreshold	    		= NDIS_STRING_CONST( "coexBtPerThreshold" );
-NDIS_STRING STRBThWlanCoexistHv3MaxOverride	    = NDIS_STRING_CONST( "coexHv3MaxOverride" );
-NDIS_STRING STRBThWlanCoexistParamsBtLoadRatio			= NDIS_STRING_CONST( "coexBtLoadRatio" );
-NDIS_STRING STRBThWlanCoexistParamsAutoPsMode			= NDIS_STRING_CONST( "coexAutoPsMode" );
-NDIS_STRING STRBThWlanCoexHv3AutoScanEnlargedNumOfProbeReqPercent	= NDIS_STRING_CONST( "coexHv3AutoScanEnlargedNumOfProbeReqPercent" );
-NDIS_STRING STRBThWlanCoexHv3AutoScanEnlargedScanWinodowPercent	    = NDIS_STRING_CONST( "coexHv3AutoScanEnlargedScanWinodowPercent" );
-NDIS_STRING STRBThWlanCoexistcoexAntennaConfiguration   = NDIS_STRING_CONST( "coexAntennaConfiguration" );
-NDIS_STRING STRBThWlanCoexistNfsSampleInterval      	= NDIS_STRING_CONST( "coexBtNfsSampleInterval" );
-NDIS_STRING STRBThWlanCoexistcoexMaxConsecutiveBeaconMissPrecent   = NDIS_STRING_CONST( "coexMaxConsecutiveBeaconMissPrecent" );
-NDIS_STRING STRBThWlanCoexistcoexAPRateAdapationThr   = NDIS_STRING_CONST( "coexAPRateAdapationThr" );
-NDIS_STRING STRBThWlanCoexistcoexAPRateAdapationSnr   = NDIS_STRING_CONST( "coexAPRateAdapationSnr" );
-
-NDIS_STRING STRBThWlanCoexistUpsdAclMasterMinBR  = NDIS_STRING_CONST( "coexWlanPsBtAclMasterMinBR" );
-NDIS_STRING STRBThWlanCoexistUpsdAclSlaveMinBR  = NDIS_STRING_CONST( "coexWlanPsBtAclSlaveMinBR" );
-NDIS_STRING STRBThWlanCoexistUpsdAclMasterMaxBR  = NDIS_STRING_CONST( "coexWlanPsBtAclMasterMaxBR" );
-NDIS_STRING STRBThWlanCoexistUpsdAclSlaveMaxBR  = NDIS_STRING_CONST( "coexWlanPsBtAclSlaveMaxBR" );
-NDIS_STRING STRBThWlanPsMaxBtAclMasterBR  = NDIS_STRING_CONST( "coexWlanPsMaxBtAclMasterBR" );
-NDIS_STRING STRBThWlanPsMaxBtAclSlaveBR  = NDIS_STRING_CONST( "coexWlanPsMaxBtAclSlaveBR" );
-NDIS_STRING STRBThWlanCoexistUpsdAclMasterMinEDR  = NDIS_STRING_CONST( "coexWlanPsBtAclMasterMinEDR" );
-NDIS_STRING STRBThWlanCoexistUpsdAclSlaveMinEDR  = NDIS_STRING_CONST( "coexWlanPsBtAclSlaveMinEDR" );
-NDIS_STRING STRBThWlanCoexistUpsdAclMasterMaxEDR  = NDIS_STRING_CONST( "coexWlanPsBtAclMasterMaxEDR" );
-NDIS_STRING STRBThWlanCoexistUpsdAclSlaveMaxEDR  = NDIS_STRING_CONST( "coexWlanPsBtAclSlaveMaxEDR" );
-NDIS_STRING STRBThWlanPsMaxBtAclMasterEDR  = NDIS_STRING_CONST( "coexWlanPsMaxBtAclMasterEDR" );
-NDIS_STRING STRBThWlanPsMaxBtAclSlaveEDR  = NDIS_STRING_CONST( "coexWlanPsMaxBtAclSlaveEDR" );
-
-NDIS_STRING STRBThWlanCoexistRxt  = NDIS_STRING_CONST( "coexRxt" );
-NDIS_STRING STRBThWlanCoexistTxt  = NDIS_STRING_CONST( "coexTxt" );
-NDIS_STRING STRBThWlanCoexistAdaptiveRxtTxt  = NDIS_STRING_CONST( "coexAdaptiveRxtTxt" );
-NDIS_STRING STRBThWlanCoexistPsPollTimeout  = NDIS_STRING_CONST( "coexPsPollTimeout" );
-NDIS_STRING STRBThWlanCoexistUpsdTimeout  = NDIS_STRING_CONST( "coexUpsdTimeout" );
-
-NDIS_STRING STRBThWlanCoexistWlanActiveBtAclMasterMinEDR  = NDIS_STRING_CONST( "coexWlanActiveBtAclMasterMinEDR" );
-NDIS_STRING STRBThWlanCoexistWlanActiveBtAclMasterMaxEDR  = NDIS_STRING_CONST( "coexWlanActiveBtAclMasterMaxEDR" );
-NDIS_STRING STRBThWlanCoexistWlanActiveMaxBtAclMasterEDR  = NDIS_STRING_CONST( "coexWlanActiveMaxBtAclMasterEDR" );
-NDIS_STRING STRBThWlanCoexistWlanActiveBtAclSlaveMinEDR  = NDIS_STRING_CONST( "coexWlanActiveBtAclSlaveMinEDR" );
-NDIS_STRING STRBThWlanCoexistWlanActiveBtAclSlaveMaxEDR  = NDIS_STRING_CONST( "coexWlanActiveBtAclSlaveMaxEDR" );
-NDIS_STRING STRBThWlanCoexistWlanActiveMaxBtAclSlaveEDR  = NDIS_STRING_CONST( "coexWlanActiveMaxBtAclSlaveEDR" );
-
-NDIS_STRING STRBThWlanCoexistWlanActiveBtAclMinBR  = NDIS_STRING_CONST( "coexWlanActiveBtAclMinBR" );
-NDIS_STRING STRBThWlanCoexistWlanActiveBtAclMaxBR  = NDIS_STRING_CONST( "coexWlanActiveBtAclMaxBR" );
-NDIS_STRING STRBThWlanCoexistWlanActiveMaxBtAclBR  = NDIS_STRING_CONST( "coexWlanActiveMaxBtAclBR" );
-
-NDIS_STRING STRBThWlanCoexHv3AutoEnlargePassiveScanWindowPercent  = NDIS_STRING_CONST( "coexHv3AutoEnlargePassiveScanWindowPercent" );
-NDIS_STRING STRBThWlanCoexA2DPAutoEnlargePassiveScanWindowPercent  = NDIS_STRING_CONST( "coexA2DPAutoEnlargePassiveScanWindowPercent" );
-NDIS_STRING STRBThWlanCoexPassiveScanA2dpBtTime  = NDIS_STRING_CONST( "coexPassiveScanA2dpBtTime" );
-NDIS_STRING STRBThWlanCoexPassiveScanA2dpWlanTime  = NDIS_STRING_CONST( "coexPassiveScanA2dpWlanTime" );
-NDIS_STRING STRBThWlancoexDhcpTime  = NDIS_STRING_CONST( "coexDhcpTime" );
-NDIS_STRING STRBThWlanCoexHv3MaxServed  = NDIS_STRING_CONST( "CoexHv3MaxServed" );
-NDIS_STRING STRBThWlanCoexA2dpAutoScanEnlargedScanWinodowPercent  = NDIS_STRING_CONST( "coexA2dpAutoScanEnlargedScanWinodowPercent" );
-NDIS_STRING STRBThWlanCoexTemp1  = NDIS_STRING_CONST( "coexTempParam1" );
-NDIS_STRING STRBThWlanCoexTemp2  = NDIS_STRING_CONST( "coexTempParam2" );
-NDIS_STRING STRBThWlanCoexTemp3  = NDIS_STRING_CONST( "coexTempParam3" );
-NDIS_STRING STRBThWlanCoexTemp4  = NDIS_STRING_CONST( "coexTempParam4" );
-NDIS_STRING STRBThWlanCoexTemp5  = NDIS_STRING_CONST( "coexTempParam5" );
-
-NDIS_STRING STRDisableSsidPending           = NDIS_STRING_CONST( "DisableSsidPending" );
-
-/*-----------------------------------*/
-/*   SME Init Params                 */
-/*-----------------------------------*/
-NDIS_STRING STRSmeRadioOn                   = NDIS_STRING_CONST( "RadioOn" );
-NDIS_STRING STRSmeConnectMode               = NDIS_STRING_CONST( "SmeConnectMode" );
-NDIS_STRING STRSmeScanRssiThreshold         = NDIS_STRING_CONST( "SmeScanRssiThreshold" );
-NDIS_STRING STRSmeScanSnrThreshold          = NDIS_STRING_CONST( "SmeScanSnrThreshold" );
-NDIS_STRING STRSmeScanCycleNumber           = NDIS_STRING_CONST( "SmeScanCycleNumber" );
-NDIS_STRING STRSmeScanMaxDwellTime          = NDIS_STRING_CONST( "SmeScanMaxDwellTimeMs" );
-NDIS_STRING STRSmeScanMinDwellTime          = NDIS_STRING_CONST( "SmeScanMinDwellTimeMs" );
-NDIS_STRING STRSmeScanProbeRequestNumber    = NDIS_STRING_CONST( "SmeScanProbeRequestNumber" );
-NDIS_STRING STRSmeScanIntervals             = NDIS_STRING_CONST( "SmeScanIntervalList" );
-NDIS_STRING STRSmeScanGChannels             = NDIS_STRING_CONST( "SmeScanGChannelList" );
-NDIS_STRING STRSmeScanAChannels             = NDIS_STRING_CONST( "SmeScanAChannelList" );
-
-
-/*-----------------------------------*/
-/*  Roaming & Scanning  Init Params  */
-/*-----------------------------------*/
-NDIS_STRING STRRoamScanEnable           = NDIS_STRING_CONST( "RoamScanEnable" );
-
-/*-----------------------------------*/
-/*   Health Check Init Params        */
-/*-----------------------------------*/
-NDIS_STRING STRRecoveryEnabledNoScanComplete    = NDIS_STRING_CONST( "RecoveryEnabledNoScanComplete" );
-NDIS_STRING STRRecoveryEnabledMboxFailure       = NDIS_STRING_CONST( "RecoveryEnabledMboxFailure" );
-NDIS_STRING STRRecoveryEnabledHwAwakeFailure    = NDIS_STRING_CONST( "RecoveryEnabledHwAwakeFailure" );
-NDIS_STRING STRRecoveryEnabledTxStuck           = NDIS_STRING_CONST( "RecoveryEnabledTxStuck" );
-NDIS_STRING STRRecoveryEnabledDisconnectTimeout = NDIS_STRING_CONST( "RecoveryEnabledDisconnectTimeout" );
-NDIS_STRING STRRecoveryEnabledPowerSaveFailure  = NDIS_STRING_CONST( "RecoveryEnabledPowerSaveFailure" );
-NDIS_STRING STRRecoveryEnabledMeasurementFailure= NDIS_STRING_CONST( "RecoveryEnabledMeasurementFailure" );
-NDIS_STRING STRRecoveryEnabledBusFailure        = NDIS_STRING_CONST( "RecoveryEnabledBusFailure" );
-NDIS_STRING STRRecoveryEnabledHwWdExpire        = NDIS_STRING_CONST( "RecoveryEnabledHwWdExpire" );
-NDIS_STRING STRRecoveryEnabledRxXferFailure     = NDIS_STRING_CONST( "RecoveryEnabledRxXferFailure" );
-
-/*-----------------------------------*/
-/* Tx Power control with atheros     */
-/*-----------------------------------*/
-NDIS_STRING STRTxPowerCheckTime                 = NDIS_STRING_CONST("TxPowerCheckTime");
-NDIS_STRING STRTxPowerControlOn                 = NDIS_STRING_CONST("TxPowerControlOn");
-NDIS_STRING STRTxPowerRssiThresh                = NDIS_STRING_CONST("TxPowerRssiThresh");
-NDIS_STRING STRTxPowerRssiRestoreThresh         = NDIS_STRING_CONST("TxPowerRssiRestoreThresh");
-NDIS_STRING STRTxPowerTempRecover              = NDIS_STRING_CONST("TxPowerTempRecover");
-
-
-/*-----------------------------------*/
-/*-----------------------------------*/
-/*        QOS Parameters             */
-/*-----------------------------------*/
-NDIS_STRING STRWMEEnable                        = NDIS_STRING_CONST("WME_Enable");
-NDIS_STRING STRTrafficAdmCtrlEnable             = NDIS_STRING_CONST("TrafficAdmCtrl_Enable");
-NDIS_STRING STRdesiredPsMode                    = NDIS_STRING_CONST("desiredPsMode");
-NDIS_STRING STRQOSmsduLifeTimeBE                = NDIS_STRING_CONST("QOS_msduLifeTimeBE");
-NDIS_STRING STRQOSmsduLifeTimeBK                = NDIS_STRING_CONST("QOS_msduLifeTimeBK");
-NDIS_STRING STRQOSmsduLifeTimeVI                = NDIS_STRING_CONST("QOS_msduLifeTimeVI");
-NDIS_STRING STRQOSmsduLifeTimeVO                = NDIS_STRING_CONST("QOS_msduLifeTimeVO");
-NDIS_STRING STRQOSrxTimeOutPsPoll               = NDIS_STRING_CONST("QOS_rxTimeoutPsPoll");
-NDIS_STRING STRQOSrxTimeOutUPSD                 = NDIS_STRING_CONST("QOS_rxTimeoutUPSD");
-NDIS_STRING STRQOSwmePsModeBE                   = NDIS_STRING_CONST("QOS_wmePsModeBE");
-NDIS_STRING STRQOSwmePsModeBK                   = NDIS_STRING_CONST("QOS_wmePsModeBK");
-NDIS_STRING STRQOSwmePsModeVI                   = NDIS_STRING_CONST("QOS_wmePsModeVI");
-NDIS_STRING STRQOSwmePsModeVO                   = NDIS_STRING_CONST("QOS_wmePsModeVO");
-NDIS_STRING STRQOSShortRetryLimitBE             = NDIS_STRING_CONST("QOS_ShortRetryLimitBE");
-NDIS_STRING STRQOSShortRetryLimitBK             = NDIS_STRING_CONST("QOS_ShortRetryLimitBK");
-NDIS_STRING STRQOSShortRetryLimitVI             = NDIS_STRING_CONST("QOS_ShortRetryLimitVI");
-NDIS_STRING STRQOSShortRetryLimitVO             = NDIS_STRING_CONST("QOS_ShortRetryLimitVO");
-NDIS_STRING STRQOSLongRetryLimitBE              = NDIS_STRING_CONST("QOS_LongRetryLimitBE");
-NDIS_STRING STRQOSLongRetryLimitBK              = NDIS_STRING_CONST("QOS_LongRetryLimitBK");
-NDIS_STRING STRQOSLongRetryLimitVI              = NDIS_STRING_CONST("QOS_LongRetryLimitVI");
-NDIS_STRING STRQOSLongRetryLimitVO              = NDIS_STRING_CONST("QOS_LongRetryLimitVO");
-
-NDIS_STRING STRQOSAckPolicyBE                   = NDIS_STRING_CONST("QOS_AckPolicyBE");
-NDIS_STRING STRQOSAckPolicyBK                   = NDIS_STRING_CONST("QOS_AckPolicyBK");
-NDIS_STRING STRQOSAckPolicyVI                   = NDIS_STRING_CONST("QOS_AckPolicyVI");
-NDIS_STRING STRQOSAckPolicyVO                   = NDIS_STRING_CONST("QOS_AckPolicyVO");
-NDIS_STRING STRQoSqueue0OverFlowPolicy          = NDIS_STRING_CONST("QOS_queue0OverFlowPolicy");
-NDIS_STRING STRQoSqueue1OverFlowPolicy          = NDIS_STRING_CONST("QOS_queue1OverFlowPolicy");
-NDIS_STRING STRQoSqueue2OverFlowPolicy          = NDIS_STRING_CONST("QOS_queue2OverFlowPolicy");
-NDIS_STRING STRQoSqueue3OverFlowPolicy          = NDIS_STRING_CONST("QOS_queue3OverFlowPolicy");
-/* HP parameters */
-NDIS_STRING STR11nEnable                        = NDIS_STRING_CONST("HT_Enable");
-NDIS_STRING STRBaPolicyTid_0                    = NDIS_STRING_CONST("BaPolicyTid_0");
-NDIS_STRING STRBaPolicyTid_1                    = NDIS_STRING_CONST("BaPolicyTid_1");
-NDIS_STRING STRBaPolicyTid_2                    = NDIS_STRING_CONST("BaPolicyTid_2");
-NDIS_STRING STRBaPolicyTid_3                    = NDIS_STRING_CONST("BaPolicyTid_3");
-NDIS_STRING STRBaPolicyTid_4                    = NDIS_STRING_CONST("BaPolicyTid_4");
-NDIS_STRING STRBaPolicyTid_5                    = NDIS_STRING_CONST("BaPolicyTid_5");
-NDIS_STRING STRBaPolicyTid_6                    = NDIS_STRING_CONST("BaPolicyTid_6");
-NDIS_STRING STRBaPolicyTid_7                    = NDIS_STRING_CONST("BaPolicyTid_7");
-NDIS_STRING STRBaInactivityTimeoutTid_0         = NDIS_STRING_CONST("BaInactivityTimeoutTid_0");
-NDIS_STRING STRBaInactivityTimeoutTid_1         = NDIS_STRING_CONST("BaInactivityTimeoutTid_1");
-NDIS_STRING STRBaInactivityTimeoutTid_2         = NDIS_STRING_CONST("BaInactivityTimeoutTid_2");
-NDIS_STRING STRBaInactivityTimeoutTid_3         = NDIS_STRING_CONST("BaInactivityTimeoutTid_3");
-NDIS_STRING STRBaInactivityTimeoutTid_4         = NDIS_STRING_CONST("BaInactivityTimeoutTid_4");
-NDIS_STRING STRBaInactivityTimeoutTid_5         = NDIS_STRING_CONST("BaInactivityTimeoutTid_5");
-NDIS_STRING STRBaInactivityTimeoutTid_6         = NDIS_STRING_CONST("BaInactivityTimeoutTid_6");
-NDIS_STRING STRBaInactivityTimeoutTid_7         = NDIS_STRING_CONST("BaInactivityTimeoutTid_7");
-
-
-/* HW Tx queues mem-blocks allocation thresholds */
-NDIS_STRING STRQOStxBlksThresholdBE             = NDIS_STRING_CONST("QOS_txBlksThresholdBE");
-NDIS_STRING STRQOStxBlksThresholdBK             = NDIS_STRING_CONST("QOS_txBlksThresholdBK");
-NDIS_STRING STRQOStxBlksThresholdVI             = NDIS_STRING_CONST("QOS_txBlksThresholdVI");
-NDIS_STRING STRQOStxBlksThresholdVO             = NDIS_STRING_CONST("QOS_txBlksThresholdVO");
-
-/* HW Rx mem-blocks Number */
-NDIS_STRING STRRxMemBlksNum                     = NDIS_STRING_CONST("RxMemBlksNum");
-
-/* Traffic Intensity parameters*/
-NDIS_STRING STRTrafficIntensityThresHigh        = NDIS_STRING_CONST("TrafficIntensityThresHigh");
-NDIS_STRING STRTrafficIntensityThresLow         = NDIS_STRING_CONST("TrafficIntensityThresLow");
-NDIS_STRING STRTrafficIntensityTestInterval     = NDIS_STRING_CONST("TrafficIntensityTestInterval");
-NDIS_STRING STRTrafficIntensityThresholdEnabled = NDIS_STRING_CONST("TrafficIntensityThresholdEnabled");
-NDIS_STRING STRTrafficMonitorMinIntervalPercentage = NDIS_STRING_CONST("TrafficMonitorMinIntervalPercent");
-
-/* Packet Burst parameters */
-NDIS_STRING STRQOSPacketBurstEnable             = NDIS_STRING_CONST("QOS_PacketBurstEnable");
-NDIS_STRING STRQOSPacketBurstTxOpLimit          = NDIS_STRING_CONST("QOS_PacketBurstTxOpLimit");
-
-/* Performance Boost (for speed or for QoS) */
-NDIS_STRING STRPerformanceBoost                 = NDIS_STRING_CONST("PerformanceBoost");
-
-/* Maximum AMPDU Size */
-NDIS_STRING STRMaxAMPDU                         = NDIS_STRING_CONST("MaxAMPDU");
-
-/*-----------------------------------*/
-/*        QOS classifier Parameters  */
-/*-----------------------------------*/
-NDIS_STRING STRClsfr_Type                       = NDIS_STRING_CONST("Clsfr_Type");
-NDIS_STRING STRNumOfCodePoints                  = NDIS_STRING_CONST("NumOfCodePoints");
-NDIS_STRING STRNumOfDstPortClassifiers          = NDIS_STRING_CONST("NumOfDstPortClassifiers");
-NDIS_STRING STRNumOfDstIPPortClassifiers        = NDIS_STRING_CONST("NumOfDstIPPortClassifiers");
-
-NDIS_STRING STRDSCPClassifier00_CodePoint       = NDIS_STRING_CONST("DSCPClassifier00_CodePoint");
-NDIS_STRING STRDSCPClassifier01_CodePoint       = NDIS_STRING_CONST("DSCPClassifier01_CodePoint");
-NDIS_STRING STRDSCPClassifier02_CodePoint       = NDIS_STRING_CONST("DSCPClassifier02_CodePoint");
-NDIS_STRING STRDSCPClassifier03_CodePoint       = NDIS_STRING_CONST("DSCPClassifier03_CodePoint");
-NDIS_STRING STRDSCPClassifier04_CodePoint       = NDIS_STRING_CONST("DSCPClassifier04_CodePoint");
-NDIS_STRING STRDSCPClassifier05_CodePoint       = NDIS_STRING_CONST("DSCPClassifier05_CodePoint");
-NDIS_STRING STRDSCPClassifier06_CodePoint       = NDIS_STRING_CONST("DSCPClassifier06_CodePoint");
-NDIS_STRING STRDSCPClassifier07_CodePoint       = NDIS_STRING_CONST("DSCPClassifier07_CodePoint");
-NDIS_STRING STRDSCPClassifier08_CodePoint       = NDIS_STRING_CONST("DSCPClassifier08_CodePoint");
-NDIS_STRING STRDSCPClassifier09_CodePoint       = NDIS_STRING_CONST("DSCPClassifier09_CodePoint");
-NDIS_STRING STRDSCPClassifier10_CodePoint       = NDIS_STRING_CONST("DSCPClassifier10_CodePoint");
-NDIS_STRING STRDSCPClassifier11_CodePoint       = NDIS_STRING_CONST("DSCPClassifier11_CodePoint");
-NDIS_STRING STRDSCPClassifier12_CodePoint       = NDIS_STRING_CONST("DSCPClassifier12_CodePoint");
-NDIS_STRING STRDSCPClassifier13_CodePoint       = NDIS_STRING_CONST("DSCPClassifier13_CodePoint");
-NDIS_STRING STRDSCPClassifier14_CodePoint       = NDIS_STRING_CONST("DSCPClassifier14_CodePoint");
-NDIS_STRING STRDSCPClassifier15_CodePoint       = NDIS_STRING_CONST("DSCPClassifier15_CodePoint");
-
-NDIS_STRING STRDSCPClassifier00_DTag        = NDIS_STRING_CONST("DSCPClassifier00_DTag");
-NDIS_STRING STRDSCPClassifier01_DTag        = NDIS_STRING_CONST("DSCPClassifier01_DTag");
-NDIS_STRING STRDSCPClassifier02_DTag        = NDIS_STRING_CONST("DSCPClassifier02_DTag");
-NDIS_STRING STRDSCPClassifier03_DTag        = NDIS_STRING_CONST("DSCPClassifier03_DTag");
-NDIS_STRING STRDSCPClassifier04_DTag        = NDIS_STRING_CONST("DSCPClassifier04_DTag");
-NDIS_STRING STRDSCPClassifier05_DTag        = NDIS_STRING_CONST("DSCPClassifier05_DTag");
-NDIS_STRING STRDSCPClassifier06_DTag        = NDIS_STRING_CONST("DSCPClassifier06_DTag");
-NDIS_STRING STRDSCPClassifier07_DTag        = NDIS_STRING_CONST("DSCPClassifier07_DTag");
-NDIS_STRING STRDSCPClassifier08_DTag        = NDIS_STRING_CONST("DSCPClassifier08_DTag");
-NDIS_STRING STRDSCPClassifier09_DTag        = NDIS_STRING_CONST("DSCPClassifier09_DTag");
-NDIS_STRING STRDSCPClassifier10_DTag        = NDIS_STRING_CONST("DSCPClassifier10_DTag");
-NDIS_STRING STRDSCPClassifier11_DTag        = NDIS_STRING_CONST("DSCPClassifier11_DTag");
-NDIS_STRING STRDSCPClassifier12_DTag        = NDIS_STRING_CONST("DSCPClassifier12_DTag");
-NDIS_STRING STRDSCPClassifier13_DTag        = NDIS_STRING_CONST("DSCPClassifier13_DTag");
-NDIS_STRING STRDSCPClassifier14_DTag        = NDIS_STRING_CONST("DSCPClassifier14_DTag");
-NDIS_STRING STRDSCPClassifier15_DTag        = NDIS_STRING_CONST("DSCPClassifier15_DTag");
-
-
-NDIS_STRING STRPortClassifier00_Port            = NDIS_STRING_CONST("PortClassifier00_Port");
-NDIS_STRING STRPortClassifier01_Port            = NDIS_STRING_CONST("PortClassifier01_Port");
-NDIS_STRING STRPortClassifier02_Port            = NDIS_STRING_CONST("PortClassifier02_Port");
-NDIS_STRING STRPortClassifier03_Port            = NDIS_STRING_CONST("PortClassifier03_Port");
-NDIS_STRING STRPortClassifier04_Port            = NDIS_STRING_CONST("PortClassifier04_Port");
-NDIS_STRING STRPortClassifier05_Port            = NDIS_STRING_CONST("PortClassifier05_Port");
-NDIS_STRING STRPortClassifier06_Port            = NDIS_STRING_CONST("PortClassifier06_Port");
-NDIS_STRING STRPortClassifier07_Port            = NDIS_STRING_CONST("PortClassifier07_Port");
-NDIS_STRING STRPortClassifier08_Port            = NDIS_STRING_CONST("PortClassifier08_Port");
-NDIS_STRING STRPortClassifier09_Port            = NDIS_STRING_CONST("PortClassifier09_Port");
-NDIS_STRING STRPortClassifier10_Port            = NDIS_STRING_CONST("PortClassifier10_Port");
-NDIS_STRING STRPortClassifier11_Port            = NDIS_STRING_CONST("PortClassifier11_Port");
-NDIS_STRING STRPortClassifier12_Port            = NDIS_STRING_CONST("PortClassifier12_Port");
-NDIS_STRING STRPortClassifier13_Port            = NDIS_STRING_CONST("PortClassifier13_Port");
-NDIS_STRING STRPortClassifier14_Port            = NDIS_STRING_CONST("PortClassifier14_Port");
-NDIS_STRING STRPortClassifier15_Port            = NDIS_STRING_CONST("PortClassifier15_Port");
-
-NDIS_STRING STRPortClassifier00_DTag            = NDIS_STRING_CONST("PortClassifier00_DTag");
-NDIS_STRING STRPortClassifier01_DTag            = NDIS_STRING_CONST("PortClassifier01_DTag");
-NDIS_STRING STRPortClassifier02_DTag            = NDIS_STRING_CONST("PortClassifier02_DTag");
-NDIS_STRING STRPortClassifier03_DTag            = NDIS_STRING_CONST("PortClassifier03_DTag");
-NDIS_STRING STRPortClassifier04_DTag            = NDIS_STRING_CONST("PortClassifier04_DTag");
-NDIS_STRING STRPortClassifier05_DTag            = NDIS_STRING_CONST("PortClassifier05_DTag");
-NDIS_STRING STRPortClassifier06_DTag            = NDIS_STRING_CONST("PortClassifier06_DTag");
-NDIS_STRING STRPortClassifier07_DTag            = NDIS_STRING_CONST("PortClassifier07_DTag");
-NDIS_STRING STRPortClassifier08_DTag            = NDIS_STRING_CONST("PortClassifier08_DTag");
-NDIS_STRING STRPortClassifier09_DTag            = NDIS_STRING_CONST("PortClassifier09_DTag");
-NDIS_STRING STRPortClassifier10_DTag            = NDIS_STRING_CONST("PortClassifier10_DTag");
-NDIS_STRING STRPortClassifier11_DTag            = NDIS_STRING_CONST("PortClassifier11_DTag");
-NDIS_STRING STRPortClassifier12_DTag            = NDIS_STRING_CONST("PortClassifier12_DTag");
-NDIS_STRING STRPortClassifier13_DTag            = NDIS_STRING_CONST("PortClassifier13_DTag");
-NDIS_STRING STRPortClassifier14_DTag            = NDIS_STRING_CONST("PortClassifier14_DTag");
-NDIS_STRING STRPortClassifier15_DTag            = NDIS_STRING_CONST("PortClassifier15_DTag");
-
-NDIS_STRING STRIPPortClassifier00_IPAddress     = NDIS_STRING_CONST("IPPortClassifier00_IPAddress");
-NDIS_STRING STRIPPortClassifier01_IPAddress     = NDIS_STRING_CONST("IPPortClassifier01_IPAddress");
-NDIS_STRING STRIPPortClassifier02_IPAddress     = NDIS_STRING_CONST("IPPortClassifier02_IPAddress");
-NDIS_STRING STRIPPortClassifier03_IPAddress     = NDIS_STRING_CONST("IPPortClassifier03_IPAddress");
-NDIS_STRING STRIPPortClassifier04_IPAddress     = NDIS_STRING_CONST("IPPortClassifier04_IPAddress");
-NDIS_STRING STRIPPortClassifier05_IPAddress     = NDIS_STRING_CONST("IPPortClassifier05_IPAddress");
-NDIS_STRING STRIPPortClassifier06_IPAddress     = NDIS_STRING_CONST("IPPortClassifier06_IPAddress");
-NDIS_STRING STRIPPortClassifier07_IPAddress     = NDIS_STRING_CONST("IPPortClassifier07_IPAddress");
-NDIS_STRING STRIPPortClassifier08_IPAddress     = NDIS_STRING_CONST("IPPortClassifier08_IPAddress");
-NDIS_STRING STRIPPortClassifier09_IPAddress     = NDIS_STRING_CONST("IPPortClassifier09_IPAddress");
-NDIS_STRING STRIPPortClassifier10_IPAddress     = NDIS_STRING_CONST("IPPortClassifier10_IPAddress");
-NDIS_STRING STRIPPortClassifier11_IPAddress     = NDIS_STRING_CONST("IPPortClassifier11_IPAddress");
-NDIS_STRING STRIPPortClassifier12_IPAddress     = NDIS_STRING_CONST("IPPortClassifier12_IPAddress");
-NDIS_STRING STRIPPortClassifier13_IPAddress     = NDIS_STRING_CONST("IPPortClassifier13_IPAddress");
-NDIS_STRING STRIPPortClassifier14_IPAddress     = NDIS_STRING_CONST("IPPortClassifier14_IPAddress");
-NDIS_STRING STRIPPortClassifier15_IPAddress     = NDIS_STRING_CONST("IPPortClassifier15_IPAddress");
-
-NDIS_STRING STRIPPortClassifier00_Port          = NDIS_STRING_CONST("IPPortClassifier00_Port");
-NDIS_STRING STRIPPortClassifier01_Port          = NDIS_STRING_CONST("IPPortClassifier01_Port");
-NDIS_STRING STRIPPortClassifier02_Port          = NDIS_STRING_CONST("IPPortClassifier02_Port");
-NDIS_STRING STRIPPortClassifier03_Port          = NDIS_STRING_CONST("IPPortClassifier03_Port");
-NDIS_STRING STRIPPortClassifier04_Port          = NDIS_STRING_CONST("IPPortClassifier04_Port");
-NDIS_STRING STRIPPortClassifier05_Port          = NDIS_STRING_CONST("IPPortClassifier05_Port");
-NDIS_STRING STRIPPortClassifier06_Port          = NDIS_STRING_CONST("IPPortClassifier06_Port");
-NDIS_STRING STRIPPortClassifier07_Port          = NDIS_STRING_CONST("IPPortClassifier07_Port");
-NDIS_STRING STRIPPortClassifier08_Port          = NDIS_STRING_CONST("IPPortClassifier08_Port");
-NDIS_STRING STRIPPortClassifier09_Port          = NDIS_STRING_CONST("IPPortClassifier09_Port");
-NDIS_STRING STRIPPortClassifier10_Port          = NDIS_STRING_CONST("IPPortClassifier10_Port");
-NDIS_STRING STRIPPortClassifier11_Port          = NDIS_STRING_CONST("IPPortClassifier11_Port");
-NDIS_STRING STRIPPortClassifier12_Port          = NDIS_STRING_CONST("IPPortClassifier12_Port");
-NDIS_STRING STRIPPortClassifier13_Port          = NDIS_STRING_CONST("IPPortClassifier13_Port");
-NDIS_STRING STRIPPortClassifier14_Port          = NDIS_STRING_CONST("IPPortClassifier14_Port");
-NDIS_STRING STRIPPortClassifier15_Port          = NDIS_STRING_CONST("IPPortClassifier15_Port");
-
-NDIS_STRING STRIPPortClassifier00_DTag          = NDIS_STRING_CONST("IPPortClassifier00_DTag");
-NDIS_STRING STRIPPortClassifier01_DTag          = NDIS_STRING_CONST("IPPortClassifier01_DTag");
-NDIS_STRING STRIPPortClassifier02_DTag          = NDIS_STRING_CONST("IPPortClassifier02_DTag");
-NDIS_STRING STRIPPortClassifier03_DTag          = NDIS_STRING_CONST("IPPortClassifier03_DTag");
-NDIS_STRING STRIPPortClassifier04_DTag          = NDIS_STRING_CONST("IPPortClassifier04_DTag");
-NDIS_STRING STRIPPortClassifier05_DTag          = NDIS_STRING_CONST("IPPortClassifier05_DTag");
-NDIS_STRING STRIPPortClassifier06_DTag          = NDIS_STRING_CONST("IPPortClassifier06_DTag");
-NDIS_STRING STRIPPortClassifier07_DTag          = NDIS_STRING_CONST("IPPortClassifier07_DTag");
-NDIS_STRING STRIPPortClassifier08_DTag          = NDIS_STRING_CONST("IPPortClassifier08_DTag");
-NDIS_STRING STRIPPortClassifier09_DTag          = NDIS_STRING_CONST("IPPortClassifier09_DTag");
-NDIS_STRING STRIPPortClassifier10_DTag          = NDIS_STRING_CONST("IPPortClassifier10_DTag");
-NDIS_STRING STRIPPortClassifier11_DTag          = NDIS_STRING_CONST("IPPortClassifier11_DTag");
-NDIS_STRING STRIPPortClassifier12_DTag          = NDIS_STRING_CONST("IPPortClassifier12_DTag");
-NDIS_STRING STRIPPortClassifier13_DTag          = NDIS_STRING_CONST("IPPortClassifier13_DTag");
-NDIS_STRING STRIPPortClassifier14_DTag          = NDIS_STRING_CONST("IPPortClassifier14_DTag");
-NDIS_STRING STRIPPortClassifier15_DTag          = NDIS_STRING_CONST("IPPortClassifier15_DTag");
-
-/*-----------------------------
-   Rx Data Filter parameters
------------------------------*/
-NDIS_STRING STRRxDataFiltersEnabled             = NDIS_STRING_CONST("RxDataFilters_Enabled");
-NDIS_STRING STRRxDataFiltersDefaultAction       = NDIS_STRING_CONST("RxDataFilters_DefaultAction");
-
-NDIS_STRING STRRxDataFiltersFilter1Offset       = NDIS_STRING_CONST("RxDataFilters_Filter1Offset");
-NDIS_STRING STRRxDataFiltersFilter1Mask         = NDIS_STRING_CONST("RxDataFilters_Filter1Mask");
-NDIS_STRING STRRxDataFiltersFilter1Pattern      = NDIS_STRING_CONST("RxDataFilters_Filter1Pattern");
-
-NDIS_STRING STRRxDataFiltersFilter2Offset       = NDIS_STRING_CONST("RxDataFilters_Filter2Offset");
-NDIS_STRING STRRxDataFiltersFilter2Mask         = NDIS_STRING_CONST("RxDataFilters_Filter2Mask");
-NDIS_STRING STRRxDataFiltersFilter2Pattern      = NDIS_STRING_CONST("RxDataFilters_Filter2Pattern");
-
-NDIS_STRING STRRxDataFiltersFilter3Offset       = NDIS_STRING_CONST("RxDataFilters_Filter3Offset");
-NDIS_STRING STRRxDataFiltersFilter3Mask         = NDIS_STRING_CONST("RxDataFilters_Filter3Mask");
-NDIS_STRING STRRxDataFiltersFilter3Pattern      = NDIS_STRING_CONST("RxDataFilters_Filter3Pattern");
-
-NDIS_STRING STRRxDataFiltersFilter4Offset       = NDIS_STRING_CONST("RxDataFilters_Filter4Offset");
-NDIS_STRING STRRxDataFiltersFilter4Mask         = NDIS_STRING_CONST("RxDataFilters_Filter4Mask");
-NDIS_STRING STRRxDataFiltersFilter4Pattern      = NDIS_STRING_CONST("RxDataFilters_Filter4Pattern");
-
-
-NDIS_STRING STRReAuthActiveTimeout              = NDIS_STRING_CONST( "ReAuthActiveTimeout" );
-
-/*---------------------------
-    Measurement parameters
------------------------------*/
-NDIS_STRING STRMeasurTrafficThreshold           = NDIS_STRING_CONST( "MeasurTrafficThreshold" );
-NDIS_STRING STRMeasurMaxDurationOnNonServingChannel = NDIS_STRING_CONST( "MeasurMaxDurationOnNonServingChannel" );
-
-/*---------------------------
-      XCC Manager parameters
------------------------------*/
-#ifdef XCC_MODULE_INCLUDED
-NDIS_STRING STRXCCModeEnabled                   = NDIS_STRING_CONST( "XCCModeEnabled" );
-#endif
-
-NDIS_STRING STRXCCTestIgnoreDeAuth0             = NDIS_STRING_CONST( "XCCTestRogeAP" );
-
-/*-----------------------------------*/
-/*   EEPROM-less support             */
-/*-----------------------------------*/
-NDIS_STRING STREEPROMlessModeSupported          = NDIS_STRING_CONST( "EEPROMlessModeSupported" );
-NDIS_STRING STRstationMacAddress                = NDIS_STRING_CONST("dot11StationID");
-
-
-/*-----------------------------------*/
-/*   INI file to configuration       */
-/*-----------------------------------*/
-
-NDIS_STRING SendINIBufferToUser                 = NDIS_STRING_CONST("SendINIBufferToUserMode");
-
-/*-------------------------------------------
-   RSSI/SNR Weights for Average calculations
---------------------------------------------*/
-
-NDIS_STRING STRRssiBeaconAverageWeight = NDIS_STRING_CONST("RssiBeaconAverageWeight");
-NDIS_STRING STRRssiPacketAverageWeight = NDIS_STRING_CONST("RssiPacketAverageWeight");
-NDIS_STRING STRSnrBeaconAverageWeight  = NDIS_STRING_CONST("SnrBeaconAverageWeight");
-NDIS_STRING STRSnrPacketAverageWeight  = NDIS_STRING_CONST("SnrPacketAverageWeight");
-
-/*-----------------------------------*/
-/*   Scan concentrator parameters    */
-/*-----------------------------------*/
-NDIS_STRING STRMinimumDurationBetweenOsScans     = NDIS_STRING_CONST( "MinimumDurationBetweenOsScans" );
-NDIS_STRING STRDfsPassiveDwellTimeMs             = NDIS_STRING_CONST( "DfsPassiveDwellTimeMs" );
-NDIS_STRING STRScanPushMode                      = NDIS_STRING_CONST( "ScanPushMode" );
-
-NDIS_STRING STRScanResultAging                   = NDIS_STRING_CONST( "ScanResultAging" );
-NDIS_STRING STRScanCncnRssiThreshold             = NDIS_STRING_CONST( "ScanCncnRssiThreshold" );
-
-NDIS_STRING STRParseWSCInBeacons      = NDIS_STRING_CONST( "ParseWSCInBeacons" );
-
-/*-----------------------------------*/
-/*      Current BSS parameters       */
-/*-----------------------------------*/
-NDIS_STRING STRNullDataKeepAliveDefaultPeriod  = NDIS_STRING_CONST("NullDataKeepAliveDefaultPeriod");
-
-/*-----------------------------------*/
-/*      Context-Engine parameters    */
-/*-----------------------------------*/
-NDIS_STRING STRContextSwitchRequired  = NDIS_STRING_CONST("ContextSwitchRequired");
-
-/*-----------------------------------*/
-/*      Radio parameters             */
-/*-----------------------------------*/
-NDIS_STRING STRTXBiPReferencePDvoltage_2_4G =       NDIS_STRING_CONST("TXBiPReferencePDvoltage_2_4G");
-NDIS_STRING STRTxBiPReferencePower_2_4G =           NDIS_STRING_CONST("TxBiPReferencePower_2_4G");
-NDIS_STRING STRTxBiPOffsetdB_2_4G =                 NDIS_STRING_CONST("TxBiPOffsetdB_2_4G");  
-NDIS_STRING STRTxPerRatePowerLimits_2_4G_Normal =  	NDIS_STRING_CONST("TxPerRatePowerLimits_2_4G_Normal");
-NDIS_STRING STRTxPerRatePowerLimits_2_4G_Degraded = NDIS_STRING_CONST("TxPerRatePowerLimits_2_4G_Degraded");
-NDIS_STRING STRTxPerRatePowerLimits_2_4G_Extreme =  NDIS_STRING_CONST("STRTxPerRatePowerLimits_2_4G_Extreme");
-NDIS_STRING STRTxPerChannelPowerLimits_2_4G_11b =   NDIS_STRING_CONST("TxPerChannelPowerLimits_2_4G_11b");
-NDIS_STRING STRTxPerChannelPowerLimits_2_4G_OFDM =  NDIS_STRING_CONST("TxPerChannelPowerLimits_2_4G_OFDM");
-NDIS_STRING STRTxPDVsRateOffsets_2_4G =             NDIS_STRING_CONST("TxPDVsRateOffsets_2_4G");
-NDIS_STRING STRTxIbiasTable_2_4G =          	  	NDIS_STRING_CONST("TxIbiasTable_2_4G");
-NDIS_STRING STRRxFemInsertionLoss_2_4G =            NDIS_STRING_CONST("RxFemInsertionLoss_2_4G");
-
-NDIS_STRING STRDegradedLowToNormalThr_2_4G =        NDIS_STRING_CONST("DegradedLowToNormalThr_2_4G");
-NDIS_STRING STRNormalToDegradedHighThr_2_4G =       NDIS_STRING_CONST("NormalToDegradedHighThr_2_4G");
-
-NDIS_STRING STRDegradedLowToNormalThr_5G =          NDIS_STRING_CONST("DegradedLowToNormalThr_5G");
-NDIS_STRING STRNormalToDegradedHighThr_5G =         NDIS_STRING_CONST("NormalToDegradedHighThr_5G");
-
-NDIS_STRING STRRxTraceInsertionLoss_2_4G =          NDIS_STRING_CONST("RxTraceInsertionLoss_2_4G");
-NDIS_STRING STRTXTraceLoss_2_4G =                   NDIS_STRING_CONST("TXTraceLoss_2_4G");
-NDIS_STRING STRRxRssiAndProcessCompensation_2_4G =  NDIS_STRING_CONST("RxRssiAndProcessCompensation_2_4G");
-NDIS_STRING STRTXBiPReferencePDvoltage_5G =         NDIS_STRING_CONST("TXBiPReferencePDvoltage_5G");
-NDIS_STRING STRTxBiPReferencePower_5G =             NDIS_STRING_CONST("TxBiPReferencePower_5G");
-NDIS_STRING STRTxBiPOffsetdB_5G =                   NDIS_STRING_CONST("TxBiPOffsetdB_5G");
-
-NDIS_STRING STRTxPerRatePowerLimits_5G_Normal =     NDIS_STRING_CONST("TxPerRatePowerLimits_5G_Normal");
-NDIS_STRING STRTxPerRatePowerLimits_5G_Degraded =   NDIS_STRING_CONST("TxPerRatePowerLimits_5G_Degraded");
-NDIS_STRING STRTxPerRatePowerLimits_5G_Extreme  =   NDIS_STRING_CONST("TxPerRatePowerLimits_5G_Extreme");
-
-NDIS_STRING STRTxPerChannelPowerLimits_5G_OFDM =    NDIS_STRING_CONST("TxPerChannelPowerLimits_5G_OFDM");
-NDIS_STRING STRTxPDVsRateOffsets_5G =               NDIS_STRING_CONST("TxPDVsRateOffsets_5G");
-NDIS_STRING STRTxIbiasTable_5G =                    NDIS_STRING_CONST("TxIbiasTable_5G");
-NDIS_STRING STRRxFemInsertionLoss_5G =              NDIS_STRING_CONST("RxFemInsertionLoss_5G");
-NDIS_STRING STRRxTraceInsertionLoss_5G =            NDIS_STRING_CONST("RxTraceInsertionLoss_5G");
-NDIS_STRING STRTXTraceLoss_5G =                     NDIS_STRING_CONST("TXTraceLoss_5G");
-NDIS_STRING STRRxRssiAndProcessCompensation_5G =    NDIS_STRING_CONST("RxRssiAndProcessCompensation_5G");
-NDIS_STRING STRFRefClock =    						NDIS_STRING_CONST("STRFRefClock");
-NDIS_STRING STRFRefClockSettingTime =    			NDIS_STRING_CONST("STRFRefClockSettingTime");
-NDIS_STRING STRFRefClockStatus =    				NDIS_STRING_CONST("FRefClockStatus");
-NDIS_STRING STRTXBiPFEMAutoDetect =    				NDIS_STRING_CONST("TXBiPFEMAutoDetect");
-NDIS_STRING STRTXBiPFEMManufacturer =    			NDIS_STRING_CONST("TXBiPFEMManufacturer");
-NDIS_STRING STRClockValidOnWakeup =    	    		NDIS_STRING_CONST("ClockValidOnWakeup");
-NDIS_STRING STRDC2DCMode =    	    	            NDIS_STRING_CONST("DC2DCMode");
-NDIS_STRING STRSingle_Dual_Band_Solution =          NDIS_STRING_CONST("Single_Dual_Band_Solution");
-NDIS_STRING STRSettings = 							NDIS_STRING_CONST("Settings");
-
-NDIS_STRING STRTxPerChannelPowerCompensation_2_4G =    NDIS_STRING_CONST("TxPerChannelPowerCompensation_2_4G");
-NDIS_STRING STRTxPerChannelPowerCompensation_5G_OFDM =    NDIS_STRING_CONST("TxPerChannelPowerCompensation_5G_OFDM");
-
-/*-----------------------------------*/
-/*      Driver-Main parameters       */
-/*-----------------------------------*/
-NDIS_STRING STRWlanDrvThreadPriority = NDIS_STRING_CONST("WlanDrvThreadPriority");
-NDIS_STRING STRBusDrvThreadPriority  = NDIS_STRING_CONST("BusDrvThreadPriority");
-NDIS_STRING STRSdioBlkSizeShift      = NDIS_STRING_CONST("SdioBlkSizeShift");
-
-
-/*-----------------------------------*/
-/*      Roaming parameters    */
-/*-----------------------------------*/
-NDIS_STRING STRRoamingOperationalMode = NDIS_STRING_CONST("RoamingOperationalMode");
-NDIS_STRING STRSendTspecInReassPkt    = NDIS_STRING_CONST("SendTspecInReassPkt");
-
-/*-----------------------------------*/
-/*      FM Coexistence parameters    */
-/*-----------------------------------*/
-NDIS_STRING STRFmCoexEnable               = NDIS_STRING_CONST("FmCoexuEnable");
-NDIS_STRING STRFmCoexSwallowPeriod        = NDIS_STRING_CONST("FmCoexuSwallowPeriod");
-NDIS_STRING STRFmCoexNDividerFrefSet1     = NDIS_STRING_CONST("FmCoexuNDividerFrefSet1");
-NDIS_STRING STRFmCoexNDividerFrefSet2     = NDIS_STRING_CONST("FmCoexuNDividerFrefSet2");
-NDIS_STRING STRFmCoexMDividerFrefSet1     = NDIS_STRING_CONST("FmCoexuMDividerFrefSet1");
-NDIS_STRING STRFmCoexMDividerFrefSet2     = NDIS_STRING_CONST("FmCoexuMDividerFrefSet2");
-NDIS_STRING STRFmCoexPllStabilizationTime = NDIS_STRING_CONST("FmCoexuPllStabilizationTime");
-NDIS_STRING STRFmCoexLdoStabilizationTime = NDIS_STRING_CONST("FmCoexuLdoStabilizationTime");
-NDIS_STRING STRFmCoexDisturbedBandMargin  = NDIS_STRING_CONST("FmCoexuDisturbedBandMargin");
-NDIS_STRING STRFmCoexSwallowClkDif        = NDIS_STRING_CONST("FmCoexSwallowClkDif");
-
-/*----------------------------------------*/
-/*      Rate Management Parameters        */
-/*----------------------------------------*/
-
-
-NDIS_STRING STRRateMngRateRetryScore      = NDIS_STRING_CONST("RateMngRateRetryScore");
-NDIS_STRING STRRateMngPerAdd              = NDIS_STRING_CONST("RateMngPerAdd");
-NDIS_STRING STRRateMngPerTh1              = NDIS_STRING_CONST("RateMngPerTh1");
-NDIS_STRING STRRateMngPerTh2              = NDIS_STRING_CONST("RateMngPerTh2");
-NDIS_STRING STRRateMngMaxPer              = NDIS_STRING_CONST("RateMngMaxPer");
-NDIS_STRING STRRateMngInverseCuriosityFactor = NDIS_STRING_CONST("RateMngInverseCuriosityFactor");
-NDIS_STRING STRRateMngTxFailLowTh         = NDIS_STRING_CONST("RateMngTxFailLowTh");
-NDIS_STRING STRRateMngTxFailHighTh        = NDIS_STRING_CONST("RateMngTxFailHighTh");
-NDIS_STRING STRRateMngPerAlphaShift       = NDIS_STRING_CONST("RateMngPerAlphaShift");
-NDIS_STRING STRRateMngPerAddShift         = NDIS_STRING_CONST("RateMngPerAddShift");
-NDIS_STRING STRRateMngPerBeta1Shift       = NDIS_STRING_CONST("RateMngPerBeta1Shift");
-NDIS_STRING STRRateMngPerBeta2Shift       = NDIS_STRING_CONST("RateMngPerBeta2Shift");
-NDIS_STRING STRRateMngRateCheckUp         = NDIS_STRING_CONST("RateMngRateCheckUp");
-NDIS_STRING STRRateMngRateCheckDown       = NDIS_STRING_CONST("RateMngRateCheckDown");
-NDIS_STRING STRRateMngRateRetryPolicy     = NDIS_STRING_CONST("RateMngRateRetryPolicy");
-
-NDIS_STRING STRincludeWSCinProbeReq                 = NDIS_STRING_CONST("IncludeWSCinProbeReq");
-
-
-static void parseTwoDigitsSequenceHex (TI_UINT8 *sInString, TI_UINT8 *uOutArray, TI_UINT8 uSize);
-
-static void regConvertStringtoCoexActivityTable(TI_UINT8 *strCoexActivityTable, TI_UINT32 numOfElements, TCoexActivity *CoexActivityArray, TI_UINT8 strSize);
-
-static int decryptWEP( TI_INT8* pSrc, TI_INT8* pDst, TI_UINT32 len);
-static short _btoi ( char *sptr, short slen, int *pi, short base );
-static void initValusFromRgstryString(  TI_INT8* pSrc,  TI_INT8* pDst,  TI_UINT32 len);
-
-
-
-static void readRates(TWlanDrvIfObjPtr pAdapter, TInitTable *pInitTable);
-static void decryptScanControlTable(TI_UINT8* src, TI_UINT8* dst, USHORT len);
-
-static TI_UINT32 regReadIntegerTable(TWlanDrvIfObjPtr   pAdapter,
-                                PNDIS_STRING        pParameterName,
-                                TI_INT8*               pDefaultValue,
-                                USHORT              defaultLen,
-                                TI_UINT8*              pUnsignedParameter,
-                                TI_INT8*               pSignedParameter,
-                                TI_UINT32*             pEntriesNumber,
-                                TI_UINT8               uParameterSize,
-                                TI_BOOL                bHex);
-
-static void assignRegValue(TI_UINT32* lValue, PNDIS_CONFIGURATION_PARAMETER ndisParameter);
-
-static void parse_filter_request(TRxDataFilterRequest* request, TI_UINT8 offset, char * mask, TI_UINT8 maskLength, char * pattern, TI_UINT8 patternLength);
-
-static void regReadIntegerParameter (
-                 TWlanDrvIfObjPtr       pAdapter,
-                 PNDIS_STRING           pParameterName,
-                 TI_UINT32              defaultValue,
-                 TI_UINT32              minValue,
-                 TI_UINT32              maxValue,
-                 TI_UINT8               parameterSize,
-                 TI_UINT8*              pParameter);
-
-static void regReadIntegerParameterHex (
-                 TWlanDrvIfObjPtr       pAdapter,
-                 PNDIS_STRING           pParameterName,
-                 TI_UINT32              defaultValue,
-                 TI_UINT32              minValue,
-                 TI_UINT32              maxValue,
-                 TI_UINT8               defaultSize,
-                 TI_UINT8 *             pParameter);
-
-static void regReadStringParameter (
-                 TWlanDrvIfObjPtr       pAdapter,
-                 PNDIS_STRING           pParameterName,
-                 TI_INT8*               pDefaultValue,
-                 USHORT                 defaultLen,
-                 TI_UINT8*              pParameter,
-                 void*                  pParameterSize);
-
-static void regReadWepKeyParameter (TWlanDrvIfObjPtr pAdapter, TI_UINT8 *pKeysStructure, TI_UINT8 defaultKeyId);
-
-
-/* ---------------------------------------------------------------------------*/
-/* Converts a string to a signed int. Assumes base 10. Assumes positive*/
-/*    number*/
-/**/
-/* Returns value on success, -1 on failure*/
-/**/
-/* ---------------------------------------------------------------------------*/
-static TI_UINT32 tiwlnstrtoi (char *num, TI_UINT32 length)
-{
-  TI_UINT32 value;
-
-  if(num == NULL || length == 0 )
-  {
-    return 0;
-  }
-
-  for(value=0;length&&*num;num++,length--)
-  {
-    if(*num<='9'&&*num>= '0')
-    {
-      value=(value*10)+(*num - '0');
-    }
-    else { /* Out of range*/
-      break;
-    }
-  }
-  return value;
-}
-
-/* ---------------------------------------------------------------------------*/
-/* Converts a string to a signed int. Assumes base 16. Assumes positive*/
-/*    number*/
-/**/
-/* Returns value on success, -1 on failure*/
-/**/
-/* ---------------------------------------------------------------------------*/
-static TI_UINT32 tiwlnstrtoi_hex (TI_UINT8 *num, TI_UINT32 length)
-{
-  TI_UINT32 value = 0;
-
-  if (num == NULL || length == 0)
-  {
-      return 0;
-  }
-
-  for (value = 0; length && *num; num++, length--)
-  {
-    if (*num <= '9' && *num >= '0')
-    {
-      value = (value * 16) + (*num - '0');
-    }
-    else if (*num <= 'f' && *num >= 'a')
-    {
-        value = (value * 16) + (*num - (TI_UINT8)'a' + 10);
-    }
-    else if (*num <= 'F' && *num >= 'A')
-    {
-        value = (value * 16) + (*num - (TI_UINT8)'A' + 10);
-    }
-    else
-    { /* Out of range*/
-        break;
-    }
-  }
-
-  return value;
-}
-
-
-/*-----------------------------------------------------------------------------
-
-Routine Name:
-
-    regFillInitTable
-
-Routine Description:
-
-
-Arguments:
-
-
-Return Value:
-
-    None
-
------------------------------------------------------------------------------*/
-void
-regFillInitTable(
-                TWlanDrvIfObjPtr pAdapter,
-                void* pInitTable
-                )
-{
-    static TI_UINT8 *ClsfrIp = "0a 03 01 c9";
-    static TI_UINT8 ClsfrIpString[16];
-    static TI_UINT8 ClsfrIpStringSize;
-
-    /* EEPROM-less : MAC address */
-    static TI_UINT8 regMACstrLen = REG_MAC_ADDR_STR_LEN;
-    static TI_UINT8 staMACAddress[REG_MAC_ADDR_STR_LEN];
-    static TI_UINT8 defStaMacAddress0[]= "10 01 02 03 04 05";
-    static TI_UINT8 regArpIpStrLen = REG_ARP_IP_ADDR_STR_LEN;
-    static TI_UINT8 staArpIpAddress[REG_ARP_IP_ADDR_STR_LEN];
-    static TI_UINT8 defArpIpAddress[] =  "0a 02 0a b7" ;       /*value by default*/
-
-    /*defaults values for beacon IE table*/
-    /*TI_UINT8 defBeaconIETableSize = 0 ;*/
-    static    TI_UINT8 defBeaconIETable[] = "00 01 01 01 32 01 2a 01 03 01 06 01 07 01 20 01 25 01 23 01 30 01 28 01 2e 01 3d 01 85 01 dd 01 00 52 f2 02 00 01";
-    /*TI_UINT8 tmpIeTable[BEACON_FILTER_TABLE_MAX_SIZE] ;*/
-    static    TI_UINT8 tmpIeTableSize = 37;
-    static    TI_UINT8 strSize = 113;
-
-    /* defaults values for CoexActivity table*/
-    /* example: WLAN(0), BT_VOICE(0), defPrio(20), raisePrio(25), minServ(0), maxServ(1ms) */
-    static    TI_UINT8 defCoexActivityTable[] = ""; /* Sample "01 00 14 19 0000 0001 " */
-
-    static    TI_UINT32 filterOffset = 0;
-    static    char filterMask[16];
-    static    TI_UINT8 filterMaskLength;
-    static    char filterPattern[16];
-    static    TI_UINT8 filterPatternLength;
-
-    static    USHORT  tableLen = 0;
-    static    USHORT  loopIndex = 0;
-    static    TI_UINT8   ScanControlTable24Tmp[2 * NUM_OF_CHANNELS_24];
-    static    TI_UINT8   ScanControlTable5Tmp[2 * NUM_OF_CHANNELS_5];
-    static    TI_UINT8   ScanControlTable24Def[2* NUM_OF_CHANNELS_24] = "FFFFFFFFFFFFFFFFFFFFFFFFFFFF";
-    static    TI_UINT8   ScanControlTable5Def[2 * NUM_OF_CHANNELS_5] = "FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000000000000000000000000000000000000000000000000000000000000000000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000000000000000FF000000FF000000FF000000FF000000FF000000000000000000000000000000";
-    static    TI_UINT8   reportSeverityTableDefaults[REPORT_SEVERITY_MAX+1] = "00001101";
-    static    TI_UINT16  reportSeverityTableLen;
-
-    static    TI_UINT32  uWiFiMode = 0;
-    static    TI_UINT32  uPerformanceBoostMode = PERFORMANCE_BOOST_MODE_DEF;
-    TI_INT8    SRConfigParams[MAX_SMART_REFLEX_PARAM];
-    static    TI_UINT32   len,TempSRCnt;
-    static    TI_UINT8   uTempRatePolicyList[RATE_MNG_MAX_RETRY_POLICY_PARAMS_LEN];
-    static    TI_UINT32  uTempRatePolicyCnt=0;
-
-    TInitTable *p = (TInitTable *)pInitTable;
-    TI_UINT32  uTempEntriesCount, uIndex;
-
-    PRINT(DBG_REGISTRY_LOUD, "TIWL: Reading InitTable parameters\n");
-
-    if (!p)
-        return;
-
-    /* Reset structure */
-    NdisZeroMemory(p, sizeof(TInitTable));
-
-    regReadIntegerParameter(pAdapter, &STRincludeWSCinProbeReq,
-                            WSC_INCLUDE_IN_BEACON_DEF,WSC_INCLUDE_IN_BEACON_MIN,WSC_INCLUDE_IN_BEACON_MAX,
-                            sizeof p->siteMgrInitParams.includeWSCinProbeReq, 
-                            (TI_UINT8*)&p->siteMgrInitParams.includeWSCinProbeReq);
-     
-    /* Beacon filter*/
-    /*is the desired state ENABLED ?*/
-    regReadIntegerParameter(pAdapter, &STRBeaconFilterDesiredState,
-                            DEF_BEACON_FILTER_ENABLE_VALUE, MIN_BEACON_FILTER_ENABLE_VALUE, MAX_BEACON_FILTER_ENABLE_VALUE,
-                            sizeof p->siteMgrInitParams.beaconFilterParams.desiredState,
-                            (TI_UINT8*)&p->siteMgrInitParams.beaconFilterParams.desiredState );
-
-    regReadIntegerParameter(pAdapter, &STRBeaconFilterStored,
-                            DEF_NUM_STORED_FILTERS, MIN_NUM_STORED_FILTERS, MAX_NUM_STORED_FILTERS,
-                            sizeof p->siteMgrInitParams.beaconFilterParams.numOfStored,
-                            (TI_UINT8*)&p->siteMgrInitParams.beaconFilterParams.numOfStored );
-
-    /*Read the beacon filter IE table*/
-    /*Read the size of the table*/
-    regReadIntegerParameter(pAdapter, &STRBeaconIETableSize,
-                            BEACON_FILTER_IE_TABLE_DEF_SIZE, BEACON_FILTER_IE_TABLE_MIN_SIZE,
-                            BEACON_FILTER_IE_TABLE_MAX_SIZE,
-                            sizeof p->siteMgrInitParams.beaconFilterParams.IETableSize,
-                            (TI_UINT8*)(&p->siteMgrInitParams.beaconFilterParams.IETableSize) );
-
-    tmpIeTableSize = p->siteMgrInitParams.beaconFilterParams.IETableSize;
-
-    /*Read the number of elements in the table ( this is because 221 has 5 values following it )*/
-    regReadIntegerParameter(pAdapter, &STRBeaconIETableNumOfElem,
-                            DEF_BEACON_FILTER_IE_TABLE_NUM, BEACON_FILTER_IE_TABLE_MIN_NUM,
-                            BEACON_FILTER_IE_TABLE_MAX_NUM,
-                            sizeof p->siteMgrInitParams.beaconFilterParams.numOfElements,
-                            (TI_UINT8*)(&p->siteMgrInitParams.beaconFilterParams.numOfElements) );
-
-    /*printk("\n  OsRgstr tmpIeTableSize = %d numOfElems = %d" , tmpIeTableSize , p->siteMgrInitParams.beaconFilterParams.numOfElements) ;*/
-    strSize = 3 * tmpIeTableSize - 1 ; /*includes spaces between bytes*/
-    if ( ( tmpIeTableSize  > 0 ) && ( tmpIeTableSize <= BEACON_FILTER_IE_TABLE_MAX_SIZE) )
-    {
-        TI_UINT8 *staBeaconFilterIETable;
-
-        staBeaconFilterIETable = os_memoryAlloc(pAdapter, BEACON_FILTER_STRING_MAX_LEN);
-        if (staBeaconFilterIETable) {
-            regReadStringParameter(pAdapter, &STRBeaconIETable ,
-                            (TI_INT8*)(defBeaconIETable), strSize,
-                            (TI_UINT8*)staBeaconFilterIETable, &strSize);
-
-            parseTwoDigitsSequenceHex (staBeaconFilterIETable, (TI_UINT8*)&p->siteMgrInitParams.beaconFilterParams.IETable[0], tmpIeTableSize);
-            os_memoryFree(pAdapter, staBeaconFilterIETable, BEACON_FILTER_STRING_MAX_LEN);
-        }
-    }
-
-    /* MAC ADDRESSES FILTER*/
-    regReadIntegerParameter(pAdapter, &STRFilterEnabled,
-                            DEF_FILTER_ENABLE_VALUE, MIN_FILTER_ENABLE_VALUE,
-                            MAX_FILTER_ENABLE_VALUE,
-                            sizeof p->twdInitParams.tMacAddrFilter.isFilterEnabled,
-                            (TI_UINT8*) &p->twdInitParams.tMacAddrFilter.isFilterEnabled);
-
-    regReadIntegerParameter(pAdapter, &STRnumGroupAddrs,
-                            NUM_GROUP_ADDRESS_VALUE_DEF, NUM_GROUP_ADDRESS_VALUE_MIN,
-                            NUM_GROUP_ADDRESS_VALUE_MAX,
-                            sizeof p->twdInitParams.tMacAddrFilter.numOfMacAddresses,
-                            (TI_UINT8*) &p->twdInitParams.tMacAddrFilter.numOfMacAddresses);
-
-    /*printk("\nOsRgstry Num Of Group Addr:%d \n" , p->twdInitParams.tMacAddrFilter.numOfMacAddresses) ;*/
-    {
-        TI_UINT8 defStaMacAddress1[]= "11 11 12 13 14 15";
-        TI_UINT8 defStaMacAddress2[]= "12 21 22 23 24 25";
-        TI_UINT8 defStaMacAddress3[]= "13 31 32 33 34 35";
-        TI_UINT8 defStaMacAddress4[]= "14 41 42 43 44 45";
-        TI_UINT8 defStaMacAddress5[]= "15 51 52 53 54 55";
-        TI_UINT8 defStaMacAddress6[]= "16 61 62 63 64 65";
-        TI_UINT8 defStaMacAddress7[]= "17 71 72 73 74 75";
-        int macIndex ; /*used for group address filtering*/
-
-        macIndex = p->twdInitParams.tMacAddrFilter.numOfMacAddresses - 1;
-        switch( macIndex )
-        {
-        case 7:
-            {
-
-            regReadStringParameter(pAdapter, &STRGroup_addr7,
-                                (TI_INT8*)(defStaMacAddress7), REG_MAC_ADDR_STR_LEN,
-                                (TI_UINT8*)staMACAddress, &regMACstrLen);
-
-            parseTwoDigitsSequenceHex (staMACAddress,(TI_UINT8*) &p->twdInitParams.tMacAddrFilter.macAddrTable[7], MAC_ADDR_LEN);
-            --macIndex;
-            }
-
-        case 6:
-            {
-
-            regReadStringParameter(pAdapter, &STRGroup_addr6,
-                                (TI_INT8*)(defStaMacAddress6), REG_MAC_ADDR_STR_LEN,
-                                (TI_UINT8*)staMACAddress, &regMACstrLen);
-
-        parseTwoDigitsSequenceHex (staMACAddress,(TI_UINT8*) &p->twdInitParams.tMacAddrFilter.macAddrTable[6], MAC_ADDR_LEN);   
-            --macIndex;
-            }
-
-        case 5:
-            {
-
-            regReadStringParameter(pAdapter, &STRGroup_addr5,
-                                (TI_INT8*)(defStaMacAddress5), REG_MAC_ADDR_STR_LEN,
-                                (TI_UINT8*)staMACAddress, &regMACstrLen);
-
-        parseTwoDigitsSequenceHex (staMACAddress,(TI_UINT8*) &p->twdInitParams.tMacAddrFilter.macAddrTable[5], MAC_ADDR_LEN);   
-            --macIndex;
-            }
-
-        case 4:
-            {
-
-            regReadStringParameter(pAdapter, &STRGroup_addr4,
-                                (TI_INT8*)(defStaMacAddress4), REG_MAC_ADDR_STR_LEN,
-                                (TI_UINT8*)staMACAddress, &regMACstrLen);
-
-        parseTwoDigitsSequenceHex (staMACAddress,(TI_UINT8*) &p->twdInitParams.tMacAddrFilter.macAddrTable[4], MAC_ADDR_LEN);   
-            --macIndex;
-            }
-
-        case 3:
-            {
-
-            regReadStringParameter(pAdapter, &STRGroup_addr3,
-                                (TI_INT8*)(defStaMacAddress3), REG_MAC_ADDR_STR_LEN,
-                                (TI_UINT8*)staMACAddress, &regMACstrLen);
-
-        parseTwoDigitsSequenceHex (staMACAddress, (TI_UINT8*)&p->twdInitParams.tMacAddrFilter.macAddrTable[3], MAC_ADDR_LEN);       
-            --macIndex;
-            }
-
-        case 2:
-            {
-
-            regReadStringParameter(pAdapter, &STRGroup_addr2,
-                                (TI_INT8*)(defStaMacAddress2), REG_MAC_ADDR_STR_LEN,
-                                (TI_UINT8*)staMACAddress, &regMACstrLen);
-
-        parseTwoDigitsSequenceHex (staMACAddress,(TI_UINT8*) &p->twdInitParams.tMacAddrFilter.macAddrTable[2], MAC_ADDR_LEN);   
-            --macIndex;
-            }
-
-        case 1:
-            {
-
-            regReadStringParameter(pAdapter, &STRGroup_addr1,
-                                (TI_INT8*)(defStaMacAddress1), REG_MAC_ADDR_STR_LEN,
-                                (TI_UINT8*)staMACAddress, &regMACstrLen);
-
-        parseTwoDigitsSequenceHex (staMACAddress,(TI_UINT8*) &p->twdInitParams.tMacAddrFilter.macAddrTable[1], MAC_ADDR_LEN);   
-            --macIndex;
-            }
-
-        case 0:
-            {
-
-            regReadStringParameter(pAdapter, &STRGroup_addr0,
-                                (TI_INT8*)(defStaMacAddress0), REG_MAC_ADDR_STR_LEN,
-                                (TI_UINT8*)staMACAddress, &regMACstrLen);
-
-        parseTwoDigitsSequenceHex (staMACAddress,(TI_UINT8*) &p->twdInitParams.tMacAddrFilter.macAddrTable[0], MAC_ADDR_LEN);   
-            }
-
-        default:
-            {
-
-            }
-        }
-    }
-
-    /************************/
-    /* Read severity table */
-    /**********************/
-
-    regReadStringParameter(pAdapter, &STR_ReportSeverityTable,
-                    (TI_INT8*)reportSeverityTableDefaults,
-                    (TI_UINT8)REPORT_SEVERITY_MAX,
-                    (TI_UINT8*)p->tReport.aSeverityTable,
-                    (TI_UINT8*)&reportSeverityTableLen);
-
-
-    /***********************/
-    /* Read modules table */
-    /*********************/
-    {
-        TI_UINT8 *reportModuleTableDefaults;
-        TI_UINT16  reportModuleTableLen;
-
-        reportModuleTableDefaults = os_memoryAlloc(pAdapter, REPORT_FILES_NUM);
-        if (!reportModuleTableDefaults)
-            return;
-
-        /*set all report modules.as default*/
-        memset(reportModuleTableDefaults, '1', REPORT_FILES_NUM );
-
-        regReadStringParameter(pAdapter, &STR_ReportModuleTable,
-                        (TI_INT8*)reportModuleTableDefaults,
-                        (TI_UINT8)REPORT_FILES_NUM,
-                        (TI_UINT8*)p->tReport.aFileEnable,
-                        (TI_UINT8*)&reportModuleTableLen);
-        os_memoryFree(pAdapter, reportModuleTableDefaults, REPORT_FILES_NUM);
-    }
-    /* rate Policy Params */
-    regReadIntegerParameter(pAdapter, &STRRatePolicyUserShortRetryLimit,
-                            CTRL_DATA_RATE_POLICY_USER_SHORT_RETRY_LIMIT_DEF,
-                            CTRL_DATA_RATE_POLICY_USER_SHORT_RETRY_LIMIT_MIN,
-                            CTRL_DATA_RATE_POLICY_USER_SHORT_RETRY_LIMIT_MAX,
-                            sizeof p->ctrlDataInitParams.ctrlDataTxRatePolicy.shortRetryLimit,
-                            (TI_UINT8*)&p->ctrlDataInitParams.ctrlDataTxRatePolicy.shortRetryLimit);
-
-    regReadIntegerParameter(pAdapter, &STRRatePolicyUserLongRetryLimit,
-                            CTRL_DATA_RATE_POLICY_USER_LONG_RETRY_LIMIT_DEF,
-                            CTRL_DATA_RATE_POLICY_USER_LONG_RETRY_LIMIT_MIN,
-                            CTRL_DATA_RATE_POLICY_USER_LONG_RETRY_LIMIT_MAX,
-                            sizeof p->ctrlDataInitParams.ctrlDataTxRatePolicy.longRetryLimit,
-                            (TI_UINT8*)&p->ctrlDataInitParams.ctrlDataTxRatePolicy.longRetryLimit);
-
-    regReadIntegerParameterHex (pAdapter, &STRRatePolicyUserEnabledRatesMaskCck,
-							 CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_CCK_DEF, 
-							 CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_MIN,
-							 CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_MAX,
-							 sizeof p->ctrlDataInitParams.policyEnabledRatesMaskCck, 
-                            (TI_UINT8*)&p->ctrlDataInitParams.policyEnabledRatesMaskCck);
-
-    regReadIntegerParameterHex (pAdapter, &STRRatePolicyUserEnabledRatesMaskOfdm, 
-							 CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_OFDM_DEF, 
-							 CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_MIN,
-							 CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_MAX,
-							 sizeof p->ctrlDataInitParams.policyEnabledRatesMaskOfdm, 
-                            (TI_UINT8*)&p->ctrlDataInitParams.policyEnabledRatesMaskOfdm);
-
-    regReadIntegerParameterHex (pAdapter, &STRRatePolicyUserEnabledRatesMaskOfdmA, 
-							 CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_OFDMA_DEF, 
-							 CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_MIN,
-							 CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_MAX,
-							 sizeof p->ctrlDataInitParams.policyEnabledRatesMaskOfdmA, 
-                            (TI_UINT8*)&p->ctrlDataInitParams.policyEnabledRatesMaskOfdmA);
-
-    regReadIntegerParameterHex (pAdapter, &STRRatePolicyUserEnabledRatesMaskOfdmN, 
-							 CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_OFDMN_DEF, 
-							 CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_MIN,
-							 CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_MAX,
-							 sizeof p->ctrlDataInitParams.policyEnabledRatesMaskOfdmN, 
-                            (TI_UINT8*)&p->ctrlDataInitParams.policyEnabledRatesMaskOfdmN);
-
-
-    regReadIntegerParameter(pAdapter, &STRRxEnergyDetection,
-            TI_FALSE, TI_FALSE, TI_TRUE, 
-            sizeof p->twdInitParams.tGeneral.halCtrlRxEnergyDetection,
-            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlRxEnergyDetection);
-
-   regReadIntegerParameter(pAdapter, &STRCh14TelecCca,
-            TI_FALSE, TI_FALSE, TI_TRUE, 
-            sizeof p->twdInitParams.tGeneral.halCtrlCh14TelecCca,
-            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlCh14TelecCca);
-
-    regReadIntegerParameter(pAdapter, &STRTddCalibrationInterval,
-            300, 1, 0xFFFFFFFF, 
-            sizeof p->twdInitParams.tGeneral.tddRadioCalTimout,
-            (TI_UINT8*)&p->twdInitParams.tGeneral.tddRadioCalTimout);
-
-    regReadIntegerParameter(pAdapter, &STRCrtCalibrationInterval,
-            2, 1, 0xFFFFFFFF, 
-            sizeof p->twdInitParams.tGeneral.CrtRadioCalTimout,
-            (TI_UINT8*)&p->twdInitParams.tGeneral.CrtRadioCalTimout);
-
-    regReadIntegerParameter(pAdapter, &STRMacClockRate,
-            80, 0, 255, 
-            sizeof p->twdInitParams.tGeneral.halCtrlMacClock,
-            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlMacClock);
-
-    regReadIntegerParameter(pAdapter, &STRArmClockRate,
-            80, 0, 255, 
-            sizeof p->twdInitParams.tGeneral.halCtrlArmClock,
-            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlArmClock);
-
-    regReadIntegerParameter(pAdapter, &STRg80211DraftNumber,
-            DRAFT_6_AND_LATER, DRAFT_5_AND_EARLIER, DRAFT_6_AND_LATER,
-            sizeof p->siteMgrInitParams.siteMgrUseDraftNum,
-            (TI_UINT8*)&p->siteMgrInitParams.siteMgrUseDraftNum);
-
-    regReadIntegerParameter(pAdapter, &STRTraceBufferSize,
-            /*1024, 0, 1024, sizeof(TI_UINT32), */
-            16, 16, 16, 
-            sizeof p->twdInitParams.tGeneral.TraceBufferSize,
-            (TI_UINT8*)&p->twdInitParams.tGeneral.TraceBufferSize);
-
-    regReadIntegerParameter(pAdapter, &STRPrintTrace, 
-            TI_FALSE, TI_FALSE, TI_TRUE, 
-            sizeof p->twdInitParams.tGeneral.bDoPrint, 
-            (TI_UINT8*)&p->twdInitParams.tGeneral.bDoPrint);
-
-    regReadIntegerParameter(pAdapter, &STRFirmwareDebug, 
-            TI_FALSE, TI_FALSE, TI_TRUE, 
-            sizeof p->twdInitParams.tGeneral.halCtrlFirmwareDebug, 
-            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlFirmwareDebug);
-
-
-#ifndef TIWLN_WINCE30
-    regReadIntegerParameter(pAdapter, &STRHwACXAccessMethod,
-                            TWD_HW_ACCESS_METHOD_DEF, TWD_HW_ACCESS_METHOD_MIN,
-                            TWD_HW_ACCESS_METHOD_MAX,
-                            sizeof p->twdInitParams.tGeneral.hwAccessMethod, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.hwAccessMethod);
-#else
-        /* Slave indirect*/
-    p->twdInitParams.tGeneral.hwAccessMethod = 0;
-#endif
-    regReadIntegerParameter(pAdapter, &STRMaxSitesFragCollect,
-                            TWD_SITE_FRAG_COLLECT_DEF, TWD_SITE_FRAG_COLLECT_MIN,
-                            TWD_SITE_FRAG_COLLECT_MAX,
-                            sizeof p->twdInitParams.tGeneral.maxSitesFragCollect, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.maxSitesFragCollect);
-
-    regReadIntegerParameter(pAdapter, &STRBetEnable,
-                            POWER_MGMNT_BET_ENABLE_DEF, POWER_MGMNT_BET_ENABLE_MIN,
-                            POWER_MGMNT_BET_ENABLE_MAX,
-                            sizeof p->PowerMgrInitParams.BetEnable, 
-                            (TI_UINT8*)&p->PowerMgrInitParams.BetEnable);
-
-    regReadIntegerParameter(pAdapter, &STRBetMaxConsecutive,
-                            POWER_MGMNT_BET_MAX_CONSC_DEF, POWER_MGMNT_BET_MAX_CONSC_MIN,
-                            POWER_MGMNT_BET_MAX_CONSC_MAX,
-                            sizeof p->PowerMgrInitParams.MaximumConsecutiveET, 
-                            (TI_UINT8*)&p->PowerMgrInitParams.MaximumConsecutiveET);
-
-    /*--------------- Maximal time between full beacon reception ------------------*/
-    regReadIntegerParameter(pAdapter, &STRMaxFullBeaconInterval,
-                            POWER_MGMNT_MAX_FULL_BEACON_DEF, POWER_MGMNT_MAX_FULL_BEACON_MIN,
-                            POWER_MGMNT_MAX_FULL_BEACON_MAX,
-                            sizeof p->PowerMgrInitParams.MaximalFullBeaconReceptionInterval,
-                            (TI_UINT8*)&p->PowerMgrInitParams.MaximalFullBeaconReceptionInterval);
-
-    regReadIntegerParameter(pAdapter, &STRBetEnableThreshold,
-                            POWER_MGMNT_BET_DISABLE_THRESHOLD_DEF, POWER_MGMNT_BET_DISABLE_THRESHOLD_MIN,
-                            POWER_MGMNT_BET_DISABLE_THRESHOLD_MAX,
-                            sizeof p->PowerMgrInitParams.BetEnableThreshold,
-                            (TI_UINT8*)&p->PowerMgrInitParams.BetEnableThreshold);
-
-    regReadIntegerParameter(pAdapter, &STRBetDisableThreshold,
-                            HAL_CTRL_BET_DISABLE_THRESHOLD_DEF, HAL_CTRL_BET_DISABLE_THRESHOLD_MIN,
-                            HAL_CTRL_BET_DISABLE_THRESHOLD_MAX,
-                            sizeof p->PowerMgrInitParams.BetDisableThreshold,
-                            (TI_UINT8*)&p->PowerMgrInitParams.BetDisableThreshold);
-
-    regReadIntegerParameter(pAdapter, &STRTxFlashEnable,
-                            TWD_TX_FLASH_ENABLE_DEF, TWD_TX_FLASH_ENABLE_MIN,
-                            TWD_TX_FLASH_ENABLE_MAX,
-                            sizeof p->twdInitParams.tGeneral.TxFlashEnable, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.TxFlashEnable);
-
-
-    p->twdInitParams.tGeneral.beaconTemplateSize = sizeof(probeRspTemplate_t);
-    p->twdInitParams.tGeneral.probeRequestTemplateSize = sizeof(probeReqTemplate_t);
-    p->twdInitParams.tGeneral.probeResponseTemplateSize = sizeof(probeRspTemplate_t);
-    p->twdInitParams.tGeneral.nullTemplateSize = sizeof(nullDataTemplate_t);
-    p->twdInitParams.tGeneral.disconnTemplateSize = sizeof(disconnTemplate_t);
-    p->twdInitParams.tGeneral.PsPollTemplateSize = sizeof(psPollTemplate_t);
-    p->twdInitParams.tGeneral.qosNullDataTemplateSize = sizeof(QosNullDataTemplate_t);
-    p->twdInitParams.tGeneral.ArpRspTemplateSize = sizeof(ArpRspTemplate_t);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRBeaconRxTimeout,
-                            BCN_RX_TIMEOUT_DEF_VALUE,
-                            BCN_RX_TIMEOUT_MIN_VALUE,
-                            BCN_RX_TIMEOUT_MAX_VALUE,
-                            sizeof p->twdInitParams.tGeneral.BeaconRxTimeout,
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.BeaconRxTimeout);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRBroadcastRxTimeout,
-                            BROADCAST_RX_TIMEOUT_DEF_VALUE,
-                            BROADCAST_RX_TIMEOUT_MIN_VALUE,
-                            BROADCAST_RX_TIMEOUT_MAX_VALUE,
-                            sizeof p->twdInitParams.tGeneral.BroadcastRxTimeout,
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.BroadcastRxTimeout);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRRxBroadcastInPs,
-                            RX_BROADCAST_IN_PS_DEF_VALUE,
-                            RX_BROADCAST_IN_PS_MIN_VALUE,
-                            RX_BROADCAST_IN_PS_MAX_VALUE,
-                            sizeof p->twdInitParams.tGeneral.RxBroadcastInPs,
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.RxBroadcastInPs);
-
-    regReadIntegerParameter(pAdapter, &STRCalibrationChannel2_4,
-                            TWD_CALIBRATION_CHANNEL_2_4_DEF, TWD_CALIBRATION_CHANNEL_2_4_MIN,
-                            TWD_CALIBRATION_CHANNEL_2_4_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlCalibrationChannel2_4, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlCalibrationChannel2_4);
-
-    regReadIntegerParameter(pAdapter, &STRCalibrationChannel5_0,
-                            TWD_CALIBRATION_CHANNEL_5_0_DEF, TWD_CALIBRATION_CHANNEL_5_0_MIN,
-                            TWD_CALIBRATION_CHANNEL_5_0_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlCalibrationChannel5_0, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlCalibrationChannel5_0);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRConsecutivePsPollDeliveryFailureThreshold,
-                            CONSECUTIVE_PS_POLL_FAILURE_DEF,
-                            CONSECUTIVE_PS_POLL_FAILURE_MIN,
-                            CONSECUTIVE_PS_POLL_FAILURE_MAX,
-                            sizeof p->twdInitParams.tGeneral.ConsecutivePsPollDeliveryFailureThreshold,
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.ConsecutivePsPollDeliveryFailureThreshold);
-
-
-    regReadIntegerParameter(pAdapter, &STRdot11RTSThreshold,
-                            TWD_RTS_THRESHOLD_DEF, TWD_RTS_THRESHOLD_MIN,
-                            TWD_RTS_THRESHOLD_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlRtsThreshold, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlRtsThreshold);
-
-    regReadIntegerParameter(pAdapter, &STRRxDisableBroadcast,
-                            TWD_RX_DISABLE_BROADCAST_DEF, TWD_RX_DISABLE_BROADCAST_MIN,
-                            TWD_RX_DISABLE_BROADCAST_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlRxDisableBroadcast, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlRxDisableBroadcast);
-
-    regReadIntegerParameter(pAdapter, &STRRecoveryEnable,
-                            TWD_RECOVERY_ENABLE_DEF, TWD_RECOVERY_ENABLE_MIN,
-                            TWD_RECOVERY_ENABLE_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlRecoveryEnable, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlRecoveryEnable);
-
-    p->healthMonitorInitParams.FullRecoveryEnable = (TI_BOOL)p->twdInitParams.tGeneral.halCtrlRecoveryEnable;
-
-    regReadIntegerParameter(pAdapter, &STRdot11FragThreshold,
-                            TWD_FRAG_THRESHOLD_DEF, TWD_FRAG_THRESHOLD_MIN,
-                            TWD_FRAG_THRESHOLD_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlFragThreshold, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlFragThreshold);
-
-    regReadIntegerParameter(pAdapter, &STRdot11MaxTxMSDULifetime,
-                            TWD_MAX_TX_MSDU_LIFETIME_DEF, TWD_MAX_TX_MSDU_LIFETIME_MIN,
-                            TWD_MAX_TX_MSDU_LIFETIME_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlMaxTxMsduLifetime, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlMaxTxMsduLifetime);
-
-    regReadIntegerParameter(pAdapter, &STRdot11MaxReceiveLifetime,
-                            TWD_MAX_RX_MSDU_LIFETIME_DEF, TWD_MAX_RX_MSDU_LIFETIME_MIN,
-                            TWD_MAX_RX_MSDU_LIFETIME_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlMaxRxMsduLifetime, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlMaxRxMsduLifetime);
-
-    regReadIntegerParameter(pAdapter, &STRdot11RateFallBackRetryLimit,
-                            TWD_RATE_FB_RETRY_LIMIT_DEF, TWD_RATE_FB_RETRY_LIMIT_MIN,
-                            TWD_RATE_FB_RETRY_LIMIT_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlRateFallbackRetry, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlRateFallbackRetry);
-
-    regReadIntegerParameter(pAdapter, &STRListenInterval,
-                            TWD_LISTEN_INTERVAL_DEF, TWD_LISTEN_INTERVAL_MIN,
-                            TWD_LISTEN_INTERVAL_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlListenInterval, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlListenInterval);
-
-    regReadIntegerParameter(pAdapter, &STRdot11TxAntenna,
-                            TWD_TX_ANTENNA_DEF, TWD_TX_ANTENNA_MIN,
-                            TWD_TX_ANTENNA_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlTxAntenna, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlTxAntenna);
-    /* reverse tx antenna value - ACX and utility have reversed values */
-    if (p->twdInitParams.tGeneral.halCtrlTxAntenna == TX_ANTENNA_2)
-       p->twdInitParams.tGeneral.halCtrlTxAntenna = TX_ANTENNA_1;
-    else
-       p->twdInitParams.tGeneral.halCtrlTxAntenna = TX_ANTENNA_2;
-
-
-    regReadIntegerParameter(pAdapter, &STRdot11RxAntenna,
-                            TWD_RX_ANTENNA_DEF, TWD_RX_ANTENNA_MIN,
-                            TWD_RX_ANTENNA_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlRxAntenna, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlRxAntenna);
-
-
-    regReadIntegerParameter(pAdapter, &STRTxCompleteThreshold,
-                            TWD_TX_CMPLT_THRESHOLD_DEF, TWD_TX_CMPLT_THRESHOLD_MIN,
-                            TWD_TX_CMPLT_THRESHOLD_MAX,
-                            sizeof p->twdInitParams.tGeneral.TxCompletePacingThreshold, 
-                            (TI_UINT8*)&(p->twdInitParams.tGeneral.TxCompletePacingThreshold));
-
-    regReadIntegerParameter(pAdapter, &STRTxCompleteTimeout,
-                            TWD_TX_CMPLT_TIMEOUT_DEF, TWD_TX_CMPLT_TIMEOUT_MIN,
-                            TWD_TX_CMPLT_TIMEOUT_MAX,
-                            sizeof p->twdInitParams.tGeneral.TxCompletePacingTimeout, 
-                            (TI_UINT8*)&(p->twdInitParams.tGeneral.TxCompletePacingTimeout));
-
-    regReadIntegerParameter(pAdapter, &STRRxInterruptThreshold,
-                            TWD_RX_INTR_THRESHOLD_DEF, TWD_RX_INTR_THRESHOLD_MIN,
-                            TWD_RX_INTR_THRESHOLD_MAX,
-                            sizeof p->twdInitParams.tGeneral.RxIntrPacingThreshold, 
-                            (TI_UINT8*)&(p->twdInitParams.tGeneral.RxIntrPacingThreshold));
-
-    regReadIntegerParameter(pAdapter, &STRRxInterruptTimeout,
-                            TWD_RX_INTR_TIMEOUT_DEF, TWD_RX_INTR_TIMEOUT_MIN,
-                            TWD_RX_INTR_TIMEOUT_MAX,
-                            sizeof p->twdInitParams.tGeneral.RxIntrPacingTimeout, 
-                            (TI_UINT8*)&(p->twdInitParams.tGeneral.RxIntrPacingTimeout));
-
-
-    regReadIntegerParameter(pAdapter, &STRRxAggregationPktsLimit,
-                            TWD_RX_AGGREG_PKTS_LIMIT_DEF, TWD_RX_AGGREG_PKTS_LIMIT_MIN,
-                            TWD_RX_AGGREG_PKTS_LIMIT_MAX,
-                            sizeof p->twdInitParams.tGeneral.uRxAggregPktsLimit,
-                            (TI_UINT8*)&(p->twdInitParams.tGeneral.uRxAggregPktsLimit));
-
-    regReadIntegerParameter(pAdapter, &STRTxAggregationPktsLimit,
-                            TWD_TX_AGGREG_PKTS_LIMIT_DEF, TWD_TX_AGGREG_PKTS_LIMIT_MIN,
-                            TWD_TX_AGGREG_PKTS_LIMIT_MAX,
-                            sizeof p->twdInitParams.tGeneral.uTxAggregPktsLimit, 
-                            (TI_UINT8*)&(p->twdInitParams.tGeneral.uTxAggregPktsLimit));
-
-    regReadIntegerParameter(pAdapter, &STRdot11DesiredChannel,
-                        SITE_MGR_CHANNEL_DEF, SITE_MGR_CHANNEL_MIN, SITE_MGR_CHANNEL_MAX,
-                        sizeof p->siteMgrInitParams.siteMgrDesiredChannel, 
-                        (TI_UINT8*)&p->siteMgrInitParams.siteMgrDesiredChannel);
-
-    /* NOTE: desired BSSID and SSID (and BSS type, later on) are currently set both to the SME and the site manager!!! */
-    {
-        TI_UINT8 bssidBroadcast[MAC_ADDR_LEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-
-        MAC_COPY (p->siteMgrInitParams.siteMgrDesiredBSSID, bssidBroadcast);
-        MAC_COPY (p->tSmeModifiedInitParams.tDesiredBssid, bssidBroadcast);
-    }
-
-    {
-        static char dummySsidString[MAX_SSID_LEN];
-
-        /*
-            Default SSID should be non-Valid SSID, hence the STA will not try to connect
-        */
-        for(loopIndex = 0; loopIndex < MAX_SSID_LEN; loopIndex++)
-                dummySsidString[loopIndex] = (loopIndex+1);
-
-        regReadStringParameter(pAdapter, &STRdot11DesiredSSID,
-                        (TI_INT8*)dummySsidString,
-                        (TI_UINT8)MAX_SSID_LEN,
-                        (TI_UINT8*)p->siteMgrInitParams.siteMgrDesiredSSID.str,
-                        (TI_UINT8*)&p->siteMgrInitParams.siteMgrDesiredSSID.len);
-
-        /* in case no SSID desired at the init file set dummy len */
-        for(loopIndex = 0; loopIndex < MAX_SSID_LEN; loopIndex++)
-        {
-            if(dummySsidString[loopIndex] != p->siteMgrInitParams.siteMgrDesiredSSID.str[loopIndex])
-                break;
-        }
-
-        p->siteMgrInitParams.siteMgrDesiredSSID.len = (TI_UINT8)loopIndex;
-    }
-
-    NdisMoveMemory(&p->tSmeModifiedInitParams.tDesiredSsid,
-                   &p->siteMgrInitParams.siteMgrDesiredSSID,
-                   sizeof(TSsid));
-
-    regReadIntegerParameter(pAdapter, &STRdot11DesiredNetworkType,
-                            SITE_MGR_DOT_11_MODE_DEF, SITE_MGR_DOT_11_MODE_MIN, SITE_MGR_DOT_11_MODE_MAX,
-                            sizeof p->siteMgrInitParams.siteMgrDesiredDot11Mode, 
-                            (TI_UINT8*)&p->siteMgrInitParams.siteMgrDesiredDot11Mode);
-
-    regReadIntegerParameter(pAdapter, &STRdot11SlotTime,
-        PHY_SLOT_TIME_SHORT, PHY_SLOT_TIME_LONG, PHY_SLOT_TIME_SHORT,
-        sizeof p->siteMgrInitParams.siteMgrDesiredSlotTime,
-        (TI_UINT8*)&p->siteMgrInitParams.siteMgrDesiredSlotTime);
-
-    regReadIntegerParameter(pAdapter, &STRdot11RtsCtsProtection,
-        0, 0, 1, 
-        sizeof p->ctrlDataInitParams.ctrlDataDesiredCtsRtsStatus,
-        (TI_UINT8*)&p->ctrlDataInitParams.ctrlDataDesiredCtsRtsStatus);
-
-    regReadIntegerParameter(pAdapter, &STRdot11IbssProtection,
-        ERP_PROTECTION_STANDARD, ERP_PROTECTION_NONE, ERP_PROTECTION_STANDARD,
-        sizeof p->ctrlDataInitParams.ctrlDataDesiredIbssProtection,
-        (TI_UINT8*)&p->ctrlDataInitParams.ctrlDataDesiredIbssProtection);
-
-    /* When working in band A, minimum channel is 36 and not 1*/
-    if (p->siteMgrInitParams.siteMgrDesiredDot11Mode  == DOT11_A_MODE)
-    {
-        if (p->siteMgrInitParams.siteMgrDesiredChannel < SITE_MGR_CHANNEL_A_MIN)
-            p->siteMgrInitParams.siteMgrDesiredChannel = SITE_MGR_CHANNEL_A_MIN;
-    }
-
-    {
-        static TI_UINT32 Freq2ChannelTable[] = {0,2412000,2417000,2422000,2427000,2432000,2437000,
-                                      2442000,2447000,2452000,2457000,
-                                      2462000,2467000,2472000,2484000};
-
-        memcpy(p->siteMgrInitParams.siteMgrFreq2ChannelTable,
-               Freq2ChannelTable,
-               sizeof(Freq2ChannelTable));
-    }
-
-    /* read TX rates from registry */
-    readRates(pAdapter, p);
-
-    /* Note: desired BSS type is set both to the SME and site manager */
-    regReadIntegerParameter(pAdapter, &STRdot11DesiredBSSType,
-                            SITE_MGR_BSS_TYPE_DEF, BSS_INDEPENDENT, BSS_ANY,
-                            sizeof p->siteMgrInitParams.siteMgrDesiredBSSType,
-                            (TI_UINT8*)&p->siteMgrInitParams.siteMgrDesiredBSSType);
-    p->tSmeModifiedInitParams.eDesiredBssType = p->siteMgrInitParams.siteMgrDesiredBSSType;
-
-    regReadIntegerParameter(pAdapter, &STRdot11BeaconPeriod,
-                            SITE_MGR_BEACON_INTERVAL_DEF, SITE_MGR_BEACON_INTERVAL_MIN,
-                            SITE_MGR_BEACON_INTERVAL_MAX,
-                            sizeof p->siteMgrInitParams.siteMgrDesiredBeaconInterval,
-                            (TI_UINT8*)&p->siteMgrInitParams.siteMgrDesiredBeaconInterval);
-
-    regReadIntegerParameter(pAdapter, &STRdot11ShortPreambleInvoked,
-                            SITE_MGR_PREAMBLE_TYPE_DEF, PREAMBLE_LONG, PREAMBLE_SHORT,
-                            sizeof p->siteMgrInitParams.siteMgrDesiredPreambleType,
-                            (TI_UINT8*)&p->siteMgrInitParams.siteMgrDesiredPreambleType);
-
-	regReadIntegerParameter(pAdapter, &STRReAuthActivePriority,
-							POWER_MGMNT_RE_AUTH_ACTIVE_PRIO_DEF_VALUE, POWER_MGMNT_RE_AUTH_ACTIVE_PRIO_MIN_VALUE,
-							POWER_MGMNT_RE_AUTH_ACTIVE_PRIO_MAX_VALUE,
-							sizeof p->PowerMgrInitParams.reAuthActivePriority, 
-							(TI_UINT8*)&p->PowerMgrInitParams.reAuthActivePriority);
-
-    regReadIntegerParameter(pAdapter, &STRExternalMode,
-                            SITE_MGR_EXTERNAL_MODE_DEF, SITE_MGR_EXTERNAL_MODE_MIN,
-                            SITE_MGR_EXTERNAL_MODE_MAX,
-                            sizeof p->siteMgrInitParams.siteMgrExternalConfiguration,
-                            (TI_UINT8*)&p->siteMgrInitParams.siteMgrExternalConfiguration);
-
-    regReadIntegerParameter(pAdapter, &STRWiFiAdHoc,
-                            SITE_MGR_WiFiAdHoc_DEF, SITE_MGR_WiFiAdHoc_MIN, SITE_MGR_WiFiAdHoc_MAX,
-                            sizeof p->siteMgrInitParams.siteMgrWiFiAdhoc,
-                            (TI_UINT8*)&p->siteMgrInitParams.siteMgrWiFiAdhoc);
-
-    regReadIntegerParameter(pAdapter, &STRWiFiWmmPS,
-                            WIFI_WMM_PS_DEF, WIFI_WMM_PS_MIN, WIFI_WMM_PS_MAX,
-                            sizeof p->twdInitParams.tGeneral.WiFiWmmPS,
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.WiFiWmmPS);
-
-    regReadIntegerParameter(pAdapter, &STRConnSelfTimeout,
-                            CONN_SELF_TIMEOUT_DEF, CONN_SELF_TIMEOUT_MIN, CONN_SELF_TIMEOUT_MAX,
-                            sizeof p->connInitParams.connSelfTimeout,
-                            (TI_UINT8*)&p->connInitParams.connSelfTimeout);
-
-    regReadIntegerParameter(pAdapter, &STRdot11AuthRespTimeout,
-                            AUTH_RESPONSE_TIMEOUT_DEF, AUTH_RESPONSE_TIMEOUT_MIN, AUTH_RESPONSE_TIMEOUT_MAX,
-                            sizeof p->authInitParams.authResponseTimeout,
-                            (TI_UINT8*)&p->authInitParams.authResponseTimeout);
-
-    regReadIntegerParameter(pAdapter, &STRdot11MaxAuthRetry,
-                            AUTH_MAX_RETRY_COUNT_DEF, AUTH_MAX_RETRY_COUNT_MIN, AUTH_MAX_RETRY_COUNT_MAX,
-                            sizeof p->authInitParams.authMaxRetryCount,
-                            (TI_UINT8*)&p->authInitParams.authMaxRetryCount);
-
-    regReadIntegerParameter(pAdapter, &STRdot11AssocRespTimeout,
-                            ASSOC_RESPONSE_TIMEOUT_DEF, ASSOC_RESPONSE_TIMEOUT_MIN, ASSOC_RESPONSE_TIMEOUT_MAX,
-                            sizeof p->assocInitParams.assocResponseTimeout,
-                            (TI_UINT8*)&p->assocInitParams.assocResponseTimeout);
-
-    regReadIntegerParameter(pAdapter, &STRdot11MaxAssocRetry,
-                            ASSOC_MAX_RETRY_COUNT_DEF, ASSOC_MAX_RETRY_COUNT_MIN, ASSOC_MAX_RETRY_COUNT_MAX,
-                            sizeof p->assocInitParams.assocMaxRetryCount,
-                            (TI_UINT8*)&p->assocInitParams.assocMaxRetryCount);
-
-    regReadIntegerParameter(pAdapter, &STRRxDataFiltersEnabled,
-                            RX_DATA_FILTERS_ENABLED_DEF, RX_DATA_FILTERS_ENABLED_MIN, RX_DATA_FILTERS_ENABLED_MAX,
-                            sizeof p->rxDataInitParams.rxDataFiltersEnabled,
-                            (TI_UINT8*)&p->rxDataInitParams.rxDataFiltersEnabled);
-
-    regReadIntegerParameter(pAdapter, &STRRxDataFiltersFilter1Offset,
-                            RX_DATA_FILTERS_FILTER_OFFSET_DEF, RX_DATA_FILTERS_FILTER_OFFSET_MIN, RX_DATA_FILTERS_FILTER_OFFSET_MAX,
-                            sizeof filterOffset,
-                            (TI_UINT8*) &filterOffset);
-
-    regReadStringParameter(pAdapter, &STRRxDataFiltersFilter1Mask,
-                            RX_DATA_FILTERS_FILTER_MASK_DEF, RX_DATA_FILTERS_FILTER_MASK_LEN_DEF,
-                            (TI_UINT8*) filterMask,
-                            (TI_UINT8*) &filterMaskLength);
-
-    regReadStringParameter(pAdapter, &STRRxDataFiltersFilter1Pattern,
-                            RX_DATA_FILTERS_FILTER_PATTERN_DEF, RX_DATA_FILTERS_FILTER_PATTERN_LEN_DEF,
-                            (TI_UINT8*) filterPattern,
-                            (TI_UINT8*) &filterPatternLength);
-
-    parse_filter_request(&p->rxDataInitParams.rxDataFilterRequests[0], filterOffset, filterMask, filterMaskLength, filterPattern, filterPatternLength);
-
-    regReadIntegerParameter(pAdapter, &STRRxDataFiltersFilter2Offset,
-                            RX_DATA_FILTERS_FILTER_OFFSET_DEF, RX_DATA_FILTERS_FILTER_OFFSET_MIN, RX_DATA_FILTERS_FILTER_OFFSET_MAX,
-                            sizeof filterOffset,
-                            (TI_UINT8*) &filterOffset);
-
-    regReadStringParameter(pAdapter, &STRRxDataFiltersFilter2Mask,
-                            RX_DATA_FILTERS_FILTER_MASK_DEF, RX_DATA_FILTERS_FILTER_MASK_LEN_DEF,
-                            (TI_UINT8*) filterMask,
-                            (TI_UINT8*) &filterMaskLength);
-
-    regReadStringParameter(pAdapter, &STRRxDataFiltersFilter2Pattern,
-                            RX_DATA_FILTERS_FILTER_PATTERN_DEF, RX_DATA_FILTERS_FILTER_PATTERN_LEN_DEF,
-                            (TI_UINT8*) filterPattern,
-                            (TI_UINT8*) &filterPatternLength);
-
-    parse_filter_request(&p->rxDataInitParams.rxDataFilterRequests[1], filterOffset, filterMask, filterMaskLength, filterPattern, filterPatternLength);
-
-    regReadIntegerParameter(pAdapter, &STRRxDataFiltersFilter3Offset,
-                            RX_DATA_FILTERS_FILTER_OFFSET_DEF, RX_DATA_FILTERS_FILTER_OFFSET_MIN, RX_DATA_FILTERS_FILTER_OFFSET_MAX,
-                            sizeof filterOffset,
-                            (TI_UINT8*) &filterOffset);
-
-    regReadStringParameter(pAdapter, &STRRxDataFiltersFilter3Mask,
-                            RX_DATA_FILTERS_FILTER_MASK_DEF, RX_DATA_FILTERS_FILTER_MASK_LEN_DEF,
-                            (TI_UINT8*) filterMask,
-                            (TI_UINT8*) &filterMaskLength);
-
-    regReadStringParameter(pAdapter, &STRRxDataFiltersFilter3Pattern,
-                            RX_DATA_FILTERS_FILTER_PATTERN_DEF, RX_DATA_FILTERS_FILTER_PATTERN_LEN_DEF,
-                            (TI_UINT8*) filterPattern,
-                            (TI_UINT8*) &filterPatternLength);
-
-    parse_filter_request(&p->rxDataInitParams.rxDataFilterRequests[2], filterOffset, filterMask, filterMaskLength, filterPattern, filterPatternLength);
-
-    regReadIntegerParameter(pAdapter, &STRRxDataFiltersFilter4Offset,
-                            RX_DATA_FILTERS_FILTER_OFFSET_DEF, RX_DATA_FILTERS_FILTER_OFFSET_MIN, RX_DATA_FILTERS_FILTER_OFFSET_MAX,
-                            sizeof filterOffset,
-                            (TI_UINT8*) &filterOffset);
-
-    regReadStringParameter(pAdapter, &STRRxDataFiltersFilter4Mask,
-                            RX_DATA_FILTERS_FILTER_MASK_DEF, RX_DATA_FILTERS_FILTER_MASK_LEN_DEF,
-                            (TI_UINT8*) filterMask,
-                            (TI_UINT8*) &filterMaskLength);
-
-    regReadStringParameter(pAdapter, &STRRxDataFiltersFilter4Pattern,
-                            RX_DATA_FILTERS_FILTER_PATTERN_DEF, RX_DATA_FILTERS_FILTER_PATTERN_LEN_DEF,
-                            (TI_UINT8*) filterPattern,
-                            (TI_UINT8*) &filterPatternLength);
-
-    parse_filter_request(&p->rxDataInitParams.rxDataFilterRequests[3], filterOffset, filterMask, filterMaskLength, filterPattern, filterPatternLength);
-
-    regReadIntegerParameter(pAdapter, &STRRxDataFiltersDefaultAction,
-                            RX_DATA_FILTERS_DEFAULT_ACTION_DEF, RX_DATA_FILTERS_DEFAULT_ACTION_MIN,
-                            RX_DATA_FILTERS_DEFAULT_ACTION_MAX,
-                            sizeof p->rxDataInitParams.rxDataFiltersDefaultAction,
-                            (TI_UINT8*)&p->rxDataInitParams.rxDataFiltersDefaultAction);
-
-	regReadIntegerParameter(pAdapter, &STRReAuthActiveTimeout,
-                            RX_DATA_RE_AUTH_ACTIVE_TIMEOUT_DEF, RX_DATA_RE_AUTH_ACTIVE_TIMEOUT_MIN,
-							RX_DATA_RE_AUTH_ACTIVE_TIMEOUT_MAX,
-                            sizeof p->rxDataInitParams.reAuthActiveTimeout,
-							(TI_UINT8*)&p->rxDataInitParams.reAuthActiveTimeout);
-
-    regReadIntegerParameter(pAdapter, &STRCreditCalcTimout,
-                            TX_DATA_CREDIT_CALC_TIMOEUT_DEF, TX_DATA_CREDIT_CALC_TIMOEUT_MIN,
-                            TX_DATA_CREDIT_CALC_TIMOEUT_MAX,
-                            sizeof p->txDataInitParams.creditCalculationTimeout,
-                            (TI_UINT8*)&p->txDataInitParams.creditCalculationTimeout);
-
-	regReadIntegerParameter(pAdapter, &STRCreditCalcTimerEnabled,
-                            TI_FALSE, TI_FALSE, TI_TRUE,
-							sizeof p->txDataInitParams.bCreditCalcTimerEnabled,
-							(TI_UINT8*)&p->txDataInitParams.bCreditCalcTimerEnabled);
-
-    regReadIntegerParameter(pAdapter, &STRTrafficAdmControlTimeout,
-                    TRAFFIC_ADM_CONTROL_TIMEOUT_DEF, TRAFFIC_ADM_CONTROL_TIMEOUT_MIN,
-                    TRAFFIC_ADM_CONTROL_TIMEOUT_MAX,
-                    sizeof p->qosMngrInitParams.trafficAdmCtrlInitParams.trafficAdmCtrlResponseTimeout,
-                    (TI_UINT8*)&p->qosMngrInitParams.trafficAdmCtrlInitParams.trafficAdmCtrlResponseTimeout);
-
-    regReadIntegerParameter(pAdapter, &STRTrafficAdmControlUseFixedMsduSize,
-                    TI_FALSE, TI_FALSE, TI_TRUE,
-                    sizeof p->qosMngrInitParams.trafficAdmCtrlInitParams.trafficAdmCtrlUseFixedMsduSize,
-                    (TI_UINT8*)&p->qosMngrInitParams.trafficAdmCtrlInitParams.trafficAdmCtrlUseFixedMsduSize);
-
-    regReadIntegerParameter(pAdapter, &STRDesiredMaxSpLen,
-                    QOS_MAX_SP_LEN_DEF, QOS_MAX_SP_LEN_MIN,
-                    QOS_MAX_SP_LEN_MAX,
-                    sizeof p->qosMngrInitParams.desiredMaxSpLen,
-                    (TI_UINT8*)&p->qosMngrInitParams.desiredMaxSpLen);
-
-    regReadIntegerParameter(pAdapter, &STRCwFromUserEnable,
-                    QOS_CW_USER_ENABLE_DEF, QOS_CW_USER_ENABLE_MIN,
-                    QOS_CW_USER_ENABLE_MAX,
-                    sizeof p->qosMngrInitParams.bCwFromUserEnable,
-                    (TI_UINT8*)&p->qosMngrInitParams.bCwFromUserEnable);
-
-    regReadIntegerParameter(pAdapter, &STRDesireCwMin,
-                    QOS_CW_CWMIN_DEF, QOS_CW_CWMIN_MIN,
-                    QOS_CW_CWMIN_MAX,
-                    sizeof p->qosMngrInitParams.uDesireCwMin,
-                    (TI_UINT8*)&p->qosMngrInitParams.uDesireCwMin);
-    
-    regReadIntegerParameter(pAdapter, &STRDesireCwMax,
-                    QOS_CW_CWMAX_DEF, QOS_CW_CWMAX_MIN,
-                    QOS_CW_CWMAX_MAX,
-                    sizeof p->qosMngrInitParams.uDesireCwMax,
-                    (TI_UINT8*)&p->qosMngrInitParams.uDesireCwMax);
-
-/*                              SME Initialization Parameters                           */
-/*                          ====================================                        */
-
-    regReadIntegerParameter(pAdapter, &STRSmeRadioOn,
-                            TI_TRUE, TI_FALSE, TI_TRUE,
-                            sizeof p->tSmeModifiedInitParams.bRadioOn,
-                            (TI_UINT8*)&p->tSmeModifiedInitParams.bRadioOn);
-    regReadIntegerParameter(pAdapter, &STRSmeConnectMode,
-                            CONNECT_MODE_AUTO, CONNECT_MODE_AUTO, CONNECT_MODE_MANUAL,
-                            sizeof p->tSmeModifiedInitParams.eConnectMode,
-                            (TI_UINT8*)&p->tSmeModifiedInitParams.eConnectMode);
-
-    {
-        /* due to the fact that two following init keys has negative values, we read them as table */
-        TI_UINT32   uEntriesNumber = 1;
-
-        regReadIntegerTable(pAdapter ,&STRSmeScanRssiThreshold,
-                            SME_SCAN_RSSI_THRESHOLD_DEF, sizeof(TI_INT8) * 3,
-                            (TI_UINT8*)&p->tSmeInitParams.iRssiThreshold, NULL, &uEntriesNumber,
-                            sizeof(TI_INT8),TI_FALSE);
-
-        if ( (p->tSmeInitParams.iRssiThreshold < SME_SCAN_RSSI_THRESHOLD_MIN) ||
-             (p->tSmeInitParams.iRssiThreshold > SME_SCAN_RSSI_THRESHOLD_MAX))
-        {
-            p->tSmeInitParams.iRssiThreshold = SME_SCAN_RSSI_THRESHOLD_DEF_NUM;
-        }
-
-        regReadIntegerTable(pAdapter ,&STRSmeScanSnrThreshold,
-                               SME_SCAN_SNR_THRESHOLD_DEF, sizeof(TI_INT8),
-                               (TI_UINT8*)&p->tSmeInitParams.iSnrThreshold, NULL, &uEntriesNumber, sizeof(TI_INT8),TI_FALSE);
-
-        if ( (p->tSmeInitParams.iSnrThreshold < SME_SCAN_SNR_THRESHOLD_MIN) ||
-             (p->tSmeInitParams.iSnrThreshold > SME_SCAN_SNR_THRESHOLD_MAX))
-        {
-            p->tSmeInitParams.iSnrThreshold = SME_SCAN_SNR_THRESHOLD_DEF_NUM;
-        }
-    }
-
-
-    regReadIntegerParameter(pAdapter ,&STRRoamScanEnable,
-                        0, 0, 1, sizeof(p->tRoamScanMngrInitParams.RoamingScanning_2_4G_enable),
-                        (TI_UINT8*)&p->tRoamScanMngrInitParams.RoamingScanning_2_4G_enable);
-
-    regReadIntegerParameter(pAdapter, &STRSmeScanCycleNumber,
-                            SME_SCAN_CYCLES_DEF, SME_SCAN_CYCLES_MIN, SME_SCAN_CYCLES_MAX,
-                            sizeof p->tSmeInitParams.uCycleNum,
-                            (TI_UINT8*)&p->tSmeInitParams.uCycleNum);
-    regReadIntegerParameter(pAdapter, &STRSmeScanMaxDwellTime,
-                            SME_SCAN_MAX_DWELL_DEF, SME_SCAN_MAX_DWELL_MIN, SME_SCAN_MAX_DWELL_MAX,
-                            sizeof p->tSmeInitParams.uMaxScanDuration,
-                            (TI_UINT8*)&p->tSmeInitParams.uMaxScanDuration);
-    regReadIntegerParameter(pAdapter, &STRSmeScanMinDwellTime,
-                            SME_SCAN_MIN_DWELL_DEF, SME_SCAN_MIN_DWELL_MIN, SME_SCAN_MIN_DWELL_MAX,
-                            sizeof p->tSmeInitParams.uMinScanDuration,
-                            (TI_UINT8*)&p->tSmeInitParams.uMinScanDuration);
-    regReadIntegerParameter(pAdapter, &STRSmeScanProbeRequestNumber,
-                            SME_SCAN_PROBE_REQ_DEF, SME_SCAN_PROBE_REQ_MIN, SME_SCAN_PROBE_REQ_MAX,
-                            sizeof p->tSmeInitParams.uProbeReqNum,
-                            (TI_UINT8*)&p->tSmeInitParams.uProbeReqNum);
-
-    {
-        TI_UINT32 *uSmeScanIntervalsTempList;
-
-        uSmeScanIntervalsTempList = os_memoryAlloc(pAdapter, SME_SCAN_INTERVALS_LIST_STRING_MAX_SIZE * sizeof(TI_UINT32));
-        if (!uSmeScanIntervalsTempList) {
-            return;
-        }
-        regReadIntegerTable(pAdapter, &STRSmeScanIntervals, SME_SCAN_INTERVALS_LIST_VAL_DEF,
-                        SME_SCAN_INTERVALS_LIST_STRING_MAX_SIZE,
-                        (TI_UINT8 *)uSmeScanIntervalsTempList, NULL, &uTempEntriesCount,
-                        sizeof (TI_UINT32),TI_FALSE);
-        /* sanity check */
-        if (uTempEntriesCount > PERIODIC_SCAN_MAX_INTERVAL_NUM)
-        {
-            uTempEntriesCount = PERIODIC_SCAN_MAX_INTERVAL_NUM;
-        }
-        /* convert from TI_UINT8 to TI_UINT32 */
-        for (uIndex = 0; uIndex < uTempEntriesCount; uIndex++)
-        {
-            p->tSmeInitParams.uScanIntervals[ uIndex ] = uSmeScanIntervalsTempList[ uIndex ];
-        }
-        os_memoryFree(pAdapter, uSmeScanIntervalsTempList, SME_SCAN_INTERVALS_LIST_STRING_MAX_SIZE * sizeof(TI_UINT32));
-    }
-    {
-        TI_UINT8  *uSmeTempList;
-        TI_UINT32  uSmeGChannelsCount;
-
-        uSmeTempList = os_memoryAlloc(pAdapter, SME_SCAN_CHANNELS_LIST_G_STRING_MAX_SIZE);
-        if (!uSmeTempList) {
-            return;
-        }
-        regReadIntegerTable(pAdapter, &STRSmeScanGChannels, SME_SCAN_CHANNELS_LIST_G_VAL_DEF,
-                            SME_SCAN_CHANNELS_LIST_G_STRING_MAX_SIZE,
-                            (TI_UINT8 *)uSmeTempList, NULL, &uTempEntriesCount,
-                            sizeof (TI_UINT8),TI_FALSE);
-
-
-        /* convert to channel list */
-        for (uIndex = 0; uIndex < uTempEntriesCount; uIndex++)
-        {
-            p->tSmeInitParams.tChannelList[ uIndex ].eBand = RADIO_BAND_2_4_GHZ;
-            p->tSmeInitParams.tChannelList[ uIndex ].uChannel = uSmeTempList[ uIndex ];
-        }
-        uSmeGChannelsCount = uTempEntriesCount;
-
-        /*
-         * Add A_MODE channels to scan list only if it enabled
-         * NOTE: Don't use empty channel list string
-         */
-        if ((p->siteMgrInitParams.siteMgrDesiredDot11Mode  == DOT11_A_MODE) ||
-            (p->siteMgrInitParams.siteMgrDesiredDot11Mode  == DOT11_DUAL_MODE))
-        {
-            regReadIntegerTable(pAdapter, &STRSmeScanAChannels, SME_SCAN_CHANNELS_LIST_A_VAL_DEF,
-                                SME_SCAN_CHANNELS_LIST_A_STRING_MAX_SIZE,
-                                (TI_UINT8*)&uSmeTempList, NULL, &uTempEntriesCount,
-                                sizeof (TI_UINT8),TI_FALSE);
-
-            /* convert to channel list */
-            for (uIndex = 0; uIndex < uTempEntriesCount; uIndex++)
-            {
-                p->tSmeInitParams.tChannelList[ uSmeGChannelsCount + uIndex ].eBand = RADIO_BAND_5_0_GHZ;
-                p->tSmeInitParams.tChannelList[ uSmeGChannelsCount + uIndex ].uChannel = uSmeTempList[ uIndex ];
-            }
-
-            p->tSmeInitParams.uChannelNum = uSmeGChannelsCount + uIndex;
-        }
-        else
-        {
-            p->tSmeInitParams.uChannelNum = uSmeGChannelsCount;
-        }
-        os_memoryFree(pAdapter, uSmeTempList, SME_SCAN_CHANNELS_LIST_G_STRING_MAX_SIZE);
-    }
-
-    regReadIntegerParameter(pAdapter, &STRdot11AuthenticationMode,
-                            RSN_AUTH_SUITE_DEF, RSN_AUTH_SUITE_MIN, RSN_AUTH_SUITE_MAX,
-                            sizeof p->rsnInitParams.authSuite,
-                            (TI_UINT8*)&p->rsnInitParams.authSuite);
-
-    /* Soft Gemini Section */
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistEnable,
-                            SOFT_GEMINI_ENABLED_DEF, SOFT_GEMINI_ENABLED_MIN, SOFT_GEMINI_ENABLED_MAX,
-                            sizeof p->SoftGeminiInitParams.SoftGeminiEnable, 
-                            (TI_UINT8*)&p->SoftGeminiInitParams.SoftGeminiEnable);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistParamsBtLoadRatio,
-                            SOFT_GEMINI_PARAMS_LOAD_RATIO_DEF, SOFT_GEMINI_PARAMS_LOAD_RATIO_MIN, SOFT_GEMINI_PARAMS_LOAD_RATIO_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_BT_LOAD_RATIO],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_BT_LOAD_RATIO]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistParamsAutoPsMode,
-                            SOFT_GEMINI_PARAMS_AUTO_PS_MODE_DEF, SOFT_GEMINI_PARAMS_AUTO_PS_MODE_MIN, SOFT_GEMINI_PARAMS_AUTO_PS_MODE_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_AUTO_PS_MODE],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_AUTO_PS_MODE]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexHv3AutoScanEnlargedNumOfProbeReqPercent,
-                            SOFT_GEMINI_PARAMS_AUTO_SCAN_PROBE_REQ_DEF, SOFT_GEMINI_PARAMS_AUTO_SCAN_PROBE_REQ_MIN, SOFT_GEMINI_PARAMS_AUTO_SCAN_PROBE_REQ_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_AUTO_SCAN_PROBE_REQ],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_AUTO_SCAN_PROBE_REQ]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexHv3AutoScanEnlargedScanWinodowPercent,
-                            SOFT_GEMINI_PARAMS_ACTIVE_SCAN_DURATION_FACTOR_HV3_DEF, SOFT_GEMINI_PARAMS_ACTIVE_SCAN_DURATION_FACTOR_HV3_MIN, SOFT_GEMINI_PARAMS_ACTIVE_SCAN_DURATION_FACTOR_HV3_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_ACTIVE_SCAN_DURATION_FACTOR_HV3],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_ACTIVE_SCAN_DURATION_FACTOR_HV3]);
-
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexA2dpAutoScanEnlargedScanWinodowPercent,
-                            SOFT_GEMINI_PARAMS_ACTIVE_SCAN_DURATION_FACTOR_A2DP_DEF, SOFT_GEMINI_PARAMS_ACTIVE_SCAN_DURATION_FACTOR_A2DP_MIN, SOFT_GEMINI_PARAMS_ACTIVE_SCAN_DURATION_FACTOR_A2DP_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_ACTIVE_SCAN_DURATION_FACTOR_A2DP],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_ACTIVE_SCAN_DURATION_FACTOR_A2DP]);
-
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistHv3MaxOverride,
-							SOFT_GEMINI_HV3_MAX_OVERRIDE_DEF, SOFT_GEMINI_HV3_MAX_OVERRIDE_MIN, SOFT_GEMINI_HV3_MAX_OVERRIDE_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_HV3_MAX_OVERRIDE],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_HV3_MAX_OVERRIDE]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistPerThreshold,
-							SOFT_GEMINI_PARAMS_PER_THRESHOLD_DEF, SOFT_GEMINI_PARAMS_PER_THRESHOLD_MIN, SOFT_GEMINI_PARAMS_PER_THRESHOLD_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_BT_PER_THRESHOLD],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_BT_PER_THRESHOLD]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistNfsSampleInterval,
-							SOFT_GEMINI_PARAMS_NFS_SAMPLE_INTERVAL_DEF, SOFT_GEMINI_PARAMS_NFS_SAMPLE_INTERVAL_MIN, SOFT_GEMINI_PARAMS_NFS_SAMPLE_INTERVAL_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_BT_NFS_SAMPLE_INTERVAL],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_BT_NFS_SAMPLE_INTERVAL]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistcoexAntennaConfiguration,
-							SOFT_GEMINI_ANTENNA_CONFIGURATION_DEF, SOFT_GEMINI_ANTENNA_CONFIGURATION_MIN, SOFT_GEMINI_ANTENNA_CONFIGURATION_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_ANTENNA_CONFIGURATION],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_ANTENNA_CONFIGURATION]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistcoexMaxConsecutiveBeaconMissPrecent,
-							SOFT_GEMINI_BEACON_MISS_PERCENT_DEF, SOFT_GEMINI_BEACON_MISS_PERCENT_MIN, SOFT_GEMINI_BEACON_MISS_PERCENT_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_BEACON_MISS_PERCENT],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_BEACON_MISS_PERCENT]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistcoexAPRateAdapationThr,
-							SOFT_GEMINI_RATE_ADAPT_THRESH_DEF, SOFT_GEMINI_RATE_ADAPT_THRESH_MIN, SOFT_GEMINI_RATE_ADAPT_THRESH_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_RATE_ADAPT_THRESH],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_RATE_ADAPT_THRESH]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistcoexAPRateAdapationSnr,
-							SOFT_GEMINI_RATE_ADAPT_SNR_DEF, SOFT_GEMINI_RATE_ADAPT_SNR_MIN, SOFT_GEMINI_RATE_ADAPT_SNR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_RATE_ADAPT_SNR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_RATE_ADAPT_SNR]);
-
-
-    /* BR section */
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistUpsdAclMasterMinBR,
-							SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_BR_DEF, SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_BR_MIN, SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_BR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_BR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_BR]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistUpsdAclSlaveMinBR,
-							SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_BR_DEF, SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_BR_MIN, SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_BR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_BR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_BR]);
-
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistUpsdAclMasterMaxBR,
-							SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_BR_DEF, SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_BR_MIN, SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_BR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_BR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_BR]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistUpsdAclSlaveMaxBR,
-							SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_BR_DEF, SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_BR_MIN, SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_BR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_BR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_BR]);
-
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanPsMaxBtAclMasterBR,
-							SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_BR_DEF, SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_BR_MIN, SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_BR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_BR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_BR]);
-
-
-     regReadIntegerParameter(pAdapter, &STRBThWlanPsMaxBtAclSlaveBR,
-							SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_BR_DEF, SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_BR_MIN, SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_BR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_BR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_BR]);
-
-
-
-   /* EDR section */
-   regReadIntegerParameter(pAdapter, &STRBThWlanCoexistUpsdAclMasterMinEDR,
-							SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_EDR_DEF, SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_EDR_MIN, SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_EDR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_EDR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_EDR]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistUpsdAclSlaveMinEDR,
-							SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_EDR_DEF, SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_EDR_MIN, SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_EDR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_EDR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_EDR]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistUpsdAclMasterMaxEDR,
-							SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_EDR_DEF, SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_EDR_MIN, SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_EDR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_EDR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_EDR]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistUpsdAclSlaveMaxEDR,
-							SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_EDR_DEF, SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_EDR_MIN, SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_EDR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_EDR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_EDR]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanPsMaxBtAclMasterEDR,
-							SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_EDR_DEF, SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_EDR_MIN, SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_EDR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_EDR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_EDR]);
-
-   regReadIntegerParameter(pAdapter, &STRBThWlanPsMaxBtAclSlaveEDR,
-							SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_EDR_DEF, SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_EDR_MIN, SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_EDR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_EDR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_EDR]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistRxt,
-							SOFT_GEMINI_RXT_DEF, SOFT_GEMINI_RXT_MIN, SOFT_GEMINI_RXT_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_RXT],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_RXT]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistTxt,
-							SOFT_GEMINI_TXT_DEF, SOFT_GEMINI_TXT_MIN, SOFT_GEMINI_TXT_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_TXT],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_TXT]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistAdaptiveRxtTxt,
-							SOFT_GEMINI_ADAPTIVE_RXT_TXT_DEF, SOFT_GEMINI_ADAPTIVE_RXT_TXT_MIN, SOFT_GEMINI_ADAPTIVE_RXT_TXT_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_ADAPTIVE_RXT_TXT],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_ADAPTIVE_RXT_TXT]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistPsPollTimeout,
-							SOFT_GEMINI_PS_POLL_TIMEOUT_DEF, SOFT_GEMINI_PS_POLL_TIMEOUT_MIN, SOFT_GEMINI_PS_POLL_TIMEOUT_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_PS_POLL_TIMEOUT],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_PS_POLL_TIMEOUT]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistUpsdTimeout,
-							SOFT_GEMINI_UPSD_TIMEOUT_DEF, SOFT_GEMINI_UPSD_TIMEOUT_MIN, SOFT_GEMINI_UPSD_TIMEOUT_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_UPSD_TIMEOUT],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_UPSD_TIMEOUT]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistWlanActiveBtAclMasterMinEDR,
-							SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR_DEF, SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR_MIN, SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistWlanActiveBtAclSlaveMinEDR,
-							SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR_DEF, SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR_MIN, SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR]);
-
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistWlanActiveBtAclMasterMaxEDR,
-							SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR_DEF, SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR_MIN, SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistWlanActiveBtAclSlaveMaxEDR,
-							SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR_DEF, SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR_MIN, SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR]);
-
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexistWlanActiveMaxBtAclMasterEDR,
-							SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR_DEF, SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR_MIN, SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistWlanActiveMaxBtAclSlaveEDR,
-							SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR_DEF, SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR_MIN, SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistWlanActiveBtAclMinBR,
-							SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_BR_DEF, SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_BR_MIN, SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_BR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MIN_BR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MIN_BR]);
-
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistWlanActiveBtAclMaxBR,
-							SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_BR_DEF, SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_BR_MIN, SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_BR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MAX_BR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MAX_BR]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexistWlanActiveMaxBtAclBR,
-							SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_BR_DEF, SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_BR_MIN, SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_BR_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_BR],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_BR]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexHv3AutoEnlargePassiveScanWindowPercent,
-                            SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_HV3_DEF, SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_HV3_MIN, SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_HV3_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_HV3],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_HV3]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexA2DPAutoEnlargePassiveScanWindowPercent,
-                            SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_A2DP_DEF, SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_A2DP_MIN, SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_A2DP_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_A2DP],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_A2DP]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexPassiveScanA2dpBtTime,
-                            SOFT_GEMINI_PASSIVE_SCAN_A2DP_BT_TIME_DEF, SOFT_GEMINI_PASSIVE_SCAN_A2DP_BT_TIME_MIN, SOFT_GEMINI_PASSIVE_SCAN_A2DP_BT_TIME_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_PASSIVE_SCAN_A2DP_BT_TIME],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_PASSIVE_SCAN_A2DP_BT_TIME]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexPassiveScanA2dpWlanTime,
-                            SOFT_GEMINI_PASSIVE_SCAN_A2DP_WLAN_TIME_DEF, SOFT_GEMINI_PASSIVE_SCAN_A2DP_WLAN_TIME_MIN, SOFT_GEMINI_PASSIVE_SCAN_A2DP_WLAN_TIME_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_PASSIVE_SCAN_A2DP_WLAN_TIME],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_PASSIVE_SCAN_A2DP_WLAN_TIME]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlancoexDhcpTime,
-							SOFT_GEMINI_DHCP_TIME_DEF, SOFT_GEMINI_DHCP_TIME_MIN, SOFT_GEMINI_DHCP_TIME_MAX,
-							sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_DHCP_TIME],
-							(TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_DHCP_TIME]);
-
-	regReadIntegerParameter(pAdapter, &STRBThWlanCoexHv3MaxServed,
-                            SOFT_GEMINI_HV3_MAX_SERVED_DEF, SOFT_GEMINI_HV3_MAX_SERVED_MIN, SOFT_GEMINI_HV3_MAX_SERVED_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_HV3_MAX_SERVED],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_HV3_MAX_SERVED]);
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexTemp1,
-                            SOFT_GEMINI_TEMP_PARAM_1_DEF, SOFT_GEMINI_TEMP_PARAM_1_MIN, SOFT_GEMINI_TEMP_PARAM_1_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_TEMP_PARAM_1],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_TEMP_PARAM_1]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexTemp2,
-                            SOFT_GEMINI_TEMP_PARAM_2_DEF, SOFT_GEMINI_TEMP_PARAM_2_MIN, SOFT_GEMINI_TEMP_PARAM_2_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_TEMP_PARAM_2],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_TEMP_PARAM_2]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexTemp3,
-                            SOFT_GEMINI_TEMP_PARAM_3_DEF, SOFT_GEMINI_TEMP_PARAM_3_MIN, SOFT_GEMINI_TEMP_PARAM_3_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_TEMP_PARAM_3],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_TEMP_PARAM_3]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexTemp4,
-                            SOFT_GEMINI_TEMP_PARAM_4_DEF, SOFT_GEMINI_TEMP_PARAM_4_MIN, SOFT_GEMINI_TEMP_PARAM_4_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_TEMP_PARAM_4],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_TEMP_PARAM_4]);
-
-    regReadIntegerParameter(pAdapter, &STRBThWlanCoexTemp5,
-                            SOFT_GEMINI_TEMP_PARAM_5_DEF, SOFT_GEMINI_TEMP_PARAM_5_MIN, SOFT_GEMINI_TEMP_PARAM_5_MAX,
-                            sizeof p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_TEMP_PARAM_5],
-                            (TI_UINT8*)&p->SoftGeminiInitParams.coexParams[SOFT_GEMINI_TEMP_PARAM_5]);
-
-
-    /* 
-     * CoexActivity table 
-     */
-
-    /* Read the number of elements in the table ( this is because table entry has 5 values following it )*/
-    regReadIntegerParameter(pAdapter, &STRCoexActivityNumOfElem,
-                            COEX_ACTIVITY_TABLE_DEF_NUM, COEX_ACTIVITY_TABLE_MIN_NUM, COEX_ACTIVITY_TABLE_MAX_NUM,
-                            sizeof p->twdInitParams.tGeneral.halCoexActivityTable.numOfElements, 
-                            (TI_UINT8*)(&p->twdInitParams.tGeneral.halCoexActivityTable.numOfElements) );
-
-    /* Read the CoexActivity table string */
-    {
-        TI_UINT8 *strCoexActivityTable;
-        TI_UINT8 strCoexActivitySize = 0;
-
-        strCoexActivityTable = os_memoryAlloc(pAdapter, COEX_ACTIVITY_TABLE_MAX_NUM*COEX_ACTIVITY_TABLE_SIZE);
-        if (strCoexActivityTable) {
-            regReadStringParameter(pAdapter, &STRCoexActivityTable ,
-                            (TI_INT8*)(defCoexActivityTable), strCoexActivitySize,
-                            (TI_UINT8*)strCoexActivityTable, &strCoexActivitySize);
-
-            /* Convert the CoexActivity table string */
-            regConvertStringtoCoexActivityTable(strCoexActivityTable , p->twdInitParams.tGeneral.halCoexActivityTable.numOfElements, &p->twdInitParams.tGeneral.halCoexActivityTable.entry[0] , strCoexActivitySize);
-            os_memoryFree(pAdapter, strCoexActivityTable, COEX_ACTIVITY_TABLE_MAX_NUM*COEX_ACTIVITY_TABLE_SIZE);
-        }
-    }
-
-    /*
-    Power Manager
-    */
-    regReadIntegerParameter(pAdapter,
-                            &STRPowerMode,
-                            POWER_MODE_DEF_VALUE,
-                            POWER_MODE_MIN_VALUE,
-                            POWER_MODE_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.powerMode,
-                            (TI_UINT8*)&p->PowerMgrInitParams.powerMode);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRBeaconReceiveTime,
-                            BEACON_RECEIVE_TIME_DEF_VALUE,
-                            BEACON_RECEIVE_TIME_MIN_VALUE,
-                            BEACON_RECEIVE_TIME_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.beaconReceiveTime,
-                            (TI_UINT8*)&p->PowerMgrInitParams.beaconReceiveTime);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRBaseBandWakeUpTime,
-                            BASE_BAND_WAKE_UP_TIME_DEF_VALUE,
-                            BASE_BAND_WAKE_UP_TIME_MIN_VALUE,
-                            BASE_BAND_WAKE_UP_TIME_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.BaseBandWakeUpTime,
-                            (TI_UINT8*)&p->PowerMgrInitParams.BaseBandWakeUpTime);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRHangoverPeriod,
-                            HANGOVER_PERIOD_DEF_VALUE,
-                            HANGOVER_PERIOD_MIN_VALUE,
-                            HANGOVER_PERIOD_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.hangoverPeriod,
-                            (TI_UINT8*)&p->PowerMgrInitParams.hangoverPeriod);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRBeaconListenInterval,
-                            BEACON_LISTEN_INTERVAL_DEF_VALUE,
-                            BEACON_LISTEN_INTERVAL_MIN_VALUE,
-                            BEACON_LISTEN_INTERVAL_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.beaconListenInterval,
-                            (TI_UINT8*)&p->PowerMgrInitParams.beaconListenInterval);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRDtimListenInterval,
-                            DTIM_LISTEN_INTERVAL_DEF_VALUE,
-                            DTIM_LISTEN_INTERVAL_MIN_VALUE,
-                            DTIM_LISTEN_INTERVAL_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.dtimListenInterval,
-                            (TI_UINT8*)&p->PowerMgrInitParams.dtimListenInterval);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRNConsecutiveBeaconsMissed,
-                            N_CONSECUTIVE_BEACONS_MISSED_DEF_VALUE,
-                            N_CONSECUTIVE_BEACONS_MISSED_MIN_VALUE,
-                            N_CONSECUTIVE_BEACONS_MISSED_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.nConsecutiveBeaconsMissed,
-                            (TI_UINT8*)&p->PowerMgrInitParams.nConsecutiveBeaconsMissed);
-
-    regReadIntegerParameter(pAdapter,
-                            &STREnterTo802_11PsRetries,
-                            ENTER_TO_802_11_POWER_SAVE_RETRIES_DEF_VALUE,
-                            ENTER_TO_802_11_POWER_SAVE_RETRIES_MIN_VALUE,
-                            ENTER_TO_802_11_POWER_SAVE_RETRIES_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.EnterTo802_11PsRetries,
-                            (TI_UINT8*)&p->PowerMgrInitParams.EnterTo802_11PsRetries);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRAutoPowerModeInterval,
-                            AUTO_POWER_MODE_INTERVAL_DEF_VALUE,
-                            AUTO_POWER_MODE_INTERVAL_MIN_VALUE,
-                            AUTO_POWER_MODE_INTERVAL_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.autoModeInterval,
-                            (TI_UINT8*)&p->PowerMgrInitParams.autoModeInterval);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRAutoPowerModeActiveTh,
-                            AUTO_POWER_MODE_ACTIVE_TH_DEF_VALUE,
-                            AUTO_POWER_MODE_ACTIVE_TH_MIN_VALUE,
-                            AUTO_POWER_MODE_ACTIVE_TH_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.autoModeActiveTH,
-                            (TI_UINT8*)&p->PowerMgrInitParams.autoModeActiveTH);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRAutoPowerModeDozeTh,
-                            AUTO_POWER_MODE_DOZE_TH_DEF_VALUE,
-                            AUTO_POWER_MODE_DOZE_TH_MIN_VALUE,
-                            AUTO_POWER_MODE_DOZE_TH_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.autoModeDozeTH,
-                            (TI_UINT8*)&p->PowerMgrInitParams.autoModeDozeTH);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRAutoPowerModeDozeMode,
-                            AUTO_POWER_MODE_DOZE_MODE_DEF_VALUE,
-                            AUTO_POWER_MODE_DOZE_MODE_MIN_VALUE,
-                            AUTO_POWER_MODE_DOZE_MODE_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.autoModeDozeMode,
-                            (TI_UINT8*)&p->PowerMgrInitParams.autoModeDozeMode);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRDefaultPowerLevel,
-                            POWERAUTHO_POLICY_ELP,
-                            POWERAUTHO_POLICY_ELP,
-                            POWERAUTHO_POLICY_AWAKE,
-                            sizeof p->PowerMgrInitParams.defaultPowerLevel,
-                            (TI_UINT8*)&p->PowerMgrInitParams.defaultPowerLevel);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRPowerSavePowerLevel,
-                            POWERAUTHO_POLICY_ELP,
-                            POWERAUTHO_POLICY_ELP,
-                            POWERAUTHO_POLICY_AWAKE,
-                            sizeof p->PowerMgrInitParams.PowerSavePowerLevel,
-                            (TI_UINT8*)&p->PowerMgrInitParams.PowerSavePowerLevel);
-
-
-  regReadIntegerParameter(pAdapter,
-                            &STRBurstModeEnable,
-                            BURST_MODE_ENABLE_DEF,
-                            BURST_MODE_ENABLE_MIN,
-                            BURST_MODE_ENABLE_MAX,
-                            sizeof p->qosMngrInitParams.bEnableBurstMode,
-                            (TI_UINT8*)&p->qosMngrInitParams.bEnableBurstMode);
-
-  regReadIntegerParameter(pAdapter,
-                          &STRDcoItrimEnabled,
-                          TWD_DCO_ITRIM_ENABLE_DEF,
-                          TWD_DCO_ITRIM_ENABLE_MIN,
-                          TWD_DCO_ITRIM_ENABLE_MAX,
-                          sizeof p->twdInitParams.tDcoItrimParams.enable,
-                          (TI_UINT8*)&p->twdInitParams.tDcoItrimParams.enable);
-
-  regReadIntegerParameter(pAdapter,
-                          &STRDcoItrimModerationTimeout,
-                          TWD_DCO_ITRIM_MODERATION_TIMEOUT_DEF,
-                          TWD_DCO_ITRIM_MODERATION_TIMEOUT_MIN,
-                          TWD_DCO_ITRIM_MODERATION_TIMEOUT_MAX,
-                          sizeof p->twdInitParams.tDcoItrimParams.moderationTimeoutUsec,
-                          (TI_UINT8*)&p->twdInitParams.tDcoItrimParams.moderationTimeoutUsec);
-
-/*----------------------------------
- TX power adjust
-------------------------------------*/
-
-    regReadIntegerParameter(pAdapter, &STRTxPowerCheckTime,
-                            1, 1, 1200,  /* in units of 5000 ms */
-                            sizeof p->siteMgrInitParams.TxPowerCheckTime,
-                            (TI_UINT8*)&p->siteMgrInitParams.TxPowerCheckTime);
-
-
-    regReadIntegerParameter(pAdapter, &STRTxPowerControlOn,
-                            0, 0, 1,  /* on/off (1/0) default is off */
-                            sizeof p->siteMgrInitParams.TxPowerControlOn,
-                            (TI_UINT8*)&p->siteMgrInitParams.TxPowerControlOn);
-
-    regReadIntegerParameter(pAdapter, &STRTxPowerRssiThresh,
-                            38, 0, 200,  /* the value is positive and will be translated by driver */
-                            sizeof p->siteMgrInitParams.TxPowerRssiThresh,
-                            (TI_UINT8*)&p->siteMgrInitParams.TxPowerRssiThresh);
-
-    regReadIntegerParameter(pAdapter, &STRTxPowerRssiRestoreThresh,
-                            45, 0, 200,  /* the value is positive and will be translated by driver */
-                            sizeof p->siteMgrInitParams.TxPowerRssiRestoreThresh,
-                            (TI_UINT8*)&p->siteMgrInitParams.TxPowerRssiRestoreThresh);
-
-    regReadIntegerParameter(pAdapter, &STRTxPowerTempRecover,
-                            MIN_TX_POWER, MIN_TX_POWER, MAX_TX_POWER,  
-                            sizeof p->regulatoryDomainInitParams.uTemporaryTxPower,
-                            (TI_UINT8*)&p->regulatoryDomainInitParams.uTemporaryTxPower);
-
-/*----------------------------------
- end of TX power adjust
-------------------------------------*/
-
-regReadIntegerTable (pAdapter, &STRTxPerRatePowerLimits_2_4G_Extreme, RADIO_TX_PER_POWER_LIMITS_2_4_EXTREME_DEF_TABLE,
-                     NUMBER_OF_RATE_GROUPS_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPerRatePowerLimits_2_4G_Extreme, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_INT8),TI_TRUE);
-
-regReadIntegerParameter(pAdapter, &STRDegradedLowToNormalThr_2_4G,
-                        RADIO_DEGRADED_LOW_TO_NORMAL_THR_2_4G_DEF,RADIO_DEGRADED_LOW_TO_NORMAL_THR_2_4G_MIN,RADIO_DEGRADED_LOW_TO_NORMAL_THR_2_4G_MAX,sizeof (TI_UINT8),
-                        (TI_UINT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.DegradedLowToNormalThr_2_4G);
-
-regReadIntegerParameter(pAdapter, &STRNormalToDegradedHighThr_2_4G,
-                        RADIO_NORMAL_TO_DEGRADED_HIGH_THR_2_4G_DEF,RADIO_NORMAL_TO_DEGRADED_HIGH_THR_2_4G_MIN,RADIO_NORMAL_TO_DEGRADED_HIGH_THR_2_4G_MAX,sizeof (TI_UINT8),
-                        (TI_UINT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.NormalToDegradedHighThr_2_4G);
-
-regReadIntegerParameter(pAdapter, &STRDegradedLowToNormalThr_5G,
-                        RADIO_DEGRADED_LOW_TO_NORMAL_THR_5G_DEF,RADIO_DEGRADED_LOW_TO_NORMAL_THR_5G_MIN,RADIO_DEGRADED_LOW_TO_NORMAL_THR_5G_MAX,sizeof (TI_UINT8),
-                        (TI_UINT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.DegradedLowToNormalThr_5G);
-
-regReadIntegerParameter(pAdapter, &STRNormalToDegradedHighThr_5G,
-                        RADIO_NORMAL_TO_DEGRADED_HIGH_THR_5G_DEF,RADIO_NORMAL_TO_DEGRADED_HIGH_THR_5G_MIN,RADIO_NORMAL_TO_DEGRADED_HIGH_THR_5G_MAX,sizeof (TI_UINT8),
-                        (TI_UINT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.NormalToDegradedHighThr_5G);
-
-regReadIntegerTable (pAdapter, &STRTxPerRatePowerLimits_5G_Extreme, RADIO_TX_PER_POWER_LIMITS_5_EXTREME_DEF_TABLE,
-                     NUMBER_OF_RATE_GROUPS_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPerRatePowerLimits_5G_Extreme, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-/*--------------- Extended Radio Parameters --------------------------*/
-
-regReadIntegerTable (pAdapter, &STRTxPerChannelPowerCompensation_2_4G, RADIO_TX_PER_CH_POWER_COMPENSATION_2_4_DEF,
-                     HALF_NUMBER_OF_2_4_G_CHANNELS, NULL, (TI_INT8*)&p->twdInitParams.tIniFileExtRadioParams.TxPerChannelPowerCompensation_2_4G, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTxPerChannelPowerCompensation_5G_OFDM, RADIO_TX_PER_CH_POWER_COMPENSATION_5_DEF,
-                     HALF_NUMBER_OF_5G_CHANNELS, NULL, (TI_INT8*)&p->twdInitParams.tIniFileExtRadioParams.TxPerChannelPowerCompensation_5G_OFDM, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-
-regReadIntegerParameter(pAdapter, &STRSettings,
-						65,0,255,
-                        sizeof p->twdInitParams.tPlatformGenParams.GeneralSettings,
-                        (TI_UINT8*)&p->twdInitParams.tPlatformGenParams.GeneralSettings);
-
-/*---------------------- Smart Reflex Configration -----------------------*/
-    regReadIntegerParameter(pAdapter, &STRSRState,
-                          SMART_REFLEX_STATE_DEF, SMART_REFLEX_STATE_MIN, SMART_REFLEX_STATE_MAX,
-                          sizeof p->twdInitParams.tPlatformGenParams.SRState,
-                          (TI_UINT8*)&p->twdInitParams.tPlatformGenParams.SRState);
-    
-    NdisZeroMemory(&SRConfigParams[0],MAX_SMART_REFLEX_PARAM );
-    regReadIntegerTable (pAdapter, &STRSRConfigParam1, SMART_REFLEX_CONFIG_PARAMS_DEF_TABLE_SRF1,
-                         MAX_SMART_REFLEX_PARAM, NULL, (TI_INT8*)&SRConfigParams, 
-                        (TI_UINT32*)&TempSRCnt, sizeof (TI_INT8),TI_TRUE);
-    len = SRConfigParams[0];
-    NdisZeroMemory(&(p->twdInitParams.tPlatformGenParams.SRF1[0]),MAX_SMART_REFLEX_PARAM);
-    if ((len < MAX_SMART_REFLEX_PARAM) && ((TempSRCnt <= len + 1) || (TempSRCnt == MAX_SMART_REFLEX_PARAM)))
-    {
-        memcpy(&(p->twdInitParams.tPlatformGenParams.SRF1[0]), &SRConfigParams[0],TempSRCnt);
-    }
-    
-    NdisZeroMemory(&SRConfigParams[0],MAX_SMART_REFLEX_PARAM );
-    regReadIntegerTable (pAdapter, &STRSRConfigParam2, SMART_REFLEX_CONFIG_PARAMS_DEF_TABLE_SRF2,
-                         MAX_SR_PARAM_LEN, NULL, (TI_INT8*)&SRConfigParams, 
-                         (TI_UINT32*)&TempSRCnt, sizeof (TI_INT8),TI_TRUE);
-    len = SRConfigParams[0];
-    if ((len > MAX_SR_PARAM_LEN) || (TempSRCnt > len + 1))
-    {
-        NdisZeroMemory(&(p->twdInitParams.tPlatformGenParams.SRF2[0]),MAX_SMART_REFLEX_PARAM);
-    }
-    else
-    {
-       memcpy(&(p->twdInitParams.tPlatformGenParams.SRF2[0]), &SRConfigParams[0],TempSRCnt);
-    }
-    
-    NdisZeroMemory(&SRConfigParams[0],MAX_SMART_REFLEX_PARAM);
-    regReadIntegerTable (pAdapter, &STRSRConfigParam3, SMART_REFLEX_CONFIG_PARAMS_DEF_TABLE_SRF3,
-                         MAX_SR_PARAM_LEN, NULL, (TI_INT8*)&SRConfigParams, 
-                         (TI_UINT32*)&TempSRCnt, sizeof (TI_INT8), TI_TRUE);
-    len = SRConfigParams[0];
-    if ((len > MAX_SR_PARAM_LEN)|| (TempSRCnt > len + 1))
-    {
-        NdisZeroMemory(&(p->twdInitParams.tPlatformGenParams.SRF3[0]),MAX_SMART_REFLEX_PARAM );
-    }
-    else
-    {
-        memcpy(&(p->twdInitParams.tPlatformGenParams.SRF3[0]), &SRConfigParams[0],TempSRCnt);
-    }
-
-/*---------------------- Power Management Configuration -----------------------*/
-    regReadIntegerParameter(pAdapter,
-                            &STRPowerMgmtHangOverPeriod,
-                            HANGOVER_PERIOD_DEF_VALUE,
-                            HANGOVER_PERIOD_MIN_VALUE,
-                            HANGOVER_PERIOD_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.hangOverPeriod,
-                            (TI_UINT8*)&p->PowerMgrInitParams.hangOverPeriod);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRPowerMgmtNeedToSendNullData,
-                            POWER_MGMNT_NEED_TO_SEND_NULL_PACKET_DEF_VALUE,
-                            POWER_MGMNT_NEED_TO_SEND_NULL_PACKET_MIN_VALUE,
-                            POWER_MGMNT_NEED_TO_SEND_NULL_PACKET_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.needToSendNullData,
-                            (TI_UINT8*)&p->PowerMgrInitParams.needToSendNullData);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRPowerMgmtNullPktRateModulation,
-                            POWER_MGMNT_NULL_PACKET_RATE_MOD_DEF_VALUE,
-                            POWER_MGMNT_NULL_PACKET_RATE_MOD_MIN_VALUE,
-                            POWER_MGMNT_NULL_PACKET_RATE_MOD_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.NullPktRateModulation,
-                            (TI_UINT8*)&p->PowerMgrInitParams.NullPktRateModulation);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRPowerMgmtNumNullPktRetries,
-                            POWER_MGMNT_NUM_NULL_PACKET_RETRY_DEF_VALUE,
-                            POWER_MGMNT_NUM_NULL_PACKET_RETRY_MIN_VALUE,
-                            POWER_MGMNT_NUM_NULL_PACKET_RETRY_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.numNullPktRetries,
-                            (TI_UINT8*)&p->PowerMgrInitParams.numNullPktRetries);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRPowerMgmtPllLockTime,
-                            PLL_LOCK_TIME_DEF_VALUE,
-                            PLL_LOCK_TIME_MIN_VALUE,
-                            PLL_LOCK_TIME_MAX_VALUE,
-                            sizeof p->PowerMgrInitParams.PLLlockTime,
-                            (TI_UINT8*)&p->PowerMgrInitParams.PLLlockTime);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRPsPollDeliveryFailureRecoveryPeriod,
-                            PS_POLL_FAILURE_PERIOD_DEF,
-                            PS_POLL_FAILURE_PERIOD_MIN,
-                            PS_POLL_FAILURE_PERIOD_MAX,
-                            sizeof p->PowerMgrInitParams.PsPollDeliveryFailureRecoveryPeriod,
-                            (TI_UINT8*)&p->PowerMgrInitParams.PsPollDeliveryFailureRecoveryPeriod);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRHostClkSettlingTime,
-                            HOST_CLK_SETTLE_TIME_USEC_DEF,
-                            HOST_CLK_SETTLE_TIME_USEC_MIN,
-                            HOST_CLK_SETTLE_TIME_USEC_MAX,
-                            sizeof p->twdInitParams.tGeneral.uHostClkSettlingTime,
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.uHostClkSettlingTime);
-
-    regReadIntegerParameter(pAdapter,
-                            &STRHostFastWakeupSupport,
-                            HOST_FAST_WAKE_SUPPORT_DEF,
-                            HOST_FAST_WAKE_SUPPORT_MIN,
-                            HOST_FAST_WAKE_SUPPORT_MAX,
-                            sizeof p->twdInitParams.tGeneral.uHostFastWakeupSupport,
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.uHostFastWakeupSupport);
-
-    /*--------------- Power Management Wake up conditions ------------------*/
-
-    regReadIntegerParameter(pAdapter, &STRListenInterval,
-                            TWD_LISTEN_INTERVAL_DEF, TWD_LISTEN_INTERVAL_MIN,
-                            TWD_LISTEN_INTERVAL_MAX,
-                            sizeof p->PowerMgrInitParams.listenInterval,
-                            (TI_UINT8*)&p->PowerMgrInitParams.listenInterval);
-
-    /*-----------------------------------------------------------------------*/
-
-    /*--------------- Power Server Init Parameters ------------------*/
-    regReadIntegerParameter(pAdapter,
-                            &STRPowerMgmtNumNullPktRetries,
-                            POWER_MGMNT_NUM_NULL_PACKET_RETRY_DEF_VALUE,
-                            POWER_MGMNT_NUM_NULL_PACKET_RETRY_MIN_VALUE,
-                            POWER_MGMNT_NUM_NULL_PACKET_RETRY_MAX_VALUE,
-                            sizeof p->twdInitParams.tPowerSrv.numNullPktRetries,
-                            (TI_UINT8*)&p->twdInitParams.tPowerSrv.numNullPktRetries);
-
-        regReadIntegerParameter(pAdapter,
-                            &STRPowerMgmtHangOverPeriod,
-                            HANGOVER_PERIOD_DEF_VALUE,
-                            HANGOVER_PERIOD_MIN_VALUE,
-                            HANGOVER_PERIOD_MAX_VALUE,
-                            sizeof p->twdInitParams.tPowerSrv.hangOverPeriod,
-                            (TI_UINT8*)&p->twdInitParams.tPowerSrv.hangOverPeriod);
-    /*-----------------------------------------------------------------------*/
-
-
-    /* Scan SRV */
-    regReadIntegerParameter(pAdapter, &STRNumberOfNoScanCompleteToRecovery,
-                            SCAN_SRV_NUMBER_OF_NO_SCAN_COMPLETE_TO_RECOVERY_DEF,
-                            SCAN_SRV_NUMBER_OF_NO_SCAN_COMPLETE_TO_RECOVERY_MIN,
-                            SCAN_SRV_NUMBER_OF_NO_SCAN_COMPLETE_TO_RECOVERY_MAX,
-                            sizeof (p->twdInitParams.tScanSrv.numberOfNoScanCompleteToRecovery),
-                            (TI_UINT8*)&(p->twdInitParams.tScanSrv.numberOfNoScanCompleteToRecovery) );
-
-        regReadIntegerParameter(pAdapter, &STRTriggeredScanTimeOut,
-            SCAN_SRV_TRIGGERED_SCAN_TIME_OUT_DEF,
-            SCAN_SRV_TRIGGERED_SCAN_TIME_OUT_MIN,
-            SCAN_SRV_TRIGGERED_SCAN_TIME_OUT_MAX,
-            sizeof (p->twdInitParams.tScanSrv.uTriggeredScanTimeOut),
-            (TI_UINT8*)&(p->twdInitParams.tScanSrv.uTriggeredScanTimeOut) );
-
-
-    /* Regulatory Domain */
-
-    /* Indicate the time in which the STA didn't receive any country code and was not connected, and therefore
-       will delete its current country code */
-    regReadIntegerParameter(pAdapter, &STRTimeToResetCountryMs,
-                        REGULATORY_DOMAIN_COUNTRY_TIME_RESET_DEF, REGULATORY_DOMAIN_COUNTRY_TIME_RESET_MIN,
-                        REGULATORY_DOMAIN_COUNTRY_TIME_RESET_MAX, 
-                        sizeof p->regulatoryDomainInitParams.uTimeOutToResetCountryMs,
-                        (TI_UINT8*)&(p->regulatoryDomainInitParams.uTimeOutToResetCountryMs));
-
-    /* 802.11d/h */
-    regReadIntegerParameter(pAdapter, &STRMultiRegulatoryDomainEnabled,
-                            MULTI_REGULATORY_DOMAIN_ENABLED_DEF, MULTI_REGULATORY_DOMAIN_ENABLED_MIN,
-                            MULTI_REGULATORY_DOMAIN_ENABLED_MAX, 
-                            sizeof p->regulatoryDomainInitParams.multiRegulatoryDomainEnabled,
-                            (TI_UINT8*)&(p->regulatoryDomainInitParams.multiRegulatoryDomainEnabled));
-
-    regReadIntegerParameter(pAdapter, &STRSpectrumManagementEnabled,
-                            SPECTRUM_MANAGEMENT_ENABLED_DEF, SPECTRUM_MANAGEMENT_ENABLED_MIN,
-                            SPECTRUM_MANAGEMENT_ENABLED_MAX, 
-                            sizeof p->regulatoryDomainInitParams.spectrumManagementEnabled,
-                            (TI_UINT8*)&(p->regulatoryDomainInitParams.spectrumManagementEnabled));
-
-    regReadIntegerParameter(pAdapter, &STRSpectrumManagementEnabled,
-                            SPECTRUM_MANAGEMENT_ENABLED_DEF, SPECTRUM_MANAGEMENT_ENABLED_MIN,
-                            SPECTRUM_MANAGEMENT_ENABLED_MAX, 
-                            sizeof p->SwitchChannelInitParams.dot11SpectrumManagementRequired,
-                            (TI_UINT8*)&(p->SwitchChannelInitParams.dot11SpectrumManagementRequired));
-
-
-    /* Scan Control Tables */
-    regReadStringParameter(pAdapter, &STRScanControlTable24,
-                           (TI_INT8*)&ScanControlTable24Def[0],(USHORT)(2 * NUM_OF_CHANNELS_24),
-                            (TI_UINT8*)&(ScanControlTable24Tmp[0]),
-                            (PUSHORT)&tableLen);
-
-    for( loopIndex = tableLen ; loopIndex < 2 * NUM_OF_CHANNELS_24 ; loopIndex++)
-        ScanControlTable24Tmp[loopIndex] = '0';
-
-    decryptScanControlTable(ScanControlTable24Tmp,(TI_UINT8*)&(p->regulatoryDomainInitParams.desiredScanControlTable.ScanControlTable24.tableString[0]),2 * NUM_OF_CHANNELS_24);
-
-
-    /* Scan Control Tables for 5 Ghz*/
-    regReadStringParameter(pAdapter, &STRScanControlTable5,
-                           (TI_INT8*)&ScanControlTable5Def[0],(USHORT)(2 * A_5G_BAND_NUM_CHANNELS),
-                            (TI_UINT8*)&(ScanControlTable5Tmp[0]),
-                            (PUSHORT)&tableLen);
-
-
-    for( loopIndex = tableLen ; loopIndex < 2 * A_5G_BAND_NUM_CHANNELS ; loopIndex++)
-        ScanControlTable5Tmp[loopIndex] = '0';
-
-    decryptScanControlTable(ScanControlTable5Tmp,(TI_UINT8*)&(p->regulatoryDomainInitParams.desiredScanControlTable.ScanControlTable5.tableString[0]),2 * A_5G_BAND_NUM_CHANNELS);
-
-
-    /* Tx Power */
-    regReadIntegerParameter(pAdapter, &STRTxPower,
-                            DEF_TX_POWER, MIN_TX_POWER, MAX_TX_POWER,
-                            sizeof p->regulatoryDomainInitParams.desiredTxPower,
-                            (TI_UINT8*)&p->regulatoryDomainInitParams.desiredTxPower);
-
-    regReadIntegerParameter(pAdapter, &STRdot11WEPStatus,
-                            RSN_WEP_STATUS_DEF, RSN_WEP_STATUS_MIN, RSN_WEP_STATUS_MAX,
-                            sizeof p->rsnInitParams.privacyOn,
-                            (TI_UINT8*)&p->rsnInitParams.privacyOn);
-    /* reverse privacy value - windows is setting 1 as off */
-    /*
-        p->rsnInitParams.privacyMode = !(p->rsnInitParams.privacyOn);
-        p->rsnInitParams.privacyOn = !(p->rsnInitParams.privacyOn);
-    */
-
-    regReadIntegerParameter(pAdapter, &STRdot11WEPDefaultKeyID,
-                            RSN_DEFAULT_KEY_ID_DEF, RSN_DEFAULT_KEY_ID_MIN,
-                            RSN_DEFAULT_KEY_ID_MAX,
-                            sizeof p->rsnInitParams.defaultKeyId,
-                            (TI_UINT8*)&p->rsnInitParams.defaultKeyId);
-
-
-    regReadIntegerParameter(pAdapter, &STRMixedMode,
-                            RSN_WEPMIXEDMODE_ENABLED_DEF, RSN_WEPMIXEDMODE_ENABLED_MIN,
-                            RSN_WEPMIXEDMODE_ENABLED_MAX,
-                            sizeof p->rsnInitParams.mixedMode,
-                            (TI_UINT8*)&p->rsnInitParams.mixedMode);
-
-    regReadIntegerParameter(pAdapter, &STRWPAMixedMode,
-                            RSN_WPAMIXEDMODE_ENABLE_DEF, RSN_WPAMIXEDMODE_ENABLE_MIN, 
-                            RSN_WPAMIXEDMODE_ENABLE_MAX,                         
-                            sizeof p->rsnInitParams.WPAMixedModeEnable,
-                            (TI_UINT8*)&p->rsnInitParams.WPAMixedModeEnable);         
-
-    regReadIntegerParameter(pAdapter, &STRRSNPreAuth,
-                            RSN_PREAUTH_ENABLE_DEF, RSN_PREAUTH_ENABLE_MIN,
-                            RSN_PREAUTH_ENABLE_MAX,
-                            sizeof p->rsnInitParams.preAuthSupport,
-                            (TI_UINT8*)&p->rsnInitParams.preAuthSupport);
-
-    regReadIntegerParameter(pAdapter, &STRRSNPreAuthTimeout,
-                            RSN_PREAUTH_TIMEOUT_DEF, RSN_PREAUTH_TIMEOUT_MIN,
-                            RSN_PREAUTH_TIMEOUT_MAX,
-                            sizeof p->rsnInitParams.preAuthTimeout,
-                            (TI_UINT8*)&p->rsnInitParams.preAuthTimeout);
-
-	regReadIntegerParameter(pAdapter, &STRPairwiseMicFailureFilter,
-                            PAIRWISE_MIC_FAIL_FILTER_DEF, PAIRWISE_MIC_FAIL_FILTER_MIN, 
-							PAIRWISE_MIC_FAIL_FILTER_MAX,                         
-                            sizeof p->rsnInitParams.bPairwiseMicFailureFilter, 
-							(TI_UINT8*)&p->rsnInitParams.bPairwiseMicFailureFilter);         
-
-    regReadWepKeyParameter(pAdapter, (TI_UINT8*)p->rsnInitParams.keys, p->rsnInitParams.defaultKeyId);
-
-
-    /*---------------------------
-            QOS parameters
-    -----------------------------*/
-
-    regReadIntegerParameter(pAdapter, &STRClsfr_Type,
-                            CLSFR_TYPE_DEF, CLSFR_TYPE_MIN, 
-                            CLSFR_TYPE_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.eClsfrType,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.eClsfrType); 
-
-    switch(p->txDataInitParams.ClsfrInitParam.eClsfrType)
-    {
-        case D_TAG_CLSFR:
-            /* Trivial mapping D-tag to D-tag - no need to read more keys*/
-        break;
-
-        case DSCP_CLSFR:
-
-            regReadIntegerParameter(pAdapter, &STRNumOfCodePoints,
-                            NUM_OF_CODE_POINTS_DEF, NUM_OF_CODE_POINTS_MIN, 
-                            NUM_OF_CODE_POINTS_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.uNumActiveEntries,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.uNumActiveEntries);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier00_CodePoint,
-                            DSCP_CLASSIFIER_CODE_POINT_00, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier01_CodePoint,
-                            DSCP_CLASSIFIER_CODE_POINT_01, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier02_CodePoint,
-                            DSCP_CLASSIFIER_CODE_POINT_02, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier03_CodePoint,
-                            DSCP_CLASSIFIER_CODE_POINT_03, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier04_CodePoint,
-                            DSCP_CLASSIFIER_CODE_POINT_DEF, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier05_CodePoint,
-                            DSCP_CLASSIFIER_CODE_POINT_DEF, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier06_CodePoint,
-                            DSCP_CLASSIFIER_CODE_POINT_DEF, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier07_CodePoint,
-                            DSCP_CLASSIFIER_CODE_POINT_DEF, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier08_CodePoint,
-                            CLASSIFIER_CODE_POINT_DEF, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier09_CodePoint,
-                            CLASSIFIER_CODE_POINT_DEF, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier10_CodePoint,
-                            CLASSIFIER_CODE_POINT_DEF, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier11_CodePoint,
-                            CLASSIFIER_CODE_POINT_DEF, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier12_CodePoint,
-                            CLASSIFIER_CODE_POINT_DEF, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier13_CodePoint,
-                            CLASSIFIER_CODE_POINT_DEF, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier14_CodePoint,
-                            CLASSIFIER_CODE_POINT_DEF, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier15_CodePoint,
-                            CLASSIFIER_CODE_POINT_DEF, CLASSIFIER_CODE_POINT_MIN, 
-                            CLASSIFIER_CODE_POINT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].Dscp.CodePoint,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].Dscp.CodePoint);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier00_DTag,
-                            DSCP_CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier01_DTag,
-                            DSCP_CLASSIFIER_DTAG_00, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier02_DTag,
-                            DSCP_CLASSIFIER_DTAG_01, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier03_DTag,
-                            DSCP_CLASSIFIER_DTAG_02, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier04_DTag,
-                            DSCP_CLASSIFIER_DTAG_03, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier05_DTag,
-                            DSCP_CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier06_DTag,
-                            DSCP_CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier07_DTag,
-                            DSCP_CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier08_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier09_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier10_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier11_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier12_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier13_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier14_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].DTag);
-            regReadIntegerParameter(pAdapter, &STRDSCPClassifier15_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].DTag);
-
-
-        break;
-
-        case PORT_CLSFR:
-
-            regReadIntegerParameter(pAdapter, &STRNumOfDstPortClassifiers,
-                            NUM_OF_PORT_CLASSIFIERS_DEF, NUM_OF_PORT_CLASSIFIERS_MIN, 
-                            NUM_OF_PORT_CLASSIFIERS_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.uNumActiveEntries,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.uNumActiveEntries);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier00_Port,
-                            PORT_CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier01_Port,
-                            PORT_CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier02_Port,
-                            PORT_CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier03_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier04_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier05_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier06_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier07_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier08_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier09_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier10_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier11_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier12_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier13_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier14_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier15_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].Dscp.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].Dscp.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier00_DTag,
-                            PORT_CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier01_DTag,
-                            PORT_CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier02_DTag,
-                            PORT_CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier03_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier04_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier05_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier06_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier07_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier08_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier09_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier10_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier11_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier12_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier13_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier14_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].DTag);
-            regReadIntegerParameter(pAdapter, &STRPortClassifier15_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].DTag);
-    
-        break;
-
-
-        case IPPORT_CLSFR: 
-
-            regReadIntegerParameter(pAdapter, &STRNumOfDstIPPortClassifiers,
-                            NUM_OF_IPPORT_CLASSIFIERS_DEF, NUM_OF_IPPORT_CLASSIFIERS_MIN, 
-                            NUM_OF_IPPORT_CLASSIFIERS_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.uNumActiveEntries,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.uNumActiveEntries);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier00_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier01_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier02_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier03_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier04_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier05_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier06_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier07_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier08_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier09_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier10_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier11_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier12_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier13_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier14_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadStringParameter(pAdapter, &STRIPPortClassifier15_IPAddress, (TI_INT8*)(ClsfrIp), 11, (TI_UINT8*)ClsfrIpString, &ClsfrIpStringSize);
-            initValusFromRgstryString( (TI_INT8*)(ClsfrIpString), (TI_INT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].Dscp.DstIPPort.DstIPAddress, 4);
-
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier00_Port,
-                            IPPORT_CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier01_Port,
-                            IPPORT_CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier02_Port,
-                            IPPORT_CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier03_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier04_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier05_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier06_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier07_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier08_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier09_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier10_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier11_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier12_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier13_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier14_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier15_Port,
-                            CLASSIFIER_PORT_DEF, CLASSIFIER_PORT_MIN, 
-                            CLASSIFIER_PORT_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].Dscp.DstIPPort.DstPortNum,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].Dscp.DstIPPort.DstPortNum);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier00_DTag,
-                            IPPORT_CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[0].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier01_DTag,
-                            IPPORT_CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[1].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier02_DTag,
-                            IPPORT_CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[2].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier03_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[3].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier04_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[4].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier05_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[5].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier06_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[6].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier07_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[7].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier08_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[8].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier09_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[9].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier10_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[10].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier11_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[11].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier12_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[12].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier13_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[13].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier14_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[14].DTag);
-            regReadIntegerParameter(pAdapter, &STRIPPortClassifier15_DTag,
-                            CLASSIFIER_DTAG_DEF, CLASSIFIER_DTAG_MIN, 
-                            CLASSIFIER_DTAG_MAX,                         
-                            sizeof p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].DTag,
-                            (TI_UINT8*)&p->txDataInitParams.ClsfrInitParam.ClsfrTable[15].DTag);
-    
-        break;
-
-    }
-
-
-
-  /* ---------------------------
-
-       Traffic Intensity Threshold 
-
-   ---------------------------*/
-    regReadIntegerParameter(pAdapter, &STRTrafficIntensityThresHigh, 
-                            CTRL_DATA_TRAFFIC_THRESHOLD_HIGH_DEF, 
-                            CTRL_DATA_TRAFFIC_THRESHOLD_HIGH_MIN, 
-                            CTRL_DATA_TRAFFIC_THRESHOLD_HIGH_MAX, 
-                            sizeof p->ctrlDataInitParams.ctrlDataTrafficThreshold.uHighThreshold, 
-                            (TI_UINT8*)&p->ctrlDataInitParams.ctrlDataTrafficThreshold.uHighThreshold);
-
-    regReadIntegerParameter(pAdapter, &STRTrafficIntensityThresLow, 
-                            CTRL_DATA_TRAFFIC_THRESHOLD_LOW_DEF, 
-                            CTRL_DATA_TRAFFIC_THRESHOLD_LOW_MIN, 
-                            CTRL_DATA_TRAFFIC_THRESHOLD_LOW_MAX, 
-                            sizeof p->ctrlDataInitParams.ctrlDataTrafficThreshold.uLowThreshold,
-                            (TI_UINT8*)&p->ctrlDataInitParams.ctrlDataTrafficThreshold.uLowThreshold);
-
-    regReadIntegerParameter(pAdapter, &STRTrafficIntensityTestInterval, 
-                            CTRL_DATA_TRAFFIC_THRESHOLD_INTERVAL_DEF, 
-                            CTRL_DATA_TRAFFIC_THRESHOLD_INTERVAL_MIN, 
-                            CTRL_DATA_TRAFFIC_THRESHOLD_INTERVAL_MAX, 
-                            sizeof p->ctrlDataInitParams.ctrlDataTrafficThreshold.TestInterval,
-                            (TI_UINT8*)&p->ctrlDataInitParams.ctrlDataTrafficThreshold.TestInterval);
-
-    regReadIntegerParameter(pAdapter, &STRTrafficIntensityThresholdEnabled, 
-                            CTRL_DATA_TRAFFIC_THRESHOLD_ENABLED_DEF, 
-                            CTRL_DATA_TRAFFIC_THRESHOLD_ENABLED_MIN, 
-                            CTRL_DATA_TRAFFIC_THRESHOLD_ENABLED_MAX, 
-                            sizeof p->ctrlDataInitParams.ctrlDataTrafficThresholdEnabled,
-                            (TI_UINT8*)&p->ctrlDataInitParams.ctrlDataTrafficThresholdEnabled);
-
-    regReadIntegerParameter(pAdapter, &STRTrafficMonitorMinIntervalPercentage, 
-                            TRAFFIC_MONITOR_MIN_INTERVAL_PERCENT_DEF, 
-                            TRAFFIC_MONITOR_MIN_INTERVAL_PERCENT_MIN, 
-                            TRAFFIC_MONITOR_MIN_INTERVAL_PERCENT_MAX, 
-                            sizeof p->trafficMonitorMinIntervalPercentage,
-                            (TI_UINT8*)&p->trafficMonitorMinIntervalPercentage);
-
-    regReadIntegerParameter(pAdapter, &STRWMEEnable,
-                            WME_ENABLED_DEF, WME_ENABLED_MIN,
-                            WME_ENABLED_MAX,
-                            sizeof p->qosMngrInitParams.wmeEnable,
-                            (TI_UINT8*)&p->qosMngrInitParams.wmeEnable);
-
-    regReadIntegerParameter(pAdapter, &STRTrafficAdmCtrlEnable,
-                            QOS_TRAFFIC_ADM_CTRL_ENABLED_DEF, QOS_TRAFFIC_ADM_CTRL_ENABLED_MIN, 
-                            QOS_TRAFFIC_ADM_CTRL_ENABLED_MAX,                         
-                            sizeof p->qosMngrInitParams.trafficAdmCtrlEnable,
-                            (TI_UINT8*)&p->qosMngrInitParams.trafficAdmCtrlEnable); 
-
-    regReadIntegerParameter(pAdapter, &STRdesiredPsMode,
-                            QOS_DESIRED_PS_MODE_DEF, QOS_DESIRED_PS_MODE_MIN, 
-                            QOS_DESIRED_PS_MODE_MAX,                         
-                            sizeof p->qosMngrInitParams.desiredPsMode,
-                            (TI_UINT8*)&p->qosMngrInitParams.desiredPsMode); 
-
-    regReadIntegerParameter(pAdapter, &STRQOSmsduLifeTimeBE,
-                    QOS_MSDU_LIFE_TIME_BE_DEF, QOS_MSDU_LIFE_TIME_BE_MIN,
-                    QOS_MSDU_LIFE_TIME_BE_MAX,
-                    sizeof p->qosMngrInitParams.MsduLifeTime[QOS_AC_BE],
-                    (TI_UINT8*)&p->qosMngrInitParams.MsduLifeTime[QOS_AC_BE]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSmsduLifeTimeBK,
-                            QOS_MSDU_LIFE_TIME_BK_DEF, QOS_MSDU_LIFE_TIME_BK_MIN,
-                            QOS_MSDU_LIFE_TIME_BK_MAX,
-                            sizeof p->qosMngrInitParams.MsduLifeTime[QOS_AC_BK],
-                            (TI_UINT8*)&p->qosMngrInitParams.MsduLifeTime[QOS_AC_BK]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSmsduLifeTimeVI,
-                            QOS_MSDU_LIFE_TIME_VI_DEF, QOS_MSDU_LIFE_TIME_VI_MIN,
-                            QOS_MSDU_LIFE_TIME_VI_MAX,
-                            sizeof p->qosMngrInitParams.MsduLifeTime[QOS_AC_VI],
-                            (TI_UINT8*)&p->qosMngrInitParams.MsduLifeTime[QOS_AC_VI]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSmsduLifeTimeVO,
-                            QOS_MSDU_LIFE_TIME_VO_DEF, QOS_MSDU_LIFE_TIME_VO_MIN,
-                            QOS_MSDU_LIFE_TIME_VO_MAX,
-                            sizeof p->qosMngrInitParams.MsduLifeTime[QOS_AC_VO],
-                            (TI_UINT8*)&p->qosMngrInitParams.MsduLifeTime[QOS_AC_VO]);
-
-
-    regReadIntegerParameter(pAdapter, &STRQOSrxTimeOutPsPoll,
-                    QOS_RX_TIMEOUT_PS_POLL_DEF, QOS_RX_TIMEOUT_PS_POLL_MIN,
-                    QOS_RX_TIMEOUT_PS_POLL_MAX,
-                    sizeof p->twdInitParams.tGeneral.rxTimeOut.psPoll,
-                    (TI_UINT8*)&p->twdInitParams.tGeneral.rxTimeOut.psPoll);
-
-    regReadIntegerParameter(pAdapter, &STRQOSrxTimeOutUPSD,
-                    QOS_RX_TIMEOUT_UPSD_DEF, QOS_RX_TIMEOUT_UPSD_MIN,
-                    QOS_RX_TIMEOUT_UPSD_MAX,
-                    sizeof p->twdInitParams.tGeneral.rxTimeOut.UPSD,
-                    (TI_UINT8*)&p->twdInitParams.tGeneral.rxTimeOut.UPSD);
-
-    /* Note: The PsPoll wait timeout should be aligned with the UPSD setting */
-   /* p->PowerMgrInitParams.HwPsPollResponseTimeout = (TI_UINT8)p->qosMngrInitParams.rxTimeout.UPSD;*/
-
-    regReadIntegerParameter(pAdapter, &STRQOSwmePsModeBE,
-                            QOS_WME_PS_MODE_BE_DEF, QOS_WME_PS_MODE_BE_MIN,
-                            QOS_WME_PS_MODE_BE_MAX,
-                            sizeof p->qosMngrInitParams.desiredWmeAcPsMode[QOS_AC_BE],
-                            (TI_UINT8*)&p->qosMngrInitParams.desiredWmeAcPsMode[QOS_AC_BE]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSwmePsModeBK,
-                            QOS_WME_PS_MODE_BK_DEF, QOS_WME_PS_MODE_BK_MIN,
-                            QOS_WME_PS_MODE_BK_MAX,
-                            sizeof p->qosMngrInitParams.desiredWmeAcPsMode[QOS_AC_BK],
-                            (TI_UINT8*)&p->qosMngrInitParams.desiredWmeAcPsMode[QOS_AC_BK]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSwmePsModeVI,
-                        QOS_WME_PS_MODE_VI_DEF, QOS_WME_PS_MODE_VI_MIN,
-                        QOS_WME_PS_MODE_VI_MAX,
-                        sizeof p->qosMngrInitParams.desiredWmeAcPsMode[QOS_AC_VI],
-                        (TI_UINT8*)&p->qosMngrInitParams.desiredWmeAcPsMode[QOS_AC_VI]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSwmePsModeVO,
-                        QOS_WME_PS_MODE_VO_DEF, QOS_WME_PS_MODE_VO_MIN,
-                        QOS_WME_PS_MODE_VO_MAX,
-                        sizeof p->qosMngrInitParams.desiredWmeAcPsMode[QOS_AC_VO],
-                        (TI_UINT8*)&p->qosMngrInitParams.desiredWmeAcPsMode[QOS_AC_VO]);
-
-
-    /* HW Tx queues buffers allocation low threshold */
-    regReadIntegerParameter(pAdapter, &STRQOStxBlksThresholdBE,
-                            QOS_TX_BLKS_THRESHOLD_BE_DEF, QOS_TX_BLKS_THRESHOLD_MIN,
-                            QOS_TX_BLKS_THRESHOLD_MAX,
-                            sizeof p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_BE],
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_BE]);
-
-    regReadIntegerParameter(pAdapter, &STRQOStxBlksThresholdBK,
-                            QOS_TX_BLKS_THRESHOLD_BK_DEF, QOS_TX_BLKS_THRESHOLD_MIN,
-                            QOS_TX_BLKS_THRESHOLD_MAX,
-                            sizeof p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_BK],
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_BK]);
-    
-    regReadIntegerParameter(pAdapter, &STRQOStxBlksThresholdVI,
-                            QOS_TX_BLKS_THRESHOLD_VI_DEF, QOS_TX_BLKS_THRESHOLD_MIN,
-                            QOS_TX_BLKS_THRESHOLD_MAX,
-                            sizeof p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_VI],
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_VI]);
-
-    regReadIntegerParameter(pAdapter, &STRQOStxBlksThresholdVO,
-                            QOS_TX_BLKS_THRESHOLD_VO_DEF, QOS_TX_BLKS_THRESHOLD_MIN,
-                            QOS_TX_BLKS_THRESHOLD_MAX,
-                            sizeof p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_VO],
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_VO]);
-
-    /* HW Rx mem-blocks Number */
-    regReadIntegerParameter(pAdapter, &STRRxMemBlksNum,
-                            RX_MEM_BLKS_NUM_DEF, RX_MEM_BLKS_NUM_MIN, RX_MEM_BLKS_NUM_MAX,
-                            sizeof p->twdInitParams.tGeneral.uRxMemBlksNum,
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.uRxMemBlksNum);
-
-    regReadIntegerParameter(pAdapter, &STRWiFiMode,
-                            WIFI_MODE_DEF, WIFI_MODE_MIN,
-                            WIFI_MODE_MAX,
-                            sizeof uWiFiMode,
-                            (TI_UINT8*)&uWiFiMode);
-
-    regReadIntegerParameter(pAdapter, &STRPerformanceBoost,
-                            PERFORMANCE_BOOST_MODE_DEF, PERFORMANCE_BOOST_MODE_MIN, PERFORMANCE_BOOST_MODE_MAX,                         
-                            sizeof uPerformanceBoostMode,
-                            (TI_UINT8*)&uPerformanceBoostMode);
-
-    regReadIntegerParameter(pAdapter, &STRMaxAMPDU,
-                            MAX_MPDU_DEF, MAX_MPDU_MIN_VALUE, MAX_MPDU_MAX_VALUE,
-                            sizeof p->twdInitParams.tGeneral.uMaxAMPDU,
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.uMaxAMPDU);
-
-    regReadIntegerParameter(pAdapter, &STRStopNetStackTx,
-                            STOP_NET_STACK_TX_DEF, STOP_NET_STACK_TX_MIN,
-                            STOP_NET_STACK_TX_MAX,
-							sizeof p->txDataInitParams.bStopNetStackTx,
-                            (TI_UINT8*)&p->txDataInitParams.bStopNetStackTx);
-                            
-    regReadIntegerParameter(pAdapter, &STRSettings,
-    						1,0,255,
-                            sizeof p->twdInitParams.tPlatformGenParams.GeneralSettings,
-                            (TI_UINT8*)&p->twdInitParams.tPlatformGenParams.GeneralSettings);                        
-
-	regReadIntegerParameter(pAdapter, &STRTxSendPaceThresh,
-                            TX_SEND_PACE_THRESH_DEF, TX_SEND_PACE_THRESH_MIN,
-                            TX_SEND_PACE_THRESH_MAX,
-							sizeof p->txDataInitParams.uTxSendPaceThresh,
-                            (TI_UINT8*)&p->txDataInitParams.uTxSendPaceThresh);
-
-
-    /* special numbers for WiFi mode! */
-    if (uWiFiMode)
-    {
-        p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_BE] = QOS_TX_BLKS_THRESHOLD_BE_DEF_WIFI_MODE;
-        p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_BK] = QOS_TX_BLKS_THRESHOLD_BK_DEF_WIFI_MODE;
-        p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_VI] = QOS_TX_BLKS_THRESHOLD_VI_DEF_WIFI_MODE;
-        p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_VO] = QOS_TX_BLKS_THRESHOLD_VO_DEF_WIFI_MODE;
-
-        p->qosMngrInitParams.MsduLifeTime[QOS_AC_BE] = QOS_MSDU_LIFE_TIME_BE_DEF_WIFI_MODE;
-        p->qosMngrInitParams.MsduLifeTime[QOS_AC_BK] = QOS_MSDU_LIFE_TIME_BK_DEF_WIFI_MODE;
-        p->qosMngrInitParams.MsduLifeTime[QOS_AC_VI] = QOS_MSDU_LIFE_TIME_VI_DEF_WIFI_MODE;
-        p->qosMngrInitParams.MsduLifeTime[QOS_AC_VO] = QOS_MSDU_LIFE_TIME_VO_DEF_WIFI_MODE;
-
-        p->twdInitParams.tGeneral.uRxMemBlksNum         = RX_MEM_BLKS_NUM_DEF_WIFI_MODE;
-        p->twdInitParams.tGeneral.RxIntrPacingThreshold = TWD_RX_INTR_THRESHOLD_DEF_WIFI_MODE; 
-        p->txDataInitParams.bStopNetStackTx             = STOP_NET_STACK_TX_DEF_WIFI_MODE;
-        p->txDataInitParams.uTxSendPaceThresh           = TX_SEND_PACE_THRESH_DEF_WIFI_MODE;
-
-        /* remove the flags of DRPw mode when WiFi active */
-        p->twdInitParams.tPlatformGenParams.GeneralSettings &= ~DRPw_MASK_CHECK;
-    }
-
-    /* If NOT in WiFi mode and IN performance-boost mode, optimize some traffic params for speed (on expense of QoS)  */
-    else if (uPerformanceBoostMode == BOOST_MODE_OPTIMIZE_FOR_SPEED)
-    {
-        p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_BE] = QOS_TX_BLKS_THRESHOLD_BE_DEF_BOOST_MODE;
-        p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_BK] = QOS_TX_BLKS_THRESHOLD_BK_DEF_BOOST_MODE;
-        p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_VI] = QOS_TX_BLKS_THRESHOLD_VI_DEF_BOOST_MODE;
-        p->twdInitParams.tGeneral.TxBlocksThresholdPerAc[QOS_AC_VO] = QOS_TX_BLKS_THRESHOLD_VO_DEF_BOOST_MODE;
-
-        p->twdInitParams.tGeneral.uRxMemBlksNum = RX_MEM_BLKS_NUM_DEF_BOOST_MODE;
-    }
-
-    regReadIntegerParameter(pAdapter, &STRQOSShortRetryLimitBE,
-                            QOS_SHORT_RETRY_LIMIT_BE_DEF, QOS_SHORT_RETRY_LIMIT_BE_MIN,
-                            QOS_SHORT_RETRY_LIMIT_BE_MAX,
-                            sizeof p->qosMngrInitParams.ShortRetryLimit[QOS_AC_BE],
-                            (TI_UINT8*)&p->qosMngrInitParams.ShortRetryLimit[QOS_AC_BE]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSShortRetryLimitBK,
-                            QOS_SHORT_RETRY_LIMIT_BK_DEF, QOS_SHORT_RETRY_LIMIT_BK_MIN,
-                            QOS_SHORT_RETRY_LIMIT_BK_MAX,
-                            sizeof p->qosMngrInitParams.ShortRetryLimit[QOS_AC_BK],
-                            (TI_UINT8*)&p->qosMngrInitParams.ShortRetryLimit[QOS_AC_BK]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSShortRetryLimitVI,
-                            QOS_SHORT_RETRY_LIMIT_VI_DEF, QOS_SHORT_RETRY_LIMIT_VI_MIN,
-                            QOS_SHORT_RETRY_LIMIT_VI_MAX,
-                            sizeof p->qosMngrInitParams.ShortRetryLimit[QOS_AC_VI],
-                            (TI_UINT8*)&p->qosMngrInitParams.ShortRetryLimit[QOS_AC_VI]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSShortRetryLimitVO,
-                            QOS_SHORT_RETRY_LIMIT_VO_DEF, QOS_SHORT_RETRY_LIMIT_VO_MIN,
-                            QOS_SHORT_RETRY_LIMIT_VO_MAX,
-                            sizeof p->qosMngrInitParams.ShortRetryLimit[QOS_AC_VO],
-                            (TI_UINT8*)&p->qosMngrInitParams.ShortRetryLimit[QOS_AC_VO]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSLongRetryLimitBE,
-                            QOS_LONG_RETRY_LIMIT_BE_DEF, QOS_LONG_RETRY_LIMIT_BE_MIN,
-                            QOS_LONG_RETRY_LIMIT_BE_MAX,
-                            sizeof p->qosMngrInitParams.LongRetryLimit[QOS_AC_BE],
-                            (TI_UINT8*)&p->qosMngrInitParams.LongRetryLimit[QOS_AC_BE]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSLongRetryLimitBK,
-                            QOS_LONG_RETRY_LIMIT_BK_DEF, QOS_LONG_RETRY_LIMIT_BK_MIN,
-                            QOS_LONG_RETRY_LIMIT_BK_MAX,
-                            sizeof p->qosMngrInitParams.LongRetryLimit[QOS_AC_BK],
-                            (TI_UINT8*)&p->qosMngrInitParams.LongRetryLimit[QOS_AC_BK]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSLongRetryLimitVI,
-                            QOS_LONG_RETRY_LIMIT_VI_DEF, QOS_LONG_RETRY_LIMIT_VI_MIN,
-                            QOS_LONG_RETRY_LIMIT_VI_MAX,
-                            sizeof p->qosMngrInitParams.LongRetryLimit[QOS_AC_VI],
-                            (TI_UINT8*)&p->qosMngrInitParams.LongRetryLimit[QOS_AC_VI]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSLongRetryLimitVO,
-                            QOS_LONG_RETRY_LIMIT_VO_DEF, QOS_LONG_RETRY_LIMIT_VO_MIN,
-                            QOS_LONG_RETRY_LIMIT_VO_MAX,
-                            sizeof p->qosMngrInitParams.LongRetryLimit[QOS_AC_VO],
-                            (TI_UINT8*)&p->qosMngrInitParams.LongRetryLimit[QOS_AC_VO]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSAckPolicyBE,
-                            QOS_ACK_POLICY_BE_DEF, QOS_ACK_POLICY_BE_MIN,
-                            QOS_ACK_POLICY_BE_MAX,
-                            sizeof p->qosMngrInitParams.acAckPolicy[QOS_AC_BE],
-                            (TI_UINT8*)&p->qosMngrInitParams.acAckPolicy[QOS_AC_BE]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSAckPolicyBK,
-                            QOS_ACK_POLICY_BK_DEF, QOS_ACK_POLICY_BK_MIN,
-                            QOS_ACK_POLICY_BK_MAX,
-                            sizeof p->qosMngrInitParams.acAckPolicy[QOS_AC_BK],
-                            (TI_UINT8*)&p->qosMngrInitParams.acAckPolicy[QOS_AC_BK]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSAckPolicyVI,
-                            QOS_ACK_POLICY_VI_DEF, QOS_ACK_POLICY_VI_MIN,
-                            QOS_ACK_POLICY_VI_MAX,
-                            sizeof p->qosMngrInitParams.acAckPolicy[QOS_AC_VI],
-                            (TI_UINT8*)&p->qosMngrInitParams.acAckPolicy[QOS_AC_VI]);
-
-    regReadIntegerParameter(pAdapter, &STRQOSAckPolicyVO,
-                            QOS_ACK_POLICY_VO_DEF, QOS_ACK_POLICY_VO_MIN,
-                            QOS_ACK_POLICY_VO_MAX,
-                            sizeof p->qosMngrInitParams.acAckPolicy[QOS_AC_VO],
-                            (TI_UINT8*)&p->qosMngrInitParams.acAckPolicy[QOS_AC_VO]);
-
-
-    regReadIntegerParameter(pAdapter, &STRQoSqueue0OverFlowPolicy,
-                    QOS_QUEUE_0_OVFLOW_POLICY_DEF, QOS_QUEUE_0_OVFLOW_POLICY_MIN,
-                    QOS_QUEUE_0_OVFLOW_POLICY_MAX,
-                    sizeof p->qosMngrInitParams.QueueOvFlowPolicy[0],
-                    (TI_UINT8*)&p->qosMngrInitParams.QueueOvFlowPolicy[0]);
-    
-    regReadIntegerParameter(pAdapter, &STRQoSqueue1OverFlowPolicy,
-                    QOS_QUEUE_1_OVFLOW_POLICY_DEF, QOS_QUEUE_1_OVFLOW_POLICY_MIN,
-                    QOS_QUEUE_1_OVFLOW_POLICY_MAX,
-                    sizeof p->qosMngrInitParams.QueueOvFlowPolicy[1],
-                    (TI_UINT8*)&p->qosMngrInitParams.QueueOvFlowPolicy[1]);
-
-    regReadIntegerParameter(pAdapter, &STRQoSqueue2OverFlowPolicy,
-                    QOS_QUEUE_2_OVFLOW_POLICY_DEF, QOS_QUEUE_2_OVFLOW_POLICY_MIN,
-                    QOS_QUEUE_2_OVFLOW_POLICY_MAX,
-                    sizeof p->qosMngrInitParams.QueueOvFlowPolicy[2],
-                    (TI_UINT8*)&p->qosMngrInitParams.QueueOvFlowPolicy[2]);
-
-    regReadIntegerParameter(pAdapter, &STRQoSqueue3OverFlowPolicy,
-                    QOS_QUEUE_3_OVFLOW_POLICY_DEF, QOS_QUEUE_3_OVFLOW_POLICY_MIN,
-                    QOS_QUEUE_3_OVFLOW_POLICY_MAX,
-                    sizeof p->qosMngrInitParams.QueueOvFlowPolicy[3],
-                    (TI_UINT8*)&p->qosMngrInitParams.QueueOvFlowPolicy[3]);
-
-    /* Packet Burst parameters    */
-
-    regReadIntegerParameter(pAdapter, &STRQOSPacketBurstEnable,
-                            QOS_PACKET_BURST_ENABLE_DEF, QOS_PACKET_BURST_ENABLE_MIN, 
-                            QOS_PACKET_BURST_ENABLE_MAX,                         
-                            sizeof p->qosMngrInitParams.PacketBurstEnable,
-                            (TI_UINT8*)&p->qosMngrInitParams.PacketBurstEnable); 
-
-    regReadIntegerParameter(pAdapter, &STRQOSPacketBurstTxOpLimit,
-                            QOS_PACKET_BURST_TXOP_LIMIT_DEF, QOS_PACKET_BURST_TXOP_LIMIT_MIN, 
-                            QOS_PACKET_BURST_TXOP_LIMIT_MAX,                         
-                            sizeof p->qosMngrInitParams.PacketBurstTxOpLimit,
-                            (TI_UINT8*)&p->qosMngrInitParams.PacketBurstTxOpLimit); 
-
-
-    /*---------------------------
-        Measurement parameters
-    -----------------------------*/
-
-    regReadIntegerParameter(pAdapter, &STRMeasurTrafficThreshold,
-                            MEASUREMENT_TRAFFIC_THRSHLD_DEF, MEASUREMENT_TRAFFIC_THRSHLD_MIN, MEASUREMENT_TRAFFIC_THRSHLD_MAX,
-                            sizeof p->measurementInitParams.trafficIntensityThreshold,
-                            (TI_UINT8*)&p->measurementInitParams.trafficIntensityThreshold);   
-
-    regReadIntegerParameter(pAdapter, &STRMeasurMaxDurationOnNonServingChannel,
-                            MEASUREMENT_MAX_DUR_NON_SRV_CHANNEL_DEF, MEASUREMENT_MAX_DUR_NON_SRV_CHANNEL_MIN, MEASUREMENT_MAX_DUR_NON_SRV_CHANNEL_MAX,
-                            sizeof p->measurementInitParams.maxDurationOnNonServingChannel,
-                            (TI_UINT8*)&p->measurementInitParams.maxDurationOnNonServingChannel);  
-
-
-    /*---------------------------
-          XCC Manager parameters
-    -----------------------------*/
-#ifdef XCC_MODULE_INCLUDED
-
-    regReadIntegerParameter(pAdapter, &STRXCCModeEnabled,
-                            XCC_MNGR_ENABLE_DEF, XCC_MNGR_ENABLE_MIN, XCC_MNGR_ENABLE_MAX,
-                            sizeof p->XCCMngrParams.XCCEnabled,
-                            (TI_UINT8*)&p->XCCMngrParams.XCCEnabled);
-
-
-    p->measurementInitParams.XCCEnabled = p->XCCMngrParams.XCCEnabled;  
-
-#endif
-
-    regReadIntegerParameter(pAdapter, &STRXCCTestIgnoreDeAuth0,
-                            XCC_TEST_IGNORE_DEAUTH_0_DEF, XCC_TEST_IGNORE_DEAUTH_0_MIN, XCC_TEST_IGNORE_DEAUTH_0_MAX,
-                            sizeof p->apConnParams.ignoreDeauthReason0,
-                            (TI_UINT8*)&p->apConnParams.ignoreDeauthReason0);
-    
-    /*---------------------------
-      EEPROM less support
-    -----------------------------*/
-    regReadIntegerParameter(pAdapter, &STREEPROMlessModeSupported,
-                            TWD_EEPROMLESS_ENABLE_DEF, TWD_EEPROMLESS_ENABLE_MIN,
-                            TWD_EEPROMLESS_ENABLE_MAX,
-                            sizeof p->twdInitParams.tGeneral.halCtrlEepromLessEnable,
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.halCtrlEepromLessEnable);
-
-    regReadStringParameter(pAdapter, &STRstationMacAddress,
-                            (TI_INT8*)(defStaMacAddress0), 11,
-                            (TI_UINT8*)staMACAddress, &regMACstrLen);
-    
-    /*reads the arp ip from table*/
-    regReadStringParameter(pAdapter ,&STRArp_Ip_Addr,
-                            (TI_INT8*)(defArpIpAddress),REG_ARP_IP_ADDR_STR_LEN,
-                            (TI_UINT8*)staArpIpAddress,&regArpIpStrLen ) ;
-
-    regReadIntegerParameter(pAdapter, &STRArp_Ip_Filter_Ena,
-                            DEF_FILTER_ENABLE_VALUE, MIN_FILTER_ENABLE_VALUE, MAX_FILTER_ENABLE_VALUE,
-                            sizeof p->twdInitParams.tArpIpFilter.filterType,
-                            (TI_UINT8*)&p->twdInitParams.tArpIpFilter.filterType);
-
-
-    initValusFromRgstryString( (TI_INT8*)(staArpIpAddress), (TI_INT8*)&p->twdInitParams.tArpIpFilter.addr, 4);
-
-    
-    initValusFromRgstryString( (TI_INT8*)(staMACAddress),
-                                    (TI_INT8*)&(p->twdInitParams.tGeneral.StaMacAddress[0]),
-                                    6);
-/*fource FragThreshold to be even value (round it down)MR WLAN00003501*/
-    p->twdInitParams.tGeneral.halCtrlFragThreshold &= 0xFFFE;
-
-
-
-
-
-/*----------------------------------
-    Health Monitor registry init
-------------------------------------*/
-
-    /* No scan complete recovery enabled */
-    regReadIntegerParameter(pAdapter, &STRRecoveryEnabledNoScanComplete,
-                            1, 0, 1,   /* default is enabled */
-                            sizeof (p->healthMonitorInitParams.recoveryTriggerEnabled[ NO_SCAN_COMPLETE_FAILURE ]),
-                            (TI_UINT8*)&(p->healthMonitorInitParams.recoveryTriggerEnabled[ NO_SCAN_COMPLETE_FAILURE ]) );
-    
-    /* Mailbox failure recovery enabled */
-    regReadIntegerParameter(pAdapter, &STRRecoveryEnabledMboxFailure,
-                            1, 0, 1,   /* default is enabled */
-                            sizeof (p->healthMonitorInitParams.recoveryTriggerEnabled[ MBOX_FAILURE ]),
-                            (TI_UINT8*)&(p->healthMonitorInitParams.recoveryTriggerEnabled[ MBOX_FAILURE ]) );
-
-    /* HW awake failure recovery enabled */
-    regReadIntegerParameter(pAdapter, &STRRecoveryEnabledHwAwakeFailure,
-                            1, 0, 1,   /* default is enabled */
-                            sizeof (p->healthMonitorInitParams.recoveryTriggerEnabled[ HW_AWAKE_FAILURE ]),
-                            (TI_UINT8*)&(p->healthMonitorInitParams.recoveryTriggerEnabled[ HW_AWAKE_FAILURE ]) );
-    
-    /* TX stuck recovery enabled */
-    regReadIntegerParameter(pAdapter, &STRRecoveryEnabledTxStuck,
-                            1, 0, 1,   /* default is enabled */
-                            sizeof (p->healthMonitorInitParams.recoveryTriggerEnabled[ TX_STUCK ]),
-                            (TI_UINT8*)&(p->healthMonitorInitParams.recoveryTriggerEnabled[ TX_STUCK ]) );
-    
-    /* disconnect timeout recovery enabled */
-    regReadIntegerParameter(pAdapter, &STRRecoveryEnabledDisconnectTimeout,
-                            0, 0, 1,   /* default is disabled */
-                            sizeof (p->healthMonitorInitParams.recoveryTriggerEnabled[ DISCONNECT_TIMEOUT ]),
-                            (TI_UINT8*)&(p->healthMonitorInitParams.recoveryTriggerEnabled[ DISCONNECT_TIMEOUT ]) );
-    
-    /* Power save failure recovery enabled */
-    regReadIntegerParameter(pAdapter, &STRRecoveryEnabledPowerSaveFailure,
-                            1, 0, 1,   /* default is enabled */
-                            sizeof (p->healthMonitorInitParams.recoveryTriggerEnabled[ POWER_SAVE_FAILURE ]),
-                            (TI_UINT8*)&(p->healthMonitorInitParams.recoveryTriggerEnabled[ POWER_SAVE_FAILURE ]) );
-    
-    /* Measurement failure recovery enabled */
-    regReadIntegerParameter(pAdapter, &STRRecoveryEnabledMeasurementFailure,
-                            1, 0, 1,   /* default is enabled */
-                            sizeof (p->healthMonitorInitParams.recoveryTriggerEnabled[ MEASUREMENT_FAILURE ]),
-                            (TI_UINT8*)&(p->healthMonitorInitParams.recoveryTriggerEnabled[ MEASUREMENT_FAILURE ]) );
-
-    /* Bus failure recovery enabled */
-    regReadIntegerParameter(pAdapter, &STRRecoveryEnabledBusFailure,
-                            1, 0, 1,   /* default is enabled */
-                            sizeof (p->healthMonitorInitParams.recoveryTriggerEnabled[ BUS_FAILURE ]),
-                            (TI_UINT8*)&(p->healthMonitorInitParams.recoveryTriggerEnabled[ BUS_FAILURE ]) );
-
-    /* HW Watchdog Expired recovery enabled */
-    regReadIntegerParameter(pAdapter, &STRRecoveryEnabledHwWdExpire,
-                            1, 0, 1,   /* default is enabled */
-                            sizeof (p->healthMonitorInitParams.recoveryTriggerEnabled[ HW_WD_EXPIRE ]),
-                            (TI_UINT8*)&(p->healthMonitorInitParams.recoveryTriggerEnabled[ HW_WD_EXPIRE ]) );
-    
-    /* Rx Xfer Failure recovery enabled */
-    regReadIntegerParameter(pAdapter, &STRRecoveryEnabledRxXferFailure,
-                            1, 0, 1,   /* default is enabled */
-                            sizeof (p->healthMonitorInitParams.recoveryTriggerEnabled[ RX_XFER_FAILURE ]),
-                            (TI_UINT8*)&(p->healthMonitorInitParams.recoveryTriggerEnabled[ RX_XFER_FAILURE ]) );
-
-/*-------------------------------------------
-   RSSI/SNR Weights for Average calculations   
---------------------------------------------*/
-    regReadIntegerParameter(pAdapter, &STRRssiBeaconAverageWeight,
-                            TWD_RSSI_BEACON_WEIGHT_DEF, TWD_RSSI_BEACON_WEIGHT_MIN,
-                            TWD_RSSI_BEACON_WEIGHT_MAX,
-                            sizeof p->twdInitParams.tGeneral.uRssiBeaconAverageWeight, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.uRssiBeaconAverageWeight);
-
-    regReadIntegerParameter(pAdapter, &STRRssiPacketAverageWeight,
-                            TWD_RSSI_PACKET_WEIGHT_DEF, TWD_RSSI_PACKET_WEIGHT_MIN,
-                            TWD_RSSI_PACKET_WEIGHT_MAX,
-                            sizeof p->twdInitParams.tGeneral.uRssiPacketAverageWeight, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.uRssiPacketAverageWeight);
-
-    regReadIntegerParameter(pAdapter, &STRSnrBeaconAverageWeight,
-                            TWD_SNR_BEACON_WEIGHT_DEF, TWD_SNR_BEACON_WEIGHT_MIN,
-                            TWD_SNR_BEACON_WEIGHT_MAX,
-                            sizeof p->twdInitParams.tGeneral.uSnrBeaconAverageWeight, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.uSnrBeaconAverageWeight);
-
-    regReadIntegerParameter(pAdapter, &STRSnrPacketAverageWeight,
-                            TWD_SNR_PACKET_WEIGHT_DEF, TWD_SNR_PACKET_WEIGHT_MIN,
-                            TWD_SNR_PACKET_WEIGHT_MAX,
-                            sizeof p->twdInitParams.tGeneral.uSnrPacketAverageWeight, 
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.uSnrPacketAverageWeight);
-
-/*----------------------------------
- Scan Concentrator
-------------------------------------*/
-    regReadIntegerParameter (pAdapter, &STRMinimumDurationBetweenOsScans,
-                             SCAN_CNCN_MIN_DURATION_FOR_OS_SCANS_DEF, SCAN_CNCN_MIN_DURATION_FOR_OS_SCANS_MIN, SCAN_CNCN_MIN_DURATION_FOR_OS_SCANS_MAX,
-                             sizeof p->tScanCncnInitParams.uMinimumDurationBetweenOsScans,
-                             (TI_UINT8*)&p->tScanCncnInitParams.uMinimumDurationBetweenOsScans);
-
-    regReadIntegerParameter (pAdapter, &STRDfsPassiveDwellTimeMs,
-                             SCAN_CNCN_DFS_PASSIVE_DWELL_TIME_DEF, SCAN_CNCN_DFS_PASSIVE_DWELL_TIME_MIN, SCAN_CNCN_DFS_PASSIVE_DWELL_TIME_MAX,
-                             sizeof p->tScanCncnInitParams.uDfsPassiveDwellTimeMs,
-                             (TI_UINT8*)&p->tScanCncnInitParams.uDfsPassiveDwellTimeMs);
-
-    regReadIntegerParameter (pAdapter, &STRScanPushMode,
-                             SCAN_CNCN_APP_PUSH_MODE_DEF, SCAN_CNCN_APP_PUSH_MODE_MIN, SCAN_CNCN_APP_PUSH_MODE_MAX,
-                             sizeof p->tScanCncnInitParams.bPushMode,
-                             (TI_UINT8*)&p->tScanCncnInitParams.bPushMode);
-
-    regReadIntegerParameter(pAdapter, &STRScanResultAging,
-                            SCAN_CNCN_APP_SRA_DEF, SCAN_CNCN_APP_SRA_MIN, SCAN_CNCN_APP_SRA_MAX,
-                            sizeof p->tScanCncnInitParams.uSraThreshold,
-                            (TI_UINT8*)&p->tScanCncnInitParams.uSraThreshold);
-
-
-    regReadIntegerParameter(pAdapter, &STRScanCncnRssiThreshold,
-                            SCAN_CNCN_RSSI_DEF, SCAN_CNCN_RSSI_MIN, SCAN_CNCN_RSSI_MAX,
-                            sizeof p->tScanCncnInitParams.nRssiThreshold,
-                            (TI_UINT8*)&p->tScanCncnInitParams.nRssiThreshold);
-
-/*----------------------------------
- WSC 
-------------------------------------*/
-    regReadIntegerParameter( pAdapter, &STRParseWSCInBeacons,
-                             WSC_PARSE_IN_BEACON_DEF, WSC_PARSE_IN_BEACON_MIN, WSC_PARSE_IN_BEACON_MAX,
-                             sizeof p->tMlmeInitParams.parseWSCInBeacons,
-                             (TI_UINT8*)&p->tMlmeInitParams.parseWSCInBeacons );
-
-/*----------------------------------
- Current BSS
-------------------------------------*/
-    regReadIntegerParameter( pAdapter, &STRNullDataKeepAliveDefaultPeriod,
-                             NULL_KL_PERIOD_DEF, NULL_KL_PERIOD_MIN, NULL_KL_PERIOD_MAX,
-                             sizeof p->tCurrBssInitParams.uNullDataKeepAlivePeriod,
-                             (TI_UINT8*)&p->tCurrBssInitParams.uNullDataKeepAlivePeriod );
-
-/*----------------------------------
- Context Engine
-------------------------------------*/
-    regReadIntegerParameter( pAdapter, &STRContextSwitchRequired,
-                             CONTEXT_SWITCH_REQUIRED_DEF, CONTEXT_SWITCH_REQUIRED_MIN, CONTEXT_SWITCH_REQUIRED_MAX,
-                             sizeof p->tContextInitParams.bContextSwitchRequired,
-                             (TI_UINT8*)&p->tContextInitParams.bContextSwitchRequired );
-
-    /*
-     *  set 802.11n init parameters
-    */
-    regReadIntegerParameter(pAdapter, &STR11nEnable,
-                            HT_11N_ENABLED_DEF, HT_11N_ENABLED_MIN,
-                            HT_11N_ENABLED_MAX,
-                            sizeof p->twdInitParams.tGeneral.b11nEnable,
-                            (TI_UINT8*)&p->twdInitParams.tGeneral.b11nEnable);
-
-    regReadIntegerParameter(pAdapter, &STRBaPolicyTid_0,
-                            HT_BA_POLICY_DEF, HT_BA_POLICY_MIN,
-                            HT_BA_POLICY_MAX,
-                            sizeof p->qosMngrInitParams.aBaPolicy[0],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaPolicy[0]);
-
-    regReadIntegerParameter(pAdapter, &STRBaPolicyTid_1,
-                            HT_BA_POLICY_DEF, HT_BA_POLICY_MIN,
-                            HT_BA_POLICY_MAX,
-                            sizeof p->qosMngrInitParams.aBaPolicy[1],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaPolicy[1]);
-
-    regReadIntegerParameter(pAdapter, &STRBaPolicyTid_2,
-                            HT_BA_POLICY_DEF, HT_BA_POLICY_MIN,
-                            HT_BA_POLICY_MAX,
-                            sizeof p->qosMngrInitParams.aBaPolicy[2],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaPolicy[2]);
-
-    regReadIntegerParameter(pAdapter, &STRBaPolicyTid_3,
-                            HT_BA_POLICY_DEF, HT_BA_POLICY_MIN,
-                            HT_BA_POLICY_MAX,
-                            sizeof p->qosMngrInitParams.aBaPolicy[3],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaPolicy[3]);
-
-    regReadIntegerParameter(pAdapter, &STRBaPolicyTid_4,
-                            HT_BA_POLICY_DEF, HT_BA_POLICY_MIN,
-                            HT_BA_POLICY_MAX,
-                            sizeof p->qosMngrInitParams.aBaPolicy[4],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaPolicy[4]);
-
-    regReadIntegerParameter(pAdapter, &STRBaPolicyTid_5,
-                            HT_BA_POLICY_DEF, HT_BA_POLICY_MIN,
-                            HT_BA_POLICY_MAX,
-                            sizeof p->qosMngrInitParams.aBaPolicy[5],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaPolicy[5]);
-
-    regReadIntegerParameter(pAdapter, &STRBaPolicyTid_6,
-                            HT_BA_POLICY_DEF, HT_BA_POLICY_MIN,
-                            HT_BA_POLICY_MAX,
-                            sizeof p->qosMngrInitParams.aBaPolicy[6],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaPolicy[6]);
-
-    regReadIntegerParameter(pAdapter, &STRBaPolicyTid_7,
-                            HT_BA_POLICY_DEF, HT_BA_POLICY_MIN,
-                            HT_BA_POLICY_MAX,
-                            sizeof p->qosMngrInitParams.aBaPolicy[7],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaPolicy[7]);
-
-    regReadIntegerParameter(pAdapter, &STRBaInactivityTimeoutTid_0,
-                            HT_BA_INACTIVITY_TIMEOUT_DEF, HT_BA_INACTIVITY_TIMEOUT_MIN,
-                            HT_BA_INACTIVITY_TIMEOUT_MAX,
-                            sizeof p->qosMngrInitParams.aBaInactivityTimeout[0],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaInactivityTimeout[0]);
-
-    regReadIntegerParameter(pAdapter, &STRBaInactivityTimeoutTid_1,
-                            HT_BA_INACTIVITY_TIMEOUT_DEF, HT_BA_INACTIVITY_TIMEOUT_MIN,
-                            HT_BA_INACTIVITY_TIMEOUT_MAX,
-                            sizeof p->qosMngrInitParams.aBaInactivityTimeout[1],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaInactivityTimeout[1]);
-
-    regReadIntegerParameter(pAdapter, &STRBaInactivityTimeoutTid_2,
-                            HT_BA_INACTIVITY_TIMEOUT_DEF, HT_BA_INACTIVITY_TIMEOUT_MIN,
-                            HT_BA_INACTIVITY_TIMEOUT_MAX,
-                            sizeof p->qosMngrInitParams.aBaInactivityTimeout[2],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaInactivityTimeout[2]);
-
-    regReadIntegerParameter(pAdapter, &STRBaInactivityTimeoutTid_3,
-                            HT_BA_INACTIVITY_TIMEOUT_DEF, HT_BA_INACTIVITY_TIMEOUT_MIN,
-                            HT_BA_INACTIVITY_TIMEOUT_MAX,
-                            sizeof p->qosMngrInitParams.aBaInactivityTimeout[3],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaInactivityTimeout[3]);
-
-    regReadIntegerParameter(pAdapter, &STRBaInactivityTimeoutTid_4,
-                            HT_BA_INACTIVITY_TIMEOUT_DEF, HT_BA_INACTIVITY_TIMEOUT_MIN,
-                            HT_BA_INACTIVITY_TIMEOUT_MAX,
-                            sizeof p->qosMngrInitParams.aBaInactivityTimeout[4],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaInactivityTimeout[4]);
-
-    regReadIntegerParameter(pAdapter, &STRBaInactivityTimeoutTid_5,
-                            HT_BA_INACTIVITY_TIMEOUT_DEF, HT_BA_INACTIVITY_TIMEOUT_MIN,
-                            HT_BA_INACTIVITY_TIMEOUT_MAX,
-                            sizeof p->qosMngrInitParams.aBaInactivityTimeout[5],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaInactivityTimeout[5]);
-
-    regReadIntegerParameter(pAdapter, &STRBaInactivityTimeoutTid_6,
-                            HT_BA_INACTIVITY_TIMEOUT_DEF, HT_BA_INACTIVITY_TIMEOUT_MIN,
-                            HT_BA_INACTIVITY_TIMEOUT_MAX,
-                            sizeof p->qosMngrInitParams.aBaInactivityTimeout[6],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaInactivityTimeout[6]);
-
-    regReadIntegerParameter(pAdapter, &STRBaInactivityTimeoutTid_7,
-                            HT_BA_INACTIVITY_TIMEOUT_DEF, HT_BA_INACTIVITY_TIMEOUT_MIN,
-                            HT_BA_INACTIVITY_TIMEOUT_MAX,
-                            sizeof p->qosMngrInitParams.aBaInactivityTimeout[7],
-                            (TI_UINT8*)&p->qosMngrInitParams.aBaInactivityTimeout[7]);
-
-/*----------------------------------
- Radio module parameters
-------------------------------------*/
-regReadIntegerParameter(pAdapter, &STRTxBiPReferencePower_2_4G,
-                        128, 0, 255,
-                        sizeof (TI_INT8),
-                        (TI_UINT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxBiPReferencePower_2_4G);
-
-regReadIntegerTable (pAdapter, &STRTxBiPReferencePower_5G, RADIO_TX_BIP_REF_POWER_DEF_TABLE_5G,
-                     NUMBER_OF_SUB_BANDS_IN_5G_BAND_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxBiPReferencePower_5G, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8), TI_TRUE);
-
-regReadIntegerParameter(pAdapter, &STRTxBiPOffsetdB_2_4G,
-                        0,0,255,
-                        sizeof (TI_UINT8),
-                        (TI_UINT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxBiPOffsetdB_2_4G);
-
-regReadIntegerTable (pAdapter, &STRTxBiPOffsetdB_5G, RADIO_TX_BIP_OFF_BD_5G,
-                     NUMBER_OF_SUB_BANDS_IN_5G_BAND_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxBiPOffsetdB_5G, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8), TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTxPerRatePowerLimits_2_4G_Normal, RADIO_TX_PER_POWER_LIMITS_2_4_NORMAL_DEF_TABLE,
-                     NUMBER_OF_RATE_GROUPS_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPerRatePowerLimits_2_4G_Normal, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTxPerRatePowerLimits_2_4G_Degraded, RADIO_TX_PER_POWER_LIMITS_2_4_DEGRADED_DEF_TABLE,
-                     NUMBER_OF_RATE_GROUPS_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPerRatePowerLimits_2_4G_Degraded, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTxPerRatePowerLimits_5G_Normal, RADIO_TX_PER_POWER_LIMITS_5_NORMAL_DEF_TABLE,
-                     NUMBER_OF_RATE_GROUPS_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPerRatePowerLimits_5G_Normal, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTxPerRatePowerLimits_5G_Degraded, RADIO_TX_PER_POWER_LIMITS_5_DEGRADED_DEF_TABLE,
-                     NUMBER_OF_RATE_GROUPS_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPerRatePowerLimits_5G_Degraded, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTxPerChannelPowerLimits_2_4G_11b, RADIO_TX_PER_POWER_LIMITS_2_4_11B_DEF_TABLE,
-                     NUMBER_OF_2_4_G_CHANNELS, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPerChannelPowerLimits_2_4G_11b, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTxPerChannelPowerLimits_2_4G_OFDM, RADIO_TX_PER_POWER_LIMITS_2_4_OFDM_DEF_TABLE,
-                     NUMBER_OF_2_4_G_CHANNELS, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPerChannelPowerLimits_2_4G_OFDM, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTxPerChannelPowerLimits_5G_OFDM, RADIO_TX_PER_POWER_LIMITS_5_OFDM_DEF_TABLE,
-                     NUMBER_OF_5G_CHANNELS, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPerChannelPowerLimits_5G_OFDM, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRRxRssiAndProcessCompensation_2_4G, RADIO_RX_RSSI_PROCESS_2_4_DEF_TABLE,
-                     RSSI_AND_PROCESS_COMPENSATION_TABLE_SIZE, NULL, (TI_INT8*)p->twdInitParams.tIniFileRadioParams.tStatRadioParams.RxRssiAndProcessCompensation_2_4G,
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRRxRssiAndProcessCompensation_5G, RADIO_RX_RSSI_PROCESS_5_DEF_TABLE,
-                     RSSI_AND_PROCESS_COMPENSATION_TABLE_SIZE, NULL, (TI_INT8*)p->twdInitParams.tIniFileRadioParams.tStatRadioParams.RxRssiAndProcessCompensation_5G, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTxPDVsRateOffsets_2_4G, RADIO_TX_PD_VS_RATE_OFFSET_2_4_DEF_TABLE,
-                     NUMBER_OF_RATE_GROUPS_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPDVsRateOffsets_2_4G, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTxPDVsRateOffsets_5G, RADIO_TX_PD_VS_RATE_OFFSET_5_DEF_TABLE,
-                     NUMBER_OF_RATE_GROUPS_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPDVsRateOffsets_5G, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTxIbiasTable_2_4G, RADIO_TX_BIAS_2_4_DEF_TABLE,
-                     NUMBER_OF_RATE_GROUPS_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxIbiasTable_2_4G, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTxIbiasTable_5G, RADIO_TX_BIAS_5_DEF_TABLE,
-                     NUMBER_OF_RATE_GROUPS_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxIbiasTable_5G, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerParameter(pAdapter, &STRTXBiPReferencePDvoltage_2_4G,
-                        RADIO_RX_FEM_INSERT_LOSS_2_4_DEF, RADIO_RX_FEM_INSERT_LOSS_2_4_MIN,
-                        RADIO_RX_FEM_INSERT_LOSS_2_4_MAX,
-                        sizeof (TI_UINT16),
-                        (TI_UINT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TXBiPReferencePDvoltage_2_4G);
-
-regReadIntegerTable (pAdapter, &STRTXBiPReferencePDvoltage_5G, RADIO_TX_BIP_REF_VOLTAGE_DEF_TABLE_5G,
-                     NUMBER_OF_SUB_BANDS_IN_5G_BAND_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TXBiPReferencePDvoltage_5G, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT16), TI_TRUE);
-
-
-regReadIntegerParameter(pAdapter, &STRRxFemInsertionLoss_2_4G,
-                        14, 0, 255,
-                        sizeof (TI_UINT8),
-                        (TI_UINT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.RxFemInsertionLoss_2_4G);
-
-regReadIntegerTable (pAdapter, &STRRxFemInsertionLoss_5G, RADIO_RX_FEM_INSERT_LOSS_5_DEF_TABLE,
-                     NUMBER_OF_SUB_BANDS_IN_5G_BAND_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.RxFemInsertionLoss_5G,
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8), TI_TRUE);
-
-regReadIntegerParameter(pAdapter, &STRRxTraceInsertionLoss_2_4G,
-                        RADIO_RX_TRACE_INSERT_LOSS_2_4_DEF, RADIO_RX_TRACE_INSERT_LOSS_2_4_MIN,
-                        RADIO_RX_TRACE_INSERT_LOSS_2_4_MAX,
-                        sizeof (TI_UINT8), (TI_UINT8*)&p->twdInitParams.tIniFileRadioParams.tStatRadioParams.RxTraceInsertionLoss_2_4G);
-
-regReadIntegerParameter(pAdapter, &STRTXTraceLoss_2_4G,
-                        RADIO_RX_TRACE_INSERT_LOSS_2_4_DEF, RADIO_RX_TRACE_INSERT_LOSS_2_4_MIN,
-                        RADIO_RX_TRACE_INSERT_LOSS_2_4_MAX,
-                        sizeof (TI_UINT8), (TI_UINT8*)&p->twdInitParams.tIniFileRadioParams.tStatRadioParams.TXTraceLoss_2_4G);
-
-regReadIntegerTable (pAdapter, &STRRxTraceInsertionLoss_5G, RADIO_RX_TRACE_INSERT_LOSS_5_DEF_TABLE,
-                     NUMBER_OF_SUB_BANDS_IN_5G_BAND_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tStatRadioParams.RxTraceInsertionLoss_5G, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8), TI_TRUE);
-
-regReadIntegerTable (pAdapter, &STRTXTraceLoss_5G, RADIO_TX_TRACE_LOSS_5_DEF_TABLE,
-                     NUMBER_OF_SUB_BANDS_IN_5G_BAND_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tStatRadioParams.TXTraceLoss_5G, 
-                     (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE);
-
-regReadIntegerParameter(pAdapter, &STRFRefClock,
-						RADIO_FREF_CLOCK_DEF, RADIO_FREF_CLOCK_MIN,
-                        RADIO_FREF_CLOCK_MAX,
-                        sizeof p->twdInitParams.tPlatformGenParams.RefClk,
-                        (TI_UINT8*)&p->twdInitParams.tPlatformGenParams.RefClk);
-
-regReadIntegerParameter(pAdapter, &STRFRefClockSettingTime,
-						RADIO_FREF_CLOCK_SETTING_TIME_DEF, RADIO_FREF_CLOCK_SETTING_TIME_MIN,
-                        RADIO_FREF_CLOCK_SETTING_TIME_MAX,
-                        sizeof p->twdInitParams.tPlatformGenParams.SettlingTime,
-                       (TI_UINT8*)&p->twdInitParams.tPlatformGenParams.SettlingTime);
-
-regReadIntegerParameter(pAdapter, &STRTXBiPFEMAutoDetect,
-						0,0,1,                             
-                        sizeof p->twdInitParams.tPlatformGenParams.TXBiPFEMAutoDetect,
-                        (TI_UINT8*)&p->twdInitParams.tPlatformGenParams.TXBiPFEMAutoDetect);
-
-regReadIntegerParameter(pAdapter, &STRTXBiPFEMManufacturer,
-						1,0,1,
-                        sizeof p->twdInitParams.tPlatformGenParams.TXBiPFEMManufacturer,
-                        (TI_UINT8*)&p->twdInitParams.tPlatformGenParams.TXBiPFEMManufacturer);
-
-regReadIntegerParameter(pAdapter, &STRClockValidOnWakeup,
-						0,0,1,
-                        sizeof p->twdInitParams.tPlatformGenParams.ClockValidOnWakeup,
-                        (TI_UINT8*)&p->twdInitParams.tPlatformGenParams.ClockValidOnWakeup);
-
-regReadIntegerParameter(pAdapter, &STRDC2DCMode,
-						0,0,1,
-                        sizeof p->twdInitParams.tPlatformGenParams.DC2DCMode,
-                        (TI_UINT8*)&p->twdInitParams.tPlatformGenParams.DC2DCMode);
-
-regReadIntegerParameter(pAdapter, &STRSingle_Dual_Band_Solution,
-						0,0,1,
-                        sizeof p->twdInitParams.tPlatformGenParams.Single_Dual_Band_Solution,
-                        (TI_UINT8*)&p->twdInitParams.tPlatformGenParams.Single_Dual_Band_Solution);
-
-/*----------------------------------
- Driver-Main parameters
-------------------------------------*/
-    regReadIntegerParameter( pAdapter, &STRWlanDrvThreadPriority,
-                             WLAN_DRV_THREAD_PRIORITY_DEF, WLAN_DRV_THREAD_PRIORITY_MIN, WLAN_DRV_THREAD_PRIORITY_MAX,
-                             sizeof p->tDrvMainParams.uWlanDrvThreadPriority,
-                             (TI_UINT8*)&p->tDrvMainParams.uWlanDrvThreadPriority);
-
-    regReadIntegerParameter( pAdapter, &STRBusDrvThreadPriority,
-                             BUS_DRV_THREAD_PRIORITY_DEF, BUS_DRV_THREAD_PRIORITY_MIN, BUS_DRV_THREAD_PRIORITY_MAX,
-                             sizeof p->tDrvMainParams.uBusDrvThreadPriority,
-                             (TI_UINT8*)&p->tDrvMainParams.uBusDrvThreadPriority);
-
-    regReadIntegerParameter( pAdapter, &STRSdioBlkSizeShift,
-                             SDIO_BLK_SIZE_SHIFT_DEF, SDIO_BLK_SIZE_SHIFT_MIN, SDIO_BLK_SIZE_SHIFT_MAX,
-                             sizeof p->tDrvMainParams.uSdioBlkSizeShift,
-                             (TI_UINT8*)&p->tDrvMainParams.uSdioBlkSizeShift);
-
-
-
-/*-----------------------------------*/
-/*      Roaming parameters           */
-/*-----------------------------------*/
-regReadIntegerParameter(pAdapter, & STRRoamingOperationalMode,
-                        ROAMING_MNGR_OPERATIONAL_MODE_DEF,
-                        ROAMING_MNGR_OPERATIONAL_MODE_MIN,
-                        ROAMING_MNGR_OPERATIONAL_MODE_MAX,
-                        sizeof p->tRoamScanMngrInitParams.RoamingOperationalMode,
-                        (TI_UINT8*)&p->tRoamScanMngrInitParams.RoamingOperationalMode);
-
-
-regReadIntegerParameter(pAdapter, & STRSendTspecInReassPkt,
-                        ROAMING_MNGR_SEND_TSPEC_IN_REASSO_PKT_DEF,
-                        ROAMING_MNGR_SEND_TSPEC_IN_REASSO_PKT_MIN,
-                        ROAMING_MNGR_SEND_TSPEC_IN_REASSO_PKT_MAX,
-                        sizeof p->tRoamScanMngrInitParams.bSendTspecInReassPkt,
-                        (TI_UINT8*)&p->tRoamScanMngrInitParams.bSendTspecInReassPkt);
-
-/*-----------------------------------*/
-/*      currBss parameters           */
-/*-----------------------------------*/
-regReadIntegerParameter(pAdapter, & STRRoamingOperationalMode,
-                        ROAMING_MNGR_OPERATIONAL_MODE_DEF,
-                        ROAMING_MNGR_OPERATIONAL_MODE_MIN,
-                        ROAMING_MNGR_OPERATIONAL_MODE_MAX,
-                        sizeof p->tCurrBssInitParams.RoamingOperationalMode,
-                        (TI_UINT8*)&p->tCurrBssInitParams.RoamingOperationalMode);
-
-
-
-/*-----------------------------------*/
-/*      FM Coexistence parameters    */
-/*-----------------------------------*/
-
-regReadIntegerParameter(pAdapter, &STRFmCoexEnable,
-                        FM_COEX_ENABLE_DEF, FM_COEX_ENABLE_MIN, FM_COEX_ENABLE_MAX,
-                        sizeof (p->twdInitParams.tGeneral.tFmCoexParams.uEnable),
-                        (TI_UINT8*)&(p->twdInitParams.tGeneral.tFmCoexParams.uEnable));
-
-regReadIntegerParameter(pAdapter, &STRFmCoexSwallowPeriod,
-                        FM_COEX_SWALLOW_PERIOD_DEF, FM_COEX_SWALLOW_PERIOD_MIN, FM_COEX_SWALLOW_PERIOD_MAX,
-                        sizeof (p->twdInitParams.tGeneral.tFmCoexParams.uSwallowPeriod),
-                        (TI_UINT8*)&(p->twdInitParams.tGeneral.tFmCoexParams.uSwallowPeriod));
-
-regReadIntegerParameter(pAdapter, &STRFmCoexNDividerFrefSet1,
-                        FM_COEX_N_DIVIDER_FREF_SET1_DEF, FM_COEX_N_DIVIDER_FREF_SET1_MIN, FM_COEX_N_DIVIDER_FREF_SET1_MAX,
-                        sizeof (p->twdInitParams.tGeneral.tFmCoexParams.uNDividerFrefSet1),
-                        (TI_UINT8*)&(p->twdInitParams.tGeneral.tFmCoexParams.uNDividerFrefSet1));
-
-regReadIntegerParameter(pAdapter, &STRFmCoexNDividerFrefSet2,
-                        FM_COEX_N_DIVIDER_FREF_SET2_DEF, FM_COEX_N_DIVIDER_FREF_SET2_MIN, FM_COEX_N_DIVIDER_FREF_SET2_MAX,
-                        sizeof (p->twdInitParams.tGeneral.tFmCoexParams.uNDividerFrefSet2),
-                        (TI_UINT8*)&(p->twdInitParams.tGeneral.tFmCoexParams.uNDividerFrefSet2));
-
-regReadIntegerParameter(pAdapter, &STRFmCoexMDividerFrefSet1,
-                        FM_COEX_M_DIVIDER_FREF_SET1_DEF, FM_COEX_M_DIVIDER_FREF_SET1_MIN, FM_COEX_M_DIVIDER_FREF_SET1_MAX,
-                        sizeof (p->twdInitParams.tGeneral.tFmCoexParams.uMDividerFrefSet1),
-                        (TI_UINT8*)&(p->twdInitParams.tGeneral.tFmCoexParams.uMDividerFrefSet1));
-
-regReadIntegerParameter(pAdapter, &STRFmCoexMDividerFrefSet2,
-                        FM_COEX_M_DIVIDER_FREF_SET2_DEF, FM_COEX_M_DIVIDER_FREF_SET2_MIN, FM_COEX_M_DIVIDER_FREF_SET2_MAX,
-                        sizeof (p->twdInitParams.tGeneral.tFmCoexParams.uMDividerFrefSet2),
-                        (TI_UINT8*)&(p->twdInitParams.tGeneral.tFmCoexParams.uMDividerFrefSet2));
-
-regReadIntegerParameter(pAdapter, &STRFmCoexPllStabilizationTime,
-                        FM_COEX_PLL_STABILIZATION_TIME_DEF, FM_COEX_PLL_STABILIZATION_TIME_MIN, FM_COEX_PLL_STABILIZATION_TIME_MAX,
-                        sizeof (p->twdInitParams.tGeneral.tFmCoexParams.uCoexPllStabilizationTime),
-                        (TI_UINT8*)&(p->twdInitParams.tGeneral.tFmCoexParams.uCoexPllStabilizationTime));
-
-regReadIntegerParameter(pAdapter, &STRFmCoexLdoStabilizationTime,
-                        FM_COEX_LDO_STABILIZATION_TIME_DEF, FM_COEX_LDO_STABILIZATION_TIME_MIN, FM_COEX_LDO_STABILIZATION_TIME_MAX,
-                        sizeof (p->twdInitParams.tGeneral.tFmCoexParams.uLdoStabilizationTime),
-                        (TI_UINT8*)&(p->twdInitParams.tGeneral.tFmCoexParams.uLdoStabilizationTime));
-
-regReadIntegerParameter(pAdapter, &STRFmCoexDisturbedBandMargin,
-                        FM_COEX_DISTURBED_BAND_MARGIN_DEF, FM_COEX_DISTURBED_BAND_MARGIN_MIN, FM_COEX_DISTURBED_BAND_MARGIN_MAX,
-                        sizeof (p->twdInitParams.tGeneral.tFmCoexParams.uFmDisturbedBandMargin),
-                        (TI_UINT8*)&(p->twdInitParams.tGeneral.tFmCoexParams.uFmDisturbedBandMargin));
-
-regReadIntegerParameter(pAdapter, &STRFmCoexSwallowClkDif,
-                        FM_COEX_SWALLOW_CLK_DIF_DEF, FM_COEX_SWALLOW_CLK_DIF_MIN, FM_COEX_SWALLOW_CLK_DIF_MAX,
-                        sizeof (p->twdInitParams.tGeneral.tFmCoexParams.uSwallowClkDif),
-                        (TI_UINT8*)&(p->twdInitParams.tGeneral.tFmCoexParams.uSwallowClkDif));
-
-
-/*----------------------------------------------*/
-/* 			Rate Management parameters	        */
-/*----------------------------------------------*/
-
-regReadIntegerParameter(pAdapter, &STRRateMngRateRetryScore,
-                        RATE_MNG_RATE_RETRY_SCORE_DEF, RATE_MNG_RATE_RETRY_SCORE_MIN, RATE_MNG_RATE_RETRY_SCORE_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.RateRetryScore),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.RateRetryScore));
-
-regReadIntegerParameter(pAdapter, &STRRateMngPerAdd,
-                        RATE_MNG_PER_ADD_DEF, RATE_MNG_PER_ADD_MIN, RATE_MNG_PER_ADD_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.PerAdd),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.PerAdd));
-
-regReadIntegerParameter(pAdapter, &STRRateMngPerTh1,
-                        RATE_MNG_PER_TH1_DEF, RATE_MNG_PER_TH1_MIN, RATE_MNG_PER_TH1_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.PerTh1),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.PerTh1));
-
-regReadIntegerParameter(pAdapter, &STRRateMngPerTh2,
-                        RATE_MNG_PER_TH2_DEF, RATE_MNG_PER_TH2_MIN, RATE_MNG_PER_TH2_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.PerTh2),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.PerTh2));
-
-regReadIntegerParameter(pAdapter, &STRRateMngInverseCuriosityFactor,
-                        RATE_MNG_INVERSE_CURISITY_FACTOR_DEF, RATE_MNG_INVERSE_CURISITY_FACTOR_MIN, RATE_MNG_INVERSE_CURISITY_FACTOR_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.InverseCuriosityFactor),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.InverseCuriosityFactor));
-
-regReadIntegerParameter(pAdapter, &STRRateMngTxFailLowTh,
-                        RATE_MNG_TX_FAIL_LOW_TH_DEF, RATE_MNG_TX_FAIL_LOW_TH_MIN, RATE_MNG_TX_FAIL_LOW_TH_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.TxFailLowTh),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.TxFailLowTh));
-
-regReadIntegerParameter(pAdapter, &STRRateMngTxFailHighTh,
-                        RATE_MNG_TX_FAIL_HIGH_TH_DEF, RATE_MNG_TX_FAIL_HIGH_TH_MIN, RATE_MNG_TX_FAIL_HIGH_TH_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.TxFailHighTh),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.TxFailHighTh));
-
-regReadIntegerParameter(pAdapter, &STRRateMngPerAlphaShift,
-                        RATE_MNG_PER_ALPHA_SHIFT_DEF, RATE_MNG_PER_ALPHA_SHIFT_MIN, RATE_MNG_PER_ALPHA_SHIFT_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.PerAlphaShift),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.PerAlphaShift));
-
-regReadIntegerParameter(pAdapter, &STRRateMngPerAddShift,
-                        RATE_MNG_PER_ADD_SHIFT_DEF, RATE_MNG_PER_ADD_SHIFT_MIM, RATE_MNG_PER_ADD_SHIFT_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.PerAddShift),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.PerAddShift));
-
-
-regReadIntegerParameter(pAdapter, &STRRateMngPerBeta1Shift,
-                        RATE_MNG_PER_BETA1_SHIFT_DEF, RATE_MNG_PER_BETA1_SHIFT_MIN, RATE_MNG_PER_BETA1_SHIFT_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.PerBeta1Shift),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.PerBeta1Shift));
-
-regReadIntegerParameter(pAdapter, &STRRateMngPerBeta2Shift,
-                        RATE_MNG_PER_BETA2_SHIFT_DEF, RATE_MNG_PER_BETA2_SHIFT_MIN, RATE_MNG_PER_BETA2_SHIFT_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.PerBeta2Shift),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.PerBeta2Shift));
-
-regReadIntegerParameter(pAdapter, &STRRateMngPerBeta2Shift,
-                        RATE_MNG_PER_BETA2_SHIFT_DEF, RATE_MNG_PER_BETA2_SHIFT_MIN, RATE_MNG_PER_BETA2_SHIFT_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.PerBeta2Shift),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.PerBeta2Shift));
-
-regReadIntegerParameter(pAdapter, &STRRateMngMaxPer,
-                        RATE_MNG_MAX_PER_DEF, RATE_MNG_MAX_PER_MIN, RATE_MNG_MAX_PER_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.MaxPer),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.MaxPer));
-
-
-regReadIntegerParameter(pAdapter, &STRRateMngRateCheckUp,
-                        RATE_MNG_RATE_CHECK_UP_DEF, RATE_MNG_RATE_CHECK_UP_MIN, RATE_MNG_RATE_CHECK_UP_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.RateCheckUp),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.RateCheckUp));
-
-regReadIntegerParameter(pAdapter, &STRRateMngRateCheckDown,
-                        RATE_MNG_RATE_CHECK_DOWN_DEF, RATE_MNG_RATE_CHECK_DOWN_MIN, RATE_MNG_RATE_CHECK_DOWN_MAX,
-                        sizeof (p->twdInitParams.tRateMngParams.RateCheckDown),
-                        (TI_UINT8*)&(p->twdInitParams.tRateMngParams.RateCheckDown));
-
-regReadIntegerTable (pAdapter, &STRRateMngRateRetryPolicy, RATE_MNG_RATE_RETRY_POLICY_DEF_TABLE,
-                           RATE_MNG_MAX_STR_LEN, (TI_UINT8*)&uTempRatePolicyList[0], NULL,
-                          (TI_UINT32*)&uTempRatePolicyCnt, sizeof (TI_UINT8),TI_FALSE);
-
-/* sanity check */
-    if (uTempRatePolicyCnt > RATE_MNG_MAX_RETRY_POLICY_PARAMS_LEN)
-    {
-        uTempRatePolicyCnt = RATE_MNG_MAX_RETRY_POLICY_PARAMS_LEN;
-    }
-
-    for (uIndex = 0; uIndex < RATE_MNG_MAX_RETRY_POLICY_PARAMS_LEN; uIndex++)
-    {
-        p->twdInitParams.tRateMngParams.RateRetryPolicy[uIndex] = uTempRatePolicyList[uIndex];
-    }
-
-#ifdef _WINDOWS
-    /* set etherMaxPayloadSize parameter for MTU size setting */
-   pAdapter->etherMaxPayloadSize = ETHER_MAX_PAYLOAD_SIZE;
-
-#endif /* _WINDOWS */
-
-}
-
-
-/*-----------------------------------------------------------------------------
-
-Routine Name:
-
-    regReadIntegerParameter
-
-Routine Description:
-
-
-Arguments:
-
-
-Return Value:
-
-    None
-
------------------------------------------------------------------------------*/
-static void regReadIntegerParameter (
-                 TWlanDrvIfObjPtr       pAdapter,
-                 PNDIS_STRING           pParameterName,
-                 TI_UINT32                  defaultValue,
-                 TI_UINT32                  minValue,
-                 TI_UINT32                  maxValue,
-                 TI_UINT8                  parameterSize,
-                 TI_UINT8*                 pParameter
-                 )
-{
-    PNDIS_CONFIGURATION_PARAMETER   RetValue;
-    NDIS_STATUS                     Status;
-    TI_UINT32                           value;
-
-    NdisReadConfiguration(&Status, &RetValue,
-                          pAdapter->ConfigHandle, pParameterName,
-                          NdisParameterInteger);
-
-    if(Status != NDIS_STATUS_SUCCESS) {
-
-        NdisReadConfiguration(&Status, &RetValue,
-              pAdapter->ConfigHandle, pParameterName,
-              NdisParameterString
-              );
-
-        if(Status == NDIS_STATUS_SUCCESS) {
-            assignRegValue(&value, RetValue);
-            RetValue->ParameterData.IntegerData = value;
-
-        }
-
-    }
-
-    if (Status != NDIS_STATUS_SUCCESS ||
-        RetValue->ParameterData.IntegerData < minValue ||
-        RetValue->ParameterData.IntegerData > maxValue)
-    {
-        PRINTF(DBG_REGISTRY,( "NdisReadConfiguration fail\n"));
-        value = defaultValue;
-
-    } else
-    {
-        value = RetValue->ParameterData.IntegerData;
-    }
-
-    switch (parameterSize)
-    {
-    case 1:
-        *((TI_UINT8*) pParameter) = (TI_UINT8) value;
-        break;
-
-    case 2:
-        *((PUSHORT) pParameter) = (USHORT) value;
-        break;
-
-    case 4:
-        *((TI_UINT32*) pParameter) = (TI_UINT32) value;
-        break;
-
-    default:
-        PRINT(DBG_REGISTRY_ERROR, "TIWL: Illegal Registry parameter size\n");
-        break;
-
-    }
-
-}
-
-/*-----------------------------------------------------------------------------
-
-Routine Name:
-
-    regReadIntegerParameterHex
-
-Routine Description:
-
-
-Arguments:
-
-
-Return Value:
-
-    None
-
------------------------------------------------------------------------------*/
-static void regReadIntegerParameterHex (
-                 TWlanDrvIfObjPtr       pAdapter,
-                 PNDIS_STRING           pParameterName,
-                 TI_UINT32              defaultValue,
-                 TI_UINT32              minValue,
-                 TI_UINT32              maxValue,
-                 TI_UINT8               defaultSize,
-                 TI_UINT8 *             pParameter)
-{
-    TI_UINT32   parameterSize = 0;
-    TI_UINT32   value;
-    TI_BOOL     paramFound;
-
-    regReadStringParameter (pAdapter, 
-                            pParameterName, 
-                            "x", 
-                            sizeof("x"),
-                            pParameter,
-                            &parameterSize);
-
-    /* Note: the "x" is used as a dummy string to detect if the requested key 
-             wasn't found (in that case the x is returned as sefault) */
-    paramFound = os_memoryCompare(pAdapter, pParameter, "x", sizeof("x")) != 0;
-
-    if (paramFound) 
-    {
-        value = tiwlnstrtoi_hex ((TI_UINT8 *)pParameter, parameterSize);
-
-        if (value < minValue || value > maxValue)
-        {
-            value = defaultValue;
-        }
-    }
-    else 
-    {
-        value = defaultValue;
-    }
-
-    switch (defaultSize)
-    {
-    case 1:
-        *((TI_UINT8*) pParameter) = (TI_UINT8) value;
-        break;
-
-    case 2:
-        *((PUSHORT) pParameter) = (USHORT) value;
-        break;
-
-    case 4:
-        *((TI_UINT32*) pParameter) = (TI_UINT32) value;
-        break;
-
-    default:
-        PRINT(DBG_REGISTRY_ERROR, "TIWL: Illegal Registry parameter size\n");
-        break;
-    }
-}
-
-/*-----------------------------------------------------------------------------
-
-Routine Name:
-
-    regReadParameters
-
-Routine Description:
-
-
-Arguments:
-
-
-Return Value:
-
-    None
-
------------------------------------------------------------------------------*/
-static void regReadStringParameter (
-                 TWlanDrvIfObjPtr       pAdapter,
-                 PNDIS_STRING           pParameterName,
-                 TI_INT8*                  pDefaultValue,
-                 USHORT                 defaultLen,
-                 TI_UINT8*                 pParameter,
-                 void*                  pParameterSize
-                 )
-{
-    PNDIS_CONFIGURATION_PARAMETER   RetValue;
-    NDIS_STATUS                     Status;
-    ANSI_STRING                     ansiString;
-    TI_UINT8*                          pSizeChar = 0;
-    PUSHORT                         pSizeShort = 0;
-
-    if(defaultLen <= 256)
-    {
-        pSizeChar = (TI_UINT8*)pParameterSize;
-        ansiString.MaximumLength = 256;
-    }
-    else
-    {
-        pSizeShort = (PUSHORT)pParameterSize;
-        ansiString.MaximumLength = 32576;
-    }
-
-    NdisReadConfiguration(&Status, &RetValue,
-                          pAdapter->ConfigHandle, pParameterName,
-                          NdisParameterString);
-
-    if (Status == NDIS_STATUS_SUCCESS)
-    {
-        ansiString.Buffer = (TI_INT8*)pParameter;
-
-        NdisUnicodeStringToAnsiString(&ansiString, &RetValue->ParameterData.StringData);
-        if(defaultLen <= 256)
-            *pSizeChar = (TI_UINT8)ansiString.Length;
-        else
-            *pSizeShort = (USHORT)ansiString.Length;
-    } else
-    {
-        if(defaultLen <= 256)
-            *pSizeChar = (TI_UINT8)defaultLen;
-        else
-            *pSizeShort = (USHORT)defaultLen;
-
-        memcpy(pParameter, pDefaultValue, defaultLen);
-    }
-
-    PRINTF(DBG_REGISTRY_LOUD, ("Read String Registry:  %c%c%c%c%c%c%c%c%c%c%c%c = %s\n",
-                          pParameterName->Buffer[0],
-                          pParameterName->Buffer[1],
-                          pParameterName->Buffer[2],
-                          pParameterName->Buffer[3],
-                          pParameterName->Buffer[4],
-                          pParameterName->Buffer[5],
-                          pParameterName->Buffer[6],
-                          pParameterName->Buffer[7],
-                          pParameterName->Buffer[8],
-                          pParameterName->Buffer[9],
-                          pParameterName->Buffer[10],
-                          pParameterName->Buffer[11],
-                          pParameter));
-
-}
-
-
-
-/*-----------------------------------------------------------------------------
-
-Routine Name:
-
-    regReadParameters
-
-Routine Description:
-
-
-Arguments:
-
-
-Return Value:
-
-    None
-
------------------------------------------------------------------------------*/
-static void regReadWepKeyParameter (TWlanDrvIfObjPtr pAdapter, TI_UINT8 *pKeysStructure, TI_UINT8 defaultKeyId)
-{
-    NDIS_STATUS                         status;
-    TSecurityKeys                      *pSecKeys;
-    int i;
-    int len;
-    TI_UINT8                               Buf[MAX_KEY_BUFFER_LEN];
-    PNDIS_CONFIGURATION_PARAMETER       RetValue;
-    ANSI_STRING                         ansiString;
-    NDIS_STRING                         STRdot11DefaultWEPKey[4] =
-                                                {   NDIS_STRING_CONST( "dot11WEPDefaultKey1" ),
-                                                    NDIS_STRING_CONST( "dot11WEPDefaultKey2" ),
-                                                    NDIS_STRING_CONST( "dot11WEPDefaultKey3" ),
-                                                    NDIS_STRING_CONST( "dot11WEPDefaultKey4" )
-                                                };
-
-
-
-    PRINTF(DBG_REGISTRY_LOUD, ("Reading WEP keys\n"));
-
-    pSecKeys = (TSecurityKeys*)pKeysStructure;
-
-    /**/
-    /* Read WEP from registry*/
-    /**/
-    for ( i = 0; i < DOT11_MAX_DEFAULT_WEP_KEYS; i++ )
-    {
-        NdisReadConfiguration(&status, &RetValue,
-                              pAdapter->ConfigHandle, &STRdot11DefaultWEPKey[i],
-                              NdisParameterString);
-
-        if(status == NDIS_STATUS_SUCCESS)
-        {
-            ansiString.Buffer = (TI_INT8*)Buf;
-            ansiString.MaximumLength = MAX_KEY_BUFFER_LEN;
-
-            pSecKeys->keyIndex = i;
-            pSecKeys->keyType = KEY_WEP;
-            NdisZeroMemory((void *)pSecKeys->macAddress, 6);
-
-            if(((char *)(RetValue->ParameterData.StringData.Buffer))[1] == 0)
-            {
-                NdisUnicodeStringToAnsiString(&ansiString, &RetValue->ParameterData.StringData);
-
-                len = decryptWEP((TI_INT8*)Buf, (TI_INT8*)pSecKeys->encKey, ansiString.Length);
-            } else {
-                len = decryptWEP((TI_INT8*)RetValue->ParameterData.StringData.Buffer,
-                                 (TI_INT8*)pSecKeys->encKey,
-                                 RetValue->ParameterData.StringData.Length);
-            }
-
-            if(len < ACX_64BITS_WEP_KEY_LENGTH_BYTES)
-            {
-                PRINTF(DBG_REGISTRY_ERROR, ("Error: minimum WEP key size is 5 bytes(%d)\n", len));
-                pSecKeys->keyType = KEY_NULL;
-                len = 0;
-            }
-            else if(len < ACX_128BITS_WEP_KEY_LENGTH_BYTES)
-            {
-                len = ACX_64BITS_WEP_KEY_LENGTH_BYTES;
-            }
-            else if(len < ACX_256BITS_WEP_KEY_LENGTH_BYTES)
-            {
-                len = ACX_128BITS_WEP_KEY_LENGTH_BYTES;
-            }
-            else
-                len = ACX_256BITS_WEP_KEY_LENGTH_BYTES;
-
-            pSecKeys->encLen = (TI_UINT8)len;
-
-        } 
-        else
-        {
-            pSecKeys->keyType = KEY_NULL;
-            pSecKeys->encLen = 0;
-        }
-
-#ifdef _WINDOWS
-        /*create local keys cache*/
-        pAdapter->DefaultWepKeys[i].KeyIndex = i;
-        if(i==defaultKeyId)
-            pAdapter->DefaultWepKeys[i].KeyIndex |= 0x80000000;
-        pAdapter->DefaultWepKeys[i].KeyLength = pSecKeys->encLen;
-        NdisMoveMemory((void *)pAdapter->DefaultWepKeys[i].KeyMaterial,
-            (void *)pSecKeys->encKey, pSecKeys->encLen);
-        pAdapter->DefaultWepKeys[i].Length = sizeof(OS_802_11_WEP);
-#endif /* _WINDOWS */
-
-        pSecKeys++;
-    }
-}
-
-#define iswhite(c) ( (c==' ') || (c=='\t') || (c=='\n') )
-
-/*
- *
- *       Fun:   isnumber
- *
- *       Desc:  check if the ascii character is a number in the given base
- *
- *       Ret:   1 if number is a digit, 0 if not.
- *
- *       Notes: none
- *
- *       File:  btoi.c
- *
- */
-
-static TI_BOOL isnumber ( short *pi, char c, short base )
-{
-
-    /* return 1 if c is a digit in the give base, else return 0 */
-    /* place value of digit at pi */
-    if ( base == 16 )
-    {
-        if ( '0' <= c && c <= '9' )
-        {
-            *pi =  c - '0';
-            return (1);
-        }
-        else if ( 'a' <= c && c <= 'f' )
-        {
-            *pi =  c - 'a' + 10 ;
-            return (1);
-        }
-        else if ( 'A' <= c && c <= 'F' )
-        {
-            *pi =  c - 'A' + 10 ;
-            return (1);
-        }
-        else
-        {
-            return (0);
-        }
-    }
-    c -= '0';
-    if ( 0 <= (signed char)c && c < base )
-    {
-        *pi =  c ;
-        return (1);
-    }
-    else
-    {
-        return (0);
-    }
-} /* end of isnumber */
-
-
-static short _btoi (char *sptr, short slen, int *pi, short base)
-{
-    char    *s, c ;
-    short   d, sign ;
-    int     result ;
-    char    saved ;
-
-    s           =  sptr ;
-    result      =  0 ;
-    saved       =  sptr [slen];
-    sptr [slen] =  '\0';
-
-    /* skip initial white space */
-/*    while ( (c = *s++) && iswhite(c) ); */
-    do
-    {
-       c = *s++;
-       if (!(c  && iswhite(c))) 
-         break;
-    }while(1); 
-  
-    --s ;
-
-    /* recognize optional sign */
-    if ( *s == '-' )
-    {
-        sign =  - 1 ;
-        s++ ;
-    }
-    else if ( *s == '+' )
-    {
-        sign =  1 ;
-        s++ ;
-    }
-    else
-    {
-        sign =  1 ;
-    }
-
-    /* recognize optional hex# prefix */
-    if ((base == 16) && ((*s == '0') && ((*(s + 1) == 'x') || (*(s + 1) == 'X'))
-       ))
-        s += 2 ;
-
-    /* recognize digits */
-
-/*    for (; (c = *s++) && isnumber(&d, c, base) ; )
-    {
-        result =  base * result + d ;
-    }
-*/    
-    while(1)
-    {
-      c = *s++;
-      if (!(c && isnumber(&d, c, base)))    
-        break;
-      result =  base * result + d ;
-    };
-
-    *pi         =  sign * result ;
-    sptr [slen] =  saved ; /* restore character which we changed to null */
-    return (s - sptr - 1);
-} /* end of _btoi */
-
-static int decryptWEP
-(
-  TI_INT8* pSrc,
-  TI_INT8* pDst,
-  TI_UINT32 len
-)
-{
-  /**/
-  /* key to use for encryption*/
-  /**/
-  static LPCSTR lpEncryptKey = "jkljz98c&2>a+t)cl5[d=n3;\"f_um6\\d~v%$HO1";
-  int cnEncryptLen = strlen(lpEncryptKey);
-
-  char cIn, cCrypt, cHex[3];
-  int i, j, nLen;
-  int nPos;
-
-  nLen = len / 2;
-  nPos = len;
-
-  /* start reading from end*/
-  nPos = len - 2;
-
-  for(i = 0; (i < nLen) && (nPos >= 0); i++, nPos -= 2)
-  {
-    /* get hex character*/
-    cHex[0] = pSrc[nPos];
-    cHex[1] = pSrc[nPos + 1];
-    cHex[2] = 0;
-
-    _btoi ( cHex, 2, &j, 16);
-    cIn = (char) j;
-
-    cCrypt = lpEncryptKey[i % cnEncryptLen];
-    cIn = cIn ^ cCrypt;
-
-    pDst[i] = cIn;
-  }
-
-  PRINTF(DBG_REGISTRY_LOUD, ("First 5 bytes of WEP: %x-%x-%x-%x-%x\n",
-    pDst[0],
-    pDst[1],
-    pDst[2],
-    pDst[3],
-    pDst[4]));
-
-  return nLen;
-}
-
-static void initValusFromRgstryString
-(
-  TI_INT8* pSrc,
-  TI_INT8* pDst,
-  TI_UINT32 len
-)
-{
-    int j;
-    TI_UINT32 count;
-    for (count = 0 ; count < len ; count++)
-    {
-        _btoi((char *) (pSrc+(count*3)),  2, &j, 16 );
-
-        pDst[count] = (TI_UINT8) j;
-    }
-}
-
-#ifdef TI_DBG
-
-void regReadLastDbgState (TWlanDrvIfObjPtr pAdapter)
-{
-    NDIS_STRING OsDbgStr = NDIS_STRING_CONST("OsDbgState");
-    PNDIS_CONFIGURATION_PARAMETER Value;
-    NDIS_STATUS Status;
-
-    NdisReadConfiguration(&Status, &Value,
-                          pAdapter->ConfigHandle, &OsDbgStr,
-                          NdisParameterInteger
-                         );
-
-    if (Status != NDIS_STATUS_SUCCESS)
-    {
-
-        TiDebugFlag = ((DBG_NDIS_OIDS | DBG_INIT | DBG_RECV | DBG_SEND | DBG_IOCTL | DBG_INTERRUPT) << 16) |
-                DBG_SEV_VERY_LOUD | DBG_SEV_INFO | DBG_SEV_LOUD | DBG_SEV_ERROR | DBG_SEV_FATAL_ERROR;
-
-    } else
-    {
-
-        PRINTF(DBG_REGISTRY_VERY_LOUD, ("TIWL: New Flag - 0x%X\n", Value->ParameterData.IntegerData));
-
-        TiDebugFlag = Value->ParameterData.IntegerData;
-
-    }
-}
-
-#endif  /* TI_DBG */
-
-
-
-static void readRates(TWlanDrvIfObjPtr pAdapter, TInitTable *pInitTable)
-{
-    /*
-    ** B band
-    */
-    regReadIntegerParameter(pAdapter, &STRdot11BasicRateMask_B,
-                            BASIC_RATE_SET_1_2_5_5_11, BASIC_RATE_SET_1_2, BASIC_RATE_SET_1_2_5_5_11,
-                            sizeof pInitTable->siteMgrInitParams.siteMgrRegstryBasicRate[DOT11_B_MODE], 
-                            (TI_UINT8*)&pInitTable->siteMgrInitParams.siteMgrRegstryBasicRate[DOT11_B_MODE]);
-
-    regReadIntegerParameter(pAdapter, &STRdot11SupportedRateMask_B,
-                          SUPPORTED_RATE_SET_1_2_5_5_11_22, SUPPORTED_RATE_SET_1_2, SUPPORTED_RATE_SET_1_2_5_5_11_22,
-                            sizeof pInitTable->siteMgrInitParams.siteMgrRegstrySuppRate[DOT11_B_MODE], 
-                            (TI_UINT8*)&pInitTable->siteMgrInitParams.siteMgrRegstrySuppRate[DOT11_B_MODE]);
-    /*
-    ** G band (B&G rates)
-    */
-    regReadIntegerParameter(pAdapter, &STRdot11BasicRateMask_G,
-                            BASIC_RATE_SET_1_2_5_5_11, BASIC_RATE_SET_1_2, BASIC_RATE_SET_1_2_5_5_11,
-                            sizeof pInitTable->siteMgrInitParams.siteMgrRegstryBasicRate[DOT11_G_MODE], 
-                            (TI_UINT8*)&pInitTable->siteMgrInitParams.siteMgrRegstryBasicRate[DOT11_G_MODE]);
-
-    regReadIntegerParameter(pAdapter, &STRdot11SupportedRateMask_G,
-                            SUPPORTED_RATE_SET_ALL, SUPPORTED_RATE_SET_1_2, SUPPORTED_RATE_SET_ALL,
-                            sizeof pInitTable->siteMgrInitParams.siteMgrRegstrySuppRate[DOT11_G_MODE], 
-                            (TI_UINT8*)&pInitTable->siteMgrInitParams.siteMgrRegstrySuppRate[DOT11_G_MODE]);
-
-    /*
-    ** A band
-    */
-    regReadIntegerParameter(pAdapter, &STRdot11BasicRateMask_A,
-                            BASIC_RATE_SET_6_12_24, BASIC_RATE_SET_6_12_24, BASIC_RATE_SET_6_12_24,
-                            sizeof pInitTable->siteMgrInitParams.siteMgrRegstryBasicRate[DOT11_A_MODE], 
-                            (TI_UINT8*)&pInitTable->siteMgrInitParams.siteMgrRegstryBasicRate[DOT11_A_MODE]);
-
-    regReadIntegerParameter(pAdapter, &STRdot11SupportedRateMask_A,
-                            SUPPORTED_RATE_SET_UP_TO_54, SUPPORTED_RATE_SET_1_2, SUPPORTED_RATE_SET_UP_TO_54,
-                            sizeof pInitTable->siteMgrInitParams.siteMgrRegstrySuppRate[DOT11_A_MODE], 
-                            (TI_UINT8*)&pInitTable->siteMgrInitParams.siteMgrRegstrySuppRate[DOT11_A_MODE]);
-
-    /*
-    ** Dual band (A&G)
-    */
-    regReadIntegerParameter(pAdapter, &STRdot11BasicRateMask_AG,
-                            BASIC_RATE_SET_1_2, BASIC_RATE_SET_1_2, BASIC_RATE_SET_1_2,
-                            sizeof pInitTable->siteMgrInitParams.siteMgrRegstryBasicRate[DOT11_DUAL_MODE],
-                            (TI_UINT8*)&pInitTable->siteMgrInitParams.siteMgrRegstryBasicRate[DOT11_DUAL_MODE]);
-
-    regReadIntegerParameter(pAdapter, &STRdot11SupportedRateMask_AG,
-                            SUPPORTED_RATE_SET_ALL_OFDM, SUPPORTED_RATE_SET_1_2, SUPPORTED_RATE_SET_ALL_OFDM,
-                            sizeof pInitTable->siteMgrInitParams.siteMgrRegstrySuppRate[DOT11_DUAL_MODE],
-                            (TI_UINT8*)&pInitTable->siteMgrInitParams.siteMgrRegstrySuppRate[DOT11_DUAL_MODE]);
-
-    /*
-    ** N supported
-    */
-    regReadIntegerParameter(pAdapter, &STRdot11BasicRateMask_N,
-                            BASIC_RATE_SET_1_2_5_5_11, BASIC_RATE_SET_1_2, BASIC_RATE_SET_1_2_5_5_11,
-                            sizeof pInitTable->siteMgrInitParams.siteMgrRegstryBasicRate[DOT11_N_MODE],
-                            (TI_UINT8*)&pInitTable->siteMgrInitParams.siteMgrRegstryBasicRate[DOT11_N_MODE]);
-
-    regReadIntegerParameter(pAdapter, &STRdot11SupportedRateMask_N,
-                            SUPPORTED_RATE_SET_ALL_MCS_RATES, SUPPORTED_RATE_SET_ALL_MCS_RATES, SUPPORTED_RATE_SET_ALL_MCS_RATES,
-                            sizeof pInitTable->siteMgrInitParams.siteMgrRegstrySuppRate[DOT11_N_MODE],
-                            (TI_UINT8*)&pInitTable->siteMgrInitParams.siteMgrRegstrySuppRate[DOT11_N_MODE]);
-}
-
-
-static void decryptScanControlTable(TI_UINT8* src, TI_UINT8* dst, USHORT len)
-{
-
-    USHORT i;
-    int parityFlag = 0;
-    char tmp = 0;
-    char finalChar = 0;
-
-    for(i=0; i < len; i++)
-    {
-        switch(src[i])
-        {
-        case 'A':
-        case 'a':
-            tmp = 10;
-            break;
-        case 'B':
-        case 'b':
-            tmp = 11;
-            break;
-        case 'C':
-        case 'c':
-            tmp = 12;
-            break;
-        case 'D':
-        case 'd':
-            tmp = 13;
-            break;
-        case 'E':
-        case 'e':
-            tmp = 14;
-            break;
-        case 'F':
-        case 'f':
-            tmp = 15;
-            break;
-        default:
-            if( (src[i] >='0') && (src[i] <= '9') )
-                tmp = (src[i] - '0');
-            else
-                return; /* ERROR input char */
-        }
-        if(parityFlag == 0)
-            finalChar =  tmp << 4;
-        else
-        {
-            finalChar |= (tmp & 0x0f);
-            dst[i/2] = finalChar;
-        }
-        parityFlag = 1-parityFlag;
-    }
-}
-
-
-/*-----------------------------------------------------------------------------
-
-Routine Name:
-
-    regReadIntegerTable
-
-Routine Description:
-    reads any table format and insert it to another string.
-    the delimiters of the tables can be:
-     - space (" ")
-     - comma (",")
-    the table reads only integers thus its reads the following chars:
-     - "0" till "9"
-     - minus sign ("-")
-
-Arguments:
-
-
-Return Value:
-
-    zero on success else - error number.
-
------------------------------------------------------------------------------*/
-TI_UINT32
-regReadIntegerTable(
-                     TWlanDrvIfObjPtr       pAdapter,
-                     PNDIS_STRING           pParameterName,
-                     TI_INT8*                  pDefaultValue,
-                     USHORT                 defaultLen,
-                     TI_UINT8*              pUnsignedParameter,
-                     TI_INT8*               pSignedParameter,
-                     TI_UINT32*             pEntriesNumber, /* returns the number of read entries */
-                     TI_UINT8               uParameterSize,
-                     TI_BOOL                bHex)
-{
-    static CHAR Buffer[MAX_KEY_BUFFER_LEN];
-    TI_UINT32 parameterIndex = 0;
-    int myNumber;
-
-    TI_UINT32 index;
-    TI_UINT32 bufferSize = 0;
-
-    char tempBuffer[16];
-    char *pTempBuffer = tempBuffer;
-    TI_UINT32 tempBufferIndex = 0;
-
-    TI_BOOL isDigit;
-    TI_BOOL numberReady;
-    TI_BOOL isSign;
-    TI_BOOL endOfLine;
-
-    TI_UINT32 debugInfo = 0;
-    TI_INT8* pBuffer = (TI_INT8*)&Buffer;
-
-    regReadStringParameter(pAdapter,
-                           pParameterName,
-                           pDefaultValue,
-                           defaultLen,
-                           (TI_UINT8*)pBuffer,
-                           &bufferSize);
-
-    index = 0;
-    do { /* Parsing one line */
-
-        isSign = TI_FALSE;
-        isDigit = TI_FALSE;
-        numberReady = TI_FALSE;
-        tempBufferIndex = 0;
-        endOfLine = TI_FALSE;
-
-        while ((numberReady==TI_FALSE) && (index<bufferSize))
-        {
-            /* Parsing one number */
-            switch (pBuffer[index])
-            {
-                case '0':
-                case '1':
-                case '2':
-                case '3':
-                case '4':
-                case '5':
-                case '6':
-                case '7':
-                case '8':
-                case '9':
-                    pTempBuffer[tempBufferIndex] = pBuffer[index];
-                    ++tempBufferIndex;
-                    isDigit = TI_TRUE;
-                    break;
-                case 'a':
-                case 'b':
-                case 'c':
-                case 'd':
-                case 'e':
-                case 'f':
-                case 'A':
-                case 'B':
-                case 'C':
-                case 'D':
-                case 'E':
-                case 'F':
-                    if (bHex)
-                    {
-                        pTempBuffer[tempBufferIndex] = pBuffer[index];
-                        ++tempBufferIndex;
-                        isDigit = TI_TRUE;
-                    }
-                    break;
-                case '-':
-                    pTempBuffer[tempBufferIndex] = pBuffer[index];
-                    ++tempBufferIndex;
-                    if (isDigit==TI_TRUE)
-                    {
-                        PRINTF(DBG_REGISTRY_INFO, ("Error in read parameter %c in line index %d\n\
-                                               The sign '-' isn't in place!\n",pBuffer[index],index));
-                        debugInfo = 1;
-                    }
-                    isSign = TI_TRUE;
-                    break;
-
-                case ' ':
-                case '\t': /* tab char */
-                    /* for space discard*/
-                    if ((isDigit==TI_FALSE) && (isSign==TI_FALSE))
-                    {
-                        break;
-                    }
-                    /*
-                    else we continue to the code of the case ','
-                    */
-                case '\0':
-                case '\n':
-                case '\r':
-                    endOfLine = TI_TRUE;
-
-                case ',':
-                    /* end of number reading */
-                    pTempBuffer[tempBufferIndex] = '\0';
-                    if (isDigit == TI_FALSE)
-                    {
-                        PRINTF(DBG_REGISTRY_INFO, ("Error in end of number delimiter. number isn't ready.\
-                            check index %d",index));
-                        debugInfo = 2;
-                    }
-                    numberReady = TI_TRUE;
-                    break;
-
-                default:
-                    PRINTF(DBG_REGISTRY_INFO, ("%s(%d) Error - unexpected parameter %c.\n",
-                        __FILE__,__LINE__,pBuffer[index]));
-                    debugInfo = 3;
-                    break;
-            }/* switch( pBuffer[index] ) */
-
-            if (debugInfo != 0)
-            {
-                return debugInfo;
-            }
-            ++index;
-
-        }/* while (numberReady==TI_FALSE)*/
-
-        if (pTempBuffer[0] == '-')
-        {
-            ++pTempBuffer;
-            if (!bHex)
-            {
-            myNumber = tiwlnstrtoi(pTempBuffer,tempBufferIndex-1);
-            }
-            else
-            {
-                myNumber = tiwlnstrtoi_hex((TI_UINT8 *)pTempBuffer,tempBufferIndex-1);
-            }
-            myNumber = -(myNumber);
-        }
-        else
-        {
-            if (!bHex)
-            {
-            myNumber = tiwlnstrtoi(pTempBuffer,tempBufferIndex);
-        }
-            else
-            {
-                myNumber = tiwlnstrtoi_hex((TI_UINT8 *)pTempBuffer,tempBufferIndex);
-            }
-        }
-
-        switch (uParameterSize)
-        {
-        case 1:
-            if (pUnsignedParameter)
-            {
-                ((TI_UINT8*) pUnsignedParameter)[parameterIndex] = (TI_UINT8) myNumber;
-            }
-            else
-            {
-                ((TI_INT8*) pSignedParameter)[parameterIndex] = (TI_INT8) myNumber;
-            }
-            break;
-
-        case 2:
-            if (pUnsignedParameter)
-            {
-                ((PUSHORT) pUnsignedParameter)[parameterIndex]  = (USHORT) myNumber;
-            }
-            else
-            {
-                ((TI_INT16*) pSignedParameter)[parameterIndex]  = (TI_INT16) myNumber;
-            }
-            break;
-
-        case 4:
-            if (pUnsignedParameter)
-            {
-                ((TI_UINT32*) pUnsignedParameter)[parameterIndex] = (TI_UINT32) myNumber;
-            }
-            else
-            {
-                ((TI_INT32*) pSignedParameter)[parameterIndex] = (TI_INT32) myNumber;
-            }
-            break;
-
-        default:
-            PRINTF(DBG_REGISTRY_INFO, ("%s(%d) Error - Illegal Registry parameter size.\n",
-                __FILE__,__LINE__));
-            break;
-        }
-
-        ++parameterIndex;
-
-    }while ((index<bufferSize)&&(endOfLine==TI_FALSE));
-
-    *pEntriesNumber = parameterIndex; /* return number of entries read */
-    return debugInfo;
-}
-
-
-void assignRegValue(TI_UINT32* lValue, PNDIS_CONFIGURATION_PARAMETER ndisParameter)
-{ 
-    char b[8]; 
-    ANSI_STRING a = {0, 0, 0};
-
-    a.MaximumLength = sizeof(b);
-    a.Buffer=(TI_INT8*)b;
-
-    if(ndisParameter->ParameterData.StringData.Length <= sizeof (b) * 2) 
-    { 
-      if ( ((char *)(ndisParameter->ParameterData.StringData.Buffer))[1] == 0 )
-      {
-        NdisUnicodeStringToAnsiString ( &a, &(ndisParameter)->ParameterData.StringData );
-        *lValue = tiwlnstrtoi ( (char *)a.Buffer, a.Length ); 
-      } else { 
-        *lValue = tiwlnstrtoi ( (char *)(ndisParameter->ParameterData.StringData.Buffer), ndisParameter->ParameterData.StringData.Length); 
-      } 
-    } else {
-      *lValue = 0;
-    }
-  }
-
-
-/*-----------------------------------------------------------------------------
-Routine Name:   parseTwoDigitsSequenceHex
-    
-Routine Description: Parse a sequence of two digit hex numbers from the input string to the output array.
-
-Arguments:  sInString - The input string - a sequence of two digit hex numbers with seperators between them (comma or space)
-            uOutArray - The output array containing the translated values (each index contains one two digit value)
-            uSize     - The number of two digit items.
-
-Return Value:  None
------------------------------------------------------------------------------*/
-static void parseTwoDigitsSequenceHex (TI_UINT8 *sInString, TI_UINT8 *uOutArray, TI_UINT8 uSize)
-{
-    int i;
-
-    /* Convert the MAC Address string into the MAC Address array */
-    for (i = 0; i < uSize; i++)
-    {
-        /* translate two digit string to value */
-        uOutArray[i] = tiwlnstrtoi_hex (sInString, 2);
-
-        /* progress to next two digits (plus space) */
-        sInString += 3;
-    }
-}
-
-
-/*-----------------------------------------------------------------------------
-
-Routine Name:
-
-    regConvertStringtoCoexActivityTable
-
-Routine Description: Converts the CoexActivity string into CoexActivity config table
-
-
-Arguments:
-
-
-Return Value:
-
-    None
-
------------------------------------------------------------------------------*/
-static void regConvertStringtoCoexActivityTable(TI_UINT8 *strCoexActivityTable, TI_UINT32 numOfElements, TCoexActivity *CoexActivityArray, TI_UINT8 size)
-{
-    char *ptr;
-    TI_UINT16 tmpArray[NUM_OF_COEX_ACTIVITY_PARAMS_IN_SG];
-    TI_UINT16 value = 0, value_l, value_h, add_value;
-    TI_UINT32 i;
-    int entry = 0;
-
-    /* Note: Currently it is not in use, but it has potential buffer overrun
-             problem if buffer is not ended with blank (Dm) */
-
-    /* Take the pointer to the string MAC Address to convert it to the Array MAC Address */
-    ptr = (char *)strCoexActivityTable;
-
-    for(i=0;(i < numOfElements*NUM_OF_COEX_ACTIVITY_PARAMS_IN_SG);ptr++)
-    {
-        /* The value can be or "0-9" or from "a-f" */
-        value_l = (*ptr - '0');
-        value_h = (*ptr - 'a');
-
-        /*PRINTF(DBG_REGISTRY,("value_l [%d] value_h [%d] *ptr %c value %d\n",value_l,value_h,*ptr,value));*/
-
-        if( (value_l <= 9) || (value_h <= 15 ) )
-        {
-            /* We are in an expected range */
-            /* nCheck if 0-9 */
-            if(value_l <= 9 )
-            {
-                add_value = value_l;
-            }
-            /* Check if a-f */
-            else
-            {
-                /* 'a' is in fact 10 decimal in hexa */
-                add_value = value_h + 10;
-            }
-            value = value * 16 + add_value;
-            /*  PRINTF(DBG_REGISTRY,("value %d add_value %d  \n",value,add_value));*/
-        }
-        else
-        {
-            tmpArray[i%NUM_OF_COEX_ACTIVITY_PARAMS_IN_SG] = value;
-            value = 0;
-            i++;
-            if ((i%NUM_OF_COEX_ACTIVITY_PARAMS_IN_SG) == 0)
-            {
-                CoexActivityArray[entry].coexIp         = (TI_UINT8)tmpArray[0];
-                CoexActivityArray[entry].activityId     = (TI_UINT8)tmpArray[1];
-                CoexActivityArray[entry].defaultPriority= (TI_UINT8)tmpArray[2];
-                CoexActivityArray[entry].raisedPriority = (TI_UINT8)tmpArray[3];
-                CoexActivityArray[entry].minService     = tmpArray[4];
-                CoexActivityArray[entry].maxService     = tmpArray[5];
-                entry++;
-            }
-        }
-    }
-}
-
-static void parse_hex_string(char * pString, TI_UINT8 StrLength, TI_UINT8 * pBuffer, TI_UINT8 * Length)
-{
-    char ch;
-    int iter = 0;
-
-    while ((iter < StrLength) && (ch = pString[iter]))
-    {
-        TI_UINT8 val = ((ch >= '0' && ch <= '9') ? (ch - '0') :
-                     (ch >= 'A' && ch <= 'F') ? (0xA + ch - 'A') :
-                     (ch >= 'a' && ch <= 'f') ? (0xA + ch - 'a') : 0);
-
-        /* even indexes go to the lower nibble, odd indexes push them to the */
-        /* higher nibble and then go themselves to the lower nibble. */
-        if (iter % 2)
-            pBuffer[iter / 2] = ((pBuffer[iter / 2] << (BIT_TO_BYTE_FACTOR / 2)) | val);
-        else
-            pBuffer[iter / 2] = val;
-
-        ++iter;
-    }
-
-    /* iter = 0 len = 0, iter = 1 len = 1, iter = 2 len = 1, and so on... */
-    *Length = (iter + 1) / 2;
-}
-
-static void parse_binary_string(char * pString, TI_UINT8 StrLength, TI_UINT8 * pBuffer, TI_UINT8 * Length)
-{
-    char ch;
-    int iter = 0;
-
-    while ((iter < StrLength) && (ch = pString[iter]))
-    {
-        TI_UINT8 val = (ch == '1' ? 1 : 0);
-
-        if (iter % BIT_TO_BYTE_FACTOR)
-            pBuffer[iter / BIT_TO_BYTE_FACTOR] |= (val << (iter % BIT_TO_BYTE_FACTOR));
-        else
-            pBuffer[iter / BIT_TO_BYTE_FACTOR] = val;
-
-        ++iter;
-    }
-
-    /* iter = 0 len = 0, iter = 1 len = 1, iter = 8 len = 1, and so on... */
-    *Length = (iter + BIT_TO_BYTE_FACTOR - 1) / BIT_TO_BYTE_FACTOR;
-}
-
-static void parse_filter_request(TRxDataFilterRequest* request, TI_UINT8 offset, char * mask, TI_UINT8 maskLength, char * pattern, TI_UINT8 patternLength)
-{
-    request->offset = offset;
-    request->maskLength = request->patternLength = 0;
-
-    if (maskLength > 0)
-    {
-        parse_binary_string(mask, maskLength, request->mask, &request->maskLength);
-        parse_hex_string(pattern, patternLength, request->pattern, &request->patternLength);
-    }
-}
diff --git a/wl1271/platforms/os/common/src/tracebuf.c b/wl1271/platforms/os/common/src/tracebuf.c
deleted file mode 100644
index 5a0f156..0000000
--- a/wl1271/platforms/os/common/src/tracebuf.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * tracebuf.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Benchmark tracing utility
- */
-
-#include "osApi.h"
-#include "tracebuf.h"
-#include "tracebuf_api.h"
-#include "report.h"
-
-typedef struct {
-      unsigned long loc;/* trace entry identification */
-      unsigned long ts;/* Timestamp */
-      unsigned long p1; /* Parameter 1 */
-      unsigned long p2; /* Parameter 2 */
-      char msg[MAX_TB_MSG];
-} tb_entry_t;
-
-typedef struct {
-      int pos;
-      int count;
-      int print_pos;
-      int nusers;
-      unsigned long self_delay;
-      unsigned long options;
-      tb_entry_t entry[1]; /* Array of entries */
-} tb_control_t;
-
-static tb_control_t *tb_control;
-
-static  int tb_control_size(void)
-{
-   return TI_FIELD_OFFSET(tb_control_t, entry) + sizeof(tb_entry_t)*TB_NUM_ENTRIES;
-}
-
-
-/* Initialization */
-int tb_init(unsigned long options)
-{
-   if (tb_control)
-   {
-      ++tb_control->nusers;
-      return 0;
-   }
-   tb_control = (tb_control_t *)TB_MALLOC(tb_control_size());
-   if (!tb_control)
-      return -1;
-   memset(tb_control, 0, tb_control_size());
-   tb_control->nusers = 1;
-
-   /* Measure self-delay */
-   tb_trace(0, 0, 0);
-   tb_trace(0, 0, 0);
-   tb_control->self_delay = tb_control->entry[1].ts - tb_control->entry[0].ts;
-   tb_control->pos = tb_control->count = 0;
-   tb_control->options = options;
-   return 0;
-}
-
-/* De-initialization */
-void tb_destroy(void)
-{
-   if (--tb_control->nusers)
-      return;
-   TB_FREE(tb_control );
-}
-
-static int tb_next(void)
-{
-    int pos;
-    if (!tb_control || tb_control->print_pos)
-       return -1;
-    pos = tb_control->pos;
-    tb_control->pos = (pos+1) % TB_NUM_ENTRIES;
-    ++tb_control->count;
-
-    tb_control->entry[tb_control->pos].ts = 
-    tb_control->entry[tb_control->pos].loc= 
-    tb_control->entry[tb_control->pos].p1 = 
-    tb_control->entry[tb_control->pos].p2 = 0xffffffff;
-
-    return pos;
-}
-static void tb_autoprint(void)
-{
-    if ((tb_control->pos == 0) && (tb_control->count))
-    {
-        if (tb_control->options & TB_OPTION_PRINTONCE)
-        {
-            tb_printf();
-            tb_reset_option(TB_OPTION_PRINTONCE);
-        }
-        else if (tb_control->options & TB_OPTION_AUTOPRINT)
-        {
-            tb_printf();
-        }
-    }
-}
-
-/* Add trace entry. not safe, but will do */
-int tb_trace(int loc, unsigned long p1, unsigned long p2)
-{
-   int pos;
-
-   if ((tb_control->options & TB_OPTION_STOP) || ((pos = tb_next()) < 0))
-   {
-       return -1;
-   }
-   tb_control->entry[pos].ts = os_timeStampUs(NULL);
-   tb_control->entry[pos].loc= loc;
-   tb_control->entry[pos].p1 = p1;
-   tb_control->entry[pos].p2 = p2;
-
-   return pos;
-}
-void tb_dump(void)
-{
-	int j, pos;
-
-	WLAN_OS_REPORT(("Trace Dump:\n"));
-	WLAN_OS_REPORT(("===========\n\n"));
-    if (tb_control->count < TB_NUM_ENTRIES)
-    {
-        pos = 0;
-    }
-    else
-    {
-        pos = (tb_control->pos + 1) % TB_NUM_ENTRIES;
-    }
-	for (j=0; (unsigned int)j < tb_min((unsigned int)TB_NUM_ENTRIES,(unsigned int)tb_control->count); j++)
-	{
-		WLAN_OS_REPORT(("%4i %08x %08x %08x %08x\n", j,
-			(int)tb_control->entry[pos].ts,
-			(int)tb_control->entry[pos].loc,
-			(int)tb_control->entry[pos].p1,
-			(int)tb_control->entry[pos].p2));
-		pos = (pos+1) % TB_NUM_ENTRIES;
-	}
-
-}
-
-int tb_sprintf(const char *format ,...)
-{
-
-	va_list ap;
-    int pos;
-
-    if ((tb_control->options & TB_OPTION_STOP) || ((pos = tb_next()) < 0))
-    {
-        return -1;
-    }
-    tb_control->entry[pos].loc = TB_ID;
-	va_start(ap,format);
-	vsprintf(&tb_control->entry[pos].msg[0], format, ap);
-    tb_autoprint();
-    return pos;
-}
-
-void tb_printf(void)
-{
-	int j, pos;
-    unsigned long saved_options=tb_control->options;
-
-    tb_set_option(TB_OPTION_STOP);
-	WLAN_OS_REPORT(("Trace Dump:\n"));
-	WLAN_OS_REPORT(("===========\n\n"));
-    if (tb_control->count < TB_NUM_ENTRIES)
-    {
-        pos = 0;
-    }
-    else
-    {
-        pos = (tb_control->pos + 1) % TB_NUM_ENTRIES;
-    }
-	for (j=0; (unsigned int)j < tb_min((unsigned int)TB_NUM_ENTRIES,(unsigned int)tb_control->count); j++)
-	{
-		WLAN_OS_REPORT(("%4i id=0x%8x %s \n", j,
-tb_control->entry[pos].loc, tb_control->entry[pos].msg));
-		pos = (pos+1) % TB_NUM_ENTRIES;
-	}
-    tb_control->options = saved_options;
-}
-void tb_set_option(unsigned long option)
-{
-    tb_control->options |= option;
-}
-
-void tb_reset_option(unsigned long option)
-{
-    tb_control->options &= ~option;
-}
-
-void tb_scan(void)
-{
-
-  int j,k, Size, nAllocs=0, nFrees=0;
-  unsigned long address, Allocs=0, Frees=0;
-
-  for (j=0; j < TB_NUM_ENTRIES; j++)
-  {
-    Size = (int)tb_control->entry[j].p2;
-    if (Size > 0) /* Alloc */
-    {
-      nAllocs += 1;
-      Allocs  += Size;
-      address = tb_control->entry[j].p1;
-      for (k=j+1; k < TB_NUM_ENTRIES; k++)
-      {
-	if (address == tb_control->entry[k].p1)
-	{
-	  if (tb_control->entry[k].p2 != -Size)
-	  {
-	    TB_PRINTF("Bad free size at 0x%lx address = 0x%lx Size = %ld Allocated = %d\n", 
-		   tb_control->entry[k].loc, tb_control->entry[k].p1, (long)tb_control->entry[k].p2, Size);
-	  }
-	  Frees  += tb_control->entry[k].p2;
-	  nFrees += 1;
-	  break;
-	}
-      }
-      if (k == TB_NUM_ENTRIES)
-      {
-	TB_PRINTF("Memory leak at 0x%lx address = 0x%lx Size = %d\n", 
-	       tb_control->entry[j].loc, address, Size);
-      }
-    } 
-  }
-  TB_PRINTF("tb_scan() Allocs = %ld nAllocs = %d Frees = %ld nFrees = %d\n", Allocs, nAllocs, Frees, nFrees);
-}
-
diff --git a/wl1271/platforms/os/linux/Makefile b/wl1271/platforms/os/linux/Makefile
deleted file mode 100644
index 0c56778..0000000
--- a/wl1271/platforms/os/linux/Makefile
+++ /dev/null
@@ -1,419 +0,0 @@
-
-##
-##
-## Application Make Flags
-##
-##
-
-#
-# Statically link the CU
-#
-STATIC_LIB ?= y
-
-#
-# Rebuild the supplicant
-#
-BUILD_SUPPL ?= n
-
-#
-# Supplicant
-# 
-SUPPL ?= ANDROID
-
-#
-# XCC
-# 
-XCC ?= n
-#ifeq ($(XCC),y)
-#	SUPPL = DEVICESCAPE
-#endif
-
-#
-# FW
-# 
-FW ?= 1273
-
-#
-# Full Async Mode
-# 
-FULL_ASYNC ?= n
-
-#
-# Build bmtrace performance tool
-# 
-BMTRACE ?= n
-
-#
-# Full Async Mode
-# 
-USE_IRQ_ACTIVE_HIGH ?= n
-
-#
-# bus test-driver
-#
-TEST ?= n
-
-#
-# Eth Support
-#
-ETH_SUPPORT ?= n
-
-#
-# Debug
-#
-DEBUG ?= y
-
-##
-##
-## File lists and locations
-##
-##
-
-#
-# DK_ROOT must be set prior to including common.inc
-#
-DK_ROOT = ../../..
-
-#
-# Includes common definitions and source file list
-#
-ifneq ($(KERNELRELEASE),)
-    include $(M)/$(DK_ROOT)/stad/build/linux/common.inc
-else
-    include $(DK_ROOT)/stad/build/linux/common.inc
-endif
-
-#
-# Location and filename of the driver .lib file.
-#
-DRIVER_LIB_DIR = $(DK_ROOT)/stad/build/linux
-DRIVER_LIB = $(DRIVER_LIB_DIR)/libestadrv.a
-
-#
-# Location and filename of the OS .lib file.
-#
-OS_COMMON_DIR = $(DK_ROOT)/platforms/os/common/build/linux
-OS_COMMON = $(OS_COMMON_DIR)/libuadrv.a
-
-#
-# Location and filename of the linux OS object file.
-#
-OS_LINUX_DIR = $(DK_ROOT)/platforms/os/linux/build
-OS_LINUX = $(OS_LINUX_DIR)/tiwlan_drv_stub.o
-OS_AUXILIARY_LIBS = ../$(DRIVER_LIB)\ ../$(OS_COMMON)
-
-#
-# Location and filename of the wlan user-mode programs root directory.
-#
-WLAN_CUDK_DIR = $(DK_ROOT)/CUDK
-
-#
-# Location and filename of the wlan configuraion utility CLI program.
-#
-WLAN_CU_CLI_DIR = $(DK_ROOT)/CUDK/configurationutility
-WLAN_CU_CLI = $(WLAN_CUDK_DIR)/output/wlan_cu
-
-#
-# Location and filename of the wlan logger utility program.
-#
-WLAN_LOGGER_DIR = $(DK_ROOT)/CUDK/logger
-WLAN_LOGGER = $(WLAN_CUDK_DIR)/output/wlan_logger
-
-#
-# Location and filename of the WLAN loader utility
-#
-WLAN_LOADER_DIR = $(DK_ROOT)/CUDK/tiwlan_loader/
-WLAN_LOADER = $(WLAN_CUDK_DIR)/output/tiwlan_loader
-
-#
-# Location and filename of the Linux Wireless Tools
-#
-
-#LINUX_WIRELESS_TOOLS_DIR = $(DK_ROOT)/CUDK/wireless_tools
-#LINUX_WIRELESS_TOOLS = $(LINUX_WIRELESS_TOOLS_DIR)/iwconfig
-
-#
-# The location of the supplicant depending on whether or not we rebuild it.
-#
-SUPPLICANT = $(WLAN_CUDK_DIR)/output/wpa_supplicant
-
-#
-# The combined linux module file.
-#
-OUTPUT_DIR = $(DK_ROOT)/platforms/os/linux
-OUTPUT_FILE = $(OUTPUT_DIR)/tiwlan_drv.ko
-
-##
-##
-## Build process
-##
-##
-
-#ifneq ($(KERNELRELEASE),)
-
-
-##
-##
-## This is the kernel build phase - set the appropriate arguments
-##
-##
-
-#
-# Intermediate object name - this should be renamed to the desired object name
-# after the kernel makefile finishes its work.
-#
-#       obj-m = linux.o
-
-#
-# List of object files the kernel makefile needs to compile.
-#
-#       linux-y = $(DRIVER_LIB) $(OS_COMMON) $(OS_LINUX)
-
-
-#else   # ifneq ($(KERNELRELEASE),)
-
-
-##
-##
-## This is the regular build phase - act according to the make actions
-##
-##
-
-#
-# The location of the kernel makefile
-#
-KERNEL_DIR ?= 
-
-#
-# Dont use the original mkfs.jffs2 on TI's servers (voice.img won't work)
-#
-MAKEJFFS2 ?= /apps/crosstool/bin/mkfs.jffs2
-
-#
-# Used to check if the necessary packages are present.
-#
-HAVE_NONGPL = $(wildcard $(DRIVER_LIB_DIR)/Makefile)
-HAVE_GPL = $(wildcard $(OS_LINUX_DIR)/Makefile)
-#
-# Combines all the three components to create the driver.
-#
-HOST_PLATFORM ?= *UNDEFINED*
-ifeq "$(HOST_PLATFORM)" "omap2430"
-TARGET = apps.tar
-endif
-ifeq "$(HOST_PLATFORM)" "omap3430"
-TARGET = apps.tar
-endif
-ifeq "$(HOST_PLATFORM)" "zoom2"
-TARGET = apps.tar
-endif
-ifeq "$(HOST_PLATFORM)" "zoom1"
-TARGET = apps.tar
-endif
-ifeq "$(HOST_PLATFORM)" "sholes"
-TARGET = apps.tar
-endif
-#
-.PHONY: all
-all: verifypackages .depend $(TARGET)
-help:
-	@echo 
-	@echo 'In order to select host platform one of the scripts: omap2430_env.tcsh or omap3430_env.tcsh must be run:'
-	@echo 'source omap2430_env.tcsh'
-	@echo 'or'
-	@echo 'source omap3430_env.tcsh'
-	@echo
-	@echo Default Compilation:
-	@echo ====================
-	@echo HOST_PLATFORM = $(HOST_PLATFORM)  // omap2430 or omap3430
-	@echo DEBUG = $(DEBUG) 			// Include debug prints and statistics
-	@echo INTR = $(INTR) 
-	@echo WSPI = $(WSPI) 
-	@echo XCC  = $(XCC) 
-	@echo SUPPL  = $(SUPPL) 		// WPA or DEVICESCAPE
-	@echo FPGA1273 = $(FPGA1273)		// FPGA device support
-	@echo FULL_ASYNC = $(FULL_ASYNC)     	// Use only Asynchronous bus transactions
-	@echo USE_IRQ_ACTIVE_HIGH = $(USE_IRQ_ACTIVE_HIGH)      // Use IRQ polarity high
-	@echo TEST = $(TEST)		     	// Build also the bus test-driver
-	@echo BMTRACE = $(BMTRACE)		// Build also the bmtrace performance tool
-	@echo TARGET  = $(TARGET)
-	@echo ETH_SUPPORT = $(ETH_SUPPORT)
-	@echo
-	@echo EXTRA CFLAGS  = $(EXTRA_CFLAGS)
-	@echo
-#
-# Create the images
-#
-.PHONY: suppl.img voice.img apps.img apps.tar $(BUS_DRV)
-MODULES_LIST = tiwlan_drv.ko
-TAR_FILE = $(HOST_PLATFORM)Binaries.tar
-
-apps.tar: apps
-ifeq ($(STRIP),y)
-	@echo stripping...
-	cd $(OUTPUT_DIR) && $(CROSS_COMPILE)strip -g --strip-unneeded $(MODULES_LIST)
-#	cd $(DK_ROOT)/external_drivers/$(HOST_PLATFORM)/Linux/$(BUS_DRV) && $(CROSS_COMPILE)strip -g $(BUS_DRIVER_MODULE)
-endif
-
-
-
-apps.img: apps
-	mkcramfs apps apps.cram
-	mkimgti -t data -o apps.img apps.cram
-
-apps: $(OUTPUT_FILE)
-#	rm -f $(OUTPUT_DIR)/$(BUS_DRV_REMOVE).ko $(OUTPUT_DIR)/$(BUS_DRV_REMOVE)_test
-#	cp -f $(DK_ROOT)/external_drivers/$(HOST_PLATFORM)/Linux/$(BUS_DRV)/$(BUS_DRIVER_MODULE) $(OUTPUT_DIR)
-
-voice.img: 
-	$(MAKEJFFS2) -l -r voice -e 0x10000 -o voice.jffs2
-	mkimgti -t data -o voice.img voice.jffs2
-
-suppl.img:
-ifeq ($(BUILD_SUPPL),y) 
-	cp -f $(SUPPLICANT) .
-endif
-	mkcramfs suppl suppl.cram
-	mkimgti -t data -o suppl.img suppl.cram
-
-#
-# Recursively cleans the driver, OS, bus and CLI files
-#
-.PHONY: clean
-clean:
-	$(MAKE) -C $(DRIVER_LIB_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) SUPPL=$(SUPPL) WSPI=$(WSPI) INTR=$(INTR) XCC=$(XCC) INFO=$(INFO) STATIC_LIB=$(STATIC_LIB) clean
-	$(MAKE) -C $(OS_COMMON_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) SUPPL=$(SUPPL) WSPI=$(WSPI) INTR=$(INTR) XCC=$(XCC) INFO=$(INFO) STATIC_LIB=$(STATIC_LIB) clean
-	$(MAKE) -C $(OS_LINUX_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) SUPPL=$(SUPPL) WSPI=$(WSPI) INTR=$(INTR) XCC=$(XCC) INFO=$(INFO) STATIC_LIB=$(STATIC_LIB) clean
-#	$(MAKE) -C $(DK_ROOT)/external_drivers/$(HOST_PLATFORM)/Linux/$(BUS_DRV) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_DIR) OUTPUT_DIR=$(shell pwd)/$(OUTPUT_DIR) clean
-#	$(MAKE) -C $(WLAN_CUDK_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BUILD_SUPPL=$(BUILD_SUPPL) SUPPL=$(SUPPL) XCC=$(XCC) clean
-#       $(MAKE) -C $(WLAN_CU_CLI_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BUILD_SUPPL=$(BUILD_SUPPL) SUPPL=$(SUPPL) XCC=$(XCC) cleanall
-#       $(MAKE) -C $(WLAN_LOADER_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BUILD_SUPPL=$(BUILD_SUPPL) SUPPL=$(SUPPL) XCC=$(XCC) clean
-#       $(MAKE) -C $(LINUX_WIRELESS_TOOLS_DIR) CROSS_COMPILE=$(CROSS_COMPILE) BUILD_SUPPL=$(BUILD_SUPPL) SUPPL=$(SUPPL) XCC=$(XCC) clean
-#       $(MAKE) -C $(DBG_MDL) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_DIR) clean
-
-#	@rm -f suppl.* apps.* voice.*
-#	@rm -f *spi*.ko sdio.ko
-#	@rm -f $(OUTPUT_DIR)/wlan_cu
-	@rm -f $(OUTPUT_DIR)/tiwlan_drv.ko 
-#	@rm -f wpa_supplicant 
-#	@rm -f $(FW_IMAGE_DEST_FILE)
-#	@rm -rf *.o *.a \.*.o.cmd *~ *.~* core .depend dep
-
-#       @rm -f tiwlan_drv.ko $(OUTPUT_DIR)/gwsi_drv.o $(OUTPUT_DIR)/debug_tools.o
-#       @rm -rf $(OUTPUT_DIR)/iwconfig apps/iwlist $(OUTPUT_DIR)/iwevent
-
-# in order to remove all .*.o.cmd 
-	@find ../../../. -type f -print | grep .o.cmd | xargs rm -f
-# in order to remove all *.order and *.symvers
-	@find ../../../. -type f -print | grep .order | xargs rm -f
-	@find ../../../. -type f -print | grep .symvers | xargs rm -f
-# in order to remove Module.markers file
-	@find ../../../. -type f -print | grep Module.markers | xargs rm -f
-# in order to remove the binaries tar
-#	@rm -rf $(TAR_FILE)
-
-
-#
-# Verifies that all necessary packages are present.
-#
-.PHONY: verifypackages
-verifypackages:
-ifeq ($(strip $(HAVE_GPL)),)
-	@echo "*** The GPL package does not seem to be present. You will need both the"
-	@echo "*** GPL package and the Non GPL package to execute this makefile."
-	exit 1
-endif
-
-ifeq ($(strip $(HAVE_NONGPL)),)
-	@echo "*** The Non GPL package does not seem to be present. You will need both the"
-	@echo "*** GPL package and the Non GPL package to execute this makefile."
-	exit 1
-endif
-
-
-# Builds the WSPI or SDIO driver
-#
-$(BUS_DRV):
-	$(MAKE) -C $(DK_ROOT)/external_drivers/$(HOST_PLATFORM)/Linux/$(BUS_DRV) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_DIR) OUTPUT_DIR=$(shell pwd)/$(OUTPUT_DIR) all
-
-
-#
-# Causes the driver and the configuration utility object files to get rebuilt
-#
-.depend:
-	rm -f $(OUTPUT_FILE) $(DRIVER_LIB) $(OS_COMMON) $(OS_LINUX) $(WLAN_CU_CLI) $(WLAN_LOADER) $(WLAN_LOGGER)
-
-
-#
-# Build the configuration utility; optionally rebuilds the supplicant
-#
-#$(SUPPLICANT): $(WLAN_CU_CLI)
-
-.PHONY: CU_DK
-CU_DK:
-#	$(MAKE) -C $(WLAN_CUDK_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) SUPPL=$(SUPPL) XCC=$(XCC) STATIC_LIB=$(STATIC_LIB) SG=$(SG) ETH_SUPPORT=$(ETH_SUPPORT)
-
-#$(WLAN_CU_CLI):
-#        $(MAKE) -C $(WLAN_CU_CLI_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) SUPPL=$(SUPPL) XCC=$(XCC) STATIC_LIB=$(STATIC_LIB) SG=$(SG)
-
-#$(LINUX_WIRELESS_TOOLS):
-#       $(MAKE) -C $(LINUX_WIRELESS_TOOLS_DIR) CROSS_COMPILE=$(CROSS_COMPILE)
-
-#$(WLAN_LOADER):
-#        $(MAKE) -C $(WLAN_LOADER_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) XCC=$(XCC) STATIC_LIB=$(STATIC_LIB) SG=$(SG)
-
-
-#
-# Recursively builds the driver lib file
-#
-$(DRIVER_LIB):
-	$(MAKE) -C $(DRIVER_LIB_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) SUPPL=$(SUPPL) WSPI=$(WSPI) INTR=$(INTR) XCC=$(XCC) INFO=$(INFO) STATIC_LIB=$(STATIC_LIB)
-
-
-#
-# Recursively builds the OS lib file
-#
-$(OS_COMMON):
-	$(MAKE) -C $(OS_COMMON_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) SUPPL=$(SUPPL) WSPI=$(WSPI) INTR=$(INTR) XCC=$(XCC) INFO=$(INFO) STATIC_LIB=$(STATIC_LIB) OS_AUXILIARY_LIBS+=../../$(DRIVER_LIB)
-
-
-#
-# Recursively builds the linux OS stub object file
-#
-$(OS_LINUX):
-	$(MAKE) -C $(OS_LINUX_DIR) CROSS_COMPILE=$(CROSS_COMPILE) DEBUG=$(DEBUG) BUILD_SUPPL=$(BUILD_SUPPL) SUPPL=$(SUPPL) WSPI=$(WSPI) INTR=$(INTR) XCC=$(XCC) INFO=$(INFO) STATIC_LIB=$(STATIC_LIB) OS_AUXILIARY_LIBS+=../$(DRIVER_LIB) OS_AUXILIARY_LIBS+=../$(OS_COMMON)
-
-
-#
-# Recursively builds the driver object file
-#
-$(OUTPUT_FILE): $(DRIVER_LIB) $(OS_COMMON) $(OS_LINUX)
-	mv $(OS_LINUX) $(OUTPUT_FILE)
-
-.PHONY: link
-link:
-	$(MAKE) -C $(KERNEL_DIR) M=`pwd` ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) modules
-	mv tiwlan_drv.ko $(OUTPUT_FILE)
-
-
-#
-# Builds the debug module object file
-#
-#$(DBG_MDL)/debug_module.ko:
-#       $(MAKE) -C $(DBG_MDL) KERNEL_DIR=$(KERNEL_DIR) 
-#       mv $(DBG_MDL)/debug_module.ko $(OUTPUT_DIR)/debug_tools.o
-
-
-#
-# Not in use?
-#
-TAGS: $(SRCS)
-	{ find ${DK_ROOT}/common -name '*.h' -print ; \
-	  find . -name '*.h' -print ; } | etags -
-	  etags -a $(SRCS)
-
-CTAGS: $(SRCS)
-	find ${DK_ROOT} -iname '*.[ch]' -print | ctags --c++-types=+px --excmd=pattern -L -
-
-
-#endif  # ifneq ($(KERNELRELEASE),)
diff --git a/wl1271/platforms/os/linux/build/Makefile b/wl1271/platforms/os/linux/build/Makefile
deleted file mode 100644
index 6ca370c..0000000
--- a/wl1271/platforms/os/linux/build/Makefile
+++ /dev/null
@@ -1,234 +0,0 @@
-
-
-##
-##
-## Make Flags
-##
-##
-
-NO_ARCH_STRCMP ?= y
-NO_USERMODE_WORKAROUND ?= n
-MEM_ALLOC_TRACE ?= n
-STACK_PROFILING_ON ?= n
-
-##
-##
-## File lists and locations
-##
-##
-
-#
-# DK_ROOT must be set prior to including common.inc
-#
-DK_ROOT = ../../../..
-
-#
-# Includes common definitions and source file list
-#
-ifneq ($(KERNELRELEASE),)
-    include $(M)/$(DK_ROOT)/stad/build/linux/common.inc
-    include $(M)/$(DK_ROOT)/platforms/os/linux/build/os_sources.inc
-else
-    include $(DK_ROOT)/stad/build/linux/common.inc
-    include $(DK_ROOT)/platforms/os/linux/build/os_sources.inc
-endif
-
-
-#
-# List of linux OS files needed to be compiled
-#
-OS_SRCS = \
-    $(DK_ROOT)/platforms/os/linux/src/WlanDrvIf.c \
-    $(DK_ROOT)/platforms/os/linux/src/osapi.c \
-    $(DK_ROOT)/platforms/os/linux/src/osmemapi.c \
-    $(DK_ROOT)/platforms/os/linux/src/osRgstry_parser.c \
-    $(DK_ROOT)/platforms/os/linux/src/ipc_k.c \
-    $(DK_ROOT)/platforms/os/linux/src/WlanDrvWext.c \
-    $(DK_ROOT)/platforms/os/linux/src/CmdInterpretWext.c \
-    $(DK_ROOT)/platforms/os/linux/src/RxBuf.c \
-    $(DK_ROOT)/platforms/hw/linux/host_platform.c \
-    $(DK_ROOT)/external_drivers/sdio/linux/SdioDrv.c
-#    $(DK_ROOT)/platforms/hw/host_platform_$(HOST_PLATFORM)/linux/host_platform.c
-
-ifeq ($(STACK_PROFILING_ON),y)    
-    OS_SRCS += $(DK_ROOT)/platforms/os/linux/src/stack_profile.c
-    EXTRA_CFLAGS += -D STACK_PROFILE
-endif     
-
-ifeq ($(NO_ARCH_STRCMP),y)
-    OS_SRCS += $(DK_ROOT)/platforms/os/linux/src/string.c 
-endif
-
-OS_INCS = $(DK_ROOT)/platforms/os/linux/inc $(DK_ROOT)/platforms/os/linux/src $(DK_ROOT)/platforms/os/common/inc
-#OS_INCS += $(DK_ROOT)/stad/src/core/EvHandler $(DK_ROOT)/Test $(DK_ROOT)/platforms/hw/host_platform_$(HOST_PLATFORM)/linux
-OS_INCS += $(DK_ROOT)/stad/src/core/EvHandler $(DK_ROOT)/Test $(DK_ROOT)/platforms/hw/linux
-
-ifeq ($(WSPI),y)
-    OS_SRCS += $(DK_ROOT)/platforms/hw/host_platform_$(HOST_PLATFORM)/linux/WspiAdapter.c 
-    OS_INCS += $(EXT_DRV)/$(HOST_PLATFORM)/Linux/spi
-endif
-
-ifeq ($(WSPI),n)
-#    OS_SRCS += $(DK_ROOT)/platforms/hw/host_platform_$(HOST_PLATFORM)/linux/SdioAdapter.c 
-#    OS_INCS += $(EXT_DRV)/$(HOST_PLATFORM)/Linux/sdio
-    OS_SRCS += $(DK_ROOT)/platforms/hw/linux/SdioAdapter.c 
-    OS_INCS += $(EXT_DRV)/sdio/linux
-endif
-
-OS_OBJS = $(patsubst %.c, %.o, $(OS_SRCS))
-
-#
-# OS include paths required for compilation.
-# 
-
-
-#
-# Firmware
-#
-FW_SRCS = ./firmware.c ./radio.c
-FW_OBJS = $(patsubst %.c, %.o, $(FW_SRCS))
-ifeq "$(FW)" "1273"
-FW_IMAGE = $(DK_ROOT)/fw/Latest/Fw1273.bin
-else
-FW_IMAGE = $(DK_ROOT)/fw/Latest/Fw1251rc1.bin
-endif
-RAD_IMAGE = $(DK_ROOT)/fw/Latest/nvs_map.bin
-
-
-#
-# Location and filename of the linux OS stub object file created by this makefile.
-#
-OUTPUT_DIR = $(DK_ROOT)/platforms/os/linux/build
-OUTPUT_FILE = $(OUTPUT_DIR)/tiwlan_drv_stub.o
-OUTPUT_LIB = $(OUTPUT_DIR)/tiwlan_drv_stub.a
-
-
-
-
-
-##
-##
-## Compilation Directives
-##
-##
-ifeq ($(NO_USERMODE_WORKAROUND),y)
-    EXTRA_CFLAGS += -D NO_USERMODE_WORKAROUND
-endif
-
-ifeq ($(POLLING_MODE),y)
-    EXTRA_CFLAGS += -D TIWLAN_OMAP1610_IRQ=0
-endif
-
-ifeq ($(MEM_ALLOC_TRACE),y)
-    EXTRA_CFLAGS += -D TI_MEM_ALLOC_TRACE
-endif
-
-
-
-
-
-##
-##
-## Build process
-##
-##
-
-ifneq ($(KERNELRELEASE),)
-
-
-	##
-	##
-	## This is the kernel build phase - set the appropriate arguments
-	##
-	##
-
-	#
-	# Adds the current directory as a prefix to all include directories.
-	#
-	EXTRA_CFLAGS += $(addprefix -I$(M)/, $(OS_DK_INCS) $(OS_INCS))
-
-	#
-	# Intermediate object name - this should be renamed to the desired object name
-	# after the kernel makefile finishes its work.
-	#
-	obj-m = tiwlan_drv.o
-	#
-	# List of object files the kernel makefile needs to compile.
-	#
-	tiwlan_drv-y = $(OS_OBJS) $(OS_AUXILIARY_LIBS)
-
-
-else	# ifneq ($(KERNELRELEASE),)
-
-
-##
-##
-## This is the regular build phase - act according to the make actions
-##
-##
-
-#
-# The location of the kernel makefile
-#
-KERNEL_DIR ?= $(KERNEL_DIR)
-
-
-#
-# Build the linux OS stub object file
-#
-.PHONY: all
-all: .depend $(OUTPUT_DIR) $(OUTPUT_FILE)
-
-#
-# Prints variables
-#
-.PHONY: help
-help:
-	@echo Default Compilation:	PLATFORM=$(PLATFORM) DEBUG=$(DEBUG) INTR=$(INTR) WSPI=$(WSPI) XCC=$(XCC) EXTRA CFLAGS: $(EXTRA_CFLAGS)
-
-
-#
-# Recursively cleans the linux OS stub object files
-#
-.PHONY: clean
-clean:
-	$(MAKE) -C $(KERNEL_DIR) M=`pwd` ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) clean
-	@rm -f *.o *.a .*.o.cmd *~ *.~* core .depend dep $(OS_OBJS) $(FW_SRCS) $(FW_OBJS)
-
-
-#
-# Causes the linux OS stub object file to get rebuilt
-#
-.depend:
-	rm -f $(OUTPUT_FILE)	
-
-#
-# Make sure the output directory exists
-#
-$(OUTPUT_DIR):
-	mkdir -p $(OUTPUT_DIR)
-
-#
-# Recursively builds the linux OS stub object file
-#
-$(OUTPUT_FILE):
-	$(MAKE) -C $(KERNEL_DIR) M=`pwd` ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) modules
-	$(CROSS_COMPILE)$(AR) rcs $(OUTPUT_LIB) $(OS_OBJS)
-	mv tiwlan_drv.ko $(OUTPUT_FILE)
-
-
-#
-# Handles firmware image and radio module for when firmware is statically linked
-#
-$(BIN2C): $(BIN2C).c
-	gcc $^ -o $@
-
-firmware.c: $(FW_IMAGE) $(BIN2C)
-	$(BIN2C) $< tiwlan_fwimage > $@
-
-radio.c: $(RAD_IMAGE) $(BIN2C)
-	$(BIN2C) $< tiwlan_radimage > $@
-
-
-endif	# ifneq ($(KERNELRELEASE),)
-      
diff --git a/wl1271/platforms/os/linux/build/common.inc b/wl1271/platforms/os/linux/build/common.inc
deleted file mode 100644
index 40126a5..0000000
--- a/wl1271/platforms/os/linux/build/common.inc
+++ /dev/null
@@ -1,181 +0,0 @@
-
-
-##
-##
-## Directory Locations
-##
-##
-
-COMMON      := $(DK_ROOT)/stad
-COMSRC      := $(COMMON)/src
-TWD         := $(DK_ROOT)/TWD
-UTILS       := $(DK_ROOT)/utils
-TESTSRC     := $(DK_ROOT)/Test
-LINUX_PFORM := $(DK_ROOT)/platforms/os/linux
-PLATFORMS   := $(DK_ROOT)/platforms
-EXT_DRV     := $(DK_ROOT)/external_drivers
-TXN         := $(DK_ROOT)/Txn
-
-##
-##
-## Make Flags
-##
-##
-
-#
-# Compile with FW1273 or FW1251
-#
-FW ?= 1273
-
-#
-# Compile with XCC support or not
-#
-XCC ?= n
-
-
-#
-# Compile with GEM support or not
-#
-GEM ?= n
-
-#
-# Choose the bus type (n for SDIO, y for WSPI)
-#
-WSPI ?= n
-
-#
-# Use periodic interrupt
-#
-INTR ?= y
-
-#
-# Enable or disable debugging
-#
-DEBUG ?= y
-KERNEL_DEBUGGER ?= n
-STRIP ?= y
-BMTRACE ?= n
-#
-# Enable or disable OS and init messages
-#
-INFO ?= n
-
-#
-# 1273 FPGA platform
-#
-FPGA1273 ?= n
-
-#
-# Enable trace buffer
-#
-TI_TRACE_BUFFER ?= n
-
-##
-##
-## Driver Compilation Directives
-##
-##
-ifeq "$(HOST_PLATFORM)" "omap2430"	
-	DK_DEFINES += -D HOST_PLATFORM_OMAP2430
-endif
-ifeq "$(HOST_PLATFORM)" "omap3430"
-	DK_DEFINES += -D HOST_PLATFORM_OMAP3430
-endif
-ifeq "$(HOST_PLATFORM)" "zoom2"
-	DK_DEFINES += -D HOST_PLATFORM_ZOOM2
-endif
-ifeq "$(HOST_PLATFORM)" "zoom1"
-	DK_DEFINES += -D HOST_PLATFORM_ZOOM1
-endif
-
-ifeq ($(XCC),y)
-    DK_DEFINES += -D XCC_MODULE_INCLUDED
-endif
-
-ifeq ($(GEM),y)
-    DK_DEFINES += -D GEM_SUPPORTED
-endif
-
-ifeq ($(INTR),n)
-    DK_DEFINES += -D PRIODIC_INTERRUPT
-endif    
-
-ifeq ($(DEBUG),y)
-    DK_DEFINES += -D TI_DBG
-    DK_DEFINES += -D REPORT_LOG
-    DK_DEFINES += -O2
-    DK_DEFINES += -D PRINTF_ROLLBACK
-else
-    DK_DEFINES += -D TI_DBG
-    DK_DEFINES += -U REPORT_LOG
-    DK_DEFINES += -O2
-endif
-ifeq ($(KERNEL_DEBUGGER),y)
-    DK_DEFINES += -g -O2
-	STRIP = n
-endif
-export KERNEL_DEBUGGER
-
-DK_DEFINES += -D __BYTE_ORDER_LITTLE_ENDIAN
-
-ifeq ($(TI_TRACE_BUFFER),y)
-   DK_DEFINES += -D TI_TRACE_BUF
-endif
-
-ifeq ($(BMTRACE),y)
-   DK_DEFINES += -D TIWLAN_BMTRACE
-endif
-
-##
-##
-## Platform Compilation Directives
-##
-##
-
-#
-# Bus Driver
-#
-ifeq ($(WSPI),y)
-    BUS_DRV = spi
-    BUS_DRV_REMOVE = sdio
-    BUS_DRIVER_MODULE = spi.ko
-    PFORM_DEFINES += -D WSPI
-else
-    BUS_DRV = sdio
-    BUS_DRV_REMOVE = spi
-    BUS_DRV = sdio
-    BUS_DRV_REMOVE = spi
-    BUS_DRIVER_MODULE = sdio.ko
-endif
-
-ifeq ($(INFO),y)
-    PFORM_DEFINES += -D OS_INFO_MESSAGES
-    PFORM_DEFINES += -D INIT_MESSAGES
-endif
-
-PFORM_DEFINES += -D HOST_COMPILE
-PFORM_DEFINES += -D FW_RUNNING_AS_STA
-PFORM_DEFINES += -D TNETW1273
-
-ifeq ($(FPGA1273),y)
-    PFORM_DEFINES += -D FPGA1273_STAGE_
-endif
-
-ifeq ($(FULL_ASYNC),y)
-    PFORM_DEFINES += -D FULL_ASYNC_MODE
-endif
-
-ifeq ($(USE_IRQ_ACTIVE_HIGH),y)
-    PFORM_DEFINES += -D USE_IRQ_ACTIVE_HIGH
-endif
-
-##
-##
-## Miscellaneous Compilation Directivcs
-##
-##
-
-EXTRA_CFLAGS += -fsigned-char
-EXTRA_CFLAGS += -D __LINUX__
-EXTRA_CFLAGS += $(DK_DEFINES)
-EXTRA_CFLAGS += $(PFORM_DEFINES)
diff --git a/wl1271/platforms/os/linux/build/os_sources.inc b/wl1271/platforms/os/linux/build/os_sources.inc
deleted file mode 100644
index 7578954..0000000
--- a/wl1271/platforms/os/linux/build/os_sources.inc
+++ /dev/null
@@ -1,109 +0,0 @@
-
-#start of OS_DK_INCS_FILES#   do not remove or change this comment
-OS_DK_INCS_FILES = \
-        $(COMMON)/Export_Inc/Ethernet.h \
-        $(COMMON)/Export_Inc/TI_IPC_Api.h \
-        $(COMMON)/Export_Inc/paramOut.h \
-        $(COMMON)/Export_Inc/tiwlnif.h \
-        $(COMMON)/Export_Inc/STADExternalIf.h \
-        $(COMMON)/Export_Inc/bssTypes.h \
-        $(COMMON)/Export_Inc/InternalCmdCodes.h \
-        $(COMMON)/Export_Inc/coreDefaultParams.h \
-        $(COMMON)/Export_Inc/TI_Results.h \
-        $(COMMON)/Export_Inc/privateCmd.h \
-        $(COMMON)/Export_Inc/p_buffer.h \
-        $(COMSRC)/Sta_Management/mlmeApi.h \
-        $(COMSRC)/Sta_Management/healthMonitor.h \
-        $(COMSRC)/Connection_Managment/rsnApi.h \
-        $(COMSRC)/Ctrl_Interface/DrvMain.h \
-        $(COMSRC)/Ctrl_Interface/CmdHndlr.h \
-        $(COMSRC)/Ctrl_Interface/CmdDispatcher.h \
-        $(COMSRC)/Ctrl_Interface/CmdInterpret.h \
-        $(COMSRC)/Ctrl_Interface/EvHandler.h \
-        $(COMSRC)/Data_link/txDataQueue_Api.h \
-        $(COMSRC)/Data_link/txMgmtQueue_Api.h \
-        $(COMSRC)/Ctrl_Interface/DrvMainModules.h \
-        $(COMSRC)/Application/roamingMngrTypes.h \
-        $(COMSRC)/Application/scanMngrTypes.h \
-        $(UTILS)/fsm.h \
-        $(UTILS)/report.h \
-        $(UTILS)/utils.h \
-        $(UTILS)/tidef.h \
-        $(UTILS)/rate.h \
-        $(UTILS)/802_11Defs.h \
-        $(UTILS)/osDot11.h \
-        $(UTILS)/commonTypes.h \
-        $(UTILS)/CmdInterfaceCodes.h \
-        $(UTILS)/tiQosTypes.h \
-        $(UTILS)/version.h \
-        $(TWD)/TWDriver/TWDriver.h \
-        $(TWD)/TWDriver/TWDriverMsr.h \
-        $(TWD)/TWDriver/TWDriverRate.h \
-        $(TWD)/TWDriver/TWDriverScan.h \
-        $(TWD)/TWDriver/Device.h \
-        $(TWD)/TWDriver/Device1273.h \
-        $(TWD)/Ctrl/Export_Inc/CmdQueue_api.h \
-        $(TWD)/MacServices/Export_Inc/MacServices_api.h \
-        $(TWD)/FW_Transfer/Export_Inc/rxXfer_api.h \
-        $(TWD)/FW_Transfer/Export_Inc/fwDebug_api.h \
-        $(TWD)/FirmwareApi/public_descriptors.h \
-        $(TWD)/FirmwareApi/public_infoele.h \
-        $(TWD)/FirmwareApi/public_types.h \
-        $(TWD)/FirmwareApi/public_host_int.h \
-        $(TWD)/FirmwareApi/public_radio.h \
-        $(TWD)/FirmwareApi/public_commands.h \
-        $(TWD)/FirmwareApi/public_event_mbox.h \
-        $(TWD)/TwIf/TwIf.h \
-        $(TXN)/BusDrv.h \
-        $(TXN)/TxnQueue.h \
-	$(EXT_APP)/Linux/bmtrace/Export_Inc \
-        $(TESTSRC)/debug.h
-
-#start of OS_DK_INCS_FILES_XCC#   do not remove or change this comment
-ifeq ($(XCC),y)
-    OS_DK_INCS_FILES_XCC = \
-        $(COMMON)/Export_Inc/XCC/paramOutXCC.h \
-        $(UTILS)/XCC/osDot11XCC.h
-
-    OS_DK_INCS_FILES += $(OS_DK_INCS_FILES_XCC)
-endif
-#end of OS_DK_INCS_FILES_XCC#   do not remove or change this comment
-
-#start of OS_DK_INCS_FILES#   do not remove or change this comment
-
-
-#start of OS_DK_INCS#   do not remove or change this comment
-OS_DK_INCS = \
-        $(COMMON)/Export_Inc \
-        $(COMSRC)/AirLink_Managment \
-        $(COMSRC)/Application \
-        $(COMSRC)/Connection_Managment \
-        $(COMSRC)/Ctrl_Interface \
-        $(COMSRC)/Data_link \
-        $(COMSRC)/Sta_Management \
-        $(UTILS) \
-        $(TWD) \
-        $(TWD)/Ctrl \
-        $(TWD)/Data_Service/Export_Inc \
-        $(TWD)/FW_Transfer/Export_Inc \
-        $(TWD)/Ctrl/Export_Inc \
-        $(TWD)/MacServices/Export_Inc \
-        $(TWD)/FirmwareApi \
-        $(TWD)/TwIf \
-        $(TWD)/MacServices \
-        $(TWD)/TWDriver \
-        $(TESTSRC) \
-        $(TXN)
-
-#start of OS_DK_INCS_XCC#   do not remove or change this comment
-ifeq ($(XCC),y)
-    OS_DK_INCS_XCC = \
-        $(COMMON)/Export_Inc/XCC \
-        $(COMSRC)/XCC \
-        $(UTILS)/XCC
-
-        OS_DK_INCS += $(OS_DK_INCS_XCC)
-endif
-#end of OS_DK_INCS_XCC#   do not remove or change this comment
-
-#start of OS_DK_INCS#   do not remove or change this comment
diff --git a/wl1271/platforms/os/linux/inc/CmdInterpretWext.h b/wl1271/platforms/os/linux/inc/CmdInterpretWext.h
deleted file mode 100644
index b5e0c5b..0000000
--- a/wl1271/platforms/os/linux/inc/CmdInterpretWext.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * CmdInterpretWext.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _CMD_INTERPRET_WEXT_H_
-#define _CMD_INTERPRET_WEXT_H_
-/*  Command interpreter header file */
-
-#include <linux/wireless.h>
-
-typedef struct 
-{
-    TI_UINT8 iw_auth_wpa_version;
-    TI_UINT8 iw_auth_cipher_pairwise;
-    TI_UINT8 iw_auth_cipher_group;
-    TI_UINT8 iw_auth_key_mgmt;
-    TI_UINT8 iw_auth_80211_auth_alg;
-} wext_auth_info;
-
-typedef struct 
-{
-    TI_HANDLE               hOs;            /* Pointer to the adapter object */
-	TI_UINT8				nickName[IW_ESSID_MAX_SIZE + 1]; 	/* Interface nickname */
-	wext_auth_info			wai;			/* Authentication parameters */
-	struct iw_statistics 	wstats;			/* Statistics information */
-    TI_HANDLE               hEvHandler;     /* Event-handler module handle */
-	TI_HANDLE				hCmdHndlr;		/* Handle to the Command-Handler */
-	TI_HANDLE				hCmdDispatch;	/* Handle to the Command-Dispatcher */
-	TI_HANDLE				hEvents[IPC_EVENT_MAX];	/* Contains handlers of events registered to */
-    TConfigCommand         *pAsyncCmd;       /* Pointer to the command currently being processed */
-    void                   *pAllocatedBuffer;
-    TI_UINT32              AllocatedBufferSize;
-} cmdInterpret_t;
-
-#define WLAN_PROTOCOL_NAME    "IEEE 802.11ABG"
-
-typedef enum _TIWLAN_KEY_FLAGS
-{
-	TIWLAN_KEY_FLAGS_TRANSMIT		= 0x80000000,           /* Used whenever key should be immidiately used for TX */
-	TIWLAN_KEY_FLAGS_PAIRWISE		= 0x40000000,           /* Used to indicate pairwise key */
-	TIWLAN_KEY_FLAGS_SET_KEY_RSC	= 0x20000000,           /* Used to set RSC (receive sequence counter) to driver */
-	TIWLAN_KEY_FLAGS_AUTHENTICATOR	= 0x10000000            /* Not used currently */
-} TIWLAN_KEY_FLAGS;
-
-#define TKIP_KEY_LENGTH		32
-#define AES_KEY_LENGTH      16
-#define WEP_KEY_LENGTH_40   5
-#define WEP_KEY_LENGTH_104   13
-
-#define MAX_THROUGHPUT 5500000
-
-#define WEXT_OK					0
-#define WEXT_NOT_SUPPORTED		-EOPNOTSUPP
-#define WEXT_INVALID_PARAMETER  -EINVAL
-
-#endif /* _CMD_INTERPRET_WEXT_H_ */
diff --git a/wl1271/platforms/os/linux/inc/RxBuf_linux.h b/wl1271/platforms/os/linux/inc/RxBuf_linux.h
deleted file mode 100644
index b853a7c..0000000
--- a/wl1271/platforms/os/linux/inc/RxBuf_linux.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * RxBuf_linux.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*	  MODULE:	buf.h												       */
-/*    PURPOSE:	manages the allocation/free and field access of the BUF    */
-/*																		   */
-/***************************************************************************/
-#ifndef _BUF_LINUX_H_
-#define _BUF_LINUX_H_
-
-#include "RxBuf.h"
-typedef struct _rx_head_
-{
-  struct sk_buff *skb;
-} rx_head_t;
-
-#define RX_HEAD_LEN_ALIGNED ((sizeof(rx_head_t) + 0x3) & ~0x3)
-
-#endif
-
diff --git a/wl1271/platforms/os/linux/inc/WlanDrvIf.h b/wl1271/platforms/os/linux/inc/WlanDrvIf.h
deleted file mode 100644
index 0e9ddbe..0000000
--- a/wl1271/platforms/os/linux/inc/WlanDrvIf.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * WlanDrvIf.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * src/WlanDrvIf.h
- *
- */
-
-#ifndef WLAN_DRV_IF_H
-#define WLAN_DRV_IF_H
-
-#include <linux/version.h>
-#include <linux/completion.h>
-#include <linux/netdevice.h>
-#include <linux/workqueue.h>
-#include <mach/gpio.h>
-#ifdef CONFIG_HAS_WAKELOCK
-#include <linux/wakelock.h>
-#endif
-
-#include "tidef.h"
-#include "WlanDrvCommon.h"
-#include "paramOut.h"
-#include "DrvMain.h"
-#include "windows_types.h"
-
-#define TIWLAN_DRV_NAME    "tiwlan"
-#define DRIVERWQ_NAME      "tiwlan_wq"
-#define TIWLAN_DRV_IF_NAME TIWLAN_DRV_NAME"%d"
-
-#ifdef TI_DBG
-#define ti_dprintf(log, fmt, args...) do { \
-   if (log != TIWLAN_LOG_OTHER) {   \
-      printk(KERN_INFO fmt, ## args); \
-   } \
-} while (0)
-#else
-#define ti_dprintf(log, fmt, args...)
-#endif
-
-
-#define ti_nodprintf(log, fmt, args...)
-
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
-#define NETDEV_SET_PRIVATE(dev, drv)    dev->priv = drv
-#define NETDEV_GET_PRIVATE(dev)         dev->priv
-#else
-#define NETDEV_SET_PRIVATE(dev, drv)    dev->ml_priv = drv
-#define NETDEV_GET_PRIVATE(dev)         dev->ml_priv
-#endif
-
-
-typedef enum
-{
-   TIWLAN_LOG_ERROR,
-   TIWLAN_LOG_INFO,
-   TIWLAN_LOG_OTHER,
-   TIWLAN_LOG_DUMMY
-} EWlanDrvIfLog;
-
-/*
- * TCmdRespUnion is defined for each OS:
- * For Linx and WM that defined is empty.
- * For OSE the new typedef includes all "Done" typedefs in union from EMP code (H files).
- */
-typedef struct
-{
-} TCmdRespUnion;
-
-
-/* Driver object */
-typedef struct
-{
-    TWlanDrvIfCommon         tCommon;   /* The driver object common part */
-
-    int                      irq;       /* The OS IRQ handle */
-    unsigned long            irq_flags; /* The IRQ flags */
-    struct workqueue_struct *tiwlan_wq; /* Work Queue */
-    struct work_struct       tWork;     /* The OS work handle. */
-    spinlock_t               lock;      /* The OS spinlock handle. */
-    unsigned long            flags;     /* For saving the cpu flags during spinlock */
-    TI_HANDLE                hPollTimer;/* Polling timer for working without interrupts (debug) */
-    struct net_device_stats  stats;     /* The driver's statistics for OS reports. */
-    struct sock             *wl_sock;   /* The OS socket used for sending it the driver events */
-    struct net_device       *netdev;    /* The OS handle for the driver interface. */
-    int                      wl_packet; /* Remember to stay awake */
-    int                      wl_count;  /* Wifi wakelock counter */
-#ifdef CONFIG_HAS_WAKELOCK
-    struct wake_lock         wl_wifi;   /* Wifi wakelock */
-    struct wake_lock         wl_rxwake; /* Wifi rx wakelock */
-#endif
-    NDIS_HANDLE              ConfigHandle;/* Temp - For Windows compatibility */
-
-} TWlanDrvIfObj, *TWlanDrvIfObjPtr;
-
-
-#define NETDEV(drv) (((TWlanDrvIfObj*)(drv))->netdev)
-
-#endif /* WLAN_DRV_IF_H*/
diff --git a/wl1271/platforms/os/linux/inc/arch_ti.h b/wl1271/platforms/os/linux/inc/arch_ti.h
deleted file mode 100644
index edc8c85..0000000
--- a/wl1271/platforms/os/linux/inc/arch_ti.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * arch_ti.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * inc/arch_ti.h
- *
- * Architecture and OS specific include files
- *
- */
-
-#ifndef __ARCH_TI_H__
-#define __ARCH_TI_H__
-
-#define __NO_VERSION__
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-
-#endif
diff --git a/wl1271/platforms/os/linux/inc/ioctl_init.h b/wl1271/platforms/os/linux/inc/ioctl_init.h
deleted file mode 100644
index b4ea56f..0000000
--- a/wl1271/platforms/os/linux/inc/ioctl_init.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * ioctl_init.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * inc/ioctl_init.h
- *
- */
-
-#ifndef TI1610_IOCTL_INIT
-#define TI1610_IOCTL_INIT
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/netdevice.h>
-
-#ifndef DRIVER_NAME
-#define DRIVER_NAME "TIWLAN"
-#endif
-
-#if defined(DEBUG_MESSAGES)
-#  define print_deb(fmt, arg...) printk(KERN_INFO DRIVER_NAME ": " fmt,##arg)
-#else
-#  define print_deb(fmt, arg...) 
-#endif
-
-#if defined(OS_INFO_MESSAGES)
-#  define print_info(fmt, arg...) printk(KERN_INFO DRIVER_NAME ": " fmt,##arg)
-#else
-#  define print_info(fmt, arg...)
-#endif
-
-#ifndef print_err
-#  define print_err(fmt, arg...) printk(KERN_ERR DRIVER_NAME ": " fmt,##arg)
-#endif
-
-
-#endif /* TI1610_IOCTL_INIT */
diff --git a/wl1271/platforms/os/linux/inc/osTIType.h b/wl1271/platforms/os/linux/inc/osTIType.h
deleted file mode 100644
index 8549dfb..0000000
--- a/wl1271/platforms/os/linux/inc/osTIType.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * osTIType.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * inc/osTIType.h
- *
- * This module contains eSTA-DK types definitions
- *
- */
-
-#ifndef __OSTITYPE_H__
-#define __OSTITYPE_H__
-
-#ifdef __KERNEL__
-#include <linux/compiler.h>	/* likely()/unlikely() */
-#endif
-
-typedef char                TI_CHAR;
-typedef signed char         TI_INT8;
-typedef unsigned char       TI_UINT8;
-typedef signed short        TI_INT16;
-typedef unsigned short      TI_UINT16;
-typedef signed int          TI_INT32;
-typedef unsigned int        TI_UINT32;
-typedef signed long long    TI_INT64;
-typedef unsigned long long  TI_UINT64;
-
-#define TI_CONST64(x)       (x##LL)
-
-#define TI_LIKELY           likely
-#define TI_UNLIKELY         unlikely
-
-#define INLINE              inline
-
-#endif /* __OSTITYPE_H__*/
-
-
diff --git a/wl1271/platforms/os/linux/inc/osdot11nousermode.h b/wl1271/platforms/os/linux/inc/osdot11nousermode.h
deleted file mode 100644
index 8df6ff3..0000000
--- a/wl1271/platforms/os/linux/inc/osdot11nousermode.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * osdot11nousermode.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*--------------------------------------------------------------------------*/
-/* Module:		osDot11.h */
-/**/
-/* Purpose:		*/
-/**/
-/*--------------------------------------------------------------------------*/
-#ifndef __OSDOT11NO_USER_MODE_H__
-#define __OSDOT11NO_USER_MODE_H__
-
-#define OID_802_11_CAPABILITY					0x0D010218
-#define OID_802_11_PMKID						0x0D010219
-
-#endif
diff --git a/wl1271/platforms/os/linux/inc/stack_profile.h b/wl1271/platforms/os/linux/inc/stack_profile.h
deleted file mode 100644
index 90c114b..0000000
--- a/wl1271/platforms/os/linux/inc/stack_profile.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _STACK_PROFILE_H_
-#define _STACK_PROFILE_H_
-unsigned long check_stack(unsigned long *base);
-unsigned long check_stack_start(unsigned long *base, unsigned long real_sp,
-				int id);
-unsigned long check_stack_stop(unsigned long *base, int id);
-unsigned long save_stack_context(char *name, int id);
-void print_stack(int id);
-#endif
diff --git a/wl1271/platforms/os/linux/inc/tracebuf.h b/wl1271/platforms/os/linux/inc/tracebuf.h
deleted file mode 100644
index 441ef1e..0000000
--- a/wl1271/platforms/os/linux/inc/tracebuf.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * tracebuf.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Benchmark tracing utility
- */
-#include <linux/module.h>
-
-#ifndef TB_TRACE_H
-
-#define TB_TRACE_H
-
-#define TB_MALLOC(size) kmalloc(size, GFP_KERNEL);
-#define TB_FREE         kfree
-#define TB_PRINTF       printk
-#define TB_ID           current->pid
-
-#endif
diff --git a/wl1271/platforms/os/linux/inc/wbuf.h b/wl1271/platforms/os/linux/inc/wbuf.h
deleted file mode 100644
index 4894cd6..0000000
--- a/wl1271/platforms/os/linux/inc/wbuf.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * wbuf.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*	  MODULE:	wbuf.h												       */
-/*    PURPOSE:	manages the allocation/free and field access of the WBUF   */
-/*																		   */
-/***************************************************************************/
-#ifndef _WBUF_H_
-#define _WBUF_H_
-
-#include <linux/version.h>
-#include <linux/skbuff.h>
-#include "tidef.h"
-#include "queue.h"
-
-typedef void WBUF;
-
-/* Packet types */
-typedef enum
-{
-	TX_PKT_TYPE_MGMT        = 0x01,
-	TX_PKT_TYPE_EAPOL       = 0x02,
-	TX_PKT_TYPE_ETHER       = 0x04,	/* Data packets from the Network interface. */
-	TX_PKT_TYPE_WLAN_DATA	= 0x08 	/* Currently includes Null and IAPP packets. */
-} TX_PKT_TYPE;
-
-#define TX_PKT_FLAGS_LINK_TEST		0x1   /* Tx-Packet-Flag */
-#define WSPI_PAD_BYTES              16    /* Add padding before data buffer for WSPI overhead */
-
-/* user callback definition (in tx complete) */
-typedef void *CB_ARG;
-typedef void (*CB_FUNC)(CB_ARG cb_arg);
-
-/*
- * wbuf user fields: 
- */
-typedef struct 
-{
-    TQueNodeHdr     queNodeHdr; /* The header used for queueing the WBUF            */
-	TX_PKT_TYPE		pktType;	/* wbuf packet type									*/
-	CB_FUNC			cb_func;	/* callback function to use in tx complete			*/
-	CB_ARG			cb_arg;		/* callback argument to use in tx complete			*/
-    TI_UINT8		Tid;		/* WLAN TID (traffic identity)						*/
-    TI_UINT8		hdrLen;		/* WLAN header length, not including alignment pad. */
-    TI_UINT8		flags;		/* Some application flags, see Tx-Packet-Flags defs above. */
-} WBUF_PARAMS;
-
-
-
-#define WBUF_DATA(pWbuf)			( ((struct sk_buff *)(pWbuf))->data )
-#define WBUF_LEN(pWbuf)				( ((struct sk_buff *)(pWbuf))->len )
-#define WBUF_PRIORITY(pWbuf)		( ((struct sk_buff *)(pWbuf))->priority )
-#define WBUF_DEV(pWbuf)				( ((struct sk_buff *)(pWbuf))->dev )
-#define WBUF_DEV_SET(pWbuf,pDev)    ( ((struct sk_buff *)(pWbuf))->dev) = ((struct net_device *)(pDev))
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
-#define WBUF_STAMP(pWbuf)			( ((struct sk_buff *)(pWbuf))->tstamp.off_usec )
-#else
-#define WBUF_STAMP(pWbuf)			( ((struct sk_buff *)(pWbuf))->tstamp.tv.nsec )
-#endif
-#define WBUF_CB(pWbuf)				( ((struct sk_buff *)(pWbuf))->cb )
-#define WBUF_PKT_TYPE(pWbuf)		( ((WBUF_PARAMS *)&(WBUF_CB(pWbuf)))->pktType )
-#define WBUF_CB_FUNC(pWbuf)		    ( ((WBUF_PARAMS *)&(WBUF_CB(pWbuf)))->cb_func )
-#define WBUF_CB_ARG(pWbuf)		    ( ((WBUF_PARAMS *)&(WBUF_CB(pWbuf)))->cb_arg )
-#define WBUF_TID(pWbuf)		        ( ((WBUF_PARAMS *)&(WBUF_CB(pWbuf)))->Tid )
-#define WBUF_HDR_LEN(pWbuf)			( ((WBUF_PARAMS *)&(WBUF_CB(pWbuf)))->hdrLen )
-#define WBUF_FLAGS(pWbuf)			( ((WBUF_PARAMS *)&(WBUF_CB(pWbuf)))->flags )
-
-/* The offset of the node-header field from the WBUF entry (for queueing) */
-#define WBUF_NODE_HDR_OFFSET    \
-		( (unsigned long) &( ( (WBUF_PARAMS *) &( ( (struct sk_buff *)0 )->cb ) )->queNodeHdr ) )
-
-/* 
- * Allocate WBUF for Tx/Rx packets.
- * Add 16 bytes before the data buffer for WSPI overhead!
- */
-static inline WBUF *WbufAlloc (TI_HANDLE hOs, TI_UINT32 len)
-{
-	gfp_t flags = (in_atomic()) ? GFP_ATOMIC : GFP_KERNEL;
-	WBUF *pWbuf = alloc_skb(len + WSPI_PAD_BYTES, flags);
-
-	if (!pWbuf)
-	{
-		return NULL;
-	}
-	WBUF_DATA (pWbuf) += WSPI_PAD_BYTES;
-	return pWbuf;
-}
-
-#define WbufFree(hOs, pWbuf)		( dev_kfree_skb((struct sk_buff *)pWbuf) )
-#define WbufReserve(hOs, pWbuf,len)	( skb_reserve((struct sk_buff *)pWbuf,(int)len) )
-
-#endif
diff --git a/wl1271/platforms/os/linux/inc/windows_types.h b/wl1271/platforms/os/linux/inc/windows_types.h
deleted file mode 100644
index e94602f..0000000
--- a/wl1271/platforms/os/linux/inc/windows_types.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * windows_types.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * inc/windows_types.h
- *
- */
-
-#ifndef _WINDOWS_TYPES_H
-#define _WINDOWS_TYPES_H
-
-#include "tidef.h"
-#include "ioctl_init.h"
-
-/*typedef TI_BOOL    TI_BOOL, *PBOOLEAN;*/
-typedef TI_UINT16    USHORT, *PUSHORT;
-typedef char      CHAR;
-typedef const char * LPCSTR;
-
-#define IN
-#define OUT
-#define NDIS_MAX_STRING_LEN   361
-
-typedef struct _STRING {
-  USHORT  Length;
-  USHORT  MaximumLength;
-  TI_INT8*  Buffer;
-} ANSI_STRING, *PANSI_STRING, UNICODE_STRING, *PUNICODE_STRING;
-
-typedef ANSI_STRING NDIS_STRING, *PNDIS_STRING;
-typedef void * NDIS_HANDLE;
-typedef int NDIS_STATUS, *PNDIS_STATUS;
-
-
-typedef TI_UINT32 NDIS_OID, *PNDIS_OID;
-#define PCI_TYPE0_ADDRESSES             6
-#define PCI_TYPE1_ADDRESSES             2
-/*typedef LARGE_INTEGER NDIS_PHYSICAL_ADDRESS; */
-typedef void* *PDEVICE_OBJECT, *PDRIVER_OBJECT;
-typedef TI_UINT32 NDIS_MINIPORT_INTERRUPT, NDIS_MINIPORT_TIMER, NDIS_SPIN_LOCK;
-typedef TI_UINT32 PNDIS_PACKET, *PPNDIS_PACKET;
-
-typedef enum _NDIS_PARAMETER_TYPE {
-  NdisParameterInteger,
-  NdisParameterHexInteger,
-  NdisParameterString,
-  NdisParameterMultiString,
-  NdisParameterBinary
-} NDIS_PARAMETER_TYPE, *PNDIS_PARAMETER_TYPE;
-
-typedef struct {
-    USHORT  Length;
-    void*  Buffer;
-} BINARY_DATA;
-
-typedef struct _NDIS_CONFIGURATION_PARAMETER {
-  NDIS_PARAMETER_TYPE  ParameterType;
-  union {
-    TI_UINT32  IntegerData;
-    NDIS_STRING  StringData;
-    BINARY_DATA  BinaryData;
-  } ParameterData;
-  char StringBuffer[NDIS_MAX_STRING_LEN];
-} NDIS_CONFIGURATION_PARAMETER, *PNDIS_CONFIGURATION_PARAMETER;
-
-typedef TI_UINT32 NTSTATUS;
-
-#ifndef NDIS_STATUS_SUCCESS
-# define NDIS_STATUS_SUCCESS                        ((NDIS_STATUS)0x00000000L)
-# define NDIS_STATUS_PENDING                        ((NDIS_STATUS)0x00000103L)
-# define NDIS_STATUS_RESET_END                      ((NDIS_STATUS)0x40010005L)
-# define NDIS_STATUS_MEDIA_SPECIFIC_INDICATION      ((NDIS_STATUS)0x40010012L)
-# define NDIS_STATUS_FAILURE                        ((NDIS_STATUS)0xC0000001L)
-# define NDIS_STATUS_ADAPTER_NOT_FOUND              ((NDIS_STATUS)0xC0010006L)
-# define NDIS_STATUS_INVALID_LENGTH                 ((NDIS_STATUS)0xC0010014L)
-# define NDIS_STATUS_BUFFER_TOO_SHORT               ((NDIS_STATUS)0xC0010016L)
-# define NDIS_STATUS_INVALID_OID                    ((NDIS_STATUS)0xC0010017L)
-#endif        /* NDIS_STATUS_SUCCESS */
-
-#define STATUS_SUCCESS                0
-#define STATUS_INVALID_PARAMETER     -1
-
-#define NdisZeroMemory(p, size)      os_memoryZero( NULL, p, size )
-#define NdisMoveMemory(d, s, size)   os_memoryCopy( NULL, d, s, size )
-
-NDIS_STATUS NdisUnicodeStringToAnsiString( IN OUT PANSI_STRING  DestinationString,
-    IN PUNICODE_STRING  SourceString );
-void NdisReadConfiguration( OUT PNDIS_STATUS  Status, OUT PNDIS_CONFIGURATION_PARAMETER  *ParameterValue,
-    IN NDIS_HANDLE  ConfigurationHandle, IN PNDIS_STRING  Keyword, IN NDIS_PARAMETER_TYPE  ParameterType );
-void NdisWriteConfiguration( OUT PNDIS_STATUS  Status, IN NDIS_HANDLE  ConfigurationHandle,
-    IN PNDIS_STRING  Keyword, IN PNDIS_CONFIGURATION_PARAMETER  ParameterValue );
-
-typedef struct _NDIS_PACKET_POOL {
-  NDIS_SPIN_LOCK  SpinLock;
-  struct _NDIS_PACKET *FreeList;
-  TI_UINT32  PacketLength;
-  TI_UINT8  Buffer[1];
-} NDIS_PACKET_POOL, * PNDIS_PACKET_POOL;
-
-typedef enum _NDIS_802_11_STATUS_TYPE
-{
-    Ndis802_11StatusType_Authentication,
-    Ndis802_11StatusTypeMax    /* not a real type, defined as an upper bound*/
-} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
-
-typedef TI_UINT8   NDIS_802_11_MAC_ADDRESS[6];
-
-typedef struct _NDIS_802_11_STATUS_INDICATION
-{
-    NDIS_802_11_STATUS_TYPE StatusType;
-} NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
-
-typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST
-{
-    TI_UINT32 Length;            /* Length of structure*/
-    NDIS_802_11_MAC_ADDRESS Bssid;
-    TI_UINT32 Flags;
-} NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
-
-typedef TI_INT32 NDIS_802_11_RSSI;           /* in dBm*/
-
-typedef struct _NDIS_802_11_TEST
-{
-	TI_UINT32 Length;
-	TI_UINT32 Type;
-	union {
-		struct _AuthenticationEvent {
-            NDIS_802_11_STATUS_INDICATION Status;
-            NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
-		} AuthenticationEvent;
-		NDIS_802_11_RSSI RssiTrigger;
-	} UNION_NDIS_TEST;
-} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
-
-/* Added new encryption types*/
-/* Also aliased typedef to new name*/
-typedef enum _NDIS_802_11_WEP_STATUS
-{
-    Ndis802_11WEPEnabled,
-    Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
-    Ndis802_11WEPDisabled,
-    Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
-    Ndis802_11WEPKeyAbsent,
-    Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
-    Ndis802_11WEPNotSupported,
-    Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
-    Ndis802_11Encryption2Enabled,
-    Ndis802_11Encryption2KeyAbsent,
-    Ndis802_11Encryption3Enabled,
-    Ndis802_11Encryption3KeyAbsent
-} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
-  NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
-
-#ifdef TI_DBG
-#ifdef __KERNEL__
-#define DbgPrint     printk
-#else
-#define DbgPrint     printf
-#endif
-#else
-#define DbgPrint
-#endif
-
-#endif /* _WINDOWS_TYPES_H */
diff --git a/wl1271/platforms/os/linux/src/CmdInterpretWext.c b/wl1271/platforms/os/linux/src/CmdInterpretWext.c
deleted file mode 100644
index 64e6d41..0000000
--- a/wl1271/platforms/os/linux/src/CmdInterpretWext.c
+++ /dev/null
@@ -1,1971 +0,0 @@
-/*
- * CmdInterpretWext.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#include "tidef.h"
-#include "WlanDrvIf.h"
-#include "tiwlnif.h"
-#include "osDot11.h"
-#include "802_11Defs.h"
-#include "paramOut.h"
-#include "coreDefaultParams.h"
-#include "version.h"
-#include "osApi.h"
-#include "CmdHndlr.h"
-#include "CmdInterpret.h"
-#include "CmdInterpretWext.h"
-#include "TI_IPC_Api.h"
-#include "WlanDrvIf.h"
-#include <linux/wireless.h>
-#include <linux/if_arp.h>
-#include <asm/uaccess.h>
-#include <net/iw_handler.h>
-#include "privateCmd.h"
-#include "DrvMain.h"
-#include "CmdDispatcher.h"
-#include "EvHandler.h"
-#include "admCtrl.h"
-#include "freq.h"
-
-static TI_INT32 cmdInterpret_Event(IPC_EV_DATA* pData);
-static int cmdInterpret_setSecurityParams (TI_HANDLE hCmdInterpret);
-static int cmdInterpret_initEvents(TI_HANDLE hCmdInterpret);
-static int cmdInterpret_unregisterEvents(TI_HANDLE hCmdInterpret, TI_HANDLE hEvHandler);
-
-#define WEXT_FREQ_CHANNEL_NUM_MAX_VAL	1000
-#define WEXT_FREQ_KHZ_CONVERT			3
-#define WEXT_FREQ_MUL_VALUE				500000
-#define WEXT_MAX_RATE_VALUE				63500000
-#define WEXT_MAX_RATE_REAL_VALUE		65000000
-
-#define CHECK_PENDING_RESULT(x,y)     if (x == COMMAND_PENDING) { os_printf ("Unexpected COMMAND PENDING result (cmd = 0x%x)\n",y->paramType);  break; }
-#define CALCULATE_RATE_VALUE(x)                   ((x & 0x7f) * WEXT_FREQ_MUL_VALUE);
-
-static const char *ieee80211_modes[] = {
-    "?", "IEEE 802.11 B", "IEEE 802.11 A", "IEEE 802.11 BG", "IEEE 802.11 ABG"
-};
-#ifdef XCC_MODULE_INCLUDED
-typedef struct
-{
-
-    TI_UINT8        *assocRespBuffer;
-    TI_UINT32       assocRespLen;
-} cckm_assocInformation_t;
-
-#define ASSOC_RESP_FIXED_DATA_LEN 6
-/* 1500 is the recommended size by the Motorola Standard team. TI recommendation is 700 */
-#define MAX_BEACON_BODY_LENGTH    1500
-#define BEACON_HEADER_FIX_SIZE    12
-#define CCKM_START_EVENT_SIZE     23 /* cckm-start string + timestamp + bssid + null */
-#endif
-
-/* Initialize the CmdInterpreter module */
-TI_HANDLE cmdInterpret_Create (TI_HANDLE hOs)
-{
-    cmdInterpret_t *pCmdInterpret;
-
-    /* Allocate memory for object */
-    pCmdInterpret = os_memoryAlloc (hOs, sizeof(cmdInterpret_t));
-
-    /* In case of failure -> return NULL */
-    if (!pCmdInterpret)
-    {
-        os_printf ("cmdInterpret_init: failed to allocate memory...aborting\n");
-        return NULL;
-    }
-
-    /* Clear all fields in cmdInterpreter module object */
-    os_memoryZero (hOs, pCmdInterpret, sizeof (cmdInterpret_t));
-
-    /* Save handlers */
-    pCmdInterpret->hOs = hOs;
-
-    /* Return pointer to object */
-    return (TI_HANDLE)pCmdInterpret;
-}
-
-
-/* Deinitialize the cmdInterpreter module */
-TI_STATUS cmdInterpret_Destroy (TI_HANDLE hCmdInterpret, TI_HANDLE hEvHandler)
-{
-    cmdInterpret_t *pCmdInterpret = (cmdInterpret_t *)hCmdInterpret;
-
-    /* Unregister events */
-    cmdInterpret_unregisterEvents ((TI_HANDLE)pCmdInterpret, hEvHandler);
-
-    /* Release allocated memory */
-    os_memoryFree (pCmdInterpret->hOs, pCmdInterpret, sizeof(cmdInterpret_t));
-
-    return TI_OK;
-}
-
-
-void cmdInterpret_Init (TI_HANDLE hCmdInterpret, TStadHandlesList *pStadHandles)
-{
-    cmdInterpret_t *pCmdInterpret = (cmdInterpret_t *)hCmdInterpret;
-
-    pCmdInterpret->hCmdHndlr    = pStadHandles->hCmdHndlr;
-    pCmdInterpret->hEvHandler   = pStadHandles->hEvHandler;
-    pCmdInterpret->hCmdDispatch = pStadHandles->hCmdDispatch;
-
-    /* Register to driver events */
-    cmdInterpret_initEvents (hCmdInterpret);
-}
-
-
-/* Handle a single command */
-int cmdInterpret_convertAndExecute(TI_HANDLE hCmdInterpret, TConfigCommand *cmdObj)
-{
-    cmdInterpret_t *pCmdInterpret = (cmdInterpret_t *)hCmdInterpret;
-    paramInfo_t *pParam;
-    TI_STATUS res = TI_NOK;
-    int i,j;
-
-    union iwreq_data *wrqu = (union iwreq_data *)cmdObj->buffer1;
-
-    cmdObj->return_code = WEXT_NOT_SUPPORTED;
-    pParam = (paramInfo_t *)os_memoryAlloc(pCmdInterpret->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-        return res;
-    /* Check user request */
-    switch (cmdObj->cmd)
-    {
-
-        /* get name == wireless protocol - used to verify the presence of Wireless Extensions*/
-    case SIOCGIWNAME:
-        os_memoryCopy(pCmdInterpret->hOs, cmdObj->buffer1, WLAN_PROTOCOL_NAME, IFNAMSIZ);
-        res = TI_OK;
-        break;
-
-        /* Set channel / frequency */
-    case SIOCSIWFREQ:
-        {
-			int freq = wrqu->freq.m;
-
-            /* If the input is frequency convert it to channel number -
-				See explanation in [struct iw_freq] definition in wireless_copy.h*/
-            if (freq >= WEXT_FREQ_CHANNEL_NUM_MAX_VAL)
-            {
-				int div = WEXT_FREQ_KHZ_CONVERT - wrqu->freq.e;
-                /* Convert received frequency to a value in KHz*/
-				if (div >= 0)
-                {
-                    while (div-- > 0)
-                    {
-                        freq /= 10;             /* down convert to KHz */
-                    }
-                }
-                else
-                {
-                    while (div++ < 0)          /* up convert to KHz */
-                    {
-                        freq *= 10;
-                    }
-                }
-				
-                /* Convert KHz frequency to channel number*/
-                freq = Freq2Chan(freq); /* convert to chan num */
-            }
-                
-            /* If there is a given channel */
-            if (freq != 0)
-            {
-                pParam->paramType = SITE_MGR_DESIRED_CHANNEL_PARAM;
-                pParam->paramLength = sizeof(TI_UINT32);
-                pParam->content.siteMgrDesiredChannel = freq;
-
-                res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch, pParam);
-                CHECK_PENDING_RESULT(res,pParam)
-            }
-            break;
-        }
-
-        /* Get channel / frequency */
-    case SIOCGIWFREQ:
-        {
-            pParam->paramType = SITE_MGR_CURRENT_CHANNEL_PARAM;
-            pParam->paramLength = sizeof(TI_UINT32);
-
-            res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch, pParam);
-            if(res == NO_SITE_SELECTED_YET)
-                res = TI_OK;
-
-            CHECK_PENDING_RESULT(res,pParam)
-
-            if (res == TI_OK)
-            {
-                wrqu->freq.m = pParam->content.siteMgrCurrentChannel;
-                wrqu->freq.e = 3;
-                wrqu->freq.i = 0;
-            }
-            break;
-        }
-
-        /* Set Mode (Adhoc / infrastructure) */
-    case SIOCSIWMODE:
-        {
-            pParam->paramType = SME_DESIRED_BSS_TYPE_PARAM;
-            pParam->paramLength = sizeof(ScanBssType_e);
-
-            switch (wrqu->mode)
-            {
-            case IW_MODE_AUTO:
-                pParam->content.smeDesiredBSSType = BSS_ANY;
-                break;
-            case IW_MODE_ADHOC:
-                pParam->content.smeDesiredBSSType = BSS_INDEPENDENT;
-                break;
-            case IW_MODE_INFRA:
-                pParam->content.smeDesiredBSSType = BSS_INFRASTRUCTURE;
-                break;
-            default:
-                res = -EOPNOTSUPP;
-                goto cmd_end;
-            }
-
-            res = cmdDispatch_SetParam(pCmdInterpret->hCmdDispatch, pParam);
-            CHECK_PENDING_RESULT(res,pParam)
-
-            /* also set the site mgr desired mode */
-            pParam->paramType = SITE_MGR_DESIRED_BSS_TYPE_PARAM;
-            res = cmdDispatch_SetParam(pCmdInterpret->hCmdDispatch, pParam);
-            CHECK_PENDING_RESULT(res,pParam)
-
-            break;
-        }
-
-        /* Get Mode (Adhoc / infrastructure) */
-    case SIOCGIWMODE:
-        {
-            pParam->paramType = SME_DESIRED_BSS_TYPE_PARAM;
-            pParam->paramLength = sizeof(ScanBssType_e);
-            res = cmdDispatch_GetParam(pCmdInterpret->hCmdDispatch, pParam);
-            CHECK_PENDING_RESULT(res,pParam)
-
-            switch (pParam->content.smeDesiredBSSType)
-            {
-            case BSS_ANY:
-                wrqu->mode = IW_MODE_AUTO;
-                break;
-            case BSS_INDEPENDENT:
-                wrqu->mode = IW_MODE_ADHOC;
-                break;
-            case BSS_INFRASTRUCTURE:
-                wrqu->mode = IW_MODE_INFRA;
-                break;
-            default:
-                break;
-            }
-
-            break;
-        }
-
-        /* Set sensitivity (Rssi roaming threshold)*/
-    case SIOCSIWSENS:
-        {
-            /* First get the current roaming configuration as a whole */
-            pParam->paramType = ROAMING_MNGR_APPLICATION_CONFIGURATION;
-            pParam->paramLength = sizeof (roamingMngrConfigParams_t);
-            res = cmdDispatch_GetParam(pCmdInterpret->hCmdDispatch, pParam);
-
-            CHECK_PENDING_RESULT(res,pParam)
-
-            /* Now change the low rssi threshold supplied by the user */
-            pParam->content.roamingConfigBuffer.roamingMngrThresholdsConfig.lowRssiThreshold = wrqu->param.value;
-
-            /* And set the parameters back to the roaming module */
-            res = cmdDispatch_SetParam(pCmdInterpret->hCmdDispatch, pParam);
-
-            CHECK_PENDING_RESULT(res,pParam)
-
-            break;
-        }
-
-        /* Get sensitivity (Rssi threshold OR CCA?)*/
-    case SIOCGIWSENS:
-        {
-            pParam->paramType = ROAMING_MNGR_APPLICATION_CONFIGURATION;
-            pParam->paramLength = sizeof (roamingMngrConfigParams_t);
-            res = cmdDispatch_GetParam(pCmdInterpret->hCmdDispatch, pParam);
-
-            CHECK_PENDING_RESULT(res,pParam)
-
-            if (res == TI_OK)
-            {
-                wrqu->param.value = pParam->content.roamingConfigBuffer.roamingMngrThresholdsConfig.lowRssiThreshold;
-                wrqu->param.disabled = (wrqu->param.value == 0);
-                wrqu->param.fixed = 1;
-            }
-
-            break;
-        }
-
-        /* Get a range of parameters regarding the device capabilities */
-    case SIOCGIWRANGE:
-        {
-            struct iw_point *data = (struct iw_point *) cmdObj->buffer1;
-            struct iw_range *range = (struct iw_range *) cmdObj->buffer2;
-            int i;
-            ScanBssType_e smeDesiredBssType = BSS_ANY;
-            paramInfo_t *pParam2;
-
-            /* Reset structure */
-            data->length = sizeof(struct iw_range);
-            os_memorySet(pCmdInterpret->hOs, range, 0, sizeof(struct iw_range));
-
-            /* Wireless Extension version info */
-            range->we_version_compiled = WIRELESS_EXT;   /* Must be WIRELESS_EXT */
-            range->we_version_source = 19;               /* Last update of source */
-
-            /* estimated maximum TCP throughput values (bps) */
-            range->throughput = MAX_THROUGHPUT;
-
-            /* NWID (or domain id) */
-            range->min_nwid = 0; /* Minimal NWID we are able to set */
-            range->max_nwid = 0; /* Maximal NWID we are able to set */
-
-            /* Old Frequency - no need to support this*/
-            range->old_num_channels = 0;
-            range->old_num_frequency = 0;
-
-            /* Wireless event capability bitmasks */
-            IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP);
-            IW_EVENT_CAPA_SET(range->event_capa, IWEVREGISTERED);
-            IW_EVENT_CAPA_SET(range->event_capa, IWEVEXPIRED);
-
-            /* signal level threshold range */
-            range->sensitivity = 0;
-
-            /* Rates */
-            pParam->paramType = SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM;
-            res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch, pParam );
-
-            CHECK_PENDING_RESULT(res,pParam)
-            pParam2 = (paramInfo_t *)os_memoryAlloc(pCmdInterpret->hOs, sizeof(paramInfo_t));
-            if (pParam2)
-            {
-                pParam2->paramType = SME_DESIRED_BSS_TYPE_PARAM;
-                pParam2->paramLength = sizeof(ScanBssType_e);
-                res = cmdDispatch_GetParam(pCmdInterpret->hCmdDispatch, pParam2);
-                CHECK_PENDING_RESULT(res,pParam2)
-                smeDesiredBssType = pParam2->content.smeDesiredBSSType;
-                os_memoryFree(pCmdInterpret->hOs, pParam2, sizeof(paramInfo_t));
-            }
-            /* Number of entries in the rates list */
-            range->num_bitrates = pParam->content.siteMgrDesiredSupportedRateSet.len;
-            for (i=0; i<pParam->content.siteMgrDesiredSupportedRateSet.len; i++)
-            {
-                switch(pParam->content.siteMgrDesiredSupportedRateSet.ratesString[i] & 0x7F)
-                {
-                    case NET_RATE_MCS0:
-                    case NET_RATE_MCS1:
-                    case NET_RATE_MCS2:
-                    case NET_RATE_MCS3:
-                    case NET_RATE_MCS4:
-                    case NET_RATE_MCS5:
-                    case NET_RATE_MCS6:
-                    case NET_RATE_MCS7:
-                         if (BSS_INDEPENDENT == smeDesiredBssType)
-                             continue;
-                    default:
-                         range->bitrate[i] = CALCULATE_RATE_VALUE(pParam->content.siteMgrDesiredSupportedRateSet.ratesString[i])
-                         if (WEXT_MAX_RATE_VALUE == range->bitrate[i])
-                         {
-                             range->bitrate[i] = WEXT_MAX_RATE_REAL_VALUE;   /* convert special code 0x7F to 65Mbps */
-                         }
-                         break;
-                }
-            }
-
-            /* RTS threshold */
-            range->min_rts = TWD_RTS_THRESHOLD_MIN; /* Minimal RTS threshold */
-            range->max_rts = TWD_RTS_THRESHOLD_DEF; /* Maximal RTS threshold */
-
-            /* Frag threshold */
-            range->min_frag = TWD_FRAG_THRESHOLD_MIN;    /* Minimal frag threshold */
-            range->max_frag = TWD_FRAG_THRESHOLD_DEF;    /* Maximal frag threshold */
-
-            /* Power Management duration & timeout */
-            range->min_pmp = 0;  /* Minimal PM period */
-            range->max_pmp = 0;  /* Maximal PM period */
-            range->min_pmt = 0;  /* Minimal PM timeout */
-            range->max_pmt = 0;  /* Maximal PM timeout */
-            range->pmp_flags = IW_POWER_ON;  /* How to decode max/min PM period */
-            range->pmt_flags = IW_POWER_ON; /* How to decode max/min PM timeout */
-
-            /* What Power Management options are supported */
-            range->pm_capa = IW_POWER_UNICAST_R |                /* Receive only unicast messages */
-                             IW_POWER_MULTICAST_R |              /* Receive only multicast messages */
-                             IW_POWER_ALL_R |                    /* Receive all messages though PM */
-                             IW_POWER_FORCE_S |                  /* Force PM procedure for sending unicast */
-                             IW_POWER_PERIOD |                   /* Value is a period/duration of */
-                             IW_POWER_TIMEOUT;                   /* Value is a timeout (to go asleep) */
-
-            /* Transmit power */
-            range->txpower_capa = IW_TXPOW_RELATIVE | IW_TXPOW_RANGE;    /* What options are supported */
-            range->num_txpower = 5;  /* Number of entries in the list */
-            range->txpower[0] = 1;   /* list of values (maximum is IW_MAX_TXPOWER = 8) */
-            range->txpower[1] = 2;   /* list of values (maximum is IW_MAX_TXPOWER = 8) */
-            range->txpower[2] = 3;   /* list of values (maximum is IW_MAX_TXPOWER = 8) */
-            range->txpower[3] = 4;   /* list of values (maximum is IW_MAX_TXPOWER = 8) */
-            range->txpower[4] = 5;   /* list of values (maximum is IW_MAX_TXPOWER = 8) */
-
-            /* Retry limits and lifetime */
-            range->retry_capa = 0;   /* What retry options are supported */
-            range->retry_flags = 0;  /* How to decode max/min retry limit */
-            range->r_time_flags = 0; /* How to decode max/min retry life */
-            range->min_retry = 0;    /* Minimal number of retries */
-            range->max_retry = 0;    /* Maximal number of retries */
-            range->min_r_time = 0;   /* Minimal retry lifetime */
-            range->max_r_time = 0;   /* Maximal retry lifetime */
-
-            /* Get Supported channels */
-            pParam->paramType = SITE_MGR_RADIO_BAND_PARAM;
-            res = cmdDispatch_GetParam( pCmdInterpret->hCmdDispatch, pParam );
-
-            CHECK_PENDING_RESULT(res,pParam)
-
-            /* pParam->content.siteMgrRadioBand contains the current band, now get list of supported channels */
-            pParam->paramType = REGULATORY_DOMAIN_ALL_SUPPORTED_CHANNELS;
-            res = cmdDispatch_GetParam( pCmdInterpret->hCmdDispatch, pParam );
-
-            CHECK_PENDING_RESULT(res,pParam)
-
-            range->num_channels = pParam->content.supportedChannels.sizeOfList;    /* Number of channels [0; num - 1] */
-            range->num_frequency = pParam->content.supportedChannels.sizeOfList;   /* Number of entry in the list */
-
-            for (i=0; i<pParam->content.supportedChannels.sizeOfList; i++)
-            {
-                range->freq[i].e = 0;
-                range->freq[i].m = i;
-                range->freq[i].i = pParam->content.supportedChannels.listOfChannels[i]+1;
-            }
-
-            /* Encoder (Encryption) capabilities */
-            range->num_encoding_sizes = 4;
-            /* 64(40) bits WEP */
-            range->encoding_size[0] = WEP_KEY_LENGTH_40;
-            /* 128(104) bits WEP */
-            range->encoding_size[1] = WEP_KEY_LENGTH_104;
-            /* 256 bits for WPA-PSK */
-            range->encoding_size[2] = TKIP_KEY_LENGTH;
-            /* 128 bits for WPA2-PSK */
-            range->encoding_size[3] = AES_KEY_LENGTH;
-            /* 4 keys are allowed */
-            range->max_encoding_tokens = 4;
-
-            range->encoding_login_index = 0; /* token index for login token */
-
-            /* Encryption capabilities */
-            range->enc_capa = IW_ENC_CAPA_WPA |
-                              IW_ENC_CAPA_WPA2 |
-                              IW_ENC_CAPA_CIPHER_TKIP |
-                              IW_ENC_CAPA_CIPHER_CCMP; /* IW_ENC_CAPA_* bit field */
-
-        }
-        break;
-
-        /* Set desired BSSID */
-    case SIOCSIWAP:
-        {
-
-            /* If MAC address is zeroes -> connect to "ANY" BSSID */
-            if (MAC_NULL (wrqu->ap_addr.sa_data))
-            {
-                /* Convert to "FF:FF:FF:FF:FF:FF" since this driver requires this value */
-                MAC_COPY (pParam->content.siteMgrDesiredBSSID, "\xff\xff\xff\xff\xff\xff");
-            }
-            else
-            {
-                MAC_COPY (pParam->content.siteMgrDesiredBSSID, wrqu->ap_addr.sa_data);
-            }
-
-            pParam->paramType = SITE_MGR_DESIRED_BSSID_PARAM;
-            res = cmdDispatch_SetParam ( pCmdInterpret->hCmdDispatch, pParam );
-            CHECK_PENDING_RESULT(res,pParam)
-
-            /* also set it to the SME */
-            pParam->paramType = SME_DESIRED_BSSID_PARAM;
-            res = cmdDispatch_SetParam ( pCmdInterpret->hCmdDispatch, pParam );
-            CHECK_PENDING_RESULT(res,pParam)
-
-            break;
-        }
-
-
-        /* Get current BSSID */
-    case SIOCGIWAP:
-        {
-            /* Get current AP BSSID */
-            pParam->paramType = SITE_MGR_CURRENT_BSSID_PARAM;
-            res = cmdDispatch_GetParam ( pCmdInterpret->hCmdDispatch, pParam );
-
-            CHECK_PENDING_RESULT(res,pParam)
-
-            /* In case we are not associated - copy zeroes into bssid */
-            if (res == NO_SITE_SELECTED_YET)
-            {
-                MAC_COPY (wrqu->ap_addr.sa_data, "\x00\x00\x00\x00\x00\x00");
-                cmdObj->return_code = WEXT_OK;
-            }
-            else if (res == TI_OK)
-            {
-                MAC_COPY (wrqu->ap_addr.sa_data, pParam->content.siteMgrDesiredBSSID);
-            }
-
-            break;
-        }
-
-
-        /* request MLME operation (Deauthenticate / Disassociate) */
-    case SIOCSIWMLME:
-        {
-            struct iw_mlme *mlme = (struct iw_mlme *)cmdObj->param3;
-
-            pParam->paramType = SITE_MGR_DESIRED_SSID_PARAM;
-
-            /* In either case - we need to disconnect, so prepare "junk" SSID */
-            for (i = 0; i < MAX_SSID_LEN; i++)
-                pParam->content.siteMgrDesiredSSID.str[i] = (i+1);
-            pParam->content.siteMgrDesiredSSID.len = MAX_SSID_LEN;
-
-            switch (mlme->cmd)
-            {
-            case IW_MLME_DEAUTH:
-            case IW_MLME_DISASSOC:
-                res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch, pParam );
-                CHECK_PENDING_RESULT(res,pParam)
-                /* now also set it to the SME */
-                pParam->paramType = SME_DESIRED_SSID_ACT_PARAM;
-                res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch, pParam );
-                CHECK_PENDING_RESULT(res,pParam)
-                break;
-            default:
-                res = -EOPNOTSUPP;
-                goto cmd_end;
-            }
-            break;
-        }
-
-        /* trigger scanning (list cells) */
-    case SIOCSIWSCAN:
-        {
-            struct iw_scan_req pScanReq;
-            TScanParams scanParams;
-
-            pParam->content.pScanParams = &scanParams;
-
-            /* Init the parameters in case the Supplicant doesn't support them*/
-            pParam->content.pScanParams->desiredSsid.len = 0;
-            pScanReq.scan_type = SCAN_TYPE_TRIGGERED_ACTIVE;
-
-            if (wrqu->data.pointer)
-            {
-                if ( copy_from_user( &pScanReq, wrqu->data.pointer, sizeof(pScanReq)) )
-                {
-                    printk("CRITICAL: Could not copy data from user space!!!");
-                    res = -EFAULT;
-                    goto cmd_end;
-                }
-                if (wrqu->data.flags & IW_SCAN_THIS_ESSID)
-                {
-                    pParam->content.pScanParams->desiredSsid.len = pScanReq.essid_len;
-                    os_memoryCopy(pCmdInterpret->hOs,pParam->content.pScanParams->desiredSsid.str, pScanReq.essid, pScanReq.essid_len);
-                }
-                else
-                {
-                    pParam->content.pScanParams->desiredSsid.len = 0; /* scan all*/
-                }
-            }
-
-            /* set the scan type according to driver trigger scan */
-            if (IW_SCAN_TYPE_PASSIVE == pScanReq.scan_type)
-            {
-                pParam->content.pScanParams->scanType = SCAN_TYPE_TRIGGERED_PASSIVE;
-            }
-            else
-            {
-                pParam->content.pScanParams->scanType = SCAN_TYPE_TRIGGERED_ACTIVE;
-            }
-
-            pParam->paramType = SCAN_CNCN_BSSID_LIST_SCAN_PARAM;
-            pParam->paramLength = sizeof(TScanParams);
-            res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch, pParam );
-            CHECK_PENDING_RESULT(res,pParam)
-        }
-        break;
-
-        /* get scanning results */
-    case SIOCGIWSCAN:
-        {
-            unsigned char buf[30];
-            char *event = (char *)cmdObj->buffer2;
-            struct iw_event iwe;
-            char *end_buf, *current_val;
-            int allocated_size, rates_allocated_size;
-            OS_802_11_BSSID_LIST_EX *my_list;
-            OS_802_11_BSSID_EX *my_current;
-			OS_802_11_N_RATES *rate_list;
-			TI_UINT8 *current_rates;
-            int offset;
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
-            struct iw_request_info info;
-            info.cmd = SIOCGIWSCAN;
-            info.flags = 0;
-#endif
-            end_buf = (char *)(cmdObj->buffer2 + wrqu->data.length);
-
-            /* First get the amount of memory required to hold the entire BSSID list by setting the length to 0 */
-            pParam->paramType = SCAN_CNCN_BSSID_LIST_SIZE_PARAM;
-            pParam->paramLength = 0;
-            res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch, pParam );
-            CHECK_PENDING_RESULT(res,pParam)
-
-            allocated_size = pParam->content.uBssidListSize;
-
-            /* Allocate required memory */
-            my_list = os_memoryAlloc (pCmdInterpret->hOs, allocated_size);
-            if (!my_list) {
-                res = -ENOMEM;
-                goto cmd_end;
-            }
-
-            /* And retrieve the list */
-            pParam->paramType = SCAN_CNCN_BSSID_LIST_PARAM;
-            pParam->content.pBssidList = my_list;
-            pParam->paramLength = allocated_size;
-            res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch, pParam );
-            CHECK_PENDING_RESULT(res,pParam)
-
-            /* Get the number of entries in the scan result list and allocate enough memory to hold rate list
-               for every entry. This rate list is extended to include 11n rates */
-            pParam->paramType = SCAN_CNCN_NUM_BSSID_IN_LIST_PARAM;
-            pParam->paramLength = 0;
-            res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch, pParam );
-            CHECK_PENDING_RESULT(res,pParam)
-
-            rates_allocated_size = pParam->content.uNumBssidInList * sizeof(OS_802_11_N_RATES);
-
-            /* Allocate required memory */
-            rate_list = os_memoryAlloc (pCmdInterpret->hOs, rates_allocated_size);
-            if (!rate_list) {
-                os_memoryFree (pCmdInterpret->hOs, my_list, allocated_size);
-                res = -ENOMEM;
-                goto cmd_end;
-            }
-
-            /* And retrieve the list */
-            pParam->paramType = SCAN_CNCN_BSSID_RATE_LIST_PARAM;
-            pParam->content.pRateList = rate_list;
-            pParam->paramLength = rates_allocated_size;
-            res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch, pParam );
-            CHECK_PENDING_RESULT(res,pParam)
-
-            my_current = &my_list->Bssid[0];
-            i = 0;
-            if(wrqu->data.flags)
-            {
-                for (i=0; i<wrqu->data.flags; i++)
-                    my_current = (OS_802_11_BSSID_EX *) (((char *) my_current) + my_current->Length);
-            }
-            /* Now send a wireless event per BSSID with "tokens" describing it */
-
-            for (; i<my_list->NumberOfItems; i++)
-            {
-                if (event + my_current->Length > end_buf)
-                {
-                    break;
-                }
-
-                /* The first entry MUST be the AP BSSID */
-                os_memorySet (pCmdInterpret->hOs, &iwe, 0, sizeof(iwe));
-                iwe.cmd = SIOCGIWAP;
-                iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
-                iwe.len = IW_EV_ADDR_LEN;
-                os_memoryCopy(pCmdInterpret->hOs, iwe.u.ap_addr.sa_data, &my_current->MacAddress, ETH_ALEN);
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-                event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_ADDR_LEN);
-#else
-                event = iwe_stream_add_event(&info,event, end_buf, &iwe, IW_EV_ADDR_LEN);
-#endif
-
-                /* Add SSID */
-                iwe.cmd = SIOCGIWESSID;
-                iwe.u.data.flags = 1;
-                iwe.u.data.length = min((TI_UINT8)my_current->Ssid.SsidLength, (TI_UINT8)32);
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-                event = iwe_stream_add_point(event, end_buf, &iwe, my_current->Ssid.Ssid);
-#else
-                event = iwe_stream_add_point(&info,event, end_buf, &iwe, my_current->Ssid.Ssid);
-#endif
-
-                /* Add the protocol name (BSS support for A/B/G) */
-                os_memorySet (pCmdInterpret->hOs, &iwe, 0, sizeof(iwe));
-                iwe.cmd = SIOCGIWNAME;
-                os_memoryCopy(pCmdInterpret->hOs, (void*)iwe.u.name, (void*)ieee80211_modes[my_current->NetworkTypeInUse], IFNAMSIZ);
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-                event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_CHAR_LEN);
-#else
-                event = iwe_stream_add_event(&info,event, end_buf, &iwe, IW_EV_CHAR_LEN);
-#endif
-
-                /* add mode (infrastructure or Adhoc) */
-                os_memorySet (pCmdInterpret->hOs, &iwe, 0, sizeof(iwe));
-                iwe.cmd = SIOCGIWMODE;
-                if (my_current->InfrastructureMode == os802_11IBSS)
-                    iwe.u.mode = IW_MODE_ADHOC;
-                else if (my_current->InfrastructureMode == os802_11Infrastructure)
-                    iwe.u.mode = IW_MODE_INFRA;
-                else
-                    iwe.u.mode = IW_MODE_AUTO;
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-                event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_UINT_LEN);
-#else
-                event = iwe_stream_add_event(&info,event, end_buf, &iwe, IW_EV_UINT_LEN);
-#endif
-
-                /* add freq */
-                os_memorySet (pCmdInterpret->hOs, &iwe, 0, sizeof(iwe));
-                iwe.cmd = SIOCGIWFREQ;
-                iwe.u.freq.m = my_current->Configuration.Union.channel;
-                iwe.u.freq.e = 3; /* Frequency divider */
-                iwe.u.freq.i = 0;
-                iwe.len = IW_EV_FREQ_LEN;
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-                event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_FREQ_LEN);
-#else
-                event = iwe_stream_add_event(&info,event, end_buf, &iwe, IW_EV_FREQ_LEN);
-#endif
-
-                /* Add quality statistics */
-                iwe.cmd = IWEVQUAL;
-                iwe.u.qual.updated = IW_QUAL_LEVEL_UPDATED | IW_QUAL_QUAL_INVALID | IW_QUAL_NOISE_INVALID | IW_QUAL_DBM;
-                iwe.u.qual.qual = 0;
-                iwe.u.qual.level = my_current->Rssi;
-                iwe.u.qual.noise = 0;
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-                event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_QUAL_LEN);
-#else
-                event = iwe_stream_add_event(&info,event, end_buf, &iwe, IW_EV_QUAL_LEN);
-#endif
-
-                /* Add encryption capability */
-                iwe.cmd = SIOCGIWENCODE;
-                if ((my_current->Capabilities >> CAP_PRIVACY_SHIFT) & CAP_PRIVACY_MASK)
-                    iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
-                else
-                    iwe.u.data.flags = IW_ENCODE_DISABLED;
-                iwe.u.data.length = 0;
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-                event = iwe_stream_add_point(event, end_buf, &iwe, NULL);
-#else
-                event = iwe_stream_add_point(&info,event, end_buf, &iwe, NULL);
-#endif
-
-                /* add rate */
-                os_memorySet (pCmdInterpret->hOs, &iwe, 0, sizeof(iwe));
-                iwe.cmd = SIOCGIWRATE;
-                current_val = event + IW_EV_LCP_LEN;
-
-                current_rates = (TI_UINT8 *)(rate_list[i]);
-
-                for (j=0; j<32; j++)
-                {
-                    if (current_rates[j])
-                    {
-                        if ((current_rates[j] & 0x7f) == NET_RATE_MCS7)
-                        {
-                            iwe.u.bitrate.value = WEXT_MAX_RATE_REAL_VALUE;  /* convert the special code 0x7f to 65Mbps */
-                        }
-                        else
-                        {
-                            iwe.u.bitrate.value = CALCULATE_RATE_VALUE(current_rates[j])
-                        }
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-                        current_val = iwe_stream_add_value(event, current_val, end_buf, &iwe,IW_EV_PARAM_LEN);
-#else
-                        current_val = iwe_stream_add_value(&info,event, current_val,end_buf, &iwe,IW_EV_PARAM_LEN);
-#endif
-                    }
-                }
-
-                event = current_val;
-
-                /* CUSTOM - Add beacon interval */
-                os_memorySet (pCmdInterpret->hOs, &iwe, 0, sizeof(iwe));
-                iwe.cmd = IWEVCUSTOM;
-                sprintf(buf, "Bcn int = %d ms ", my_current->Configuration.BeaconPeriod);
-                iwe.u.data.length = strlen(buf);
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-                event = iwe_stream_add_point(event, end_buf, &iwe, buf);
-#else
-                event = iwe_stream_add_point(&info,event, end_buf, &iwe, buf);
-#endif
-                /* add ALL variable IEs */
-                os_memorySet (pCmdInterpret->hOs, &iwe, 0, sizeof(iwe));
-                iwe.cmd = IWEVGENIE;
-                offset = sizeof(OS_802_11_FIXED_IEs);
-                while(offset < my_current->IELength)
-                {
-                        OS_802_11_VARIABLE_IEs *pIE;
-                        pIE = (OS_802_11_VARIABLE_IEs*)&(my_current->IEs[offset]);
-                        iwe.u.data.flags = 1;
-                        iwe.u.data.length = pIE->Length + 2;
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-                        event = iwe_stream_add_point(event, end_buf, &iwe, (char *)&(my_current->IEs[offset]));
-#else
-                        event = iwe_stream_add_point(&info, event, end_buf, &iwe, (char *)&(my_current->IEs[offset]));
-#endif
-                        offset += pIE->Length + 2;
-                }
-
-                my_current = (OS_802_11_BSSID_EX *) (((char *) my_current) + my_current->Length);
-            }
-
-            wrqu->data.length = event - ((char *)cmdObj->buffer2);
-            if(i == my_list->NumberOfItems)
-            {
-                wrqu->data.flags = 0;
-            }
-            else
-            {
-                wrqu->data.flags = i;
-            }
-
-            os_memoryFree (pCmdInterpret->hOs, my_list, allocated_size);
-            os_memoryFree (pCmdInterpret->hOs, rate_list, rates_allocated_size);
-            cmdObj->return_code = WEXT_OK;
-        }
-
-        break;
-
-        /* Set ESSID */
-    case SIOCSIWESSID:
-        {
-            char *extra = cmdObj->buffer2;
-            int length;
-
-            if (wrqu->essid.flags & SET_SSID_WITHOUT_SUPPL)
-                wrqu->essid.flags &= ~SET_SSID_WITHOUT_SUPPL;
-            else
-                cmdInterpret_setSecurityParams (hCmdInterpret);
-
-            os_memoryZero (pCmdInterpret->hOs, &pParam->content.siteMgrDesiredSSID.str, MAX_SSID_LEN);
-
-            pParam->content.siteMgrCurrentSSID.len = 0;
-
-            if (wrqu->essid.flags == 0)
-            {
-                /* Connect to ANY ESSID - use empty */
-                os_memoryCopy(pCmdInterpret->hOs, &pParam->content.siteMgrCurrentSSID.str, "\00", 1);
-                pParam->content.siteMgrCurrentSSID.len = 0;;
-            } else
-            {
-                /* Handle ESSID length issue in WEXT (backward compatibility with old/new versions) */
-                length = wrqu->essid.length - 1;
-                if (length > 0)
-                    length--;
-                while (length < wrqu->essid.length && extra[length])
-                    length++;
-
-                os_memoryCopy(pCmdInterpret->hOs, &pParam->content.siteMgrCurrentSSID.str, cmdObj->buffer2, length);
-                pParam->content.siteMgrCurrentSSID.len = length;
-            }
-
-            pParam->paramType = SITE_MGR_DESIRED_SSID_PARAM;
-            pParam->paramLength = sizeof (TSsid);
-            res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch, pParam );
-            CHECK_PENDING_RESULT(res,pParam)
-            /* also set it to the SME */
-            pParam->paramType = SME_DESIRED_SSID_ACT_PARAM;
-            res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch, pParam );
-            CHECK_PENDING_RESULT(res,pParam)
-        }
-        break;
-
-        /* get ESSID */
-    case SIOCGIWESSID:
-        {
-            char *extra = (char *)cmdObj->buffer2;
-
-            pParam->paramType = SITE_MGR_CURRENT_SSID_PARAM;
-            res = cmdDispatch_GetParam ( pCmdInterpret->hCmdDispatch, pParam );
-            if(res == NO_SITE_SELECTED_YET)
-                res = WEXT_OK;
-
-            CHECK_PENDING_RESULT(res,pParam)
-
-            wrqu->essid.flags  = 1;
-
-            os_memoryCopy(pCmdInterpret->hOs, cmdObj->buffer2, &pParam->content.siteMgrCurrentSSID.str, pParam->content.siteMgrCurrentSSID.len );
-
-            if (pParam->content.siteMgrCurrentSSID.len < MAX_SSID_LEN)
-            {
-                extra[pParam->content.siteMgrCurrentSSID.len] = 0;
-            }
-            wrqu->essid.length = pParam->content.siteMgrCurrentSSID.len;
-        }
-
-        break;
-
-        /* set node name/nickname */
-    case SIOCSIWNICKN:
-        {
-            if (wrqu->data.length > IW_ESSID_MAX_SIZE) {
-                res = -EINVAL;
-                goto cmd_end;
-            }
-            os_memoryCopy(pCmdInterpret->hOs, pCmdInterpret->nickName, cmdObj->buffer2, wrqu->data.length);
-            pCmdInterpret->nickName[IW_ESSID_MAX_SIZE] = 0;
-            res = TI_OK;
-        }
-
-        break;
-
-        /* get node name/nickname */
-    case SIOCGIWNICKN:
-        {
-            struct iw_point *data = (struct iw_point *) cmdObj->buffer1;
-
-            data->length = strlen(pCmdInterpret->nickName);
-            os_memoryCopy(pCmdInterpret->hOs, cmdObj->buffer2, &pCmdInterpret->nickName, data->length);
-
-            res = TI_OK;
-        }
-        break;
-
-        /* Set RTS Threshold */
-    case SIOCSIWRTS:
-        {
-            pParam->paramType = TWD_RTS_THRESHOLD_PARAM;
-
-            if (wrqu->rts.disabled)
-                pParam->content.halCtrlRtsThreshold = TWD_RTS_THRESHOLD_DEF;
-            else
-                pParam->content.halCtrlRtsThreshold = wrqu->rts.value;
-
-            res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch,pParam);
-            CHECK_PENDING_RESULT(res,pParam)
-            break;
-        }
-
-        /* Get RTS Threshold */
-    case SIOCGIWRTS:
-        {
-            pParam->paramType = TWD_RTS_THRESHOLD_PARAM;
-            res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch,pParam);
-
-            CHECK_PENDING_RESULT(res,pParam)
-
-            wrqu->rts.value = pParam->content.halCtrlRtsThreshold;
-            wrqu->rts.fixed = 1;
-            cmdObj->return_code = WEXT_OK;
-            break;
-        }
-
-        /* Set Fragmentation threshold */
-    case SIOCSIWFRAG:
-        {
-            pParam->paramType = TWD_FRAG_THRESHOLD_PARAM;
-            pParam->content.halCtrlFragThreshold = ((wrqu->frag.value+1)>>1) << 1; /* make it always even */
-
-            res = cmdDispatch_SetParam(pCmdInterpret->hCmdDispatch, pParam);
-            CHECK_PENDING_RESULT(res,pParam)
-
-            break;
-        }
-
-        /* Get Fragmentation threshold */
-    case SIOCGIWFRAG:
-        {
-            pParam->paramType = TWD_FRAG_THRESHOLD_PARAM;
-            res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch,pParam);
-
-            CHECK_PENDING_RESULT(res,pParam)
-
-            wrqu->rts.value = pParam->content.halCtrlFragThreshold;
-            wrqu->rts.fixed = 1;
-            cmdObj->return_code = WEXT_OK;
-            break;
-        }
-
-        /* Set TX power level */
-    case SIOCSIWTXPOW:
-        if (wrqu->txpower.disabled == 1)
-        {
-            cmdObj->return_code = WEXT_INVALID_PARAMETER;
-        }
-        else
-        {
-            pParam->paramType = REGULATORY_DOMAIN_CURRENT_TX_POWER_LEVEL_PARAM;
-            pParam->content.desiredTxPower = wrqu->txpower.value;
-            res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch,pParam);
-            CHECK_PENDING_RESULT(res,pParam)
-        }
-        break;
-
-        /* Get TX power level */
-    case SIOCGIWTXPOW:
-        {
-            pParam->paramType = REGULATORY_DOMAIN_CURRENT_TX_POWER_IN_DBM_PARAM;
-            res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch,pParam);
-
-            CHECK_PENDING_RESULT(res,pParam)
-
-            wrqu->txpower.flags = IW_TXPOW_RELATIVE | IW_TXPOW_RANGE;
-            wrqu->txpower.disabled = 0;
-            wrqu->txpower.fixed = 0;
-            wrqu->txpower.value = pParam->content.desiredTxPower;
-
-            break;
-        }
-
-        /* set encoding token & mode - WEP only */
-    case SIOCSIWENCODE:
-        {
-            int index;
-
-            index = (wrqu->encoding.flags & IW_ENCODE_INDEX);
-
-            /* iwconfig gives index as 1 - N */
-            if (index > 0)
-                index--;
-            else
-            {
-                pParam->paramType = RSN_DEFAULT_KEY_ID;
-                res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch,pParam);
-                CHECK_PENDING_RESULT(res,pParam)
-                index = pParam->content.rsnDefaultKeyID;
-            }
-
-            pParam->paramType = RSN_ADD_KEY_PARAM;
-            /* remove key if disabled */
-            if (wrqu->data.flags & IW_ENCODE_DISABLED)
-            {
-                pParam->paramType = RSN_REMOVE_KEY_PARAM;
-            }
-
-            pParam->content.rsnOsKey.KeyIndex = index;
-
-            if (wrqu->data.length)
-            {
-                os_memoryCopy(pCmdInterpret->hOs, &pParam->content.rsnOsKey.KeyMaterial, cmdObj->buffer2, wrqu->data.length);
-                pParam->content.rsnOsKey.KeyLength = wrqu->data.length;
-            } else
-            {
-                /* No key material is provided, just set given index as default TX key */
-                pParam->paramType = RSN_DEFAULT_KEY_ID;
-                pParam->content.rsnDefaultKeyID = index;
-            }
-
-            res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch, pParam);
-            CHECK_PENDING_RESULT(res,pParam)
-
-            break;
-        }
-
-
-        /* get encoding token & mode */
-    case SIOCGIWENCODE:
-        {
-            int index, encr_mode;
-            char *extra = (char *)cmdObj->buffer2;
-            TSecurityKeys myKeyInfo;
-
-            wrqu->data.length = 0;
-            extra[0] = 0;
-
-            /* Get Index from user request */
-            index = (wrqu->encoding.flags & IW_ENCODE_INDEX);
-            if (index > 0)
-                index--;
-            else
-            {
-                pParam->paramType = RSN_DEFAULT_KEY_ID;
-                res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch,pParam);
-                CHECK_PENDING_RESULT(res,pParam)
-                index = pParam->content.rsnDefaultKeyID;
-                wrqu->data.flags = (index+1);
-            }
-
-            pParam->content.pRsnKey = &myKeyInfo;
-
-            pParam->paramType = RSN_KEY_PARAM;
-            pParam->content.pRsnKey->keyIndex = index;
-            res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch,pParam);
-            CHECK_PENDING_RESULT(res,pParam)
-
-            if ((pParam->content.pRsnKey) && (pParam->content.pRsnKey->encLen))
-            {
-                wrqu->data.flags |= IW_ENCODE_ENABLED;
-                wrqu->data.length = pParam->content.pRsnKey->encLen;
-                os_memoryCopy(pCmdInterpret->hOs,extra, &pParam->content.pRsnKey->encKey,wrqu->data.length);
-            }
-
-            /* Convert from driver (OID-like) authentication parameters to WEXT */
-            if (pCmdInterpret->wai.iw_auth_cipher_pairwise & IW_AUTH_CIPHER_CCMP)
-                encr_mode = os802_11Encryption3Enabled;
-            else if (pCmdInterpret->wai.iw_auth_cipher_pairwise & IW_AUTH_CIPHER_TKIP)
-                encr_mode = os802_11Encryption2Enabled;
-            else if (pCmdInterpret->wai.iw_auth_cipher_pairwise & (IW_AUTH_CIPHER_WEP40 | IW_AUTH_CIPHER_WEP104))
-                encr_mode = os802_11Encryption1Enabled;
-            else if (pCmdInterpret->wai.iw_auth_cipher_group & IW_AUTH_CIPHER_CCMP)
-                encr_mode = os802_11Encryption3Enabled;
-            else if (pCmdInterpret->wai.iw_auth_cipher_group & IW_AUTH_CIPHER_TKIP)
-                encr_mode = os802_11Encryption2Enabled;
-            else
-                encr_mode = os802_11EncryptionDisabled;
-
-            if (encr_mode == os802_11EncryptionDisabled)
-                wrqu->data.flags |= IW_ENCODE_OPEN;
-            else
-                wrqu->data.flags |= IW_ENCODE_RESTRICTED;
-
-            cmdObj->return_code = WEXT_OK;
-
-        }
-        break;
-
-    case SIOCSIWGENIE:
-        {
-            pParam->paramType = RSN_GENERIC_IE_PARAM;
-            pParam->content.rsnGenericIE.length = wrqu->data.length;
-            if (wrqu->data.length) {
-                os_memoryCopy(pCmdInterpret->hOs, pParam->content.rsnGenericIE.data, cmdObj->param3, wrqu->data.length);
-            }
-            res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch, pParam);
-            CHECK_PENDING_RESULT(res,pParam);
-        }
-        break;
-
-        /* Set Authentication */
-    case SIOCSIWAUTH:
-        res = TI_OK;
-        switch (wrqu->param.flags & IW_AUTH_INDEX)
-        {
-        case IW_AUTH_WPA_VERSION:
-            pCmdInterpret->wai.iw_auth_wpa_version = wrqu->param.value;
-            break;
-        case IW_AUTH_CIPHER_PAIRWISE:
-            pCmdInterpret->wai.iw_auth_cipher_pairwise = wrqu->param.value;
-            break;
-        case IW_AUTH_CIPHER_GROUP:
-            pCmdInterpret->wai.iw_auth_cipher_group = wrqu->param.value;
-            break;
-        case IW_AUTH_KEY_MGMT:
-            pCmdInterpret->wai.iw_auth_key_mgmt = wrqu->param.value;
-            break;
-        case IW_AUTH_80211_AUTH_ALG:
-            pCmdInterpret->wai.iw_auth_80211_auth_alg = wrqu->param.value;
-            break;
-        case IW_AUTH_WPA_ENABLED:
-            break;
-        case IW_AUTH_TKIP_COUNTERMEASURES:
-            break;
-        case IW_AUTH_DROP_UNENCRYPTED:
-            break;
-        case IW_AUTH_RX_UNENCRYPTED_EAPOL:
-            break;
-        case IW_AUTH_PRIVACY_INVOKED:
-            break;
-        default:
-            res = -EOPNOTSUPP;
-        }
-        break;
-
-        /* Get Authentication */
-    case SIOCGIWAUTH:
-        res = TI_OK;
-        {
-            switch (wrqu->param.flags & IW_AUTH_INDEX)
-            {
-            case IW_AUTH_WPA_VERSION:
-                wrqu->param.value = pCmdInterpret->wai.iw_auth_wpa_version;
-                break;
-            case IW_AUTH_CIPHER_PAIRWISE:
-                wrqu->param.value = pCmdInterpret->wai.iw_auth_cipher_pairwise;
-                break;
-            case IW_AUTH_CIPHER_GROUP:
-                wrqu->param.value = pCmdInterpret->wai.iw_auth_cipher_group;
-                break;
-            case IW_AUTH_KEY_MGMT:
-                wrqu->param.value = pCmdInterpret->wai.iw_auth_key_mgmt;
-                break;
-            case IW_AUTH_80211_AUTH_ALG:
-                wrqu->param.value = pCmdInterpret->wai.iw_auth_80211_auth_alg;
-                break;
-            default:
-                res = -EOPNOTSUPP;
-            }
-        }
-        break;
-
-        /* set encoding token & mode */
-    case SIOCSIWENCODEEXT:
-        {
-            struct iw_encode_ext *ext = (struct iw_encode_ext *)cmdObj->buffer2;
-            TI_UINT8 *addr;
-            TI_UINT8 temp[32];
-
-#ifdef GEM_SUPPORTED
-            if ( ext->alg == KEY_GEM ) {
-                TSecurityKeys key;
-
-                os_memoryZero(pCmdInterpret->hOs, &key, sizeof(key));
-                key.keyType = ext->alg;
-                if (ext->key_len > MAX_KEY_LEN) {
-                    res = -EINVAL;
-                    break;
-                }
-                key.encLen = ext->key_len;
-                os_memoryCopy(pCmdInterpret->hOs, key.encKey, ext->key, ext->key_len);
-                key.keyIndex = (wrqu->encoding.flags & IW_ENCODE_INDEX) - 1;
-                os_memoryCopy(pCmdInterpret->hOs, &key.macAddress, ext->addr.sa_data, sizeof(key.macAddress));
-
-                pParam->paramType = RSN_SET_KEY_PARAM;
-                pParam->paramLength = sizeof(pParam->content.pRsnKey);
-                pParam->content.pRsnKey = &key;
-
-                res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch, pParam);
-                CHECK_PENDING_RESULT(res,pParam);
-                break;
-            }
-#endif
-            addr = ext->addr.sa_data;
-
-            /*
-            os_printf ("\next->address = %02x:%02x:%02x:%02x:%02x:%02x \n",addr[0],addr[1],addr[2],addr[3],addr[4],addr[5]);
-            os_printf ("ext->alg = 0x%x\n",ext->alg);
-            os_printf ("ext->ext_flags = 0x%x\n",ext->ext_flags);
-            os_printf ("ext->key_len = 0x%x\n",ext->key_len);
-            os_printf ("ext->key_idx = 0x%x\n",(wrqu->encoding.flags & IW_ENCODE_INDEX));
-
-            os_printf ("key = ");
-            for (i=0; i<ext->key_len; i++)
-            {
-                os_printf ("0x%02x:",ext->key[i]);
-            }
-            os_printf ("\n");
-            */
-
-            MAC_COPY (pParam->content.rsnOsKey.BSSID, addr);
-
-            pParam->content.rsnOsKey.KeyLength = ext->key_len;
-
-            pParam->content.rsnOsKey.KeyIndex = wrqu->encoding.flags & IW_ENCODE_INDEX;
-            pParam->content.rsnOsKey.KeyIndex -= 1;
-
-            if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)
-            {
-                pParam->content.rsnOsKey.KeyIndex |= TIWLAN_KEY_FLAGS_TRANSMIT;
-            }
-
-            if (addr[0]!=0xFF)
-            {
-                pParam->content.rsnOsKey.KeyIndex |= TIWLAN_KEY_FLAGS_PAIRWISE;
-            }
-
-            if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID)
-            {
-                os_memoryCopy(pCmdInterpret->hOs, &pParam->content.rsnOsKey.KeyRSC, &ext->rx_seq, IW_ENCODE_SEQ_MAX_SIZE);
-                pParam->content.rsnOsKey.KeyIndex |= TIWLAN_KEY_FLAGS_SET_KEY_RSC;
-            }
-
-            /* If key is TKIP - need to switch RX and TX MIC (to match driver API) */
-            if (ext->alg == IW_ENCODE_ALG_TKIP)
-            {
-                os_memoryCopy(pCmdInterpret->hOs,(TI_UINT8*)(((TI_UINT8*)&temp)+24),(TI_UINT8*)(((TI_UINT8*)&ext->key)+16),8);
-                os_memoryCopy(pCmdInterpret->hOs,(TI_UINT8*)(((TI_UINT8*)&temp)+16),(TI_UINT8*)(((TI_UINT8*)&ext->key)+24),8);
-                os_memoryCopy(pCmdInterpret->hOs,&temp,&ext->key,16);
-                os_memoryCopy(pCmdInterpret->hOs, &pParam->content.rsnOsKey.KeyMaterial, &temp, ext->key_len);
-            } else
-            {
-                os_memoryCopy(pCmdInterpret->hOs, &pParam->content.rsnOsKey.KeyMaterial, &ext->key, ext->key_len);
-            }
-
-            if (ext->key_len == 0)
-                pParam->paramType = RSN_REMOVE_KEY_PARAM;
-            else
-                pParam->paramType = RSN_ADD_KEY_PARAM;
-
-            res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch, pParam);
-            CHECK_PENDING_RESULT(res,pParam)
-
-        }
-        break;
-
-        /* SIOCSIWPMKSA - PMKSA cache operation */
-    case SIOCSIWPMKSA:
-        {
-            struct iw_pmksa *pmksa = (struct iw_pmksa *) cmdObj->buffer2;
-
-            switch (pmksa->cmd)
-            {
-            case IW_PMKSA_ADD:
-                pParam->paramType = RSN_PMKID_LIST;
-                pParam->content.rsnPMKIDList.BSSIDInfoCount = 1;
-                pParam->content.rsnPMKIDList.Length = 2*sizeof(TI_UINT32) + MAC_ADDR_LEN + PMKID_VALUE_SIZE;
-                MAC_COPY (pParam->content.rsnPMKIDList.osBSSIDInfo[0].BSSID, pmksa->bssid.sa_data);
-                os_memoryCopy(pCmdInterpret->hOs, &pParam->content.rsnPMKIDList.osBSSIDInfo[0].PMKID, pmksa->pmkid, IW_PMKID_LEN);
-
-                res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch, pParam);
-                CHECK_PENDING_RESULT(res,pParam)
-
-                break;
-            case IW_PMKSA_REMOVE:
-                /* Not supported yet */
-                break;
-            case IW_PMKSA_FLUSH:
-                pParam->paramType = RSN_PMKID_LIST;
-                /* By using info count=0, RSN knows to clear its tables */
-                /* It's also possible to call rsn_resetPMKIDList directly, but cmdDispatcher should be the interface */
-                pParam->content.rsnPMKIDList.BSSIDInfoCount = 0;
-                res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch, pParam);
-                CHECK_PENDING_RESULT(res,pParam)
-
-                break;
-            default:
-                cmdObj->return_code = WEXT_NOT_SUPPORTED;
-                break;
-            }
-        }
-
-        break;
-
-    case SIOCIWFIRSTPRIV:
-        {
-            ti_private_cmd_t *my_command = (ti_private_cmd_t *)cmdObj->param3;
-
-            /*
-            os_printf ("cmd =  0x%x     flags = 0x%x\n",(unsigned int)my_command->cmd,(unsigned int)my_command->flags);
-            os_printf ("in_buffer =  0x%x (len = %d)\n",my_command->in_buffer,(unsigned int)my_command->in_buffer_len);
-            os_printf ("out_buffer =  0x%x (len = %d)\n",my_command->out_buffer,(unsigned int)my_command->out_buffer_len);
-            */
-
-            pParam->paramType = my_command->cmd;
-
-            if (IS_PARAM_ASYNC(my_command->cmd))
-            {
-                /* os_printf ("Detected ASYNC command - setting CB \n"); */
-                pParam->content.interogateCmdCBParams.hCb  =  (TI_HANDLE)pCmdInterpret;
-                pParam->content.interogateCmdCBParams.fCb  =  (void*)cmdInterpret_ServiceCompleteCB;
-                pParam->content.interogateCmdCBParams.pCb  =  my_command->out_buffer;
-                if (my_command->out_buffer)
-                {
-                    /* the next copy is need for PLT commands */
-                    os_memoryCopy(pCmdInterpret->hOs,  my_command->out_buffer, my_command->in_buffer, min(my_command->in_buffer_len,my_command->out_buffer_len));
-                }
-            }
-            else if ((my_command->in_buffer) && (my_command->in_buffer_len))
-            {
-                /*
-                this cmd doesnt have the structure allocated as part of the paramInfo_t structure.
-                as a result we need to allocate the memory internally.
-                */
-                if(IS_ALLOC_NEEDED_PARAM(my_command->cmd))
-                {
-                    *(void **)&pParam->content = os_memoryAlloc(pCmdInterpret->hOs, my_command->in_buffer_len);
-                    os_memoryCopy(pCmdInterpret->hOs, *(void **)&pParam->content, my_command->in_buffer, my_command->in_buffer_len);
-                }
-                else
-                    os_memoryCopy(pCmdInterpret->hOs,&pParam->content,my_command->in_buffer,my_command->in_buffer_len);
-            }
-
-            if (my_command->flags & PRIVATE_CMD_SET_FLAG)
-            {
-                /* os_printf ("Calling setParam\n"); */
-                pParam->paramLength = my_command->in_buffer_len;
-                res = cmdDispatch_SetParam (pCmdInterpret->hCmdDispatch,pParam);
-            }
-            else if (my_command->flags & PRIVATE_CMD_GET_FLAG)
-            {
-                /* os_printf ("Calling getParam\n"); */
-                pParam->paramLength = my_command->out_buffer_len;
-                res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch,pParam);
-                if(res == EXTERNAL_GET_PARAM_DENIED)
-                {
-                    cmdObj->return_code  = WEXT_INVALID_PARAMETER;
-                    goto cmd_end;
-                }
-
-                /*
-                this is for cmd that want to check the size of memory that they need to
-                allocate for the actual data.
-                */
-                if(pParam->paramLength && (my_command->out_buffer_len == 0))
-                {
-                    my_command->out_buffer_len = pParam->paramLength;
-                }
-            }
-            else
-            {
-                res = TI_NOK;
-            }
-
-            if (res == TI_OK)
-            {
-                if(IS_PARAM_ASYNC(my_command->cmd))
-                {
-                    pCmdInterpret->pAsyncCmd = cmdObj; /* Save command handle for completion CB */
-                    res = COMMAND_PENDING;
-                }
-                else
-                {
-                    if ((my_command->out_buffer) && (my_command->out_buffer_len))
-                    {
-                        if(IS_ALLOC_NEEDED_PARAM(my_command->cmd))
-                        {
-                            os_memoryCopy(pCmdInterpret->hOs,my_command->out_buffer,*(void **)&pParam->content,my_command->out_buffer_len);
-                        }
-                        else
-                        {
-                            os_memoryCopy(pCmdInterpret->hOs,my_command->out_buffer,&pParam->content,my_command->out_buffer_len);
-                        }
-                    }
-                }
-            }
-
-            /* need to free the allocated memory */
-            if(IS_ALLOC_NEEDED_PARAM(my_command->cmd))
-            {
-                os_memoryFree(pCmdInterpret->hOs, *(void **)&pParam->content, my_command->in_buffer_len);
-            }
-        }
-
-        break;
-
-    default:
-        break;
-
-    }
-
-    if (res == TI_OK)
-    {
-        cmdObj->return_code = WEXT_OK;
-    }
-cmd_end:
-    os_memoryFree(pCmdInterpret->hOs, pParam, sizeof(paramInfo_t));
-    /* Return with return code */
-    return res;
-
-}
-
-
-
-/* This routine is called by the command mailbox module to signal an ASYNC command has complete */
-int cmdInterpret_ServiceCompleteCB (TI_HANDLE hCmdInterpret, int status, void *buffer)
-{
-    cmdInterpret_t *pCmdInterpret = (cmdInterpret_t *)hCmdInterpret;
-
-    if (pCmdInterpret->pAsyncCmd == NULL)
-    {
-        os_printf ("cmdInterpret_ServiceCompleteCB: AsyncCmd is NULL!!\n");
-        return TI_NOK;
-    }
-
-    pCmdInterpret->pAsyncCmd->return_code = status;
-
-    pCmdInterpret->pAsyncCmd = NULL;
-
-    /* Call the Cmd module to complete command processing */
-    cmdHndlr_Complete (pCmdInterpret->hCmdHndlr);
-
-    /* Call commands handler to continue handling further commands if queued */
-    cmdHndlr_HandleCommands (pCmdInterpret->hCmdHndlr);
-
-    return TI_OK;
-}
-
-/* Register to receive events */
-static int cmdInterpret_initEvents(TI_HANDLE hCmdInterpret)
-{
-    cmdInterpret_t *pCmdInterpret = (cmdInterpret_t *)(hCmdInterpret);
-    IPC_EVENT_PARAMS evParams;
-    int i = 0;
-
-    for (i=0; i<IPC_EVENT_MAX; i++)
-    {
-        evParams.uDeliveryType    = DELIVERY_PUSH;
-        evParams.uProcessID       = 0;
-        evParams.uEventID         = 0;
-        evParams.hUserParam       = hCmdInterpret;
-        evParams.pfEventCallback  = cmdInterpret_Event;
-        evParams.uEventType       = i;
-        EvHandlerRegisterEvent (pCmdInterpret->hEvHandler, (TI_UINT8*) &evParams, sizeof(IPC_EVENT_PARAMS));
-        pCmdInterpret->hEvents[i] = evParams.uEventID;
-    }
-
-    return TI_OK;
-}
-
-
-/* Unregister events */
-static int cmdInterpret_unregisterEvents(TI_HANDLE hCmdInterpret, TI_HANDLE hEvHandler)
-{
-    cmdInterpret_t *pCmdInterpret = (cmdInterpret_t *)(hCmdInterpret);
-    IPC_EVENT_PARAMS evParams;
-    int i = 0;
-    os_setDebugOutputToLogger(TI_FALSE);
-
-    for (i=0; i<IPC_EVENT_MAX; i++)
-    {
-        evParams.uEventType =  i;
-        evParams.uEventID = pCmdInterpret->hEvents[i];
-        EvHandlerUnRegisterEvent (pCmdInterpret->hEvHandler, &evParams);
-    }
-
-    return TI_OK;
-}
-
-
-/* Handle driver events and convert to WEXT format */
-static TI_INT32 cmdInterpret_Event(IPC_EV_DATA* pData)
-{
-    IPC_EVENT_PARAMS * pInParam =  (IPC_EVENT_PARAMS *)pData;
-    cmdInterpret_t *pCmdInterpret = (cmdInterpret_t *)(pInParam->hUserParam);
-    OS_802_11_ASSOCIATION_INFORMATION  *assocInformation;
-    TI_UINT8 *requestIEs;
-    TI_UINT8 *responseIEs;
-    union iwreq_data wrqu;
-    char *memptr;
-    int TotalLength, res = TI_OK;
-#ifdef XCC_MODULE_INCLUDED
-    cckm_assocInformation_t cckm_assoc;
-    unsigned char beaconIE[MAX_BEACON_BODY_LENGTH];
-    unsigned char Cckmstart[CCKM_START_EVENT_SIZE * 2];
-    int i,len,n;
-    OS_802_11_BSSID_EX *my_current;
-#endif
-    /* indicate to the OS */
-    os_IndicateEvent (pCmdInterpret->hOs, pData);
-
-
-    switch (pData->EvParams.uEventType)
-    {
-    case IPC_EVENT_ASSOCIATED:
-        {
-            paramInfo_t *pParam;
-
-            pParam = (paramInfo_t *)os_memoryAlloc(pCmdInterpret->hOs, sizeof(paramInfo_t));
-            if (!pParam)
-                return TI_NOK;
-
-            /* Get Association information */
-
-            /* first check if this is ADHOC or INFRA (to avoid retrieving ASSOC INFO for ADHOC)*/
-
-            pParam->paramType = CTRL_DATA_CURRENT_BSS_TYPE_PARAM;
-            cmdDispatch_GetParam(pCmdInterpret->hCmdDispatch, pParam);
-            if (pParam->content.ctrlDataCurrentBssType == BSS_INFRASTRUCTURE)
-            {
-
-                /* First get length of data */
-                pParam->paramType   = ASSOC_ASSOCIATION_INFORMATION_PARAM;
-                pParam->paramLength = 0;
-                res = cmdDispatch_GetParam(pCmdInterpret->hCmdDispatch, pParam);
-
-                if (res != TI_NOK)
-                {
-                    TotalLength = sizeof(OS_802_11_ASSOCIATION_INFORMATION) + pParam->content.assocAssociationInformation.RequestIELength +
-                                  pParam->content.assocAssociationInformation.ResponseIELength;
-
-                    memptr = os_memoryAlloc(pCmdInterpret->hOs, TotalLength);
-
-                    if (!memptr) {
-                        res = TI_NOK;
-                        goto event_end;
-                    }
-
-                    /* Get actual data */
-
-                    pParam->paramType   = ASSOC_ASSOCIATION_INFORMATION_PARAM;
-                    pParam->paramLength = TotalLength;
-                    cmdDispatch_GetParam(pCmdInterpret->hCmdDispatch, pParam);
-
-                    os_memoryCopy(pCmdInterpret->hOs, memptr, &pParam->content, TotalLength);
-
-                    assocInformation = (OS_802_11_ASSOCIATION_INFORMATION*)memptr;
-                    requestIEs = (TI_UINT8*)memptr + sizeof(OS_802_11_ASSOCIATION_INFORMATION);
-
-                    if (assocInformation->RequestIELength > 0)
-                    {
-                        os_memorySet (pCmdInterpret->hOs,&wrqu, 0, sizeof(wrqu));
-                        wrqu.data.length = assocInformation->RequestIELength;
-                        wireless_send_event(NETDEV(pCmdInterpret->hOs), IWEVASSOCREQIE, &wrqu, (char *)assocInformation->OffsetRequestIEs);
-                    }
-
-                    responseIEs = (char *)assocInformation->OffsetRequestIEs + assocInformation->RequestIELength;
-
-                    if (assocInformation->ResponseIELength > 0)
-                    {
-                        os_memorySet (pCmdInterpret->hOs,&wrqu, 0, sizeof(wrqu));
-                        wrqu.data.length = assocInformation->ResponseIELength;
-                        wireless_send_event(NETDEV(pCmdInterpret->hOs), IWEVASSOCRESPIE, &wrqu, (char *)responseIEs);
-                    }
-
-                    os_memoryFree(pCmdInterpret->hOs, memptr, TotalLength);
-
-                }
-            }
-
-#ifdef XCC_MODULE_INCLUDED
-            /*
-               the driver must provide BEACON IE for calculate MIC in case of fast roaming
-               the data is an ASCII NUL terminated string
-            */
-
-
-            my_current = os_memoryAlloc (pCmdInterpret->hOs,MAX_BEACON_BODY_LENGTH);
-            if (!my_current) {
-                res = TI_NOK;
-                goto event_end;
-            }
-            pParam->paramType   = SITE_MGR_GET_SELECTED_BSSID_INFO_EX;
-            pParam->content.pSiteMgrSelectedSiteInfo = my_current;
-            pParam->paramLength = MAX_BEACON_BODY_LENGTH;
-            cmdDispatch_GetParam(pCmdInterpret->hCmdDispatch, pParam);
-
-            len = pParam->content.pSiteMgrSelectedSiteInfo->IELength - BEACON_HEADER_FIX_SIZE;
-
-            n = sprintf(beaconIE, "BEACONIE=");
-            for (i = 0; i < len; i++)
-            {
-              n += sprintf(beaconIE + n, "%02x", pParam->content.pSiteMgrSelectedSiteInfo->IEs[BEACON_HEADER_FIX_SIZE+i] & 0xff);
-            }
-
-            os_memorySet (pCmdInterpret->hOs,&wrqu, 0, sizeof(wrqu));
-            wrqu.data.length = n;
-            wireless_send_event(NETDEV(pCmdInterpret->hOs), IWEVCUSTOM, &wrqu, beaconIE);
-            os_memoryFree(pCmdInterpret->hOs,my_current,MAX_BEACON_BODY_LENGTH);
-
-
-            /*
-              The driver should be sending the Association Resp IEs
-              This informs the supplicant of the IEs used in the association exchanged which are required to proceed with CCKM.
-            */
-
-
-            pParam->paramType   = ASSOC_ASSOCIATION_RESP_PARAM;
-            pParam->paramLength = sizeof(TAssocReqBuffer);
-            cmdDispatch_GetParam(pCmdInterpret->hCmdDispatch, pParam);
-
-            cckm_assoc.assocRespLen = Param.content.assocReqBuffer.bufferSize - ASSOC_RESP_FIXED_DATA_LEN ;
-            cckm_assoc.assocRespBuffer = os_memoryAlloc (pCmdInterpret->hOs, cckm_assoc.assocRespLen);
-            if (!cckm_assoc.assocRespBuffer) {
-                res = TI_NOK;
-                goto event_end;
-            }
-            memcpy(cckm_assoc.assocRespBuffer,(pParam->content.assocReqBuffer.buffer)+ASSOC_RESP_FIXED_DATA_LEN,cckm_assoc.assocRespLen);
-            wrqu.data.length = cckm_assoc.assocRespLen;
-            wireless_send_event(NETDEV(pCmdInterpret->hOs), IWEVASSOCRESPIE, &wrqu, (TI_UINT8*)cckm_assoc.assocRespBuffer);
-            os_memoryFree(pCmdInterpret->hOs,cckm_assoc.assocRespBuffer,cckm_assoc.assocRespLen);
-
-#endif
-           /* Send associated event (containing BSSID of AP) */
-
-            os_memorySet (pCmdInterpret->hOs,&wrqu, 0, sizeof(wrqu));
-            pParam->paramType = SITE_MGR_CURRENT_BSSID_PARAM;
-            cmdDispatch_GetParam ( pCmdInterpret->hCmdDispatch, pParam );
-            MAC_COPY (wrqu.ap_addr.sa_data, pParam->content.siteMgrDesiredBSSID);
-            wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-            wireless_send_event(NETDEV(pCmdInterpret->hOs), SIOCGIWAP, &wrqu, NULL);
-event_end:
-            os_memoryFree(pCmdInterpret->hOs, pParam, sizeof(paramInfo_t));
-        }
-        break;
-    case IPC_EVENT_DISASSOCIATED:
-        wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-        os_memorySet (pCmdInterpret->hOs,wrqu.ap_addr.sa_data, 0, ETH_ALEN);
-
-        wireless_send_event(NETDEV(pCmdInterpret->hOs), SIOCGIWAP, &wrqu, NULL);
-
-        os_memorySet (pCmdInterpret->hOs,&wrqu, 0, sizeof(wrqu));
-        wrqu.data.length = sizeof(IPC_EV_DATA);
-        wireless_send_event(NETDEV(pCmdInterpret->hOs), IWEVCUSTOM, &wrqu, (TI_UINT8 *)pData);
-
-        break;
-
-    case IPC_EVENT_SCAN_COMPLETE:
-        {
-            TI_UINT8 *buf;
-            wrqu.data.length = 0;
-            wrqu.data.flags = 0;
-            buf = pData->uBuffer;
-
-            if (*(TI_UINT32*)buf == SCAN_STATUS_COMPLETE)
-                wireless_send_event(NETDEV(pCmdInterpret->hOs), SIOCGIWSCAN, &wrqu, NULL);
-            else
-            {
-                if (*(TI_UINT32*)buf == SCAN_STATUS_STOPPED)          // scan is stopped successfully
-                    pData->EvParams.uEventType = IPC_EVENT_SCAN_STOPPED;
-                else if (*(TI_UINT32*)buf == SCAN_STATUS_FAILED)          // scan is stopped successfully
-                    pData->EvParams.uEventType = IPC_EVENT_SCAN_FAILED;
-                else
-                    break;
-
-                os_memorySet (pCmdInterpret->hOs,&wrqu, 0, sizeof(wrqu));
-                wrqu.data.length = sizeof(IPC_EV_DATA);
-                wireless_send_event(NETDEV(pCmdInterpret->hOs), IWEVCUSTOM, &wrqu, (u8 *)pData);
-            }
-        }
-        break;
-
-    case IPC_EVENT_MEDIA_SPECIFIC:
-        {
-            TI_UINT8 *buf;
-            OS_802_11_AUTHENTICATION_REQUEST *request;
-            struct iw_michaelmicfailure ev;
-            struct iw_pmkid_cand pcand;
-
-            buf = pData->uBuffer;
-
-            if (*(TI_UINT32*)buf == os802_11StatusType_Authentication)
-            {
-                request = (OS_802_11_AUTHENTICATION_REQUEST *) (buf + sizeof(TI_UINT32));
-                if ( request->Flags == OS_802_11_REQUEST_PAIRWISE_ERROR || request->Flags == OS_802_11_REQUEST_GROUP_ERROR)
-                {
-                    os_printf ("MIC failure detected\n");
-
-                    os_memorySet (pCmdInterpret->hOs,&ev, 0, sizeof(ev));
-
-                    ev.flags = 0 & IW_MICFAILURE_KEY_ID;
-
-                    if (request->Flags == OS_802_11_REQUEST_GROUP_ERROR)
-                        ev.flags |= IW_MICFAILURE_GROUP;
-                    else
-                        ev.flags |= IW_MICFAILURE_PAIRWISE;
-
-                    ev.src_addr.sa_family = ARPHRD_ETHER;
-                    MAC_COPY (ev.src_addr.sa_data, request->BSSID);
-                    os_memorySet (pCmdInterpret->hOs,&wrqu, 0, sizeof(wrqu));
-                    wrqu.data.length = sizeof(ev);
-                    wireless_send_event(NETDEV(pCmdInterpret->hOs), IWEVMICHAELMICFAILURE, &wrqu, (char *) &ev);
-                }
-
-            } else if (*(TI_UINT32*)buf == os802_11StatusType_PMKID_CandidateList)
-            {
-                OS_802_11_PMKID_CANDIDATELIST  *pCandList = (OS_802_11_PMKID_CANDIDATELIST *) (buf + sizeof(TI_UINT32));
-                int i;
-
-                os_printf ("Preauthentication list (%d entries)!\n",pCandList->NumCandidates);
-
-                for (i=0; i<pCandList->NumCandidates; i++)
-                {
-                    os_memorySet (pCmdInterpret->hOs,&pcand, 0, sizeof(pcand));
-                    pcand.flags |= IW_PMKID_CAND_PREAUTH;
-
-                    pcand.index = i;
-
-                    MAC_COPY (pcand.bssid.sa_data, pCandList->CandidateList[i].BSSID);
-
-                    os_memorySet (pCmdInterpret->hOs,&wrqu, 0, sizeof(wrqu));
-
-                    wrqu.data.length = sizeof(pcand);
-
-                    wireless_send_event(NETDEV(pCmdInterpret->hOs), IWEVPMKIDCAND,
-                                        &wrqu, (TI_UINT8 *)&pcand);
-                }
-
-            }
-
-        }
-
-        break;
-#ifdef XCC_MODULE_INCLUDED
-    case IPC_EVENT_CCKM_START:
-
-        n = sprintf(Cckmstart, "CCKM-Start=");
-        for (i = 0; i < 14; i++)
-        {
-          n += sprintf(Cckmstart + n, "%02x", pData->uBuffer[i] & 0xff);
-        }
-
-        os_memorySet (pCmdInterpret->hOs,&wrqu, 0, sizeof(wrqu));
-        wrqu.data.length = n;
-        wireless_send_event(NETDEV(pCmdInterpret->hOs), IWEVCUSTOM, &wrqu, Cckmstart);
-
-        break;
-#endif
-
-    default:
-        /* Other event? probably private and does not need interface-specific conversion */
-        /* Send as "custom" event */
-        {
-            os_memorySet (pCmdInterpret->hOs,&wrqu, 0, sizeof(wrqu));
-            wrqu.data.length = sizeof(IPC_EV_DATA);
-            wireless_send_event(NETDEV(pCmdInterpret->hOs), IWEVCUSTOM, &wrqu, (TI_UINT8 *)pData);
-        }
-
-        break;
-    }
-
-    return res;
-}
-
-
-/* Configure driver authentication and security by converting from WEXT interface to driver (OID-like) settings */
-static int cmdInterpret_setSecurityParams (TI_HANDLE hCmdInterpret)
-{
-    cmdInterpret_t *pCmdInterpret = (cmdInterpret_t *)hCmdInterpret;
-    paramInfo_t *pParam;
-    int auth_mode, encr_mode;
-
-    /*
-        printk ("wpa_version=0x%x auth_alg=0x%x key_mgmt=0x%x "
-           "cipher_pairwise=0x%x cipher_group=0x%x\n",
-           pCmdInterpret->wai.iw_auth_wpa_version, pCmdInterpret->wai.iw_auth_80211_auth_alg,
-           pCmdInterpret->wai.iw_auth_key_mgmt, pCmdInterpret->wai.iw_auth_cipher_pairwise,
-           pCmdInterpret->wai.iw_auth_cipher_group);
-    */
-    pParam = (paramInfo_t *)os_memoryAlloc(pCmdInterpret->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-        return TI_NOK;
-    if (pCmdInterpret->wai.iw_auth_wpa_version & IW_AUTH_WPA_VERSION_WPA2)
-    {
-        if (pCmdInterpret->wai.iw_auth_key_mgmt & IW_AUTH_KEY_MGMT_802_1X)
-            auth_mode = os802_11AuthModeWPA2;
-        else
-            auth_mode = os802_11AuthModeWPA2PSK;
-    } else if (pCmdInterpret->wai.iw_auth_wpa_version & IW_AUTH_WPA_VERSION_WPA)
-    {
-        if (pCmdInterpret->wai.iw_auth_key_mgmt & IW_AUTH_KEY_MGMT_802_1X)
-            auth_mode = os802_11AuthModeWPA;
-        else if (pCmdInterpret->wai.iw_auth_key_mgmt & IW_AUTH_KEY_MGMT_PSK)
-            auth_mode = os802_11AuthModeWPAPSK;
-        else
-            auth_mode = os802_11AuthModeWPANone;
-    } else if (pCmdInterpret->wai.iw_auth_80211_auth_alg & IW_AUTH_ALG_SHARED_KEY)
-    {
-        if (pCmdInterpret->wai.iw_auth_80211_auth_alg & IW_AUTH_ALG_OPEN_SYSTEM)
-            auth_mode = os802_11AuthModeAutoSwitch;
-        else
-            auth_mode = os802_11AuthModeShared;
-    } else
-        auth_mode = os802_11AuthModeOpen;
-
-    if (pCmdInterpret->wai.iw_auth_cipher_pairwise & IW_AUTH_CIPHER_CCMP)
-        encr_mode = os802_11Encryption3Enabled;
-    else if (pCmdInterpret->wai.iw_auth_cipher_pairwise & IW_AUTH_CIPHER_TKIP)
-        encr_mode = os802_11Encryption2Enabled;
-    else if (pCmdInterpret->wai.iw_auth_cipher_pairwise &
-             (IW_AUTH_CIPHER_WEP40 | IW_AUTH_CIPHER_WEP104))
-        encr_mode = os802_11Encryption1Enabled;
-    else if (pCmdInterpret->wai.iw_auth_cipher_group & IW_AUTH_CIPHER_CCMP)
-        encr_mode = os802_11Encryption3Enabled;
-    else if (pCmdInterpret->wai.iw_auth_cipher_group & IW_AUTH_CIPHER_TKIP)
-        encr_mode = os802_11Encryption2Enabled;
-    else
-        encr_mode = os802_11EncryptionDisabled;
-
-    switch (encr_mode)
-    {
-    case os802_11WEPDisabled:
-        encr_mode = TWD_CIPHER_NONE;
-        break;
-    case os802_11WEPEnabled:
-        encr_mode = TWD_CIPHER_WEP;
-        break;
-    case os802_11Encryption2Enabled:
-        encr_mode = TWD_CIPHER_TKIP;
-        break;
-    case os802_11Encryption3Enabled:
-        encr_mode = TWD_CIPHER_AES_CCMP;
-        break;
-    default:
-        break;
-    }
-
-    pParam->paramType = RSN_EXT_AUTHENTICATION_MODE;
-    pParam->content.rsnExtAuthneticationMode = auth_mode;
-    cmdDispatch_SetParam ( pCmdInterpret->hCmdDispatch, pParam );
-
-    pParam->paramType = RSN_ENCRYPTION_STATUS_PARAM;
-    pParam->content.rsnEncryptionStatus = encr_mode;
-    cmdDispatch_SetParam ( pCmdInterpret->hCmdDispatch, pParam );
-    os_memoryFree(pCmdInterpret->hOs, pParam, sizeof(paramInfo_t));
-    return TI_OK;
-}
-
-
-void *cmdInterpret_GetStat (TI_HANDLE hCmdInterpret)
-{
-    cmdInterpret_t *pCmdInterpret = (cmdInterpret_t *)hCmdInterpret;
-
-    /* Check if driver is initialized - If not - return empty statistics */
-    if (hCmdInterpret)
-    {
-        paramInfo_t *pParam;
-        TI_STATUS res;
-
-        pParam = (paramInfo_t *)os_memoryAlloc(pCmdInterpret->hOs, sizeof(paramInfo_t));
-        if (!pParam)
-            return NULL;
-
-        pParam->paramType = SITE_MGR_GET_STATS;
-        res = cmdDispatch_GetParam ( pCmdInterpret->hCmdDispatch, pParam );
-
-        if (res == TI_OK)
-        {
-            pCmdInterpret->wstats.qual.level = (TI_UINT8)pParam->content.siteMgrCurrentRssi;
-            pCmdInterpret->wstats.qual.updated = IW_QUAL_LEVEL_UPDATED | IW_QUAL_QUAL_UPDATED | IW_QUAL_NOISE_INVALID | IW_QUAL_DBM;
-        }
-        else
-        {
-            pCmdInterpret->wstats.qual.level = 0;
-            pCmdInterpret->wstats.qual.updated = IW_QUAL_ALL_INVALID;
-        }
-
-        pCmdInterpret->wstats.qual.noise = 0;
-        pCmdInterpret->wstats.qual.qual = 0;
-        pCmdInterpret->wstats.status = 0;
-        pCmdInterpret->wstats.miss.beacon = 0;
-        pCmdInterpret->wstats.discard.retries = 0;      /* Tx : Max MAC retries num reached */
-        pCmdInterpret->wstats.discard.nwid = 0;         /* Rx : Wrong nwid/essid */
-        pCmdInterpret->wstats.discard.code = 0;         /* Rx : Unable to code/decode (WEP) */
-        pCmdInterpret->wstats.discard.fragment = 0;     /* Rx : Can't perform MAC reassembly */
-        pCmdInterpret->wstats.discard.misc = 0;     /* Others cases */
-        os_memoryFree(pCmdInterpret->hOs, pParam, sizeof(paramInfo_t));
-        return &pCmdInterpret->wstats;
-    }
-    return (void *)NULL;
-}
diff --git a/wl1271/platforms/os/linux/src/RxBuf.c b/wl1271/platforms/os/linux/src/RxBuf.c
deleted file mode 100644
index bda7c10..0000000
--- a/wl1271/platforms/os/linux/src/RxBuf.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * RxBuf.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  buf.c
- *  \brief Linux buf implementation.
- *
- *  \see   
- */
-
-#include "tidef.h"
-#include "RxBuf_linux.h"
-#include <linux/netdevice.h>
-/*--------------------------------------------------------------------------------------*/
-/* 
- * Allocate BUF Rx packets.
- * Add 16 bytes before the data buffer for WSPI overhead!
- */
-void *RxBufAlloc(TI_HANDLE hOs, TI_UINT32 len,PacketClassTag_e ePacketClassTag)
-{
-	TI_UINT32 alloc_len = len + WSPI_PAD_BYTES + PAYLOAD_ALIGN_PAD_BYTES + RX_HEAD_LEN_ALIGNED;
-	struct sk_buff *skb;
-	rx_head_t *rx_head;
-	gfp_t flags = (in_atomic()) ? GFP_ATOMIC : GFP_KERNEL;
-
-	skb = alloc_skb(alloc_len, flags);
-	if (!skb)
-	{
-		return NULL;
-	}
-	rx_head = (rx_head_t *)skb->head;
-	rx_head->skb = skb;
-	skb_reserve(skb, RX_HEAD_LEN_ALIGNED + WSPI_PAD_BYTES);
-/*
-	printk("-->> RxBufAlloc(len=%d)  skb=0x%x skb->data=0x%x skb->head=0x%x skb->len=%d\n",
-		   (int)len, (int)skb, (int)skb->data, (int)skb->head, (int)skb->len);
-*/
-	return skb->data;
-    
-}
-
-/*--------------------------------------------------------------------------------------*/
-
-inline void RxBufFree(TI_HANDLE hOs, void *pBuf)
-{
-	unsigned char  *pdata   = (unsigned char *)((TI_UINT32)pBuf & ~(TI_UINT32)0x3);
-	rx_head_t      *rx_head = (rx_head_t *)(pdata -  WSPI_PAD_BYTES - RX_HEAD_LEN_ALIGNED);
-	struct sk_buff *skb     = rx_head->skb;
-
-#ifdef TI_DBG
-	if ((TI_UINT32)pBuf & 0x3)
-	{
-		if ((TI_UINT32)pBuf - (TI_UINT32)skb->data != 2)
-		{
-			printk("RxBufFree() address error skb=0x%x skb->data=0x%x pPacket=0x%x !!!\n",(int)skb, (int)skb->data, (int)pBuf);
-		}
-	}
-	else
-	{
-		if ((TI_UINT32)skb->data != (TI_UINT32)pBuf)
-		{
-			printk("RxBufFree() address error skb=0x%x skb->data=0x%x pPacket=0x%x !!!\n",(int)skb, (int)skb->data, (int)pBuf);
-		}
-	}
-#endif	  
-/*
-	printk("-->> RxBufFree()  skb=0x%x skb->data=0x%x skb->head=0x%x skb->len=%d\n",
-		   (int)skb, (int)skb->data, (int)skb->head, (int)skb->len);
-*/
-	dev_kfree_skb(skb);
-}
diff --git a/wl1271/platforms/os/linux/src/WlanDrvIf.c b/wl1271/platforms/os/linux/src/WlanDrvIf.c
deleted file mode 100644
index 7985384..0000000
--- a/wl1271/platforms/os/linux/src/WlanDrvIf.c
+++ /dev/null
@@ -1,1156 +0,0 @@
-/*
- * WlanDrvIf.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * src/esta_drv.c
- *
- * Kernel level portion of eSTA DK Linux module driver
- *
- */
-
-
-/** \file   WlanDrvIf.c 
- *  \brief  The OS-Dependent interfaces of the WLAN driver with external applications:
- *          - Configuration utilities (including download, configuration and activation)
- *          - Network Stack (Tx and Rx)
- *          - Interrupts
- *          - Events to external applications
- *  
- *  \see    WlanDrvIf.h, Wext.c
- */
-
-
-#include <net/sock.h>
-#include <linux/etherdevice.h>
-#include <linux/delay.h>
-#include <linux/netlink.h>
-
-#include "WlanDrvIf.h"
-#include "osApi.h"
-#include "host_platform.h"
-#include "context.h"
-#include "CmdHndlr.h"
-#include "WlanDrvWext.h"
-#include "DrvMain.h"
-#include "txDataQueue_Api.h"
-#include "txMgmtQueue_Api.h"
-#include "TWDriver.h"
-#include "Ethernet.h"
-#ifdef TI_DBG
-#include "tracebuf_api.h"
-#endif
-/* PM hooks */
-#ifdef TI_CONFIG_PM_HOOKS
-#include "SdioDrv.h"
-static int wlanDrvIf_pm_resume(void);
-static int wlanDrvIf_pm_suspend(void);
-#endif
-#include "bmtrace_api.h"
-#ifdef STACK_PROFILE
-#include "stack_profile.h"
-#endif
-
-/* save driver handle just for module cleanup */
-static TWlanDrvIfObj *pDrvStaticHandle;  
-
-#define OS_SPECIFIC_RAM_ALLOC_LIMIT			(0xFFFFFFFF)	/* assume OS never reach that limit */
-
-
-MODULE_DESCRIPTION("TI WLAN Embedded Station Driver");
-MODULE_LICENSE("GPL");
-
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 31))
-static int wlanDrvIf_Xmit(struct sk_buff *skb, struct net_device *dev);
-static int wlanDrvIf_XmitDummy(struct sk_buff *skb, struct net_device *dev);
-static struct net_device_stats *wlanDrvIf_NetGetStat(struct net_device *dev);
-int wlanDrvIf_Open(struct net_device *dev);
-int wlanDrvIf_Release(struct net_device *dev);
-
-static struct net_device_ops tiwlan_ops_pri = {
-	.ndo_open = wlanDrvIf_Open,
-	.ndo_stop = wlanDrvIf_Release,
-	.ndo_get_stats = wlanDrvIf_NetGetStat,
-	.ndo_do_ioctl = NULL,
-	.ndo_start_xmit = wlanDrvIf_Xmit,
-};
-
-static struct net_device_ops tiwlan_ops_dummy = {
-	.ndo_open = wlanDrvIf_Open,
-	.ndo_stop = wlanDrvIf_Release,
-	.ndo_get_stats = wlanDrvIf_NetGetStat,
-	.ndo_do_ioctl = NULL,
-	.ndo_start_xmit = wlanDrvIf_XmitDummy,
-};
-#endif
-
-/** 
- * \fn     wlanDrvIf_Xmit
- * \brief  Packets transmission
- * 
- * The network stack calls this function in order to transmit a packet
- *     through the WLAN interface.
- * The packet is inserted to the drver Tx queues and its handling is continued
- *     after switching to the driver context.
- *
- * \note   
- * \param  skb - The Linux packet buffer structure
- * \param  dev - The driver network-interface handle
- * \return 0 (= OK)
- * \sa     
- */ 
-static int wlanDrvIf_Xmit (struct sk_buff *skb, struct net_device *dev)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)NETDEV_GET_PRIVATE(dev);
-	TTxCtrlBlk *  pPktCtrlBlk;
-	int status;
-
-	CL_TRACE_START_L1();
-
-	os_profile (drv, 0, 0);
-	drv->stats.tx_packets++;
-	drv->stats.tx_bytes += skb->len;
-
-	/* Allocate a TxCtrlBlk for the Tx packet and save timestamp, length and packet handle */
-	pPktCtrlBlk = TWD_txCtrlBlk_Alloc (drv->tCommon.hTWD);
-
-	pPktCtrlBlk->tTxDescriptor.startTime    = os_timeStampMs(drv); /* remove use of skb->tstamp.off_usec */
-	pPktCtrlBlk->tTxDescriptor.length       = skb->len;
-	pPktCtrlBlk->tTxPktParams.pInputPkt     = skb;
-
-	/* Point the first BDL buffer to the Ethernet header, and the second buffer to the rest of the packet */
-	pPktCtrlBlk->tTxnStruct.aBuf[0] = skb->data;
-	pPktCtrlBlk->tTxnStruct.aLen[0] = ETHERNET_HDR_LEN;
-	pPktCtrlBlk->tTxnStruct.aBuf[1] = skb->data + ETHERNET_HDR_LEN;
-	pPktCtrlBlk->tTxnStruct.aLen[1] = (TI_UINT16)skb->len - ETHERNET_HDR_LEN;
-	pPktCtrlBlk->tTxnStruct.aLen[2] = 0;
-
-	/* Send the packet to the driver for transmission. */
-	status = txDataQ_InsertPacket (drv->tCommon.hTxDataQ, pPktCtrlBlk,(TI_UINT8)skb->priority);
-
-	/* If failed (queue full or driver not running), drop the packet. */
-    if (status != TI_OK)
-    {
-        drv->stats.tx_errors++;
-    }
-	os_profile (drv, 1, 0);
-
-	CL_TRACE_END_L1("tiwlan_drv.ko", "OS", "TX", "");
-
-	return 0;
-}
-/*--------------------------------------------------------------------------------------*/
-/** 
- * \fn     wlanDrvIf_FreeTxPacket
- * \brief  Free the OS Tx packet
- * 
- * Free the OS Tx packet after driver processing is finished.
- *
- * \note   
- * \param  hOs          - The OAL object handle
- * \param  pPktCtrlBlk  - The packet CtrlBlk
- * \param  eStatus      - The packet transmission status (OK/NOK)
- * \return void
- * \sa     
- */ 
-/*--------------------------------------------------------------------------------------*/
-
-void wlanDrvIf_FreeTxPacket (TI_HANDLE hOs, TTxCtrlBlk *pPktCtrlBlk, TI_STATUS eStatus)
-{
-	dev_kfree_skb((struct sk_buff *)pPktCtrlBlk->tTxPktParams.pInputPkt);
-}
-
-/** 
- * \fn     wlanDrvIf_XmitDummy
- * \brief  Dummy transmission handler
- * 
- * This function is registered at the network stack interface as the packets-transmission
- *     handler (replacing wlanDrvIf_Xmit) when the driver is not operational.
- * Using this dummy handler is more efficient then checking the driver state for every 
- *     packet transmission.
- *
- * \note   
- * \param  skb - The Linux packet buffer structure
- * \param  dev - The driver network-interface handle
- * \return error 
- * \sa     wlanDrvIf_Xmit
- */ 
-static int wlanDrvIf_XmitDummy (struct sk_buff *skb, struct net_device *dev)
-{
-	/* Just return error. The driver is not running (network stack frees the packet) */
-	return -ENODEV;
-}
-
-
-/** 
- * \fn     wlanDrvIf_NetGetStat
- * \brief  Provides driver statistics
- * 
- * Provides driver Tx and Rx statistics to network stack.
- *
- * \note   
- * \param  dev - The driver network-interface handle
- * \return The statistics pointer 
- * \sa     
- */ 
-static struct net_device_stats *wlanDrvIf_NetGetStat (struct net_device *dev)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)NETDEV_GET_PRIVATE(dev);
-	ti_dprintf (TIWLAN_LOG_OTHER, "wlanDrvIf_NetGetStat()\n");
-
-	return &drv->stats;
-}
-
-
-/** 
- * \fn     wlanDrvIf_UpdateDriverState
- * \brief  Update the driver state
- * 
- * The DrvMain uses this function to update the OAL with the driver steady state
- *     that is relevant for the driver users.
- * 
- * \note   
- * \param  hOs          - The driver object handle
- * \param  eDriverState - The new driver state
- * \return void
- * \sa     
- */ 
-void wlanDrvIf_UpdateDriverState (TI_HANDLE hOs, EDriverSteadyState eDriverState)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)hOs;
-
-	ti_dprintf(TIWLAN_LOG_OTHER, "wlanDrvIf_UpdateDriverState(): State = %d\n", eDriverState);
-
-	/* Save the new state */
-	drv->tCommon.eDriverState = eDriverState;
-
-	/* If the new state is not RUNNING, replace the Tx handler to a dummy one. */
-	if (eDriverState != DRV_STATE_RUNNING) {
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 31))
-		drv->netdev->hard_start_xmit = wlanDrvIf_XmitDummy;
-#else
-		drv->netdev->netdev_ops = &tiwlan_ops_dummy;
-#endif
-	}
-}
-
-
-/** 
- * \fn     wlanDrvIf_HandleInterrupt
- * \brief  The WLAN interrupt handler
- * 
- * The WLAN driver interrupt handler called in the interrupt context.
- * The actual handling is done in the driver's context after switching to the workqueue.
- * 
- * \note   
- * \param  irq      - The interrupt type
- * \param  hDrv     - The driver object handle
- * \param  cpu_regs - The CPU registers
- * \return IRQ_HANDLED
- * \sa     
- */ 
-irqreturn_t wlanDrvIf_HandleInterrupt (int irq, void *hDrv, struct pt_regs *cpu_regs)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)hDrv;
-
-	TWD_InterruptRequest (drv->tCommon.hTWD);
-
-	return IRQ_HANDLED;
-}
-
-
-/** 
- * \fn     PollIrqHandler
- * \brief  WLAN IRQ polling handler - for debug!
- * 
- * A debug option to catch the WLAN events in polling instead of interrupts.
- * A timer calls this function periodically to check the interrupt status register.
- * 
- * \note   
- * \param  parm - The driver object handle
- * \return void
- * \sa     
- */ 
-#ifdef PRIODIC_INTERRUPT
-static void wlanDrvIf_PollIrqHandler (TI_HANDLE parm)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)parm;
-
-	wlanDrvIf_HandleInterrupt (0, drv, NULL);
-	os_periodicIntrTimerStart (drv);
-}
-#endif
-
-
-/** 
- * \fn     wlanDrvIf_DriverTask
- * \brief  The driver task
- * 
- * This is the driver's task, where most of its job is done.
- * External contexts just save required information and schedule the driver's
- *     task to continue the handling.
- * See more information in the context engine module (context.c).
- *
- * \note   
- * \param  hDrv - The driver object handle
- * \return void
- * \sa     
- */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
-static void wlanDrvIf_DriverTask (void *hDrv)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)hDrv;
-#else
-static void wlanDrvIf_DriverTask(struct work_struct *work)
-{
-#ifdef STACK_PROFILE
-	register unsigned long sp asm ("sp");
-	unsigned long local_sp = sp;
-#endif
-	TWlanDrvIfObj *drv = container_of(work, TWlanDrvIfObj, tWork);
-#endif
-
-#ifdef STACK_PROFILE
-	unsigned long curr1, base1;
-	unsigned long curr2, base2;
-	static unsigned long maximum_stack = 0;
-#endif   
-	os_profile (drv, 0, 0);
-
-#ifdef STACK_PROFILE
-	curr1 = check_stack_start(&base1, local_sp + 4, 0);
-#endif
-
-	/* Call the driver main task */
-	context_DriverTask (drv->tCommon.hContext);
-
-	os_profile (drv, 1, 0);
-	os_wake_lock_timeout(drv);
-	os_wake_unlock(drv);
-#ifdef STACK_PROFILE
-	curr2 = check_stack_stop(&base2, 0);
-	if (base2 == base1) {
-	/* if the current measurement is bigger then the maximum store it and print*/
-		if ((curr1 - curr2) > maximum_stack) {
-			printk("STACK PROFILER GOT THE LOCAL MAXIMMUM!!!! \n");
-			printk("current operation stack use=%lu \n",(curr1 - curr2));
-			printk("total stack use=%lu \n",8192 - curr2 + base2);
-			printk("total stack usage=%lu percent \n",100 * (8192 - curr2 + base2) / 8192);
-			maximum_stack = curr1 - curr2;
-		}
-	}
-#endif
-}
-
-
-/** 
- * \fn     wlanDrvIf_LoadFiles
- * \brief  Load init files from loader
- * 
- * This function is called from the loader context right after the driver
- *     is created (in IDLE state).
- * It copies the following files to the driver's memory:
- *     - Ini-File - The driver's default parameters values
- *     - NVS-File - The NVS data for FW usage
- *     - FW-Image - The FW program image
- *
- * \note   
- * \param  drv - The driver object handle
- * \return void
- * \sa     wlanDrvIf_GetFile
- */ 
-int wlanDrvIf_LoadFiles (TWlanDrvIfObj *drv, TLoaderFilesData *pInitFiles)
-{
-    if (!pInitFiles)
-    {
-        ti_dprintf (TIWLAN_LOG_ERROR, "No Init Files!\n");
-        return -EINVAL;
-    }
-
-    if (drv->tCommon.eDriverState != DRV_STATE_IDLE)
-    {
-        ti_dprintf (TIWLAN_LOG_ERROR, "Trying to load files not in IDLE state!\n");
-        return -EINVAL;
-    }
-
-    if (pInitFiles->uIniFileLength) 
-    {
-        drv->tCommon.tIniFile.uSize = pInitFiles->uIniFileLength;
-        drv->tCommon.tIniFile.pImage = kmalloc (pInitFiles->uIniFileLength, GFP_KERNEL);
-        #ifdef TI_MEM_ALLOC_TRACE        
-          os_printf ("MTT:%s:%d ::kmalloc(%lu, %x) : %lu\n", __FUNCTION__, __LINE__, pInitFiles->uIniFileLength, GFP_KERNEL, pInitFiles->uIniFileLength);
-        #endif
-        if (!drv->tCommon.tIniFile.pImage)
-        {
-            ti_dprintf (TIWLAN_LOG_ERROR, "Cannot allocate buffer for Ini-File!\n");
-            return -ENOMEM;
-        }
-        memcpy (drv->tCommon.tIniFile.pImage,
-                &pInitFiles->data[pInitFiles->uNvsFileLength + pInitFiles->uFwFileLength],
-                drv->tCommon.tIniFile.uSize);
-    }
-
-    if (pInitFiles->uNvsFileLength)
-    {
-        drv->tCommon.tNvsImage.uSize = pInitFiles->uNvsFileLength;
-        drv->tCommon.tNvsImage.pImage = kmalloc (drv->tCommon.tNvsImage.uSize, GFP_KERNEL);
-        #ifdef TI_MEM_ALLOC_TRACE        
-          os_printf ("MTT:%s:%d ::kmalloc(%lu, %x) : %lu\n", 
-              __FUNCTION__, __LINE__, drv->tCommon.tNvsImage.uSize, GFP_KERNEL, drv->tCommon.tNvsImage.uSize);
-        #endif
-        if (!drv->tCommon.tNvsImage.pImage)
-        {
-            ti_dprintf (TIWLAN_LOG_ERROR, "Cannot allocate buffer for NVS image\n");
-            return -ENOMEM;
-        }
-        memcpy (drv->tCommon.tNvsImage.pImage, &pInitFiles->data[0], drv->tCommon.tNvsImage.uSize );
-    }
-    
-    drv->tCommon.tFwImage.uSize = pInitFiles->uFwFileLength;
-    if (!drv->tCommon.tFwImage.uSize)
-    {
-        ti_dprintf (TIWLAN_LOG_ERROR, "No firmware image\n");
-        return -EINVAL;
-    }
-    drv->tCommon.tFwImage.pImage = os_memoryAlloc (drv, drv->tCommon.tFwImage.uSize);
-    #ifdef TI_MEM_ALLOC_TRACE        
-      os_printf ("MTT:%s:%d ::kmalloc(%lu, %x) : %lu\n", 
-          __FUNCTION__, __LINE__, drv->tCommon.tFwImage.uSize, GFP_KERNEL, drv->tCommon.tFwImage.uSize);
-    #endif
-    if (!drv->tCommon.tFwImage.pImage)
-    {
-        ti_dprintf(TIWLAN_LOG_ERROR, "Cannot allocate buffer for firmware image\n");
-        return -ENOMEM;
-    }
-    memcpy (drv->tCommon.tFwImage.pImage,
-            &pInitFiles->data[pInitFiles->uNvsFileLength],
-            drv->tCommon.tFwImage.uSize);
-
-    ti_dprintf(TIWLAN_LOG_OTHER, "--------- Eeeprom=%p(%lu), Firmware=%p(%lu), IniFile=%p(%lu)\n", 
-        drv->tCommon.tNvsImage.pImage, drv->tCommon.tNvsImage.uSize, 
-        drv->tCommon.tFwImage.pImage,  drv->tCommon.tFwImage.uSize,
-        drv->tCommon.tIniFile.pImage,  drv->tCommon.tIniFile.uSize);
-    
-    return 0;
-}
-
-
-/** 
- * \fn     wlanDrvIf_GetFile
- * \brief  Provides access to a requested init file
- * 
- * Provide the requested file information and call the requester callback.
- * Note that in Linux the files were previously loaded to driver memory 
- *     by the loader (see wlanDrvIf_LoadFiles).
- *
- * \note   
- * \param  hOs       - The driver object handle
- * \param  pFileInfo - The requested file's properties
- * \return TI_OK
- * \sa     wlanDrvIf_LoadFiles
- */ 
-int wlanDrvIf_GetFile (TI_HANDLE hOs, TFileInfo *pFileInfo)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)hOs;
-
-	if (drv == NULL || pFileInfo == NULL) {
-		ti_dprintf(TIWLAN_LOG_ERROR, "wlanDrv_GetFile: ERROR: Null File Handler, Exiting");
-		return TI_NOK;
-	}
-
-	/* Future option for getting the FW image part by part */ 
-	pFileInfo->hOsFileDesc = NULL;
-
-	/* Fill the file's location and size in the file's info structure */
-	switch (pFileInfo->eFileType) 
-	{
-	case FILE_TYPE_INI: 
-		pFileInfo->pBuffer = (TI_UINT8 *)drv->tCommon.tIniFile.pImage; 
-		pFileInfo->uLength = drv->tCommon.tIniFile.uSize; 
-		break;
-	case FILE_TYPE_NVS:     
-		pFileInfo->pBuffer = (TI_UINT8 *)drv->tCommon.tNvsImage.pImage; 
-		pFileInfo->uLength = drv->tCommon.tNvsImage.uSize; 
-		break;
-	case FILE_TYPE_FW:
-		if (drv->tCommon.tFwImage.pImage == NULL)
-		{
-			ti_dprintf(TIWLAN_LOG_ERROR, "wlanDrv_GetFile: ERROR: no Firmware image, exiting\n");
-			return TI_NOK;
-		}
-
-		pFileInfo->pBuffer = (TI_UINT8 *)drv->tCommon.tFwImage.pImage; 
-		pFileInfo->bLast		= TI_FALSE;
-		pFileInfo->uLength	= 0;
-		pFileInfo->uOffset 				= 0;
-		pFileInfo->uChunkBytesLeft 		= 0;
-		pFileInfo->uChunksLeft 			= BYTE_SWAP_LONG( *((TI_UINT32*)(pFileInfo->pBuffer)) );
-		/* check uChunksLeft's Validity */
-		if (( pFileInfo->uChunksLeft == 0 ) || ( pFileInfo->uChunksLeft > MAX_CHUNKS_IN_FILE ))
-		{
-			ti_dprintf (TIWLAN_LOG_ERROR, "wlanDrvIf_GetFile() Read Invalid Chunks Left: %d!\n",pFileInfo->uChunksLeft);
-			return TI_NOK;
-		}
-		pFileInfo->pBuffer += DRV_ADDRESS_SIZE;
-		/* FALL THROUGH */
-	case FILE_TYPE_FW_NEXT:
-		/* check dec. validity */
-		if ( pFileInfo->uChunkBytesLeft >= pFileInfo->uLength )
-		{
-			pFileInfo->uChunkBytesLeft 		-= pFileInfo->uLength;
-		}
-		/* invalid Dec. */
-		else
-		{
-			ti_dprintf (TIWLAN_LOG_ERROR, "wlanDrvIf_GetFile() No. of Bytes Left < File Length\n");
-			return TI_NOK;
-		}
-		pFileInfo->pBuffer 	+= pFileInfo->uLength; 
-
-		/* Finished reading all Previous Chunk */
-		if ( pFileInfo->uChunkBytesLeft == 0 )
-		{
-			/* check dec. validity */
-			if ( pFileInfo->uChunksLeft > 0 )
-			{
-				pFileInfo->uChunksLeft--;
-			}
-			/* invalid Dec. */
-			else
-			{
-				ti_dprintf (TIWLAN_LOG_ERROR, "No. of Bytes Left = 0 and Chunks Left <= 0\n");
-				return TI_NOK;
-			}
-			/* read Chunk's address */
-			pFileInfo->uAddress = BYTE_SWAP_LONG( *((TI_UINT32*)(pFileInfo->pBuffer)) );
-			pFileInfo->pBuffer += DRV_ADDRESS_SIZE;
-			/* read Portion's length */
-			pFileInfo->uChunkBytesLeft = BYTE_SWAP_LONG( *((TI_UINT32*)(pFileInfo->pBuffer)) );
-			pFileInfo->pBuffer += DRV_ADDRESS_SIZE;
-		}
-		/* Reading Chunk is NOT complete */
-		else
-		{
-			pFileInfo->uAddress += pFileInfo->uLength;
-		}
-		
-		if ( pFileInfo->uChunkBytesLeft < OS_SPECIFIC_RAM_ALLOC_LIMIT )
-		{
-			pFileInfo->uLength = pFileInfo->uChunkBytesLeft;
-		}
-		else
-		{
-			pFileInfo->uLength = OS_SPECIFIC_RAM_ALLOC_LIMIT;
-		}
-
-		/* If last chunk to download */
-		if (( pFileInfo->uChunksLeft == 0 ) && 
-			( pFileInfo->uLength == pFileInfo->uChunkBytesLeft ))
-		{
-			pFileInfo->bLast = TI_TRUE;
-		}
-
-		break;
-	}
-
-	/* Call the requester callback */
-	if (pFileInfo->fCbFunc)
-	{
-		pFileInfo->fCbFunc (pFileInfo->hCbHndl);
-	}
-
-	return TI_OK;
-}
-
-
-/** 
- * \fn     wlanDrvIf_SetMacAddress
- * \brief  Set STA MAC address
- * 
- * Called by DrvMain from init process.
- * Copies STA MAC address to the network interface structure.
- *
- * \note   
- * \param  hOs      - The driver object handle
- * \param  pMacAddr - The STA MAC address
- * \return TI_OK
- * \sa     wlanDrvIf_LoadFiles
- */ 
-void wlanDrvIf_SetMacAddress (TI_HANDLE hOs, TI_UINT8 *pMacAddr)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)hOs;
-
-	/* Copy STA MAC address to the network interface structure */
-	MAC_COPY (drv->netdev->dev_addr, pMacAddr);
-}
-
-
-/** 
- * \fn     wlanDrvIf_Start
- * \brief  Start driver
- * 
- * Called by network stack upon opening network interface (ifconfig up).
- * Can also be called from user application or CLI for flight mode.
- * Start the driver initialization process up to OPERATIONAL state.
- *
- * \note   
- * \param  dev - The driver network-interface handle
- * \return 0 if succeeded, error if driver not available
- * \sa     wlanDrvIf_Stop
- */ 
-int wlanDrvIf_Start (struct net_device *dev)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)NETDEV_GET_PRIVATE(dev);
-	int status;
-
-	ti_dprintf (TIWLAN_LOG_OTHER, "wlanDrvIf_Start()\n");
-	printk("%s\n", __func__);
-    if (!drv->tCommon.hDrvMain)
-    {
-		ti_dprintf (TIWLAN_LOG_ERROR, "wlanDrvIf_Start() Driver not created!\n");
-		return -ENODEV;
-	}
-
-	if (DRV_STATE_FAILED == drv->tCommon.eDriverState)
-	{
-		ti_dprintf (TIWLAN_LOG_ERROR, "wlanDrvIf_Start() Driver failed!\n");
-		return -ENODEV;
-	}
-
-	/*
-	 *  Insert Start command in DrvMain action queue, request driver scheduling 
-	 *      and wait for action completion (all init process).
-	 */
-	os_wake_lock_timeout_enable(drv);
-	status = drvMain_InsertAction (drv->tCommon.hDrvMain, ACTION_TYPE_START);
-	return (status) ? -1 : 0;
-}
-
-int wlanDrvIf_Open (struct net_device *dev)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)NETDEV_GET_PRIVATE(dev);
-	int status = 0;
-
-	ti_dprintf (TIWLAN_LOG_OTHER, "wlanDrvIf_Open()\n");
-	printk("%s\n", __func__);
-	if (!drv->tCommon.hDrvMain) {
-		ti_dprintf (TIWLAN_LOG_ERROR, "wlanDrvIf_Open() Driver not created!\n");
-		return -ENODEV;
-	}
-
-	if (drv->tCommon.eDriverState == DRV_STATE_STOPPED ||
-	    drv->tCommon.eDriverState == DRV_STATE_IDLE) {
-		status = wlanDrvIf_Start(dev);
-	}
-
-	/*
-	 *  Finalize network interface setup
-	 */
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 31))
-	drv->netdev->hard_start_xmit = wlanDrvIf_Xmit;
-#else
-	drv->netdev->netdev_ops = &tiwlan_ops_pri;
-#endif
-	drv->netdev->addr_len = MAC_ADDR_LEN;
-	netif_start_queue (dev);
-
-	/* register 3430 PM hooks in our SDIO driver */
-#ifdef TI_CONFIG_PM_HOOKS
-#ifndef CONFIG_MMC_EMBEDDED_SDIO
-	sdioDrv_register_pm(wlanDrvIf_pm_resume, wlanDrvIf_pm_suspend);
-#endif
-#endif
-	return status;
-}
-
-/** 
- * \fn     wlanDrvIf_Stop
- * \brief  Stop driver
- * 
- * Called by network stack upon closing network interface (ifconfig down).
- * Can also be called from user application or CLI for flight mode.
- * Stop the driver and turn off the device.
- *
- * \note   
- * \param  dev - The driver network-interface handle
- * \return 0 (OK)
- * \sa     wlanDrvIf_Start
- */ 
-int wlanDrvIf_Stop (struct net_device *dev)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)NETDEV_GET_PRIVATE(dev);
-
-	ti_dprintf (TIWLAN_LOG_OTHER, "wlanDrvIf_Stop()\n");
-	printk("%s\n", __func__);
-
-	if (DRV_STATE_FAILED == drv->tCommon.eDriverState)
-	{
-		return -ENODEV;
-	}
-
-	/* 
-	 *  Insert Stop command in DrvMain action queue, request driver scheduling 
-	 *      and wait for Stop process completion.
-	 */
-	os_wake_lock_timeout_enable(drv);
-	drvMain_InsertAction (drv->tCommon.hDrvMain, ACTION_TYPE_STOP);
-	return 0;
-}
-
-int wlanDrvIf_Release (struct net_device *dev)
-{
-	/* TWlanDrvIfObj *drv = (TWlanDrvIfObj *)NETDEV_GET_PRIVATE(dev); */
-
-	ti_dprintf (TIWLAN_LOG_OTHER, "wlanDrvIf_Release()\n");
-	printk("%s\n", __func__);
-	/* Disable network interface queue */
-	netif_stop_queue (dev);
-	return 0;
-}
-
-/* 3430 PM hooks */
-#ifdef TI_CONFIG_PM_HOOKS
-static int wlanDrvIf_pm_resume(void)
-{
-    return(wlanDrvIf_Open(pDrvStaticHandle->netdev));
-}
-
-static int wlanDrvIf_pm_suspend(void)
-{
-    wlanDrvIf_Release(pDrvStaticHandle->netdev);
-    return(wlanDrvIf_Stop(pDrvStaticHandle->netdev));
-}
-#endif
-
-/** 
- * \fn     wlanDrvIf_SetupNetif
- * \brief  Setup driver network interface
- * 
- * Called in driver creation process.
- * Setup driver network interface.
- *
- * \note   
- * \param  drv - The driver object handle
- * \return 0 - OK, else - failure
- * \sa     
- */ 
-static int wlanDrvIf_SetupNetif (TWlanDrvIfObj *drv)
-{
-	struct net_device *dev;
-	int res;
-
-	/* Allocate network interface structure for the driver */
-	dev = alloc_etherdev (0);
-	if (dev == NULL)
-	{
-		ti_dprintf (TIWLAN_LOG_ERROR, "alloc_etherdev() failed\n");
-		return -ENOMEM;
-	}
-
-	/* Setup the network interface */
-	ether_setup (dev);
-
-	NETDEV_SET_PRIVATE(dev,drv);
-	drv->netdev = dev;
-	strcpy (dev->name, TIWLAN_DRV_IF_NAME);
-	netif_carrier_off (dev);
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 31))
-/* the following is required on at least BSP 23.8 and higher.
-    Without it, the Open function of the driver will not be called
-    when trying to 'ifconfig up' the interface */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
-	dev->validate_addr = NULL;
-#endif
-	dev->open = wlanDrvIf_Open;
-	dev->stop = wlanDrvIf_Release;
-	dev->hard_start_xmit = wlanDrvIf_XmitDummy;
-	dev->get_stats = wlanDrvIf_NetGetStat;
-	dev->do_ioctl = NULL;
-#else
-	dev->netdev_ops = &tiwlan_ops_dummy;
-#endif
-	dev->tx_queue_len = 100;
-
-	/* Initialize Wireless Extensions interface (WEXT) */
-	wlanDrvWext_Init (dev);
-
-	res = register_netdev (dev);
-	if (res != 0)
-	{
-		ti_dprintf (TIWLAN_LOG_ERROR, "register_netdev() failed : %d\n", res);
-		kfree (dev);
-		return res;
-	}
-/*
-On the latest Kernel there is no more support for the below macro.
-*/
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
-	SET_MODULE_OWNER (dev);
-#endif
-	return 0;
-}
-
-/** 
- * \fn     wlanDrvIf_CommandDone
- * \brief  Free current command semaphore.
- * 
- * This routine is called whenever a command has finished executing and Free current command semaphore.
- *
- * \note   
- * \param  hOs           - The driver object handle
- * \param  pSignalObject - handle to complete mechanism per OS
- * \param  CmdResp_p     - respond structure (TCmdRespUnion) for OSE OS only 
- * \return 0 - OK, else - failure
- * \sa     wlanDrvIf_Destroy
- */ 
-void wlanDrvIf_CommandDone (TI_HANDLE hOs, void *pSignalObject, TI_UINT8 *CmdResp_p)
-{
-	/* Free semaphore */
-	os_SignalObjectSet (hOs, pSignalObject);
-}
-
-
-/** 
- * \fn     wlanDrvIf_Create
- * \brief  Create the driver instance
- * 
- * Allocate driver object.
- * Initialize driver OS resources (IRQ, workqueue, events socket)
- * Setup driver network interface.
- * Create and link all driver modules.
- *
- * \note   
- * \param  void
- * \return 0 - OK, else - failure
- * \sa     wlanDrvIf_Destroy
- */ 
-static int wlanDrvIf_Create (void)
-{
-	TWlanDrvIfObj *drv; /* Dm: Failure is not cleaned properly !!! */
-	int rc;
-
-	/* Allocate driver's structure */
-	drv = kmalloc (sizeof(TWlanDrvIfObj), GFP_KERNEL);
-    if (!drv)
-    {
-		return -ENOMEM;
-	}
-#ifdef TI_DBG
-	tb_init(TB_OPTION_NONE);
-#endif
-	pDrvStaticHandle = drv;  /* save for module destroy */
-#ifdef TI_MEM_ALLOC_TRACE        
-	os_printf ("MTT:%s:%d ::kmalloc(%lu, %x) : %lu\n", __FUNCTION__, __LINE__, sizeof(TWlanDrvIfObj), GFP_KERNEL, sizeof(TWlanDrvIfObj));
-#endif
-	memset (drv, 0, sizeof(TWlanDrvIfObj));
-
-	/* Dm:    drv->irq = TNETW_IRQ; */
-	drv->tCommon.eDriverState = DRV_STATE_IDLE;
-
-	drv->tiwlan_wq = create_freezeable_workqueue(DRIVERWQ_NAME);
-	if (!drv->tiwlan_wq) {
-		ti_dprintf (TIWLAN_LOG_ERROR, "wlanDrvIf_Create(): Failed to create workQ!\n");
-		rc = -EINVAL;
-		goto drv_create_end_1;
-	}
-	drv->wl_packet = 0;
-	drv->wl_count = 0;
-#ifdef CONFIG_HAS_WAKELOCK
-	wake_lock_init(&drv->wl_wifi, WAKE_LOCK_SUSPEND, "wifi_wake");
-	wake_lock_init(&drv->wl_rxwake, WAKE_LOCK_SUSPEND, "wifi_rx_wake");
-#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
-	INIT_WORK(&drv->tWork, wlanDrvIf_DriverTask, (void *)drv);
-#else
-	INIT_WORK(&drv->tWork, wlanDrvIf_DriverTask);
-#endif
-	spin_lock_init (&drv->lock);
-
-	/* Setup driver network interface. */
-	rc = wlanDrvIf_SetupNetif (drv);
-	if (rc)	{
-		goto drv_create_end_2;
-	}
-
-	/* Create the events socket interface */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
-	drv->wl_sock = netlink_kernel_create( NETLINK_USERSOCK, 0, NULL, THIS_MODULE );
-#else
-	drv->wl_sock = netlink_kernel_create(&init_net, NETLINK_USERSOCK, 0, NULL, NULL, THIS_MODULE );
-#endif
-	if (drv->wl_sock == NULL) {
-	        ti_dprintf (TIWLAN_LOG_ERROR, "netlink_kernel_create() failed !\n");
-		rc = -EINVAL;
-		goto drv_create_end_3;
-	}
-
-	/* Create all driver modules and link their handles */
-	rc = drvMain_Create (drv,
-			&drv->tCommon.hDrvMain,
-			&drv->tCommon.hCmdHndlr,
-			&drv->tCommon.hContext,
-			&drv->tCommon.hTxDataQ,
-			&drv->tCommon.hTxMgmtQ,
-			&drv->tCommon.hTxCtrl,
-			&drv->tCommon.hTWD,
-					&drv->tCommon.hEvHandler,
-                    &drv->tCommon.hCmdDispatch,
-		&drv->tCommon.hReport);
-	if (rc != TI_OK) {
-		ti_dprintf (TIWLAN_LOG_ERROR, "%s: Failed to dvrMain_Create!\n", __func__);
-		rc = -EINVAL;
-		goto drv_create_end_4;
-	}
-	/*
-	 *  Initialize interrupts (or polling mode for debug):
-	 */
-#ifdef PRIODIC_INTERRUPT
-	/* Debug mode: Polling (the timer is started by HwInit process) */
-	drv->hPollTimer = os_timerCreate ((TI_HANDLE)drv, wlanDrvIf_PollIrqHandler, (TI_HANDLE)drv);
-#else 
-	/* Normal mode: Interrupts (the default mode) */
-	rc = hPlatform_initInterrupt (drv, (void*)wlanDrvIf_HandleInterrupt);
-	if (rc)	{
-		ti_dprintf (TIWLAN_LOG_ERROR, "wlanDrvIf_Create(): Failed to register interrupt handler!\n");
-		goto drv_create_end_5;
-	}
-#endif  /* PRIODIC_INTERRUPT */
-	return 0;
-drv_create_end_5:
-	/* Destroy all driver modules */
-	if (drv->tCommon.hDrvMain) {
-		drvMain_Destroy (drv->tCommon.hDrvMain);
-	}
-drv_create_end_4:
-	if (drv->wl_sock) {
-		sock_release (drv->wl_sock->sk_socket);
-	}
-
-drv_create_end_3:
-	/* Release the driver network interface */
-	if (drv->netdev) {
-		unregister_netdev (drv->netdev);
-		free_netdev (drv->netdev);
-	}
-
-drv_create_end_2:
-#ifdef CONFIG_HAS_WAKELOCK
-	wake_lock_destroy(&drv->wl_wifi);
-	wake_lock_destroy(&drv->wl_rxwake);
-#endif
-	if (drv->tiwlan_wq)
-		destroy_workqueue(drv->tiwlan_wq);
-
-drv_create_end_1:
-	kfree(drv);
-	printk("%s: Fail\n", __func__);
-	return rc;
-}
-
-
-/** 
- * \fn     wlanDrvIf_Destroy
- * \brief  Destroy the driver instance
- * 
- * Destroy all driver modules.
- * Release driver OS resources (IRQ, workqueue, events socket)
- * Release driver network interface.
- * Free init files memory.
- * Free driver object.
- *
- * \note   
- * \param  drv - The driver object handle
- * \return void
- * \sa     wlanDrvIf_Create
- */ 
-static void wlanDrvIf_Destroy (TWlanDrvIfObj *drv)
-{
-	if (!drv)
-		return;
-
-	if (drv->tiwlan_wq) {
-		cancel_work_sync(&drv->tWork);
-		flush_workqueue(drv->tiwlan_wq);
-	}
-
-	/* Release the driver network interface */
-	if (drv->netdev) {
-		netif_stop_queue  (drv->netdev);
-		wlanDrvIf_Stop    (drv->netdev);
-		unregister_netdev (drv->netdev);
-		free_netdev (drv->netdev);
-	}
-
-	/* Destroy all driver modules */
-	if (drv->tCommon.hDrvMain) {
-		drvMain_Destroy (drv->tCommon.hDrvMain);
-	}
-
-	/* close the ipc_kernel socket*/
-    if (drv && drv->wl_sock) 
-    {
-		sock_release (drv->wl_sock->sk_socket);
-	}
-	/* Release the driver interrupt (or polling timer) */
-#ifdef PRIODIC_INTERRUPT
-	os_timerDestroy (drv, drv->hPollTimer);
-#else
-    if (drv->irq)
-    {
-		hPlatform_freeInterrupt(drv);
-	}
-#endif
-	if (drv->tiwlan_wq)
-		destroy_workqueue(drv->tiwlan_wq);
-
-#ifdef CONFIG_HAS_WAKELOCK
-	wake_lock_destroy(&drv->wl_wifi);
-	wake_lock_destroy(&drv->wl_rxwake);
-#endif
-	/* 
-	 *  Free init files memory
-	 */
-    if (drv->tCommon.tFwImage.pImage)
-    {
-        os_memoryFree (drv, drv->tCommon.tFwImage.pImage, drv->tCommon.tFwImage.uSize);
-        #ifdef TI_MEM_ALLOC_TRACE        
-          os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n", 
-              __FUNCTION__, __LINE__, drv->tCommon.tFwImage.uSize, -drv->tCommon.tFwImage.uSize);
-        #endif
-    }
-    if (drv->tCommon.tNvsImage.pImage)
-    {
-        kfree (drv->tCommon.tNvsImage.pImage);
-        #ifdef TI_MEM_ALLOC_TRACE        
-          os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n", 
-              __FUNCTION__, __LINE__, drv->tCommon.tNvsImage.uSize, -drv->tCommon.tNvsImage.uSize);
-        #endif
-    }
-    if (drv->tCommon.tIniFile.pImage)
-    {
-        kfree (drv->tCommon.tIniFile.pImage);
-        #ifdef TI_MEM_ALLOC_TRACE        
-          os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n", 
-              __FUNCTION__, __LINE__, drv->tCommon.tIniFile.uSize, -drv->tCommon.tIniFile.uSize);
-        #endif
-    }
-
-    /* Free the driver object */
-#ifdef TI_DBG
-	tb_destroy();
-#endif
-	kfree (drv);
-}
-
-
-/** 
- * \fn     wlanDrvIf_ModuleInit  &  wlanDrvIf_ModuleExit
- * \brief  Linux Init/Exit functions
- * 
- * The driver Linux Init/Exit functions (insmod/rmmod) 
- *
- * \note   
- * \param  void
- * \return Init: 0 - OK, else - failure.   Exit: void
- * \sa     wlanDrvIf_Create, wlanDrvIf_Destroy
- */ 
-#ifndef TI_SDIO_STANDALONE
-static int sdc_ctrl = 2;
-module_param(sdc_ctrl, int, S_IRUGO | S_IWUSR | S_IWGRP);
-
-extern int sdioDrv_init(int sdcnum);
-extern void sdioDrv_exit(void);
-#endif
-
-static int __init wlanDrvIf_ModuleInit (void)
-{
-	printk(KERN_INFO "TIWLAN: driver init\n");
-#ifndef TI_SDIO_STANDALONE
-#ifndef CONFIG_MMC_EMBEDDED_SDIO
-	sdioDrv_init(sdc_ctrl);
-#endif
-#endif
-	return wlanDrvIf_Create ();
-}
-
-static void __exit wlanDrvIf_ModuleExit (void)
-{
-	wlanDrvIf_Destroy (pDrvStaticHandle);
-#ifndef TI_SDIO_STANDALONE
-#ifndef CONFIG_MMC_EMBEDDED_SDIO
-	sdioDrv_exit();
-#endif
-#endif
-	printk (KERN_INFO "TI WLAN: driver unloaded\n");
-}
-
-
-/**
- * \fn     wlanDrvIf_StopTx
- * \brief  block Tx thread until wlanDrvIf_ResumeTx called .
- *
- * This routine is called whenever we need to stop the network stack to send us pakets since one of our Q's is full.
- *
- * \note
- * \param  hOs           - The driver object handle
-* \return
- * \sa     wlanDrvIf_StopTx
- */
-void wlanDrvIf_StopTx (TI_HANDLE hOs)
-{
-    TWlanDrvIfObj *drv = (TWlanDrvIfObj *)hOs;
-
-    netif_stop_queue (drv->netdev);
-}
-
-/**
- * \fn     wlanDrvIf_ResumeTx
- * \brief  Resume Tx thread .
- *
- * This routine is called whenever we need to resume the network stack to send us pakets since our Q's are empty.
- *
- * \note
- * \param  hOs           - The driver object handle
- * \return
- * \sa     wlanDrvIf_ResumeTx
- */
-void wlanDrvIf_ResumeTx (TI_HANDLE hOs)
-{
-    TWlanDrvIfObj *drv = (TWlanDrvIfObj *)hOs;
-
-    netif_wake_queue (drv->netdev);
-}
-
-module_init (wlanDrvIf_ModuleInit);
-module_exit (wlanDrvIf_ModuleExit);
diff --git a/wl1271/platforms/os/linux/src/WlanDrvWext.c b/wl1271/platforms/os/linux/src/WlanDrvWext.c
deleted file mode 100644
index 8e0076e..0000000
--- a/wl1271/platforms/os/linux/src/WlanDrvWext.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * WlanDrvWext.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * src/wext.c
- *
- * Support for Linux Wireless Extensions
- *
- */
-#include <linux/types.h>
-#include <linux/socket.h>
-#include <linux/if.h>
-#include <linux/wireless.h>
-#include <net/iw_handler.h>
-#include "WlanDrvIf.h"
-#include "CmdHndlr.h"
-#include "CmdInterpretWext.h"
-#include "privateCmd.h"
-#include "DrvMain.h"
-
-/* Routine prototypes */
-
-int wlanDrvWext_Handler (struct net_device *dev,
-                         struct iw_request_info *info, 
-                         void  *iw_req, 
-                         void  *extra);
-
-static struct iw_statistics *wlanDrvWext_GetWirelessStats (struct net_device *dev);
-
-extern int wlanDrvIf_LoadFiles (TWlanDrvIfObj *drv, TLoaderFilesData *pInitInfo);
-extern int wlanDrvIf_Start (struct net_device *dev);
-extern int wlanDrvIf_Stop (struct net_device *dev);
-
-
-/* callbacks for WEXT commands */
-static const iw_handler aWextHandlers[] = {
-	(iw_handler) NULL,				            /* SIOCSIWCOMMIT */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWNAME */
-	(iw_handler) NULL,				            /* SIOCSIWNWID */
-	(iw_handler) NULL,				            /* SIOCGIWNWID */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCSIWFREQ */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWFREQ */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCSIWMODE */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWMODE */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCSIWSENS */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWSENS */
-	(iw_handler) NULL,                          /* SIOCSIWRANGE - not used */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWRANGE */
-	(iw_handler) NULL,		                    /* SIOCSIWPRIV - not used */
-	(iw_handler) NULL,                    		/* SIOCGIWPRIV - kernel code */
-	(iw_handler) NULL,                          /* SIOCSIWSTATS - not used */
-	(iw_handler) wlanDrvWext_GetWirelessStats,  /* SIOCGIWSTATS - kernel code */
-	(iw_handler) NULL,		                    /* SIOCSIWSPY */
-	(iw_handler) NULL,		                    /* SIOCGIWSPY */
-	(iw_handler) NULL,		                    /* SIOCSIWTHRSPY */
-	(iw_handler) NULL,		                    /* SIOCGIWTHRSPY */
-	(iw_handler) wlanDrvWext_Handler,           /* SIOCSIWAP */
-	(iw_handler) wlanDrvWext_Handler,           /* SIOCGIWAP */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCSIWMLME */
-	(iw_handler) NULL,		        			/* SIOCGIWAPLIST */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCSIWSCAN */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWSCAN */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCSIWESSID */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWESSID */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCSIWNICKN */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWNICKN */
-	(iw_handler) NULL,				            /* -- hole -- */
-	(iw_handler) NULL,				            /* -- hole -- */
-	(iw_handler) NULL,		        			/* SIOCSIWRATE */
-	(iw_handler) NULL,		        			/* SIOCGIWRATE */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCSIWRTS */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWRTS */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCSIWFRAG */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWFRAG */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCSIWTXPOW */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWTXPOW */
-	(iw_handler) NULL,		        			/* SIOCSIWRETRY */
-	(iw_handler) NULL,		        			/* SIOCGIWRETRY */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCSIWENCODE */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWENCODE */
-	(iw_handler) NULL,		        			/* SIOCSIWPOWER */
-	(iw_handler) NULL,		        			/* SIOCGIWPOWER */
-	(iw_handler) NULL,				            /* -- hole -- */
-	(iw_handler) NULL,				            /* -- hole -- */
-    (iw_handler) wlanDrvWext_Handler,           /* SIOCSIWGENIE */
-	(iw_handler) NULL,		        			/* SIOCGIWGENIE */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCSIWAUTH */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCGIWAUTH */
-	(iw_handler) wlanDrvWext_Handler,	        /* SIOCSIWENCODEEXT */
-	(iw_handler) NULL,	            			/* SIOCGIWENCODEEXT */
-	(iw_handler) wlanDrvWext_Handler, 			/* SIOCSIWPMKSA */
-};
-
-/* callbacks for private commands */
-static const iw_handler aPrivateHandlers[] = {
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCIWFIRSTPRIV+0 (set) */
-	(iw_handler) wlanDrvWext_Handler,		    /* SIOCIWFIRSTPRIV+1 (get) */
-};
-
-/* Describe the level of WEXT support to kernel */
-static struct iw_handler_def tWextIf = {
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-	.standard		    = (iw_handler *) aWextHandlers,
-	.num_standard		= N(aWextHandlers),
-	.private		    = (iw_handler *) aPrivateHandlers,
-	.num_private		= N(aPrivateHandlers),
-	.private_args		= NULL,
-	.num_private_args	= 0,
-	.get_wireless_stats	= wlanDrvWext_GetWirelessStats,
-#undef N
-};
-
-/* Initialite WEXT support - Register callbacks in kernel */
-void wlanDrvWext_Init (struct net_device *dev)
-{
-#ifdef HOST_PLATFORM_OMAP3430
-   	dev->get_wireless_stats = wlanDrvWext_GetWirelessStats;
-#endif
-	dev->wireless_handlers = &tWextIf;
-
-}
-
-/* Return driver statistics */
-static struct iw_statistics *wlanDrvWext_GetWirelessStats(struct net_device *dev)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)NETDEV_GET_PRIVATE(dev);
-
-    return (struct iw_statistics *) cmdHndlr_GetStat (drv->tCommon.hCmdHndlr);
-}
-
-/* Generic callback for WEXT commands */
-
-int wlanDrvWext_Handler (struct net_device *dev,
-                     struct iw_request_info *info, 
-                     void *iw_req, 
-                     void *extra)
-{
-    int              rc;
-    TWlanDrvIfObj   *drv = (TWlanDrvIfObj *)NETDEV_GET_PRIVATE(dev);
-    ti_private_cmd_t my_command; 
-    struct iw_mlme   mlme;
-	struct iw_scan_req scanreq;
-    void             *copy_to_buf=NULL, *param3=NULL; 
-
-    os_memoryZero(drv, &my_command, sizeof(ti_private_cmd_t));
-    os_memoryZero(drv, &mlme,       sizeof(struct iw_mlme));
-	os_memoryZero(drv, &scanreq, sizeof(struct iw_scan_req));
-
-    switch (info->cmd)
-    {
-        case SIOCIWFIRSTPRIV:
-        {
-            void *copy_from_buf;
-
-            if (os_memoryCopyFromUser(drv, &my_command, ((union iwreq_data *)iw_req)->data.pointer, sizeof(ti_private_cmd_t)))
-            {
-                os_printf ("wlanDrvWext_Handler() os_memoryCopyFromUser FAILED !!!\n");
-                return TI_NOK;
-            }
-            if (IS_PARAM_FOR_MODULE(my_command.cmd, DRIVER_MODULE_PARAM))
-            {
-                /* If it's a driver level command, handle it here and exit */
-                switch (my_command.cmd)
-                {
-                    case DRIVER_INIT_PARAM:
-                        return wlanDrvIf_LoadFiles(drv, my_command.in_buffer);
-
-                    case DRIVER_START_PARAM:
-                        return wlanDrvIf_Start(dev);
-
-                    case DRIVER_STOP_PARAM:
-                        return wlanDrvIf_Stop(dev);
-
-                    case DRIVER_STATUS_PARAM:
-                        *(TI_UINT32 *)my_command.out_buffer =
-                           (drv->tCommon.eDriverState == DRV_STATE_RUNNING) ? TI_TRUE : TI_FALSE;
-                        return TI_OK;
-                }
-            }
-            /* if we are still here handle a normal private command*/
-
-            if ((my_command.in_buffer) && (my_command.in_buffer_len))
-            {
-                copy_from_buf        = my_command.in_buffer;
-                my_command.in_buffer = os_memoryAlloc(drv, my_command.in_buffer_len);
-                if (os_memoryCopyFromUser(drv, my_command.in_buffer, copy_from_buf, my_command.in_buffer_len))
-                {
-                    os_printf("wlanDrvWext_Handler() os_memoryCopyFromUser 1 FAILED !!!\n");
-                    return TI_NOK;
-                }
-            }
-            if ((my_command.out_buffer) && (my_command.out_buffer_len))
-            {
-                copy_to_buf          = my_command.out_buffer;
-                my_command.out_buffer = os_memoryAlloc(drv, my_command.out_buffer_len);
-            }
-            param3 = &my_command;
-        }
-        break;
-
-        case SIOCSIWMLME:
-        {
-            os_memoryCopyFromUser(drv, &mlme, ((union iwreq_data *)iw_req)->data.pointer, sizeof(struct iw_mlme));
-            param3 = &mlme;
-        }
-        break;
-     case SIOCSIWSCAN:
-     {
-	if (((union iwreq_data *)iw_req)->data.pointer) {
-		os_memoryCopyFromUser(drv, &scanreq, ((union iwreq_data *)iw_req)->data.pointer, sizeof(struct iw_scan_req));
-		param3 = &scanreq;
-	}
-     }
-     break;
-
-     case SIOCSIWGENIE:
-     {
-         TI_UINT16 ie_length = ((union iwreq_data *)iw_req)->data.length;
-         TI_UINT8 *ie_content = ((union iwreq_data *)iw_req)->data.pointer;
-
-         if ((ie_length == 0) && (ie_content == NULL)) {
-                 /* Do nothing, deleting the IE */
-         } else if ((ie_content != NULL) && (ie_length <= RSN_MAX_GENERIC_IE_LENGTH) && (ie_length > 0)) {
-                 /* One IE cannot be larger than RSN_MAX_GENERIC_IE_LENGTH bytes */
-                 my_command.in_buffer = os_memoryAlloc(drv, ie_length);
-                 os_memoryCopyFromUser(drv, my_command.in_buffer, ie_content, ie_length );
-                 param3 = my_command.in_buffer;
-         } else {
-                 return TI_NOK;
-         }
-     }
-	 break;
-   }
-    /* If the friver is not running, return NOK */
-    if (drv->tCommon.eDriverState != DRV_STATE_RUNNING)
-    {
-        if (my_command.in_buffer)
-            os_memoryFree(drv, my_command.in_buffer, my_command.in_buffer_len);
-        if (my_command.out_buffer)
-            os_memoryFree(drv,my_command.out_buffer,my_command.out_buffer_len);
-        return TI_NOK;
-    }
-
-    /* Call the Cmd module with the given user paramters */
-    rc = cmdHndlr_InsertCommand(drv->tCommon.hCmdHndlr,
-                                   info->cmd, 
-                                   info->flags, 
-                                   iw_req, 
-                                   0, 
-                                   extra, 
-                                   0, 
-                                   param3, 
-                                   NULL);
-    /* Here we are after the command was completed */
-    if (my_command.in_buffer)
-    {
-        os_memoryFree(drv, my_command.in_buffer, my_command.in_buffer_len);
-    }
-    if (my_command.out_buffer)
-    {
-        if (os_memoryCopyToUser(drv, copy_to_buf, my_command.out_buffer, my_command.out_buffer_len))
-        {
-            os_printf("wlanDrvWext_Handler() os_memoryCopyToUser FAILED !!!\n");
-            rc = TI_NOK;
-        }
-        os_memoryFree(drv, my_command.out_buffer, my_command.out_buffer_len);
-    }
-    return rc;
-}
diff --git a/wl1271/platforms/os/linux/src/WlanDrvWext.h b/wl1271/platforms/os/linux/src/WlanDrvWext.h
deleted file mode 100644
index 36b79f2..0000000
--- a/wl1271/platforms/os/linux/src/WlanDrvWext.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * WlanDrvWext.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * src/wext.h
- *
- * Support for Linux Wireless Extensions - Header file
- *
- */
-
-void wlanDrvWext_Init (struct net_device *dev);
diff --git a/wl1271/platforms/os/linux/src/ipc_k.c b/wl1271/platforms/os/linux/src/ipc_k.c
deleted file mode 100644
index c0b439a..0000000
--- a/wl1271/platforms/os/linux/src/ipc_k.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * ipc_k.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * src/ipc_k.c
- *
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/stddef.h>
-#include <linux/netdevice.h>
-#include <linux/rtnetlink.h>
-#include <linux/netlink.h>
-
-#include "tidef.h"
-#include "WlanDrvIf.h"
-#include "osApi.h"
-#include "ioctl_init.h"
-#include "cli_cu_common.h"
-#include "TI_IPC_Api.h"
-
-TI_UINT32 IPCKernelInit    (TI_HANDLE hAdapter,TI_HANDLE  hIPCEv)
-{
-    return 0;
-}
-
-TI_UINT32 IPCKernelDeInit  (TI_HANDLE hAdapter)
-{
-    return 0;
-}
-
-
-/*******************************************************/
-TI_INT32 IPC_EventSend(TI_HANDLE hAdapter, TI_UINT8* pEvData, TI_UINT32 EvDataSize)
-{
-	struct sk_buff *skb;
-	int res;
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *) hAdapter;
-	TI_UINT32 realSize = 0;
-	TI_UINT32 msgSize;
-	struct nlmsghdr *nlh;
-	TI_UINT8 *msg;
-
-	os_wake_lock_timeout_enable(drv);
-	/* This event is targetted to the OS process Id 0 is not a valid pId for LINUX*/
-	if (((IPC_EVENT_PARAMS *)pEvData)->uProcessID == 0)
-	{
-		((IPC_EVENT_PARAMS *)pEvData)->pfEventCallback(( IPC_EV_DATA *)pEvData);
-		return 0;
-	}
-
-	/* set the payload size */
-	msgSize = (( IPC_EV_DATA *) pEvData) ->uBufferSize + offsetof(IPC_EV_DATA,uBuffer);
-
-	/* add the netlink header size */
-	realSize = NLMSG_SPACE(msgSize);
-
-	/* allocate the complete message */
-	skb = dev_alloc_skb(realSize);
-	if (!skb) {
-		printk(KERN_ERR "Failed to allocate new skb with size=%u.\n",realSize);
-		return -1;
-	}
-
-	/* set the netlink header params */
-	nlh = NLMSG_PUT(skb, 0, 0, NLMSG_DONE, realSize - sizeof(*nlh));
-
-	/* get the payload pointer */
-	msg = (char *)NLMSG_DATA(nlh);
-
-	/* copy the data to the payload */
-	memcpy(msg,pEvData,msgSize);
-
-	NETLINK_CB(skb).pid = 0;   /* from kernel */
-#define RTMGRP_LINK 1
-	NETLINK_CB(skb).dst_group = RTMGRP_LINK;
-
-	/* send the message*/
-	res = netlink_unicast(drv->wl_sock, skb, (( IPC_EVENT_PARAMS *) pEvData) ->uProcessID, MSG_DONTWAIT);
-
-	/* Sanity checks. As far as we're concerned this error is unrecovarable.*/
-	if (res >= 0)
-	{
-		return 0;
-	}
-
-nlmsg_failure:
-	ti_dprintf(TIWLAN_LOG_INFO,"IPC kernel: did not send the netlink message\n");
-	return -1;
-}
diff --git a/wl1271/platforms/os/linux/src/ipc_k.h b/wl1271/platforms/os/linux/src/ipc_k.h
deleted file mode 100644
index 77998f1..0000000
--- a/wl1271/platforms/os/linux/src/ipc_k.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * ipc_k.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * src/ipc_k.h
- *
- */
-
-#ifndef _IPC_K
-#define _IPC_K
-
-#include "tidef.h"
-
-
-/*TI_INT32 IPC_EventSend(struct net_device *dev, sk_buff *skb, TI_UINT32 pid);*/
-#endif
-
-
diff --git a/wl1271/platforms/os/linux/src/osRgstry_parser.c b/wl1271/platforms/os/linux/src/osRgstry_parser.c
deleted file mode 100644
index c568da2..0000000
--- a/wl1271/platforms/os/linux/src/osRgstry_parser.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * osRgstry_parser.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * src/osRgstry_parser.c 
- *
- */
-
-#include "osRgstry_parser.h"
-
-extern void regReadLastDbgState(TWlanDrvIfObjPtr pAdapter);
-
-static char *init_file      = NULL;
-static int init_file_length = 0;
-static PNDIS_CONFIGURATION_PARAMETER pNdisParm;
-
-int osInitTable_IniFile (TI_HANDLE hOs, TInitTable *InitTable, char *file_buf, int file_length)
-{
-    TWlanDrvIfObjPtr drv = (TWlanDrvIfObjPtr)hOs;
-    static NDIS_CONFIGURATION_PARAMETER vNdisParm;
-
-    init_file         = file_buf;
-    init_file_length  = file_length;
-    pNdisParm = &vNdisParm;
-    
-    regFillInitTable (drv, InitTable);
-#ifdef TI_DBG
-    regReadLastDbgState(drv);
-#endif
-    return 0;
-}
-
-unsigned long TiDebugFlag;
-
-/* void PRINT( char * type, char *format, ... )*/
-/* {*/
-/*     return ;*/
-/* }*/
-
-NDIS_STATUS NdisUnicodeStringToAnsiString( IN OUT PANSI_STRING  DestinationString,
-    IN PUNICODE_STRING  SourceString )
-{
-    if( DestinationString->MaximumLength < SourceString->Length )
-        return NDIS_STATUS_BUFFER_TOO_SHORT;
-
-    DestinationString->Length = SourceString->Length;
-    os_memoryCopy( NULL, DestinationString->Buffer, SourceString->Buffer, SourceString->Length );
-    return NDIS_STATUS_SUCCESS;
-
-}
-
-#ifndef tolower
-#define tolower(c)  ( (c) | 0x20)
-#endif
-
-    /* Search sub-string in memory buffer */
-    /* From '#' to EOL ---- remarks */
-char *mem_str(char *buf, char *str, char *end_buf)
-{
-    int i;
-
-    for( ; buf <= end_buf; buf++ )
-    {
-        if( *buf == '#' )
-        {
-            buf = strchr(buf+1, '\n' );
-            if( !buf )
-                return NULL;
-
-        }
-        for( i=0; &buf[i] <= end_buf && buf[i] && str[i] && (tolower(buf[i]) == tolower(str[i])); i++ ) ;
-
-        if ((!str[i]) && (!((tolower(*(buf-1))>='a') && (tolower(*(buf-1))<='z'))))
-            return buf;
-    }
-    return NULL;
-}
-
-char * ltrim(char *s )
-{
-    while( *s == ' ' || *s == '\t' ) s++;
-    return s;
-}
-
-void NdisReadConfiguration( OUT PNDIS_STATUS  status, OUT PNDIS_CONFIGURATION_PARAMETER  *param_value,
-    IN NDIS_HANDLE  config_handle, IN PNDIS_STRING  keyword, IN NDIS_PARAMETER_TYPE  param_type )
-{
-    char *name = keyword->Buffer;
-    char *s, *buf = init_file, *end_buf = init_file + init_file_length;
-    static int count = 0;
-
-    *status = NDIS_STATUS_FAILURE;
-    *param_value = pNdisParm;
-
-    if( !count )
-    {
-        print_deb("\n++++++++++++\n%s+++++++++++\n", init_file);
-        count++;
-    }
-
-    if( !name || !*name || !init_file || !init_file_length )
-        return ;
-
-    memset(pNdisParm, 0, sizeof(NDIS_CONFIGURATION_PARAMETER));
-
-    while(buf < end_buf)
-    {
-        buf = ltrim(buf);
-        s = mem_str(buf, name, end_buf);
-        if( !s )
-            break;
-
-        buf = ltrim(s + strlen(name));
-        if( *buf == '=' )
-            buf++;
-        else {
-            /*print_err("\n...init_config err: delim not found (=): ** %s **\n", buf );*/
-            buf = s + 1; /*strlen(name);*/
-            continue;
-        }
-        buf = ltrim(buf);
-        if( param_type == NdisParameterString )
-        {
-            char *remark = NULL;
-
-            s = strchr(buf, '\n');
-            if( !s )
-                s = buf+strlen(buf);
-            
-            remark = memchr(buf, '#', s - buf);        /* skip remarks */
-            if( remark )
-            {
-                do {        /* remove whitespace  */
-                    remark--;
-                } while( *remark == ' ' || *remark == '\t' );    
-                
-                pNdisParm->ParameterData.StringData.Length = remark - buf + 1;
-            }
-            else
-                pNdisParm->ParameterData.StringData.Length = s - buf;
-                   
-            pNdisParm->ParameterData.StringData.Buffer = (TI_UINT8*)&pNdisParm->StringBuffer[0];
-            pNdisParm->ParameterData.StringData.MaximumLength = NDIS_MAX_STRING_LEN;
-            if( !pNdisParm->ParameterData.StringData.Length > NDIS_MAX_STRING_LEN )
-            {
-                *status = NDIS_STATUS_BUFFER_TOO_SHORT;
-                return;
-            }
-            memcpy(pNdisParm->ParameterData.StringData.Buffer, buf, pNdisParm->ParameterData.StringData.Length);
-            print_info("NdisReadConfiguration(): %s = (%d)'%s'\n", name, pNdisParm->ParameterData.StringData.Length, pNdisParm->ParameterData.StringData.Buffer);
-        }
-        else if( param_type == NdisParameterInteger )
-        {
-	    char *end_p;
-            pNdisParm->ParameterData.IntegerData = simple_strtol(buf, &end_p, 0);
-            if (end_p && *end_p && *end_p!=' ' && *end_p!='\n'
-		&& *end_p!='\r' && *end_p!='\t')
-            {
-                print_err("\n...init_config: invalid int value for <%s> : %s\n", name, buf );
-                return;
-            }
-            /*print_deb(" NdisReadConfiguration(): buf = %p (%.20s)\n", buf, buf );*/
-            print_info("NdisReadConfiguration(): %s = %d\n", name, (TI_INT32) pNdisParm->ParameterData.IntegerData);
-        }
-        else
-        {
-            print_err("NdisReadConfiguration(): unknow parameter type %d for %s\n", param_type, name );
-            return;
-        }
-        *status = NDIS_STATUS_SUCCESS;
-        return;
-
-    }
-    return ;
-}
-
-void NdisWriteConfiguration( OUT PNDIS_STATUS  Status, 
-                IN NDIS_HANDLE  ConfigurationHandle,
-                IN PNDIS_STRING  Keyword, 
-                IN PNDIS_CONFIGURATION_PARAMETER  ParameterValue )
-{
-    print_err(" NdisWriteConfiguration(): ** not implemented yet ...\n");
-}
-
-void NdisMIndicateStatus(
-  NDIS_HANDLE MiniportAdapterHandle,
-  NDIS_STATUS GeneralStatus,
-  void* StatusBuffer,
-  TI_UINT32 StatusBufferSize
-)
-{
-}
diff --git a/wl1271/platforms/os/linux/src/osRgstry_parser.h b/wl1271/platforms/os/linux/src/osRgstry_parser.h
deleted file mode 100644
index c0c33b0..0000000
--- a/wl1271/platforms/os/linux/src/osRgstry_parser.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * osRgstry_parser.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * src/osRgstry_parser.h 
- *
- */
-
-#ifndef _OS_RGSTRY_PARSER_
-#define _OS_RGSTRY_PARSER_
-
-#include "ioctl_init.h"
-
-#include "tidef.h"
-#include "osApi.h"
-#include "osDebug.h"
-
-
-
-#define NDIS_STRING_CONST(a)    {sizeof(a), sizeof(a), a}
-#include "WlanDrvIf.h"
-#include "WlanDrvIf.h"
-
-void regFillInitTable ( TWlanDrvIfObjPtr pAdapter, void* pInitTable);
-
-extern void osInitTable (TInitTable *InitTable);
-extern  int osInitTable_IniFile (TI_HANDLE hOs, TInitTable *InitTable, char *file_buf, int file_length);
-
-
-#endif /* _OS_RGSTRY_PARSER_ */
-
diff --git a/wl1271/platforms/os/linux/src/osapi.c b/wl1271/platforms/os/linux/src/osapi.c
deleted file mode 100644
index a40da48..0000000
--- a/wl1271/platforms/os/linux/src/osapi.c
+++ /dev/null
@@ -1,939 +0,0 @@
-/*
- * osapi.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * src/osapi.c
- *
- */
-#include "tidef.h"
-#include "arch_ti.h"
-
-#include <linux/stddef.h>
-#include <linux/string.h>
-#include <linux/time.h>
-#include <linux/timer.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/netdevice.h>
-#include <linux/completion.h>
-#include <linux/etherdevice.h>
-#include <linux/vmalloc.h>
-#include <linux/string.h>
-#include <linux/delay.h>
-#include <linux/time.h>
-#include <linux/list.h>
-#include <stdarg.h>
-#include <asm/io.h>
-#include "RxBuf_linux.h"
-
-/*#include "debug_module.h"*/
-#include "host_platform.h"
-#include "WlanDrvIf.h"
-#include "bmtrace_api.h"
-#include "TI_IPC_Api.h"
-#include "802_11Defs.h"
-#include "osApi.h"
-#include "txMgmtQueue_Api.h"
-#include "EvHandler.h"
-
-#ifdef ESTA_TIMER_DEBUG
-#define esta_timer_log(fmt,args...)  printk(fmt, ## args)
-#else
-#define esta_timer_log(fmt,args...)
-#endif
-
-#define FRAG_SIZE        200
-
-typedef struct timer_list TOsTimer;
-
-TI_BOOL bRedirectOutputToLogger = TI_FALSE;
-TI_BOOL use_debug_module = TI_FALSE;
-
-/****************************************************************************************
- *                        																*
- *						OS Report API													*       
- *																						*
- ****************************************************************************************/
-static void SendLoggerData (TI_HANDLE OsContext, TI_UINT8 *pMsg, TI_UINT16 len)
-{    
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)OsContext;
-
-	if (len > 0)
-	{
-		EvHandlerSendEvent(drv->tCommon.hEvHandler, IPC_EVENT_LOGGER, pMsg, len);
-	}   
-}
-
-void os_setDebugOutputToLogger(TI_BOOL value)
-{
-	bRedirectOutputToLogger = value;
-}
-/****************************************************************************************
- *                        os_setDebugMode()                                 
- ****************************************************************************************
-DESCRIPTION:  	Set the Debug Mode 
-
-INPUT:            
-
-RETURN:			None   
-
-NOTES:         	
-*****************************************************************************************/
-void os_setDebugMode(TI_BOOL enable)
-{
-	use_debug_module = enable;
-}
-
-
-/****************************************************************************************
- *                        os_printf()                                 
- ****************************************************************************************
-DESCRIPTION:  	Print formatted output. 
-
-INPUT:          format -  Specifies the string, to be printed
-
-RETURN:			None   
-
-NOTES:         	
-*****************************************************************************************/
-void os_printf(const char *format ,...)
-{
-	static int from_new_line = 1;		/* Used to save the last message EOL */
-	va_list ap;
-	static char msg[MAX_MESSAGE_SIZE];
-	char *p_msg = msg;					/* Pointer to the message */
-	TI_UINT16 message_len;					
-	TI_UINT32 sec = 0;
-	TI_UINT32 uSec = 0;
-	os_memoryZero(NULL,msg, MAX_MESSAGE_SIZE);
-
-	/* Format the message and keep the message length */
-	va_start(ap,format);
-	message_len = vsnprintf(&msg[0], sizeof(msg) -1 , format, ap);
-	if( from_new_line )
-        {
-            if (msg[1] == '$')
-            {
-                p_msg += 4;
-            }
-            
-            sec = os_timeStampUs(NULL);
-            uSec = sec % MICROSECOND_IN_SECONDS;
-            sec /= MICROSECOND_IN_SECONDS;
-            
-            printk(KERN_INFO DRIVER_NAME ": %d.%06d: %s",sec,uSec,p_msg);
-        }
-        else
-        {
-		printk(&msg[0]);
-        }
-        
-	from_new_line = ( msg[message_len - 1] == '\n' );
-
-	va_end(ap);
-}
-
-/****************************************************************************************
- *                        																*
- *							OS TIMER API												*
- *																						*
- ****************************************************************************************/
-
-/****************************************************************************************
- *                        os_timerCreate()                                 
- ****************************************************************************************
-DESCRIPTION:    This function creates and initializes an OS timer object associated with a
-				caller's pRoutine function.
-
-ARGUMENTS:		OsContext   - The OS handle
-                pRoutine    - The user callback function
-                hFuncHandle - The user callback handle
-
-RETURN:			A handle of the created OS timer.
-
-NOTES:         	1) The user's callback is called directly from OS timer context when expired.
-                2) In some OSs, it may be needed to use an intermediate callback in the 
-                   osapi layer (use os_timerHandlr for that).
-
-*****************************************************************************************/
-TI_HANDLE os_timerCreate (TI_HANDLE OsContext, fTimerFunction pRoutine, TI_HANDLE hFuncHandle)
-{
-	TOsTimer *pOsTimer = os_memoryAlloc (OsContext, sizeof(TOsTimer));
-
-    if(pOsTimer)
-    {
-        init_timer (pOsTimer);
-        pOsTimer->function = (void *)pRoutine;
-        pOsTimer->data     = (int)hFuncHandle;
-    }
-
-    return (TI_HANDLE)pOsTimer;
-}
-
-
-/****************************************************************************************
- *                        os_timerDestroy()                                 
- ****************************************************************************************
-DESCRIPTION:    This function destroys the OS timer object.
-
-ARGUMENTS:		
-
-RETURN:			
-
-NOTES:         	
-*****************************************************************************************/
-void os_timerDestroy (TI_HANDLE OsContext, TI_HANDLE TimerHandle)
-{
-	os_timerStop (OsContext, TimerHandle);
-	os_memoryFree (OsContext, TimerHandle, sizeof(TOsTimer));
-}
-
-
-/****************************************************************************************
- *                        os_timerStart()                                 
- ****************************************************************************************
-DESCRIPTION:    This function start the timer object.
-
-ARGUMENTS:		
-
-RETURN:			
-
-NOTES:         	
-*****************************************************************************************/
-void os_timerStart (TI_HANDLE OsContext, TI_HANDLE TimerHandle, TI_UINT32 DelayMs)
-{
-	TI_UINT32 jiffie_cnt = msecs_to_jiffies (DelayMs);
-
-	mod_timer ((TOsTimer *)TimerHandle, jiffies + jiffie_cnt);
-}
-
-
-/****************************************************************************************
- *                        os_stopTimer()                                 
- ****************************************************************************************
-DESCRIPTION:    This function stop the timer object.
-
-ARGUMENTS:		
-
-RETURN:			
-
-NOTES:         	
-*****************************************************************************************/
-void os_timerStop (TI_HANDLE OsContext, TI_HANDLE TimerHandle)
-{
-	del_timer_sync((TOsTimer *)TimerHandle);
-}
-
-
-/****************************************************************************************
- *                        os_periodicIntrTimerStart()                                 
- ****************************************************************************************
-DESCRIPTION:    This function starts the periodic interrupt mechanism. This mode is used 
-				when interrupts that usually received from the Fw is now masked, and we are
-				checking for any need of Fw handling in time periods.
-
-ARGUMENTS:		
-
-RETURN:			
-
-NOTES:         	Power level of the CHIP should be always awake in this mode (no ELP)
-*****************************************************************************************/
-#ifdef PRIODIC_INTERRUPT
-void os_periodicIntrTimerStart (TI_HANDLE OsContext)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)OsContext;
-
-	mod_timer (drv->hPollTimer, jiffies + TIWLAN_IRQ_POLL_INTERVAL);
-}
-#endif
-
-
-/****************************************************************************************
- *                        os_timeStampMs()                                 
- ****************************************************************************************
-DESCRIPTION:	This function returns the number of milliseconds that have elapsed since
-				the system was booted.
-
-ARGUMENTS:		OsContext - our adapter context.
-
-RETURN:			
-
-NOTES:         	
-*****************************************************************************************/
-TI_UINT32 os_timeStampMs (TI_HANDLE OsContext)
-{
-	struct timeval tv;
-	do_gettimeofday(&tv);
-	return tv.tv_sec*1000 + tv.tv_usec/1000;
-}
-
-
-/****************************************************************************************
- *                        os_timeStampUs()                                 
- ****************************************************************************************
-DESCRIPTION:	This function returns the number of microseconds that have elapsed since
-				the system was booted.
-
-ARGUMENTS:		OsContext - our adapter context.
-				Note that sometimes this function will be called with NULL(!!!) as argument!
-
-RETURN:			
-
-NOTES:         	
-*****************************************************************************************/
-TI_UINT32 os_timeStampUs (TI_HANDLE OsContext)
-{
-	struct timeval tv;
-	do_gettimeofday(&tv);
-	return tv.tv_sec*1000000 + tv.tv_usec;
-}
-
-
-/****************************************************************************************
- *                        os_StalluSec()                                 
- ****************************************************************************************
-DESCRIPTION:	This function make delay in microseconds.
-
-ARGUMENTS:		OsContext - our adapter context.
-				uSec - delay time in microseconds
-
-RETURN:			
-
-NOTES:         	
-*****************************************************************************************/
-void os_StalluSec (TI_HANDLE OsContext, TI_UINT32 uSec)
-{
-	udelay (uSec);
-}
-
-
-/****************************************************************************************
- *                        																*
- *							Protection services	API										*
- *																						*
- ****************************************************************************************
- * OS protection is implemented as spin_lock_irqsave and spin_unlock_irqrestore  								*
- ****************************************************************************************/
-
-
-/****************************************************************************************
- *                        os_protectCreate()                                 
- ****************************************************************************************
-DESCRIPTION:	
-
-ARGUMENTS:		OsContext - our adapter context.
-
-RETURN:			A handle of the created mutex/spinlock.
-				TI_HANDLE_INVALID if there is insufficient memory available or problems
-				initializing the mutex
-
-NOTES:         	
-*****************************************************************************************/
-TI_HANDLE os_protectCreate (TI_HANDLE OsContext)
-{
-	return NULL;
-}
-
-
-/****************************************************************************************
- *                        os_protectDestroy()                                 
- ****************************************************************************************
-DESCRIPTION:		
-
-ARGUMENTS:		OsContext - our adapter context.
-
-RETURN:			None - This had better work since there is not a return value to the user
-
-NOTES:         	
-*****************************************************************************************/
-void os_protectDestroy (TI_HANDLE OsContext, TI_HANDLE ProtectCtx)
-{
-}
-
-
-/****************************************************************************************
- *                        os_protectLock()                                 
- ****************************************************************************************
-DESCRIPTION:		
-
-ARGUMENTS:		OsContext - our adapter context.
-
-RETURN:			None - This had better work since there is not a return value to the user
-
-NOTES:         	
-*****************************************************************************************/
-void os_protectLock (TI_HANDLE OsContext, TI_HANDLE ProtectContext)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)OsContext;
-
-	spin_lock_irqsave (&drv->lock, drv->flags);
-}
-
-
-/****************************************************************************************
- *                        os_protectUnlock()                                 
- ****************************************************************************************
-DESCRIPTION:		
-
-ARGUMENTS:		OsContext - our adapter context.
-
-RETURN:			None - This had better work since there is not a return value to the user
-
-NOTES:         	
-*****************************************************************************************/
-void os_protectUnlock (TI_HANDLE OsContext, TI_HANDLE ProtectContext)
-{
-    TWlanDrvIfObj *drv = (TWlanDrvIfObj *)OsContext;
-    
-    spin_unlock_irqrestore (&drv->lock, drv->flags);
-}
-/****************************************************************************************
- *                        os_receivePacket()                                 
- ****************************************************************************************
-DESCRIPTION:		
-
-ARGUMENTS:		
-
-RETURN:			
-
-NOTES:         	
-*****************************************************************************************/
-TI_BOOL os_receivePacket(TI_HANDLE OsContext, void *pRxDesc ,void *pPacket, TI_UINT16 Length)
-{
-   TWlanDrvIfObj  *drv     = (TWlanDrvIfObj *)OsContext;
-   unsigned char  *pdata   = (unsigned char *)((TI_UINT32)pPacket & ~(TI_UINT32)0x3);
-   rx_head_t      *rx_head = (rx_head_t *)(pdata -  WSPI_PAD_BYTES - RX_HEAD_LEN_ALIGNED);
-   struct sk_buff *skb     = rx_head->skb;
-	
-#ifdef TI_DBG
-   if ((TI_UINT32)pPacket & 0x3)
-   {
-     if ((TI_UINT32)pPacket - (TI_UINT32)skb->data != 2)
-	 {
-	   printk("os_receivePacket() address error skb=0x%x skb->data=0x%x pPacket=0x%x !!!\n",(int)skb, (int)skb->data, (int)pPacket);
-	 }
-   }
-   else
-   {
-	 if ((TI_UINT32)skb->data != (TI_UINT32)pPacket)
-	 {
-	   printk("os_receivePacket() address error skb=0x%x skb->data=0x%x pPacket=0x%x !!!\n",(int)skb, (int)skb->data, (int)pPacket);
-	 }
-   }
-   if (Length != RX_ETH_PKT_LEN(pPacket))
-   {
-	 printk("os_receivePacket() Length=%d !=  RX_ETH_PKT_LEN(pPacket)=%d!!!\n",(int)Length, RX_ETH_PKT_LEN(pPacket));
-   }
-
-#endif
-/*
-   printk("-->> os_receivePacket() pPacket=0x%x Length=%d skb=0x%x skb->data=0x%x skb->head=0x%x skb->len=%d\n",
-		  (int)pPacket, (int)Length, (int)skb, (int)skb->data, (int)skb->head, (int)skb->len);
-*/
-   /* Use skb_reserve, it updates both skb->data and skb->tail. */
-   skb->data = RX_ETH_PKT_DATA(pPacket);
-   skb->tail = skb->data;
-   skb_put(skb, RX_ETH_PKT_LEN(pPacket));
-/*
-   printk("-->> os_receivePacket() skb=0x%x skb->data=0x%x skb->head=0x%x skb->len=%d\n",
-		  (int)skb, (int)skb->data, (int)skb->head, (int)skb->len);
-*/
-   ti_nodprintf(TIWLAN_LOG_INFO, "os_receivePacket - Received EAPOL len-%d\n", WBUF_LEN(pWbuf));
-
-   skb->dev       = drv->netdev;
-   skb->protocol  = eth_type_trans(skb, drv->netdev);
-   skb->ip_summed = CHECKSUM_NONE;
-
-   drv->stats.rx_packets++;
-   drv->stats.rx_bytes += skb->len;
-
-   /* Send the skb to the TCP stack. 
-    * it responsibly of the Linux kernel to free the skb
-    */
-   {
-       CL_TRACE_START_L1();
-
-       os_wake_lock_timeout_enable(drv);
-
-       netif_rx_ni(skb);
-
-       /* Note: Don't change this trace (needed to exclude OS processing from Rx CPU utilization) */
-       CL_TRACE_END_L1("tiwlan_drv.ko", "OS", "RX", "");
-   }
-
-   return TI_TRUE;
-}
-
-/*-----------------------------------------------------------------------------
-  
-Routine Name:  os_timerHandlr
-
-Routine Description:
-
-    Just a place holder for timer expiration handling in other OSs.
-    In Linux, user callback is called directly on OS timer expiry.
-
-Arguments:     parm - timer object handle
-
-Return Value:  None.
-
-Notes:
-
------------------------------------------------------------------------------*/
-void os_timerHandlr(unsigned long parm)
-{
-    /* Not needed in Linux (user callback is called directly on OS timer expiry). */
-}
-
-
-/*-----------------------------------------------------------------------------
-Routine Name:  os_connectionStatus
-
-Routine Description:
-
-The eSTA-DK will call this API so the OS stack is aware that the
-WLAN layer is ready to function.
-
-Arguments:
-cStatus = 1; WLAN in ready for network packets
-cStatus = 0; WLAN in not ready for network packets
-
-Return Value:  None
------------------------------------------------------------------------------*/
-TI_INT32 os_IndicateEvent (TI_HANDLE OsContext, IPC_EV_DATA* pData)
-{
-	IPC_EVENT_PARAMS *pInParam =  &pData->EvParams;
-	TWlanDrvIfObj    *drv = (TWlanDrvIfObj *)OsContext;
-	/*TI_UINT8 AuthBuf[sizeof(TI_UINT32) + sizeof(OS_802_11_AUTHENTICATION_REQUEST)];*/
-
-	ti_nodprintf(TIWLAN_LOG_INFO, "\n  os_ConnectionStatus Event 0x%08x \n", CsStatus->Event);
-   
-	switch(pInParam->uEventType)
-	{
-		case IPC_EVENT_ASSOCIATED:
-			if (drv->netdev != NULL)
-            	netif_carrier_on(drv->netdev);
-         	break;
-
-       case IPC_EVENT_DISASSOCIATED:
-         	if (drv->netdev != NULL)
-        		netif_carrier_off(drv->netdev);
-      		break;
-
-      case IPC_EVENT_LINK_SPEED:
-         	drv->tCommon.uLinkSpeed = (*(TI_UINT32*)pData->uBuffer * 10000) / 2;
-         	ti_nodprintf(TIWLAN_LOG_INFO, "\n  Link Speed = 0x%08x \n",drv->tCommon.uLinkSpeed);
-      		break;
-   }
-
-   return TI_OK;
-}
-
-
-
-/******************************************************************************/
-
-void os_disableIrq (TI_HANDLE OsContext)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)OsContext;
-	disable_irq (drv->irq);
-}
-
-void os_enableIrq (TI_HANDLE OsContext)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)OsContext;
-	enable_irq (drv->irq);
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name:  os_InterruptServiced
-
-Routine Description: Called when IRQ line is not asserted any more 
-					(i.e. we can enable IRQ in Level sensitive platform)
-
-Arguments:	OsContext - handle to OS context
-
-Return Value:  none
------------------------------------------------------------------------------*/
-void os_InterruptServiced (TI_HANDLE OsContext)
-{
-	/* To be implemented with Level IRQ */
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name:  os_wake_lock_timeout
-
-Routine Description: Called to prevent system from suspend for 1 sec
-
-Arguments:     OsContext - handle to OS context
-
-Return Value:  packet counter
------------------------------------------------------------------------------*/
-int os_wake_lock_timeout (TI_HANDLE OsContext)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)OsContext;
-	int ret = 0;
-	unsigned long flags;
-
-	if (drv) {
-		spin_lock_irqsave(&drv->lock, flags);
-		ret = drv->wl_packet;
-		if (drv->wl_packet) {
-			drv->wl_packet = 0;
-#ifdef CONFIG_HAS_WAKELOCK
-			wake_lock_timeout(&drv->wl_rxwake, HZ);
-#endif
-		}
-		spin_unlock_irqrestore(&drv->lock, flags);
-	}
-	/* printk("%s: %d\n", __func__, ret); */
-	return ret;
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name:  os_wake_lock_timeout_enable
-
-Routine Description: Called to set flag for suspend prevention for some time
-
-Arguments:     OsContext - handle to OS context
-
-Return Value:  packet counter
------------------------------------------------------------------------------*/
-int os_wake_lock_timeout_enable (TI_HANDLE OsContext)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)OsContext;
-	unsigned long flags;
-	int ret = 0;
-
-	if (drv) {
-		spin_lock_irqsave(&drv->lock, flags);
-		ret = drv->wl_packet = 1;
-		spin_unlock_irqrestore(&drv->lock, flags);
-	}
-	return ret;
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name:  os_wake_lock
-
-Routine Description: Called to prevent system from suspend
-
-Arguments:     OsContext - handle to OS context
-
-Return Value:  wake_lock counter
------------------------------------------------------------------------------*/
-int os_wake_lock (TI_HANDLE OsContext)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)OsContext;
-	int ret = 0;
-	unsigned long flags;
-
-	if (drv) {
-		spin_lock_irqsave(&drv->lock, flags);
-#ifdef CONFIG_HAS_WAKELOCK
-		if (!drv->wl_count)
-			wake_lock(&drv->wl_wifi);
-#endif
-		drv->wl_count++;
-		ret = drv->wl_count;
-		spin_unlock_irqrestore(&drv->lock, flags);
-	}
-	/* printk("%s: %d\n", __func__, ret); */
-	return ret;
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name:  os_wake_unlock
-
-Routine Description: Called to allow system to suspend
-
-Arguments:     OsContext - handle to OS context
-
-Return Value:  wake_lock counter
------------------------------------------------------------------------------*/
-int os_wake_unlock (TI_HANDLE OsContext)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)OsContext;
-	int ret = 0;
-	unsigned long flags;
-
-	if (drv) {
-		spin_lock_irqsave(&drv->lock, flags);
-		if (drv->wl_count) {
-			drv->wl_count--;
-#ifdef CONFIG_HAS_WAKELOCK
-			if (!drv->wl_count)
-				wake_unlock(&drv->wl_wifi);
-#endif
-			ret = drv->wl_count;
-		}
-		spin_unlock_irqrestore(&drv->lock, flags);
-	}
-	/* printk("%s: %d\n", __func__, ret); */
-	return ret;
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name:  os_RequestSchedule
-
-Routine Description:
-
-Arguments:
-
-Return Value:  TI_OK
------------------------------------------------------------------------------*/
-int os_RequestSchedule (TI_HANDLE OsContext)
-{
-	TWlanDrvIfObj *drv = (TWlanDrvIfObj *)OsContext;
-
-	/* Note: The performance trace below doesn't inclose the schedule
-	 *   itself because the rescheduling can occur immediately and call
-	 *   os_RequestSchedule again which will confuse the trace tools */
-	CL_TRACE_START_L3();
-	CL_TRACE_END_L3("tiwlan_drv.ko", "OS", "TASK", "");
-
-	if( !queue_work(drv->tiwlan_wq, &drv->tWork) ) {
-		/* printk("%s: Fail\n",__func__); */
-		return TI_NOK;
-	}
-
-	return TI_OK;
-}
-
-
-/*-----------------------------------------------------------------------------
-Routine Name: os_SignalObjectCreate
-
-Routine Description:
-
-Arguments:
-
-Return Value: TI_OK
------------------------------------------------------------------------------*/
-void *os_SignalObjectCreate (TI_HANDLE OsContext)
-{
-	struct completion *myPtr;
-	myPtr = os_memoryAlloc(OsContext, sizeof(struct completion));
-	if (myPtr)
-		init_completion (myPtr);
-	return (myPtr);
-}
-
-
-/*-----------------------------------------------------------------------------
-Routine Name: os_SignalObjectWait
-
-Routine Description:
-
-Arguments:
-
-Return Value: TI_OK
------------------------------------------------------------------------------*/
-int os_SignalObjectWait (TI_HANDLE OsContext, void *signalObject)
-{
-	if (!signalObject)
-		return TI_NOK;
-	if (!wait_for_completion_timeout((struct completion *)signalObject,
-					msecs_to_jiffies(10000))) {
-		printk("tiwlan: 10 sec %s timeout\n", __func__);
-	}
-	return TI_OK;
-}
-
-
-/*-----------------------------------------------------------------------------
-Routine Name: os_SignalObjectSet
-
-Routine Description:
-
-Arguments:
-
-Return Value: TI_OK
------------------------------------------------------------------------------*/
-int os_SignalObjectSet (TI_HANDLE OsContext, void *signalObject)
-{
-	if (!signalObject)
-		return TI_NOK;
-	complete ((struct completion *)signalObject);
-	return TI_OK;
-}
-
-
-/*-----------------------------------------------------------------------------
-Routine Name: os_SignalObjectFree
-
-Routine Description:
-
-Arguments:
-
-Return Value: TI_OK
------------------------------------------------------------------------------*/
-int os_SignalObjectFree (TI_HANDLE OsContext, void *signalObject)
-{
-	if (!signalObject)
-		return TI_NOK;
-	os_memoryFree(OsContext, signalObject, sizeof(struct completion));
-	return TI_OK;
-}
-
-
-/** 
- * \fn     os_Trace
- * \brief  Prepare and send trace message to the logger.
- * 
- * \param  OsContext    - The OS handle
- * \param  uLevel   	- Severity level of the trace message
- * \param  uFileId  	- Source file ID of the trace message
- * \param  uLineNum 	- Line number of the trace message
- * \param  uParamsNum   - Number of parameters in the trace message
- * \param  ...          - The trace message parameters
- * 
- * \return void
- */
-void os_Trace (TI_HANDLE OsContext, TI_UINT32 uLevel, TI_UINT32 uFileId, TI_UINT32 uLineNum, TI_UINT32 uParamsNum, ...)
-{
-	TI_UINT32	index;
-	TI_UINT32	uParam;
-	TI_UINT32	uMaxParamValue = 0;
-	TI_UINT32	uMsgLen	= TRACE_MSG_MIN_LENGTH;
-	TI_UINT8    aMsg[TRACE_MSG_MAX_LENGTH] = {0};
-	TTraceMsg   *pMsgHdr  = (TTraceMsg *)&aMsg[0];
-	TI_UINT8    *pMsgData = &aMsg[0] + sizeof(TTraceMsg);
-	va_list	    list;
-
-	if (!bRedirectOutputToLogger)
-	{
-		return;
-	}
-
-	if (uParamsNum > TRACE_MSG_MAX_PARAMS)
-	{
-		uParamsNum = TRACE_MSG_MAX_PARAMS;
-	}
-
-	/* sync on the parameters */
-	va_start(list, uParamsNum);
-
-	/* find the longest parameter */
-	for (index = 0; index < uParamsNum; index++)
-	{
-		/* get parameter from the stack */
-		uParam = va_arg (list, TI_UINT32);
-
-		/* save the longest parameter at variable 'uMaxParamValue' */
-		if (uParam > uMaxParamValue)
-        {
-			uMaxParamValue = uParam;
-        }
-
-		/* 32 bit parameter is the longest possible - get out of the loop */
-		if (uMaxParamValue > UINT16_MAX_VAL)
-        {
-			break;
-        }
-	}
-
-	/* Set msg length and format according to the biggest parameter value (8/16/32 bits) */
-	if (uMaxParamValue > UINT16_MAX_VAL)		
-	{
-		pMsgHdr->uFormat = TRACE_FORMAT_32_BITS_PARAMS;
-		uMsgLen += uParamsNum * sizeof(TI_UINT32);
-	}
-	else if (uMaxParamValue > UINT8_MAX_VAL)	
-	{
-		pMsgHdr->uFormat = TRACE_FORMAT_16_BITS_PARAMS;
-		uMsgLen += uParamsNum * sizeof(TI_UINT16);
-	}
-	else							
-	{
-		pMsgHdr->uFormat = TRACE_FORMAT_8_BITS_PARAMS;
-		uMsgLen += uParamsNum;
-	}
-
-	/* Fill all other header information */
-	pMsgHdr->uLevel     = (TI_UINT8)uLevel;
-	pMsgHdr->uParamsNum = (TI_UINT8)uParamsNum;
-	pMsgHdr->uFileId    = (TI_UINT16)uFileId;
-	pMsgHdr->uLineNum   = (TI_UINT16)uLineNum;
-
-	/* re-sync on the parameters */
-	va_start(list, uParamsNum);
-
-	/* add the parameters */
-	for (index = 0; index < uParamsNum; index++)
-	{
-		/* get parameter from the stack */
-		uParam = va_arg(list, TI_UINT32);
-
-		/* insert the parameter and increment msg pointer */
-		switch(pMsgHdr->uFormat)
-		{
-		case TRACE_FORMAT_8_BITS_PARAMS:
-			INSERT_BYTE(pMsgData, uParam);
-			break;
-
-		case TRACE_FORMAT_16_BITS_PARAMS:
-			INSERT_2_BYTES(pMsgData, uParam);
-			break;
-
-		case TRACE_FORMAT_32_BITS_PARAMS:
-			INSERT_4_BYTES(pMsgData, uParam);
-			break;
-
-        default:
-            va_end(list);
-            return;
-		}     
-	}
-
-	va_end(list);
-
-	/* Send the trace message to the logger */
-	SendLoggerData(OsContext, aMsg, (TI_UINT16)uMsgLen);
-}
-
-/*--------------------------------------------------------------------------------------*/
-
-/** 
- * \fn     os_SetDrvThreadPriority
- * \brief  Called upon init to set WLAN driver thread priority.
- *         Currently not supported in Linux.
- * 
- * \param  OsContext              - The OS handle
- * \param  uWlanDrvThreadPriority - The WLAN driver thread priority
- * \return 
- */
-void os_SetDrvThreadPriority (TI_HANDLE OsContext, TI_UINT32 uWlanDrvThreadPriority)
-{
-}
diff --git a/wl1271/platforms/os/linux/src/osmemapi.c b/wl1271/platforms/os/linux/src/osmemapi.c
deleted file mode 100644
index e71d303..0000000
--- a/wl1271/platforms/os/linux/src/osmemapi.c
+++ /dev/null
@@ -1,514 +0,0 @@
-/*
- * osmemapi.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * src/osmemapi.c
- *
- */
-
-#include "arch_ti.h"
-
-#include <linux/stddef.h>
-#include <linux/string.h>
-#include <linux/time.h>
-#include <linux/timer.h>
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/vmalloc.h>
-#include <linux/string.h>
-#include <linux/delay.h>
-#include <linux/time.h>
-#include <linux/list.h>
-
-#include "osApi.h"
-#include "tidef.h"
-#include "WlanDrvIf.h"
-
-typedef void (*os_free)(void *);
-struct os_mem_block
-{
-	struct list_head blk_list;
-	os_free f_free;
-	__u32 size;
-	__u32 signature;
-};
-#define MEM_BLOCK_START  (('m'<<24) | ('e'<<16) | ('m'<<8) | 's')
-#define MEM_BLOCK_END    (('m'<<24) | ('e'<<16) | ('m'<<8) | 'e')
-
-/****************************************************************************************
- *                        																*
- *						OS Memory API													*       
- *																						*
- ****************************************************************************************/
-
-/****************************************************************************************
- *                        os_memoryAlloc()                                 
- ****************************************************************************************
-DESCRIPTION:    Allocates resident (nonpaged) system-space memory.
-
-ARGUMENTS:		OsContext	- our adapter context.
-				Size		- Specifies the size, in bytes, to be allocated.
-
-RETURN:			Pointer to the allocated memory.
-				NULL if there is insufficient memory available.
-
-NOTES:         	With the call to vmalloc it is assumed that this function will
-				never be called in an interrupt context. vmalloc has the potential to
-				sleep the caller while waiting for memory to become available.
-
-*****************************************************************************************/
-void*
-os_memoryAlloc(
-        TI_HANDLE OsContext,
-        TI_UINT32 Size
-        )
-{
-	struct os_mem_block *blk;
-	__u32 total_size = Size + sizeof(struct os_mem_block) + sizeof(__u32);
-	gfp_t flags = (in_atomic()) ? GFP_ATOMIC : GFP_KERNEL;
-
-#ifdef TI_MEM_ALLOC_TRACE
-	os_printf("MTT:%s:%d ::os_memoryAlloc(0x%p, %lu) : %lu\n",__FUNCTION__, __LINE__,OsContext,Size,total_size);
-#endif
-	/* 
-	Memory optimization issue. Allocate up to 2 pages (8k) from the SLAB
-	    allocator (2^n), otherwise allocate from virtual pool.
-	If full Async mode is used, allow up to 6 pages (24k) for DMA-able
-	  memory, so the TxCtrlBlk table can be transacted over DMA.
-	*/
-#ifdef FULL_ASYNC_MODE
-	if (total_size < 6 * 4096)
-#else
-	if (total_size < 2 * 4096)
-#endif
-	{
-		blk = kmalloc(total_size, flags);
-		if (!blk)
-		{
-			printk("%s: NULL\n",__func__);	
-			return NULL;
-		}
-		blk->f_free = (os_free)kfree;
-	}
-	else
-	{
-		/* We expect that the big allocations should be made outside
-		     the interrupt, otherwise fail
-		*/
-		if (in_interrupt()) {
-			printk("%s: NULL\n",__func__);
-			return NULL;
-		}
-	        blk = vmalloc(total_size);
-	        if (!blk) {
-			printk("%s: NULL\n",__func__);
-			return NULL;
-		}
-		blk->f_free = (os_free)vfree;
-	}
-
-	os_profile (OsContext, 4, total_size);
-
-	/*list_add(&blk->blk_list, &drv->mem_blocks);*/
-	blk->size = Size;
-	blk->signature = MEM_BLOCK_START;
-	*(__u32 *)((unsigned char *)blk + total_size - sizeof(__u32)) = MEM_BLOCK_END;
-	return (void *)((char *)blk + sizeof(struct os_mem_block));
-}
-
-
-/****************************************************************************************
- *                        os_memoryCAlloc()                                 
- ****************************************************************************************
-DESCRIPTION:    Allocates an array in memory with elements initialized to 0.
-
-ARGUMENTS:		OsContext	-	our adapter context.
-				Number		-	Number of elements
-				Size		-	Length in bytes of each element
-
-RETURN:			None
-
-NOTES:         	
-*****************************************************************************************/
-void*
-os_memoryCAlloc(
-        TI_HANDLE OsContext,
-        TI_UINT32 Number,
-        TI_UINT32 Size
-        )
-{
-	void* pAllocatedMem;
-	TI_UINT32 MemSize;
-
-#ifdef TI_MEM_ALLOC_TRACE
-	os_printf("MTT:%s:%d ::os_memoryCAlloc(0x%p, %lu, %lu) : %lu\n",__FUNCTION__,__LINE__,OsContext,Number,Size,Number*Size);
-#endif
-	MemSize = Number * Size;
-
-	pAllocatedMem = os_memoryAlloc(OsContext, MemSize);
-
-	if (!pAllocatedMem)
-		return NULL;
-
-	memset(pAllocatedMem,0,MemSize);
-
-	return pAllocatedMem;
-}
-
-
-
-/****************************************************************************************
- *                        os_memoryFree()                                 
- ****************************************************************************************
-DESCRIPTION:    This function releases a block of memory previously allocated with the
-				os_memoryAlloc function.
-
-
-ARGUMENTS:		OsContext	-	our adapter context.
-				pMemPtr		-	Pointer to the base virtual address of the allocated memory.
-								This address was returned by the os_memoryAlloc function.
-				Size		-	Specifies the size, in bytes, of the memory block to be released.
-								This parameter must be identical to the Length that was passed to
-								os_memoryAlloc.
-
-RETURN:			None
-
-NOTES:         	
-*****************************************************************************************/
-void
-os_memoryFree(
-        TI_HANDLE OsContext,
-        void* pMemPtr,
-        TI_UINT32 Size
-        )
-{
-	struct os_mem_block *blk;
-
-	if (!pMemPtr) {
-		printk("%s: NULL\n",__func__); 
-		return;
-	}
-	blk = (struct os_mem_block *)((char *)pMemPtr - sizeof(struct os_mem_block));
-
-#ifdef TI_MEM_ALLOC_TRACE
-	os_printf("MTT:%s:%d ::os_memoryFree(0x%p, 0x%p, %lu) : %d\n",__FUNCTION__,__LINE__,OsContext,pMemPtr,Size,-Size);
-#endif
-	if (blk->signature != MEM_BLOCK_START)
-	{
-		printk("\n\n%s: memory block signature is incorrect - 0x%x\n\n\n",
-			__FUNCTION__, blk->signature);
-		return;
-	}
-	*(char *)(&blk->signature) = '~';
-	if (*(__u32 *)((unsigned char *)blk + blk->size + sizeof(struct os_mem_block))
-		!= MEM_BLOCK_END)
-	{
-		printk("\n\n%s: memory block corruption. Size=%u\n\n\n",
-			__FUNCTION__, blk->size);
-	}
-
-	os_profile (OsContext, 5, blk->size + sizeof(struct os_mem_block) + sizeof(__u32));
-	blk->f_free(blk);
-}
-
-
-/****************************************************************************************
- *                        os_memorySet()                                 
- ****************************************************************************************
-DESCRIPTION:    This function fills a block of memory with given value.
-
-ARGUMENTS:		OsContext	- our adapter context.
-				pMemPtr		- Specifies the base address of a block of memory
-				Value		- Specifies the value to set
-				Length		- Specifies the size, in bytes, to copy.
-
-RETURN:			None
-
-NOTES:       
-*****************************************************************************************/
-void
-os_memorySet(
-    TI_HANDLE OsContext,
-    void* pMemPtr,
-    TI_INT32 Value,
-    TI_UINT32 Length
-    )
-{
-	if (!pMemPtr) {
-		printk("%s: NULL\n",__func__);
-		return;
-	}
-	memset(pMemPtr,Value,Length);
-}
-
-/****************************************************************************************
- *                        _os_memoryAlloc4HwDma()                                 
- ****************************************************************************************
-DESCRIPTION:    Allocates resident (nonpaged) system-space memory for DMA operations.
-
-ARGUMENTS:		OsContext	- our adapter context.
-				Size		- Specifies the size, in bytes, to be allocated.
-
-RETURN:			Pointer to the allocated memory.
-				NULL if there is insufficient memory available.
-
-NOTES:         		
-
-*****************************************************************************************/
-void*
-os_memoryAlloc4HwDma(
-    TI_HANDLE pOsContext,
-    TI_UINT32 Size
-    )
-{
-	struct os_mem_block *blk;
-	__u32 total_size = Size + sizeof(struct os_mem_block) + sizeof(__u32);
-	gfp_t flags = (in_atomic()) ? GFP_ATOMIC : GFP_KERNEL;
-
-	/* 
-	if the size is greater than 2 pages then we cant allocate the memory
-	    through kmalloc so the function fails
-	*/
-	if (Size < 2 * OS_PAGE_SIZE)
-	{
-		blk = kmalloc(total_size, flags | GFP_DMA);
-		if (!blk) {
-			printk("%s: NULL\n",__func__);
-			return NULL;
-		}
-		blk->f_free = (os_free)kfree;
-	}
-	else
-	{
-		printk("\n\n%s: memory cant be allocated-Size = %d\n\n\n",
-			__FUNCTION__, Size);
-		return NULL;
-	}
-	blk->size = Size;
-	blk->signature = MEM_BLOCK_START;
-	*(__u32 *)((unsigned char *)blk + total_size - sizeof(__u32)) = MEM_BLOCK_END;
-
-	return (void *)((char *)blk + sizeof(struct os_mem_block));
-}
-
-/****************************************************************************************
- *                        _os_memory4HwDmaFree()                                 
- ****************************************************************************************
-DESCRIPTION:    This function releases a block of memory previously allocated with the
-				_os_memoryAlloc4HwDma function.
-
-
-ARGUMENTS:		OsContext	-	our adapter context.
-				pMemPtr		-	Pointer to the base virtual address of the allocated memory.
-								This address was returned by the os_memoryAlloc function.
-				Size		-	Specifies the size, in bytes, of the memory block to be released.
-								This parameter must be identical to the Length that was passed to
-								os_memoryAlloc.
-
-RETURN:			None
-
-NOTES:         	
-*****************************************************************************************/
-void
-os_memory4HwDmaFree(
-    TI_HANDLE pOsContext,
-    void* pMem_ptr,
-    TI_UINT32 Size
-    )
-{
-	struct os_mem_block *blk;
-
-	if (!pMem_ptr) {
-		printk("%s: NULL\n",__func__);
-		return;
-	}
-	blk = (struct os_mem_block *)((char *)pMem_ptr - sizeof(struct os_mem_block));
-
-	if (blk->signature != MEM_BLOCK_START)
-	{
-		printk("\n\n%s: memory block signature is incorrect - 0x%x\n\n\n",
-			__FUNCTION__, blk->signature);
-		return;
-	}
-	*(char *)(&blk->signature) = '~';
-	if (*(__u32 *)((unsigned char *)blk + blk->size + sizeof(struct os_mem_block))
-		!= MEM_BLOCK_END)
-	{
-		printk("\n\n%s: memory block corruption. Size=%u\n\n\n",
-			__FUNCTION__, blk->size);
-	}
-
-	blk->f_free(blk);
-}
-
-/****************************************************************************************
- *                        os_memoryZero()                                 
- ****************************************************************************************
-DESCRIPTION:    This function fills a block of memory with 0s.
-
-ARGUMENTS:		OsContext	- our adapter context.
-				pMemPtr		- Specifies the base address of a block of memory
-				Length		- Specifies how many bytes to fill with 0s.
-
-RETURN:			None
-
-NOTES:  
-*****************************************************************************************/
-void
-os_memoryZero(
-    TI_HANDLE OsContext,
-    void* pMemPtr,
-    TI_UINT32 Length
-    )
-{
-	if (!pMemPtr) {
-		printk("%s: NULL\n",__func__);
-		return;
-	}
-	memset(pMemPtr,0,Length);
-}
-
-
-/****************************************************************************************
- *                        os_memoryCopy()                                 
- ****************************************************************************************
-DESCRIPTION:    This function copies a specified number of bytes from one caller-supplied
-				location to another.
-
-ARGUMENTS:		OsContext	- our adapter context.
-				pDstPtr		- Destination buffer
-				pSrcPtr		- Source buffer
-				Size		- Specifies the size, in bytes, to copy.
-
-RETURN:			None
-
-NOTES:       
-*****************************************************************************************/
-void
-os_memoryCopy(
-    TI_HANDLE OsContext,
-    void* pDstPtr,
-    void* pSrcPtr,
-    TI_UINT32 Size
-    )
-{
-
-	memcpy(pDstPtr,pSrcPtr,Size);
-}
-
-/****************************************************************************************
- *                        os_memoryCompare()                                 
- ****************************************************************************************
-DESCRIPTION:    Compare characters in two buffers.
-
-ARGUMENTS:		OsContext	- our adapter context.
-				Buf1		- First buffer
-				Buf2		- Second buffer
-				Count		- Number of characters
-
-RETURN:			The return value indicates the relationship between the buffers:
-                < 0 Buf1 less than Buf2
-                0 Buf1 identical to Buf2
-                > 0 Buf1 greater than Buf2
-
-NOTES:         	
-*****************************************************************************************/
-TI_INT32
-os_memoryCompare(
-        TI_HANDLE OsContext,
-        TI_UINT8* Buf1,
-        TI_UINT8* Buf2,
-        TI_INT32 Count
-        )
-{
-	return memcmp(Buf1, Buf2, Count);
-}
-
-
-
-
-/****************************************************************************************
- *                        os_memoryCopyFromUser()                                 
- ****************************************************************************************
-DESCRIPTION:    This function copies a specified number of bytes from one caller-supplied
-				location to another. source buffer is in USER-MODE address space
-
-ARGUMENTS:		OsContext	- our adapter context.
-				pDstPtr		- Destination buffer
-				pSrcPtr		- Source buffer
-				Size		- Specifies the size, in bytes, to copy.
-
-RETURN:			None
-
-NOTES:       
-*****************************************************************************************/
-int
-os_memoryCopyFromUser(
-    TI_HANDLE OsContext,
-    void* pDstPtr,
-    void* pSrcPtr,
-    TI_UINT32 Size
-    )
-{
-	return copy_from_user(pDstPtr,pSrcPtr,Size);
-}
-
-/****************************************************************************************
- *                        os_memoryCopyToUser()                                 
- ****************************************************************************************
-DESCRIPTION:    This function copies a specified number of bytes from one caller-supplied
-				location to another. desination buffer is in USER-MODE address space
-
-ARGUMENTS:		OsContext	- our adapter context.
-				pDstPtr		- Destination buffer
-				pSrcPtr		- Source buffer
-				Size		- Specifies the size, in bytes, to copy.
-
-RETURN:			None
-
-NOTES:       
-*****************************************************************************************/
-int 
-os_memoryCopyToUser(
-    TI_HANDLE OsContext,
-    void* pDstPtr,
-    void* pSrcPtr,
-    TI_UINT32 Size
-    )
-{
-	return copy_to_user(pDstPtr,pSrcPtr,Size);
-}
diff --git a/wl1271/platforms/os/linux/src/stack_profile.c b/wl1271/platforms/os/linux/src/stack_profile.c
deleted file mode 100644
index 37e55cb..0000000
--- a/wl1271/platforms/os/linux/src/stack_profile.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * stack_profile.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * src/stack_profile.c
- *
- */
-
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-
-#define STACK_MASK		(THREAD_SIZE-1)
-#define MAX_STACK_FRAME		2
-
-typedef struct STACK_FRAME {
-	unsigned long stack_buf[THREAD_SIZE/sizeof(unsigned long)];
-	unsigned long *stack_start;
-	unsigned long stack_size;
-} stack_frame_t;
-
-static stack_frame_t sf_array[MAX_STACK_FRAME];
-
-static unsigned long check_stack(unsigned long *base)
-{
-	register unsigned long sp asm ("sp");
-	unsigned long retval = sp;
-
-	*base = ((sp & ~STACK_MASK) + sizeof(struct task_struct) + 4);
-	return retval;
-}
-
-unsigned long check_stack_start(unsigned long *base, unsigned long real_sp,
-				int id)
-{
-	unsigned long i;
-	unsigned long from, to;
-
-	to = check_stack(&from);
-	*base = from;
-
-	/* save used stack context */
-	if (id < MAX_STACK_FRAME) {
-		stack_frame_t *sfp = &sf_array[id];
-
-		if (!real_sp)
-			real_sp = to;
-		sfp->stack_size = THREAD_SIZE - (real_sp & STACK_MASK);
-		sfp->stack_start = (unsigned long *)real_sp;
-		memcpy(sfp->stack_buf, sfp->stack_start, sfp->stack_size);
-	}
-	/* run from the stack pointer down to the base */
-	for(i=from;(i < to);i+=4) {
-		/* fill up the pattern */
-		*(unsigned long *)i = 0xdeadbeef;
-	}
-	/*printk("check_stack_start: from=%x to=%x data=%x\n",from,to,*(long *)(from+4));*/
-	return to;
-}
-
-unsigned long check_stack_stop(unsigned long *base, int id)
-{
-	unsigned long i;
-	unsigned long from, to;
-
-	to = check_stack(&from);
-	*base = from;
-
-	/* check used stack context */
-	if (id < MAX_STACK_FRAME) {
-		stack_frame_t *sfp = &sf_array[id];
-
-		if (memcmp(sfp->stack_buf, sfp->stack_start, sfp->stack_size)) {
-			printk("%s: %p - Error\n", __func__, sfp->stack_start);
-			for(i=0;(i < sfp->stack_size/sizeof(unsigned long));i++) {
-				if (sfp->stack_start[i] != sfp->stack_buf[i])
-					printk("%p: 0x%08lx != 0x%08lx\n", &sfp->stack_start[i], sfp->stack_start[i], sfp->stack_buf[i]);
-			}				
-		}
-	}
-
-	/* run from the stack pointer down to the base */
-	for(i=from;(i < to);i+=4) {
-		/* check up the pattern */
-		if ((*(unsigned long *)i) != 0xdeadbeef)
-			break;
-	}
-
-	/*printk("check_stack_stop: from=%x to=%x data=%x data=%x i=0x%x\n",from,to,*(long *)from,*(long *)(from+4),i);*/
-	/* return the first time when the pattern doesn't match */
-	return i;
-}
-
-void print_stack(int id)
-{
-	stack_frame_t *sfp = &sf_array[id];
-	unsigned long i;
-
-	printk("%s: %d\n", __func__, id);
-	for(i=0;(i < sfp->stack_size/sizeof(unsigned long));i++) {
-		printk("%p: 0x%08lx\n", &sfp->stack_start[i], sfp->stack_start[i]);
-	}				
-}
-
-struct task_struct *get_task_struct_ptr_by_name(char *name)
-{
-	struct task_struct *g, *p;
-
-	read_lock(&tasklist_lock);
-	do_each_thread(g, p) {
-		/*
-		 * reset the NMI-timeout, listing all files on a slow
-		 * console might take alot of time:
-		 */
-		/* touch_nmi_watchdog(); */
-		if (!strcmp(name, p->comm)) {
-			read_unlock(&tasklist_lock);
-			return p;
-		}
-	} while_each_thread(g, p);
-	read_unlock(&tasklist_lock);
-	return NULL;
-}
-
-unsigned long save_stack_context(char *name, int id)
-{
-/*	register unsigned long sp asm ("sp");
-	unsigned long sp_local = sp;
-*/
-	struct task_struct *p;
-	stack_frame_t *sfp;
-
-	if (id >= MAX_STACK_FRAME)
-		return 0L;
-	sfp = &sf_array[id];		
-	p = get_task_struct_ptr_by_name(name);
-	if (p) {
-		printk("%s: %s found\n", __func__, p->comm); /* sched_show_task(t);*/
-		sfp->stack_start = (unsigned long *)((unsigned long)end_of_stack(p) & ~STACK_MASK);
-		sfp->stack_size = THREAD_SIZE;
-		memcpy(sfp->stack_buf, sfp->stack_start, sfp->stack_size);
-	}
-	return sfp->stack_size;
-}
diff --git a/wl1271/platforms/os/linux/src/string.c b/wl1271/platforms/os/linux/src/string.c
deleted file mode 100644
index 4fee004..0000000
--- a/wl1271/platforms/os/linux/src/string.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * string.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*
- * src/string.c
- *
- */
-
-/**
- * memcmp - Compare two areas of memory
- * @cs: One area of memory
- * @ct: Another area of memory
- * @count: The size of the area.
- */
-int memcmp(const void * cs,const void * ct, unsigned int count)
-{
-	const unsigned char *su1, *su2;
-	int res = 0;
-
-	for( su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--)
-		if ((res = *su1 - *su2) != 0)
-			break;
-	return res;
-}
-
-/**
- * strcmp - Compare two strings
- * @cs: One string
- * @ct: Another string
- */
-int strcmp(const char * cs,const char * ct)
-{
-	register signed char __res;
-
-	while (1) {
-		if ((__res = *cs - *ct++) != 0 || !*cs++)
-			break;
-	}
-
-	return __res;
-}
diff --git a/wl1271/platforms/os/linux/wl_env.bash b/wl1271/platforms/os/linux/wl_env.bash
deleted file mode 100644
index 234e0b3..0000000
--- a/wl1271/platforms/os/linux/wl_env.bash
+++ /dev/null
@@ -1,6 +0,0 @@
-# export PATH=<PATH TO CROSS COMPILER>:$PATH
-export CROSS_COMPILE=arm-eabi-
-export ARCH=arm
-export HOST_PLATFORM=sholes
-export KERNEL_DIR=/usr/local/google/android/master/kernel
-
diff --git a/wl1271/stad/Export_Inc/Ethernet.h b/wl1271/stad/Export_Inc/Ethernet.h
deleted file mode 100644
index e5c1955..0000000
--- a/wl1271/stad/Export_Inc/Ethernet.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Ethernet.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   Ethernet.h                                                     */
-/*    PURPOSE:                                                             */
-/*                                                                         */
-/***************************************************************************/
-#ifndef _ETHERNET_H_
-#define _ETHERNET_H_
-
-
-typedef struct
-{
-    TMacAddr        dst;
-    TMacAddr        src;
-    TI_UINT16       type;
-
-} TEthernetHeader;
- 
-
-typedef struct
-{
-    TMacAddr        dst;
-    TMacAddr        src;
-    TI_UINT16       length;
-    TI_UINT8        dsap;
-    TI_UINT8        ssap;
-    TI_UINT8        control;
-    TI_UINT8        oui[3];
-    TI_UINT16       type;
-
-} TLlcSnapHeader;
-
-
-#define ETHERTYPE_802_1D                        0x8100
-#define ETHERTYPE_EAPOL                         0x888e
-#define ETHERTYPE_PREAUTH_EAPOL                 0x88c7
-#define ETHERTYPE_IP                            0x0800
-#define ETHERTYPE_APPLE_AARP                    0x80f3
-#define ETHERTYPE_DIX_II_IPX                    0x8137
-
-#define ETHERNET_HDR_LEN                        14
-#define IEEE802_3_HDR_LEN                       14 
-#define LLC_SNAP_HDR_LEN                        20
-
-#define SNAP_CHANNEL_ID                         0xAA
-#define LLC_CONTROL_UNNUMBERED_INFORMATION      0x03
-#define ETHERNET_MAX_PAYLOAD_SIZE               1500
-
-#define SNAP_OUI_802_1H_BYTE0                   0x00
-#define SNAP_OUI_802_1H_BYTE1                   0x00
-#define SNAP_OUI_802_1H_BYTE2                   0xf8
-#define SNAP_OUI_802_1H_BYTES  { SNAP_OUI_802_1H_BYTE0, SNAP_OUI_802_1H_BYTE1, SNAP_OUI_802_1H_BYTE2 }
-
-#define SNAP_OUI_RFC1042_BYTE0                  0x00
-#define SNAP_OUI_RFC1042_BYTE1                  0x00
-#define SNAP_OUI_RFC1042_BYTE2                  0x00
-#define SNAP_OUI_RFC1042_LEN                    3
-#define SNAP_OUI_RFC1042_BYTES { SNAP_OUI_RFC1042_BYTE0, SNAP_OUI_RFC1042_BYTE1, SNAP_OUI_RFC1042_BYTE2 }
-
-
-#endif
diff --git a/wl1271/stad/Export_Inc/InternalCmdCodes.h b/wl1271/stad/Export_Inc/InternalCmdCodes.h
deleted file mode 100644
index c4725fd..0000000
--- a/wl1271/stad/Export_Inc/InternalCmdCodes.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * InternalCmdCodes.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __PARAM_MGR_H__
-#define __PARAM_MGR_H__
-
-#include "CmdInterfaceCodes.h"
-#include "TWDriver.h"
-
-/* Following are the parameters numbers. Each module can have 256 parameters */
-typedef enum
-{    
-     /* TWD Control section */
-    TWD_COUNTERS_PARAM                     =           GET_BIT | TWD_MODULE_PARAM | TWD_COUNTERS_PARAM_ID,
-    TWD_LISTEN_INTERVAL_PARAM              = SET_BIT | GET_BIT | TWD_MODULE_PARAM | TWD_LISTEN_INTERVAL_PARAM_ID,
-    TWD_BEACON_INTERVAL_PARAM              =           GET_BIT | TWD_MODULE_PARAM | TWD_BEACON_INTERVAL_PARAM_ID,
-    TWD_TX_POWER_PARAM                     = SET_BIT | GET_BIT | TWD_MODULE_PARAM | TWD_TX_POWER_PARAM_ID,
-    TWD_CLK_RUN_ENABLE_PARAM               = SET_BIT |           TWD_MODULE_PARAM | TWD_CLK_RUN_ENABLE_PARAM_ID,
-    TWD_QUEUES_PARAM                       = SET_BIT |           TWD_MODULE_PARAM | TWD_QUEUES_PARAM_ID, 
-    TWD_TX_RATE_CLASS_PARAM                = SET_BIT | GET_BIT | TWD_MODULE_PARAM | TWD_TX_RATE_CLASS_PARAM_ID,
-    TWD_MAX_TX_MSDU_LIFE_TIME_PARAM        = SET_BIT | GET_BIT | TWD_MODULE_PARAM | TWD_MAX_TX_MSDU_LIFE_TIME_PARAM_ID,
-    TWD_MAX_RX_MSDU_LIFE_TIME_PARAM        = SET_BIT | GET_BIT | TWD_MODULE_PARAM | TWD_MAX_RX_MSDU_LIFE_TIME_PARAM_ID,
-    TWD_RX_TIME_OUT_PARAM                  = SET_BIT |           TWD_MODULE_PARAM | TWD_RX_TIME_OUT_PARAM_ID,
-    TWD_BCN_BRC_OPTIONS_PARAM              =           GET_BIT | TWD_MODULE_PARAM | TWD_BCN_BRC_OPTIONS_PARAM_ID,
-
-    /* Site manager section */
-    SITE_MGR_DESIRED_BSSID_PARAM                    = SET_BIT           | SITE_MGR_MODULE_PARAM | 0x02, 
-    SITE_MGR_DESIRED_SSID_PARAM                     = SET_BIT           | SITE_MGR_MODULE_PARAM | 0x03,
-    SITE_MGR_DESIRED_BSS_TYPE_PARAM                 = SET_BIT           | SITE_MGR_MODULE_PARAM | 0x04,
-    SITE_MGR_DESIRED_MODULATION_TYPE_PARAM          = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x08,
-    SITE_MGR_DESIRED_BEACON_INTERVAL_PARAM          = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x09,
-    SITE_MGR_CURRENT_RADIO_TYPE_PARAM               =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x0D,
-
-    SITE_MGR_CURRENT_SSID_PARAM                     =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x0F,
-    SITE_MGR_CURRENT_RATE_PAIR_PARAM                =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x10,
-    SITE_MGR_CURRENT_MODULATION_TYPE_PARAM          =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x11,
-    SITE_MGR_CURRENT_SIGNAL_PARAM                   = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x12,
-    SITE_MGR_PRIMARY_SITE_PARAM                     =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x15,
-    SITE_MGR_DESIRED_DOT11_MODE_PARAM               = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x18,
-    SITE_MGR_OPERATIONAL_MODE_PARAM                 =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x19,
-    SITE_MGR_CURRENT_SLOT_TIME_PARAM                =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x1C,
-    SITE_MGR_CURRENT_PREAMBLE_TYPE_PARAM            =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x1D,
-    SITE_MGR_BUILT_IN_TEST_STATUS_PARAM             =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x1E,
-    SITE_MGR_CONFIGURATION_PARAM                        = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x1F,
-    SITE_MGR_AP_TX_POWER_PARAM                      =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x23,
-    SITE_MGR_DESIRED_TX_RATE_PRCT_SET               = SET_BIT           | SITE_MGR_MODULE_PARAM | 0x26,
-    SITE_MGR_DESIRED_RSSI_THRESHOLD_SET             = SET_BIT           | SITE_MGR_MODULE_PARAM | 0x27,
-
-    SITE_MGR_SITE_ENTRY_BY_INDEX                        =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x28,
-    SITE_MGR_CUR_NUM_OF_SITES                       =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x29,
-    SITE_MGR_CURRENT_TSF_TIME_STAMP                 =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x2A,    
-    SITE_MGR_GET_SELECTED_BSSID_INFO                =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x2B,
-    SITE_MGR_DESIRED_CONS_TX_ERRORS_THREH           = SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x2C,
-    SITE_MGR_SUPPORTED_NETWORK_TYPES                =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x2D,
-    SITE_MGR_CURRENT_BSSID_PARAM                        =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x2F,
-    SITE_MGR_LAST_RX_RATE_PARAM                     =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x30,
-    SITE_MGR_LAST_BEACON_BUF_PARAM                  =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x31,
-    SITE_MGR_CURRENT_BSS_TYPE_PARAM                 =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x33,
-    SITE_MGR_GET_SELECTED_BSSID_INFO_EX             =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x37,    
-    SITE_MGR_RADIO_BAND_PARAM                       =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x39,
-	SITE_MGR_GET_STATS		                        =           GET_BIT | SITE_MGR_MODULE_PARAM | 0x43,
-
-    /* MLME section */
-    MLME_BEACON_RECV                                =           GET_BIT | MLME_SM_MODULE_PARAM  | 0x01,
-
-    /* SME SM section */
-    SME_DESIRED_BSSID_PARAM                         = SET_BIT | GET_BIT | SME_MODULE_PARAM   | 0x02,
-
-    SME_DESIRED_BSS_TYPE_PARAM                      = SET_BIT | GET_BIT | SME_MODULE_PARAM   | 0x05,
-    SME_CONNECTION_STATUS_PARAM                     =           GET_BIT | SME_MODULE_PARAM   | 0x06,
-
-    /* Scan concentrator section */
-
-    /* Scan Manager module */
-    
-    /* Connection section */
-    CONN_SELF_TIMEOUT_PARAM                         = SET_BIT | GET_BIT | CONN_MODULE_PARAM | 0x01,
-
-    /* Auth section */
-    AUTH_RESPONSE_TIMEOUT_PARAM                     = SET_BIT | GET_BIT | AUTH_MODULE_PARAM | 0x01,
-    AUTH_COUNTERS_PARAM                             =           GET_BIT | AUTH_MODULE_PARAM | 0x02,
-
-    /* Assoc section */
-    ASSOC_RESPONSE_TIMEOUT_PARAM                        = SET_BIT | GET_BIT | ASSOC_MODULE_PARAM | 0x01,
-    ASSOC_COUNTERS_PARAM                                =           GET_BIT | ASSOC_MODULE_PARAM | 0x02,
-    ASSOC_ASSOCIATION_INFORMATION_PARAM                 =           GET_BIT | ASSOC_MODULE_PARAM | 0x03,
-    ASSOC_ASSOCIATION_REQ_PARAM                        	=           GET_BIT | ASSOC_MODULE_PARAM | 0x04,
-    ASSOC_ASSOCIATION_RESP_PARAM                        =           GET_BIT | ASSOC_MODULE_PARAM | 0x05,
-
-    /* RSN section */
-    RSN_PRIVACY_OPTION_IMPLEMENTED_PARAM            =           GET_BIT | RSN_MODULE_PARAM | 0x01,
-    RSN_KEY_PARAM                                       = SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x02,
-    RSN_SECURITY_STATE_PARAM                            =           GET_BIT | RSN_MODULE_PARAM | 0x03,
-    RSN_AUTH_ENCR_CAPABILITY                            =           GET_BIT | RSN_MODULE_PARAM | 0x11,
-    RSN_PMKID_LIST                                      = SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x12,
-    RSN_WPA_PROMOTE_AVAILABLE_OPTIONS               =           GET_BIT | RSN_MODULE_PARAM | 0x13,
-    RSN_WPA_PROMOTE_OPTIONS                         = SET_BIT           | RSN_MODULE_PARAM | 0x14,
-    RSN_PRE_AUTH_STATUS                             =           GET_BIT | RSN_MODULE_PARAM | 0x15,
-    RSN_EAP_TYPE                                        = SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x16,
-    WPA_801_1X_AKM_EXISTS                               =           GET_BIT | RSN_MODULE_PARAM | 0x17,
-
-    /* RX data section */
-    RX_DATA_COUNTERS_PARAM                          =           GET_BIT | RX_DATA_MODULE_PARAM | 0x01,
-    RX_DATA_EXCLUDE_UNENCRYPTED_PARAM               = SET_BIT | GET_BIT | RX_DATA_MODULE_PARAM | 0x02,
-    RX_DATA_EXCLUDE_BROADCAST_UNENCRYPTED_PARAM     = SET_BIT | GET_BIT | RX_DATA_MODULE_PARAM | 0x03,
-    RX_DATA_RATE_PARAM                              =           GET_BIT | RX_DATA_MODULE_PARAM | 0x08,
-    RX_DATA_GENERIC_ETHERTYPE_PARAM                 = SET_BIT           | RX_DATA_MODULE_PARAM | 0x09,
-     
-    /* TX data section */
-    TX_CTRL_GET_MEDIUM_USAGE_THRESHOLD              = SET_BIT | GET_BIT | TX_CTRL_MODULE_PARAM | 0x04,
-    TX_CTRL_POLL_AP_PACKETS_FROM_AC                     = SET_BIT           | TX_CTRL_MODULE_PARAM | 0x05,
-    TX_CTRL_REPORT_TS_STATISTICS                        =           GET_BIT | TX_CTRL_MODULE_PARAM | 0x06,
-    TX_CTRL_GET_DATA_FRAME_COUNTER                  =           GET_BIT | TX_CTRL_MODULE_PARAM | 0x07,
-    
-    /* CTRL data section */
-    CTRL_DATA_RATE_CONTROL_ENABLE_PARAM             = SET_BIT           | CTRL_DATA_MODULE_PARAM | 0x02,
-    CTRL_DATA_CURRENT_BSSID_PARAM                   =           GET_BIT | CTRL_DATA_MODULE_PARAM | 0x03,
-    CTRL_DATA_CURRENT_SUPPORTED_RATE_MASK_PARAM     =           GET_BIT | CTRL_DATA_MODULE_PARAM | 0x05,
-    CTRL_DATA_CURRENT_PREAMBLE_TYPE_PARAM           =           GET_BIT | CTRL_DATA_MODULE_PARAM | 0x06,
-    CTRL_DATA_CURRENT_PROTECTION_STATUS_PARAM       = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x07,
-    CTRL_DATA_CURRENT_IBSS_PROTECTION_PARAM         = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x09,
-    CTRL_DATA_CURRENT_RTS_CTS_STATUS_PARAM          = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x0A,
-    CTRL_DATA_GET_USER_PRIORITY_OF_STREAM           = SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x10,
-    CTRL_DATA_TSRS_PARAM                            = SET_BIT           | CTRL_DATA_MODULE_PARAM | 0x11,
-
-    /* regulatory domain section */
-    REGULATORY_DOMAIN_UPDATE_CHANNEL_VALIDITY           = SET_BIT |           REGULATORY_DOMAIN_MODULE_PARAM | 0x09,
-    REGULATORY_DOMAIN_CURRENT_TX_ATTENUATION_PARAM      =           GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x0A,
-    REGULATORY_DOMAIN_TEMPORARY_TX_ATTENUATION_PARAM    = SET_BIT |           REGULATORY_DOMAIN_MODULE_PARAM | 0x0B,
-    REGULATORY_DOMAIN_ALL_SUPPORTED_CHANNELS            =           GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x11,
-    REGULATORY_DOMAIN_IS_DFS_CHANNEL                    =           GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x13,
-    REGULATORY_DOMAIN_DISCONNECT_PARAM                  = SET_BIT |           REGULATORY_DOMAIN_MODULE_PARAM | 0x14,
-    REGULATORY_DOMAIN_TX_POWER_AFTER_SELECTION_PARAM    = SET_BIT |           REGULATORY_DOMAIN_MODULE_PARAM | 0x15,
-    REGULATORY_DOMAIN_COUNTRY_PARAM                     = SET_BIT | GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x16,
-    REGULATORY_DOMAIN_POWER_CAPABILITY_PARAM            =           GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x17,
-    REGULATORY_DOMAIN_SET_POWER_CONSTRAINT_PARAM        = SET_BIT |           REGULATORY_DOMAIN_MODULE_PARAM | 0x18,
-    REGULATORY_DOMAIN_IS_CHANNEL_SUPPORTED              =           GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x19,
-    REGULATORY_DOMAIN_EXTERN_TX_POWER_PREFERRED         = SET_BIT |           REGULATORY_DOMAIN_MODULE_PARAM | 0x1A,
-    REGULATORY_DOMAIN_SET_CHANNEL_VALIDITY              = SET_BIT |           REGULATORY_DOMAIN_MODULE_PARAM | 0x1B,
-    REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES             =           GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x1C,
-    REGULATORY_DOMAIN_IS_COUNTRY_FOUND                  =           GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x1D,
-    REGULATORY_DOMAIN_TIME_TO_COUNTRY_EXPIRY            =           GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x1E,
-    /* measurement section */
-     
-#ifdef XCC_MODULE_INCLUDED
-    /* XCC */    
-    XCC_ROGUE_AP_DETECTED                               = SET_BIT           | XCC_MANAGER_MODULE_PARAM | 0x02,
-    XCC_REPORT_ROGUE_APS                                = SET_BIT           | XCC_MANAGER_MODULE_PARAM | 0x03,
-    XCC_AUTH_SUCCESS                                    = SET_BIT           | XCC_MANAGER_MODULE_PARAM | 0x04,
-    XCC_CCKM_REQUEST                                    = SET_BIT           | XCC_MANAGER_MODULE_PARAM | 0x05,
-    XCC_CCKM_RESULT                                 = SET_BIT           | XCC_MANAGER_MODULE_PARAM | 0x06,
-    XCC_ENABLED                                     = SET_BIT | GET_BIT | XCC_MANAGER_MODULE_PARAM | 0x07,
-    XCC_CURRENT_AP_SUPPORTED_VERSION                =           GET_BIT | XCC_MANAGER_MODULE_PARAM | 0x08,
-#endif
-
-    /* Roaming manager */
-    
-    /* Parameters used for DEBUG */
-    ROAMING_MNGR_TRIGGER_EVENT                      = SET_BIT           | ROAMING_MANAGER_MODULE_PARAM | 0x03,
-    ROAMING_MNGR_CONN_STATUS                        = SET_BIT           | ROAMING_MANAGER_MODULE_PARAM | 0x04, 
-#ifdef TI_DBG
-    ROAMING_MNGR_PRINT_STATISTICS                   =           GET_BIT | ROAMING_MANAGER_MODULE_PARAM | 0x05,
-    ROAMING_MNGR_RESET_STATISTICS                   =           GET_BIT | ROAMING_MANAGER_MODULE_PARAM | 0x06,
-    ROAMING_MNGR_PRINT_CURRENT_STATUS               =           GET_BIT | ROAMING_MANAGER_MODULE_PARAM | 0x07,
-    ROAMING_MNGR_PRINT_CANDIDATE_TABLE              =           GET_BIT | ROAMING_MANAGER_MODULE_PARAM | 0x08,
-#endif
-
-    /* Soft Gemini params */
-     
-    /* QOS manager params */
-    QOS_MNGR_SHORT_RETRY_LIMIT_PARAM            	= SET_BIT | GET_BIT | QOS_MANAGER_PARAM | 0x01,
-    QOS_MNGR_LONG_RETRY_LIMIT_PARAM                 = SET_BIT | GET_BIT | QOS_MANAGER_PARAM | 0x02,
-    QOS_PACKET_BURST_ENABLE                         = SET_BIT | GET_BIT | QOS_MANAGER_PARAM | 0x03,
-    QOS_MNGR_SET_SITE_PROTOCOL            			= SET_BIT |           QOS_MANAGER_PARAM | 0x04,
-    QOS_MNGR_SET_802_11_POWER_SAVE_STATUS           = SET_BIT |           QOS_MANAGER_PARAM | 0x05,
-    QOS_MNGR_SET_OPERATIONAL_MODE                   = SET_BIT |           QOS_MANAGER_PARAM | 0x08,
-    QOS_MNGR_CURRENT_PS_MODE                        = SET_BIT | GET_BIT | QOS_MANAGER_PARAM | 0x09,
-    QOS_MNGR_ACTIVE_PROTOCOL                        =           GET_BIT | QOS_MANAGER_PARAM | 0x0A,
-    QOS_MNGR_VOICE_RE_NEGOTIATE_TSPEC               = SET_BIT | GET_BIT | QOS_MANAGER_PARAM | 0x0C,
-    QOS_MNGR_RESEND_TSPEC_REQUEST                   = SET_BIT           | QOS_MANAGER_PARAM | 0x0D,
-
-    /* Power Manager params */
-    POWER_MGR_DISABLE_PRIORITY                      = SET_BIT |           POWER_MANAGER_PARAM | 0x02,   
-    POWER_MGR_ENABLE_PRIORITY                       = SET_BIT |           POWER_MANAGER_PARAM | 0x03
-    
-}   EInternalParam;
-
-
-#endif /* __PARAM_MGR_H__ */
diff --git a/wl1271/stad/Export_Inc/STADExternalIf.h b/wl1271/stad/Export_Inc/STADExternalIf.h
deleted file mode 100644
index 4058767..0000000
--- a/wl1271/stad/Export_Inc/STADExternalIf.h
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- * STADExternalIf.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************/
-/*                                                                          */
-/*    MODULE:   TiWlnIf.h                                       */
-/*    PURPOSE:                                                              */
-/*                                                                          */
-/****************************************************************************/	
-#ifndef __TIWLNIF_NEW_H__
-#define __TIWLNIF_NEW_H__
-
-/** \file  STADExternalIf.h 
- *  \brief STAD External APIs
- */
-
-#include "tidef.h"
-#include "report.h"
-#include "osDot11.h"
-#include "TI_IPC_Api.h"
-#include "bssTypes.h"
-#include "roamingMngrTypes.h"
-#include "version.h"
-#include "privateCmd.h"
-#include "CmdInterfaceCodes.h"
-#include "coreDefaultParams.h"
-#include "scanMngrTypes.h"
-#include "TWDriver.h"
-
-/***********/
-/* defines */
-/***********/
-
-#define NUM_OF_CONFIG_PARAMS_IN_SG  	    2
-#define NUM_OF_STATUS_PARAMS_IN_SG  		11
-#define NUM_OF_COEX_ACTIVITY_PARAMS_IN_SG 	6
-#define NUM_OF_RATE_MNGT_PARAMS_MAX			14
-#define SET_SSID_WITHOUT_SUPPL      		0x8000
-
-#define TX_RETRY_HISTOGRAM_SIZE 			16
-
-#define RX_DATA_FILTER_MAX_MASK_SIZE        8
-#define RX_DATA_FILTER_MAX_PATTERN_SIZE     64
-
-#define KEEP_ALIVE_TEMPLATE_MAX_LENGTH      64
-
-#define KEEP_ALIVE_MAX_USER_MESSAGES     	2
-
-
-/*********************/
-/* enumeration types */
-/*********************/
-
-/** \enum TxDelayRanges_e
- * \brief TX Delay Ranges
- * 
- * \par Description
- * The Tx path delay histogram (host + MAC)ranges in msec 
- * Used as indexes in tx Delay Histogram Ranges (including Start & End of ranges) Table 
- * 
- * \sa
- */
-typedef enum
-{
-    TX_DELAY_RANGE_MIN        = 0,		/**< */
-
-    TX_DELAY_RANGE_0_TO_1     = 0,		/**< */
-    TX_DELAY_RANGE_1_TO_10    = 1,		/**< */
-    TX_DELAY_RANGE_10_TO_20   = 2,		/**< */
-    TX_DELAY_RANGE_20_TO_40   = 3,		/**< */
-    TX_DELAY_RANGE_40_TO_60   = 4,		/**< */
-    TX_DELAY_RANGE_60_TO_80   = 5,		/**< */
-    TX_DELAY_RANGE_80_TO_100  = 6,		/**< */
-    TX_DELAY_RANGE_100_TO_200 = 7,		/**< */
-    TX_DELAY_RANGE_ABOVE_200  = 8,		/**< */
-
-    TX_DELAY_RANGE_MAX        = 8,		/**< */
-    TX_DELAY_RANGES_NUM       = 9		/**< */
-} TxDelayRanges_e;
-
-/** \enum TIWLN_SIMPLE_CONFIG_MODE
- * \brief TI WLAN Simple Configuration Mode
- * 
- * \par Description
- * Used for indicating WiFi Simple Configuration mode 
- * 
- * \sa
- */
-typedef enum
-{
-    TIWLN_SIMPLE_CONFIG_OFF = 0,		/**< Simple Configuration OFF			*/
-    TIWLN_SIMPLE_CONFIG_PIN_METHOD,		/**< Simple Configuration PIN Method	*/
-    TIWLN_SIMPLE_CONFIG_PBC_METHOD		/**< Simple Configuration PBC Method	*/
-} TIWLN_SIMPLE_CONFIG_MODE;
-
-/** \enum EDraftNumber
- * \brief Draft Number
- * 
- * \par Description
- * Site Manager / Exteranl Rate use draft number
- * 
- * \sa
- */
-typedef enum
-{
-    DRAFT_5_AND_EARLIER = 5,	/**< */ 
-    DRAFT_6_AND_LATER   = 6		/**< */ 
-
-} EDraftNumber;
-
-/********************/
-/* Structures types */
-/********************/
-
-
-/** \struct TTxDataCounters
- * \brief TX Data Counters
- * 
- * \par Description
- * Tx statistics per Tx-queue 
- * 
- * \sa
- */
-typedef struct
-{
-    TI_UINT32      XmitOk;                 /**< The number of frames that were transferred to TNET without errors 						*/
-    TI_UINT32      DirectedBytesXmit;      /**< The number of bytes in directed packets that are transmitted without errors 			*/
-    TI_UINT32      DirectedFramesXmit;     /**< The number of directed packets that are transmitted without errors 						*/
-    TI_UINT32      MulticastBytesXmit;     /**< The number of bytes in multicast/functional packets that are transmitted without errors */
-    TI_UINT32      MulticastFramesXmit;    /**< The number of multicast/functional packets that are transmitted without errors			*/
-    TI_UINT32      BroadcastBytesXmit;     /**< The number of bytes in broadcast packets that are transmitted without errors 			*/
-    TI_UINT32      BroadcastFramesXmit;    /**< The number of broadcast packets that are transmitted without errors 					*/
-
-    TI_UINT32      RetryHistogram[ TX_RETRY_HISTOGRAM_SIZE ];	/**< Histogram counting the number of packets xfered with any retry number	*/
-                                        
-    TI_UINT32      RetryFailCounter;       /**< Number of packets that failed transmission due to retry number exceeded 				*/
-    TI_UINT32      TxTimeoutCounter;       /**< Number of packets that failed transmission due to lifetime expiry 						*/
-    TI_UINT32      NoLinkCounter;          /**< Number of packets that failed transmission due to link failure 							*/
-    TI_UINT32      OtherFailCounter;       /**< Number of packets that failed transmission due to other reasons 						*/
-    TI_UINT32      MaxConsecutiveRetryFail;/**< Maximum consecutive packets that failed transmission due to retry limit exceeded 		*/
-
-    /*  TX path delay statistics  */
-    TI_UINT32      txDelayHistogram[TX_DELAY_RANGES_NUM];	/**< Histogram of Tx path delay (host + MAC) 								*/
-    TI_UINT32      NumPackets;             /**< For average calculation - Total packets counted 										*/
-    TI_UINT32      SumTotalDelayMs;        /**< For average calculation - the sum of packets total delay 								*/
-    TI_UINT32      SumFWDelayUs;           /**< For average calculation - The sum of packets FW delay 									*/
-    TI_UINT32      SumMacDelayUs;          /**< For average calculation - the sum of packets MAC delay 									*/
-} TTxDataCounters;
-
-/** \struct TIWLN_TX_STATISTICS
- * \brief TI WLAN TX Statistics
- * 
- * \par Description
- * All Tx statistics of all Tx Queues Tx-queue 
- * 
- * \sa
- */
-typedef struct
-{
-    TTxDataCounters  txCounters[MAX_NUM_OF_AC];	/**< Table which holds Tx statistics of each Tx-queue */
-} TIWLN_TX_STATISTICS;
-
-/** \struct TDfsChannelRange
- * \brief DFS Channel Range
- * 
- * \par Description
- * Range of Dynamic Frequency Selection Channel 
- * 
- * \sa
- */
-typedef struct
-{
-    TI_UINT16   minDFS_channelNum;	/**< Lower limit of DFS Channel Range		*/  	
-    TI_UINT16   maxDFS_channelNum;	/**< Higher limit of DFS Channel Range		*/  	
-} TDfsChannelRange;
-
-/** \struct TDebugRegisterReq
- * \brief Debug Register Request
- * 
- * \par Description
- * Used for reading HW register (for debug) 
- * 
- * \sa
- */
-typedef struct
-{
-    TI_UINT32 regSize;			/**< Register Size			*/ 	  	  
-    TI_UINT32 regAddr;			/**< Register Address  		*/ 
-    TI_UINT32 regValue;			/**< Register value read	*/ 
-} TDebugRegisterReq;
-
-/** \struct TIWLN_REG_RW
- * \brief TI WLAN Register R/W
- * 
- * \par Description
- * Used for writing HW register (for debug) 
- * 
- * \sa
- */
-typedef struct
-{
-        TI_UINT32 regSize;		/**< Register Size			*/
-        TI_UINT32 regAddr;		/**< Register Address  		*/ 
-        TI_UINT32 regValue;		/**< Register write value	*/ 
-} TIWLN_REG_RW;
-
-/** \struct TCountry
- * \brief Country Parameters
- * 
- * \par Description
- * Parameters of Country Informatino Element
- * 
- * \sa
- */
-typedef struct
-{
-    TI_UINT8            elementId;		/**< Country IE ID 										*/
-    TI_UINT8            len;			/**< Country IE data length 							*/
-    dot11_countryIE_t   countryIE;	   	/**< Country IE (country string and tripple channel)	*/ 
-} TCountry;
-
-/** \struct TRates
- * \brief Rates Parameters
- * 
- * \par Description
- * Site Manager Supported rates parameters
- * 
- * \sa
- */
-typedef struct
-{
-    TI_UINT8       len;											/**< Number of entries in the rates list													*/
-    TI_UINT8       ratesString[DOT11_MAX_SUPPORTED_RATES];		/**< Rates List. From each entry - a different bitrate (in bps) can be driven as followed: 
-																((ratesString[i] & 0x7F) * 500000). Bits 1-7 are used for the bitrate and bit 8 is MASK used 
-																for indicating if NET Basic
-																*/
-} TRates;
-
-/** \struct TRxDataFilterRequest
- * \brief RX Data Filter Request
- * 
- * \par Description
- * Use for handling RX Data Filter (Add, Remove, parse, usage)
- * 
- * \sa
- */
-typedef struct
-{
-    TI_UINT8       offset; 									/**< Pattern Start Offset (0-255) 										*/
-    TI_UINT8       maskLength; 								/**< Byte-Mask Length, 1-8 bytes of mask, 0- match all packets 			*/
-    TI_UINT8       patternLength; 							/**< Should correspond to the number of asserted bits in the Byte-Mask 	*/
-    TI_UINT8       mask[RX_DATA_FILTER_MAX_MASK_SIZE]; 		/**< Byte-Mask 															*/
-    TI_UINT8       pattern[RX_DATA_FILTER_MAX_PATTERN_SIZE];/**< Data Filter PAttern												*/
-} TRxDataFilterRequest;
-
-/** \struct TIWLN_COUNTERS
- * \brief TI WLAN Counters
- * 
- * \par Description
- * Use for handling RX Data Filter (Add, Remove, parse, usage)
- * 
- * \sa
- */
-typedef struct 
-{
-    TI_UINT32  RecvOk;              /**< Number of frames that the NIC receives without errors										*/
-    TI_UINT32  RecvError;           /**< Number of frames that a NIC receives but does not indicate to the protocols due to errors	*/
-    TI_UINT32  RecvNoBuffer;        /**< Number of frames that the NIC cannot receive due to lack of NIC receive buffer space     	*/
-    TI_UINT32  DirectedBytesRecv;   /**< Number of bytes in directed packets that are received without errors                     	*/
-    TI_UINT32  DirectedFramesRecv;  /**< Number of directed packets that are received without errors                              	*/
-    TI_UINT32  MulticastBytesRecv;  /**< Number of bytes in multicast/functional packets that are received without errors         	*/
-    TI_UINT32  MulticastFramesRecv; /**< Number of multicast/functional packets that are received without errors                  	*/
-    TI_UINT32  BroadcastBytesRecv;  /**< Number of bytes in broadcast packets that are received without errors.                   	*/
-    TI_UINT32  BroadcastFramesRecv; /**< Number of broadcast packets that are received without errors.                            	*/
-
-    TI_UINT32  FragmentsRecv;		/**< Number of Fragments Received 															  	*/
-    TI_UINT32  FrameDuplicates;		/**< Number of Farme Duplicates						  											*/
-    TI_UINT32  FcsErrors;			/**< Number of frames that a NIC receives but does not indicate to the protocols due to errors	*/
-
-    TI_UINT32  BeaconsXmit;			/**< Number of Beacons Sent																		*/
-    TI_UINT32  BeaconsRecv;			/**< Number of Beacons Reveived																	*/
-    TI_UINT32  AssocRejects;		/**< Number of Rejected Assoc.			  		  												*/
-    TI_UINT32  AssocTimeouts;		/**< Number of Assoc. Time Outs																	*/
-    TI_UINT32  AuthRejects;			/**< Number of Authentication rejects 															*/
-    TI_UINT32  AuthTimeouts;		/**< Number of Authentication Time Outs 														*/
-
-} TIWLN_COUNTERS;
-
-/** \struct TPowerMgr_PowerMode
- * \brief Power Mode Parameters
- * 
- * \par Description
- * 
- * \sa
- */
-typedef struct 
-{
-    PowerMgr_PowerMode_e    PowerMode;			/**< Power Mode	Type		*/
-    PowerMgr_Priority_e     PowerMngPriority; 	/**< Power Mode	Priority	*/
-} TPowerMgr_PowerMode;
-
-/** \struct TWscMode
- * \brief WSC Mode
- * 
- * \par Description
- * This structure is used whenever the WiFi Simple Configuration Mode is modified between ON and OFF.
- * Upon enabling the Simple Configuration, the user must fill the probeReqWSCIE fields
- * 
- * \sa
- */
-typedef struct 
-{
-    TIWLN_SIMPLE_CONFIG_MODE  WSCMode;						/**< WiFi Simple Configuration mode 			   			*/
-    TI_UINT32 uWscIeSize; 						            /**< Simple Config IE actual size (the part after the OUI) */
-    TI_UINT8 probeReqWSCIE[DOT11_WSC_PROBE_REQ_MAX_LENGTH];	/**< Buffer which holds the parameters of ProbeReq - WSC IE	*/
-}  TWscMode;
-
-/** \struct TKeepAliveTemplate
- * \brief Keep Alive Template
- * 
- * \par Description
- * Used for Add/Remove to/from FW Keep Alive Configuration (Parameters & Template)
- * 
- * \sa
- */
-typedef struct
-{
-    TKeepAliveParams    keepAliveParams;								/**< Keep Alive Parameters						*/
-    TI_UINT8            msgBuffer[ KEEP_ALIVE_TEMPLATE_MAX_LENGTH ];	/**< Buffer which holds the Keep Alive Template	*/
-    TI_UINT32           msgBufferLength;								/**< Length of Keep Alive Template				*/
-
-} TKeepAliveTemplate;
-
-/** \struct TKeepAliveConfig
- * \brief Keep Alive Configuration
- * 
- * \par Description
- * Used for Get/Set Keep Alive Configuration (Parameters & Template)
- * 
- * \sa
- */
-typedef struct
-{
-    TI_UINT8                enaDisFlag;									/**< Indicates if Keep Alive is Enabled/Disabled	*/
-    TKeepAliveTemplate      templates[ KEEP_ALIVE_MAX_USER_MESSAGES ];	/**< Buffer which holds the maximum Keep Alive Template 
-																		* possible (according to maximum Keep Alive user messages
-																		possible) 
-																		*/
-} TKeepAliveConfig;
-
-#endif /* __TIWLNIF_H__*/
diff --git a/wl1271/stad/Export_Inc/TI_IPC_Api.h b/wl1271/stad/Export_Inc/TI_IPC_Api.h
deleted file mode 100644
index 276c079..0000000
--- a/wl1271/stad/Export_Inc/TI_IPC_Api.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * TI_IPC_Api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*---------------------------------------------------------------*/
-/**/
-/*  TI IPC header file*/
-/**/
-/*  Author :    Texas Instruments*/
-/**/
-/*  Filename: TI_IPC_Api.h*/
-/**/
-/*  Version  :1.0*/
-/**/
-/*  Last update date : 15/03/2004*/
-/**/
-/*---------------------------------------------------------------*/
-
-#ifndef _TI_IPC_API_H
-#define _TI_IPC_API_H
-
-#include "tidef.h"
-
-
-#define MAX_REGISTERED_MODULES 5
-#define MAX_EVENT_DATA_SIZE 128
-#define MAX_SEND_EVENTS 4
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/*******************Defines*********************/
-
-/* WARNING! DON'T CHANGE THE ORDER OF EVENTS! */
-/* OS EVENTS MUST COME FIRST!*/
-
-enum
-{
-    IPC_EVENT_ASSOCIATED = 0,
-    IPC_EVENT_DISASSOCIATED,
-    IPC_EVENT_LINK_SPEED,
-    IPC_EVENT_AUTH_SUCC,
-    IPC_EVENT_SCAN_REPORT,
-    IPC_EVENT_SCAN_COMPLETE,
-    IPC_EVENT_SCAN_STOPPED,
-    IPC_EVENT_CCKM_START,
-    IPC_EVENT_MEDIA_SPECIFIC,
-    IPC_EVENT_MAX_OS_EVENT = IPC_EVENT_MEDIA_SPECIFIC,
-    IPC_EVENT_EAPOL,
-    IPC_EVENT_BOUND,
-    IPC_EVENT_UNBOUND,
-    IPC_EVENT_PREAUTH_EAPOL,
-    IPC_EVENT_RESERVED2,
-    IPC_EVENT_LOW_RSSI,
-    IPC_EVENT_TSPEC_STATUS,
-    IPC_EVENT_TSPEC_RATE_STATUS,
-    IPC_EVENT_MEDIUM_TIME_CROSS,
-    IPC_EVENT_ROAMING_COMPLETE,
-    IPC_EVENT_EAP_AUTH_FAILURE,
-    IPC_EVENT_WPA2_PREAUTHENTICATION,
-    IPC_EVENT_TRAFFIC_INTENSITY_THRESHOLD_CROSSED,
-    IPC_EVENT_SCAN_FAILED,
-    IPC_EVENT_WPS_SESSION_OVERLAP,
-    IPC_EVENT_RSSI_SNR_TRIGGER,
-    IPC_EVENT_RSSI_SNR_TRIGGER_0,
-	IPC_EVENT_LOGGER,
-    IPC_EVENT_NOT_ASSOCIATED,
-    IPC_EVENT_BSS_LOSS,
-    IPC_EVENT_REASSOCIATION_RESP,
-    IPC_EVENT_IMMEDIATE_SCAN_REPORT,
-    IPC_EVENT_CONTINUOUS_SCAN_REPORT,
-    IPC_EVENT_RSSI_SNR_TRIGGER_1,
-    IPC_EVENT_AP_DISCONNECT,
-    IPC_EVENT_TX_RETRY_FALIURE,
-    IPC_EVENT_RE_AUTH_STARTED,
-    IPC_EVENT_RE_AUTH_COMPLETED,
-    IPC_EVENT_RE_AUTH_TERMINATED,
-    IPC_EVENT_TIMEOUT,
-    IPC_EVENT_GWSI,
-    IPC_EVENT_MAX
-};
-
-enum
-{
-    DELIVERY_PUSH =0,
-    DELIVERY_GET_DATA
-};
-
-enum
-{
-    SCAN_STATUS_COMPLETE = 0,
-    SCAN_STATUS_STOPPED = 1,
-    SCAN_STATUS_FAILED = 2
-};
-
-/************************* IOCTLs Functions *******************************/
-
-TI_HANDLE   IPC_Init(void);
-
-TI_INT32     IPC_DeInit(void);
-
-TI_HANDLE   IPC_DeviceOpen(void* AdapterName); /* get hDevice Handle*/
-
-TI_INT32     IPC_DeviceClose(TI_HANDLE hDevice);
-
-TI_INT32     IPC_DeviceIoControl(TI_HANDLE   hDevice,
-                            TI_UINT32    IoControlCode, 
-                            void*     pInBuffer,
-                            TI_UINT32    InBufferSize,
-                            void*     pOutBuffer,
-                            TI_UINT32    pOutBufferSize,
-                            TI_UINT32*   pBytesReturned);
-
-/************************* Events Functions *******************************/
-
-typedef struct _IPC_EV_DATA * PIPC_EV_DATA;  
-
-typedef TI_INT32 (*TI_EVENT_CALLBACK) (PIPC_EV_DATA  pData);
-
-typedef struct _IPC_EVENT_PARAMS
-{
-    TI_UINT32            uEventType;
-    TI_HANDLE           uEventID;
-    TI_UINT32            uProcessID;
-    TI_UINT32            uDeliveryType;
-    TI_HANDLE           hUserParam;            /* Handle to back reference*/
-    TI_EVENT_CALLBACK   pfEventCallback;
-}IPC_EVENT_PARAMS;
-
-/* EvParams are assumed to be the first field. Any addtions shoild be made 
-    afterwards
- */
-typedef struct _IPC_EV_DATA
-{
-    IPC_EVENT_PARAMS    EvParams;
-    TI_UINT32            uBufferSize;
-    TI_UINT8             uBuffer[MAX_EVENT_DATA_SIZE];
-}IPC_EV_DATA;
-
-
-/*this function will also enable event and pass all the parameters about it*/
-/* returns unique ID of registered event, to be passed later for unregister*/
-TI_INT32 IPC_RegisterEvent(TI_HANDLE             hDevice,    /* Driver Handle*/
-                          IPC_EVENT_PARAMS*     pEvParams);  /* size of the structure + size of the params*/
-
-TI_INT32 IPC_UnRegisterEvent(TI_HANDLE   hDevice,
-                            IPC_EVENT_PARAMS*   pEvParams); /* returned by IPC_RegisterEvent*/
-
-/***************************************************************************/
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif /*_IPC_UTIL_H*/
-
diff --git a/wl1271/stad/Export_Inc/TI_Results.h b/wl1271/stad/Export_Inc/TI_Results.h
deleted file mode 100644
index 33f115a..0000000
--- a/wl1271/stad/Export_Inc/TI_Results.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * TI_Results.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*--------------------------------------------------------------------------*/
-/* Module:		TI_Results.h*/
-/**/
-/* Purpose:		*/
-/**/
-/*--------------------------------------------------------------------------*/
-#ifndef _TI_RESULTS_H
-#define _TI_RESULTS_H
-
-#define TI_RESULT_UNBOUND               0x00000001
-
-#define TI_RESULT_OK                0
-#define TI_RESULT_FAILED            0xFFFFFFFF  /* -1*/
-#define TI_RESULT_INVALIDE_HANDLE   0xFFFFFFFE  /* -2*/
-#define TI_RESULT_SM_NOT_FOUND      0xFFFFFFFD  /* -3*/
-#define TI_RESULT_INVALID_PARAMETER     0xFFFFFFFC  /* -4*/
-#define TI_RESULT_REGISTRY_FAILED       0xFFFFFFFB  /* -5*/
-#define TI_RESULT_NOT_ENOUGH_MEMORY     0xFFFFFFFA  /* -6*/
-#define TI_RESULT_DRIVER_ERROR          0xFFFFFFF9  /* -7*/
-#define TI_RESULT_IPC_ERROR             0xFFFFFFF8  /* -8*/
-
-
-#define TI_SUCCEEDED(Status)    (Status == TI_RESULT_OK)
-#define TI_FAILED(Status)       (Status != TI_RESULT_OK)
-
-#endif
-
diff --git a/wl1271/stad/Export_Inc/bssTypes.h b/wl1271/stad/Export_Inc/bssTypes.h
deleted file mode 100644
index 09da363..0000000
--- a/wl1271/stad/Export_Inc/bssTypes.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * bssTypes.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file bssTypes.h
- *  \brief This file include public type definitions for Driver-wide BSS information
- *  \
- *  \date 05-April-2005
- */
-
-#ifndef __BSS_TYPES_API_H__
-#define __BSS_TYPES_API_H__
-
-#include "TWDriver.h"
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-#define MAX_NUM_OF_NEIGHBOR_APS     30
-#define MAX_SIZE_OF_BSS_TRACK_LIST  16
-
-
-/*
- ***********************************************************************
- *	Enumeration definitions.
- ***********************************************************************
- */
- /** \enum resultFrameType_e
- * \brief Type of result frame
- * 
- * \par Description
- * Enumerates the different types for a result frame
- * 
- * \sa TMib
- */
-typedef enum
-{
-/*	0	*/	SCAN_RFT_BEACON,         	/**< Result frame is a beacon */
-/*	1	*/	SCAN_RFT_PROBE_RESPONSE    	/**< Result frame is a probe response */
-
-} resultFrameType_e;
-
-/*
- ***********************************************************************
- *	Structure definitions.
- ***********************************************************************
- */
-/** \struct bssEntry_t
- * \brief	BSS entry
- * 
- * \par Description
- * This structure contains a single BSS entry. 
- * E.g. it holds one AP of the BSS list. 
- * 
- * \sa	bssList_t	
- */ 
-typedef struct
-{
-	/* values in beacon with fixed length */
-    TMacAddr               BSSID;                  /**< BSSID of this entry */
-    TI_UINT64              lastRxTSF;              /**< TSF of last received frame */
-    TI_UINT16              beaconInterval;         /**< Beacon interval of this AP */
-    TI_UINT16              capabilities;           /**< capabilities of this AP */
-
-	/* IE's in beacon */
-    TI_UINT8               DTIMPeriod;             /**< DTIm period (in beacon interval quantas */
-	resultFrameType_e	   resultType;             /**< The type of frame in pBuffer */
-    TI_UINT16              bufferLength;           /**< length of rest of beacon (or probe response) buffer */
-    TI_UINT8*              pBuffer;                /**< rest of beacon (or probe response) buffer */
-
-	/* Information from other sources */
-    ERadioBand             band;                   /**< band on which the AP transmits */
-    TI_UINT8               channel;                /**< channel on which the AP transmits */
-    TI_UINT8               rxRate;                 /**< Rate at which last frame was received */
-    TI_UINT32              lastRxHostTimestamp;    /**< 
-													* the host timestamp (in milliseconds) at which last frame 
-													* was received
-													*/
-    TI_INT8                RSSI;                   /**< average RSSI */
-    TI_INT8                lastRSSI;               /** last given RSSI */
-	TI_BOOL                bNeighborAP;            /**< Indicates whether this is a neighbor AP */
-} bssEntry_t;
-
-/** \struct bssList_t
- * \brief BSS List
- * 
- * \par Description
- * This structure holds the BSS list. E.g. it holds the AP ESS. 
- * This list is filled by the scan manager and is used by the 
- * Roaming Manager to select the best AP to roam to.
- * 
- * \sa	bssEntry_t
- */ 
-typedef struct
-{
-	TI_UINT8 			   numOfEntries;                               /**< Number of entries in the BSS list */
-	bssEntry_t             BSSList[ MAX_SIZE_OF_BSS_TRACK_LIST ];      /**< Pointer to the first entry in the BSS list */
-} bssList_t;
-
-/** \struct neighborAP_t
- * \brief	Neighbor AP 
- * 
- * \par Description
- * This structure contains information on one Neighbor AP.	\n 
- * A Neighbor AP is set by the Roaming Manager for the Scan Manager, 
- * and the Scan Manager discovers and tracks the AP. 
- * Neighbor APs have higher priority in the discovery process than the 
- * Channel List configured in the Scan Policy
- * 
- * \sa	neighborAPList_t
- */ 
-typedef struct
-{
-	TMacAddr	    	    BSSID;                          /**< The BSSID (MAC address) of this Neighbor AP */
-	TI_UINT8				channel;                        /**< Neighbor AP channel (on which the AP transmits) */
-	ERadioBand			    band;                           /**< Neighbor AP band (2.4/5 GHz) (the band used by the AP) */
-} neighborAP_t;
-
-/** \struct neighborAPList_t
- * \brief	list of Neighbor APs
- * 
- * \par Description
- * This structure holds a list of all neighbor APs
- * 
- * \sa	neighborAP_t
- */ 
-typedef struct
-{
-	TI_UINT8				numOfEntries;                           /**< Number of entries in Neighbor AP list */
-	neighborAP_t            APListPtr[ MAX_NUM_OF_NEIGHBOR_APS ];   /**< Pointer to Neighbor AP list */
-} neighborAPList_t;
-
-
-#endif
diff --git a/wl1271/stad/Export_Inc/coreDefaultParams.h b/wl1271/stad/Export_Inc/coreDefaultParams.h
deleted file mode 100644
index 1482f95..0000000
--- a/wl1271/stad/Export_Inc/coreDefaultParams.h
+++ /dev/null
@@ -1,1633 +0,0 @@
-/*
- * coreDefaultParams.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _CORE_DEFAULT_PARAMS_H
-#define _CORE_DEFAULT_PARAMS_H
-                  
-#if defined(__ARMCC__) 
-#include "public_infoele.h"
-#endif
-/************************************/
-/*      Min, Max & Default values   */
-/************************************/
-
-/* In this section are defined default, min & max values for parameters, according to the MIB */
-/* This values are used as following:
-        - By the OS abstraction layer in order to fill the init table with the default values
-        if the NVRAM/Registry value for the parameter is invalid
-        - By the core modules in order to perform validity check upon setting a parameter. */
-
-/* This is the max possible string length from INI file */
-#define BEACON_FILTER_STRING_MAX_LEN            300
-
-#define SITE_MGR_CHANNEL_MIN                    1
-/* Band A*/
-#define SITE_MGR_CHANNEL_A_MIN                  36
-/* Band B&G*/
-#define SITE_MGR_CHANNEL_B_G_MAX                14
-#define SITE_MGR_CHANNEL_MAX                    201
-#define SITE_MGR_CHANNEL_DEF                    11
-
-#define SITE_MGR_DOT_11_MODE_MIN                DOT11_B_MODE
-#define SITE_MGR_DOT_11_MODE_MAX                DOT11_DUAL_MODE
-#define SITE_MGR_DOT_11_MODE_DEF                DOT11_G_MODE
-
-#define SITE_MGR_BSS_TYPE_DEF                   BSS_INFRASTRUCTURE
-
-#define SITE_MGR_BEACON_INTERVAL_MIN            1
-#define SITE_MGR_BEACON_INTERVAL_MAX            65535
-#define SITE_MGR_BEACON_INTERVAL_DEF            200
-
-/* number of events to wake up on -
-    For WakeOnBeacon- Aging interval =  SITE_MGR_NUMBER_OF_EVENTS_BEFORE_AGING * BeaconInterval
-    For WakeOnDtim - Aging interval =  SITE_MGR_NUMBER_OF_EVENTS_BEFORE_AGING * BeaconInterval * DtimPeriod */
-#define SITE_MGR_NUMBER_OF_EVENTS_BEFORE_AGING_MIN  2
-#define SITE_MGR_NUMBER_OF_EVENTS_BEFORE_AGING_MAX  20
-#define SITE_MGR_NUMBER_OF_EVENTS_BEFORE_AGING_DEF  10
-
-#define SITE_MGR_NUMBER_OF_TX_FAILURE_BEFORE_AGING_MIN  3
-#define SITE_MGR_NUMBER_OF_TX_FAILURE_BEFORE_AGING_MAX  100
-#define SITE_MGR_NUMBER_OF_TX_FAILURE_BEFORE_AGING_DEF  6
-
-/* In seconds */
-#define SITE_MGR_ROAMING_STATS_RESET_TIMEOUT_MIN   5
-#define SITE_MGR_ROAMING_STATS_RESET_TIMEOUT_MAX   60
-#define SITE_MGR_ROAMING_STATS_RESET_TIMEOUT_DEF   10
-
-#define SITE_MGR_LNA_BEACON_INT_COUNT_MIN       2   
-#define SITE_MGR_LNA_BEACON_INT_COUNT_MAX       0xFFFF
-#define SITE_MGR_LNA_BEACON_INT_COUNT_DEF       3
-
-#define SITE_MGR_LNA_PD_THRESHOLD_LOW_MIN       0x00    
-#define SITE_MGR_LNA_PD_THRESHOLD_LOW_MAX       0xff    
-#define SITE_MGR_LNA_PD_THRESHOLD_LOW_DEF       0x90    
-
-#define SITE_MGR_LNA_PD_THRESHOLD_HIGH_MIN      0x00    
-#define SITE_MGR_LNA_PD_THRESHOLD_HIGH_MAX      0xff    
-#define SITE_MGR_LNA_PD_THRESHOLD_HIGH_DEF      0xD5    
-
-#define SITE_MGR_LNA_EN_DINAMYC_TX_ALGO_DEF     0   
-#define SITE_MGR_LNA_EN_DINAMYC_TX_ALGO_MAX     1
-#define SITE_MGR_LNA_EN_DINAMYC_TX_ALGO_MIN     0
-
-#define SITE_MGR_PREAMBLE_TYPE_DEF              PREAMBLE_SHORT
-
-#define SITE_MGR_EXTERNAL_MODE_MIN              0
-#define SITE_MGR_EXTERNAL_MODE_MAX              1
-#define SITE_MGR_EXTERNAL_MODE_DEF              0
-
-#define SITE_MGR_PERFORM_BUILD_IN_TEST_RECOVEY_MIN      TI_FALSE
-#define SITE_MGR_PERFORM_BUILD_IN_TEST_RECOVEY_MAX      TI_TRUE
-#define SITE_MGR_PERFORM_BUILD_IN_TEST_RECOVEY_DEF      TI_FALSE
-
-#define SITE_MGR_WiFiAdHoc_MIN                  0
-#define SITE_MGR_WiFiAdHoc_MAX                  1
-#define SITE_MGR_WiFiAdHoc_DEF                  0
-
-#define SITE_MGR_RX_LEVEL_TABLE_SIZE_DEF        44
-
-/* due to the fact we use the site table only to connect we need just 2 entries each table */
-#define MAX_SITES_BG_BAND   2
-#define MAX_SITES_A_BAND    2
-#define NUM_OF_SITE_TABLE   2
-
-/* Beacon broadcast options */
-#define BCN_RX_TIMEOUT_DEF_VALUE 10000
-#define BCN_RX_TIMEOUT_MIN_VALUE 1
-#define BCN_RX_TIMEOUT_MAX_VALUE 65535
-    
-#define BROADCAST_RX_TIMEOUT_DEF_VALUE 20000
-#define BROADCAST_RX_TIMEOUT_MIN_VALUE 1 
-#define BROADCAST_RX_TIMEOUT_MAX_VALUE 65535
-
-#define RX_BROADCAST_IN_PS_DEF_VALUE 1
-#define RX_BROADCAST_IN_PS_MIN_VALUE 0
-#define RX_BROADCAST_IN_PS_MAX_VALUE 1
-
-#define CONSECUTIVE_PS_POLL_FAILURE_DEF 20
-#define CONSECUTIVE_PS_POLL_FAILURE_MIN 1
-#define CONSECUTIVE_PS_POLL_FAILURE_MAX 100
-
-#define PS_POLL_FAILURE_PERIOD_DEF 20
-#define PS_POLL_FAILURE_PERIOD_MIN 0       /* '0' is disabled */
-#define PS_POLL_FAILURE_PERIOD_MAX 60000
-
-/*---------------------------*/
-/*  Classifier parameters    */
-/*---------------------------*/
-
-/* 1 - Dtag, 2 - Port, 3 - IP & port */ 
-#define CLSFR_TYPE_MIN                          1 
-#define CLSFR_TYPE_DEF                      1
-#define CLSFR_TYPE_MAX                      3
-
-/* general values of D-tags */
-#define CLASSIFIER_DTAG_MIN                 0 
-#define CLASSIFIER_DTAG_MAX                 7
-#define CLASSIFIER_DTAG_DEF                 0 
-
-/* general values of code points in 
-the DSCP classification table*/
-#define CLASSIFIER_CODE_POINT_MIN       0 
-#define CLASSIFIER_CODE_POINT_MAX       63
-#define CLASSIFIER_CODE_POINT_DEF       0
-
-/* general values of port numbers */
-#define CLASSIFIER_PORT_MIN                 1 
-#define CLASSIFIER_PORT_MAX                 65535
-#define CLASSIFIER_PORT_DEF                 1024 
-
-/* General values of IP addresses */
-/* TBD according to spec!*/
-#define CLASSIFIER_IPADDRESS_MIN                0x0
-/* MY IP ... TBD according to spec!*/
-#define CLASSIFIER_IPADDRESS_DEF                0x0A030DC4
-/* TBD according to spec!*/
-#define CLASSIFIER_IPADDRESS_MAX                0xFFFFFFFF
-
-/* DSCP (differentiated services code 
-point) classifier parameters  
---------------------------------*/
-/* number of classifier entries in the 
-   classification table (in case of DSCP classifier) */
-
-#define NUM_OF_CODE_POINTS_MIN              0
-#define NUM_OF_CODE_POINTS_MAX              16
-#define NUM_OF_CODE_POINTS_DEF              4
-
-/* def values of code points in the DSCP classification table*/
-#define DSCP_CLASSIFIER_CODE_POINT_DEF  0x0
-#define DSCP_CLASSIFIER_CODE_POINT_00  0
-#define DSCP_CLASSIFIER_CODE_POINT_01  8
-#define DSCP_CLASSIFIER_CODE_POINT_02  40
-#define DSCP_CLASSIFIER_CODE_POINT_03  56
-
-/* def values of D-tags in the DSCP classification table*/
-#define DSCP_CLASSIFIER_DTAG_DEF            0
-#define DSCP_CLASSIFIER_DTAG_00            0
-#define DSCP_CLASSIFIER_DTAG_01            1
-#define DSCP_CLASSIFIER_DTAG_02            5
-#define DSCP_CLASSIFIER_DTAG_03            6
-
-/* Port Classifier parameters 
---------------------------------*/
-
-/* number of entries in the classification table (in case of destination port classifier) */
-#define NUM_OF_PORT_CLASSIFIERS_MIN         0
-#define NUM_OF_PORT_CLASSIFIERS_MAX         16
-#define NUM_OF_PORT_CLASSIFIERS_DEF         0
-
-/* def values of port numbers in the destination port classification table*/
-#define PORT_CLASSIFIER_PORT_DEF            5000
-
-/* def values of D-tags in the destination port classification table*/
-#define PORT_CLASSIFIER_DTAG_DEF            7
-
-/* IP&Port Classifier parameters 
---------------------------------*/
-
-/* number of active entries in the 
-IP&Port classification table  */
-#define NUM_OF_IPPORT_CLASSIFIERS_MIN       0
-#define NUM_OF_IPPORT_CLASSIFIERS_MAX       16
-#define NUM_OF_IPPORT_CLASSIFIERS_DEF       0
-
-/* def values of IP addresses in the IP&Port classification table*/
-#define IPPORT_CLASSIFIER_IPADDRESS_DEF 167972292
-
-/* def values of port numbers in the IP&Port classification table*/
-#define IPPORT_CLASSIFIER_PORT_DEF      5004
-
-/* def values of D-tags in the IP&Port classification table*/
-#define IPPORT_CLASSIFIER_DTAG_DEF      7
-
-/* end of classifier parameters */
-
-#define MAX_USER_PRIORITY                       7
-
-
-
-#define  WME_ENABLED_MIN                        TI_FALSE
-#define  WME_ENABLED_MAX                        TI_TRUE
-#define  WME_ENABLED_DEF                        TI_TRUE
-
-#define  QOS_TRAFFIC_ADM_CTRL_ENABLED_MIN       TI_FALSE
-#define  QOS_TRAFFIC_ADM_CTRL_ENABLED_MAX       TI_TRUE 
-#define  QOS_TRAFFIC_ADM_CTRL_ENABLED_DEF       TI_TRUE 
-
-#define  QOS_DESIRED_PS_MODE_MIN            PS_SCHEME_LEGACY
-#define  QOS_DESIRED_PS_MODE_MAX            MAX_PS_SCHEME
-#define  QOS_DESIRED_PS_MODE_DEF            PS_SCHEME_UPSD_TRIGGER
-
-#define  QOS_TAG_ZERO_PRIO_MIN                  TI_FALSE
-#define  QOS_TAG_ZERO_PRIO_MAX                  TI_TRUE
-#define  QOS_TAG_ZERO_PRIO_DEF                  TI_TRUE
-
-
-/* for the AC */
-#define  QOS_TX_OP_CONTINUATION_MIN             0
-#define  QOS_TX_OP_CONTINUATION_MAX             1
-#define  QOS_TX_OP_CONTINUATION_DEF            1
-
-#define  QOS_TX_OP_LIMIT_MIN                   0
-#define  QOS_TX_OP_LIMIT_MAX                   32000     
-#define  QOS_TX_OP_LIMIT_DEF                   0
-
-/* for packet burst in non-qos protocol */
-#define  QOS_PACKET_BURST_ENABLE_MIN             0
-#define  QOS_PACKET_BURST_ENABLE_DEF            0
-#define  QOS_PACKET_BURST_ENABLE_MAX             1
-
-#define  QOS_PACKET_BURST_TXOP_LIMIT_MIN         0
-#define  QOS_PACKET_BURST_TXOP_LIMIT_MAX         1000     
-#define  QOS_PACKET_BURST_TXOP_LIMIT_DEF         93
-
-#define  QOS_RX_TIMEOUT_PS_POLL_MIN                0
-#define  QOS_RX_TIMEOUT_PS_POLL_MAX             200000
-#define  QOS_RX_TIMEOUT_PS_POLL_DEF                15
-
-#define  QOS_RX_TIMEOUT_UPSD_MIN                   0
-#define  QOS_RX_TIMEOUT_UPSD_MAX                200000
-#define  QOS_RX_TIMEOUT_UPSD_DEF                   15
-
-#define  QOS_MSDU_LIFE_TIME_MIN                0
-#define  QOS_MSDU_LIFE_TIME_MAX                1024
-
-#define  QOS_MSDU_LIFE_TIME_BE_MIN              QOS_MSDU_LIFE_TIME_MIN
-#define  QOS_MSDU_LIFE_TIME_BE_MAX              QOS_MSDU_LIFE_TIME_MAX
-#define  QOS_MSDU_LIFE_TIME_BE_DEF              512
-#define  QOS_MSDU_LIFE_TIME_BE_DEF_WIFI_MODE    512
-
-#define  QOS_MSDU_LIFE_TIME_BK_MIN              QOS_MSDU_LIFE_TIME_MIN
-#define  QOS_MSDU_LIFE_TIME_BK_MAX              QOS_MSDU_LIFE_TIME_MAX
-#define  QOS_MSDU_LIFE_TIME_BK_DEF              100
-#define  QOS_MSDU_LIFE_TIME_BK_DEF_WIFI_MODE    512
-
-#define  QOS_MSDU_LIFE_TIME_VI_MIN              QOS_MSDU_LIFE_TIME_MIN
-#define  QOS_MSDU_LIFE_TIME_VI_MAX              QOS_MSDU_LIFE_TIME_MAX
-#define  QOS_MSDU_LIFE_TIME_VI_DEF              100
-#define  QOS_MSDU_LIFE_TIME_VI_DEF_WIFI_MODE    512
-
-#define  QOS_MSDU_LIFE_TIME_VO_MIN              QOS_MSDU_LIFE_TIME_MIN
-#define  QOS_MSDU_LIFE_TIME_VO_MAX              QOS_MSDU_LIFE_TIME_MAX
-#define  QOS_MSDU_LIFE_TIME_VO_DEF              40
-#define  QOS_MSDU_LIFE_TIME_VO_DEF_WIFI_MODE    512
-
-#define  QOS_WME_PS_MODE_BE_MIN                 PS_SCHEME_LEGACY
-#define  QOS_WME_PS_MODE_BE_MAX                 MAX_PS_SCHEME
-#define  QOS_WME_PS_MODE_BE_DEF                 PS_SCHEME_LEGACY
-
-#define  QOS_WME_PS_MODE_BK_MIN                 PS_SCHEME_LEGACY
-#define  QOS_WME_PS_MODE_BK_MAX                 MAX_PS_SCHEME
-#define  QOS_WME_PS_MODE_BK_DEF                 PS_SCHEME_LEGACY
-
-#define  QOS_WME_PS_MODE_VI_MIN                 PS_SCHEME_LEGACY
-#define  QOS_WME_PS_MODE_VI_MAX                 MAX_PS_SCHEME
-#define  QOS_WME_PS_MODE_VI_DEF                 PS_SCHEME_LEGACY
-
-#define  QOS_WME_PS_MODE_VO_MIN                 PS_SCHEME_LEGACY
-#define  QOS_WME_PS_MODE_VO_MAX                 MAX_PS_SCHEME
-#define  QOS_WME_PS_MODE_VO_DEF                 PS_SCHEME_UPSD_TRIGGER
-
-
-/* Minimum reserved Tx mem block in FW per AC: */
-/***********************************************/
-/* By default, partially optimize for Tx QoS on expense of Rx throughput */
-#define  QOS_TX_BLKS_THRESHOLD_BK_DEF           0
-#define  QOS_TX_BLKS_THRESHOLD_BE_DEF           20
-#define  QOS_TX_BLKS_THRESHOLD_VI_DEF           20
-#define  QOS_TX_BLKS_THRESHOLD_VO_DEF           20
-/* In WiFi mode, fully optimized for Tx QoS on expense of Rx throughput */
-#define  QOS_TX_BLKS_THRESHOLD_BK_DEF_WIFI_MODE 0
-#define  QOS_TX_BLKS_THRESHOLD_BE_DEF_WIFI_MODE 30
-#define  QOS_TX_BLKS_THRESHOLD_VI_DEF_WIFI_MODE 30
-#define  QOS_TX_BLKS_THRESHOLD_VO_DEF_WIFI_MODE 30
-/* In performance-boost, optimize for Rx throughput on expense of Tx QoS */
-#define  QOS_TX_BLKS_THRESHOLD_BK_DEF_BOOST_MODE 0
-#define  QOS_TX_BLKS_THRESHOLD_BE_DEF_BOOST_MODE 10
-#define  QOS_TX_BLKS_THRESHOLD_VI_DEF_BOOST_MODE 10
-#define  QOS_TX_BLKS_THRESHOLD_VO_DEF_BOOST_MODE 10
-
-/* HW Rx mem-blocks Number */
-#define  RX_MEM_BLKS_NUM_MIN                    20
-#define  RX_MEM_BLKS_NUM_MAX                    120
-#define  RX_MEM_BLKS_NUM_DEF                    50   /* By default, partially optimize for Tx QoS on expense of Rx throughput */
-#define  RX_MEM_BLKS_NUM_DEF_WIFI_MODE          40   /* In WiFi mode, fully optimize for Tx QoS on expense of Rx throughput */
-#define  RX_MEM_BLKS_NUM_DEF_BOOST_MODE         70   /* In performance-boost, optimize for Rx throughput on expense of Tx QoS */
-
-/* WiFi mode on/off */
-#define  WIFI_MODE_DEF                          0
-#define  WIFI_MODE_MIN                          0
-#define  WIFI_MODE_MAX                          1
-
-/* Performance-boost mode (QoS/Speed tradeoff) */
-#define  BOOST_MODE_OPTIMIZE_FOR_QOS            0   /* Optimize for Tx QoS on expense of Rx throughput */
-#define  BOOST_MODE_OPTIMIZE_FOR_SPEED          1   /* Optimize for Rx throughput on expense of Tx QoS */
-#define  PERFORMANCE_BOOST_MODE_DEF             BOOST_MODE_OPTIMIZE_FOR_QOS
-#define  PERFORMANCE_BOOST_MODE_MIN             BOOST_MODE_OPTIMIZE_FOR_QOS
-#define  PERFORMANCE_BOOST_MODE_MAX             BOOST_MODE_OPTIMIZE_FOR_SPEED
-
-/* Maximum AMPDU Size */
-#define MAX_MPDU_DEF                            MAX_MPDU_8191_OCTETS
-
-/* STOP NETWORK STACK TX mode defines */
-#define  STOP_NET_STACK_TX_DEF                  0
-#define  STOP_NET_STACK_TX_MIN                  0
-#define  STOP_NET_STACK_TX_MAX                  1
-#define  STOP_NET_STACK_TX_DEF_WIFI_MODE        0
-
-/* Tx send pacing threshold: num of Tx pkts to queue before handling them (excluding voice queue) */
-#define  TX_SEND_PACE_THRESH_DEF                1
-#define  TX_SEND_PACE_THRESH_MIN                1
-#define  TX_SEND_PACE_THRESH_MAX                16
-#define  TX_SEND_PACE_THRESH_DEF_WIFI_MODE      1
-
-#define  QOS_TX_BLKS_THRESHOLD_MIN              0
-#define  QOS_TX_BLKS_THRESHOLD_MAX              200
-
-#define  QOS_QID_MIN                           0
-#define  QOS_QID_MAX                           3
-
-#define  QOS_AC_MIN                            QOS_QID_MIN
-#define  QOS_AC_MAX                            QOS_QID_MAX
-
-#define  QOS_AIFS_MIN                          1
-#define  QOS_AIFS_MAX                          15
-
-#define QOS_CWMIN_MIN                          0
-#define QOS_CWMIN_MAX                          15
-
-#define QOS_CWMAX_MIN                          0
-#define QOS_CWMAX_MAX                          15
-
-#define QOS_TIMEOUT_MIN                        0
-#define QOS_TIMEOUT_MAX                        65535
-
-#define QOS_ACK_POLICY_MIN                     0
-#define QOS_ACK_POLICY_MAX                     1
-
-#define QOS_TRAFFIC_TYPE_MIN                   0
-#define QOS_TRAFFIC_TYPE_MAX                   1
-
-#define QOS_SHORT_RETRY_LIMIT_MIN              1
-#define QOS_SHORT_RETRY_LIMIT_MAX              255
-#define QOS_SHORT_RETRY_LIMIT_DEF              10
-
-#define QOS_SHORT_RETRY_LIMIT_BE_MIN            QOS_SHORT_RETRY_LIMIT_MIN
-#define QOS_SHORT_RETRY_LIMIT_BE_MAX            QOS_SHORT_RETRY_LIMIT_MAX
-#define QOS_SHORT_RETRY_LIMIT_BE_DEF            QOS_SHORT_RETRY_LIMIT_DEF
-
-#define QOS_SHORT_RETRY_LIMIT_BK_MIN            QOS_SHORT_RETRY_LIMIT_MIN
-#define QOS_SHORT_RETRY_LIMIT_BK_MAX            QOS_SHORT_RETRY_LIMIT_MAX
-#define QOS_SHORT_RETRY_LIMIT_BK_DEF            QOS_SHORT_RETRY_LIMIT_DEF
-
-#define QOS_SHORT_RETRY_LIMIT_VI_MIN            QOS_SHORT_RETRY_LIMIT_MIN
-#define QOS_SHORT_RETRY_LIMIT_VI_MAX            QOS_SHORT_RETRY_LIMIT_MAX
-#define QOS_SHORT_RETRY_LIMIT_VI_DEF            QOS_SHORT_RETRY_LIMIT_DEF
-
-#define QOS_SHORT_RETRY_LIMIT_VO_MIN            QOS_SHORT_RETRY_LIMIT_MIN
-#define QOS_SHORT_RETRY_LIMIT_VO_MAX            QOS_SHORT_RETRY_LIMIT_MAX
-#define QOS_SHORT_RETRY_LIMIT_VO_DEF            4
-
-
-#define QOS_LONG_RETRY_LIMIT_MIN               1
-#define QOS_LONG_RETRY_LIMIT_MAX               255
-#define QOS_LONG_RETRY_LIMIT_DEF               4
-
-#define QOS_LONG_RETRY_LIMIT_BE_MIN             QOS_LONG_RETRY_LIMIT_MIN
-#define QOS_LONG_RETRY_LIMIT_BE_MAX             QOS_LONG_RETRY_LIMIT_MAX
-#define QOS_LONG_RETRY_LIMIT_BE_DEF             QOS_LONG_RETRY_LIMIT_DEF
-
-#define QOS_LONG_RETRY_LIMIT_BK_MIN             QOS_LONG_RETRY_LIMIT_MIN
-#define QOS_LONG_RETRY_LIMIT_BK_MAX             QOS_LONG_RETRY_LIMIT_MAX
-#define QOS_LONG_RETRY_LIMIT_BK_DEF             QOS_LONG_RETRY_LIMIT_DEF
-
-#define QOS_LONG_RETRY_LIMIT_VI_MIN             QOS_LONG_RETRY_LIMIT_MIN
-#define QOS_LONG_RETRY_LIMIT_VI_MAX             QOS_LONG_RETRY_LIMIT_MAX
-#define QOS_LONG_RETRY_LIMIT_VI_DEF             QOS_LONG_RETRY_LIMIT_DEF
-
-#define QOS_LONG_RETRY_LIMIT_VO_MIN             QOS_LONG_RETRY_LIMIT_MIN
-#define QOS_LONG_RETRY_LIMIT_VO_MAX             QOS_LONG_RETRY_LIMIT_MAX
-#define QOS_LONG_RETRY_LIMIT_VO_DEF             QOS_LONG_RETRY_LIMIT_DEF
-
-#define QOS_QUEUE_0_OVFLOW_POLICY_MIN           DROP_NEW_PACKET
-#define QOS_QUEUE_0_OVFLOW_POLICY_MAX           DROP_OLD_PACKET
-#define QOS_QUEUE_0_OVFLOW_POLICY_DEF           DROP_NEW_PACKET
-
-#define QOS_QUEUE_1_OVFLOW_POLICY_MIN           DROP_NEW_PACKET
-#define QOS_QUEUE_1_OVFLOW_POLICY_MAX           DROP_OLD_PACKET
-#define QOS_QUEUE_1_OVFLOW_POLICY_DEF           DROP_NEW_PACKET
-
-#define QOS_QUEUE_2_OVFLOW_POLICY_MIN           DROP_NEW_PACKET
-#define QOS_QUEUE_2_OVFLOW_POLICY_MAX           DROP_OLD_PACKET
-#define QOS_QUEUE_2_OVFLOW_POLICY_DEF           DROP_NEW_PACKET
-
-#define QOS_QUEUE_3_OVFLOW_POLICY_MIN           DROP_NEW_PACKET
-#define QOS_QUEUE_3_OVFLOW_POLICY_MAX           DROP_OLD_PACKET
-#define QOS_QUEUE_3_OVFLOW_POLICY_DEF           DROP_NEW_PACKET
-
-#define QOS_ACK_POLICY_BE_MIN                   ACK_POLICY_LEGACY
-#define QOS_ACK_POLICY_BE_MAX                   MAX_ACK_POLICY
-#define QOS_ACK_POLICY_BE_DEF                   ACK_POLICY_LEGACY
-
-#define QOS_ACK_POLICY_BK_MIN                   ACK_POLICY_LEGACY
-#define QOS_ACK_POLICY_BK_MAX                   MAX_ACK_POLICY
-#define QOS_ACK_POLICY_BK_DEF                   ACK_POLICY_LEGACY
-
-#define QOS_ACK_POLICY_VI_MIN                   ACK_POLICY_LEGACY
-#define QOS_ACK_POLICY_VI_MAX                   MAX_ACK_POLICY
-#define QOS_ACK_POLICY_VI_DEF                   ACK_POLICY_LEGACY
-
-#define QOS_ACK_POLICY_VO_MIN                   ACK_POLICY_LEGACY
-#define QOS_ACK_POLICY_VO_MAX                   MAX_ACK_POLICY
-#define QOS_ACK_POLICY_VO_DEF                   ACK_POLICY_LEGACY
-
-
-/* MAX_SP_LEN_VALUES
-  00 - all buffered frames 
-  01 - 2
-  10 - 4 
-  11 - 6
-*/
-
-#define QOS_MAX_SP_LEN_MIN                      0
-#define QOS_MAX_SP_LEN_MAX                      3
-/* Means maxSpLen = 2 (changed for SoftGemini requiremnet) */
-#define QOS_MAX_SP_LEN_DEF                      1
-
-/* CW setting from the ini */
-#define QOS_CW_USER_ENABLE_MIN                  0
-#define QOS_CW_USER_ENABLE_MAX                  1
-#define QOS_CW_USER_ENABLE_DEF                  0
-
-#define QOS_CW_CWMIN_MIN                        QOS_CWMIN_MIN
-#define QOS_CW_CWMIN_MAX                        QOS_CWMIN_MAX
-#define QOS_CW_CWMIN_DEF                        CW_MIN_DEF
-
-#define QOS_CW_CWMAX_MIN                        QOS_CWMAX_MIN
-#define QOS_CW_CWMAX_MAX                        QOS_CWMAX_MAX
-#define QOS_CW_CWMAX_DEF                        CW_MAX_DEF
-
-/*
- * 802.11n HT settion
- */
-#define  HT_11N_ENABLED_MIN                         TI_FALSE
-#define  HT_11N_ENABLED_MAX                         TI_TRUE
-#define  HT_11N_ENABLED_DEF                         TI_TRUE
-                                                    
-/* policies: 0 - disable, 1 - initiator, 2 - receiver, 3 -  initiator& receiver. */
-#define  HT_BA_POLICY_MIN                           0    
-#define  HT_BA_POLICY_MAX                           3
-#define  HT_BA_POLICY_DEF                           0
-
-/* In the 11n spec in order to set endless timeout the value is 0 */
-#define  HT_BA_INACTIVITY_TIMEOUT_MIN               0
-#define  HT_BA_INACTIVITY_TIMEOUT_MAX               0xffff
-#define  HT_BA_INACTIVITY_TIMEOUT_DEF               10000
-
-/*---------------------------
-      ROAMING parameters
------------------------------*/
-#define ROAMING_MNGR_ENABLE_MIN             0
-#define ROAMING_MNGR_ENABLE_MAX             1
-#define ROAMING_MNGR_ENABLE_DEF             0
-
-#define ROAMING_MNGR_ENABLE_PERIODIC_SCAN_MIN       0
-#define ROAMING_MNGR_ENABLE_PERIODIC_SCAN_MAX       1
-#define ROAMING_MNGR_ENABLE_PERIODIC_SCAN_DEF       0
-
-#define ROAMING_MNGR_RSSI_GAP_MIN                   0
-#define ROAMING_MNGR_RSSI_GAP_MAX                   50
-#define ROAMING_MNGR_RSSI_GAP_DEF                   10
-
-#define ROAMING_MNGR_PERIODIC_SCAN_TIEMOUT_MIN      1000
-#define ROAMING_MNGR_PERIODIC_SCAN_TIEMOUT_MAX      10000
-#define ROAMING_MNGR_PERIODIC_SCAN_TIEMOUT_DEF      3000
-
-#define ROAMING_MNGR_PERIODIC_SCAN_MIN_CH_MIN       5
-#define ROAMING_MNGR_PERIODIC_SCAN_MIN_CH_MAX       60
-#define ROAMING_MNGR_PERIODIC_SCAN_MIN_CH_DEF       5
-
-#define ROAMING_MNGR_PERIODIC_SCAN_MAX_CH_MIN       5
-#define ROAMING_MNGR_PERIODIC_SCAN_MAX_CH_MAX       60
-#define ROAMING_MNGR_PERIODIC_SCAN_MAX_CH_DEF       20
-
-#define ROAMING_MNGR_PERIODIC_SCAN_ET_MODE_MIN      0
-#define ROAMING_MNGR_PERIODIC_SCAN_ET_MODE_MAX      3
-#define ROAMING_MNGR_PERIODIC_SCAN_ET_MODE_DEF      3
-
-#define ROAMING_MNGR_PERIODIC_SCAN_MAX_NUM_FRAMES_MIN       1
-#define ROAMING_MNGR_PERIODIC_SCAN_MAX_NUM_FRAMES_MAX       30
-#define ROAMING_MNGR_PERIODIC_SCAN_MAX_NUM_FRAMES_DEF       1
-
-#define ROAMING_MNGR_PERIODIC_SCAN_NUM_PROBE_REQ_MIN        1
-#define ROAMING_MNGR_PERIODIC_SCAN_NUM_PROBE_REQ_MAX        10
-#define ROAMING_MNGR_PERIODIC_SCAN_NUM_PROBE_REQ_DEF        2
-
-#define ROAMING_MNGR_OPERATIONAL_MODE_MIN       0 /* 0 - manual , 1 - auto*/
-#define ROAMING_MNGR_OPERATIONAL_MODE_MAX       1
-#define ROAMING_MNGR_OPERATIONAL_MODE_DEF       1
-
-#define ROAMING_MNGR_SEND_TSPEC_IN_REASSO_PKT_MIN       0 /* 0 - do not send , 1 - send */
-#define ROAMING_MNGR_SEND_TSPEC_IN_REASSO_PKT_MAX       1
-#define ROAMING_MNGR_SEND_TSPEC_IN_REASSO_PKT_DEF       1
-
-
-/*---------------------------
-    Measurement parameters
------------------------------*/
-
-/* Packets Per Second threshold */
-#define MEASUREMENT_TRAFFIC_THRSHLD_MIN         1
-#define MEASUREMENT_TRAFFIC_THRSHLD_MAX             1000
-#define MEASUREMENT_TRAFFIC_THRSHLD_DEF             400
-
-/* In ms */
-#define MEASUREMENT_MAX_DUR_NON_SRV_CHANNEL_MIN 1
-#define MEASUREMENT_MAX_DUR_NON_SRV_CHANNEL_MAX             1000
-#define MEASUREMENT_MAX_DUR_NON_SRV_CHANNEL_DEF             300
-
-
-/*---------------------------
-      XCC Manager parameters
------------------------------*/
-#define XCC_MNGR_ENABLE_MIN             XCC_MODE_DISABLED
-#define XCC_MNGR_ENABLE_MAX             XCC_MODE_STANDBY
-#define XCC_MNGR_ENABLE_DEF             XCC_MODE_ENABLED
-
-#define XCC_TEST_IGNORE_DEAUTH_0_DEF            1
-#define XCC_TEST_IGNORE_DEAUTH_0_MIN            0
-#define XCC_TEST_IGNORE_DEAUTH_0_MAX            1
-
-#define SITE_MGR_ROAMING_TX_RATE_PERCENTAGE_MIN         30
-#define SITE_MGR_ROAMING_TX_RATE_PERCENTAGE_MAX         75
-#define SITE_MGR_ROAMING_TX_RATE_PERCENTAGE_DEF         40
-
-
-#define SITE_MGR_ROAMING_RSSI_MIN                       0
-#define SITE_MGR_ROAMING_RSSI_MAX                       100
-#define SITE_MGR_ROAMING_RSSI_DEF                       80
-
-#define SITE_MGR_ROAMING_CONS_TX_ERRORS_MIN             1
-#define SITE_MGR_ROAMING_CONS_TX_ERRORS_MAX             200 
-#define SITE_MGR_ROAMING_CONS_TX_ERRORS_DEF             10
-
-/*6 sec*/
-#define SITE_MGR_POSTDISCONNECT_TIMEOUT_DEF     6000
-#define SITE_MGR_POSTDISCONNECT_TIMEOUT_MIN     1000
-#define SITE_MGR_POSTDISCONNECT_TIMEOUT_MAX     10000
-
-/* 1 seconds */                                                                
-#define CONN_SELF_TIMEOUT_MIN                   (1 * 1000)
-/* 1 minute */
-#define CONN_SELF_TIMEOUT_MAX                   (60 * 1000)
-/* 10 seconds */
-#define CONN_SELF_TIMEOUT_DEF                   (10 * 1000)
-
-#define AUTH_RESPONSE_TIMEOUT_MIN               100
-#define AUTH_RESPONSE_TIMEOUT_MAX               5000
-#define AUTH_RESPONSE_TIMEOUT_DEF               500
-
-#define AUTH_MAX_RETRY_COUNT_MIN                1
-#define AUTH_MAX_RETRY_COUNT_MAX                5
-#define AUTH_MAX_RETRY_COUNT_DEF                2
-
-#define ASSOC_RESPONSE_TIMEOUT_MIN              1000
-#define ASSOC_RESPONSE_TIMEOUT_MAX              5000
-#define ASSOC_RESPONSE_TIMEOUT_DEF              2000
-
-#define ASSOC_MAX_RETRY_COUNT_MIN               1
-#define ASSOC_MAX_RETRY_COUNT_MAX               5
-#define ASSOC_MAX_RETRY_COUNT_DEF               2
-
-#define RX_DATA_FILTERS_ENABLED_MIN             TI_FALSE
-#define RX_DATA_FILTERS_ENABLED_MAX             TI_TRUE
-#define RX_DATA_FILTERS_ENABLED_DEF             TI_FALSE
-
-#define RX_DATA_FILTERS_DEFAULT_ACTION_MIN      FILTER_DROP
-#define RX_DATA_FILTERS_DEFAULT_ACTION_MAX      FILTER_FW_HANDLE
-#define RX_DATA_FILTERS_DEFAULT_ACTION_DEF      FILTER_DROP
-
-#define RX_DATA_FILTERS_FILTER_OFFSET_DEF       0
-#define RX_DATA_FILTERS_FILTER_OFFSET_MIN       0
-#define RX_DATA_FILTERS_FILTER_OFFSET_MAX       255
-
-#define RX_DATA_FILTERS_FILTER_MASK_DEF         ""
-#define RX_DATA_FILTERS_FILTER_MASK_LEN_DEF     0
-
-#define RX_DATA_FILTERS_FILTER_PATTERN_DEF      ""
-#define RX_DATA_FILTERS_FILTER_PATTERN_LEN_DEF  0
-
-#define RX_DATA_RE_AUTH_ACTIVE_TIMEOUT_DEF				500
-#define RX_DATA_RE_AUTH_ACTIVE_TIMEOUT_MIN				500
-#define RX_DATA_RE_AUTH_ACTIVE_TIMEOUT_MAX				800
-
-#define TX_DATA_CREDIT_CALC_TIMOEUT_DEF         100
-#define TX_DATA_CREDIT_CALC_TIMOEUT_MIN         20
-#define TX_DATA_CREDIT_CALC_TIMOEUT_MAX         1000
-
-#define TRAFFIC_ADM_CONTROL_TIMEOUT_MIN         10
-#define TRAFFIC_ADM_CONTROL_TIMEOUT_MAX         10000
-#define TRAFFIC_ADM_CONTROL_TIMEOUT_DEF         5000
-
-/* Traffic intensity threshold - Measured in packets */
-#define CTRL_DATA_TRAFFIC_THRESHOLD_HIGH_MIN    1
-#define CTRL_DATA_TRAFFIC_THRESHOLD_HIGH_MAX    1000
-#define CTRL_DATA_TRAFFIC_THRESHOLD_HIGH_DEF    100
-
-/* Traffic intensity threshold - Measured in packets */
-#define CTRL_DATA_TRAFFIC_THRESHOLD_LOW_MIN     1
-#define CTRL_DATA_TRAFFIC_THRESHOLD_LOW_MAX     1000
-#define CTRL_DATA_TRAFFIC_THRESHOLD_LOW_DEF     25
-
-/* Traffic intensity threshold - Traffic test interval - measured in ms */
-#define CTRL_DATA_TRAFFIC_THRESHOLD_INTERVAL_MIN   50
-#define CTRL_DATA_TRAFFIC_THRESHOLD_INTERVAL_MAX   10000
-#define CTRL_DATA_TRAFFIC_THRESHOLD_INTERVAL_DEF   1000
-
-#define CTRL_DATA_TRAFFIC_THRESHOLD_ENABLED_MIN TI_FALSE
-#define CTRL_DATA_TRAFFIC_THRESHOLD_ENABLED_MAX TI_TRUE
-#define CTRL_DATA_TRAFFIC_THRESHOLD_ENABLED_DEF TI_FALSE
-
-#define TRAFFIC_MONITOR_MIN_INTERVAL_PERCENT_MIN   10
-#define TRAFFIC_MONITOR_MIN_INTERVAL_PERCENT_MAX   90
-#define TRAFFIC_MONITOR_MIN_INTERVAL_PERCENT_DEF   50
-
-#define CTRL_DATA_CONT_TX_THRESHOLD_MIN  2
-#define CTRL_DATA_CONT_TX_THRESHOLD_MAX  256
-#define CTRL_DATA_CONT_TX_THRESHOLD_DEF  30
-
-#define CTRL_DATA_STEP_UP_TX_THRESHOLD_MIN    2
-#define CTRL_DATA_STEP_UP_TX_THRESHOLD_MAX    256
-#define CTRL_DATA_STEP_UP_TX_THRESHOLD_DEF    10
-
-#define CTRL_DATA_FB_SHORT_INTERVAL_MIN         20
-#define CTRL_DATA_FB_SHORT_INTERVAL_MAX         2000
-#define CTRL_DATA_FB_SHORT_INTERVAL_DEF         50
-
-#define CTRL_DATA_FB_LONG_INTERVAL_MIN          100
-#define CTRL_DATA_FB_LONG_INTERVAL_MAX          10000
-#define CTRL_DATA_FB_LONG_INTERVAL_DEF          2000
-
-#define RATE_ADAPTATION_TIMEOUT_MIN             1
-#define RATE_ADAPTATION_TIMEOUT_MAX             3600
-#define RATE_ADAPTATION_TIMEOUT_DEF             300
-
-#define RATE_ADAPT_HIGH_TRSH_AC_VO_MIN          0
-#define RATE_ADAPT_HIGH_TRSH_AC_VO_MAX          54  
-#define RATE_ADAPT_HIGH_TRSH_AC_VO_DEF          0
-
-#define RATE_ADAPT_HIGH_TRSH_AC_VI_MIN          0
-#define RATE_ADAPT_HIGH_TRSH_AC_VI_MAX          54  
-#define RATE_ADAPT_HIGH_TRSH_AC_VI_DEF          0
-
-#define RATE_ADAPT_HIGH_TRSH_AC_BE_MIN          0
-#define RATE_ADAPT_HIGH_TRSH_AC_BE_MAX          54  
-#define RATE_ADAPT_HIGH_TRSH_AC_BE_DEF          0
-
-#define RATE_ADAPT_HIGH_TRSH_AC_BK_MIN          0
-#define RATE_ADAPT_HIGH_TRSH_AC_BK_MAX          54  
-#define RATE_ADAPT_HIGH_TRSH_AC_BK_DEF          0
-
-#define RATE_ADAPT_LOW_TRSH_AC_VO_MIN           0
-#define RATE_ADAPT_LOW_TRSH_AC_VO_MAX           54  
-#define RATE_ADAPT_LOW_TRSH_AC_VO_DEF           0
-
-#define RATE_ADAPT_LOW_TRSH_AC_VI_MIN           0
-#define RATE_ADAPT_LOW_TRSH_AC_VI_MAX           54  
-#define RATE_ADAPT_LOW_TRSH_AC_VI_DEF           0
-
-#define RATE_ADAPT_LOW_TRSH_AC_BE_MIN           0
-#define RATE_ADAPT_LOW_TRSH_AC_BE_MAX           54  
-#define RATE_ADAPT_LOW_TRSH_AC_BE_DEF           0
-
-#define RATE_ADAPT_LOW_TRSH_AC_BK_MIN           0
-#define RATE_ADAPT_LOW_TRSH_AC_BK_MAX           54  
-#define RATE_ADAPT_LOW_TRSH_AC_BK_DEF           0
-
-#define CTRL_DATA_RATE_POLICY_USER_SHORT_RETRY_LIMIT_MIN 1
-#define CTRL_DATA_RATE_POLICY_USER_SHORT_RETRY_LIMIT_MAX 255
-#define CTRL_DATA_RATE_POLICY_USER_SHORT_RETRY_LIMIT_DEF 10
-
-#define CTRL_DATA_RATE_POLICY_USER_LONG_RETRY_LIMIT_MIN 1  
-#define CTRL_DATA_RATE_POLICY_USER_LONG_RETRY_LIMIT_MAX 255
-#define CTRL_DATA_RATE_POLICY_USER_LONG_RETRY_LIMIT_DEF 10  
-
-#define CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_MIN			0
-#define CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_MAX 			0xFFFFFFFF
-#define CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_CCK_DEF	 	0x0000001F	   		
-#define CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_OFDM_DEF	 	0x00001FEF	   		
-#define CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_OFDMA_DEF	0x00001FE0	   		
-#define CTRL_DATA_RATE_POLICY_USER_EN_DIS_MASK_OFDMN_DEF	0x001FFFEF	   		
-
-#define REPORT_SEVERITY_VALUE_MIN               0
-#define REPORT_SEVERITY_VALUE_MAX               0xFF
-/* WLAN_SEVERITY_WARNING | WLAN_SEVERITY_ERROR | WLAN_SEVERITY_FATAL_ERROR | WLAN_SEVERITY_CONSOLE */
-#define REPORT_SEVERITY_VALUE_DEF               0xB8
-
-#define RSN_AUTH_SUITE_MIN                      RSN_AUTH_OPEN
-#define RSN_AUTH_SUITE_MAX                      RSN_AUTH_NONE
-#define RSN_AUTH_SUITE_DEF                      RSN_AUTH_OPEN
-
-#define RSN_DEFAULT_KEY_ID_MIN                  0
-#define RSN_DEFAULT_KEY_ID_MAX                  (DOT11_MAX_DEFAULT_WEP_KEYS - 1)
-#define RSN_DEFAULT_KEY_ID_DEF                  0
-
-/* 1 sec */
-#define RSN_PMKSA_LIFETIME_MIN                  1
-/* 49 days in sec */
-#define RSN_PMKSA_LIFETIME_MAX                  4233600
-/* 1 day in sec */
-#define RSN_PMKSA_LIFETIME_DEF                  86400
-
-#define RSN_WEP_STATUS_MIN                      0
-#define RSN_WEP_STATUS_MAX                      1
-#define RSN_WEP_STATUS_DEF                      0
-
-#define RSN_WEPMIXEDMODE_ENABLED_MIN                    0
-#define RSN_WEPMIXEDMODE_ENABLED_MAX                    1
-#define RSN_WEPMIXEDMODE_ENABLED_DEF                    0
-
-#define RSN_WPAMIXEDMODE_ENABLE_MIN             0
-#define RSN_WPAMIXEDMODE_ENABLE_MAX             1
-#define RSN_WPAMIXEDMODE_ENABLE_DEF             1
-
-#define RSN_PREAUTH_ENABLE_MIN                  0
-#define RSN_PREAUTH_ENABLE_MAX                  1
-#define RSN_PREAUTH_ENABLE_DEF                  1
-
-/* In mSec units */
-#define RSN_PREAUTH_TIMEOUT_MIN                  500
-#define RSN_PREAUTH_TIMEOUT_MAX                  60000
-#define RSN_PREAUTH_TIMEOUT_DEF                 2000
-
-#define PAIRWISE_MIC_FAIL_FILTER_MIN			0
-#define PAIRWISE_MIC_FAIL_FILTER_MAX			1
-#define PAIRWISE_MIC_FAIL_FILTER_DEF			1
-
-#define  RSN_PMKIDCANDLIST_DELAY_MIN            3000
-#define  RSN_PMKIDCANDLIST_DELAY_MAX            9000
-#define  RSN_PMKIDCANDLIST_DELAY_DEF            4000
-
-#define RSN_EXTERNAL_MODE_ENABLE_MIN            0
-#define RSN_EXTERNAL_MODE_ENABLE_MAX            1
-#define RSN_EXTERNAL_MODE_ENABLE_DEF            0
-
-
-#define ETHER_MAX_PAYLOAD_SIZE            1500
-
-/* SME Values */
-#define SME_SCAN_RSSI_THRESHOLD_MIN             -100
-#define SME_SCAN_RSSI_THRESHOLD_MAX             0
-#define SME_SCAN_RSSI_THRESHOLD_DEF             "-97"
-#define SME_SCAN_RSSI_THRESHOLD_DEF_NUM         -97
-
-#define SME_SCAN_SNR_THRESHOLD_MIN              -5
-#define SME_SCAN_SNR_THRESHOLD_MAX              20
-#define SME_SCAN_SNR_THRESHOLD_DEF              "0"
-#define SME_SCAN_SNR_THRESHOLD_DEF_NUM          0
-
-#define SME_SCAN_CYCLES_MIN                     0
-#define SME_SCAN_CYCLES_MAX                     100
-#define SME_SCAN_CYCLES_DEF                     50
-
-#define SME_SCAN_MAX_DWELL_MIN                  5     /* in milli-seconds */
-#define SME_SCAN_MAX_DWELL_MAX                  500
-#define SME_SCAN_MAX_DWELL_DEF                  60
-
-#define SME_SCAN_MIN_DWELL_MIN                  5     /* in milli-seconds */
-#define SME_SCAN_MIN_DWELL_MAX                  500
-#define SME_SCAN_MIN_DWELL_DEF                  30
-
-#define SME_SCAN_PROBE_REQ_MIN                  1
-#define SME_SCAN_PROBE_REQ_MAX                  10
-#define SME_SCAN_PROBE_REQ_DEF                  3
-
-#define SME_SCAN_INTERVALS_LIST_VAL_DEF         "0,1000,2000,3000,4000,8000,16000,32000,64000,128000,256000,512000,512000,512000,512000,512000"
-#define SME_SCAN_INTERVALS_LIST_STRING_MAX_SIZE 255
-
-#define SME_SCAN_CHANNELS_LIST_G_VAL_DEF        "1,2,3,4,5,6,7,8,9,10,11,12,13,14"
-#define SME_SCAN_CHANNELS_LIST_G_STRING_MAX_SIZE 255
-
-#define SME_SCAN_CHANNELS_LIST_A_VAL_DEF        "36,40,44,48,52,56,60,64"
-#define SME_SCAN_CHANNELS_LIST_A_STRING_MAX_SIZE 255
-
-/* Scan SRV parameters */
-#define SCAN_SRV_NUMBER_OF_NO_SCAN_COMPLETE_TO_RECOVERY_DEF     3
-#define SCAN_SRV_NUMBER_OF_NO_SCAN_COMPLETE_TO_RECOVERY_MIN     1
-#define SCAN_SRV_NUMBER_OF_NO_SCAN_COMPLETE_TO_RECOVERY_MAX     1000000
-
-#define SCAN_SRV_TRIGGERED_SCAN_TIME_OUT_DEF        50000
-#define SCAN_SRV_TRIGGERED_SCAN_TIME_OUT_MIN        0
-#define SCAN_SRV_TRIGGERED_SCAN_TIME_OUT_MAX        0xffffffff
-
-
-/*
-  EEPROM-less support
-*/
-#define REG_MAC_ADDR_STR_LEN                    17
-#define REG_ARP_IP_ADDR_STR_LEN                 11
-#define REG_MAC_ADDR_PREAMBLE_STR_LEN           9
-
-#define TWD_EEPROMLESS_ENABLE_DEF               1
-#define TWD_EEPROMLESS_ENABLE_MIN               0
-#define TWD_EEPROMLESS_ENABLE_MAX               1
-
-/* Scanning Channel Values */
-#define MAX_CHAN_BITMAP_BYTES                   26
-
-#define MIN_CHANNEL_IN_BAND_2_4                  1
-#define MAX_CHANNEL_IN_BAND_2_4                 14
-
-#define SCAN_CONTROL_TABLE_ENTRY_MIN            0x00
-#define SCAN_CONTROL_TABLE_ENTRY_MAX            0xff
-#define SCAN_CONTROL_TABLE_ENTRY_DEF            0xff
-
-/* country code reset time out */
-/* 1 sec   */
-#define REGULATORY_DOMAIN_COUNTRY_TIME_RESET_MIN     1000
-/* 1 day */
-#define REGULATORY_DOMAIN_COUNTRY_TIME_RESET_MAX     86400000
-/* 1 minutes  */
-#define REGULATORY_DOMAIN_COUNTRY_TIME_RESET_DEF     60000
-
-/* d/h Enabling */
-
-/* 802.11d */
-#define MULTI_REGULATORY_DOMAIN_ENABLED_MIN     TI_FALSE
-#define MULTI_REGULATORY_DOMAIN_ENABLED_MAX     TI_TRUE
-#define MULTI_REGULATORY_DOMAIN_ENABLED_DEF     TI_FALSE
-
-/* 802.11h */
-#define SPECTRUM_MANAGEMENT_ENABLED_MIN         TI_FALSE
-#define SPECTRUM_MANAGEMENT_ENABLED_MAX         TI_TRUE
-#define SPECTRUM_MANAGEMENT_ENABLED_DEF         TI_FALSE
-
-/* Tx Power table (Power level to Dbm)*/
-#define TX_POWER_LEVEL_TABLE_24                 "21,13,10,7"
-#define TX_POWER_LEVEL_TABLE_5                  "20,12,9,6" 
-
-/* Scan concentrator init parameters - number of entries in app scan result table */
-#define SCAN_CNCN_MIN_DURATION_FOR_OS_SCANS_DEF 5
-#define SCAN_CNCN_MIN_DURATION_FOR_OS_SCANS_MIN 0
-#define SCAN_CNCN_MIN_DURATION_FOR_OS_SCANS_MAX 3600
-
-#define SCAN_CNCN_REGULATORY_DOMAIN_PASSIVE_DWELL_TIME_DEF    150
-
-#define SCAN_CNCN_DFS_PASSIVE_DWELL_TIME_DEF    150
-#define SCAN_CNCN_DFS_PASSIVE_DWELL_TIME_MIN    10
-#define SCAN_CNCN_DFS_PASSIVE_DWELL_TIME_MAX    500
-
-#define SCAN_CNCN_APP_PUSH_MODE_DEF             TI_FALSE
-#define SCAN_CNCN_APP_PUSH_MODE_MIN             TI_FALSE
-#define SCAN_CNCN_APP_PUSH_MODE_MAX             TI_TRUE
-
-#define SCAN_CNCN_APP_SRA_DEF                   20
-#define SCAN_CNCN_APP_SRA_MIN                   0
-#define SCAN_CNCN_APP_SRA_MAX                   1000
-
-#define SCAN_CNCN_RSSI_DEF                      (-100)
-#define SCAN_CNCN_RSSI_MIN                      (-100)
-#define SCAN_CNCN_RSSI_MAX                      0
-
-/* Current BSS init paramaters - keep alive default interval */
-#define NULL_KL_PERIOD_DEF      10
-#define NULL_KL_PERIOD_MIN      0
-#define NULL_KL_PERIOD_MAX      3600       
-
-/* Context-Engine init paramaters */
-#define CONTEXT_SWITCH_REQUIRED_DEF     TI_TRUE
-#define CONTEXT_SWITCH_REQUIRED_MIN     TI_FALSE
-#define CONTEXT_SWITCH_REQUIRED_MAX     TI_TRUE
-
-/* WSC */
-#define WSC_PARSE_IN_BEACON_DEF 1
-#define WSC_PARSE_IN_BEACON_MIN 0
-#define WSC_PARSE_IN_BEACON_MAX 1
-
-#define WSC_INCLUDE_IN_BEACON_DEF 1
-#define WSC_INCLUDE_IN_BEACON_MIN 0
-#define WSC_INCLUDE_IN_BEACON_MAX 1
-
-
-/* Packet Filtering Define */
-#define MIN_NUM_OF_BEACONS_IN_BUFFER 1
-#define DEF_NUM_OF_BEACONS_IN_BUFFER 5
-#define MAX_NUM_OF_BEACONS_IN_BUFFER 10
-
-/* Soft Gemini Enabling */
-#define SOFT_GEMINI_ENABLED_MIN                 SG_DISABLE
-#define SOFT_GEMINI_ENABLED_MAX                 SG_OPPORTUNISTIC
-#define SOFT_GEMINI_ENABLED_DEF                 SG_PROTECTIVE
-
-#define SOFT_GEMINI_PARAMS_INDEX_MIN			0
-#define SOFT_GEMINI_PARAMS_INDEX_MAX			(SOFT_GEMINI_PARAMS_MAX-1)
-#define SOFT_GEMINI_PARAMS_INDEX_DEF			0
-
-#define SOFT_GEMINI_PARAMS_VALUE_MIN			0
-#define SOFT_GEMINI_PARAMS_VALUE_MAX			10000000
-#define SOFT_GEMINI_PARAMS_VALUE_DEF			0
-
-
-#define SOFT_GEMINI_PARAMS_PER_THRESHOLD_MIN			0
-#define SOFT_GEMINI_PARAMS_PER_THRESHOLD_MAX			10000000
-#define SOFT_GEMINI_PARAMS_PER_THRESHOLD_DEF			7500
-
-#define SOFT_GEMINI_PARAMS_NFS_SAMPLE_INTERVAL_MIN	1
-#define SOFT_GEMINI_PARAMS_NFS_SAMPLE_INTERVAL_MAX	65000
-#define SOFT_GEMINI_PARAMS_NFS_SAMPLE_INTERVAL_DEF	400
-
-#define SOFT_GEMINI_PARAMS_LOAD_RATIO_MIN				0
-#define SOFT_GEMINI_PARAMS_LOAD_RATIO_MAX				65000
-#define SOFT_GEMINI_PARAMS_LOAD_RATIO_DEF				200
-
-#define SOFT_GEMINI_PARAMS_AUTO_PS_MODE_MIN				0
-#define SOFT_GEMINI_PARAMS_AUTO_PS_MODE_MAX				1
-#define SOFT_GEMINI_PARAMS_AUTO_PS_MODE_DEF				1
-
-#define SOFT_GEMINI_PARAMS_AUTO_SCAN_PROBE_REQ_MIN		0
-#define SOFT_GEMINI_PARAMS_AUTO_SCAN_PROBE_REQ_MAX		255
-#define SOFT_GEMINI_PARAMS_AUTO_SCAN_PROBE_REQ_DEF		170
-
-#define SOFT_GEMINI_PARAMS_ACTIVE_SCAN_DURATION_FACTOR_HV3_MIN		0
-#define SOFT_GEMINI_PARAMS_ACTIVE_SCAN_DURATION_FACTOR_HV3_MAX		255
-#define SOFT_GEMINI_PARAMS_ACTIVE_SCAN_DURATION_FACTOR_HV3_DEF		50
-
-#define SOFT_GEMINI_PARAMS_ACTIVE_SCAN_DURATION_FACTOR_A2DP_MIN		0
-#define SOFT_GEMINI_PARAMS_ACTIVE_SCAN_DURATION_FACTOR_A2DP_MAX		255
-#define SOFT_GEMINI_PARAMS_ACTIVE_SCAN_DURATION_FACTOR_A2DP_DEF		100
-
-#define SOFT_GEMINI_HV3_MAX_OVERRIDE_MIN       0
-#define SOFT_GEMINI_HV3_MAX_OVERRIDE_MAX       10
-#define SOFT_GEMINI_HV3_MAX_OVERRIDE_DEF       0 
-
-#define SOFT_GEMINI_ANTENNA_CONFIGURATION_MIN       0
-#define SOFT_GEMINI_ANTENNA_CONFIGURATION_MAX       1
-#define SOFT_GEMINI_ANTENNA_CONFIGURATION_DEF       0
-
-#define SOFT_GEMINI_BEACON_MISS_PERCENT_MIN       0 
-#define SOFT_GEMINI_BEACON_MISS_PERCENT_MAX       100
-#define SOFT_GEMINI_BEACON_MISS_PERCENT_DEF       60
-
-#define SOFT_GEMINI_RATE_ADAPT_THRESH_MIN       1 
-#define SOFT_GEMINI_RATE_ADAPT_THRESH_MAX       54
-#define SOFT_GEMINI_RATE_ADAPT_THRESH_DEF       12
-
-#define SOFT_GEMINI_RATE_ADAPT_SNR_MIN       0 
-#define SOFT_GEMINI_RATE_ADAPT_SNR_MAX       255
-#define SOFT_GEMINI_RATE_ADAPT_SNR_DEF       0
-
-
-
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_BR_MIN 		 0
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_BR_MAX 		 1000
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_BR_DEF 		 10
-
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_BR_MIN 		 0
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_BR_MAX 		 1000
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_BR_DEF 		 30
-
-#define SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_BR_MIN 		 0
-#define SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_BR_MAX 		 1000
-#define SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_BR_DEF 		 8
-
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_BR_MIN 		 0
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_BR_MAX 		 1000
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_BR_DEF 		 20
-
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_BR_MIN 		 0
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_BR_MAX 		 1000
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_BR_DEF 		 50
-
-#define SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_BR_MIN 		 0
-#define SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_BR_MAX 		 1000
-#define SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_BR_DEF 		 8
-
-
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_EDR_MIN 		 0
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_EDR_MAX 		 1000
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_EDR_DEF 		 7
-
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_EDR_MIN 		 0
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_EDR_MAX 		 1000
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_EDR_DEF 		 25
-
-#define SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_EDR_MIN 		 0
-#define SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_EDR_MAX 		 1000
-#define SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_EDR_DEF 		 20
-
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_EDR_MIN 		 0
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_EDR_MAX 		 1000
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_EDR_DEF 		 8
-
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_EDR_MIN 		 0
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_EDR_MAX 		 1000
-#define SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_EDR_DEF 		 40
-
-#define SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_EDR_MIN 		 0
-#define SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_EDR_MAX 		 1000
-#define SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_EDR_DEF 		 20
-
-
-
-
-
-#define SOFT_GEMINI_RXT_MIN 		 		0
-#define SOFT_GEMINI_RXT_MAX 		 		65535
-#define SOFT_GEMINI_RXT_DEF 		 		1200
-
-#define SOFT_GEMINI_TXT_MIN 		 		0
-#define SOFT_GEMINI_TXT_MAX 		 		65535
-#define SOFT_GEMINI_TXT_DEF 		 		1000
-
-#define SOFT_GEMINI_ADAPTIVE_RXT_TXT_MIN   	0
-#define SOFT_GEMINI_ADAPTIVE_RXT_TXT_MAX 	1
-#define SOFT_GEMINI_ADAPTIVE_RXT_TXT_DEF 	1 /* 0 = Disabled, 1= Enabled */
-
-#define SOFT_GEMINI_PS_POLL_TIMEOUT_MIN   	0
-#define SOFT_GEMINI_PS_POLL_TIMEOUT_MAX 	1000000
-#define SOFT_GEMINI_PS_POLL_TIMEOUT_DEF 	10
-
-#define SOFT_GEMINI_UPSD_TIMEOUT_MIN   		0
-#define SOFT_GEMINI_UPSD_TIMEOUT_MAX 		1000000
-#define SOFT_GEMINI_UPSD_TIMEOUT_DEF 		10
-
-
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR_MIN   0
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR_MAX 	1000
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR_DEF 	7
-
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR_MIN   0
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR_MAX 	1000
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR_DEF 	15
-
-#define SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR_MIN   0
-#define SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR_MAX 	1000
-#define SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR_DEF 	15
-
-
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR_MIN    0
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR_MAX 	1000
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR_DEF 	8
-
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR_MIN    0
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR_MAX 	1000
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR_DEF 	20
-
-#define SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR_MIN    0
-#define SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR_MAX 	1000
-#define SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR_DEF 	15
-
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_BR_MIN    0
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_BR_MAX    1000
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_BR_DEF    20
-
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_BR_MIN    0
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_BR_MAX    1000
-#define SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_BR_DEF    50
-
-#define SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_BR_MIN    0
-#define SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_BR_MAX    1000
-#define SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_BR_DEF    10
-
-#define SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_HV3_MIN    0
-#define SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_HV3_MAX 	1000
-#define SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_HV3_DEF 	200
-
-#define SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_A2DP_MIN    0
-#define SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_A2DP_MAX 	1000
-#define SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_A2DP_DEF 	800
-
-#define SOFT_GEMINI_PASSIVE_SCAN_A2DP_BT_TIME_MIN    0
-#define SOFT_GEMINI_PASSIVE_SCAN_A2DP_BT_TIME_MAX 	100
-#define SOFT_GEMINI_PASSIVE_SCAN_A2DP_BT_TIME_DEF 	75
-
-#define SOFT_GEMINI_PASSIVE_SCAN_A2DP_WLAN_TIME_MIN  0
-#define SOFT_GEMINI_PASSIVE_SCAN_A2DP_WLAN_TIME_MAX 	100
-#define SOFT_GEMINI_PASSIVE_SCAN_A2DP_WLAN_TIME_DEF 	15
-
-#define SOFT_GEMINI_DHCP_TIME_MIN  	0
-#define SOFT_GEMINI_DHCP_TIME_MAX 	65535
-#define SOFT_GEMINI_DHCP_TIME_DEF 	5000
-
-#define SOFT_GEMINI_HV3_MAX_SERVED_MIN	0
-#define SOFT_GEMINI_HV3_MAX_SERVED_MAX 	256
-#define SOFT_GEMINI_HV3_MAX_SERVED_DEF 	6
-
-#define SOFT_GEMINI_TEMP_PARAM_1_MIN    0
-#define SOFT_GEMINI_TEMP_PARAM_1_MAX 	100000
-#define SOFT_GEMINI_TEMP_PARAM_1_DEF 	0
-
-#define SOFT_GEMINI_TEMP_PARAM_2_MIN    0
-#define SOFT_GEMINI_TEMP_PARAM_2_MAX 	100000
-#define SOFT_GEMINI_TEMP_PARAM_2_DEF 	0
-
-#define SOFT_GEMINI_TEMP_PARAM_3_MIN    0
-#define SOFT_GEMINI_TEMP_PARAM_3_MAX 	100000
-#define SOFT_GEMINI_TEMP_PARAM_3_DEF 	0
-
-#define SOFT_GEMINI_TEMP_PARAM_4_MIN    0
-#define SOFT_GEMINI_TEMP_PARAM_4_MAX 	100000
-#define SOFT_GEMINI_TEMP_PARAM_4_DEF 	23
-
-#define SOFT_GEMINI_TEMP_PARAM_5_MIN    0
-#define SOFT_GEMINI_TEMP_PARAM_5_MAX 	100000
-#define SOFT_GEMINI_TEMP_PARAM_5_DEF 	22
-
-
-#define WIFI_WMM_PS_MIN                         0  
-#define WIFI_WMM_PS_MAX                         1
-#define WIFI_WMM_PS_DEF                         0 
-#define SOFT_GEMINI_PARAMS_ALLOW_PA_SD_MIN                  (0)  
-#define SOFT_GEMINI_PARAMS_ALLOW_PA_SD_MAX                  (1)
-#define SOFT_GEMINI_PARAMS_ALLOW_PA_SD_DEF                  (1) 
-
-#define SOFT_GEMINI_PARAMS_TIME_BEFORE_BEACON_MIN           (0)  
-#define SOFT_GEMINI_PARAMS_TIME_BEFORE_BEACON_MAX           (20000)
-#define SOFT_GEMINI_PARAMS_TIME_BEFORE_BEACON_DEF           (6300) 
-
-#define SOFT_GEMINI_PARAMS_HPDM_MAX_GUARD_MIN           (0)  
-#define SOFT_GEMINI_PARAMS_HPDM_MAX_GUARD_MAX           (50000)
-#define SOFT_GEMINI_PARAMS_HPDM_MAX_GUARD_DEF           (1050) 
-
-#define SOFT_GEMINI_PARAMS_TIME_OUT_NEXT_WLAN_MIN           (100)  
-#define SOFT_GEMINI_PARAMS_TIME_OUT_NEXT_WLAN_MAX           (50000)
-#define SOFT_GEMINI_PARAMS_TIME_OUT_NEXT_WLAN_DEF           (2550) 
-
-#define SOFT_GEMINI_PARAMS_AUTO_MODE_NO_CTS_MIN         (0)  
-#define SOFT_GEMINI_PARAMS_AUTO_MODE_NO_CTS_MAX         (1)
-#define SOFT_GEMINI_PARAMS_AUTO_MODE_NO_CTS_DEF         (0) 
-
-#define SOFT_GEMINI_PARAMS_BT_HP_RESPECTED_MIN          (0)  
-#define SOFT_GEMINI_PARAMS_BT_HP_RESPECTED_MAX          (20)
-#define SOFT_GEMINI_PARAMS_BT_HP_RESPECTED_DEF          (3) 
-
-#define SOFT_GEMINI_PARAMS_WLAN_RX_MIN_RATE_MIN         (0)  
-#define SOFT_GEMINI_PARAMS_WLAN_RX_MIN_RATE_MAX         (54)
-#define SOFT_GEMINI_PARAMS_WLAN_RX_MIN_RATE_DEF         (24) 
-
-/* CoexActivity table */
-#define COEX_ACTIVITY_PARAMS_COEX_IP_MIN               (0)
-#define COEX_ACTIVITY_PARAMS_COEX_IP_MAX               (1)
-#define COEX_ACTIVITY_PARAMS_COEX_IP_DEF               (1)
-
-#define COEX_ACTIVITY_PARAMS_ACTIVITY_ID_MIN           (0)
-#define COEX_ACTIVITY_PARAMS_ACTIVITY_ID_MAX           (24)
-#define COEX_ACTIVITY_PARAMS_ACTIVITY_ID_DEF           (0)
-
-#define COEX_ACTIVITY_PARAMS_DEFAULT_PRIO_MIN          (0)
-#define COEX_ACTIVITY_PARAMS_DEFAULT_PRIO_MAX          (255)
-#define COEX_ACTIVITY_PARAMS_DEFAULT_PRIO_DEF          (0)
-
-#define COEX_ACTIVITY_PARAMS_RAISED_PRIO_MIN           (0)
-#define COEX_ACTIVITY_PARAMS_RAISED_PRIO_MAX           (255)
-#define COEX_ACTIVITY_PARAMS_RAISED_PRIO_DEF           (0)
-
-#define COEX_ACTIVITY_PARAMS_MIN_SERVICE_MIN           (0)
-#define COEX_ACTIVITY_PARAMS_MIN_SERVICE_MAX           (65535)
-#define COEX_ACTIVITY_PARAMS_MIN_SERVICE_DEF           (0)
-
-#define COEX_ACTIVITY_PARAMS_MAX_SERVICE_MIN           (0)
-#define COEX_ACTIVITY_PARAMS_MAX_SERVICE_MAX           (65535)
-#define COEX_ACTIVITY_PARAMS_MAX_SERVICE_DEF           (0)
-
-/* FM Coexistence */
-#define FM_COEX_ENABLE_DEF                             TI_TRUE 
-#define FM_COEX_ENABLE_MIN                             TI_FALSE  
-#define FM_COEX_ENABLE_MAX                             TI_TRUE 
-
-#define FM_COEX_SWALLOW_PERIOD_DEF                     5
-#define FM_COEX_SWALLOW_PERIOD_MIN                     0
-#define FM_COEX_SWALLOW_PERIOD_MAX                     0xFF
-
-#define FM_COEX_N_DIVIDER_FREF_SET1_DEF                0xFF
-#define FM_COEX_N_DIVIDER_FREF_SET1_MIN                0
-#define FM_COEX_N_DIVIDER_FREF_SET1_MAX                0xFF
-
-#define FM_COEX_N_DIVIDER_FREF_SET2_DEF                12                  
-#define FM_COEX_N_DIVIDER_FREF_SET2_MIN                0   
-#define FM_COEX_N_DIVIDER_FREF_SET2_MAX                0xFF
-
-#define FM_COEX_M_DIVIDER_FREF_SET1_DEF                148   
-#define FM_COEX_M_DIVIDER_FREF_SET1_MIN                0   
-#define FM_COEX_M_DIVIDER_FREF_SET1_MAX                0xFFFF
-
-#define FM_COEX_M_DIVIDER_FREF_SET2_DEF                0xFFFF 
-#define FM_COEX_M_DIVIDER_FREF_SET2_MIN                0    
-#define FM_COEX_M_DIVIDER_FREF_SET2_MAX                0xFFFF
-
-#define FM_COEX_PLL_STABILIZATION_TIME_DEF             0xFFFFFFFF 
-#define FM_COEX_PLL_STABILIZATION_TIME_MIN             0
-#define FM_COEX_PLL_STABILIZATION_TIME_MAX             0xFFFFFFFF
-
-#define FM_COEX_LDO_STABILIZATION_TIME_DEF             0xFFFF
-#define FM_COEX_LDO_STABILIZATION_TIME_MIN             0
-#define FM_COEX_LDO_STABILIZATION_TIME_MAX             0xFFFF
-
-#define FM_COEX_DISTURBED_BAND_MARGIN_DEF              0xFF
-#define FM_COEX_DISTURBED_BAND_MARGIN_MIN              0
-#define FM_COEX_DISTURBED_BAND_MARGIN_MAX              0xFF
-
-#define FM_COEX_SWALLOW_CLK_DIF_DEF                    0xFF
-#define FM_COEX_SWALLOW_CLK_DIF_MIN                    0
-#define FM_COEX_SWALLOW_CLK_DIF_MAX                    0xFF
-
-
-/* Rate Management */
-
-#define RATE_MNG_RATE_RETRY_SCORE_DEF    32000
-#define RATE_MNG_RATE_RETRY_SCORE_MIN    0
-#define RATE_MNG_RATE_RETRY_SCORE_MAX    65536
-
-#define RATE_MNG_PER_ADD_DEF             8192
-#define RATE_MNG_PER_ADD_MIN             0
-#define RATE_MNG_PER_ADD_MAX             65536
-
-#define RATE_MNG_PER_TH1_DEF             2048                       
-#define RATE_MNG_PER_TH1_MIN             0
-#define RATE_MNG_PER_TH1_MAX             65536 
-
-#define RATE_MNG_PER_TH2_DEF             4096
-#define RATE_MNG_PER_TH2_MIN             0
-#define RATE_MNG_PER_TH2_MAX             65536
-
-#define RATE_MNG_MAX_PER_DEF             8100
-#define RATE_MNG_MAX_PER_MIN             0
-#define RATE_MNG_MAX_PER_MAX             65536
-
-#define RATE_MNG_INVERSE_CURISITY_FACTOR_DEF 5
-#define RATE_MNG_INVERSE_CURISITY_FACTOR_MIN 0
-#define RATE_MNG_INVERSE_CURISITY_FACTOR_MAX 256
-
-#define RATE_MNG_TX_FAIL_LOW_TH_DEF       4
-#define RATE_MNG_TX_FAIL_LOW_TH_MIN       0
-#define RATE_MNG_TX_FAIL_LOW_TH_MAX       256
-
-#define RATE_MNG_TX_FAIL_HIGH_TH_DEF      10
-#define RATE_MNG_TX_FAIL_HIGH_TH_MIN      0
-#define RATE_MNG_TX_FAIL_HIGH_TH_MAX      256
-
-#define RATE_MNG_PER_ALPHA_SHIFT_DEF       4
-#define RATE_MNG_PER_ALPHA_SHIFT_MIN       0
-#define RATE_MNG_PER_ALPHA_SHIFT_MAX       256
-
-#define RATE_MNG_PER_ADD_SHIFT_DEF         13
-#define RATE_MNG_PER_ADD_SHIFT_MIM         0
-#define RATE_MNG_PER_ADD_SHIFT_MAX         256
-
-#define RATE_MNG_PER_BETA1_SHIFT_DEF       10
-#define RATE_MNG_PER_BETA1_SHIFT_MIN       0
-#define RATE_MNG_PER_BETA1_SHIFT_MAX       256
-
-#define RATE_MNG_PER_BETA2_SHIFT_DEF	   8
-#define RATE_MNG_PER_BETA2_SHIFT_MIN       0
-#define RATE_MNG_PER_BETA2_SHIFT_MAX       256
-
-#define RATE_MNG_MAX_PER_DEF               8100
-#define RATE_MNG_MAX_PER_MIN               0
-#define RATE_MNG_MAX_PER_MAX               65536
-
-#define RATE_MNG_RATE_CHECK_UP_DEF         2
-#define RATE_MNG_RATE_CHECK_UP_MIN         0
-#define RATE_MNG_RATE_CHECK_UP_MAX         256
-
-#define RATE_MNG_RATE_CHECK_DOWN_DEF       12
-#define RATE_MNG_RATE_CHECK_DOWN_MIN       0
-#define RATE_MNG_RATE_CHECK_DOWN_MAX       256
-
-#define RATE_MNG_RATE_RETRY_POLICY_DEF_TABLE  "1,1,1,3,3,3,6,6,6,6,9,9,9"
-#define RATE_MNG_MAX_RETRY_POLICY_PARAMS_LEN  13
-#define RATE_MNG_MAX_STR_LEN  255
-
-
-
-/* Configurable Scan Rate */
-#define SCAN_RATE_MODE_B_MIN                    DRV_RATE_1M
-#define SCAN_RATE_MODE_B_MAX                    DRV_RATE_11M
-#define SCAN_RATE_MODE_B_DEF                    DRV_RATE_2M
-
-#define SCAN_RATE_MODE_G_MIN                    DRV_RATE_1M
-#define SCAN_RATE_MODE_G_MAX                    DRV_RATE_54M
-#define SCAN_RATE_MODE_G_DEF                    DRV_RATE_2M
-
-#define SCAN_RATE_MODE_A_MIN                    DRV_RATE_6M
-#define SCAN_RATE_MODE_A_MAX                    DRV_RATE_54M
-#define SCAN_RATE_MODE_A_DEF                    DRV_RATE_6M
-
-/* Probe request number during scan */
-#define SCAN_PROBE_REQ_NUMBER_MIN   1
-#define SCAN_PROBE_REQ_NUMBER_MAX   7
-#define SCAN_PROBE_REQ_NUMBER_DEF   3
-
-
-#define ACX_64BITS_WEP_KEY_LENGTH_BYTES         5
-#define ACX_128BITS_WEP_KEY_LENGTH_BYTES        13
-#define ACX_256BITS_WEP_KEY_LENGTH_BYTES        29
-#define ACX_MAX_WEP_KEY_LENGTH_BYTES            29
-
-
-/* Configurable radio parameters */
-#define RADIO_TX_PER_POWER_LIMITS_2_4_NORMAL_DEF_TABLE      "1d,1f,22,26,28,29"
-#define RADIO_TX_PER_POWER_LIMITS_2_4_DEGRADED_DEF_TABLE    "1a,1f,22,24,26,28"
-#define RADIO_TX_PER_POWER_LIMITS_2_4_EXTREME_DEF_TABLE     "16,1d,1e,20,24,25"
-
-
-#define RADIO_TX_PER_POWER_LIMITS_2_4_11B_DEF_TABLE         "50,50,50,50,50,50,50,50,50,50,50,50,50,50"
-#define RADIO_TX_PER_POWER_LIMITS_2_4_OFDM_DEF_TABLE        "50,50,50,50,50,50,50,50,50,50,50,50,50,50"
-#define RADIO_TX_PA_GAIN_VS_BIAS_OFFSET_2_4_DEF_TABLE       "f3,54,55,56,57,58"
-#define RADIO_TX_PD_VS_RATE_OFFSET_2_4_DEF_TABLE            "01,02,02,02,02,00"
-#define RADIO_TX_BIAS_2_4_DEF_TABLE                         "11,11,15,11,15,0f"
-#define RADIO_TX_BIP_REF_VOLTAGE_DEF_TABLE_5G               "173,188,187,18b,18a,186,18c"
-#define RADIO_TX_BIP_REF_POWER_DEF_TABLE_5G                 "80,80,80,80,80,80,80"
-#define RADIO_TX_BIP_OFF_BD_5G                              "00,00,00,00,00,00"
-
-
-#define RADIO_TX_PER_POWER_LIMITS_5_NORMAL_DEF_TABLE        "50,50,50,50,50,50"
-#define RADIO_TX_PER_POWER_LIMITS_5_DEGRADED_DEF_TABLE      "50,50,50,50,50,50"
-#define RADIO_TX_PER_POWER_LIMITS_5_EXTREME_DEF_TABLE       "50,50,50,50,50,50"
-
-#define RADIO_TX_PER_POWER_LIMITS_5_OFDM_DEF_TABLE          "50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50"
-#define RADIO_TX_PD_VS_RATE_OFFSET_5_DEF_TABLE              "00,00,00,00,00,00"
-#define RADIO_TX_BIAS_5_DEF_TABLE                           "10,10,10,10,10,10"
-#define RADIO_RX_FEM_INSERT_LOSS_5_DEF_TABLE                "10,10,10,10,10,10,10"
-#define RADIO_RX_TRACE_INSERT_LOSS_5_DEF_TABLE              "00,00,00,00,00,00,00"
-#define RADIO_TX_TRACE_LOSS_5_DEF_TABLE                     "00,00,00,00,00,00,00"
-
-#define RADIO_RX_FEM_INSERT_LOSS_2_4_MIN                    0
-#define RADIO_RX_FEM_INSERT_LOSS_2_4_DEF                    375  /* 0x15e
- */
-#define RADIO_RX_FEM_INSERT_LOSS_2_4_MAX                    0xffff
-
-
-#define RADIO_DEGRADED_LOW_TO_NORMAL_THR_2_4G_MIN        0
-#define RADIO_DEGRADED_LOW_TO_NORMAL_THR_2_4G_DEF        30      /* 0x1e */
-#define RADIO_DEGRADED_LOW_TO_NORMAL_THR_2_4G_MAX        255
-
-#define RADIO_NORMAL_TO_DEGRADED_HIGH_THR_2_4G_MIN       0
-#define RADIO_NORMAL_TO_DEGRADED_HIGH_THR_2_4G_DEF       45      /* 0x2d */
-#define RADIO_NORMAL_TO_DEGRADED_HIGH_THR_2_4G_MAX       255
-
-#define RADIO_DEGRADED_LOW_TO_NORMAL_THR_5G_MIN          0
-#define RADIO_DEGRADED_LOW_TO_NORMAL_THR_5G_DEF          30      /* 0x1e */
-#define RADIO_DEGRADED_LOW_TO_NORMAL_THR_5G_MAX          255
-
-#define RADIO_NORMAL_TO_DEGRADED_HIGH_THR_5G_MIN         0
-#define RADIO_NORMAL_TO_DEGRADED_HIGH_THR_5G_DEF         45      /* 0x2d */
-#define RADIO_NORMAL_TO_DEGRADED_HIGH_THR_5G_MAX         255
-
-
-#define RADIO_RX_TRACE_INSERT_LOSS_2_4_MIN                  0
-#define RADIO_RX_TRACE_INSERT_LOSS_2_4_DEF                  0
-#define RADIO_RX_TRACE_INSERT_LOSS_2_4_MAX                  255
-
-#define RADIO_RX_RSSI_PROCESS_2_4_DEF_TABLE                 "7a,7b,7c,7d,7e,7f,80,81,82,83,84,85,86,87,88"
-#define RADIO_RX_RSSI_PROCESS_5_DEF_TABLE                   "00,00,00,00,00,00,00,00,00,00,00,00,00,00,00"
-
-#define RADIO_TX_PER_CH_POWER_COMPENSATION_2_4_DEF	       "00,00,00,00,00,00,00"
-#define RADIO_TX_PER_CH_POWER_COMPENSATION_5_DEF	       "00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00"
-
-#define RADIO_FREF_CLOCK_SETTING_TIME_MIN    				0
-#define RADIO_FREF_CLOCK_SETTING_TIME_DEF    				5
-#define RADIO_FREF_CLOCK_SETTING_TIME_MAX    				15
-
-#define RADIO_FREF_CLOCK_ENABLED_MIN                        TI_FALSE
-#define RADIO_FREF_CLOCK_ENABLED_MAX                        TI_TRUE
-#define RADIO_FREF_CLOCK_ENABLED_DEF                        TI_FALSE
-
-#define RADIO_FREF_CLOCK_MIN                        		0	/* 19.2, 26, 38.4, 52 MHz */
-#define RADIO_FREF_CLOCK_DEF                        		2
-#define RADIO_FREF_CLOCK_MAX                        		31
-
-
-/* 
- * Driver-Main parameters values
- */
-/* Set WLAN driver thread priority - Note that this is an OS dependent parameter! */
-#define WLAN_DRV_THREAD_PRIORITY_MIN                        0
-#define WLAN_DRV_THREAD_PRIORITY_MAX                        255
-#define WLAN_DRV_THREAD_PRIORITY_DEF                        251
-
-/* Set bus driver thread priority - Note that this is an OS dependent parameter! */
-#define BUS_DRV_THREAD_PRIORITY_MIN                         0
-#define BUS_DRV_THREAD_PRIORITY_MAX                         255
-#define BUS_DRV_THREAD_PRIORITY_DEF                         251
-
-/* In SDIO block-mode:  BlkSize = 1 << BlkSizeShift    (current block size is: 1<<9 = 512 bytes) */
-#define SDIO_BLK_SIZE_SHIFT_MIN                             0
-#define SDIO_BLK_SIZE_SHIFT_MAX                             16
-#define SDIO_BLK_SIZE_SHIFT_DEF                             9
-
-
-/*****************************************************************************
- **         POWER MANAGER MODULE REGISTRY DEFINITIONS                       **
- *****************************************************************************/
-/** \enum PowerMode_e */
-/* MUST be sync with OS_802_11_POWER_PROFILE */
-typedef enum 
-{
-    POWER_MODE_AUTO,        /**< In this mode the power manager module is toggle states
-                             * (ACTIVE, SHORT_DOZE and LONG_DOZE) by its own inner algorithm.
-                             */
-
-    POWER_MODE_ACTIVE,      /**< In this mode there is no power save, the host interface & the radio
-                             * is always active. The TNET is constantly awake. This mode is used,
-                             * for example, when the device is powered from an AC power source,
-                             * and provides maximum throughput and minimal latency.
-                             */
-
-    POWER_MODE_SHORT_DOZE,  /**< In this mode the system is going to ELP state and awakes (by the
-                             * FW) every beacon. The F/W wakes up the host on every Beacon passes
-                             * the Beacon to the driver and returns to ELP Doze as soon as possible.
-                             */
-
-    POWER_MODE_LONG_DOZE,    /**< In this mode the system is going to ELP state and awakes (by the
-                             * FW) every DTIM or listen interval. This mode consumes low power,
-                             * while still waking-up for Beacons once in a while. The system spends
-                             * a lot of time in ELP-Doze, and the F/W rarely wakes up the host.
-                             */
-
-    POWER_MODE_PS_ONLY,     /**< In this mode the system is setting the Ps as ON. 
-                             * the ELP state is changing to SHORT or LONG DOZE (According to last configuration). 
-                             * Auto mode won't be used here.
-                             */
-
-    POWER_MODE_MAX
-}PowerMgr_PowerMode_e;
-
-
-/** \enum PowerMgr_Priority_e */
-typedef enum 
-{
-    POWER_MANAGER_USER_PRIORITY,           /**< indicates the default user priority. */
-    POWER_MANAGER_SG_PRIORITY,             /**< Indicate the Soft Gemini priority */
-    POWER_MANAGER_REAUTH_PRIORITY,         /**< Indicate 802.1x reauthentication priority */
-    POWER_MANAGER_PS_POLL_FAILURE_PRIORITY,/**< After receiving the PsPoll failure event */
-    POWER_MANAGER_MAX_PRIORITY                                                      
-}PowerMgr_Priority_e;
-
-
-enum PowerMgr_registryDefinitions
-{
-    POWER_MODE_MIN_VALUE = POWER_MODE_AUTO,
-    POWER_MODE_MAX_VALUE = POWER_MODE_LONG_DOZE,
-    POWER_MODE_DEF_VALUE = POWER_MODE_AUTO,
-
-    BEACON_RECEIVE_TIME_MIN_VALUE = 10,
-    BEACON_RECEIVE_TIME_MAX_VALUE = 1000,
-    BEACON_RECEIVE_TIME_DEF_VALUE = 50,
-
-    BASE_BAND_WAKE_UP_TIME_MIN_VALUE = 100,      /* in micro seconds */
-    BASE_BAND_WAKE_UP_TIME_MAX_VALUE = 10000,
-    BASE_BAND_WAKE_UP_TIME_DEF_VALUE = 2000,
-
-    PLL_LOCK_TIME_MIN_VALUE = 500,
-    PLL_LOCK_TIME_MAX_VALUE = 20000,
-    PLL_LOCK_TIME_DEF_VALUE = 4000,
-
-    HANGOVER_PERIOD_MIN_VALUE = 5,
-    HANGOVER_PERIOD_MAX_VALUE = 255,
-    HANGOVER_PERIOD_DEF_VALUE = 10,
-
-    BEACON_LISTEN_INTERVAL_MIN_VALUE = 1,
-    BEACON_LISTEN_INTERVAL_MAX_VALUE = 50,
-    BEACON_LISTEN_INTERVAL_DEF_VALUE = 1,
-
-    DTIM_LISTEN_INTERVAL_MIN_VALUE = 1,
-    DTIM_LISTEN_INTERVAL_MAX_VALUE = 50,
-    DTIM_LISTEN_INTERVAL_DEF_VALUE = 1,
-
-    BEACON_FILTERING_MIN_VALUE = 0,
-    BEACON_FILTERING_MAX_VALUE = 30,
-    BEACON_FILTERING_DEF_VALUE = 10,
-
-    N_CONSECUTIVE_BEACONS_MISSED_MIN_VALUE = 0,
-    N_CONSECUTIVE_BEACONS_MISSED_MAX_VALUE = 50,
-    N_CONSECUTIVE_BEACONS_MISSED_DEF_VALUE = 1,
-
-    ENTER_TO_802_11_POWER_SAVE_RETRIES_MIN_VALUE = 0,
-    ENTER_TO_802_11_POWER_SAVE_RETRIES_MAX_VALUE = 50,
-    ENTER_TO_802_11_POWER_SAVE_RETRIES_DEF_VALUE = 5,
-
-    AUTO_POWER_MODE_INTERVAL_MIN_VALUE = 100,
-    AUTO_POWER_MODE_INTERVAL_MAX_VALUE = 30000,
-    AUTO_POWER_MODE_INTERVAL_DEF_VALUE = 1000,
-
-    AUTO_POWER_MODE_ACTIVE_TH_MIN_VALUE = 2,
-    AUTO_POWER_MODE_ACTIVE_TH_MAX_VALUE = 30000,
-    AUTO_POWER_MODE_ACTIVE_TH_DEF_VALUE = 15,
-
-    AUTO_POWER_MODE_DOZE_TH_MIN_VALUE = 1,
-    AUTO_POWER_MODE_DOZE_TH_MAX_VALUE = 30000,
-    AUTO_POWER_MODE_DOZE_TH_DEF_VALUE = 8,
-
-    AUTO_POWER_MODE_DOZE_MODE_MIN_VALUE = POWER_MODE_SHORT_DOZE,
-    AUTO_POWER_MODE_DOZE_MODE_MAX_VALUE = POWER_MODE_LONG_DOZE,
-    AUTO_POWER_MODE_DOZE_MODE_DEF_VALUE = POWER_MODE_SHORT_DOZE,
-
-    DCO_ITRIM_ENABLE_MIN = TI_FALSE,
-    DCO_ITRIM_ENABLE_MAX = TI_TRUE,
-    DCO_ITRIM_ENABLE_DEF = TI_FALSE,
-
-    DCO_ITRIM_MODERATION_TIMEOUT_MIN = 10000,
-    DCO_ITRIM_MODERATION_TIMEOUT_MAX = 1000000,
-    DCO_ITRIM_MODERATION_TIMEOUT_DEF = 50000,
-
-    POWER_MGMNT_MODE_DEF_VALUE = 1,
-    POWER_MGMNT_MODE_MIN_VALUE = 0,
-    POWER_MGMNT_MODE_MAX_VALUE = 1,
-
-    POWER_MGMNT_NEED_TO_SEND_NULL_PACKET_DEF_VALUE = 1,
-    POWER_MGMNT_NEED_TO_SEND_NULL_PACKET_MIN_VALUE = 0,
-    POWER_MGMNT_NEED_TO_SEND_NULL_PACKET_MAX_VALUE = 1,
-
-    /*
-     bit14 - "1" send Prob Request in PBCC
-     bit15 - "1" short preamble, "0" long preammle
-     bit0:bit12  Rates 
-     */
-    POWER_MGMNT_NULL_PACKET_RATE_MOD_DEF_VALUE =  ((1<<DRV_RATE_1M) | (1<<DRV_RATE_2M)),
-    POWER_MGMNT_NULL_PACKET_RATE_MOD_MIN_VALUE = 0,
-    POWER_MGMNT_NULL_PACKET_RATE_MOD_MAX_VALUE = 255 ,
-
-    POWER_MGMNT_NUM_NULL_PACKET_RETRY_DEF_VALUE = 5,
-    POWER_MGMNT_NUM_NULL_PACKET_RETRY_MIN_VALUE = 1,
-    POWER_MGMNT_NUM_NULL_PACKET_RETRY_MAX_VALUE = 255,
-
-	POWER_MGMNT_RE_AUTH_ACTIVE_PRIO_DEF_VALUE = 0,
-    POWER_MGMNT_RE_AUTH_ACTIVE_PRIO_MIN_VALUE = 0,
-    POWER_MGMNT_RE_AUTH_ACTIVE_PRIO_MAX_VALUE = 1,
-
-    /*BET*/
-    POWER_MGMNT_BET_ENABLE_MIN = 0,
-    POWER_MGMNT_BET_ENABLE_MAX = 1,
-    POWER_MGMNT_BET_ENABLE_DEF = 1,
-    POWER_MGMNT_BET_DISABLE_THRESHOLD_MIN = 0,
-    POWER_MGMNT_BET_DISABLE_THRESHOLD_MAX = 255,
-    POWER_MGMNT_BET_DISABLE_THRESHOLD_DEF = 8,
-    POWER_MGMNT_BET_MAX_CONSC_MIN = 1,
-    POWER_MGMNT_BET_MAX_CONSC_MAX = 50,
-    POWER_MGMNT_BET_MAX_CONSC_DEF = 8,
-    HAL_CTRL_BET_DISABLE_THRESHOLD_MIN = 0,
-    HAL_CTRL_BET_DISABLE_THRESHOLD_MAX = 255,
-    HAL_CTRL_BET_DISABLE_THRESHOLD_DEF = 12,
-
-/*--------------- Maximal time between full beacon reception ------------------*/
-    POWER_MGMNT_MAX_FULL_BEACON_MIN = 0,
-    POWER_MGMNT_MAX_FULL_BEACON_MAX = 10000,
-    POWER_MGMNT_MAX_FULL_BEACON_DEF = 5000,
-
-    HOST_CLK_SETTLE_TIME_USEC_MIN = 0,
-    HOST_CLK_SETTLE_TIME_USEC_MAX = 30000,
-    HOST_CLK_SETTLE_TIME_USEC_DEF = 5000,
-
-    HOST_FAST_WAKE_SUPPORT_MIN = 0,
-    HOST_FAST_WAKE_SUPPORT_MAX = 1,
-    HOST_FAST_WAKE_SUPPORT_DEF = 0
-
-};
-
-/*****************************************************************************
- **         END POWER MANAGER MODULE REGISTRY DEFINITIONS                   **
- *****************************************************************************/
-
-
-typedef enum
-{
-    ERP_PROTECTION_NONE       = 0,
-    ERP_PROTECTION_STANDARD   = 1,
-    ERP_PROTECTION_TI_TRICK   = 2
-} erpProtectionType_e;
-
-
-#endif /* _CORE_DEFAULT_PARAMS_H */
-
diff --git a/wl1271/stad/Export_Inc/p_buffer.h b/wl1271/stad/Export_Inc/p_buffer.h
deleted file mode 100644
index 6e562f7..0000000
--- a/wl1271/stad/Export_Inc/p_buffer.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * p_buffer.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef P_BUFFER
-#define P_BUFFER
-
-
-#define P_BUFFER_ADD_UINT8(_p_buffer, _uint8)                               \
-        {                                                                   \
-            *(TI_UINT8 *)(_p_buffer++) = _uint8;                            \
-        }
-
-#define P_BUFFER_ADD_UINT16(_p_buffer, _uint16)                             \
-        {                                                                   \
-            *(TI_UINT8 *)(_p_buffer++) = (TI_UINT8)(_uint16 & 0x00FF);                \
-            *(TI_UINT8 *)(_p_buffer++) = (TI_UINT8)((_uint16 & 0xFF00) >> 8);         \
-        }
-
-#define P_BUFFER_ADD_UINT32(_p_buffer, _uint32)                             \
-        {                                                                   \
-            *(TI_UINT8 *)(_p_buffer++) = (TI_UINT8)(_uint32 & 0x000000FF);            \
-            *(TI_UINT8 *)(_p_buffer++) = (TI_UINT8)((_uint32 & 0x0000FF00) >> 8);     \
-            *(TI_UINT8 *)(_p_buffer++) = (TI_UINT8)((_uint32 & 0x00FF0000) >> 16);    \
-            *(TI_UINT8 *)(_p_buffer++) = (TI_UINT8)((_uint32 & 0xFF000000) >> 24);    \
-        }
-
-#define P_BUFFER_ADD_DATA(_p_buffer, _p_data, _len)                         \
-        {                                                                   \
-            memcpy(_p_buffer, _p_data, _len);                               \
-            _p_buffer += _len;                                              \
-        }         
-
-#define P_BUFFER_GET_UINT8(_p_buffer, _uint8)                               \
-        {                                                                   \
-            _uint8 = *(TI_UINT8 *)(_p_buffer++);                            \
-        }
-
-#define P_BUFFER_GET_UINT16(_p_buffer, _uint16)                             \
-        {                                                                   \
-            _uint16 = *(TI_UINT8 *)(_p_buffer++);                           \
-            _uint16 |= (*(TI_UINT8 *)(_p_buffer++) << 8);                   \
-        }
-
-
-#define P_BUFFER_GET_UINT32(_p_buffer, _uint32)                             \
-        {                                                                   \
-            _uint32 = *(TI_UINT8 *)(_p_buffer++);                           \
-            _uint32 |= (*(TI_UINT8 *)(_p_buffer++) << 8);                   \
-            _uint32 |= (*(TI_UINT8 *)(_p_buffer++) << 16);                  \
-            _uint32 |= (*(TI_UINT8 *)(_p_buffer++) << 24);                  \
-        }
-
-#define P_BUFFER_ADD_HDR_PARAMS(_p_buffer, _op, _status)                    \
-        {                                                                   \
-            *(TI_UINT8 *)(_p_buffer + 0) = (_op & 0x00FF);                  \
-            *(TI_UINT8 *)(_p_buffer + 1) = ((_op & 0xFF00) >> 8);           \
-            *(TI_UINT8 *)(_p_buffer + 2) = _status;                         \
-            _p_buffer += 3;                                                 \
-        }
-
-#endif
diff --git a/wl1271/stad/Export_Inc/paramOut.h b/wl1271/stad/Export_Inc/paramOut.h
deleted file mode 100644
index 91536e9..0000000
--- a/wl1271/stad/Export_Inc/paramOut.h
+++ /dev/null
@@ -1,1197 +0,0 @@
-/*
- * paramOut.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************/
-/*																			*/
-/*    MODULE:   paramOut.h													*/
-/*    PURPOSE:																*/
-/*																			*/
-/****************************************************************************/
-
-#ifndef __PARAM_OUT_H__
-#define __PARAM_OUT_H__
-
-#include "tidef.h"
-#include "report.h"
-#include "context.h"
-#include "rate.h"
-#include "bssTypes.h"
-#include "roamingMngrTypes.h"
-#include "scanMngrTypes.h"
-
-#ifdef XCC_MODULE_INCLUDED
-#include "paramOutXCC.h"
-#else
-#define   XCC_PARAM_FIELDS
-#endif
- 
-#include "InternalCmdCodes.h"
-#include "commonTypes.h"
-#include "coreDefaultParams.h"
-#include "rsnApi.h"
-#include "TWDriver.h"
-#include "tiwlnif.h"
-
-
-#define DOT11_MAX_DEFAULT_WEP_KEYS          4
-
-#define RX_LEVEL_TABLE_SIZE                 15
-
-#define RX_DATA_FILTER_MAX_FIELD_PATTERNS   8
-#define RX_DATA_FILTER_FILTER_BOUNDARY      256
-
-/* Soft gemini  values */
-
-/* Used by UtilInfoCodeQueryInformation , UtilInfoCodeSetInformation */
-#define VAL_TX_POWER_VALUE			100
-#define VAL_NETWORK_TYPE			101
-#define VAL_AP_TX_POWER_LEVEL	    102
-/* #define VAL_COUNTRY_CODE    	        103 */ 
-/* #define VAL_REG_DOMAIN_BAND_24	    104 */
-/* #define VAL_REG_DOMAIN_BAND_50	    105 */
-#define VAL_PACKET_BURSTING			106
-#define VAL_MIXED_MODE				107
-#define VAL_PRIVACY_MODE			108
-#define VAL_XCC_SECURITY			109
-#define VAL_DEFAULT_KEY_ID			110
-#define VAL_AP_SUPPORT_CHANELS 		111
-
-typedef struct
-{
-    ERate    maxBasic;
-    ERate    maxActive;
-} ratePair_t;
-
-
-typedef enum
-{
-    RTS_CTS_DISABLED = 0,
-    RTS_CTS_ENABLED  = 1
-
-} RtsCtsStatus_e;
-
-/* Parameters Structures Definitions per parameter type */
-typedef enum
-{
-    AUTH_LEGACY_OPEN_SYSTEM     = 0,
-    AUTH_LEGACY_SHARED_KEY      = 1,
-    AUTH_LEGACY_AUTO_SWITCH     = 2,
-    AUTH_LEGACY_RESERVED1       = 128,
-    AUTH_LEGACY_NONE            = 255
-} legacyAuthType_e;
-
-typedef enum
-{
-    CONNECTION_NONE             = 0,
-    CONNECTION_INFRA            = 1,
-    CONNECTION_IBSS             = 2,
-    CONNECTION_SELF             = 3
-} connectionType_e;
-
-typedef enum
-{
-    RADIO_IN_STAND_BY           = 0,
-    RADIO_OUT_OF_STAND_BY       = 1
-}radioStandByState_t;
-
-/**** Regulatory Domain module types ****/
-
-/* Scan Control Table for 2.4-G band type */
-typedef struct
-{
-    TI_UINT8       tableString[NUM_OF_CHANNELS_24];
-} scanControlTable24_t;
-
-/* Scan Control Table for 5G-band type */
-typedef struct
-{
-    TI_UINT8       tableString[A_5G_BAND_NUM_CHANNELS];
-} scanControlTable5_t;
-
-/* Scan Control Table type */
-typedef struct
-{
-    ERadioBand             band;
-    scanControlTable5_t     ScanControlTable5;
-    scanControlTable24_t    ScanControlTable24;
-} scanControlTable_t;
-
-/** \enum regulatoryDomain_scanOption_e
- * \brief Regulatory Domain Scan Options
- *
- * \par Description
- * Enumerates the scan type to used by regulatory domain queries
- *
- * \sa
- */
-typedef enum
-{
-    ACTIVE_SCANNING     = 0,	/**< The query is for active scanning (requires transmission on the channel)	*/
-    PASSIVE_SCANNING    = 1		/**< The query is for passive scanning (no transmission is required)			*/
-} regulatoryDomain_scanOption_e;
-
-typedef struct
-{
-    TI_UINT8*      pChannelBitMap;
-    TI_UINT8       channelCnt;
-    TI_INT8        txPower;
-} regulatoryDomainParam_t;
-
-typedef struct
-{
-    TI_UINT8       minTxPower;
-    TI_UINT8       maxTxPower;
-} powerCapability_t;
-
-
-/* SoftGemini module init parameters */
-typedef struct
-{
-    ESoftGeminiEnableModes  SoftGeminiEnable;
-	TI_UINT32   coexParams[SOFT_GEMINI_PARAMS_MAX];
- } SoftGeminiInitParams_t;
-
-typedef enum
-{
-    PHY_UNKNOWN         = 0,
-    PHY_FH              = 1,
-    PHY_DSS             = 2,
-    PHY_UN_USED         = 3,
-    PHY_OFDM            = 4,
-    PHY_HIGH_RATE_DSS   = 5,
-    PHY_ERP             = 6
-} phyType_e;
-
-
-typedef enum
-{
-    CLOSE           = 0,
-    OPEN_NOTIFY     = 1,
-    OPEN_EAPOL      = 2,
-    OPEN            = 3,
-    MAX_NUM_OF_RX_PORT_STATUS
-} portStatus_e;
-
-
-typedef enum
-{
-    DRIVER_STATUS_IDLE              = 0,
-    DRIVER_STATUS_RUNNING           = 1
-} driverStatus_e;
-
-typedef enum
-{
-    OS_ABS_LAYER    = 0,
-    RSN             = 1
-} eapolDestination_e;
-
-/* enumerator for PRE_AUTH event */
-typedef enum
-{
-   RSN_PRE_AUTH_START,
-   RSN_PRE_AUTH_END
-} preAuthStatusEvent_e;
-
-
-typedef enum
-{
-    STATUS_SCANNING         = 0,
-    STATUS_SCAN_COMPLETE    = 1
-} scanStatus_e;
-
-typedef enum
-{
-    SCAN_DISABLED   = 0,	/* TI_FALSE*/
-    SCAN_ENABLED    = 1,	/* TI_TRUE*/
-	SKIP_NEXT_SCAN	= 2		/* Skip only one next coming scan, then set this parameter to TI_TRUE*/
-} scanEnabledOptions_e;
-
-
-
-
-typedef struct
-{
-    TI_UINT32      RecvOk;                 /* the number of frames that the NIC receives without errors */
-    TI_UINT32      DirectedBytesRecv;      /* the number of bytes in directed packets that are received without errors */
-    TI_UINT32      DirectedFramesRecv;     /* the number of directed packets that are received without errors */
-    TI_UINT32      MulticastBytesRecv;     /* the number of bytes in multicast/functional packets that are received without errors */
-    TI_UINT32      MulticastFramesRecv;    /* the number of multicast/functional packets that are received without errors */
-    TI_UINT32      BroadcastBytesRecv;     /* the number of bytes in broadcast packets that are received without errors. */
-    TI_UINT32      BroadcastFramesRecv;    /* the number of broadcast packets that are received without errors. */
-    TI_UINT32      LastSecBytesRecv;       /* the number of bytes received without errors during last second */
-
-} rxDataCounters_t;
-
-typedef struct rxDataFilterFieldPattern_t
-{
-    TI_UINT16      offset; /*  Offset of the field to compare from the start of the packet*/
-    TI_UINT8       length; /* Size of the field pattern */
-    TI_UINT8       flag; /* Bit Mask flag */
-    TI_UINT8       pattern[RX_DATA_FILTER_MAX_PATTERN_SIZE]; /* expected pattern */
-    TI_UINT8       mask[RX_DATA_FILTER_MAX_PATTERN_SIZE]; /* bit-masking of the internal field content */
-} rxDataFilterFieldPattern_t;
-
-typedef struct 
-{
-	void	*handler;
-	void	*callback; 
-}QoS_renegVoiceTspecReq_t;
-
-/* Authentication/encryption capability */
-#define MAX_AUTH_ENCR_PAIR 13
-
-typedef struct 
-{
-	EExternalAuthMode   authenticationMode;
-	ECipherSuite        cipherSuite;
-
-} authEncrPairList_t;
-
-typedef struct 
-{
-	TI_UINT32              NoOfPMKIDs;
-	TI_UINT32              NoOfAuthEncrPairSupported;
-	authEncrPairList_t     authEncrPairs[MAX_AUTH_ENCR_PAIR];
-
-} rsnAuthEncrCapability_t;
-
-typedef struct 
-{
-	TI_UINT32       numOfPreAuthBssids;
-	TMacAddr     	*listOfPreAuthBssid;
-
-} rsnPreAuthBssidList_t;
-
-
-typedef struct
-{
-    TI_INT32       rssi;
-    TI_UINT8       snr;
-} signal_t;
-
-typedef struct
-{
-    TI_UINT32  basicRateMask;
-    TI_UINT32  supportedRateMask;
-} rateMask_t;
-
-typedef struct
-{
-
-    TI_UINT8        *assocRespBuffer;
-    TI_UINT32       assocRespLen;
-    TI_UINT8        *assocReqBuffer;
-    TI_UINT32       assocReqLen;
-
-} assocInformation_t;
-
-typedef struct
-{
-    TMacAddr    siteMacAddress;
-    TI_BOOL     priority;
-} siteMgr_prioritySite_t;
-
-typedef struct{
-	TI_UINT32 thresholdCross;                /* high or low */
-	TI_UINT32 thresholdCrossDirection;       /* direction of crossing */
-} trafficIntensityThresholdCross_t;
-
-/************************************/
-/*      QOS edcf params             */
-/************************************/
-
-/*
-#define CW_MIN_DEF                         15
-#define CW_MIN_MAX                         31
-#define CW_MAX_DEF                         1023
-*/
-#define CW_MIN_DEF                         4 /* the power of 2 - cwMin = 2^4-1 = 15 */
-#define CW_MIN_MAX                         5 /* the power of 2 - cwMax = 2^5-1 = 31 */
-#define CW_MAX_DEF                         10
-
-#define AIFS_DEF                            2
-#define NO_RX_TIME_OUT                      0
-#define NO_RX_ACK_POLICY                    0
-#define DATA_DCF                            0    /* MSDUs are sent completely including retrys - normal legacy traffic */
-#define QOS_DATA_EDCF                       1    /* MPDUs are sent according to TXOP limits - */
-#define RETRY_PREEMPTION_DISABLE            0
-#define QOS_CONTROL_TAG_MASK                0x0007
-#define QOS_CONTROL_EOSP_MASK                0x0010
-
-
-
-typedef enum{
-    AC_ACTIVE = 0,
-    AC_NOT_ACTIVE
-}acActive;
-
-
-typedef struct
-{
-	TI_UINT8	*buffer;
-	TI_UINT16	bufLength;
-	TI_UINT8	isBeacon; 	/* If true, Beacon packet is returned, otherwise it is Probe Response */
-} BufferParameters_t;
-
-
-
-typedef struct{
-	TI_UINT32		trafficAdmCtrlResponseTimeout;
-    TI_BOOL        trafficAdmCtrlUseFixedMsduSize;
-}trafficAdmCtrlInitParams_t;
-
-typedef struct{
-    TI_BOOL       wmeEnable;
-    TI_BOOL       trafficAdmCtrlEnable;
-    TI_BOOL       qosTagZeroConverHeader;
-	TI_UINT8      PacketBurstEnable;
-	TI_UINT32     PacketBurstTxOpLimit;
-    TI_UINT32     TxOpLimit[MAX_NUM_OF_AC];
-    TI_UINT32     MsduLifeTime[MAX_NUM_OF_AC];
-    TRxTimeOut    rxTimeOut;
-    TI_UINT8      ShortRetryLimit[MAX_NUM_OF_AC];
-    TI_UINT8      LongRetryLimit[MAX_NUM_OF_AC];
-    TI_UINT8      desiredWmeAcPsMode[MAX_NUM_OF_AC];        /* wme per ac power save mode */
-    EQOverflowPolicy QueueOvFlowPolicy[MAX_NUM_OF_AC];
-	TI_UINT8      acAckPolicy[MAX_NUM_OF_AC];               /* ack policy per AC */
-    trafficAdmCtrlInitParams_t	trafficAdmCtrlInitParams;
-	TI_UINT8	  desiredPsMode;						    /* The desired PS mode of the station */
-	TI_UINT8	  desiredMaxSpLen;
-
-    TI_BOOL      bCwFromUserEnable;  /* flag to use CwMin & CwMax user setting: 0 disable user setting (values from beacon) , 1 enable user setting (beacon cw ignore)*/
-    TI_UINT8     uDesireCwMin;		/**< The contention window minimum size (in slots) from ini file */
-    TI_UINT16    uDesireCwMax;		/**< The contention window maximum size (in slots) from ini file */
-	TI_BOOL		 bEnableBurstMode;
- /* Enable the Burst mode from ini file */
-    /* 802.11n BA session */
-    TI_UINT8               aBaPolicy[MAX_NUM_OF_802_1d_TAGS];
-    TI_UINT16              aBaInactivityTimeout[MAX_NUM_OF_802_1d_TAGS];
-	
-}QosMngrInitParams_t;
-
-
-
-/*END OF MULTIPLE QUEUES STRUCTURE*/
-
-typedef struct
-{
-	TI_UINT16		bufferSize;
-	TI_UINT8		*buffer;
-    TI_BOOL 		reAssoc;
-} TAssocReqBuffer;
-
-typedef struct
-{
-    TMacAddr	bssID;
-    TI_UINT16	channel;
-} apChannelPair_t;
-
-typedef struct
-{
-    apChannelPair_t	*apChannelPairs;
-    TI_UINT16      	numOfEntries;
-} neighbor_AP_t;
-
-typedef struct
-{    
-    TI_UINT16          maxChannelDuration;		/* One channel max duration time. (time slot 0 - 65000) */    
-    TI_UINT16          minChannelDuration;		/* One channel max duration time. (time slot 0 - 65000) */    
-    TI_UINT8           earlyTerminationMode;	/**< 0 = Stay until max duration time. 1 = Terminate scan in
-												* a channel upon a reception of Prob-Res or Beacon. 2 = Terminate scan
-												* in a channel upon a reception of any frame
-												*/    
-    TI_UINT8           eTMaxNumOfAPframes;		/**< number of AP frames (beacon/probe_resp) to trigger Early termination.
-												* Applicable only when EarlyTerminationMode = 1 
-												*/
-    TI_UINT8           numOfProbeReq;			/* Number of probe request transmitted on each channel */
-
-} periodicScanParams_t;
-
-
-typedef struct
-{	
-	TI_UINT16 		channelNum;
-	TI_BOOL		channelValidity;
-	ERadioBand		band;
-} channelValidity_t;
-
-/** \struct channelCapabilityRet_t
- * \brief Channel Capability Response
- * 
- * \par Description
- * Defines scan capabilities information, which is given as a response to a scan capabilities query.
- * 
- * \sa
- */ 
-typedef struct
-{
-	TI_BOOL 	channelValidity;	/**< Indicates whether the channel is valid for the requested scan type. 
-									* TRUE: channel is valid; FALSE: not valid 
-									*/
-	TI_UINT8	maxTxPowerDbm; 		/**< Maximum TX power level allowed on this channel from 1 to 5, 
-									* where 1 is the highest and 5 is the lowest. Units: Dbm/10 
-									*/
-}	channelCapabilityRet_t;
-
-typedef struct
-{
-	TI_UINT8		*listOfChannels;
-	TI_UINT8		sizeOfList;
-} supportedChannels_t;
-
-/** \struct channelCapabilityReq_t
- * \brief Channel Capability Resuest
- * 
- * \par Description
- * Defines the regulatory domain scan capability query information
- * 
- * \sa
- */ 
-typedef struct
-{
-	regulatoryDomain_scanOption_e 	scanOption;	/**< Desired scan type (passive or active)		*/
-	TI_UINT8						channelNum; /**< Channel on which scan is to be performed	*/		
-	ERadioBand                     	band; 		/**< Band on which scan is to be performed		*/	
-}	channelCapabilityReq_t;
-
-typedef struct
-{
-    TI_UINT32   uChannel;
-    ERadioBand  eBand;
-    TI_BOOL     bDfsChannel;
-} TDfsChannel;
-
-typedef struct
-{
-	TTxDataCounters 			*pTxDataCounters;
-	TI_UINT8				acID;
-}	reportTsStatisticsReq_t;
-
-/* SME parameters definition */
-typedef enum
-{
-    CONNECT_MODE_AUTO = 0,
-    CONNECT_MODE_MANUAL
-} EConnectMode;
-
-/* Generic IE */
-#define RSN_MAX_GENERIC_IE_LENGTH 255
-
-typedef struct
-{
-		TI_UINT8      length;
-        TI_UINT8      data[255];
-} rsnGenericIE_t;
-
-
-/** \struct paramInfo_t
- * \brief General Parameters Structure
- * 
- * \par Description
- * This structure holds information for the regulatory domain (and other modules 
- * that are outside of the scope of this document) queries
- * 
- * \sa
- */ 
-typedef struct{
-    TI_UINT32              paramType;		/**< Parameter identification value */
-    TI_UINT32              paramLength;		/**< Parameter actual length (or the length allocated in content for parameter value) */
-
-	/* Actual parameter value */
-    union
-    {
-        /* HAL Control section */
-		TI_UINT16							halCtrlRtsThreshold;
-		TI_UINT16							halCtrlFragThreshold;
-
-        /* site manager section */
-        TI_UINT8                			siteMgrDesiredChannel;
-        TMacAddr                			siteMgrDesiredBSSID;
-        TSsid                   			siteMgrDesiredSSID;
-        ScanBssType_e           			siteMgrDesiredBSSType;
-        ratePair_t              			siteMgrDesiredRatePair;
-        TRates                 				siteMgrDesiredBasicRateSet;
-        TRates                 				siteMgrDesiredSupportedRateSet;
-        rateMask_t              			siteMgrCurrentRateMask;
-        TI_UINT8                			siteMgrCurrentTxRate;
-        TI_UINT8                			siteMgrCurrentRxRate;
-        EModulationType         			siteMgrDesiredModulationType;
-        TI_UINT16               			siteMgrDesiredBeaconInterval;
-        EPreamble               			siteMgrDesiredPreambleType;
-        EPreamble               			siteMgrCurrentPreambleType;
-        ERadioBand              			siteMgrRadioBand;
-        OS_802_11_BSSID_EX      			*pSiteMgrSelectedSiteInfo;
-        OS_802_11_BSSID         			*pSiteMgrPrimarySiteDesc;
-        EDot11Mode              			siteMgrDot11Mode;
-        EDot11Mode              			siteMgrDot11OperationalMode;
-        EDraftNumber           				siteMgrUseDraftNum;
-        TI_UINT8                			siteMgrCurrentChannel;
-        TSsid                   			siteMgrCurrentSSID;
-		ScanBssType_e						siteMgrCurrentBSSType;
-        EModulationType         			siteMgrCurrentModulationType;
-        ESlotTime               			siteMgrSlotTime;
-        signal_t                			siteMgrCurrentSignal;
-        TI_UINT8                			siteMgrNumberOfSites;
-        TIWLN_COUNTERS          			siteMgrTiWlanCounters;
-        TI_BOOL                 			siteMgrBuiltInTestStatus;
-        TI_UINT8                			siteMgrFwVersion[FW_VERSION_LEN]; /* Firmware version - null terminated string*/
-        TI_UINT32               			siteMgrDisAssocReason;
-        TI_UINT16               			siteMgrSiteCapability;
-        TI_UINT16               			beaconInterval;
-        TI_UINT8                			APTxPower;
-        TI_BOOL                 			siteMgrQuietScanInProcess;
-        TI_BOOL                 			siteMgrScanSliceCurrentlyActive;
-        TI_UINT8                			siteMgrRoamingRssiGapThreshold;
-        TI_UINT8                			timeStamp[8];
-        TI_BOOL                 			siteMgrBeaconRecv;
-        TI_UINT32               			siteMgrDtimPeriod;
-        TI_INT32                			siteMgrCurrentRssi;
-        TI_UINT8                			siteMgrIndexOfDesiredSiteEntry;
-        TI_UINT8                			*pSiteMgrDesiredSiteEntry;
-        TI_UINT8                			siteMgrCurrentTsfTimeStamp[8];
-        TI_UINT8                			siteMgrUsrConfigTxPower;
-
-        OS_802_11_CONFIGURATION 			*pSiteMgrConfiguration;
-        siteMgr_prioritySite_t  			siteMgrPrioritySite;
-		BufferParameters_t					siteMgrLastBeacon;
-		TI_UINT8							siteMgrDesiredBeaconFilterState;
-		TI_BOOL								siteMgrAllowTxPowerCheck;
-
-        void     							*pPrimarySite;
-        TI_BOOL                             bPrimarySiteHtSupport;
-
-        /* WiFI SimpleConfig */
-		TWscMode 							siteMgrWSCMode; /* used to set the WiFi Simple Config mode */
-
-        /* SME SM section */
-        TMacAddr                			smeDesiredBSSID;
-        TSsid                   			smeDesiredSSID;
-        ScanBssType_e           			smeDesiredBSSType;
-        TI_BOOL                 			smeRadioOn;
-        EConnectMode            			smeConnectionMode;
-        TIWLN_DOT11_STATUS      			smeSmConnectionStatus;
-
-        /* connection SM section */
-        TI_UINT32               			connSelfTimeout;
-
-        /* auth SM section */
-        TI_UINT32               			authResponseTimeout;
-
-        /* assoc SM section */
-        TI_UINT32               			assocResponseTimeout;
-
-        OS_802_11_ASSOCIATION_INFORMATION  	assocAssociationInformation;
-		
-        /* RSN section */
-        TI_BOOL                 			rsnPrivacyOptionImplemented;
-        EAuthSuite              			rsnDesiredAuthType;
-        OS_802_11_KEY           			rsnOsKey;
-        rsnAuthEncrCapability_t 			*pRsnAuthEncrCapability;
-        TI_UINT32               			rsnNoOfPMKIDs;
-        OS_802_11_PMKID         			rsnPMKIDList;
-        TI_UINT32               			rsnWPAPromoteFlags;
-        TI_UINT32               			rsnWPAMixedModeSupport;
-        TI_UINT32               			rsnAuthState; /* supp_1XStates */
-        ECipherSuite            			rsnEncryptionStatus;
-        TI_UINT8                			rsnHwEncDecrEnable; /* 0- disable, 1- enable*/
-        TSecurityKeys          				*pRsnKey;
-        TI_UINT8                   			rsnDefaultKeyID;
-
-        EExternalAuthMode      	 			rsnExtAuthneticationMode;
-        TI_BOOL                    			rsnMixedMode;
-		TI_BOOL								rsnPreAuthStatus;
-		TMacAddr							rsnApMac;
-        OS_802_11_EAP_TYPES     			eapType;
-        TI_BOOL                    			wpa_802_1x_AkmExists;
-        TI_BOOL                    			rsnPortStatus;
-		rsnGenericIE_t                      rsnGenericIE;
-		TI_BOOL                             rsnExternalMode;
-
-
-        /* Rx Data section */
-        rxDataCounters_t        			rxDataCounters;
-        TI_BOOL                    			rxDataFilterEnableDisable;
-        TRxDataFilterRequest    			rxDataFilterRequest;
-		TI_UINT16                           rxGenericEthertype;
-
-        /* Tx Data section */
-        portStatus_e            			txDataPortStatus;
-        TTxDataCounters        				*pTxDataCounters;
-		TI_UINT32 							txPacketsCount;
-		reportTsStatisticsReq_t 			tsMetricsCounters;
-        OS_802_11_THRESHOLD_CROSS_PARAMS  	txDataMediumUsageThreshold;
-        TI_UINT8                       		txDataEncryptionFieldSize;
-		TI_UINT16                           txGenericEthertype;
-
-        /* Ctrl Data section */
-        TI_BOOL                    			ctrlDataPowerSaveEnable;
-        TI_BOOL                    			ctrlDataPowerSaveForce;
-        TI_BOOL                    			ctrlDatapowerSaveEnhanceAlgorithm;
-        erpProtectionType_e     			ctrlDataIbssProtecionType;
-        RtsCtsStatus_e          			ctrlDataRtsCtsStatus;
-        TI_BOOL                    			ctrlDataProtectionEnabled;
-
-        TMacAddr            				ctrlDataCurrentBSSID;
-        ScanBssType_e                		ctrlDataCurrentBssType;
-        TI_UINT32                  			ctrlDataCurrentRateMask;
-        ERate                  				ctrlDataCurrentBasicRate;
-        EPreamble               			ctrlDataCurrentPreambleType;
-        ERate                  				ctrlDataCurrentActiveRate;
-        TMacAddr            				ctrlDataDeviceMacAddress;
-        TStreamTrafficProperties   			ctrlDataUpOfStream;
-		TClsfrTableEntry					ctrlDataClsfrInsertTable;
-        EClsfrType              			ctrlDataClsfrType;
-
- 		TI_UINT32							ctrlDataTrafficIntensityEventsFlag;
-		OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS ctrlDataTrafficIntensityThresholds;
-
-        connectionType_e        			connType;
-
-        /* MLME SM section */
-        legacyAuthType_e        			mlmeLegacyAuthType;
-        legacyAuthType_e        			authLegacyAuthType;
-        TI_BOOL                    			mlmeReAssoc;
-
-
-        TI_BOOL                    			rxDataExcludeUnencrypted;
-        eapolDestination_e         			rxDataEapolDestination;
-        portStatus_e               			rxDataPortStatus;
-
-        TI_BOOL                    			txDataCurrentPrivacyInvokedMode;
-        TI_BOOL                    			txDataEapolEncryptionStatus;
-        TI_UINT32                  			txDataPollApPacketsFromACid;      /* AC to poll AP packets from */
-
-        /* regulatory Domain section */
-        regulatoryDomainParam_t 			regulatoryDomainParam;
-        TI_UINT8                   			channel;
-        TCountry*              				pCountry;
-        TI_UINT8*               			pCountryString;
-        TI_BOOL                    			spectrumManagementEnabled;
-        TI_BOOL                    			regulatoryDomainEnabled;
-        powerCapability_t       			powerCapability;
-        TI_UINT8*                  			pSupportedChannel;
-        TI_INT8                    			powerConstraint;
-        TI_INT8                 			desiredTxPower; 		/* The desired Tx power inforced by the User (Utility),
-																	or The desired Tx power (in Dbm) as forced by teh OS */
-        TI_INT8                    			ExternTxPowerPreferred; /*for other extern elements that want
-																	to effect the transmit power*/
-		TpowerLevelTable_t					powerLevelTable;
-		channelValidity_t					channelValidity;
-		channelCapabilityRet_t				channelCapabilityRet;
-		channelCapabilityReq_t				channelCapabilityReq;
-		supportedChannels_t					supportedChannels;					
-        TI_BOOL                    			enableDisable_802_11d;
-        TI_BOOL                    			enableDisable_802_11h;
-		TI_BOOL								bActivateTempPowerFix;
-		TI_BOOL								bIsCountryFound;
-		TI_BOOL								bIsChannelSupprted;
-        TDfsChannelRange      				DFS_ChannelRange;
-        TDfsChannel             			tDfsChannel;
-		ERadioBand							eRadioBand;
-        TI_UINT32               			uTimeToCountryExpiryMs;
-
-
-        /* Measurement Manager section */
-		TI_UINT32							measurementEnableDisableStatus;
-        TI_UINT16							measurementTrafficThreshold;
-		TI_UINT16							measurementMaxDuration;
-        TInterrogateCmdCbParams 			interogateCmdCBParams;
-
-
-        /* soft Gemini section */
-        ESoftGeminiEnableModes				SoftGeminiEnable;
-        TI_UINT32							SoftGeminiParamArray[NUM_OF_CONFIG_PARAMS_IN_SG];
-        TI_UINT32							CoexActivityParamArray[NUM_OF_COEX_ACTIVITY_PARAMS_IN_SG];
-
-		/* case XCC MODULE INCLUDED */
-		XCC_PARAM_FIELDS
-
-        /* Application Config Parameters Manager */
-		TAssocReqBuffer						assocReqBuffer;
-        TAssocReqBuffer						assocResBuffer;
-		roamingMngrConfigParams_t			roamingConfigBuffer;
-		TI_UINT32							roamingTriggerType;
-		TI_UINT32							roamingConnStatus;
-        bssList_t*              			pScanBssList;
-		TScanPolicy*						pScanPolicy;
-
-        /* Scan concnetrator application scan (periodic & one-shot) parameters */
-        TScanParams                 		*pScanParams;
-        TPeriodicScanParams         		*pPeriodicScanParams;
-        TI_UINT32                   		uBssidListSize;
-		TI_UINT32                   		uNumBssidInList;
-        OS_802_11_BSSID_LIST_EX     		*pBssidList;
-		OS_802_11_N_RATES					*pRateList;
-        TSsid                   			tScanDesiredSSID;
-
-        TI_UINT32                           uSraThreshold;
-        TI_INT32                            nRssiThreshold;
-
-        /* tx data qos related parameters */
-        TTxDataQosParams           			txDataQosParams;
-
-        /* QOS Manager */
-        EQosProtocol                		qosSiteProtocol;
-		TI_UINT8   							qosPacketBurstEnb;     /* Packet Burst Enable */
-		EDot11Mode							qosMngrOperationalMode;
-		TI_UINT8							desiredPsMode;
-		TI_UINT8							currentPsMode;
-        TSpecConfigure						TspecConfigure;
-        TPsRxStreaming              		tPsRxStreaming;
-		OS_802_11_QOS_RX_TIMEOUT_PARAMS		rxTimeOut;
-        OS_802_11_QOS_PARAMS        		qosOsParams;
-		OS_802_11_AC_QOS_PARAMS				qosApQosParams;
-		
-        /* AP Qos Capabilities */
-        OS_802_11_AP_QOS_CAPABILITIES_PARAMS qosApCapabilities;
-
-        /* Qos current AC status */
-        OS_802_11_AC_UPSD_STATUS_PARAMS   	qosCurrentAcStatus;
-
-        OS_802_11_QOS_DELETE_TSPEC_PARAMS   qosDelTspecRequest;
-        OS_802_11_QOS_TSPEC_PARAMS     		qosAddTspecRequest;
-		QoS_renegVoiceTspecReq_t	   		qosRenegotiateTspecRequest;
-
-        OS_802_11_QOS_TSPEC_PARAMS     		qosTspecParameters;
-
-		OS_802_11_QOS_DESIRED_PS_MODE		qosDesiredPsMode;
-
-        /* Power Manager */
-		PowerMgr_PowerMode_e    			PowerMode;
-		EPowerPolicy 						PowerSavePowerLevel;
-		EPowerPolicy 						DefaultPowerLevel;
-		TPowerMgr_PowerMode   				powerMngPowerMode;
-		PowerMgr_Priority_e 				powerMngPriority;
-		PowerMgr_PowerMode_e				powerMngDozeMode;
-        TI_BOOL                 			powerMgrKeepAliveEnaDis;
-        TKeepAliveTemplate      			*pPowerMgrKeepAliveTemplate;
-        TKeepAliveConfig        			*pPowerMgrKeepAliveConfig;
-	 
-		/* txRatePolicy params */
-		TTxRatePolicy         				TxRatePolicy;
-	
-		TIWLN_RADIO_RX_QUALITY 				RxRadioQuality ;
-		
-		/* MIB*/
-		TMib 								mib;
-
-        /* Current BSS params - RSSI/SNR User Trigger */
-		TUserDefinedQualityTrigger 			rssiSnrTrigger;
-
-		/* debug */
-		TDebugRegisterReq					HwRegister;
-        RateMangeParams_t                   RateMng;
-        RateMangeReadParams_t               RateMngParams;
-
-        TIpAddr    StationIP;
-        
-    } content;
-}paramInfo_t;
-
-
-
-
-/*-----------------------------------------------------*/
-/*      EEPROM-less support                            */
-/*-----------------------------------------------------*/
-#define MAX_CALL_DATA_REG_NUM                30
-#define HW_EEPROM_PRESENTED                  1
-#define HW_EEPROM_NOT_PRESENTED              0
-
-typedef struct
-{
-    TI_UINT16  RegAddress;
-    TI_UINT16  RegValue;
-
-} PhyRegisters_t;
-
-
-typedef enum
-{
-    PS_MODE_ELP         = 0,
-    PS_MODE_POWER_DOWN  = 1,
-    PS_MODE_ACTIVE      = 2,
-    PS_MODE_WAKE_TNET   = 3
-} powerSaveModes_e;
-
-
-/**************************** Beginning of Init Params ************************************/
-
-
-typedef struct
-{
-    TI_UINT8                   siteMgr_radioRxLevel[RX_LEVEL_TABLE_SIZE];
-    TI_UINT8                   siteMgr_radioLNA[RX_LEVEL_TABLE_SIZE];
-    TI_UINT8                   siteMgr_radioRSSI[RX_LEVEL_TABLE_SIZE];
-    TI_UINT32                  factorRSSI; /* for RADIA only */
-}radioValues_t;
-
-typedef struct
-{
-    TI_UINT8               	siteMgrDesiredChannel;
-    TMacAddr               	siteMgrDesiredBSSID;
-    TSsid                  	siteMgrDesiredSSID;
-    ScanBssType_e			siteMgrDesiredBSSType;
-    EDot11Mode             	siteMgrDesiredDot11Mode;
-    ERadioBand             	siteMgrSupportedBand;
-    EDraftNumber			siteMgrUseDraftNum;
-    TI_UINT32               siteMgrRegstryBasicRate[DOT11_MAX_MODE];
-    TI_UINT32               siteMgrRegstrySuppRate[DOT11_MAX_MODE];
-    TI_UINT32               siteMgrRegstryBasicRateMask;
-    TI_UINT32               siteMgrRegstrySuppRateMask;
-    rateMask_t              siteMgrCurrentDesiredRateMask;
-    ratePair_t              siteMgrDesiredRatePair;
-    TI_UINT32               siteMgrMatchedBasicRateMask;
-    TI_UINT32               siteMgrMatchedSuppRateMask;
-    EModulationType         siteMgrDesiredModulationType;
-    EPreamble               siteMgrDesiredPreambleType;
-    ESlotTime               siteMgrDesiredSlotTime;
-    TI_UINT16               siteMgrDesiredBeaconInterval;
-    TI_UINT32               siteMgrDesiredAtimWindow;
-    TI_UINT32               siteMgrFreq2ChannelTable[SITE_MGR_CHANNEL_MAX+1];
-    
-    TI_UINT8                siteMgrExternalConfiguration;
-    TI_UINT8                siteMgrPrivacyMode;
-    TI_BOOL                 siteMgrWiFiAdhoc;
-
-	/* TX Power Control parameters */
-    TI_UINT32                  TxPowerCheckTime;
-    TI_UINT32                  TxPowerControlOn;
-    TI_INT32                   TxPowerRssiThresh;
-    TI_INT32                   TxPowerRssiRestoreThresh;
-    TI_UINT8                   TxPowerRecoverLevel;
-    TI_UINT8                   TxPowerDesiredLevel;
-	
-	TBeaconFilterInitParams	beaconFilterParams; /*contains the desired state*/
-
-	TI_UINT8					includeWSCinProbeReq;
-} siteMgrInitParams_t;
-
-typedef struct
-{
-    ERadioBand  eBand;
-    TI_UINT8    uChannel;
-} TSmeScanChannel;
-
-typedef struct
-{
-    TI_BOOL         bRadioOn;
-    TSsid           tDesiredSsid;
-    TMacAddr        tDesiredBssid;
-    ScanBssType_e   eDesiredBssType;
-    EConnectMode    eConnectMode;
-} TSmeModifiedInitParams;
-
-typedef struct
-{
-    TI_UINT32       uMinScanDuration;
-    TI_UINT32       uMaxScanDuration;
-    TI_UINT32       uProbeReqNum;
-    TI_INT8         iSnrThreshold;	
-    TI_INT8         iRssiThreshold;
-    TI_UINT32       uScanIntervals[ PERIODIC_SCAN_MAX_INTERVAL_NUM ];
-    TI_UINT32       uCycleNum;
-    TI_UINT32       uChannelNum;
-    TSmeScanChannel tChannelList[ PERIODIC_SCAN_MAX_CHANNEL_NUM ];
-} TSmeInitParams;
-
-
-typedef struct
-{
-    TI_BOOL  RoamingScanning_2_4G_enable;
-	TI_UINT8 RoamingOperationalMode;
-    TI_UINT8 bSendTspecInReassPkt;
-}   TRoamScanMngrInitParams;
-
-typedef struct
-{
-    TI_UINT8                    parseWSCInBeacons;
-} TMlmeInitParams;
-
-typedef struct
-{
-    TI_UINT32                  connSelfTimeout;
-} connInitParams_t;
-
-typedef struct
-{
-    TI_UINT32                  authResponseTimeout;
-    TI_UINT32                  authMaxRetryCount;
-} authInitParams_t;
-
-typedef struct
-{
-    TI_UINT32                  assocResponseTimeout;
-    TI_UINT32                  assocMaxRetryCount;
-} assocInitParams_t;
-
-typedef struct
-{
-	TI_UINT8				highRateThreshold;
-	TI_UINT8				lowRateThreshold;
-	TI_BOOL				    enableEvent;
-}tspecsRateParameters_t;
-
-typedef struct
-{
-    TI_BOOL                    ctrlDataPowerSaveEnhanceAlgorithm;
-    TI_UINT16                  ctrlDataPowerSaveTimeOut;
-    TI_UINT8                   ctrlDataPowerSaveTxThreshold;
-    TI_UINT8                   ctrlDataPowerSaveRxThreshold;
-
-}powerSaveInitParams_t;
-
-typedef struct
-{
-	TI_UINT8 longRetryLimit;
-	TI_UINT8 shortRetryLimit;
-}txRatePolicyParams;
-
-typedef struct
-{
-    TI_BOOL                         ctrlDataPowerSaveEnable;
-    TI_BOOL                         ctrlDataSoftGeminiEnable;
-    TMacAddr                        ctrlDataDeviceMacAddress;
-    powerSaveInitParams_t           powerSaveInitParams;
-    erpProtectionType_e             ctrlDataDesiredIbssProtection;
-/* 0 = CTS protaction disable ; 1 = Standard CTS protaction */
-    RtsCtsStatus_e                  ctrlDataDesiredCtsRtsStatus;
-    OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS   ctrlDataTrafficThreshold;
-    TI_BOOL                         ctrlDataTrafficThresholdEnabled;
-    txRatePolicyParams              ctrlDataTxRatePolicy;
-
-	TI_UINT32		                policyEnabledRatesMaskCck;
-	TI_UINT32		                policyEnabledRatesMaskOfdm;
-	TI_UINT32		                policyEnabledRatesMaskOfdmA;
-	TI_UINT32		                policyEnabledRatesMaskOfdmN;
-
-} ctrlDataInitParams_t;
-
-typedef struct
-{
-    /* TxCtrl Parameters */
-	TI_UINT32					creditCalculationTimeout;
-	TI_BOOL					    bCreditCalcTimerEnabled;
-    /* TxDataQueue Parameters */
-	TI_BOOL					    bStopNetStackTx;
-	TI_UINT32					uTxSendPaceThresh;
-	TClsfrParams				ClsfrInitParam;
-} txDataInitParams_t;
-
-
-typedef enum
-{
-    RADIO_B_G_INDEX = 0,
-    RADIO_A_B_G_INDEX = 1,
-    NUM_OF_RADIO_TYPES = 2
-} regulatoryDomain_radioIndexType_e;
-
-/* Regulatory Domain module init parameters */
-typedef struct
-{
-    TI_UINT32                      uTimeOutToResetCountryMs;   /* Time after which country code will be reset */
-    TI_UINT8                       multiRegulatoryDomainEnabled; /* 802.11d */
-    TI_UINT8                       spectrumManagementEnabled; /* 802.11h */
-    TI_UINT8                       desiredTxPower;
-	TI_UINT8					uTemporaryTxPower;
-    scanControlTable_t          desiredScanControlTable;/* for 5 and 2.4 Ghz*/
-} regulatoryDomainInitParams_t;
-
-#ifdef XCC_MODULE_INCLUDED
-typedef enum
-{
-    XCC_MODE_DISABLED,
-    XCC_MODE_ENABLED,
-    XCC_MODE_STANDBY
-} XCCMngr_mode_t;
-
-typedef struct
-{
-    XCCMngr_mode_t  XCCEnabled;
-} XCCMngrParams_t;
-#endif
-
-/* Measurement module init parameters */
-typedef struct
-{
-    TI_UINT16              trafficIntensityThreshold;
-    TI_UINT16              maxDurationOnNonServingChannel;
-#ifdef XCC_MODULE_INCLUDED
-    XCCMngr_mode_t      XCCEnabled;
-#endif
-} measurementInitParams_t;
-
-/* Switch Channel Module module init parameters */
-typedef struct
-{
-    TI_BOOL              dot11SpectrumManagementRequired;
-
-} SwitchChannelInitParams_t;
-
-typedef struct
-{
-  TI_UINT32       qosClassifierTable[MAX_NUM_OF_802_1d_TAGS];
-}
-clsfrParams_t;
-
-
-typedef struct
-{
-    PowerMgr_PowerMode_e        powerMode;
-    TI_UINT32                      beaconReceiveTime;
-    TI_UINT8                       hangoverPeriod;
-    TI_UINT8                       beaconListenInterval;
-    TI_UINT8				 dtimListenInterval;
-    TI_UINT8                       nConsecutiveBeaconsMissed;
-    TI_UINT8                       EnterTo802_11PsRetries;
-    TI_UINT8                       HwPsPollResponseTimeout;
-    TI_UINT16                      		autoModeInterval;
-    TI_UINT16                      		autoModeActiveTH;
-    TI_UINT16                      		autoModeDozeTH;
-    PowerMgr_PowerMode_e        autoModeDozeMode;
-
-    	EPowerPolicy defaultPowerLevel;
-	EPowerPolicy PowerSavePowerLevel;     	
-
-	
-	/* powerMgmtConfig IE */
-    TI_UINT8						mode;
-    TI_UINT8						needToSendNullData;  
-    TI_UINT8						numNullPktRetries; 
-    TI_UINT8						hangOverPeriod;
-    TI_UINT16						NullPktRateModulation; 
-
-	/* PMConfigStruct */
-	TI_UINT32						ELPEnable;			/* based on "elpType" */
-	TI_UINT32						WakeOnGPIOenable;	/* based on "hwPlatformType" */
-	TI_UINT32						BaseBandWakeUpTime;	/* BBWakeUpTime */
-	TI_UINT32						PLLlockTime;
-
-	/* ACXWakeUpCondition */
-    TI_UINT8						listenInterval;
-    /* BET */
-    TI_UINT32  						MaximalFullBeaconReceptionInterval; /* maximal time between full beacon reception */
-    TI_UINT8   						BetEnableThreshold;
-    TI_UINT8   						BetDisableThreshold;
-    TI_UINT8   						BetEnable;             
-    TI_UINT8   						MaximumConsecutiveET;
-    TI_UINT32						PsPollDeliveryFailureRecoveryPeriod;
-
-	TI_BOOL							reAuthActivePriority;
-}PowerMgrInitParams_t;
-
-typedef struct
-{
-	TI_UINT8  FullRecoveryEnable;
-	TI_BOOL   recoveryTriggerEnabled[ MAX_FAILURE_EVENTS ];
-} healthMonitorInitParams_t;
-
-typedef struct
-{
-    TI_BOOL   ignoreDeauthReason0;
-} apConnParams_t;
-
-typedef struct
-{
-    TI_UINT32       uMinimumDurationBetweenOsScans;
-    TI_UINT32       uDfsPassiveDwellTimeMs;
-    TI_BOOL	        bPushMode; /*  True means Push mode. False is the default mode, storing scan results in table. */
-    TI_UINT32       uSraThreshold;
-    TI_INT32        nRssiThreshold;
-
-} TScanCncnInitParams;
-
-typedef struct
-{
-    TI_UINT8       uNullDataKeepAlivePeriod;
-    TI_UINT8	   RoamingOperationalMode;
-} TCurrBssInitParams;
-
-typedef struct
-{
-	TI_BOOL                rxDataHostPacketProcessing;
-    TI_BOOL                rxDataFiltersEnabled;
-    filter_e            rxDataFiltersDefaultAction;
-    TRxDataFilterRequest    rxDataFilterRequests[MAX_DATA_FILTERS];
-	TI_UINT32				reAuthActiveTimeout;
-}rxDataInitParams_t;
-
-typedef struct
-{
-    TI_UINT32       uWlanDrvThreadPriority; /* Default setting of the WLAN driver task priority  */
-    TI_UINT32       uBusDrvThreadPriority;  /* Default setting of the bus driver thread priority */
-    TI_UINT32       uSdioBlkSizeShift;      /* In block-mode:  uBlkSize = (1 << uBlkSizeShift)   */
-}TDrvMainParams;
-
-/* This table is forwarded to the driver upon creation by the OS abstraction layer. */
-typedef struct
-{
-	TTwdInitParams        		    twdInitParams;
-    siteMgrInitParams_t             siteMgrInitParams;
-    connInitParams_t                connInitParams;
-    authInitParams_t                authInitParams;
-    assocInitParams_t               assocInitParams;
-    txDataInitParams_t              txDataInitParams;
-    ctrlDataInitParams_t            ctrlDataInitParams;
-    TRsnInitParams                  rsnInitParams;
-    regulatoryDomainInitParams_t    regulatoryDomainInitParams;
-    measurementInitParams_t         measurementInitParams;
-    TSmeModifiedInitParams          tSmeModifiedInitParams;
-    TSmeInitParams                  tSmeInitParams;
-    SoftGeminiInitParams_t          SoftGeminiInitParams;
-    QosMngrInitParams_t             qosMngrInitParams;
-    clsfrParams_t                   clsfrParams;
-#ifdef XCC_MODULE_INCLUDED
-    XCCMngrParams_t                 XCCMngrParams;
-#endif
-	SwitchChannelInitParams_t		SwitchChannelInitParams;
-	healthMonitorInitParams_t		healthMonitorInitParams;
-    apConnParams_t                  apConnParams;
-    PowerMgrInitParams_t            PowerMgrInitParams;
-    TScanCncnInitParams             tScanCncnInitParams;
-	rxDataInitParams_t              rxDataInitParams;
-	TI_BOOL							SendINIBufferToUser;
-    /* Traffic Monitor */
-    TI_UINT8                        trafficMonitorMinIntervalPercentage;
-    TReportInitParams               tReport;
-    TCurrBssInitParams              tCurrBssInitParams;
-    TContextInitParams              tContextInitParams;
-    TMlmeInitParams                 tMlmeInitParams;
-    TDrvMainParams                  tDrvMainParams;
-    TRoamScanMngrInitParams         tRoamScanMngrInitParams;
-} TInitTable;
-
-
-#endif /* __PARAM_OUT_H__ */
-
diff --git a/wl1271/stad/Export_Inc/privateCmd.h b/wl1271/stad/Export_Inc/privateCmd.h
deleted file mode 100644
index 990bd64..0000000
--- a/wl1271/stad/Export_Inc/privateCmd.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * privateCmd.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************/
-/*																			*/
-/*    MODULE:   privateCmd.h													*/
-/*    PURPOSE:																*/
-/*																			*/
-/****************************************************************************/
-#ifndef _PVT_CMD_H_
-#define _PVT_CMD_H_
-
-
-/** \file  privateCmd.h 
- * \brief Private Command	\n
- * This file contains all the data structures and definitions which are needed for Private Command
- * \n\n
- *
- * \n\n
- */
-
-#include "osTIType.h"
-
-/***********/
-/* defines */
-/***********/
-
-/** \def PRIVATE_CMD_SET_FLAG
- * \brief Bitmaks of bit which indicates that the Command is SET Command
- */
-#define PRIVATE_CMD_SET_FLAG	0x00000001
-/** \def PRIVATE_CMD_GET_FLAG
- * \brief Bitmaks of bit which indicates that the Command is GET Command
- */
-#define PRIVATE_CMD_GET_FLAG	0x00000002
-
-
-/*********/
-/* types */
-/*********/
-
-/** \struct ti_private_cmd_t
- * \brief TI Private Command
- * 
- * \par Description
- * This Struct defines the Parameters needed for performing TI Private Command 
- * 
- * \sa
- */
-typedef struct
-{
-	TI_UINT32 	cmd;   			/**< Number of command to execute - configMgr parameter name			*/
-	TI_UINT32 	flags; 			/**< Command action type (PRIVATE_CMD_SET_FLAG | PRIVATE_CMD_GET_FLAG) 	*/
-	void* 		in_buffer; 		/**< Pointer to Input Buffer											*/
-	TI_UINT32	in_buffer_len; 	/**< Input buffer length 												*/
-	void* 		out_buffer;		/**< Pointer to Output buffer											*/
-	TI_UINT32	out_buffer_len;	/**< Output buffer length 												*/
-} ti_private_cmd_t; 
-
-
-/*************/
-/* functions */
-/*************/
-
-#endif  /* _PVT_CMD_H_*/
-        
diff --git a/wl1271/stad/Export_Inc/tiwlnif.h b/wl1271/stad/Export_Inc/tiwlnif.h
deleted file mode 100644
index aa1cf08..0000000
--- a/wl1271/stad/Export_Inc/tiwlnif.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * tiwlnif.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __TIWLNIF_H__
-#define __TIWLNIF_H__
-
-#include "osDot11.h"
-#ifndef TIWLNAPI_EXPORTS
-#include "tidef.h"
-#endif
-#include "TWDriver.h"
-
-#include "STADExternalIf.h"
-
-typedef enum _TIWLN_DOT11_STATUS
-{
-    eDot11Idle           = 0,
-    eDot11Scaning        = 1,
-    eDot11Connecting     = 2,
-    eDot11Associated     = 3,
-    eDot11Disassociated  = 4,
-    eDot11RadioDisabled  = 5,
-  eDot11Error          = 1000
-} TIWLN_DOT11_STATUS;
-
-typedef enum _TIWLN_SECURITY_STATE  /* Values are compatible with 802.1x'S IMSTATE*/
-{
-    eSecurityStateHalted = 0,           /* Security state machine halted*/
-    eSecurityStateStarting,         /* state machine is starting*/
-    eSecurityStateInitializing,     /* state machine is initializing*/
-    eSecurityStateDisabled,         /* state machine is disabled*/
-    eSecurityStateNotAuthenticated, /* Not authenticated state*/
-    eSecurityStateAuthenticating,       /* Authentication request is sent*/
-    eSecurityStateAuthenticated     /* Authenticated state*/
-} TIWLN_SECURITY_STATE;
-
-typedef struct _TIWLN_STATISTICS
-{
-    /**/
-    /* config info*/
-    /**/
-    TI_UINT32                        dot11CurrentTxRate;
-    TI_UINT32                        dot11CurrentChannel;
-    TMacAddr                         currentMACAddress;
-    OS_802_11_SSID                   dot11DesiredSSID; 
-    OS_802_11_NETWORK_MODE           dot11BSSType;
-    OS_802_11_AUTHENTICATION_MODE    AuthenticationMode;
-    TI_BOOL                          bShortPreambleUsed;
-    TI_UINT32                        RTSThreshold;
-    TI_UINT32                        FragmentationThreshold;
-    TI_BOOL                          bDefaultWEPKeyDefined;
-    OS_802_11_WEP_STATUS             WEPStatus;
-    TI_UINT32                        TxAntenna;
-    TI_UINT32                        RxAntenna;
-    TI_UINT32                        TxPowerDbm;
-    TI_UINT32                        PowerMode;
-    TI_INT32                         RxLevel;
-
-    /**/
-    /* status & AP info*/
-    /**/
-    TIWLN_DOT11_STATUS              dot11State;
-    OS_802_11_BSSID                 targetAP; 
-
-    /**/
-    /* network layer statistics (except Tx statistics which are handled sparately)*/
-    /**/
-    TIWLN_COUNTERS                  tiCounters;
-
-    /**/
-    /* other statistics*/
-    /**/
-    TI_UINT32  dwSecuritySuit;           /* Security suit bitmask (see defines)*/
-    TI_UINT32  dwSecurityState;          /* 802.1x security protocol state*/
-    TI_UINT32  dwSecurityAuthStatus;     /* Security suit authentication status*/
-    TI_UINT32  dwFeatureSuit;            /* Additional features suit bitmask (see defines)*/
-
-}  TIWLN_STATISTICS;
-
-
-/* Statistics security suit bitmasks*/
-#define TIWLN_STAT_SECURITY_RESERVE_1   0x0001
-
-typedef struct _RADIO_RX_QUALITY
-{
-    TI_INT32             Snr;
-    TI_INT32             Rssi;
-}TIWLN_RADIO_RX_QUALITY;
-
-#define MAX_NUM_DATA_FILTERS                4
-
-#endif /* __TIWLNIF_H__*/
diff --git a/wl1271/stad/build/linux/Makefile b/wl1271/stad/build/linux/Makefile
deleted file mode 100644
index e98697e..0000000
--- a/wl1271/stad/build/linux/Makefile
+++ /dev/null
@@ -1,132 +0,0 @@
-
-##
-##
-## File lists and locations
-##
-##
-
-#
-# DK_ROOT must be set prior to including common.inc
-#
-DK_ROOT = ../../..
-
-#
-# Includes common definitions and source file list
-#
-ifneq ($(KERNELRELEASE),)
-    include $(M)/common.inc
-    include $(M)/drv_sources.inc
-else
-    include common.inc
-    include drv_sources.inc
-endif
-
-#
-# Include directory for Odyssey supplicant files
-#
-ifeq ($(BUILD_SUPPL),y)
-    ODD_INC = $(DK_ROOT)/CUDK/Supplicant/odyssey/odSupp/linux/inc 
-else
-    ODD_INC = 
-endif
-
-#
-# OS include paths required for compilation.
-# 
-OS_INCS = $(DK_ROOT)/platforms/os/linux/inc $(DK_ROOT)/platforms/os/common/inc
-#OS_INCS += $(DK_ROOT)/stad/src/core/EvHandler $(DK_ROOT)/Test $(DK_ROOT)/platforms/hw/host_platform_$(HOST_PLATFORM)/linux
-OS_INCS += $(DK_ROOT)/stad/src/core/EvHandler $(DK_ROOT)/Test $(DK_ROOT)/platforms/hw/linux
-
-#
-# Location and filename of the driver .lib file created by this makefile.
-#
-OUTPUT_DIR = $(DK_ROOT)/stad/build/linux
-OUTPUT_FILE = $(OUTPUT_DIR)/libestadrv.a
-
-
-
-
-
-##
-##
-## Build process
-##
-##
-
-ifneq ($(KERNELRELEASE),)
-
-
-##
-##
-## This is the kernel build phase - set the appropriate arguments
-##
-##
-
-#
-# Adds the current directory as a prefix to all include directories.
-#
-	EXTRA_CFLAGS += $(addprefix -I$(M)/, $(DK_INCS) $(OS_INCS) $(ODD_INC))
-
-#
-# Intermediate object name - this should be converted to the appropriate library file
-# after the kernel makefile finishes its work.
-#
-	obj-m = tiwlan_drv.o
-
-#
-# List of object files the kernel makefile needs to compile.
-#
-	tiwlan_drv-y = $(DK_OBJS)
-
-
-else	# ifneq ($(KERNELRELEASE),)
-
-
-##
-##
-## This is the regular build phase - act according to the make actions
-##
-##
-
-#
-# The location of the kernel makefile
-#
-KERNEL_DIR ?= 
-
-
-#
-# Build the driver lib file
-#
-.PHONY: all
-all: .depend $(OUTPUT_FILE)
-
-
-#
-# Prints variables
-#
-.PHONY: help
-help:
-	@echo Default Compilation:	PLATFORM=$(PLATFORM) DEBUG=$(DEBUG) INTR=$(INTR) WSPI=$(WSPI) XCC=$(XCC) EXTRA CFLAGS: $(EXTRA_CFLAGS)
-#
-# Recursively cleans the driver files.
-#
-.PHONY: clean
-clean:
-	$(MAKE) -C $(KERNEL_DIR) M=`pwd` ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) clean
-	@rm -f *.o *.a .*.o.cmd *~ *.~* core .depend dep $(DK_OBJS) $(DEPS)
-
-
-#
-# Causes the library file to get rebuilt.
-#
-.depend:
-	rm -f $(OUTPUT_FILE)
-#
-# Recursively builds the library file.
-#
-$(OUTPUT_FILE):
-	$(MAKE) -C $(KERNEL_DIR) M=`pwd` ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) modules
-	@$(CROSS_COMPILE)$(AR) rcs $@ $(DK_OBJS)
-
-
-endif	# ifneq ($(KERNELRELEASE),)
diff --git a/wl1271/stad/build/linux/common.inc b/wl1271/stad/build/linux/common.inc
deleted file mode 100644
index d29e0c1..0000000
--- a/wl1271/stad/build/linux/common.inc
+++ /dev/null
@@ -1,184 +0,0 @@
-
-
-##
-##
-## Directory Locations
-##
-##
-
-COMMON      := $(DK_ROOT)/stad
-COMSRC      := $(COMMON)/src
-TWD         := $(DK_ROOT)/TWD
-UTILS       := $(DK_ROOT)/utils
-TESTSRC     := $(DK_ROOT)/Test
-LINUX_PFORM := $(DK_ROOT)/platforms/os/linux
-PLATFORMS   := $(DK_ROOT)/platforms
-EXT_DRV     := $(DK_ROOT)/external_drivers
-TXN         := $(DK_ROOT)/Txn
-
-##
-##
-## Make Flags
-##
-##
-
-#
-# Compile with FW1273 or FW1251
-#
-FW ?= 1273
-
-#
-# Compile with XCC support or not
-#
-XCC ?= n
-
-
-#
-# Compile with GEM support or not
-#
-GEM ?= n
-
-#
-# Choose the bus type (n for SDIO, y for WSPI)
-#
-WSPI ?= n
-
-#
-# Use periodic interrupt
-#
-INTR ?= y
-
-#
-# Enable or disable debugging
-#
-DEBUG ?= y
-KERNEL_DEBUGGER ?= n
-STRIP ?= y
-BMTRACE ?= n
-#
-# Enable or disable OS and init messages
-#
-INFO ?= n
-
-#
-# 1273 FPGA platform
-#
-FPGA1273 ?= n
-
-#
-# Enable trace buffer
-#
-TI_TRACE_BUFFER ?= n
-
-##
-##
-## Driver Compilation Directives
-##
-##
-ifeq "$(HOST_PLATFORM)" "omap2430"	
-	DK_DEFINES += -D HOST_PLATFORM_OMAP2430
-endif
-ifeq "$(HOST_PLATFORM)" "omap3430"
-	DK_DEFINES += -D HOST_PLATFORM_OMAP3430
-endif
-ifeq "$(HOST_PLATFORM)" "zoom2"
-	DK_DEFINES += -D HOST_PLATFORM_ZOOM2
-endif
-ifeq "$(HOST_PLATFORM)" "zoom1"
-	DK_DEFINES += -D HOST_PLATFORM_ZOOM1
-endif
-
-ifeq ($(XCC),y)
-    DK_DEFINES += -D XCC_MODULE_INCLUDED
-endif
-
-ifeq ($(GEM),y)
-    DK_DEFINES += -D GEM_SUPPORTED
-endif
-
-ifeq ($(INTR),n)
-    DK_DEFINES += -D PRIODIC_INTERRUPT
-endif    
-
-ifeq ($(DEBUG),y)
-    DK_DEFINES += -D TI_DBG
-    DK_DEFINES += -D REPORT_LOG
-    DK_DEFINES += -O2
-    DK_DEFINES += -D PRINTF_ROLLBACK
-else
-    DK_DEFINES += -D TI_DBG
-    DK_DEFINES += -U REPORT_LOG
-    DK_DEFINES += -O2
-endif
-ifeq ($(KERNEL_DEBUGGER),y)
-    DK_DEFINES += -g -O2
-	STRIP = n
-endif
-export KERNEL_DEBUGGER
-
-DK_DEFINES += -D __BYTE_ORDER_LITTLE_ENDIAN
-
-ifeq ($(TI_TRACE_BUFFER),y)
-   DK_DEFINES += -D TI_TRACE_BUF
-endif
-
-ifeq ($(BMTRACE),y)
-   DK_DEFINES += -D TIWLAN_BMTRACE
-endif
-
-# WPS Support
-DK_DEFINES += -D SUPPL_WPS_SUPPORT
-
-##
-##
-## Platform Compilation Directives
-##
-##
-
-#
-# Bus Driver
-#
-ifeq ($(WSPI),y)
-    BUS_DRV = spi
-    BUS_DRV_REMOVE = sdio
-    BUS_DRIVER_MODULE = spi.ko
-    PFORM_DEFINES += -D WSPI
-else
-    BUS_DRV = sdio
-    BUS_DRV_REMOVE = spi
-    BUS_DRV = sdio
-    BUS_DRV_REMOVE = spi
-    BUS_DRIVER_MODULE = sdio.ko
-endif
-
-ifeq ($(INFO),y)
-    PFORM_DEFINES += -D OS_INFO_MESSAGES
-    PFORM_DEFINES += -D INIT_MESSAGES
-endif
-
-PFORM_DEFINES += -D HOST_COMPILE
-PFORM_DEFINES += -D FW_RUNNING_AS_STA
-PFORM_DEFINES += -D TNETW1273
-
-ifeq ($(FPGA1273),y)
-    PFORM_DEFINES += -D FPGA1273_STAGE_
-endif
-
-ifeq ($(FULL_ASYNC),y)
-    PFORM_DEFINES += -D FULL_ASYNC_MODE
-endif
-
-ifeq ($(USE_IRQ_ACTIVE_HIGH),y)
-    PFORM_DEFINES += -D USE_IRQ_ACTIVE_HIGH
-endif
-
-##
-##
-## Miscellaneous Compilation Directivcs
-##
-##
-
-EXTRA_CFLAGS += -fsigned-char
-EXTRA_CFLAGS += -D __LINUX__ -DTI_RANDOM_DEFAULT_MAC
-EXTRA_CFLAGS += $(DK_DEFINES)
-EXTRA_CFLAGS += $(PFORM_DEFINES)
diff --git a/wl1271/stad/build/linux/drv_sources.inc b/wl1271/stad/build/linux/drv_sources.inc
deleted file mode 100644
index a7120c4..0000000
--- a/wl1271/stad/build/linux/drv_sources.inc
+++ /dev/null
@@ -1,277 +0,0 @@
-
-#start of TNETW_INCS#    do not remove or change this comment
-TNETW_INCS = \
-    $(COMMON)/Export_Inc \
-    $(UTILS) \
-    $(PLATFORMS)/os/common/inc \
-    $(PLATFORMS)/os/linux/src \
-    $(PLATFORMS)/os/linux/inc \
-    $(PLATFORMS)/hw/linux \
-    $(EXT_DRV)/$(BUS_DRV)/linux \
-    $(EXT_APP)/Linux/bmtrace/Export_Inc \
-    $(TWD) \
-    $(TWD)/Ctrl \
-    $(TWD)/Data_Service/Export_Inc \
-    $(TWD)/FW_Transfer/Export_Inc \
-    $(TWD)/FW_Transfer \
-    $(TWD)/Ctrl/Export_Inc \
-    $(TWD)/MacServices/Export_Inc \
-    $(TWD)/FirmwareApi \
-    $(TWD)/TwIf/ \
-    $(TWD)/MacServices \
-    $(TWD)/TWDriver \
-    $(TXN)
-
-ifeq ($(XCC),y)
-#start of TNETW_INCS_XCC#   do not remove or change this comment
-    TNETW_INCS += \
-        $(COMMON)/Export_Inc/XCC \
-        $(DK_ROOT)/utils/XCC
-
-    TNETW_INCS_XCC = \
-        $(COMMON)/Export_Inc/XCC
-
-    TNETW_INCS += $(TNETW_INCS_XCC)
-#end of TNETW_INCS_XCC#    do not remove or change this comment
-endif
-
-#end of TNETW_INCS#    do not remove or change this comment
-
-
-#start of CORE_INCS#     do not remove or change this comment
-CORE_INCS = \
-    $(COMSRC)/AirLink_Managment \
-    $(COMSRC)/Application \
-    $(COMSRC)/XCC \
-    $(COMSRC)/Connection_Managment \
-    $(COMSRC)/Ctrl_Interface \
-    $(COMSRC)/Data_link \
-    $(COMSRC)/Connection_Managment \
-    $(COMSRC)/Sta_Management \
-    $(COMSRC)/Connection_Managment
-
-#ifeq ($(DEBUG),y)
-    CORE_INCS += \
-        $(TESTSRC)/
-#endif 
-
-#start of CORE_INCS_XCC#     do not remove or change this comment
-ifeq ($(XCC),y)
-    CORE_INCS_XCC += \
-        $(COMSRC)/XCC
-
-    CORE_INCS += $(CORE_INCS_XCC)
-endif
-#end of CORE_INCS_XCC#   do not remove or change this comment
-
-#end of CORE_INCS#   do not remove or change this comment
-
-
-
-
-
-#start of UTIL_SRCS#    do not remove or change this comment
-UTIL_SRCS = \
-    $(UTILS)/fsm.c \
-    $(UTILS)/GenSM.c \
-    $(UTILS)/report.c \
-    $(UTILS)/queue.c \
-    $(UTILS)/context.c \
-    $(UTILS)/timer.c \
-    $(UTILS)/rate.c \
-    $(UTILS)/freq.c
-#end of UTIL_SRCS#      do not remove or change this comment
-
-
-#start of TNETW_SRCS#   do not remove or change this comment
-TNETW_SRCS = \
-    $(TWD)/MacServices/MacServices.c \
-    $(TWD)/MacServices/ScanSrv.c \
-    $(TWD)/MacServices/ScanSrvSM.c \
-    $(TWD)/MacServices/PowerSrv.c \
-    $(TWD)/MacServices/PowerSrvSM.c \
-    $(TWD)/MacServices/MeasurementSrv.c \
-    $(TWD)/MacServices/MeasurementSrvSM.c \
-    $(TWD)/MacServices/measurementSrvDbgPrint.c \
-    $(TWD)/TWDriver/TWDriver.c \
-    $(TWD)/TWDriver/TWDriverTx.c \
-    $(TWD)/TWDriver/TWDriverCtrl.c \
-    $(TWD)/TWDriver/TWDriverRadio.c \
-    $(TWD)/Ctrl/CmdQueue.c \
-    $(TWD)/Ctrl/CmdBld.c \
-    $(TWD)/Ctrl/CmdBldCfg.c \
-    $(TWD)/Ctrl/CmdBldCmd.c \
-    $(TWD)/Ctrl/CmdBldItr.c \
-    $(TWD)/Ctrl/CmdBldCfgIE.c \
-    $(TWD)/Ctrl/CmdBldCmdIE.c \
-    $(TWD)/Ctrl/CmdBldItrIE.c \
-    $(TWD)/Data_Service/txHwQueue.c \
-    $(TWD)/Data_Service/txCtrlBlk.c \
-    $(TWD)/Data_Service/RxQueue.c \
-    $(TWD)/FW_Transfer/CmdMBox.c \
-    $(TWD)/FW_Transfer/txResult.c \
-    $(TWD)/FW_Transfer/txXfer.c \
-    $(TWD)/FW_Transfer/FwEvent.c \
-    $(TWD)/FW_Transfer/RxXfer.c \
-    $(TWD)/FW_Transfer/eventMbox.c \
-    $(TWD)/FW_Transfer/HwInit.c \
-    $(TWD)/FW_Transfer/fwDebug.c \
-    $(TWD)/TwIf/TwIf.c \
-    $(TXN)/TxnQueue.c
-
-ifeq ($(WSPI),y)
-    TNETW_SRCS += \
-	$(TXN)/WspiBusDrv.c 
-endif
-
-ifeq ($(WSPI),n)
-    TNETW_SRCS += \
-	$(TXN)/SdioBusDrv.c 
-endif
-
-#start of TNETW_SRCS_XCC#   do not remove or change this comment
-#end of TNETW_SRCS_XCC#   do not remove or change this comment
-
-#end of TNETW_SRCS#    do not remove or change this comment
-
-#start of CORE_SRCS#   do not remove or change this comment
-CORE_SRCS = \
-    $(COMSRC)/Ctrl_Interface/DrvMain.c \
-    $(COMSRC)/Ctrl_Interface/EvHandler.c \
-    $(COMSRC)/Ctrl_Interface/CmdHndlr.c \
-    $(COMSRC)/Ctrl_Interface/CmdDispatcher.c \
-    $(COMSRC)/Data_link/txCtrl.c \
-    $(COMSRC)/Data_link/txCtrlServ.c \
-    $(COMSRC)/Data_link/txCtrlParams.c \
-    $(COMSRC)/Data_link/txPort.c \
-    $(COMSRC)/Data_link/txDataQueue.c \
-    $(COMSRC)/Data_link/TxDataClsfr.c \
-    $(COMSRC)/Data_link/txMgmtQueue.c \
-    $(COMSRC)/Data_link/Ctrl.c \
-    $(COMSRC)/Data_link/GeneralUtil.c \
-    $(COMSRC)/Data_link/TrafficMonitor.c \
-    $(COMSRC)/Data_link/rx.c \
-    $(COMSRC)/Sta_Management/PowerMgr.c \
-    $(COMSRC)/Sta_Management/PowerMgrKeepAlive.c \
-    $(COMSRC)/Sta_Management/PowerMgrDbgPrint.c \
-    $(COMSRC)/Sta_Management/healthMonitor.c \
-    $(COMSRC)/Sta_Management/siteMgr.c \
-    $(COMSRC)/Sta_Management/StaCap.c \
-    $(COMSRC)/Sta_Management/siteHash.c \
-    $(COMSRC)/Sta_Management/systemConfig.c \
-    $(COMSRC)/Sta_Management/templates.c \
-    $(COMSRC)/Sta_Management/mlmeBuilder.c \
-    $(COMSRC)/Sta_Management/mlmeParser.c \
-    $(COMSRC)/Sta_Management/mlmeSm.c \
-    $(COMSRC)/Sta_Management/assocSM.c \
-    $(COMSRC)/Sta_Management/authSm.c \
-    $(COMSRC)/Sta_Management/openAuthSm.c \
-    $(COMSRC)/Sta_Management/sharedKeyAuthSm.c \
-    $(COMSRC)/Sta_Management/scr.c \
-    $(COMSRC)/Sta_Management/ScanCncn.c \
-    $(COMSRC)/Sta_Management/ScanCncnSm.c \
-    $(COMSRC)/Sta_Management/ScanCncnSmSpecific.c \
-    $(COMSRC)/Sta_Management/ScanCncnOsSm.c \
-    $(COMSRC)/Sta_Management/ScanCncnApp.c \
-    $(COMSRC)/Sta_Management/scanResultTable.c \
-    $(COMSRC)/Sta_Management/currBss.c \
-    $(COMSRC)/Sta_Management/qosMngr.c \
-    $(COMSRC)/Sta_Management/trafficAdmControl.c \
-    $(COMSRC)/AirLink_Managment/SwitchChannel.c \
-    $(COMSRC)/AirLink_Managment/measurementMgr.c \
-    $(COMSRC)/AirLink_Managment/measurementMgrSM.c \
-    $(COMSRC)/AirLink_Managment/spectrumMngmntMgr.c \
-    $(COMSRC)/AirLink_Managment/requestHandler.c \
-    $(COMSRC)/AirLink_Managment/SoftGemini.c \
-    $(COMSRC)/AirLink_Managment/regulatoryDomain.c \
-    $(COMSRC)/Connection_Managment/conn.c \
-    $(COMSRC)/Connection_Managment/connIbss.c \
-    $(COMSRC)/Connection_Managment/connInfra.c \
-    $(COMSRC)/Connection_Managment/sme.c \
-    $(COMSRC)/Connection_Managment/smeSm.c \
-    $(COMSRC)/Connection_Managment/smeSelect.c \
-    $(COMSRC)/Connection_Managment/rsn.c \
-    $(COMSRC)/Connection_Managment/mainSecSm.c \
-    $(COMSRC)/Connection_Managment/mainSecNull.c \
-    $(COMSRC)/Connection_Managment/mainSecKeysOnly.c \
-    $(COMSRC)/Connection_Managment/admCtrl.c \
-    $(COMSRC)/Connection_Managment/admCtrlWep.c \
-    $(COMSRC)/Connection_Managment/admCtrlNone.c \
-    $(COMSRC)/Connection_Managment/admCtrlWpa.c \
-    $(COMSRC)/Connection_Managment/admCtrlWpa2.c \
-    $(COMSRC)/Connection_Managment/apConn.c \
-    $(COMSRC)/Connection_Managment/keyDerive.c \
-    $(COMSRC)/Connection_Managment/keyDeriveWep.c \
-    $(COMSRC)/Connection_Managment/keyParser.c \
-    $(COMSRC)/Connection_Managment/keyDeriveAes.c \
-    $(COMSRC)/Connection_Managment/keyDeriveTkip.c \
-    $(COMSRC)/Connection_Managment/broadcastKeySM.c \
-    $(COMSRC)/Connection_Managment/unicastKeySM.c \
-    $(COMSRC)/Connection_Managment/broadcastKey802_1x.c \
-    $(COMSRC)/Connection_Managment/unicastKey802_1x.c \
-    $(COMSRC)/Connection_Managment/broadcastKeyNone.c \
-    $(COMSRC)/Connection_Managment/unicastKeyNone.c \
-    $(COMSRC)/Connection_Managment/keyParserExternal.c \
-    $(COMSRC)/Connection_Managment/keyParserWep.c \
-    $(COMSRC)/Connection_Managment/mainKeysSm.c \
-    $(COMSRC)/Connection_Managment/externalSec.c \
-    $(COMSRC)/Application/scanMngr.c \
-    $(COMSRC)/Application/roamingMngr.c \
-    $(COMSRC)/Application/roamingMngr_manualSM.c \
-    $(COMSRC)/Application/roamingMngr_autoSM.c
-
-#ifeq ($(DEBUG),y)
-    CORE_SRCS += \
-        $(TESTSRC)/connDebug.c \
-        $(TESTSRC)/siteMgrDebug.c \
-        $(TESTSRC)/ctrlDbg.c \
-        $(TESTSRC)/RxDbg.c \
-        $(TESTSRC)/TxDbg.c \
-        $(TESTSRC)/debug.c \
-        $(TESTSRC)/PowerMgrDebug.c \
-        $(TESTSRC)/rsnDbg.c \
-        $(TESTSRC)/TWD_Debug.c \
-        $(TESTSRC)/measurementDbg.c \
-        $(TESTSRC)/scanCncnDbg.c \
-        $(TESTSRC)/qosMngrDbg.c \
-        $(TESTSRC)/ScanMngrDbg.c \
-        $(TESTSRC)/scanCncnDbg.c \
-        $(TESTSRC)/roamingMgrDebug.c \
-        $(TESTSRC)/scrDbg.c \
-        $(TESTSRC)/SoftGeminiDbg.c \
-        $(TESTSRC)/HealthMonitorDbg.c \
-        $(TESTSRC)/smeDebug.c \
-        $(TESTSRC)/fwdriverdebug.c \
-	$(TESTSRC)/MibDbg.c \
-        $(TESTSRC)/TwIfDebug.c
-#endif
-
-#start of CORE_SRCS_XCC#   do not remove or change this comment
-ifeq ($(XCC),y)
-    CORE_SRCS_XCC += \
-        $(COMSRC)/Connection_Managment/keyDeriveCkip.c \
-        $(COMSRC)/XCC/admCtrlXCC.c \
-        $(COMSRC)/XCC/XCCRMMngr.c \
-        $(COMSRC)/XCC/XCCTSMngr.c \
-        $(COMSRC)/XCC/XCCMngr.c \
-        $(COMSRC)/XCC/rogueAp.c \
-        $(COMSRC)/XCC/TransmitPowerXCC.c 
-
-    CORE_SRCS += $(CORE_SRCS_XCC)
-endif
-#end of CORE_SRCS_XCC#   do not remove or change this comment
-
-#end of CORE_SRCS#   do not remove or change this comment
-
-
-DK_INCS = \
-$(TNETW_INCS) \
-$(CORE_INCS)
-
-DK_SRCS = \
-$(CORE_SRCS) \
-$(TNETW_SRCS)
-
-DK_OBJS = $(patsubst %.c, %.o, $(DK_SRCS) $(UTIL_SRCS))
-
-
diff --git a/wl1271/stad/src/AirLink_Managment/SoftGemini.c b/wl1271/stad/src/AirLink_Managment/SoftGemini.c
deleted file mode 100644
index 4437a93..0000000
--- a/wl1271/stad/src/AirLink_Managment/SoftGemini.c
+++ /dev/null
@@ -1,1012 +0,0 @@
-/*
- * SoftGemini.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file softGemini.c
- *  \brief BlueTooth-Wlan coexistence module interface
- *
- *  \see softGemini.h
- */
-
-/****************************************************************************************************
-*																									*
-*		MODULE:		softGemini.c																	*
-*		PURPOSE:	BlueTooth-Wlan coexistence module interface.							*
-*					This module handles all data base (and Fw setting accordingly)					*
-*					for Bluetooth-Wlan coexistence implementation.									*
-*																						 			*
-****************************************************************************************************/
-
-#define __FILE_ID__  FILE_ID_5
-#include "report.h"
-#include "osApi.h"
-#include "SoftGemini.h"
-#include "DataCtrl_Api.h"
-#include "scrApi.h"
-#include "PowerMgr_API.h"
-#include "ScanCncn.h"
-#include "currBss.h"
-#include "CmdDispatcher.h"
-#include "TWDriver.h"
-#include "DrvMainModules.h"
-#include "bssTypes.h"
-#include "sme.h"
-
-
-#define SENSE_MODE_ENABLE		0x01
-#define SENSE_MODE_DISABLE		0x00
-#define PROTECTIVE_MODE_ON		0x01
-#define PROTECTIVE_MODE_OFF		0x00
-
-/********************************************************************************/
-/*						Internal functions prototypes.							*/
-/********************************************************************************/
-
-static TI_STATUS SoftGemini_setEnableParam(TI_HANDLE hSoftGemini, ESoftGeminiEnableModes SoftGeminiEnable, TI_BOOL recovery);
-static TI_STATUS SoftGemini_setParamsToFW(TI_HANDLE hSoftGemini, TSoftGeminiParams *SoftGeminiParam);
-static TI_STATUS SoftGemini_EnableDriver(TI_HANDLE hSoftGemini);
-static TI_STATUS SoftGemini_DisableDriver(TI_HANDLE hSoftGemini);
-static TI_STATUS SoftGemini_SetPS(SoftGemini_t	 *pSoftGemini);
-static TI_STATUS SoftGemini_unSetPS(SoftGemini_t *pSoftGemini);
-static void SoftGemini_RemoveProtectiveModeParameters(TI_HANDLE hSoftGemini);
-static void SoftGemini_setConfigParam(TI_HANDLE hSoftGemini, TI_UINT32 *param);
-static void SoftGemini_EnableProtectiveMode(TI_HANDLE hSoftGemini);
-static void SoftGemini_DisableProtectiveMode(TI_HANDLE hSoftGemini);
-#ifdef REPORT_LOG
-static char* SoftGemini_ConvertModeToString(ESoftGeminiEnableModes SoftGeminiEnable);
-#endif
-
-/********************************************************************************/
-/*						Interface functions Implementation.						*/
-/********************************************************************************/
-/************************************************************************
- *                        SoftGemini_SetPSmode									*
- ************************************************************************
-DESCRIPTION: SoftGemini module, called by the conn_Infra on connection
-				performs the following:
-				-	Enables SG if needed
-                                -       Enables the SG power mode				                                                                                                   
-INPUT:      hSoftGemini -		Handle to SoftGemini		
-
-OUTPUT:		
-
-RETURN:     
-
-************************************************************************/
-void SoftGemini_SetPSmode(TI_HANDLE hSoftGemini)
-{
-	SoftGemini_t *pSoftGemini = (SoftGemini_t *)hSoftGemini;
-
-	if (pSoftGemini)
-	{
-		if (pSoftGemini->bDriverEnabled) 
-		{
-			/* Check if coexAutoPsMode is enabled to enter/exit P.S */
-			if ( pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_AUTO_PS_MODE])
-			{
-				SoftGemini_SetPS(pSoftGemini);
-			}
-		}
-		if (pSoftGemini->bProtectiveMode) 
-		{
-			SoftGemini_EnableProtectiveMode(hSoftGemini);
-		}
-	}
-	else 
-        {
-          TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_ERROR, "  SoftGemini_SetPSmode() - Error hSoftGemini= NULL \n");
-        }
-}
-
-/************************************************************************
- *                        SoftGemini_unSetPSmode									*
- ************************************************************************
-DESCRIPTION: SoftGemini module, called by the conn_Infra after disconnecting 
-				performs the following:
-				-	Disables the SG
-                                -       Disables the SG power mode				                                                                                                   
-INPUT:      hSoftGemini -		Handle to SoftGemini		
-
-OUTPUT:		
-
-RETURN:     
-
-************************************************************************/
-void SoftGemini_unSetPSmode(TI_HANDLE hSoftGemini)
-{
-	SoftGemini_t *pSoftGemini = (SoftGemini_t *)hSoftGemini;
-
-    if (pSoftGemini)
-	{
-		if (pSoftGemini->bDriverEnabled) 
-		{
-			/* Check if coexAutoPsMode is enabled to enter/exit P.S */
-			if ( pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_AUTO_PS_MODE])
-			{
-				SoftGemini_unSetPS(pSoftGemini);
-			}
-		}
-		if (pSoftGemini->bProtectiveMode) 
-		{
-			SoftGemini_RemoveProtectiveModeParameters(hSoftGemini);
-		}
-	}
-    else
-    {
-		TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_ERROR, " SoftGemini_unSetPSmode() - Error hSoftGemini= NULL \n");
-    }
-}
-
-/************************************************************************
- *                        SoftGemini_create									*
- ************************************************************************
-DESCRIPTION: SoftGemini module creation function, called by the config mgr in creation phase 
-				performs the following:
-				-	Allocate the SoftGemini handle
-				                                                                                                   
-INPUT:      hOs -			Handle to OS		
-
-
-OUTPUT:		
-
-RETURN:     Handle to the SoftGemini module on success, NULL otherwise
-
-************************************************************************/
-TI_HANDLE SoftGemini_create(TI_HANDLE hOs)
-{
-	SoftGemini_t			*pSoftGemini = NULL;
-
-	/* allocating the SoftGemini object */
-	pSoftGemini = os_memoryAlloc(hOs,sizeof(SoftGemini_t));
-
-	if (pSoftGemini == NULL)
-		return NULL;				
-
-	pSoftGemini->hOs = hOs;
-
-	return pSoftGemini;
-}
-
-/************************************************************************
- *                        SoftGemini_config						*
- ************************************************************************
-DESCRIPTION: SoftGemini module init function, called by the rvMain in init phase
-				performs the following:
-				-	Init local variables
-				-	Init the handles to be used by the module
-                                                                                                   
-INPUT:       pStadHandles  - The driver modules handles		
-
-OUTPUT:		
-
-RETURN:      void
-************************************************************************/
-void SoftGemini_init (TStadHandlesList *pStadHandles)
-{
-	SoftGemini_t *pSoftGemini = (SoftGemini_t *)(pStadHandles->hSoftGemini);
-
-	pSoftGemini->hCtrlData    = pStadHandles->hCtrlData;
-	pSoftGemini->hTWD	      = pStadHandles->hTWD;
-	pSoftGemini->hReport	  = pStadHandles->hReport;
-	pSoftGemini->hSCR         = pStadHandles->hSCR;
-	pSoftGemini->hPowerMgr    = pStadHandles->hPowerMgr;
-	pSoftGemini->hCmdDispatch = pStadHandles->hCmdDispatch;
-	pSoftGemini->hScanCncn    = pStadHandles->hScanCncn;
-	pSoftGemini->hCurrBss	  = pStadHandles->hCurrBss;
-    pSoftGemini->hSme         = pStadHandles->hSme;
-}
-
-
-TI_STATUS SoftGemini_SetDefaults (TI_HANDLE hSoftGemini, SoftGeminiInitParams_t *pSoftGeminiInitParams)
-{
-	SoftGemini_t *pSoftGemini = (SoftGemini_t *)hSoftGemini;
-	TI_UINT8 i =0;
-	TI_STATUS status;
-	/*************************************/
-	/* Getting SoftGemini init Params */
-	/***********************************/
-
-	pSoftGemini->SoftGeminiEnable = pSoftGeminiInitParams->SoftGeminiEnable;
-
-	for (i =0; i< SOFT_GEMINI_PARAMS_MAX ; i++)
-	{
-		pSoftGemini->SoftGeminiParam.coexParams[i] = pSoftGeminiInitParams->coexParams[i];
-	}
-
-	pSoftGemini->SoftGeminiParam.paramIdx = 0xFF; /* signals to FW to config all the paramters */
-
-
-    /* Send the configuration to the FW */
-	status = SoftGemini_setParamsToFW(hSoftGemini, &pSoftGemini->SoftGeminiParam);
-
-	/*******************************/
-    /* register Indication interrupts  */
-	/*****************************/
-
-    TWD_RegisterEvent (pSoftGemini->hTWD, 
-                       TWD_OWN_EVENT_SOFT_GEMINI_SENSE,
-                       (void *)SoftGemini_SenseIndicationCB, 
-                       hSoftGemini);
-	TWD_RegisterEvent (pSoftGemini->hTWD, 
-                       TWD_OWN_EVENT_SOFT_GEMINI_PREDIC,
-                       (void *)SoftGemini_ProtectiveIndicationCB, 
-                       hSoftGemini);
-
-    TWD_EnableEvent (pSoftGemini->hTWD, TWD_OWN_EVENT_SOFT_GEMINI_SENSE);
-	TWD_EnableEvent (pSoftGemini->hTWD, TWD_OWN_EVENT_SOFT_GEMINI_PREDIC);
-
-	/* On system initialization SG is disabled but later calls to SoftGemini_setEnableParam() */
-	pSoftGemini->bProtectiveMode = TI_FALSE;	
-	pSoftGemini->SoftGeminiEnable = SG_DISABLE; 
-	pSoftGemini->bDriverEnabled = TI_FALSE;
-        pSoftGemini->bPsPollFailureActive = TI_FALSE;
-
-	if ((TI_OK == status) && (pSoftGeminiInitParams->SoftGeminiEnable != SG_DISABLE))
-	{	/* called only if different than SG_DISABLE */
-		status = SoftGemini_setEnableParam(hSoftGemini, pSoftGeminiInitParams->SoftGeminiEnable, TI_FALSE);
-	}
-
-	if (status == TI_OK)
-	{
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INIT, "  SoftGemini_config() - configured successfully\n");
-	}
-	else
-	{
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_ERROR, "  SoftGemini_config() - Error configuring module \n");
-	}
-
-	return status;
-}
-
-/************************************************************************
- *                        SoftGemini_destroy							*
- ************************************************************************
-DESCRIPTION: SoftGemini module destroy function, called by the config mgr in the destroy phase 
-				performs the following:
-				-	Free all memory aloocated by the module
-                                                                                                   
-INPUT:      hSoftGemini	-	SoftGemini handle.		
-
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS SoftGemini_destroy(TI_HANDLE hSoftGemini)
-{
-	SoftGemini_t	*pSoftGemini = (SoftGemini_t *)hSoftGemini;
-
-	if (pSoftGemini != NULL)
-	{
-		os_memoryFree( pSoftGemini->hOs, (TI_HANDLE)pSoftGemini , sizeof(SoftGemini_t));
-	}
-	
-	return TI_OK;
-}
-
-
-/***********************************************************************
- *                        SoftGemini_setParam									
- ***********************************************************************
-DESCRIPTION: SoftGemini set param function, called by the following:
-			-	config mgr in order to set a parameter receiving from the OS abstraction layer.
-			-	From inside the driver	
-                                                                                                   
-INPUT:      hSoftGemini	-	SoftGemini handle.
-			pParam	-	Pointer to the parameter		
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS SoftGemini_setParam(TI_HANDLE	hSoftGemini,
-											paramInfo_t	*pParam)
-{
-	SoftGemini_t *pSoftGemini = (SoftGemini_t *)hSoftGemini;
-	TI_STATUS return_value = TI_OK;
-
-TRACE1(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "  SoftGemini_setParam() (0x%x)\n", pParam->paramType);
-	
-	switch(pParam->paramType)
-	{
-
-	case SOFT_GEMINI_SET_ENABLE:
-		
-		return_value = SoftGemini_setEnableParam(hSoftGemini,pParam->content.SoftGeminiEnable, TI_FALSE);
-		break;
-
-	case SOFT_GEMINI_SET_CONFIG:
-
-		/* copy new params to SoftGemini module */
-		SoftGemini_setConfigParam(hSoftGemini,pParam->content.SoftGeminiParamArray);
-
-		/* set new params to FW */
-		return_value = SoftGemini_setParamsToFW(hSoftGemini, &(pSoftGemini->SoftGeminiParam));
-
-		if (pSoftGemini->bProtectiveMode == TI_TRUE)
-		{
-			/* set new configurations of scan to scancncn */
-			scanCncn_SGconfigureScanParams(pSoftGemini->hScanCncn,TI_TRUE,
-										   (TI_UINT8)pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_AUTO_SCAN_PROBE_REQ],
-										   pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_HV3_MAX_OVERRIDE],
-										   pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_ACTIVE_SCAN_DURATION_FACTOR_HV3]);
-		}
-		break;
-		
-	default:
-TRACE1(pSoftGemini->hReport, REPORT_SEVERITY_ERROR, "  SoftGemini_setParam(), Params is not supported, %d\n\n", pParam->paramType);
-		return PARAM_NOT_SUPPORTED;
-	}
-
-	return return_value;
-}
-
-/***********************************************************************
- *			      SoftGemini_getParam									
- ***********************************************************************
-DESCRIPTION: SoftGemini get param function, called by the following:
-			-	config mgr in order to get a parameter from the OS abstraction layer.
-			-	From inside the dirver	
-                                                                                                   
-INPUT:      hSoftGemini	-	SoftGemini handle.
-				
-
-OUTPUT:		pParam	-	Pointer to the parameter	
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS SoftGemini_getParam(TI_HANDLE		hSoftGemini,
-											paramInfo_t	*pParam)
-{ 
-		switch (pParam->paramType)
-		{
-			case SOFT_GEMINI_GET_CONFIG:
-				SoftGemini_printParams(hSoftGemini);
-				break;
-		}
-
-	return TI_OK;
-}
- 
-
-
-/***************************************************************************
-*					SoftGemini_setEnableParam					    	       *
-****************************************************************************
-* DESCRIPTION:	The function sets the  appropriate Enable value,
-*				configures SCR , POWER MGR , DATA CTRL , FW.   
-*
-* INPUTS:		pSoftGemini - the object		
-***************************************************************************/
-static TI_STATUS SoftGemini_setEnableParam(TI_HANDLE hSoftGemini, ESoftGeminiEnableModes SoftGeminiEnable, TI_BOOL recovery)
-{
-	SoftGemini_t *pSoftGemini = (SoftGemini_t *)hSoftGemini;
-	TTwdParamInfo	param;
-	TI_STATUS return_value = TI_OK;
-
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "  setSoftGeminiEnableParam() - Old value = , New value = \n");
-
-
-    /*
-     * PsPoll work around is active. Just save the value and configure it later
-     */
-    if ( pSoftGemini->bPsPollFailureActive )
-    {
-        TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "  setSoftGeminiEnableParam() - while PsPollFailure is active\n");
-
-        pSoftGemini->PsPollFailureLastEnableValue = SoftGeminiEnable;
-        return TI_OK;
-    }
-
-	/**********************************/
-	/* Sanity check on enable values */
-	/********************************/
-
-	/*				Old Value						New Value		    */        
-	/*					|							    |			    */        
-	/*			  	   \|/							   \|/			    */        
-
-	if ((pSoftGemini->SoftGeminiEnable == SoftGeminiEnable) && !recovery)
-	{
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_ERROR, "   - setting same value \n");
-		return TI_NOK;
-	}
-
-	/*******************************/
-	/* Make the necessary actions */
-	/*****************************/
-	
-	switch (SoftGeminiEnable)
-	{
-	case SG_PROTECTIVE:
-	case SG_OPPORTUNISTIC:
-		
-		/* set FW with SG_ENABLE */ 
-		param.paramType = TWD_SG_ENABLE_PARAM_ID;
-		param.content.SoftGeminiEnable = SoftGeminiEnable;
-		return_value = TWD_SetParam (pSoftGemini->hTWD, &param);
-
-		break;
-
-	case SG_DISABLE:
-		
-		/* set FW with SG_DISABLE */
-		param.paramType = TWD_SG_ENABLE_PARAM_ID;
-		param.content.SoftGeminiEnable = SG_DISABLE;
-		return_value = TWD_SetParam (pSoftGemini->hTWD, &param);
-
-		if (pSoftGemini->bDriverEnabled)
-		{	
-			SoftGemini_DisableDriver(hSoftGemini);
-		}
-		
-		break;
-
-	default:
-TRACE1(pSoftGemini->hReport, REPORT_SEVERITY_ERROR, " defualt :%d\n",SoftGeminiEnable);
-		return TI_NOK;
-	}
-
-	/* Pass to the new enable state */
-	pSoftGemini->SoftGeminiEnable = SoftGeminiEnable;
-
-	if (TI_OK != return_value)
-	{
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_ERROR, " can't configure enable param to FW :\n");
-	}
-	
-	return return_value;
-}
-
-/***************************************************************************
-*					SoftGemini_setConfigParam				    	       *
-****************************************************************************
-* DESCRIPTION:	The function sets params 
-*
-* INPUTS:		pSoftGemini - the object
-*				param       - params to be configured	
-***************************************************************************/
-static void SoftGemini_setConfigParam(TI_HANDLE hSoftGemini, TI_UINT32 *param)
-{
-	SoftGemini_t *pSoftGemini = (SoftGemini_t *)hSoftGemini;
-
-	/* param[0] - SG parameter index, param[1] - SG parameter value */
-	pSoftGemini->SoftGeminiParam.coexParams[(TI_UINT8)param[0]] = (TI_UINT32)param[1];
-	pSoftGemini->SoftGeminiParam.paramIdx = (TI_UINT8)param[0];
-}
-
-/***************************************************************************
-*					SoftGemini_printParams					    	       *
-****************************************************************************
-* DESCRIPTION:	Print SG Parameters.  
-*
-* INPUTS:		pSoftGemini - the object	
-***************************************************************************/
-void SoftGemini_printParams(TI_HANDLE hSoftGemini)
-{
-#ifdef REPORT_LOG
-
-	SoftGemini_t *pSoftGemini = (SoftGemini_t *)hSoftGemini;
-	TSoftGeminiParams *SoftGeminiParam = &pSoftGemini->SoftGeminiParam;
-
-	WLAN_OS_REPORT(("[0]:  coexBtPerThreshold = %d\n", SoftGeminiParam->coexParams[SOFT_GEMINI_BT_PER_THRESHOLD]));
-	WLAN_OS_REPORT(("[1]:  coexHv3MaxOverride = %d \n", SoftGeminiParam->coexParams[SOFT_GEMINI_HV3_MAX_OVERRIDE])); 
-	WLAN_OS_REPORT(("[2]:  coexBtNfsSampleInterval = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_BT_NFS_SAMPLE_INTERVAL]));
-	WLAN_OS_REPORT(("[3]:  coexBtLoadRatio = %d (%)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_BT_LOAD_RATIO]));
-	WLAN_OS_REPORT(("[4]:  coexAutoPsMode = %s \n", (SoftGeminiParam->coexParams[SOFT_GEMINI_AUTO_PS_MODE]?"Enabled":"Disabled")));
-	WLAN_OS_REPORT(("[5]:  coexAutoScanEnlargedNumOfProbeReqPercent = %d (%)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_AUTO_SCAN_PROBE_REQ]));
-	WLAN_OS_REPORT(("[6]:  coexHv3AutoScanEnlargedScanWinodowPercent = %d (%)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_ACTIVE_SCAN_DURATION_FACTOR_HV3]));
-	WLAN_OS_REPORT(("[7]:  coexAntennaConfiguration = %s (0 = Single, 1 = Dual) \n", (SoftGeminiParam->coexParams[SOFT_GEMINI_ANTENNA_CONFIGURATION]?"Dual":"Single")));
-	WLAN_OS_REPORT(("[8]:  coexMaxConsecutiveBeaconMissPrecent = %d (%)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_BEACON_MISS_PERCENT]));
-	WLAN_OS_REPORT(("[9]:  coexAPRateAdapationThr = %d\n", SoftGeminiParam->coexParams[SOFT_GEMINI_RATE_ADAPT_THRESH]));
-	WLAN_OS_REPORT(("[10]: coexAPRateAdapationSnr = %d\n", SoftGeminiParam->coexParams[SOFT_GEMINI_RATE_ADAPT_SNR]));
-	WLAN_OS_REPORT(("[11]: coexWlanPsBtAclMasterMinBR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_BR]));
-	WLAN_OS_REPORT(("[12]: coexWlanPsBtAclMasterMaxBR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_BR]));
-	WLAN_OS_REPORT(("[13]: coexWlanPsMaxBtAclMasterBR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_BR]));
-    WLAN_OS_REPORT(("[14]: coexWlanPsBtAclSlaveMinBR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_BR]));
-    WLAN_OS_REPORT(("[15]: coexWlanPsBtAclSlaveMaxBR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_BR]));
-    WLAN_OS_REPORT(("[16]: coexWlanPsMaxBtAclSlaveBR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_BR]));
-    WLAN_OS_REPORT(("[17]: coexWlanPsBtAclMasterMinEDR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MIN_EDR]));
-    WLAN_OS_REPORT(("[18]: coexWlanPsBtAclMasterMaxEDR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_MASTER_MAX_EDR]));
-    WLAN_OS_REPORT(("[19]: coexWlanPsMaxBtAclMasterEDR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_MASTER_EDR]));
-    WLAN_OS_REPORT(("[20]: coexWlanPsBtAclSlaveMinEDR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MIN_EDR]));
-    WLAN_OS_REPORT(("[21]: coexWlanPsBtAclSlaveMaxEDR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_PS_BT_ACL_SLAVE_MAX_EDR]));
-    WLAN_OS_REPORT(("[22]: coexWlanPsMaxBtAclSlaveEDR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_PS_MAX_BT_ACL_SLAVE_EDR]));
-	WLAN_OS_REPORT(("[23]: coexRxt = %d (usec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_RXT]));
-	WLAN_OS_REPORT(("[24]: coexTxt = %d (usec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_TXT]));
-	WLAN_OS_REPORT(("[25]: coexAdaptiveRxtTxt = %s \n", (SoftGeminiParam->coexParams[SOFT_GEMINI_ADAPTIVE_RXT_TXT]?"Enabled":"Disabled")));
-	WLAN_OS_REPORT(("[26]: coexPsPollTimeout = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_PS_POLL_TIMEOUT]));
-	WLAN_OS_REPORT(("[27]: coexUpsdTimeout = %d (msec) \n", SoftGeminiParam->coexParams[SOFT_GEMINI_UPSD_TIMEOUT]));
-	WLAN_OS_REPORT(("[28]: coexWlanActiveBtAclMasterMinEDR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR]));
-	WLAN_OS_REPORT(("[29]: coexWlanActiveBtAclMasterMaxEDR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR]));
-	WLAN_OS_REPORT(("[30]: coexWlanActiveMaxBtAclMasterEDR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR]));
-    WLAN_OS_REPORT(("[31]: coexWlanActiveBtAclSlaveMinEDR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR]));
-	WLAN_OS_REPORT(("[32]: coexWlanActiveBtAclSlaveMaxEDR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR]));
-    WLAN_OS_REPORT(("[33]: coexWlanActiveMaxBtAclSlaveEDR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR]));
-    WLAN_OS_REPORT(("[34]: coexWlanActiveBtAclMinBR = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MIN_BR]));
-    WLAN_OS_REPORT(("[35]: coexWlanActiveBtAclMinBr = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_ACTIVE_BT_ACL_MAX_BR]));
-    WLAN_OS_REPORT(("[36]: coexWlanActiveMaxBtAclBr = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_WLAN_ACTIVE_MAX_BT_ACL_BR]));
-    WLAN_OS_REPORT(("[37]: coexHv3AutoEnlargePassiveScanWindowPercent = %d (%)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_HV3]));
-    WLAN_OS_REPORT(("[38]: coexA2DPAutoEnlargePassiveScanWindowPercent = %d (%) \n", SoftGeminiParam->coexParams[SOFT_GEMINI_PASSIVE_SCAN_DURATION_FACTOR_A2DP]));
-    WLAN_OS_REPORT(("[39]: coexPassiveScanA2dpBtTime  = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_PASSIVE_SCAN_A2DP_BT_TIME]));
-    WLAN_OS_REPORT(("[40]: coexPassiveScanA2dpWlanTime = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_PASSIVE_SCAN_A2DP_WLAN_TIME]));
-	WLAN_OS_REPORT(("[41]: CoexHv3MaxServed = %d \n", SoftGeminiParam->coexParams[SOFT_GEMINI_HV3_MAX_SERVED]));
-	WLAN_OS_REPORT(("[42]: coexDhcpTime = %d (msec)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_DHCP_TIME]));
-	WLAN_OS_REPORT(("[43]: coexA2dpAutoScanEnlargedScanWinodowPercent = %d (%)\n", SoftGeminiParam->coexParams[SOFT_GEMINI_ACTIVE_SCAN_DURATION_FACTOR_A2DP]));
-	WLAN_OS_REPORT(("[44]: coexTempParam1 = %d \n", SoftGeminiParam->coexParams[SOFT_GEMINI_TEMP_PARAM_1]));
-	WLAN_OS_REPORT(("[45]: coexTempParam2 = %d \n", SoftGeminiParam->coexParams[SOFT_GEMINI_TEMP_PARAM_2]));
-	WLAN_OS_REPORT(("[46]: coexTempParam3 = %d \n", SoftGeminiParam->coexParams[SOFT_GEMINI_TEMP_PARAM_3]));
-	WLAN_OS_REPORT(("[47]: coexTempParam4 = %d \n", SoftGeminiParam->coexParams[SOFT_GEMINI_TEMP_PARAM_4]));
-	WLAN_OS_REPORT(("[48]: coexTempParam5 = %d \n", SoftGeminiParam->coexParams[SOFT_GEMINI_TEMP_PARAM_5]));
-	WLAN_OS_REPORT(("Enable mode : %s\n", SoftGemini_ConvertModeToString(pSoftGemini->SoftGeminiEnable))); 
-	WLAN_OS_REPORT(("Driver Enabled : %s\n",(pSoftGemini->bDriverEnabled ? "YES" : "NO"))); 
-	WLAN_OS_REPORT(("Protective mode : %s\n", (pSoftGemini->bProtectiveMode ? "ON" : "OFF"))); 
-    WLAN_OS_REPORT(("PsPoll failure active : %s\n", (pSoftGemini->bPsPollFailureActive ? "YES" : "NO"))); 
-
-#endif
-}
-
-/***************************************************************************
-*					SoftGemini_setParamsToFW					    	       *
-****************************************************************************
-* DESCRIPTION:	The function sets the FW with the appropriate parameters set.  
-*
-* INPUTS:		pSoftGemini - the object
-*
-*
-* OUTPUT:			
-* 
-* RETURNS:		
-***************************************************************************/
-static TI_STATUS SoftGemini_setParamsToFW(TI_HANDLE hSoftGemini, TSoftGeminiParams *softGeminiParams)
-{
-	SoftGemini_t *pSoftGemini = (SoftGemini_t *)hSoftGemini;
-	TTwdParamInfo param;
-
-	os_memoryCopy(pSoftGemini->hOs,&param.content.SoftGeminiParam, softGeminiParams, sizeof(TSoftGeminiParams));
-	param.paramType = TWD_SG_CONFIG_PARAM_ID;
-	return TWD_SetParam (pSoftGemini->hTWD, &param);
-}
-
-
-/***************************************************************************
-*					SoftGemini_EnableDriver  		    	       *
-****************************************************************************
-* DESCRIPTION:	Activated when SG is enabled (after CLI or FW command)
-*
-* INPUTS:		pSoftGemini - the object
-*	
-***************************************************************************/
-static TI_STATUS SoftGemini_EnableDriver(TI_HANDLE hSoftGemini)
-{
-	SoftGemini_t	*pSoftGemini = (SoftGemini_t *)hSoftGemini;
-	TI_STATUS return_value = TI_OK;
-
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "\n");
-
-	pSoftGemini->bDriverEnabled = TI_TRUE;
-
-	/* Check if coexAutoPsMode - Co-ex is enabled to enter/exit P.S */
-	if ( pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_AUTO_PS_MODE])
-	{
-		SoftGemini_SetPS(pSoftGemini);
-	}
-
-	scr_setMode(pSoftGemini->hSCR, SCR_MID_SG);
-
-	return return_value;
-}
-
-/***************************************************************************
-*					SoftGemini_DisableDriver  		    	       *
-****************************************************************************
-* DESCRIPTION:	Activated when SG is disabled (after CLI or FW command)
-*
-* INPUTS:		pSoftGemini - the object
-*	
-***************************************************************************/
-static TI_STATUS SoftGemini_DisableDriver(TI_HANDLE hSoftGemini)
-{
-	SoftGemini_t	*pSoftGemini = (SoftGemini_t *)hSoftGemini;
-	TI_STATUS return_value = TI_OK;
-
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "\n");
-
-	pSoftGemini->bDriverEnabled = TI_FALSE;
-
-	scr_setMode(pSoftGemini->hSCR, SCR_MID_NORMAL);
-
-
-	/* Check if coexAutoPsMode - Co-ex is enabled to enter/exit P.S */
-	if ( pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_AUTO_PS_MODE])
-	{
-		SoftGemini_unSetPS(pSoftGemini);
-	}
-
-	/* Undo the changes that were made when Protective mode was on */
-	if (pSoftGemini->bProtectiveMode)
-	{
-		SoftGemini_DisableProtectiveMode(hSoftGemini);
-	}
-	
-	return return_value;
-}
-
-/***************************************************************************
-*					SoftGemini_SetPS  		    						   *
-****************************************************************************
-* DESCRIPTION:	Set Always PS to PowerMgr
-*
-* INPUTS:		pSoftGemini - the object
-*	
-***************************************************************************/
-static TI_STATUS SoftGemini_SetPS(SoftGemini_t	*pSoftGemini)
-{
-	paramInfo_t param;
-	bssEntry_t *pBssInfo=NULL;
-
-    if (pSoftGemini->hCurrBss)
-	{
-		pBssInfo = currBSS_getBssInfo(pSoftGemini->hCurrBss);
-	}
-    else
-    {
-		TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_ERROR, "SoftGemini_SetPS: hCurrBss = NULL!!!\n");
-    }
-
-    TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "\n");
-
-	if (pBssInfo)
-	{
-		if ((pBssInfo->band == RADIO_BAND_2_4_GHZ))
-		{
-            TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, " SG-setPS: band == RADIO_BAND_2_4_GHZ");
-
-	        /* Set Params to Power Mgr for SG priority */
-	        param.paramType = POWER_MGR_POWER_MODE;
-	        param.content.powerMngPowerMode.PowerMode = POWER_MODE_PS_ONLY;
-	        param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_SG_PRIORITY;
-	        powerMgr_setParam(pSoftGemini->hPowerMgr,&param);
-
-	        /* enable SG priority for Power Mgr */
-	        param.paramType = POWER_MGR_ENABLE_PRIORITY;
-	        param.content.powerMngPriority = POWER_MANAGER_SG_PRIORITY;
-	        return powerMgr_setParam(pSoftGemini->hPowerMgr,&param);
-        }
-        else
-        {
-            TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, " SG-setPS: band == RADIO_BAND_5_GHZ");
-        }
-	}
-	return TI_OK;
-}
-
-/***************************************************************************
-*					SoftGemini_unSetPS  		    						   *
-****************************************************************************
-* DESCRIPTION:	unSet Always PS to PowerMgr
-*
-* INPUTS:		pSoftGemini - the object
-*	
-***************************************************************************/
-static TI_STATUS SoftGemini_unSetPS(SoftGemini_t	*pSoftGemini)
-{
-	paramInfo_t param;
-
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, ", SG-unSetPS \n");
-
-	/* disable SG priority for Power Mgr*/
-	param.paramType = POWER_MGR_DISABLE_PRIORITY;
-	param.content.powerMngPriority = POWER_MANAGER_SG_PRIORITY;
-	return powerMgr_setParam(pSoftGemini->hPowerMgr,&param);
-	
-}
-
-/***************************************************************************
-*					SoftGemini_EnableProtectiveMode  		    	       *
-****************************************************************************
-* DESCRIPTION:	Activated when FW inform us that protective mode is ON
-*				
-*
-* INPUTS:		pSoftGemini - the object
-*	
-***************************************************************************/
-void SoftGemini_EnableProtectiveMode(TI_HANDLE hSoftGemini)
-{
-	SoftGemini_t	*pSoftGemini = (SoftGemini_t *)hSoftGemini;
-	paramInfo_t 	param;
-
-	pSoftGemini->bProtectiveMode = TI_TRUE;
-
-	/* set new configurations of SG roaming parameters */
-
-	/* This code should be removed on SG stage 2 integration
-	 currBSS_SGconfigureBSSLoss(pSoftGemini->hCurrBss,pSoftGemini->BSSLossCompensationPercent,TI_TRUE); */
-
-	/* set new configurations of scan to scancncn */
-    scanCncn_SGconfigureScanParams(pSoftGemini->hScanCncn,TI_TRUE,
-								   (TI_UINT8)pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_AUTO_SCAN_PROBE_REQ],
-								   pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_HV3_MAX_OVERRIDE], 
-								   pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_ACTIVE_SCAN_DURATION_FACTOR_HV3]);
-
-    /* Call the power manager to enter short doze */
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, " SoftGemini_EnableProtectiveMode set SD");
-
-	/* Set Params to Power Mgr for SG priority */
-	param.paramType = POWER_MGR_POWER_MODE;
-	param.content.powerMngPowerMode.PowerMode = POWER_MODE_SHORT_DOZE;
-	param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_SG_PRIORITY;
-	powerMgr_setParam(pSoftGemini->hPowerMgr,&param);
-}
-
-/***************************************************************************
-*					SoftGemini_DisableProtectiveMode  		    	       *
-****************************************************************************
-* DESCRIPTION:	Activated when FW inform us that protective mode is OFF or SG is disabled
-*
-* INPUTS:		pSoftGemini - the object
-*	
-***************************************************************************/
-void SoftGemini_DisableProtectiveMode(TI_HANDLE hSoftGemini)
-{
-	SoftGemini_t	*pSoftGemini = (SoftGemini_t *)hSoftGemini;
-
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "\n");
-
-	pSoftGemini->bProtectiveMode = TI_FALSE;
-
-	SoftGemini_RemoveProtectiveModeParameters(hSoftGemini);
-}
-
-/***************************************************************************
-*					SoftGemini_DisableProtectiveMode  		    	       *
-****************************************************************************
-* DESCRIPTION:	Called from SoftGemini_DisableProtectiveMode() when FW inform 
-*				us that protective mode is OFF or SG is disabled, or from
-*				SoftGemini_unSetPSmode() when driver disconnects from AP.
-*
-* INPUTS:		pSoftGemini - the object
-*	
-***************************************************************************/
-
-void SoftGemini_RemoveProtectiveModeParameters(TI_HANDLE hSoftGemini)
-{
-	SoftGemini_t	*pSoftGemini = (SoftGemini_t *)hSoftGemini;
-	paramInfo_t  	param;
-
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "\n");
-
-	/* don't use the SG roaming parameters */
-	currBSS_SGconfigureBSSLoss(pSoftGemini->hCurrBss,0,TI_FALSE);
-
-	/* don't use the SG scan parameters */
-    scanCncn_SGconfigureScanParams(pSoftGemini->hScanCncn,TI_FALSE,0,0,0);
-
-    /* Call the power manager to exit short doze */
-	/* Set Params to Power Mgr for SG priority */
-	param.paramType = POWER_MGR_POWER_MODE;
-	param.content.powerMngPowerMode.PowerMode = POWER_MODE_PS_ONLY;
-	param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_SG_PRIORITY;
-	powerMgr_setParam(pSoftGemini->hPowerMgr,&param);
-}
-
-/***************************************************************************
-*					SoftGemini_SenseIndicationCB  		    	       *
-****************************************************************************
-* DESCRIPTION:	This is the the function which is called for sense mode indication from FW
-*				(i.e. we are in SENSE mode and FW detects BT activity )
-*				SENSE_MODE_ENABLE - Indicates that FW detected BT activity
-*				SENSE_MODE_DISABLE - Indicates that FW doesn't detect BT activity for a period of time
-*
-* INPUTS:		pSoftGemini - the object
-* NOTE			This function is located in the API for debug purposes
-***************************************************************************/
-
-void SoftGemini_SenseIndicationCB( TI_HANDLE hSoftGemini, char* str, TI_UINT32 strLen )
-{
-	SoftGemini_t	*pSoftGemini = (SoftGemini_t *)hSoftGemini;
-
-	if (pSoftGemini->SoftGeminiEnable == SG_DISABLE) {
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_WARNING, ": SG is disabled, existing");
-		return;
-	}
-
-	if ( (SENSE_MODE_ENABLE == *str) && (!pSoftGemini->bDriverEnabled) )
-	{
-			SoftGemini_EnableDriver(hSoftGemini);
-	}
-	else if ( (SENSE_MODE_DISABLE == *str) && (pSoftGemini->bDriverEnabled) )
-	{
-			SoftGemini_DisableDriver(hSoftGemini);
-	}
-}
-
-/***************************************************************************
-*					SoftGemini_ProtectiveIndicationCB  		    	       *
-****************************************************************************
-* DESCRIPTION:	This is the the function which is called when FW starts Protective mode (i.e BT voice) 
-*
-*				PROTECTIVE_MODE_ON - FW is activated on protective mode (BT voice is running)
-*				PROTECTIVE_MODE_OFF - FW is not activated on protective mode
-*
-* INPUTS:		pSoftGemini - the object
-* NOTE			This function is located in the API for debug purposes
-***************************************************************************/
-
-void SoftGemini_ProtectiveIndicationCB( TI_HANDLE hSoftGemini, char* str, TI_UINT32 strLen )
-{
-	SoftGemini_t	*pSoftGemini = (SoftGemini_t *)hSoftGemini;
-	
-TRACE1(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, " with 0x%x\n",*str);
-
-	if (SG_DISABLE != pSoftGemini->SoftGeminiEnable)
-	{
-		if ((!pSoftGemini->bProtectiveMode) && (PROTECTIVE_MODE_ON == *str))
-		{
-			SoftGemini_EnableProtectiveMode(hSoftGemini);
-		}
-		else if ((pSoftGemini->bProtectiveMode) && (PROTECTIVE_MODE_OFF == *str))
-		{
-			SoftGemini_DisableProtectiveMode(hSoftGemini);
-		}
-		else
-		{
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, " : Protective mode  called when Protective mode is  \n");
-		}
-	}
-	else
-	{
-TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_WARNING, " : Protective mode  called when SG mode is  ? \n");
-	}
-}
-
-/***************************************************************************
-*					SoftGemini_ConvertModeToString  		    	       *
-****************************************************************************/
-#ifdef REPORT_LOG
-
-char* SoftGemini_ConvertModeToString(ESoftGeminiEnableModes SoftGeminiEnable)
-{
-	switch(SoftGeminiEnable)
-	{
-	case SG_PROTECTIVE:				return "SG_PROTECTIVE";
-	case SG_DISABLE:			    return "SG_DISABLE";
-	case SG_OPPORTUNISTIC:     return "SG_OPPORTUNISTIC";
-	default:
-		return "ERROR";
-	}
-}
-
-#endif
-
-/***************************************************************************
-*					SoftGemini_getSGMode						  		    	       *
-****************************************************************************/
-ESoftGeminiEnableModes SoftGemini_getSGMode(TI_HANDLE hSoftGemini)
-{
-	SoftGemini_t	*pSoftGemini = (SoftGemini_t *)hSoftGemini;
-	return pSoftGemini->SoftGeminiEnable;	
-}
-
-/***************************************************************************
-*					SoftGemini_handleRecovery					    	       *
-****************************************************************************
-* DESCRIPTION:	The function reconfigures WHAL with the SG parameters.
-*
-* INPUTS:		pSoftGemini - the object		
-***************************************************************************/
-TI_STATUS SoftGemini_handleRecovery(TI_HANDLE hSoftGemini)
-{
-	SoftGemini_t	*pSoftGemini = (SoftGemini_t *)hSoftGemini;
-	ESoftGeminiEnableModes       realSoftGeminiEnableMode;
-
-	realSoftGeminiEnableMode = pSoftGemini->SoftGeminiEnable;
-    /* Disable the SG */
-    SoftGemini_setEnableParam(hSoftGemini, SG_DISABLE, TI_TRUE);
-    TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "Disable SG \n");
-
-	pSoftGemini->SoftGeminiEnable = realSoftGeminiEnableMode;
-	/* Set enable param */
-
-	SoftGemini_setEnableParam(hSoftGemini, pSoftGemini->SoftGeminiEnable, TI_TRUE);
-    TRACE1(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "Set SG to-%d\n", pSoftGemini->SoftGeminiEnable);
-
-	/* Config the params to FW */
-
-	SoftGemini_setParamsToFW(hSoftGemini, &pSoftGemini->SoftGeminiParam);
-	/*SoftGemini_printParams(hSoftGemini);*/
-	return TI_OK;
-}
-/***************************************************************************
-*					SoftGemini_startPsPollFailure					       *
-****************************************************************************
-* DESCRIPTION:	After Ps-Poll failure we disable the SG
-*
-* INPUTS:		pSoftGemini - the object		
-***************************************************************************/
-void SoftGemini_startPsPollFailure(TI_HANDLE hSoftGemini)
-	{
-    SoftGemini_t	*pSoftGemini = (SoftGemini_t *)hSoftGemini;
-
-    TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "\n");
-
-    if ( (!pSoftGemini->bPsPollFailureActive) && (pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_AUTO_PS_MODE] == TI_TRUE) )
-    {
-        pSoftGemini->PsPollFailureLastEnableValue = pSoftGemini->SoftGeminiEnable;
-
-        /* Disable SG if needed */
-        if ( pSoftGemini->SoftGeminiEnable != SG_DISABLE )
-        {	
-            SoftGemini_setEnableParam(hSoftGemini, SG_DISABLE, TI_FALSE);
-	}
-
-        pSoftGemini->bPsPollFailureActive = TI_TRUE;
-    }
-    else /* Calling SoftGemini_startPsPollFailure twice ? */
-	{
-        TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_WARNING, "Calling  SoftGemini_startPsPollFailure while bPsPollFailureActive is TRUE\n");
-    }
-	}
-
-/***************************************************************************
-*					SoftGemini_endPsPollFailure					    	   *
-****************************************************************************
-* DESCRIPTION:	Return to normal behavior after the PsPoll failure 
-*
-* INPUTS:		pSoftGemini - the object		
-***************************************************************************/
-void SoftGemini_endPsPollFailure(TI_HANDLE hSoftGemini)
-{
-    SoftGemini_t	*pSoftGemini = (SoftGemini_t *)hSoftGemini;
-
-    TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "\n");
-
-    if ( pSoftGemini->bPsPollFailureActive ) 
-    {
-        pSoftGemini->bPsPollFailureActive = TI_FALSE;
-
-        /* return to previous value */
-        if ( pSoftGemini->PsPollFailureLastEnableValue != SG_DISABLE )
-        {
-			SoftGemini_setEnableParam(hSoftGemini, pSoftGemini->PsPollFailureLastEnableValue, TI_FALSE);
-        }
-    }
-    else /* Calling SoftGemini_endPsPollFailure twice ? */
-    {
-        TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_WARNING, "Calling  SoftGemini_endPsPollFailure while bPsPollFailureActive is FALSE\n");
-    }
-}
-
-
diff --git a/wl1271/stad/src/AirLink_Managment/SoftGemini.h b/wl1271/stad/src/AirLink_Managment/SoftGemini.h
deleted file mode 100644
index 21edcaf..0000000
--- a/wl1271/stad/src/AirLink_Managment/SoftGemini.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * SoftGemini.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file SoftGemini.h
- *  \brief BlueTooth-Wlan coexistence module internal header file
- *
- *  \see SoftGemini.c
- */
-
-/***************************************************************************/
-/*																			*/
-/*	  MODULE:	SoftGemini.h												*/
-/*    PURPOSE:	BlueTooth-Wlan coexistence module internal header file			*/
-/*																			*/
-/***************************************************************************/
-
-#ifndef __SOFT_GEMINI_H__
-#define __SOFT_GEMINI_H__
-
-#include "paramOut.h"
-#include "SoftGeminiApi.h"
-
-
-typedef struct 
-{
-	ESoftGeminiEnableModes  SoftGeminiEnable;						
-    ESoftGeminiEnableModes  PsPollFailureLastEnableValue;
-	TSoftGeminiParams		SoftGeminiParam;						/* for the FW */
-	TI_BOOL					bProtectiveMode;
-	TI_BOOL					bDriverEnabled;
-    TI_BOOL					bPsPollFailureActive;							/* used to check if we should enable driver when we are switching different enable modes */
-	TI_HANDLE				hCtrlData;
-	TI_HANDLE				hTWD;
-	TI_HANDLE				hReport;
-	TI_HANDLE				hOs;
-	TI_HANDLE				hSCR;
-	TI_HANDLE				hPowerMgr;
-	TI_HANDLE               hCmdDispatch;
-	TI_HANDLE				hScanCncn;
-	TI_HANDLE				hCurrBss;
-    TI_HANDLE               hSme;
-} SoftGemini_t;
-
-TI_STATUS SoftGemini_handleRecovery(TI_HANDLE hSoftGemini);
-
-#endif /* __SOFT_GEMINI_H__*/
-
-
diff --git a/wl1271/stad/src/AirLink_Managment/SoftGeminiApi.h b/wl1271/stad/src/AirLink_Managment/SoftGeminiApi.h
deleted file mode 100644
index d53a9e2..0000000
--- a/wl1271/stad/src/AirLink_Managment/SoftGeminiApi.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * SoftGeminiApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file SoftGeminiApi.h
- *  \brief BlueTooth-Wlan coexistence module interface header file
- *
- *  \see SoftGemini.c & SoftGemini.h
- */
-
-/***************************************************************************/
-/*																			*/
-/*	  MODULE:	SoftGeminiApi.h												*/
-/*    PURPOSE:	BlueTooth-Wlan coexistence module interface header file		*/
-/*																			*/
-/***************************************************************************/
-#ifndef __SOFT_GEMINI_API_H__
-#define __SOFT_GEMINI_API_H__
-
-#include "paramOut.h"
-#include "DrvMainModules.h"
-
-
-/* The Soft-Gemini module API functions */
-TI_HANDLE SoftGemini_create(TI_HANDLE hOs);
-void      SoftGemini_init (TStadHandlesList *pStadHandles);
-TI_STATUS SoftGemini_SetDefaults (TI_HANDLE hSoftGemini, SoftGeminiInitParams_t *pSoftGeminiInitParams);
-TI_STATUS SoftGemini_destroy(TI_HANDLE hSoftGemini);
-TI_STATUS SoftGemini_setParam(TI_HANDLE hSoftGemini, paramInfo_t *pParam);
-TI_STATUS SoftGemini_getParam(TI_HANDLE hSoftGemini, paramInfo_t *pParam);
-void      SoftGemini_printParams(TI_HANDLE hSoftGemini);
-void      SoftGemini_SenseIndicationCB( TI_HANDLE hSoftGemini, char* str, TI_UINT32 strLen );
-void      SoftGemini_ProtectiveIndicationCB( TI_HANDLE hSoftGemini, char* str, TI_UINT32 strLen );
-void      SoftGemini_startPsPollFailure(TI_HANDLE hSoftGemini);
-void      SoftGemini_endPsPollFailure(TI_HANDLE hSoftGemini);
-void SoftGemini_SetPSmode(TI_HANDLE hSoftGemini);
-void SoftGemini_unSetPSmode(TI_HANDLE hSoftGemini);
-ESoftGeminiEnableModes SoftGemini_getSGMode(TI_HANDLE hSoftGemini);
-
-#endif /* __SOFT_GEMINI_API_H__ */
diff --git a/wl1271/stad/src/AirLink_Managment/SwitchChannel.c b/wl1271/stad/src/AirLink_Managment/SwitchChannel.c
deleted file mode 100644
index 6831a55..0000000
--- a/wl1271/stad/src/AirLink_Managment/SwitchChannel.c
+++ /dev/null
@@ -1,1540 +0,0 @@
-/*
- * SwitchChannel.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file SwitchChannel.c
- *  \brief SwitchChannel module interface
- *
- *  \see SwitchChannelApi.h
- */
-
-/****************************************************************************************************/
-/*                                                                                                  */
-/*      MODULE:     SwitchChannel.c                                                                         */
-/*      PURPOSE:    SwitchChannel module interface.                                                         */
-/*                  This module perform SwitchChannel (Dynamic Frequency Selection)                         */
-/*                      according to AP command. The object responsibles for switching channel after*/
-/*                      the requires time and quieting the channel for the required duration        */
-/*                      time.                                                                       */
-/****************************************************************************************************/
-
-#define __FILE_ID__  FILE_ID_7
-#include "tidef.h"
-#include "report.h"
-#include "osApi.h"
-#include "paramOut.h"
-#include "SwitchChannelApi.h"
-#include "DataCtrl_Api.h"
-#include "regulatoryDomainApi.h"
-#include "apConn.h"
-#include "siteMgrApi.h"
-#include "PowerMgr_API.h"
-#include "healthMonitor.h"
-#include "TWDriver.h"
-#include "DrvMainModules.h"
-
-/* allocation vector */
-#define SC_INIT_BIT                     (1)
-#define SC_SM_INIT_BIT                  (2)
-
-#define SC_SWITCH_CHANNEL_CMD_LEN               3
-#define SC_SWITCH_CHANNEL_MODE_NOT_TX_SUS       0
-#define SC_SWITCH_CHANNEL_MODE_TX_SUS           1
-
-
-#define SC_CHANNEL_INVALID          TI_FALSE
-#define SC_CHANNEL_VALID            TI_TRUE
-
-/* Enumerations */
-
-/** state machine states */
-typedef enum 
-{
-    SC_STATE_IDLE           = 0,
-    SC_STATE_WAIT_4_CMD     = 1,
-    SC_STATE_WAIT_4_SCR     = 2,
-    SC_STATE_SC_IN_PROG     = 3,
-    SC_STATE_LAST           = 4
-} switchChannel_smStates;
-
-/** State machine events */
-typedef enum 
-{
-    SC_EVENT_START          = 0,
-    SC_EVENT_STOP           = 1,
-    SC_EVENT_SC_CMD         = 2,
-    SC_EVENT_SCR_RUN        = 3,
-    SC_EVENT_SCR_FAIL       = 4,
-    SC_EVENT_SC_CMPLT       = 5,
-    SC_EVENT_FW_RESET       = 6,
-    SC_EVENT_LAST           = 7
-} switchChannel_smEvents;
-
-
-#define SC_NUM_STATES       SC_STATE_LAST    
-#define SC_NUM_EVENTS       SC_EVENT_LAST   
-
-
-/* Structures */
-typedef struct 
-{
-
-    /* SwitchChannel parameters that can be configured externally */
-    TI_BOOL            dot11SpectrumManagementRequired;
-
-    /* Internal SwitchChannel parameters */
-    TI_UINT8                   currentState;
-    dot11_CHANNEL_SWITCH_t  curChannelSwitchCmdParams;
-    TI_UINT32                   SCRRequestTimestamp;
-    TI_UINT8                    currentChannel;
-    TI_BOOL                 switchChannelStarted;
-
-#ifdef TI_DBG
-    /* switchChannelCmd for debug */
-    dot11_CHANNEL_SWITCH_t  debugChannelSwitchCmdParams;
-    TI_UINT8                    ignoreCancelSwitchChannelCmd;
-#endif
-    
-    /* SwitchChannel SM */
-    fsm_stateMachine_t          *pSwitchChannelSm;
-
-    /* SwitchChannel handles to other objects */                                
-    TI_HANDLE       hTWD;
-    TI_HANDLE       hSiteMgr;
-    TI_HANDLE       hSCR;
-    TI_HANDLE       hRegulatoryDomain;
-    TI_HANDLE       hPowerMngr;
-    TI_HANDLE       hApConn;
-    TI_HANDLE       hReport;
-    TI_HANDLE       hOs;
-
-} switchChannel_t;
-
-
-
-
-/* External data definitions */
-
-/* Local functions definitions */
-
-/* Global variables */
-
-
-/********************************************************************************/
-/*                      Internal functions prototypes.                          */
-/********************************************************************************/
-
-
-/* SM functions */
-static TI_STATUS switchChannel_smStartSwitchChannelCmd(void *pData);
-static TI_STATUS switchChannel_smReqSCR_UpdateCmd(void *pData);
-static TI_STATUS switchChannel_smSwitchChannelCmplt(void *pData);
-static TI_STATUS switchChannel_smFwResetWhileSCInProg(void *pData);
-static TI_STATUS switchChannel_smScrFailWhileWait4Scr(void *pData);
-static TI_STATUS switchChannel_smNop(void *pData);
-static TI_STATUS switchChannel_smUnexpected(void *pData);
-static TI_STATUS switchChannel_smStopWhileWait4Cmd(void *pData);
-static TI_STATUS switchChannel_smStopWhileWait4Scr(void *pData);
-static TI_STATUS switchChannel_smStopWhileSwitchChannelInProg(void *pData);
-static TI_STATUS switchChannel_smStart(void *pData);
-
-
-/* other functions */
-static void release_module(switchChannel_t *pSwitchChannel, TI_UINT32 initVec);
-static TI_STATUS switchChannel_smEvent(TI_UINT8 *currState, TI_UINT8 event, void* data);
-static void switchChannel_zeroDatabase(switchChannel_t *pSwitchChannel);
-void switchChannel_SwitchChannelCmdCompleteReturn(TI_HANDLE hSwitchChannel);
-void switchChannel_scrStatusCB(TI_HANDLE hSwitchChannel, EScrClientRequestStatus requestStatus, 
-                               EScrResourceId eResource, EScePendReason pendReason );
-#ifdef TI_DBG
-static void switchChannel_recvCmd4Debug(TI_HANDLE hSwitchChannel, dot11_CHANNEL_SWITCH_t *channelSwitch, TI_BOOL BeaconPacket, TI_UINT8 channel);
-#endif
-
-
-/********************************************************************************/
-/*                      Interface functions Implementation.                     */
-/********************************************************************************/
-
-
-/************************************************************************
- *                        switchChannel_create                          *
- ************************************************************************/
-/**
-*
-* \b Description: 
-*
-* This procedure is called by the config manager when the driver is created.
-* It creates the SwitchChannel object.
-*
-* \b ARGS:
-*
-*  I - hOs - OS context \n
-*
-* \b RETURNS:
-*
-*  Handle to the SwitchChannel object.
-*
-* \sa 
-*/
-TI_HANDLE switchChannel_create(TI_HANDLE hOs)
-{
-    switchChannel_t           *pSwitchChannel = NULL;
-    TI_UINT32          initVec = 0;
-    TI_STATUS       status;
-
-    /* allocating the SwitchChannel object */
-    pSwitchChannel = os_memoryAlloc(hOs,sizeof(switchChannel_t));
-
-    if (pSwitchChannel == NULL)
-        return NULL;
-
-    initVec |= (1 << SC_INIT_BIT);
-
-    os_memoryZero(hOs, pSwitchChannel, sizeof(switchChannel_t));
-
-    pSwitchChannel->hOs = hOs;
-
-    status = fsm_Create(hOs, &pSwitchChannel->pSwitchChannelSm, SC_NUM_STATES, SC_NUM_EVENTS);
-    if (status != TI_OK)
-    {
-        release_module(pSwitchChannel, initVec);
-        WLAN_OS_REPORT(("FATAL ERROR: switchChannel_create(): Error Creating pSwitchChannelSm - Aborting\n"));
-        return NULL;
-    }
-    initVec |= (1 << SC_SM_INIT_BIT);
-
-    return(pSwitchChannel);
-}
-
-/************************************************************************
- *                        switchChannel_init                            *
- ************************************************************************/
-/**
-*
-* \b Description: 
-*
-* This procedure is called by the DrvMain when the driver is initialized.
-* It initializes the SwitchChannel object's variables and handlers and creates the SwitchChannel SM.
-*
-* \b ARGS:
-*
-*  I - pStadHandles  - The driver modules handles \n
-*
-* \b RETURNS:
-*
-*  void
-*
-* \sa 
-*/
-void switchChannel_init (TStadHandlesList *pStadHandles)
-{
-    switchChannel_t *pSwitchChannel = (switchChannel_t *)(pStadHandles->hSwitchChannel);
-
-    /** Roaming State Machine matrix */
-    fsm_actionCell_t    switchChannel_SM[SC_NUM_STATES][SC_NUM_EVENTS] =
-    {
-        /* next state and actions for IDLE state */
-        {   {SC_STATE_WAIT_4_CMD, switchChannel_smStart},               /* START        */
-            {SC_STATE_IDLE, switchChannel_smNop},                       /* STOP         */ 
-            {SC_STATE_IDLE, switchChannel_smNop},                       /* SC_CMD      */
-            {SC_STATE_IDLE, switchChannel_smUnexpected},                /* SCR_RUN      */ 
-            {SC_STATE_IDLE, switchChannel_smUnexpected},                /* SCR_FAIL     */
-            {SC_STATE_IDLE, switchChannel_smUnexpected},                /* SC_CMPLT    */
-            {SC_STATE_IDLE, switchChannel_smUnexpected}                 /* FW_RESET     */
-        },                                                                              
-
-        /* next state and actions for WAIT_4_CMD state */    
-        {   {SC_STATE_WAIT_4_CMD, switchChannel_smNop},                     /* START        */
-            {SC_STATE_IDLE, switchChannel_smStopWhileWait4Cmd},             /* STOP         */ 
-            {SC_STATE_WAIT_4_SCR, switchChannel_smReqSCR_UpdateCmd},        /* SC_CMD      */
-            {SC_STATE_WAIT_4_CMD, switchChannel_smUnexpected},              /* SCR_RUN      */ 
-            {SC_STATE_WAIT_4_CMD, switchChannel_smUnexpected},              /* SCR_FAIL     */
-            {SC_STATE_WAIT_4_CMD, switchChannel_smUnexpected},              /* SC_CMPLT    */
-            {SC_STATE_WAIT_4_CMD, switchChannel_smUnexpected}               /* FW_RESET    */
-
-        },                                                                              
-
-        /* next state and actions for WAIT_4_SCR state */    
-        {   {SC_STATE_WAIT_4_SCR, switchChannel_smUnexpected},                  /* START        */
-            {SC_STATE_IDLE, switchChannel_smStopWhileWait4Scr},                 /* STOP         */
-            {SC_STATE_WAIT_4_SCR, switchChannel_smNop},                         /* SC_CMD      */
-            {SC_STATE_SC_IN_PROG, switchChannel_smStartSwitchChannelCmd},       /* SCR_RUN      */
-            {SC_STATE_WAIT_4_CMD, switchChannel_smScrFailWhileWait4Scr},        /* SCR_FAIL    */
-            {SC_STATE_WAIT_4_SCR, switchChannel_smUnexpected} ,                 /* SC_CMPLT    */
-            {SC_STATE_WAIT_4_CMD, switchChannel_smUnexpected}                   /* FW_RESET    */
-
-        },                                                                              
-
-        /* next state and actions for switchChannel_IN_PROG state */
-        {   {SC_STATE_SC_IN_PROG, switchChannel_smUnexpected},                   /* START        */
-            {SC_STATE_IDLE, switchChannel_smStopWhileSwitchChannelInProg},       /* STOP         */
-            {SC_STATE_SC_IN_PROG, switchChannel_smNop},                          /* SC_CMD      */
-            {SC_STATE_SC_IN_PROG, switchChannel_smUnexpected},                   /* SCR_RUN      */
-            {SC_STATE_WAIT_4_CMD, switchChannel_smUnexpected},                   /* SCR_FAIL    */
-            {SC_STATE_WAIT_4_CMD, switchChannel_smSwitchChannelCmplt},           /* SC_CMPLT    */
-            {SC_STATE_WAIT_4_CMD, switchChannel_smFwResetWhileSCInProg}          /* FW_RESET    */
-        }                                                                             
-    }; 
-
-    fsm_Config(pSwitchChannel->pSwitchChannelSm, 
-            &switchChannel_SM[0][0], 
-            SC_NUM_STATES, 
-            SC_NUM_EVENTS, 
-            switchChannel_smEvent, pSwitchChannel->hOs);
-
-    /* init handlers */
-    pSwitchChannel->hTWD                = pStadHandles->hTWD;
-    pSwitchChannel->hSiteMgr            = pStadHandles->hSiteMgr;
-    pSwitchChannel->hSCR                = pStadHandles->hSCR;
-    pSwitchChannel->hRegulatoryDomain   = pStadHandles->hRegulatoryDomain;
-    pSwitchChannel->hApConn             = pStadHandles->hAPConnection;
-    pSwitchChannel->hReport             = pStadHandles->hReport;
-    pSwitchChannel->hOs                 = pStadHandles->hOs;
-}
-
-
-TI_STATUS switchChannel_SetDefaults (TI_HANDLE hSwitchChannel, SwitchChannelInitParams_t *SwitchChannelInitParams)
-{   
-    switchChannel_t       *pSwitchChannel = (switchChannel_t *)hSwitchChannel;
-
-    /* init variables */
-    pSwitchChannel->dot11SpectrumManagementRequired = SwitchChannelInitParams->dot11SpectrumManagementRequired;
-    pSwitchChannel->currentState = SC_STATE_IDLE;
-    pSwitchChannel->currentChannel = 0;
-    pSwitchChannel->switchChannelStarted = TI_FALSE;
-
-    /* register to SCR */
-    scr_registerClientCB(pSwitchChannel->hSCR, SCR_CID_SWITCH_CHANNEL, 
-                         switchChannel_scrStatusCB, pSwitchChannel);
-
-    /* register to Switch Channel Complete event in HAL */
-    TWD_RegisterEvent (pSwitchChannel->hTWD, 
-                       TWD_OWN_EVENT_SWITCH_CHANNEL_CMPLT, 
-                       (void *)switchChannel_SwitchChannelCmdCompleteReturn, 
-                       pSwitchChannel);
-
-    TWD_EnableEvent (pSwitchChannel->hTWD, TWD_OWN_EVENT_SWITCH_CHANNEL_CMPLT);
-#ifdef TI_DBG
-    /* for debug */
-    pSwitchChannel->debugChannelSwitchCmdParams.hdr[0] = CHANNEL_SWITCH_ANNOUNCEMENT_IE_ID;
-    pSwitchChannel->debugChannelSwitchCmdParams.hdr[1] = SC_SWITCH_CHANNEL_CMD_LEN;
-    pSwitchChannel->ignoreCancelSwitchChannelCmd = 0;
-#endif
-    TRACE0(pSwitchChannel->hReport, REPORT_SEVERITY_INIT, ".....SwitchChannel configured successfully\n");
-
-    return TI_OK;
-}
-
-
-/************************************************************************
- *                        switchChannel_stop                            *
- ************************************************************************/
-/**
-*
-* \b Description: 
-*
-* This procedure is called by the SME when the state is changed from CONNECTED.
-* It generates a STOP event to the SwitchChannel SM.
-*
-* \b ARGS:
-*
-*  I - hSwitchChannel - SwitchChannel context \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise
-*
-* \sa 
-*/
-TI_STATUS switchChannel_stop(TI_HANDLE hSwitchChannel)
-{
-    switchChannel_t *pSwitchChannel = (switchChannel_t *)hSwitchChannel;
-
-    pSwitchChannel->switchChannelStarted = TI_FALSE;
-    return (switchChannel_smEvent((TI_UINT8*)&pSwitchChannel->currentState, SC_EVENT_STOP, pSwitchChannel));
-
-}
-
-/************************************************************************
- *                        switchChannel_start                           *
- ************************************************************************/
-/**
-*
-* \b Description: 
-*
-* This procedure is called by the SME when the state is changed to CONNECTED.
-* It generates a START event to the SwitchChannel SM.
-*
-* \b ARGS:
-*
-*  I - hSwitchChannel - SwitchChannel context \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise
-*
-* \sa 
-*/
-TI_STATUS switchChannel_start(TI_HANDLE hSwitchChannel)
-{
-    switchChannel_t *pSwitchChannel = (switchChannel_t *)hSwitchChannel;
-    pSwitchChannel->switchChannelStarted = TI_TRUE;
-
-    return (switchChannel_smEvent((TI_UINT8*)&pSwitchChannel->currentState, SC_EVENT_START, pSwitchChannel));
-
-}
-
-
-/************************************************************************
- *                        switchChannel_unload                          *
- ************************************************************************/
-/**
-*
-* \b Description: 
-*
-* This procedure is called by the config manager when the driver is unloaded.
-* It frees any memory allocated and timers.
-*
-* \b ARGS:
-*
-*  I - hSwitchChannel - SwitchChannel context \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise
-*
-* \sa 
-*/
-TI_STATUS switchChannel_unload(TI_HANDLE hSwitchChannel)
-{
-    TI_UINT32              initVec;
-    switchChannel_t *pSwitchChannel = (switchChannel_t *)hSwitchChannel;
-
-    if (pSwitchChannel == NULL)
-        return TI_OK;
-
-    initVec = 0xff;
-    release_module(pSwitchChannel, initVec);
-
-    return TI_OK;
-}
-
-
-/************************************************************************
- *                        switchChannel_recvCmd                         *
- ************************************************************************/
-/*DESCRIPTION: This function is called by MLME Parser upon receiving of
-                Beacon, Probe Response or Action with Switch Channel command,
-                or beacon/
-                performs the following:
-                -   Initializes the switching channel procedure.
-                -   Setting timer to the actual switching time(if needed)
-                
-INPUT:      hSwitchChannel      - SwitchChannel handle.
-            switchMode          - indicates whether to stop transmission
-                                    until the scheduled channel switch.
-            newChannelNum       - indicates the number of the new channel.
-            durationTime        - indicates the time (expressed in ms) until
-                                    the scheduled channel switch should accure.
-
-OUTPUT:     None
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-void switchChannel_recvCmd(TI_HANDLE hSwitchChannel, dot11_CHANNEL_SWITCH_t *channelSwitch, TI_UINT8 channel)
-{
-
-    switchChannel_t             *pSwitchChannel = (switchChannel_t *)hSwitchChannel;
-    paramInfo_t                 param;
-
-    if (pSwitchChannel==NULL)
-    {
-        return;
-    }
-
-    param.paramType = REGULATORY_DOMAIN_DFS_CHANNELS_RANGE;
-    regulatoryDomain_getParam(pSwitchChannel->hRegulatoryDomain, &param);
-
-    if (!pSwitchChannel->dot11SpectrumManagementRequired ||
-        (channel < param.content.DFS_ChannelRange.minDFS_channelNum) ||
-        (channel > param.content.DFS_ChannelRange.maxDFS_channelNum))
-    {   /* Do not parse Switch Channel IE, when SpectrumManagement is disabled,
-            or the channel is non-DFS channel */
-        return;
-    }
-#ifdef TI_DBG
-    /* for debug purposes only */
-    if (pSwitchChannel->ignoreCancelSwitchChannelCmd != 0)
-    {
-        return;
-    }
-#endif
-
-    if (channelSwitch == NULL)
-    {   /* No SC IE, update regDomain */
-        param.paramType = REGULATORY_DOMAIN_UPDATE_CHANNEL_VALIDITY;
-        param.content.channel = channel;
-        regulatoryDomain_setParam(pSwitchChannel->hRegulatoryDomain, &param);
-    } 
-    else 
-    {   /* SC IE exists */
-        TRACE3(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_recvFrame, SwitchChannel cmd was found, channel no=%d, mode=%d, TBTT=%d \n", channelSwitch->channelNumber, channelSwitch->channelSwitchMode, channelSwitch->channelSwitchCount);
-
-        /* Checking channel number validity */
-        param.content.channel = channelSwitch->channelNumber;
-        param.paramType = REGULATORY_DOMAIN_IS_CHANNEL_SUPPORTED;
-        regulatoryDomain_getParam(pSwitchChannel->hRegulatoryDomain,&param);
-        if ( ( !param.content.bIsChannelSupprted )   || 
-            (channelSwitch->channelSwitchCount == 0) || 
-            (channelSwitch->channelSwitchMode == SC_SWITCH_CHANNEL_MODE_TX_SUS))
-        {   /* Trigger Roaming, if TX mode is disabled, the new channel number is invalid, 
-                or the TBTT count is 0 */
-            TRACE0(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "report Roaming trigger\n");
-            if (channelSwitch->channelSwitchMode == SC_SWITCH_CHANNEL_MODE_TX_SUS) 
-            {
-                param.paramType = REGULATORY_DOMAIN_SET_CHANNEL_VALIDITY;
-                param.content.channelValidity.channelNum = channel;
-                param.content.channelValidity.channelValidity = TI_FALSE;
-                regulatoryDomain_setParam(pSwitchChannel->hRegulatoryDomain, &param);
-            }
-            
-            if (TI_TRUE == pSwitchChannel->switchChannelStarted) 
-            {
-                   apConn_reportRoamingEvent(pSwitchChannel->hApConn, ROAMING_TRIGGER_SWITCH_CHANNEL, NULL); 
-            }
-            
-        }
-        else
-        {   /* Invoke Switch Channel command */
-            /* update the new SCC params */
-            pSwitchChannel->curChannelSwitchCmdParams.channelNumber = channelSwitch->channelNumber;
-            pSwitchChannel->curChannelSwitchCmdParams.channelSwitchCount = channelSwitch->channelSwitchCount;
-            pSwitchChannel->curChannelSwitchCmdParams.channelSwitchMode = channelSwitch->channelSwitchMode;
-            switchChannel_smEvent((TI_UINT8*)&pSwitchChannel->currentState, SC_EVENT_SC_CMD, pSwitchChannel);
-        }
-
-    }
-
-}
-
-
-/************************************************************************
- *                        switchChannel_powerSaveStatusReturn           *
- ************************************************************************/
-/**
-*
-* \b Description: 
-*
-* This procedure is called when power save status is returned
-*
-* \b ARGS:
-*
-*  I/O - hSwitchChannel - SwitchChannel context \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-void switchChannel_SwitchChannelCmdCompleteReturn(TI_HANDLE hSwitchChannel)
-{
-    switchChannel_t         *pSwitchChannel = (switchChannel_t*)hSwitchChannel;
-
-    if (pSwitchChannel == NULL)
-    {
-        return;
-    }
-    TRACE0(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_SwitchChannelCmdCompleteReturn \n");
-
-    switchChannel_smEvent((TI_UINT8*)&pSwitchChannel->currentState, SC_EVENT_SC_CMPLT, pSwitchChannel);
-
-}
-
-/************************************************************************
- *                        switchChannel_enableDisableSpectrumMngmt          *
- ************************************************************************/
-/**
-*
-* \b Description: 
-*
-* This procedure enables or disables the spectrum management
-*
-* \b ARGS:
-*
-*  I - hSwitchChannel - SwitchChannel context \n
-*  I - enableDisable - TI_TRUE - Enable, TI_FALSE - Disable
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-void switchChannel_enableDisableSpectrumMngmt(TI_HANDLE hSwitchChannel, TI_BOOL enableDisable)
-{
-    switchChannel_t         *pSwitchChannel = (switchChannel_t*)hSwitchChannel;
-
-
-    if (hSwitchChannel == NULL)
-    {
-        return;
-    }
-    TRACE1(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_enableDisableSpectrumMngmt, enableDisable=%d \n", enableDisable);
-
-    pSwitchChannel->dot11SpectrumManagementRequired = enableDisable;
-
-    if (enableDisable)
-    {   /* Enable SC, if it was started invoke start event.
-            otherwise, wait for a start event */
-        if (pSwitchChannel->switchChannelStarted)
-        {
-            switchChannel_smEvent((TI_UINT8*)&pSwitchChannel->currentState, SC_EVENT_START, pSwitchChannel);
-        }
-    }
-    else
-    {   /* Disable SC */
-        switchChannel_smEvent((TI_UINT8*)&pSwitchChannel->currentState, SC_EVENT_STOP, pSwitchChannel);
-    }
-
-}
-
-
-
-/************************************************************************
- *                        SwitchChannel internal functions              *
- ************************************************************************/
-
-/************************************************************************
- *                        switchChannel_smEvent                         *
- ************************************************************************/
-/**
-*
-* \b Description: 
-*
-* SwitchChannel state machine transition function
-*
-* \b ARGS:
-*
-*  I/O - currentState - current state in the state machine\n
-*  I   - event - specific event for the state machine\n
-*  I   - pData - Data for state machine action function\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static TI_STATUS switchChannel_smEvent(TI_UINT8 *currState, TI_UINT8 event, void* data)
-{
-    TI_STATUS       status;
-    TI_UINT8           nextState;
-    switchChannel_t           *pSwitchChannel = (switchChannel_t*)data;
-
-
-    status = fsm_GetNextState(pSwitchChannel->pSwitchChannelSm, *currState, event, &nextState);
-    if (status != TI_OK)
-    {
-        TRACE0(pSwitchChannel->hReport, REPORT_SEVERITY_ERROR, "switchChannel_smEvent, fsm_GetNextState error\n");
-        return(TI_NOK);
-    }
-
-	TRACE3(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_smEvent: <currentState = %d, event = %d> --> nextState = %d\n", *currState, event, nextState);
-
-	status = fsm_Event(pSwitchChannel->pSwitchChannelSm, currState, event, (void *)pSwitchChannel);
-
-    if (status != TI_OK)
-    {
-        TRACE0(pSwitchChannel->hReport, REPORT_SEVERITY_ERROR, "switchChannel_smEvent fsm_Event error\n");
-		TRACE3(pSwitchChannel->hReport, REPORT_SEVERITY_ERROR, "switchChannel_smEvent: <currentState = %d, event = %d> --> nextState = %d\n", *currState, event, nextState);
-    }
-    return status;
-
-}
-
-
-/************************************************************************
- *                        switchChannel_smStart                         *
- ************************************************************************/
-/**
-*
-*
-* \b Description: 
-*
-* This function is called when the station becomes connected.
- * update the current channel.
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the SwitchChannel SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*************************************************************************/
-static TI_STATUS switchChannel_smStart(void *pData)
-{
-    switchChannel_t                       *pSwitchChannel = (switchChannel_t*)pData;
-    paramInfo_t                 param;
-
-    if (pSwitchChannel == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    /* get the current channel number */
-    param.paramType = SITE_MGR_CURRENT_CHANNEL_PARAM;
-    siteMgr_getParam(pSwitchChannel->hSiteMgr, &param);
-    pSwitchChannel->currentChannel = param.content.siteMgrCurrentChannel;
-    
-    TRACE1(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_smStart, channelNo=%d\n", pSwitchChannel->currentChannel);
-    return TI_OK;
-
-}
-
-/************************************************************************
- *                        switchChannel_smReqSCR_UpdateCmd              *
- ************************************************************************/
-/**
-*
-*
-* \b Description: 
-*
-* Update the Switch Channel command parameters.
- * Request SCR and wait for SCR return.
- * if tx status suspend
- *  update regulatory Domain
- *  update tx
- *  start periodic timer 
- 
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the SwitchChannel SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*************************************************************************/
-static TI_STATUS switchChannel_smReqSCR_UpdateCmd(void *pData)
-{
-    switchChannel_t             *pSwitchChannel = (switchChannel_t*)pData;
-    EScrClientRequestStatus     scrStatus;
-    EScePendReason              scrPendReason;
-
-    if (pSwitchChannel == NULL)
-    {
-        return TI_NOK;
-    }
-    TRACE3(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_smReqSCR_UpdateCmd, channelNo=%d, TBTT = %d, Mode = %d\n", pSwitchChannel->curChannelSwitchCmdParams.channelNumber, pSwitchChannel->curChannelSwitchCmdParams.channelSwitchCount, pSwitchChannel->curChannelSwitchCmdParams.channelSwitchMode);
-
-
-    /* Save the TS when requesting SCR */
-    pSwitchChannel->SCRRequestTimestamp = os_timeStampMs(pSwitchChannel->hOs); 
-    
-    scrStatus = scr_clientRequest(pSwitchChannel->hSCR, SCR_CID_SWITCH_CHANNEL,
-                                  SCR_RESOURCE_SERVING_CHANNEL, &scrPendReason);
-    if ((scrStatus != SCR_CRS_RUN) && (scrStatus != SCR_CRS_PEND))
-    {   
-        TRACE1(pSwitchChannel->hReport, REPORT_SEVERITY_ERROR, "switchChannel_smReqSCR_UpdateCmd():Abort the switch channel, request Roaming, scrStatus=%d\n", scrStatus);
-        return (switchChannel_smEvent((TI_UINT8*)&pSwitchChannel->currentState, SC_EVENT_SCR_FAIL, pSwitchChannel));
-
-    }
-    if (scrStatus == SCR_CRS_RUN)
-    {
-        switchChannel_scrStatusCB(pSwitchChannel, scrStatus, SCR_RESOURCE_SERVING_CHANNEL, scrPendReason);
-    }
-    else if ((scrPendReason==SCR_PR_OTHER_CLIENT_RUNNING) ||
-         (scrPendReason==SCR_PR_DIFFERENT_GROUP_RUNNING) )
-    {   /* No use to wait for the SCR, invoke FAIL */
-        return (switchChannel_smEvent((TI_UINT8*)&pSwitchChannel->currentState, SC_EVENT_SCR_FAIL, pSwitchChannel));
-    }
-    /* wait for the SCR callback function to be called */
-    return TI_OK;
-
-}
-
-
-/************************************************************************
- *                        switchChannel_scrStatusCB                     *
- ************************************************************************/
-/**
-*
-*
-* \b Description: 
-*
-* This function is called by the SCR when:
- * the resource is reserved for the SwitchChannel - SCR_CRS_RUN
- * recovery occurred - SCR_CRS_ABORT
- * other = ERROR
-*
-* \b ARGS:
-*
-*  I   - hSwitchChannel - pointer to the SwitchChannel SM context  \n
-*  I   - requestStatus - the SCR request status  \n
-*  I   - eResource - the resource for which the CB is issued  \n
-*  I   - pendReason - The SCR pend status in case of pend reply  \n
-*
-* \b RETURNS:
-*
-*  None.
-*
-* 
-*************************************************************************/
-void switchChannel_scrStatusCB(TI_HANDLE hSwitchChannel, EScrClientRequestStatus requestStatus, 
-                               EScrResourceId eResource, EScePendReason pendReason )
-{
-    switchChannel_t             *pSwitchChannel = (switchChannel_t*)hSwitchChannel;
-    switchChannel_smEvents      scEvent;
-
-    if (pSwitchChannel == NULL)
-    {
-        return;
-    }
-
-    switch (requestStatus)
-    {
-    case SCR_CRS_RUN: 
-        scEvent = SC_EVENT_SCR_RUN;
-        break;
-    case SCR_CRS_FW_RESET:
-        scEvent = SC_EVENT_FW_RESET;
-        break;
-    case SCR_CRS_PEND:
-        scEvent = SC_EVENT_SCR_FAIL;
-        break;
-    case SCR_CRS_ABORT: 
-    default:
-        TRACE2(pSwitchChannel->hReport, REPORT_SEVERITY_ERROR, "switchChannel_scrStatusCB scrStatus = %d, pendReason=%d\n", requestStatus, pendReason);
-        scEvent = SC_EVENT_SCR_FAIL;
-        break;
-    }
-
-    switchChannel_smEvent((TI_UINT8*)&pSwitchChannel->currentState, scEvent, pSwitchChannel);
-
-}
-
-
-
-/************************************************************************
- *                        switchChannel_smStartSwitchChannelCmd         *
- ************************************************************************/
-/**
-*
-*
-* \b Description: 
-*
-* This function is called once SwitchChannel command was received and the SCR
- * request returned with reason RUN. 
- * In this case perform the following:
- *  Set CMD to FW
-
-
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the SwitchChannel SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*************************************************************************/
-static TI_STATUS switchChannel_smStartSwitchChannelCmd(void *pData)
-{
-    switchChannel_t         *pSwitchChannel = (switchChannel_t *)pData;
-    TSwitchChannelParams    pSwitchChannelCmd;
-    TI_UINT32                   switchChannelTimeDuration;
-    paramInfo_t             param;
-
-    if (pSwitchChannel == NULL)
-    {
-        return TI_NOK;
-    }
-
-    param.paramType = SITE_MGR_BEACON_INTERVAL_PARAM;
-    siteMgr_getParam(pSwitchChannel->hSiteMgr, &param);
-
-    switchChannelTimeDuration = pSwitchChannel->curChannelSwitchCmdParams.channelSwitchCount * param.content.beaconInterval * 1024 / 1000;
-    if (  (switchChannelTimeDuration!=0) &&
-        ((os_timeStampMs(pSwitchChannel->hOs) - pSwitchChannel->SCRRequestTimestamp) >= switchChannelTimeDuration ))
-    {   /* There's no time to perfrom the SCC, set the Count to 1 */
-        pSwitchChannel->curChannelSwitchCmdParams.channelSwitchCount = 1;
-    }
-
-    apConn_indicateSwitchChannelInProgress(pSwitchChannel->hApConn);
-
-    pSwitchChannelCmd.channelNumber = pSwitchChannel->curChannelSwitchCmdParams.channelNumber;
-    pSwitchChannelCmd.switchTime    = pSwitchChannel->curChannelSwitchCmdParams.channelSwitchCount;
-    pSwitchChannelCmd.txFlag        = pSwitchChannel->curChannelSwitchCmdParams.channelSwitchMode;
-    pSwitchChannelCmd.flush         = 0;
-    TWD_CmdSwitchChannel (pSwitchChannel->hTWD, &pSwitchChannelCmd);
-    
-    TRACE4(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "TWD_CmdSwitchChannel:Set the cmd in HAL. Params:\n channelNumber=%d, switchTime=%d, txFlag=%d, flush=%d \n", pSwitchChannelCmd.channelNumber, pSwitchChannelCmd.switchTime, pSwitchChannelCmd.txFlag, pSwitchChannelCmd.flush);
-
-    return TI_OK;
-
-}
-
-/************************************************************************
- *    switchChannel_smFwResetWhileSCInProg          *
- ************************************************************************/
-/**
-*
-*
-* \b Description: 
-*
-* This function is called when Switch Channel command is cancelled. 
- * In this case update TX nad regulatory Domain adn HAL.
- * Release the SCR and exit PS.
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the SwitchChannel SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*************************************************************************/
-static TI_STATUS switchChannel_smFwResetWhileSCInProg(void *pData)
-{
-    switchChannel_t      *pSwitchChannel = (switchChannel_t *)pData;
-    paramInfo_t          param;
-
-    if (pSwitchChannel == NULL)
-    {
-        return TI_NOK;
-    }
-    TRACE0(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_smFwResetWhileSCInProg \n");
-
-    /* Update new current channel */
-    param.paramType = SITE_MGR_CURRENT_CHANNEL_PARAM;
-    param.content.siteMgrCurrentChannel = pSwitchChannel->curChannelSwitchCmdParams.channelNumber;
-    siteMgr_setParam(pSwitchChannel->hSiteMgr, &param);
-
-    apConn_indicateSwitchChannelFinished(pSwitchChannel->hApConn);
-
-    switchChannel_zeroDatabase(pSwitchChannel);
-
-    /* release the SCR */
-    scr_clientComplete(pSwitchChannel->hSCR, SCR_CID_SWITCH_CHANNEL, SCR_RESOURCE_SERVING_CHANNEL);
-    
-    return TI_OK;
-
-}
-
-
-/************************************************************************
- *                        switchChannel_smSwitchChannelCmplt            *
- ************************************************************************/
-/**
-*
-*
-* \b Description: 
-*
-* This function is called when SwitchChannel command completed in FW.
- * In this case release SCR and update current channel.
- * If TX was sus, it will be enabled only after first Beacon is recieved.
- * Exit PS.
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the SwitchChannel SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*************************************************************************/
-static TI_STATUS switchChannel_smSwitchChannelCmplt(void *pData)
-{
-    switchChannel_t             *pSwitchChannel = (switchChannel_t *)pData;
-    paramInfo_t     param;
-    
-    if (pSwitchChannel == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    /* Update new current channel */
-    param.paramType = SITE_MGR_CURRENT_CHANNEL_PARAM;
-    param.content.siteMgrCurrentChannel = pSwitchChannel->curChannelSwitchCmdParams.channelNumber;
-    siteMgr_setParam(pSwitchChannel->hSiteMgr, &param);
-
-    TRACE1(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_smSwitchChannelCmplt, new channelNum = %d\n", pSwitchChannel->currentChannel);
-
-    apConn_indicateSwitchChannelFinished(pSwitchChannel->hApConn);
-    switchChannel_zeroDatabase(pSwitchChannel);
-
-    /* release the SCR */
-    scr_clientComplete(pSwitchChannel->hSCR, SCR_CID_SWITCH_CHANNEL, SCR_RESOURCE_SERVING_CHANNEL);
-
-    return TI_OK;
-
-}
-
- 
-
-/************************************************************************
- *                        switchChannel_smScrFailWhileWait4Scr          *
- ************************************************************************/
-/**
-*
-*
-* \b Description: 
-*
-* This function is called when recovery occurred, while waiting for SCR due
- * to previous switch channel command. 
- * Exit PS
- * Release SCR. 
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the SwitchChannel SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*************************************************************************/
-static TI_STATUS switchChannel_smScrFailWhileWait4Scr(void *pData)
-{
-    switchChannel_t                       *pSwitchChannel = (switchChannel_t*)pData;
-
-    if (pSwitchChannel == NULL)
-    {
-        return TI_NOK;
-    }
-
-    TRACE0(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_smScrFailWhileWait4Scr\n");
-
-    switchChannel_zeroDatabase(pSwitchChannel);
-
-    /* release the SCR is not required !!! */
-    scr_clientComplete(pSwitchChannel->hSCR, SCR_CID_SWITCH_CHANNEL, SCR_RESOURCE_SERVING_CHANNEL);
-
-    return TI_OK;
-}
-
-/************************************************************************
- *                        switchChannel_smStopWhileWait4Cmd             *
- ************************************************************************/
-/**
-*
-*
-* \b Description: 
-*
-* This function is called when the station becomes Disconnected and the current
-* state is Wait4Cmd. In this case perfrom:
- * Stop the timer
- * Enable TX if it was disabled
- * Zero the current command parameters
- * Stop the timer
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the SwitchChannel SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*************************************************************************/
-static TI_STATUS switchChannel_smStopWhileWait4Cmd(void *pData)
-{
-    switchChannel_t                       *pSwitchChannel = (switchChannel_t*)pData;
-
-    if (pSwitchChannel == NULL)
-    {
-        return TI_NOK;
-    }
-
-    TRACE0(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_smStopWhileWait4Cmd\n");
-
-    switchChannel_zeroDatabase(pSwitchChannel);
-    
-    return TI_OK;
-}
-
-/************************************************************************
- *                        switchChannel_smStopWhileWait4Scr                 *
- ************************************************************************/
-/**
-*
-*
-* \b Description: 
-*
-* This function is called when the station becomes Disconnected and the current
-* state is Wait4Scr. In this case perfrom:
- * Stop the timer
- * Enable TX if it was disabled
- * Zero the current command parameters
- * Complete SCR
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the SwitchChannel SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*************************************************************************/
-static TI_STATUS switchChannel_smStopWhileWait4Scr(void *pData)
-{
-    switchChannel_t                       *pSwitchChannel = (switchChannel_t*)pData;
-
-    if (pSwitchChannel == NULL)
-    {
-        return TI_NOK;
-    }
-
-    TRACE0(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_smStopWhileWait4Scr\n");
-
-
-    switchChannel_zeroDatabase(pSwitchChannel);
-    
-    /* release the SCR */
-    scr_clientComplete(pSwitchChannel->hSCR, SCR_CID_SWITCH_CHANNEL, SCR_RESOURCE_SERVING_CHANNEL);
-
-    return TI_OK;
-}
-
-/************************************************************************
- *         switchChannel_smStopWhileSwitchChannelInProg                 *
- ************************************************************************/
-/**
-*
-*
-* \b Description: 
-*
-* This function is called when the station becomes Disconnected and the current
-* state is SwitchChannelInProg. In this case perfrom:
- * Stop the timer
- * Enable TX if it was disabled
- * Zero the current command parameters
- * resume self test
- * Complete SCR
- * Exit PS
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the SwitchChannel SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*************************************************************************/
-static TI_STATUS switchChannel_smStopWhileSwitchChannelInProg(void *pData)
-{
-    switchChannel_t                       *pSwitchChannel = (switchChannel_t*)pData;
-
-    if (pSwitchChannel == NULL)
-    {
-        return TI_NOK;
-    }
-
-    TRACE0(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_smStopWhileSwitchChannelInProg\n");
-
-    /* Exit PS */
-    /*PowerMgr_exitFromDriverMode(pSwitchChannel->hPowerMngr, "SwitchChannel");*/
-
-    apConn_indicateSwitchChannelFinished(pSwitchChannel->hApConn);
-
-    TWD_CmdSwitchChannelCancel (pSwitchChannel->hTWD, pSwitchChannel->currentChannel);
-    switchChannel_zeroDatabase(pSwitchChannel);
-    
-    /* release the SCR */
-    scr_clientComplete(pSwitchChannel->hSCR, SCR_CID_SWITCH_CHANNEL, SCR_RESOURCE_SERVING_CHANNEL);
-
-    return TI_OK;
-}
-
-
-
-
-/************************************************************************
- *                        switchChannel_zeroDatabase                    *
- ************************************************************************/
-/**
-*
-*
-* \b Description: 
-*
-* This function is called when the SwitchChannel internal database should be zero.
- * The following parameters are zerod:
- * SwitchChannelChannelRange - the timestamps and validity state of channels
- * curChannelSwitchCmdParams - the current switch channel command parameters
-*
-* \b ARGS:
-*
-*  I   - pSwitchChannel - pointer to the SwitchChannel SM context  \n
-*  I   - channelNum - channel number  \n
-*  I   - timestamp - required timestamp  \n
-*
-* \b RETURNS:
-*
-*  None.
-*
-* 
-*************************************************************************/
-static void switchChannel_zeroDatabase(switchChannel_t *pSwitchChannel)
-{
-
-    TRACE0(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_zeroDatabase\n");
-
-
-    pSwitchChannel->curChannelSwitchCmdParams.channelNumber = 0;
-    pSwitchChannel->curChannelSwitchCmdParams.channelSwitchCount = 0;
-    pSwitchChannel->curChannelSwitchCmdParams.channelSwitchMode = SC_SWITCH_CHANNEL_MODE_NOT_TX_SUS;
-    pSwitchChannel->currentChannel = 0;
-
-}
-
-/***********************************************************************
- *                        release_module                               
- ***********************************************************************/
-/* 
-DESCRIPTION:    Called by the destroy function or by the create function (on failure)
-                Go over the vector, for each bit that is set, release the corresponding module.
-                                                                                                   
-INPUT:      pSwitchChannel  -   SwitchChannel pointer.
-            initVec -   Vector that contains a bit set for each module thah had been initiualized
-
-OUTPUT:     
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static void release_module(switchChannel_t *pSwitchChannel, TI_UINT32 initVec)
-{
-    if (pSwitchChannel == NULL)
-    {
-        return;
-    }
-    if (initVec & (1 << SC_SM_INIT_BIT))
-    {
-        fsm_Unload(pSwitchChannel->hOs, pSwitchChannel->pSwitchChannelSm);
-    }
-
-    if (initVec & (1 << SC_INIT_BIT))
-    {
-        os_memoryFree(pSwitchChannel->hOs, pSwitchChannel, sizeof(switchChannel_t));
-    }
-
-    initVec = 0;
-}
-
-
-/**
-*
-* switchChannel_smNop - Do nothing
-*
-* \b Description: 
-*
-* Do nothing in the SM.
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the SwitchChannel SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static TI_STATUS switchChannel_smNop(void *pData)
-{
-    switchChannel_t       *pSwitchChannel;
-
-    pSwitchChannel = (switchChannel_t*)pData;
-    if (pSwitchChannel == NULL)
-    {
-        return TI_NOK;
-    }
-    TRACE0(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, " switchChannel_smNop\n");
-
-    return TI_OK;
-}
-
-/**
-*
-* switchChannel_smUnexpected - Unexpected event
-*
-* \b Description: 
-*
-* Unexpected event in the SM.
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the SwitchChannel SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static TI_STATUS switchChannel_smUnexpected(void *pData)
-{
-    switchChannel_t       *pSwitchChannel;
-
-    pSwitchChannel = (switchChannel_t*)pData;
-    if (pSwitchChannel == NULL)
-    {
-        return TI_NOK;
-    }
-    TRACE1(pSwitchChannel->hReport, REPORT_SEVERITY_ERROR, " switchChannel_smUnexpected, state = %d\n", pSwitchChannel->currentState);
-
-    return TI_NOK;
-}
-
-/*******************************************************************************
-***********                         Debug functions                  ***********               
-*******************************************************************************/
-#ifdef TI_DBG
-
-/************************************************************************
- *                        switchChannel_recvCmd                         *
- ************************************************************************/
-/*DESCRIPTION: This function is called by MLME Parser upon receiving of
-                Beacon, Probe Response or Action with Switch Channel command,
-                or beacon/
-                performs the following:
-                -   Initializes the switching channel procedure.
-                -   Setting timer to the actual switching time(if needed)
-                
-INPUT:      hSwitchChannel              -   SwitchChannel handle.
-            switchMode          - indicates whether to stop transmission
-                                until the scheduled channel switch.
-            newChannelNum       - indicates the number of the new channel.
-            durationTime        - indicates the time (expressed in ms) until
-                                the scheduled channel switch should accure.
-
-OUTPUT:     None
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-static void switchChannel_recvCmd4Debug(TI_HANDLE hSwitchChannel, dot11_CHANNEL_SWITCH_t *channelSwitch, TI_BOOL BeaconPacket, TI_UINT8 channel)
-{
-
-    switchChannel_t             *pSwitchChannel = (switchChannel_t *)hSwitchChannel;
-    paramInfo_t                 param;
-
-    if (pSwitchChannel==NULL)
-    {
-        return;
-    }
-
-
-    /* The following is for debug purposes only
-        It will be operated when the Switch Channel cmd is opertated from debug CLI */
-    if (pSwitchChannel->ignoreCancelSwitchChannelCmd != 0)
-    {
-        if (pSwitchChannel->ignoreCancelSwitchChannelCmd == 1)
-        {
-            /* update the new SCC params */
-            pSwitchChannel->curChannelSwitchCmdParams.channelNumber = channelSwitch->channelNumber;
-            pSwitchChannel->curChannelSwitchCmdParams.channelSwitchCount = channelSwitch->channelSwitchCount;
-            pSwitchChannel->curChannelSwitchCmdParams.channelSwitchMode = channelSwitch->channelSwitchMode;
-            
-            pSwitchChannel->ignoreCancelSwitchChannelCmd = 2;
-        }
-        else if (channelSwitch->channelSwitchCount>0)
-        {
-            channelSwitch->channelSwitchCount --;
-        }
-        else
-        {   
-            pSwitchChannel->ignoreCancelSwitchChannelCmd = 0;
-        }
-
-
-        /* search in the buffer pointer to the beginning of the
-            Switch Cahnnel Announcement IE according to the IE ID */
-        
-        /* SC IE exists on the serving channel */
-        TRACE3(pSwitchChannel->hReport, REPORT_SEVERITY_INFORMATION, "switchChannel_recvFrame, SwitchChannel cmd was found, channel no=%d, mode=%d, TBTT=%d \n", channelSwitch->channelNumber, channelSwitch->channelSwitchMode, channelSwitch->channelSwitchCount);
-
-        /* Checking channel number validity */
-        param.content.channel = channelSwitch->channelNumber;
-        param.paramType = REGULATORY_DOMAIN_IS_CHANNEL_SUPPORTED;
-        regulatoryDomain_getParam(pSwitchChannel->hRegulatoryDomain,&param);
-        if (( !param.content.bIsChannelSupprted ) || 
-            (channelSwitch->channelSwitchCount == 0) || 
-            (channelSwitch->channelSwitchMode == SC_SWITCH_CHANNEL_MODE_TX_SUS))
-        {   /* Trigger Roaming, if TX mode is disabled, the new channel number is invalid, 
-                or the TBTT count is 0 */
-            apConn_reportRoamingEvent(pSwitchChannel->hApConn, ROAMING_TRIGGER_SWITCH_CHANNEL, NULL);
-        }
-        else
-        {   /* Invoke Switch Channel command */
-            /* update the new SCC params */
-            pSwitchChannel->curChannelSwitchCmdParams.channelNumber = channelSwitch->channelNumber;
-            pSwitchChannel->curChannelSwitchCmdParams.channelSwitchCount = channelSwitch->channelSwitchCount;
-            pSwitchChannel->curChannelSwitchCmdParams.channelSwitchMode = channelSwitch->channelSwitchMode;
-            switchChannel_smEvent((TI_UINT8*)&pSwitchChannel->currentState, SC_EVENT_SC_CMD, pSwitchChannel);
-        }
-    }
-
-}
-
-void switchChannelDebug_setCmdParams(TI_HANDLE hSwitchChannel, SC_switchChannelCmdParam_e switchChannelCmdParam, TI_UINT8 param)
-{
-    switchChannel_t       *pSwitchChannel = (switchChannel_t*)hSwitchChannel;
-
-    if (pSwitchChannel == NULL)
-    {
-        return;
-    }
-    
-    switch (switchChannelCmdParam)
-    {
-    case SC_SWITCH_CHANNEL_NUM:
-        WLAN_OS_REPORT(("SwitchChannelDebug_setSwitchChannelCmdParams, channelNum=%d \n ", param));
-        pSwitchChannel->debugChannelSwitchCmdParams.channelNumber = param;
-        break;
-    case SC_SWITCH_CHANNEL_TBTT:
-        WLAN_OS_REPORT(("SwitchChannelDebug_setSwitchChannelCmdParams, channelSwitchCount=%d \n ", param));
-        pSwitchChannel->debugChannelSwitchCmdParams.channelSwitchCount = param;
-        break;
-    case SC_SWITCH_CHANNEL_MODE:
-        WLAN_OS_REPORT(("SwitchChannelDebug_setSwitchChannelCmdParams, channelSwitchMode=%d \n ", param));
-        pSwitchChannel->debugChannelSwitchCmdParams.channelSwitchMode = param;
-        break;
-    default:
-        WLAN_OS_REPORT(("ERROR: SwitchChannelDebug_setSwitchChannelCmdParams, wrong switchChannelCmdParam=%d \n ",
-                        switchChannelCmdParam));
-            break;
-    }
-
-}
-void switchChannelDebug_SwitchChannelCmdTest(TI_HANDLE hSwitchChannel, TI_BOOL BeaconPacket)
-{
-    switchChannel_t       *pSwitchChannel = (switchChannel_t*)hSwitchChannel;
-
-    if (pSwitchChannel == NULL)
-    {
-        return;
-    }
-    
-    WLAN_OS_REPORT(("SwitchChannelDebug_SwitchChannelCmdTest, BeaconPacket=%d \n cmd params: channelNumber=%d, channelSwitchCount=%d, channelSwitchMode=%d \n",
-                    BeaconPacket,
-                    pSwitchChannel->debugChannelSwitchCmdParams.channelNumber,
-                    pSwitchChannel->debugChannelSwitchCmdParams.channelSwitchCount,
-                    pSwitchChannel->debugChannelSwitchCmdParams.channelSwitchMode));
-
-
-    pSwitchChannel->ignoreCancelSwitchChannelCmd= 1;
-    switchChannel_recvCmd4Debug(hSwitchChannel, &pSwitchChannel->debugChannelSwitchCmdParams, BeaconPacket, pSwitchChannel->currentChannel);
-}
-
-void switchChannelDebug_CancelSwitchChannelCmdTest(TI_HANDLE hSwitchChannel, TI_BOOL BeaconPacket)
-{
-
-    switchChannel_t       *pSwitchChannel = (switchChannel_t*)hSwitchChannel;
-
-    if (pSwitchChannel == NULL)
-    {
-        return;
-    }
-    
-    WLAN_OS_REPORT(("SwitchChannelDebug_SwitchChannelCmdTest, BeaconPacket=%d \n",BeaconPacket));
-
-    pSwitchChannel->ignoreCancelSwitchChannelCmd= 0;
-    switchChannel_recvCmd4Debug(hSwitchChannel, NULL, BeaconPacket, pSwitchChannel->currentChannel);
-}
-
-
-void switchChannelDebug_printStatus(TI_HANDLE hSwitchChannel)
-{
-    switchChannel_t       *pSwitchChannel = (switchChannel_t*)hSwitchChannel;
-
-    if (pSwitchChannel == NULL)
-    {
-        return;
-    }
-    
-    WLAN_OS_REPORT(("SwitchChannel debug params are: channelNumber=%d, channelSwitchCount=%d , channelSwitchMode=%d \n", 
-                    pSwitchChannel->debugChannelSwitchCmdParams.channelNumber, 
-                    pSwitchChannel->debugChannelSwitchCmdParams.channelSwitchCount,
-                    pSwitchChannel->debugChannelSwitchCmdParams.channelSwitchMode));
-
-    WLAN_OS_REPORT(("SwitchChannel state=%d, currentChannel=%d \n", pSwitchChannel->currentState, pSwitchChannel->currentChannel));
-
-
-}
-
-void switchChannelDebug_setChannelValidity(TI_HANDLE hSwitchChannel, TI_UINT8 channelNum, TI_BOOL validity)
-{
-    paramInfo_t param;
-
-    switchChannel_t       *pSwitchChannel = (switchChannel_t*)hSwitchChannel;
-
-    if (pSwitchChannel == NULL)
-    {
-        return;
-    }
-
-    param.paramType = REGULATORY_DOMAIN_SET_CHANNEL_VALIDITY;
-    param.content.channelValidity.channelNum = channelNum;
-    param.content.channelValidity.channelValidity = validity;
-    regulatoryDomain_setParam(pSwitchChannel->hRegulatoryDomain, &param);
-
-}
-
-#endif  /* TI_DBG */
-
-
-
-
-
-
diff --git a/wl1271/stad/src/AirLink_Managment/SwitchChannelApi.h b/wl1271/stad/src/AirLink_Managment/SwitchChannelApi.h
deleted file mode 100644
index f2fd5c7..0000000
--- a/wl1271/stad/src/AirLink_Managment/SwitchChannelApi.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * SwitchChannelApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file SwitchChannel.h
- *  \brief SwitchChannel module interface header file
- *
- *  \see SwitchChannel.c
- */
-
-/***************************************************************************/
-/*																			*/
-/*	  MODULE:	SwitchChannel.h														*/
-/*    PURPOSE:	SwitchChannel module inteerface header file							*/
-/*																			*/
-/***************************************************************************/
-#ifndef __SWITCH_CHANNEL_H__
-#define __SWITCH_CHANNEL_H__
-
-#include "paramOut.h"
-#include "DrvMainModules.h"
-
-
-TI_HANDLE switchChannel_create(TI_HANDLE hOs);
-
-void      switchChannel_init (TStadHandlesList *pStadHandles);
-
-TI_STATUS switchChannel_SetDefaults (TI_HANDLE hSwitchChannel, SwitchChannelInitParams_t *SwitchChannelInitParams);
-
-TI_STATUS switchChannel_stop(TI_HANDLE hSwitchChannel);
-
-TI_STATUS switchChannel_start(TI_HANDLE hSwitchChannel);
-
-TI_STATUS switchChannel_unload(TI_HANDLE hSwitchChannel);
-
-void switchChannel_recvCmd(TI_HANDLE hSwitchChannel, dot11_CHANNEL_SWITCH_t *channelSwitch, TI_UINT8 channel);
-
-void switchChannel_enableDisableSpectrumMngmt(TI_HANDLE hSwitchChannel, TI_BOOL enableDisable);
-
-
-
-/* for debug */
-typedef enum
-{
-	SC_SWITCH_CHANNEL_NUM,
-	SC_SWITCH_CHANNEL_TBTT,
-	SC_SWITCH_CHANNEL_MODE
-} SC_switchChannelCmdParam_e;
-
-#ifdef TI_DBG
-
-void switchChannelDebug_switchChannelCmdTest(TI_HANDLE hSwitchChannel, TI_BOOL BeaconPacket);
-void switchChannelDebug_CancelSwitchChannelCmdTest(TI_HANDLE hSwitchChannel, TI_BOOL BeaconPacket);
-void switchChannelDebug_setChannelValidity(TI_HANDLE hSwitchChannel, TI_UINT8 channelNum, TI_BOOL validity);
-void switchChannelDebug_printStatus(TI_HANDLE hSwitchChannel);
-void switchChannelDebug_setCmdParams(TI_HANDLE hSwitchChannel, SC_switchChannelCmdParam_e switchChannelCmdParam, TI_UINT8 param);
-void switchChannelDebug_SwitchChannelCmdTest(TI_HANDLE hSwitchChannel, TI_BOOL BeaconPacket);
-#endif
-
-#endif /* __SWITCH_CHANNEL_H__*/
diff --git a/wl1271/stad/src/AirLink_Managment/measurementMgr.c b/wl1271/stad/src/AirLink_Managment/measurementMgr.c
deleted file mode 100644
index 6af3660..0000000
--- a/wl1271/stad/src/AirLink_Managment/measurementMgr.c
+++ /dev/null
@@ -1,1115 +0,0 @@
-/*
- * measurementMgr.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   measurementMgr.c                                           */
-/*    PURPOSE:  measurement Manager module file                            */
-/*                                                                         */
-/***************************************************************************/
-
-
-
-
-#define __FILE_ID__  FILE_ID_1
-#include "measurementMgr.h"
-#include "regulatoryDomainApi.h"
-#include "healthMonitor.h"
-#include "DrvMainModules.h"
-#include "siteMgrApi.h"
-#include "TrafficMonitorAPI.h"
-#include "smeApi.h"
-#include "sme.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCTSMngr.h"
-#endif
-#include "TWDriver.h"
-
-/* default measurement parameters */
-#define MEASUREMENT_CAPABILITIES_NONE                   0x00
-#define MEASUREMENT_CAPABILITIES_DOT11H                 0x01
-#define MEASUREMENT_CAPABILITIES_XCC_RM                 0x02
-
-
-#define MEASUREMENT_BEACON_INTERVAL_IN_MICRO_SEC        1024
-#define MEASUREMENT_MSEC_IN_MICRO                       1000
-
-
-
-
-/********************************************************************************/
-/*                      Internal functions prototypes.                          */
-/********************************************************************************/
-
-static void measurementMgr_releaseModule(measurementMgr_t *pMeasurementMgr);
-
-static TI_BOOL measurementMgr_isTrafficIntensityHigherThanThreshold(measurementMgr_t * pMeasurementMgr);
-
-static TI_BOOL  measurementMgr_isRequestValid(TI_HANDLE hMeasurementMgr, MeasurementRequest_t *pRequestArr[], TI_UINT8 numOfRequest);
-
-static TI_BOOL measurementMgrSM_measureInProgress(TI_HANDLE hMeasurementMgr);
-
-
-
-
-
-/********************************************************************************/
-/*                      Interface functions Implementation.                     */
-/********************************************************************************/
-
-
-/**
- * Creates the Measurement Manager moodule.
- * 
- * @param hOs A handle to the OS object.
- *
- * @date 16-Dec-2005
- */
-TI_HANDLE measurementMgr_create(TI_HANDLE hOs)
-{
-    measurementMgr_t * pMeasurementMgr = NULL;
-    TI_STATUS status;
-
-    /* allocating the MeasurementMgr object */
-    pMeasurementMgr = os_memoryAlloc(hOs, sizeof(measurementMgr_t));
-
-    if (pMeasurementMgr == NULL)
-        return NULL;
-
-    os_memoryZero(hOs, pMeasurementMgr, sizeof(measurementMgr_t));
-    pMeasurementMgr->hOs = hOs;
-
-    /* creating the Measurement SM */
-    status = fsm_Create(pMeasurementMgr->hOs, &(pMeasurementMgr->pMeasurementMgrSm), 
-                        MEASUREMENTMGR_NUM_STATES , MEASUREMENTMGR_NUM_EVENTS);
-    if(status != TI_OK)
-    {
-        measurementMgr_releaseModule(pMeasurementMgr);
-        return NULL;
-    }
-
-    /* creating the sub modules of measurement module */
-    
-    /* creating Request Handler sub module */
-    if( (pMeasurementMgr->hRequestH = requestHandler_create(hOs)) == NULL)
-    {
-        measurementMgr_releaseModule(pMeasurementMgr);
-        return NULL;
-    }
-
-    return(pMeasurementMgr);
-}
-
-
-
-
-
-/**
- * Configures the Measurement Manager module.
- * 
- * @param pStadHandles Handles to other modules the Measurement Manager needs.
- * 
- * @date 16-Dec-2005
- */
-void measurementMgr_init (TStadHandlesList *pStadHandles)
-{
-    measurementMgr_t *pMeasurementMgr = (measurementMgr_t *)(pStadHandles->hMeasurementMgr);
-    paramInfo_t param;
-    
-    /* Init Handlers */
-    pMeasurementMgr->hRegulatoryDomain  = pStadHandles->hRegulatoryDomain;
-    pMeasurementMgr->hXCCMngr           = pStadHandles->hXCCMngr;
-    pMeasurementMgr->hSiteMgr           = pStadHandles->hSiteMgr;
-    pMeasurementMgr->hTWD               = pStadHandles->hTWD;
-    pMeasurementMgr->hMlme              = pStadHandles->hMlmeSm;
-    pMeasurementMgr->hTrafficMonitor    = pStadHandles->hTrafficMon;
-    pMeasurementMgr->hReport            = pStadHandles->hReport;
-    pMeasurementMgr->hOs                = pStadHandles->hOs;
-    pMeasurementMgr->hScr               = pStadHandles->hSCR;
-    pMeasurementMgr->hApConn            = pStadHandles->hAPConnection;
-    pMeasurementMgr->hTxCtrl            = pStadHandles->hTxCtrl;
-    pMeasurementMgr->hTimer             = pStadHandles->hTimer;
-    pMeasurementMgr->hSme               = pStadHandles->hSme;
-
-    /* initialize variables to default values */
-    pMeasurementMgr->Enabled = TI_TRUE;
-    pMeasurementMgr->Connected = TI_FALSE;
-    pMeasurementMgr->Capabilities = MEASUREMENT_CAPABILITIES_NONE;
-    pMeasurementMgr->Mode = MSR_MODE_NONE;
-
-    /* Getting management capability status */
-    param.paramType = REGULATORY_DOMAIN_MANAGEMENT_CAPABILITY_ENABLED_PARAM;
-    regulatoryDomain_getParam (pMeasurementMgr->hRegulatoryDomain, &param);
-    if (param.content.spectrumManagementEnabled)
-    {
-        pMeasurementMgr->Capabilities |= MEASUREMENT_CAPABILITIES_DOT11H;
-    }
-    
-    /* Init Functions */
-    pMeasurementMgr->parserFrameReq = NULL;
-    pMeasurementMgr->isTypeValid = NULL;
-    pMeasurementMgr->buildReport = NULL;
-    pMeasurementMgr->buildRejectReport = NULL;
-    pMeasurementMgr->sendReportAndCleanObj = NULL;
-    
-    /* initialize variables */  
-    pMeasurementMgr->currentState = MEASUREMENTMGR_STATE_IDLE;
-    pMeasurementMgr->isModuleRegistered = TI_FALSE;
-    pMeasurementMgr->currentFrameType = MSR_FRAME_TYPE_NO_ACTIVE;
-    pMeasurementMgr->measuredChannelID = 0;
-    pMeasurementMgr->currentNumOfRequestsInParallel = 0;
-    pMeasurementMgr->bMeasurementScanExecuted = TI_FALSE;
-    
-    /* config sub modules */
-    RequestHandler_config(pMeasurementMgr->hRequestH, pStadHandles->hReport, pStadHandles->hOs);
-
-    /* Register to the SCR module */
-    scr_registerClientCB(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, measurementMgr_scrResponseCB, (TI_HANDLE)pMeasurementMgr);
-
-    measurementMgrSM_config ((TI_HANDLE)pMeasurementMgr);   
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INIT , ": Measurement Manager configured successfully\n");
-}
-
-
-TI_STATUS measurementMgr_SetDefaults (TI_HANDLE hMeasurementMgr, measurementInitParams_t * pMeasurementInitParams)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-#ifdef XCC_MODULE_INCLUDED
-    TI_UINT32 currAC;
-#endif
-
-    pMeasurementMgr->trafficIntensityThreshold = pMeasurementInitParams->trafficIntensityThreshold;
-    pMeasurementMgr->maxDurationOnNonServingChannel = pMeasurementInitParams->maxDurationOnNonServingChannel;
-
-    /* allocating the measurement Activation Delay timer */
-    pMeasurementMgr->hActivationDelayTimer = tmr_CreateTimer (pMeasurementMgr->hTimer);
-    if (pMeasurementMgr->hActivationDelayTimer == NULL)
-    {
-        TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, "measurementMgr_SetDefaults(): Failed to create hActivationDelayTimer!\n");
-        return TI_NOK;
-    }
-
-#ifdef XCC_MODULE_INCLUDED  
-    /* allocating the per AC TS Metrics report timers */
-    for (currAC = 0; currAC < MAX_NUM_OF_AC; currAC++)
-    {
-        pMeasurementMgr->isTsMetricsEnabled[currAC] = TI_FALSE;
-
-        pMeasurementMgr->hTsMetricsReportTimer[currAC] = tmr_CreateTimer (pMeasurementMgr->hTimer);
-        if (pMeasurementMgr->hTsMetricsReportTimer[currAC] == NULL)
-        {
-            TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, "measurementMgr_SetDefaults(): Failed to create hTsMetricsReportTimer!\n");
-            return TI_NOK;
-        }
-    }
-
-    /* Check in the Registry if the station supports XCC RM */
-    if (pMeasurementInitParams->XCCEnabled == XCC_MODE_ENABLED)
-    {
-        pMeasurementMgr->Capabilities |= MEASUREMENT_CAPABILITIES_XCC_RM;
-    }
-#endif
-
-    return TI_OK;
-}
-
-
-
-
-
-/**
- * Sets the specified Measurement Manager parameter.
- *
- * @param hMeasurementMgr A handle to the Measurement Manager module.
- * @param pParam The parameter to set.
- * 
- * @date 16-Dec-2005
- */
-TI_STATUS measurementMgr_setParam(TI_HANDLE hMeasurementMgr, paramInfo_t * pParam)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-
-    switch (pParam->paramType)
-    {
-        case MEASUREMENT_ENABLE_DISABLE_PARAM:
-        {
-            TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MEASUREMENT_ENABLE_DISABLE_PARAM <- %d\n", pParam->content.measurementEnableDisableStatus);
-
-            if (pParam->content.measurementEnableDisableStatus)
-            {
-                measurementMgr_enable(pMeasurementMgr);
-            }
-            else
-            {
-                measurementMgr_disable(pMeasurementMgr);
-            }
-
-            break;
-        }
-
-        case MEASUREMENT_TRAFFIC_THRESHOLD_PARAM:
-        {
-            if ((pParam->content.measurementTrafficThreshold >= MEASUREMENT_TRAFFIC_THRSHLD_MIN) &&
-                (pParam->content.measurementTrafficThreshold <= MEASUREMENT_TRAFFIC_THRSHLD_MAX))
-            {
-                TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MEASUREMENT_TRAFFIC_THRESHOLD_PARAM <- %d\n", pParam->content.measurementTrafficThreshold);
-
-                pMeasurementMgr->trafficIntensityThreshold = pParam->content.measurementTrafficThreshold;
-            }
-            else
-            {
-                TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, ": Invalid value for MEASUREMENT_TRAFFIC_THRESHOLD_PARAM (%d)\n", pParam->content.measurementTrafficThreshold);
-            }
-        
-            break;
-        }
-
-        
-        case MEASUREMENT_MAX_DURATION_PARAM:
-        {
-            TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MEASUREMENT_MAX_DURATION_PARAM <- %d\n", pParam->content.measurementMaxDuration);
-
-            pMeasurementMgr->maxDurationOnNonServingChannel = pParam->content.measurementMaxDuration;
-
-            break;
-        }
-        
-
-        default:
-        {
-            TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, ": Specified parameter is not supported (%d)\n", pParam->paramType);
-
-            return PARAM_NOT_SUPPORTED;
-        }
-
-    }
-    
-    return TI_OK;
-}
-
-
-
-
-
-/**
- * Gets the specified parameter from the Measurement Manager.
- *
- * @param hMeasurementMgr A handle to the Measurement Manager module.
- * @param pParam The parameter to get.
- * 
- * @date 16-Dec-2005
- */
-TI_STATUS measurementMgr_getParam(TI_HANDLE hMeasurementMgr, paramInfo_t * pParam)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-
-    switch(pParam->paramType)
-    {
-
-        case MEASUREMENT_GET_STATUS_PARAM:
-        {
-            WLAN_OS_REPORT(("%s: \n\n", __FUNCTION__));
-            WLAN_OS_REPORT(("MeasurementMgr Status Report:\n\n"));
-
-            WLAN_OS_REPORT(("Current State: %d\n\n", pMeasurementMgr->currentState));
-
-            WLAN_OS_REPORT(("Connected: %d\n", pMeasurementMgr->Connected));
-            WLAN_OS_REPORT(("Enabled: %d\n\n", pMeasurementMgr->Enabled));
-
-            WLAN_OS_REPORT(("Mode: %d\n", pMeasurementMgr->Mode));
-            WLAN_OS_REPORT(("Capabilities: %d\n\n", pMeasurementMgr->Capabilities));
-
-            WLAN_OS_REPORT(("current Frame Type: %d\n", pMeasurementMgr->currentFrameType));
-            WLAN_OS_REPORT(("Measured Channel: %d\n", pMeasurementMgr->measuredChannelID));
-            WLAN_OS_REPORT(("Serving Channel: %d\n", pMeasurementMgr->servingChannelID));
-            WLAN_OS_REPORT(("Traffic Intensity Threshold: %d\n", pMeasurementMgr->trafficIntensityThreshold));
-            WLAN_OS_REPORT(("Max Duration on Nonserving Channel: %d\n", pMeasurementMgr->maxDurationOnNonServingChannel));
-
-            break;
-        }
-        
-
-        default:
-        {
-            TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, ": Specified parameter is not supported (%d)\n", pParam->paramType);
-
-            return PARAM_NOT_SUPPORTED;
-        }
-
-    }
-
-    return TI_OK;
-}
-
-
-
-
-
-
-/**
- * Signals the Measurement Manager that the STA is connected.
- *
- * @param hMeasurementMgr A handle to the Measurement Manager module.
- * 
- * @date 16-Dec-2005
- */
-TI_STATUS measurementMgr_connected(TI_HANDLE hMeasurementMgr)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-
-    /* checking if measurement is enabled */
-    if (pMeasurementMgr->Mode == MSR_MODE_NONE)
-        return TI_OK;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MeasurementMgr set to connected.\n");
-
-    return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-                               MEASUREMENTMGR_EVENT_CONNECTED, pMeasurementMgr);
-}
-
-
-
-
-
-/**
- * Signals the Measurement Manager that the STA is disconnected.
- *
- * @param hMeasurementMgr A handle to the Measurement Manager module.
- * 
- * @date 16-Dec-2005
- */
-TI_STATUS measurementMgr_disconnected(TI_HANDLE hMeasurementMgr)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MeasurementMgr set to disconnected.\n");
-
-    return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-                                MEASUREMENTMGR_EVENT_DISCONNECTED, pMeasurementMgr);
-}
-
-
-
-
-/**
- * Enables the Measurement Manager module.
- * 
- * @date 10-Jan-2006
- */
-TI_STATUS measurementMgr_enable(TI_HANDLE hMeasurementMgr)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MeasurementMgr set to enabled.\n");
-
-    return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-                                MEASUREMENTMGR_EVENT_ENABLE, pMeasurementMgr);
-}
-
-
-
-
-
-/**
- * Disables the Measurement Manager module.
- * 
- * @date 10-Jan-2006
- */
-TI_STATUS measurementMgr_disable(TI_HANDLE hMeasurementMgr)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MeasurementMgr set to disabled.\n");
-
-    return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-                                MEASUREMENTMGR_EVENT_DISABLE, pMeasurementMgr);
-}
-
-
-
-
-
-/**
- * Destroys the Measurement Manager module.
- * 
- * @param hMeasurementMgr A handle to the Measurement Manager module.
- * 
- * @date 16-Dec-2005
- */
-TI_STATUS measurementMgr_destroy(TI_HANDLE hMeasurementMgr)
-{
-    measurementMgr_t *pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-
-    if (pMeasurementMgr == NULL)
-        return TI_OK;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MeasurementMgr is being destroyed\n");
-
-    measurementMgr_releaseModule (pMeasurementMgr);
-
-    return TI_OK;
-}
-
-
-
-
-
-
-/**
- * Sets the Measurement Mode.
- * 
- * @param hMeasurementMgr A handle to the Measurement Manager module.
- * @param capabilities The AP capabilities.
- * @param pIeBuffer Pointer to the list of IEs.
- * @param length Length of the IE list.
- * 
- * @date 16-Dec-2005
- */
-TI_STATUS measurementMgr_setMeasurementMode(TI_HANDLE hMeasurementMgr, TI_UINT16 capabilities, 
-                                         TI_UINT8 * pIeBuffer, TI_UINT16 length)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-
-    /*
-     * 11h Measurement is not supported in the current version.
-     */
-/*  if( (pMeasurementMgr->Capabilities & MEASUREMENT_CAPABILITIES_DOT11H) &&
-        (capabilities & DOT11_SPECTRUM_MANAGEMENT) )
-    {
-        pMeasurementMgr->Mode = MSR_MODE_SPECTRUM_MANAGEMENT;
-    }
-    else
-    {
-*/
-#ifdef XCC_MODULE_INCLUDED
-
-        if(pMeasurementMgr->Capabilities & MEASUREMENT_CAPABILITIES_XCC_RM)
-        {
-                    pMeasurementMgr->Mode = MSR_MODE_XCC;
-        }
-        else
-#endif
-        {
-            pMeasurementMgr->Mode = MSR_MODE_NONE;
-        }
-
-
-    TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MeasurementMgr mode changed to: %d\n", pMeasurementMgr->Mode);
-    
-    return TI_OK;
-}
-
-
-
-
-
-
-/**
- * Called when a frame with type measurement request is received.
- * 
- * @param hMeasurementMgr A handle to the Measurement Manager module.
- * @param frameType The frame type.
- * @param dataLen The length of the frame.
- * @param pData A pointer to the frame's content.
- * 
- * @date 16-Dec-2005
- */
-TI_STATUS measurementMgr_receiveFrameRequest(TI_HANDLE hMeasurementMgr,
-                                             EMeasurementFrameType frameType,
-                                             TI_INT32 dataLen,
-                                             TI_UINT8 * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-
-    TMeasurementFrameRequest * frame = &(pMeasurementMgr->newFrameRequest);    
-    TI_UINT16 currentFrameToken;
-    
-    /* checking if measurement is enabled */
-    if (pMeasurementMgr->Mode == MSR_MODE_NONE)
-        return TI_NOK;
-
-    /* ignore broadcast/multicast request if unicast request is active */
-    if (frameType != MSR_FRAME_TYPE_UNICAST && pMeasurementMgr->currentFrameType == MSR_FRAME_TYPE_UNICAST)
-    {
-        TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Broadcast/Multicast measurement frame has been ignored\n");
-
-        return TI_NOK;
-    }
-
-    /* ignore broadcast request if multicast request is active */
-    if (frameType == MSR_FRAME_TYPE_BROADCAST && pMeasurementMgr->currentFrameType == MSR_FRAME_TYPE_MULTICAST)
-    {
-        TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Broadcast measurement frame has been ignored\n");
-        
-        return TI_NOK;
-    }
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Measurement frame received\n");
-
-    /* Parsing the Frame Request Header */
-    pMeasurementMgr->parserFrameReq(hMeasurementMgr, pData, dataLen, 
-                                        frame);
-
-    frame->frameType = frameType;
-
-    /* checking if the received token frame is the same as the one that is being processed */
-    if ((requestHandler_getFrameToken(pMeasurementMgr->hRequestH, &currentFrameToken) == TI_OK)
-        && (currentFrameToken == frame->hdr->dialogToken))
-    {
-        os_memoryZero(pMeasurementMgr->hOs, &pMeasurementMgr->newFrameRequest, 
-                      sizeof(TMeasurementFrameRequest));
-
-        TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Measurement frame token %d is identical to current frame token - ignoring frame\n", currentFrameToken);
-
-        return TI_NOK;
-    }
-
-    TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Measurement frame token is %d\n", frame->hdr->dialogToken);
-
-    /* Frame is Received for processing */
-    return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-                               MEASUREMENTMGR_EVENT_FRAME_RECV, pMeasurementMgr);
-}
-
-
-
-
-
-/**
- * Activates the next measurement request.
- * 
- * @param hMeasurementMgr A handle to the Measurement Manager module.
- * 
- * @date 16-Dec-2005
- */
-TI_STATUS measurementMgr_activateNextRequest(TI_HANDLE hMeasurementMgr)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-    requestHandler_t * pRequestH = (requestHandler_t *) pMeasurementMgr->hRequestH;
-    MeasurementRequest_t * pRequestArr[MAX_NUM_REQ];
-    TI_UINT8 numOfRequestsInParallel = 0;
-    TI_BOOL valid;
-    TI_UINT8 index;
-
-	/* Keep note of the time we started processing the request. this will be used */
-    /* to give the measurementSRV a time frame to perform the measurement operation */
-    pMeasurementMgr->currentRequestStartTime = os_timeStampMs(pMeasurementMgr->hOs);
-
-    TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Timer started at %d, we have 20ms to begin measurement...\n", pMeasurementMgr->currentRequestStartTime);
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Looking for a valid request\n");
-
-    do
-    {
-        TI_STATUS status;
-
-        if (numOfRequestsInParallel != 0)
-        {
-            TRACE4(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Changing activeRequestID from %d to %d, and numOfWaitingRequests from %d to %d.\n", pRequestH->activeRequestID, pRequestH->activeRequestID + numOfRequestsInParallel, pRequestH->numOfWaitingRequests, pRequestH->numOfWaitingRequests - numOfRequestsInParallel);
-        }
-
-        pRequestH->activeRequestID += numOfRequestsInParallel;
-        pRequestH->numOfWaitingRequests -= numOfRequestsInParallel;
-
-        for (index = 0; index < MAX_NUM_REQ; index++)
-        {
-            pRequestArr[index] = NULL;
-        }
-        numOfRequestsInParallel = 0;
-
-        /* Getting the next request/requests from the request handler */
-        status = requestHandler_getNextReq(pMeasurementMgr->hRequestH, TI_FALSE, pRequestArr, 
-                                           &numOfRequestsInParallel);
-        
-        /* Checking if there are no waiting requests */
-        if (status != TI_OK)
-        {
-            TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": There are no waiting requests in the queue\n");
-
-            return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-                               MEASUREMENTMGR_EVENT_SEND_REPORT, pMeasurementMgr);
-        }
-
-        /* Checking validity of request/s */
-        valid = measurementMgr_isRequestValid(pMeasurementMgr, pRequestArr, 
-                                numOfRequestsInParallel);
-
-        /* Checking if the current request is Beacon Table */
-        if( (numOfRequestsInParallel == 1) && 
-            (pRequestArr[0]->Type == MSR_TYPE_BEACON_MEASUREMENT) &&
-            (pRequestArr[0]->ScanMode == MSR_SCAN_MODE_BEACON_TABLE) )
-        {
-            TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Received Beacon Table request, building a report for it and continuing\n");
-
-            pMeasurementMgr->buildReport(hMeasurementMgr, *(pRequestArr[0]), NULL);
-            valid = TI_FALSE; /* In order to get the next request/s*/
-        }
-        
-    } while (valid == TI_FALSE);
-    
-    
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Request(s) for activation:\n");
-
-    for (index = 0; index < numOfRequestsInParallel; index++)
-    {
-        TRACE6(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": \n\nRequest #%d:\n Type: %d\n Measured Channel: %d (Serving Channel: %d)\n Scan Mode: %d\n Duration: %d\n\n", index+1, pRequestArr[index]->Type, pRequestArr[index]->channelNumber, pMeasurementMgr->servingChannelID, pRequestArr[index]->ScanMode, pRequestArr[index]->DurationTime);
-    }
-
-    /* Ignore requests if traffic intensity is high */
-    if (measurementMgr_isTrafficIntensityHigherThanThreshold(pMeasurementMgr) == TI_TRUE)
-    {
-        TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Traffic intensity too high, giving up...\n");
-
-        measurementMgr_rejectPendingRequests(pMeasurementMgr, MSR_REJECT_TRAFFIC_INTENSITY_TOO_HIGH);
-
-        return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-                               MEASUREMENTMGR_EVENT_SEND_REPORT, pMeasurementMgr);
-    }
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Request is Valid, about to start\n");
-    
-    pMeasurementMgr->measuredChannelID = pRequestArr[0]->channelNumber;
-  
-    /* Request resource from the SCR */
-    return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-        MEASUREMENTMGR_EVENT_REQUEST_SCR, pMeasurementMgr);    
-}   
-
-
-
-void measurementMgr_rejectPendingRequests(TI_HANDLE hMeasurementMgr, EMeasurementRejectReason rejectReason)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-    requestHandler_t * pRequestH = (requestHandler_t *) pMeasurementMgr->hRequestH;
-    MeasurementRequest_t * pRequestArr[MAX_NUM_REQ];
-    TI_UINT8 numOfRequestsInParallel;
-
-    /* reject all pending measurement requests */
-    while (requestHandler_getNextReq(pMeasurementMgr->hRequestH, TI_TRUE, 
-                pRequestArr, &numOfRequestsInParallel) == TI_OK)
-    {
-        TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Rejecting pending request (activeRequestID = %d)...\n", pRequestH->activeRequestID);
-
-        pMeasurementMgr->buildRejectReport(pMeasurementMgr, pRequestArr,
-                numOfRequestsInParallel, rejectReason);
-
-        pRequestH->activeRequestID += numOfRequestsInParallel;
-    }
-}
-
-
-
-
-
-/********************************************************************************/
-/*                      Callback functions Implementation.                      */
-/********************************************************************************/
-
-
-/**
- * The callback called by the MeasurementSRV module when then
- * measurement operation has ended.
- * 
- * @param clientObj A handle to the Measurement Manager module.
- * @param msrReply An array of replies sent by the MeasurementSRV module,
- * where each reply contains the result of a single measurement request.
- * 
- * @date 01-Jan-2006
- */
-void measurementMgr_MeasurementCompleteCB(TI_HANDLE clientObj, TMeasurementReply * msrReply)
-{
-    measurementMgr_t    *pMeasurementMgr = (measurementMgr_t *) clientObj;
-    TI_UINT8            index;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Building reports for measurement requests\n");
-
-    /* build a report for each measurement request/reply pair */
-    for (index = 0; index < msrReply->numberOfTypes; index++)
-    {
-        pMeasurementMgr->buildReport(pMeasurementMgr, *(pMeasurementMgr->currentRequest[index]), &msrReply->msrTypes[index]);
-    }
-
-    measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-            MEASUREMENTMGR_EVENT_COMPLETE, pMeasurementMgr);
-}
-
-
-/**
- * The callback called when the SCR responds to the SCR request.
- * 
- * @param hClient A handle to the Measurement Manager module.
- * @param requestStatus The request's status
- * @param eResource The resource for which the CB is issued
- * @param pendReason The reason of a PEND status.
- * 
- * @date 01-Jan-2006
- */
-void measurementMgr_scrResponseCB(TI_HANDLE hClient, EScrClientRequestStatus requestStatus,
-                                  EScrResourceId eResource, EScePendReason pendReason )
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hClient;
-    measurementMgrSM_Events event;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": SCR callback entered\n");
-
-    /* If the SM is in a state where it waits for the CB, status of RUN */
-    /* results in the SM asking the measurementSRV to start measurement; */
-    /* otherwise we got an ABORT or a PEND reason worse than the one we */
-    /* got when calling the SCR, so the SM aborts the measurement */
-    if (pMeasurementMgr->currentState == MEASUREMENTMGR_STATE_WAITING_FOR_SCR)
-    {
-        if (requestStatus == SCR_CRS_RUN)
-        {
-            TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Received SCR status RUN, running...\n");
-
-            event = MEASUREMENTMGR_EVENT_SCR_RUN;
-        }
-        else
-        {
-            if (requestStatus == SCR_CRS_PEND)
-            {
-                TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Received SCR status PEND with reason %d, aborting...\n", pendReason);
-            }
-            else
-            {
-                TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Received SCR status ABORT/FW_RESET, aborting...\n");
-            }
-
-            event = MEASUREMENTMGR_EVENT_ABORT;
-        }
-    }
-    else
-    {   
-        /* This can only occur if FW reset occurs or when higher priority client is running. */
-
-        if (requestStatus == SCR_CRS_FW_RESET)
-        {
-            TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Received SCR status FW_RESET\n");
-
-            event = MEASUREMENTMGR_EVENT_FW_RESET;
-        }
-        else
-        {
-        TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MeasurementMgrSM current state is %d (which isn't WAITING_FOR_SCR), aborting...\n", pMeasurementMgr->currentState);
-
-        event = MEASUREMENTMGR_EVENT_ABORT;
-    }
-    }
-
-    measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-        event, pMeasurementMgr);
-}
-
-
-
-
-
-
-/**
- * The callback called by the MLME.
- * 
- * @param hMeasurementMgr A handle to the Measurement Manager module.
- * 
- * @date 01-Jan-2006
- */
-void measurementMgr_mlmeResultCB(TI_HANDLE hMeasurementMgr, TMacAddr * bssid, mlmeFrameInfo_t * frameInfo, 
-                                 TRxAttr * pRxAttr, TI_UINT8 * buffer, TI_UINT16 bufferLength)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-    TScanFrameInfo      tScanFrameInfo;
-
-	if (measurementMgrSM_measureInProgress(pMeasurementMgr) == TI_FALSE)
-	{
-		TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION , "measurementMgr_mlmeResultCB: measurement not in progress, return\n");
-		return;
-	}
-
-	
-	/* erroneous frames are notifed to the measurmenet manager to update counter 
-    (add counter sometimes in the future) Look at: scanCncn_ScanCompleteNotificationCB and
-    scanCncn_MlmeResultCB */
-    if (NULL == bssid)
-    {
-        TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION , "measurementMgr_mlmeResultCB: received an empty frame notification from MLME\n");
-        return;
-    }
-
-    if (pMeasurementMgr == NULL || pRxAttr == NULL)
-    {
-		if(pMeasurementMgr != NULL)
-		{
-			TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, ": MLME callback called with NULL object\n");
-		}
-        return;
-    }
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MLME callback entered\n");
-
-    /* build the scan frame info object */
-    tScanFrameInfo.bssId = bssid;
-    tScanFrameInfo.band = (ERadioBand)pRxAttr->band;
-    tScanFrameInfo.channel = pRxAttr->channel;
-    tScanFrameInfo.parsedIEs = frameInfo;
-    tScanFrameInfo.rate = pRxAttr->Rate;
-    tScanFrameInfo.rssi = pRxAttr->Rssi;
-    tScanFrameInfo.snr = pRxAttr->SNR;
-    tScanFrameInfo.staTSF = pRxAttr->TimeStamp;
-    tScanFrameInfo.buffer = buffer;
-    tScanFrameInfo.bufferLength = bufferLength;
-
-    /* update the driver (SME) result table */
-    sme_MeansurementScanResult (pMeasurementMgr->hSme, SCAN_CRS_RECEIVED_FRAME, &tScanFrameInfo);
-
-    TRACE8(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MLME Frame: Subtype = %d, MAC = %x-%x-%x-%x-%x-%x, RSSI = %d\n", frameInfo->subType, (*bssid)[0], (*bssid)[1], (*bssid)[2], (*bssid)[3], (*bssid)[4], (*bssid)[5], pRxAttr->Rssi);
-}
-
-
-/********************************************************************************/
-/*                      Internal functions Implementation.                      */
-/********************************************************************************/
-
-
-/**
- * Releases the module's allocated objects according to the given init vector.
- * 
- * @param pMeasurementMgr A handle to the Measurement Manager module.
- * @param initVec The init vector with a bit set for each allocated object.
- * 
- * @date 01-Jan-2006
- */
-static void measurementMgr_releaseModule (measurementMgr_t * pMeasurementMgr)
-{
-#ifdef XCC_MODULE_INCLUDED
-    TI_UINT32 currAC;
-#endif
-
-    if (pMeasurementMgr->hActivationDelayTimer)
-    {
-        tmr_DestroyTimer (pMeasurementMgr->hActivationDelayTimer);
-    }
-
-#ifdef XCC_MODULE_INCLUDED
-    for (currAC = 0; currAC < MAX_NUM_OF_AC; currAC++)
-    {
-        if (pMeasurementMgr->hTsMetricsReportTimer[currAC])
-        {
-            tmr_DestroyTimer (pMeasurementMgr->hTsMetricsReportTimer[currAC]);
-        }
-    }
-#endif
-
-    if (pMeasurementMgr->pMeasurementMgrSm)
-    {
-        fsm_Unload(pMeasurementMgr->hOs, pMeasurementMgr->pMeasurementMgrSm);
-    }
-
-    if (pMeasurementMgr->hRequestH)
-    {
-        requestHandler_destroy(pMeasurementMgr->hRequestH);
-    }
-    
-    os_memoryFree(pMeasurementMgr->hOs, pMeasurementMgr, sizeof(measurementMgr_t));
-}
-
-
-
-/**
- * Checks whether the traffic intensity, i.e. number of packets per seconds, is higher
- * than the preconfigured threshold.
- * 
- * @param pMeasurementMgr A handle to the Measurement Manager module.
- * 
- * @return True iff the traffic intensity is high
- * 
- * @date 01-Jan-2006
- */
-static TI_BOOL measurementMgr_isTrafficIntensityHigherThanThreshold(measurementMgr_t * pMeasurementMgr)
-{
-    TI_BOOL trafficIntensityHigh = TI_FALSE;
-    int pcksPerSec;
-
-    pcksPerSec = TrafficMonitor_GetFrameBandwidth(pMeasurementMgr->hTrafficMonitor);
-
-    TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": pcksPerSec = %d\n", pcksPerSec);
-    
-    if (pcksPerSec >= pMeasurementMgr->trafficIntensityThreshold)
-        trafficIntensityHigh = TI_TRUE;
-    
-    return trafficIntensityHigh;
-}
-
-
-
-
-/**
- * Checks whether the given measurement request is valid.
- * 
- * @param hMeasurementMgr A handle to the Measurement Manager module.
- * @param pRequestArr The measurement request.
- * @param numOfRequest Number of type requests
- * 
- * @return True iff the request is valid
- * 
- * @date 01-Jan-2006
- */
-static TI_BOOL  measurementMgr_isRequestValid(TI_HANDLE hMeasurementMgr, MeasurementRequest_t *pRequestArr[],
-                           TI_UINT8 numOfRequest)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-    TI_UINT8 requestIndex;
-    paramInfo_t param;
-
-    /* Checking validity of the measured channel number */
-    param.content.channel = pRequestArr[0]->channelNumber;
-    param.paramType = REGULATORY_DOMAIN_IS_CHANNEL_SUPPORTED;
-    regulatoryDomain_getParam(pMeasurementMgr->hRegulatoryDomain, &param);
-    if ( !param.content.bIsChannelSupprted  )
-    {
-        TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Request rejected due to invalid channel\n");
-
-        if (pMeasurementMgr->currentFrameType == MSR_FRAME_TYPE_UNICAST)
-            pMeasurementMgr->buildRejectReport(pMeasurementMgr, pRequestArr, numOfRequest, 
-                                    MSR_REJECT_INVALID_CHANNEL);
-
-        return TI_FALSE;
-    }
-    else
-    {
-        TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Request channel is Valid\n");
-    }
-    
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Starting to check each request:\n");
-
-    /* Check Validity of each request */
-    for (requestIndex = 0; requestIndex < numOfRequest; requestIndex++)
-    {
-        TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Checking request #%d:\n", requestIndex+1);
-
-        /* Checking validity of the Request Type */
-        if (pMeasurementMgr->isTypeValid(hMeasurementMgr, pRequestArr[requestIndex]->Type, 
-                pRequestArr[requestIndex]->ScanMode) == TI_FALSE)
-        {
-            TRACE2(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Request rejected due to invalid measurement type of request #%d (type = %d)\n", requestIndex+1, pRequestArr[requestIndex]->Type);
-            
-            if(pMeasurementMgr->currentFrameType == MSR_FRAME_TYPE_UNICAST)
-                pMeasurementMgr->buildRejectReport(pMeasurementMgr, pRequestArr, numOfRequest, 
-                                        MSR_REJECT_INVALID_MEASUREMENT_TYPE);
-
-            return TI_FALSE;
-        }
-        else
-        {
-            TRACE2(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Measurement type of request #%d is supported (type = %d)\n", requestIndex+1, pRequestArr[requestIndex]->Type);
-        }
-
-        /* For measurement types different than Beacon Table */
-        if ((pRequestArr[requestIndex]->Type != MSR_TYPE_BEACON_MEASUREMENT) || 
-            (pRequestArr[requestIndex]->ScanMode != MSR_SCAN_MODE_BEACON_TABLE))
-        {
-            /* Checking Measurement request's duration only when request is on a non-serving channel */
-            if (pMeasurementMgr->servingChannelID != pRequestArr[requestIndex]->channelNumber)
-            {
-                TI_UINT8 dtimPeriod;
-                TI_UINT32 beaconInterval;
-                TI_UINT32 dtimDuration;
-
-
-                /* Checking duration doesn't exceed given max duration */
-                if (pRequestArr[requestIndex]->DurationTime > pMeasurementMgr->maxDurationOnNonServingChannel)
-                {
-                    TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Request #%d rejected because duration exceeds maximum duration\n", requestIndex+1);
-
-                    TRACE2(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Duration = %d, MaxDurationOnNonServingChannel = %d\n", pRequestArr[requestIndex]->DurationTime, pMeasurementMgr->maxDurationOnNonServingChannel);
-                
-                    if (pMeasurementMgr->currentFrameType == MSR_FRAME_TYPE_UNICAST)
-                        pMeasurementMgr->buildRejectReport(pMeasurementMgr, pRequestArr, numOfRequest, 
-                                MSR_REJECT_DURATION_EXCEED_MAX_DURATION);
-                
-                    return TI_FALSE;
-                }
-                else
-                {
-                    TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Duration of request #%d doesn't exceed max duration\n", requestIndex+1);
-                }
-
-
-                /* Checking DTIM */
-
-                /* Getting the DTIM count */
-                param.paramType = SITE_MGR_DTIM_PERIOD_PARAM;
-                siteMgr_getParam(pMeasurementMgr->hSiteMgr, &param);
-                dtimPeriod = param.content.siteMgrDtimPeriod;
-
-                /* Getting the beacon Interval */
-                param.paramType = SITE_MGR_BEACON_INTERVAL_PARAM;
-                siteMgr_getParam(pMeasurementMgr->hSiteMgr, &param);
-                beaconInterval = param.content.beaconInterval;
-
-                dtimDuration = beaconInterval * MEASUREMENT_BEACON_INTERVAL_IN_MICRO_SEC/MEASUREMENT_MSEC_IN_MICRO*dtimPeriod;
-                if (pRequestArr[requestIndex]->DurationTime > dtimDuration)
-                {
-                    TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_WARNING, ": Request rejected due to DTIM overlap of request #%d\n", requestIndex+1);
-                                    
-                    TRACE2(pMeasurementMgr->hReport, REPORT_SEVERITY_WARNING, ": Duration = %d, DTIM Duration = %d\n", pRequestArr[requestIndex]->DurationTime, dtimDuration);
-        
-                    if (pMeasurementMgr->currentFrameType == MSR_FRAME_TYPE_UNICAST)
-                        pMeasurementMgr->buildRejectReport(pMeasurementMgr, pRequestArr, numOfRequest, 
-                                                MSR_REJECT_DTIM_OVERLAP);
-
-                    return TI_FALSE;
-                }
-                else
-                {
-                    TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": DTIM of request #%d doesn't overlap\n", requestIndex+1);
-                }
-            }
-        }
-    }
-
-    return TI_TRUE;
-}
-
-static TI_BOOL measurementMgrSM_measureInProgress(TI_HANDLE hMeasurementMgr)
-{
-	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *)hMeasurementMgr;
-
-	if (pMeasurementMgr->currentState == MEASUREMENTMGR_STATE_MEASURING)
-		return TI_TRUE;
-
-	else
-		return TI_FALSE;
-}
-
-
diff --git a/wl1271/stad/src/AirLink_Managment/measurementMgr.h b/wl1271/stad/src/AirLink_Managment/measurementMgr.h
deleted file mode 100644
index ec6659a..0000000
--- a/wl1271/stad/src/AirLink_Managment/measurementMgr.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * measurementMgr.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   measurementMgr.h                                           */
-/*    PURPOSE:  measurement Manager module header file                     */
-/*                                                                         */
-/***************************************************************************/
-
-
-
-
-#ifndef __MEASUREMENTMGR_H__
-#define __MEASUREMENTMGR_H__
-
-
-#include "report.h"
-#include "timer.h"
-#include "paramOut.h"
-#include "requestHandler.h"
-#include "measurementMgrSM.h"
-#ifdef XCC_MODULE_INCLUDED
- #include "XCCRMMngrParam.h"
-#endif
-
-
-/* Functions Pointers Definitions */
-typedef TI_STATUS (*parserFrameReq_t)   (TI_HANDLE hMeasurementMgr, 
-                                         TI_UINT8 *pData, TI_INT32 dataLen,
-                                         TMeasurementFrameRequest *frameReq);
-
-typedef TI_BOOL (*isTypeValid_t)        (TI_HANDLE hMeasurementMgr, 
-                                         EMeasurementType type, 
-                                         EMeasurementScanMode scanMode);
-
-typedef TI_STATUS (*buildRejectReport_t) (TI_HANDLE hMeasurementMgr,
-                                          MeasurementRequest_t *pRequestArr[],
-                                          TI_UINT8  numOfRequestsInParallel,
-                                          EMeasurementRejectReason rejectReason);
-
-typedef TI_STATUS (*buildReport_t)      (TI_HANDLE hMeasurementMgr,
-                                         MeasurementRequest_t request,
-                                         TMeasurementTypeReply * reply);
-
-typedef TI_STATUS (*sendReportAndCleanObj_t)(TI_HANDLE hMeasurementMgr);
-
-
-
-typedef struct 
-{
-
-    /* Timers */
-    void *                      hActivationDelayTimer;
-
-
-    /* Methods */
-    parserFrameReq_t            parserFrameReq;
-    isTypeValid_t               isTypeValid;
-    buildRejectReport_t         buildRejectReport;
-    buildReport_t               buildReport;
-    sendReportAndCleanObj_t     sendReportAndCleanObj;
-
-
-    /* Data */
-    TI_BOOL                     Enabled;
-    TI_BOOL                     Connected;
-
-    TI_UINT8                    servingChannelID;
-    TI_UINT8                    measuredChannelID;
-
-    EMeasurementMode            Mode;   
-    TI_UINT8                    Capabilities;
-    TI_BOOL                     isModuleRegistered;
-
-    TI_UINT16                   trafficIntensityThreshold;
-    TI_UINT16                   maxDurationOnNonServingChannel;
-
-    TI_BOOL                     bMeasurementScanExecuted; /* flag indicating if measurment scan was 
-                                                      executed by AP after the last connection */
-
-    /* State Machine Params */
-    fsm_stateMachine_t *        pMeasurementMgrSm;
-    measurementMgrSM_States     currentState;
-
-    
-    /* Report Frame Params */
-#ifdef XCC_MODULE_INCLUDED
-    RM_report_frame_t           XCCFrameReport;
-#endif
-    MeasurementReportFrame_t    dot11hFrameReport;
-    TI_UINT16                   nextEmptySpaceInReport;
-    TI_UINT16                   frameLength;
-
-
-    /* Request Frame Params */
-    MeasurementRequest_t *      currentRequest[MAX_NUM_REQ];
-    TI_UINT8                    currentNumOfRequestsInParallel;
-    EMeasurementFrameType       currentFrameType;
-    TI_UINT32                   currentRequestStartTime;
-    TMeasurementFrameRequest    newFrameRequest;
-
-
-    /* XCC Traffic Stream Metrics measurement parameters */
-    TI_HANDLE                   hTsMetricsReportTimer[MAX_NUM_OF_AC];
-    TI_BOOL                     isTsMetricsEnabled[MAX_NUM_OF_AC];
-
-    /* Handles to other modules */
-    TI_HANDLE                   hRequestH;
-    TI_HANDLE                   hRegulatoryDomain;
-    TI_HANDLE                   hXCCMngr;
-    TI_HANDLE                   hSiteMgr;
-    TI_HANDLE                   hTWD;
-    TI_HANDLE                   hMlme;
-    TI_HANDLE                   hTrafficMonitor;
-    TI_HANDLE                   hReport;
-    TI_HANDLE                   hOs;
-    TI_HANDLE                   hScr;
-    TI_HANDLE                   hApConn;
-    TI_HANDLE                   hTxCtrl;
-    TI_HANDLE                   hTimer;
-    TI_HANDLE                   hSme;
-} measurementMgr_t;
-
-
-
-
-TI_STATUS measurementMgr_activateNextRequest(TI_HANDLE pContext);
-
-
-
-
-#endif /* __MEASUREMENTMGR_H__*/
-
diff --git a/wl1271/stad/src/AirLink_Managment/measurementMgrApi.h b/wl1271/stad/src/AirLink_Managment/measurementMgrApi.h
deleted file mode 100644
index 05fce45..0000000
--- a/wl1271/stad/src/AirLink_Managment/measurementMgrApi.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * measurementMgrApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   measurementMgrApi.h                                        */
-/*    PURPOSE:  Measurement Manager module interface header file           */
-/*                                                                         */
-/***************************************************************************/
-
-
-
-
-
-#ifndef __MEASUREMENTMGR_API_H__
-#define __MEASUREMENTMGR_API_H__
-
-
-#include "scrApi.h"
-#include "mlmeApi.h"
-#include "DrvMainModules.h"
-
-
-typedef enum
-{
-    MEASUREMENT_TRAFFIC_THRESHOLD_PARAM = 0x01,
-    MEASUREMENT_GET_STATUS_PARAM        = 0x02
-
-} EMeasurementParam;
-
-
-TI_HANDLE measurementMgr_create(TI_HANDLE hOs);
-
-void      measurementMgr_init (TStadHandlesList *pStadHandles);
-
-TI_STATUS measurementMgr_SetDefaults (TI_HANDLE hMeasurementMgr, measurementInitParams_t * pMeasurementInitParams);
-
-TI_STATUS measurementMgr_destroy(TI_HANDLE hMeasurementMgr);
-
-TI_STATUS measurementMgr_setParam(TI_HANDLE hMeasurementMgr, paramInfo_t * pParam);
-
-TI_STATUS measurementMgr_getParam(TI_HANDLE hMeasurementMgr, paramInfo_t * pParam);
-
-TI_STATUS measurementMgr_connected(TI_HANDLE hMeasurementMgr);
-
-TI_STATUS measurementMgr_disconnected(TI_HANDLE hMeasurementMgr);
-
-TI_STATUS measurementMgr_enable(TI_HANDLE hMeasurementMgr);
-
-TI_STATUS measurementMgr_disable(TI_HANDLE hMeasurementMgr);
-
-TI_STATUS measurementMgr_setMeasurementMode(TI_HANDLE hMeasurementMgr, TI_UINT16 capabilities, 
-                                            TI_UINT8 * pIeBuffer, TI_UINT16 length);
-
-TI_STATUS measurementMgr_receiveFrameRequest(TI_HANDLE hMeasurementMgr, EMeasurementFrameType frameType,
-                                            TI_INT32 dataLen, TI_UINT8 * pData);
-
-void measurementMgr_rejectPendingRequests(TI_HANDLE hMeasurementMgr, EMeasurementRejectReason rejectReason);
-
-void measurementMgr_MeasurementCompleteCB(TI_HANDLE clientObj, TMeasurementReply * msrReply);
-
-void measurementMgr_scrResponseCB(TI_HANDLE hClient, EScrClientRequestStatus requestStatus,
-                                  EScrResourceId eResource, EScePendReason pendReason);
-
-void measurementMgr_mlmeResultCB(TI_HANDLE hMeasurementMgr, TMacAddr * bssid, mlmeFrameInfo_t * frameInfo, 
-                                 TRxAttr * pRxAttr, TI_UINT8 * buffer, TI_UINT16 bufferLength);
-
-
-#endif  /* __MEASUREMENTMGR_API_H__ */
diff --git a/wl1271/stad/src/AirLink_Managment/measurementMgrSM.c b/wl1271/stad/src/AirLink_Managment/measurementMgrSM.c
deleted file mode 100644
index 22c8dc2..0000000
--- a/wl1271/stad/src/AirLink_Managment/measurementMgrSM.c
+++ /dev/null
@@ -1,1203 +0,0 @@
-/*
- * measurementMgrSM.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/**************************************************************************/
-/*																		  */
-/*		MODULE:		measurementMgrSM.c									  */
-/*		PURPOSE:	Measurement Manager State Machine module interface.   */
-/*																		  */
-/**************************************************************************/
-
-
-
-#define __FILE_ID__  FILE_ID_2
-#include "measurementMgrSM.h"
-#include "measurementMgr.h"
-#include "802_11Defs.h"
-#ifdef XCC_MODULE_INCLUDED
- #include "XCCMngr.h"
- #include "XCCRMMngr.h"
-#endif
-#include "spectrumMngmntMgr.h"
-#include "siteMgrApi.h"
-#include "MacServices_api.h"
-#include "regulatoryDomainApi.h"
-#include "TWDriver.h"
-#include "timer.h"
-#include "sme.h"
-
-
-char * measurementMgr_stateDesc[MEASUREMENTMGR_NUM_STATES] =
-{  
-	"STATE_IDLE",
-    "STATE_PROCESSING_REQUEST",
-    "STATE_WAITING_FOR_SCR",
-    "STATE_MEASURING"
-};
-
-	
-char * measurementMgr_eventDesc[MEASUREMENTMGR_NUM_EVENTS] =
-{
-	"EVENT_CONNECTED",
-	"EVENT_DISCONNECTED",
-	"EVENT_ENABLE",
-	"EVENT_DISABLE",
-    "EVENT_FRAME_RECV",
-    "EVENT_SEND_REPORT",
-	"EVENT_REQUEST_SCR",
-    "EVENT_SCR_WAIT",
-    "EVENT_SCR_RUN",
-    "EVENT_ABORT",
-    "EVENT_COMPLETE",
-    "EVENT_FW_RESET"
-};
-
-
-
-
-/********************************************************************************/
-/*						MeasurementMgr SM Action Prototypes						*/
-/********************************************************************************/
-
-static TI_STATUS measurementMgrSM_acUnexpected(void * pData);
-
-static TI_STATUS measurementMgrSM_acNop(void * pData);
-
-
-static TI_STATUS measurementMgrSM_acConnected(void * pData);
-
-static TI_STATUS measurementMgrSM_acDisconnected_fromIdle(void * pData);
-
-static TI_STATUS measurementMgrSM_acEnable(void * pData);
-
-static TI_STATUS measurementMgrSM_acDisable_fromIdle(void * pData);
-
-static TI_STATUS measurementMgrSM_acFrameReceived_fromIdle(void * pData);
-
-static TI_STATUS measurementMgrSM_acSendReportAndCleanObj(void * pData);
-
-
-static TI_STATUS measurementMgrSM_acDisconnected_fromProcessingRequest(void * pData);
-
-static TI_STATUS measurementMgrSM_acDisable_fromProcessingRequest(void * pData);
-
-static TI_STATUS measurementMgrSM_acFrameReceived_fromProcessingRequest(void * pData);
-
-static TI_STATUS measurementMgrSM_acAbort_fromProcessingRequest(void * pData);
-
-static TI_STATUS measurementMgrSM_acRequestSCR(void * pData);
-
-
-static TI_STATUS measurementMgrSM_acDisconnected_fromWaitForSCR(void * pData);
-
-static TI_STATUS measurementMgrSM_acDisable_fromWaitForSCR(void * pData);
-
-static TI_STATUS measurementMgrSM_acFrameReceived_fromWaitForSCR(void * pData);
-
-static TI_STATUS measurementMgrSM_acAbort_fromWaitForSCR(void * pData);
-
-static TI_STATUS measurementMgrSM_acStartMeasurement(void * pData);
-
-
-static TI_STATUS measurementMgrSM_acDisconnected_fromMeasuring(void * pData);
-
-static TI_STATUS measurementMgrSM_acDisable_fromMeasuring(void * pData);
-
-static TI_STATUS measurementMgrSM_acFrameReceived_fromMeasuring(void * pData);
-
-static TI_STATUS measurementMgrSM_acAbort_fromMeasuring(void * pData);
-
-static TI_STATUS measurementMgrSM_acMeasurementComplete(void * pData);
-
-static TI_STATUS measurementMgrSM_acFirmwareReset(void * pData);
-
-
-
-
-
-
-
-
-/********************************************************************************/
-/*						Internal Functions Prototypes							*/
-/********************************************************************************/
-
-static void measurementMgrSM_resetParams(measurementMgr_t * pMeasurementMgr);
-
-static void	measurementMgrSM_uponActivationDelayTimeout (TI_HANDLE hMeasurementMgr, TI_BOOL bTwdInitOccured);
-
-
-
-
-
-
-
-/********************************************************************************/
-/*						MeasurementMgr SM General Use Functions					*/
-/********************************************************************************/
-
-
-/**
- * Configures the Measurement Manager State Machine.
- * 
- * @param hMeasurementMgr A handle to the Measurement Manager module.
- * 
- * @date 01-Jan-2006
- */
-TI_STATUS measurementMgrSM_config(TI_HANDLE hMeasurementMgr)
-{
-	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-    TI_STATUS status;
-
-    /* MeasurementMgr State Machine matrix */
-	fsm_actionCell_t measurementMgr_matrix[MEASUREMENTMGR_NUM_STATES][MEASUREMENTMGR_NUM_EVENTS] =
-	{
-		/* next state and actions for STATE_IDLE state */    
-		{
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acConnected},				/* CONNECTED         */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acDisconnected_fromIdle},	/* DISCONNECTED      */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acEnable},					/* ENABLE            */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acDisable_fromIdle},		/* DISABLE           */
-			{MEASUREMENTMGR_STATE_PROCESSING_REQUEST, measurementMgrSM_acFrameReceived_fromIdle},	/* FRAME_RECV        */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acSendReportAndCleanObj},	/* SEND_REPORT       */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acUnexpected},				/* REQUEST_SCR       */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acUnexpected},				/* SCR_WAIT          */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acUnexpected},				/* SCR_RUN           */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acUnexpected},				/* ABORT             */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acUnexpected},				/* COMPLETE          */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acUnexpected}				/* FW_RESET          */
-		},
-
-		/* next state and actions for STATE_PROCESSING_REQUEST state */    
-		{
-			{MEASUREMENTMGR_STATE_PROCESSING_REQUEST, measurementMgrSM_acUnexpected},			/* CONNECTED         */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acDisconnected_fromProcessingRequest},	/* DISCONNECTED      */
-			{MEASUREMENTMGR_STATE_PROCESSING_REQUEST, measurementMgrSM_acNop},					/* ENABLE            */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acDisable_fromProcessingRequest},		/* DISABLE           */
-			{MEASUREMENTMGR_STATE_PROCESSING_REQUEST, measurementMgrSM_acFrameReceived_fromProcessingRequest},	/* FRAME_RECV        */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acSendReportAndCleanObj},				/* SEND_REPORT       */
-			{MEASUREMENTMGR_STATE_WAITING_FOR_SCR, measurementMgrSM_acRequestSCR},				/* REQUEST_SCR       */
-			{MEASUREMENTMGR_STATE_PROCESSING_REQUEST, measurementMgrSM_acUnexpected},			/* SCR_WAIT          */
-			{MEASUREMENTMGR_STATE_PROCESSING_REQUEST, measurementMgrSM_acUnexpected},			/* SCR_RUN           */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acAbort_fromProcessingRequest},		/* ABORT             */
-			{MEASUREMENTMGR_STATE_PROCESSING_REQUEST, measurementMgrSM_acUnexpected},			/* COMPLETE          */
-			{MEASUREMENTMGR_STATE_PROCESSING_REQUEST, measurementMgrSM_acUnexpected}			/* FW_RESET          */
-		},
-
-		/* next state and actions for STATE_WAITING_FOR_SCR state */    
-		{
-			{MEASUREMENTMGR_STATE_WAITING_FOR_SCR, measurementMgrSM_acUnexpected},						/* CONNECTED         */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acDisconnected_fromWaitForSCR},				/* DISCONNECTED      */
-			{MEASUREMENTMGR_STATE_WAITING_FOR_SCR, measurementMgrSM_acNop},								/* ENABLE            */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acDisable_fromWaitForSCR},						/* DISABLE           */
-			{MEASUREMENTMGR_STATE_PROCESSING_REQUEST, measurementMgrSM_acFrameReceived_fromWaitForSCR},	/* FRAME_RECV        */
-			{MEASUREMENTMGR_STATE_WAITING_FOR_SCR, measurementMgrSM_acUnexpected},						/* SEND_REPORT       */
-			{MEASUREMENTMGR_STATE_WAITING_FOR_SCR, measurementMgrSM_acUnexpected},						/* REQUEST_SCR       */
-			{MEASUREMENTMGR_STATE_WAITING_FOR_SCR, measurementMgrSM_acNop},								/* SCR_WAIT          */
-			{MEASUREMENTMGR_STATE_MEASURING, measurementMgrSM_acStartMeasurement},						/* SCR_RUN           */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acAbort_fromWaitForSCR},						/* ABORT             */
-			{MEASUREMENTMGR_STATE_WAITING_FOR_SCR, measurementMgrSM_acUnexpected},						/* COMPLETE          */
-			{MEASUREMENTMGR_STATE_WAITING_FOR_SCR, measurementMgrSM_acUnexpected}						/* FW_RESET          */
-		},
-
-		/* next state and actions for STATE_MEASURING state */    
-		{
-			{MEASUREMENTMGR_STATE_MEASURING, measurementMgrSM_acUnexpected},					/* CONNECTED         */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acDisconnected_fromMeasuring},			/* DISCONNECTED      */
-			{MEASUREMENTMGR_STATE_MEASURING, measurementMgrSM_acNop},							/* ENABLE            */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acDisable_fromMeasuring},				/* DISABLE           */
-			{MEASUREMENTMGR_STATE_PROCESSING_REQUEST, measurementMgrSM_acFrameReceived_fromMeasuring},	/* FRAME_RECV        */
-			{MEASUREMENTMGR_STATE_MEASURING, measurementMgrSM_acUnexpected},					/* SEND_REPORT       */
-			{MEASUREMENTMGR_STATE_MEASURING, measurementMgrSM_acUnexpected},					/* REQUEST_SCR       */
-			{MEASUREMENTMGR_STATE_MEASURING, measurementMgrSM_acUnexpected},					/* SCR_WAIT          */
-			{MEASUREMENTMGR_STATE_MEASURING, measurementMgrSM_acUnexpected},					/* SCR_RUN           */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acAbort_fromMeasuring},				/* ABORT             */
-			{MEASUREMENTMGR_STATE_PROCESSING_REQUEST, measurementMgrSM_acMeasurementComplete},	/* COMPLETE          */
-			{MEASUREMENTMGR_STATE_IDLE, measurementMgrSM_acFirmwareReset}						/* FW_RESET          */
-		}
-
-	};
-
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Configured MeasurementMgr state machine\n");
-	
-	status = fsm_Config(pMeasurementMgr->pMeasurementMgrSm, 
-						&measurementMgr_matrix[0][0], 
-						MEASUREMENTMGR_NUM_STATES, 
-						MEASUREMENTMGR_NUM_EVENTS, 
-						measurementMgrSM_event, pMeasurementMgr->hOs);
-
-	return status;
-}
-
-
-
-/**
- * Raises a State Machine event in the Measurement Manager SM.
- * 
- * @param currentState A point to the member holding the SM's current state.
- * @param event The event we want to raise.
- * @param hMeasurementMgr A handle to the Measurement Manager module.
- * 
- * @date 05-Jan-2006
- */
-TI_STATUS measurementMgrSM_event(TI_UINT8 * currentState, TI_UINT8 event, TI_HANDLE hMeasurementMgr)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
-	TI_STATUS status;
-	TI_UINT8 nextState;
-
-	status = fsm_GetNextState(pMeasurementMgr->pMeasurementMgrSm, 
-								*currentState, event, &nextState);
-
-	if (status != TI_OK)
-	{
-		TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": State machine error, failed getting next state\n");
-
-		return(TI_NOK);
-	}
-
-	TRACE3(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, "measurementMgrSM_event: <currentState = %d, event = %d> --> nextState = %d\n", currentState, event, nextState);
-
-	status = fsm_Event(pMeasurementMgr->pMeasurementMgrSm, currentState, event, (void *) pMeasurementMgr);
-
-	return status;
-}
-
-
-
-
-
-
-
-/********************************************************************************/
-/*					MeasurementMgr SM Action Functions							*/
-/********************************************************************************/
-
-
-/********************************************************************************/
-/*                            IDLE State Actions                                */
-/********************************************************************************/
-
-/**
- * Performs the required action when the Measurement Manager module has
- * been advised that the station has connected to an AP.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acConnected(void * pData)
-{
-	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-	paramInfo_t param;
-
-#ifdef XCC_MODULE_INCLUDED
-	iappParsingRegistrationTable_t iappParsingRegistration;
-#endif
-
-	/* do nothing if we're already in connected mode */
-	if (pMeasurementMgr->Connected)
-	{
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Connected flag already set\n");
-
-		return TI_OK;
-	}
-
-	pMeasurementMgr->Connected = TI_TRUE;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Connected flag has been set\n");
-
-    /* upon connection to a new AP set the measurment scan flag to FALSE */
-    pMeasurementMgr->bMeasurementScanExecuted = TI_FALSE;
-
-	/* get the current serving channel */
-	param.paramType = SITE_MGR_CURRENT_CHANNEL_PARAM;
-	siteMgr_getParam(pMeasurementMgr->hSiteMgr, &param);
-	pMeasurementMgr->servingChannelID = param.content.siteMgrCurrentChannel;
-	    
-#ifdef XCC_MODULE_INCLUDED
-	if(pMeasurementMgr->Mode == MSR_MODE_XCC)
-	{
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MeasurementMgr set to XCC mode\n");
-
-        if(pMeasurementMgr->isModuleRegistered == TI_FALSE)
-        {
-            /* Registering to the XCCMngr */
-            iappParsingRegistration.handler = pMeasurementMgr;
-            iappParsingRegistration.iappParsingRegistrationProcedure = measurementMgr_XCCParse;
-
-            if (XCCMngr_registerForRecvIappPacket(pMeasurementMgr->hXCCMngr,
-				iappParsingRegistration, IAPP_RADIO_MEASUREMENT) != TI_OK)
-            {
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_WARNING, ": Could not register to receive IAPP packets\n");
-
-                return TI_NOK;
-            }
-
-            pMeasurementMgr->isModuleRegistered = TI_TRUE;
-        }
-        
-        pMeasurementMgr->parserFrameReq = measurementMgr_XCCParseFrameReq;
-        pMeasurementMgr->isTypeValid = measurementMgr_XCCIsTypeValid;
-		pMeasurementMgr->buildReport = measurementMgr_XCCBuildReport;
-		pMeasurementMgr->buildRejectReport = measurementMgr_XCCBuildRejectReport;
-		pMeasurementMgr->sendReportAndCleanObj = measurementMgr_XCCSendReportAndCleanObject;
-        requestHandler_setRequestParserFunction(pMeasurementMgr->hRequestH, 
-                                                measurementMgr_XCCParseRequestIEHdr);
-	}
-	else
-#endif
-	{
-		if(pMeasurementMgr->Mode == MSR_MODE_SPECTRUM_MANAGEMENT)
-		{
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": MeasurementMgr set to Spectrum Management mode\n");
-
-            /* NOTE: These 5 functions need to be corrected to fit the 802.11h standered */
-            pMeasurementMgr->parserFrameReq = measurementMgr_dot11hParseFrameReq;
-            pMeasurementMgr->isTypeValid = measurementMgr_dot11hIsTypeValid;
-			pMeasurementMgr->buildReport = measurementMgr_dot11hBuildReport;
-			pMeasurementMgr->buildRejectReport = measurementMgr_dot11hBuildRejectReport;
-			pMeasurementMgr->sendReportAndCleanObj = measurementMgr_dot11hSendReportAndCleanObject;
-            requestHandler_setRequestParserFunction(pMeasurementMgr->hRequestH, 
-                                                    measurementMgr_dot11hParseRequestIEHdr);
-
-		}
-	}
-
-	return TI_OK;
-}
-
-
-
-/**
- * Called when the Measurement Manager has been advised that the station
- * has disconnected from the AP.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acDisconnected_fromIdle(void * pData)
-{
-	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Connected flag unset\n");
-
-	pMeasurementMgr->Connected = TI_FALSE;
-
-	return TI_OK;
-}
-
-
-
-/**
- * Called when the Measurement Manager is enabled.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acEnable(void * pData)
-{
-	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Measurement Manager has been enabled\n");
-
-	pMeasurementMgr->Enabled = TI_TRUE;
-
-	return TI_OK;
-}
-
-
-
-/**
- * Called when the Measurement Manager is disabled.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acDisable_fromIdle(void * pData)
-{
-	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Measurement Manager has been disabled\n");
-
-	pMeasurementMgr->Enabled = TI_FALSE;
-
-	return TI_OK;
-}
-
-
-
-/**
- * Called when the SM is in an idle state and we receive a new measurement frame.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acFrameReceived_fromIdle(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-    TI_UINT16 activationDelay;
-    TI_STATUS status;
-    paramInfo_t param;
-    TI_UINT16 tbtt;
-
-	/* handle frame request only if we're connected and measurement is enabled */
-	if (pMeasurementMgr->Connected == TI_FALSE ||
-		pMeasurementMgr->Enabled == TI_FALSE)
-	{
-        TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, ": Frame received while SM is in disconnected/disabled state\n");
-
-        return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-                               MEASUREMENTMGR_EVENT_ABORT, pMeasurementMgr);
-	}
-
-	/* Setting the frame Type */
-	pMeasurementMgr->currentFrameType = pMeasurementMgr->newFrameRequest.frameType;
-
-TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Frame Type = %d\n", pMeasurementMgr->currentFrameType);
-
-    /* Getting the Beacon Interval from the Site Mgr */
-    param.paramType = SITE_MGR_BEACON_INTERVAL_PARAM;
-    status = siteMgr_getParam(pMeasurementMgr->hSiteMgr, &param);
-    if (status != TI_OK)
-    {
-        TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, ": Failed to retrieve beacon interval - not connected?\n");
-
-        return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-                               MEASUREMENTMGR_EVENT_ABORT, pMeasurementMgr);
-    }
-
-	/* converting beacon interval to msec */
-    tbtt = (param.content.beaconInterval * 1024) / 1000;	/* from TU to msec */   
-
-	/* Initializing Activation Delay Time */
-	activationDelay	= pMeasurementMgr->newFrameRequest.hdr->activatioDelay;
-	activationDelay	*= tbtt;    
-    /* Adding the Measurement Offset to the activation delay */
-	activationDelay	+= pMeasurementMgr->newFrameRequest.hdr->measurementOffset;
-
-    /* Inserting all received measurement requests into the queue */
-	status = requestHandler_insertRequests(pMeasurementMgr->hRequestH, 
-                                           pMeasurementMgr->Mode, 
-								           pMeasurementMgr->newFrameRequest);
-
-    /* Clean New Frame Params */
-    os_memoryZero(pMeasurementMgr->hOs, &pMeasurementMgr->newFrameRequest, 
-                      sizeof(TMeasurementFrameRequest));
-
-    if (status != TI_OK)
-    {
-        pMeasurementMgr->currentFrameType = MSR_FRAME_TYPE_NO_ACTIVE;
-
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, ": Could not insert request into the queue\n");
-
-        return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-                               MEASUREMENTMGR_EVENT_ABORT, pMeasurementMgr);
-    }
-
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": New frame has been inserted into the queue\n");
-
-	/* If frame type isn't Unicast add to Activation Delay a random delay */
-	if ((pMeasurementMgr->currentFrameType != MSR_FRAME_TYPE_UNICAST) && (activationDelay > 0))
-	{
-		activationDelay	+= ((os_timeStampMs(pMeasurementMgr->hOs) % MSR_ACTIVATION_DELAY_RANDOM)
-								+ MSR_ACTIVATION_DELAY_OFFSET);
-	}
-
-    TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Activation Delay in ms = %d\n", activationDelay);
-
-	if (activationDelay > 0)
-	{
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Going to wait for activation delay timer callback\n");
-
-		/* Starting the Activation Delay Timer */
-        tmr_StartTimer (pMeasurementMgr->hActivationDelayTimer,
-                        measurementMgrSM_uponActivationDelayTimeout,
-                        (TI_HANDLE)pMeasurementMgr,
-                        activationDelay,
-                        TI_FALSE);
-
-		return TI_OK;
-	}
-	else
-	{
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Activating the next request immediately without waiting for callback\n");
-
-		/* Calling to schedule the first waiting request */
-		return measurementMgr_activateNextRequest(pData);
-	}
-}
-
-
-
-
-
-/********************************************************************************/
-/*                      PROCESSING_REQUEST State Actions                        */
-/********************************************************************************/
-
-/**
- * Called when the station disconnects from the AP while processing
- * a measurement request.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acDisconnected_fromProcessingRequest(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    /* Stopping the activationDelay Timer */
-    tmr_StopTimer (pMeasurementMgr->hActivationDelayTimer);
-
-    /* Clear Measurement fields */
-    measurementMgrSM_resetParams(pMeasurementMgr);
-           	
-	pMeasurementMgr->Connected = TI_FALSE;
-
-	return TI_OK;
-}
-
-
-
-/**
- * Called when the Measurement Manager module has been disable while
- * processing a measurement request.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acDisable_fromProcessingRequest(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    /* Stopping the activationDelay Timer */
-    tmr_StopTimer (pMeasurementMgr->hActivationDelayTimer);
-
-    /* Clear Measurement fields  */
-    measurementMgrSM_resetParams(pMeasurementMgr);
-
-	pMeasurementMgr->Enabled = TI_FALSE;
-
-    return TI_OK;
-}
-
-
-
-/**
- * Called when a frame has been received while we are processing another frame.
- * In this case the older frame is discarded and the new frame is processed.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acFrameReceived_fromProcessingRequest(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    /* Stopping the activationDelay Timer */
-    tmr_StopTimer (pMeasurementMgr->hActivationDelayTimer);
-
-    /* Clear Measurement fields */
-    measurementMgrSM_resetParams(pMeasurementMgr);
-           	
-	/* Process New Frame */
-	return measurementMgrSM_acFrameReceived_fromIdle(pData);
-}
-
-
-
-/**
- * Sends measurement reports to the AP and cleans up the module.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acSendReportAndCleanObj(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Sending pending reports and cleaning up...\n");
-
-    return pMeasurementMgr->sendReportAndCleanObj(pData);
-}
-
-
-
-/**
- * Called when for some reason we abort while processing a request.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acAbort_fromProcessingRequest(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Entered\n");
-
-    /* Stopping the activationDelay Timer */
-    tmr_StopTimer (pMeasurementMgr->hActivationDelayTimer);
-
-    /* Clear Measurement fields */
-    measurementMgrSM_resetParams(pMeasurementMgr);
-    
-    return TI_OK;
-}
-
-
-
-/**
- * Called when we finished processing a request and want to request the SCR.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acRequestSCR(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-    EScrClientRequestStatus scrStatus;
-    EScePendReason scrPendReason;
-
-	/* Request the channel */
-    scrStatus = scr_clientRequest(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, 
-                                  SCR_RESOURCE_SERVING_CHANNEL, &scrPendReason);
-	
-    if (scrStatus == SCR_CRS_RUN)
-    {	
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Received RUN response from SCR\n");
-
-		/* The channel is allocated for the measurement */
-        return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-				MEASUREMENTMGR_EVENT_SCR_RUN, pMeasurementMgr);    
-    }
-    else if ((scrStatus == SCR_CRS_PEND) && (scrPendReason == SCR_PR_DIFFERENT_GROUP_RUNNING))
-    {	
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Received PEND/DIFFGROUP response from SCR\n");
-
-		/* No need to wait for the channel allocation */
-        return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-				MEASUREMENTMGR_EVENT_ABORT, pMeasurementMgr);  
-    }
-
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Going to wait for SCR callback...\n");
-
-	/* In all other cases wait for the callback function to be called */
-    return TI_OK;
-}
-
-
-
-
-
-/********************************************************************************/
-/*                        WAIT_FOR_SCR State Actions                            */
-/********************************************************************************/
-
-
-/**
- * Called if the station disconnects from the AP while waiting for a
- * response from the SCR.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acDisconnected_fromWaitForSCR(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);
-
-    /* Release the SCR */
-    scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);
-
-    /* Clear Measurement fields */
-    measurementMgrSM_resetParams(pMeasurementMgr);
-
-	pMeasurementMgr->Connected = TI_FALSE;
-
-    return TI_OK;
-}
-
-
-
-/**
- * Called if the Measurement Manager module is disabled while we are
- * waiting for a response from the SCR.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acDisable_fromWaitForSCR(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);
-
-    /* Release the SCR */
-    scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);
-
-    /* Clear Measurement fields */
-    measurementMgrSM_resetParams(pMeasurementMgr);
-
-	pMeasurementMgr->Enabled = TI_FALSE;
-
-    return TI_OK;
-}
-
-
-
-/**
- * Called if a frame is received after we requested the SCR for another frame. 
- * In this case the older frame is discarded and the new frame is processed.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acFrameReceived_fromWaitForSCR(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);
-
-    /* Release the SCR */
-    scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);
-
-    /* Clear Measurement fields */
-    measurementMgrSM_resetParams(pMeasurementMgr);
-
-	/* Process New Frame */
-    return measurementMgrSM_acFrameReceived_fromIdle(pData);
-}
-
-
-
-/**
- * Called if the SCR callbacked with a response other than RUN.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acAbort_fromWaitForSCR(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);
-
-    /* Release the SCR */
-    scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);
-
-	/* Build a reject report */
-	measurementMgr_rejectPendingRequests(pMeasurementMgr, MSR_REJECT_SCR_UNAVAILABLE);
-
-	/* Clear Measurement fields */
-    pMeasurementMgr->sendReportAndCleanObj(pMeasurementMgr);
-
-    return TI_OK;
-}
-
-
-
-/**
- * Called when the SCR callbacks with a RUN response or if the SCR
- * returned a RUN response when we requested it.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acStartMeasurement(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-	/* Cryptic: the first struct is the requestHandler request while */
-	/* the second one is the measurementSRV request */
-    MeasurementRequest_t * pRequestArr[MAX_NUM_REQ];
-	TMeasurementRequest request;
-    paramInfo_t	*pParam;
-    TI_UINT8 numOfRequestsInParallel;
-    TI_UINT8 requestIndex;
-	TI_UINT32 timePassed;
-	TI_BOOL requestedBeaconMeasurement= TI_FALSE;
-	TI_STATUS status;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Starting Measurement operation\n");
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pMeasurementMgr->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-	request.channel = pMeasurementMgr->measuredChannelID;
-	request.startTime = 0;	/* ignored by MeasurementSRV for now - for .11k */
-	request.numberOfTypes = 0;
-
-    TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Measured Channel = %d\n", pMeasurementMgr->measuredChannelID);
-
-	pParam->paramType = REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES;
-	pParam->content.channelCapabilityReq.channelNum = pMeasurementMgr->measuredChannelID;
-	pParam->content.channelCapabilityReq.scanOption = ACTIVE_SCANNING;
-
-	if (pMeasurementMgr->measuredChannelID <= MAX_CHANNEL_IN_BAND_2_4)
-	{
-		request.band = RADIO_BAND_2_4_GHZ;
-		pParam->content.channelCapabilityReq.band = RADIO_BAND_2_4_GHZ;
-	}
-	else
-	{
-		request.band = RADIO_BAND_5_0_GHZ;
-		pParam->content.channelCapabilityReq.band = RADIO_BAND_5_0_GHZ;
-	}
-
-	regulatoryDomain_getParam(pMeasurementMgr->hRegulatoryDomain, pParam);
-	
-    request.txPowerDbm = pParam->content.channelCapabilityRet.maxTxPowerDbm;
-
-    request.eTag = SCAN_RESULT_TAG_MEASUREMENT;
-    os_memoryFree(pMeasurementMgr->hOs, pParam, sizeof(paramInfo_t));
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Querying Request Handler for the next request in the queue\n");
-
-    /* Getting the next request/requests from the request handler */
-    status = requestHandler_getNextReq(pMeasurementMgr->hRequestH, TI_TRUE, pRequestArr,
-        &numOfRequestsInParallel);
-
-	if (status != TI_OK)
-	{	
-        TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, ": Failed getting next request from Request Handler\n");
-        return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-				MEASUREMENTMGR_EVENT_COMPLETE, pMeasurementMgr);  
-	}
-	
-	/* Save the number of requests in parallel so that once the */
-	/* measurement operation ends we can get rid of this amount of requests */
-	/* from the requestHandler */
-	pMeasurementMgr->currentNumOfRequestsInParallel = numOfRequestsInParallel;
-
-	for (requestIndex = 0; requestIndex < numOfRequestsInParallel; requestIndex++)
-	{
-        if (pRequestArr[requestIndex]->Type == MSR_TYPE_BEACON_MEASUREMENT)
-        {
-			requestedBeaconMeasurement = TI_TRUE;
-
-			if (pRequestArr[requestIndex]->ScanMode == MSR_SCAN_MODE_BEACON_TABLE)
-			{
-                TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Beacon Table request encountered, building report now\n");
-
-				/* building Report for beacon table request */
-				pMeasurementMgr->buildReport(pMeasurementMgr, *pRequestArr[requestIndex], NULL);
-
-				continue;
-			}
-        }
-
-        /* save the request so we can reference it when results arrive */
-        pMeasurementMgr->currentRequest[request.numberOfTypes] = pRequestArr[requestIndex];
-
-        /* add the measurement type to the request's list */
-		request.msrTypes[request.numberOfTypes].duration = pRequestArr[requestIndex]->DurationTime;
-		request.msrTypes[request.numberOfTypes].scanMode = pRequestArr[requestIndex]->ScanMode;
-		request.msrTypes[request.numberOfTypes].msrType = pRequestArr[requestIndex]->Type;
-
-        TRACE3(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ":\n\nMeasurement Request #%d Details: Type = %d, Duration = %d\n\n",						request.numberOfTypes+1,						request.msrTypes[request.numberOfTypes].msrType,						request.msrTypes[request.numberOfTypes].duration);
-
-		request.numberOfTypes++;
-	}
-
-	if (requestedBeaconMeasurement == TI_TRUE)
-	{
-        /* build a probe request template and send it to the HAL */
-        TSetTemplate templateStruct;
-		probeReqTemplate_t probeReqTemplate;
-		TSsid broadcastSSID;
-
- 		templateStruct.ptr = (TI_UINT8 *) &probeReqTemplate;
-		templateStruct.type = PROBE_REQUEST_TEMPLATE;
-        templateStruct.eBand = request.band;
-        templateStruct.uRateMask = RATE_MASK_UNSPECIFIED;
-		broadcastSSID.len = 0;
-
-        TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Sending probe request template...\n");
-
-        buildProbeReqTemplate( pMeasurementMgr->hSiteMgr, &templateStruct, &broadcastSSID, request.band );
-#ifdef XCC_MODULE_INCLUDED
-  		{	/* Insert Radio Mngt Capability IE according XCC4*/
-  			TI_UINT32				len = 0;
-  			measurementMgr_radioMngtCapabilityBuild (pMeasurementMgr, 
-                                                     templateStruct.ptr + templateStruct.len, 
-                                                     (TI_UINT8*)&len);
-  			templateStruct.len += len;
-  		}
-#endif
-
-		TWD_CmdTemplate (pMeasurementMgr->hTWD, &templateStruct, NULL, NULL);
-	}
-
-	/* Check if the maximum time to wait for the measurement request to */
-	/* finish has already passed */
-	timePassed = os_timeStampMs(pMeasurementMgr->hOs) - pMeasurementMgr->currentRequestStartTime;
-	if (timePassed > MSR_START_MAX_DELAY)
-	{
-        TRACE2(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Maximum delay to perform measurement operation has passed (%d / %d)\n",						MSR_START_MAX_DELAY, (os_timeStampMs(pMeasurementMgr->hOs) - pMeasurementMgr->currentRequestStartTime));
-
-		pMeasurementMgr->buildRejectReport(pMeasurementMgr, pRequestArr, numOfRequestsInParallel, MSR_REJECT_MAX_DELAY_PASSED);
-        return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
-				MEASUREMENTMGR_EVENT_COMPLETE, pMeasurementMgr);  
-	}
-
-    /* set the measurement scan executed flag to TRUE */
-    pMeasurementMgr->bMeasurementScanExecuted = TI_TRUE;
-
-	/* Yalla, start measuring */
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Finished preparing request. Handing over to MeasurementSRV...\n");
-
-	TWD_StartMeasurement (pMeasurementMgr->hTWD,
-                               &request, 
-                               MSR_START_MAX_DELAY - timePassed,
-                               NULL, NULL,
-                               measurementMgr_MeasurementCompleteCB, 
-                               pMeasurementMgr);
-	return TI_OK;
-}
-
-
-
-
-
-
-/********************************************************************************/
-/*                          MEASURING State Actions                             */
-/********************************************************************************/
-
-
-static TI_STATUS measurementMgrSM_acDisconnected_fromMeasuring(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);
-
-    /* release the SCR */
-    scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);
-
-    /* Clear Measurement fields */
-    measurementMgrSM_resetParams(pMeasurementMgr);
-		
-	pMeasurementMgr->Connected = TI_FALSE;
-
-	return TI_OK;
-}
-
-
-
-static TI_STATUS measurementMgrSM_acDisable_fromMeasuring(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);
-
-    /* release the SCR */
-    scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);
-
-    /* Clear Measurement fields */
-    measurementMgrSM_resetParams(pMeasurementMgr);
-		
-	pMeasurementMgr->Enabled = TI_FALSE;
-
-    return TI_OK;    
-}
-
-
-
-static TI_STATUS measurementMgrSM_acFrameReceived_fromMeasuring(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);
-
-    /* release the SCR */
-    scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);
-
-    /* Clear Measurement fields */
-    measurementMgrSM_resetParams(pMeasurementMgr);
-           	
-	/* Process New Frame */
-	return measurementMgrSM_acFrameReceived_fromIdle(pData);
-}
-
-
-
-static TI_STATUS measurementMgrSM_acAbort_fromMeasuring(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);
-
-    /* release the SCR */
-    scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);
-
-    /* Clear Measurement fields */
-    measurementMgrSM_resetParams(pMeasurementMgr);
-		
-    TWD_StopMeasurement (pMeasurementMgr->hTWD, TI_TRUE ,NULL, NULL);
-    
-    return TI_OK;
-}
-
-
-
-/**
- * Called when we finished a measurement request.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acMeasurementComplete(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-	requestHandler_t * pRequestH = (requestHandler_t *) pMeasurementMgr->hRequestH;
-
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Completing measurement operation and resuming normal behavior\n");
-
-	/* advance the activeRequestID variable to get rid of the */
-	/* measurement requests we've already executed */
-TRACE2(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Increasing activeRequestID from %d to %d.\n", pRequestH->activeRequestID, pRequestH->activeRequestID + pMeasurementMgr->currentNumOfRequestsInParallel);
-
-	pRequestH->activeRequestID += pMeasurementMgr->currentNumOfRequestsInParallel;
-
-    setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);
-
-    /* move the driver result table to stable state and clear it */
-    sme_MeansurementScanResult (pMeasurementMgr->hSme, SCAN_CRS_SCAN_COMPLETE_OK, NULL);
-
-    /* release the SCR */
-    scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);
-
-	/* Process New Frame */
-	return measurementMgr_activateNextRequest(pData);
-}
-
-
-
-/**
- * Called when a firmware reset has been detected.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acFirmwareReset(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Firmware Reset!!\n");
-
-    setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);
-
-    /* release the SCR */
-    scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);
-
-    /* Clear Measurement fields */
-    measurementMgrSM_resetParams(pMeasurementMgr);
-	
-    return TI_OK;
-}
-
-
-
-
-
-
-
-/********************************************************************************/
-/*						Miscellaneous State Actions								*/
-/********************************************************************************/
-
-/**
- * Called when an unexpected event has been triggered.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acUnexpected(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Entered when state is \n");
-
-	return TI_OK;
-}
-
-/**
- * A do nothing action.
- * 
- * @date 05-Jan-2006
- */
-static TI_STATUS measurementMgrSM_acNop(void * pData)
-{
-    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
-
-    TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Entered when state is \n");
-
-	return TI_OK;
-}
-
-
-
-
-
-
-
-
-/********************************************************************************/
-/*						Internal Functions Prototypes							*/
-/********************************************************************************/
-
-
-static void measurementMgrSM_resetParams(measurementMgr_t *pMeasurementMgr)
-{  
-	/* clear the waiting requests */
-	requestHandler_clearRequests(pMeasurementMgr->hRequestH);	
-
-	/* clearing reports data base */
-#ifdef XCC_MODULE_INCLUDED
-	os_memoryZero(pMeasurementMgr->hOs,&(pMeasurementMgr->XCCFrameReport),
-			sizeof(RM_report_frame_t));
-#endif
-    os_memoryZero(pMeasurementMgr->hOs,&(pMeasurementMgr->dot11hFrameReport),
-			sizeof(MeasurementReportFrame_t));
-
-	pMeasurementMgr->frameLength = 0;
-	pMeasurementMgr->nextEmptySpaceInReport = 0;
-	pMeasurementMgr->measuredChannelID = 0;
-	pMeasurementMgr->currentFrameType = MSR_FRAME_TYPE_NO_ACTIVE;
-}
-
-
-
-/**
- * The callback called when the activation delay timer has ended.
- * 
- * @param hMeasurementMgr - A handle to the Measurement Manager module.
- * @param bTwdInitOccured -   Indicates if TWDriver recovery occured since timer started 
- * 
- * @date 01-Jan-2006
- */
-static void	measurementMgrSM_uponActivationDelayTimeout (TI_HANDLE hMeasurementMgr, TI_BOOL bTwdInitOccured)
-{
-	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *)hMeasurementMgr;
-
-TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Activation delay timeout callback entered\n");
-
-    measurementMgr_activateNextRequest (pMeasurementMgr);
-}
-
diff --git a/wl1271/stad/src/AirLink_Managment/measurementMgrSM.h b/wl1271/stad/src/AirLink_Managment/measurementMgrSM.h
deleted file mode 100644
index 9700902..0000000
--- a/wl1271/stad/src/AirLink_Managment/measurementMgrSM.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * measurementMgrSM.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*	  MODULE:	measurementMgrSM.h										   */
-/*    PURPOSE:	measurement Manager module State Machine header file       */
-/*																		   */
-/***************************************************************************/
-
-#ifndef __MEASUREMENTMGRSM_H__
-#define __MEASUREMENTMGRSM_H__
-
-#include "fsm.h"
-
-
-
-/** State machine states */
-typedef enum 
-{
-	MEASUREMENTMGR_STATE_IDLE					= 0,
-    MEASUREMENTMGR_STATE_PROCESSING_REQUEST		= 1,
-    MEASUREMENTMGR_STATE_WAITING_FOR_SCR		= 2,
-    MEASUREMENTMGR_STATE_MEASURING				= 3,
-	MEASUREMENTMGR_STATE_LAST					= 4
-} measurementMgrSM_States;
-
-
-/** State machine events */
-typedef enum 
-{
-	MEASUREMENTMGR_EVENT_CONNECTED				= 0,
-	MEASUREMENTMGR_EVENT_DISCONNECTED			= 1,
-	MEASUREMENTMGR_EVENT_ENABLE					= 2,
-	MEASUREMENTMGR_EVENT_DISABLE				= 3,
-    MEASUREMENTMGR_EVENT_FRAME_RECV				= 4,
-    MEASUREMENTMGR_EVENT_SEND_REPORT			= 5,
-	MEASUREMENTMGR_EVENT_REQUEST_SCR			= 6,
-    MEASUREMENTMGR_EVENT_SCR_WAIT				= 7,
-    MEASUREMENTMGR_EVENT_SCR_RUN				= 8,
-    MEASUREMENTMGR_EVENT_ABORT					= 9,
-    MEASUREMENTMGR_EVENT_COMPLETE				= 10,
-    MEASUREMENTMGR_EVENT_FW_RESET				= 11,
-	MEASUREMENTMGR_EVENT_LAST					= 12
-} measurementMgrSM_Events;
-
-
-#define MEASUREMENTMGR_NUM_STATES		MEASUREMENTMGR_STATE_LAST	 
-#define MEASUREMENTMGR_NUM_EVENTS		MEASUREMENTMGR_EVENT_LAST	
-
-
-
-
-TI_STATUS measurementMgrSM_config(TI_HANDLE hMeasurementMgr);
-
-TI_STATUS measurementMgrSM_event(TI_UINT8 * currentState, TI_UINT8 event, TI_HANDLE hMeasurementMgr);
-
-
-#endif /* __MEASUREMENTMGRSM_H__*/
diff --git a/wl1271/stad/src/AirLink_Managment/regulatoryDomain.c b/wl1271/stad/src/AirLink_Managment/regulatoryDomain.c
deleted file mode 100644
index 1714593..0000000
--- a/wl1271/stad/src/AirLink_Managment/regulatoryDomain.c
+++ /dev/null
@@ -1,1559 +0,0 @@
-/*
- * regulatoryDomain.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file regulatoryDomain.c
- *  \brief regulatoryDomain module interface
- *
- *  \see regulatoryDomain.h
- */
-
-/************************************************************************************************/
-/*  												*/
-/*		MODULE:		regulatoryDomain.c					        */
-/*		PURPOSE:	regulatoryDomain module interface.			        */
-/*                  This module calculated the channel that should be scanned and that are      */
-/*                   supported. Moreover, he set the transmit power level according to the      */
-/*                   regulatory domain requirements and the supported channel.                  */
-/*								 			        */
-/************************************************************************************************/
-#define __FILE_ID__  FILE_ID_3
-#include "report.h"
-#include "osApi.h"
-#include "paramOut.h"
-#include "regulatoryDomain.h"
-#include "regulatoryDomainApi.h"
-#include "TWDriver.h"
-#include "siteMgrApi.h"
-#include "SwitchChannelApi.h"
-#include "DrvMainModules.h"
-#include "TWDriver.h"
-
-
-/* Mask for retrieving the TxPower from the Scan Control Table */
-#define MASK_TX_POWER					(0x1f) /* bits 0-4 indicates MaxTxPower */ 
-#define MASK_ACTIVE_ALLOWED 			(0x40) /* bit 6 indiactes the channel is allowed for Active scan */
-#define MASK_FREQ_ALLOWED 				(0x80) /* bit 7 indicates the cahnnel is allowed*/
-
-#define CHANNEL_VALIDITY_TS_THRESHOLD   10000 /* 10 sec */
-
-/* 
-* Small macro to convert Dbm units into Dbm/10 units. This macro is important
-* in order to avoid over-flow of Dbm units bigger than 25
-*/
-#define DBM2DBMDIV10(uTxPower) \
-	((uTxPower) > (MAX_TX_POWER / DBM_TO_TX_POWER_FACTOR) ? \
-		MAX_TX_POWER : (uTxPower) * DBM_TO_TX_POWER_FACTOR)		
-
-
-/********************************************************************************/
-/*						Internal functions prototypes.							*/
-/********************************************************************************/
-static TI_STATUS regulatoryDomain_updateCurrTxPower(regulatoryDomain_t	*pRegulatoryDomain);
-
-static void regulatoryDomain_setChannelValidity(regulatoryDomain_t *pRegulatoryDomain, 
-												TI_UINT16 channelNum, TI_BOOL channelValidity);
-
-static TI_STATUS setSupportedChannelsAccording2CountryIe(regulatoryDomain_t *pRegulatoryDomain, TCountry*	pCountry, TI_BOOL band_2_4);
-
-static void setSupportedChannelsAccording2ScanControlTable(regulatoryDomain_t  *pRegulatoryDomain);
-
-static TI_STATUS regulatoryDomain_getChannelCapability(regulatoryDomain_t *pRegulatoryDomain, 
-													   channelCapabilityReq_t channelCapabilityReq, 
-													   channelCapabilityRet_t *channelCapabilityRet);
-
-static void regulatoryDomain_updateChannelsTs(regulatoryDomain_t *pRegulatoryDomain, TI_UINT8 channel);
-
-static void regulatoryDomain_buildDefaultListOfChannelsPerBand(regulatoryDomain_t *pRegulatoryDomain, ERadioBand band, TI_UINT8 *listSize);
-
-static void regulatoryDomain_checkCountryCodeExpiry(regulatoryDomain_t *pRegulatoryDomain);
-
-static TI_BOOL regulatoryDomain_isChannelSupprted(regulatoryDomain_t *pRegulatoryDomain, TI_UINT8 channel);
-
-static TI_BOOL regulatoryDomain_isCountryFound(regulatoryDomain_t *pRegulatoryDomain, ERadioBand radioBand);
-
-static void regulatoryDomain_getPowerTableMinMax (regulatoryDomain_t *pRegulatoryDomain,
-                                                  powerCapability_t  *pPowerCapability);
-
-static TI_UINT8 regulatoryDomain_getMaxPowerAllowed(regulatoryDomain_t	*pRegulatoryDomain,
-												 TI_UINT8				uChannel,
-												 ERadioBand		eBand,
-												 TI_BOOL				bServingChannel);
-
-/********************************************************************************/
-/*						Interface functions Implementation.						*/
-/********************************************************************************/
-
-
-/************************************************************************
- *                        regulatoryDomain_create									*
- ************************************************************************
-DESCRIPTION: regulatoryDomain module creation function, called by the config mgr in creation phase 
-				performs the following:
-				-	Allocate the regulatoryDomain handle
-				                                                                                                   
-INPUT:      hOs -			Handle to OS		
-
-
-OUTPUT:		
-
-RETURN:     Handle to the regulatoryDomain module on success, NULL otherwise
-
-************************************************************************/
-TI_HANDLE regulatoryDomain_create(TI_HANDLE hOs)
-{
-	regulatoryDomain_t			*pRegulatoryDomain = NULL;
-	
-	/* allocating the regulatoryDomain object */
-	pRegulatoryDomain = os_memoryAlloc(hOs,sizeof(regulatoryDomain_t));
-
-	if (pRegulatoryDomain == NULL)
-		return NULL;
-
-	return(pRegulatoryDomain);
-}
-
-
-/************************************************************************
- *                        regulatoryDomain_init							*
- ************************************************************************
-DESCRIPTION: Module init function, Called by the DrvMain in init phase
-				performs the following:
-				-	Reset & initializes local variables
-				-	Init the handles to be used by the module
-                                                                                                   
-INPUT:      pStadHandles - List of handles to be used by the module
-
-OUTPUT:		
-
-RETURN:     void
-************************************************************************/
-void regulatoryDomain_init (TStadHandlesList *pStadHandles)
-{
-	regulatoryDomain_t *pRegulatoryDomain = (regulatoryDomain_t *)(pStadHandles->hRegulatoryDomain);
-
-	/* init variables */
-	pRegulatoryDomain->country_2_4_WasFound		= TI_FALSE;
-	pRegulatoryDomain->country_5_WasFound		= TI_FALSE;
-	pRegulatoryDomain->uExternTxPowerPreferred	= MAX_TX_POWER;	/* i.e. no restriction */
-	pRegulatoryDomain->uPowerConstraint			= MIN_TX_POWER;	/* i.e. no restriction */
-	 
-	/* Init handlers */
-	pRegulatoryDomain->hSiteMgr       = pStadHandles->hSiteMgr;
-	pRegulatoryDomain->hTWD	          = pStadHandles->hTWD;
-	pRegulatoryDomain->hReport	      = pStadHandles->hReport;
-	pRegulatoryDomain->hOs	          = pStadHandles->hOs;
-    pRegulatoryDomain->hSwitchChannel = pStadHandles->hSwitchChannel;
-}
-
-
-/************************************************************************
- *                        regulatoryDomain_SetDefaults						*
- ************************************************************************
-DESCRIPTION: regulatoryDomain module configuration function, called by the config mgr in configuration phase
-				performs the following:
-				-	Reset & initializes local variables
-				-	Init the handles to be used by the module
-                                                                                                   
-INPUT:      hRegulatoryDomain	-	regulatoryDomain handle
-			List of handles to be used by the module
-			pRegulatoryDomainInitParams	-	Init table of the module.		
-
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS regulatoryDomain_SetDefaults (TI_HANDLE 	hRegulatoryDomain,
-                                        regulatoryDomainInitParams_t *pRegulatoryDomainInitParams)
-{
-	regulatoryDomain_t *pRegulatoryDomain = (regulatoryDomain_t *)hRegulatoryDomain;
-
-	/* User max Tx power for all channels */
-	pRegulatoryDomain->uUserMaxTxPower	  = pRegulatoryDomainInitParams->desiredTxPower; 
-	/* Temporary Tx Power control to be used */
-    pRegulatoryDomain->uTemporaryTxPower  = pRegulatoryDomainInitParams->uTemporaryTxPower;
-    pRegulatoryDomain->uDesiredTemporaryTxPower = pRegulatoryDomainInitParams->uTemporaryTxPower;
-
-    /* 
-	 * Indicate the time in which the STA didn't receive any country code and was not connected, and therefore
-     * will delete its current country code 
-	 */
-    pRegulatoryDomain->uTimeOutToResetCountryMs = pRegulatoryDomainInitParams->uTimeOutToResetCountryMs;
-	pRegulatoryDomain->uLastCountryReceivedTS = 0;
-
-	pRegulatoryDomain->regulatoryDomainEnabled = pRegulatoryDomainInitParams->multiRegulatoryDomainEnabled;
-	pRegulatoryDomain->spectrumManagementEnabled = pRegulatoryDomainInitParams->spectrumManagementEnabled;
-	if (pRegulatoryDomain->spectrumManagementEnabled == TI_TRUE)
-	{
-		pRegulatoryDomain->regulatoryDomainEnabled = TI_TRUE;
-	}
-		
-	/* Getting the desired Control Table contents for 2.4 Ghz*/
-	os_memoryCopy(pRegulatoryDomain->hOs,
-				  (void *)pRegulatoryDomain->scanControlTable.ScanControlTable24.tableString,
-				  (void *)pRegulatoryDomainInitParams->desiredScanControlTable.ScanControlTable24.tableString,
-					NUM_OF_CHANNELS_24 * sizeof(TI_INT8));
-
-	/* Getting the desired Control Table contents for 5 Ghz*/
-	os_memoryCopy(pRegulatoryDomain->hOs,
-				  (void *)pRegulatoryDomain->scanControlTable.ScanControlTable5.tableString,
-				  (void *)pRegulatoryDomainInitParams->desiredScanControlTable.ScanControlTable5.tableString,
-					A_5G_BAND_NUM_CHANNELS * sizeof(TI_INT8));
-
-	setSupportedChannelsAccording2ScanControlTable(pRegulatoryDomain);
-
-    pRegulatoryDomain->minDFS_channelNum = A_5G_BAND_MIN_MIDDLE_BAND_DFS_CHANNEL;
-    pRegulatoryDomain->maxDFS_channelNum = A_5G_BAND_MAX_UPPER_BAND_DFS_CHANNEL;
-
-TRACE0(pRegulatoryDomain->hReport, REPORT_SEVERITY_INIT, ".....Regulatory domain configured successfully\n");
-
-	return TI_OK;
-}
-
-TI_STATUS regulatoryDomain_setParam(TI_HANDLE hRegulatoryDomain,
-									paramInfo_t	*pParam)
-{
-	regulatoryDomain_t *pRegulatoryDomain = (regulatoryDomain_t *)hRegulatoryDomain;
-    
-			
-	switch(pParam->paramType)
-	{
-    case REGULATORY_DOMAIN_COUNTRY_PARAM:
-        {
-            TI_BOOL        bBand_2_4;
-
-            /* Sanity check */
-            if (NULL == pParam->content.pCountry)
-            {   
-                TRACE0(pRegulatoryDomain->hReport, REPORT_SEVERITY_ERROR, "regulatoryDomain_setParam, REGULATORY_DOMAIN_COUNTRY_PARAM is set with NULL pointer");
-
-                return TI_NOK;
-            }
-            else /* Update country code and supported channels */
-            {         
-                bBand_2_4 = siteMgr_isCurrentBand24(pRegulatoryDomain->hSiteMgr);
-
-			    /* Setting the CountryIE for every Band */
-			    setSupportedChannelsAccording2CountryIe(pRegulatoryDomain, pParam->content.pCountry, bBand_2_4);
-            }
-        }
-		break;
-
-	case REGULATORY_DOMAIN_SET_POWER_CONSTRAINT_PARAM:
-
-        /* Update only if 11h enabled */
-        if (pRegulatoryDomain->spectrumManagementEnabled)
-		{	
-            /* Convert to RegDomain units */
-            TI_UINT8 uNewPowerConstraint = DBM2DBMDIV10(pParam->content.powerConstraint);
-
-TRACE2(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "SET_POWER_CONSTRAINT Old= %d New = %d (Only if bigger...)\n", 							  pRegulatoryDomain->uPowerConstraint, uNewPowerConstraint);
-
-			/* Update powerConstraint */
-			if ( pRegulatoryDomain->uPowerConstraint != uNewPowerConstraint )
-			{
-				pRegulatoryDomain->uPowerConstraint = uNewPowerConstraint;
-				/* Set new Tx power to TWD - only if needed ! */
-				regulatoryDomain_updateCurrTxPower(pRegulatoryDomain);
-			}
-        }
-		break;	
-		
-	case REGULATORY_DOMAIN_EXTERN_TX_POWER_PREFERRED:
-		/* ExternTxPowerPreferred is the TX Power Control (TPC) */
-		{
-			/* Convert to RegDomain units */
-			TI_UINT8 uNewTPC = DBM2DBMDIV10(pParam->content.ExternTxPowerPreferred);
-
-TRACE2(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "REGULATORY_DOMAIN_EXTERN_TX_POWER_PREFERRED Old= %d New = %d\n", 				pRegulatoryDomain->uExternTxPowerPreferred, uNewTPC);
-
-			if ( uNewTPC != pRegulatoryDomain->uExternTxPowerPreferred )
-			{
-				pRegulatoryDomain->uExternTxPowerPreferred = uNewTPC;
-				/* Set new Tx power to TWD - only if needed ! */
-				regulatoryDomain_updateCurrTxPower(pRegulatoryDomain);
-			}
-		}
-		break;	
-	
-	case REGULATORY_DOMAIN_SET_CHANNEL_VALIDITY:
-		/* Set channel as Valid or Invalid for Active SCAN only.
-			Mainly used by DFS when Switch Channel is active */
-		regulatoryDomain_setChannelValidity(pRegulatoryDomain, pParam->content.channelValidity.channelNum, 
-															   pParam->content.channelValidity.channelValidity);
-		break;
-	
-	case REGULATORY_DOMAIN_CURRENT_TX_POWER_IN_DBM_PARAM:
-		/* This case is called when the desired Tx Power Level in Dbm is changed by the user */
-        if(pRegulatoryDomain->uUserMaxTxPower != pParam->content.desiredTxPower)
-        {
-            pRegulatoryDomain->uUserMaxTxPower = pParam->content.desiredTxPower;			
-			/* Set new Tx power to TWD - only if needed ! */
-			regulatoryDomain_updateCurrTxPower(pRegulatoryDomain);
-        }
-
-		break;
-
-	case REGULATORY_DOMAIN_TX_POWER_AFTER_SELECTION_PARAM:
-		/* Called after joining BSS, set Tx power to TWD */
-
-        TRACE0(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_setParam, REGULATORY_DOMAIN_TX_POWER_AFTER_SELECTION_PARAM \n");
-
-	   /* setting the Tx Power according to the selected channel */
-        regulatoryDomain_updateCurrTxPower(pRegulatoryDomain);
-        
-		break;
-
-    case REGULATORY_DOMAIN_DISCONNECT_PARAM:
-        TRACE0(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_setParam, REGULATORY_DOMAIN_DISCONNECT_PARAM\n");
-
-        pRegulatoryDomain->uExternTxPowerPreferred = MAX_TX_POWER;	/* i.e. no restriction */
-        pRegulatoryDomain->uPowerConstraint		   = MIN_TX_POWER;	/* i.e. no restriction */
-
-        /* Update the last time a country code was used. 
-        After uTimeOutToResetCountryMs the country code will be deleted     */
-        if (pRegulatoryDomain->country_2_4_WasFound || pRegulatoryDomain->country_5_WasFound)
-        {
-            pRegulatoryDomain->uLastCountryReceivedTS = os_timeStampMs(pRegulatoryDomain->hOs);
-        }
-        break;
-
-	case REGULATORY_DOMAIN_UPDATE_CHANNEL_VALIDITY:
-		regulatoryDomain_updateChannelsTs(pRegulatoryDomain, pParam->content.channel);
-		break;
-
-    case REGULATORY_DOMAIN_TEMPORARY_TX_ATTENUATION_PARAM:
-		/* Temporary Tx Power control */
-TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_setParam: temporary fix = %d, \n", pParam->content.bActivateTempPowerFix);
-
-        pRegulatoryDomain->bTemporaryTxPowerEnable = pParam->content.bActivateTempPowerFix;
-
-			regulatoryDomain_updateCurrTxPower(pRegulatoryDomain);
-
-        break;
-
-    case REGULATORY_DOMAIN_ENABLE_DISABLE_802_11D:
-        TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_setParam, REGULATORY_DOMAIN_ENABLE_DISABLE_802_11D = %d, \n", pParam->content.enableDisable_802_11d);
-
-        if ((pRegulatoryDomain->regulatoryDomainEnabled != pParam->content.enableDisable_802_11d) &&
-            !pParam->content.enableDisable_802_11d && pRegulatoryDomain->spectrumManagementEnabled)
-        {   /* Disable of 802_11d, is not allowed when 802_11h is enabled */
-            TRACE0(pRegulatoryDomain->hReport, REPORT_SEVERITY_ERROR, "regulatoryDomain_setParam, Disable of 802_11d, is not allowed when 802_11h is enabled  \n");
-            return TI_NOK;
-            
-        }
-        pRegulatoryDomain->regulatoryDomainEnabled = pParam->content.enableDisable_802_11d;
-
-		/* Mark that no country was found - applies for both enabling and disabling of 11d */
-		pRegulatoryDomain->country_2_4_WasFound = TI_FALSE;
-		pRegulatoryDomain->country_5_WasFound = TI_FALSE;
-
-        if (!pRegulatoryDomain->regulatoryDomainEnabled)
-        {   /* Set regulatory Domain according to scan control table */
-            setSupportedChannelsAccording2ScanControlTable(pRegulatoryDomain);
-        }
-
-		break;
-
-    case REGULATORY_DOMAIN_ENABLE_DISABLE_802_11H:
-        TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_setParam, REGULATORY_DOMAIN_ENABLE_DISABLE_802_11H = %d, \n", pParam->content.enableDisable_802_11h);
-
-        pRegulatoryDomain->spectrumManagementEnabled = pParam->content.enableDisable_802_11h;
-        if (pParam->content.enableDisable_802_11h)
-        {   /* If 802_11h is enabled, enable 802_11d as well */
-            pRegulatoryDomain->regulatoryDomainEnabled = TI_TRUE;
-        }
-        switchChannel_enableDisableSpectrumMngmt(pRegulatoryDomain->hSwitchChannel, pRegulatoryDomain->spectrumManagementEnabled);
-		break;
-
-	case REGULATORY_DOMAIN_COUNTRY_2_4_PARAM:
-        /* NOTE !!! use this feature carefully. */
-        TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_setParam, REGULATORY_DOMAIN_COUNTRY_2_4_PARAM Len = %d, \n", pParam->paramLength);
-
-        TRACE_INFO_HEX(pRegulatoryDomain->hReport, (TI_UINT8*)pParam->content.pCountry, sizeof(TCountry));
-
-        return setSupportedChannelsAccording2CountryIe(pRegulatoryDomain, pParam->content.pCountry, TI_TRUE);
-
-	case REGULATORY_DOMAIN_COUNTRY_5_PARAM:
-        /* NOTE !!! use this feature carefully */
-        return setSupportedChannelsAccording2CountryIe(pRegulatoryDomain, pParam->content.pCountry, TI_FALSE);
-
-
-    case REGULATORY_DOMAIN_DFS_CHANNELS_RANGE:
-        TRACE2(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_setParam, DFS_CHANNELS_RANGE, min = %d, max = %d, \n", pParam->content.DFS_ChannelRange.minDFS_channelNum, pParam->content.DFS_ChannelRange.maxDFS_channelNum);
-
-        if ((pParam->content.DFS_ChannelRange.minDFS_channelNum<A_5G_BAND_MIN_CHANNEL) ||
-            (pParam->content.DFS_ChannelRange.maxDFS_channelNum>A_5G_BAND_MAX_CHANNEL) ||
-            pParam->content.DFS_ChannelRange.minDFS_channelNum > pParam->content.DFS_ChannelRange.maxDFS_channelNum)
-        {
-            TRACE2(pRegulatoryDomain->hReport, REPORT_SEVERITY_ERROR, "regulatoryDomain_setParam, Bad DFS_CHANNELS_RANGE, min = %d, max = %d, \n", pParam->content.DFS_ChannelRange.minDFS_channelNum, pParam->content.DFS_ChannelRange.maxDFS_channelNum);
-            return TI_NOK;
-        }
-        pRegulatoryDomain->minDFS_channelNum = (TI_UINT8)pParam->content.DFS_ChannelRange.minDFS_channelNum;
-        pRegulatoryDomain->maxDFS_channelNum = (TI_UINT8)pParam->content.DFS_ChannelRange.maxDFS_channelNum;
-
-        break;
-
-	default:
-TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_ERROR, "Set param, Params is not supported, %d\n\n", pParam->paramType);
-		return PARAM_NOT_SUPPORTED;
-	}
-
-	return TI_OK;
-}
-
-TI_STATUS regulatoryDomain_getParam(TI_HANDLE hRegulatoryDomain,
-									paramInfo_t	*pParam)
-{
-	regulatoryDomain_t	*pRegulatoryDomain = (regulatoryDomain_t *)hRegulatoryDomain;
-
-    /* Check if country code is still valid */
-    regulatoryDomain_checkCountryCodeExpiry(pRegulatoryDomain);
-
-	switch(pParam->paramType)
-	{
-
-	case REGULATORY_DOMAIN_TX_POWER_LEVEL_TABLE_PARAM:
-        {
-            TFwInfo *pFwInfo = TWD_GetFWInfo (pRegulatoryDomain->hTWD);
-            os_memoryCopy(pRegulatoryDomain->hOs, 
-                          (void *)&pParam->content.powerLevelTable,
-                          (void *)pFwInfo->txPowerTable,
-                          sizeof(pFwInfo->txPowerTable));
-        }
-		break;
-
-	case REGULATORY_DOMAIN_MANAGEMENT_CAPABILITY_ENABLED_PARAM:
-		pParam->content.spectrumManagementEnabled = pRegulatoryDomain->spectrumManagementEnabled;
-		break;
-		
-	case REGULATORY_DOMAIN_ENABLED_PARAM:
-		pParam->content.regulatoryDomainEnabled = pRegulatoryDomain->regulatoryDomainEnabled;
-		break;
-
-	case REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES:
-		{
-			channelCapabilityReq_t	channelCapabilityReq;
-
-			channelCapabilityReq.band = pParam->content.channelCapabilityReq.band;
-			channelCapabilityReq.channelNum = pParam->content.channelCapabilityReq.channelNum;
-			channelCapabilityReq.scanOption = pParam->content.channelCapabilityReq.scanOption;
-
-            regulatoryDomain_getChannelCapability(pRegulatoryDomain, channelCapabilityReq, &pParam->content.channelCapabilityRet);
-		}
-		break;
-
-	case REGULATORY_DOMAIN_POWER_CAPABILITY_PARAM:
-		/* power capability is only applicable when spectrum management is active (802.11h) */ 
-		if(pRegulatoryDomain->spectrumManagementEnabled)
-		{
-            regulatoryDomain_getPowerTableMinMax (pRegulatoryDomain, &pParam->content.powerCapability);
-		}
-		else
-		{
-			return TI_NOK;
-		}
-		break;
-
-	case REGULATORY_DOMAIN_IS_CHANNEL_SUPPORTED:
-		/* checking if the channel is supported */
-		pParam->content.bIsChannelSupprted  = 
-			regulatoryDomain_isChannelSupprted(pRegulatoryDomain, pParam->content.channel);
-			
-		break;
-
-	case REGULATORY_DOMAIN_ALL_SUPPORTED_CHANNELS:
-		{
-			ERadioBand	band = pParam->content.siteMgrRadioBand;
-			regulatoryDomain_buildDefaultListOfChannelsPerBand(pRegulatoryDomain, band, &pParam->content.supportedChannels.sizeOfList);
-		    pParam->content.supportedChannels.listOfChannels = pRegulatoryDomain->pDefaultChannels;
-		}
-		break;
-
-	case REGULATORY_DOMAIN_CURRENT_TX_POWER_IN_DBM_PARAM:
-
-            {
-			TTwdParamInfo		tparam;
-			/* Get last configured Tx power from TWD */
-			tparam.paramType = TWD_TX_POWER_PARAM_ID;
-			TWD_GetParam(pRegulatoryDomain->hTWD, &tparam);
-
-			pParam->content.desiredTxPower = tparam.content.halCtrlTxPowerDbm;
-
-TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_getParam, CURRENT_TX_POWER_IN_DBM  = %d\n", 							   pParam->content.desiredTxPower);
-            }
-
-        break;
-
-    case REGULATORY_DOMAIN_COUNTRY_PARAM:
-        {   
-            /* This case is used as an inner function of the driver to retrieve the full IE of the country */
-            TI_BOOL bBand_2_4 = siteMgr_isCurrentBand24(pRegulatoryDomain->hSiteMgr);
-
-            if (bBand_2_4)
-            {
-                if (pRegulatoryDomain->country_2_4_WasFound)
-                {
-                    pParam->content.pCountry = &pRegulatoryDomain->country24;
-                }
-                else    /* Do not use the Inforamtion */
-                {
-                    pParam->content.pCountry = NULL;
-                }
-            }   /* band 5.0 */
-            else
-            { 
-                if (pRegulatoryDomain->country_5_WasFound)
-                {
-                   pParam->content.pCountry = &pRegulatoryDomain->country5;
-                }
-                else    /* Do not use the Inforamtion */
-                {
-                    pParam->content.pCountry = NULL;
-                }
-            }
-        }
-        break;
-        
-	case REGULATORY_DOMAIN_COUNTRY_2_4_PARAM:
-		/* Getting only country string */
-
-        if (pRegulatoryDomain->country_2_4_WasFound)
-        {
-            os_memoryCopy(pRegulatoryDomain->hOs, (void*)pParam->content.pCountryString, (void*)pRegulatoryDomain->country24.countryIE.CountryString, DOT11_COUNTRY_STRING_LEN);
-        }
-        else
-        {
-            pParam->content.pCountryString[0] = '\0';
-        }
- 		break;
-
-	case REGULATORY_DOMAIN_COUNTRY_5_PARAM:
-		/* Getting only country string */
-
-        if (pRegulatoryDomain->country_5_WasFound)
-        {
-            os_memoryCopy(pRegulatoryDomain->hOs, (void*)pParam->content.pCountryString, (void*)pRegulatoryDomain->country5.countryIE.CountryString, DOT11_COUNTRY_STRING_LEN);
-        }
-        else
-        {
-            pParam->content.pCountryString[0] = '\0';
-        }
-		break;
-
-    case REGULATORY_DOMAIN_DFS_CHANNELS_RANGE:
-        TRACE2(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_getParam, DFS_CHANNELS_RANGE, min = %d, max = %d, \n", pRegulatoryDomain->minDFS_channelNum, pRegulatoryDomain->maxDFS_channelNum);
-        pParam->content.DFS_ChannelRange.minDFS_channelNum = pRegulatoryDomain->minDFS_channelNum;
-        pParam->content.DFS_ChannelRange.maxDFS_channelNum = pRegulatoryDomain->maxDFS_channelNum;
-
-        break;
-
-	case REGULATORY_DOMAIN_IS_COUNTRY_FOUND:
-
-		pParam->content.bIsCountryFound = 
-			 regulatoryDomain_isCountryFound(pRegulatoryDomain, pParam->content.eRadioBand);
-		
-		break;
-
-    case REGULATORY_DOMAIN_IS_DFS_CHANNEL:
-
-        if ((pRegulatoryDomain->spectrumManagementEnabled) && /* 802.11h is enabled */
-            (RADIO_BAND_5_0_GHZ == pParam->content.tDfsChannel.eBand) && /* band is 5 GHz */
-            (pRegulatoryDomain->minDFS_channelNum <= pParam->content.tDfsChannel.uChannel) && /* channel is within DFS range */
-            (pRegulatoryDomain->maxDFS_channelNum >= pParam->content.tDfsChannel.uChannel))
-        {
-            pParam->content.tDfsChannel.bDfsChannel = TI_TRUE;
-        }
-        else
-        {
-            pParam->content.tDfsChannel.bDfsChannel = TI_FALSE;
-        }
-        break;
-
-    case REGULATORY_DOMAIN_TIME_TO_COUNTRY_EXPIRY:
-        /* if a country was found for either band */
-        if ((pRegulatoryDomain->country_2_4_WasFound) || (pRegulatoryDomain->country_5_WasFound))
-        {
-            paramInfo_t *pParam2;
-            TI_STATUS   connStatus;
-            TI_UINT32   uCurrentTS = os_timeStampMs (pRegulatoryDomain->hOs);
-
-            pParam2 = (paramInfo_t *)os_memoryAlloc(pRegulatoryDomain->hOs, sizeof(paramInfo_t));
-            if (!pParam2)
-            {
-                return TI_NOK;
-            }
-
-            /* Get connection status */
-            pParam2->paramType = SITE_MGR_CURRENT_SSID_PARAM;
-            connStatus = siteMgr_getParam (pRegulatoryDomain->hSiteMgr, pParam2);
-            os_memoryFree(pRegulatoryDomain->hOs, pParam2, sizeof(paramInfo_t));
-
-            /* if we are connected, return 0 */
-            if (connStatus != NO_SITE_SELECTED_YET)
-            {
-                pParam->content.uTimeToCountryExpiryMs = 0;
-            }
-            else
-            {
-                /* 
-                 * if country already expired (shouldn't happen as we are checking it at the top of
-                 * get_param, but just in case...
-                 */
-                if ((uCurrentTS - pRegulatoryDomain->uLastCountryReceivedTS) > pRegulatoryDomain->uTimeOutToResetCountryMs)
-                {
-                    pParam->content.uTimeToCountryExpiryMs = 0;
-                }
-                else
-                {
-                    pParam->content.uTimeToCountryExpiryMs = 
-                        pRegulatoryDomain->uTimeOutToResetCountryMs - (uCurrentTS - pRegulatoryDomain->uLastCountryReceivedTS);
-                }
-            }
-        }
-        else
-        {
-            pParam->content.uTimeToCountryExpiryMs = 0;
-        }
-        break;
-
-	default:
-		TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_WARNING, "Get param, Params is not supported, %d\n\n", pParam->paramType);
-		return PARAM_NOT_SUPPORTED;
-	}
-
-	return TI_OK;
-}
-
-/************************************************************************
- *                        regulatoryDomain_destroy						*
- ************************************************************************
-DESCRIPTION: regulatoryDomain module destroy function, called by the config mgr in the destroy phase 
-				performs the following:
-				-	Free all memory allocated by the module
-                                                                                                   
-INPUT:      hRegulatoryDomain	-	regulatoryDomain handle.		
-
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS regulatoryDomain_destroy(TI_HANDLE hRegulatoryDomain)
-{
-	regulatoryDomain_t	*pRegulatoryDomain = (regulatoryDomain_t *)hRegulatoryDomain;
-
-	if (pRegulatoryDomain == NULL)
-		return TI_OK;
-
-    os_memoryFree(pRegulatoryDomain->hOs, pRegulatoryDomain, sizeof(regulatoryDomain_t));
-
-	return TI_OK;
-}
-
-/************************************************************************
- *                        regulatoryDomain_isCountryFound						*
- ************************************************************************
-DESCRIPTION: This function returns the validity of Country according to band
-                                                                                                   
-INPUT:      hRegulatoryDomain	-	regulatoryDomain handle.   
-            radioBand           - the desired band 	
-
-
-OUTPUT:		
-
-RETURN:     TI_TRUE - if country IE was found according to the band.
-            TI_FALSE - otherwise.
-
-************************************************************************/
-TI_BOOL regulatoryDomain_isCountryFound(regulatoryDomain_t  *pRegulatoryDomain, ERadioBand radioBand)
-{
-
-    if(radioBand == RADIO_BAND_2_4_GHZ)
-    {
-            return pRegulatoryDomain->country_2_4_WasFound;
-    }
-    else
-    {
-        return pRegulatoryDomain->country_5_WasFound;
-    }
-
-}
-
-/***********************************************************************
- *                       setSupportedChannelsAccording2CountryIe									
- ***********************************************************************
-DESCRIPTION:	Called when beacon/Probe Response with Country IE
-				is found.
-				The function sets the local countryIE per band with the CountryIE
-				 that was detected in the last passive scan.
-				 It is assumed that only one Country IE per band is allowed.
-				 If Country is changed when the TNET is loaded, it should
-				 be re-loaded in order to re-config the new Country domain.
-                                                                                                   
-INPUT:      hRegulatoryDomain	-	RegulatoryDomain handle.
-			pCountry	-	pointer to the detected country IE.
-
-OUTPUT:		
-
-RETURN:     TI_OK - New country code was set (or the same one was already configured)
-            TI_NOK - The new country code could not be set
-
-************************************************************************/
-static TI_STATUS setSupportedChannelsAccording2CountryIe(regulatoryDomain_t *pRegulatoryDomain, TCountry* pCountry, TI_BOOL band_2_4)
-{
-	channelCapability_t *pSupportedChannels;
-	TI_UINT8				channelIndex;
-	TI_UINT8				tripletChannelIndex, tripletChannelCnt;
-	TI_UINT8				channelStep, numberOfChannels, minChannelNumber, maxChannelNumber;
-
-	
-	if (!pRegulatoryDomain->regulatoryDomainEnabled)
-	{  /* Ignore the Country IE if 802.11d is disabled */
-		return TI_NOK;
-	}
-
-    /* Check if the country code should be reset */
-    regulatoryDomain_checkCountryCodeExpiry(pRegulatoryDomain);
-
-	if( band_2_4 == TI_TRUE )
-	{
-		if (pRegulatoryDomain->country_2_4_WasFound)
-		{	/* Do not update new Country IE */
-			if (os_memoryCompare(pRegulatoryDomain->hOs, (void *)&pCountry->countryIE, (void *)&pRegulatoryDomain->country24.countryIE, sizeof(dot11_countryIE_t)))
-			{
-TRACE0(pRegulatoryDomain->hReport, REPORT_SEVERITY_WARNING, "setSupportedChannelsAccording2CountryIe different Country, cur=, new=\n");
-            	return TI_NOK;
-            }
-            else    /* Same IE - just mark the TS and return TI_OK */
-            {
-                /* Mark the time of the received country IE */                
-                pRegulatoryDomain->uLastCountryReceivedTS = os_timeStampMs(pRegulatoryDomain->hOs);
-                return TI_OK;
-            }
-		}
-		pRegulatoryDomain->country_2_4_WasFound = TI_TRUE;
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_2_4;
-		channelStep = BG_24G_BAND_CHANNEL_HOPS;
-		maxChannelNumber = NUM_OF_CHANNELS_24;
-		minChannelNumber = BG_24G_BAND_MIN_CHANNEL;
-		numberOfChannels = NUM_OF_CHANNELS_24;
-		/* save the country IE */
-		os_memoryCopy(pRegulatoryDomain->hOs, (void*)&pRegulatoryDomain->country24, (void *)pCountry, sizeof(TCountry));
-
-        TRACE3(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "Country 2.4 =%c%c%c\n",pRegulatoryDomain->country24.countryIE.CountryString[0], pRegulatoryDomain->country24.countryIE.CountryString[1], pRegulatoryDomain->country24.countryIE.CountryString[2]);
-
-	}
-	else    /* band 5.0 */
-	{
-		if (pRegulatoryDomain->country_5_WasFound)
-		{	/* Do not update new Country IE if the IE is the same*/
-			if (os_memoryCompare(pRegulatoryDomain->hOs, (void *)&pCountry->countryIE, (void *)&pRegulatoryDomain->country5.countryIE, sizeof(dot11_countryIE_t)))
-			{
-TRACE0(pRegulatoryDomain->hReport, REPORT_SEVERITY_WARNING, "setSupportedChannelsAccording2CountryIe different Country, cur=, new=\n");
-            	return TI_NOK;
-            }
-            else    /* Same IE - just mark the TS and return TI_OK */
-            {
-                /* Mark the time of the received country IE */                
-                pRegulatoryDomain->uLastCountryReceivedTS = os_timeStampMs(pRegulatoryDomain->hOs);
-                return TI_OK;
-            }
-		}
-		pRegulatoryDomain->country_5_WasFound = TI_TRUE;
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_5;
-		channelStep = A_5G_BAND_CHANNEL_HOPS;
-		maxChannelNumber = A_5G_BAND_MAX_CHANNEL;
-		minChannelNumber = A_5G_BAND_MIN_CHANNEL;
-		numberOfChannels = A_5G_BAND_NUM_CHANNELS;
-		/* save the country IE */
-		os_memoryCopy(pRegulatoryDomain->hOs, (void*)&pRegulatoryDomain->country5, (void*)pCountry, sizeof(TCountry));
-
-        TRACE3(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "Country 5 =%c%c%c\n",pRegulatoryDomain->country5.countryIE.CountryString[0], pRegulatoryDomain->country5.countryIE.CountryString[1], pRegulatoryDomain->country5.countryIE.CountryString[2]);
-	}
-
-    /*
-     * New Country IE was saved. Now - update the last received TS and ScanControlTable
-     */
-
-    /* Mark the time of the received country IE */                
-    pRegulatoryDomain->uLastCountryReceivedTS = os_timeStampMs(pRegulatoryDomain->hOs);
-
-	/* First clear the validity of all channels 
-		Overwrite the ScanControlTable */
-	for (channelIndex=0; channelIndex<numberOfChannels; channelIndex++)
-	{
-		pSupportedChannels[channelIndex].channelValidityActive = TI_FALSE;
-		pSupportedChannels[channelIndex].channelValidityPassive = TI_FALSE;
-		pSupportedChannels[channelIndex].bChanneInCountryIe = TI_FALSE;
-		pSupportedChannels[channelIndex].uMaxTxPowerDomain = MIN_TX_POWER; 	
-	}
-    
-	tripletChannelCnt = (pCountry->len - DOT11_COUNTRY_STRING_LEN) / 3;
-	/* set validity of the channels according to the band (2.4 or 5) */
-	for( tripletChannelIndex = 0; tripletChannelIndex < tripletChannelCnt ; tripletChannelIndex++)
-	{
-		TI_UINT8	firstChannelNumInTriplet;
-		
-		firstChannelNumInTriplet = pCountry->countryIE.tripletChannels[tripletChannelIndex].firstChannelNumber;
-TRACE2(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "firstChannelNumInTriplet=%d,channelStep=%d\n", firstChannelNumInTriplet, channelStep);
-		for (channelIndex=0; channelIndex<pCountry->countryIE.tripletChannels[tripletChannelIndex].numberOfChannels; channelIndex++)
-		{
-			TI_UINT16	channelNumber;
-
-			channelNumber = firstChannelNumInTriplet+(channelIndex*channelStep);
-TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "setSupportedChannelsAccording2CountryIe of channel=%d\n", channelNumber);
-			
-			if (channelNumber <= maxChannelNumber)
-			{
-				TI_UINT8 	channelIndex4Band;
-
-				channelIndex4Band = (channelNumber-minChannelNumber);
-				pSupportedChannels[channelIndex4Band].bChanneInCountryIe = TI_TRUE;
-				pSupportedChannels[channelIndex4Band].channelValidityPassive = TI_TRUE;
-				pSupportedChannels[channelIndex4Band].channelValidityActive = TI_TRUE;
-
-				/* set the TX power in DBM/10 units */
-			    pSupportedChannels[channelIndex4Band].uMaxTxPowerDomain = 
-					DBM2DBMDIV10(pCountry->countryIE.tripletChannels[tripletChannelIndex].maxTxPowerLevel);
-
-TRACE2(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "channel = %d uMaxTxPowerDomain=%d\n", 										channelNumber, pSupportedChannels[channelIndex4Band].uMaxTxPowerDomain);
-			}
-		}
-    }
-
-	return TI_OK;
-}
-
-
-/***********************************************************************
- *                        regulatoryDomain_isChannelSupprted									
- ***********************************************************************
-DESCRIPTION:	The function checks if the input channel is supported.
-                                                                                                   
-INPUT:      pRegulatoryDomain	-	RegulatoryDomain pointer.
-			channel				-	Channel number.
-			
-
-OUTPUT:		
-
-RETURN:     TI_OK if channel is supported, TI_NOK otherwise.
-
-************************************************************************/
-static TI_BOOL regulatoryDomain_isChannelSupprted(regulatoryDomain_t *pRegulatoryDomain, TI_UINT8 channel)
-{
-	TI_UINT8				channelIndex;
-	channelCapability_t *pSupportedChannels;
-
-	if (pRegulatoryDomain==NULL)
-	{
-		return TI_FALSE;
-	}
-
-	if ((channel<BG_24G_BAND_MIN_CHANNEL) || (channel>A_5G_BAND_MAX_CHANNEL))
-	{
-		return TI_FALSE;
-	}
-	if (channel>=A_5G_BAND_MIN_CHANNEL)
-	{
-		channelIndex = (channel-A_5G_BAND_MIN_CHANNEL);
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_5;
-	}
-	else
-	{
-		channelIndex = (channel-BG_24G_BAND_MIN_CHANNEL);
-		if (channelIndex >= NUM_OF_CHANNELS_24)
-		{
-			TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_ERROR,
-				   "regulatoryDomain_isChannelSupprted(): 2.4G invalid channel # %u\n", channel );
-			return TI_FALSE;
-		}
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_2_4;
-	}
-	if (pRegulatoryDomain->spectrumManagementEnabled 
-		&& (channel >= pRegulatoryDomain->minDFS_channelNum) 
-        && (channel <= pRegulatoryDomain->maxDFS_channelNum)
-		&& ((os_timeStampMs(pRegulatoryDomain->hOs)-pSupportedChannels[channelIndex].timestamp) >=CHANNEL_VALIDITY_TS_THRESHOLD ))
-	{	/* If 802.11h is enabled, a DFS channel is valid only for 10 sec
-			from the last Beacon/ProbeResponse */
-        pSupportedChannels[channelIndex].channelValidityActive = TI_FALSE;
-        TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_isChannelSupprted(): CHANNEL_VALIDITY_TS_THRESHOLD !! Disable channel no %d, DFS channel\n", channel );
-
-	}
-
-	return (pSupportedChannels[channelIndex].channelValidityActive);
-
-}
-
-/************************************************************************
- *                        regulatoryDomain_setChannelValidity			*
- ************************************************************************/
-/*
-*
-*
-* \b Description: 
-*
-* This function sets a channel as invalid or valid in the internal Regulatory Domain
- * database. 
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the regDoamin SM context  \n
-*  I   - channelNum - the invalid/valid channel number
-*  I   - channelValidity - TI_TRUE if channel is valid, TI_FALSE channel is invalid
-*
-* \b RETURNS:
-*
-*  None.
-*
-* 
-*************************************************************************/
-static void regulatoryDomain_setChannelValidity(regulatoryDomain_t *pRegulatoryDomain, 
-												TI_UINT16 channelNum, TI_BOOL channelValidity)
-{
-	channelCapability_t		*pSupportedChannels;
-	TI_UINT8					channelIndex;
-
-
-	if (pRegulatoryDomain == NULL)
-	{
-		return;
-	}
-	if ((channelNum==0 ) || (channelNum>A_5G_BAND_MAX_CHANNEL))
-	{
-TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_ERROR, "regulatoryDomain_setChannelValidity, invalid channelNum=%d \n", channelNum);
-		return;
-	}
-	
-	if (channelNum <= NUM_OF_CHANNELS_24)
-	{
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_2_4;
-		channelIndex = (channelNum-BG_24G_BAND_MIN_CHANNEL);
-	}
-	else 
-	{
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_5;
-		channelIndex = (channelNum - A_5G_BAND_MIN_CHANNEL);
-	}
-	
-	if(channelValidity == TI_TRUE)
-		if((pSupportedChannels[channelIndex].bChanneInCountryIe == TI_FALSE) && (pRegulatoryDomain->regulatoryDomainEnabled == TI_TRUE))
-		{
-TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_WARNING, "regulatoryDomain_setChannelValidity: channelNum = %d isn't supported at the Country. wll not set to active!\n", channelNum);
-			return;
-		}
-
-    TRACE2(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_setChannelValidity: channelNum=%d, validity=%d \n", channelNum, channelValidity);
-
-
-	pSupportedChannels[channelIndex].channelValidityActive = channelValidity;
-}
-
-
-/************************************************************************
- *      setSupportedChannelsAccording2ScanControlTable 					*
- ************************************************************************/
-/**
-*
-*
-* \b Description: 
-*
-* This function is called in config and sets the supported channels according to
-* the scan control table read from registry and reg domain read from the chip.
-*
-* \b ARGS:
-*
-*  I   - pRegulatoryDomain - pointer to the regDoamin SM context  \n
-*
-* \b RETURNS:
-*
-*  None.
-*
-* 
-*************************************************************************/
-static void setSupportedChannelsAccording2ScanControlTable(regulatoryDomain_t  *pRegulatoryDomain)
-{
-	TI_UINT8 	channelIndex;
-	TI_UINT8	channelMask;
-
-	if (pRegulatoryDomain==NULL)
-	{
-		return;
-	}
-
-    TRACE0(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "setSupportedChannelsAccording2ScanControlTable \n");
-
-	for (channelIndex=0; channelIndex<NUM_OF_CHANNELS_24; channelIndex++)
-	{
-		channelMask = pRegulatoryDomain->scanControlTable.ScanControlTable24.tableString[channelIndex];
-		pRegulatoryDomain->supportedChannels_band_2_4[channelIndex].bChanneInCountryIe = TI_FALSE;
-
-		/* Calculate Domain Tx Power - channelMask units are in Dbm. */
-		pRegulatoryDomain->supportedChannels_band_2_4[channelIndex].uMaxTxPowerDomain = 
-						DBM2DBMDIV10(channelMask & MASK_TX_POWER);
-		if (channelMask & (MASK_ACTIVE_ALLOWED | MASK_FREQ_ALLOWED))
-		{	/* The channel is allowed for Active & Passive scans */
-			if (pRegulatoryDomain->regulatoryDomainEnabled)
-			{	/* All channels should be invalid for Active scan */
-				pRegulatoryDomain->supportedChannels_band_2_4[channelIndex].channelValidityActive = TI_FALSE;
-                TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "channelIndex=%d is invalid for Active \n", channelIndex+1);
-			}
-			else
-			{
-				pRegulatoryDomain->supportedChannels_band_2_4[channelIndex].channelValidityActive = TI_TRUE;
-                TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "channelIndex=%d is Active valid \n", channelIndex+1);
-			}
-			
-		}
-		
-		if (channelMask & MASK_FREQ_ALLOWED)
-		{	/* The channel is allowed for Passive scan */
-			pRegulatoryDomain->supportedChannels_band_2_4[channelIndex].channelValidityPassive = TI_TRUE;
-            TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "channelIndex=%d is Passive valid \n", channelIndex+1);
-		}
-		else
-		{	/* The channel is not allowed */
-			pRegulatoryDomain->supportedChannels_band_2_4[channelIndex].channelValidityPassive = TI_FALSE;
-			pRegulatoryDomain->supportedChannels_band_2_4[channelIndex].channelValidityActive = TI_FALSE;
-		}
-	}
-
-	for (channelIndex=A_5G_BAND_MIN_CHANNEL; channelIndex<A_5G_BAND_MAX_CHANNEL; channelIndex++)
-	{	
-		TI_UINT8	channelIndexInBand5;
-
-		channelIndexInBand5 = (channelIndex-A_5G_BAND_MIN_CHANNEL);
-		channelMask = pRegulatoryDomain->scanControlTable.ScanControlTable5.tableString[channelIndexInBand5];
-        TRACE3(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "channelIndex=%d, channelIndexInBand5=%d channelMask=%d\n", channelIndex, channelIndexInBand5, channelMask);
-
-		/* Calculate Domain Tx Power - channelMask units are in Dbm. */
-		pRegulatoryDomain->supportedChannels_band_5[channelIndexInBand5].uMaxTxPowerDomain = 
-			DBM2DBMDIV10(channelMask & MASK_TX_POWER);
-
-		pRegulatoryDomain->supportedChannels_band_5[channelIndexInBand5].bChanneInCountryIe = TI_FALSE;
-		if (channelMask & (MASK_ACTIVE_ALLOWED | MASK_FREQ_ALLOWED))
-		{	 /* The channel is allowed for Active & Passive scans */
-			if (pRegulatoryDomain->regulatoryDomainEnabled)
-			{	/* All channels should be invalid for Active scan */
-				pRegulatoryDomain->supportedChannels_band_5[channelIndexInBand5].channelValidityActive = TI_FALSE;
-                TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "channelIndex=%d is invalid for Active \n", channelIndex);
-			}
-			else
-			{
-				pRegulatoryDomain->supportedChannels_band_5[channelIndexInBand5].channelValidityActive = TI_TRUE;
-                TRACE2(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "channelIndex=%d, channelIndexInBand5=%d, is Active valid \n", channelIndex, channelIndexInBand5);
-			}   		
-		}
-		
-		if (channelMask & MASK_FREQ_ALLOWED)
-		{	/* The channel is allowed for Passive scan */
-			pRegulatoryDomain->supportedChannels_band_5[channelIndexInBand5].channelValidityPassive = TI_TRUE;
-            TRACE2(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "channelIndex=%d, channelIndexInBand5=%d, is Passive valid \n", channelIndex, channelIndexInBand5);
-		}
-		else
-		{	/* The channel is not allowed */
-			pRegulatoryDomain->supportedChannels_band_5[channelIndexInBand5].channelValidityPassive = TI_FALSE;
-			pRegulatoryDomain->supportedChannels_band_5[channelIndexInBand5].channelValidityActive = TI_FALSE;
-		}
-
-	}
-}
-
-
-/***********************************************************************
-*                        regulatoryDomain_getChannelCapability									
-***********************************************************************
-DESCRIPTION:	This function returns the channel capability information
-
-INPUT:      pRegulatoryDomain		-	RegulatoryDomain pointer.
-			channelCapabilityReq	-	Channels parameters
-
-
-OUTPUT:		channelCapabilityRet	-   Channel capability information
-
-RETURN:     TI_OK if information was retrieved, TI_NOK otherwise.
-
-************************************************************************/
-static TI_STATUS regulatoryDomain_getChannelCapability(regulatoryDomain_t *pRegulatoryDomain, 
-													   channelCapabilityReq_t channelCapabilityReq, 
-													   channelCapabilityRet_t *channelCapabilityRet)
-{
-	channelCapability_t		*pSupportedChannels;
-	TI_UINT8				channelIndex;
-	TI_BOOL					bCountryWasFound, bServingChannel;
-
-	if ((pRegulatoryDomain == NULL) || (channelCapabilityRet == NULL))
-	{
-		return TI_NOK;
-	}
-
-	channelCapabilityRet->channelValidity = TI_FALSE;
-	channelCapabilityRet->maxTxPowerDbm = 0;
-	if ((channelCapabilityReq.channelNum==0 ) || (channelCapabilityReq.channelNum > A_5G_BAND_MAX_CHANNEL))
-	{
-        TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_ERROR, "regulatoryDomain_getChannelCapability, invalid channelNum=%d \n", channelCapabilityReq.channelNum);
-		return TI_NOK;
-	}
-	
-	if (channelCapabilityReq.band==RADIO_BAND_2_4_GHZ)
-	{
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_2_4;
-		channelIndex = (channelCapabilityReq.channelNum-BG_24G_BAND_MIN_CHANNEL);
-		if (channelIndex >= NUM_OF_CHANNELS_24)
-		{
-			TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_ERROR,
-				   "regulatoryDomain_getChannelCapability(): 2.4G invalid channel # %u\n", channelCapabilityReq.channelNum );
-			return TI_NOK;
-		}
-		bCountryWasFound = pRegulatoryDomain->country_2_4_WasFound;
-	}
-	else if (channelCapabilityReq.band==RADIO_BAND_5_0_GHZ)
-	{
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_5;
-		channelIndex = (channelCapabilityReq.channelNum - A_5G_BAND_MIN_CHANNEL);
-		if (channelIndex >= A_5G_BAND_NUM_CHANNELS)
-		{
-			TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_ERROR,
-				   "regulatoryDomain_getChannelCapability(): 5G invalid channel # %u\n", channelCapabilityReq.channelNum);
-			return TI_NOK;
-		}
-		bCountryWasFound = pRegulatoryDomain->country_5_WasFound;
-	}
-	else
-	{
-		TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_ERROR, "regulatoryDomain_getChannelCapability, invalid band=%d \n", channelCapabilityReq.band);
-		return TI_NOK;
-	}
-
-
-	/* 
-	 * Set channelValidity according to ScanTable and whether 11d is enabled 
-	 */
-	if (channelCapabilityReq.scanOption == ACTIVE_SCANNING)
-	{
-		if ( ( pRegulatoryDomain->regulatoryDomainEnabled ) && ( !bCountryWasFound ) )
-		{	/* 11d enabled and no country IE was found - set channel to invalid */
-			channelCapabilityRet->channelValidity = TI_FALSE;
-		}
-		else
-		{
-            paramInfo_t *pParam = (paramInfo_t *)os_memoryAlloc(pRegulatoryDomain->hOs, sizeof(paramInfo_t));
-            if (!pParam)
-            {
-                return TI_NOK;
-            }
-
-            channelCapabilityRet->channelValidity = pSupportedChannels[channelIndex].channelValidityActive;
-			/*
-			 * Set Maximum Tx power for the channel - only for active scanning
-			 */ 
-
-			/* Get current channel and check if we are using the same one */
-			pParam->paramType = SITE_MGR_CURRENT_CHANNEL_PARAM;
-			siteMgr_getParam(pRegulatoryDomain->hSiteMgr, pParam);
-
-			bServingChannel = ( pParam->content.siteMgrCurrentChannel == channelCapabilityReq.channelNum ?
-								TI_TRUE : TI_FALSE );
-
-			channelCapabilityRet->maxTxPowerDbm = regulatoryDomain_getMaxPowerAllowed(pRegulatoryDomain, 
-				channelCapabilityReq.channelNum, 
-				channelCapabilityReq.band, 
-				bServingChannel);
-            os_memoryFree(pRegulatoryDomain->hOs, pParam, sizeof(paramInfo_t));
-		}
-	}
-	else	/* Passive scanning */
-	{
-		if ( ( pRegulatoryDomain->regulatoryDomainEnabled ) && ( !bCountryWasFound ) )
-		{	/* 11d enabled and no country IE was found - set channel to valid for passive scan */
-			channelCapabilityRet->channelValidity = TI_TRUE;
-		}
-	else
-	{
-		channelCapabilityRet->channelValidity = pSupportedChannels[channelIndex].channelValidityPassive;
-	}
-	}
-	
-	if (pRegulatoryDomain->spectrumManagementEnabled 
-		&& (channelCapabilityReq.scanOption == ACTIVE_SCANNING)
-        && (channelCapabilityReq.channelNum >= pRegulatoryDomain->minDFS_channelNum) 
-        && (channelCapabilityReq.channelNum <= pRegulatoryDomain->maxDFS_channelNum)
-		&& ((os_timeStampMs(pRegulatoryDomain->hOs)-pSupportedChannels[channelIndex].timestamp) >=CHANNEL_VALIDITY_TS_THRESHOLD ))
-	{	/* If 802.11h is enabled, a DFS channel is valid only for 10 sec
-			from the last Beacon/ProbeResponse */
-        pSupportedChannels[channelIndex].channelValidityActive = TI_FALSE;
-        channelCapabilityRet->channelValidity = TI_FALSE;
-        TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_getChannelCapability(): CHANNEL_VALIDITY_TS_THRESHOLD !!! Disable channel no %d, DFS channel\n", channelCapabilityReq.channelNum  );
-    }
-
-    TRACE4(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, " Channel num= %d, scan option=%d validity = %d, TX power = %d \n", 					channelCapabilityReq.channelNum, 					channelCapabilityReq.scanOption,					channelCapabilityRet->channelValidity,					channelCapabilityRet->maxTxPowerDbm);
-	return TI_OK;
-
-}
-
-
-static void regulatoryDomain_updateChannelsTs(regulatoryDomain_t *pRegulatoryDomain, TI_UINT8 channel)
-{
-	TI_UINT8				channelIndex;
-	channelCapability_t *pSupportedChannels;
-
-	if (pRegulatoryDomain==NULL)
-	{
-		return;
-	}
-
-	if ((channel<BG_24G_BAND_MIN_CHANNEL) || (channel>A_5G_BAND_MAX_CHANNEL))
-	{
-		return;
-	}
-
-	if (channel>=A_5G_BAND_MIN_CHANNEL)
-	{
-		channelIndex = (channel-A_5G_BAND_MIN_CHANNEL);
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_5;
-	}
-	else
-	{
-		channelIndex = (channel-BG_24G_BAND_MIN_CHANNEL);
-		if (channelIndex >= NUM_OF_CHANNELS_24)
-		{
-			TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_ERROR,
-				   "regulatoryDomain_updateChannelsTs(): 2.4G invalid channel # %u\n", channel );
-			return;
-		}
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_2_4;
-	}
-	
-	if((pSupportedChannels[channelIndex].bChanneInCountryIe == TI_FALSE) && (pRegulatoryDomain->regulatoryDomainEnabled == TI_TRUE))
-  	{
-		TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_WARNING, "regulatoryDomain_updateChannelsTs: channelNum = %d isn't supported at the Country. wll not set to active!\n", channel);
-  		return;
-  	}
-
-	pSupportedChannels[channelIndex].timestamp = os_timeStampMs(pRegulatoryDomain->hOs);
-	pSupportedChannels[channelIndex].channelValidityActive = TI_TRUE;
-
-}
-
-/***********************************************************************
- *              regulatoryDomain_updateCurrTxPower								
- ***********************************************************************
-DESCRIPTION: Called when new Tx power should be calculated and configured.
-			 Check if we are already joined to BSS/IBSS, calculate 
-			 new Tx power and configure it to TWD.
-				
-INPUT:		pRegulatoryDomain	- regulatoryDomain pointer.
-			
-RETURN:     TI_OK - New value was configured to TWD, TI_NOK - Can't configure value
-			TX_POWER_SET_SAME_VALUE - Same value was already configured.
-
-************************************************************************/
-static TI_STATUS regulatoryDomain_updateCurrTxPower(regulatoryDomain_t	*pRegulatoryDomain)
-{
-    paramInfo_t			*pParam;
-	TI_STATUS			eStatus;
-	TTwdParamInfo		*pTwdParam;
-	TI_UINT8			uCurrChannel, uNewTxPower;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pRegulatoryDomain->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    pTwdParam = (TTwdParamInfo *)os_memoryAlloc(pRegulatoryDomain->hOs, sizeof(TTwdParamInfo));
-    if (!pTwdParam)
-    {
-        os_memoryFree(pRegulatoryDomain->hOs, pParam, sizeof(paramInfo_t));
-        return TI_NOK;
-    }
-
-	/* Get the current channel, and update TWD with the changed */
-	pParam->paramType = SITE_MGR_CURRENT_CHANNEL_PARAM;
-	eStatus = siteMgr_getParam(pRegulatoryDomain->hSiteMgr, pParam);
-
-	if ( eStatus != TI_OK )
-	{
-		/* We are not joined yet - no meaning for new Tx power */
-        TRACE0(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_updateCurrTxPower, No site selected yet\n");
-        os_memoryFree(pRegulatoryDomain->hOs, pParam, sizeof(paramInfo_t));
-        os_memoryFree(pRegulatoryDomain->hOs, pTwdParam, sizeof(TTwdParamInfo));
-		return TI_NOK;
-	}
-	/* Save current channel */
-	uCurrChannel = pParam->content.siteMgrCurrentChannel;
-
-	/* Get the current channel, and update TWD with the changed */
-	pParam->paramType = 	SITE_MGR_RADIO_BAND_PARAM;
-	siteMgr_getParam(pRegulatoryDomain->hSiteMgr, pParam);
-
-	/* Calculate maximum Tx power for the serving channel */
-	uNewTxPower = regulatoryDomain_getMaxPowerAllowed(pRegulatoryDomain, uCurrChannel, 
-													  pParam->content.siteMgrRadioBand, TI_TRUE);
-    os_memoryFree(pRegulatoryDomain->hOs, pParam, sizeof(paramInfo_t));	
-	
-	/* Verify that the Temporary TX Power Control doesn't violate the TX Power Constraint */
-	pRegulatoryDomain->uTemporaryTxPower = TI_MIN(pRegulatoryDomain->uDesiredTemporaryTxPower, uNewTxPower);
-
-
-    TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "regulatoryDomain_updateCurrTxPower, Write to TWD = %d \n", uNewTxPower);
-
-    pTwdParam->paramType = TWD_TX_POWER_PARAM_ID;
-
-    /* set TWD according to Temporary Tx Power Enable flag */
-    if (TI_TRUE == pRegulatoryDomain->bTemporaryTxPowerEnable)
-    {
-        pTwdParam->content.halCtrlTxPowerDbm = pRegulatoryDomain->uTemporaryTxPower;
-    }
-    else
-    {
-        pTwdParam->content.halCtrlTxPowerDbm = uNewTxPower;
-    }
-
-    eStatus = TWD_SetParam(pRegulatoryDomain->hTWD, pTwdParam);
-    os_memoryFree(pRegulatoryDomain->hOs, pTwdParam, sizeof(TTwdParamInfo));
-	return eStatus;
-}
-
-/***********************************************************************
- *                        regulatoryDomain_checkCountryCodeExpiry									
- ***********************************************************************
-DESCRIPTION: Check & Reset the country code that was detected earlier.
-                Reseting country code will be done when the STA was not connected for 
-                a certain amount of time, and no country code was received in that period (from the same country).
-                This scenario might indicate that the STA has moved to a different country.
-                                                                                                   
-INPUT:      pRegulatoryDomain	-	Regulatory Domain handle.
-
-OUTPUT:		updating country code if necessary.
-
-RETURN:     
-
-************************************************************************/
-void regulatoryDomain_checkCountryCodeExpiry(regulatoryDomain_t *pRegulatoryDomain)
-{
-    paramInfo_t *pParam;
-    TI_STATUS   connStatus;
-    TI_UINT32   uCurrentTS = os_timeStampMs(pRegulatoryDomain->hOs);
-
-    if ((pRegulatoryDomain->country_2_4_WasFound) || (pRegulatoryDomain->country_5_WasFound))
-    {
-        pParam = (paramInfo_t *)os_memoryAlloc(pRegulatoryDomain->hOs, sizeof(paramInfo_t));
-        if (!pParam)
-        {
-            return;
-        }
-        /* Get connection status */
-        pParam->paramType = SITE_MGR_CURRENT_SSID_PARAM;
-        connStatus      = siteMgr_getParam(pRegulatoryDomain->hSiteMgr, pParam);
-
-         /* If (uTimeOutToResetCountryMs has elapsed && we are not connected)
-                 delete the last country code received */
-        if (((uCurrentTS - pRegulatoryDomain->uLastCountryReceivedTS) > pRegulatoryDomain->uTimeOutToResetCountryMs) &&
-            (connStatus == NO_SITE_SELECTED_YET))
-        {
-            TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, ", Reset country code after %d Ms\n",(uCurrentTS - pRegulatoryDomain->uLastCountryReceivedTS));
-
-            /* Reset country codes */
-            pRegulatoryDomain->country_2_4_WasFound = TI_FALSE;
-            pRegulatoryDomain->country_5_WasFound = TI_FALSE;
-            
-            /* Restore default values of the scan control table */
-            setSupportedChannelsAccording2ScanControlTable(pRegulatoryDomain); 
-        }
-        os_memoryFree(pRegulatoryDomain->hOs, pParam, sizeof(paramInfo_t));
-    }
-}
-
-/***********************************************************************
-*              regulatoryDomain_getMaxPowerAllowed								
-***********************************************************************
-DESCRIPTION: Get the maximum tx power allowed for the given channel.
-				The final value is constructed by:
-				1) User max value
-				2) Domain restriction - 11d country code IE
-				3) 11h power constraint - only on serving channel
-				4) XCC TPC - only on serving channel
-
-RETURN:     Max power in Dbm/10 for the given channel
-
-************************************************************************/
-static TI_UINT8 regulatoryDomain_getMaxPowerAllowed(regulatoryDomain_t	*pRegulatoryDomain,
-												 TI_UINT8				uChannel,
-												 ERadioBand		eBand,
-												 TI_BOOL				bServingChannel)
-{
-	channelCapability_t	*pSupportedChannels;
-	TI_UINT8				 uChannelIndex, uTxPower;
-
-	if( eBand == RADIO_BAND_2_4_GHZ)
-	{
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_2_4;
-		uChannelIndex = uChannel - BG_24G_BAND_MIN_CHANNEL;
-	}
-	else
-	{
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_5;
-		uChannelIndex = uChannel - A_5G_BAND_MIN_CHANNEL;
-	}
-
-	/* We'll start with the "Domain restriction - 11d country code IE" */
-	uTxPower = pSupportedChannels[uChannelIndex].uMaxTxPowerDomain;
-
-	if ( bServingChannel)
-	{
-		if (pRegulatoryDomain->uPowerConstraint < uTxPower)
-		{
-			/* When 802.11h is disabled, uPowerConstraint is 0 anyway */
-			uTxPower -= pRegulatoryDomain->uPowerConstraint;
-		}
-        
-        /* Take XCC limitation too */
-        uTxPower = TI_MIN(uTxPower, pRegulatoryDomain->uExternTxPowerPreferred);
-
-	}
-
-	/* Now make sure we are not exceeding the user maximum */
-	uTxPower = TI_MIN(uTxPower, pRegulatoryDomain->uUserMaxTxPower);
-
-TRACE3(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, " uChannel = %d bServingChannel = %d uTxPower = %d \n", uChannel, bServingChannel, uTxPower);
-
-	return uTxPower;
-}
-
-
-static void regulatoryDomain_buildDefaultListOfChannelsPerBand(regulatoryDomain_t *pRegulatoryDomain, ERadioBand band, TI_UINT8 *listSize)
-{
-	TI_UINT8				channelIndex;
-	TI_UINT8				numberOfChannels, minChannelNumber;
-	channelCapability_t	*pSupportedChannels;
-	TI_UINT8				maxSupportedChannels=0;
-
-	if ( (pRegulatoryDomain==NULL) || (listSize==NULL))
-	{
-		return;
-	}
-
-	if( band == RADIO_BAND_2_4_GHZ)
-	{
-		minChannelNumber = BG_24G_BAND_MIN_CHANNEL;
-		numberOfChannels = NUM_OF_CHANNELS_24;
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_2_4;
-	}
-	else
-	{
-		minChannelNumber = A_5G_BAND_MIN_CHANNEL;
-		numberOfChannels = A_5G_BAND_NUM_CHANNELS;
-		pSupportedChannels = pRegulatoryDomain->supportedChannels_band_5;
-	}
-
-
-	for (channelIndex=0; channelIndex<numberOfChannels; channelIndex++)
-	{
-		if (pSupportedChannels[channelIndex].channelValidityPassive)
-		{
-			pRegulatoryDomain->pDefaultChannels[maxSupportedChannels] = channelIndex+minChannelNumber;
-TRACE1(pRegulatoryDomain->hReport, REPORT_SEVERITY_INFORMATION, "Channel num %d is supported \n", pRegulatoryDomain->pDefaultChannels[maxSupportedChannels]);
-			maxSupportedChannels++;
-		}
-	}
- 
-	*listSize = maxSupportedChannels;
-    
-}
-
-/***********************************************************************
-*              regulatoryDomain_getPowerTableMinMax								
-***********************************************************************
-DESCRIPTION: Find the Tx-power-level table min & max values.
-			 The table is made of 4 power levels and 5 bands/sub-bands. 
-
-RETURN:     void
-************************************************************************/
-static void regulatoryDomain_getPowerTableMinMax (regulatoryDomain_t *pRegulatoryDomain,
-                                                  powerCapability_t  *pPowerCapability)
-{
-    TFwInfo  *pFwInfo = TWD_GetFWInfo (pRegulatoryDomain->hTWD);
-	TI_UINT8	i;
-
-    /* Init the min (max) to the opposite edge so the table values are below (above) this edge */ 
-	pPowerCapability->minTxPower = MAX_TX_POWER;
-	pPowerCapability->maxTxPower = MIN_TX_POWER;
-
-	/* Find Min and Max values of the table */
-	for (i = 0; i < NUMBER_OF_SUB_BANDS_E; i++)
-	{
-		pPowerCapability->minTxPower = TI_MIN (pPowerCapability->minTxPower, 
-                                               pFwInfo->txPowerTable[i][NUM_OF_POWER_LEVEL-1]);
-		pPowerCapability->maxTxPower = TI_MAX (pPowerCapability->maxTxPower, 
-                                               pFwInfo->txPowerTable[i][0]);
-	}
-}
-
-/* for debug */
-void regDomainPrintValidTables(TI_HANDLE hRegulatoryDomain)
-{
-	regulatoryDomain_t  *pRegulatoryDomain = (regulatoryDomain_t *)hRegulatoryDomain;
-	TI_UINT16 channelIndex;
-
-	for (channelIndex=0; channelIndex<NUM_OF_CHANNELS_24; channelIndex++)
-	{
-		if (pRegulatoryDomain->supportedChannels_band_2_4[channelIndex].channelValidityPassive)
-			WLAN_OS_REPORT(("channel num =%d is valid for passive \n", channelIndex+1));
-		if (pRegulatoryDomain->supportedChannels_band_2_4[channelIndex].channelValidityActive)
-		{
-			WLAN_OS_REPORT(("channel =%d is valid for active TX power=%d\n", 
-				channelIndex+1, pRegulatoryDomain->supportedChannels_band_2_4[channelIndex].uMaxTxPowerDomain));
-		}
-	}
-
-	for (channelIndex=0; channelIndex<A_5G_BAND_NUM_CHANNELS; channelIndex++)
-	{
-		TI_UINT8	channelNum;
-		channelNum = channelIndex+A_5G_BAND_MIN_CHANNEL;
-		if (pRegulatoryDomain->supportedChannels_band_5[channelIndex].channelValidityPassive)
-			WLAN_OS_REPORT(("channel =%d is valid for passive \n", channelNum));
-		if (pRegulatoryDomain->supportedChannels_band_5[channelIndex].channelValidityActive)
-		{
-			WLAN_OS_REPORT(("channel =%d is valid for active TX power=%d\n", 
-				channelNum,pRegulatoryDomain->supportedChannels_band_5[channelIndex].uMaxTxPowerDomain));
-		}
-		}
-
-	WLAN_OS_REPORT(("11h PowerConstraint = %d, XCC TPC = %d, User  = %d\n", 
-		pRegulatoryDomain->uPowerConstraint, pRegulatoryDomain->uExternTxPowerPreferred,
-		pRegulatoryDomain->uUserMaxTxPower));
-
-}
diff --git a/wl1271/stad/src/AirLink_Managment/regulatoryDomain.h b/wl1271/stad/src/AirLink_Managment/regulatoryDomain.h
deleted file mode 100644
index e8a5106..0000000
--- a/wl1271/stad/src/AirLink_Managment/regulatoryDomain.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * regulatoryDomain.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file regulatoryDomain.h
- *  \brief regulatoryDomain module internal header file
- *
- *  \see regulatoryDomain.c
- */
-
-/***************************************************************************/
-/*                                                                          */
-/*    MODULE:   regulatoryDomain.h                                          */
-/*    PURPOSE:  regulatoryDomain module internal header file                */
-/*                                                                          */
-/***************************************************************************/
-#ifndef __REGULATORY_DOMAIN_H__
-#define __REGULATORY_DOMAIN_H__
-
-#include "paramOut.h"
-#include "fsm.h"
-#include "802_11Defs.h"
-
-#define BG_24G_BAND_CHANNEL_HOPS    1
-#define BG_24G_BAND_MIN_CHANNEL     1
-
-#define A_5G_BAND_CHANNEL_HOPS      4
-
-#define A_5G_BAND_MIN_MIDDLE_BAND_DFS_CHANNEL   52
-#define A_5G_BAND_MAX_MIDDLE_BAND_DFS_CHANNEL   64
-#define A_5G_BAND_MIN_UPPER_BAND_DFS_CHANNEL    100
-#define A_5G_BAND_MAX_UPPER_BAND_DFS_CHANNEL    140
-
-
-typedef struct
-{
-    TI_BOOL    channelValidityPassive; /*TI_TRUE-valid, TI_FALSE-invalid */
-    TI_BOOL    channelValidityActive; /*TI_TRUE-valid, TI_FALSE-invalid */
-    TI_BOOL    bChanneInCountryIe;
-
-    TI_UINT8   uMaxTxPowerDomain;     /* 
-									  * Holds ONLY the default limitation (Application) 
-									  * or according to 11d country code IE	
-									  * Updated on init phase or upon receiving new country code IE				  
-									  */ 
-    TI_UINT32  timestamp;
-}   channelCapability_t;
-
-
-typedef struct 
-{
-    /* Variables read from registry */
-    /********************************/   
-    /* 802.11h enabled or disabled */
-    TI_BOOL                            	spectrumManagementEnabled;
-    /* 802.11d enabled or disabled */
-    TI_BOOL                            	regulatoryDomainEnabled;
-    /* scan availability channels from registry */
-    scanControlTable_t              	scanControlTable;
-    /* Desired Temp Tx Power */
-    TI_UINT8                           	uDesiredTemporaryTxPower; 
-    /* Actual Temp Tx Power */
-    TI_UINT8                           	uTemporaryTxPower;	
-    /* User configuration for max Tx power */
-    TI_UINT8                           	uUserMaxTxPower; 
-    /* Tx Power Control adjustment flag on=TI_TRUE\off=TI_FALSE */
-    TI_BOOL                             bTemporaryTxPowerEnable;
-
-    /* Internal reg domain variables */
-    /*********************************/
-
-    /* Power Constraint IE 32 in DBM/10, valid only when 802.11h is enabled  */
-    TI_UINT8                           	uPowerConstraint;    
-    /* External TX Power Control in DBM/10, valid only when 802.11h is disabled */
-    TI_UINT8                           	uExternTxPowerPreferred;       
-
-    TI_UINT8                           	minDFS_channelNum;
-    TI_UINT8                           	maxDFS_channelNum;
-
-    TCountry                       		country24;   /* Detected County IE for 2.4 Ghz */
-    TCountry                       		country5;    /* Detected County IE for 5 Ghz */
-    TI_BOOL                            	country_2_4_WasFound;
-    TI_BOOL                            	country_5_WasFound;
-    TI_UINT32                          	uLastCountryReceivedTS;
-    TI_UINT32                          	uTimeOutToResetCountryMs;
-    channelCapability_t             	supportedChannels_band_5[A_5G_BAND_NUM_CHANNELS];
-    channelCapability_t             	supportedChannels_band_2_4[NUM_OF_CHANNELS_24];
-
-	/* set the size of the array to max of B_G & A, so that the array doesnt overflow. +3 for word alignment */
-	TI_UINT8                        	pDefaultChannels[A_5G_BAND_NUM_CHANNELS+3];
-    /* merge 4.02/4.03 evaluate the +3 above and adjust or hSiteMgr and below will be 
-       will be unaligned accesses.  Expect it might now be +1 since 2 UINT8 variable 
-       have been added in 4.03 (max and min DFS_channelNum above) */
-    
-    
-    /* Handles to other objects */
-    TI_HANDLE                       	hSiteMgr;
-    TI_HANDLE                       	hTWD;
-    TI_HANDLE                       	hSwitchChannel;
-    TI_HANDLE                       	hReport;
-    TI_HANDLE                       	hOs;
-
-
-} regulatoryDomain_t;
-
-
-
-
-
-#endif /* __REGULATORY_DOMAIN_H__*/
diff --git a/wl1271/stad/src/AirLink_Managment/regulatoryDomainApi.h b/wl1271/stad/src/AirLink_Managment/regulatoryDomainApi.h
deleted file mode 100644
index a5c576c..0000000
--- a/wl1271/stad/src/AirLink_Managment/regulatoryDomainApi.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * regulatoryDomainApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file regulatoryDomainApi.h
- *  \brief regulatoryDomain module interface header file
- *
- *  \see regulatoryDomain.c & regulatoryDomain.h
- */
-
-/***************************************************************************/
-/*                                                                          */
-/*    MODULE:   regulatoryDomainApi.h                                       */
-/*    PURPOSE:  regulatoryDomain module interface header file               */
-/*                                                                          */
-/***************************************************************************/
-#ifndef __REGULATORY_DOMAIN_API_H__
-#define __REGULATORY_DOMAIN_API_H__
-
-
-#include "802_11Defs.h"
-#include "regulatoryDomain.h"
-#include "DrvMainModules.h"
-
-TI_HANDLE regulatoryDomain_create(TI_HANDLE hOs);
-
-void      regulatoryDomain_init (TStadHandlesList *pStadHandles);
-
-TI_STATUS regulatoryDomain_SetDefaults (TI_HANDLE  hRegulatoryDomain,
-                                        regulatoryDomainInitParams_t *pRegulatoryDomainInitParams);
-/**
- * \brief	Set Regulatory Domain Parameter 
- * 
- * \param  hRegulatoryDomain	-	Handle to the regulatory domain object 
- * \param  pParam				-	Pointer to the input parameter
- * \return TI_OK on success, TI_NOK otherwise
- * 
- * \par Description
- * Configure channel validity information to the regulatory domain object.
- * called by the following:
- *	- config mgr in order to set a parameter receiving to the OS abstraction layer.
- * 	- From inside the driver
- * 
- * \sa	
- */ 
-TI_STATUS regulatoryDomain_setParam(TI_HANDLE hRegulatoryDomain, paramInfo_t *pParam);
-/**
- * \brief	Get Regulatory Domain Parameter 
- * 
- * \param  hRegulatoryDomain	-	Handle to the regulatory domain object 
- * \param  pParam				-	Pointer to the output parameter
- * \return TI_OK on success, TI_NOK otherwise
- * 
- * \par Description
- * Retrieves channel validity information from the regulatory domain object.
- * Called by the following:
- *	- Configuration Manager in order to get a parameter from the OS abstraction layer.
- *	- From inside the driver	 
- * 
- * \sa	
- */ 
-TI_STATUS regulatoryDomain_getParam(TI_HANDLE hRegulatoryDomain, paramInfo_t *pParam);
-
-TI_STATUS regulatoryDomain_destroy(TI_HANDLE hRegulatoryDomain);
-
-#endif /* __REGULATORY_DOMAIN_API_H__*/
-
-
diff --git a/wl1271/stad/src/AirLink_Managment/requestHandler.c b/wl1271/stad/src/AirLink_Managment/requestHandler.c
deleted file mode 100644
index 3090dec..0000000
--- a/wl1271/stad/src/AirLink_Managment/requestHandler.c
+++ /dev/null
@@ -1,604 +0,0 @@
-/*
- * requestHandler.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file RequestHandler.c
- *  \brief RequestHandler module interface
- *
- *  \see RequestHandler.h
- */
-
-/****************************************************************************************************/
-/*																									*/
-/*		MODULE:		RequestHandler.c																*/
-/*		PURPOSE:	RequestHandler module interface.												*/
-/*                  This module handle the incoming measurement requests. The object handle			*/
-/*					data base that stores all measurement requests from the last incoming.			*/
-/*					This module export interface function for sceduling the next requests to be		*/
-/*					executed and stores all relevent fields for constructing a measurement report.	*/
-/*																									*/
-/****************************************************************************************************/
-#define __FILE_ID__  FILE_ID_4
-#include "report.h"
-#include "osApi.h"
-#include "paramOut.h"
-#include "requestHandler.h"
-
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCRMMngrParam.h"
-#endif
-
-/* allocation vector */
-#define REQUEST_HANDLER_INIT_BIT		(1)
-
-#define DOT11_MEASUREMENT_REQUEST_ELE_ID (38)
-
-/********************************************************************************/
-/*						Internal functions prototypes.							*/
-/********************************************************************************/
-static void release_module(requestHandler_t *pRequestHandler, TI_UINT32 initVec);
-
-static TI_STATUS insertMeasurementIEToQueue(TI_HANDLE           hRequestHandler,
-											TI_UINT16			frameToken,
-											EMeasurementMode	measurementMode,
-											TI_UINT8			*pData,
-                                            TI_UINT8            *singelRequestLen);
-
-/********************************************************************************/
-/*						Interface functions Implementation.						*/
-/********************************************************************************/
-
-
-/********************************************************************************
- *                        requestHandler_create									*
- ********************************************************************************
-DESCRIPTION: RequestHandler module creation function, called by the measurement in 
-				creation phase. performs the following:
-
-				-	Allocate the RequestHandler handle
-				                                                                                                   
-INPUT:      hOs -	Handle to OS		
-
-OUTPUT:		
-
-RETURN:     Handle to the RequestHandler module on success, NULL otherwise
-************************************************************************/
-TI_HANDLE requestHandler_create(TI_HANDLE hOs)
-{
-	requestHandler_t			*pRequestHandler = NULL;
-	TI_UINT32			initVec = 0;
-	
-	
-	/* allocating the RequestHandler object */
-	pRequestHandler = os_memoryAlloc(hOs,sizeof(requestHandler_t));
-
-	if (pRequestHandler == NULL)
-		return NULL;
-
-	initVec |= (1 << REQUEST_HANDLER_INIT_BIT);
-
-	return(pRequestHandler);
-}
-
-/************************************************************************
- *                        requestHandler_config		    				*
- ************************************************************************
-DESCRIPTION: RequestHandler module configuration function, called by the measurement
-			  in configuration phase. performs the following:
-				-	Reset & initiailzes local variables
-				-	Init the handles to be used by the module
-                                                                                                   
-INPUT:      hRequestHandler	-	RequestHandler handle.
-			List of handles to be used by the module
-			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS RequestHandler_config(TI_HANDLE 	hRequestHandler,
-						TI_HANDLE		hReport,
-						TI_HANDLE		hOs)
-{
-	requestHandler_t *pRequestHandler = (requestHandler_t *)hRequestHandler;
-	
-
-	/* init variables */
-    pRequestHandler->parserRequestIEHdr = NULL;
-	pRequestHandler->numOfWaitingRequests = 0;	/*	indicating empty data base	*/
-	pRequestHandler->activeRequestID = -1;		/*			   					*/
-	pRequestHandler->hReport	= hReport;
-	pRequestHandler->hOs		= hOs;
-
-	/* Clearing the Request Array , mostly due to parallel bit */
-	os_memoryZero(pRequestHandler->hOs, pRequestHandler->reqArr, MAX_NUM_REQ * sizeof(MeasurementRequest_t));
-
-TRACE0(pRequestHandler->hReport, REPORT_SEVERITY_INIT, ": RequestHandler configured successfully\n");
-
-	return TI_OK;
-}
-
-/***********************************************************************
- *                        requestHandler_setParam									
- ***********************************************************************
-DESCRIPTION: RequestHandler set param function, called by the following:
-			-	config mgr in order to set a parameter receiving from 
-				the OS abstraction layer.
-			-	From inside the dirver	
-                                                                                                   
-INPUT:      hRequestHandler	-	RequestHandler handle.
-			pParam			-	Pointer to the parameter		
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS requestHandler_setParam(TI_HANDLE	hRequestHandler,
-								  paramInfo_t	*pParam)
-{
-	requestHandler_t *pRequestHandler = (requestHandler_t *)hRequestHandler;
-	
-	switch(pParam->paramType)
-	{
-/*	case RequestHandler_PARAM_TYPE:*/
-		
-	/*	break;*/
-		
-	default:
-TRACE1(pRequestHandler->hReport, REPORT_SEVERITY_ERROR, ": Set param, Params is not supported, %d\n\n", pParam->paramType);
-		return PARAM_NOT_SUPPORTED;
-	}
-
-/*	return TI_OK; - unreachable */
-}
-
-/***********************************************************************
- *                        requestHandler_getParam									
- ***********************************************************************
-DESCRIPTION: RequestHandler get param function, called by the following:
-			-	config mgr in order to get a parameter from the OS a
-				bstraction layer.
-			-	From inside the dirver	
-                                                                                                   
-INPUT:      hRequestHandler	-	RequestHandler handle.
-			pParam			-	Pointer to the parameter		
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS requestHandler_getParam(TI_HANDLE		hRequestHandler,
-								  paramInfo_t	*pParam)
-{
-	requestHandler_t *pRequestHandler = (requestHandler_t *)hRequestHandler;
-/*	TI_STATUS			status;*/
-	
-	switch(pParam->paramType)
-	{
-	/*case RequestHandler_PARAM:*/
-		
-		
-		/*return status;*/
-	
-	default:
-TRACE1(pRequestHandler->hReport, REPORT_SEVERITY_ERROR, ": Get param, Params is not supported, %d\n\n", pParam->paramType);
-		return PARAM_NOT_SUPPORTED;
-	}
-
-/*	return TI_OK; - unreachable */
-}
-
-/************************************************************************
- *                        RequestHandler_destroy						*
- ************************************************************************
-DESCRIPTION: RequestHandler module destroy function, called by the config 
-			 mgr in the destroy phase 
-			 performs the following:
-			 -	Free all memory aloocated by the module
-                                                                                                   
-INPUT:      hRequestHandler	-	RequestHandler handle.		
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS requestHandler_destroy(TI_HANDLE hRequestHandler)
-{
-	requestHandler_t * pRequestHandler = (requestHandler_t *)hRequestHandler;
-	TI_UINT32 initVec;
-
-	if (pRequestHandler == NULL)
-		return TI_OK;
-
-	initVec = 0xFFFF;
-	release_module(pRequestHandler, initVec);
-
-	return TI_OK;
-}
-
-/************************************************************************
- *                  requestHandler_insertRequests						*
- ************************************************************************
-DESCRIPTION: RequestHandler module parsing function, called by the 
-			  measurement object when measuremnt request frame is received.
-				performs the following:
-				-	Parsers the measurement request frame.
-				-	Inserts all requests into the queue.
-				-	Initializes each request according to the its frame 
-					token, measurement token, measurement type, parallel,
-					channel number, duration time and scan mode.
-				-	The function updates the numOfWaitingRequests variable
-					and set to zero the activeReqId.
-
-			 Note:  The activeReqId contains the index for the first request
-					that should be executed or to the current active request.
-
-INPUT:      hRequestHandler	    -	RequestHandler handle.
-			measurementMode     -	The MEasurement Object Mode.
-			measurementFrameReq -   The New Frame request that was received.
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS requestHandler_insertRequests(TI_HANDLE hRequestHandler,
-										EMeasurementMode measurementMode,
-										TMeasurementFrameRequest measurementFrameReq)
-{
-	requestHandler_t	*pRequestHandler = (requestHandler_t *)hRequestHandler;
-    TI_INT32               requestsLen = measurementFrameReq.requestsLen;
-    TI_UINT8               singelRequestLen = 0;
-    TI_UINT8               *requests = measurementFrameReq.requests;
-		    
-	if (requestsLen < 2)
-    {
-        TRACE0(pRequestHandler->hReport, REPORT_SEVERITY_ERROR, ": Invalid length of the data.\n");
-
-        return TI_NOK;
-    }
-
-	/* Inserting all measurement request into the queues */
-	while (requestsLen > 0)
-	{
-		if(insertMeasurementIEToQueue(hRequestHandler, 
-                                       measurementFrameReq.hdr->dialogToken, 
-                                       measurementMode, 
-                                       requests,
-                                       &singelRequestLen) != TI_OK )
-        {
-            requestHandler_clearRequests(hRequestHandler);
-			return TI_NOK;
-        }
-  
-		requestsLen -= singelRequestLen;
-		requests += singelRequestLen;
-      
-	}
-
-	pRequestHandler->activeRequestID = 0;
-	
-TRACE2(pRequestHandler->hReport, REPORT_SEVERITY_INFORMATION, ": Inserted into queue: activeRequestID = %d, numOfWaitingRequests = %d\n",					pRequestHandler->activeRequestID, pRequestHandler->numOfWaitingRequests);
-
-	return TI_OK;
-}
-
-/************************************************************************
- *                  requestHandler_getNextReq							*
- ************************************************************************
-DESCRIPTION: RequestHandler module function for retrieving the requests that
-				should be executed.
-				performs the following:
-				-	returns pointers to one request/several requests that
-					should be performed in parallel.
-				Note: The function updates the numOfWaitingRequests internal
-				varaible ONLY IF the returned request/s are going to be 
-				executed immediatly (isForActivation = TI_TRUE).
-
-INPUT:      hRequestHandler	-	RequestHandler handle.
-			
-  			isForActivation -	A flag that indicates if the returned 
-								request/s are going to be executed immediatly
-
-OUTPUT:		pRequest		-	pointer contains the address in which the 
-								next requests for activation should be inserted.
-		
-			numOfRequests	-	indicates how many requests should be activated
-								in parallel.
-			
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS requestHandler_getNextReq(TI_HANDLE hRequestHandler,
-									TI_BOOL	  isForActivation,
-									MeasurementRequest_t *pRequest[],
-									TI_UINT8*	  numOfRequests)
-{
-	requestHandler_t	*pRequestHandler = (requestHandler_t *)hRequestHandler;
-	TI_UINT8				requestIndex = pRequestHandler->activeRequestID;
-	TI_UINT8				loopIndex = 0;
-	
-TRACE2(pRequestHandler->hReport, REPORT_SEVERITY_INFORMATION, ": Looking for requests. activeRequestID = %d, numOfWaitingRequests = %d\n",					pRequestHandler->activeRequestID, pRequestHandler->numOfWaitingRequests);
-
-	if(pRequestHandler->numOfWaitingRequests <= 0)
-		return TI_NOK;
-
-	do{
-		pRequest[loopIndex] = &(pRequestHandler->reqArr[requestIndex]);
-		requestIndex++;
-		loopIndex++;
-	}
-	while ( (loopIndex < pRequestHandler->numOfWaitingRequests) && 
-            (pRequestHandler->reqArr[requestIndex].isParallel) );
-
-	*numOfRequests = loopIndex;
-
-TRACE1(pRequestHandler->hReport, REPORT_SEVERITY_INFORMATION, ": Found %d requests to execute in parallel.\n", loopIndex);
-
-	if(isForActivation == TI_TRUE)
-	{
-		pRequestHandler->numOfWaitingRequests -= loopIndex;
-
-TRACE1(pRequestHandler->hReport, REPORT_SEVERITY_INFORMATION, ": Requests were queried for activation so decreasing numOfWaitingRequests to %d\n", pRequestHandler->numOfWaitingRequests);
-	}
-
-	return TI_OK;
-}
-
-/************************************************************************
- *                  requestHandler_getCurrentExpiredReq					*
- ************************************************************************
-DESCRIPTION: RequestHandler module function for retrieving the request that
-				finished its execution.
-				performs the following:
-				-	returns pointers to the request that
-					finished its execution in.
-
-INPUT:      hRequestHandler	-	RequestHandler handle.
-			requestIndex	-	Index of request in the queue
-			
-OUTPUT:		pRequest		-	pointer contains the addresse of the 
-								request that finished its execution.
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS requestHandler_getCurrentExpiredReq(TI_HANDLE hRequestHandler,
-											  TI_UINT8 requestIndex,
-											  MeasurementRequest_t **pRequest)
-{
-	requestHandler_t	*pRequestHandler = (requestHandler_t *)hRequestHandler;
-	
-	requestIndex += pRequestHandler->activeRequestID;
-
-	*pRequest = &(pRequestHandler->reqArr[requestIndex]);
-
-	return TI_OK;
-}
-
-
-/************************************************************************
- *                  requestHandler_clearRequests						*
- ************************************************************************
-DESCRIPTION: RequestHandler module function for cleaning the data base.
-				performs the following:
-				-	Clears all requests from the queue by setting
-					the activeReqId and numOfWaitingRequests variables.
-			Note:	The function does not actually zero all queue 
-					variables or destroy the object.
-
-INPUT:      hRequestHandler	-	RequestHandler handle.
-			
-OUTPUT:		None
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS requestHandler_clearRequests(TI_HANDLE hRequestHandler)
-{
-	requestHandler_t	*pRequestHandler = (requestHandler_t *)hRequestHandler;
-
-	pRequestHandler->numOfWaitingRequests = 0;
-	pRequestHandler->activeRequestID = -1;
-	
-	/* Clearing the Request Array , mostly due to parallel bit */
-	os_memoryZero(pRequestHandler->hOs,pRequestHandler->reqArr,
-				  MAX_NUM_REQ * sizeof(MeasurementRequest_t));	
-	
-TRACE2(pRequestHandler->hReport, REPORT_SEVERITY_INFORMATION, ": Request queue has been cleared. activeRequestID = %d, numOfWaitingRequests = %d\n",					pRequestHandler->activeRequestID, pRequestHandler->numOfWaitingRequests);
-
-	return TI_OK;
-}
-
-
-	
-/************************************************************************
- *                  requestHandler_getFrameToken						*
- ************************************************************************
-DESCRIPTION: RequestHandler module function for getting the token of the 
-				frame that is now being processed.
-
-INPUT:      hRequestHandler	-	RequestHandler handle.
-			
-			
-OUTPUT:		frameToken
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS requestHandler_getFrameToken(TI_HANDLE hRequestHandler,TI_UINT16 *frameToken )
-{
-	requestHandler_t	*pRequestHandler = (requestHandler_t *)hRequestHandler;
-
-	if(pRequestHandler->activeRequestID == -1)
-		return TI_NOK;
-
-	*frameToken = pRequestHandler->reqArr[0].frameToken;
-	
-	return TI_OK;
-}
-
-/************************************************************************
- *              requestHandler_setRequestParserFunction					*
- ************************************************************************
-DESCRIPTION: RequestHandler module function for setting the function that
-             parasers a request IE.
-
-INPUT:      hRequestHandler	-	RequestHandler handle.
-            parserRequestIE -   A pointer to the function.
-			
-			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/	
-TI_STATUS requestHandler_setRequestParserFunction(TI_HANDLE hRequestHandler, 
-                                                  parserRequestIEHdr_t parserRequestIEHdr)
-{
-	requestHandler_t	*pRequestHandler = (requestHandler_t *)hRequestHandler;
-
-    pRequestHandler->parserRequestIEHdr = parserRequestIEHdr;
-
-    return TI_OK;
-}
-
-/********************************************************************************/
-/*						Internal functions Implementation.						*/
-/********************************************************************************/
-
-/************************************************************************
- *                  insertMeasurementIEToQueue							*
- ************************************************************************
-DESCRIPTION: The function inserts measurement request of one received 
-				measurement request information element.
-
-INPUT:      hRequestHandler	-	A Handler to the Request Handler Object.
-			frameToken		-	Frame token of the received frame in which
-								This current measurement request IE is included.
-            measurementObjMode - XCC or SPECTRUM_MNGMNT
-			dataLen			-	pointer to the data length that is left.
-			pData			-	pointer to the data.
-			
-OUTPUT:		singelRequestLen - The Length of the request that was inserted 
-                               to the queue.
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-static TI_STATUS insertMeasurementIEToQueue(TI_HANDLE           hRequestHandler,
-											TI_UINT16				frameToken,
-											EMeasurementMode	measurementObjMode,
-											TI_UINT8				*pData,
-                                            TI_UINT8               *singelRequestLen)
-{
-   	requestHandler_t	*pRequestHandler = (requestHandler_t *)hRequestHandler;
-
-	TI_UINT16		HeaderLen;
-	TI_UINT8		measurementMode;
-	TI_UINT8		parallelBit;
-	TI_UINT8		enableBit;
-    TI_UINT16       measurementToken;
-	
-	MeasurementRequest_t	*pCurrRequest = &(pRequestHandler->reqArr[pRequestHandler->numOfWaitingRequests]);
-
-    if (pRequestHandler->parserRequestIEHdr(pData, &HeaderLen, &measurementToken) != TI_OK)
-    {
-        return TI_NOK;
-    }
-
-	pCurrRequest->frameToken = frameToken;	
-	pCurrRequest->measurementToken = measurementToken;
-
-    pData += HeaderLen;
-
-    /*** Getting the Measurement Mode ***/
-	measurementMode		= *pData++;
-
-	/* getting parallel bit */
-	parallelBit = measurementMode & 0x1;
-	
-    /* getting Enable bit */
-	enableBit = (measurementMode & 0x2)>>1;
-	
-    /* checking enable bit, the current implementation does not support 
-		enable bit which set to one, so there is no need to check request/report bits	*/
-	if(enableBit == 1)
-		return TI_OK;
-    
-    pCurrRequest->isParallel = parallelBit;
-
-
-    /* Getting the Measurement Mode */
-   	pCurrRequest->Type = (EMeasurementType)(*pData++);
-
-	/* Inserting the request that is included in the current measurement request IE. */
-	pCurrRequest->channelNumber = *pData++;
-    
-	pCurrRequest->ScanMode = (EMeasurementScanMode)(*pData++); /* IN dot11h - Spare = 0 */
-
-    COPY_WLAN_WORD(&pCurrRequest->DurationTime, pData);
-	
-	*singelRequestLen = HeaderLen + 6;
-
-	pRequestHandler->numOfWaitingRequests ++;
-	
-	return TI_OK;
-}
-
-
-/***********************************************************************
- *                        release_module									
- ***********************************************************************
-DESCRIPTION:	Called by the destroy function or by the create function 
-				(on failure). Go over the vector, for each bit that is 
-				set, release the corresponding module.
-                                                                                                   
-INPUT:      pRequestHandler	-	RequestHandler pointer.
-			initVec			-	Vector that contains a bit set for each 
-								module thah had been initiualized
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static void release_module(requestHandler_t *pRequestHandler, TI_UINT32 initVec)
-{
-	
-	if ( initVec & (1 << REQUEST_HANDLER_INIT_BIT) )
-		os_memoryFree(pRequestHandler->hOs, pRequestHandler, sizeof(requestHandler_t));
-		
-	initVec = 0;
-}
-
-
-
-
-
-
diff --git a/wl1271/stad/src/AirLink_Managment/requestHandler.h b/wl1271/stad/src/AirLink_Managment/requestHandler.h
deleted file mode 100644
index 6b59f22..0000000
--- a/wl1271/stad/src/AirLink_Managment/requestHandler.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * requestHandler.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file requestHandler.h
- *  \brief Request Handler module interface header file
- *
- *  \see requestHandler.c
- */
-
-/***************************************************************************/
-/*                                                                          */
-/*    MODULE:   requestHandler.h                                            */
-/*    PURPOSE:  Request Handler module interface header file                */
-/*                                                                          */
-/***************************************************************************/
-#ifndef __REQUEST_HANDLER_H__
-#define __REQUEST_HANDLER_H__
-
-#include "paramOut.h"
-#include "802_11Defs.h"
-#include "measurementMgrApi.h"
-
-
-typedef struct 
-{
-    EMeasurementType            Type;
-    TI_BOOL                     isParallel; 
-    TI_UINT16                   frameToken; 
-    TI_UINT16                   measurementToken;
-    TI_UINT8                    channelNumber;
-    TI_UINT16                   DurationTime;
-    TI_UINT8                    ActualDurationTime;
-    EMeasurementScanMode        ScanMode;
-} MeasurementRequest_t;
-
-
-/* Functions Pointers Definitions */
-typedef TI_STATUS (*parserRequestIEHdr_t)   (TI_UINT8 *pData, TI_UINT16 *reqestLen,
-                                             TI_UINT16 *measurementToken);
-
-typedef struct 
-{
-    /* Function to the Pointer */
-    parserRequestIEHdr_t    parserRequestIEHdr;
-
-    /* General Params */
-    MeasurementRequest_t    reqArr[MAX_NUM_REQ];
-    TI_UINT8                numOfWaitingRequests;   
-    TI_INT8                 activeRequestID;
-
-    /* Handlers */
-    TI_HANDLE               hReport;
-    TI_HANDLE               hOs;
-} requestHandler_t;
-
-
-
-TI_HANDLE requestHandler_create(TI_HANDLE hOs);
-
-TI_STATUS RequestHandler_config(TI_HANDLE   hRequestHandler,
-                                TI_HANDLE       hReport,
-                                TI_HANDLE       hOs);
-
-TI_STATUS requestHandler_setParam(TI_HANDLE hRequestHandler,
-                                  paramInfo_t   *pParam);
-
-TI_STATUS requestHandler_getParam(TI_HANDLE     hRequestHandler,
-                                            paramInfo_t *pParam);
-
-TI_STATUS requestHandler_destroy(TI_HANDLE hRequestHandler);
-
-TI_STATUS requestHandler_insertRequests(TI_HANDLE hRequestHandler,
-                                        EMeasurementMode measurementMode,
-                                        TMeasurementFrameRequest measurementFrameReq);
-
-TI_STATUS requestHandler_getNextReq(TI_HANDLE hRequestHandler,
-                                    TI_BOOL   isForActivation,
-                                    MeasurementRequest_t *pRequest[],
-                                    TI_UINT8*     numOfRequests);
-
-TI_STATUS requestHandler_getCurrentExpiredReq(TI_HANDLE hRequestHandler,
-                                              TI_UINT8 requestIndex,
-                                              MeasurementRequest_t **pRequest);
-
-TI_STATUS requestHandler_clearRequests(TI_HANDLE hRequestHandler);
-
-TI_STATUS requestHandler_getFrameToken(TI_HANDLE hRequestHandler,TI_UINT16 *frameToken );
-
-TI_STATUS requestHandler_setRequestParserFunction(TI_HANDLE hRequestHandler, 
-                                                  parserRequestIEHdr_t parserRequestIEHdr);
-
-
-#endif /* __REQUEST_HANDLER_H__*/
diff --git a/wl1271/stad/src/AirLink_Managment/spectrumMngmntMgr.c b/wl1271/stad/src/AirLink_Managment/spectrumMngmntMgr.c
deleted file mode 100644
index 5bc2b02..0000000
--- a/wl1271/stad/src/AirLink_Managment/spectrumMngmntMgr.c
+++ /dev/null
@@ -1,564 +0,0 @@
-/*
- * spectrumMngmntMgr.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file spectrumMngmntMgr.c
- *  
- *
- *  \see spectrumMngmntMgr.h
- */
-
-/****************************************************************************************************/
-/*																									*/
-/*		MODULE:		spectrumMngmntMgr.c																*/
-/*		PURPOSE:	                                            									*/
-/*																						 			*/
-/****************************************************************************************************/
-
-#define __FILE_ID__  FILE_ID_6
-#include "report.h"
-#include "osApi.h"
-#include "siteMgrApi.h"
-#include "regulatoryDomainApi.h"
-#include "mlmeBuilder.h"
-#include "Ctrl.h"
-#include "spectrumMngmntMgr.h"
-
-#define RADAR_THRESHOLD_IN_PRECENTS		  (5)
-#define DOT11H_REQUEST_IE_HDR_LEN          3
-#define DOT11H_REQUEST_IE_LEN              7
-#define DOT11_MEASUREMENT_REQUEST_ELE_ID (38)
-
-
-/********************************************************************************/
-/*						Internal functions prototypes.							*/
-/********************************************************************************/
-
-/* The following function uses features from the old Measurement module. */
-/* It will have to be adapted to using the new Measurement Manager. */
-#if 0
-
-static void buildMapSubFieldForBasicReport(TI_HANDLE hMeasurementMgr, TI_UINT8* map);
-
-#endif
-
-
-/********************************************************************************/
-/*						Internal Structures.        							*/
-/********************************************************************************/
-typedef struct
-{
-    TI_UINT8   dialogToken;
-    TI_UINT8   activatioDelay;
-    TI_UINT8   measurementOffset;
-} dot11hFrameReqHdr_t;
-
-typedef struct
-{
-    TI_UINT8  IeId;
-    TI_UINT8  Length;
-    TI_UINT8  Token;
-} dot11hReqIEHdr_t;
-
-/********************************************************************************/
-/*						Interface functions Implementation.						*/
-/********************************************************************************/
-
-/***************************************************************************
- * NOTE: The next 3 functions represent the following situations: Receiving
- *       of TPC request, receving Quite IE and receiving Switch Channel IE.
- *       The Measurement SM should be updated to handle this states.
- ***************************************************************************/
-
-
-/***********************************************************************
- *                   measurementMgr_getBasicMeasurementParam									
- ***********************************************************************
-DESCRIPTION:	
-				
-				
-INPUT:      hMeasurementMgr	    -	MeasurementMgr Handle
-			
-OUTPUT:		pAcxStatisitics     -   
-            pMediumOccupancy    -   
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-
-/* The following function uses features from the old Measurement module. */
-/* It will have to be adapted to using the new Measurement Manager. */
-#if 0
-
-TI_STATUS measurementMgr_getBasicMeasurementParam(TI_HANDLE hMeasurementMgr,
-										  acxStatisitcs_t*	pAcxStatisitics,
-										  mediumOccupancy_t* pMediumOccupancy)
-{
-
-	whalParamInfo_t	whalParam;
-    measurementMgr_t *pMeasurementMgr = (measurementMgr_t*)hMeasurementMgr;
-
-	/* getting the ACX statisitc counters by calling the HAL */ 
-	whalParam.paramType = HAL_CTRL_ACX_STATISTICS_PARAM;
-	if( (status = whalCtrl_GetParam(pMeasurementMgr->hHalCtrl,&whalParam)) == TI_OK)
-	{
-		pAcxStatisitics->FWpacketReceived = whalParam.content.acxStatisitics.FWpacketReceived;	
-		pAcxStatisitics->HALpacketReceived	= whalParam.content.acxStatisitics.HALpacketReceived;
-	}
-	
-	/*FIXME*/
-	WLAN_OS_REPORT(("-------------- FW total---------------, %d\n\n", 
-                    pAcxStatisitics->FWpacketReceived));
-	WLAN_OS_REPORT(("-------------- Driver Total---------------, %d\n\n", 
-                    pAcxStatisitics->HALpacketReceived));
-
-    /*******************************************************
-    * NOTE: If not using a call back function the required *
-    *       information will not be received               *
-    *******************************************************/
-	/* getting the Medium Occupancy by calling the HAL */ 
-	whalParam.paramType = HAL_CTRL_MEDIUM_OCCUPANCY_PARAM;
-    whalParam.content.interogateCmdCBParams.CB_Func = NULL;
-    whalParam.content.interogateCmdCBParams.CB_handle = hMeasurementMgr;
-    whalParam.content.interogateCmdCBParams.CB_buf = NULL;
-
-	if( (status = whalCtrl_GetParam(pMeasurementMgr->hHalCtrl,&whalParam)) == TI_OK)
-	{
-        return status;
-	}
-
-	return status;
-}
-
-#endif
-
-/***********************************************************************
- * NOTE: The next 4 functions (dot11h...) should be corrected according 
- *       to the 802.11h standered.
- ***********************************************************************/
-
-/************************************************************************
-*					measurementMgr_dot11hParserFrameReq					*
-************************************************************************
-DESCRIPTION: Frame Request Parser function, called by the Measurement 
-             object when a measurement request frame is received. 
-				performs the following:
-				-	Parsers the received frame request.
-					
-INPUT:      hMeasurementMgr - MeasurementMgr Handle
-			pData			- The frame request
-            dataLen         - The frame'sa length
-
-OUTPUT:		fraemReq        - The Parsered Frame Request
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS measurementMgr_dot11hParseFrameReq(TI_HANDLE hMeasurementMgr, 
-                                           TI_UINT8 *pData, TI_INT32 dataLen,
-                                           TMeasurementFrameRequest *frameReq)
-{
-    dot11hFrameReqHdr_t     *dot11hFrameReqHdr;
-
-    dot11hFrameReqHdr = (dot11hFrameReqHdr_t*)pData;
-    
-    frameReq->hdr->dialogToken = (TI_UINT16)dot11hFrameReqHdr->dialogToken;
-    frameReq->hdr->activatioDelay = dot11hFrameReqHdr->activatioDelay;
-    frameReq->hdr->measurementOffset = dot11hFrameReqHdr->measurementOffset;
-
-    frameReq->requests = pData + DOT11H_REQUEST_IE_HDR_LEN;
-    frameReq->requestsLen = dataLen - DOT11H_REQUEST_IE_HDR_LEN;
-
-    return TI_OK;
-}
-
-/************************************************************************
- *					measurementMgr_dot11hParserRequestIEHdr				*
- ************************************************************************
-DESCRIPTION: Spectrom Manager Request IE Header Parser function, 
-             called by the Request Handler object when inserting 
-             a request IE to the queue. 
-				performs the following:
-				-	Parsers the received request IE hdr.
-					
-INPUT:      hRequestHandler	-	Request Handler handle
-			pData			-	The request IE
-
-OUTPUT:		reqestLen           - The Request length
-            measurementToken    - The Request IE token
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS measurementMgr_dot11hParseRequestIEHdr(TI_UINT8 *pData, TI_UINT16 *reqestHdrLen,
-                                               TI_UINT16 *measurementToken)
-{
-    dot11hReqIEHdr_t *dot11hReqIEHdr;
-    
-    dot11hReqIEHdr = (dot11hReqIEHdr_t*)pData;
-    
-    /* checking if received the correct information element ID */
-    if(dot11hReqIEHdr->IeId != DOT11_MEASUREMENT_REQUEST_ELE_ID)
-        return TI_NOK;
-        
-    /* checking that len is valid */
-    if(dot11hReqIEHdr->Length != DOT11H_REQUEST_IE_LEN)
-        return TI_NOK;
-    
-    *measurementToken = (TI_UINT16)dot11hReqIEHdr->Token;
-    
-    *reqestHdrLen = DOT11H_REQUEST_IE_HDR_LEN;
-    
-    return TI_OK;
-}
-
-/************************************************************************
- *					measurementMgr_dot11hIsTypeValid         				*
- ************************************************************************
-DESCRIPTION: Spectrom Manager function that checks if the given 
-             measurement type is valid. 
-					
-INPUT:      hMeasurementMgr -	MeasurementMgr Handle
-            type			-	The measurement type.
-            scanMode        -   The Measurement scan Mode.
-
-OUTPUT:		
-
-RETURN:     TI_TRUE if type is valid, TI_FALSE otherwise
-
-************************************************************************/
-TI_BOOL measurementMgr_dot11hIsTypeValid(TI_HANDLE hMeasurementMgr, 
-                                         EMeasurementType type, 
-                                         EMeasurementScanMode scanMode)
-{
-    if(type != MSR_TYPE_BASIC_MEASUREMENT)
-        return TI_FALSE;
-
-    return TI_TRUE;
-}
-
-/***********************************************************************
- *                  measurementMgr_dot11hBuildRejectReport							
- ***********************************************************************
-DESCRIPTION:	Send reject measurement report frame Function.
-                The function does the following:
-				-	checking the reason for reject.
-				-	builds measurement report Frame.
-				-	Calls the mlmeBuolder to allocate a mangement frame
-					and to transmit it.
-				
-INPUT:      hMeasurementMgr -	MeasurementMgr Handle
-			pRequestArr		-	Array of pointer to all measurement 
-								request that should be rejected.
-			numOfRequestsInParallel - indicates the number of 
-								request that should be rejected.
-			rejectReason	-	Indicated the rejection reason.
-
-OUTPUT:		None
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS measurementMgr_dot11hBuildRejectReport(TI_HANDLE hMeasurementMgr,
-											MeasurementRequest_t* pRequestArr[],
-											TI_UINT8	numOfRequestsInParallel,
-											EMeasurementRejectReason	rejectReason)
-{
-	measurementMgr_t	*pMeasurementMgr	 = (measurementMgr_t*)hMeasurementMgr;
-	MeasurementReportFrame_t	measurementReport;
-	TI_UINT8						measurementMode = 0;
-
-	/* Building the measurement report frame contents */
-	measurementReport.actionField[0] = CATAGORY_SPECTRUM_MANAGEMENT;
-	measurementReport.actionField[1] = MEASUREMENT_REPORT;
-	measurementReport.dialogToken = (TI_UINT8)pRequestArr[0]->frameToken;
-
-	measurementReport.hdr[0] = DOT11_MEASUREMENT_REPORT_ELE_ID;
-	measurementReport.hdr[1] = DOT11_MIN_MEASUREMENT_REPORT_IE_LEN;
-	measurementReport.measurementToken = (TI_UINT8)pRequestArr[0]->measurementToken;
-	measurementReport.measurementType = pRequestArr[0]->Type;
-	
-	/* Building the measurement mode bit field */
-
-	/* setting Parallel Bit */
-	if(numOfRequestsInParallel > 0 )
-		measurementMode |= 0x1;
-	
-	/* setting Incapable and Refused bits */
-	switch(rejectReason)
-	{
-		case MSR_REJECT_DTIM_OVERLAP:
-		case MSR_REJECT_DURATION_EXCEED_MAX_DURATION:
-		case MSR_REJECT_TRAFFIC_INTENSITY_TOO_HIGH:
-		case MSR_REJECT_SCR_UNAVAILABLE:
-		case MSR_REJECT_INVALID_CHANNEL:
-		case MSR_REJECT_NOISE_HIST_FAIL:
-		case MSR_REJECT_CHANNEL_LOAD_FAIL:
-		case MSR_REJECT_EMPTY_REPORT:
-		case MSR_REJECT_MAX_DELAY_PASSED:
-		case MSR_REJECT_INVALID_MEASUREMENT_TYPE:
-		{
-			/* Setting the Refused bit */
-			measurementMode |= 0x4;
-			break;
-		}
-	
-		default:
-		{
-TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, "Reject reason is not supported, %d\n\n", rejectReason);
-
-			break;
-		}
-	}
-	
-	measurementReport.measurementMode = measurementMode;
-TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_WARNING, "Measurement was rejected due to %d,\n\n", rejectReason);
-
-	/* Note: The Measurement report reject frame body includes 8 TI_UINT8 */
-	return mlmeBuilder_sendFrame(pMeasurementMgr->hMlme,ACTION,(TI_UINT8*)&measurementReport,8,0);
-}
-
-
-/***********************************************************************
- *                        measurementMgr_dot11hBuildReport							
- ***********************************************************************
-DESCRIPTION:	build measurement report Function.
-                The function does the following:
-				-	builds measurement report IE.
-				
-INPUT:      hMeasurementMgr -	MeasurementMgr Handle
-			pRequestArr		-	Array of pointer to all measurement 
-								request that should be reported.
-			numOfRequestsInParallel - indicates the number of 
-								request that should be reported.
-			
-OUTPUT:		None
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS measurementMgr_dot11hBuildReport(TI_HANDLE hMeasurementMgr, MeasurementRequest_t request, TMeasurementTypeReply * reply)
-{
-	/*measurementMgr_t				*pMeasurement	 = (measurementMgr_t*)hMeasurementMgr;*/
-	MeasurementReportFrame_t	measurementReport;
-	TI_UINT8						totalReportLen = 0;
-	TI_UINT8						map = 0;
-	TI_UINT8*						pMeasurReport = (TI_UINT8 *)&(measurementReport.measurementReports[0]);
-
-	/* Building the measurement report frame contents */
-	measurementReport.actionField[0] = CATAGORY_SPECTRUM_MANAGEMENT;
-	measurementReport.actionField[1] = MEASUREMENT_REPORT;
-	measurementReport.dialogToken = (TI_UINT8)request.frameToken;
-
-	measurementReport.hdr[0] = DOT11_MEASUREMENT_REPORT_ELE_ID;
-	measurementReport.measurementToken = (TI_UINT8)request.measurementToken;
-	
-	/* setting Parallel Bit in the measurement mode */
-	if(request.isParallel)
-		measurementReport.measurementMode = 0x1;
-	
-	measurementReport.measurementType = request.Type;
-	
-	
-	/* Building the reports included in the current measurement report IE */
-	/* Note: The current implementation supports only Basic Report */
-	if(request.Type == MSR_TYPE_BASIC_MEASUREMENT)
-	{		
-			*pMeasurReport++ = request.channelNumber;
-			*pMeasurReport++ = (TI_UINT8)request.DurationTime;
-
-/* The following function uses features from the old Measurement module. */
-/* It will have to be adapted to using the new Measurement Manager. */
-#if 0
-			/* building the map subfield */
-			buildMapSubFieldForBasicReport(hMeasurementMgr,&map);
-#endif /* 0 */
-
-			*pMeasurReport++ = map;
-			totalReportLen += 3;
-	}
-	return TI_OK;
-}
-
-/***********************************************************************
- *                   measurementMgr_dot11hSendReportAndCleanObject							
- ***********************************************************************
-DESCRIPTION:	Send measurement report frame Function.
-                The function does the following:
-				-	Calls the mlmeBuilder to allocate a mangement frame
-					and to transmit it.
-				-	Cleans the Measurement Object and reset its Params.
-				
-INPUT:      hMeasurementMgr -	MeasurementMgr Handle
-			
-OUTPUT:		None
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS measurementMgr_dot11hSendReportAndCleanObject(TI_HANDLE hMeasurementMgr)
-{
-    measurementMgr_t	*pMeasurementMgr = (measurementMgr_t*)hMeasurementMgr;
-	TI_STATUS		status;
-
-	/* Building the Report Frame Header */
-	/* TO DO */
-
-    if(pMeasurementMgr->frameLength != 0)
-    {
-        /* Setting the IE Length field */
-        /* TO DO */
-
-        /* Sending the Rport Frame */
-        status =  mlmeBuilder_sendFrame(pMeasurementMgr->hMlme,ACTION,
-                                        (TI_UINT8*)&pMeasurementMgr->dot11hFrameReport,
-                                        sizeof(dot11_ACTION_FIELD_t) + sizeof(TI_UINT8) + 
-                                        sizeof(dot11_eleHdr_t) + 
-                                        DOT11_MIN_MEASUREMENT_REPORT_IE_LEN + 
-                                        pMeasurementMgr->frameLength,0);
-        if(status != TI_OK)
-            return status;
-        
-        /* clearing reports data base */
-        os_memoryZero(pMeasurementMgr->hOs,&(pMeasurementMgr->dot11hFrameReport),
-            sizeof(MeasurementReportFrame_t));
-        pMeasurementMgr->frameLength = 0;
-		pMeasurementMgr->nextEmptySpaceInReport = 0;
-	}
-
-	/* Reset the Measurement Object Params */
-	pMeasurementMgr->currentFrameType = MSR_FRAME_TYPE_NO_ACTIVE;
-	requestHandler_clearRequests(pMeasurementMgr->hRequestH);
-
-	return TI_OK;
-}
-
-
-/********************************************************************************/
-/*						Internal functions Implementation.						*/
-/********************************************************************************/
-
-
-
-/***********************************************************************
- *                     buildMapSubFieldForBasicReport									
- ***********************************************************************
-DESCRIPTION:	
-				
-				
-INPUT:      hMeasurementMgr -	MeasurementMgr Handle
-
-OUTPUT:		map             -   
-
-RETURN:     None
-************************************************************************/
-
-/* The following function uses features from the old Measurement module. */
-/* It will have to be adapted to using the new Measurement Manager. */
-#if 0
-
-static void buildMapSubFieldForBasicReport(TI_HANDLE hMeasurementMgr,TI_UINT8* map)
-{
-
-
-	TI_INT32	deltaHALReceivedPacked;
-	TI_INT32	deltaFWReceivedPacked;
-	TI_INT32	deltaFCSError;
-	TI_INT32	periodTimeDelta;
-	TI_INT32	occupancyDelta;
-    measurementMgr_t* pMeasurementMgr = (measurementMgr_t*)hMeasurementMgr;
-	
-	/* getting the AcxStatisitcs from the FW */
-    /* NOTE: The medium occupancy will not be updated - FIX */
-
-/* The following function uses features from the old Measurement module. */
-/* It will have to be adapted to using the new Measurement Manager. */
-#if 0
-	measurementMgr_getBasicMeasurementParam(hMeasurementMgr, &pMeasurementMgr->acxStatisticEnd,
-                                         &pMeasurementMgr->mediumOccupancyEnd);
-#endif
-
-	/* Calculating the delta for packetReceived from the HAL*/
-	deltaHALReceivedPacked = pMeasurementMgr->acxStatisticEnd.HALpacketReceived - 
-                             pMeasurementMgr->acxStatisticStart.HALpacketReceived; 
-	
-	if(deltaHALReceivedPacked < 0)
-TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, "HAL delta packets is negative , %d\n\n", deltaHALReceivedPacked);
-	
-	if(deltaHALReceivedPacked != 0 )
-		*map = DOT11_BSS_ONLY;
-	else
-	{
-		/* Calculating the delta for FCS Error*/
-		deltaFWReceivedPacked = pMeasurementMgr->acxStatisticEnd.FWpacketReceived - 
-                                pMeasurementMgr->acxStatisticStart.FWpacketReceived;
-		
-		if(deltaFWReceivedPacked < 0)
-        {
-TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, "FW delta packets is negative , %d\n\n", deltaFWReceivedPacked);
-        }
-
-		deltaFCSError = deltaFWReceivedPacked - deltaHALReceivedPacked;
-		
-		if(deltaFCSError < 0)
-        {
-TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, "FCS error is negative , %d\n\n", deltaFCSError);
-        }
-
-		if(deltaFCSError != 0 )
-			*map = DOT11_OFDM_ONLY;
-		else
-		{
-			/* Calculating the delta for Medium occupancy */
-			occupancyDelta = pMeasurementMgr->mediumOccupancyEnd.MediumUsage - 
-                             pMeasurementMgr->mediumOccupancyStart.MediumUsage;
-
-			if(occupancyDelta < 0)
-            {
-TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, "Medium Occupancy is negative , %d\n\n", occupancyDelta);
-            }
-
-			periodTimeDelta = pMeasurementMgr->mediumOccupancyEnd.Period - 
-                              pMeasurementMgr->mediumOccupancyStart.Period;
-			
-			if(periodTimeDelta < 0)
-            {
-TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_ERROR, "Period time delta is negative , %d\n\n", periodTimeDelta);
-            }
-			
-			if( ((occupancyDelta * 100) / periodTimeDelta)  > RADAR_THRESHOLD_IN_PRECENTS )
-				*map = DOT11_RADAR_AND_UNIDENTIFIED;
-			else
-				*map = 0;
-		}
-	}
-
-	return;
-}
-
-#endif /* 0 */
diff --git a/wl1271/stad/src/AirLink_Managment/spectrumMngmntMgr.h b/wl1271/stad/src/AirLink_Managment/spectrumMngmntMgr.h
deleted file mode 100644
index b162efc..0000000
--- a/wl1271/stad/src/AirLink_Managment/spectrumMngmntMgr.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * spectrumMngmntMgr.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file spectrumMngmntMgr.h
- *  \brief dot11h spectrum Management Meneger module interface header file
- *
- *  \see spectrumMngmntMgr.c
- */
-
-/***************************************************************************/
-/*																			*/
-/*	  MODULE:	spectrumMngmntMgr.h											*/
-/*    PURPOSE:	dot11h spectrum Management Meneger module interface         */
-/*              header file                                        			*/
-/*																			*/
-/***************************************************************************/
-#ifndef __SPECTRUMMNGMNTMGR_H__
-#define __SPECTRUMMNGMNTMGR_H__
-
-#include "paramOut.h"
-#include "measurementMgr.h"
-#include "requestHandler.h"
-
-
-
-TI_STATUS measurementMgr_receiveQuietIE(TI_HANDLE hMeasurementMgr,
-								  TI_UINT8		quietCount,
-								  TI_UINT8		quietPeriod,
-								  TI_UINT16	quietDuration,
-								  TI_UINT16	quietOffset);
-
-
-TI_STATUS measurementMgr_receiveTPCRequest(TI_HANDLE hMeasurementMgr,
-										TI_UINT8		dataLen,
-										TI_UINT8		*pData);
-
-TI_STATUS measurementMgr_dot11hParseFrameReq(TI_HANDLE hMeasurementMgr, 
-                                           TI_UINT8 *pData, TI_INT32 dataLen,
-                                           TMeasurementFrameRequest *frameReq);
-
-TI_STATUS measurementMgr_dot11hParseRequestIEHdr(TI_UINT8 *pData, TI_UINT16 *reqestHdrLen,
-                                               TI_UINT16 *measurementToken);
-
-TI_BOOL      measurementMgr_dot11hIsTypeValid(TI_HANDLE hMeasurementMgr, 
-                                              EMeasurementType type, 
-                                              EMeasurementScanMode scanMode);
-
-TI_STATUS measurementMgr_dot11hBuildReport(TI_HANDLE hMeasurementMgr, MeasurementRequest_t request, TMeasurementTypeReply * reply);
-
-TI_STATUS measurementMgr_dot11hSendReportAndCleanObject(TI_HANDLE hMeasurementMgr);
-
-TI_STATUS measurementMgr_dot11hBuildRejectReport(TI_HANDLE hMeasurementMgr,
-											 MeasurementRequest_t *pRequestArr[],
-											 TI_UINT8		numOfRequestsInParallel,
-											 EMeasurementRejectReason	rejectReason);
-
-
-/* The following function uses features from the old Measurement module. */
-/* It will have to be adapted to using the new Measurement Manager. */
-#if 0
-
-TI_STATUS measurementMgr_getBasicMeasurementParam(TI_HANDLE hMeasurementMgr,
-										  acxStatisitcs_t*	pAcxStatisitics,
-										  mediumOccupancy_t* pMediumOccupancy);
-#endif /* 0 */
-
-
-
-#endif /* __SPECTRUMMNGMNTMGR_H__ */
diff --git a/wl1271/stad/src/Application/roamingMngr.c b/wl1271/stad/src/Application/roamingMngr.c
deleted file mode 100644
index c5939d5..0000000
--- a/wl1271/stad/src/Application/roamingMngr.c
+++ /dev/null
@@ -1,1366 +0,0 @@
-/*
- * roamingMngr.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file roamingMngr.c
- *  \brief Roaming Manager
- *
- *  \see roamingMngrApi.h
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Roaming Manager                                               *
- *   PURPOSE:                                                               *
- *   Roaming manager is responsible to receive Roaming triggers and try
- *      to select a better AP.
- *      The Roaming triggers are: Low RSSI, PER, consecutive No ACK on TX,
- *      beacon Missed or External request.
- *      In each Internal Roaming request, scan is performed and selection for 
- *      better AP. Better AP is defined as a different AP with better RSSI,
- *      and similar SSID and security settings.
- *      If better AP is found, there is a check for fast-roaming via the
- *      Supplicant. Then connection to the new AP is invoked.
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_8
-#include "osApi.h"
-
-#include "paramOut.h"
-#include "report.h"
-#include "fsm.h"
-#include "GenSM.h"
-#include "scanMngrApi.h"
-#include "roamingMngrApi.h"
-#include "apConnApi.h"
-#include "roamingMngrTypes.h"
-#include "bssTypes.h"
-#include "DrvMainModules.h"
-#include "TWDriver.h"
-#include "siteMgrApi.h"
-#include "roamingMngr_manualSM.h"
-#include "roamingMngr_autoSM.h"
-#include "currBss.h"
-#include "currBssApi.h"
-#include "EvHandler.h"
-
-/*-----------*/
-/* Constants */
-/*-----------*/
-
-/* Init bits */
-#define ROAMING_MNGR_CONTEXT_INIT_BIT       1
-#define ROAMING_MNGR_SM_INIT_BIT            2
-
-#define DEFAULT_AP_QUALITY                  (-70)
-#define DEFAULT_LOW_PASS_FILTER             (30)
-#define DEFAULT_DATA_RETRY_THRESHOLD        (20)
-#define DEFAULT_LOW_QUALITY_SCAN_COND       (-60)
-#define DEFAULT_NORMAL_QUALITY_SCAN_COND    (-50)
-#define DEFAULT_LOW_RSSI                    (-70)
-#define DEFAULT_LOW_SNR                     (0)
-#define DEFAULT_TBTT_4_BSS_LOSS             (10)
-#define DEFAULT_LOW_TX_RATE                 (2)
-
-
-/*--------------*/
-/* Enumerations */
-/*--------------*/
-
-/*----------*/
-/* Typedefs */
-/*----------*/
-
-/*------------*/
-/* Structures */
-/*------------*/
-
-
-/************** callback funtions called by AP Connection **************/
-/* called when a trigger for Roaming occurs */
-TI_STATUS roamingMngr_triggerRoamingCb(TI_HANDLE hRoamingMngr, void *pData, TI_UINT16 reasonCode);
-/* called when CONN status event occurs */
-TI_STATUS roamingMngr_connStatusCb(TI_HANDLE hRoamingMngr, void *pData);
-/* called when Neighbor APs is updated */
-TI_STATUS roamingMngr_updateNeighborApListCb(TI_HANDLE hRoamingMngr, void *pData);
-
-/* internal functions */
-static void roamingMngr_releaseModule(roamingMngr_t *pRoamingMngr, TI_UINT32 initVec);
-
-#ifdef TI_DBG
-/* debug function */
-static void roamingMngr_printStatistics(TI_HANDLE hRoamingMngr);
-static void roamingMngr_resetStatistics(TI_HANDLE hRoamingMngr);
-#endif
-
-/**
-*
-* roamingMngr_releaseModule
-*
-* \b Description: 
-*
-* Called by the un load function
-* Go over the vector, for each bit that is set, release the corresponding module.
-*
-* \b ARGS:
-*
-*  I   - pRoamingMngr - Roaming Manager context  \n
-*  I   - initVec - indicates which modules should be released
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa roamingMngr_create
-*/
-static void roamingMngr_releaseModule(roamingMngr_t *pRoamingMngr, TI_UINT32 initVec)
-{
-
-    if (pRoamingMngr==NULL)
-    {
-        return;
-    }
-    if (initVec & (1 << ROAMING_MNGR_SM_INIT_BIT))
-    {
-        genSM_Unload(pRoamingMngr->hRoamingSm);
-    }
-
-    if (initVec & (1 << ROAMING_MNGR_CONTEXT_INIT_BIT))
-    {
-        os_memoryFree(pRoamingMngr->hOs, pRoamingMngr, sizeof(roamingMngr_t));
-    }
-
-    initVec = 0;
-}
-
-/**
-*
-* roamingMngr_triggerRoamingCb 
-*
-* \b Description: 
-*
-* This procedure is called when Roaming should be triggered
- * due to one of apConn_roamingTrigger_e Roaming Reasons.
- * Save the trigger and process it only if there's no other Roaming trigger
- * in process.
-*
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*  I   - pData - pointer to roaming trigger
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-TI_STATUS roamingMngr_triggerRoamingCb(TI_HANDLE hRoamingMngr, void *pData, TI_UINT16 reasonCode)
-{
-    roamingMngr_t       *pRoamingMngr;
-    apConn_roamingTrigger_e     roamingTrigger;
-    TI_UINT32                   curTimestamp;
-    TI_UINT16                   disConnReasonCode;
-
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    if ((pRoamingMngr == NULL) || (pData == NULL))
-    {
-        return TI_NOK;
-    }
-
-    roamingTrigger = *(apConn_roamingTrigger_e *)pData;
-
-    if ((ROAMING_OPERATIONAL_MODE_MANUAL == pRoamingMngr->RoamingOperationalMode) &&
-        (roamingTrigger == ROAMING_TRIGGER_AP_DISCONNECT))
-    {
-        disConnReasonCode = reasonCode;
-        EvHandlerSendEvent(pRoamingMngr->hEvHandler, IPC_EVENT_AP_DISCONNECT, (TI_UINT8*)&disConnReasonCode, sizeof(disConnReasonCode));
-    }
-
-
-    if (roamingTrigger >= ROAMING_TRIGGER_LAST)
-    {
-        TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_triggerRoamingCb, bad roaming trigger = %d\n", roamingTrigger);
-        return TI_NOK;
-    }
-#ifdef TI_DBG
-    /* save parameters for debug*/
-    pRoamingMngr->roamingTriggerEvents[pRoamingMngr->roamingTrigger]++;
-#endif
-    if (roamingTrigger <= ROAMING_TRIGGER_BG_SCAN_GROUP)
-    {
-        TI_BOOL    lowQuality = TI_FALSE;
-        if (roamingTrigger == ROAMING_TRIGGER_LOW_QUALITY_FOR_BG_SCAN)
-        {
-            lowQuality = TI_TRUE;
-        }
-        TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_triggerRoamingCb, lowQuality = %d \n", lowQuality);
-        scanMngr_qualityChangeTrigger(pRoamingMngr->hScanMngr, lowQuality);
-    }
-    else
-    {
-        if (roamingTrigger > pRoamingMngr->roamingTrigger)
-        {   /* Save the highest priority roaming trigger */
-            pRoamingMngr->roamingTrigger = roamingTrigger;
-            TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_triggerRoamingCb, higher trigger = %d \n", roamingTrigger);
-
-        }
-
-        curTimestamp = os_timeStampMs(pRoamingMngr->hOs);
-
-        /* If "No BSS" trigger received, disable count of low pass filter timer */
-        if (roamingTrigger > ROAMING_TRIGGER_LOW_QUALITY_GROUP)
-        {
-            pRoamingMngr->lowQualityTriggerTimestamp = 0;
-        }
-
-        /* Do not invoke a new Roaming Trigger when a previous one is in process */
-        if (pRoamingMngr->maskRoamingEvents == TI_FALSE)
-        {   /* No Roaming trigger is in process */
-            /* If the trigger is low quality check the low pass filter */
-            TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_triggerRoamingCb, trigger = %d \n", roamingTrigger);
-            if (roamingTrigger <= ROAMING_TRIGGER_LOW_QUALITY_GROUP)
-            {
-                TI_UINT32 deltaTs = curTimestamp-pRoamingMngr->lowQualityTriggerTimestamp;
-
-                if ((pRoamingMngr->lowQualityTriggerTimestamp != 0) &&
-                    (deltaTs < pRoamingMngr->lowPassFilterRoamingAttemptInMsec))
-                {  /* Ignore the low quality events. till the low pass time elapses */
-                    TRACE5(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_triggerRoamingCb, trigger = %d Ignored!!,deltaTs=%d, curTimestamp = %d, lowQualityTriggerTimestamp = %d, lowPassFilterRoamingAttempt=%d\n", roamingTrigger, deltaTs, curTimestamp, pRoamingMngr->lowQualityTriggerTimestamp, pRoamingMngr->lowPassFilterRoamingAttemptInMsec);
-                    return TI_OK;
-                }
-                pRoamingMngr->lowQualityTriggerTimestamp = curTimestamp;
-            }
-
-            /* Mask all future roaming events */
-            pRoamingMngr->maskRoamingEvents = TI_TRUE;
-
-#ifdef TI_DBG
-            /* For debug */
-            pRoamingMngr->roamingTriggerTimestamp = curTimestamp;
-#endif
-            return (roamingMngr_smEvent(ROAMING_EVENT_ROAM_TRIGGER, pRoamingMngr));
-        }
-        else if (roamingTrigger > ROAMING_TRIGGER_FAST_CONNECT_GROUP)
-        {   /* If the trigger is from the Full Connect group, then stop the connection. */
-            return (roamingMngr_smEvent(ROAMING_EVENT_ROAM_TRIGGER, pRoamingMngr));
-            
-        }
-    }
-
-    return TI_OK;
-}
-
-/**
-*
-* roamingMngr_connStatusCb 
-*
-* \b Description: 
-*
-* This procedure is called when the connection status event
- * is triggered.
-*
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*  I   - pData - pointer to the connection status.
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-TI_STATUS roamingMngr_connStatusCb(TI_HANDLE hRoamingMngr, void *pData)
-{
-    roamingMngr_t               *pRoamingMngr;
-    apConn_connStatus_e         connStatus;
-    roamingMngr_smEvents        roamingEvent;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    if ((pRoamingMngr == NULL) || (pData == NULL))
-    {
-        return TI_NOK;
-    }
-
-    connStatus = ((apConn_connStatus_t *)pData)->status;
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_connStatusCb, conn status = %d\n", connStatus);
-
-    if (!pRoamingMngr->roamingMngrConfig.enableDisable)
-    {
-        TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_connStatusCb, connStatus=%d was received while Roaming is disabled. Stop Roaming \n", 						   connStatus);
-        return TI_NOK;
-    }
-
-    if (ROAMING_OPERATIONAL_MODE_AUTO == pRoamingMngr->RoamingOperationalMode)
-    {
-        switch (connStatus)
-        {
-        case CONN_STATUS_CONNECTED: roamingEvent = ROAMING_EVENT_START;
-            /* Get station capabilities */
-            apConn_getStaCapabilities(pRoamingMngr->hAPConnection, &pRoamingMngr->staCapabilities); 
-            break;     
-        case CONN_STATUS_NOT_CONNECTED: roamingEvent = ROAMING_EVENT_STOP;
-            break;
-        case CONN_STATUS_HANDOVER_SUCCESS: roamingEvent = ROAMING_EVENT_ROAM_SUCCESS;
-#ifdef TI_DBG
-            /* For debug */
-            pRoamingMngr->roamingSuccesfulHandoverNum++;
-            pRoamingMngr->roamingHandoverCompletedTimestamp = os_timeStampMs(pRoamingMngr->hOs);
-            pRoamingMngr->roamingAverageSuccHandoverDuration += os_timeStampMs(pRoamingMngr->hOs)-pRoamingMngr->roamingHandoverStartedTimestamp;
-            pRoamingMngr->roamingAverageRoamingDuration +=  os_timeStampMs(pRoamingMngr->hOs)-pRoamingMngr->roamingTriggerTimestamp;
-            pRoamingMngr->roamingHandoverEvents[pRoamingMngr->roamingTrigger]++;
-#endif
-            break;
-        case CONN_STATUS_HANDOVER_FAILURE: roamingEvent = ROAMING_EVENT_REQ_HANDOVER;
-#ifdef TI_DBG
-            /* For debug */
-            pRoamingMngr->roamingFailedHandoverNum++;
-#endif
-            break;
-        default:
-            TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_connStatusCb, bad connStatus = %d\n", connStatus);
-            return TI_NOK;
-        }
-    }
-    else /* Roaming Manual operational mode*/
-    {
-         switch (connStatus)
-         {
-          case CONN_STATUS_CONNECTED: 
-        		roamingEvent = (roamingMngr_smEvents)ROAMING_MANUAL_EVENT_START;
-                apConn_getStaCapabilities(pRoamingMngr->hAPConnection,&pRoamingMngr->staCapabilities); 
-                break;     
-          case CONN_STATUS_NOT_CONNECTED:
-                roamingEvent = (roamingMngr_smEvents)ROAMING_MANUAL_EVENT_STOP;
-                break;
-          case CONN_STATUS_HANDOVER_SUCCESS:
-                roamingEvent = (roamingMngr_smEvents)ROAMING_MANUAL_EVENT_SUCCESS;
-                break;
-          case CONN_STATUS_HANDOVER_FAILURE:
-                roamingEvent = (roamingMngr_smEvents)ROAMING_MANUAL_EVENT_FAIL;
-                break;
-          default:
-        	return TI_NOK;
-        }
-    }
-
-    return (roamingMngr_smEvent(roamingEvent, pRoamingMngr));
-}
-
-/**
-*
-* roamingMngr_updateNeighborApListCb 
-*
-* \b Description: 
-*
-* This procedure is called when Neighbor AP list is received from the AP.
- * Save the list, and set them in Scan Manager object.
-*
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*  I   - pData - pointer to the list of Neighbor APs.
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-TI_STATUS roamingMngr_updateNeighborApListCb(TI_HANDLE hRoamingMngr, void *pData)
-{
-    roamingMngr_t           *pRoamingMngr;
-    neighborAPList_t        *pNeighborAPList;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    if ((pRoamingMngr == NULL) || (pData == NULL))
-    {
-        return TI_NOK;
-    }
-
-    pNeighborAPList = (neighborAPList_t *)pData;
-    if (pNeighborAPList->numOfEntries>0)
-    {
-        pRoamingMngr->neighborApsExist = TI_TRUE;
-    }
-    else
-    {
-        pRoamingMngr->neighborApsExist = TI_FALSE;
-    }
-    
-    if (pRoamingMngr->roamingMngrConfig.enableDisable)
-    {
-        scanMngr_setNeighborAPs (pRoamingMngr->hScanMngr, pNeighborAPList);
-    }
-    TRACE2(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_updateNeighborApListCb, numberOfAps = %d, enableDisable=%d\n", 							 pNeighborAPList->numOfEntries, pRoamingMngr->roamingMngrConfig.enableDisable);
-
-    return TI_OK;
-}
-
-/**
-*
-* roamingMngr_smEvent
-*
-* \b Description: 
-*
-* Roaming Manager state machine transition function
-*
-* \b ARGS:
-*
-*  I/O - currentState - current state in the state machine\n
-*  I   - event - specific event for the state machine\n
-*  I   - pData - Data for state machine action function\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS roamingMngr_smEvent(TI_UINT8 event, void* data)
-{
-    roamingMngr_t   *pRoamingMngr = (roamingMngr_t*)data;
-
-    TRACE3(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smEvent(). Mode(%d) ,currentState = %d, event=%d \n",
-                    pRoamingMngr->RoamingOperationalMode,
-                    *(pRoamingMngr->pCurrentState),
-                    event);
-
-    genSM_Event (pRoamingMngr->hRoamingSm, (TI_UINT32)event, data);
-
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smEvent(). new State : %d \n", *(pRoamingMngr->pCurrentState));
-    
-    return TI_OK;
-}
-
-
-  
-#ifdef TI_DBG
-/**
-*
-* roamingMngr_debugTrace 
-*
-* \b Description: 
-*
-* This procedure is called for debug only, to trace the roaming triggers and events
-*
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void roamingMngr_printStatistics(TI_HANDLE hRoamingMngr)
-{
-
-
-    roamingMngr_t       *pRoamingMngr;
-    TI_UINT8               index;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    if (pRoamingMngr == NULL)
-    {
-        return;
-    }
-
-    WLAN_OS_REPORT(("******** ROAMING_TRIGGERS ********\n"));
-    for (index=ROAMING_TRIGGER_LOW_TX_RATE; index<ROAMING_TRIGGER_LAST; index++)
-    {
-        switch (index)
-        {
-        case ROAMING_TRIGGER_LOW_TX_RATE:
-            WLAN_OS_REPORT(("- Low TX rate = %d\n",     pRoamingMngr->roamingTriggerEvents[index]));
-            break;
-        case ROAMING_TRIGGER_LOW_SNR:
-            WLAN_OS_REPORT(("- Low Snr = %d\n",         pRoamingMngr->roamingTriggerEvents[index]));
-            break;
-        case ROAMING_TRIGGER_LOW_QUALITY:
-            WLAN_OS_REPORT(("- Low Quality = %d\n",     pRoamingMngr->roamingTriggerEvents[index]));
-            break;
-        case ROAMING_TRIGGER_MAX_TX_RETRIES:
-            WLAN_OS_REPORT(("- MAX TX retries = %d\n",  pRoamingMngr->roamingTriggerEvents[index]));
-            break;
-        case ROAMING_TRIGGER_BSS_LOSS:
-            WLAN_OS_REPORT(("- BSS Loss TX = %d\n",     pRoamingMngr->roamingTriggerEvents[index]));
-            break;
-        case ROAMING_TRIGGER_SWITCH_CHANNEL:
-            WLAN_OS_REPORT(("- Switch Channel = %d\n",  pRoamingMngr->roamingTriggerEvents[index]));
-            break;
-        case ROAMING_TRIGGER_AP_DISCONNECT:
-            WLAN_OS_REPORT(("- AP Disconnect = %d\n",   pRoamingMngr->roamingTriggerEvents[index]));
-            break;
-        case ROAMING_TRIGGER_SECURITY_ATTACK:
-            WLAN_OS_REPORT(("- SEC attack = %d\n",      pRoamingMngr->roamingTriggerEvents[index]));
-            break;  
-        default:
-            break;
-        }
-    }
-
-    WLAN_OS_REPORT(("******** Succ ROAMING_HANDOVERS ********\n"));
-
-    for (index=ROAMING_TRIGGER_LOW_QUALITY; index<ROAMING_TRIGGER_LAST; index++)
-    {
-        switch (index)
-        {
-        case ROAMING_TRIGGER_LOW_TX_RATE:               
-            WLAN_OS_REPORT(("- Low TX rate = %d\n",     pRoamingMngr->roamingHandoverEvents[index]));
-            break;                                     
-        case ROAMING_TRIGGER_LOW_SNR:               
-            WLAN_OS_REPORT(("- Low Snre = %d\n",        pRoamingMngr->roamingHandoverEvents[index]));
-            break;                                     
-        case ROAMING_TRIGGER_LOW_QUALITY:               
-            WLAN_OS_REPORT(("- Low Quality = %d\n",     pRoamingMngr->roamingHandoverEvents[index]));
-            break;                                     
-        case ROAMING_TRIGGER_MAX_TX_RETRIES:            
-            WLAN_OS_REPORT(("- MAX TX retries = %d\n",  pRoamingMngr->roamingHandoverEvents[index]));
-            break;                                     
-        case ROAMING_TRIGGER_BSS_LOSS:                  
-            WLAN_OS_REPORT(("- BSS Loss TX = %d\n",     pRoamingMngr->roamingHandoverEvents[index]));
-            break;                                     
-        case ROAMING_TRIGGER_SWITCH_CHANNEL:            
-            WLAN_OS_REPORT(("- Switch Channel = %d\n",   pRoamingMngr->roamingHandoverEvents[index]));
-            break;                                     
-        case ROAMING_TRIGGER_AP_DISCONNECT:             
-            WLAN_OS_REPORT(("- AP Disconnect = %d\n",   pRoamingMngr->roamingHandoverEvents[index]));
-            break;                                     
-        case ROAMING_TRIGGER_SECURITY_ATTACK:           
-            WLAN_OS_REPORT(("- SEC attack = %d\n",      pRoamingMngr->roamingHandoverEvents[index])); 
-            break;                                     
-        default:
-            break;
-        }
-    }
-
-    WLAN_OS_REPORT(("******** ROAMING STATISTICS ********\n"));
-    WLAN_OS_REPORT(("- Num of succesful handovers = %d\n", pRoamingMngr->roamingSuccesfulHandoverNum)); 
-    WLAN_OS_REPORT(("- Num of failed handovers = %d\n", pRoamingMngr->roamingFailedHandoverNum)); 
-    if (pRoamingMngr->roamingSuccesfulHandoverNum >0)
-    {
-        WLAN_OS_REPORT(("- Succesful average succesful handover duration = %d\n", pRoamingMngr->roamingAverageSuccHandoverDuration/pRoamingMngr->roamingSuccesfulHandoverNum)); 
-        WLAN_OS_REPORT(("- Succesful average roaming duration = %d\n", pRoamingMngr->roamingAverageRoamingDuration/pRoamingMngr->roamingSuccesfulHandoverNum)); 
-    }
-
-
-}
-
-
-/**
-*
-* roamingMngr_resetDebugTrace 
-*
-* \b Description: 
-*
-* This procedure is called for debug only, to reset Roaming debug trace 
-*
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void roamingMngr_resetStatistics(TI_HANDLE hRoamingMngr)
-{
-
-    roamingMngr_t       *pRoamingMngr;
-    TI_UINT8               index;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    if (pRoamingMngr == NULL)
-    {
-        return;
-    }
-    WLAN_OS_REPORT(("Resetting all ROAMING_EVENTS \n"));
-
-    pRoamingMngr->roamingSuccesfulHandoverNum = 0;    
-    pRoamingMngr->roamingHandoverStartedTimestamp = 0;  
-    pRoamingMngr->roamingHandoverCompletedTimestamp = 0;
-    pRoamingMngr->roamingAverageSuccHandoverDuration = 0; 
-    pRoamingMngr->roamingAverageRoamingDuration = 0;  
-    pRoamingMngr->roamingFailedHandoverNum = 0;
-
-    for (index=ROAMING_TRIGGER_LOW_QUALITY; index<ROAMING_TRIGGER_LAST; index++)
-    {
-        pRoamingMngr->roamingHandoverEvents[index] = 0;
-        pRoamingMngr->roamingTriggerEvents[index] = 0;
-    }
-}
-
-#endif /*TI_DBG*/
-
-
-
-/**********************************************************************
-**         External Function section                                 **
-***********************************************************************/
-extern TI_STATUS apConn_reportRoamingEvent(TI_HANDLE hAPConnection,
-										   apConn_roamingTrigger_e roamingEventType,
-										   void *roamingEventData);
-
-
-
-/**********************************************************************
-**         API Function section                                      **
-***********************************************************************/
-
-TI_HANDLE roamingMngr_create(TI_HANDLE hOs)
-{
-    roamingMngr_t   *pRoamingMngr;
-    TI_UINT32          initVec;
-
-    initVec = 0;
-
-    pRoamingMngr = os_memoryAlloc(hOs, sizeof(roamingMngr_t));
-    if (pRoamingMngr == NULL)
-        return NULL;
-
-    initVec |= (1 << ROAMING_MNGR_CONTEXT_INIT_BIT);
-    pRoamingMngr->hOs   = hOs;
-
-    /* allocate the state machine object */
-    pRoamingMngr->hRoamingSm = genSM_Create(hOs);
-
-    if (pRoamingMngr->hRoamingSm == NULL)
-    {
-        roamingMngr_releaseModule(pRoamingMngr, initVec);
-        WLAN_OS_REPORT(("FATAL ERROR: roamingMngr_create(): Error Creating pRoamingSm - Aborting\n"));
-        return NULL;
-    }
-    initVec |= (1 << ROAMING_MNGR_SM_INIT_BIT);
-
-    
-    return pRoamingMngr;
-}
-
-TI_STATUS roamingMngr_unload(TI_HANDLE hRoamingMngr)
-{
-    TI_UINT32          initVec;
-
-    if (hRoamingMngr == NULL)
-    {
-        return TI_OK;
-    }
-
-    initVec = 0xFFFF;
-    roamingMngr_releaseModule(hRoamingMngr, initVec);
-
-    return TI_OK;
-}
-
-void roamingMngr_init (TStadHandlesList *pStadHandles)
-{
-    roamingMngr_t    *pRoamingMngr = (roamingMngr_t*)(pStadHandles->hRoamingMngr);
-
-    /* Update handlers */
-    pRoamingMngr->hReport       = pStadHandles->hReport;
-    pRoamingMngr->hScanMngr     = pStadHandles->hScanMngr;
-    pRoamingMngr->hAPConnection = pStadHandles->hAPConnection;
-    pRoamingMngr->hTWD          = pStadHandles->hTWD;
-    pRoamingMngr->hEvHandler    = pStadHandles->hEvHandler;
-    pRoamingMngr->hCurrBss      = pStadHandles->hCurrBss;
-
-    genSM_Init(pRoamingMngr->hRoamingSm,pRoamingMngr->hReport);
-}
-
-
-TI_STATUS roamingMngr_setDefaults (TI_HANDLE hRoamingMngr, TRoamScanMngrInitParams *pInitParam)
-{
-
-    roamingMngr_t  *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-	paramInfo_t     param;
-
-#ifdef TI_DBG
-    TI_UINT8 index =0;
-#endif
-     /* Init intrenal variables */
-    //pRoamingMngr->currentState = ROAMING_STATE_IDLE;
-    pRoamingMngr->roamingMngrConfig.enableDisable = ROAMING_DISABLED; 
-    pRoamingMngr->roamingMngrConfig.apQualityThreshold = DEFAULT_AP_QUALITY;
-    pRoamingMngr->roamingMngrConfig.lowPassFilterRoamingAttempt = DEFAULT_LOW_PASS_FILTER;
-    pRoamingMngr->roamingTrigger = ROAMING_TRIGGER_NONE;
-    pRoamingMngr->maskRoamingEvents= TI_TRUE;
-    pRoamingMngr->scanType = ROAMING_NO_SCAN;
-    pRoamingMngr->candidateApIndex = INVALID_CANDIDATE_INDEX;
-    pRoamingMngr->handoverWasPerformed = TI_FALSE;
-    pRoamingMngr->lowQualityTriggerTimestamp = 0;
-    pRoamingMngr->neighborApsExist = TI_FALSE;
-    pRoamingMngr->pListOfAPs = NULL;
-    pRoamingMngr->candidateApIndex = INVALID_CANDIDATE_INDEX;
-    pRoamingMngr->listOfCandidateAps.numOfNeighborBSS = 0;
-    pRoamingMngr->listOfCandidateAps.numOfPreAuthBSS = 0;
-    pRoamingMngr->listOfCandidateAps.numOfRegularBSS = 0;
-    pRoamingMngr->RoamingOperationalMode =  pInitParam->RoamingOperationalMode;
-    pRoamingMngr->bSendTspecInReassPkt = pInitParam->bSendTspecInReassPkt;
-
-	if (pInitParam->RoamingScanning_2_4G_enable)
-    {
-        param.content.roamingConfigBuffer.roamingMngrConfig.enableDisable =  ROAMING_ENABLED ;
-        param.content.roamingConfigBuffer.roamingMngrConfig.lowPassFilterRoamingAttempt = 30;
-        param.content.roamingConfigBuffer.roamingMngrConfig.apQualityThreshold = -70;
-
-        param.content.roamingConfigBuffer.roamingMngrThresholdsConfig.dataRetryThreshold = 20;
-        param.content.roamingConfigBuffer.roamingMngrThresholdsConfig.numExpectedTbttForBSSLoss = 10;
-        param.content.roamingConfigBuffer.roamingMngrThresholdsConfig.txRateThreshold = 2;
-        param.content.roamingConfigBuffer.roamingMngrThresholdsConfig.lowRssiThreshold = -80;
-        param.content.roamingConfigBuffer.roamingMngrThresholdsConfig.lowSnrThreshold = 0;
-        param.content.roamingConfigBuffer.roamingMngrThresholdsConfig.lowQualityForBackgroungScanCondition = -80;
-        param.content.roamingConfigBuffer.roamingMngrThresholdsConfig.normalQualityForBackgroungScanCondition = -70;
-
-        param.paramType = ROAMING_MNGR_APPLICATION_CONFIGURATION;
-        param.paramLength = sizeof(roamingMngrConfigParams_t);
-
-        roamingMngr_setParam(hRoamingMngr, &param);
-
-    }
-
-
-
-    /* config the FSM according to the operational mode*/
-    if(ROAMING_OPERATIONAL_MODE_MANUAL==pRoamingMngr->RoamingOperationalMode)
-    {
-         genSM_SetDefaults(pRoamingMngr->hRoamingSm,
-                           ROAMING_MANUAL_NUM_STATES,
-                           ROAMING_MANUAL_NUM_EVENTS,
-                           &roamingMngrManual_matrix[0][0],
-                           ROAMING_MANUAL_STATE_IDLE,
-                           "Roaming Manual SM",
-                           ManualRoamStateDescription,
-                           ManualRoamEventDescription,
-                           __FILE_ID__);
-
-         pRoamingMngr->RoamStateDescription = ManualRoamStateDescription;
-         pRoamingMngr->RoamEventDescription = ManualRoamEventDescription;
-    }
-    else
-    {
-         genSM_SetDefaults(pRoamingMngr->hRoamingSm,
-                           ROAMING_MNGR_NUM_STATES,
-                           ROAMING_MNGR_NUM_EVENTS,
-                           &roamingMngrAuto_matrix[0][0],
-                           ROAMING_STATE_IDLE,
-                           "Roaming Auto SM",
-                           AutoRoamStateDescription,
-                           AutoRoamEventDescription,
-                           __FILE_ID__);
-
-         pRoamingMngr->RoamStateDescription = AutoRoamStateDescription;
-         pRoamingMngr->RoamEventDescription = AutoRoamEventDescription;
-    }
-
-    pRoamingMngr->pCurrentState = &((TGenSM*)pRoamingMngr->hRoamingSm)->uCurrentState;
-
-#ifdef TI_DBG
-    /* debug counters */
-    pRoamingMngr->roamingSuccesfulHandoverNum = 0;    
-    pRoamingMngr->roamingHandoverStartedTimestamp = 0;  
-    pRoamingMngr->roamingHandoverCompletedTimestamp = 0;
-    pRoamingMngr->roamingAverageSuccHandoverDuration = 0; 
-    pRoamingMngr->roamingAverageRoamingDuration = 0;  
-    pRoamingMngr->roamingFailedHandoverNum = 0;
-
-    for (index=ROAMING_TRIGGER_NONE; index<ROAMING_TRIGGER_LAST; index++)
-    {
-        pRoamingMngr->roamingTriggerEvents[index] = 0;
-        pRoamingMngr->roamingHandoverEvents[index] = 0;
-    }
-#endif
-
-    return TI_OK;
-}
-
-TI_STATUS roamingMngr_setParam(TI_HANDLE hRoamingMngr, paramInfo_t *pParam)
-{
-    roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    TI_STATUS      status       = TI_OK;
-
-    if (pParam == NULL)
-    {
-        TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR , "roamingMngr_setParam(): pParam is NULL!\n");
-        return TI_NOK;
-    }
-
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION , "roamingMngr_setParam   %X \n", pParam->paramType);
-
-    switch (pParam->paramType)
-    {
-    
-    case ROAMING_MNGR_APPLICATION_CONFIGURATION:
-        {
-            roamingMngrConfigParams_t   *pRoamingMngrConfigParams;
-    
-            pRoamingMngrConfigParams = &pParam->content.roamingConfigBuffer;
-    
-            /* Configure the Roaming Parmeters */
-            TRACE3(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_setParam Configuration: \n                                  enableDisable= %d,\n  lowPassFilterRoamingAttempt=%d,\n                                  apQualityThreshold=%d\n", pRoamingMngrConfigParams->roamingMngrConfig.enableDisable, pRoamingMngrConfigParams->roamingMngrConfig.lowPassFilterRoamingAttempt, pRoamingMngrConfigParams->roamingMngrConfig.apQualityThreshold);
-
-            pRoamingMngr->roamingMngrConfig.apQualityThreshold = pRoamingMngrConfigParams->roamingMngrConfig.apQualityThreshold;
-            pRoamingMngr->roamingMngrConfig.lowPassFilterRoamingAttempt = pRoamingMngrConfigParams->roamingMngrConfig.lowPassFilterRoamingAttempt;
-            pRoamingMngr->lowPassFilterRoamingAttemptInMsec = pRoamingMngrConfigParams->roamingMngrConfig.lowPassFilterRoamingAttempt * 1000;
-
-            /* Configure the Roaming Trigger thresholds */
-            TRACE7(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_setParam Thresholds: \n                                  dataRetryThreshold= %d,\n  lowQualityForBackgroungScanCondition=%d,\n                                  lowRssiThreshold=%d,\n lowSNRThreshold=%d,\n                                  normalQualityForBackgroungScanCondition=%d,\n                                  numExpectedTbttForBSSLoss=%d,\n txRateThreshold=%d \n \n", pRoamingMngrConfigParams->roamingMngrThresholdsConfig.dataRetryThreshold, pRoamingMngrConfigParams->roamingMngrThresholdsConfig.lowQualityForBackgroungScanCondition, pRoamingMngrConfigParams->roamingMngrThresholdsConfig.lowRssiThreshold, pRoamingMngrConfigParams->roamingMngrThresholdsConfig.lowSnrThreshold, pRoamingMngrConfigParams->roamingMngrThresholdsConfig.normalQualityForBackgroungScanCondition, pRoamingMngrConfigParams->roamingMngrThresholdsConfig.numExpectedTbttForBSSLoss, pRoamingMngrConfigParams->roamingMngrThresholdsConfig.txRateThreshold);
-
-            os_memoryCopy(pRoamingMngr->hOs, &pRoamingMngr->roamingMngrThresholdsConfig, &pRoamingMngrConfigParams->roamingMngrThresholdsConfig, sizeof(roamingMngrThresholdsConfig_t));
-            
-            status = apConn_setRoamThresholds(pRoamingMngr->hAPConnection, &pRoamingMngrConfigParams->roamingMngrThresholdsConfig);
-
-            if (pRoamingMngr->roamingMngrConfig.enableDisable && 
-                !pRoamingMngrConfigParams->roamingMngrConfig.enableDisable)
-            {   /* disable Roaming Manager */
-                apConn_unregisterRoamMngrCallb(pRoamingMngr->hAPConnection);
-                pRoamingMngr->roamingMngrConfig.enableDisable = ROAMING_DISABLED;
-                return (roamingMngr_smEvent(ROAMING_EVENT_STOP, pRoamingMngr));
-            }
-            else if (!pRoamingMngr->roamingMngrConfig.enableDisable && 
-                pRoamingMngrConfigParams->roamingMngrConfig.enableDisable)
-            {   /* enable Roaming Manager */
-                /* Save the Roaming Configuration parameters */
-                pRoamingMngr->roamingMngrConfig.enableDisable = pRoamingMngrConfigParams->roamingMngrConfig.enableDisable;
-                /* register Roaming callback */
-                apConn_registerRoamMngrCallb(pRoamingMngr->hAPConnection, 
-                                             roamingMngr_triggerRoamingCb,
-                                             roamingMngr_connStatusCb,
-                                             roamingMngr_updateNeighborApListCb);
-            }
-        }
-        break;
-
-
-    /*********** For Debug Purposes ***********/
-
-    case ROAMING_MNGR_TRIGGER_EVENT:
-        /* Enable/disable Internal Roaming */
-        TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_setParam TRIGGER_EVENT=  %d \n", pParam->content.roamingTriggerType);
-        apConn_reportRoamingEvent(pRoamingMngr->hAPConnection, (apConn_roamingTrigger_e)pParam->content.roamingTriggerType, NULL);
-        break;
-    
-    case ROAMING_MNGR_CONN_STATUS:
-        /* External request to connect to BBSID */
-        TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_setParam CONN_STATUS=  %d \n", pParam->content.roamingConnStatus);
-        roamingMngr_connStatusCb(pRoamingMngr, &pParam->content.roamingConnStatus);
-        break;
-
-    default:
-        TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_setParam bad param=  %X\n", pParam->paramType);
-
-        break;
-    }
-
-
-    return status;
-}
-
-TI_STATUS roamingMngr_getParam(TI_HANDLE hRoamingMngr, paramInfo_t *pParam)
-{
-    roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-
-    if (pParam == NULL)
-    {
-        TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR , "roamingMngr_getParam(): pParam is NULL!\n");
-        return TI_NOK;
-    }
-
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_getParam   %X \n", pParam->paramType);
-
-    switch (pParam->paramType)
-    {
-    case ROAMING_MNGR_APPLICATION_CONFIGURATION:
-        {
-            roamingMngrConfigParams_t   *pRoamingMngrConfigParams;
-    
-            pRoamingMngrConfigParams = &pParam->content.roamingConfigBuffer;
-    
-            if (pRoamingMngr->roamingMngrConfig.enableDisable == ROAMING_DISABLED) 
-            {   
-                pRoamingMngrConfigParams->roamingMngrConfig.enableDisable = TI_FALSE;
-            }
-            else 
-            {
-                pRoamingMngrConfigParams->roamingMngrConfig.enableDisable = TI_TRUE;
-            }
-            pRoamingMngrConfigParams->roamingMngrConfig.apQualityThreshold = pRoamingMngr->roamingMngrConfig.apQualityThreshold;
-            pRoamingMngrConfigParams->roamingMngrConfig.lowPassFilterRoamingAttempt = pRoamingMngr->roamingMngrConfig.lowPassFilterRoamingAttempt;
-
-            apConn_getRoamThresholds(pRoamingMngr->hAPConnection, &pRoamingMngr->roamingMngrThresholdsConfig);
-            os_memoryCopy(pRoamingMngr->hOs, &pRoamingMngrConfigParams->roamingMngrThresholdsConfig, &pRoamingMngr->roamingMngrThresholdsConfig, sizeof(roamingMngrThresholdsConfig_t));
-            pParam->paramLength = sizeof(roamingMngrConfigParams_t);
-        }
-        break;
-
-#ifdef TI_DBG
-    case ROAMING_MNGR_PRINT_STATISTICS:
-        roamingMngr_printStatistics(pRoamingMngr);
-        break;
-
-    case ROAMING_MNGR_RESET_STATISTICS:
-        roamingMngr_resetStatistics(pRoamingMngr);
-        break;
-
-    case ROAMING_MNGR_PRINT_CURRENT_STATUS:
-        WLAN_OS_REPORT(("Roaming Current State = %d, enableDisable=%d\n, maskRoamingEvents = %d, roamingTrigger=%d \n scanType=%d, handoverWasPerformed=%d \n, candidateApIndex=%d, lowQualityTriggerTimestamp=%d \n",
-                        *(pRoamingMngr->pCurrentState),
-                        pRoamingMngr->roamingMngrConfig.enableDisable,
-                        pRoamingMngr->maskRoamingEvents,
-                        pRoamingMngr->roamingTrigger,
-                        pRoamingMngr->scanType,
-                        pRoamingMngr->handoverWasPerformed,
-                        pRoamingMngr->candidateApIndex,
-                        pRoamingMngr->lowQualityTriggerTimestamp));
-        break;
-    case ROAMING_MNGR_PRINT_CANDIDATE_TABLE:
-        {
-            TI_UINT32      index;
-
-            if (pRoamingMngr->pListOfAPs==NULL)
-            {
-                TRACE0( pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "Roaming Mngr the candidate AP list is invalid \n");
-                break;
-            }
-            TRACE1( pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "The number of candidates is %d\n", pRoamingMngr->pListOfAPs->numOfEntries);
-
-            TRACE1( pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "Roaming Mngr Neighbor AP list, num of candidates = %d\n", pRoamingMngr->listOfCandidateAps.numOfNeighborBSS);
-
-            for (index=0; index<pRoamingMngr->listOfCandidateAps.numOfNeighborBSS; index++)
-            {
-                TI_UINT32  candidateIndex;
-                bssEntry_t  *pBssEntry;
-
-                candidateIndex = pRoamingMngr->listOfCandidateAps.neighborBSSList[index];
-                pBssEntry = &pRoamingMngr->pListOfAPs->BSSList[candidateIndex];
-                TRACE8( pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "candiate %d, BSSID=%x-%x-%x-%x-%x-%x, RSSI =%d \n", candidateIndex, pBssEntry->BSSID[0], pBssEntry->BSSID[1], pBssEntry->BSSID[2], pBssEntry->BSSID[3], pBssEntry->BSSID[4], pBssEntry->BSSID[5], pBssEntry->RSSI);
-            }
-            TRACE1( pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "Roaming Mngr Pre-Auth AP list, num of candidates = %d\n", pRoamingMngr->listOfCandidateAps.numOfPreAuthBSS);
-
-            for (index=0; index<pRoamingMngr->listOfCandidateAps.numOfPreAuthBSS; index++)
-            {
-                TI_UINT32  candidateIndex;
-                bssEntry_t  *pBssEntry;
-
-                candidateIndex = pRoamingMngr->listOfCandidateAps.preAuthBSSList[index];
-                pBssEntry = &pRoamingMngr->pListOfAPs->BSSList[candidateIndex];
-                TRACE8( pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "candiate %d, BSSID=%x-%x-%x-%x-%x-%x, RSSI =%d \n", candidateIndex, pBssEntry->BSSID[0], pBssEntry->BSSID[1], pBssEntry->BSSID[2], pBssEntry->BSSID[3], pBssEntry->BSSID[4], pBssEntry->BSSID[5], pBssEntry->RSSI);
-            }
-            TRACE1( pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "Roaming Mngr Regular AP list, num of candidates = %d\n", pRoamingMngr->listOfCandidateAps.numOfRegularBSS);
-
-            for (index=0; index<pRoamingMngr->listOfCandidateAps.numOfRegularBSS; index++)
-            {
-                TI_UINT32  candidateIndex;
-                bssEntry_t  *pBssEntry;
-
-                candidateIndex = pRoamingMngr->listOfCandidateAps.regularBSSList[index];
-                pBssEntry = &pRoamingMngr->pListOfAPs->BSSList[candidateIndex];
-                TRACE8( pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "candiate %d, BSSID=%x-%x-%x-%x-%x-%x, RSSI =%d \n", candidateIndex, pBssEntry->BSSID[0], pBssEntry->BSSID[1], pBssEntry->BSSID[2], pBssEntry->BSSID[3], pBssEntry->BSSID[4], pBssEntry->BSSID[5], pBssEntry->RSSI);
-            }
-        }
-        break;
-
-#endif /*TI_DBG*/
-
-    default:
-        TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_getParam  bad paramType= %X \n", pParam->paramType);
-        return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-TI_STATUS roamingMngr_immediateScanComplete(TI_HANDLE hRoamingMngr, scan_mngrResultStatus_e scanCmpltStatus)
-{
-    roamingMngr_t           *pRoamingMngr;
-    roamingMngr_smEvents    roamingEvent;
-
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    if (pRoamingMngr == NULL)
-    {
-        return TI_NOK;
-    }
-
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_immediateScanComplete, scanCmpltStatus = %d\n", 							 scanCmpltStatus);
-
-    if (scanCmpltStatus == SCAN_MRS_SCAN_COMPLETE_OK)
-    {   
-		/* The scan completed TI_OK, get the updated list of APs */
-        pRoamingMngr->pListOfAPs = scanMngr_getBSSList(pRoamingMngr->hScanMngr);
-        if ((pRoamingMngr->pListOfAPs != NULL) && (pRoamingMngr->pListOfAPs->numOfEntries > 0))
-        {   
-			/* APs were found, start selection */
-            pRoamingMngr->scanType = ROAMING_NO_SCAN;
-            roamingEvent = ROAMING_EVENT_SELECT;
-        }
-        else
-        {   /* There were no APs, if the scan was partial, retry full scan */
-            if ((pRoamingMngr->scanType == ROAMING_PARTIAL_SCAN) ||
-                (pRoamingMngr->scanType == ROAMING_PARTIAL_SCAN_RETRY))
-            {
-                pRoamingMngr->scanType = ROAMING_FULL_SCAN;
-                roamingEvent = ROAMING_EVENT_SCAN;
-            }
-            else
-            {   
-				/* No APs were found in FULL SCAN, report failure */
-                roamingEvent = ROAMING_EVENT_SELECT;
-            }
-        }
-    }
-	/* scanCmpltStatus != SCAN_MRS_SCAN_COMPLETE_OK */
-    else
-    {   
-		/* The scan failed, retry scanning according to the current scan type */
-        pRoamingMngr->pListOfAPs = scanMngr_getBSSList(pRoamingMngr->hScanMngr);
-        if ((pRoamingMngr->pListOfAPs != NULL) && (pRoamingMngr->pListOfAPs->numOfEntries > 0))
-        {   
-			/* APs were found, start selection */
-            pRoamingMngr->scanType = ROAMING_NO_SCAN;
-            roamingEvent = ROAMING_EVENT_SELECT;
-        }
-        else
-        {   
-			/* The scan failed, and there were no APs found. 
-			Retry scanning according to the current scan type */
-			switch (pRoamingMngr->scanType)
-			{
-			case ROAMING_PARTIAL_SCAN:
-				roamingEvent = ROAMING_EVENT_SCAN;
-				pRoamingMngr->scanType = ROAMING_PARTIAL_SCAN_RETRY;
-				break;
-			case ROAMING_PARTIAL_SCAN_RETRY:
-				roamingEvent = ROAMING_EVENT_SELECT;
-				pRoamingMngr->scanType = ROAMING_NO_SCAN;
-				break;
-			case ROAMING_FULL_SCAN:
-				roamingEvent = ROAMING_EVENT_SCAN;
-				pRoamingMngr->scanType = ROAMING_FULL_SCAN_RETRY;
-				break;
-			case ROAMING_FULL_SCAN_RETRY:
-					roamingEvent = ROAMING_EVENT_SELECT;
-				pRoamingMngr->scanType = ROAMING_NO_SCAN;
-				break;
-			default:
-				roamingEvent = ROAMING_EVENT_SELECT;
-TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_immediateScanComplete, pRoamingMngr->scanType = %d\n", 								   pRoamingMngr->scanType);
-				pRoamingMngr->scanType = ROAMING_NO_SCAN;       
-				break;
-			} /* switch (pRoamingMngr->scanType) */
-        }
-    }
-
-    TRACE2(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_immediateScanComplete, roamingEvent = %d, scanType=%d\n", 							roamingEvent, 							 pRoamingMngr->scanType);
-
-    return (roamingMngr_smEvent(roamingEvent, pRoamingMngr));
-    
-}
-
-TI_STATUS roamingMngr_updateNewBssList(TI_HANDLE hRoamingMngr, bssList_t *bssList)
-{
-
-    roamingMngr_t       *pRoamingMngr;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    if ((pRoamingMngr == NULL) || (bssList == NULL))
-    {
-        return TI_NOK;
-    }
-
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_updateNewBssList, number of APs = %d\n", bssList->numOfEntries);
-
-    if (*(pRoamingMngr->pCurrentState) != ROAMING_STATE_WAIT_4_TRIGGER)
-    {
-        TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_WARNING, "roamingMngr_updateNewBssList, ignore APs when not in WAIT_4_TRIGGER state \n");
-        return TI_NOK;
-    }
-
-
-    if (pRoamingMngr->staCapabilities.authMode!=os802_11AuthModeWPA2)
-    {   /* No Pre-Auth is required */
-        TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_updateNewBssList, No Pre-Auth is required\n");
-        return TI_OK;
-    }
-    apConn_preAuthenticate(pRoamingMngr->hAPConnection, bssList);
-
-    return TI_OK;
-
-}
-
-
-void roamingMngr_smNop(void *pData)
-{
-    roamingMngr_t       *pRoamingMngr;
-
-    pRoamingMngr = (roamingMngr_t*)pData;
-    TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, " roamingMngr_smNop\n");
-}
-
-
-void roamingMngr_smUnexpected(void *pData)
-{
-    roamingMngr_t       *pRoamingMngr;
-
-    pRoamingMngr = (roamingMngr_t*)pData;
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, " roamingMngr_smUnexpected, state = %d\n", *(pRoamingMngr->pCurrentState));
-}
-
-
-void roamingMngr_smStop(void *pData)
-{
-    roamingMngr_t       *pRoamingMngr;
-
-    pRoamingMngr = (roamingMngr_t*)pData;
-
-    scanMngr_stopContScan(pRoamingMngr->hScanMngr);
-    /* clean intenal variables */
-    pRoamingMngr->maskRoamingEvents = TI_TRUE;
-    pRoamingMngr->neighborApsExist = TI_FALSE;
-    pRoamingMngr->roamingTrigger = ROAMING_TRIGGER_NONE;
-}
-/**
-*
-* roamingMngr_smStopWhileScanning -
-*
-* \b Description:
-*
-* Stop event means that the station is not in Connected State.
- * Stop continuos and immediate scans and clean internal vars.
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-*
-*/
-void roamingMngr_smStopWhileScanning(void *pData)
-{
-    roamingMngr_t* pRoamingMngr;
-
-    pRoamingMngr = (roamingMngr_t*)pData;
-
-    TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, " roamingMngr_smStopWhileScanning\n");
-
-    scanMngr_stopImmediateScan(pRoamingMngr->hScanMngr);
-    scanMngr_stopContScan(pRoamingMngr->hScanMngr);
-
-    /* clean intenal variables */
-    pRoamingMngr->maskRoamingEvents = TI_TRUE;
-    pRoamingMngr->neighborApsExist = TI_FALSE;
-    pRoamingMngr->roamingTrigger = ROAMING_TRIGGER_NONE;
-}
-
-
-
-
-/**
-*
-* roamingMngr_setBssLossThreshold API
-*
-* Description:
-*
-* Set the BSS Loss threshold by EMP and register for the event.
-*
-* ARGS:
-*
-*  hRoamingMngr   - Roaming manager handle \n
-*  uNumOfBeacons - number of consecutive beacons not received allowed before BssLoss event is issued
-*  uClientID - the ID of the client that has registered for this event. will be sent along with the BssLoss event to EMP
-* \b RETURNS:
-*
-*  TI_STATUS - registration status.
- * TI_NOK - registration is not allowed
-*
-* \sa
-*/
-TI_STATUS roamingMngr_setBssLossThreshold (TI_HANDLE hRoamingMngr, TI_UINT32 uNumOfBeacons, TI_UINT16 uClientID)
-{
-    roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-
-    TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_setBssLossThreshold! \n");
-
-    if(ROAMING_OPERATIONAL_MODE_MANUAL == pRoamingMngr->RoamingOperationalMode)
-    {
-        return currBss_registerBssLossEvent(pRoamingMngr->hCurrBss, uNumOfBeacons, uClientID);
-    }
-    else
-    {
-        TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_setBssLossThreshold is available only in auto mode! \n");
-        WLAN_OS_REPORT(("\n roamingMngr_setBssLossThreshold is available only in auto mode! \n "));
-        return TI_NOK;
-    }
-}
-
-
-
-/**
-*
-* roamingMngr_Connect API
-*
-* Description:
-*
-* send the Connect event to roaming state machine
-*
-* ARGS:
-*
-*  hRoamingMngr   - Roaming manager handle \n
-*  pTargetAp - the target AP to connect with info.
-* \b RETURNS:
-*
-*  TI_STATUS - roamingMngr_smEvent status.
-*/
-
-TI_STATUS roamingMngr_connect(TI_HANDLE hRoamingMngr, TargetAp_t* pTargetAp)
-{
-    roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    bssList_t *bssList;
-    int i=0;
-
-    TRACE2(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_connect(),"
-                                                               "transitionMethod = %d,"
-                                                               "requestType = %d,"
-                                                               " \n", pTargetAp->transitionMethod,pTargetAp->connRequest.requestType) ;
-
-
-    TRACE6(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_connect(),"
-                                                         " AP to roam BSSID: "
-                                                         "%02x-%02x-%02x-%02x-%02x-%02x "
-                                                         "\n", pTargetAp->newAP.BSSID[0],pTargetAp->newAP.BSSID[1],pTargetAp->newAP.BSSID[2],pTargetAp->newAP.BSSID[3],pTargetAp->newAP.BSSID[4],pTargetAp->newAP.BSSID[5]);
-
-
-    /* Search for target AP in the scan manager results table, to get its beacon/ProbResponse buffer  */
-    bssList = scanMngr_getBSSList(((roamingMngr_t*)hRoamingMngr)->hScanMngr);
-    for (i=0; i< bssList->numOfEntries ; i++)
-    {
-        if (MAC_EQUAL(bssList->BSSList[i].BSSID, pTargetAp->newAP.BSSID))
-        {
-            pTargetAp->newAP.pBuffer = bssList->BSSList[i].pBuffer;
-            pTargetAp->newAP.bufferLength = bssList->BSSList[i].bufferLength;
-            os_memoryCopy(pRoamingMngr->hOs, &(pRoamingMngr->targetAP), (void*)pTargetAp, sizeof(TargetAp_t));
-            return roamingMngr_smEvent(ROAMING_MANUAL_EVENT_CONNECT, hRoamingMngr);
-        }
-    }
-
-    TRACE6(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_connect(),"
-                                                         "AP was not found in scan table!! BSSID: "
-                                                         "%02x-%02x-%02x-%02x-%02x-%02x "
-                                                         "\n", pTargetAp->newAP.BSSID[0],pTargetAp->newAP.BSSID[1],pTargetAp->newAP.BSSID[2],pTargetAp->newAP.BSSID[3],pTargetAp->newAP.BSSID[4],pTargetAp->newAP.BSSID[5]);
-    return TI_NOK;
-}
-
-/**
-*
-* roamingMngr_startImmediateScan API
-*
-* Description:
-*
-* start the immediate scan with the channel list received by the application
-*
-* ARGS:
-*
-*  hRoamingMngr   - Roaming manager handle \n
-*  pChannelList -  The channel list to be scanned
-* \b RETURNS:
-*
-*  TI_STATUS - roamingMngr_smEvent status.
-*/
-
-TI_STATUS roamingMngr_startImmediateScan(TI_HANDLE hRoamingMngr, channelList_t* pChannelList)
-{
-    roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-
-    TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_startImmediateScan().\n");
-
-    /* Save the channelList for later usage in the scanMngr_startImmediateScan() */
-    scanMngr_setManualScanChannelList (pRoamingMngr-> hScanMngr, pChannelList);
-    return roamingMngr_smEvent(ROAMING_MANUAL_EVENT_SCAN, hRoamingMngr);
-}
-
-
-
-/**
-*
-* roamingMngr_stopImmediateScan API
-*
-* Description:
-*
-* stop the immediate scan, called by the application.
-*
-* ARGS:
-*
-*  hRoamingMngr   - Roaming manager handle \n
-* \b RETURNS:
-*
-*  TI_STATUS - TI_OK.
-*/
-TI_STATUS roamingMngr_stopImmediateScan(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    scanMngr_stopImmediateScan(pRoamingMngr->hScanMngr);
-
-    return TI_OK;
-}
-
-
-/**
-*
-* roamingMngr_stopImmediateScan API
-*
-* Description:
-*
-* called upon the immediate scan by application complete
-*
-* ARGS:
-*
-*  hRoamingMngr   - Roaming manager handle
-*  scanCmpltStatus - scanCmpltStatus
-*
-* \b RETURNS:
-*
-*  TI_STATUS - State machine event status.
-*/
-
-TI_STATUS  roamingMngr_immediateScanByAppComplete(TI_HANDLE hRoamingMngr, scan_mngrResultStatus_e scanCmpltStatus)
-{
-    return roamingMngr_smEvent(ROAMING_MANUAL_EVENT_COMPLETE, hRoamingMngr);
-}
-
diff --git a/wl1271/stad/src/Application/roamingMngrApi.h b/wl1271/stad/src/Application/roamingMngrApi.h
deleted file mode 100644
index 41334d4..0000000
--- a/wl1271/stad/src/Application/roamingMngrApi.h
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * roamingMngrApi.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file roamingMngrApi.h
- *  \brief Internal Roaming Manager API
- *
- *  \see roamingMngr.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Roaming Manager	    		                                *
- *   PURPOSE: Roaming Manager Module API                              		*
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _ROAMING_MNGR_API_H_
-#define _ROAMING_MNGR_API_H_
-
-/*#include "802_11Defs.h"*/
-#include "osApi.h"
-#include "paramOut.h"
-#include "scanMngrApi.h"
-#include "bssTypes.h"
-#include "DrvMainModules.h"
-#include "apConnApi.h"
-/*-----------*/
-/* Constants */
-/*-----------*/
-
-#define MAX_ROAMING_TRIGGERS  ROAMING_TRIGGER_LAST
-
-
-/*--------------*/
-/* Enumerations */
-/*--------------*/
-
-/* Roaming Trigger groups, according to Roaming Triggers */
-typedef enum
-{
-    ROAMING_TRIGGER_BG_SCAN_GROUP 		= ROAMING_TRIGGER_NORMAL_QUALITY_FOR_BG_SCAN,
-    ROAMING_TRIGGER_LOW_QUALITY_GROUP 	= ROAMING_TRIGGER_MAX_TX_RETRIES,
-    ROAMING_TRIGGER_FAST_CONNECT_GROUP 	= ROAMING_TRIGGER_SWITCH_CHANNEL,
-    ROAMING_TRIGGER_FULL_CONNECT_GROUP 	= ROAMING_TRIGGER_SECURITY_ATTACK
-} roamingMngr_connectTypeGroup_e;
-
-
-/*----------*/
-/* Typedefs */
-/*----------*/
-
-/* scan types */
-typedef enum
-{
-/*	0	*/	ROAMING_NO_SCAN,
-/*	1	*/	ROAMING_PARTIAL_SCAN,
-/*	2	*/	ROAMING_PARTIAL_SCAN_RETRY,
-/*	3	*/	ROAMING_FULL_SCAN,
-/*	4	*/	ROAMING_FULL_SCAN_RETRY
-
-} scan4RoamingType_e;
-
-typedef struct
-{
-    TI_UINT8   preAuthBSSList[MAX_SIZE_OF_BSS_TRACK_LIST];
-    TI_UINT8   numOfPreAuthBSS;
-    TI_UINT8   neighborBSSList[MAX_SIZE_OF_BSS_TRACK_LIST];
-    TI_UINT8   numOfNeighborBSS;
-    TI_UINT8   regularBSSList[MAX_SIZE_OF_BSS_TRACK_LIST];
-    TI_UINT8   numOfRegularBSS;
-} listOfCandidateAps_t;
-
-
-struct _roamingMngr_t
-{
-    /*** Roaming manager parameters that can be configured externally ***/
-    roamingMngrConfig_t         	roamingMngrConfig;
-    roamingMngrThresholdsConfig_t   roamingMngrThresholdsConfig;
-    TI_UINT32                      	lowPassFilterRoamingAttemptInMsec;
-
-    /*** Internal roaming parameters ***/
-    apConn_roamingTrigger_e     	roamingTrigger;				/* the roaming trigger type */
-    TI_UINT32*                      pCurrentState;				/* pointer to Roaming Generic SM current state */
-    TI_BOOL                        	maskRoamingEvents;			/* Indicate if a trigger is already in process, and therefore the
-																	other triggers will be ignored */
-    TI_UINT32                      	lowQualityTriggerTimestamp;	/* TS to filter Too many low Quality roaming triggers */
-    scan4RoamingType_e          	scanType; 					/* the scan type performed for Roaming */
-    bssList_t                   	*pListOfAPs;				/* list of BSS received from Scan Manager */
-    TI_BOOL                        	neighborApsExist;			/* Indicating if Neighbor APs exist */
-    listOfCandidateAps_t        	listOfCandidateAps;			/* a list of the candiadte APs indexes in pListOfAPs according to
-																	neighbor APs, pre-auth APs and other APs */
-    TI_UINT8                       	candidateApIndex;			/* The current candidate AP's index to Roam to */
-    TI_BOOL                        	handoverWasPerformed;		/* Indicates whether at least one handover was performed */
-    apConn_staCapabilities_t    	staCapabilities;
-    	/* The station capabilities for the current Connection */
-    TI_HANDLE          	            hRoamingSm;				    /* Roaming manager SM handle */
-    TI_INT8**                       RoamStateDescription;       /* Roaming states index-name keyValue */
-    TI_INT8**                       RoamEventDescription;       /* Roaming Events index-name keyValue */
-
-
-    /* Roaming manager handles to other objects */
-    TI_HANDLE                   	hReport;
-    TI_HANDLE                   	hOs;
-    TI_HANDLE                   	hScanMngr;
-    TI_HANDLE                   	hAPConnection;
-    TI_HANDLE                   	hTWD;
-    TI_HANDLE                   	hEvHandler;
-    TI_HANDLE                   	hCurrBss;
-
-#ifdef TI_DBG
-    /* Debug trace for Roaming statistics */
-    TI_UINT32                      roamingTriggerEvents[MAX_ROAMING_TRIGGERS];
-    TI_UINT32                      roamingHandoverEvents[MAX_ROAMING_TRIGGERS];
-    TI_UINT32                      roamingSuccesfulHandoverNum;
-    TI_UINT32                      roamingFailedHandoverNum;
-    TI_UINT32                      roamingTriggerTimestamp;
-    TI_UINT32                      roamingHandoverStartedTimestamp;
-    TI_UINT32                      roamingHandoverCompletedTimestamp;
-    TI_UINT32                      roamingAverageSuccHandoverDuration;
-    TI_UINT32                      roamingAverageRoamingDuration;
-#endif
-
-    TI_UINT8	                   RoamingOperationalMode; /* 0 - manual, 1 - auto*/
-    TI_UINT8                       bSendTspecInReassPkt;   
-    TargetAp_t                     targetAP;               /* holds the AP to connect with in manual mode */
-}; /* _roamingMngr_t */
-
-
-
-typedef struct _roamingMngr_t   roamingMngr_t;
-
-/*------------*/
-/* Structures */
-/*------------*/
-
-/*---------------------------*/
-/* External data definitions */
-/*---------------------------*/
-
-/*--------------------------------*/
-/* External functions definitions */
-/*--------------------------------*/
-
-/*----------------------------*/
-/* Global Function prototypes */
-/*----------------------------*/
-
-/**
- * \brief Create the Roaming Manager context
- * 
- * \param  hOs	  	- OS handler
- * \return	A pointer to the roaming manager handler on success, 
- * 			NULL on failure (unable to allocate memory or other system resource) 
- * 
- * \par Description
- * Creates the Roaming Manager context: \n
- * Allocate control block for preconfigured parameters and internal variables, create state-machine
- * 
- * \sa	roamingMngr_unload
- */ 
-TI_HANDLE roamingMngr_create(TI_HANDLE hOs);
-/**
- * \brief Configure the Roaming Manager module
- * 
- * \param  pStadHandles	  	- The driver modules handles
- * \return void 
- * 
- * \par Description
- * Configure the Roaming Manager module to do the following:
- * - Initialize the Station broadcast key State Machine matrix
- * - Store handlers of other modules (report module, Scan Manager, AP connection, TWD)
- * - Initialize the roaming manager internal variables
- * - Configure the roaming manager state-machine
- * 
- * \sa	
- */ 
-void roamingMngr_init (TStadHandlesList *pStadHandles);
-/**
- * \brief Unloads the Roaming Manager Module
- * 
- * \param  hRoamingMngr - Roaming Manager handler
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Unloads the components of the Roaming Manager module from memory:	\n 
- * releases the allocation for the state-machine and internal variables
- * 
- * \sa	roamingMngr_create
- */ 
-
-TI_STATUS roamingMngr_unload(TI_HANDLE hRoamingMngr);
-/**
- * \brief Get Roaming Manager parameters from the roamingMngr SM
- * 
- * \param  hRoamingMngr - Roaming Manager handler
- * \param  pParam 		- Output Parameters
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS roamingMngr_getParam(TI_HANDLE hRoamingMngr, paramInfo_t *pParam);
-/**
- * \brief Set Roaming Manager Module parameters to the roamingMngr SM
- * 
- * \param  hRoamingMngr - Roaming Manager handler
- * \param  pParam 		- Input Parameters
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * 
- * \sa
- */ 
-TI_STATUS roamingMngr_setParam(TI_HANDLE hRoamingMngr, paramInfo_t *pParam);
-/**
- * \brief  Indicates Roaming Manager that an Immediate Scan was completed 
- *			and provides it with the Scan result
- * 
- * \param  hRoamingMngr  	- Handle to the roaming manager
- * \param  scanCmpltStatus	- Scan complete reason
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * This procedure is called when the Scan Manager completed Immediate Scan for Roaming.
- * It performs the following:
- * - Partial or Full scan
- * - Re-try Partial or Full scan if the previous scan failed
- * - Full scan if the previous partial scan didn't get any APs
- * - Fail event if all the Scans failed
- * 
- * Algorithm description:
- * - If Scan Complete is OK: 
- * -------------------------
- *		- If APs found:
- * 			- starts Selection
- *		- If NO APs found:
- * 			- If Previous Scan was Partial:
- *				- Perform Full Scan
- *			- If Previous Scan was Full:
- *				- Report Error
- *
- * - If Scan Complete is NOT OK: 
- * -----------------------------
- * - Re-Try Scan
- *		- If APs found:
- * 			- starts Selection
- * 		- If NO APs found:
- *			- Re-Try Scan with current Scan Type (Partial/Full Scan Retry or No Scan)
- * 
- * \sa
- */ 
-TI_STATUS roamingMngr_immediateScanComplete(TI_HANDLE hRoamingMngr, scan_mngrResultStatus_e scanCmpltStatus);
-/**
- * \brief  Indicates that a new BSSID is added to the BSS table
- * 
- * \param  hRoamingMngr  	- Handle to the roaming manager
- * \param  newBss_entry	  	- List of BSSIDs that have been found
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Indicates that a new BSSID is added to the BSS table (Called by the Scan Manager when new BSSID was found). 
- * This function triggers preauthentication to the new BSS.
- * 
- * \sa
- */ 
-TI_STATUS roamingMngr_updateNewBssList(TI_HANDLE hRoamingMngr, bssList_t *newBss_entry);
-
-
-
-/* All functions below added by Lior*/
-
-TI_STATUS roamingMngr_setDefaults (TI_HANDLE hRoamingMngr, TRoamScanMngrInitParams *pInitParam);
-TI_STATUS roamingMngr_setBssLossThreshold (TI_HANDLE hRoamingMngr, TI_UINT32 uNumOfBeacons, TI_UINT16 uClientID);
-TI_STATUS roamingMngr_connect(TI_HANDLE hRoamingMngr, TargetAp_t* pTargetAp);
-TI_STATUS roamingMngr_startImmediateScan(TI_HANDLE hRoamingMngr, channelList_t *pChannelList);
-TI_STATUS roamingMngr_stopImmediateScan(TI_HANDLE hRoamingMngr);
-TI_STATUS roamingMngr_immediateScanByAppComplete(TI_HANDLE hRoamingMngr, scan_mngrResultStatus_e scanCmpltStatus);
-
-TI_STATUS roamingMngr_smEvent(TI_UINT8 event, void* data);
-void roamingMngr_smStopWhileScanning(void *pData);
-void roamingMngr_smStop(void *pData);
-void roamingMngr_smUnexpected(void *pData);
-void roamingMngr_smNop(void *pData);
-
-
-#endif /*  _ROAMING_MNGR_API_H_*/
-
diff --git a/wl1271/stad/src/Application/roamingMngrTypes.h b/wl1271/stad/src/Application/roamingMngrTypes.h
deleted file mode 100644
index e66c5c6..0000000
--- a/wl1271/stad/src/Application/roamingMngrTypes.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * roamingMngrTypes.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Roaming Manager	    		                                *
- *   PURPOSE: Roaming Manager Module Types                              		*
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _ROAMING_MNGR_TYPES_H_
-#define _ROAMING_MNGR_TYPES_H_
-
-/** \file  roamingMngrTypes.h 
- *  \brief Internal Roaming Manager Types API
- */
-
-/*-----------*/
-/* Constants */
-/*-----------*/
-#define ROAMING_ENABLED 		1
-#define ROAMING_DISABLED		0
-
-#define ROAMING_OPERATIONAL_MODE_MANUAL    0
-#define ROAMING_OPERATIONAL_MODE_AUTO 	   1
-
-/*--------------*/
-/* Enumerations */
-/*--------------*/
-
-
-/*----------*/
-/* Typedefs */
-/*----------*/
-
-/** \struct roamingMngrConfig_t
- * \brief Roaming Manager Configuration
- * 
- * \par Description
- * This Structure defines the Roaming Manager Configuration Type
- * 
- * \sa
- */ 
-typedef struct
-{
-	TI_UINT16	enableDisable; 					/**< Indicates if roaming is enabled/disabled: 
-												* ROAMING_ENABLED: Enables roaming manager
-												* ROAMING _DISABLED: Disables roaming manager
-												* TI recommended default: roaming is disabled
-												* Note: TI_BOOL is not used, beacuse of misdefinition between the Driver and CU
-												*/
-    TI_UINT16	lowPassFilterRoamingAttempt;	/**< Time to wait in seconds before roaming caused by low connection quality; 
-												* TI recommended default: 30 seconds	
-												*/
-	TI_INT8		apQualityThreshold;				/**< Quality indicator (RSSI) to be used when comparing AP List matching quality
-												* TI recommended default: 0
-												*/
-} roamingMngrConfig_t;
-
-/** \struct roamingMngrThresholdsConfig_t
- * \brief Roaming Manager Thresholds Configuration
- * 
- * \par Description
- * This Structure defines the Roaming Manager Trigger Thresholds Configuration type	\n
- * Note - It is the applicatio's responsibility to change the threshold when Voice is On
- * 
- * \sa
- */ 
-typedef struct
-{
-	TI_UINT8	dataRetryThreshold;						/**< Consecutive number of TX retries per roaming event; 
-														* TI recommended default: 20
-														*/  
-    TI_UINT8	numExpectedTbttForBSSLoss;				/**< Number of expected TBTTs for BSS Loss event
-														* TI recommended default: 10
-														*/
-	TI_UINT8	txRateThreshold;						/**< Low TX rate roaming even threshold; 
-														* TI recommended default: 2 Mbps
-														*/
-	TI_INT8		lowRssiThreshold;						/**< When the low RSSI threshold is crossed, the low RSSI roaming event is initiated in dBm; 
-														* TI recommended default: -80 dBm
-														*/
-	TI_UINT8	lowSnrThreshold;						/**< When the low SNR threshold is crossed, the low SNR roaming event is initiated. 
-														* TI recommended default: 0
-														*/
-	TI_INT8		lowQualityForBackgroungScanCondition; 	/**< Indicator used to increase the background scan period when quality is low 
-														* TI recommended default: -80
-														*/
-	TI_INT8		normalQualityForBackgroungScanCondition;/**< Indicator used to reduce the background scan period when quality is normal 
-														* TI recommended default: -80
-														*/	
-} roamingMngrThresholdsConfig_t;
-
-/** \struct roamingMngrConfigParams_t
- * \brief Roaming Manager Configuration Parameters
- * 
- * \par Description
- * 
- * \sa
- */ 
-typedef struct
-{
-	roamingMngrConfig_t				roamingMngrConfig;				/**< Roaming Manager Configuration				*/
-	roamingMngrThresholdsConfig_t	roamingMngrThresholdsConfig;	/**< Roaming Manager Thresholds Configuration	*/
-} roamingMngrConfigParams_t;
-
-/** \struct TUserDefinedQualityTrigger
- * \brief User Defined Quality Trigger
- * 
- * \par Description
- * This struct defines the User Defined Quality Trigger Parameters	\n
- * Used for setting Roaming User Defined Trigger
- * 
- * \sa
- */ 
-typedef struct
-{
-    TI_INT16  iThreshold;	/**< Input Trigger Threshold. Units: dBm / dB ; Range: (-100 .. 100)						*/
-    TI_UINT16 uPacing;		/**< Minimum delay between consecutive triggers. Units: milliseconds ; Range:  (0 .. 60000) */
-    TI_UINT8  uMetric;		/**< 0 - RSSI Beacon, 1 - RSSI Packet, 2 - SNR Beacon, 3 - SNR Packet 						*/
-    TI_UINT8  uType;		/**< 0 - Level, 1 - Edge 																	*/
-    TI_UINT8  uDirection;	/**< 0 - Low, 1 - High, 2 - Bidirectional 													*/
-    TI_UINT8  uHystersis;	/**< Hysteresis range around the threshold value. Units: dB ; Threshold range: (0 .. 255)	*/
-    TI_UINT8  uIndex; 		/**< User Index (0 .. 1) 																	*/
-    TI_UINT8  uEnable;		/**< User trigger Enable. 0 - Disable, 1 - Enable 											*/
-    TI_UINT8  padding[2];  	/**< */ 	
-    TI_UINT16 uClientID;    /**< the client ID that registered for the trigger event									*/
-} TUserDefinedQualityTrigger;
-
-
-#endif /*  _ROAMING_MNGR_TYPES_H_*/
-
diff --git a/wl1271/stad/src/Application/roamingMngr_autoSM.c b/wl1271/stad/src/Application/roamingMngr_autoSM.c
deleted file mode 100644
index 5bc1623..0000000
--- a/wl1271/stad/src/Application/roamingMngr_autoSM.c
+++ /dev/null
@@ -1,799 +0,0 @@
-/*
- * roamingMngr_autoSM.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file roamingMngr_autoSM.c
- *  \brief Roaming Manager
- *
- *  \see roamingMngr_autoSM.h
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Roaming Manager                                               *
- *   PURPOSE:                                                               *
- *   Roaming manager is responsible to receive Roaming triggers and try
- *      to select a better AP.
- *      The Roaming triggers are: Low RSSI, PER, consecutive No ACK on TX,
- *      beacon Missed or External request.
- *      In each Internal Roaming request, scan is performed and selection for 
- *      better AP. Better AP is defined as a different AP with better RSSI,
- *      and similar SSID and security settings.
- *      If better AP is found, there is a check for fast-roaming via the
- *      Supplicant. Then connection to the new AP is invoked.
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_135
-#include "osApi.h"
-
-#include "paramOut.h"
-#include "report.h"
-#include "scanMngrApi.h"
-#include "roamingMngrApi.h"
-#include "apConnApi.h"
-#include "roamingMngrTypes.h"
-#include "bssTypes.h"
-#include "DrvMainModules.h"
-#include "TWDriver.h"
-#include "siteMgrApi.h"
-#include "GenSM.h"
-#include "roamingMngr_autoSM.h"
-
-
-/*****************************************************************************
-**         Private Function section                                      **
-*****************************************************************************/
-/* SM functions */
-
-static void roamingMngr_smStartIdle(TI_HANDLE hRoamingMngr);
-static void roamingMngr_smRoamTrigger(TI_HANDLE hRoamingMngr);
-static void roamingMngr_smInvokeScan(TI_HANDLE hRoamingMngr);
-static void roamingMngr_smSelection(TI_HANDLE hRoamingMngr);
-static void roamingMngr_smHandover(TI_HANDLE hRoamingMngr);
-static void roamingMngr_smSuccHandover(TI_HANDLE hRoamingMngr);
-static void roamingMngr_smFailHandover(TI_HANDLE hRoamingMngr);
-static void roamingMngr_smScanFailure(TI_HANDLE hRoamingMngr);
-static void roamingMngr_smDisconnectWhileConnecting(TI_HANDLE hRoamingMngr);
-
-/*static TI_STATUS roamingMngr_smUnexpected(TI_HANDLE hRoamingMngr);
-static TI_STATUS roamingMngr_smNop(TI_HANDLE hRoamingMngr);
-static TI_STATUS roamingMngr_smStopWhileScanning(TI_HANDLE hRoamingMngr);
-*/
-
-typedef enum 
-{
-	REASSOC_RESP_SUCCESS =0,
-	REASSOC_RESP_FAILURE,
-    REASSOC_RESP_REJECT
-} reassociationResp_e;
-
-
-/*-----------*/
-/* Constants */
-/*-----------*/
-
-TGenSM_actionCell roamingMngrAuto_matrix[ROAMING_MNGR_NUM_STATES][ROAMING_MNGR_NUM_EVENTS] =
-{
-    /* next state and actions for IDLE state */
-        {   {ROAMING_STATE_WAIT_4_TRIGGER, roamingMngr_smStartIdle},        /* START            */
-            {ROAMING_STATE_IDLE, roamingMngr_smNop},                        /* STOP             */ 
-            {ROAMING_STATE_IDLE, roamingMngr_smNop},                        /* ROAM_TRIGGER     */
-            {ROAMING_STATE_IDLE, roamingMngr_smUnexpected},                 /* SCAN             */
-            {ROAMING_STATE_IDLE, roamingMngr_smUnexpected},                 /* SELECT           */
-            {ROAMING_STATE_IDLE, roamingMngr_smUnexpected},                 /* REQ_HANDOVER     */
-            {ROAMING_STATE_IDLE, roamingMngr_smUnexpected},                 /* ROAM_SUCCESS     */
-            {ROAMING_STATE_IDLE, roamingMngr_smUnexpected}                  /* FAILURE          */
-        },                                                                              
-
-        /* next state and actions for WAIT_4_TRIGGER state */    
-        {   {ROAMING_STATE_WAIT_4_TRIGGER, roamingMngr_smUnexpected},   /* START            */ 
-            {ROAMING_STATE_IDLE, roamingMngr_smStop},                   /* STOP             */ 
-            {ROAMING_STATE_WAIT_4_CMD, roamingMngr_smRoamTrigger},      /* ROAM_TRIGGER     */ 
-            {ROAMING_STATE_WAIT_4_TRIGGER, roamingMngr_smUnexpected},   /* SCAN             */ 
-            {ROAMING_STATE_WAIT_4_TRIGGER, roamingMngr_smUnexpected},   /* SELECT           */ 
-            {ROAMING_STATE_WAIT_4_TRIGGER, roamingMngr_smUnexpected},   /* REQ_HANDOVER     */ 
-            {ROAMING_STATE_WAIT_4_TRIGGER, roamingMngr_smUnexpected},   /* ROAM_SUCCESS     */ 
-            {ROAMING_STATE_WAIT_4_TRIGGER, roamingMngr_smUnexpected}    /* FAILURE          */
-        },                                                                              
-    
-        /* next state and actions for WAIT_4_CMD state */    
-        {   {ROAMING_STATE_WAIT_4_CMD, roamingMngr_smUnexpected},               /* START            */ 
-            {ROAMING_STATE_WAIT_4_CMD, roamingMngr_smUnexpected},               /* STOP             */ 
-            {ROAMING_STATE_WAIT_4_CMD, roamingMngr_smUnexpected},               /* ROAM_TRIGGER     */ 
-            {ROAMING_STATE_SCANNING, roamingMngr_smInvokeScan},                 /* SCAN             */ 
-            {ROAMING_STATE_SELECTING, roamingMngr_smSelection},                 /* SELECT           */ 
-            {ROAMING_STATE_WAIT_4_CMD, roamingMngr_smUnexpected},               /* REQ_HANDOVER     */ 
-            {ROAMING_STATE_WAIT_4_CMD, roamingMngr_smUnexpected},               /* ROAM_SUCCESS     */ 
-            {ROAMING_STATE_WAIT_4_CMD, roamingMngr_smUnexpected}                /* FAILURE          */ 
-        },                                                                              
-
-        /* next state and actions for SCANNING state */                      
-        {   {ROAMING_STATE_SCANNING, roamingMngr_smUnexpected},              /* START            */
-            {ROAMING_STATE_IDLE, roamingMngr_smStopWhileScanning},           /* STOP             */
-            {ROAMING_STATE_SCANNING, roamingMngr_smNop},                     /* ROAM_TRIGGER     */
-            {ROAMING_STATE_SCANNING, roamingMngr_smInvokeScan},              /* SCAN             */
-            {ROAMING_STATE_SELECTING, roamingMngr_smSelection},              /* SELECT           */
-            {ROAMING_STATE_SCANNING, roamingMngr_smUnexpected},              /* REQ_HANDOVER     */
-            {ROAMING_STATE_SCANNING, roamingMngr_smUnexpected},              /* ROAM_SUCCESS     */
-            {ROAMING_STATE_IDLE, roamingMngr_smScanFailure}                  /* FAILURE          */
-                                                                                   
-        }, 
-
-        /* next state and actions for SELECTING state */                      
-        {   {ROAMING_STATE_SELECTING, roamingMngr_smUnexpected},             /* START            */
-            {ROAMING_STATE_SELECTING, roamingMngr_smUnexpected},             /* STOP             */
-            {ROAMING_STATE_SELECTING, roamingMngr_smUnexpected},             /* ROAM_TRIGGER     */
-            {ROAMING_STATE_SELECTING, roamingMngr_smUnexpected},             /* SCAN             */
-            {ROAMING_STATE_SELECTING, roamingMngr_smUnexpected},             /* SELECT           */
-            {ROAMING_STATE_CONNECTING, roamingMngr_smHandover},              /* REQ_HANDOVER     */
-            {ROAMING_STATE_SELECTING, roamingMngr_smUnexpected},             /* ROAM_SUCCESS     */
-            {ROAMING_STATE_SELECTING, roamingMngr_smUnexpected}              /* FAILURE          */
-                                                                                   
-        }, 
-
-        /* next state and actions for CONNECTING state */                      
-        {   {ROAMING_STATE_CONNECTING, roamingMngr_smUnexpected},           /* START            */ 
-            {ROAMING_STATE_IDLE, roamingMngr_smStop},                       /* STOP             */ 
-            {ROAMING_STATE_IDLE, roamingMngr_smDisconnectWhileConnecting},      /* ROAM_TRIGGER     */ 
-            {ROAMING_STATE_CONNECTING, roamingMngr_smUnexpected},           /* SCAN,            */ 
-            {ROAMING_STATE_CONNECTING, roamingMngr_smUnexpected},           /* SELECT           */ 
-            {ROAMING_STATE_CONNECTING, roamingMngr_smHandover},             /* REQ_HANDOVER     */ 
-            {ROAMING_STATE_WAIT_4_TRIGGER, roamingMngr_smSuccHandover} ,    /* ROAM_SUCCESS     */ 
-            {ROAMING_STATE_IDLE, roamingMngr_smFailHandover}                /* FAILURE          */ 
-                                                                                   
-        } 
-}; 
-
-
-TI_INT8*  AutoRoamStateDescription[] = 
-{
-    "IDLE",
-    "WAIT_4_TRIGGER",
-    "WAIT_4_CMD",
-    "SCANNING",
-    "SELECTING",
-    "CONNECTING"
-};
-
-TI_INT8*  AutoRoamEventDescription[] = 
-{
-    "START",
-    "STOP",
-    "ROAM_TRIGGER",
-    "SCAN",
-    "SELECT",
-    "REQ_HANDOVER",
-    "ROAM_SUCCESS",
-    "FAILURE"
-};
-
-/**
-*
-* roamingMngr_smRoamTrigger 
-*
-* \b Description: 
-*
-* This procedure is called when an Roaming event occurs: BSS LOSS, LOW Quality etc.
- * Performs the following:
- * - If Roaming is disabled, ignore.
- * - Indicate Driver that Roaming process is starting
- * - Get the BSS list from the Scan Manager.
- * - If the list is not empty, start SELECTION
- * - If the list is empty, start SCANNING. The type of scan is decided
- *      according to the Neigbor APs existence.
-*
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void roamingMngr_smRoamTrigger(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t           *pRoamingMngr;
-    roamingMngr_smEvents    roamingEvent;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smRoamTrigger, enableDisable = %d\n",pRoamingMngr->roamingMngrConfig.enableDisable);
-
-    if (!pRoamingMngr->roamingMngrConfig.enableDisable)
-    {   
-		/* Ignore any other Roaming event when Roaming is disabled */
-        TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_smRoamTrigger, when Roaming is disabled\n");
-        return;
-    }
-    /* Indicate the driver that Roaming process is starting */
-    apConn_prepareToRoaming(pRoamingMngr->hAPConnection, pRoamingMngr->roamingTrigger);
-
-    /* Get the current BSSIDs from ScanMngr */
-    pRoamingMngr->pListOfAPs = scanMngr_getBSSList(pRoamingMngr->hScanMngr);
-    if ((pRoamingMngr->pListOfAPs != NULL) && (pRoamingMngr->pListOfAPs->numOfEntries > 0))
-    {   /* No need to SCAN, start SELECTING */
-        roamingEvent = ROAMING_EVENT_SELECT;
-    } 
-    else
-    {   /* check if list of APs exists in order to verify which scan to start */
-        roamingEvent = ROAMING_EVENT_SCAN;
-        if (pRoamingMngr->neighborApsExist)
-        {   /* Scan only Neighbor APs */
-            pRoamingMngr->scanType = ROAMING_PARTIAL_SCAN;
-        }
-        else
-        {   /* Scan all channels */
-            pRoamingMngr->scanType = ROAMING_FULL_SCAN;
-        }
-    }
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smRoamTrigger, scanType = %d\n", pRoamingMngr->scanType);
-
-    roamingMngr_smEvent(roamingEvent, pRoamingMngr);
-}
-
-/**
-*
-* roamingMngr_smInvokeScan 
-*
-* \b Description: 
-*
-* This procedure is called when scan should be performed in order
- * to select an AP to roam to.
- * This can be the first scan, a second scan after partail scan,
- * or scan after previous scan was failed.
- * In any case, the scan can either be:
- *  partail, on list of channles or
- *  full on all channels.
-*
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void roamingMngr_smInvokeScan(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t       *pRoamingMngr;
-    scan_mngrResultStatus_e     scanResult;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-
-    /* check which scan should be performed: Partial on list of channels, or full scan */
-    if ((pRoamingMngr->scanType == ROAMING_PARTIAL_SCAN) ||
-        (pRoamingMngr->scanType == ROAMING_PARTIAL_SCAN_RETRY))
-    {
-        scanResult = scanMngr_startImmediateScan (pRoamingMngr->hScanMngr, TI_TRUE);
-    }
-    else
-    {    /* Scan all channels */
-        scanResult = scanMngr_startImmediateScan (pRoamingMngr->hScanMngr, TI_FALSE);
-    }
-   
-    if (scanResult != SCAN_MRS_SCAN_RUNNING)
-    {   /* the scan failed, immitate scan complete event */
-        TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smInvokeScan, scanResult = %d\n", scanResult);
-        roamingMngr_immediateScanComplete(pRoamingMngr, scanResult);
-    }
-}
-
-/**
-*
-* roamingMngr_smSelection 
-*
-* \b Description: 
-*
-* This procedure is called when selection should be performed.
-*   It perform the following:
- * Prepare the candidate APs to roam according to:
- *  - Priority APs
- *  - Pre-Authenticated APs
- * If the candidate AP list is empty, only the current AP can be re-selected
- * Select one AP and trigger REQ_HANDOVER event.
- * 
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void roamingMngr_smSelection(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t               *pRoamingMngr;
-    TI_UINT32                      index;
-
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    pRoamingMngr->listOfCandidateAps.numOfNeighborBSS = 0;
-    pRoamingMngr->listOfCandidateAps.numOfPreAuthBSS = 0;
-    pRoamingMngr->listOfCandidateAps.numOfRegularBSS = 0;
-
-    pRoamingMngr->candidateApIndex = INVALID_CANDIDATE_INDEX;
-
-    if ((pRoamingMngr->pListOfAPs == NULL) || 
-        (pRoamingMngr->pListOfAPs->numOfEntries == 0))
-    {   /* Error, there cannot be selection  */
-        TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smSelection pListOfAPs is empty \n");
-        roamingMngr_smEvent(ROAMING_EVENT_REQ_HANDOVER, pRoamingMngr);
-        return;
-    }
-
-    /* Build the candidate AP list */
-    for (index=0; index<pRoamingMngr->pListOfAPs->numOfEntries; index++ )
-    {
-        if ( (pRoamingMngr->roamingTrigger <= ROAMING_TRIGGER_LOW_QUALITY_GROUP) &&
-            (pRoamingMngr->pListOfAPs->BSSList[index].RSSI < pRoamingMngr->roamingMngrConfig.apQualityThreshold))
-        {   /* Do not insert APs with low quality to the selection table, 
-                if the Roaming Trigger was low Quality */
-            TRACE8(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "candidate AP %x-%x-%x-%x-%x-%x with RSSI too low =%d, Quality=%d  \n", pRoamingMngr->pListOfAPs->BSSList[index].BSSID[0], pRoamingMngr->pListOfAPs->BSSList[index].BSSID[1], pRoamingMngr->pListOfAPs->BSSList[index].BSSID[2], pRoamingMngr->pListOfAPs->BSSList[index].BSSID[3], pRoamingMngr->pListOfAPs->BSSList[index].BSSID[4], pRoamingMngr->pListOfAPs->BSSList[index].BSSID[5], pRoamingMngr->pListOfAPs->BSSList[index].RSSI, pRoamingMngr->roamingMngrConfig.apQualityThreshold);
-
-            continue;
-        }
-
-        if (apConn_isSiteBanned(pRoamingMngr->hAPConnection, &pRoamingMngr->pListOfAPs->BSSList[index].BSSID) == TI_TRUE)
-        {
-            TRACE6(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, ": Candidate AP %02X-%02X-%02X-%02X-%02X-%02X is banned!\n",									 pRoamingMngr->pListOfAPs->BSSList[index].BSSID[0],	pRoamingMngr->pListOfAPs->BSSList[index].BSSID[1], pRoamingMngr->pListOfAPs->BSSList[index].BSSID[2], pRoamingMngr->pListOfAPs->BSSList[index].BSSID[3], pRoamingMngr->pListOfAPs->BSSList[index].BSSID[4], pRoamingMngr->pListOfAPs->BSSList[index].BSSID[5]);
-            continue;
-        }
-
-        if (pRoamingMngr->pListOfAPs->BSSList[index].bNeighborAP)
-        {   /* The AP is a neighbor AP, insert its index to the neighbor APs list */
-            pRoamingMngr->listOfCandidateAps.neighborBSSList[pRoamingMngr->listOfCandidateAps.numOfNeighborBSS] = index; 
-            pRoamingMngr->listOfCandidateAps.numOfNeighborBSS++;
-        }
-        else if (apConn_getPreAuthAPStatus(pRoamingMngr->hAPConnection, 
-										   &pRoamingMngr->pListOfAPs->BSSList[index].BSSID))
-        {   /* This AP is a pre-auth AP */
-            pRoamingMngr->listOfCandidateAps.preAuthBSSList[pRoamingMngr->listOfCandidateAps.numOfPreAuthBSS] = index; 
-            pRoamingMngr->listOfCandidateAps.numOfPreAuthBSS++;
-        }
-        else
-        {   /* This AP is not Neighbor nor Pre-Auth */
-            pRoamingMngr->listOfCandidateAps.regularBSSList[pRoamingMngr->listOfCandidateAps.numOfRegularBSS] = index; 
-            pRoamingMngr->listOfCandidateAps.numOfRegularBSS++;
-        }
-    }
-
-#ifdef TI_DBG
-    {   /* for debug */
-        paramInfo_t     param;
-
-        param.paramType = ROAMING_MNGR_PRINT_CANDIDATE_TABLE;
-        roamingMngr_getParam(pRoamingMngr, &param);
-
-    }
-#endif
-    roamingMngr_smEvent(ROAMING_EVENT_REQ_HANDOVER, pRoamingMngr);
-
-}
-
-/**
-*
-* roamingMngr_smHandover 
-*
-* \b Description: 
-*
-* This procedure is called when handover should be invoked.
-*   Go over the candidate APs and start handover to each of them. 
- * If there's no candidate APs, disconnect.
- * Handover to the current AP is allowed only if the trigger is
- * low quality.
- * 
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void roamingMngr_smHandover(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t           *pRoamingMngr;
-    bssEntry_t              *pApToConnect;
-    apConn_connRequest_t    requestToApConn;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-
-    if ((pRoamingMngr->handoverWasPerformed) && (pRoamingMngr->candidateApIndex == CURRENT_AP_INDEX))
-    {   /* Handover with the current AP already failed, Disconnect */
-        roamingMngr_smEvent(ROAMING_EVENT_FAILURE, pRoamingMngr);
-        return;
-    }
-    if (pRoamingMngr->listOfCandidateAps.numOfNeighborBSS > 0)
-    {   /* Neighbor APs are the highest priority to Roam */
-        pRoamingMngr->candidateApIndex = 
-            pRoamingMngr->listOfCandidateAps.neighborBSSList[pRoamingMngr->listOfCandidateAps.numOfNeighborBSS-1];
-        pRoamingMngr->listOfCandidateAps.numOfNeighborBSS--;
-    }
-    else if (pRoamingMngr->listOfCandidateAps.numOfPreAuthBSS > 0)
-    {   /* Pre-Auth APs are the second priority to Roam */
-        pRoamingMngr->candidateApIndex = 
-            pRoamingMngr->listOfCandidateAps.preAuthBSSList[pRoamingMngr->listOfCandidateAps.numOfPreAuthBSS-1];
-        pRoamingMngr->listOfCandidateAps.numOfPreAuthBSS--;
-    }
-    else if (pRoamingMngr->listOfCandidateAps.numOfRegularBSS > 0)
-    {   /* Regular APs are APs that are not pre-authenticated and not Neighbor */
-        pRoamingMngr->candidateApIndex = 
-            pRoamingMngr->listOfCandidateAps.regularBSSList[pRoamingMngr->listOfCandidateAps.numOfRegularBSS-1];
-        pRoamingMngr->listOfCandidateAps.numOfRegularBSS--;
-    }
-    else
-    {   /* No Candidate APs */
-        pRoamingMngr->candidateApIndex = INVALID_CANDIDATE_INDEX;
-    }
-
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smHandover, candidateApIndex=%d \n", pRoamingMngr->candidateApIndex);
-
-
-    if (pRoamingMngr->candidateApIndex == INVALID_CANDIDATE_INDEX)
-    {   /* No cnadidate to Roam to, only the current AP is candidate */
-        if (pRoamingMngr->roamingTrigger <= ROAMING_TRIGGER_LOW_QUALITY_GROUP)
-        {   /* If the trigger to Roam is low quality, and there are no candidate APs
-                to roam to, retain connected to the current AP */
-            requestToApConn.requestType = (pRoamingMngr->handoverWasPerformed) ? AP_CONNECT_RECONNECT_CURR_AP : AP_CONNECT_RETAIN_CURR_AP;
-            pRoamingMngr->candidateApIndex = CURRENT_AP_INDEX;
-        }
-        else
-        {   /* Disconnect the BSS, there are no more APs to roam to */
-            roamingMngr_smEvent(ROAMING_EVENT_FAILURE, pRoamingMngr);
-            return;
-        }
-    }
-    else
-    {   /* There is a valid candidate AP */
-        if (pRoamingMngr->roamingTrigger > ROAMING_TRIGGER_FAST_CONNECT_GROUP)
-        {   /* Full re-connection should be perfromed */
-            requestToApConn.requestType = AP_CONNECT_FULL_TO_AP; 
-        }
-        else
-        {   /* Fast re-connection should be perfromed */
-            requestToApConn.requestType = AP_CONNECT_FAST_TO_AP; 
-        }
-    }
-#ifdef TI_DBG
-    /* For debug */
-    if (!pRoamingMngr->handoverWasPerformed)
-    {   /* Take the time before the first handover started */
-        pRoamingMngr->roamingHandoverStartedTimestamp = os_timeStampMs(pRoamingMngr->hOs);
-    }
-#endif
-    
-    if (pRoamingMngr->candidateApIndex == CURRENT_AP_INDEX)
-    {   /* get the current AP */
-        pApToConnect = apConn_getBSSParams(pRoamingMngr->hAPConnection);
-    }
-    else
-    {   /* get the candidate AP */
-        pRoamingMngr->handoverWasPerformed = TI_TRUE;
-        pApToConnect = &pRoamingMngr->pListOfAPs->BSSList[pRoamingMngr->candidateApIndex];
-    }
-    TRACE3(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smHandover, candidateApIndex=%d, requestType = %d, channel=%d \n", 							 pRoamingMngr->candidateApIndex, requestToApConn.requestType, pApToConnect->channel);
-
-    requestToApConn.dataBufLength = 0;
-
-#ifdef XCC_MODULE_INCLUDED
-    apConn_connectToAP(pRoamingMngr->hAPConnection, pApToConnect, &requestToApConn, pRoamingMngr->bSendTspecInReassPkt);
-#else
-    apConn_connectToAP(pRoamingMngr->hAPConnection, pApToConnect, &requestToApConn, TI_TRUE);
-#endif
-}
-
-/**
-*
-* roamingMngr_smDisconnectWhileConnecting 
-*
-* \b Description: 
-*
-* This procedure is called when the Station is in the process of connection,
- * and the AP disconnects the station. 
- * 
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void roamingMngr_smDisconnectWhileConnecting(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t           *pRoamingMngr;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
- 
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smDisconnectWhileConnecting, candidateApIndex=%d \n", pRoamingMngr->candidateApIndex);
-
-    if (pRoamingMngr->roamingTrigger > ROAMING_TRIGGER_FAST_CONNECT_GROUP)
-    {   /* If the trigger is from the Full Connect group, then stop the connection. */
-        /* clean intenal variables */
-        pRoamingMngr->maskRoamingEvents = TI_TRUE;
-        pRoamingMngr->roamingTrigger = ROAMING_TRIGGER_NONE;
-
-        scanMngr_stopContScan(pRoamingMngr->hScanMngr);
-#ifdef TI_DBG
-        pRoamingMngr->roamingFailedHandoverNum++;
-#endif
-        apConn_disconnect(pRoamingMngr->hAPConnection);
-        
-    }
-}
-
-/**
-*
-* roamingMngr_smSuccHandover 
-*
-* \b Description: 
-*
-* This procedure is called when handover succeeded.
- * Inform Scan Manager about the new AP.    
- * UnMask Roaming Triggers. 
- * 
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void roamingMngr_smSuccHandover(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t           *pRoamingMngr;
-    bssEntry_t              *pNewConnectedAp;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smSuccHandover, candidateApIndex=%d \n", pRoamingMngr->candidateApIndex);
-
-    if (pRoamingMngr->handoverWasPerformed &&
-        (pRoamingMngr->pListOfAPs != NULL) &&
-        (pRoamingMngr->pListOfAPs->numOfEntries>0))
-    {
-        if (pRoamingMngr->candidateApIndex == CURRENT_AP_INDEX)
-        {   
-			/* get the current AP */
-            pNewConnectedAp = apConn_getBSSParams(pRoamingMngr->hAPConnection);
-        }
-        else
-        {   
-			/* get the candidate AP */
-            pNewConnectedAp = &pRoamingMngr->pListOfAPs->BSSList[pRoamingMngr->candidateApIndex];
-        }
-
-        scanMngr_handoverDone(pRoamingMngr->hScanMngr, 
-							  &pNewConnectedAp->BSSID,
-							  pNewConnectedAp->band);
-    }
-    pRoamingMngr->maskRoamingEvents = TI_FALSE;
-    pRoamingMngr->candidateApIndex = INVALID_CANDIDATE_INDEX;
-    pRoamingMngr->handoverWasPerformed = TI_FALSE;
-    pRoamingMngr->roamingTrigger = ROAMING_TRIGGER_NONE;
-
-    /* Start pre-authentication in order to set PMKID
-        for the current AP */
-    if (pRoamingMngr->staCapabilities.authMode==os802_11AuthModeWPA2)
-    {
-		/* No Pre-Auth is required */
-        bssList_t           *pBssList;
-
-        pBssList = os_memoryAlloc(pRoamingMngr->hOs, sizeof(bssList_t));
-        if (!pBssList)
-        {
-            return;
-        }
-        pBssList->numOfEntries = 0;
-        apConn_preAuthenticate(pRoamingMngr->hAPConnection, pBssList);
-        os_memoryFree(pRoamingMngr->hOs, pBssList, sizeof(bssList_t));
-    }
-}
-
-/**
-*
-* roamingMngr_smFailHandover 
-*
-* \b Description: 
-*
-* This procedure is called when handover failed and there are no more
- * APs to roam to. Disconnect the BSS and retrun to IDLE state.
-* 
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void roamingMngr_smFailHandover(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t           *pRoamingMngr;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smFailHandover \n");
-
-    /* clean intenal variables */
-    pRoamingMngr->maskRoamingEvents = TI_TRUE;
-    pRoamingMngr->roamingTrigger = ROAMING_TRIGGER_NONE;
-
-    scanMngr_stopContScan(pRoamingMngr->hScanMngr);
-#ifdef TI_DBG
-    pRoamingMngr->roamingFailedHandoverNum++;
-#endif
-    apConn_disconnect(pRoamingMngr->hAPConnection);
-}
-
-/**
-*
-* roamingMngr_smScanFailure 
-*
-* \b Description: 
-*
-* This procedure is called when all scan attempts failed. 
- * Send Disconnect event and return to IDLE state.
- *
-* 
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void roamingMngr_smScanFailure(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t           *pRoamingMngr;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smScanFailure \n");
-
-    /* clean intenal variables */
-    pRoamingMngr->maskRoamingEvents = TI_TRUE;
-    pRoamingMngr->roamingTrigger = ROAMING_TRIGGER_NONE;
-
-    scanMngr_stopContScan(pRoamingMngr->hScanMngr);
-
-    apConn_disconnect(pRoamingMngr->hAPConnection);
-}
-
-#if 0
-/**
-*
-* roamingMngr_smCmdFailure 
-*
-* \b Description: 
-*
-* This procedure is called when all the driver failed to prepare to Roaming. 
- * Mask all future Roaming triggers.
- *
-* 
-* \b ARGS:
-*
-*  I   - hRoamingMngr - roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void roamingMngr_smCmdFailure(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t           *pRoamingMngr;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smCmdFailure \n");
-
-    /* clean intenal variables */
-    pRoamingMngr->maskRoamingEvents = TI_TRUE;
-    pRoamingMngr->roamingTrigger = ROAMING_TRIGGER_NONE; 
-}
-#endif
-
-/**
-*
-* roamingMngr_smStartIdle - Start event when in Idle state
-*
-* \b Description: 
-*
-* Start event when in Idle state. 
- * This function is called when the station becomes CONNECTED.
- * Perform the following:
- * - The current state becomes WAIT_4_TRIGGER 
- * - Unmask Roaming events
- * - Set handoverWasPerformed to TI_FALSE
- * - Start the Scan Manager
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to the roamingMngr SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void roamingMngr_smStartIdle(void *pData)
-{
-    roamingMngr_t       *pRoamingMngr;
-    bssEntry_t          *pCurBssEntry;
-
-    pRoamingMngr = (roamingMngr_t*)pData;
-    TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smStartIdle, Unmask Roaming events and start continuos scan \n");
-
-    pRoamingMngr->maskRoamingEvents = TI_FALSE;
-    pRoamingMngr->handoverWasPerformed = TI_FALSE;
-    pRoamingMngr->roamingTrigger = ROAMING_TRIGGER_NONE;
-
-    pCurBssEntry = apConn_getBSSParams(pRoamingMngr->hAPConnection);
-    scanMngr_startContScan(pRoamingMngr->hScanMngr, &pCurBssEntry->BSSID, pCurBssEntry->band);
-
-    /* Start pre-authentication in order to set PMKID
-        for the current AP */
-    if (pRoamingMngr->staCapabilities.authMode==os802_11AuthModeWPA2)
-    {   /* No Pre-Auth is required */
-        bssList_t           *pBssList;
-
-        TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smStartIdle, Pre-Auth to cur AP\n");
-        pBssList = os_memoryAlloc(pRoamingMngr->hOs, sizeof(bssList_t));
-        if (!pBssList)
-        {
-            return;
-        }
-
-        pBssList->numOfEntries = 0;
-        apConn_preAuthenticate(pRoamingMngr->hAPConnection, pBssList);
-        os_memoryFree(pRoamingMngr->hOs, pBssList, sizeof(bssList_t));
-    }
-}
-
diff --git a/wl1271/stad/src/Application/roamingMngr_autoSM.h b/wl1271/stad/src/Application/roamingMngr_autoSM.h
deleted file mode 100644
index 6d662c3..0000000
--- a/wl1271/stad/src/Application/roamingMngr_autoSM.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * roamingMngr_autoSM.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file roamingMngr_autoSM.h
- *  \brief Internal Roaming Manager API
- *
- *  \see roamingMngr.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Roaming Manager	    		                                *
- *   PURPOSE: Roaming Manager Module API                              		*
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _ROAMING_MNGR_AUTO_SM_H_
-#define _ROAMING_MNGR_AUTO_SM_H_
-
-#include "osApi.h"
-#include "paramOut.h"
-#include "scanMngrApi.h"
-#include "bssTypes.h"
-#include "DrvMainModules.h"
-
-
-/*-----------*/
-/* Constants */
-/*-----------*/
-
-/** state machine states */
-typedef enum 
-{
-/*	0	*/	ROAMING_STATE_IDLE,
-/*	1	*/	ROAMING_STATE_WAIT_4_TRIGGER,
-/*	2	*/  ROAMING_STATE_WAIT_4_CMD,
-/*	3	*/  ROAMING_STATE_SCANNING,
-/*	4	*/  ROAMING_STATE_SELECTING,
-/*	5	*/  ROAMING_STATE_CONNECTING,
-/*	6	*/  ROAMING_STATE_LAST
-
-} roamingMngr_smStates;
-
-/** State machine events */
-typedef enum 
-{
-/*	0	*/	ROAMING_EVENT_START = 0, 			/* CONNECTED */
-/*	1	*/	ROAMING_EVENT_STOP, 			/* NOT CONNECTED */
-/*	2	*/	ROAMING_EVENT_ROAM_TRIGGER,
-/*	3	*/	ROAMING_EVENT_SCAN, 
-/*	4	*/	ROAMING_EVENT_SELECT, 
-/*	5	*/	ROAMING_EVENT_REQ_HANDOVER, 
-/*	6	*/	ROAMING_EVENT_ROAM_SUCCESS, 
-/*	7	*/	ROAMING_EVENT_FAILURE, 
-/*	8	*/	ROAMING_EVENT_LAST
-
-} roamingMngr_smEvents;
-
-#define ROAMING_MNGR_NUM_STATES     	ROAMING_STATE_LAST   
-#define ROAMING_MNGR_NUM_EVENTS     	ROAMING_EVENT_LAST
-
-#define INVALID_CANDIDATE_INDEX     	0xFF
-#define CURRENT_AP_INDEX            	0xFE
-
-
-extern TGenSM_actionCell roamingMngrAuto_matrix[ROAMING_MNGR_NUM_STATES][ROAMING_MNGR_NUM_EVENTS];
-extern TI_INT8*  AutoRoamStateDescription[];
-extern TI_INT8*  AutoRoamEventDescription[];
-
-/*--------------*/
-/* Enumerations */
-/*--------------*/
-
-/*----------*/
-/* Typedefs */
-/*----------*/
-
-/*------------*/
-/* Structures */
-/*------------*/
-
-/*---------------------------*/
-/* External data definitions */
-/*---------------------------*/
-
-/*--------------------------------*/
-/* External functions definitions */
-/*--------------------------------*/
-
-/*----------------------------*/
-/* Global Function prototypes */
-/*----------------------------*/
-
-
-#endif /* _ROAMING_MNGR_AUTO_SM_H_ */
-
diff --git a/wl1271/stad/src/Application/roamingMngr_manualSM.c b/wl1271/stad/src/Application/roamingMngr_manualSM.c
deleted file mode 100644
index ca2c516..0000000
--- a/wl1271/stad/src/Application/roamingMngr_manualSM.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * roamingMngr_manualSM.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file roamingMngr_manualSM.c
- *  \brief Roaming Manager
- *
- *  \see roamingMngr_manualSM.h
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Roaming Manager                                               *
- *   PURPOSE:                                                               *
- *   Roaming manager is responsible to receive Roaming triggers and try
- *      to select a better AP.
- *      The Roaming triggers are: Low RSSI, PER, consecutive No ACK on TX,
- *      beacon Missed or External request.
- *      In each Internal Roaming request, scan is performed and selection for 
- *      better AP. Better AP is defined as a different AP with better RSSI,
- *      and similar SSID and security settings.
- *      If better AP is found, there is a check for fast-roaming via the
- *      Supplicant. Then connection to the new AP is invoked.
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_136
-#include "osApi.h"
-#include "paramOut.h"
-#include "report.h"
-#include "scanMngrApi.h"
-#include "roamingMngrApi.h"
-#include "roamingMngrTypes.h"
-#include "bssTypes.h"
-#include "DrvMainModules.h"
-#include "TWDriver.h"
-#include "siteMgrApi.h"
-#include "GenSM.h"
-#include "apConnApi.h"
-#include "roamingMngr_manualSM.h"
-#include "EvHandler.h"
-#include "public_types.h"
-
-
-typedef enum 
-{
-	REASSOC_RESP_SUCCESS =0,
-	REASSOC_RESP_FAILURE,
-    REASSOC_RESP_REJECT
-} reassociationResp_e;
-
-
-static void roamingMngr_SendReassocEvent(TI_HANDLE hRoamingMngr, reassociationResp_e ReassResp);
-static void roamingMngr_smIdleToStart (TI_HANDLE hRoamingMngr);
-static void roamingMngr_smSTOP (TI_HANDLE hRoamingMngr);
-static void roamingMngr_smConnectedToScan (TI_HANDLE hRoamingMngr);
-static void roamingMngr_smConnectedToHandover(TI_HANDLE hRoamingMngr);
-static void roamingMngr_smScanToConnected(TI_HANDLE hRoamingMngr);
-static void roamingMngr_smHandoverToHandoverConnectEvent (TI_HANDLE hRoamingMngr);
-static void roamingMngr_smHandoverToHandoverFailEvent (TI_HANDLE hRoamingMngr);
-static void roamingMngr_smHandoverToConnectedSuccessEvent(TI_HANDLE hRoamingMngr);
-static void roamingMngr_smHandoverToConnectedRejectEvent(TI_HANDLE hRoamingMngr);
-
-
-/*-----------*/
-/* Constants */
-/*-----------*/
-
-TGenSM_actionCell roamingMngrManual_matrix[ROAMING_MANUAL_NUM_STATES][ROAMING_MANUAL_NUM_EVENTS] =
-{
-    /* next state and actions for IDLE state */
-    {   
-        {ROAMING_MANUAL_STATE_CONNECTED, roamingMngr_smIdleToStart},            /* START */
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},                   /* SCAN  */ 
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},                   /*CONNECT*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},                  /* STOP*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},                  /* REJECT*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},                  /* SUCCESS*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},                  /* FAIL*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},                  /* COMPLETE*/
-    },                                                                              
-    /* next state and actions for CONNECTED state */
-    {   
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},		                /* START */
-        {ROAMING_MANUAL_STATE_SCAN, roamingMngr_smConnectedToScan},                 /* SCAN  */ 
-        {ROAMING_MANUAL_STATE_HANDOVER, roamingMngr_smConnectedToHandover},        /*CONNECT*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smSTOP},                 	        /* STOP*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},                      /* REJECT*/
-        {ROAMING_MANUAL_STATE_CONNECTED, roamingMngr_smNop},                        /* SUCCESS* retain CurrAp called */
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},                      /* FAIL*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},                      /* COMPLETE*/
-    },
-    /* next state and actions for SCAN state */
-    {   
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},              /* START */
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},            /* SCAN  */ 
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},            /*CONNECT*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smSTOP},            	    /* STOP*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},              /* REJECT*/
-        {ROAMING_MANUAL_STATE_SCAN, roamingMngr_smNop},                     /* SUCCESS* retain CurrAp called */
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},              /* FAIL*/
-        {ROAMING_MANUAL_STATE_CONNECTED, roamingMngr_smScanToConnected},  /* COMPLETE*/
-    },
-    /* next state and actions for HANDOVER state */
-    {   
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},                      /* START */
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected},                    /* SCAN  */ 
-        {ROAMING_MANUAL_STATE_HANDOVER,roamingMngr_smHandoverToHandoverConnectEvent},    /*CONNECT*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smSTOP},                            /* STOP*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smHandoverToConnectedRejectEvent},  /* REJECT*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smHandoverToConnectedSuccessEvent},  /* SUCCESS*/
-        {ROAMING_MANUAL_STATE_HANDOVER, roamingMngr_smHandoverToHandoverFailEvent},    /* FAIL*/
-        {ROAMING_MANUAL_STATE_IDLE, roamingMngr_smUnexpected },                    /* COMPLETE*/
-    }
-};
-
-TI_INT8*  ManualRoamStateDescription[] = 
-{
-    "IDLE",
-    "CONNECTED",
-    "SCAN",
-    "HANDOVER"
-};
-
-TI_INT8*  ManualRoamEventDescription[] = 
-{
-    "START",
-    "SCAN",
-    "CONNECT",
-    "STOP",
-    "REJECT",
-    "SUCCESS",
-    "FAIL",
-    "COMPLETE"
-};
-
-static void roamingMngr_smIdleToStart (TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t* pRoamingMngr;
-
-    pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    scanMngr_startManual((TI_HANDLE)pRoamingMngr->hScanMngr);
-}
-
-static void roamingMngr_smSTOP (TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t* pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-
-    //if (SCAN_ISS_IDLE != pScanMngr->immedScanState || SCAN_CSS_IDLE!= != pScanMngr->contScanState) 
-    {
-        roamingMngr_smStopWhileScanning(hRoamingMngr);
-    }
-    
-    scanMngr_stopManual(pRoamingMngr->hScanMngr);
-}
-
-	
-static void roamingMngr_smConnectedToScan (TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t  *pRoamingMngr = (roamingMngr_t*) hRoamingMngr;
-    TI_STATUS status = TI_OK;
-
-    status= apConn_prepareToRoaming(pRoamingMngr->hAPConnection, ROAMING_TRIGGER_NONE);
-
-    if (status  == TI_OK)
-    {
-        status = scanMngr_startImmediateScan (pRoamingMngr->hScanMngr,TI_FALSE);
-    }
-    else
-    {
-        roamingMngr_smEvent(ROAMING_MANUAL_EVENT_COMPLETE, hRoamingMngr);
-    }
-}
-
-static void roamingMngr_smConnectedToHandover(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t  *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
-    TI_STATUS status = TI_OK;
-
-    pRoamingMngr->handoverWasPerformed = TI_TRUE;
-    status= apConn_prepareToRoaming(pRoamingMngr->hAPConnection, pRoamingMngr->roamingTrigger); 
-
-    if (status  == TI_OK)
-    {
-        apConn_connectToAP(pRoamingMngr->hAPConnection, &(pRoamingMngr->targetAP.newAP), &(pRoamingMngr->targetAP.connRequest), TI_TRUE);
-    }
-    else
-    {
-        roamingMngr_smEvent(ROAMING_MANUAL_EVENT_REJECT, hRoamingMngr);
-    }	
-}
-
-static void roamingMngr_smScanToConnected(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_t  *pRoamingMngr = (roamingMngr_t*) hRoamingMngr;
-    apConn_connRequest_t request;
-
-    request.dataBufLength = 0;
-    request.requestType = AP_CONNECT_RETAIN_CURR_AP;
-    apConn_connectToAP(pRoamingMngr->hAPConnection, NULL , &request , TI_FALSE);
-}
-
-static void roamingMngr_smHandoverToHandoverConnectEvent (TI_HANDLE hRoamingMngr)
-{
-	roamingMngr_t  *pRoamingMngr = (roamingMngr_t*) hRoamingMngr;
-
-    apConn_connectToAP(pRoamingMngr->hAPConnection, &(pRoamingMngr->targetAP.newAP), &(pRoamingMngr->targetAP.connRequest), TI_TRUE);
-}
-
-static void roamingMngr_smHandoverToHandoverFailEvent (TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_SendReassocEvent(hRoamingMngr, REASSOC_RESP_FAILURE);
-}
-
-static void roamingMngr_smHandoverToConnectedSuccessEvent(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_SendReassocEvent(hRoamingMngr, REASSOC_RESP_SUCCESS);
-}
-
-static void roamingMngr_smHandoverToConnectedRejectEvent(TI_HANDLE hRoamingMngr)
-{
-    roamingMngr_SendReassocEvent(hRoamingMngr, REASSOC_RESP_REJECT);
-}
-
-static void roamingMngr_SendReassocEvent(TI_HANDLE hRoamingMngr, reassociationResp_e ReassResp)
-{
-	roamingMngr_t  *pRoamingMngr = (roamingMngr_t*) hRoamingMngr;
-
-    TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_SendReassocEvent(): %d \n", ReassResp);
-    EvHandlerSendEvent(pRoamingMngr->hEvHandler,
-                       IPC_EVENT_REASSOCIATION_RESP,
-                       (TI_UINT8*)(&ReassResp),
-                       sizeof(reassociationResp_e));
-}
-
-
-
diff --git a/wl1271/stad/src/Application/roamingMngr_manualSM.h b/wl1271/stad/src/Application/roamingMngr_manualSM.h
deleted file mode 100644
index c96d4cd..0000000
--- a/wl1271/stad/src/Application/roamingMngr_manualSM.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * roamingMngr_manualSM.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file roamingMngr_manualSM.h
- *  \brief Internal Roaming Manager API
- *
- *  \see roamingMngr.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Roaming Manager	    		                                *
- *   PURPOSE: Roaming Manager Module API                              		*
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _ROAMING_MNGR_MANUAL_SM_H_
-#define _ROAMING_MNGR_MANUAL_SM_H_
-
-/*-----------*/
-/* Constants */
-/*-----------*/
-
-/** state machine states */
-typedef enum 
-{
-/*	0	*/  ROAMING_MANUAL_STATE_IDLE = 0,
-/*	1	*/  ROAMING_MANUAL_STATE_CONNECTED,
-/*	2	*/  ROAMING_MANUAL_STATE_SCAN,
-/*	3	*/  ROAMING_MANUAL_STATE_HANDOVER,
-/*	4	*/  ROAMING_MANUAL_STATE_LAST   
-} ERoamManual_smStates;
-
-/** State machine events */
-typedef enum 
-{
-/*	0	*/	ROAMING_MANUAL_EVENT_START = 0,
-/*	1	*/	ROAMING_MANUAL_EVENT_SCAN,
-/*	2	*/	ROAMING_MANUAL_EVENT_CONNECT,
-/*	3	*/	ROAMING_MANUAL_EVENT_STOP, 
-/*	4	*/	ROAMING_MANUAL_EVENT_REJECT, 
-/*	5	*/	ROAMING_MANUAL_EVENT_SUCCESS,
-/*	6	*/	ROAMING_MANUAL_EVENT_FAIL,
-/*	7	*/	ROAMING_MANUAL_EVENT_COMPLETE,
-/*	8	*/	ROAMING_MANUAL_EVENT_LAST,
-} ERoamManual_smEvents;
-
-
-#define ROAMING_MANUAL_NUM_STATES    ROAMING_MANUAL_STATE_LAST   
-#define ROAMING_MANUAL_NUM_EVENTS    ROAMING_MANUAL_EVENT_LAST
-
-
-extern TGenSM_actionCell roamingMngrManual_matrix[ROAMING_MANUAL_NUM_STATES][ROAMING_MANUAL_NUM_EVENTS];
-extern TI_INT8*  ManualRoamStateDescription[];
-extern TI_INT8*  ManualRoamEventDescription[];
-
-/*--------------*/
-/* Enumerations */
-/*--------------*/
-
-/*----------*/
-/* Typedefs */
-/*----------*/
-
-/*------------*/
-/* Structures */
-/*------------*/
-
-/*---------------------------*/
-/* External data definitions */
-/*---------------------------*/
-
-/*--------------------------------*/
-/* External functions definitions */
-/*--------------------------------*/
-
-/*----------------------------*/
-/* Global Function prototypes */
-/*----------------------------*/
-
-
-#endif /* _ROAMING_MNGR_MANUAL_SM_H_ */
-
diff --git a/wl1271/stad/src/Application/scanMngr.c b/wl1271/stad/src/Application/scanMngr.c
deleted file mode 100644
index 64108e1..0000000
--- a/wl1271/stad/src/Application/scanMngr.c
+++ /dev/null
@@ -1,4672 +0,0 @@
-/*
- * scanMngr.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  scanMngr.c
- *  \brief This file include the scan manager module implementation
- *
- *  \see   scanMngr.h, scanMngrApi.h scanMngrTypes.h
- */
-
-
-#define __FILE_ID__  FILE_ID_9
-#include "TWDriver.h"
-#include "roamingMngrApi.h"
-#include "osApi.h"
-#include "timer.h"
-#include "ScanCncn.h"
-#include "report.h"
-#include "regulatoryDomainApi.h"
-#include "siteMgrApi.h"
-#include "scanMngr.h"
-#include "DrvMainModules.h"
-#include "EvHandler.h"
-#include "apConnApi.h"
-
-
-/*
- ***********************************************************************
- *  Internal functions
- ***********************************************************************
- */
-/***************************************************************************
-*                           reminder64                                     *
-****************************************************************************
-DESCRIPTION:    returns the reminder of a 64 bit number division by a 32
-                bit number.
-                                                                                                   
-INPUT:      The dividee (64 bit number to divide)
-            The divider (32 bit number to divide by)
-
-OUTPUT:     
-            
-
-RETURN:     The reminder
-****************************************************************************/
-static TI_UINT32 reminder64( TI_UINT64 dividee, TI_UINT32 divider )
-{
-    TI_UINT32 divideeHigh, divideeLow, partA, partB, mod28n, mod24n, mod16n, partA8n, mod8n, mod4n;
-
-    divideeHigh = INT64_HIGHER( dividee );
-    divideeLow = INT64_LOWER( dividee );
-
-    mod8n = 256 % divider;
-    mod4n = 16 % divider;
-
-    partA = (mod4n * (divideeHigh % divider)) % divider;
-    partA8n = (partA * mod4n) % divider;
-    mod16n = (partA8n * mod8n) % divider;
-    mod24n = (mod8n * mod16n) % divider;
-    mod28n = (mod4n * mod24n) % divider;
-
-    partB = (mod4n * mod28n) % divider;
-    return ( partB + (divideeLow % divider)) % divider;
-}
-
-
-
-static void scanMngr_setManualScanDefaultParams(TI_HANDLE hScanMngr)
-{
-    scanMngr_t* 	pScanMngr = (scanMngr_t*)hScanMngr;
-
-    pScanMngr->manualScanParams.desiredSsid.len = 1;        /* will be set by the scan concentrator */
-    pScanMngr->manualScanParams.scanType= SCAN_TYPE_NORMAL_ACTIVE;
-    pScanMngr->manualScanParams.band = RADIO_BAND_2_4_GHZ;
-    pScanMngr->manualScanParams.probeReqNumber =  3;
-    pScanMngr->manualScanParams.probeRequestRate = (ERateMask)RATE_MASK_UNSPECIFIED;
-}
-
-
-static void scanMngr_reportContinuousScanResults (TI_HANDLE hScanMngr,	EScanCncnResultStatus resultStatus)
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    BssListEx_t   BssListEx;
-
-
-    if (resultStatus == SCAN_CRS_SCAN_COMPLETE_OK)
-    {
-        BssListEx.pListOfAPs = scanMngr_getBSSList(hScanMngr);
-        BssListEx.scanIsRunning = pScanMngr->bContinuousScanStarted; /* false = stopped */
-        EvHandlerSendEvent(pScanMngr->hEvHandler, IPC_EVENT_CONTINUOUS_SCAN_REPORT, (TI_UINT8*)&BssListEx, sizeof(BssListEx_t));
-    }
-    else
-    {
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_ERROR, "scanMngr_reportContinuousScanResults failed. scan status %d\n", resultStatus);
-    }
-}
-
-
-
-/**
- * \\n
- * \date 01-Mar-2005\n
- * \brief Frees scan manager resources.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrFreeMem (TI_HANDLE hScanMngr)
-{
-    scanMngr_t* pScanMngr = hScanMngr;
-    TI_UINT8 i;
-
-    /* free frame storage space */
-    for (i = 0; i < MAX_SIZE_OF_BSS_TRACK_LIST; i++)
-    {
-        if (pScanMngr->BSSList.BSSList[i].pBuffer)
-        {
-            os_memoryFree (pScanMngr->hOS, pScanMngr->BSSList.BSSList[i].pBuffer, MAX_BEACON_BODY_LENGTH);
-        }
-    }
-
-    /* free the timer */
-    if (pScanMngr->hContinuousScanTimer)
-    {
-        tmr_DestroyTimer (pScanMngr->hContinuousScanTimer);
-    }
-
-    /* free the scan manager object */
-    os_memoryFree (pScanMngr->hOS, hScanMngr, sizeof(scanMngr_t));
-}
-
-/**
- * \\n
- * \date 01-Mar-2005\n
- * \brief Callback used by the scan concentrator for immediate scan result.\n
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param resultStatus - reason for calling this function (frame received / scan complete).\n
- * \param frameInfo - frame related information (in case of a frame reception).\n
- * \param SPSStatus - bitmap indicating which channels were scan, in case of an SPS scan.\n
- */
-void scanMngr_immedScanCB( TI_HANDLE hScanMngr, EScanCncnResultStatus resultStatus, 
-                           TScanFrameInfo* frameInfo, TI_UINT16 SPSStatus )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TScanBandPolicy* aPolicy;
-    EScanCncnResultStatus nextResultStatus;
-
-    TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_immedScanCB called, hScanMngr=0x%x, resultStatus=%d", hScanMngr, resultStatus);
-    
-    switch (resultStatus)
-    {
-    /* if this function is called because a frame was received, update the BSS list accordingly */
-    case SCAN_CRS_RECEIVED_FRAME:
-        scanMngrUpdateReceivedFrame( hScanMngr, frameInfo );
-        break;
-
-    /* scan was completed successfuly */
-    case SCAN_CRS_SCAN_COMPLETE_OK:
-        /* act according to immediate scan state */
-        switch (pScanMngr->immedScanState)
-        {
-        /* immediate scan on G finished */
-        case SCAN_ISS_G_BAND:
-#ifdef TI_DBG
-        pScanMngr->stats.ImmediateGByStatus[ resultStatus ]++;
-#endif
-        /* check if another scan is needed (this time on A) */
-        aPolicy = scanMngrGetPolicyByBand( hScanMngr, RADIO_BAND_5_0_GHZ );
-            if ( (NULL != aPolicy) &&
-                 (SCAN_TYPE_NO_SCAN != aPolicy->immediateScanMethod.scanType))
-        {
-            /* build scan command */
-            scanMngrBuildImmediateScanCommand( hScanMngr, aPolicy, pScanMngr->bImmedNeighborAPsOnly );
-
-            /* if no channels are available, report error */
-            if ( 0 < pScanMngr->scanParams.numOfChannels )
-            {
-                /* mark that immediate scan is running on band A */
-                pScanMngr->immedScanState = SCAN_ISS_A_BAND;
-
-                /* send scan command to scan concentrator */
-                nextResultStatus = 
-                    scanCncn_Start1ShotScan( pScanMngr->hScanCncn, SCAN_SCC_ROAMING_IMMED, &(pScanMngr->scanParams));
-                if ( SCAN_CRS_SCAN_RUNNING != nextResultStatus )
-                {
-                    pScanMngr->immedScanState = SCAN_ISS_IDLE;
-                    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Failed to start immediate scan on band A, return code %d.\n", resultStatus);
-#ifdef TI_DBG
-                    pScanMngr->stats.ImmediateAByStatus[ nextResultStatus ]++;
-#endif
-                    scanMngr_immediateScanComplete(hScanMngr,SCAN_MRS_SCAN_COMPLETE_OK);
-                }
-            }
-            else
-            {
-                /* mark that immediate scan is not running */
-                pScanMngr->immedScanState = SCAN_ISS_IDLE;
-                
-                /* no channels are actually available for scan - notify the roaming manager of the scan complete */
-                scanMngr_immediateScanComplete(hScanMngr,SCAN_MRS_SCAN_COMPLETE_OK);
-            }
-        }
-        else
-        {
-            /* mark that immediate scan is not running */
-            pScanMngr->immedScanState = SCAN_ISS_IDLE;
-
-            /* otherwise, notify the roaming manager of the scan complete */
-            scanMngr_immediateScanComplete(hScanMngr,SCAN_MRS_SCAN_COMPLETE_OK);
-        }
-        break;
-
-        /* stop immediate scan was requested */
-        case SCAN_ISS_STOPPING:
-            /* mark that immediate scan is not running */
-            pScanMngr->immedScanState = SCAN_ISS_IDLE;
-
-            /* notify the roaming manager of the scan complete */
-            scanMngr_immediateScanComplete(hScanMngr,SCAN_MRS_SCAN_STOPPED);
-            break;
-
-        /* Scan completed on A band */
-        case SCAN_ISS_A_BAND:
-            /* mark that immediate scan is not running */
-            pScanMngr->immedScanState = SCAN_ISS_IDLE;
-#ifdef TI_DBG
-            pScanMngr->stats.ImmediateAByStatus[ resultStatus ]++;
-#endif
-            /* otherwise, notify the roaming manager of the scan complete */
-            scanMngr_immediateScanComplete(hScanMngr,SCAN_MRS_SCAN_COMPLETE_OK);
-            break;
-        
-        default:
-            /* should not be at any other stage when CB is invoked */
-            TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Immediate scan CB called with scan complete TI_OK reason in state:%d", pScanMngr->immedScanState);
-
-            /* reset continuous scan to idle */
-            pScanMngr->immedScanState = SCAN_ISS_IDLE;
-            break;
-        }
-        break;
-
-    /* scan was completed due to an error! */
-    default:
-#ifdef TI_DBG
-        switch (pScanMngr->immedScanState)
-        {
-        case SCAN_ISS_G_BAND:
-            pScanMngr->stats.ImmediateGByStatus[ resultStatus ]++;
-            break;
-
-        case SCAN_ISS_A_BAND:
-            pScanMngr->stats.ImmediateAByStatus[ resultStatus ]++;
-            break;
-
-        default:
-            break;
-        }
-#endif
-        /* mark that immediate scan is not running */
-        pScanMngr->immedScanState = SCAN_ISS_IDLE;     
-        scanMngr_immediateScanComplete(hScanMngr,scanMngrConvertResultStatus(resultStatus));
-        break;
-    }
-}
-
-/**
- * \\n
- * \date 01-Mar-2005\n
- * \brief Callback used by the scan concentrator for continuous scan result.\n
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param resultStatus - reason for calling this function (frame received / scan complete).\n
- * \param frameInfo - frame related info (in case of a frame reception).\n
- * \param SPSStatus - bitmap indicating which channels were scan, in case of an SPS scan.\n
- */
-void scanMngr_contScanCB( TI_HANDLE hScanMngr, EScanCncnResultStatus resultStatus, 
-                         TScanFrameInfo* frameInfo, TI_UINT16 SPSStatus )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TScanBandPolicy *aPolicy;
-    EScanCncnResultStatus nextResultStatus;
-
-    TRACE3( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_contScanCB called, hScanMngr=0x%x, resultStatus=%d, SPSStatus=%d\n", hScanMngr, resultStatus, SPSStatus);
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pScanMngr->scanParams.numOfChannels > SCAN_MAX_NUM_OF_SPS_CHANNELS_PER_COMMAND )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                "scanMngr_contScanCB. pScanMngr->scanParams.numOfChannels=%d exceeds the limit %d\n",
-                pScanMngr->scanParams.numOfChannels, SCAN_MAX_NUM_OF_SPS_CHANNELS_PER_COMMAND);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    switch (resultStatus)
-    {
-    /* frame received - update BSS list accordingly */
-    case SCAN_CRS_RECEIVED_FRAME:
-        scanMngrUpdateReceivedFrame( hScanMngr, frameInfo );
-        break;
-
-    /* scan was completed successfully - either continue to next stage or simply finish this cycle */
-    case SCAN_CRS_SCAN_COMPLETE_OK:
-#ifdef SCAN_MNGR_DBG
-        TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Continuous scan completes successfuly.\n");
-        scanMngrDebugPrintBSSList( hScanMngr );
-#endif
-#ifdef TI_DBG
-        if ( SCAN_TYPE_SPS == pScanMngr->scanParams.scanType )
-        {
-            int i;
-
-            /*update SPS channels attendant statistics */
-            for ( i = 0; i < pScanMngr->scanParams.numOfChannels; i++ )
-            {
-                if ( TI_FALSE == WAS_SPS_CHANNEL_ATTENDED( SPSStatus, i ))
-                {
-                    pScanMngr->stats.SPSChannelsNotAttended[ i ]++;
-                }
-            }
-        }
-#endif
-    
-        /* first, remove APs that were not tracked. Note that this function does NOT
-           increase the retry counter, and therefore there's no harm in calling it even if only 
-           some of the APs were searched in the previous tracking command, or previous command was
-           discovery */
-        scanMngrPerformAging( hScanMngr );
-        
-
-        /* if new BSS's were found (or enough scan iterations passed w/o finding any), notify the roaming manager */
-        if ( ((TI_TRUE == pScanMngr->bNewBSSFound) || 
-              (SCAN_MNGR_CONSEC_SCAN_ITER_FOR_PRE_AUTH < pScanMngr->consecNotFound)) &&
-             (pScanMngr->BSSList.numOfEntries > 0)) /* in case no AP was found for specified iterations number,
-                                                        but no AP is present, and so is pre-auth */
-        {
-            pScanMngr->bNewBSSFound = TI_FALSE;
-            pScanMngr->consecNotFound = 0;
-            roamingMngr_updateNewBssList( pScanMngr->hRoamingMngr, (bssList_t*)&(pScanMngr->BSSList));
-
-             if (SCANNING_OPERATIONAL_MODE_MANUAL == pScanMngr->scanningOperationalMode)
-             {
-                 scanMngr_reportContinuousScanResults(hScanMngr, resultStatus);
-             }
-        }
-
-        /* act according to continuous scan state */
-        switch (pScanMngr->contScanState)
-        {
-        case SCAN_CSS_TRACKING_G_BAND:
-#ifdef TI_DBG
-            pScanMngr->stats.TrackingGByStatus[ resultStatus ]++;
-#endif    
-            TRACE0(pScanMngr->hReport , REPORT_SEVERITY_INFORMATION, "\n Starting SCAN_CSS_TRACKING_G_BAND \n");
-          /* if necessary, attempt tracking on A */
-            aPolicy = scanMngrGetPolicyByBand( hScanMngr, RADIO_BAND_5_0_GHZ );
-            /* if a policy is defined for A band tracking, attempt to perform it */
-            if ( (NULL != aPolicy) &&
-                 (SCAN_TYPE_NO_SCAN != aPolicy->trackingMethod.scanType))
-            {
-                /* recalculate current TSF, to adjust the TSF read at the beginning of
-                   the continuous scan process with the tracking on G duration */
-                pScanMngr->currentTSF += 
-                    ((os_timeStampMs( pScanMngr->hOS ) - pScanMngr->currentHostTimeStamp) * 1000);
-
-                /* build scan command */
-                scanMngrBuildTrackScanCommand( hScanMngr, aPolicy, RADIO_BAND_5_0_GHZ );
-
-                /* if channels are available for tracking on A */
-                if ( 0 < pScanMngr->scanParams.numOfChannels )
-                {
-                    /* mark that continuous scan is now tracking on A */
-                    pScanMngr->contScanState = SCAN_CSS_TRACKING_A_BAND;
-
-                    /* send scan command */
-                    nextResultStatus = 
-                        scanCncn_Start1ShotScan( pScanMngr->hScanCncn, SCAN_SCC_ROAMING_CONT, &(pScanMngr->scanParams));
-                    if ( SCAN_CRS_SCAN_RUNNING != nextResultStatus )
-                    {
-                        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Failed to start tracking continuous scan on band A, return code %d.\n", resultStatus);
-#ifdef TI_DBG
-                        pScanMngr->stats.TrackingAByStatus[ nextResultStatus ]++;
-#endif
-                        pScanMngr->contScanState = SCAN_CSS_IDLE;
-                    }
-#ifdef SCAN_MNGR_DBG
-                    TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Tracking on A started.\n");
-#endif
-                    return;
-                }
-            }
-            /* in case a TSF error was received on last continuous scan cycle, mark (now, that tracking
-               on both bands was attempted), that TSF values are synchronized */
-            pScanMngr->bSynchronized = TI_TRUE;
-            
-            /* the break is missing on purpose: if tracking on A was not successful (or not needed), continue to discovery */
-
-        case SCAN_CSS_TRACKING_A_BAND:
-#ifdef TI_DBG
-            /* update stats - since there's no break above, we must check that the state is indeed tracking on A */
-            if ( SCAN_CSS_TRACKING_A_BAND == pScanMngr->contScanState )
-            {
-                pScanMngr->stats.TrackingAByStatus[ resultStatus ]++;
-            }
-#endif
-            TRACE0(pScanMngr->hReport , REPORT_SEVERITY_INFORMATION, "\n SCAN_CSS_TRACKING_A_BAND \n");
-            /* if necessary and possible, attempt discovery */
-            if ( (SCAN_SDP_NO_DISCOVERY != pScanMngr->currentDiscoveryPart) &&
-                 (pScanMngr->BSSList.numOfEntries <= pScanMngr->scanPolicy.BSSNumberToStartDiscovery))
-            {
-                /* build scan command */
-                scanMngrBuildDiscoveryScanCommand( hScanMngr );
-
-                /* if channels are available for discovery */
-                if ( 0 < pScanMngr->scanParams.numOfChannels )
-                {
-                    /* mark that continuous scan is now in discovery state */
-                    pScanMngr->contScanState = SCAN_CSS_DISCOVERING;
-
-                    /* mark that no new APs were discovered in this discovery operation */
-                    pScanMngr->bNewBSSFound = TI_FALSE;
-
-                    /* send scan command */
-                    nextResultStatus = 
-                        scanCncn_Start1ShotScan( pScanMngr->hScanCncn, SCAN_SCC_ROAMING_CONT, &(pScanMngr->scanParams));
-                    if ( SCAN_CRS_SCAN_RUNNING != nextResultStatus )
-                    {
-                        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Failed to start discovery continuous scan, nextResultStatus %d.\n", nextResultStatus);
-                        pScanMngr->contScanState = SCAN_CSS_IDLE;
-                    }
-#ifdef SCAN_MNGR_DBG
-                    TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Disocvery started.\n");
-#endif
-                    return;
-                }
-            }
-
-            /* the break is missing on purpose: if discovery was not successful (or not needed), finish scan cycle */
-
-        case SCAN_CSS_DISCOVERING:
-#ifdef TI_DBG
-            /* update stats - since there's no break above, we must check that the state is indeed discocery */
-            if ( SCAN_CSS_DISCOVERING == pScanMngr->contScanState )
-            {
-                if ( RADIO_BAND_2_4_GHZ == pScanMngr->statsLastDiscoveryBand )
-                {
-                    pScanMngr->stats.DiscoveryGByStatus[ resultStatus ]++;
-                }
-                else
-                {
-                    pScanMngr->stats.DiscoveryAByStatus[ resultStatus ]++;
-                }
-            }
-#endif
-            /* continuous scan cycle is complete */
-            pScanMngr->contScanState = SCAN_CSS_IDLE;
-
-            break;
-
-        case SCAN_CSS_STOPPING:
-            /* continuous scan cycle is complete */
-            pScanMngr->contScanState = SCAN_CSS_IDLE;
-            break;
-
-        default:
-            /* should not be at any other stage when CB is invoked */
-            TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Continuous scan CB called with scan complete TI_OK reason in state:%d\n", pScanMngr->contScanState);
-            
-            /* reset continuous scan to idle */
-            pScanMngr->contScanState = SCAN_CSS_IDLE;
-            pScanMngr->bNewBSSFound = TI_FALSE;
-            break;
-        }
-        break;
-
-    /* SPS scan was completed with TSF error */
-    case SCAN_CRS_TSF_ERROR:
-        /* report the recovery event */
-        TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Continuous scan callback called with TSF error indication\n");
-        /* mark that the TSF values are no longer valid */
-        pScanMngr->bSynchronized = TI_FALSE;
-#ifdef TI_DBG
-        switch ( pScanMngr->contScanState )
-        {
-        case SCAN_CSS_TRACKING_G_BAND:
-            pScanMngr->stats.TrackingGByStatus[ resultStatus ]++;
-            break;
-
-        case SCAN_CSS_TRACKING_A_BAND:
-            pScanMngr->stats.TrackingAByStatus[ resultStatus ]++;
-            break;
-
-        default:
-            break;
-        }
-#endif
-        /* stop continuous scan cycle for this time (to avoid tracking using discovery only on A, thus 
-           having mixed results - some are synchronized, some are not */
-        pScanMngr->contScanState = SCAN_CSS_IDLE;
-        break;
-
-    default:
-        /* report the status received */
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Continuous scan CB called with status %d\n", resultStatus);
-
-        /* also perform aging (since it does not increase counter, no harm done if this was not tracking */
-        scanMngrPerformAging( hScanMngr );
-#ifdef TI_DBG
-        switch ( pScanMngr->contScanState )
-        {
-        case SCAN_CSS_TRACKING_G_BAND:
-            pScanMngr->stats.TrackingGByStatus[ resultStatus ]++;
-            break;
-
-        case SCAN_CSS_TRACKING_A_BAND:
-            pScanMngr->stats.TrackingAByStatus[ resultStatus ]++;
-            break;
-
-        case SCAN_CSS_DISCOVERING:
-            if ( RADIO_BAND_2_4_GHZ == pScanMngr->statsLastDiscoveryBand )
-            {
-                pScanMngr->stats.DiscoveryGByStatus[ resultStatus ]++;
-            }
-            else
-            {
-                pScanMngr->stats.DiscoveryGByStatus[ resultStatus ]++;
-            }
-        default:
-            break;
-        }
-#endif  
-        /* finish scan for this iteration */
-        pScanMngr->contScanState = SCAN_CSS_IDLE;
-        break;
-    }
-}
-
-/**
- * \\n
- * \date 01-Mar-2005\n
- * \brief Sets the scan policy.\n
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param scanPolicy - a pointer to the policy data.\n
- */
-void scanMngr_setScanPolicy( TI_HANDLE hScanMngr, TScanPolicy* scanPolicy )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_setScanPolicy called, hScanMngr=0x%x.\n", hScanMngr);
-#ifdef SCAN_MNGR_DBG
-    scanMngrTracePrintScanPolicy( scanPolicy );
-#endif
-
-    /* if continuous or immediate scan are running, indicate that they shouldn't proceed to next scan (if any),
-       and stop the scan operation (in case a triggered scan was in progress and the voice was stopped, the scan
-       must be stopped or a recovery will occur */
-    if ( pScanMngr->contScanState != SCAN_CSS_IDLE )
-    {
-        pScanMngr->contScanState = SCAN_CSS_STOPPING;
-        scanCncn_StopScan( pScanMngr->hScanCncn, SCAN_SCC_ROAMING_CONT );
-    }
-    if ( pScanMngr->immedScanState != SCAN_ISS_IDLE )
-    {
-        pScanMngr->immedScanState = SCAN_ISS_STOPPING;
-        scanCncn_StopScan( pScanMngr->hScanCncn, SCAN_SCC_ROAMING_IMMED );
-    }
-
-    /* set new scan policy */
-    os_memoryCopy( pScanMngr->hOS, &(pScanMngr->scanPolicy), scanPolicy, sizeof(TScanPolicy));
-
-    /* remove all tracked APs that are not on a policy defined channel (neighbor APs haven't changed,
-       so there's no need to check them */
-    scanMngrUpdateBSSList( hScanMngr, TI_FALSE, TI_TRUE );
-
-    /* if continuous scan timer is running, stop it */
-    if (pScanMngr->bTimerRunning)
-    {
-        tmr_StopTimer (pScanMngr->hContinuousScanTimer);
-        pScanMngr->bTimerRunning = TI_FALSE;
-    }
-
-    /* if continuous scan was started, start the timer using the new intervals */
-    if (pScanMngr->bContinuousScanStarted)
-    {
-        TI_UINT32 uTimeout = pScanMngr->bLowQuality ?
-                             pScanMngr->scanPolicy.deterioratingScanInterval :
-                             pScanMngr->scanPolicy.normalScanInterval;
-
-        pScanMngr->bTimerRunning = TI_TRUE;
-
-        tmr_StartTimer (pScanMngr->hContinuousScanTimer,
-                        scanMngr_GetUpdatedTsfDtimMibForScan,
-                        (TI_HANDLE)pScanMngr,
-                        uTimeout,
-                        TI_TRUE);
-    }
-
-    /* reset discovery counters */
-    pScanMngr->neighborAPsDiscoveryIndex[ RADIO_BAND_2_4_GHZ ] = 0;
-    pScanMngr->neighborAPsDiscoveryIndex[ RADIO_BAND_5_0_GHZ ] = 0;
-    pScanMngr->channelDiscoveryIndex[ RADIO_BAND_2_4_GHZ ] = 0;
-    pScanMngr->channelDiscoveryIndex[ RADIO_BAND_5_0_GHZ ] = 0;
-    /* set current discovery part to first part */
-    pScanMngr->currentDiscoveryPart = SCAN_SDP_NEIGHBOR_G;
-    /* now advance discovery part to first valid part */
-    scanMngrSetNextDiscoveryPart( hScanMngr );
-}
-
-/**
- * \\n
- * \date 06-Feb-2006\n
- * \brief CB function for current TSF and last beacon TSF and DTIM read.\n
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param status - read status (TI_OK / TI_NOK).\n
- * \param CB_buf - a pointer to the data read.\n
- */
-void scanMngrGetCurrentTsfDtimMibCB(TI_HANDLE hScanMngr, TI_STATUS status, TI_UINT8* CB_buf) 
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    
-    os_memoryCopy(pScanMngr->hOS, (TI_UINT8*)&(pScanMngr->currTsfDtimMib), CB_buf, sizeof(TTsfDtim));
-
-    /* set the current TSF and last beacon TSF and DTIM count */
-    INT64_HIGHER( pScanMngr->currentTSF ) = pScanMngr->currTsfDtimMib.CurrentTSFHigh;
-    INT64_LOWER( pScanMngr->currentTSF )  = pScanMngr->currTsfDtimMib.CurrentTSFLow;
-
-    INT64_HIGHER( pScanMngr->lastLocalBcnTSF ) = pScanMngr->currTsfDtimMib.lastTBTTHigh;
-    INT64_LOWER( pScanMngr->lastLocalBcnTSF )  = pScanMngr->currTsfDtimMib.lastTBTTLow;
-    
-    pScanMngr->lastLocalBcnDTIMCount = pScanMngr->currTsfDtimMib.LastDTIMCount;
-    
-    TRACE5( pScanMngr->hReport , REPORT_SEVERITY_INFORMATION, "\n currentTSF = %u-%u lastLocalBcnTSF = %u-%u lastDTIMCount = %d \n", INT64_HIGHER( pScanMngr->currentTSF ), INT64_LOWER( pScanMngr->currentTSF ), INT64_HIGHER( pScanMngr->lastLocalBcnTSF ), INT64_LOWER( pScanMngr->lastLocalBcnTSF ), pScanMngr->lastLocalBcnDTIMCount );
-
-    /* get the current host time stamp */
-    pScanMngr->currentHostTimeStamp = os_timeStampMs( pScanMngr->hOS );
-
-    /* now that the current TSF and last beacon TSF had been retrieved from the FW,
-       continuous scan may proceed */
-    scanMngrPerformContinuousScan(hScanMngr);
-}
-
-/**
- * \\n
- * \date 06-Feb-2006\n
- * \brief requests current TSF and last beacon TSF and DTIM from the FW.\n
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bTwdInitOccured - Indicates if TWDriver recovery occured since timer started.\n
- */
-void scanMngr_GetUpdatedTsfDtimMibForScan (TI_HANDLE hScanMngr, TI_BOOL bTwdInitOccured)
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TTwdParamInfo param;
-    TI_STATUS reqStatus = TI_OK;
-    
-    TRACE0( pScanMngr->hReport , REPORT_SEVERITY_INFORMATION, "\nscanMngr_GetUpdatedTsfDtimMibForScan called\n");
-    
-    /* Getting the current TSF and DTIM values */
-    param.paramType = TWD_TSF_DTIM_MIB_PARAM_ID;
-    param.content.interogateCmdCBParams.fCb = (void *)scanMngrGetCurrentTsfDtimMibCB;
-    param.content.interogateCmdCBParams.hCb = hScanMngr;
-    param.content.interogateCmdCBParams.pCb = (TI_UINT8*)&pScanMngr->currTsfDtimMib;
-    reqStatus = TWD_GetParam (pScanMngr->hTWD, &param);
-    if ( TI_OK != reqStatus )
-    {
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_ERROR, ": getParam from HAL CTRL failed wih status: %d\n", reqStatus);
-    }
-}
-
-/**
- * \\n
- * \date 01-Mar-2005\n
- * \brief Starts a continuous scan operation.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrPerformContinuousScan( TI_HANDLE hScanMngr )
-{
-
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TScanBandPolicy *gPolicy, *aPolicy;
-    EScanCncnResultStatus resultStatus;
-    paramInfo_t param;
-
-#ifdef SCAN_MNGR_DBG
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngrPerformContinuousScan called, hScanMngr=0x%x.\n", hScanMngr);
-    scanMngrDebugPrintBSSList( hScanMngr );
-#endif
-    
-    /* this function is called due to continuous scan timer expiry, to start a new continuous scan cycle.
-       If the continuous scan is anything but idle, a new cycle is not started. */
-    if ( SCAN_CSS_IDLE != pScanMngr->contScanState )
-    {
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Continuous scan timer expired and continuous scan state is:%d\n", pScanMngr->contScanState);
-        return;
-    }
-
-    /* retrieve the current BSS DTIM period and beacon interval, for SPS DTIM avoidance
-       calculations later. This is done before the continuous scan process is started, 
-       to check that they are not zero (in case the STA disconnected and somehow the 
-       scan manager was not notified of the event). If the STA disconnected, the continuous
-       scan process is aborted */
-    param.paramType = SITE_MGR_BEACON_INTERVAL_PARAM;
-    siteMgr_getParam( pScanMngr->hSiteMngr, &param );
-    pScanMngr->currentBSSBeaconInterval = param.content.beaconInterval;
-    
-    param.paramType = SITE_MGR_DTIM_PERIOD_PARAM;
-    siteMgr_getParam( pScanMngr->hSiteMngr, &param );
-    pScanMngr->currentBSSDtimPeriod = param.content.siteMgrDtimPeriod;
-
-    /* now check that none of the above is zero */
-    if ( (0 == pScanMngr->currentBSSBeaconInterval) || (0 == pScanMngr->currentBSSDtimPeriod))
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR, "Trying to start continuous scan cycle but DTIM period=%d and beacon interval=%d\n", pScanMngr->currentBSSDtimPeriod, pScanMngr->currentBSSBeaconInterval);
-        return;
-    }
-
-    /* increase the consecutive not found counter */
-    pScanMngr->consecNotFound++;
-
-    /* first try tracking on G */
-    gPolicy = scanMngrGetPolicyByBand( hScanMngr, RADIO_BAND_2_4_GHZ );
-    /* if a policy is defined for G band tracking, attempt to perform it */
-    if ( (NULL != gPolicy) &&
-         (SCAN_TYPE_NO_SCAN != gPolicy->trackingMethod.scanType))
-    {
-        /* build scan command */
-        scanMngrBuildTrackScanCommand( hScanMngr, gPolicy, RADIO_BAND_2_4_GHZ );
-
-        /* if channels are available for tracking on G */
-        if ( 0 < pScanMngr->scanParams.numOfChannels )
-        {
-            /* mark that continuous scan is now tracking on G */
-            pScanMngr->contScanState = SCAN_CSS_TRACKING_G_BAND;
-
-            /* send scan command to scan concentrator with the required scan params according to scannig operational  mode */
-            resultStatus = scanMngr_Start1ShotScan(hScanMngr, SCAN_SCC_ROAMING_CONT);
-            if ( SCAN_CRS_SCAN_RUNNING != resultStatus )
-            {
-                TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Failed to start tracking continuous scan on G, return code %d.\n", resultStatus);
-#ifdef TI_DBG
-                pScanMngr->stats.TrackingGByStatus[ resultStatus ]++;
-#endif
-                pScanMngr->contScanState = SCAN_CSS_IDLE;
-            }
-#ifdef SCAN_MNGR_DBG
-            TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Tracking on G started.\n");
-#endif            
-            return;
-        }
-    }
-
-    /* if not, try tracking on A */
-    aPolicy = scanMngrGetPolicyByBand( hScanMngr, RADIO_BAND_5_0_GHZ );
-    /* if a policy is defined for A band tracking, attempt to perform it */
-    if ( (NULL != aPolicy) &&
-         (SCAN_TYPE_NO_SCAN != aPolicy->trackingMethod.scanType))
-    {
-        /* build scan command */
-        scanMngrBuildTrackScanCommand( hScanMngr, aPolicy, RADIO_BAND_5_0_GHZ );
-
-        /* if channels are available for tracking on A */
-        if ( 0 < pScanMngr->scanParams.numOfChannels )
-        {
-            /* mark that continuous scan is now tracking on A */
-            pScanMngr->contScanState = SCAN_CSS_TRACKING_A_BAND;
-
-            /* send scan command to scan concentrator with the required scan params according to scanning operational mode */
-            resultStatus = scanMngr_Start1ShotScan(hScanMngr, SCAN_SCC_ROAMING_CONT);
-            if ( SCAN_CRS_SCAN_RUNNING != resultStatus )
-            {
-                TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Failed to start tracking continuous scan on A, return code %d.\n", resultStatus);
-#ifdef TI_DBG
-                pScanMngr->stats.TrackingAByStatus[ resultStatus ]++;
-#endif
-                pScanMngr->contScanState = SCAN_CSS_IDLE;
-            }
-#ifdef SCAN_MNGR_DBG
-            TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Tracking on A started.\n");
-#endif
-            return;
-        }
-    }
-    /* in case a TSF error was received on last continuous scan cycle, mark (now, that tracking
-       on both bands was attempted), that TSF values are synchronized */
-    pScanMngr->bSynchronized = TI_TRUE;                   
-
-    /* if this does not work as well, try discovery */
-    /* discovery can be performed if discovery part is valid (this is maintained whenever a new policy or neighbor AP list
-       is set, a discovery scan command is built, and a new neighbor AP is discovered) */
-    if ( (SCAN_SDP_NO_DISCOVERY != pScanMngr->currentDiscoveryPart) &&
-         (pScanMngr->BSSList.numOfEntries <= pScanMngr->scanPolicy.BSSNumberToStartDiscovery))
-    {
-        /* build scan command */
-        scanMngrBuildDiscoveryScanCommand( hScanMngr );
-
-        /* if channels are available for discovery */
-        if ( 0 < pScanMngr->scanParams.numOfChannels )
-        {
-            /* mark that continuous scan is now in discovery state */
-            pScanMngr->contScanState = SCAN_CSS_DISCOVERING;
-
-            /* mark that no new BSS's were found (yet) */
-            pScanMngr->bNewBSSFound = TI_FALSE;
-
-            /* send scan command to scan concentrator with the required scan params according to scanning operational mode */
-            resultStatus = scanMngr_Start1ShotScan(hScanMngr, SCAN_SCC_ROAMING_CONT);
-            if ( SCAN_CRS_SCAN_RUNNING != resultStatus )
-            {
-                TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Failed to start discovery continuous scan, resultStatus %d.\n", resultStatus);
-#ifdef TI_DBG
-                if ( RADIO_BAND_2_4_GHZ == pScanMngr->statsLastDiscoveryBand )
-                {
-                    pScanMngr->stats.DiscoveryGByStatus[ resultStatus ]++;
-                }
-                else
-                {
-                    pScanMngr->stats.DiscoveryAByStatus[ resultStatus ]++;
-                }
-#endif
-                pScanMngr->contScanState = SCAN_CSS_IDLE;
-            }
-#ifdef SCAN_MNGR_DBG
-            TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Discovery started.\n");
-#endif
-            return;
-        }
-    }
-
-    /* if we got here, no scan had executed successfully - print a warning */
-    TRACE0( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Unable to perform continuous scan.\n");
-}
-
-/**
- * \\n
- * \date 01-Mar-2005\n
- * \brief Perform aging on the BSS list.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrPerformAging( TI_HANDLE hScanMngr )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TI_UINT8 BSSEntryIndex;
-
-#ifdef SCAN_MNGR_DBG
-    TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Performing Aging.\n");
-#endif
-    /* It looks like it never happens. Anyway decided to check */
-    if (pScanMngr->BSSList.numOfEntries > MAX_SIZE_OF_BSS_TRACK_LIST)
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                 "scanMngrPerformAging problem. BSSList.numOfEntries=%d exceeds the limit %d\n",
-                 pScanMngr->BSSList.numOfEntries, MAX_SIZE_OF_BSS_TRACK_LIST);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    /* loop on all entries in the BSS list */
-    for ( BSSEntryIndex = 0; BSSEntryIndex < pScanMngr->BSSList.numOfEntries; )
-    {
-        /* if an entry failed enough consecutive track attempts - remove it */
-        if ( pScanMngr->BSSList.scanBSSList[ BSSEntryIndex ].trackFailCount > 
-             pScanMngr->scanPolicy.maxTrackFailures )
-        {
-            /* will replace this entry with one further down the array, if any. Therefore, index is not increased
-               (because a new entry will be placed in the same index). If this is the last entry - the number of
-               BSSes will be decreased, and thus the loop will exit */
-#ifdef SCAN_MNGR_DBG
-            TRACE7( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Aging: removing BSSID %2x:%2x:%2x:%2x:%2x:%2x from index: %d.\n", pScanMngr->BSSList.BSSList[ BSSEntryIndex ].BSSID[ 0 ], pScanMngr->BSSList.BSSList[ BSSEntryIndex ].BSSID[ 1 ], pScanMngr->BSSList.BSSList[ BSSEntryIndex ].BSSID[ 2 ], pScanMngr->BSSList.BSSList[ BSSEntryIndex ].BSSID[ 3 ], pScanMngr->BSSList.BSSList[ BSSEntryIndex ].BSSID[ 4 ], pScanMngr->BSSList.BSSList[ BSSEntryIndex ].BSSID[ 5 ], pScanMngr->BSSList.numOfEntries);
-#endif
-            scanMngrRemoveBSSListEntry( hScanMngr, BSSEntryIndex );
-        }
-        else
-        {
-            BSSEntryIndex++;
-        }
-    }
-}
-
-/**
- * \\n
- * \date 01-Mar-2005\n
- * \brief Updates object data according to a received frame.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param frameInfo - pointer to frame related information.\n
- */
-void scanMngrUpdateReceivedFrame( TI_HANDLE hScanMngr, TScanFrameInfo* frameInfo )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int BSSListIndex, neighborAPIndex;
-    TScanBandPolicy* pBandPolicy;
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( frameInfo->band >= RADIO_BAND_NUM_OF_BANDS )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                "scanMngrUpdateReceivedFrame. frameInfo->band=%d exceeds the limit %d\n",
-                frameInfo->band, RADIO_BAND_NUM_OF_BANDS-1);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    if ( pScanMngr->neighborAPsDiscoveryList[ frameInfo->band ].numOfEntries > MAX_NUM_OF_NEIGHBOR_APS )
-    {
-        TRACE3( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                "scanMngrUpdateReceivedFrame. pScanMngr->neighborAPsDiscoveryList[ %d ].numOfEntries=%d exceeds the limit %d\n",
-                frameInfo->band, pScanMngr->neighborAPsDiscoveryList[ frameInfo->band ].numOfEntries, MAX_NUM_OF_NEIGHBOR_APS);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    
-#ifdef SCAN_MNGR_DBG
-    scanMngrDebugPrintReceivedFrame( hScanMngr, frameInfo );
-#endif
-#ifdef TI_DBG
-    pScanMngr->stats.receivedFrames++;
-#endif
-    /* first check if the frame pass RSSI threshold. If not discard it and continue */
-    pBandPolicy = scanMngrGetPolicyByBand( hScanMngr, frameInfo->band );
-    if ( NULL == pBandPolicy ) /* sanity checking */
-    {
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_ERROR, "Recieved framed on band %d, for which policy is not defined!\n", frameInfo->band);
-#ifdef TI_DBG
-        pScanMngr->stats.discardedFramesOther++;
-#endif
-        return;
-    }
-
-    if ( frameInfo->rssi < pBandPolicy->rxRSSIThreshold )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Discarding frame beacuse RSSI %d is lower than threshold %d\n", frameInfo->rssi, pBandPolicy->rxRSSIThreshold);
-#ifdef TI_DBG
-        pScanMngr->stats.discardedFramesLowRSSI++;
-#endif
-        return;
-    }
-    
-    /* search for this AP in the tracking list */
-    BSSListIndex = scanMngrGetTrackIndexByBssid( hScanMngr, frameInfo->bssId );
-
-    /* if the frame received from an AP in the track list */
-    if (( -1 != BSSListIndex ) && (BSSListIndex < MAX_SIZE_OF_BSS_TRACK_LIST ))
-    {
-        scanMngrUpdateBSSInfo( hScanMngr, BSSListIndex, frameInfo );
-    }
-    /* otherwise, if the list is not full and AP is either a neighbor AP or on a policy defined channel: */
-    else 
-    {
-        neighborAPIndex = scanMngrGetNeighborAPIndex( hScanMngr, frameInfo->band, frameInfo->bssId );
-
-        if ( (pScanMngr->BSSList.numOfEntries < pScanMngr->scanPolicy.BSSListSize) &&
-             ((TI_TRUE == scanMngrIsPolicyChannel( hScanMngr, frameInfo->band, frameInfo->channel )) ||
-              (-1 != neighborAPIndex))) 
-        {
-            /* insert the AP to the list */
-            scanMngrInsertNewBSSToTrackingList( hScanMngr, frameInfo );
-
-            /* if this is a neighbor AP */
-            if ( -1 != neighborAPIndex )
-            {
-                /* mark in the neighbor AP list that it's being tracked */
-                pScanMngr->neighborAPsDiscoveryList[ frameInfo->band ].trackStatusList[ neighborAPIndex ] = SCAN_NDS_DISCOVERED;
-
-                /* if the discovery index for this neighbor AP band points to this AP, 
-                   advance it and advance discovery part if needed */
-                if ( pScanMngr->neighborAPsDiscoveryIndex[ frameInfo->band ] == neighborAPIndex )
-                {
-                    do {
-                        pScanMngr->neighborAPsDiscoveryIndex[ frameInfo->band ]++; /* advance discovery index */
-                    /* while discovery list is not exhausted and no AP for discovery is found */
-                    } while ( (pScanMngr->neighborAPsDiscoveryIndex[ frameInfo->band ] < pScanMngr->neighborAPsDiscoveryList[ frameInfo->band ].numOfEntries) &&
-                              (SCAN_NDS_NOT_DISCOVERED != pScanMngr->neighborAPsDiscoveryList[ frameInfo->band ].trackStatusList[ pScanMngr->neighborAPsDiscoveryIndex[ frameInfo->band ] ]));
-                    /* if discovery list isexhausted */
-                    if ( pScanMngr->neighborAPsDiscoveryIndex[ frameInfo->band ] == pScanMngr->neighborAPsDiscoveryList[ frameInfo->band ].numOfEntries )
-                    {
-                        /* restart discovery cycle for this band's neighbor APs */
-                        pScanMngr->neighborAPsDiscoveryIndex[ frameInfo->band ] = 0;
-                        /* set new discovery part (if needed) */
-                        scanMngrSetNextDiscoveryPart( hScanMngr );
-                    }
-                }
-            }
-        }
-#ifdef TI_DBG
-        else
-        {
-            pScanMngr->stats.discardedFramesOther++;
-        }
-#endif
-    }
-}
-
-/**
- * \\n
- * \date 17-Mar-2005\n
- * \brief Cerate a new tracking entry and store the newly discovered AP info in it.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param frameInfo - a pointer to the information received from this AP.\n
- */
-void scanMngrInsertNewBSSToTrackingList( TI_HANDLE hScanMngr, TScanFrameInfo* frameInfo )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-#ifdef SCAN_SPS_USE_DRIFT_COMPENSATION
-    int i;
-#endif
-    
-    /* mark that a new AP was discovered (for discovery stage) */
-    pScanMngr->bNewBSSFound = TI_TRUE;
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pScanMngr->BSSList.numOfEntries > MAX_SIZE_OF_BSS_TRACK_LIST )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-              "scanMngrInsertNewBSSToTrackingList. pScanMngr->BSSList.numOfEntries =%d can not exceed the limit %d\n",
-              pScanMngr->BSSList.numOfEntries, MAX_SIZE_OF_BSS_TRACK_LIST);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    /* insert fields that are not update regulary */
-    pScanMngr->BSSList.BSSList[ pScanMngr->BSSList.numOfEntries ].bNeighborAP = 
-        ( -1 == scanMngrGetNeighborAPIndex( hScanMngr, frameInfo->band, frameInfo->bssId ) ?
-          TI_FALSE :
-          TI_TRUE );
-    MAC_COPY (pScanMngr->BSSList.BSSList[pScanMngr->BSSList.numOfEntries].BSSID, *(frameInfo->bssId));
-
-    /* initialize average RSSI value */
-    pScanMngr->BSSList.BSSList[ pScanMngr->BSSList.numOfEntries ].RSSI = frameInfo->rssi;
-    pScanMngr->BSSList.BSSList[ pScanMngr->BSSList.numOfEntries ].lastRSSI = frameInfo->rssi;
-
-#ifdef SCAN_SPS_USE_DRIFT_COMPENSATION
-    /* initialize previous delta change array (used for SPS drift compensation) */
-    pScanMngr->BSSList.scanBSSList[ pScanMngr->BSSList.numOfEntries ].prevTSFDelta = 0;
-    pScanMngr->BSSList.scanBSSList[ pScanMngr->BSSList.numOfEntries ].deltaChangeArrayIndex = 0;
-    for ( i = 0; i < SCAN_SPS_NUM_OF_TSF_DELTA_ENTRIES; i++ )
-    {
-        pScanMngr->BSSList.scanBSSList[ pScanMngr->BSSList.numOfEntries ].deltaChangeArray[ i ] = 0;
-    }
-#endif
-
-    /* update regular fields */
-    pScanMngr->BSSList.scanBSSList[ pScanMngr->BSSList.numOfEntries ].trackFailCount = 0; /* for correct statistics update */
-    scanMngrUpdateBSSInfo( hScanMngr, pScanMngr->BSSList.numOfEntries, frameInfo );
-
-    /* increase the number of tracked APs */
-    pScanMngr->BSSList.numOfEntries++;
-}
-
-/**
- * \\n
- * \date 17-Mar-2005\n
- * \brief Updates tracked AP information.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param BSSListIndex - index to the BSS list where the AP information is stored.\n
- * \param frameInfo - a pointer to the information received from this AP.\n
- */
-void scanMngrUpdateBSSInfo( TI_HANDLE hScanMngr, TI_UINT8 BSSListIndex, TScanFrameInfo* frameInfo )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    /* update AP data */
-    pScanMngr->BSSList.BSSList[ BSSListIndex ].lastRxHostTimestamp = os_timeStampMs( pScanMngr->hOS );
-    pScanMngr->BSSList.BSSList[ BSSListIndex ].resultType = (frameInfo->parsedIEs->subType == BEACON) ? SCAN_RFT_BEACON : SCAN_RFT_PROBE_RESPONSE;
-    pScanMngr->BSSList.BSSList[ BSSListIndex ].band = frameInfo->band;
-    pScanMngr->BSSList.BSSList[ BSSListIndex ].channel = frameInfo->channel;
-    /* if the received TSF (which is the lower 32 bits) is smaller than the lower 32 bits of the last beacon
-       TSF, it means the higher 32 bits should be increased by 1 (TSF overflow to higher 32 bits occurred between
-       last beacon of current AP and this frame). */
-    if ( INT64_LOWER( (pScanMngr->currentTSF))  > frameInfo->staTSF )
-    {
-        INT64_HIGHER( (pScanMngr->BSSList.scanBSSList[ BSSListIndex ].localTSF)) = 
-            INT64_HIGHER( (pScanMngr->currentTSF)) + 1;
-    }
-    else
-    {
-        INT64_HIGHER( (pScanMngr->BSSList.scanBSSList[ BSSListIndex ].localTSF)) = 
-            INT64_HIGHER( (pScanMngr->currentTSF));
-    }
-    INT64_LOWER( (pScanMngr->BSSList.scanBSSList[ BSSListIndex ].localTSF)) = frameInfo->staTSF;
-    
-    if ( BEACON == frameInfo->parsedIEs->subType )
-    {
-        os_memoryCopy( pScanMngr->hOS, &(pScanMngr->BSSList.BSSList[ BSSListIndex ].lastRxTSF),
-                       (void *)frameInfo->parsedIEs->content.iePacket.timestamp, TIME_STAMP_LEN );
-        pScanMngr->BSSList.BSSList[ BSSListIndex ].beaconInterval = 
-            frameInfo->parsedIEs->content.iePacket.beaconInerval;
-        pScanMngr->BSSList.BSSList[ BSSListIndex ].capabilities = 
-            frameInfo->parsedIEs->content.iePacket.capabilities;
-    }
-    else
-    {
-        os_memoryCopy( pScanMngr->hOS, &(pScanMngr->BSSList.BSSList[ BSSListIndex ].lastRxTSF),
-                       (void *)frameInfo->parsedIEs->content.iePacket.timestamp, TIME_STAMP_LEN );
-        pScanMngr->BSSList.BSSList[ BSSListIndex ].beaconInterval = 
-            frameInfo->parsedIEs->content.iePacket.beaconInerval;
-        pScanMngr->BSSList.BSSList[ BSSListIndex ].capabilities = 
-            frameInfo->parsedIEs->content.iePacket.capabilities;
-    }
-#ifdef TI_DBG
-    /* 
-       update track fail histogram:
-       1. only done when tracking (to avoid updating due to "accidental re-discovery"
-       2. only done for APs which have their track fail count larger than 0. The reason for that is because
-          when tracking is started, the track fail count is increased, and thus if it is 0 tracking was not
-          attempted for this AP, or more than one frame was received as a result of tracking operation for the AP.
-    */
-    if ( ((SCAN_CSS_TRACKING_A_BAND == pScanMngr->contScanState) ||
-          (SCAN_CSS_TRACKING_G_BAND == pScanMngr->contScanState)) &&
-         (0 < pScanMngr->BSSList.scanBSSList[ BSSListIndex ].trackFailCount))
-    {
-        if ( SCAN_MNGR_STAT_MAX_TRACK_FAILURE <= 
-            pScanMngr->BSSList.scanBSSList[ BSSListIndex ].trackFailCount )
-        {
-            pScanMngr->stats.ConsecutiveTrackFailCountHistogram[ SCAN_MNGR_STAT_MAX_TRACK_FAILURE - 1 ]++;
-        }
-        else
-        {
-            pScanMngr->stats.ConsecutiveTrackFailCountHistogram[ pScanMngr->BSSList.scanBSSList[ BSSListIndex ].trackFailCount - 1 ]++;
-        }
-    }
-#endif
-    pScanMngr->BSSList.scanBSSList[ BSSListIndex ].trackFailCount = 0;
-
-    /* update RSSI value */
-    {
-        TI_INT8    rssiPrevVal = pScanMngr->BSSList.BSSList[ BSSListIndex ].RSSI;
-        TI_INT8    tmpRssiAvg = ((RSSI_PREVIOUS_COEFFICIENT * rssiPrevVal) +
-                              ((10-RSSI_PREVIOUS_COEFFICIENT) * frameInfo->rssi)) / 10;
-
-        pScanMngr->BSSList.BSSList[ BSSListIndex ].lastRSSI = frameInfo->rssi;
-        
-        if (rssiPrevVal!=0)
-        {
-             /* for faster convergence on RSSI changes use rounding error calculation with latest sample and not 
-                on latest average */
-            if (frameInfo->rssi > tmpRssiAvg)
-                tmpRssiAvg++;
-            else
-                if (frameInfo->rssi < tmpRssiAvg)
-                    tmpRssiAvg--;
-        
-            pScanMngr->BSSList.BSSList[ BSSListIndex ].RSSI = tmpRssiAvg;
-        }
-        else
-        {
-            pScanMngr->BSSList.BSSList[ BSSListIndex ].RSSI = frameInfo->rssi;
-        }
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "given RSSI=%d, AVRG RSSI=%d\n", frameInfo->rssi, pScanMngr->BSSList.BSSList[ BSSListIndex ].RSSI);
-
-    }
-
-    pScanMngr->BSSList.BSSList[ BSSListIndex ].rxRate = frameInfo->rate;
-    os_memoryCopy( pScanMngr->hOS, pScanMngr->BSSList.BSSList[ BSSListIndex ].pBuffer, 
-                   frameInfo->buffer, frameInfo->bufferLength );    
-    pScanMngr->BSSList.BSSList[ BSSListIndex ].bufferLength = frameInfo->bufferLength;
-}
-
-/**
- * \\n
- * \date 16-Mar-2005\n
- * \brief Search tracking list for an entry matching given BSSID.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bssId - the BSSID to search for.\n
- * \return entry index if found, -1 if no entry matching the BSSID was found.\n
- */
-TI_INT8 scanMngrGetTrackIndexByBssid( TI_HANDLE hScanMngr, TMacAddr* bssId )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int i;
-
-    for ( i = 0; i < pScanMngr->BSSList.numOfEntries; i++ )
-    {
-        if (MAC_EQUAL(*bssId, pScanMngr->BSSList.BSSList[ i ].BSSID))
-        {
-            return i;
-        }
-    }
-    return -1;
-}
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Search current policy for band policy
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param band - the band to find policy for.\n
- * \return the policy structure if found, NULL if no policy configured for this band.\n
- */
-TScanBandPolicy* scanMngrGetPolicyByBand( TI_HANDLE hScanMngr, ERadioBand band )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int i;
-
-    /* loop on all configured policies, and look for the requested band */
-    for ( i = 0; i < pScanMngr->scanPolicy.numOfBands; i++ )
-    {
-        if ( band == pScanMngr->scanPolicy.bandScanPolicy[ i ].band )
-        {
-            return &(pScanMngr->scanPolicy.bandScanPolicy[ i ]);
-        }
-    }
-
-    /* if no policy was found, there's no policy configured for the requested band */
-    return NULL;
-}
-
-/**
- * \\n
- * \date 06-Mar-2005\n
- * \brief Sets the next discovery part according to current discovery part, policies and neighbor APs availability .\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrSetNextDiscoveryPart( TI_HANDLE hScanMngr )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    scan_discoveryPart_e nextDiscoveryPart, originalDiscoveryPart;
-    
-    /* sanity check - if discovery part is not valid, restart from first discovery part */
-    if ( SCAN_SDP_NO_DISCOVERY <= pScanMngr->currentDiscoveryPart )
-    {
-        pScanMngr->currentDiscoveryPart = SCAN_SDP_NEIGHBOR_G;
-    }
-
-    /* if current discovery part is valid, do nothing */
-    if ( TI_TRUE == scanMngrIsDiscoveryValid( hScanMngr, pScanMngr->currentDiscoveryPart ))
-    {
-        return;
-    }
-
-    /* next discovery part is found according to current part, in the following order:
-       Neighbor APs on G, Neighbor APs on A, Channel list on G, Channel list on A */
-    /* get next discovery part */
-    nextDiscoveryPart = pScanMngr->currentDiscoveryPart;
-    originalDiscoveryPart = pScanMngr->currentDiscoveryPart;
-
-    do
-    {
-        nextDiscoveryPart++;
-        /* loop back to first discovery part if discovery list end had been reached */
-        if ( SCAN_SDP_NO_DISCOVERY == nextDiscoveryPart )
-        {
-            nextDiscoveryPart = SCAN_SDP_NEIGHBOR_G;
-        }
-    /* try next discovery part until first one is reached again or a valid part is found */
-    } while( (nextDiscoveryPart != originalDiscoveryPart) &&
-             (TI_FALSE == scanMngrIsDiscoveryValid( hScanMngr, nextDiscoveryPart )));
-
-    /* if a discovery part for which discovery is valid was found, use it */
-    if ( TI_TRUE == scanMngrIsDiscoveryValid( hScanMngr, nextDiscoveryPart ))
-    {
-        pScanMngr->currentDiscoveryPart = nextDiscoveryPart;
-    }
-    /* otherwise don't do discovery */
-    else
-    {
-        pScanMngr->currentDiscoveryPart = SCAN_SDP_NO_DISCOVERY;
-    }
-}
-
-/**
- * \\n
- * \date 06-Mar-2005\n
- * \brief Checks whether discovery should be performed on the specified discovery part.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param discoveryPart - the discovery part to check.\n
- */
-TI_BOOL scanMngrIsDiscoveryValid( TI_HANDLE hScanMngr, scan_discoveryPart_e discoveryPart )
-{
-    scanMngr_t* pScanMngr = (TI_HANDLE)hScanMngr;
-    TScanBandPolicy *gPolicy, *aPolicy;
-
-    gPolicy = scanMngrGetPolicyByBand( hScanMngr, RADIO_BAND_2_4_GHZ );
-    aPolicy = scanMngrGetPolicyByBand( hScanMngr, RADIO_BAND_5_0_GHZ );
-
-    switch (discoveryPart)
-    {
-    case SCAN_SDP_NEIGHBOR_G:
-        /* for discovery on G neighbor APs, a policy must be defined for G, discovery scan type should be present,
-           number of neighbor APs on G should be greater than zero, and at least one AP should be yet undiscovered */
-        if ( (NULL != gPolicy) &&
-             (SCAN_TYPE_NO_SCAN != gPolicy->discoveryMethod.scanType) &&
-             (0 < pScanMngr->neighborAPsDiscoveryList[ RADIO_BAND_2_4_GHZ ].numOfEntries) &&
-             (TI_TRUE == scanMngrNeighborAPsAvailableForDiscovery( hScanMngr, RADIO_BAND_2_4_GHZ )))
-        {
-            return TI_TRUE;
-        }
-        else
-        {
-            return TI_FALSE;
-        }
-
-    case SCAN_SDP_NEIGHBOR_A:
-        /* for discovery on A neighbor APs, a policy must be defined for A, discovery scan type should be present,
-           number of neighbor APs on A should be greater than zero, and at least one AP should be yet undiscovered */
-        if ( (NULL != aPolicy) &&
-             (SCAN_TYPE_NO_SCAN != aPolicy->discoveryMethod.scanType) &&
-             (0 < pScanMngr->neighborAPsDiscoveryList[ RADIO_BAND_5_0_GHZ ].numOfEntries) &&
-             (TI_TRUE == scanMngrNeighborAPsAvailableForDiscovery( hScanMngr, RADIO_BAND_5_0_GHZ )))
-        {
-            return TI_TRUE;
-        }
-        else
-        {
-            return TI_FALSE;
-        }
-
-    case SCAN_SDP_CHANNEL_LIST_G:
-        /* for discovery on G channel list, a policy must be defined for G, discovery scan type should be present,
-           and number of channels in G channel list should be greater than zero */
-        if ( (NULL != gPolicy) &&
-             (SCAN_TYPE_NO_SCAN != gPolicy->discoveryMethod.scanType) &&
-             (0 < gPolicy->numOfChannles))
-        {
-            return TI_TRUE;
-        }
-        else
-        {
-            return TI_FALSE;
-        }
-    case SCAN_SDP_CHANNEL_LIST_A:
-        /* for discovery on A channel list, a policy must be defined for A, discovery scan type should be present,
-           and number of channels in A channel list should be greater than zero */
-        if ( (NULL != aPolicy) &&
-             (SCAN_TYPE_NO_SCAN != aPolicy->discoveryMethod.scanType) &&
-             (0 < aPolicy->numOfChannles))
-        {
-            return TI_TRUE;
-        }
-        else
-        {
-            return TI_FALSE;
-        }
-    default:
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Checking whather discovery is valid for discovery part %d", discoveryPart);
-        return TI_FALSE;
-    }
-}
-
-/**
- * \\n
- * \date 07-Mar-2005\n
- * \brief Check whether there are neighbor APs to track on the given band.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bandPolicy - The scan policy for the requested band.\n
- * \param bNeighborAPsOnly - whether to scan for neighbor APs only or for all policy defined channels.\n
- */
-TI_BOOL scanMngrNeighborAPsAvailableForDiscovery( TI_HANDLE hScanMngr, ERadioBand band )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int i;
-
-
-    /* loop on all neighbor APs of the given band */
-    for ( i = 0; i < pScanMngr->neighborAPsDiscoveryList[ band ].numOfEntries; i++ )
-    {
-        /* if a neighbor AP is not being tracked, meaning it yet has to be discovered, return TI_TRUE */
-        if ( SCAN_NDS_NOT_DISCOVERED == pScanMngr->neighborAPsDiscoveryList[ band ].trackStatusList[ i ] )
-        {
-            return TI_TRUE;
-        }
-    }
-    /* if all neighbor APs are being tracked (or no neighbor APs available) return TI_FALSE */
-    return TI_FALSE;
-}
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Builds a scan command on the object workspace for immediate scan.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bandPolicy - The scan policy for the requested band.\n
- * \param bNeighborAPsOnly - whether to scan for neighbor APs only or for all policy defined channels.\n
- */
-void scanMngrBuildImmediateScanCommand( TI_HANDLE hScanMngr, TScanBandPolicy* bandPolicy, TI_BOOL bNeighborAPsOnly )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int channelIndex;
-    paramInfo_t param;
-    TMacAddr broadcastAddress;
-    int i;
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( bandPolicy->band >= RADIO_BAND_NUM_OF_BANDS )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-               "scanMngrBuildImmediateScanCommand. bandPolicy->band=%d exceeds the limit %d\n",
-               bandPolicy->band, RADIO_BAND_NUM_OF_BANDS-1);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    if ( pScanMngr->neighborAPsDiscoveryList[ bandPolicy->band ].numOfEntries > MAX_NUM_OF_NEIGHBOR_APS )
-    {
-        TRACE3( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-               "scanMngrBuildImmediateScanCommand. pScanMngr->neighborAPsDiscoveryList[%d].numOfEntries=%d exceeds the limit %d\n",
-               bandPolicy->band, pScanMngr->neighborAPsDiscoveryList[ bandPolicy->band ].numOfEntries, MAX_NUM_OF_NEIGHBOR_APS);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    /* first, build the command header */
-    scanMngrBuildScanCommandHeader( hScanMngr, &(bandPolicy->immediateScanMethod), bandPolicy->band );
-
-    /* if requested to scan on neighbor APs only */
-    if ( TI_TRUE == bNeighborAPsOnly )
-    {
-        /* loop on all neighbor APs */
-        channelIndex = 0;
-        while ( (channelIndex < pScanMngr->neighborAPsDiscoveryList[ bandPolicy->band ].numOfEntries) && 
-                (pScanMngr->scanParams.numOfChannels < SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND))
-        {
-            /* verify channel with reg domain */
-            param.paramType = REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES;
-            param.content.channelCapabilityReq.band = bandPolicy->band;
-            if ( (bandPolicy->immediateScanMethod.scanType == SCAN_TYPE_NORMAL_PASSIVE) ||
-                 (bandPolicy->immediateScanMethod.scanType == SCAN_TYPE_TRIGGERED_PASSIVE) ||
-                 (bandPolicy->immediateScanMethod.scanType == SCAN_TYPE_SPS))
-            {
-                param.content.channelCapabilityReq.scanOption = PASSIVE_SCANNING;
-            }
-            else
-            {
-                param.content.channelCapabilityReq.scanOption = ACTIVE_SCANNING;
-            }
-            param.content.channelCapabilityReq.channelNum = 
-                pScanMngr->neighborAPsDiscoveryList[ bandPolicy->band ].APListPtr[ channelIndex ].channel;
-            regulatoryDomain_getParam( pScanMngr->hRegulatoryDomain, &param );
-
-            /* if the channel is allowed, insert it to the scan command */
-            if (param.content.channelCapabilityRet.channelValidity)
-            {
-                scanMngrAddNormalChannel( hScanMngr, &(bandPolicy->immediateScanMethod), 
-                                          pScanMngr->neighborAPsDiscoveryList[ bandPolicy->band ].APListPtr[ channelIndex ].channel,
-                                          &(pScanMngr->neighborAPsDiscoveryList[ bandPolicy->band ].APListPtr[ channelIndex ].BSSID),
-                                          param.content.channelCapabilityRet.maxTxPowerDbm );
-            }
-            channelIndex++;
-        }
-    }
-    else
-    /* scan on all policy defined channels */
-    {
-        /* set the broadcast address */
-        for ( i = 0; i < MAC_ADDR_LEN; i++ )
-        {
-            broadcastAddress[ i ] = 0xff;
-        }
-
-        /* loop on all channels in the policy */
-        channelIndex = 0;
-        while ( (channelIndex < bandPolicy->numOfChannles) &&
-                (pScanMngr->scanParams.numOfChannels < SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND))
-        {
-            /* verify channel with reg domain */
-            param.paramType = REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES;
-            param.content.channelCapabilityReq.band = bandPolicy->band;
-            if ( (bandPolicy->immediateScanMethod.scanType == SCAN_TYPE_NORMAL_PASSIVE) ||
-                 (bandPolicy->immediateScanMethod.scanType == SCAN_TYPE_TRIGGERED_PASSIVE) ||
-                 (bandPolicy->immediateScanMethod.scanType == SCAN_TYPE_SPS))
-            {
-                param.content.channelCapabilityReq.scanOption = PASSIVE_SCANNING;
-            }
-            else
-            {
-                param.content.channelCapabilityReq.scanOption = ACTIVE_SCANNING;
-            }
-            param.content.channelCapabilityReq.channelNum = bandPolicy->channelList[ channelIndex ];
-            regulatoryDomain_getParam( pScanMngr->hRegulatoryDomain, &param );
-
-            /* if the channel is allowed, insert it to the scan command */
-            if (param.content.channelCapabilityRet.channelValidity)
-            {
-                scanMngrAddNormalChannel( hScanMngr, &(bandPolicy->immediateScanMethod), 
-                                          bandPolicy->channelList[ channelIndex ],
-                                          &broadcastAddress,
-                                          param.content.channelCapabilityRet.maxTxPowerDbm );
-            }
-            channelIndex++;
-        }
-    }
-}
-
-/**
- * \\n
- * \date 03-Mar-2005\n
- * \brief Builds a scan command on the object workspace for tracking.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bandPolicy - The scan policy for the band to track on.\n
- * \param band - the band to scan.\n
- */
-void scanMngrBuildTrackScanCommand( TI_HANDLE hScanMngr, TScanBandPolicy* bandPolicy, ERadioBand band )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int BSSListIndex;
-    paramInfo_t param;
-    TScanMethod* scanMethod;
-
-    TRACE0(pScanMngr->hReport , REPORT_SEVERITY_INFORMATION, "\n scanMngrBuildTrackScanCommand \n");
-
-
-    /* SPS is performed differently from all other scan types, and only if TSF error has not occured */
-    if ( (SCAN_TYPE_SPS == bandPolicy->trackingMethod.scanType) && (TI_TRUE == pScanMngr->bSynchronized))
-    {
-        /* build the command header */
-        TRACE0(pScanMngr->hReport , REPORT_SEVERITY_INFORMATION, "\nSPS invoked\n");
-        scanMngrBuildScanCommandHeader( hScanMngr, &(bandPolicy->trackingMethod), band );
-     
-        /* build the channel list */
-        scanMngrAddSPSChannels( hScanMngr, &(bandPolicy->trackingMethod), band );
-        return;
-    }
-
-    /* the scan method to use is the method defined for tracking, unless this is SPS and TSF error occurred,
-       in which case we use the discovery method this time. */
-    if ( (SCAN_TYPE_SPS == bandPolicy->trackingMethod.scanType) && (TI_FALSE == pScanMngr->bSynchronized))
-    {
-        /* use discovery scan method */
-        scanMethod = &(bandPolicy->discoveryMethod);
-    }
-    else
-    {
-        /* use tracking method */
-        scanMethod = &(bandPolicy->trackingMethod);
-    }
-
-    /* build the command header */
-    scanMngrBuildScanCommandHeader( hScanMngr, scanMethod, band );
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pScanMngr->BSSList.numOfEntries > MAX_SIZE_OF_BSS_TRACK_LIST )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                "scanMngrBuildTrackScanCommand. pScanMngr->BSSList.numOfEntries=%d exceeds the limit %d\n",
-                pScanMngr->BSSList.numOfEntries, MAX_SIZE_OF_BSS_TRACK_LIST);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    if ( bandPolicy->numOfChannles > MAX_BAND_POLICY_CHANNLES )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                "scanMngrBuildTrackScanCommand. bandPolicy->numOfChannles=%d exceeds the limit %d\n",
-                bandPolicy->numOfChannles, MAX_BAND_POLICY_CHANNLES);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    /* insert channels from tracking list according to requested band */
-    BSSListIndex = 0;
-    while ( (BSSListIndex < pScanMngr->BSSList.numOfEntries) &&
-            (pScanMngr->scanParams.numOfChannels < SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND))
-    {
-        /* if BSS is on the right band */
-        if ( band == pScanMngr->BSSList.BSSList[ BSSListIndex ].band )
-        {
-            /* verify the channel with the reg domain */
-            param.paramType = REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES;
-            param.content.channelCapabilityReq.band = band;
-            if ( (scanMethod->scanType == SCAN_TYPE_NORMAL_PASSIVE) ||
-                 (scanMethod->scanType == SCAN_TYPE_TRIGGERED_PASSIVE))
-            {
-                param.content.channelCapabilityReq.scanOption = PASSIVE_SCANNING;
-            }
-            else
-            {
-                param.content.channelCapabilityReq.scanOption = ACTIVE_SCANNING;
-            }
-            param.content.channelCapabilityReq.channelNum = pScanMngr->BSSList.BSSList[ BSSListIndex ].channel;
-            regulatoryDomain_getParam( pScanMngr->hRegulatoryDomain, &param );
-
-            /* if channel is verified for requested scan type */
-            if ( param.content.channelCapabilityRet.channelValidity )
-            {
-                scanMngrAddNormalChannel( hScanMngr, scanMethod, 
-                                          pScanMngr->BSSList.BSSList[ BSSListIndex ].channel,
-                                          &(pScanMngr->BSSList.BSSList[ BSSListIndex ].BSSID),
-                                          param.content.channelCapabilityRet.maxTxPowerDbm );
-
-                /* increase AP track attempts counter */
-                if ( (SCAN_TYPE_SPS == bandPolicy->trackingMethod.scanType) && (TI_FALSE == pScanMngr->bSynchronized))
-                {
-                    pScanMngr->BSSList.scanBSSList[ BSSListIndex ].trackFailCount = 
-                        pScanMngr->scanPolicy.maxTrackFailures + 1;
-                }
-                else
-                {
-                    pScanMngr->BSSList.scanBSSList[ BSSListIndex ].trackFailCount++;
-                }
-            }
-            /* if channel is not verified, there are two options:
-               1. we are using the tracking method, and thus the AP should be removed (because we are unable
-                  to track it)
-               2. we are using the discovery method (because a TSF error occurred and tracking method is SPS).
-                  In this case, it seems we do not have to remove the AP (because the channel may not be valid
-                  for active scan but it is valid for passive scan), but since we had a TSF error the AP would
-                  be removed anyhow if not re-discovered now, so no harm done in removing it as well. */
-            else
-            {
-                /* removing an AP is done by increasing its track failure counter to maximum. Since it is
-                   not tracked, it would not be found, and thus would be removed by aging process performed
-                   at scan completion */
-                pScanMngr->BSSList.scanBSSList[ BSSListIndex ].trackFailCount = 
-                    pScanMngr->scanPolicy.maxTrackFailures + 1;
-#ifdef TI_DBG
-                /* update statistics */
-                pScanMngr->stats.APsRemovedInvalidChannel++;
-#endif
-            }
-        }
-        BSSListIndex++;
-    }
-}
-
-/**
- * \\n
- * \date 03-Mar-2005\n
- * \brief Builds a scan command on the object workspace for discovery.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrBuildDiscoveryScanCommand( TI_HANDLE hScanMngr )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    ERadioBand band;
-    TScanBandPolicy* bandPolicy;
-
-    /* find on which band to discover at current cycle */
-    if ( (SCAN_SDP_NEIGHBOR_G == pScanMngr->currentDiscoveryPart) ||
-         (SCAN_SDP_CHANNEL_LIST_G == pScanMngr->currentDiscoveryPart))
-    {
-        band = RADIO_BAND_2_4_GHZ;
-        bandPolicy = scanMngrGetPolicyByBand( hScanMngr, band );
-    }
-    else
-    {
-        band = RADIO_BAND_5_0_GHZ;
-        bandPolicy = scanMngrGetPolicyByBand( hScanMngr, band );
-    }
-
-	if( NULL == bandPolicy)
-	{
-		TRACE0( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "scanMngrGetPolicyByBand() returned NULL.\n");
-		return;
-	}
-
-    /* first, build the command header */
-    scanMngrBuildScanCommandHeader( hScanMngr, &(bandPolicy->discoveryMethod), band );
-
-    /* channels are added according to current discovery part */
-    switch ( pScanMngr->currentDiscoveryPart )
-    {
-    case SCAN_SDP_NEIGHBOR_G:
-        /* add channels from neighbor AP discovery list */
-        scanMngrAddNeighborAPsForDiscovery( hScanMngr, bandPolicy );
-
-        /* if neighbor AP list is exhausted, proceed to next discovery part */
-        if ( 0 == pScanMngr->neighborAPsDiscoveryIndex[ band ] )
-        {
-            pScanMngr->currentDiscoveryPart++;
-            scanMngrSetNextDiscoveryPart( hScanMngr );
-        }
-
-        /* if need to discover more APs, (not enough neighbor APs), proceed to G channel list */
-        if ( pScanMngr->scanParams.numOfChannels < bandPolicy->numOfChannlesForDiscovery )
-        {
-            scanMngrAddChannelListForDiscovery( hScanMngr, bandPolicy );
-        }
-
-#ifdef TI_DBG
-        pScanMngr->statsLastDiscoveryBand = RADIO_BAND_2_4_GHZ;
-#endif
-        break;
-
-    case SCAN_SDP_NEIGHBOR_A:
-        /* add channels from neighbor AP discovery list */
-        scanMngrAddNeighborAPsForDiscovery( hScanMngr, bandPolicy );
-
-        /* if neighbor AP list is exhausted, proceed to next discovery part */
-        if ( 0 == pScanMngr->neighborAPsDiscoveryIndex[ band ] )
-        {
-            pScanMngr->currentDiscoveryPart++;
-            scanMngrSetNextDiscoveryPart( hScanMngr );
-        }
-
-        /* if need to discover more APs, (not enough neighbor APs), proceed to A channel list */
-        if ( pScanMngr->scanParams.numOfChannels < bandPolicy->numOfChannlesForDiscovery )
-        {
-            scanMngrAddChannelListForDiscovery( hScanMngr, bandPolicy );
-        }
-
-#ifdef TI_DBG
-        pScanMngr->statsLastDiscoveryBand = RADIO_BAND_5_0_GHZ;
-#endif
-        break;
-
-    case SCAN_SDP_CHANNEL_LIST_G:
-        /* add channels from policy channel list */
-        scanMngrAddChannelListForDiscovery( hScanMngr, bandPolicy );
-
-        /* if channel list is exhausted, proceed to next discovery part */
-        if ( 0 == pScanMngr->channelDiscoveryIndex[ band ] )
-        {
-            pScanMngr->currentDiscoveryPart++;
-            scanMngrSetNextDiscoveryPart( hScanMngr );
-        }
-
-        /* if need to discover more APs (not enough channels on channel list), proceed to G neighbor APs */
-        if ( pScanMngr->scanParams.numOfChannels < bandPolicy->numOfChannlesForDiscovery )
-        {
-            scanMngrAddNeighborAPsForDiscovery( hScanMngr, bandPolicy );
-        }
-
-#ifdef TI_DBG
-        pScanMngr->statsLastDiscoveryBand = RADIO_BAND_2_4_GHZ;
-#endif
-        break;
-
-    case SCAN_SDP_CHANNEL_LIST_A:
-        /* add channels from policy channel list */
-        scanMngrAddChannelListForDiscovery( hScanMngr, bandPolicy );
-
-        /* if channel list is exhausted, proceed to next discovery part */
-        if ( 0 == pScanMngr->channelDiscoveryIndex[ band ] )
-        {
-            pScanMngr->currentDiscoveryPart++;
-            scanMngrSetNextDiscoveryPart( hScanMngr );
-        }
-
-        /* if need to discover more APs (not enough channels on channel list), proceed to A neighbor APs */
-        if ( pScanMngr->scanParams.numOfChannels < bandPolicy->numOfChannlesForDiscovery )
-        {
-            scanMngrAddNeighborAPsForDiscovery( hScanMngr, bandPolicy );
-        }
-#ifdef TI_DBG
-        pScanMngr->statsLastDiscoveryBand = RADIO_BAND_5_0_GHZ;
-#endif
-        break;
-
-    case SCAN_SDP_NO_DISCOVERY:
-    default:
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_ERROR, "scanMngrBuildDiscoveryScanCommand called and current discovery part is %d", pScanMngr->currentDiscoveryPart);
-        break;
-    }
-}
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Builds the scan command header on the object workspace.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param scanMethod - The scan method (and parameters) to use.\n
- * \param band - the band to scan.\n
- */
-void scanMngrBuildScanCommandHeader( TI_HANDLE hScanMngr, TScanMethod* scanMethod, ERadioBand band )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-
-    /* set general scan parameters */
-    /* SSID is not set - scan concentrator will set it for the scan manager to current SSID */
-    pScanMngr->scanParams.scanType = scanMethod->scanType;
-    pScanMngr->scanParams.band = band;
-
-    switch (scanMethod->scanType)
-    {
-    case SCAN_TYPE_NORMAL_ACTIVE:
-        /* In active scan, the desired SSID is set by the scan concentrator to the current SSID.
-           Stting anything not zero triggers this in the scan concentrator */
-        pScanMngr->scanParams.desiredSsid.len = 1;
-        pScanMngr->scanParams.probeReqNumber = scanMethod->method.basicMethodParams.probReqParams.numOfProbeReqs;
-        pScanMngr->scanParams.probeRequestRate = scanMethod->method.basicMethodParams.probReqParams.bitrate;
-        break;
-
-    case SCAN_TYPE_TRIGGERED_ACTIVE:
-        /* In active scan, the desired SSID is set by the scan concentrator to the current SSID.
-           Stting anything not zero triggers this in the scan concentrator */
-        pScanMngr->scanParams.desiredSsid.len = 1;
-        pScanMngr->scanParams.probeReqNumber = scanMethod->method.TidTriggerdMethodParams.basicMethodParams.probReqParams.numOfProbeReqs;
-        pScanMngr->scanParams.probeRequestRate = scanMethod->method.TidTriggerdMethodParams.basicMethodParams.probReqParams.bitrate;
-        pScanMngr->scanParams.Tid = scanMethod->method.TidTriggerdMethodParams.triggeringTid;
-        break;
-
-    case SCAN_TYPE_TRIGGERED_PASSIVE:
-        pScanMngr->scanParams.Tid = scanMethod->method.TidTriggerdMethodParams.triggeringTid;
-        /* In Passive scan, Desired SSID length is set to 0 so that the Scan concentrator won't replace
-           it with the current SSID (to be able to receive beacons from AP's with multiple or hidden
-           SSID) */
-        pScanMngr->scanParams.desiredSsid.len = 0;
-        break;
-
-    case SCAN_TYPE_NORMAL_PASSIVE:
-        /* In Passive scan, Desired SSID length is set to 0 so that the Scan concentrator won't replace
-           it with the current SSID (to be able to receive beacons from AP's with multiple or hidden
-           SSID) */
-        pScanMngr->scanParams.desiredSsid.len = 0;
-        break;
-
-    case SCAN_TYPE_SPS:
-        /* SPS doesn't have SSID filter, it only uses BSSID filter */
-        break;
-
-    default:
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Unrecognized scan type %d when building scan command", scanMethod->scanType);
-        break;
-    }
-
-    /* set 0 channels - actual channel will be added by caller */
-    pScanMngr->scanParams.numOfChannels = 0;
-}
-
-/**
- * \\n
- * \date 06-Mar-2005\n
- * \brief Add neighbor APs to scan command on the object workspace for discovery scan.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bandPolicy - the scan policy for the band to use.\n
- */
-void scanMngrAddNeighborAPsForDiscovery( TI_HANDLE hScanMngr, TScanBandPolicy* bandPolicy )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int neighborAPIndex;
-    paramInfo_t param;
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( bandPolicy->band >= RADIO_BAND_NUM_OF_BANDS )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                "scanMngrAddNeighborAPsForDiscovery. bandPolicy->band=%d exceeds the limit %d\n",
-                bandPolicy->band, RADIO_BAND_NUM_OF_BANDS-1);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    neighborAPIndex = pScanMngr->neighborAPsDiscoveryIndex[ bandPolicy->band ];
-    /* loop while neighbor AP list has not been exhausted, command is not full and not enough APs for discovery had been found */
-    while ( (pScanMngr->scanParams.numOfChannels < bandPolicy->numOfChannlesForDiscovery) &&
-            (pScanMngr->scanParams.numOfChannels < SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND) &&
-            (neighborAPIndex < pScanMngr->neighborAPsDiscoveryList[ bandPolicy->band ].numOfEntries))
-    {
-        /* if the AP is not being tracked */
-        if ( SCAN_NDS_NOT_DISCOVERED == 
-             pScanMngr->neighborAPsDiscoveryList[ bandPolicy->band ].trackStatusList[ neighborAPIndex ] )
-        {
-            /* verify channel with reg domain */
-            param.paramType = REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES;
-            param.content.channelCapabilityReq.band = bandPolicy->band;
-            if ( (bandPolicy->discoveryMethod.scanType == SCAN_TYPE_NORMAL_PASSIVE) ||
-                 (bandPolicy->discoveryMethod.scanType == SCAN_TYPE_TRIGGERED_PASSIVE) ||
-                 (bandPolicy->discoveryMethod.scanType == SCAN_TYPE_SPS))
-            {
-                param.content.channelCapabilityReq.scanOption = PASSIVE_SCANNING;
-            }
-            else
-            {
-                param.content.channelCapabilityReq.scanOption = ACTIVE_SCANNING;
-            }
-            param.content.channelCapabilityReq.channelNum = 
-                pScanMngr->neighborAPsDiscoveryList[ bandPolicy->band ].APListPtr[ neighborAPIndex ].channel;
-            regulatoryDomain_getParam( pScanMngr->hRegulatoryDomain, &param );
-
-            /* if the channel is allowed, insert it to the scan command */
-            if (param.content.channelCapabilityRet.channelValidity)
-            {
-                scanMngrAddNormalChannel( hScanMngr, &(bandPolicy->discoveryMethod), 
-                                          pScanMngr->neighborAPsDiscoveryList[ bandPolicy->band ].APListPtr[ neighborAPIndex ].channel,
-                                          &(pScanMngr->neighborAPsDiscoveryList[ bandPolicy->band ].APListPtr[ neighborAPIndex ].BSSID),
-                                          param.content.channelCapabilityRet.maxTxPowerDbm );
-            }
-        }
-        neighborAPIndex++;
-    }
-
-    /* if neighbor AP list has been exhuasted */
-    if ( neighborAPIndex == pScanMngr->neighborAPsDiscoveryList[ bandPolicy->band ].numOfEntries )
-    {
-        /* reset discovery index */
-        pScanMngr->neighborAPsDiscoveryIndex[ bandPolicy->band ] = 0;
-    }
-    else
-    {
-        /* just update neighbor APs discovery index */
-        pScanMngr->neighborAPsDiscoveryIndex[ bandPolicy->band ] = neighborAPIndex;
-    }
-}
-
-/**
- * \\n
- * \date 06-Mar-2005\n
- * \brief Add channel from policy channels list to scan command on the object workspace for discovery scan.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bandPolicy - the scan policy for the band to use.\n
- */
-void scanMngrAddChannelListForDiscovery( TI_HANDLE hScanMngr, TScanBandPolicy* bandPolicy )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    paramInfo_t param;
-    TMacAddr broadcastAddress;
-    int i, channelListIndex;
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( bandPolicy->band >= RADIO_BAND_NUM_OF_BANDS )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                "scanMngrAddChannelListForDiscovery. bandPolicy->band=%d exceeds the limit %d\n",
-                bandPolicy->band, RADIO_BAND_NUM_OF_BANDS-1);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    if ( bandPolicy->numOfChannles > MAX_BAND_POLICY_CHANNLES )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                "scanMngrAddChannelListForDiscovery. bandPolicy->numOfChannles=%d exceeds the limit %d\n",
-                bandPolicy->numOfChannles, MAX_BAND_POLICY_CHANNLES);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    channelListIndex = pScanMngr->channelDiscoveryIndex[ bandPolicy->band ];
-
-    /* set broadcast MAC address */
-    for ( i = 0; i < MAC_ADDR_LEN; i++ )
-    {
-        broadcastAddress[ i ] = 0xff;
-    }
-
-    /* loop while channel list has not been exhausted, command is not full, and not enough APs for discovery had been found */
-    while ( (pScanMngr->scanParams.numOfChannels < bandPolicy->numOfChannlesForDiscovery) &&
-            (pScanMngr->scanParams.numOfChannels < SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND) &&
-            (channelListIndex < bandPolicy->numOfChannles))
-    {
-        /* verify channel with reg domain */
-        param.paramType = REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES;
-        param.content.channelCapabilityReq.band = bandPolicy->band;
-        if ( (bandPolicy->discoveryMethod.scanType == SCAN_TYPE_NORMAL_PASSIVE) ||
-             (bandPolicy->discoveryMethod.scanType == SCAN_TYPE_TRIGGERED_PASSIVE) ||
-             (bandPolicy->discoveryMethod.scanType == SCAN_TYPE_SPS))
-        {
-            param.content.channelCapabilityReq.scanOption = PASSIVE_SCANNING;
-        }
-        else
-        {
-            param.content.channelCapabilityReq.scanOption = ACTIVE_SCANNING;
-        }
-        param.content.channelCapabilityReq.channelNum = 
-            bandPolicy->channelList[ channelListIndex ];
-        regulatoryDomain_getParam( pScanMngr->hRegulatoryDomain, &param );
-
-        /* if the channel is allowed, insert it to the scan command */
-        if (param.content.channelCapabilityRet.channelValidity)
-        {
-            scanMngrAddNormalChannel( hScanMngr, &(bandPolicy->discoveryMethod), 
-                                      bandPolicy->channelList[ channelListIndex ],
-                                      &broadcastAddress,
-                                      param.content.channelCapabilityRet.maxTxPowerDbm );
-        }
-        channelListIndex++;
-    }
-        
-    /* if channel discovery list has been exhuasted */
-    if ( channelListIndex == bandPolicy->numOfChannles )
-    {
-        /* reset discovery index */
-        pScanMngr->channelDiscoveryIndex[ bandPolicy->band ] = 0;
-    }
-    else
-    {
-        /* just update channel list discovery index */
-        pScanMngr->channelDiscoveryIndex[ bandPolicy->band ] = channelListIndex;
-    }
-}
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Add SPS channels to scan command on the object workspace.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param scanMethod - The scan method (and parameters) to use.\n
- * \param band - the band to scan.\n
- */
-void scanMngrAddSPSChannels( TI_HANDLE hScanMngr, TScanMethod* scanMethod, ERadioBand band )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TI_UINT64 EarliestTSFToInsert;
-    TI_UINT32 timeToStartInAdvance = scanMethod->method.spsMethodParams.scanDuration /
-        SCAN_SPS_DURATION_PART_IN_ADVANCE;
-    scan_SPSHelper_t nextEventArray[ MAX_SIZE_OF_BSS_TRACK_LIST ];
-    int BSSListIndex, i, j, nextEventArrayHead, nextEventArraySize;
-    paramInfo_t param;
-#ifdef SCAN_MNGR_SPS_DBG
-    TI_UINT32 highValue, lowValue, maxNextEventArraySize;
-#endif
-
-    TRACE1(pScanMngr->hReport , REPORT_SEVERITY_INFORMATION, "\nscanMngrAddSPSChannels invoked for band %d\n",band);
-    /* initialize latest TSF value */
-    pScanMngr->scanParams.latestTSFValue = 0;
-
-    /* initialize the next event arry */
-    nextEventArrayHead = -1;
-    nextEventArraySize = 0;
-
-#ifdef SCAN_MNGR_SPS_DBG
-    highValue = INT64_HIGHER( pScanMngr->currentTSF );
-    lowValue = INT64_LOWER( pScanMngr->currentTSF );
-    TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "current TSF: %u-%u\n", highValue, lowValue);
-#endif
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pScanMngr->BSSList.numOfEntries > MAX_SIZE_OF_BSS_TRACK_LIST )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                "scanMngrAddSPSChannels. pScanMngr->BSSList.numOfEntries=%d exceeds the limit %d\n",
-                pScanMngr->BSSList.numOfEntries, MAX_SIZE_OF_BSS_TRACK_LIST);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    /* insert channels from tracking list to next event array according to requested band */
-    for ( BSSListIndex = 0; BSSListIndex < pScanMngr->BSSList.numOfEntries; BSSListIndex++ )
-    {
-        /* if BSS is on the right band */
-        if ( band == pScanMngr->BSSList.BSSList[ BSSListIndex ].band )
-        {
-            /* verify the channel with the reg domain */
-            param.paramType = REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES;
-            param.content.channelCapabilityReq.band = band;
-            param.content.channelCapabilityReq.scanOption = PASSIVE_SCANNING;
-            param.content.channelCapabilityReq.channelNum = pScanMngr->BSSList.BSSList[ BSSListIndex ].channel;
-            regulatoryDomain_getParam( pScanMngr->hRegulatoryDomain, &param );
-
-            /* if channel is verified for requested scan type */
-            if ( param.content.channelCapabilityRet.channelValidity )
-            {
-                /* if this AP local TSF value is greater that latest TSF value, change it */
-                if ( pScanMngr->BSSList.scanBSSList[ BSSListIndex ].localTSF > pScanMngr->scanParams.latestTSFValue )
-                {
-                    /* the latest TSF value is used by the FW to detect TSF error (an AP recovery). When a TSF
-                       error occurs, the latest TSF value should be in the future (because the AP TSF was 
-                       reset). */
-                    pScanMngr->scanParams.latestTSFValue = pScanMngr->BSSList.scanBSSList[ BSSListIndex ].localTSF;
-                }
-
-                /* calculate the TSF of the next event for tracked AP. Scan should start 
-                   SCAN_SPS_DURATION_PART_IN_ADVANCE before the calculated event */
-                nextEventArray[ nextEventArraySize ].nextEventTSF = 
-                    scanMngrCalculateNextEventTSF( hScanMngr, &(pScanMngr->BSSList), BSSListIndex, 
-                                                   pScanMngr->currentTSF + SCAN_SPS_GUARD_FROM_CURRENT_TSF +
-                                                   timeToStartInAdvance ) - timeToStartInAdvance;
-#ifdef SCAN_MNGR_SPS_DBG
-                highValue = INT64_HIGHER( nextEventArray[ nextEventArraySize ].nextEventTSF );
-                lowValue = INT64_LOWER( nextEventArray[ nextEventArraySize ].nextEventTSF );
-                TRACE8( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "BSSID:%02x:%02x:%02x:%02x:%02x:%02x will send frame at TSF:%x-%x\n", pScanMngr->BSSList.BSSList[ BSSListIndex ].BSSID[ 0 ], pScanMngr->BSSList.BSSList[ BSSListIndex ].BSSID[ 1 ], pScanMngr->BSSList.BSSList[ BSSListIndex ].BSSID[ 2 ], pScanMngr->BSSList.BSSList[ BSSListIndex ].BSSID[ 3 ], pScanMngr->BSSList.BSSList[ BSSListIndex ].BSSID[ 4 ], pScanMngr->BSSList.BSSList[ BSSListIndex ].BSSID[ 5 ], highValue, lowValue);
-#endif
-                nextEventArray[ nextEventArraySize ].trackListIndex = BSSListIndex;
-
-                /* insert it, sorted, to the next event array */
-                /* if need to insert as head (either because list is empty or because it has earliest TSF) */
-                if ( (-1 == nextEventArrayHead) ||
-                     (nextEventArray[ nextEventArraySize ].nextEventTSF < nextEventArray[ nextEventArrayHead ].nextEventTSF))
-                {
-                    /* link the newly inserted AP to the current head */
-                    nextEventArray[ nextEventArraySize ].nextAPIndex = nextEventArrayHead;
-                    /* make current head point to newly inserted AP */
-                    nextEventArrayHead = nextEventArraySize;
-                    nextEventArraySize++;
-                }
-                /* insert into the list */
-                else
-                {
-                    /* start with list head */
-                    i = nextEventArrayHead;
-                    /* while the new AP TSF is larger and list end had not been reached */
-                    while ( (nextEventArray[ i ].nextAPIndex != -1) && /* list end had not been reached */
-                            (nextEventArray[ nextEventArray[ i ].nextAPIndex ].nextEventTSF < nextEventArray[ nextEventArraySize ].nextEventTSF)) /* next event TSF of the next AP in the list is smaller than that of the AP being inserted */
-                    {
-                        /* proceed to the next AP */
-                        i = nextEventArray[ i ].nextAPIndex;
-                    }
-                    /* insert this AP to the list, right after the next event entry found */
-                    nextEventArray[ nextEventArraySize ].nextAPIndex = nextEventArray[ i ].nextAPIndex;
-                    nextEventArray[ i ].nextAPIndex = nextEventArraySize;
-                    nextEventArraySize++;
-                }
-            }
-            /* if for some reason a channel on which an AP was found is not valid for passive scan,
-               the AP should be removed. */
-            else
-            {
-                /* removing the AP is done by increasing its track count to maximum - and since it is
-                   not tracked it will not be discovered, and thus will be deleted when the scan is complete */
-                pScanMngr->BSSList.scanBSSList[ BSSListIndex ].trackFailCount = 
-                    pScanMngr->scanPolicy.maxTrackFailures + 1;
-#ifdef TI_DBG
-                /*update statistics */
-                pScanMngr->stats.APsRemovedInvalidChannel++;
-#endif
-            }
-        }
-    }
-
-#ifdef SCAN_MNGR_SPS_DBG
-    TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "SPS list after first stage:\n");
-    scanMngrDebugPrintSPSHelperList( hScanMngr, nextEventArray, nextEventArrayHead, nextEventArraySize );
-    maxNextEventArraySize = nextEventArraySize;
-#endif
-
-    /* insert channels from next event array to scan command */
-    EarliestTSFToInsert = pScanMngr->currentTSF + SCAN_SPS_GUARD_FROM_CURRENT_TSF;
-    /* insert all APs to scan command (as long as command is not full) */
-    while ( (nextEventArraySize > 0) &&
-            (pScanMngr->scanParams.numOfChannels < SCAN_MAX_NUM_OF_SPS_CHANNELS_PER_COMMAND))
-    {
-        /* if first list entry fits, and it doesn't collide with current AP DTIM */
-        if ( EarliestTSFToInsert < nextEventArray[ nextEventArrayHead ].nextEventTSF )
-        {
-            if ( TI_FALSE == scanMngrDTIMInRange( hScanMngr, nextEventArray[ nextEventArrayHead ].nextEventTSF,
-                                               nextEventArray[ nextEventArrayHead ].nextEventTSF + scanMethod->method.spsMethodParams.scanDuration ))
-            {
-                /* insert it to scan command */
-                pScanMngr->scanParams.channelEntry[ pScanMngr->scanParams.numOfChannels ].SPSChannelEntry.scanStartTime = 
-                    INT64_LOWER( (nextEventArray[ nextEventArrayHead ].nextEventTSF));
-                pScanMngr->scanParams.channelEntry[ pScanMngr->scanParams.numOfChannels ].SPSChannelEntry.scanDuration = 
-                    scanMethod->method.spsMethodParams.scanDuration;
-                pScanMngr->scanParams.channelEntry[ pScanMngr->scanParams.numOfChannels ].SPSChannelEntry.ETMaxNumOfAPframes = 
-                    scanMethod->method.spsMethodParams.ETMaxNumberOfApFrames;
-                pScanMngr->scanParams.channelEntry[ pScanMngr->scanParams.numOfChannels ].SPSChannelEntry.earlyTerminationEvent = 
-                    scanMethod->method.spsMethodParams.earlyTerminationEvent;
-                pScanMngr->scanParams.channelEntry[ pScanMngr->scanParams.numOfChannels ].SPSChannelEntry.channel = 
-                    pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].channel;
-                MAC_COPY (pScanMngr->scanParams.channelEntry[ pScanMngr->scanParams.numOfChannels ].SPSChannelEntry.bssId,
-                          pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID);
-                /* increase the AP track attempts counter */
-                pScanMngr->BSSList.scanBSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].trackFailCount++;
-                /* increase number of channels in scan command */
-                pScanMngr->scanParams.numOfChannels++;
-                /* set earliest TSF that would fit in scan command */
-                EarliestTSFToInsert = nextEventArray[ nextEventArrayHead ].nextEventTSF + 
-                                      scanMethod->method.spsMethodParams.scanDuration + 
-                                      SCAN_SPS_GUARD_FROM_LAST_BSS;
-                /* remove it from next event array */
-                nextEventArrayHead = nextEventArray[ nextEventArrayHead ].nextAPIndex;
-                nextEventArraySize--;
-            }
-            else
-            {
-                TI_UINT32 beaconIntervalUsec = 
-                    pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].beaconInterval * 1024;
-
-                /* if the next beacon also collide with DTIM */
-                if ( TI_TRUE == scanMngrDTIMInRange( hScanMngr, nextEventArray[ nextEventArrayHead ].nextEventTSF + beaconIntervalUsec,
-                                                  nextEventArray[ nextEventArrayHead ].nextEventTSF + scanMethod->method.spsMethodParams.scanDuration + beaconIntervalUsec ))
-                {
-                    /* An AP whose two consecutive beacons collide with current AP DTIM is not trackable by SPS!!! 
-                       Shouldn't happen at a normal setup, but checked to avoid endless loop.
-                       First, remove it from the tracking list (by increasing it's track count above the maximum) */
-                    pScanMngr->BSSList.scanBSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].trackFailCount = 
-                        pScanMngr->scanPolicy.maxTrackFailures + 1;
-
-                    /* and also remove it from the SPS list */
-                    nextEventArrayHead = nextEventArray[ nextEventArrayHead ].nextAPIndex;
-                    nextEventArraySize--;
-
-#ifdef TI_DBG
-                    /* update statistics */
-                    pScanMngr->stats.APsRemovedDTIMOverlap++;
-#endif
-                }
-                else
-                {
-                    /* calculate next event TSF - will get the next beacon, since timeToStartInAdvance is added to current beacon TSF */
-                    nextEventArray[ nextEventArrayHead ].nextEventTSF = 
-                        scanMngrCalculateNextEventTSF( hScanMngr, &(pScanMngr->BSSList),
-                                                       nextEventArray[ nextEventArrayHead ].trackListIndex,
-                                                       nextEventArray[ nextEventArrayHead ].nextEventTSF + timeToStartInAdvance + 1) 
-                                                            - timeToStartInAdvance;
-
-#ifdef SCAN_MNGR_SPS_DBG
-                    highValue = INT64_HIGHER( nextEventArray[ nextEventArrayHead ].nextEventTSF );
-                    lowValue = INT64_LOWER( nextEventArray[ nextEventArrayHead ].nextEventTSF );
-                    TRACE8( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "reacalculating next frame for BSSID:%02x:%02x:%02x:%02x:%02x:%02x at TSF:%x-%x, bacause of DTIM collision\n", pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID[ 0 ], pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID[ 1 ], pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID[ 2 ], pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID[ 3 ], pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID[ 4 ], pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID[ 5 ], highValue, lowValue);
-#endif
-
-                    /* reinsert to the next event array, sorted */
-                    /* if still needs to be head, do nothing (because it's still head). otherwise: */
-                    if ( (1 < nextEventArraySize) && /* list has more than one entry */
-                         (nextEventArray[ nextEventArrayHead ].nextEventTSF > nextEventArray[ nextEventArray[ nextEventArrayHead ].nextAPIndex ].nextEventTSF)) /* first event in list is earlier */
-                    {
-                        /* first remove the head from the list */
-                        j = nextEventArrayHead;
-                        nextEventArrayHead = nextEventArray[ nextEventArrayHead ].nextAPIndex;
-
-                        /* start with list head */
-                        i = nextEventArrayHead;
-                        /* while the new AP TSF is larger and list end had not been reached */
-                        while ( (nextEventArray[ i ].nextAPIndex != -1) && /* list end had not been reached */
-                                (nextEventArray[ nextEventArray[ i ].nextAPIndex ].nextEventTSF < nextEventArray[ j ].nextEventTSF)) /* next event TSF of the next AP in the list is smaller than that of the AP being inserted */
-                        {
-                            /* proceed to the next AP */
-                            i = nextEventArray[ i ].nextAPIndex;
-                        }
-                        /* insert this AP to the list, right after the next event entry found */
-                        nextEventArray[ j ].nextAPIndex = nextEventArray[ i ].nextAPIndex;
-                        nextEventArray[ i ].nextAPIndex = j;
-                    }
-
-#ifdef SCAN_MNGR_SPS_DBG
-                    scanMngrDebugPrintSPSHelperList( hScanMngr, nextEventArray, nextEventArrayHead, maxNextEventArraySize );
-#endif
-#ifdef TI_DBG
-                    /* update statistics */
-                    pScanMngr->stats.SPSSavedByDTIMCheck++;
-#endif
-                }
-            }
-        }
-        else
-        {
-            /* calculate next event TSF */
-            nextEventArray[ nextEventArrayHead ].nextEventTSF = 
-                scanMngrCalculateNextEventTSF( hScanMngr, &(pScanMngr->BSSList),
-                                               nextEventArray[ nextEventArrayHead ].trackListIndex,
-                                               EarliestTSFToInsert + timeToStartInAdvance ) - timeToStartInAdvance;
-
-#ifdef SCAN_MNGR_SPS_DBG
-            highValue = INT64_HIGHER( nextEventArray[ nextEventArrayHead ].nextEventTSF );
-            lowValue = INT64_LOWER( nextEventArray[ nextEventArrayHead ].nextEventTSF );
-            TRACE8( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "reacalculating next frame for BSSID:%02x:%02x:%02x:%02x:%02x:%02x at TSF:%x-%x\n", pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID[ 0 ], pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID[ 1 ], pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID[ 2 ], pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID[ 3 ], pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID[ 4 ], pScanMngr->BSSList.BSSList[ nextEventArray[ nextEventArrayHead ].trackListIndex ].BSSID[ 5 ], highValue, lowValue);
-#endif
-
-            /* reinsert to the next event array, sorted */
-            /* if still needs to be head, do nothing (because it's still head). otherwise: */
-            if ( (1 < nextEventArraySize) && /* list has more than one entry */
-                 (nextEventArray[ nextEventArrayHead ].nextEventTSF > nextEventArray[ nextEventArray[ nextEventArrayHead ].nextAPIndex ].nextEventTSF)) /* first event in list is earlier */
-            {
-                /* first remove the head from the list */
-                j = nextEventArrayHead;
-                nextEventArrayHead = nextEventArray[ nextEventArrayHead ].nextAPIndex;
-
-                /* start with list head */
-                i = nextEventArrayHead;
-                /* while the new AP TSF is larger and list end had not been reached */
-                while ( (nextEventArray[ i ].nextAPIndex != -1) && /* list end had not been reached */
-                        (nextEventArray[ nextEventArray[ i ].nextAPIndex ].nextEventTSF < nextEventArray[ j ].nextEventTSF)) /* next event TSF of the next AP in the list is smaller than that of the AP being inserted */
-                {
-                    /* proceed to the next AP */
-                    i = nextEventArray[ i ].nextAPIndex;
-                }
-                /* insert this AP to the list, right after the next event entry found */
-                nextEventArray[ j ].nextAPIndex = nextEventArray[ i ].nextAPIndex;
-                nextEventArray[ i ].nextAPIndex = j;
-            }
-
-#ifdef SCAN_MNGR_SPS_DBG
-            scanMngrDebugPrintSPSHelperList( hScanMngr, nextEventArray, nextEventArrayHead, maxNextEventArraySize );
-#endif
-        }
-    }
-    /* For SPS scan, the scan duration is added to the command, since later on current TSF cannot be 
-       reevaluated. The scan duration is TSF at end of scan minus current TSF, divided by 1000 (convert
-       to milliseconds) plus 1 (for the division reminder). */
-    pScanMngr->scanParams.SPSScanDuration = 
-        (((TI_UINT32)(EarliestTSFToInsert - SCAN_SPS_GUARD_FROM_LAST_BSS - pScanMngr->currentTSF)) / 1000) + 1;    
-}
-
-/**
- * \\n
- * \date 07-Mar-2005\n
- * \brief Calculates local TSF of the next event (beacon or GPR) of the given tracked AP.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param BSSList - a pointer to the track list.\n
- * \param entryIndex - the index of the AP for which calculation is requires in the tracking list.\n
- * \param initialTSFValue - local TSF value AFTER which the next event is to found.\n
- * \return The approximate current TSF
- */
-TI_UINT64 scanMngrCalculateNextEventTSF( TI_HANDLE hScanMngr, scan_BSSList_t* BSSList, TI_UINT8 entryIndex, TI_UINT64 initialTSFValue )
-{
-    TI_UINT64 remoteBeaconTSF, localBeaconTSF;
-    TI_INT64 localRemoteTSFDelta;
-    TI_UINT32 reminder;
-    TI_INT32 averageDeltaChange = 0;
-    int i; 
-#ifdef SCAN_MNGR_SPS_DBG
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-#endif /* SCAN_MNGR_SPS_DBG */
-
-/* graphical representation:
-                               E      E      E      E      E      E      E      E      E
-Remote TSF Line:               |      |      |      |      |      |      |      |      |
-0                    remoteTSF |      |      |      |      |      |      |      |      | Returned value
-+-----------------------+------+------+------+------+------+------+------+------+------+------+----------------...
-
-Local TSF Line:
-    0                localTSF                                                   initialTSFValue
-    +-------------------+---------------------------------------------------------------+-----+---------------...
-
-  note that:
-  1. both lines Don't start at the same time!
-  2. remoteTSF and localTSF were measured when last frame was received from the tracked AP. the difference between their
-     values is the constant difference between the two lines.
-  3. initialTSFValue is the local TSF the first event after which is requested.
-  4. returned value is the TSF (in local scale!) of the next event of the tracked AP.
-  5. an E represents an occurring event, which is a scheduled frame transmission (beacon or GPR) of the tracked AP.
-*/
-  
-    /*
-     * The next event TSF is calculated as follows:
-     * first, the difference between the local TSF (that of the AP the STA is currently connected to) and the 
-     * remote TSF (that of the AP being tracked) is calculated using the TSF values measured when last scan was
-     * performed. Than, the initial TSF value is converted to remote TSF value, using the delta just calculated.
-     * The next remote TSF is found (in remote TSF value) by subtracting the reminder of dividing the current
-     * remote TSF value by the remote beacon interval (time passed from last beacon) from the current remote TSF
-     * (hence amounting to the last beacon remote TSF), and than adding beacon interval. This is finally converted 
-     * back to local TSF, which is the requested value.
-     *
-     * After all this is done, clock drift between current AP and remote AP is compensated. This is done in thr
-     * following way: the delte between local TSF and remote TSF is compared to this value at the last scan
-     * (if they are equal, the clocks tick at the same rate). This difference is store in an array holding a
-     * configured number of such previous differences (currenlty 4). The average value of these previous values
-     * is then calculated, and added the the TSF value calculated before. This way, the average drift between 
-     * the local AP and the candidate AP is measured, and the next drift value can be estimated and thus
-     * taken into account.
-     */
-
-#ifdef SCAN_MNGR_SPS_DBG
-    TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "initial TSF value:%x-%x\n", INT64_HIGHER( initialTSFValue ), INT64_LOWER( initialTSFValue ));
-    TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "local time stamp:%x-%x\n", INT64_HIGHER( BSSList->scanBSSList[ entryIndex ].localTSF ), INT64_LOWER( BSSList->scanBSSList[ entryIndex ].localTSF ));
-#endif
-    /* calculate the delta between local and remote TSF */
-    localRemoteTSFDelta = BSSList->scanBSSList[ entryIndex ].localTSF - 
-        BSSList->BSSList[ entryIndex ].lastRxTSF;
-    /* convert initial TSF to remote timeline */
-    remoteBeaconTSF = initialTSFValue - localRemoteTSFDelta;
-#ifdef SCAN_MNGR_SPS_DBG
-    TRACE4( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Local TSF:%u-%u, Remote TSF: %u-%u\n", INT64_HIGHER(BSSList->scanBSSList[ entryIndex ].localTSF), INT64_LOWER(BSSList->scanBSSList[ entryIndex ].localTSF), INT64_HIGHER(BSSList->BSSList[ entryIndex ].lastRxTSF), INT64_LOWER(BSSList->BSSList[ entryIndex ].lastRxTSF)));
-    TRACE4( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "TSF delta:%u-%u, current remote TSF:%u-%u\n", INT64_HIGHER(localRemoteTSFDelta), INT64_LOWER(localRemoteTSFDelta), INT64_HIGHER(remoteBeaconTSF ), INT64_LOWER(remoteBeaconTSF ));
-#endif
-    /* find last remote beacon transmission by subtracting the reminder of current remote TSF divided
-       by the beacon interval (indicating how much time passed since last beacon) from current remote
-       TSF */
-    reminder = reminder64( remoteBeaconTSF, BSSList->BSSList[ entryIndex ].beaconInterval * 1024 );
-    remoteBeaconTSF -= reminder;
-
-#ifdef SCAN_MNGR_SPS_DBG
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "reminder=%d\n",reminder);
-    TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Last remote beacon TSF:%x-%x\n", INT64_HIGHER(remoteBeaconTSF), INT64_LOWER(remoteBeaconTSF));
-#endif
-    /* advance from last beacon to next beacon */
-    remoteBeaconTSF += BSSList->BSSList[ entryIndex ].beaconInterval * 1024;
-#ifdef SCAN_MNGR_SPS_DBG
-    TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Next remote beacon TSF:%x-%x\n", INT64_HIGHER(remoteBeaconTSF), INT64_LOWER(remoteBeaconTSF));
-#endif
-
-#ifdef SCAN_SPS_USE_DRIFT_COMPENSATION
-    /* update delta change array with the change between current and last delta (if last delta is valid) */
-    if ( 0 != BSSList->scanBSSList[ entryIndex ].prevTSFDelta )
-    {
-        BSSList->scanBSSList[ entryIndex ].deltaChangeArray[ BSSList->scanBSSList[ entryIndex ].deltaChangeArrayIndex ] = 
-            (TI_INT32)(localRemoteTSFDelta - BSSList->scanBSSList[ entryIndex ].prevTSFDelta);
-#ifdef SCAN_MNGR_SPS_DBG
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "current delta^2:%d\n", localRemoteTSFDelta - BSSList->scanBSSList[ entryIndex ].prevTSFDelta);
-#endif
-        if ( SCAN_SPS_NUM_OF_TSF_DELTA_ENTRIES == ++BSSList->scanBSSList[ entryIndex ].deltaChangeArrayIndex )
-        {
-            BSSList->scanBSSList[ entryIndex ].deltaChangeArrayIndex = 0;
-        }
-    }
-    BSSList->scanBSSList[ entryIndex ].prevTSFDelta = localRemoteTSFDelta;
-    
-    /* calculate average delta change, and add (or subtract) it from beacon timing */
-    for ( i = 0; i < SCAN_SPS_NUM_OF_TSF_DELTA_ENTRIES; i++ )
-    {
-        averageDeltaChange += BSSList->scanBSSList[ entryIndex ].deltaChangeArray[ i ];
-    }
-    averageDeltaChange /= SCAN_SPS_NUM_OF_TSF_DELTA_ENTRIES;
-#ifdef SCAN_MNGR_SPS_DBG
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "average delta change: %d\n", averageDeltaChange);
-#endif /* SCAN_MNGR_SPS_DBG */
-    remoteBeaconTSF += averageDeltaChange;
-#endif
-
-    /* convert to local TSF */
-    localBeaconTSF = remoteBeaconTSF + localRemoteTSFDelta;
-
-#ifdef SCAN_SPS_USE_DRIFT_COMPENSATION
-    /* if beacon (in local TSF) is before initial TSF value (possible due to drift compensation),
-       proceed to next beacon */
-    if ( localBeaconTSF < initialTSFValue )
-    {
-        localBeaconTSF += (BSSList->BSSList[ entryIndex ].beaconInterval * 1024);
-    }
-#endif
-
-    return localBeaconTSF;
-}
-
-/**
- * \\n
- * \date 20-September-2005\n
- * \brief Check whether a time range collides with current AP DTIM
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param rangeStart - the time range start TSF.\n
- * \param rangeEnd - the time range end TSF.\n
- * \return Whether the event collides with a DTIM (TRUF if it does, TI_FALSE if it doesn't).\n
- */
-TI_BOOL scanMngrDTIMInRange( TI_HANDLE hScanMngr, TI_UINT64 rangeStart, TI_UINT64 rangeEnd )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TI_UINT64 DTIMEventStart, DTIMEventEnd;
-    TI_UINT32 DTIMPeriodInUsec; /* DTIM period in micro seconds */
-
-#ifdef SCAN_MNGR_DTIM_DBG
-    TRACE4( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "DTIM check: SPS raneg start:%x-%x, end:%x-%x\n", INT64_HIGHER(rangeStart), INT64_LOWER(rangeStart), INT64_HIGHER(rangeEnd), INT64_LOWER(rangeEnd));
-#endif
-
-    /* calculate DTIM period */
-    DTIMPeriodInUsec = pScanMngr->currentBSSBeaconInterval * 1024 * pScanMngr->currentBSSDtimPeriod;
-
-#ifdef SCAN_MNGR_DTIM_DBG
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "DTIM period in usec: %d\n", DTIMPeriodInUsec);
-#endif
-
-    /* calculate (from DTIM count) the first DTIM after the last seen beacon. The last seen beacon will always
-       occur before the SPS - because it already happened, and the SPS is a future event. However, the next DTIM
-       is not necessarily prior to the SPS - it is also a future event (if the last beacon was not a DTIM) */
-    if ( 0 == pScanMngr->lastLocalBcnDTIMCount )
-    {   /* The last beacon was a DTIM */
-        DTIMEventStart = pScanMngr->lastLocalBcnTSF;
-    }
-    else
-    {   /* The last beacon was not a DTIM - calculate the next beacon that will be a DTIM */
-        DTIMEventStart = pScanMngr->lastLocalBcnTSF + 
-            ((pScanMngr->currentBSSDtimPeriod - pScanMngr->lastLocalBcnDTIMCount) * pScanMngr->currentBSSBeaconInterval);
-        TRACE6(pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "\n Next DTIM TSF:%u-%u , last beacon TSF:%u-%u, last DTIM count: %d, beacon interval: %d\n", INT64_HIGHER(DTIMEventStart), INT64_LOWER(DTIMEventStart), INT64_HIGHER(pScanMngr->lastLocalBcnTSF), INT64_LOWER(pScanMngr->lastLocalBcnTSF), pScanMngr->lastLocalBcnDTIMCount, pScanMngr->currentBSSBeaconInterval);
-    }
-#ifdef SCAN_MNGR_DTIM_DBG
-    TRACE6( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Next DTIM TSF:%u-%u, last beacon TSF:%u-%u, last DTIM count: %d, beacon interval: %d\n", INT64_HIGHER(DTIMEventStart), INT64_LOWER(DTIMEventStart), INT64_HIGHER(pScanMngr->lastLocalBcnTSF), INT64_LOWER(pScanMngr->lastLocalBcnTSF), pScanMngr->lastLocalBcnDTIMCount, pScanMngr->currentBSSBeaconInterval);
-#endif
-
-    /* calculate the DTIM event end (add the DTIM length). Note that broadcast frames after the DTIM are not
-       taken into consideration because their availability and length varies. Even if at some point SPS will be
-       missed due to broadcast RX frames, it does not mean this AP cannot be tracked. */
-    DTIMEventEnd = DTIMEventStart + SCAN_SPS_FW_DTIM_LENGTH;
-
-    /* if this DTIM is after the SPS end - than no collision will occur! */
-    if ( DTIMEventStart > rangeEnd )
-    {
-#ifdef SCAN_MNGR_DTIM_DBG
-        TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "no collision because DTIM is after SPS\n");
-#endif
-        return TI_FALSE;
-    }
-    /* if this DTIM end is not before the SPS range start - it means the DTIM is colliding with the SPS, because
-       it neither ends before the SPS nor starts after it */
-    else if ( DTIMEventEnd >= rangeStart )
-    {
-#ifdef SCAN_MNGR_DTIM_DBG
-        TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Collision beacuse DTIM is not before SPS\n");
-#endif        
-        return TI_TRUE;
-    }
-    /* the DTIM is before the SPS range - find the first DTIM after the SPS start (and check if it's colliding
-       with the SPS range */
-    else 
-    {
-        /* get the usec difference from the SPS range start to the last DTIM */
-        TI_UINT64 usecDiffFromRangeStartToLastDTIM = rangeStart - DTIMEventStart;
-        /* get the reminder from the usec difference divided by the DTIM period - the time (in usec) from last DTIM
-           to SPS start */
-        TI_UINT32 reminder = reminder64( usecDiffFromRangeStartToLastDTIM, DTIMPeriodInUsec );
-        /* get the next DTIM start time by adding DTIM period to the last DTIM before the SPS range start */
-        DTIMEventStart = rangeStart - reminder + DTIMPeriodInUsec;
-        /* get DTIM end time */
-        DTIMEventEnd = DTIMEventStart + SCAN_SPS_FW_DTIM_LENGTH;
-#ifdef SCAN_MNGR_DTIM_DBG
-        TRACE7( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Diff from range start to last DTIM: %x-%x, reminder:%d, DTIM start:%x-%x, DTIM end: %x-%x\n", INT64_HIGHER(usecDiffFromRangeStartToLastDTIM), INT64_LOWER(usecDiffFromRangeStartToLastDTIM), reminder, INT64_HIGHER(DTIMEventStart), INT64_LOWER(DTIMEventStart), INT64_HIGHER(DTIMEventEnd), INT64_LOWER(DTIMEventEnd));
-#endif
-
-        /* if the SPS starts after the DTIM ends or before the DTIM starts - no collision occurs */
-        if ( (rangeStart > DTIMEventEnd) || (rangeEnd < DTIMEventStart))
-        {
-#ifdef SCAN_MNGR_DTIM_DBG
-            TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "No collision will occur because DTIM is before or after SPS\n");
-#endif
-            return TI_FALSE;
-        }
-        /* otherwise - a collision will occur! */
-        {
-#ifdef SCAN_MNGR_DTIM_DBG
-            TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Collision will occur!\n");
-#endif
-            return TI_TRUE;
-        }
-    }
-}
-
-/**
- * \\n
- * \date 03-Mar-2005\n
- * \brief Add a normal channel entry to the object workspace scan command.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param scanMethod - The scan method (and parameters) to use.\n
- * \param channel - the channel index.\n
- * \param BSSID - pointer to the BSSID to use (may be broadcast.\n
- * \param txPowerDbm - tx power to transmit probe requests.\n
- */
-void scanMngrAddNormalChannel( TI_HANDLE hScanMngr, TScanMethod* scanMethod, TI_UINT8 channel, 
-                               TMacAddr* BSSID, TI_UINT8 txPowerDbm )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int commandChannelIndex;
-    TScanBasicMethodParams* basicMethodParams;
-
-    /* get next channel in the object workspace */
-    commandChannelIndex = pScanMngr->scanParams.numOfChannels;
-    pScanMngr->scanParams.numOfChannels++;
-
-    /* get basic method params pointer according to scan type */
-    switch ( scanMethod->scanType )
-    {
-    case SCAN_TYPE_NORMAL_PASSIVE:
-    case SCAN_TYPE_NORMAL_ACTIVE:  
-        basicMethodParams = &(scanMethod->method.basicMethodParams);
-        break;
-
-    case SCAN_TYPE_TRIGGERED_PASSIVE:
-    case SCAN_TYPE_TRIGGERED_ACTIVE:
-        basicMethodParams = &(scanMethod->method.TidTriggerdMethodParams.basicMethodParams);
-        break;
-
-    default:
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Unercognized scan type %d when adding normal channel to scan list.\n", scanMethod->scanType );
-        basicMethodParams = NULL;
-		return;
-    }
-
-    /* set params */
-    pScanMngr->scanParams.channelEntry[ commandChannelIndex ].normalChannelEntry.channel = channel;
-    pScanMngr->scanParams.channelEntry[ commandChannelIndex ].normalChannelEntry.txPowerDbm = 
-        TI_MIN( txPowerDbm, basicMethodParams->probReqParams.txPowerDbm );
-    pScanMngr->scanParams.channelEntry[ commandChannelIndex ].normalChannelEntry.maxChannelDwellTime = 
-        basicMethodParams->maxChannelDwellTime;
-    pScanMngr->scanParams.channelEntry[ commandChannelIndex ].normalChannelEntry.minChannelDwellTime = 
-        basicMethodParams->minChannelDwellTime;
-    pScanMngr->scanParams.channelEntry[ commandChannelIndex ].normalChannelEntry.earlyTerminationEvent = 
-        basicMethodParams->earlyTerminationEvent;
-    pScanMngr->scanParams.channelEntry[ commandChannelIndex ].normalChannelEntry.ETMaxNumOfAPframes = 
-        basicMethodParams->ETMaxNumberOfApFrames;
-    
-   MAC_COPY (pScanMngr->scanParams.channelEntry[ commandChannelIndex ].normalChannelEntry.bssId, *BSSID);
-}
-                                    
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Removes an entry from the BSS list (by replacing it with another entry, if any).
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param BSSEntryIndex - index of the entry to remove.\n
- */
-void scanMngrRemoveBSSListEntry( TI_HANDLE hScanMngr, TI_UINT8 BSSEntryIndex )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TI_UINT8* tempResultBuffer;
-
-#ifdef TI_DBG
-    /*update statistics */
-    if ( SCAN_MNGR_STAT_MAX_TRACK_FAILURE <= pScanMngr->BSSList.scanBSSList[ BSSEntryIndex ].trackFailCount )
-    {
-        pScanMngr->stats.ConsecutiveTrackFailCountHistogram[ SCAN_MNGR_STAT_MAX_TRACK_FAILURE - 1 ]++;
-    }
-    else
-    {
-        pScanMngr->stats.ConsecutiveTrackFailCountHistogram[ pScanMngr->BSSList.scanBSSList[ BSSEntryIndex ].trackFailCount ]++;
-    }
-#endif
-    /* if no more entries are available, simply reduce the number of entries.
-       As this is the last entry, it won't be accessed any more. */
-    if ( (pScanMngr->BSSList.numOfEntries-1) == BSSEntryIndex )
-    {
-
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Removing last entry %d in BSS list\n", pScanMngr->BSSList.numOfEntries);
-
-        pScanMngr->BSSList.numOfEntries--;
-    }
-    else
-    {
-#ifdef SCAN_MNGR_DBG
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Removing entry %d of %d\n", BSSEntryIndex, pScanMngr->BSSList.numOfEntries);
-#endif
-        /* keep the scan result buffer pointer */
-        tempResultBuffer = pScanMngr->BSSList.BSSList[ BSSEntryIndex ].pBuffer;
-        /* copy the last entry over this one */
-        os_memoryCopy( pScanMngr->hOS, &(pScanMngr->BSSList.BSSList[ BSSEntryIndex ]),
-                       &(pScanMngr->BSSList.BSSList[ pScanMngr->BSSList.numOfEntries-1 ]),
-                       sizeof(bssEntry_t));
-        os_memoryCopy( pScanMngr->hOS, &(pScanMngr->BSSList.scanBSSList[ BSSEntryIndex ]),
-                       &(pScanMngr->BSSList.scanBSSList[ pScanMngr->BSSList.numOfEntries-1 ]),
-                       sizeof(scan_BSSEntry_t));
-        /* replace the scan result buffer of the last entry */
-        pScanMngr->BSSList.BSSList[ pScanMngr->BSSList.numOfEntries-1 ].pBuffer = tempResultBuffer;
-        /* decrease the number of BSS entries */
-        pScanMngr->BSSList.numOfEntries--;
-    }
-}
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Removes all BSS list entries that are neither neighbor APs not on a policy defined channel.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bCheckNeighborAPs - whether to verify that APs marked as neighbor APs are really neighbor APs.\n
- * \param bCheckChannels - whether to verify that APs not marked as neighbor APs are on policy defined channel.\n
- */
-void scanMngrUpdateBSSList( TI_HANDLE hScanMngr, TI_BOOL bCheckNeighborAPs, TI_BOOL bCheckChannels )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int BSSEntryIndex;
-
-    /* It looks like it never happens. Anyway decided to check */
-    if (pScanMngr->BSSList.numOfEntries > MAX_SIZE_OF_BSS_TRACK_LIST)
-    {        
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                 "scanMngrUpdateBSSList problem. BSSList.numOfEntries=%d exceeds the limit %d\n",
-                 pScanMngr->BSSList.numOfEntries, MAX_SIZE_OF_BSS_TRACK_LIST);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-
-    /* loop on all BSS list entry */    
-    for ( BSSEntryIndex = 0; BSSEntryIndex < pScanMngr->BSSList.numOfEntries; )
-    {
-        /* an AP can be in the BSS list either because it's a neighbor AP or, if not, because it's on a
-           policy defined channel. When Neighbor AP list is changed, it is only necessary to check APs that
-           are in the list because they are neighbor APs. When the policy is changed, it is only necessary
-           to check APs that are in the list because they are on a policy defined channel. */
-
-        /* if a check for neighbor APs is requested, check only APs that are designated as neighbor APs,
-           and only check if they still are neighbor APs */
-        if ( (TI_TRUE == bCheckNeighborAPs) && 
-             (TI_TRUE == pScanMngr->BSSList.BSSList[ BSSEntryIndex ].bNeighborAP) &&
-             (-1 == scanMngrGetNeighborAPIndex( hScanMngr, 
-                                                pScanMngr->BSSList.BSSList[ BSSEntryIndex ].band,
-                                                &(pScanMngr->BSSList.BSSList[ BSSEntryIndex ].BSSID))))
-        {
-            /* remove it */
-            scanMngrRemoveBSSListEntry( hScanMngr, BSSEntryIndex );
-            /* repeat the loop with the same index to check the new BSS on this place */
-            continue;
-        }
-
-        /* if a check for policy defined channels is requested, check only APs that are not designated as 
-           neighbor APs */
-        if ( (TI_TRUE == bCheckChannels) &&
-             (TI_FALSE == pScanMngr->BSSList.BSSList[ BSSEntryIndex ].bNeighborAP) &&
-             (TI_FALSE == scanMngrIsPolicyChannel( hScanMngr, 
-                                                pScanMngr->BSSList.BSSList[ BSSEntryIndex ].band, 
-                                                pScanMngr->BSSList.BSSList[ BSSEntryIndex ].channel )))
-        {
-            /* remove it */
-            scanMngrRemoveBSSListEntry( hScanMngr, BSSEntryIndex );
-        }
-        else
-        {
-            BSSEntryIndex++;
-        }
-    }
-}
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief returns the index of a neighbor AP.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param band - the band on which the AP resides.\n
- * \param bssId - the AP's BSSID.\n
- * \return the index into the neighbor AP list for the given address, -1 if AP is not in list.\n
- */
-TI_INT8 scanMngrGetNeighborAPIndex( TI_HANDLE hScanMngr, ERadioBand band, TMacAddr* bssId )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int i;
-
-    /* loop on all neighbor APS for this AP's band, and compare BSSID's */
-    for ( i = 0; i < pScanMngr->neighborAPsDiscoveryList[ band ].numOfEntries; i++ )
-    {
-        if (MAC_EQUAL (*bssId, pScanMngr->neighborAPsDiscoveryList[ band ].APListPtr[ i ].BSSID))
-        {
-            return i;
-        }
-    }
-
-    /* if the AP wasn't found in the list, it's not a neighbor AP... */
-    return -1;
-}
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Checks whether a channel is defined on a policy.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param band - the band on which the channel is.\n
- * \param channel - the channel number.\n
- * \return TI_TRUE if channel is defined on policy, TI_FALSE otherwise.\n
- */
-TI_BOOL scanMngrIsPolicyChannel( TI_HANDLE hScanMngr, ERadioBand band, TI_UINT8 channel )
-{
-    int i;
-    TScanBandPolicy* bandPolicy = scanMngrGetPolicyByBand( hScanMngr, band );
-
-    
-    /* check if the AP's band is defined in the policy */
-    if ( NULL == bandPolicy )
-    {
-        return TI_FALSE;
-    }
-
-    /* loop on all channels for the AP's band */
-    for ( i = 0; i < bandPolicy->numOfChannles; i++ )
-    {
-        if ( bandPolicy->channelList[ i ] == channel )
-        {
-            return TI_TRUE;
-        }
-    }
-
-    /* if no channel was found, the AP is NOT on a policy configured channel */
-    return TI_FALSE;
-}
-
-/**
- * \\n
- * \date 18-Apr-2005\n
- * \brief Converts scan concentrator result status to scan manager result status, to be returned to roaming manager.\n
- *
- * Function Scope \e Private.\n
- * \param result status - scan concentrator result status.\n
- * \return appropriate scan manager status.\n
- */
-scan_mngrResultStatus_e scanMngrConvertResultStatus( EScanCncnResultStatus resultStatus )
-{
-    switch (resultStatus)
-    {
-    case SCAN_CRS_SCAN_COMPLETE_OK:
-        return  SCAN_MRS_SCAN_COMPLETE_OK;
-/*        break; - unreachable */
-
-    case SCAN_CRS_SCAN_RUNNING:
-        return SCAN_MRS_SCAN_RUNNING;
-/*        break; - unreachable */
-
-    case SCAN_CRS_SCAN_FAILED:
-        return SCAN_MRS_SCAN_FAILED;
-/*        break; - unreachable */
-
-    case SCAN_CRS_SCAN_STOPPED:
-        return SCAN_MRS_SCAN_STOPPED;
-/*        break; - unreachable */
-
-    case SCAN_CRS_TSF_ERROR:
-        return SCAN_MRS_SCAN_FAILED;
-/*        break; - unreachable */
-
-    case SCAN_CRS_SCAN_ABORTED_FW_RESET:
-        return SCAN_MRS_SCAN_ABORTED_FW_RESET;
-/*        break; - unreachable */
-
-    case SCAN_CRS_SCAN_ABORTED_HIGHER_PRIORITY:
-        return SCAN_MRS_SCAN_ABORTED_HIGHER_PRIORITY;
-/*        break; - unreachable */
-
-    default:
-        return SCAN_MRS_SCAN_FAILED;
-/*        break; - unreachable */
-    }
-}
-
-/************************************************************************/
-/*                         Trace functions                             */
-/************************************************************************/
-
-#ifdef REPORT_LOG
-
-static char scanTypeDesc[ 6 ][ MAX_DESC_LENGTH ] = 
-{
-    "passive normal scan",
-    "active normal scan",
-    "SPS scan",
-    "passive triggered scan",
-    "active triggered scan",
-    "no scan type"
-};
-
-static char earlyTerminationConditionDesc[ 4 ][ MAX_DESC_LENGTH ] =
-{
-    "Early termination disabled",
-    "Early termination on beacon",
-    "Early termination on probe response",
-    "Early termination on both"
-};
-
-#ifdef TI_DBG
-static char booleanDesc[ 2 ][ MAX_DESC_LENGTH ] =
-{
-    "No",
-    "Yes"
-};
-
-static char contScanStatesDesc[ SCAN_CSS_NUM_OF_STATES ][ MAX_DESC_LENGTH ] =
-{
-    "IDLE",
-    "TRACKING ON G",
-    "TRACKING ON A",
-    "DISCOVERING",
-    "STOPPING"
-};
-
-static char immedScanStatesDesc[ SCAN_ISS_NUM_OF_STATES ][ MAX_DESC_LENGTH ] = 
-{
-    "IDLE",
-    "IMMEDIATE ON G",
-    "IMMEDIATE ON A",
-    "STOPPING"
-};
-
-static char discoveryPartDesc[ SCAN_SDP_NUMBER_OF_DISCOVERY_PARTS ][ MAX_DESC_LENGTH ] =
-{
-    "G neighbor APs",
-    "A neighbor APs",
-    "G channels",
-    "A Channels",
-    "No discovery"
-};
-
-static char neighborDiscovreyStateDesc[ SCAN_NDS_NUMBER_OF_NEIGHBOR_DISCOVERY_STATES ][ MAX_DESC_LENGTH ] =
-{
-    "Discovered",
-    "Not discovered",
-    "Current AP"
-};
-
-static char earlyTerminationDesc[ SCAN_ET_COND_NUM_OF_CONDS ][ MAX_DESC_LENGTH ] =
-{
-    "None",
-    "Beacon",
-    "Prob. resp."
-    "Bcn & prob. resp."
-};
-#endif
-
-#endif
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief Print a neighbor AP list.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param neighborAPList - the list of neighbor APs to print.\n
- */
-void scanMngrTracePrintNeighborAPsList( TI_HANDLE hScanMngr, neighborAPList_t *neighborAPList )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int i;
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( neighborAPList->numOfEntries > MAX_NUM_OF_NEIGHBOR_APS )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                "scanMngrTracePrintNeighborAPsList. neighborAPList->numOfEntries=%d exceeds the limit %d\n",
-                neighborAPList->numOfEntries, MAX_NUM_OF_NEIGHBOR_APS);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    /* print number of entries */
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Neighbor AP list with %d entries.\n\n", neighborAPList->numOfEntries);
-    
-    /* print all APs in list */
-    for ( i = 0; i < neighborAPList->numOfEntries; i++ )
-    {
-        scanMngrTracePrintNeighborAP( hScanMngr, &(neighborAPList->APListPtr[ i ]));
-    }
-}
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief Print a neighbor AP.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param neighborAP - the neighbor AP to print.\n
- */
-void scanMngrTracePrintNeighborAP( TI_HANDLE hScanMngr, neighborAP_t* neighborAP )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    /* print neighbor AP content */
-    TRACE7( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Neighbor AP band: , channel: %d, MAC address (BSSID): %2x:%2x:%2x:%2x:%2x:%2xn", neighborAP->channel, neighborAP->BSSID[ 0 ], neighborAP->BSSID[ 1 ], neighborAP->BSSID[ 2 ], neighborAP->BSSID[ 3 ], neighborAP->BSSID[ 4 ], neighborAP->BSSID[ 5 ]);
-}
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief Print scan policy.\n
- *
- * Function Scope \e Private.\n
- * \param scanPolicy - scan policy to print.\n
- */
-void scanMngrTracePrintScanPolicy( TScanPolicy* scanPolicy )
-{
-    int i;
-
-    /* print general policy parameters */
-    WLAN_OS_REPORT(("Global policy parameters:\n"));
-    WLAN_OS_REPORT(("Normal scan interval: %d, deteriorating scan interval: %d\n",
-                    scanPolicy->normalScanInterval, scanPolicy->deterioratingScanInterval));
-    WLAN_OS_REPORT(("BSS list size: %d, numnber of tracked APs to start discovery: %d, "
-                    "Max track failures:% d\n", scanPolicy->BSSListSize, 
-                    scanPolicy->BSSNumberToStartDiscovery, scanPolicy->maxTrackFailures));
-    /* It looks like it never happens. Anyway decided to check */
-    if ( scanPolicy->numOfBands > RADIO_BAND_NUM_OF_BANDS )
-    {
-        WLAN_OS_REPORT(("scanMngrTracePrintScanPolicy. scanPolicy->numOfBands=%d exceeds the limit %d\n",
-                scanPolicy->numOfBands, RADIO_BAND_NUM_OF_BANDS));
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    /* print band policy parameters for all available bands */
-    for ( i = 0; i < scanPolicy->numOfBands; i++ )
-    {
-        scanMngrTracePrintBandScanPolicy( &(scanPolicy->bandScanPolicy[ i ]));
-    }
-}
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief Print a band scan policy AP.\n
- *
- * Function Scope \e Private.\n
- * \param bandPolicy - the band scan policy to print.\n
- */
-void scanMngrTracePrintBandScanPolicy( TScanBandPolicy* bandPolicy )
-{
-    int i;
-
-    WLAN_OS_REPORT(("Band scan policy for band: %s\n", 
-                    (RADIO_BAND_2_4_GHZ == bandPolicy->band ? "2.4 GHz (b/g)" : "5.0 GHz (a)")));
-    WLAN_OS_REPORT(("Maximal number of channels to scan at each discovery interval %d:\n", 
-                    bandPolicy->numOfChannlesForDiscovery));
-    WLAN_OS_REPORT(("RSSI Threshold: %d\n", bandPolicy->rxRSSIThreshold));
-    WLAN_OS_REPORT(("Tracking method:\n"));
-    scanMngrTracePrintScanMethod( &(bandPolicy->trackingMethod));
-    WLAN_OS_REPORT(("Discovery method:\n"));
-    scanMngrTracePrintScanMethod( &(bandPolicy->discoveryMethod));
-    WLAN_OS_REPORT(("Immediate scan method:\n"));
-    scanMngrTracePrintScanMethod( &(bandPolicy->immediateScanMethod));
-    /* It looks like it never happens. Anyway decided to check */
-    if ( bandPolicy->numOfChannles > MAX_BAND_POLICY_CHANNLES )
-    {
-        WLAN_OS_REPORT(("scanMngrTracePrintBandScanPolicy. bandPolicy->numOfChannles=%d exceeds the limit %d\n",
-                bandPolicy->numOfChannles, MAX_BAND_POLICY_CHANNLES));
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    WLAN_OS_REPORT(("Channels: "));
-    for( i = 0; i < bandPolicy->numOfChannles; i++ )
-    {
-        WLAN_OS_REPORT(("%d ", bandPolicy->channelList[ i ]));
-    }
-    WLAN_OS_REPORT(("\n"));
-}
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief Print a scan method
- *
- * Function Scope \e Private.\n
- * \param scanMethod - the scan method to print.\n
- */
-void scanMngrTracePrintScanMethod( TScanMethod* scanMethod )
-{
-    WLAN_OS_REPORT(("Scan type: %s\n", scanTypeDesc[ scanMethod->scanType ]));
-
-    switch (scanMethod->scanType)
-    {
-    case SCAN_TYPE_NORMAL_ACTIVE:
-    case SCAN_TYPE_NORMAL_PASSIVE:
-        scanMngrTracePrintNormalScanMethod( &(scanMethod->method.basicMethodParams));
-        break;
-    
-    case SCAN_TYPE_TRIGGERED_ACTIVE:
-    case SCAN_TYPE_TRIGGERED_PASSIVE:
-        scanMngrTracePrintTriggeredScanMethod( &(scanMethod->method.TidTriggerdMethodParams));
-        break;
-
-    case SCAN_TYPE_SPS:
-        scanMngrTracePrintSPSScanMethod( &(scanMethod->method.spsMethodParams));
-        break;
-
-    case SCAN_TYPE_NO_SCAN:
-    default:
-        WLAN_OS_REPORT(("No scan method defined\n"));
-        break;
-    }
-}
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief print a normal scan method
- *
- * Function Scope \e Private.\n
- * \param basicMethodParams - the basic method parameters to print.\n
- */
-void scanMngrTracePrintNormalScanMethod( TScanBasicMethodParams* basicMethodParams )
-{
-    WLAN_OS_REPORT(("Max channel dwell time: %d, min channel dwell time: %d\n",
-                    basicMethodParams->maxChannelDwellTime, basicMethodParams->minChannelDwellTime));
-    WLAN_OS_REPORT(("Early termination condition: %s, frame number for early termination: %d\n",
-                    earlyTerminationConditionDesc[ basicMethodParams->earlyTerminationEvent >> 4 ],
-                    basicMethodParams->ETMaxNumberOfApFrames));
-    WLAN_OS_REPORT(("Number of probe requests: %d, TX level: %d, probe request rate: %d\n", 
-                    basicMethodParams->probReqParams.numOfProbeReqs,
-                    basicMethodParams->probReqParams.txPowerDbm,
-                    basicMethodParams->probReqParams.bitrate));
-}
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief print an AC triggered scan method
- *
- * Function Scope \e Private.\n
- * \param triggeredMethodParams - the AC-triggered method parameters to print.\n
- */
-void scanMngrTracePrintTriggeredScanMethod( TScanTidTriggeredMethodParams* triggeredMethodParams )
-{
-    WLAN_OS_REPORT(("Triggering Tid: %d\n", triggeredMethodParams->triggeringTid));
-    scanMngrTracePrintNormalScanMethod( &(triggeredMethodParams->basicMethodParams));
-}
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief print a SPS scan method
- *
- * Function Scope \e Private.\n
- * \param SPSMethodParams - the SPS method parameters to print.\n
- */
-void scanMngrTracePrintSPSScanMethod( TScanSPSMethodParams* SPSMethodParams )
-{
-    WLAN_OS_REPORT(("Early termination condition: %s, frame number for early termination: %d\n",
-                    earlyTerminationConditionDesc[ SPSMethodParams->earlyTerminationEvent ],
-                    SPSMethodParams->ETMaxNumberOfApFrames));
-    WLAN_OS_REPORT(("Scan duration: %d\n", SPSMethodParams->scanDuration));
-}
-
-/**
- * \\n
- * \date 31-Mar-2005\n
- * \brief print debug information for every received frame.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param frameInfo - holding all frame related information.\n
- */
-void scanMngrDebugPrintReceivedFrame( TI_HANDLE hScanMngr, TScanFrameInfo *frameInfo )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "Scan manager received the following frame:\n");
-    TRACE8( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "from BSSID: %02x:%02x:%02x:%02x:%02x:%02x, band: %d, channel: %d\n", (*frameInfo->bssId)[ 0 ], (*frameInfo->bssId)[ 1 ], (*frameInfo->bssId)[ 2 ], (*frameInfo->bssId)[ 3 ], (*frameInfo->bssId)[ 4 ], (*frameInfo->bssId)[ 5 ], frameInfo->band, frameInfo->channel);
-    TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "rate: %d, received at TSF (lower 32 bits): %d\n", frameInfo->rate, frameInfo->staTSF);
-    if ( BEACON == frameInfo->parsedIEs->subType )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "remote TSF value: %x-%x\n", INT64_HIGHER( frameInfo->parsedIEs->content.iePacket.timestamp ), INT64_LOWER( frameInfo->parsedIEs->content.iePacket.timestamp ));
-
-    }
-    else
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "remote TSF value: %x-%x\n", INT64_HIGHER( frameInfo->parsedIEs->content.iePacket.timestamp ), INT64_LOWER( frameInfo->parsedIEs->content.iePacket.timestamp ));
-    }
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "RSSI: %d\n", frameInfo->rssi);
-}
-#ifdef TI_DBG
-/**
- * \\n
- * \date 31-Mar-2005\n
- * \brief print BSS list.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrDebugPrintBSSList( TI_HANDLE hScanMngr )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int i, limit;
-
-    if ( 0 == pScanMngr->BSSList.numOfEntries )
-    {
-        WLAN_OS_REPORT(("BSS list is empty.\n"));
-        return;
-    }
-    limit = pScanMngr->BSSList.numOfEntries;
-    /* It looks like it never happens. Anyway decided to check */
-	if (pScanMngr->BSSList.numOfEntries > MAX_SIZE_OF_BSS_TRACK_LIST)
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                "scanMngrDebugPrintBSSList problem. BSSList.numOfEntries=%d Exceeds limit %d\n",
-                pScanMngr->BSSList.numOfEntries, MAX_SIZE_OF_BSS_TRACK_LIST);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        limit = MAX_SIZE_OF_BSS_TRACK_LIST;
-    }
-    
-    WLAN_OS_REPORT(("-------------------------------- BSS List--------------------------------\n"));
-
-    for ( i = 0; i < limit; i++ )
-    {
-        WLAN_OS_REPORT(  ("Entry number: %d\n", i));
-        scanMngrDebugPrintBSSEntry( hScanMngr,  i );
-    }
-
-    WLAN_OS_REPORT(("--------------------------------------------------------------------------\n"));
-}
-#endif/*TI_DBG*/
-/**
- * \\n
- * \date 31-Mar-2005\n
- * \brief print one entry in the BSS list.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param entryIndex - the index of the entry to print.\n
- */
-void scanMngrDebugPrintBSSEntry( TI_HANDLE hScanMngr, TI_UINT8 entryIndex )
-{
-#ifdef REPORT_LOG
-
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    bssEntry_t* pBssEntry = &(pScanMngr->BSSList.BSSList[ entryIndex ]);
-    scan_BSSEntry_t * pScanBssEntry = &(pScanMngr->BSSList.scanBSSList[ entryIndex ]);
-
-    WLAN_OS_REPORT( ("BSSID: %02x:%02x:%02x:%02x:%02x:%02x, band: %d\n", pBssEntry->BSSID[ 0 ],
-                              pBssEntry->BSSID[ 1 ], pBssEntry->BSSID[ 2 ],
-                              pBssEntry->BSSID[ 3 ], pBssEntry->BSSID[ 4 ],
-                              pBssEntry->BSSID[ 5 ], pBssEntry->band));
-    WLAN_OS_REPORT( ("channel: %d, beacon interval: %d, average RSSI: %d dBm\n", 
-                              pBssEntry->channel, pBssEntry->beaconInterval, pBssEntry->RSSI));
-    WLAN_OS_REPORT(  ("Neighbor AP: %s, track fail count: %d\n", 
-                              (TI_TRUE == pBssEntry->bNeighborAP ? "YES" : "NO"),
-                              pScanBssEntry->trackFailCount));
-    WLAN_OS_REPORT(  ("local TSF: %d-%d, remote TSF: %x-%x\n", 
-                              INT64_HIGHER( pScanBssEntry->localTSF ), INT64_LOWER( pScanBssEntry->localTSF ),
-                              INT64_HIGHER( pBssEntry->lastRxTSF ), INT64_LOWER( pBssEntry->lastRxTSF )));
-    WLAN_OS_REPORT( ("Host Time Stamp: %d, last received rate: %d\n", 
-                              pBssEntry->lastRxHostTimestamp, pBssEntry->rxRate));
-
-#endif
-}
-
-/**
- * \\n
- * \date 14-Apr-2005\n
- * \brief print SPS helper list
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param spsHelperList - the list to print.\n
- * \param arrayHead - the index of the first element in the list.\n
- * \param arraySize - the size of the array.\n
- */
-void scanMngrDebugPrintSPSHelperList( TI_HANDLE hScanMngr, scan_SPSHelper_t* spsHelperList, int arrayHead, int arraySize )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int i;
-
-    TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "SPS helper list size:%d, list head:%d\n", arraySize, arrayHead);
-    for ( i = 0; i < arraySize; i++ )
-    {
-        TRACE7( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "track list index:%d, BSSID:%02x:%02x:%02x:%02x:%02x:%02x\n", spsHelperList[ i ].trackListIndex, pScanMngr->BSSList.BSSList[ spsHelperList[ i ].trackListIndex ].BSSID[ 0 ], pScanMngr->BSSList.BSSList[ spsHelperList[ i ].trackListIndex ].BSSID[ 1 ], pScanMngr->BSSList.BSSList[ spsHelperList[ i ].trackListIndex ].BSSID[ 2 ], pScanMngr->BSSList.BSSList[ spsHelperList[ i ].trackListIndex ].BSSID[ 3 ], pScanMngr->BSSList.BSSList[ spsHelperList[ i ].trackListIndex ].BSSID[ 4 ], pScanMngr->BSSList.BSSList[ spsHelperList[ i ].trackListIndex ].BSSID[ 5 ]);
-        TRACE3( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "TSF:%x-%x, next entry index:%d\n", INT64_HIGHER(spsHelperList[ i ].nextEventTSF), INT64_LOWER(spsHelperList[ i ].nextEventTSF), spsHelperList[ i ].nextAPIndex);
-    }
-}
-
-
-/*
- ***********************************************************************
- *  API functions
- ***********************************************************************
- */
-TI_HANDLE scanMngr_create( TI_HANDLE hOS )
-{
-    int i,j = 0;
-    scanMngr_t* pScanMngr ;
-    
-    /* allocate the scan manager object */
-    pScanMngr = os_memoryAlloc( hOS, sizeof(scanMngr_t));
-    if ( NULL == pScanMngr )
-    {
-        WLAN_OS_REPORT( ("scanMngr_create: Failed allocating scan manager object storage.\n"));
-        return NULL;
-    }
-
-    os_memoryZero( pScanMngr->hOS, pScanMngr, sizeof(scanMngr_t));
-
-    pScanMngr->hOS = hOS;
-
-    /* allocate frame storage space for BSS list */
-    for (i = 0; i < MAX_SIZE_OF_BSS_TRACK_LIST; i++)
-    {
-        pScanMngr->BSSList.BSSList[i].pBuffer = os_memoryAlloc (hOS, MAX_BEACON_BODY_LENGTH);
-        if (pScanMngr->BSSList.BSSList[i].pBuffer == NULL)
-        {
-            WLAN_OS_REPORT( ("scanMngr_create: Failed allocating scan result buffer for index %d.\n", i));
-            /* failed to allocate a buffer - release all buffers that were allocated by now */
-            for (j = i - 1; j >= 0; j--)
-            {
-                os_memoryFree (hOS, pScanMngr->BSSList.BSSList[j].pBuffer, MAX_BEACON_BODY_LENGTH);
-            }
-            /* release the rest of the module */
-            scanMngrFreeMem ((TI_HANDLE)pScanMngr);
-            return NULL;
-        }
-    }
-
-    return (TI_HANDLE)pScanMngr;
-}
-
-void scanMngr_init (TStadHandlesList *pStadHandles)
-{
-    scanMngr_t *pScanMngr = (scanMngr_t*)(pStadHandles->hScanMngr);
-    int i;
-
-    /* store handles */
-    pScanMngr->hReport           = pStadHandles->hReport;
-    pScanMngr->hRegulatoryDomain = pStadHandles->hRegulatoryDomain;
-    pScanMngr->hScanCncn         = pStadHandles->hScanCncn;
-    pScanMngr->hRoamingMngr      = pStadHandles->hRoamingMngr;
-    pScanMngr->hSiteMngr         = pStadHandles->hSiteMgr;
-    pScanMngr->hTWD              = pStadHandles->hTWD;
-    pScanMngr->hTimer            = pStadHandles->hTimer;
-    pScanMngr->hAPConnection     = pStadHandles->hAPConnection;
-    pScanMngr->hEvHandler        = pStadHandles->hEvHandler;
-
-   /* mark the scanning operational mode to be automatic by default */
-    pScanMngr->scanningOperationalMode = SCANNING_OPERATIONAL_MODE_AUTO;
-
-    /* mark that continuous scan timer is not running */
-    pScanMngr->bTimerRunning = TI_FALSE;
-
-    /* mark that continuous scan process is not running */
-    pScanMngr->bContinuousScanStarted = TI_FALSE;
-
-    /* nullify scan policy */
-    os_memoryZero( pScanMngr->hOS, &(pScanMngr->scanPolicy), sizeof(TScanPolicy));
-
-    /* initialize the BSS list to empty list */
-    pScanMngr->BSSList.numOfEntries = 0;
-
-    /* mark no continuous and immediate scans are currently running */
-    pScanMngr->contScanState = SCAN_CSS_IDLE;
-    pScanMngr->immedScanState = SCAN_ISS_IDLE;
-    pScanMngr->bNewBSSFound = TI_FALSE;
-    pScanMngr->consecNotFound = 0;
-    
-    /* mark no AP recovery occured */
-    pScanMngr->bSynchronized = TI_TRUE;
-    
-    /* mark no neighbor APs */
-    pScanMngr->neighborAPsDiscoveryList[ RADIO_BAND_2_4_GHZ ].numOfEntries = 0;
-    pScanMngr->neighborAPsDiscoveryList[ RADIO_BAND_5_0_GHZ ].numOfEntries = 0;
-
-    /* mark no discovery process */
-    pScanMngr->currentDiscoveryPart = SCAN_SDP_NO_DISCOVERY;
-
-    /* initialize the low quality indication to indicate that normal quality interval should be used */
-    pScanMngr->bLowQuality = TI_FALSE;
-
-    /* clear current BSS field (put broadcast MAC) */
-    for (i = 0; i < MAC_ADDR_LEN; i++)
-    {
-        pScanMngr->currentBSS[i] = 0xff;
-    }
-    pScanMngr->currentBSSBand = RADIO_BAND_2_4_GHZ;
-
-    /* create timer */
-    pScanMngr->hContinuousScanTimer = tmr_CreateTimer (pScanMngr->hTimer);
-    if (pScanMngr->hContinuousScanTimer == NULL)
-    {
-        TRACE0(pScanMngr->hReport, REPORT_SEVERITY_ERROR, "scanMngr_init(): Failed to create hContinuousScanTimer!\n");
-    }
-
-    /* register scan concentrator callbacks */
-    scanCncn_RegisterScanResultCB( pScanMngr->hScanCncn, SCAN_SCC_ROAMING_CONT,
-                                   scanMngr_contScanCB, pStadHandles->hScanMngr );
-    scanCncn_RegisterScanResultCB( pScanMngr->hScanCncn, SCAN_SCC_ROAMING_IMMED,
-                                   scanMngr_immedScanCB, pStadHandles->hScanMngr );
-
-#ifdef TI_DBG
-    /* nullify statistics */
-    os_memoryZero( pScanMngr->hOS, &(pScanMngr->stats), sizeof(scan_mngrStat_t));
-    /* nullify scan parameters - for debug prints before start */
-    os_memoryZero( pScanMngr->hOS, &(pScanMngr->scanParams), sizeof(TScanParams));
-    /* initialize other variables for debug print */
-    pScanMngr->bImmedNeighborAPsOnly = TI_FALSE;
-    pScanMngr->bNewBSSFound = TI_FALSE;
-#endif
-}
-
-void scanMngr_unload (TI_HANDLE hScanMngr)
-{
-    scanMngrFreeMem (hScanMngr);
-}
-
-scan_mngrResultStatus_e scanMngr_startImmediateScan( TI_HANDLE hScanMngr, TI_BOOL bNeighborAPsOnly )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TScanBandPolicy *gPolicy, *aPolicy;
-    EScanCncnResultStatus resultStatus;
-
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_startImmediateScan called, hScanMngr=0x%x, bNeighborAPsOnly=.\n", hScanMngr);
-
-    /* sanity check - whether immediate scan is already running */
-    if ( SCAN_ISS_IDLE != pScanMngr->immedScanState )
-    {
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Immediate scan attempted while it is already running, in state:%d.\n", pScanMngr->immedScanState);
-        return SCAN_MRS_SCAN_NOT_ATTEMPTED_ALREADY_RUNNING;
-    }
-
-    /* get policies by band */
-    gPolicy = scanMngrGetPolicyByBand( hScanMngr, RADIO_BAND_2_4_GHZ );
-    aPolicy = scanMngrGetPolicyByBand( hScanMngr, RADIO_BAND_5_0_GHZ );
-
-    /* check whether a policy is defined for at least one band */
-    if ( ((NULL == gPolicy) || (SCAN_TYPE_NO_SCAN == gPolicy->immediateScanMethod.scanType)) && /* no policy for G band */
-         ((NULL == aPolicy) || (SCAN_TYPE_NO_SCAN == aPolicy->immediateScanMethod.scanType))) /* no policy for A band */
-    {
-        TRACE0( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Immediatse scan attempted when no policy is defined.\n");
-        return SCAN_MRS_SCAN_NOT_ATTEMPTED_EMPTY_POLICY;
-    }
-
-    /* First try to scan on G band - if a policy is defined and channels are available */
-    if ( (NULL != gPolicy) && /* policy is defined for G */
-         (SCAN_TYPE_NO_SCAN != gPolicy->immediateScanMethod.scanType))
-    {
-        /* build scan command */
-        scanMngrBuildImmediateScanCommand( hScanMngr, gPolicy, bNeighborAPsOnly );
-        
-        /* if no channels are available, proceed to band A */
-        if ( 0 < pScanMngr->scanParams.numOfChannels )
-        {
-            /* mark that immediate scan is running on band G */
-            pScanMngr->immedScanState = SCAN_ISS_G_BAND;
-            pScanMngr->bImmedNeighborAPsOnly = bNeighborAPsOnly;
-
-            /* if continuous scan is running, mark that it should quit */
-            if ( SCAN_CSS_IDLE != pScanMngr->contScanState )
-            {
-                TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_startImmediateScan called 1, switched to STOPPING state \n");
-
-                pScanMngr->contScanState = SCAN_CSS_STOPPING;
-            }
-
-             /* send scan command to scan concentrator with the required scan params according to scanning operational mode */
-            resultStatus = scanMngr_Start1ShotScan(hScanMngr, SCAN_SCC_ROAMING_IMMED);
-
-            if ( SCAN_CRS_SCAN_RUNNING != resultStatus )
-            {
-                TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Failed to start immediate scan on band G, return code %d.\n", resultStatus);
-#ifdef TI_DBG
-                pScanMngr->stats.ImmediateGByStatus[ resultStatus ]++;
-#endif
-                return SCAN_MRS_SCAN_FAILED;
-            }
-            return SCAN_MRS_SCAN_RUNNING;
-        }
-    }
-
-    /* if G scan did not start (because no policy is configured or no channels are available, try A band */
-    if ( (NULL != aPolicy) &&
-         (SCAN_TYPE_NO_SCAN != aPolicy->immediateScanMethod.scanType))
-    {
-        /* build scan command */
-        scanMngrBuildImmediateScanCommand( hScanMngr, aPolicy, bNeighborAPsOnly );
-
-        /* if no channels are available, report error */
-        if ( 0 == pScanMngr->scanParams.numOfChannels )
-        {
-            TRACE0( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "No channels available for scan operation.\n");
-            return SCAN_MRS_SCAN_NOT_ATTEMPTED_NO_CHANNLES_AVAILABLE;
-        }
-        else
-        {
-            /* mark that immediate scan is running on band A */
-            pScanMngr->immedScanState = SCAN_ISS_A_BAND;
-
-            /* if continuous scan is running, mark that it should quit */
-            if ( SCAN_CSS_IDLE != pScanMngr->contScanState )
-            {
-                TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_startImmediateScan called 2, switched to STOPPING state \n");
-
-                pScanMngr->contScanState = SCAN_CSS_STOPPING;
-            }
-
-             /* send scan command to scan concentrator with the required scan params according to scanning operational mode */
-             resultStatus = scanMngr_Start1ShotScan(hScanMngr, SCAN_SCC_ROAMING_IMMED);
-            if ( SCAN_CRS_SCAN_RUNNING != resultStatus )
-            {
-                TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Failed to start immediate scan on band A, return code %d.\n", resultStatus);
-#ifdef TI_DBG
-                pScanMngr->stats.ImmediateAByStatus[ resultStatus ]++;
-#endif
-                return SCAN_MRS_SCAN_FAILED;
-            }
-            return SCAN_MRS_SCAN_RUNNING;
-        }
-    }
-    else
-    {
-        /* since we passed the policy check, we arrived here because we didn't had channel on G and policy on A */
-        TRACE0( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "No channels available for scan operation.\n");
-        return SCAN_MRS_SCAN_NOT_ATTEMPTED_NO_CHANNLES_AVAILABLE;
-    }
-}
-
-void scanMngr_stopImmediateScan( TI_HANDLE hScanMngr )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngrStopImmediateScan called, hScanMngr=0x%x", hScanMngr);
-
-    /* check that immediate scan is running */
-    if ( (SCAN_ISS_A_BAND != pScanMngr->immedScanState) && (SCAN_ISS_G_BAND != pScanMngr->immedScanState))
-    {
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Immediate scan stop request when immediate scan is in state:%d", pScanMngr->immedScanState);
-        return;
-    }
-
-#ifdef TI_DBG
-    switch ( pScanMngr->immedScanState )
-    {
-    case SCAN_ISS_G_BAND:
-        pScanMngr->stats.ImmediateGByStatus[ SCAN_CRS_SCAN_STOPPED ]++;
-        break;
-
-    case SCAN_ISS_A_BAND:
-        pScanMngr->stats.ImmediateAByStatus[ SCAN_CRS_SCAN_STOPPED ]++;
-        break;
-
-    default:
-        break;
-    }
-#endif
-    /* mark immediate scan status as stopping */
-    pScanMngr->immedScanState = SCAN_ISS_STOPPING;
-
-    /* send a stop command to scan concentrator */
-    scanCncn_StopScan( pScanMngr->hScanCncn, SCAN_SCC_ROAMING_IMMED );
-}
-
-void scanMngr_startContScan( TI_HANDLE hScanMngr, TMacAddr* currentBSS, ERadioBand currentBSSBand )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int currentBSSNeighborIndex;
-
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_StartContScan called, hScanMngr=0x%x.\n", hScanMngr);
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pScanMngr->currentBSSBand >= RADIO_BAND_NUM_OF_BANDS )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-               "scanMngr_startContScan. pScanMngr->currentBSSBand=%d exceeds the limit %d\n",
-                   pScanMngr->currentBSSBand, RADIO_BAND_NUM_OF_BANDS-1);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    if ( currentBSSBand >= RADIO_BAND_NUM_OF_BANDS )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-               "scanMngr_startContScan. currentBSSBand=%d exceeds the limit %d\n",
-                   currentBSSBand, RADIO_BAND_NUM_OF_BANDS-1);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    /* if continuous scan is already running, it means we get a start command w/o stop */
-    if ( TI_TRUE == pScanMngr->bContinuousScanStarted )
-    {
-        TRACE0( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Start continuous scan requested when continuous scan is running.\n");
-        return;
-    }
-
-    /* mark that continuous scan was started */
-    pScanMngr->bContinuousScanStarted = TI_TRUE;
-    
-    /* before reading and marking the new BSS - make sure that the old one is marked as NOT DISCOVERED */
-    currentBSSNeighborIndex = scanMngrGetNeighborAPIndex( hScanMngr, pScanMngr->currentBSSBand, &(pScanMngr->currentBSS));
-    if (( -1 != currentBSSNeighborIndex ) && ( currentBSSNeighborIndex < MAX_NUM_OF_NEIGHBOR_APS ))
-    {
-        pScanMngr->neighborAPsDiscoveryList[ pScanMngr->currentBSSBand ].trackStatusList[ currentBSSNeighborIndex ] = 
-            SCAN_NDS_NOT_DISCOVERED;
-    }
-
-    /* Now copy current BSS - to be used when setting neighbor APs */
-    pScanMngr->currentBSSBand = currentBSSBand;
-    MAC_COPY (pScanMngr->currentBSS, *currentBSS);
-
-    /* if current BSS is in the neighbor AP list, mark it as current BSS */
-    currentBSSNeighborIndex = scanMngrGetNeighborAPIndex( hScanMngr, currentBSSBand, currentBSS );
-    if (( -1 != currentBSSNeighborIndex ) && ( currentBSSNeighborIndex < MAX_NUM_OF_NEIGHBOR_APS ))
-    {
-        pScanMngr->neighborAPsDiscoveryList[ currentBSSBand ].trackStatusList[ currentBSSNeighborIndex ] = 
-            SCAN_NDS_CURRENT_AP;
-    }
-
-    /* reset discovery cycle */
-    pScanMngr->neighborAPsDiscoveryIndex[ RADIO_BAND_2_4_GHZ ] = 0;
-    pScanMngr->neighborAPsDiscoveryIndex[ RADIO_BAND_5_0_GHZ ] = 0;
-    pScanMngr->channelDiscoveryIndex[ RADIO_BAND_2_4_GHZ ] = 0;
-    pScanMngr->channelDiscoveryIndex[ RADIO_BAND_5_0_GHZ ] = 0;
-    pScanMngr->currentDiscoveryPart = SCAN_SDP_NEIGHBOR_G;
-    scanMngrSetNextDiscoveryPart( hScanMngr );
-
-    /* clear the BSS tracking list */
-    pScanMngr->BSSList.numOfEntries = 0;
-
-    /* start timer (if timeout is configured) */
-    if ( ((TI_TRUE == pScanMngr->bLowQuality) && (0 < pScanMngr->scanPolicy.normalScanInterval)) ||
-         ((TI_FALSE == pScanMngr->bLowQuality) && (0 < pScanMngr->scanPolicy.deterioratingScanInterval)))
-    {
-        TI_UINT32 uTimeout = pScanMngr->bLowQuality ?
-                             pScanMngr->scanPolicy.deterioratingScanInterval :
-                             pScanMngr->scanPolicy.normalScanInterval;
-
-        pScanMngr->bTimerRunning = TI_TRUE;
-
-        tmr_StartTimer (pScanMngr->hContinuousScanTimer,
-                        scanMngr_GetUpdatedTsfDtimMibForScan,
-                        (TI_HANDLE)pScanMngr,
-                        uTimeout,
-                        TI_TRUE);
-    }
-}
-
-void scanMngr_stopContScan( TI_HANDLE hScanMngr )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TI_UINT8 i;
-
-    TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_stopContScan called, hScanMngr=0x%x, state =%d\n", hScanMngr, pScanMngr->contScanState);
-        
-    /* if continuous scan is not running, it means we get a stop command w/o start */
-    if ( TI_FALSE == pScanMngr->bContinuousScanStarted )
-    {
-        TRACE0( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Stop continuous scan when continuous scan is not running.\n");
-        return;
-    }
-
-    /* mark that continuous scan is not running */
-    pScanMngr->bContinuousScanStarted = TI_FALSE;
-
-    /* stop timer */
-    if ( TI_TRUE == pScanMngr->bTimerRunning )
-    {
-        tmr_StopTimer (pScanMngr->hContinuousScanTimer);
-        pScanMngr->bTimerRunning = TI_FALSE;
-    }
-
-    /* if continuous scan is currently running */
-    if ( (SCAN_CSS_IDLE != pScanMngr->contScanState) &&
-         (SCAN_CSS_STOPPING != pScanMngr->contScanState))
-    {
-        /* send a stop scan command to the scan concentartor */
-        scanCncn_StopScan( pScanMngr->hScanCncn, SCAN_SCC_ROAMING_CONT );
-        TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_stopContScan called, switched to STOPPING state \n");
-
-#ifdef TI_DBG
-        switch ( pScanMngr->contScanState )
-        {
-        case SCAN_CSS_TRACKING_G_BAND:
-            pScanMngr->stats.TrackingGByStatus[ SCAN_CRS_SCAN_STOPPED ]++;
-            break;
-
-        case SCAN_CSS_TRACKING_A_BAND:
-            pScanMngr->stats.TrackingAByStatus[ SCAN_CRS_SCAN_STOPPED ]++;
-            break;
-
-        case SCAN_CSS_DISCOVERING:
-            if ( RADIO_BAND_2_4_GHZ == pScanMngr->statsLastDiscoveryBand )
-            {
-                pScanMngr->stats.DiscoveryGByStatus[ SCAN_CRS_SCAN_STOPPED ]++;
-            }
-            else
-            {
-                pScanMngr->stats.DiscoveryAByStatus[ SCAN_CRS_SCAN_STOPPED ]++;
-            }
-            break;
-
-        default:
-            break;
-        }
-#endif
-        /* mark that continuous scan is stopping */
-        pScanMngr->contScanState = SCAN_CSS_STOPPING;
-    }
-
-    /* clear current neighbor APs */
-    pScanMngr->neighborAPsDiscoveryList[ RADIO_BAND_2_4_GHZ ].numOfEntries = 0;
-    pScanMngr->neighborAPsDiscoveryList[ RADIO_BAND_5_0_GHZ ].numOfEntries = 0;
-
-    /* clear current BSS field .This is for the case that scanMngr_setNeighborAPs() is called before scanMngr_startcontScan() */
-    for ( i = 0; i < MAC_ADDR_LEN; i++ )
-    {
-        pScanMngr->currentBSS[ i ] = 0xff;
-    }
-
-}
-
-bssList_t* scanMngr_getBSSList( TI_HANDLE hScanMngr )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TI_UINT8 BSSIndex;
-    paramInfo_t param;
-
-    
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_getBSSList called, hScanMngr=0x%x.\n", hScanMngr);
-    /* It looks like it never happens. Anyway decided to check */
-    if (pScanMngr->BSSList.numOfEntries > MAX_SIZE_OF_BSS_TRACK_LIST)
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                 "scanMngr_getBSSList problem. BSSList.numOfEntries=%d exceeds the limit %d\n",
-                 pScanMngr->BSSList.numOfEntries, MAX_SIZE_OF_BSS_TRACK_LIST);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        /* Returning here a NULL pointer can cause problems because the calling procedures
-         use the returned pointer without checking it for correctness. */
-        pScanMngr->BSSList.numOfEntries = MAX_SIZE_OF_BSS_TRACK_LIST;
-    }
-    /* loop on all BSS'es */    
-    for ( BSSIndex = 0; BSSIndex < pScanMngr->BSSList.numOfEntries; )
-    {
-        /* verify channel validity with the reg domain - for active scan! 
-           (because connection will be attempted on the channel... */
-        param.paramType = REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES;
-        param.content.channelCapabilityReq.band = pScanMngr->BSSList.BSSList[ BSSIndex ].band;
-        param.content.channelCapabilityReq.scanOption = ACTIVE_SCANNING;
-        param.content.channelCapabilityReq.channelNum = pScanMngr->BSSList.BSSList[ BSSIndex ].channel;
-        regulatoryDomain_getParam( pScanMngr->hRegulatoryDomain, &param );
-
-        /* if channel is not valid */
-        if ( !param.content.channelCapabilityRet.channelValidity )
-        {
-            /* will replace this entry with one further down the array, if any. Therefore, index is not increased
-               (because a new entry will be placed in the same index). If this is the last entry - the number of
-               BSSes will be decreased, and thus the loop will exit */
-            scanMngrRemoveBSSListEntry( hScanMngr, BSSIndex );
-        }
-        else
-        {
-            BSSIndex++;
-        }
-    }
-
-    /* return the BSS list */
-    return (bssList_t*)&(pScanMngr->BSSList);
-}
-
-void scanMngr_setNeighborAPs( TI_HANDLE hScanMngr, neighborAPList_t* neighborAPList )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int neighborAPIndex, currentBSSNeighborIndex;
-
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_setNeighborAPs called, hScanMngr=0x%x.\n", hScanMngr);
-#ifdef TI_DBG
-    scanMngrTracePrintNeighborAPsList( hScanMngr, neighborAPList );
-#endif
-    /* if continuous scan is running, indicate that it shouldn't proceed to next scan (if any) */
-    if ( pScanMngr->contScanState != SCAN_CSS_IDLE )
-    {
-        TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_setNeighborAPs called, switched to STOPPING state \n");
-
-        pScanMngr->contScanState = SCAN_CSS_STOPPING;
-    }
-    /* It looks like it never happens. Anyway decided to check */
-    if ( neighborAPList->numOfEntries > MAX_NUM_OF_NEIGHBOR_APS )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                "scanMngr_setNeighborAPs. neighborAPList->numOfEntries=%d exceeds the limit %d\n",
-                neighborAPList->numOfEntries, MAX_NUM_OF_NEIGHBOR_APS);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    /* clear current neighbor APs */
-    pScanMngr->neighborAPsDiscoveryList[ RADIO_BAND_2_4_GHZ ].numOfEntries = 0;
-    pScanMngr->neighborAPsDiscoveryList[ RADIO_BAND_5_0_GHZ ].numOfEntries = 0;
-
-    /* copy new neighbor APs, according to band */
-    for ( neighborAPIndex = 0; neighborAPIndex < neighborAPList->numOfEntries; neighborAPIndex++ )
-    {
-        if ( neighborAPList->APListPtr[ neighborAPIndex ].band >= RADIO_BAND_NUM_OF_BANDS )
-        {
-           TRACE3( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-                   "scanMngr_setNeighborAPs. neighborAPList->APListPtr[ %d ].band=%d exceeds the limit %d\n",
-                   neighborAPIndex, neighborAPList->APListPtr[ neighborAPIndex ].band, RADIO_BAND_NUM_OF_BANDS-1);
-           handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-           return;
-        }
-        /* insert to appropriate list */
-        os_memoryCopy( pScanMngr->hOS,
-                       &(pScanMngr->neighborAPsDiscoveryList[ neighborAPList->APListPtr[ neighborAPIndex ].band ].APListPtr[ pScanMngr->neighborAPsDiscoveryList[ neighborAPList->APListPtr[ neighborAPIndex ].band  ].numOfEntries ]),
-                       &(neighborAPList->APListPtr[ neighborAPIndex ]),
-                       sizeof(neighborAP_t));
-
-        /* if AP is in track list, mark as discovered. This is done only if continuous scan
-           has already started, to ensure the roaming canidate list holds valid information */
-        if ( TI_TRUE == pScanMngr->bContinuousScanStarted )
-        {
-        pScanMngr->neighborAPsDiscoveryList[ neighborAPList->APListPtr[ neighborAPIndex ].band  ].trackStatusList[ pScanMngr->neighborAPsDiscoveryList[ neighborAPList->APListPtr[ neighborAPIndex ].band  ].numOfEntries ] =
-            ( -1 == scanMngrGetTrackIndexByBssid( hScanMngr, &(neighborAPList->APListPtr[ neighborAPIndex ].BSSID)) ? 
-              SCAN_NDS_NOT_DISCOVERED : 
-              SCAN_NDS_DISCOVERED );
-        }
-        else
-        {
-            /* if continuous scan has not yet started, all AP's are yet to be discovered... */
-            pScanMngr->neighborAPsDiscoveryList[ neighborAPList->APListPtr[ neighborAPIndex ].band  ].trackStatusList[ pScanMngr->neighborAPsDiscoveryList[ neighborAPList->APListPtr[ neighborAPIndex ].band  ].numOfEntries ] =
-                SCAN_NDS_NOT_DISCOVERED;
-        }
-
-        /* increase neighbor AP count */
-        pScanMngr->neighborAPsDiscoveryList[ neighborAPList->APListPtr[ neighborAPIndex ].band  ].numOfEntries++;
-    }
-    
-    /* remove all tracked APs that are designated as neighbor APs, but are not anymore. Policy has not
-       changed, so there's no need to check APs that are not neighbor APs and were inserted to the BSS
-       list because they are on a policy defined channel. */
-    scanMngrUpdateBSSList( hScanMngr, TI_TRUE, TI_FALSE );
-
-    /* if current BSS is a neighbor AP, mark it */
-    currentBSSNeighborIndex = scanMngrGetNeighborAPIndex( hScanMngr, 
-                                                          pScanMngr->currentBSSBand, 
-                                                          &(pScanMngr->currentBSS));
-    if ( -1 != currentBSSNeighborIndex )
-    {
-        pScanMngr->neighborAPsDiscoveryList[ pScanMngr->currentBSSBand ].trackStatusList[ currentBSSNeighborIndex ] = 
-            SCAN_NDS_CURRENT_AP;
-    }
-
-    /* reset discovery counters */
-    pScanMngr->neighborAPsDiscoveryIndex[ RADIO_BAND_2_4_GHZ ] = 0;
-    pScanMngr->neighborAPsDiscoveryIndex[ RADIO_BAND_5_0_GHZ ] = 0;
-    pScanMngr->channelDiscoveryIndex[ RADIO_BAND_2_4_GHZ ] = 0;
-    pScanMngr->channelDiscoveryIndex[ RADIO_BAND_5_0_GHZ ] = 0;
-    /* set current discovery part to first part (G neighbor APs) */
-    pScanMngr->currentDiscoveryPart = SCAN_SDP_NEIGHBOR_G;
-    /* now advance discovery part */
-    scanMngrSetNextDiscoveryPart( hScanMngr );
-}
-
-void scanMngr_qualityChangeTrigger( TI_HANDLE hScanMngr, TI_BOOL bLowQuality )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    TRACE1( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_qualityChangeTrigger called, hScanMngr=0x%x, bLowQuality=.\n", hScanMngr);
-
-    /* remember the low quality trigger (in case policy changes, to know which timer interval to use) */
-    pScanMngr->bLowQuality = bLowQuality;
-
-    /* This function shouldn't be called when continuous scan is not running */
-    if ( TI_FALSE == pScanMngr->bContinuousScanStarted )
-    {
-        TRACE0( pScanMngr->hReport, REPORT_SEVERITY_WARNING, "Quality change trigger when continuous scan is not running.\n");
-    }
-
-    /* If the timer is running, stop it and start it again with the new interval */
-    if (pScanMngr->bTimerRunning)
-    {
-        TI_UINT32 uTimeout = pScanMngr->bLowQuality ?
-                             pScanMngr->scanPolicy.deterioratingScanInterval :
-                             pScanMngr->scanPolicy.normalScanInterval;
-
-        tmr_StopTimer (pScanMngr->hContinuousScanTimer);
-
-        tmr_StartTimer (pScanMngr->hContinuousScanTimer,
-                        scanMngr_GetUpdatedTsfDtimMibForScan,
-                        (TI_HANDLE)pScanMngr,
-                        uTimeout,
-                        TI_TRUE);
-    }
-}
-
-void scanMngr_handoverDone( TI_HANDLE hScanMngr, TMacAddr* macAddress, ERadioBand band )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int i, currentBSSNeighborIndex;
-
-    /* mark that TSF values are not synchronized */
-    pScanMngr->bSynchronized = TI_FALSE;
-
-    TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_handoverDone called\n");
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pScanMngr->currentBSSBand >= RADIO_BAND_NUM_OF_BANDS )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-               "scanMngr_handoverDone. pScanMngr->currentBSSBand=%d exceeds the limit %d\n",
-                   pScanMngr->currentBSSBand, RADIO_BAND_NUM_OF_BANDS-1);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    if ( pScanMngr->neighborAPsDiscoveryList[ pScanMngr->currentBSSBand ].numOfEntries > MAX_NUM_OF_NEIGHBOR_APS)
-    {
-        TRACE3( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-               "scanMngr_handoverDone. pScanMngr->neighborAPsDiscoveryList[ %d ].numOfEntries=%d exceeds the limit %d\n",
-               pScanMngr->currentBSSBand, pScanMngr->neighborAPsDiscoveryList[ pScanMngr->currentBSSBand ].numOfEntries,
-               MAX_NUM_OF_NEIGHBOR_APS);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    if ( band >= RADIO_BAND_NUM_OF_BANDS )
-    {
-        TRACE2( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-               "scanMngr_handoverDone. band=%d exceeds the limit %d\n",
-                   band, RADIO_BAND_NUM_OF_BANDS-1);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    if ( pScanMngr->neighborAPsDiscoveryList[ band ].numOfEntries > MAX_NUM_OF_NEIGHBOR_APS)
-    {
-        TRACE3( pScanMngr->hReport, REPORT_SEVERITY_ERROR,
-               "scanMngr_handoverDone. pScanMngr->neighborAPsDiscoveryList[ %d ].numOfEntries=%d exceeds the limit %d\n",
-               band, pScanMngr->neighborAPsDiscoveryList[ band ].numOfEntries, MAX_NUM_OF_NEIGHBOR_APS);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    /* if previous AP is in neighbor AP list, mark it as not discoverd */
-    currentBSSNeighborIndex = scanMngrGetNeighborAPIndex( hScanMngr,
-                                                          pScanMngr->currentBSSBand,
-                                                          &(pScanMngr->currentBSS));
-    if ( -1 != currentBSSNeighborIndex )
-    {
-        pScanMngr->neighborAPsDiscoveryList[ pScanMngr->currentBSSBand ].trackStatusList[ currentBSSNeighborIndex ] = 
-            SCAN_NDS_NOT_DISCOVERED;
-    }
-
-    /* copy new current AP info */
-    pScanMngr->currentBSSBand = band;
-    MAC_COPY (pScanMngr->currentBSS, *macAddress);
-
-    /* if new current AP is a neighbor AP, mark it */
-    currentBSSNeighborIndex = scanMngrGetNeighborAPIndex( hScanMngr, band, macAddress );
-    if ( -1 != currentBSSNeighborIndex )
-    {
-        pScanMngr->neighborAPsDiscoveryList[ band ].trackStatusList[ currentBSSNeighborIndex ] = 
-            SCAN_NDS_CURRENT_AP;
-        /* note - no need to update discovery index - when adding neighbor APs the check (whether discovery should
-           be attempted) is done for every channel! */
-    }
-
-    /* if a continuous scan is running, mark that it should stop */
-    if ( SCAN_CSS_IDLE != pScanMngr->contScanState )
-    {
-
-        TRACE0( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_handoverDone called, switched to STOPPING state \n");
-
-        pScanMngr->contScanState = SCAN_CSS_STOPPING;
-        scanCncn_StopScan( pScanMngr->hScanCncn, SCAN_SCC_ROAMING_CONT );
-    }
-
-    /* if the new AP is in the track list */
-    i = scanMngrGetTrackIndexByBssid( hScanMngr, macAddress );
-    if (( i != -1 ) && ( i < MAX_SIZE_OF_BSS_TRACK_LIST))
-    {
-        /* remove it */
-        scanMngrRemoveBSSListEntry( hScanMngr, i );
-    }
-}
-
-TI_STATUS scanMngr_getParam( TI_HANDLE hScanMngr, paramInfo_t *pParam )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    TRACE2( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_getParam called, hScanMngr=0x%x, pParam=0x%x\n", hScanMngr, pParam);
-
-    /* act according to parameter type */
-    switch ( pParam->paramType )
-    {
-    case SCAN_MNGR_BSS_LIST_GET:
-        os_memoryCopy(pScanMngr->hOS, pParam->content.pScanBssList, scanMngr_getBSSList( hScanMngr ), sizeof(bssList_t));
-        break;
-
-    default:
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_ERROR, "Scan manager getParam called with param type %d.\n", pParam->paramType);
-        return PARAM_NOT_SUPPORTED;
-/*        break; - unreachable */
-    }
-
-    return TI_OK;
-}
-
-
-
-
-
-
-TI_STATUS scanMngr_setParam( TI_HANDLE hScanMngr, paramInfo_t *pParam )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    TRACE3( pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_setParam called, hScanMngr=0x%x, pParam=0x%x, pParam->paramType=%d\n", hScanMngr, pParam, pParam->paramType);
-    
-    /* act according to parameter type */
-    switch ( pParam->paramType )
-    {
-    case SCAN_MNGR_SET_CONFIGURATION:
-        scanMngr_setScanPolicy( hScanMngr, pParam->content.pScanPolicy);
-        break;
-        
-    default:
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_ERROR, "Set param, Params is not supported:%d\n", pParam->paramType);
-        return PARAM_NOT_SUPPORTED;
-    }
-
-    return TI_OK;
-}
-
-
-/**
- * \fn     scanMngr_SetDefaults
- * \brief  Set default values to the Scan Manager
- *
- * \param  hScanMngr - handle to the SME object
- * \param  pInitParams - values read from registry / ini file
- * \return None
- */
-void scanMngr_SetDefaults (TI_HANDLE hScanMngr, TRoamScanMngrInitParams *pInitParams)
-{
-	scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TScanPolicy    defaultScanPolicy;
-    paramInfo_t    *pParam;
-    int i;
-
-    WLAN_OS_REPORT(("pInitParams->RoamingScanning_2_4G_enable %d \n",pInitParams->RoamingScanning_2_4G_enable ));
-
-    pParam = os_memoryAlloc(pScanMngr->hOS, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return;
-    }
-
-    if (pInitParams->RoamingScanning_2_4G_enable)
-    {
-        /* Configure default scan policy for 2.4G  */
-        defaultScanPolicy.normalScanInterval = 10000;
-        defaultScanPolicy.deterioratingScanInterval = 5000;
-        defaultScanPolicy.maxTrackFailures = 3;
-        defaultScanPolicy.BSSListSize = 4;
-        defaultScanPolicy.BSSNumberToStartDiscovery = 1;
-        defaultScanPolicy.numOfBands = 1;
-
-        defaultScanPolicy.bandScanPolicy[0].band = RADIO_BAND_2_4_GHZ;
-        defaultScanPolicy.bandScanPolicy[0].rxRSSIThreshold = -80;
-        defaultScanPolicy.bandScanPolicy[0].numOfChannlesForDiscovery = 3;
-        defaultScanPolicy.bandScanPolicy[0].numOfChannles = 14;
-
-        for ( i = 0; i < 14; i++ )
-        {
-            defaultScanPolicy.bandScanPolicy[0].channelList[ i ] = i + 1;
-        }
-
-        defaultScanPolicy.bandScanPolicy[0].trackingMethod.scanType = SCAN_TYPE_NO_SCAN;
-        defaultScanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-        defaultScanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0;
-        defaultScanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.maxChannelDwellTime = 0;
-        defaultScanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.minChannelDwellTime = 0;
-
-        defaultScanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.bitrate = (ERateMask)RATE_MASK_UNSPECIFIED; /* Let the FW select */
-        defaultScanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 0;
-        defaultScanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.txPowerDbm = 0;
-
-        defaultScanPolicy.bandScanPolicy[0].discoveryMethod.scanType = SCAN_TYPE_NO_SCAN;
-        defaultScanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-        defaultScanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0;
-        defaultScanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.maxChannelDwellTime = 0;
-        defaultScanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.minChannelDwellTime = 0;
-        defaultScanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.bitrate = (ERateMask)RATE_MASK_UNSPECIFIED; /* Let the FW select */
-        defaultScanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 0;
-        defaultScanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.txPowerDbm = 0;
-
-        defaultScanPolicy.bandScanPolicy[0].immediateScanMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE;
-        defaultScanPolicy.bandScanPolicy[0].immediateScanMethod.method.basicMethodParams.maxChannelDwellTime = 30000;
-        defaultScanPolicy.bandScanPolicy[0].immediateScanMethod.method.basicMethodParams.minChannelDwellTime = 15000;
-        defaultScanPolicy.bandScanPolicy[0].immediateScanMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-        defaultScanPolicy.bandScanPolicy[0].immediateScanMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0;
-        defaultScanPolicy.bandScanPolicy[0].immediateScanMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3;
-        defaultScanPolicy.bandScanPolicy[0].immediateScanMethod.method.basicMethodParams.probReqParams.bitrate = (ERateMask)4;//RATE_MASK_UNSPECIFIED; /* Let the FW select */
-        defaultScanPolicy.bandScanPolicy[0].immediateScanMethod.method.basicMethodParams.probReqParams.txPowerDbm = MAX_TX_POWER;
-
-        pParam->paramType = SCAN_MNGR_SET_CONFIGURATION;
-
-        /* scanMngr_setParam() copy the content and not the pointer */
-        pParam->content.pScanPolicy = &defaultScanPolicy;
-        pParam->paramLength = sizeof(TScanPolicy);
-
-        scanMngr_setParam (hScanMngr, pParam);
-    }
-
-    os_memoryFree(pScanMngr->hOS, pParam, sizeof(paramInfo_t));
-}
-/**
-*
-* scanMngr_startManual API
-*
-* Description:
-*
-* save the manual scan params later to be used upon the scan concentrator object
-* and change the conn status to connected  
-*
-* ARGS:
-*  hScanMngr - Scan manager handle \n
-*
-* RETURNS:
-*  void
-*/
-void scanMngr_startManual(TI_HANDLE hScanMngr)
-{
-	scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    pScanMngr->scanningOperationalMode = SCANNING_OPERATIONAL_MODE_MANUAL;
-    pScanMngr->connStatus = CONNECTION_STATUS_CONNECTED;
-
-    scanMngr_setManualScanDefaultParams(hScanMngr);
-    TRACE0(pScanMngr->hReport,REPORT_SEVERITY_INFORMATION, "scanMngr_startManual() called. \n");
-
-    /* get policies by band */
-    scanMngrGetPolicyByBand( hScanMngr, RADIO_BAND_2_4_GHZ ); /* TODO: check if neccessary!!!*/
-}
-
-/**
-*
-* scanMngr_stopManual API
-*
-* Description:
-*
-* set the connection status to NOT_CONNECTED
-*
-* ARGS:
-*  hScanMngr - Scan manager handle \n
-*  pTargetAp - the target AP to connect with info.
-*
-* RETURNS:
-*  void
-*/
-void scanMngr_stopManual(TI_HANDLE hScanMngr)
-{
-	scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    pScanMngr->connStatus = CONNECTION_STATUS_NOT_CONNECTED;
-}
-
-/**
-*
-* scanMngr_setManualScanChannelList API
-*
-* Description:
-*
-* save the channel list received form the application.
-*
-* ARGS:
-*  hScanMngr - Scan manager handle \n
-*  pTargetAp - the target AP to connect with info.
-*
-* RETURNS:
-*  TI_OK
-*/
-TI_STATUS scanMngr_setManualScanChannelList (TI_HANDLE  hScanMngr, channelList_t* pChannelList)
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    pScanMngr->manualScanParams.numOfChannels = pChannelList->numOfChannels;
-    os_memoryCopy(pScanMngr->hOS,
-                  (void*)&pScanMngr->manualScanParams.channelEntry[0],
-                  &pChannelList->channelEntry[0],
-                  pChannelList->numOfChannels * sizeof(TScanChannelEntry));
-
-    return TI_OK;
-}
-
-/**
-*
-* scanMngr_Start1ShotScan API
-*
-* Description:
-*
-* send the required scan params to the scan concentartor module
-* according to the scanning manual mode.
-*
-* ARGS:
-*  hScanMngr - scan manager handle \n
-*  eClient - the client that requests this scan command.
-*
-* RETURNS:
-*  EScanCncnResultStatus - the scan concentrator result
-*/
-EScanCncnResultStatus scanMngr_Start1ShotScan (TI_HANDLE hScanMngr, EScanCncnClient eClient)
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    TScanParams* pScanParams;
-    EScanCncnResultStatus status;
-
-    TRACE2(pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_Start1ShotScan started... .Operational mode: %d, ScanClient=%d. \n",
-                    pScanMngr->scanningOperationalMode, eClient);
-
-    if(SCANNING_OPERATIONAL_MODE_AUTO == pScanMngr->scanningOperationalMode)
-    {
-        pScanParams = &(pScanMngr->scanParams);
-    }
-    else
-    {
-        pScanParams = &(pScanMngr->manualScanParams);  /* the scan params that were previously saved in the scanMngr_startManual()*/
-    }
-
-    status = scanCncn_Start1ShotScan(pScanMngr->hScanCncn, eClient, pScanParams);
-    return status;
-}
-
-/**
-*
-* scanMngr_immediateScanComplete API
-*
-* Description:
-*
-* called upon the immediate scan complete (manual or auto),
-  and call the roaming manager to handle this callback.
-*
-* ARGS:
-*  hScanMngr - Scan manager handle \n
-*  scanCmpltStatus - the scan complete status
-*
-* RETURNS:
-*  EScanCncnResultStatus - the scan concentrator result
-*/
-TI_STATUS scanMngr_immediateScanComplete(TI_HANDLE hScanMngr, scan_mngrResultStatus_e scanCmpltStatus)
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    if(SCANNING_OPERATIONAL_MODE_AUTO == pScanMngr->scanningOperationalMode)
-    {
-        roamingMngr_immediateScanComplete(pScanMngr->hRoamingMngr, scanCmpltStatus);
-    }
-    else
-    {
-        scanMngr_reportImmediateScanResults(hScanMngr, SCAN_MRS_SCAN_COMPLETE_OK);
-        roamingMngr_immediateScanByAppComplete(pScanMngr->hRoamingMngr, scanCmpltStatus);
-    }
-    return TI_OK;
-}
-
-
-/**
-*
-* scanMngr_reportImmediateScanResults API
-*
-* Description:
-*
-* report the immediate scan results to the application
-*
-* ARGS:
-*  hScanMngr - Scan manager handle \n
-*  scanCmpltStatus - the scan complete status
-*
-* RETURNS:
-*  EScanCncnResultStatus - the scan concentrator result
-*/
-TI_STATUS scanMngr_reportImmediateScanResults(TI_HANDLE hScanMngr, scan_mngrResultStatus_e scanCmpltStatus)
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    bssList_t   *pListOfAPs;
-
-
-    if (scanCmpltStatus == SCAN_MRS_SCAN_COMPLETE_OK)
-    {
-        TRACE0(pScanMngr->hReport, REPORT_SEVERITY_INFORMATION ,"scanMngr_reportImmediateScanResults(): reporting scan results to App \n");
-        pListOfAPs  = scanMngr_getBSSList(hScanMngr);
-        EvHandlerSendEvent(pScanMngr->hEvHandler, IPC_EVENT_IMMEDIATE_SCAN_REPORT, (TI_UINT8*)pListOfAPs, sizeof(bssList_t));
-    }
-    else
-    {
-        TRACE1(pScanMngr->hReport, REPORT_SEVERITY_ERROR, "scanMngr_reportImmediateScanResults was not completed successfully. status: %d\n", scanCmpltStatus);
-        return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-
-/**
-*
-* scanMngr_startContinuousScanByApp API
-*
-* Description:
-*
-* start continuous scan by application
-*
-* ARGS:
-*  hScanMngr - Scan manager handle \n
-*  pChannelList - the channel list to scan
-*
-* RETURNS:
-*  TI_OK - if connected, if not returns TI_NOK
-*/
-TI_STATUS scanMngr_startContinuousScanByApp (TI_HANDLE hScanMngr, channelList_t* pChannelList)
-{
-    scanMngr_t* 	pScanMngr = (scanMngr_t*)hScanMngr;
-    bssEntry_t      *pCurBssEntry;
-
-    scanMngr_setManualScanDefaultParams(hScanMngr);
-
-    TRACE1(pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_startContinuousScanByApp().pScanMngr->connStatus =  %d \n", pScanMngr->connStatus);
-
-    if (CONN_STATUS_CONNECTED == pScanMngr->connStatus)
-    {
-        scanMngr_setManualScanChannelList(hScanMngr,pChannelList);
-        pCurBssEntry = apConn_getBSSParams(pScanMngr->hAPConnection);
-        scanMngr_startContScan(hScanMngr, &pCurBssEntry->BSSID, pCurBssEntry->band);
-    }
-    else
-    {
-        TRACE1( pScanMngr->hReport, REPORT_SEVERITY_ERROR, "scanMngr_startContinuousScanByApp failed. connection status %d\n", pScanMngr->connStatus);
-        return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-/**
-*
-* scanMngr_stopContinuousScanByApp API
-*
-* Description:
-*
-* stop the continuous scan already started by and reoprt to application
-*
-* ARGS:
-*  hScanMngr - Scan manager handle \n
-*
-* RETURNS:
-*  TI_OK - always
-*/
-TI_STATUS scanMngr_stopContinuousScanByApp (TI_HANDLE hScanMngr)
-{
-    scanMngr_t* 	pScanMngr = (scanMngr_t*)hScanMngr;
-
-    TRACE0(pScanMngr->hReport, REPORT_SEVERITY_INFORMATION, "scanMngr_stopContinuousScanByApp(). call scanMngr_stopContScan() \n");
-    scanMngr_stopContScan(hScanMngr);
-    scanMngr_reportContinuousScanResults(hScanMngr,SCAN_CRS_SCAN_COMPLETE_OK);
-    return TI_OK;
-}
-
-
-
-
-
-#ifdef TI_DBG
-/**
- * \\n
- * \date 26-May-2005\n
- * \brief Print scan manager statistics.\n
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngr_statsPrint( TI_HANDLE hScanMngr )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    WLAN_OS_REPORT(("-------------- Scan Manager Statistics ---------------\n"));
-    WLAN_OS_REPORT(("Discovery scans on G result histogram:\n"));
-    scanMngrStatsPrintScanResultHistogram( pScanMngr->stats.DiscoveryGByStatus );
-    WLAN_OS_REPORT(("\nDiscovery scans on A result histogram:\n"));
-    scanMngrStatsPrintScanResultHistogram( pScanMngr->stats.DiscoveryAByStatus );
-    WLAN_OS_REPORT(("\nTracking scans on G result histogram:\n"));
-    scanMngrStatsPrintScanResultHistogram( pScanMngr->stats.TrackingGByStatus );    
-    WLAN_OS_REPORT(("\nTracking scans on A result histogram:\n"));
-    scanMngrStatsPrintScanResultHistogram( pScanMngr->stats.TrackingAByStatus );    
-    WLAN_OS_REPORT(("\nImmediate scans on G result histogram:\n"));
-    scanMngrStatsPrintScanResultHistogram( pScanMngr->stats.ImmediateGByStatus );    
-    WLAN_OS_REPORT(("\nImmediate scans on A result histogram:\n"));
-    scanMngrStatsPrintScanResultHistogram( pScanMngr->stats.ImmediateAByStatus );
-    WLAN_OS_REPORT(("\nTrack fail count histogram:\n"));
-    scanMngrStatsPrintTrackFailHistogrsm( pScanMngr->stats.ConsecutiveTrackFailCountHistogram );
-    WLAN_OS_REPORT(("Frames received:%d, frames discarded low RSSI:%d, frames discarded other:%d\n",
-                    pScanMngr->stats.receivedFrames, pScanMngr->stats.discardedFramesLowRSSI, 
-                    pScanMngr->stats.discardedFramesOther));
-    WLAN_OS_REPORT(("\nSPS channels not attened histogram:\n"));
-    scanMngrStatsPrintSPSChannelsHistogram( pScanMngr->stats.SPSChannelsNotAttended );
-    WLAN_OS_REPORT(("\nSPS attempts changed due to DTIM collision:%d, APs removed due to DTIM overlap: %d\n",
-                    pScanMngr->stats.SPSSavedByDTIMCheck, pScanMngr->stats.APsRemovedDTIMOverlap));
-    WLAN_OS_REPORT(("APs removed due to invalid channel: %d\n", pScanMngr->stats.APsRemovedInvalidChannel));
-}
-
-/**
- * \\n
- * \date 26-May-2005\n
- * \brief Print scan result histogram statistics.\n
- *
- * Function Scope \e Private.\n
- * \param scanResultHistogram - Scan results histogram (by scan complete reason).\n
- */
-void scanMngrStatsPrintScanResultHistogram( TI_UINT32 scanResultHistogram[] )
-{
-    WLAN_OS_REPORT(("Complete TI_OK   failed    stopped    TSF error    FW reset   aborted\n"));
-    WLAN_OS_REPORT(("%-6d        %-5d     %-5d      %-5d        %-5d      %-5d\n",
-                    scanResultHistogram[ SCAN_CRS_SCAN_COMPLETE_OK ],
-                    scanResultHistogram[ SCAN_CRS_SCAN_FAILED ],
-                    scanResultHistogram[ SCAN_CRS_SCAN_STOPPED ],
-                    scanResultHistogram[ SCAN_CRS_TSF_ERROR ],
-                    scanResultHistogram[ SCAN_CRS_SCAN_ABORTED_FW_RESET ],
-                    scanResultHistogram[ SCAN_CRS_SCAN_ABORTED_HIGHER_PRIORITY ]));    
-}
-
-/**
- * \\n
- * \date 26-May-2005\n
- * \brief Print track fail count histogram statistics.\n
- *
- * Function Scope \e Private.\n
- * \param trackFailHistogram - tracking failure histogram (by tracking retry).\n
- */
-void scanMngrStatsPrintTrackFailHistogrsm( TI_UINT32 trackFailHistogram[] )
-{
-    WLAN_OS_REPORT(("Attempts: 0      1      2      3      4\n"));
-    WLAN_OS_REPORT(("          %-6d %-6d %-6d %-6d %-6d\n\n",
-                    trackFailHistogram[0], trackFailHistogram[1],trackFailHistogram[2],
-                    trackFailHistogram[3], trackFailHistogram[4]));
-    WLAN_OS_REPORT(("Attempts: 5      6      7      8      9 or more\n"));
-    WLAN_OS_REPORT(("          %-6d %-6d %-6d %-6d %-6d\n\n",
-                    trackFailHistogram[5], trackFailHistogram[6],trackFailHistogram[7],
-                    trackFailHistogram[8],trackFailHistogram[9]));
-}
-
-/**
- * \\n
- * \date 24-July-2005\n
- * \brief Print SPS attendant channel histogram statistics.\n
- *
- * Function Scope \e Private.\n
- * \param SPSChannelsNotAttendedHistogram - SPS channels attendant histogram.\n
- */
-void scanMngrStatsPrintSPSChannelsHistogram( TI_UINT32 SPSChannelsNotAttendedHistogram[] )
-{
-    WLAN_OS_REPORT(("Channel index: 0      1      2      3\n"));
-    WLAN_OS_REPORT(("               %-6d %-6d %-6d %-6d\n\n",
-                    SPSChannelsNotAttendedHistogram[ 0 ], SPSChannelsNotAttendedHistogram[ 1 ],
-                    SPSChannelsNotAttendedHistogram[ 2 ], SPSChannelsNotAttendedHistogram[ 3 ]));
-    WLAN_OS_REPORT(("Channel index: 4      5      6      7\n"));
-    WLAN_OS_REPORT(("               %-6d %-6d %-6d %-6d\n\n",
-                    SPSChannelsNotAttendedHistogram[ 4 ], SPSChannelsNotAttendedHistogram[ 5 ],
-                    SPSChannelsNotAttendedHistogram[ 6 ], SPSChannelsNotAttendedHistogram[ 7 ]));
-    WLAN_OS_REPORT(("Channel index: 8      9      10     11\n"));
-    WLAN_OS_REPORT(("               %-6d %-6d %-6d %-6d\n\n",
-                    SPSChannelsNotAttendedHistogram[ 8 ], SPSChannelsNotAttendedHistogram[ 9 ],
-                    SPSChannelsNotAttendedHistogram[ 10 ], SPSChannelsNotAttendedHistogram[ 11 ]));
-    WLAN_OS_REPORT(("Channel index: 12     13     14     15\n"));
-    WLAN_OS_REPORT(("               %-6d %-6d %-6d %-6d\n\n",
-                    SPSChannelsNotAttendedHistogram[ 12 ], SPSChannelsNotAttendedHistogram[ 13 ],
-                    SPSChannelsNotAttendedHistogram[ 14 ], SPSChannelsNotAttendedHistogram[ 15 ]));
-}
-
-/**
- * \\n
- * \date 26-May-2005\n
- * \brief Reset scan manager statistics.\n
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngr_statsReset( TI_HANDLE hScanMngr )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    os_memoryZero( pScanMngr->hOS, &(pScanMngr->stats), sizeof(scan_mngrStat_t));
-}
-
-/**
- * \\n
- * \date 25-July-2005\n
- * \brief Print Neighbor AP list.\n
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - Handle to the scan manager object.\n
- */
-void scanMngrDebugPrintNeighborAPList( TI_HANDLE hScanMngr )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-    int i,j;
-    
-    WLAN_OS_REPORT(("-------------- Scan Manager Neighbor APs List ---------------\n"));
-    for ( i = 0; i < RADIO_BAND_NUM_OF_BANDS; i++ )
-    {
-        WLAN_OS_REPORT(("Neighbor AP list for band:%d\n", i));
-        if ( 0 == pScanMngr->neighborAPsDiscoveryList[ i ].numOfEntries )
-        {
-            WLAN_OS_REPORT(("Neighbor AP list is empty.\n"));
-            continue; /* to next band */
-        }
-        WLAN_OS_REPORT(("%-17s %-4s %-7s %-30s\n", "BSSID", "Band", "Channel", "Discovery state"));
-        WLAN_OS_REPORT(("------------------------------------------------------\n"));
-        for ( j = 0; j < pScanMngr->neighborAPsDiscoveryList[ i ].numOfEntries; j++ )
-        {
-            scanMngrDebugPrintNeighborAP( &(pScanMngr->neighborAPsDiscoveryList[ i ].APListPtr[ j ]),
-                                          pScanMngr->neighborAPsDiscoveryList[ i ].trackStatusList[ j ] );
-        }
-    }
-}
-
-/**
- * \\n
- * \date 25-July-2005\n
- * \brief Print One neighbor AP entry.\n
- *
- * Function Scope \e Private.\n
- * \param pNeighborAp - pointer to the neighbor AP data.\n
- * \param discovery state - the discovery state of this neighbor AP.\n
- */
-void scanMngrDebugPrintNeighborAP( neighborAP_t* pNeighborAp, scan_neighborDiscoveryState_e discoveryState )
-{
-    WLAN_OS_REPORT(("%02x:%02x:%02x:%02x:%02x:%02x %-4d %-7d %-30s\n", 
-                    pNeighborAp->BSSID[ 0 ], pNeighborAp->BSSID[ 1 ], pNeighborAp->BSSID[ 2 ],
-                    pNeighborAp->BSSID[ 3 ], pNeighborAp->BSSID[ 4 ], pNeighborAp->BSSID[ 5 ],
-                    pNeighborAp->band, pNeighborAp->channel, neighborDiscovreyStateDesc[ discoveryState ]));
-}
-
-/**
- * \\n
- * \date 27-July-2005\n
- * \brief Prints a scan command.\n
- *
- * Function Scope \e Private.\n
- * \param pScanParams - a pointer to the scan parameters structure.\n
- */
-void scanMngrDebugPrintScanCommand( TScanParams* pScanParams )
-{
-    int i;
-
-    if ( 0 == pScanParams->numOfChannels )
-    {
-        WLAN_OS_REPORT(("Invalid scan command.\n"));
-        return;
-    }
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pScanParams->numOfChannels > SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND)
-    {
-        WLAN_OS_REPORT(("scanMngrDebugPrintScanCommand. pScanParams->numOfChannels=%d exceeds the limit %d\n",
-                pScanParams->numOfChannels, SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND));
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    WLAN_OS_REPORT(("Scan type: %s, band: %d\n", scanTypeDesc[ pScanParams->scanType ], pScanParams->band));
-    
-    switch (pScanParams->scanType)
-    {
-    case SCAN_TYPE_NORMAL_ACTIVE:
-        WLAN_OS_REPORT(("Probe request number:%d, rate:%x, TX level:%d\n",
-                        pScanParams->probeReqNumber, pScanParams->probeRequestRate));
-        /* break is missing on purpose!!! */
-
-    case SCAN_TYPE_NORMAL_PASSIVE:
-        WLAN_OS_REPORT(("SSID: %s\n", pScanParams->desiredSsid));
-        WLAN_OS_REPORT(("%-4s %-17s %-17s %-20s %-8s %-14s %-14s\n", "Chnl", "BSSID", "Early ter. event", 
-                        "Early ter. frame num", "TX level", "Max dwell time", "Min dwell time"));
-        WLAN_OS_REPORT(("------------------------------------------------------------------------------------------------------\n"));
-        for ( i = 0; i < pScanParams->numOfChannels; i++ )
-        {
-            scanMngrDebugPrintNormalChannelParam( &(pScanParams->channelEntry[ i ].normalChannelEntry));
-        }
-        break;
-
-    case SCAN_TYPE_TRIGGERED_ACTIVE:
-        WLAN_OS_REPORT(("Probe request number:%d, rate:%x, TX level:%d\n",
-                        pScanParams->probeReqNumber, pScanParams->probeRequestRate ));
-        /* break is missing on purpose!!! */
-
-    case SCAN_TYPE_TRIGGERED_PASSIVE:
-        WLAN_OS_REPORT(("SSID: %s, Tid: %d\n", pScanParams->desiredSsid, pScanParams->Tid));
-        WLAN_OS_REPORT(("%-4s %-17s %-17s %-20s %-8s %-14s %-14s\n", "Chnl", "BSSID", "Early ter. event", 
-                        "Early ter. frame num", "TX level", "Max dwell time", " Min dwell time"));
-        WLAN_OS_REPORT(("------------------------------------------------------------------------------------------------------\n"));
-        for ( i = 0; i < pScanParams->numOfChannels; i++ )
-        {
-            scanMngrDebugPrintNormalChannelParam( &(pScanParams->channelEntry[ i ].normalChannelEntry));
-        }
-        break;
-
-    case SCAN_TYPE_SPS:
-        WLAN_OS_REPORT(("Total scan duration (for scan timer): %d, latest TSF value: %x-%x\n", 
-                        pScanParams->SPSScanDuration, 
-                        INT64_HIGHER(pScanParams->latestTSFValue), INT64_LOWER(pScanParams->latestTSFValue)));
-        WLAN_OS_REPORT(("%-4s %-17s %-17s %-7s %-16s %-20s\n", "Chnl", "BSSID", "Start time (TSF)", "Duration",
-                        "Early ter. event", "Early ter. frame num"));
-        WLAN_OS_REPORT(("---------------------------------------------------------------------------------------\n"));
-        for ( i = 0; i < pScanParams->numOfChannels; i++ )
-        {
-            scanMngrDebugPrintSPSChannelParam( &(pScanParams->channelEntry[ i ].SPSChannelEntry));
-        }
-        break;
-
-    case SCAN_TYPE_NO_SCAN:
-    default:
-        WLAN_OS_REPORT(("Invalid scan type: %d\n", pScanParams->scanType));
-        break;
-    }
-    
-}
-
-/**
- * \\n
- * \date 27-July-2005\n
- * \brief Prints scan command single normal channel.\n
- *
- * Function Scope \e Private.\n
- * \param pNormalChannel - a pointer to the normal channel to print.\n
- */
-void scanMngrDebugPrintNormalChannelParam( TScanNormalChannelEntry* pNormalChannel )
-{
-    WLAN_OS_REPORT(("%-4d %02x:%02x:%02x:%02x:%02x:%02x %-17s %-20d %-8d %-14d %-14d\n", pNormalChannel->channel, 
-                    pNormalChannel->bssId[ 0 ], pNormalChannel->bssId[ 1 ], pNormalChannel->bssId[ 2 ],
-                    pNormalChannel->bssId[ 3 ], pNormalChannel->bssId[ 4 ], pNormalChannel->bssId[ 5 ],
-                    earlyTerminationDesc[ pNormalChannel->earlyTerminationEvent >> 8 ],
-                    pNormalChannel->ETMaxNumOfAPframes, pNormalChannel->txPowerDbm,
-                    pNormalChannel->minChannelDwellTime, pNormalChannel->maxChannelDwellTime));
-}
-
-/**
- * \\n
- * \date 27-July-2005\n
- * \brief Prints scan command single SPS channel.\n
- *
- * Function Scope \e Private.\n
- * \param pSPSChannel - a pointer to the SPS channel to print.\n
- */
-void scanMngrDebugPrintSPSChannelParam( TScanSpsChannelEntry* pSPSChannel )
-{
-    WLAN_OS_REPORT(("%-4d %02x:%02x:%02x:%02x:%02x:%02x %8x-%8x %-7d %-16s %-3d\n", 
-                    pSPSChannel->channel, pSPSChannel->bssId[ 0 ], pSPSChannel->bssId[ 1 ], 
-                    pSPSChannel->bssId[ 2 ], pSPSChannel->bssId[ 3 ], pSPSChannel->bssId[ 4 ],
-                    pSPSChannel->bssId[ 5 ], INT64_HIGHER(pSPSChannel->scanStartTime), 
-                    INT64_LOWER(pSPSChannel->scanStartTime), pSPSChannel->scanDuration, 
-                    earlyTerminationDesc[ pSPSChannel->earlyTerminationEvent >> 8 ], pSPSChannel->ETMaxNumOfAPframes));
-}
-
-/**
- * \\n
- * \date 25-July-2005\n
- * \brief Prints all data in the scan manager object.\n
- *
- * Function Scope \e Public.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrDebugPrintObject( TI_HANDLE hScanMngr )
-{
-    scanMngr_t* pScanMngr = (scanMngr_t*)hScanMngr;
-
-    WLAN_OS_REPORT(("-------------- Scan Manager Object Dump ---------------\n"));
-    WLAN_OS_REPORT(("Continuous scan timer running: %s, Continuous scan started:%s\n",
-                    booleanDesc[ pScanMngr->bTimerRunning ], booleanDesc[ pScanMngr->bContinuousScanStarted ]));
-    WLAN_OS_REPORT(("Current BSS in low quality: %s, AP TSF synchronized: %s\n",
-                    booleanDesc[ pScanMngr->bLowQuality ], booleanDesc[ pScanMngr->bSynchronized ]));
-    WLAN_OS_REPORT(("Continuous scan state: %s, Immediate scan state: %s\n",
-                    contScanStatesDesc[ pScanMngr->contScanState ], immedScanStatesDesc[ pScanMngr->immedScanState ]));
-    WLAN_OS_REPORT(("Discovery part: %s, G channels discovery Index: %d, A channels discovery index: %d\n",
-                    discoveryPartDesc[ pScanMngr->currentDiscoveryPart ], 
-                    pScanMngr->channelDiscoveryIndex[ RADIO_BAND_2_4_GHZ ],
-                    pScanMngr->channelDiscoveryIndex[ RADIO_BAND_5_0_GHZ ]));
-    WLAN_OS_REPORT(("G neighbor APs discovery index: %d, A neighbor APs discovery index: %d\n",
-                    pScanMngr->neighborAPsDiscoveryIndex[ RADIO_BAND_2_4_GHZ ],
-                    pScanMngr->neighborAPsDiscoveryIndex[ RADIO_BAND_5_0_GHZ ]));
-    WLAN_OS_REPORT(("Current BSS MAC: %02x:%02x:%02x:%02x:%02x:%02x, Current BSS band: %d\n",
-                    pScanMngr->currentBSS[ 0 ], pScanMngr->currentBSS[ 1 ], pScanMngr->currentBSS[ 2 ],
-                    pScanMngr->currentBSS[ 3 ], pScanMngr->currentBSS[ 4 ], pScanMngr->currentBSS[ 5 ],
-                    pScanMngr->currentBSSBand));
-    WLAN_OS_REPORT(("Last beacon DTIM count:%d, TSF:%x-%x\n",
-                    pScanMngr->lastLocalBcnDTIMCount, 
-                    INT64_HIGHER(pScanMngr->currentTSF), INT64_LOWER(pScanMngr->currentTSF)));
-    WLAN_OS_REPORT(("-------------- Scan Manager Policy ---------------\n"));
-    scanMngrTracePrintScanPolicy( &(pScanMngr->scanPolicy));
-    WLAN_OS_REPORT(("-------------- Scan Manager BSS List ---------------\n"));
-    scanMngrDebugPrintBSSList( hScanMngr );
-    scanMngrDebugPrintNeighborAPList( hScanMngr );
-    scanMngr_statsPrint( hScanMngr );
-    WLAN_OS_REPORT(("New BSS found during last discovery:%s, Number of scan cycles during which no new AP was found: %d\n",
-                    booleanDesc[ pScanMngr->bNewBSSFound ], pScanMngr->consecNotFound));
-    WLAN_OS_REPORT(("Scan for neighbor APs only at last immediate scan: %s\n", 
-                    booleanDesc[ pScanMngr->bImmedNeighborAPsOnly ]));
-    WLAN_OS_REPORT(("-------------- Last issued scan command ---------------\n"));
-    scanMngrDebugPrintScanCommand( &(pScanMngr->scanParams));
-    WLAN_OS_REPORT(("-------------- Handles ---------------\n"));
-    WLAN_OS_REPORT(("Continuous scan timer: %x, OS:% x, Reg. domain: %x\n",
-                    pScanMngr->hContinuousScanTimer, pScanMngr->hOS, pScanMngr->hRegulatoryDomain));
-    WLAN_OS_REPORT(("Report: %x, Roaming manager: %x, Scan concentrator: %x\n",
-                    pScanMngr->hReport, pScanMngr->hRoamingMngr, pScanMngr->hScanCncn));
-}
-
-#endif /* TI_DBG */
diff --git a/wl1271/stad/src/Application/scanMngr.h b/wl1271/stad/src/Application/scanMngr.h
deleted file mode 100644
index ca08c04..0000000
--- a/wl1271/stad/src/Application/scanMngr.h
+++ /dev/null
@@ -1,909 +0,0 @@
-/*
- * scanMngr.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  scanMngr.h
- *  \brief This file include private definitions for the scan manager module.
- *
- *  \see   scanMngr.c, scanMngrApi.h, scanMngrTypes.h
- */
-
-
-#ifndef __SCAN_MNGR_H__
-#define __SCAN_MNGR_H__
-
-#include "scanMngrApi.h"
-
-/*
- ***********************************************************************
- *  Constant definitions.
- ***********************************************************************
- */
-
-/* SPS guard times */
-#ifdef TI_DBG
-#define SCAN_SPS_GUARD_FROM_CURRENT_TSF         300000 /* 300 msecs - to allow for some debug printouts */
-#else
-#define SCAN_SPS_GUARD_FROM_CURRENT_TSF         50000 /* 50 msecs */
-#endif /* TI_DBG */
-#define SCAN_SPS_GUARD_FROM_LAST_BSS            2000 /* 2 msecs */
-#define SCAN_SPS_DURATION_PART_IN_ADVANCE       4 /* 1/4 of scan duration in advance */
-#define SCAN_SPS_USE_DRIFT_COMPENSATION         1 /* if defined, use drift compensation algorithm */
-#define SCAN_SPS_NUM_OF_TSF_DELTA_ENTRIES       4 /* number of TSF delta ^ 2 entries */
-#define SCAN_SPS_FW_DTIM_LENGTH                 1000 /* time (in usec) for a DTIM event to complete in the FW */
-
-/* Quality calculation constants */
-#define RSSI_PREVIOUS_COEFFICIENT               9
-
-/* scan iteration number after which, if no new AP was found, pre-auth needs to be re-done */
-#define SCAN_MNGR_CONSEC_SCAN_ITER_FOR_PRE_AUTH 50
-
-#define MAX_DESC_LENGTH                         50 /* max characters for a description string */
-#define SCAN_MNGR_STAT_MAX_TRACK_FAILURE        10 /* max track filures for statistics histogram */
-
-#ifdef TI_DBG
-/*#define SCAN_MNGR_DBG 1
-#define SCAN_MNGR_SPS_DBG 1
-#define SCAN_MNGR_DTIM_DBG 1 */
-#endif
-
- /*
- ***********************************************************************
- *  Enums.
- ***********************************************************************
- */
-
- /** \enum scan_immedScanState_e 
- * \brief enumerates immediate scan internal status
- */
-typedef enum
-{
-    SCAN_ISS_IDLE = 0,                  /**< immediate scan is not running */
-    SCAN_ISS_G_BAND,                    /**< immediate scan is running on G band */
-    SCAN_ISS_A_BAND,                    /**< immediate scan is running on A band */
-    SCAN_ISS_STOPPING,                  /**< stop was requested and is now pending */
-    SCAN_ISS_NUM_OF_STATES              /**< number of available immediate scan states states */
-} scan_immedScanState_e;
-
-/** \enum scan_contScanState_e 
- * \brief enumerates continuous scan internal status
- */
-typedef enum
-{
-    SCAN_CSS_IDLE = 0,                  /**< continuous scan is not running */
-    SCAN_CSS_TRACKING_G_BAND,           /**< continuous scan is performing tracking scan on G */
-    SCAN_CSS_TRACKING_A_BAND,           /**< continuous scan is performing tracking scan on A */
-    SCAN_CSS_DISCOVERING,               /**< continuous scan is performing discovery scan */
-    SCAN_CSS_STOPPING,                  /**< continuous scan is waiting for scan complete notification */
-    SCAN_CSS_NUM_OF_STATES              /**< number of available continuous scan states */
-} scan_contScanState_e;
-
-/** \enum scan_discoveryPart_e 
- * \brief enumerates the different parts in the discovery process
- */
-typedef enum
-{
-    SCAN_SDP_NEIGHBOR_G = 0,            /**< attempting to discover neighbor APs in G band */
-    SCAN_SDP_NEIGHBOR_A,                /**< attempting to discover neighbor APs in A band */
-    SCAN_SDP_CHANNEL_LIST_G,            /**< attempting to discover all APs in G band */
-    SCAN_SDP_CHANNEL_LIST_A,            /**< attempting to discover all APs in A band */
-    SCAN_SDP_NO_DISCOVERY,              /**< no discovery should be attempted */
-    SCAN_SDP_NUMBER_OF_DISCOVERY_PARTS  /**< number of discovery parts available */
-} scan_discoveryPart_e;
-
-/** \enum scan_neighborDiscoveryState_e
- * \brief enumerates the different discovery states possible for a neighbor AP
- */
-typedef enum
-{
-    SCAN_NDS_DISCOVERED = 0,            /**< Neighbor AP was discovered and is now being tracked */
-    SCAN_NDS_NOT_DISCOVERED,            /**< Neighbor AP was not yet discovered, and should be */
-    SCAN_NDS_CURRENT_AP,                /**< 
-                                         * Neighbor AP is the AP STA is currently connected to, 
-                                         * and shouldn't be discovered
-                                         */
-    SCAN_NDS_NUMBER_OF_NEIGHBOR_DISCOVERY_STATES
-                                        /**< number of available neighbor disocvery states */
-} scan_neighborDiscoveryState_e;
-
-/*
- ***********************************************************************
- *  Typedefs.
- ***********************************************************************
- */
-
-#define WAS_SPS_CHANNEL_ATTENDED( SPSStatus, i )    \
-    (0 != (SPSStatus & (1<<i)) ? TI_TRUE : TI_FALSE)
-
-/*
- ***********************************************************************
- *  Structure definitions.
- ***********************************************************************
- */
-
-/** \struct scan_neighborAPListDiscovery_t
- * \brief This structure contains Neighbor AP list and their detection status
- */
-typedef struct
-{
-    TI_UINT8                            numOfEntries;                                   /**< number of entries in the list */
-    neighborAP_t                    APListPtr[ MAX_NUM_OF_NEIGHBOR_APS ];           /**< neighbor APs list */
-    scan_neighborDiscoveryState_e   trackStatusList[ MAX_NUM_OF_NEIGHBOR_APS ];     /**< tracking status list */
-} scan_neighborAPListDiscovery_t;
-
-/** \struct scan_BSSEntry
- * \brief This structure contains information relevant only for scan manager module on a BSS
- */
-typedef struct
-{
-    TI_UINT8                    trackFailCount;                 /**< number of consecutive failed track attempts */
-    TI_UINT64                   localTSF;                       /**<
-                                                             * the TSF of the AP the station is connected to at the
-                                                             * reception of the last frame from this AP
-                                                             */
-#ifdef SCAN_SPS_USE_DRIFT_COMPENSATION
-    TI_INT64               prevTSFDelta;                                               /**< Previous TSF delta */
-    TI_INT32               deltaChangeArray[ SCAN_SPS_NUM_OF_TSF_DELTA_ENTRIES ];      /**< 
-                                                                                     * Array holding deltas 
-                                                                                     * between prev. TSF delta
-                                                                                     */
-    int                 deltaChangeArrayIndex;                                      /**< 
-                                                                                     * index to where next entry
-                                                                                     * in the delta array should
-                                                                                     * be stored
-                                                                                     */
-#endif
-} scan_BSSEntry_t;
-
-/** \struct scan_BSSList
- * \brief This structure contains the BSS tracking list.
- */
-typedef struct
-{
-    TI_UINT8               numOfEntries;                                               /**< Number of entries in the list */
-    bssEntry_t          BSSList[ MAX_SIZE_OF_BSS_TRACK_LIST ];                      /**< BSS public information */
-    scan_BSSEntry_t     scanBSSList[ MAX_SIZE_OF_BSS_TRACK_LIST ];                  /**< 
-                                                                                     * BSS scan manager private 
-                                                                                     * information
-                                                                                     */
-} scan_BSSList_t;
-
-/** \struct scan_SPSHelper_t
- * \brief This structure contains information used for building SPS scan command
- */
-typedef struct
-{
-    TI_UINT64                          nextEventTSF;                                   /**< 
-                                                                                     * local TSF value of AP next frame 
-                                                                                     * transmission
-                                                                                     */
-    int                             trackListIndex;                                 /**< index to BSS info in the track list */
-    int                             nextAPIndex;                                    /**< index of next AP entry */
-} scan_SPSHelper_t;
-
-#ifdef TI_DBG
-/** \struct scan_mngrStat_t
- * \brief holds all scan manager statistics
- */
-typedef struct
-{
-    TI_UINT32      receivedFrames;                                     /**< Number of scan results received */
-    TI_UINT32      discardedFramesLowRSSI;                             /**< 
-                                                                     * Number of frames discarded due 
-                                                                     * to RSSI lower than threshold
-                                                                     */
-    TI_UINT32      discardedFramesOther;                               /**< 
-                                                                     * Number of frames discarded due to 
-                                                                     * other reasons (invalid band, 
-                                                                     * list full)
-                                                                     */
-    TI_UINT32      SPSSavedByDTIMCheck;                                /**<
-                                                                     * Number of SPS scans that were moved
-                                                                     * due to the DTIM collision detection mechanism
-                                                                     */
-    TI_UINT32      APsRemovedDTIMOverlap;                              /**< 
-                                                                     * Number of times APs were removed from
-                                                                     * tracking list because all their beacons
-                                                                     * collide with current AP DTIMs
-                                                                     */
-    TI_UINT32      APsRemovedInvalidChannel;                           /**<
-                                                                     * Number of times APs were removed from
-                                                                     * tracking list because their channel was
-                                                                     * not valid for tracking scan type
-                                                                     */
-    TI_UINT32      TrackingGByStatus[ SCAN_CRS_NUM_OF_RES_STATUS ];    /**< 
-                                                                     * Number of track scans on G,
-                                                                     * according to completion status
-                                                                     */
-    TI_UINT32      TrackingAByStatus[ SCAN_CRS_NUM_OF_RES_STATUS ];    /**< 
-                                                                     * Number of track scans on A,
-                                                                     * according to completion status
-                                                                     */
-    TI_UINT32      DiscoveryGByStatus[ SCAN_CRS_NUM_OF_RES_STATUS ];   /**< 
-                                                                     * Number of discovery scans on G,
-                                                                     * according to completion status
-                                                                     */
-    TI_UINT32      DiscoveryAByStatus[ SCAN_CRS_NUM_OF_RES_STATUS ];   /**< 
-                                                                     * Number of discovery scans on A,
-                                                                     * according to completion status
-                                                                     */
-    TI_UINT32      ImmediateGByStatus[ SCAN_CRS_NUM_OF_RES_STATUS ];   /**< 
-                                                                     * Number of immediate scans on G,
-                                                                     * according to completion status
-                                                                     */
-    TI_UINT32      ImmediateAByStatus[ SCAN_CRS_NUM_OF_RES_STATUS ];   /**< 
-                                                                     * Number of immediate scans on A,
-                                                                     * according to completion status
-                                                                     */
-    TI_UINT32      ConsecutiveTrackFailCountHistogram[ SCAN_MNGR_STAT_MAX_TRACK_FAILURE ];
-                                                                    /**< 
-                                                                     * Number of consecutive track
-                                                                     * fail counts */
-    TI_UINT32      SPSChannelsNotAttended[ SCAN_MAX_NUM_OF_SPS_CHANNELS_PER_COMMAND ];
-                                                                    /**<
-                                                                     * Number of times SPS channels were
-                                                                     * not scanned by FW, according to
-                                                                     * their location in the scan command
-                                                                     */
-} scan_mngrStat_t;
-#endif
-
-/** \struct scanMngr_t
- * \brief This structure contains the scan manager object data
- */
-typedef struct
-{
-    TTsfDtim                        currTsfDtimMib;
-    /* handles to other modules */
-    TI_HANDLE                       hOS;                                            /**< handle to the OS object */
-    TI_HANDLE                       hReport;                                        /**< handle to the report object */
-    TI_HANDLE                       hRegulatoryDomain;                              /**< 
-                                                                                     * handle to the regulatory domain
-                                                                                     * object
-                                                                                     */
-    TI_HANDLE                       hScanCncn;                                      /**< 
-                                                                                     * handle to the scan concentrator
-                                                                                     * object
-                                                                                     */
-    TI_HANDLE                       hRoamingMngr;                                   /**< 
-                                                                                     * handle to the roaming manager 
-                                                                                     * object
-                                                                                     */
-    TI_HANDLE                       hSiteMngr;                                      /**< 
-                                                                                     * handle to the site manager object*/
-    TI_HANDLE                       hTWD; 
-
-    TI_HANDLE                       hTimer;                                         /* handle to the timer module */
-
-    TI_HANDLE                       hEvHandler;                                     /* handle to the eventHandler module */
-    TI_HANDLE                       hAPConnection;                                  /* handle to the AP connection module */
-    /* start / stop flag */
-    TI_BOOL                         bContinuousScanStarted;                         /**<
-                                                                                     * Indicates whether continuous scan
-                                                                                     * was started
-                                                                                     */
-    /* Timer */
-    TI_HANDLE                       hContinuousScanTimer;                           /**< continuous scan timer object */
-    TI_BOOL                         bTimerRunning;                                  /**< 
-                                                                                     * indicates whether the timer was 
-                                                                                     * started
-                                                                                     */
-
-    /* scan policy */
-    TScanPolicy                     scanPolicy;                                     /**< scan policy */
-    TI_BOOL                         bLowQuality;                                    /**<
-                                                                                     * Indicates whether to use the low
-                                                                                     * quality time or normal quality
-                                                                                     * timer for continuous scan.
-                                                                                     */
-
-    /* tracking and discovery information */
-    scan_contScanState_e            contScanState;                                  /**< current continuous scan state */
-    scan_immedScanState_e           immedScanState;                                 /**< current immediate scan state */
-    TI_BOOL                         bImmedNeighborAPsOnly;                          /**< 
-                                                                                     * whether immediate scan is to search
-                                                                                     * for neighbor AP's only
-                                                                                     */
-    scan_neighborAPListDiscovery_t  neighborAPsDiscoveryList[ RADIO_BAND_NUM_OF_BANDS ];
-                                                                                    /**< 
-                                                                                     * List of neighbor APs and their
-                                                                                     * discovery status
-                                                                                     */
-    TI_UINT8                        neighborAPsDiscoveryIndex[ RADIO_BAND_NUM_OF_BANDS ];
-                                                                                    /**< 
-                                                                                     * Indexes for the neighbor APs
-                                                                                     * discovery lists
-                                                                                     */
-    TI_UINT8                        channelDiscoveryIndex[ RADIO_BAND_NUM_OF_BANDS ];  /**< Indexes for the channels lists */
-    scan_discoveryPart_e            currentDiscoveryPart;                           /**< current discovery part */
-    TI_BOOL                         bSynchronized;                                  /**< 
-                                                                                     * TI_TRUE if SPS data is synchronized
-                                                                                     * (no TSF error event occurred)
-                                                                                     */
-    TI_UINT64                       currentTSF;                                     /**< 
-                                                                                     * the local current TSF value 
-                                                                                     */
-    TI_UINT32                       currentHostTimeStamp;                           /**<
-                                                                                     * The current local host time stamp
-                                                                                     * (at the time of the above TSF value)
-                                                                                     */
-    TI_UINT8                        lastLocalBcnDTIMCount;                          /**<
-                                                                                     * the DTIM count at the last 
-                                                                                     * local beacon reception in the FW
-                                                                                     */
-    TI_UINT64                       lastLocalBcnTSF;                                /**<
-                                                                                     * The local TSF value at the last 
-                                                                                     * local beacon reception
-                                                                                     */ 
-    TMacAddr                        currentBSS;                                     /**< MAC address of current BSS */
-    ERadioBand                      currentBSSBand;                                 /**< band of current BSS */
-    TI_UINT32                       currentBSSBeaconInterval;                       /**< Beacon interval of current BSS */
-    TI_UINT32                       currentBSSDtimPeriod;                           /**< DTIM period of current BSS */
-    TI_BOOL                         bNewBSSFound;                                   /**< 
-                                                                                     * Indicates whether a new BSS was
-                                                                                     * found during the last discovery
-                                                                                     * stage
-                                                                                     */
-    TI_UINT16                       consecNotFound;                                 /**<
-                                                                                     * consecutive number of scan 
-                                                                                     * cycles in which no new AP was found
-                                                                                     * (used to re-pre-auth current APs)
-                                                                                     */
-    TScanParams                     scanParams;                                     /**< temporary storage for scan command */
-    scan_BSSList_t                  BSSList;                                        /**< BSS list (also used for tracking) */
-
-    scanMngr_connStatus_e           connStatus;                                /* save the connection status during manual roaming */
-	TI_UINT8                        scanningOperationalMode;                   /* 0 - manual ,  1 - auto */
-    TScanParams                     manualScanParams;                          /* temporary storage for manual scan command */
-
-
-
-#ifdef TI_DBG
-    scan_mngrStat_t                 stats;                                          /**< statistics */
-    ERadioBand                      statsLastDiscoveryBand;                         /**< 
-                                                                                     * For statistics: the band on which
-                                                                                     * discovery was last performed.
-                                                                                     */
-#endif
-
-} scanMngr_t;
-
-/*
- ***********************************************************************
- *  External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  External functions definitions
- ***********************************************************************
- */
-
-/**
- * \\n
- * \date 01-Mar-2005\n
- * \brief Frees scan manager resources.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrFreeMem (TI_HANDLE hScanMngr);
-
-/**
- * \\n
- * \date 01-Mar-2005\n
- * \brief Starts a continuous scan operation.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrPerformContinuousScan( TI_HANDLE hScanMngr );
-
-void scanMngrGetCurrentTsfDtimMibCB(TI_HANDLE hScanMngr, TI_STATUS status, TI_UINT8* CB_buf) ;
-void scanMngr_GetUpdatedTsfDtimMibForScan (TI_HANDLE hScanMngr, TI_BOOL bTwdInitOccured) ;
-
-/**
- * \\n
- * \date 01-Mar-2005\n
- * \brief Perform aging on the BSS list.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrPerformAging( TI_HANDLE hScanMngr );
-
-/**
- * \\n
- * \date 01-Mar-2005\n
- * \brief Updates object data according to a received frame.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param frameInfo - all frame related information.\n
- */
-void scanMngrUpdateReceivedFrame( TI_HANDLE hScanMngr, TScanFrameInfo* frameInfo );
-
-/**
- * \\n
- * \date 17-Mar-2005\n
- * \brief Cerate a new tracking entry and store the newly discovered AP info in it.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param frameInfo - a pointer to the information received from this AP.\n
- */
-void scanMngrInsertNewBSSToTrackingList( TI_HANDLE hScanMngr, TScanFrameInfo* frameInfo );
-
-/**
- * \\n
- * \date 17-Mar-2005\n
- * \brief Updates tracked AP information.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param BSSListIndex - index to the BSS list where the AP information is stored.\n
- * \param frameInfo - a pointer to the information received from this AP.\n
- */
-void scanMngrUpdateBSSInfo( TI_HANDLE hScanMngr, TI_UINT8 BSSListIndex, TScanFrameInfo* frameInfo );
-
-/**
- * \\n
- * \date 16-Mar-2005\n
- * \brief Searched tracking list for an entry matching given BSSID.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bssId - the BSSID to search for.\n
- * \return entry index if found, -1 if no entry matching the BSSID was found.\n
- */
-TI_INT8 scanMngrGetTrackIndexByBssid( TI_HANDLE hScanMngr, TMacAddr* bssId );
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Search current policy for band policy
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param band - the band to find policy for.\n
- * \return the policy structure if found, NULL if no policy configured for this band.\n
- */
-TScanBandPolicy* scanMngrGetPolicyByBand( TI_HANDLE hScanMngr, ERadioBand band );
-
-/**
- * \\n
- * \date 06-Mar-2005\n
- * \brief Sets the next discovery part according to current discovery part, policies and neighbor APs availability .\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrSetNextDiscoveryPart( TI_HANDLE hScanMngr );
-
-/**
- * \\n
- * \date 06-Mar-2005\n
- * \brief Checks whether discovery should be performed on the specified discovery part.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param discoveryPart - the discovery part to check.\n
- */
-TI_BOOL scanMngrIsDiscoveryValid( TI_HANDLE hScanMngr, scan_discoveryPart_e discoveryPart );
-
-/**
- * \\n
- * \date 07-Mar-2005\n
- * \brief Check whether there are neighbor APs to track on the given band.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bandPolicy - The scan policy for the requested band.\n
- * \param bNeighborAPsOnly - whether to scan for neighbor APs only or for all policy defined channels.\n
- */
-TI_BOOL scanMngrNeighborAPsAvailableForDiscovery( TI_HANDLE hScanMngr, ERadioBand band );
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Builds a scan command on the object workspace for immediate scan.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bandPolicy - The scan policy for the requested band.\n
- * \param bNeighborAPsOnly - whether to scan for neighbor APs only or for all policy defined channels.\n
- */
-void scanMngrBuildImmediateScanCommand( TI_HANDLE hScanMngr, TScanBandPolicy* bandPolicy, TI_BOOL bNeighborAPsOnly );
-
-/**
- * \\n
- * \date 03-Mar-2005\n
- * \brief Builds a scan command on the object workspace for tracking.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bandPolicy - The scan policy for the band to track on.\n
- * \param band - the band to scan.\n
- */
-void scanMngrBuildTrackScanCommand( TI_HANDLE hScanMngr, TScanBandPolicy* bandPolicy, ERadioBand band );
-
-/**
- * \\n
- * \date 03-Mar-2005\n
- * \brief Builds a scan command on the object workspace for discovery.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrBuildDiscoveryScanCommand( TI_HANDLE hScanMngr );
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Builds the scan command header on the object workspace.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param scanMethod - The scan method (and parameters) to use.\n
- * \param band - the band to scan.\n
- */
-void scanMngrBuildScanCommandHeader( TI_HANDLE hScanMngr, TScanMethod* scanMethod, ERadioBand band );
-
-/**
- * \\n
- * \date 06-Mar-2005\n
- * \brief Add neighbor APs to scan command on the object workspace for discovery scan.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bandPolicy - the scan policy for the band to use.\n
- */
-void scanMngrAddNeighborAPsForDiscovery( TI_HANDLE hScanMngr, TScanBandPolicy* bandPolicy );
-
-/**
- * \\n
- * \date 06-Mar-2005\n
- * \brief Add channel from policy channels list to scan command on the object workspace for discovery scan.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bandPolicy - the scan policy for the band to use.\n
- */
-void scanMngrAddChannelListForDiscovery( TI_HANDLE hScanMngr, TScanBandPolicy* bandPolicy );
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Add SPS channels to scan command on the object workspace.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param scanMethod - The scan method (and parameters) to use.\n
- * \param band - the band to scan.\n
- */
-void scanMngrAddSPSChannels( TI_HANDLE hScanMngr, TScanMethod* scanMethod, ERadioBand band );
-
-/**
- * \\n
- * \date 07-Mar-2005\n
- * \brief Calculates local TSF of the next event (beacon or GPR) of the given tracked AP.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param BSSList - a pointer to the track list.\n
- * \param entryIndex - the index of the AP for which calculation is requires in the tracking list.\n
- * \param initialTSFValue - local TSF value AFTER which the next event is to found.\n
- * \return The approximate current TSF
- */
-TI_UINT64 scanMngrCalculateNextEventTSF( TI_HANDLE hScanMngr, scan_BSSList_t* BSSList, TI_UINT8 entryIndex, TI_UINT64 initialTSFValue );
-
-/**
- * \\n
- * \date 20-September-2005\n
- * \brief Check whether a time range collides with current AP DTIM
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param rangeStart - the time range start TSF.\n
- * \param eventEnd - the time range end TSF.\n
- * \return Whether the event collides with a DTIM (TRUF if it does, TI_FALSE if it doesn't).\n
- */
-TI_BOOL scanMngrDTIMInRange( TI_HANDLE hScanMngr, TI_UINT64 eventStart, TI_UINT64 eventEnd );
-
-/**
- * \\n
- * \date 03-Mar-2005\n
- * \brief Add a normal channel entry to the object workspace scan command.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param scanMethod - The scan method (and parameters) to use.\n
- * \param channel - the channel index.\n
- * \param BSSID - pointer to the BSSID to use (may be broadcast.\n
- * \param txPowerDbm - Tx power to transmit probe requests.\n
- */
-void scanMngrAddNormalChannel( TI_HANDLE hScanMngr, TScanMethod* scanMethod, TI_UINT8 channel, 
-                               TMacAddr* BSSID, TI_UINT8 txPowerDbm );
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Removes an entry from the BSS list (by replacing it with another entry, if any).\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param BSSEntryIndex - index of the entry to remove.\n
- */
-void scanMngrRemoveBSSListEntry( TI_HANDLE hScanMngr, TI_UINT8 BSSEntryIndex );
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Removes all BSS list entries that are neither neighbor APs not on a policy defined channel.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param bCheckNeighborAPs - whether to verify that APs marked as neighbor APs are really neighbor APs.\n
- * \param bCheckChannels - whether to verify that APs not marked as neighbor APs are on policy defined channel.\n
- */
-void scanMngrUpdateBSSList( TI_HANDLE hScanMngr, TI_BOOL bCheckNeighborAPs, TI_BOOL bCheckChannels );
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief returns the index of a neighbor AP.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param band - the band on which the AP resides.\n
- * \param bssId - the AP's BSSID.\n
- * \return the index into the neighbor AP list for the given address, -1 if AP is not in list.\n
- */
-TI_INT8 scanMngrGetNeighborAPIndex( TI_HANDLE hScanMngr, ERadioBand band, TMacAddr* bssId );
-
-/**
- * \\n
- * \date 02-Mar-2005\n
- * \brief Checks whether a channel is defined on a policy.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param band - the band on which the channel is.\n
- * \param channel - the channel number.\n
- * \return TI_TRUE if channel is defined on policy, TI_FALSE otherwise.\n
- */
-TI_BOOL scanMngrIsPolicyChannel( TI_HANDLE hScanMngr, ERadioBand band, TI_UINT8 channel );
-
-/**
- * \\n
- * \date 18-Apr-2005\n
- * \brief Converts scan concentrator result status to scan manager result status, to be returned to roaming manager.\n
- *
- * Function Scope \e Private.\n
- * \param result status - scan concentrator result status.\n
- * \return appropriate scan manager status.\n
- */
-scan_mngrResultStatus_e scanMngrConvertResultStatus( EScanCncnResultStatus resultStatus );
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief Print a neighbor AP list.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param neighborAPList - the list of neighbor APs to print
- */
-void scanMngrTracePrintNeighborAPsList( TI_HANDLE hScanMngr, neighborAPList_t *neighborAPList );
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief Print a neighbor AP.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param neighborAP - the neighbor AP to print
- */
-void scanMngrTracePrintNeighborAP( TI_HANDLE hScanMngr, neighborAP_t* neighborAP );
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief Print a band scan policy AP.\n
- *
- * Function Scope \e Private.\n
- * \param bandPolicy - the band scan policy to print.\n
- */
-void scanMngrTracePrintBandScanPolicy( TScanBandPolicy* bandPolicy );
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief Print a scan method
- *
- * Function Scope \e Private.\n
- * \param scanMethod - the scan method to print.\n
- */
-void scanMngrTracePrintScanMethod( TScanMethod* scanMethod );
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief print a normal scan method
- *
- * Function Scope \e Private.\n
- * \param basicMethodParams - the basic method parameters to print.\n
- */
-void scanMngrTracePrintNormalScanMethod( TScanBasicMethodParams* basicMethodParams );
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief print an AC triggered scan method
- *
- * Function Scope \e Private.\n
- * \param triggeredMethodParams - the Tid-triggered method parameters to print.\n
- */
-void scanMngrTracePrintTriggeredScanMethod( TScanTidTriggeredMethodParams* triggeredMethodParams );
-
-/**
- * \\n
- * \date 09-Mar-2005\n
- * \brief print a SPS scan method
- *
- * Function Scope \e Private.\n
- * \param SPSMethodParams - the SPS method parameters to print.\n
- */
-void scanMngrTracePrintSPSScanMethod( TScanSPSMethodParams* SPSMethodParams );
-
-#ifdef TI_DBG
-/**
- * \\n
- * \date 31-Mar-2005\n
- * \brief print debug information for every received frame.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param frameInfo - holding all frame related information.\n
- */
-void scanMngrDebugPrintReceivedFrame( TI_HANDLE hScanMngr, TScanFrameInfo *frameInfo );
-
-/**
- * \\n
- * \date 31-Mar-2005\n
- * \brief print BSS list.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- */
-void scanMngrDebugPrintBSSList( TI_HANDLE hScanMngr );
-
-/**
- * \\n
- * \date 31-Mar-2005\n
- * \brief print one entry in the BSS list.\n
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param entryIndex - the index of the entry to print.\n
- */
-void scanMngrDebugPrintBSSEntry( TI_HANDLE hScanMngr, TI_UINT8 entryIndex );
-
-/**
- * \\n
- * \date 14-Apr-2005\n
- * \brief print SPS helper list
- *
- * Function Scope \e Private.\n
- * \param hScanMngr - handle to the scan manager object.\n
- * \param spsHelperList - the list to print.\n
- * \param arrayHead - the index of the first element in the list.\n
- * \param arraySize - the size of the array.\n
- */
-void scanMngrDebugPrintSPSHelperList( TI_HANDLE hScanMngr, scan_SPSHelper_t* spsHelperList, int arrayHead, int arraySize );
-
-/**
- * \\n
- * \date 26-May-2005\n
- * \brief Print scan result histogram statistics.\n
- *
- * Function Scope \e Private.\n
- * \param scanResultHistogram - Scan results histogram (by scan complete reason).\n
- */
-void scanMngrStatsPrintScanResultHistogram( TI_UINT32 scanResultHistogram[] );
-
-/**
- * \\n
- * \date 26-May-2005\n
- * \brief Print track fail count histogram statistics.\n
- *
- * Function Scope \e Private.\n
- * \param trackFailHistogram - tracking failure histogram (by tracking retry).\n
- */
-void scanMngrStatsPrintTrackFailHistogrsm( TI_UINT32 trackFailHistogram[] );
-
-/**
- * \\n
- * \date 26-May-2005\n
- * \brief Print SPS attendant channel histogram statistics.\n
- *
- * Function Scope \e Private.\n
- * \param SPSChannelsNotAttendedHistogram - SPS channels attendant histogram.\n
- */
-void scanMngrStatsPrintSPSChannelsHistogram( TI_UINT32 SPSChannelsNotAttendedHistogram[] );
-
-/**
- * \\n
- * \date 25-July-2005\n
- * \brief Print One neighbor AP entry.\n
- *
- * Function Scope \e Private.\n
- * \param pNeighborAp - pointer to the neighbor AP data.\n
- * \param discovery state - the discovery state of this neighbor AP.\n
- */
-void scanMngrDebugPrintNeighborAP( neighborAP_t* pNeighborAp, scan_neighborDiscoveryState_e discoveryState );
-
-/**
- * \\n
- * \date 27-July-2005\n
- * \brief Prints a scan command.\n
- *
- * Function Scope \e Private.\n
- * \param pScanParams - a pointer to the scan parameters structure.\n
- */
-void scanMngrDebugPrintScanCommand( TScanParams* pScanParams );
-
-/**
- * \\n
- * \date 27-July-2005\n
- * \brief Prints scan command single normal channel.\n
- *
- * Function Scope \e Private.\n
- * \param pNormalChannel - a pointer to the normal channel to print.\n
- */
-void scanMngrDebugPrintNormalChannelParam( TScanNormalChannelEntry* pNormalChannel );
-
-/**
- * \\n
- * \date 27-July-2005\n
- * \brief Prints scan command single SPS channel.\n
- *
- * Function Scope \e Private.\n
- * \param pSPSChannel - a pointer to the SPS channel to print.\n
- */
-void scanMngrDebugPrintSPSChannelParam( TScanSpsChannelEntry* pSPSChannel );
-
-
-#endif /* TI_DBG */
-
-#endif /* __SCAN_MNGR_H__ */
diff --git a/wl1271/stad/src/Application/scanMngrApi.h b/wl1271/stad/src/Application/scanMngrApi.h
deleted file mode 100644
index 33d6226..0000000
--- a/wl1271/stad/src/Application/scanMngrApi.h
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * scanMngrApi.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  scanMngrApi.h
- *  \brief This file include public definitions for the scan manager module, comprising its API.
- *
- *  \see   scanMngr.c, scanMngr.h, scanMngrTypes.h
- */
-
-
-#ifndef __SCAN_MNGR_API_H__
-#define __SCAN_MNGR_API_H__
-
-#include "scanMngrTypes.h"
-#include "bssTypes.h"
-#include "ScanCncn.h"
-#include "DrvMainModules.h"
-
-
-/*
- ***********************************************************************
- *  Constant definitions.
- ***********************************************************************
- */
-
-#define SCANNING_OPERATIONAL_MODE_MANUAL   0
-#define SCANNING_OPERATIONAL_MODE_AUTO 	   1
-
-
-/*
- ***********************************************************************
- *  Enums.
- ***********************************************************************
- */
-/** \enum scan_mngrResultStatus_e
- *
- * \brief Scan Manager Result Status
- * 
- * \par Description
- * Enumerates the possible Scan result statuses.
- * Returned as a response to an immediate scan request.
- * 
- * \sa
- */
- typedef enum
-{
-/*	0	*/	SCAN_MRS_SCAN_COMPLETE_OK, 		                	/**< Scan was completed successfully 						*/
-/*	1	*/	SCAN_MRS_SCAN_RUNNING,                              /**< Scan was started successfully and is now running 		*/ 
-/*	2	*/	SCAN_MRS_SCAN_NOT_ATTEMPTED_ALREADY_RUNNING,        /**< scan was not attempted because it is already running 	*/
-/*	3	*/	SCAN_MRS_SCAN_NOT_ATTEMPTED_EMPTY_POLICY,            /**< 
-																* Scan was not attempted because the policy defines
-																* NULL scan type
-																*/
-/*	4	*/	SCAN_MRS_SCAN_NOT_ATTEMPTED_NO_CHANNLES_AVAILABLE, 	/**< 
-																* Scan was not attempted because no channels are 
-																* available for scan, according to the defined policy.
-																*/
-/*	5	*/	SCAN_MRS_SCAN_FAILED,                             	/**< Scan failed to start 									*/
-/*	6	*/	SCAN_MRS_SCAN_STOPPED,                              /**< Scan was stopped by caller 							*/
-/*	7	*/	SCAN_MRS_SCAN_ABORTED_FW_RESET,                     /**< Scan was aborted due to recovery 						*/
-/*	8	*/	SCAN_MRS_SCAN_ABORTED_HIGHER_PRIORITY               /**< Scan was aborted due to a higher priority client 		*/
-
-} scan_mngrResultStatus_e;
-
-typedef enum {
-    CONNECTION_STATUS_CONNECTED =0,
-    CONNECTION_STATUS_NOT_CONNECTED
-} scanMngr_connStatus_e;
-
-
-
-
-/*
- ***********************************************************************
- *  Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  Structure definitions.
- ***********************************************************************
- */
-
-typedef struct  {
-	TI_UINT8               	numOfChannels;                                  /**< Number of channels to scan */
-    TScanChannelEntry      	channelEntry[ MAX_NUMBER_OF_CHANNELS_PER_SCAN ]; /**< Channel data array, actual size according to the above field. */
-} channelList_t;
-
-typedef struct _BssListEx_t
-{
-    bssList_t   *pListOfAPs;
-    TI_BOOL      scanIsRunning;
-} BssListEx_t;
-
-
-/*
- ***********************************************************************
- *  External data definitions.
- ***********************************************************************
- */
-/*
- ***********************************************************************
- *  External functions definitions
- ***********************************************************************
- */
-/** 
- * \brief  Creates the scan manager object
- * 
- * \param hScanMngr - handle to the OS object
- * \return Handle to the Scan Manager Object on Success, NULL otherwise
- * 
- * \par Description
- * Creates (allocates) the scan manager object and its database
- * 
- * \sa
- */ 
-TI_HANDLE scanMngr_create( TI_HANDLE hOS );
-/** 
- * \brief  Initializes the scan manager
- * 
- * \param  pStadHandles  - The driver modules handles
- * \return void
- * 
- * \par Description
- * Initializes the scan manager object with other object handlers called by the driver core logic,
- * and creates Scan Manager Timer
- * 
- * \sa	scanMngr_unload
- */ 
-void scanMngr_init (TStadHandlesList *pStadHandles);
-/** 
- * \brief  Unloads the scan manager object
- * 
- * \param hScanMngr - Handle to the scan manager object to unload
- * \return void
- * 
- * \par Description
- * Frees the memory allocated by the scan manager. 
- * The function is called as part of the unloading process of the driver.
- * 
- * \sa
- */ 
-void scanMngr_unload( TI_HANDLE hScanMngr );
-/** 
- * \brief  Starts an immediate scan operation
- * 
- * \param hScanMngr 		- handle to the scan manager object
- * \param pNeighborAPsOnly 	- Indicates whether to scan only neighbor APs (or all channels defined by the policy)
- * 							  TI_TRUE if scan for neighbor APs only, TI_FALSE if scan on all channels
- * \return  Scan Result Status
- * 
- * \par Description
- * 
- * \sa	scanMngr_create
- */ 
-scan_mngrResultStatus_e scanMngr_startImmediateScan( TI_HANDLE hScanMngr, TI_BOOL bNeighborAPsOnly );
-/** 
- * \brief  Stops the immediate scan operation
- * 
- * \param hScanMngr - handle to the scan manager object
- * \return  void
- * 
- * \par Description
- * 
- * \sa
- */ 
-void scanMngr_stopImmediateScan( TI_HANDLE hScanMngr );
-/** 
- * \brief  Starts the continuous scan timer
- * 
- * \param hScanMngr 		- Handle to the scan manager object
- * \param currentBSS 		- BSSID of the AP to which the STA is connected 
- * \param currentBSSBand 	- Band of the AP to which the STA is connected 
- * \return  void
- * 
- * \par Description
- * Starts the continuous scan process performed by the scan manager. 
- * It is called by the roaming manager when an STA connection is established
- * 
- * \sa
- */ 
-void scanMngr_startContScan( TI_HANDLE hScanMngr, TMacAddr* currentBSS, ERadioBand currentBSSBand );
-/** 
- * \brief  Stops the continuous scan timer
- * 
- * \param hScanMngr 		- Handle to the scan manager object
- * \return  void
- * 
- * \par Description
- * Stops the continues scan performed by the scan manager. 
- * It is called by the roaming manager when the STA disconnects
- * 
- * \sa
- */ 
-void scanMngr_stopContScan( TI_HANDLE hScanMngr );
-/** 
- * \brief  Returns the currently available BSS list
- * 
- * \param hScanMngr 		- Handle to the scan manager object
- * \return  Pointer to BSS list
- * 
- * \par Description
- * Used by the roaming manager to obtain the scan manager BSS list.
- * 
- * \sa
- */
-bssList_t *scanMngr_getBSSList( TI_HANDLE hScanMngr );
-/** 
- * \brief  Sets the neighbor APs
- * 
- * \param hScanMngr 		- Handle to the scan manager object
- * \param neighborAPList 	- Pointer to the neighbor AP list
- * \return  void
- * 
- * \par Description
- * Used by the roaming manager to set a list of neighbor APs for the scan manager, 
- * which are then given priority over policy channels in the discovery phase
- * 
- * \sa
- */
-void scanMngr_setNeighborAPs( TI_HANDLE hScanMngr, neighborAPList_t* neighborAPList );
-/** 
- * \brief  Change quality level (normal / deteriorating)
- * 
- * \param hScanMngr 	- Handle to the scan manager object
- * \param bLowQuality 	- TI_TRUE if quality is deteriorating, TI_FALSE if quality is normal
- * \return  void
- * 
- * \par Description
- * Used by the roaming manager to set the scan interval used by the scan manager, 
- * according to the current AP quality level
- * 
- * \sa
- */
-void scanMngr_qualityChangeTrigger( TI_HANDLE hScanMngr, TI_BOOL bLowQuality );
-/** 
- * \brief  Change quality level (normal / deteriorating)
- * 
- * \param hScanMngr 	- Handle to the scan manager object
- * \param macAddress 	- MAC address of the new AP (to which the STA is currently connected to)
- * \param band 			- Band of the new AP (to which the STA is currently connected to) 
- * \return  void
- * 
- * \par Description
- * Used by the roaming manager to notify the scan manager that roaming is complete. 
- * This is done so that the scan manager does not attempt to discover the current AP, 
- * in case it is also a neighbor AP
- * 
- * \sa
- */
-void scanMngr_handoverDone( TI_HANDLE hScanMngr, TMacAddr* macAddress, ERadioBand band );
-/** 
- * \brief	Get Scan Manager Parameters  
- * 
- * \param hScanMngr - Handle to the scan manager object
- * \param pParam 	- Pointer to get Parameter
- * \return  TI_OK if the parameter got successfully, TI_NOK otherwise
- * 
- * \par Description
- * Parses and executes a get parameter command
- * 
- * \sa
- */
-TI_STATUS scanMngr_getParam( TI_HANDLE hScanMngr, paramInfo_t *pParam );
-/** 
- * \brief  Set Scan Manager Parameters
- * 
- * \param hScanMngr - Handle to the scan manager object
- * \param pParam 	- Pointer to set Parameter
- * \return  TI_OK if the parameter was set successfully, TI_NOK otherwise
- * 
- * \par Description
- * Called when the user configures scan parameters. It parses and executes a set parameter command
- * 
- * \sa
- */
-TI_STATUS scanMngr_setParam( TI_HANDLE hScanMngr, paramInfo_t *pParam );
-
-
-
-
-
-/********** New APIs added for EMP manual scan support ******/
-
-void scanMngr_startManual(TI_HANDLE hScanMngr);
-
-void scanMngr_stopManual(TI_HANDLE hScanMngr);
-
-TI_STATUS scanMngr_setManualScanChannelList (TI_HANDLE  hScanMngr, channelList_t* pChannelList);
-
-EScanCncnResultStatus scanMngr_Start1ShotScan (TI_HANDLE hScanMngr, EScanCncnClient eClient);
-
-TI_STATUS scanMngr_immediateScanComplete(TI_HANDLE hScanMngr, scan_mngrResultStatus_e scanCmpltStatus);
-
-TI_STATUS scanMngr_reportImmediateScanResults(TI_HANDLE hScanMngr, scan_mngrResultStatus_e scanCmpltStatus);
-
-TI_STATUS scanMngr_startContinuousScanByApp (TI_HANDLE hScanMngr, channelList_t* pChannelList);
-
-TI_STATUS scanMngr_stopContinuousScanByApp (TI_HANDLE hScanMngr);
-
-void scanMngr_SetDefaults (TI_HANDLE hScanMngr, TRoamScanMngrInitParams *pInitParams);
-
-/********** New APIs added for EMP manual scan support ******/
-
-
-#ifdef TI_DBG
-/** 
- * \brief  Print scan policy
- * 
- * \param scanPolicy 	- scan policy to print
- * \return void
- * 
- * \par Description
- * 
- * \sa
- */
-void scanMngrTracePrintScanPolicy( TScanPolicy* scanPolicy );
-/** 
- * \brief  Print scan manager statistics
- * 
- * \param hScanMngr - handle to the scan manager object.\n
- * \return void
- * 
- * \par Description
- * 
- * \sa
- */
-void scanMngr_statsPrint( TI_HANDLE hScanMngr );
-/** 
- * \brief  Reset scan manager statistics
- * 
- * \param hScanMngr - handle to the scan manager object.\n
- * \return void
- * 
- * \par Description
- * 
- * \sa
- */
-void scanMngr_statsReset( TI_HANDLE hScanMngr );
-/** 
- * \brief  Print Neighbor AP list
- * 
- * \param hScanMngr - handle to the scan manager object.\n
- * \return void
- * 
- * \par Description
- * 
- * \sa
- */
-void scanMngrDebugPrintNeighborAPList( TI_HANDLE hScanMngr );
-/** 
- * \brief  Prints all data in the scan manager object
- * 
- * \param hScanMngr - handle to the scan manager object.\n
- * \return void
- * 
- * \par Description
- * 
- * \sa
- */
-void scanMngrDebugPrintObject( TI_HANDLE hScanMngr );
-
-#endif /* TI_DBG */
-
-#endif /* __SCAN_MNGR_API_H__ */
diff --git a/wl1271/stad/src/Application/scanMngrTypes.h b/wl1271/stad/src/Application/scanMngrTypes.h
deleted file mode 100644
index c224fcf..0000000
--- a/wl1271/stad/src/Application/scanMngrTypes.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * scanMngrTypes.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef __SCAN_MNGR_TYPES_API_H__
-#define __SCAN_MNGR_TYPES_API_H__
-
-
-/** \file scanMngrTypes.h
- * \brief Scan Manager Types	\n
- * This file include public type definitions for the scan manager application level module,	\n
- * to be included both by driver and user-mode.
- * \n\n
- */
- 
-/* \author Ronen Kalish
- * \date 01-Mar-2005
- */
-
-/*
- ***********************************************************************
- *	Constant definitions.
- ***********************************************************************
- */
-
-/** \def MAX_BAND_POLICY_CHANNLES
- * \brief Maximal number of channels per band policy
- */
-#define MAX_BAND_POLICY_CHANNLES    30
-
-/*
- ***********************************************************************
- *	Enums.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	Structure definitions.
- ***********************************************************************
- */
-/** \struct TScanProbReqParams
- * \brief Scan Prob Request Parameters
- * 
- * \par Description
- * This structure defines the probe request parameters used for active scan
- * 
- * \sa
- */ 
-typedef struct
-{
-	TI_UINT8					numOfProbeReqs;	/**< Number of probe request frames to be transmitted on each channel	*/
-	TI_UINT8 					txPowerDbm;     /**< Tx Power level of the probe request frame (1: strong power; 5: weak power), at which to transmit	*/
-	ERateMask					bitrate;        /**< Probe request transmission bit rate	*/
-} TScanProbReqParams;
-
-/** \struct TScanBasicMethodParams
- * \brief Scan Basic Method Parameters
- * 
- * \par Description
- * This structure defines the argument used for the basic scan operation. 
- * The basic scan is a standard 802.11 scan, which can be active (sending a probe request frame on each channel) 
- * or passive (without sending probe request frames). For a passive scan, the probe request parameters are ignored
- * 
- * \sa
- */ 
-typedef struct
-{
-	TI_UINT32						maxChannelDwellTime;	/**< Maximum time to stay on the channel if some frames are received but the early termination limit is not reached (microseconds)	*/
-	TI_UINT32						minChannelDwellTime;    /**< Minimum time to stay on the channel if no activity at all was discovered (no frames are received) (microseconds)	*/
-	EScanEtCondition    			earlyTerminationEvent;  /**< The cause for early termination	*/
-	TI_UINT8						ETMaxNumberOfApFrames;  /**< Number of frames from the early termination frame types according to the early TerminationEvent setting, after which the scan is stopped on this channel	*/
-	TScanProbReqParams	       		probReqParams;          /**< Probe request transmission parameters: number of frames, TX rate, and TX power level	*/
-} TScanBasicMethodParams;
-
-/** \struct TScanTidTriggeredMethodParams
- * \brief Scan Tid Triggered Method Parameters
- * 
- * \par Description
- * This structure defines the policy parameters for an AC triggered scan. 
- * The Scan is passive or active, in which a single-channel scan is triggered by transmission on the serving channel
- * 
- * \sa
- */ 
-typedef struct 
-{
-	TScanBasicMethodParams			basicMethodParams;	/**< Parameters for the basic scan performed in the AC triggered scan process	*/
-	TI_UINT8						triggeringTid;		/**< Quality-of-service (QoS) AC that triggers the scans in the AC triggered scan process	*/
-} TScanTidTriggeredMethodParams;
-
-/** \struct TScanSPSMethodParams
- * \brief Scan SPS Method Parameters
- * 
- * \par Description
- * This structure defines the policy parameters for an SPS. 
- * SPS is a passive scan that is timed accurately to beacon transmissions.
- * 
- * \sa
- */ 
-typedef struct 
-{
-	EScanEtCondition    			earlyTerminationEvent;	/**< The cause for early termination */
-	TI_UINT8				      	ETMaxNumberOfApFrames;  /**< Number of frames from the early termination frame types according to the early Termination Event setting, 
-															* after which the scan is stopped on this channel	
-															*/
-	TI_UINT32					   	scanDuration;           /**< Time to spend on each channel (in usec) */
-} TScanSPSMethodParams;
-
-/** \struct TScanMethod
- * \brief Scan Method
- * 
- * \par Description
- * This structure defines the policy parameters for a scan method, which can be any type of scan
- * 
- * \sa
- */ 
-typedef struct 
-{
-	EScanType					scanType;                           /**< Required scan type (active, passive, AC triggered, SPS)	*/
-	/* Scan policy parameters */
-	union
-	{
-		TScanBasicMethodParams 		    basicMethodParams;      	/**< scan parameters for normal scan 		*/
-        TScanTidTriggeredMethodParams	TidTriggerdMethodParams; 	/**< scan parameters for Tid-Triggered scan */
-        TScanSPSMethodParams			spsMethodParams;        	/**< scan parameters for SPS scan 			*/
-	} method;
-} TScanMethod;
-
-/** \struct TScanBandPolicy
- * \brief Scan Band Policy
- * 
- * \par Description
- * This structure defines the parameters comprising a scan policy for a single band
- * 
- * \sa
- */ 
-typedef struct
-{
-	ERadioBand 				band;	                            	/**< The band (2.4 / 5 GHz) 								*/
-	TScanMethod				discoveryMethod;                    	/**< Scan method used to discover new BSS'es 				*/
-	TScanMethod	    		trackingMethod;                     	/**< Scan method used to track previously discovered AP's	*/
-	TScanMethod		    	immediateScanMethod;                	/**< Scan method used for immediate scan 					*/
-	TI_INT8            		rxRSSIThreshold;                    	/**< Quality threshold for received frames 					*/
-	TI_UINT8				numOfChannlesForDiscovery;          	/**< Number of channels to scan at each discovery attempt	*/
-	TI_UINT8				numOfChannles;                      	/**< Number of channels to use on this band 				*/
-	TI_UINT8	           	channelList[ MAX_BAND_POLICY_CHANNLES ];/**< All possible channels 									*/
-                                                                    
-} TScanBandPolicy;
-
-/** \struct TScanPolicy
- * \brief Scan Policy
- * 
- * \par Description
- * This structure defines the parameters comprising scan policies on all bands
- * 
- * \sa
- */
-typedef struct
-{
-    TI_UINT32  				normalScanInterval;                     	/**< Time interval (im msec) at which to perform
-																		* continuous scan, when current BSS quality is
-																		* considered "normal".
-																		*/
-    TI_UINT32	    		deterioratingScanInterval;              	/**< Time interval (in msec) at which to perform
-																		* continuous scab, when current BSS quality is
-																		* considered "deteriorating"
-																		*/
-    TI_UINT8				maxTrackFailures;                       	/**< The max number of track failures to keep
-																		* an AP in the BSS list
-																		*/
-    TI_UINT8				BSSListSize;                            	/**< The number of APs in the BSS list */
-    TI_UINT8				BSSNumberToStartDiscovery;              	/**< The number of APs in the BSS list at which
-																		* discovery process is initiated
-																		*/
-    TI_UINT8 		    	numOfBands;                             	/**< Number of bands to scan */
-    TScanBandPolicy			bandScanPolicy[ RADIO_BAND_NUM_OF_BANDS ];	/**< Bands' policies */
-} TScanPolicy;
-
-/*
- ***********************************************************************
- *	External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *	External functions definitions
- ***********************************************************************
- */
-
-
-#endif /* __SCAN_MNGR_TYPES_API_H__ */
-
diff --git a/wl1271/stad/src/Connection_Managment/admCtrl.c b/wl1271/stad/src/Connection_Managment/admCtrl.c
deleted file mode 100644
index 458f494..0000000
--- a/wl1271/stad/src/Connection_Managment/admCtrl.c
+++ /dev/null
@@ -1,1079 +0,0 @@
-/*
- * admCtrl.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file admCtrl.c
- *  \brief Admission control API implimentation
- *
- *  \see admCtrl.h
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Admission Control                                             *
- *   PURPOSE: Admission Control Module API                                  *
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_16
-#include "osApi.h"
-#include "paramOut.h"
-#include "timer.h"
-#include "fsm.h"
-#include "report.h"
-#include "mlmeApi.h"
-#include "DataCtrl_Api.h"
-#include "TI_IPC_Api.h"
-#include "rsn.h"
-#include "admCtrl.h"
-#include "admCtrlWpa.h"
-#include "admCtrlWpa2.h"
-#include "admCtrlNone.h"
-#include "admCtrlWep.h"
-#include "EvHandler.h"
- 
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* Local functions definitions */
-
-/* Global variables */
-
-/* Function prototypes */
-
-TI_STATUS admCtrl_setAuthSuite(admCtrl_t *pAdmCtrl, EAuthSuite authSuite);
-
-TI_STATUS admCtrl_getAuthSuite(admCtrl_t *pAdmCtrl, EAuthSuite *pSuite);
-
-TI_STATUS admCtrl_setNetworkMode(admCtrl_t *pAdmCtrl, ERsnNetworkMode mode);
-
-TI_STATUS admCtrl_setExtAuthMode(admCtrl_t *pAdmCtrl, EExternalAuthMode extAuthMode);
-
-TI_STATUS admCtrl_getExtAuthMode(admCtrl_t *pAdmCtrl, EExternalAuthMode *pExtAuthMode);
-
-TI_STATUS admCtrl_setUcastSuite(admCtrl_t *pAdmCtrl, ECipherSuite suite);
-
-TI_STATUS admCtrl_setBcastSuite(admCtrl_t *pAdmCtrl, ECipherSuite suite);
-
-TI_STATUS admCtrl_getCipherSuite(admCtrl_t *pAdmCtrl, ECipherSuite *pSuite);
-
-TI_STATUS admCtrl_setKeyMngSuite(admCtrl_t *pAdmCtrl, ERsnKeyMngSuite suite);
-
-TI_STATUS admCtrl_getMixedMode(admCtrl_t *pAdmCtrl, TI_BOOL *pMixedMode);
-
-TI_STATUS admCtrl_setMixedMode(admCtrl_t *pAdmCtrl, TI_BOOL mixedMode);
-
-TI_STATUS admCtrl_getAuthEncrCapability(admCtrl_t *pAdmCtrl, 
-                   rsnAuthEncrCapability_t   *authEncrCapability);
-
-TI_STATUS admCtrl_getPromoteFlags(admCtrl_t *pAdmCtrl, TI_UINT32 *WPAPromoteFlags);
-
-TI_STATUS admCtrl_setPromoteFlags(admCtrl_t *pAdmCtrl, TI_UINT32 WPAPromoteFlags);
-
-TI_STATUS admCtrl_getWPAMixedModeSupport(admCtrl_t *pAdmCtrl, TI_UINT32 *support);
-
-TI_STATUS admCtrl_checkSetSuite(admCtrl_t *pAdmCtrl, ECipherSuite suite, TI_BOOL Broadcast);
-
-#ifdef XCC_MODULE_INCLUDED
-TI_STATUS admCtrl_setNetworkEap(admCtrl_t *pAdmCtrl, OS_XCC_NETWORK_EAP networkEap);
-
-TI_STATUS admCtrl_getNetworkEap(admCtrl_t *pAdmCtrl, OS_XCC_NETWORK_EAP *networkEap);
-#endif
-
-/**
-*
-* admCtrl_create
-*
-* \b Description: 
-*
-* Create the admission control context.
-*
-* \b ARGS:
-*
-*  I   - role - admission cotrol role (AP or Station)  \n
-*  I   - authSuite - authentication suite to work with \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-admCtrl_t* admCtrl_create(TI_HANDLE hOs)
-{
-    admCtrl_t       *pHandle;
-
-    /* allocate rsniation context memory */
-    pHandle = (admCtrl_t*)os_memoryAlloc(hOs, sizeof(admCtrl_t));
-    if (pHandle == NULL)
-    {
-        return NULL;
-    }
-
-    os_memoryZero(hOs, pHandle, sizeof(admCtrl_t));
-
-    pHandle->hOs = hOs;
-
-    return pHandle;
-}
-
-/**
-*
-* admCtrl_unload
-*
-* \b Description: 
-*
-* Unload admission control module from memory
-*
-* \b ARGS:
-*
-*  I   - hAdmCtrl - Admossion control context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa admCtrl_create
-*/
-TI_STATUS admCtrl_unload (admCtrl_t *pAdmCtrl)
-{
-    if (pAdmCtrl == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    /* Destroy the wpa2 pre-authentication timer and free the module's memory */
-	if (pAdmCtrl->hPreAuthTimerWpa2)
-	{
-		tmr_DestroyTimer (pAdmCtrl->hPreAuthTimerWpa2);
-	}
-    os_memoryFree (pAdmCtrl->hOs, pAdmCtrl, sizeof(admCtrl_t));
-
-    return TI_OK;
-}
-
-/**
-*
-* admCtrl_config
-*
-* \b Description: 
-*
-* Configure the admission control module.
-*
-* \b ARGS:
-*
-*  I   - role - admission cotrol role (AP or Station)  \n
-*  I   - authSuite - authentication suite to work with \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_config (TI_HANDLE hAdmCtrl,
-                          TI_HANDLE hMlme,
-                          TI_HANDLE hRx,
-                          TI_HANDLE hReport,
-                          TI_HANDLE hOs,
-                          struct _rsn_t *pRsn,
-                          TI_HANDLE hXCCMngr,
-                          TI_HANDLE hPowerMgr,
-                          TI_HANDLE hEvHandler,
-                          TI_HANDLE hTimer,
-                          TI_HANDLE hCurrBss,
-                          TRsnInitParams *pInitParam)
-{
-    admCtrl_t       *pAdmCtrl;
-    TI_STATUS           status;
-
-    if (hAdmCtrl == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    pAdmCtrl = (admCtrl_t*)hAdmCtrl;
-
-    pAdmCtrl->pRsn = pRsn;
-    pAdmCtrl->hMlme = hMlme;
-    pAdmCtrl->hRx = hRx;
-    pAdmCtrl->hReport = hReport;
-    pAdmCtrl->hOs = hOs;
-    pAdmCtrl->hXCCMngr = hXCCMngr;
-    pAdmCtrl->hPowerMgr = hPowerMgr;
-    pAdmCtrl->hEvHandler = hEvHandler;
-    pAdmCtrl->hTimer = hTimer;
-    pAdmCtrl->hCurrBss = hCurrBss;
-
-    /* Initialize admission control parameters */
-    pAdmCtrl->role = RSN_PAE_SUPP;
-    pAdmCtrl->networkMode = RSN_INFRASTRUCTURE;
-    pAdmCtrl->authSuite = pInitParam->authSuite;
-    pAdmCtrl->externalAuthMode = pInitParam->externalAuthMode;
-    pAdmCtrl->mixedMode = pInitParam->mixedMode;
-    
-    if (pInitParam->privacyOn)
-    {
-        pAdmCtrl->broadcastSuite = TWD_CIPHER_WEP;
-        pAdmCtrl->unicastSuite = TWD_CIPHER_WEP;
-    } else {
-        pAdmCtrl->broadcastSuite = TWD_CIPHER_NONE;
-        pAdmCtrl->unicastSuite = TWD_CIPHER_NONE;
-    }
-
-    pAdmCtrl->preAuthSupport     = pInitParam->preAuthSupport;
-    pAdmCtrl->preAuthTimeout     = pInitParam->preAuthTimeout;
-    pAdmCtrl->WPAMixedModeEnable = pInitParam->WPAMixedModeEnable;
-    /*pAdmCtrl->PMKIDCandListDelay = pInitParam->PMKIDCandListDelay;*/
-    pAdmCtrl->MaxNumOfPMKIDs     = PMKID_MAX_NUMBER;
-
-    /* Initialize admission control member functions */
-    pAdmCtrl->setAuthSuite = admCtrl_setAuthSuite;
-    pAdmCtrl->setNetworkMode = admCtrl_setNetworkMode;
-    pAdmCtrl->getAuthSuite = admCtrl_getAuthSuite;
-    pAdmCtrl->setExtAuthMode = admCtrl_setExtAuthMode;
-    pAdmCtrl->getExtAuthMode = admCtrl_getExtAuthMode;
-    pAdmCtrl->setUcastSuite = admCtrl_setUcastSuite;
-    pAdmCtrl->setBcastSuite = admCtrl_setBcastSuite;
-    pAdmCtrl->getCipherSuite = admCtrl_getCipherSuite;
-    pAdmCtrl->setKeyMngSuite = admCtrl_setKeyMngSuite;
-    pAdmCtrl->getMixedMode = admCtrl_getMixedMode;
-    pAdmCtrl->setMixedMode = admCtrl_setMixedMode;
-    pAdmCtrl->getAuthEncrCap = admCtrl_getAuthEncrCapability;
-    pAdmCtrl->getPmkidList   = admCtrl_nullGetPMKIDlist;
-    pAdmCtrl->setPmkidList   = admCtrl_nullSetPMKIDlist;
-    pAdmCtrl->resetPmkidList = admCtrl_resetPMKIDlist;
-    pAdmCtrl->getPromoteFlags = admCtrl_getPromoteFlags;
-    pAdmCtrl->setPromoteFlags = admCtrl_setPromoteFlags;
-    pAdmCtrl->getWPAMixedModeSupport = admCtrl_getWPAMixedModeSupport;
-#ifdef XCC_MODULE_INCLUDED
-    pAdmCtrl->setNetworkEap = admCtrl_setNetworkEap;
-    pAdmCtrl->getNetworkEap = admCtrl_getNetworkEap;
-    pAdmCtrl->networkEapMode = OS_XCC_NETWORK_EAP_OFF;
-#endif
-
-    pAdmCtrl->getPreAuthStatus = admCtrl_nullGetPreAuthStatus;
-    pAdmCtrl->startPreAuth  = admCtrl_nullStartPreAuth;
-    pAdmCtrl->get802_1x_AkmExists = admCtrl_nullGet802_1x_AkmExists;
-    /* Zero number of sent wpa2 preauthentication candidates */
-    pAdmCtrl->numberOfPreAuthCandidates = 0;
-
-    /* Create hPreAuthTimerWpa2 timer */
-    pAdmCtrl->hPreAuthTimerWpa2 = tmr_CreateTimer (pAdmCtrl->hTimer);
-    if (pAdmCtrl->hPreAuthTimerWpa2 == NULL)
-    {
-        TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_ERROR , "admCtrl_config(): Failed to create hPreAuthTimerWpa2!\n");
-    }
-
-    status = admCtrl_subConfig(pAdmCtrl);
-
-    return status;
-}
-
-/**
-*
-* admCtrl_subConfig
-*
-* \b Description: 
-*
-* Configure the admission control module according to the Privacy Mode.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - pointer to admission cotrol context  \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_subConfig(TI_HANDLE hAdmCtrl)
-
-{
-    admCtrl_t* pAdmCtrl = (admCtrl_t*)hAdmCtrl;
-    TI_STATUS status;
-
-    switch(pAdmCtrl->externalAuthMode)
-    {
-    case RSN_EXT_AUTH_MODE_WPA:
-    case RSN_EXT_AUTH_MODE_WPAPSK:
-    case RSN_EXT_AUTH_MODE_WPANONE:
-        status = admCtrlWpa_config(pAdmCtrl);
-        break;
-
-    case RSN_EXT_AUTH_MODE_WPA2:
-    case RSN_EXT_AUTH_MODE_WPA2PSK:
-        status = admCtrlWpa2_config(pAdmCtrl);
-        break;
-
-    default:
-        if(pAdmCtrl->unicastSuite==TWD_CIPHER_NONE)
-        {
-            status = admCtrlNone_config(pAdmCtrl);
-        }
-        else
-        {
-            status = admCtrlWep_config(pAdmCtrl);
-        }
-        break;
-
-    }
-    
-    return status;
-
-}
-
-/**
-*
-* admCtrl_setNetworkMode - Change current network mode.
-*
-* \b Description: 
-*
-* Change current network mode.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - mode - network association mode (Infustrucure/IBSS) \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_setNetworkMode(admCtrl_t *pAdmCtrl, ERsnNetworkMode mode)
-{
-    pAdmCtrl->networkMode = mode;
-
-    return TI_OK;
-}
-
-/**
-*
-* admCtrl_setAuthSuite - Change current authentication suite.
-*
-* \b Description: 
-*
-* Change current authentication suite.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - authSuite - authentication suite to work with \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_setAuthSuite(admCtrl_t *pAdmCtrl, EAuthSuite authSuite)
-{
-    TI_STATUS       status = TI_NOK;
-
-    if (pAdmCtrl == NULL)
-    {
-        return TI_NOK;
-    }
-
-    if (pAdmCtrl->authSuite == authSuite)
-    {
-        return TI_OK;
-    }
-
-    if (pAdmCtrl->authSuite > RSN_AUTH_AUTO_SWITCH)
-    {
-        return TI_NOK;
-    }
-    pAdmCtrl->externalAuthMode = (EExternalAuthMode)authSuite;
-    pAdmCtrl->authSuite = authSuite;
-    status = admCtrl_subConfig(pAdmCtrl);
-    return status;
-}
-
-
-/**
-*
-* admCtrl_getAuthSuite  - Get current authentication suite.
-*
-* \b Description: 
-*
-* Get current authentication suite.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  O   - suite - key management suite to work with \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_getAuthSuite(admCtrl_t *pAdmCtrl, EAuthSuite *pSuite)
-{
-    if (pAdmCtrl == NULL)
-    {
-        return TI_NOK;
-    }
-
-    *pSuite = pAdmCtrl->authSuite;
-
-    return TI_OK;
-}
-
-/**
-*
-* admCtrl_setExtAuthMode  - Set current External authentication Mode Status.
-*
-* \b Description: 
-*
-* Set current External authentication Mode Status.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - extAuthMode - External authentication Mode \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_setExtAuthMode(admCtrl_t *pAdmCtrl, EExternalAuthMode extAuthMode)
-{
-
-    if (extAuthMode >= RSN_EXT_AUTH_MODEMAX)
-    {
-        return TI_NOK;
-    }
-
-
-    if (pAdmCtrl->externalAuthMode == extAuthMode)
-    {
-        return TI_OK;
-    }
-    pAdmCtrl->externalAuthMode = extAuthMode;
-    if (extAuthMode <= RSN_EXT_AUTH_MODE_AUTO_SWITCH)
-    {
-        pAdmCtrl->authSuite = (EAuthSuite)extAuthMode;
-    }
-    else
-    {
-        pAdmCtrl->authSuite = RSN_AUTH_OPEN;
-    }
-    
-    return (admCtrl_subConfig(pAdmCtrl));
-}
-
-/**
-*
-* admCtrl_getExtAuthMode  - Get current External authentication Mode Status.
-*
-* \b Description: 
-*
-* Get current External Mode Status.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - pExtAuthMode - XCC External Mode Status \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_getExtAuthMode(admCtrl_t *pAdmCtrl, EExternalAuthMode *pExtAuthMode)
-{
-    *pExtAuthMode = pAdmCtrl->externalAuthMode;
-
-    return TI_OK;
-}
-
-
-/**
-*
-* admCtrl_checkSetSuite -
-*
-* \b Description: 
-*
-* Check the validity/support of the cipher suite according to
-* the admission control parameters
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - suite - cipher suite to check \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_checkSetSuite(admCtrl_t *pAdmCtrl, ECipherSuite suite, TI_BOOL Broadcast)
-{
-    if (pAdmCtrl->externalAuthMode<=RSN_EXT_AUTH_MODE_AUTO_SWITCH)
-    {   
-        if ((suite==TWD_CIPHER_NONE) || (suite==TWD_CIPHER_WEP) || (suite==TWD_CIPHER_WEP104))
-        {
-            return TI_OK;
-        }
-#ifdef GEM_SUPPORTED
-		else if (suite==TWD_CIPHER_GEM)
-			{
-				return TI_OK;
-			}
-#endif
-    }
-    else
-    {
-        if ((suite==TWD_CIPHER_TKIP) || (suite==TWD_CIPHER_WEP) || 
-            (suite==TWD_CIPHER_WEP104) || (suite==TWD_CIPHER_AES_CCMP))
-        {
-            return TI_OK;
-        }
-#ifdef GEM_SUPPORTED
-		else if (suite==TWD_CIPHER_GEM)
-			{
-				return TI_OK;
-			}
-#endif
-        else if (!Broadcast && (suite==TWD_CIPHER_NONE))
-        {
-            return TI_OK;
-        }
-    }
-    return TI_NOK;
-}
-
-/**
-*
-* admCtrl_setUcastSuite  - Set current unicast cipher suite support.
-*
-* \b Description: 
-*
-* Set current unicast cipher suite support.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - suite - cipher suite to work with \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_setUcastSuite(admCtrl_t *pAdmCtrl, ECipherSuite suite)
-{
-    TI_STATUS status;
-
-    if (suite == pAdmCtrl->unicastSuite)
-    {
-        return TI_OK;
-    }
-    status = admCtrl_checkSetSuite(pAdmCtrl, suite, TI_FALSE);
-    if (status == TI_OK)
-    {
-        pAdmCtrl->unicastSuite = suite;
-        status = admCtrl_subConfig(pAdmCtrl);
-    }
-
-    return status;
-}
-
-/**
-*
-* admCtrl_setBcastSuite  - Set current broadcast cipher suite support.
-*
-* \b Description: 
-*
-* Set current broadcast cipher suite support.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - suite - cipher suite to work with \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_setBcastSuite(admCtrl_t *pAdmCtrl, ECipherSuite suite)
-{
-    TI_STATUS status;
-
-    if (suite == pAdmCtrl->broadcastSuite)
-    {
-        return TI_OK;
-    }
-
-    status = admCtrl_checkSetSuite(pAdmCtrl, suite, TI_TRUE);
-    if (status == TI_OK)
-    {
-        pAdmCtrl->broadcastSuite = suite;
-        status = admCtrl_subConfig(pAdmCtrl);
-    }
-    return status;
-
-}
-
-/**
-*
-* admCtrl_getCipherSuite  - Set current broadcast cipher suite support.
-*
-* \b Description: 
-*
-* Set current broadcast cipher suite support.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  O   - suite - cipher suite to work with \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_getCipherSuite(admCtrl_t *pAdmCtrl, ECipherSuite *pSuite)
-{
-    if (pAdmCtrl == NULL)
-    {
-        return TI_NOK;
-    }
-
-    *pSuite = (pAdmCtrl->broadcastSuite > pAdmCtrl->unicastSuite) ? pAdmCtrl->broadcastSuite :pAdmCtrl->unicastSuite;
-     
-    return TI_OK;
-}
-    
-/**
-*
-* admCtrl_setKeyMngSuite  - Set current key management suite support.
-*
-* \b Description: 
-*
-* Set current key management suite support.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - suite - key management suite to work with \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_setKeyMngSuite(admCtrl_t *pAdmCtrl, ERsnKeyMngSuite suite)
-{
-    pAdmCtrl->keyMngSuite = suite;
-
-    return TI_OK;
-}
-
-
-/**
-*
-* admCtrl_parseIe  - Parse a required information element.
-*
-* \b Description: 
-*
-* Parse an Aironet information element. 
-* Builds a structure of all the capabilities described in the Aironet IE.
-* We look at Flags field only to determine KP and MIC bits value
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - pointer to admCtrl context
-*  I   - pAironetIe - pointer to Aironet IE buffer  \n
-*  O   - pAironetData - capabilities structure
-*  
-*  
-* \b RETURNS:
-*
-* TI_OK on success, TI_NOK on failure. 
-*
-* \sa 
-*/
-TI_STATUS admCtrl_parseIe(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 **pIe, TI_UINT8 IeId)
-{
-
-    dot11_eleHdr_t      *eleHdr;
-    TI_INT16             length;
-    TI_UINT8            *pCurIe;
-
-
-    *pIe = NULL;
-
-    if ((pRsnData == NULL) || (pRsnData->ieLen==0))
-    {
-       return TI_OK;    
-    }
-
-    pCurIe = pRsnData->pIe;
-    
-    length = pRsnData->ieLen;
-    while (length>0)
-    {
-        eleHdr = (dot11_eleHdr_t*)pCurIe;
-        
-        if (length<((*eleHdr)[1] + 2))
-        {
-            TRACE2(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrl_parseIe ERROR: pRsnData->ieLen=%d, length=%d\n\n", pRsnData->ieLen,length);
-            return TI_OK;
-        }
-        
-        if ((*eleHdr)[0] == IeId)
-        {
-            *pIe = (TI_UINT8*)eleHdr;
-            break;
-        }
-        length -= (*eleHdr)[1] + 2;
-        pCurIe += (*eleHdr)[1] + 2;
-    }
-    return TI_OK;
-}
-
-/**
-*
-* admCtrl_setMixedMode  - Set current mixed Mode Status.
-*
-* \b Description: 
-*
-* Set current mixed Mode Status.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - authMode - mixed Mode \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_setMixedMode(admCtrl_t *pAdmCtrl, TI_BOOL mixedMode)
-{
-
-    if (pAdmCtrl->mixedMode == mixedMode)
-    {
-        return TI_OK;
-    }
-    pAdmCtrl->mixedMode = mixedMode;
-
-    return TI_OK;
-}
-
-/**
-*
-* admCtrl_getMixedMode  - Get current mixed Mode Status.
-*
-* \b Description: 
-*
-* Get current mixed Mode Status.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - pAuthMode - mixed Mode Status \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_getMixedMode(admCtrl_t *pAdmCtrl, TI_BOOL *pMixedMode)
-{
-    *pMixedMode = pAdmCtrl->mixedMode;
-
-    return TI_OK;
-}
-
-
-
-/* This table presents supported pairs of auth.mode/cipher type */
-static  authEncrPairList_t  supportedAuthEncrPairs[MAX_AUTH_ENCR_PAIR] = 
-{
-    {RSN_EXT_AUTH_MODE_OPEN,       TWD_CIPHER_NONE},
-    {RSN_EXT_AUTH_MODE_OPEN,       TWD_CIPHER_WEP},
-    {RSN_EXT_AUTH_MODE_SHARED_KEY, TWD_CIPHER_NONE},
-    {RSN_EXT_AUTH_MODE_SHARED_KEY, TWD_CIPHER_WEP},
-    {RSN_EXT_AUTH_MODE_WPA,        TWD_CIPHER_TKIP},
-    {RSN_EXT_AUTH_MODE_WPA,        TWD_CIPHER_AES_CCMP},
-    {RSN_EXT_AUTH_MODE_WPAPSK,     TWD_CIPHER_TKIP},
-    {RSN_EXT_AUTH_MODE_WPAPSK,     TWD_CIPHER_AES_CCMP},
-    {RSN_EXT_AUTH_MODE_WPANONE,    TWD_CIPHER_NONE},    /* No encryption in IBSS mode */
-    {RSN_EXT_AUTH_MODE_WPA2,       TWD_CIPHER_TKIP},
-    {RSN_EXT_AUTH_MODE_WPA2,       TWD_CIPHER_AES_CCMP},
-    {RSN_EXT_AUTH_MODE_WPA2PSK,    TWD_CIPHER_TKIP},
-    {RSN_EXT_AUTH_MODE_WPA2PSK,    TWD_CIPHER_AES_CCMP}
-};
-
-/**
-*
-* admCtrl_getAuthEncrCapability  - Get all supported pais of
-*                                  authenticationmode/cipher suite
-*
-* \b Description: 
-*
-*    Returns all supported pais of authenticationmode/cipher suite
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - authEncrCapability - ptr to list of auth.mode/cipher pairs \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-
-TI_STATUS admCtrl_getAuthEncrCapability(admCtrl_t *pAdmCtrl, 
-                                        rsnAuthEncrCapability_t   *authEncrCapability)
-{
-    int i = 0;
-
-    if(!authEncrCapability)
-        return TI_NOK;
-
-    /* The current driver code version  uses the above hardcoded list */
-    /* of auth/encr pairs */
-
-    authEncrCapability->NoOfAuthEncrPairSupported = MAX_AUTH_ENCR_PAIR;
-    authEncrCapability->NoOfPMKIDs                = PMKID_MAX_NUMBER;
-
-    TRACE2(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrl get AuthEncr capability:  No. of auth/encr pairs = %d, No of PMKIDs = %d \n", authEncrCapability->NoOfAuthEncrPairSupported, authEncrCapability->NoOfPMKIDs);
-
-    /* Copy the hardcoded table of the auth.mode/cipher type */
-    for (i = 0; i < MAX_AUTH_ENCR_PAIR; i++)
-    {
-        authEncrCapability->authEncrPairs[i].authenticationMode = 
-            supportedAuthEncrPairs[i].authenticationMode;
-        authEncrCapability->authEncrPairs[i].cipherSuite        = 
-            supportedAuthEncrPairs[i].cipherSuite;
-
-        TRACE3(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrl get AuthEncr pair list: i = %d, auth mode = %d , cipher suite = %d \n", i, authEncrCapability->authEncrPairs[i].authenticationMode, authEncrCapability->authEncrPairs[i].cipherSuite);
-    }
-    
-    return TI_OK;
-}
-
-
-TI_STATUS admCtrl_nullSetPMKIDlist(admCtrl_t *pAdmCtrl, OS_802_11_PMKID  *pmkIdList)
-{
-
-    return CONFIGURATION_NOT_VALID;
-}
-
-TI_STATUS admCtrl_nullGetPMKIDlist(admCtrl_t *pAdmCtrl, OS_802_11_PMKID  *pmkIdList)
-{
-
-    return CONFIGURATION_NOT_VALID;
-}
-
-
-TI_STATUS admCtrl_resetPMKIDlist(admCtrl_t *pAdmCtrl)
-{
-
-    os_memoryZero(pAdmCtrl->hOs, (void*)&pAdmCtrl->pmkid_cache, sizeof(pmkid_cache_t));
-    return TI_OK;
-}
-
-TI_STATUS admCtrl_getWPAMixedModeSupport(admCtrl_t *pAdmCtrl, TI_UINT32 *support)
-{
-    
-    if(pAdmCtrl->WPAMixedModeEnable)
-       *support = ADMCTRL_WPA_OPTION_MAXVALUE;
-    else
-       *support = 0;
-
-    return TI_OK;
-}
-
-TI_STATUS admCtrl_getPromoteFlags(admCtrl_t *pAdmCtrl, TI_UINT32 *WPAPromoteFlags)
-{
-    *WPAPromoteFlags = pAdmCtrl->WPAPromoteFlags;
-    return TI_OK;
-}
-
-TI_STATUS admCtrl_setPromoteFlags(admCtrl_t *pAdmCtrl, TI_UINT32 WPAPromoteFlags)
-{
-    if(WPAPromoteFlags > ADMCTRL_WPA_OPTION_MAXVALUE)
-        return TI_NOK;
-
-    if(!pAdmCtrl->WPAMixedModeEnable)
-       return TI_NOK;
-
-    pAdmCtrl->WPAPromoteFlags = WPAPromoteFlags;
-    return TI_OK;
-}
-
-TI_BOOL admCtrl_nullGetPreAuthStatus(admCtrl_t *pAdmCtrl, TMacAddr *givenAP, TI_UINT8 *cacheIndex)
-{
-    return TI_FALSE;
-}
-
-
-TI_STATUS admCtrl_nullStartPreAuth(admCtrl_t *pAdmCtrl, TBssidList4PreAuth *pBssidList)
-{
-    return TI_OK;
-}
-
-TI_STATUS admCtrl_nullGet802_1x_AkmExists (admCtrl_t *pAdmCtrl, TI_BOOL *wpa_802_1x_AkmExists)
-{
-    *wpa_802_1x_AkmExists = TI_FALSE;
-    return TI_OK;
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name: admCtrl_notifyPreAuthStatus
-Routine Description: This routine is used to notify higher level application of the pre-authentication status
-Arguments: newStatus - pre authentication status
-Return Value:
------------------------------------------------------------------------------*/
-void admCtrl_notifyPreAuthStatus (admCtrl_t *pAdmCtrl, preAuthStatusEvent_e newStatus)
-{
-    TI_UINT32 memBuff;
-
-    memBuff = (TI_UINT32) newStatus;
-
-    EvHandlerSendEvent(pAdmCtrl->hEvHandler, IPC_EVENT_WPA2_PREAUTHENTICATION,
-                            (TI_UINT8*)&memBuff, sizeof(TI_UINT32));
-
-}
-
-#ifdef XCC_MODULE_INCLUDED
-
-/**
-*
-* admCtrl_setNetworkEap  - Set current Network EAP Mode Status.
-*
-* \b Description: 
-*
-* Set current Network EAP Mode Status..
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - networkEap - Network EAP Mode \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_setNetworkEap(admCtrl_t *pAdmCtrl, OS_XCC_NETWORK_EAP networkEap)
-{
-    if (pAdmCtrl==NULL)
-        return TI_NOK;
-
-    if (pAdmCtrl->networkEapMode == networkEap)
-    {
-        return TI_OK;
-    }
-    pAdmCtrl->networkEapMode = networkEap;
-    
-    return TI_OK;
-}
-
-/**
-*
-* admCtrl_getNetworkEap  - Get current Network EAP Mode Status.
-*
-* \b Description: 
-*
-* Get current Network EAP Mode Status.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - networkEap - Network EAP Mode \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrl_getNetworkEap(admCtrl_t *pAdmCtrl, OS_XCC_NETWORK_EAP *networkEap)
-{
-    
-    if (pAdmCtrl==NULL)
-    {
-        return TI_NOK;
-    }
-
-    switch (pAdmCtrl->networkEapMode)
-    {
-    case OS_XCC_NETWORK_EAP_OFF: 
-        *networkEap = OS_XCC_NETWORK_EAP_OFF;
-        break; 
-    case OS_XCC_NETWORK_EAP_ON:      
-    case OS_XCC_NETWORK_EAP_ALLOWED:
-    case OS_XCC_NETWORK_EAP_PREFERRED:
-        *networkEap = OS_XCC_NETWORK_EAP_ON;
-        break;
-    default:
-        return TI_NOK;
-/*      break; - unreachable */
-    }
-
-    return TI_OK;
-}
-#endif /* XCC_MODULE_INCLUDED*/
-
diff --git a/wl1271/stad/src/Connection_Managment/admCtrl.h b/wl1271/stad/src/Connection_Managment/admCtrl.h
deleted file mode 100644
index e9c14e3..0000000
--- a/wl1271/stad/src/Connection_Managment/admCtrl.h
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * admCtrl.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file admCtrl.h
- *  \brief Admission control API
- *
- *  \see admCtrl.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Admission Control                                             *
- *   PURPOSE: Admission Control Module API                                  *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _ADM_CTRL_H_
-#define _ADM_CTRL_H_
-
-#include "rsnApi.h"
-#include "TWDriver.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-typedef struct _admCtrl_t   admCtrl_t;
-
-/* RSN admission control prototypes */
-
-typedef TI_STATUS (*admCtrl_setAuthSuite_t)(admCtrl_t *pAdmCtrl, EAuthSuite authSuite);
-
-typedef TI_STATUS (*admCtrl_getAuthSuite_t)(admCtrl_t *pAdmCtrl, EAuthSuite *pSuite);
-
-typedef TI_STATUS (*admCtrl_setNetworkMode_t)(admCtrl_t *pAdmCtrl, ERsnNetworkMode mode);
-
-typedef TI_STATUS (*admCtrl_setUcastCipherSuite_t)(admCtrl_t *pAdmCtrl, ECipherSuite suite);
-
-typedef TI_STATUS (*admCtrl_setBcastCipherSuite_t)(admCtrl_t *pAdmCtrl, ECipherSuite suite);
-
-typedef TI_STATUS (*admCtrl_getCipherSuite_t)(admCtrl_t *pAdmCtrl, ECipherSuite *pSuite);
-
-typedef TI_STATUS (*admCtrl_setKeyMngSuite_t)(admCtrl_t *pAdmCtrl, ERsnKeyMngSuite suite);
-
-typedef TI_STATUS (*admCtrl_setExtAuthMode_t)(admCtrl_t *pAdmCtrl, EExternalAuthMode extAuthMode);
-
-typedef TI_STATUS (*admCtrl_getExtAuthMode_t)(admCtrl_t *pAdmCtrl, EExternalAuthMode *pExtAuthMode);
-
-typedef TI_STATUS (*admCtrl_getInfoElement_t)(admCtrl_t *pAdmCtrl, TI_UINT8 *pIe, TI_UINT32 *pLength);
-
-typedef TI_STATUS (*admCtrl_setSite_t)(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen);
-
-typedef TI_STATUS (*admCtrl_evalSite_t)(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSiteParams *pRsnSiteParams, TI_UINT32 *pEvaluation);
-
-typedef TI_STATUS (*admCtrl_setMixedMode_t)(admCtrl_t *pAdmCtrl, TI_BOOL mixedMode);
-
-typedef TI_STATUS (*admCtrl_getMixedMode_t)(admCtrl_t *pAdmCtrl, TI_BOOL *mixedMode);
-
-typedef TI_STATUS (*admCtrl_getAuthEncrCapability_t)(admCtrl_t *pAdmCtrl, 
-                                        rsnAuthEncrCapability_t   *authEncrCapability);
-
-typedef TI_STATUS (*admCtrl_setPMKIDlist_t)(admCtrl_t *pAdmCtrl, OS_802_11_PMKID  *pmkIdList);
-
-typedef TI_STATUS (*admCtrl_getPMKIDlist_t)(admCtrl_t *pAdmCtrl, OS_802_11_PMKID  *pmkIdList);
-
-typedef TI_STATUS (*admCtrl_resetPMKIDlist_t)(admCtrl_t *pAdmCtrl);
-
-typedef TI_STATUS (*admCtrl_sendPMKIDCandListAfterDelay_t)(admCtrl_t *pAdmCtrl, TI_UINT32 delay);
-
-typedef TI_STATUS (*admCtrl_setPromoteFlags_t)(admCtrl_t *pAdmCtrl, TI_UINT32 flags);
-
-typedef TI_STATUS (*admCtrl_getPromoteFlags_t)(admCtrl_t *pAdmCtrl, TI_UINT32 *flags);
-
-typedef TI_STATUS (*admCtrl_getWPAMixedModeSupport_t)(admCtrl_t *pAdmCtrl, TI_UINT32 *support);
-
-#ifdef XCC_MODULE_INCLUDED
-typedef TI_STATUS (*admCtrl_getNetworkEap_t)(admCtrl_t *pAdmCtrl, OS_XCC_NETWORK_EAP *networkEap);
-
-typedef TI_STATUS (*admCtrl_setNetworkEap_t)(admCtrl_t *pAdmCtrl, OS_XCC_NETWORK_EAP networkEap);
-#endif
-
-
-typedef TI_BOOL (*admCtrl_getPreAuthStatus_t)(admCtrl_t *pAdmCtrl, TMacAddr *givenAP, TI_UINT8 *cacheIndex);
-
-typedef TI_STATUS (*admCtrl_startPreAuth_t)(admCtrl_t *pAdmCtrl, TBssidList4PreAuth *pBssidList);
-
-typedef TI_STATUS (*admCtrl_get802_1x_AkmExists_t)(admCtrl_t *pAdmCtrl, TI_BOOL *wpa_802_1x_AkmExists);
-/* Constants */
-
-/* Flags for Any-WPA (WPA Mixed) mode) - set by the Supplicant  */
-#define ADMCTRL_WPA_OPTION_NONE  							0x00000000
-#define ADMCTRL_WPA_OPTION_ENABLE_PROMOTE_AUTH_MODE  	0x00000001
-#define ADMCTRL_WPA_OPTION_ENABLE_PROMOTE_CIPHER     	0x00000002
-
-#define ADMCTRL_WPA_OPTION_MAXVALUE                  	0x00000003
-
-
-/* Structures */
-
-/* PMKID cache structures                        */
-/* (PMKID cache used for WPA2 pre-authentication */
-
-#define PMKID_VALUE_SIZE  16
-typedef TI_UINT8 pmkidValue_t[PMKID_VALUE_SIZE];
-
-#define PMKID_MAX_NUMBER 16
-
-typedef struct 
-{
-   TMacAddr         bssId;
-   pmkidValue_t     pmkId;
-   TI_BOOL          preAuthenticate;
-
-} pmkidEntry_t;
-
-#define ADMCTRL_PMKID_CACHE_SIZE 32
-
-typedef struct 
-{
-   TSsid               ssid;
-   TI_UINT8            entriesNumber;
-   TI_UINT8            nextFreeEntry;
-   pmkidEntry_t        pmkidTbl[ADMCTRL_PMKID_CACHE_SIZE];
-} pmkid_cache_t;
-
-
-
-/* Admission control object */
-struct _admCtrl_t
-{
-    ERsnPaeRole             role;
-    EAuthSuite              authSuite;
-    ERsnNetworkMode         networkMode;
-    EExternalAuthMode       externalAuthMode;
-    ECipherSuite            unicastSuite;
-    ECipherSuite            broadcastSuite;
-    ERsnKeyMngSuite         keyMngSuite;
-    TI_BOOL                 wpaAkmExists;
-    TI_BOOL                 mixedMode;
-    TI_UINT8                AP_IP_Address[4];
-    TI_UINT16               replayCnt;
-    TI_UINT8                aironetIeReserved[8];
-    TI_BOOL                 encrInSw;
-    TI_BOOL                 micInSw;
-    TI_BOOL                 setSiteFirst;
-#ifdef XCC_MODULE_INCLUDED
-    OS_XCC_NETWORK_EAP      networkEapMode;
-#endif
-    TI_BOOL                 XCCSupport;
-    TI_BOOL                 proxyArpEnabled;
-
-    TI_BOOL                 WPAMixedModeEnable;
-    TI_UINT32               WPAPromoteFlags;    
-
-    TI_BOOL                 preAuthSupport;
-    TI_UINT32               preAuthTimeout;
-    TI_UINT8                MaxNumOfPMKIDs;
-    pmkid_cache_t           pmkid_cache;
-
-    struct _rsn_t           *pRsn;
-    TI_HANDLE               hMlme;
-    TI_HANDLE               hRx;
-    TI_HANDLE               hReport;
-    TI_HANDLE               hOs;
-    TI_HANDLE               hXCCMngr;
-    TI_HANDLE               hPowerMgr;
-    TI_HANDLE               hEvHandler;
-    TI_HANDLE               hTimer;
-    TI_HANDLE               hCurrBss;
-    TI_HANDLE               hSme;
-
-
-    admCtrl_setAuthSuite_t              setAuthSuite;
-    admCtrl_getAuthSuite_t              getAuthSuite;
-    admCtrl_setNetworkMode_t            setNetworkMode;
-    admCtrl_setUcastCipherSuite_t       setUcastSuite;
-    admCtrl_setBcastCipherSuite_t       setBcastSuite;
-    admCtrl_setExtAuthMode_t            setExtAuthMode;
-    admCtrl_getExtAuthMode_t            getExtAuthMode;
-    admCtrl_getCipherSuite_t            getCipherSuite;
-    admCtrl_setKeyMngSuite_t            setKeyMngSuite;
-    admCtrl_setMixedMode_t              setMixedMode;
-    admCtrl_getMixedMode_t              getMixedMode;
-    admCtrl_getInfoElement_t            getInfoElement;
-    admCtrl_setSite_t                   setSite;
-    admCtrl_evalSite_t                  evalSite;
-    admCtrl_getAuthEncrCapability_t     getAuthEncrCap;
-    admCtrl_setPMKIDlist_t              setPmkidList;
-    admCtrl_getPMKIDlist_t              getPmkidList;
-    admCtrl_resetPMKIDlist_t            resetPmkidList;
-    admCtrl_setPromoteFlags_t           setPromoteFlags;
-    admCtrl_getPromoteFlags_t           getPromoteFlags;
-    admCtrl_getWPAMixedModeSupport_t    getWPAMixedModeSupport;
-    admCtrl_get802_1x_AkmExists_t       get802_1x_AkmExists;
-
-
-#ifdef XCC_MODULE_INCLUDED
-    admCtrl_getNetworkEap_t         getNetworkEap;
-    admCtrl_setNetworkEap_t         setNetworkEap;
-#endif
-
-    admCtrl_getPreAuthStatus_t      getPreAuthStatus;
-    admCtrl_startPreAuth_t          startPreAuth;
-
-    void                            *hPreAuthTimerWpa2;
-    TI_UINT8                           numberOfPreAuthCandidates;
-};
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-admCtrl_t* admCtrl_create(TI_HANDLE hOs);
-
-TI_STATUS admCtrl_config (TI_HANDLE hAdmCtrl,
-                          TI_HANDLE hMlme,
-                          TI_HANDLE hRx,
-                          TI_HANDLE hReport,
-                          TI_HANDLE hOs,
-                          struct _rsn_t *pRsn,
-                          TI_HANDLE hXCCMngr,
-                          TI_HANDLE hPowerMgr,
-                          TI_HANDLE hEvHandler,
-                          TI_HANDLE hTimer,
-                          TI_HANDLE hCurrBss,
-                          TRsnInitParams *pInitParam);
-
-TI_STATUS admCtrl_unload(admCtrl_t *pAdmCtrl);
-
-TI_STATUS admCtrlNone_config(admCtrl_t *pAdmCtrl);
-
-TI_STATUS admCtrlWpa_config(admCtrl_t *pAdmCtrl);
-
-TI_STATUS admCtrl_parseIe(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 **pIe, TI_UINT8 IeId);
-
-TI_STATUS admCtrl_subConfig(TI_HANDLE hAdmCtrl);
-
-TI_STATUS admCtrl_nullSetPMKIDlist(admCtrl_t *pAdmCtrl, OS_802_11_PMKID  *pmkIdList);
-
-TI_STATUS admCtrl_nullGetPMKIDlist(admCtrl_t *pAdmCtrl, OS_802_11_PMKID  *pmkIdList);
-
-TI_STATUS admCtrl_resetPMKIDlist(admCtrl_t *pAdmCtrl);
-
-TI_BOOL admCtrl_nullGetPreAuthStatus(admCtrl_t *pAdmCtrl, TMacAddr *givenAP, TI_UINT8 *cacheIndex);
-
-TI_STATUS admCtrl_nullStartPreAuth(admCtrl_t *pAdmCtrl, TBssidList4PreAuth *pBssidList);
-
-TI_STATUS admCtrl_nullGet802_1x_AkmExists(admCtrl_t *pAdmCtrl, TI_BOOL *wpa_802_1x_AkmExists);
-
-void admCtrl_notifyPreAuthStatus (admCtrl_t *pAdmCtrl, preAuthStatusEvent_e newStatus);
-
-#endif /*  _ADM_H_*/
-
diff --git a/wl1271/stad/src/Connection_Managment/admCtrlNone.c b/wl1271/stad/src/Connection_Managment/admCtrlNone.c
deleted file mode 100644
index a468ab1..0000000
--- a/wl1271/stad/src/Connection_Managment/admCtrlNone.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * admCtrlNone.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file admCtrl.c
- *  \brief Admission control API implimentation
- *
- *  \see admCtrl.h
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Admission Control	    		                                *
- *   PURPOSE: Admission Control Module API                              	*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_17
-#include "osApi.h"
-#include "paramOut.h"
-#include "fsm.h"
-#include "report.h"
-#include "mlmeApi.h"
-#include "DataCtrl_Api.h"
-#include "rsn.h"
-#include "admCtrl.h"
-#include "admCtrlNone.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#include "admCtrlWpa.h"
-#include "admCtrlXCC.h"
-#endif
-#include "TWDriver.h"
-
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* Local functions definitions */
-
-/* Global variables */
-
-/* Function prototypes */
-
-/**
-*
-* admCtrlNone_config  - Configure empty admission control.
-*
-* \b Description: 
-*
-* Configure empty admission control.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrlNone_config(admCtrl_t *pAdmCtrl)
-{
-	TI_STATUS			status;
-	TRsnPaeConfig   	paeConfig;
-
-#ifdef XCC_MODULE_INCLUDED
-	TTwdParamInfo   	tTwdParam;
-#endif
-
-	if ((pAdmCtrl->authSuite !=	RSN_AUTH_OPEN ) &&
-		(pAdmCtrl->authSuite !=	RSN_AUTH_SHARED_KEY) &&
-		(pAdmCtrl->authSuite !=	RSN_AUTH_AUTO_SWITCH))	{
-		/* The default is OPEN */
-		pAdmCtrl->authSuite =	RSN_AUTH_OPEN;
-	}
-	
-	/* set admission control parameters */
-    pAdmCtrl->keyMngSuite = RSN_KEY_MNG_NONE;
-	pAdmCtrl->externalAuthMode = (EExternalAuthMode)pAdmCtrl->authSuite;
-	
-	/* set callback functions (API) */
-	pAdmCtrl->getInfoElement = admCtrlNone_getInfoElement;
-	pAdmCtrl->setSite = admCtrlNone_setSite;
-	pAdmCtrl->evalSite = admCtrlNone_evalSite;
-
-	pAdmCtrl->getPmkidList	 = admCtrl_nullGetPMKIDlist;
-	pAdmCtrl->setPmkidList	 = admCtrl_nullSetPMKIDlist;
-	pAdmCtrl->resetPmkidList = admCtrl_resetPMKIDlist;
-	pAdmCtrl->getPreAuthStatus = admCtrl_nullGetPreAuthStatus;
-	pAdmCtrl->startPreAuth	= admCtrl_nullStartPreAuth;
-    pAdmCtrl->get802_1x_AkmExists = admCtrl_nullGet802_1x_AkmExists;
-
-
-	
-	/* set cipher suite */
-	pAdmCtrl->broadcastSuite =  TWD_CIPHER_NONE;
-	pAdmCtrl->unicastSuite = TWD_CIPHER_NONE;
-
-
-	/* set PAE parametrs */
-	paeConfig.authProtocol = pAdmCtrl->externalAuthMode;
-	paeConfig.unicastSuite = pAdmCtrl->unicastSuite;
-	paeConfig.broadcastSuite = pAdmCtrl->broadcastSuite;
-	paeConfig.keyExchangeProtocol = pAdmCtrl->keyMngSuite;
-	/* set default PAE configuration */
-	status = pAdmCtrl->pRsn->setPaeConfig(pAdmCtrl->pRsn, &paeConfig);
-						
-#ifdef XCC_MODULE_INCLUDED
-	/* Clean MIC and KP in HAL and re-send WEP-keys  */
-	tTwdParam.paramType = TWD_RSN_XCC_SW_ENC_ENABLE_PARAM_ID; 
-	tTwdParam.content.rsnXCCSwEncFlag = TI_FALSE;
-	status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
-
-	tTwdParam.paramType = TWD_RSN_XCC_MIC_FIELD_ENABLE_PARAM_ID; 
-	tTwdParam.content.rsnXCCMicFieldFlag = TI_FALSE;
-	status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
-#endif /*XCC_MODULE_INCLUDED*/
-
-	return status;
-}
-
-
-/**
-*
-* admCtrlNone_getInfoElement - Get the current information element.
-*
-* \b Description: 
-*
-* Get the current information element.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - pIe - IE buffer \n
-*  I   - pLength - length of IE \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrlNone_getInfoElement(admCtrl_t *pAdmCtrl, TI_UINT8 *pIe, TI_UINT32 *pLength)
-{
-	*pLength = 0;
-	pIe = NULL;
-
-	TI_VOIDCAST(pIe);
-	return TI_OK;
-}
-/**
-*
-* admCtrlNone_setSite  - Set current primary site parameters for registration.
-*
-* \b Description: 
-*
-* Set current primary site parameters for registration.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - pRsnData - site's RSN data \n
-*  O   - pAssocIe - result IE of evaluation \n
-*  O   - pAssocIeLen - length of result IE of evaluation \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on site is aproved, TI_NOK on site is rejected.
-*
-* \sa 
-*/
-TI_STATUS admCtrlNone_setSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen)
-{
-	TI_STATUS			status;
-	paramInfo_t			param;
-	TTwdParamInfo		tTwdParam;
-	EAuthSuite			authSuite;
-
-	admCtrlNone_config(pAdmCtrl);
-
-	authSuite = pAdmCtrl->authSuite;
-
-  /* Config the default keys */
-	if ((authSuite == RSN_AUTH_SHARED_KEY) || (authSuite == RSN_AUTH_AUTO_SWITCH))
-	{   /* Configure Security status in HAL */
-		tTwdParam.paramType = TWD_RSN_SECURITY_MODE_PARAM_ID;
-		tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_WEP;
-		status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
-		/* Configure the keys in HAL */
-		rsn_setDefaultKeys(pAdmCtrl->pRsn);
-	}
-
-#ifdef XCC_MODULE_INCLUDED
-	admCtrlXCC_setExtendedParams(pAdmCtrl, pRsnData);
-#endif
-
-	/* Now we configure the MLME module with the 802.11 legacy authentication suite, 
-		THe MLME will configure later the authentication module */
-	param.paramType = MLME_LEGACY_TYPE_PARAM;
-	switch (authSuite)
-	{
-	case RSN_AUTH_OPEN:
-		param.content.mlmeLegacyAuthType = AUTH_LEGACY_OPEN_SYSTEM;
-		break;
-
-	case RSN_AUTH_SHARED_KEY: 
-		param.content.mlmeLegacyAuthType = AUTH_LEGACY_SHARED_KEY;
-		break;
-
-	case RSN_AUTH_AUTO_SWITCH:
-		param.content.mlmeLegacyAuthType = AUTH_LEGACY_AUTO_SWITCH;
-		break;
-
-	default:
-		return TI_NOK;
-	}
-	
-	status = mlme_setParam(pAdmCtrl->hMlme, &param);
-	if (status != TI_OK)
-	{
-		return status;
-	}
-
-	param.paramType = RX_DATA_EAPOL_DESTINATION_PARAM;
-	param.content.rxDataEapolDestination = OS_ABS_LAYER;
-	status = rxData_setParam(pAdmCtrl->hRx, &param);
-	if (status != TI_OK)
-	{
-		return status;
-	}
-
-	/* Configure privacy status in HAL */
-	if (authSuite == RSN_AUTH_OPEN)
-	{
-		tTwdParam.paramType = TWD_RSN_SECURITY_MODE_PARAM_ID;
-		tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_NONE;
-		status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
-	}
-
-	return status;
-}
-
-/**
-*
-* admCtrlNone_evalSite  - Evaluate site for registration.
-*
-* \b Description: 
-*
-* evaluate site RSN capabilities against the station's cap.
-* If the BSS type is infrastructure, the station matches the site only if it's WEP status is same as the site
-* In IBSS, it does not matter
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - Context \n
-*  I   - pRsnData - site's RSN data \n
-*  O   - pEvaluation - Result of evaluation \n
-*  
-* \b RETURNS:
-*
-*  TI_OK 
-*
-* \sa 
-*/
-TI_STATUS admCtrlNone_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSiteParams *pRsnSiteParams, TI_UINT32 *pEvaluation)
-{
-	if ((pAdmCtrl==NULL) || (pEvaluation==NULL)){
-		return TI_NOK;
-	}
-	*pEvaluation = 1;
-	
-	/* Check privacy bit if not in mixed mode */
-	if (!pAdmCtrl->mixedMode)
-	{   /* There's no mixed mode, so make sure that the privacy Bit is off*/
-		if (pRsnData->privacy)
-		{
-			*pEvaluation = 0;
-			return TI_NOK;
-		}
-	}
-
-    TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlNone_evalSite:  pEvaluation=%d\n\n", *pEvaluation);
-
-   	return TI_OK;
-	
-}
-
-
diff --git a/wl1271/stad/src/Connection_Managment/admCtrlNone.h b/wl1271/stad/src/Connection_Managment/admCtrlNone.h
deleted file mode 100644
index eb2298f..0000000
--- a/wl1271/stad/src/Connection_Managment/admCtrlNone.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * admCtrlNone.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file admCtrlNone.h
- *  \brief Admission control for None API
- *
- *  \see admCtrl.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Admission Control	    		                                *
- *   PURPOSE: Admission Control Module API                              	*
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _ADM_CTRL_NONE_H_
-#define _ADM_CTRL_NONE_H_
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-
-/* RSN admission control prototypes */
-
-
-/* Structures */
-
-
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS admCtrlNone_config(admCtrl_t *pAdmCtrl);
-
-TI_STATUS admCtrlNone_getInfoElement(admCtrl_t *pAdmCtrl, TI_UINT8 *pIe, TI_UINT32 *pLength);
-
-TI_STATUS admCtrlNone_setSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen);
-
-TI_STATUS admCtrlNone_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSiteParams *pRsnSiteParams, TI_UINT32 *pEvaluation);
-
-#endif /*  _ADM_CTRL_NONE_H_*/
-
diff --git a/wl1271/stad/src/Connection_Managment/admCtrlWep.c b/wl1271/stad/src/Connection_Managment/admCtrlWep.c
deleted file mode 100644
index 36732c0..0000000
--- a/wl1271/stad/src/Connection_Managment/admCtrlWep.c
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * admCtrlWep.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file admCtrlWep.c
- *  \brief Admission control API implimentation
- *
- *  \see admCtrl.h
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Admission Control	    		                                *
- *   PURPOSE: Admission Control Module API                              	*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_18
-#include "osApi.h"
-#include "paramOut.h"
-#include "fsm.h"
-#include "report.h"
-#include "mlmeApi.h"
-#include "DataCtrl_Api.h"
-#include "rsnApi.h"
-#include "admCtrl.h"
-#include "rsn.h"
-#include "admCtrl.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "admCtrlWpa.h"
-#include "admCtrlXCC.h"
-#endif
-#include "TWDriver.h"
-
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* Local functions definitions */
-
-/* Global variables */
-
-/* Function prototypes */
-TI_STATUS admCtrlWep_getInfoElement(admCtrl_t *pAdmCtrl, TI_UINT8 *pIe, TI_UINT32 *pLength);
-
-TI_STATUS admCtrlWep_setSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen);
-
-TI_STATUS admCtrlWep_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSiteParams *pRsnSiteParams, TI_UINT32 *pEvaluation);
-
-
-/**
-*
-* admCtrlWep_config  - Configure XCC admission control.
-*
-* \b Description: 
-*
-* Configure XCC admission control.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrlWep_config(admCtrl_t *pAdmCtrl)
-{
-	TI_STATUS			status;
-	TRsnPaeConfig   	paeConfig;
-
-	
-	/* set admission control parameters */
-	pAdmCtrl->externalAuthMode = (EExternalAuthMode)pAdmCtrl->authSuite;	   
-	if ((pAdmCtrl->unicastSuite != TWD_CIPHER_WEP) && 
-		(pAdmCtrl->unicastSuite != TWD_CIPHER_CKIP))
-	{
-		pAdmCtrl->unicastSuite = TWD_CIPHER_WEP;
-	}
-	
-	if ((pAdmCtrl->broadcastSuite != TWD_CIPHER_WEP) && 
-		(pAdmCtrl->broadcastSuite != TWD_CIPHER_CKIP))
-	{
-		pAdmCtrl->broadcastSuite = TWD_CIPHER_WEP;
-	}
-
-	/* set callback functions (API) */
-	pAdmCtrl->getInfoElement = admCtrlWep_getInfoElement;
-	pAdmCtrl->setSite = admCtrlWep_setSite;
-	pAdmCtrl->evalSite = admCtrlWep_evalSite;
-	pAdmCtrl->getPreAuthStatus = admCtrl_nullGetPreAuthStatus;
-	pAdmCtrl->startPreAuth	= admCtrl_nullStartPreAuth;
-    pAdmCtrl->get802_1x_AkmExists = admCtrl_nullGet802_1x_AkmExists;
-
-
-		
-	pAdmCtrl->keyMngSuite = RSN_KEY_MNG_802_1X;
-
-	/* set PAE parametrs */
-	paeConfig.authProtocol = pAdmCtrl->externalAuthMode;
-	paeConfig.unicastSuite = pAdmCtrl->unicastSuite;
-	paeConfig.broadcastSuite = pAdmCtrl->broadcastSuite;
-	paeConfig.keyExchangeProtocol = pAdmCtrl->keyMngSuite;
-	/* set default PAE configuration */
-	status = pAdmCtrl->pRsn->setPaeConfig(pAdmCtrl->pRsn, &paeConfig);
-
-	return status;
-}
-
- 
-/**
-*
-* admCtrlWep_getInfoElement - Build the current information element.
-*
-* \b Description: 
-*
-* Build the current information element.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - pIe - IE buffer \n
-*  I   - pLength - length of IE \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*							  
-* \sa 
-*/
-TI_STATUS admCtrlWep_getInfoElement(admCtrl_t *pAdmCtrl, TI_UINT8 *pIe, TI_UINT32 *pLength)
-{
-	 
-	if ((pAdmCtrl==NULL) || (pLength==NULL)) 
-	{
-		return TI_NOK;
-	}
-	*pLength = 0;
-	return TI_OK;
-
-}
-/**
-*
-* admCtrlWep_setSite  - Set current primary site parameters for registration.
-*
-* \b Description: 
-*
-* Set current primary site parameters for registration.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - pRsnData - site's RSN data \n
-*  O   - pAssocIe - result IE of evaluation \n
-*  O   - pAssocIeLen - length of result IE of evaluation \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on site is aproved, TI_NOK on site is rejected.
-*
-* \sa 
-*/
-TI_STATUS admCtrlWep_setSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen)
-{
-	TI_STATUS			status;
-	paramInfo_t			param;
-    TTwdParamInfo       tTwdParam;
-	EAuthSuite			authSuite;
-
-#ifdef XCC_MODULE_INCLUDED
-	if (mlmeParser_ParseIeBuffer (pAdmCtrl->hMlme, pRsnData->pIe, pRsnData->ieLen, XCC_EXT_1_IE_ID, NULL, NULL, 0))
-	{
-		pAdmCtrl->XCCSupport = TI_TRUE;
-		return (admCtrlXCC_setSite(pAdmCtrl, pRsnData, pAssocIe, pAssocIeLen));
-	}
-#endif
-
-
-	pAdmCtrl->XCCSupport = TI_FALSE;
-	pAdmCtrl->unicastSuite = TWD_CIPHER_WEP;
-	pAdmCtrl->broadcastSuite = TWD_CIPHER_WEP;
-
-	admCtrlWep_config(pAdmCtrl);
-
-	authSuite = pAdmCtrl->authSuite;
-
-  /* Config the default keys */
-	if ((authSuite == RSN_AUTH_SHARED_KEY) || (authSuite == RSN_AUTH_AUTO_SWITCH))
-	{	/* Configure Security status in HAL */
-		tTwdParam.paramType = TWD_RSN_SECURITY_MODE_PARAM_ID;
-		tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_WEP;
-		status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
-		/* Configure the keys in HAL */
-		rsn_setDefaultKeys(pAdmCtrl->pRsn);
-	}
-
-
-	/* Now we configure the MLME module with the 802.11 legacy authentication suite, 
-		THe MLME will configure later the authentication module */
-	param.paramType = MLME_LEGACY_TYPE_PARAM;
-#ifdef XCC_MODULE_INCLUDED	
-	if (pAdmCtrl->networkEapMode!=OS_XCC_NETWORK_EAP_OFF)
-    {
-        param.content.mlmeLegacyAuthType = AUTH_LEGACY_RESERVED1;
-    }
-    else
-#endif
-    {
-        switch (authSuite)
-        {
-        case RSN_AUTH_OPEN:
-            param.content.mlmeLegacyAuthType = AUTH_LEGACY_OPEN_SYSTEM;
-            break;
-
-        case RSN_AUTH_SHARED_KEY: 
-            param.content.mlmeLegacyAuthType = AUTH_LEGACY_SHARED_KEY;
-            break;
-
-        case RSN_AUTH_AUTO_SWITCH:
-            param.content.mlmeLegacyAuthType = AUTH_LEGACY_AUTO_SWITCH;
-            TRACE0(pAdmCtrl->hReport , REPORT_SEVERITY_INFORMATION, "WEP admCtrl mlme_setParam, RSN_AUTH_AUTO_SWITCH\n");
-            break;
-
-        default:
-            return TI_NOK;
-        }
-    }
-	
-	status = mlme_setParam(pAdmCtrl->hMlme, &param);
-	if (status != TI_OK)
-	{
-		return status;
-	}
-
-	param.paramType = RX_DATA_EAPOL_DESTINATION_PARAM;
-	param.content.rxDataEapolDestination = OS_ABS_LAYER;
-	status = rxData_setParam(pAdmCtrl->hRx, &param);
-	if (status != TI_OK)
-	{
-		return status;
-	}
-
-	/* Configure Security status in HAL */
-    tTwdParam.paramType = TWD_RSN_SECURITY_MODE_PARAM_ID;
-    tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_WEP;
-    status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
-
-	return status;
-
-}
-
-/**
-*
-* admCtrlWep_evalSite  - Evaluate site for registration.
-*
-* \b Description: 
-*
-* evaluate site RSN capabilities against the station's cap.
-* If the BSS type is infrastructure, the station matches the site only if it's WEP status is same as the site
-* In IBSS, it does not matter
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - Context \n
-*  I   - pRsnData - site's RSN data \n
-*  O   - pEvaluation - Result of evaluation \n
-*  
-* \b RETURNS:
-*
-*  TI_OK 
-*
-* \sa 
-*/
-TI_STATUS admCtrlWep_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSiteParams *pRsnSiteParams, TI_UINT32 *pEvaluation)
-{
-	*pEvaluation = 0;
-	
-	if (pRsnData==NULL)
-	{
-		return TI_NOK;
-	}
-    pAdmCtrl->setSiteFirst = TI_FALSE;
-
-#ifdef XCC_MODULE_INCLUDED
-	if (admCtrlXCC_evalSite(pAdmCtrl, pRsnData, pRsnSiteParams, pEvaluation, &pAdmCtrl->XCCSupport) != TI_OK)
-    {
-        return TI_NOK;
-    }
-#else
-	pAdmCtrl->XCCSupport = TI_FALSE;
-#endif /*XCC_MODULE_INCLUDED*/
-	if (!pAdmCtrl->XCCSupport)
-	{	/* WEP only */
-		*pEvaluation = 1;
-	}
-
-	/* Check privacy bit if not in mixed mode */
-	if (!pAdmCtrl->mixedMode)
-	{	/* There's no mixed mode, so make sure that the privacy Bit matches the privacy mode*/
-		if (!pRsnData->privacy)
-			{
-				*pEvaluation = 0;
-                return TI_NOK;
-			}
-	}
-
-	return TI_OK;
-}
-
-
-
-
diff --git a/wl1271/stad/src/Connection_Managment/admCtrlWep.h b/wl1271/stad/src/Connection_Managment/admCtrlWep.h
deleted file mode 100644
index 3397b81..0000000
--- a/wl1271/stad/src/Connection_Managment/admCtrlWep.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * admCtrlWep.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file admCtrlWep.h
- *  \brief Admission control for XCC API
- *
- *  \see admCtrl.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Admission Control	    		                                *
- *   PURPOSE: Admission Control Module API                              	*
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _ADM_CTRL_WEP_H_
-#define _ADM_CTRL_WEP_H_
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-
-/* RSN admission control prototypes */
-
-
-/* Structures */
-
-
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS admCtrlWep_config(admCtrl_t *pAdmCtrl);
-
-TI_STATUS admCtrlWep_getInfoElement(admCtrl_t *pAdmCtrl, TI_UINT8 *pIe, TI_UINT32 *pLength);
-
-TI_STATUS admCtrlWep_setSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen);
-
-TI_STATUS admCtrlWep_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSiteParams *pRsnSiteParams, TI_UINT32 *pEvaluation);
-
-#endif /*  _ADM_CTRL_WEP_H_*/
diff --git a/wl1271/stad/src/Connection_Managment/admCtrlWpa.c b/wl1271/stad/src/Connection_Managment/admCtrlWpa.c
deleted file mode 100644
index 4eaa0f5..0000000
--- a/wl1271/stad/src/Connection_Managment/admCtrlWpa.c
+++ /dev/null
@@ -1,1364 +0,0 @@
-/*
- * admCtrlWpa.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file admCtrl.c
- *  \brief Admission control API implimentation
- *
- *  \see admCtrl.h
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Admission Control	    		                                *
- *   PURPOSE: Admission Control Module API                              	*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_19
-#include "osApi.h"
-#include "paramOut.h"
-#include "mlmeApi.h"
-#include "802_11Defs.h"
-#include "DataCtrl_Api.h"
-#include "report.h"
-#include "rsn.h"
-#include "admCtrl.h"
-#include "admCtrlWpa.h"
-#include "admCtrlWpa2.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "admCtrlXCC.h"
-#include "XCCMngr.h"
-#endif
-#include "siteMgrApi.h"
-#include "TWDriver.h"
-
-/* Constants */
-#define MAX_NETWORK_MODE 2
-#define MAX_WPA_CIPHER_SUITE 7
-
-
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* Local functions definitions */
-
-/* Global variables */
-
-static TI_UINT8 wpaIeOuiIe[3] = { 0x00, 0x50, 0xf2};
-
-static TI_BOOL broadcastCipherSuiteValidity[MAX_NETWORK_MODE][MAX_WPA_CIPHER_SUITE]=
-{
-    /* RSN_IBSS */  {
-/* NONE		  */    TI_FALSE,
-/* WEP40	  */    TI_FALSE,
-/* TKIP		  */    TI_TRUE,
-/* AES_WRAP	  */    TI_TRUE,
-/* AES_CCMP	  */    TI_TRUE,
-/* WEP104     */    TI_FALSE,
-/* CKIP       */    TI_FALSE},
-
-    /* RSN_INFRASTRUCTURE */  {
-/* NONE		  */    TI_FALSE,
-/* WEP		  */    TI_TRUE,
-/* TKIP		  */    TI_TRUE,
-/* AES_WRAP	  */    TI_TRUE,
-/* AES_CCMP	  */    TI_TRUE,
-/* WEP104     */    TI_TRUE,
-/* CKIP       */    TI_TRUE}
-};
-
-/** WPA admission table. Used to verify admission parameters to an AP */
-/* table parameters:
-    Max unicast cipher in the IE
-    Max broadcast cipher in the IE
-    Encryption status 
-*/
-typedef struct
-{
-    TI_STATUS        status;
-    ECipherSuite     unicast;
-    ECipherSuite     broadcast;
-    TI_UINT8            evaluation; 
-} admCtrlWpa_validity_t;
-
-static admCtrlWpa_validity_t    admCtrlWpa_validityTable[MAX_WPA_CIPHER_SUITE][MAX_WPA_CIPHER_SUITE][MAX_WPA_CIPHER_SUITE] =
-{
-/* AP unicast NONE */ {
-        /* AP multicast NONE */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP40 */ { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP40 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP40 */ { TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_WEP ,1},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_WEP104 ,1}},
-        /* AP multicast TKIP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_TKIP ,2},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WRAP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_AES_WRAP ,3},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast CCMP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_AES_CCMP ,3},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP104 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP40 */ { TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_WEP ,1},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_WEP104 ,1}}},
-/* AP unicast WEP */  {
-        /* AP multicast NONE */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_OK,  TWD_CIPHER_WEP,  TWD_CIPHER_WEP ,1},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_OK,  TWD_CIPHER_WEP,  TWD_CIPHER_WEP ,1},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast TKIP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WRAP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast CCMP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP104 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}}},
-/* AP unicast TKIP */  {
-        /* AP multicast NONE */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_OK,  TWD_CIPHER_TKIP, TWD_CIPHER_WEP  ,4},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast TKIP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_OK,  TWD_CIPHER_TKIP, TWD_CIPHER_TKIP ,7},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WRAP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast CCMP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP104 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_OK,  TWD_CIPHER_TKIP, TWD_CIPHER_WEP104 ,4},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}}},
-/* AP unicast AES_WRAP */ {
-        /* AP multicast NONE */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP40 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_OK,  TWD_CIPHER_AES_WRAP, TWD_CIPHER_WEP ,5},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast TKIP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_OK,  TWD_CIPHER_AES_WRAP, TWD_CIPHER_TKIP ,6},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WRAP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_OK,  TWD_CIPHER_AES_WRAP, TWD_CIPHER_AES_WRAP ,8},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast CCMP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP104 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_OK,  TWD_CIPHER_AES_WRAP, TWD_CIPHER_WEP104 ,5},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}}},
-/* AP unicast AES_CCMP */ {
-        /* AP multicast NONE */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_OK,  TWD_CIPHER_AES_CCMP, TWD_CIPHER_WEP ,5},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast TKIP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_OK,  TWD_CIPHER_AES_CCMP, TWD_CIPHER_TKIP ,6},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WRAP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast CCMP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_OK,  TWD_CIPHER_AES_CCMP, TWD_CIPHER_AES_CCMP ,7},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_OK,  TWD_CIPHER_AES_CCMP, TWD_CIPHER_WEP104 ,5},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}}},
-/* AP unicast WEP104 */  {
-        /* AP multicast NONE */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast TKIP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WRAP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast CCMP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP104 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_OK,  TWD_CIPHER_WEP104, TWD_CIPHER_WEP104 ,1},
-            /* STA WEP104 */{ TI_OK,  TWD_CIPHER_WEP104, TWD_CIPHER_WEP104 ,1}}}
-
-
-};
-
-/* Function prototypes */
-TI_STATUS admCtrlWpa_parseIe(admCtrl_t *pAdmCtrl, TI_UINT8 *pWpaIe, wpaIeData_t *pWpaData);
-TI_UINT16 admCtrlWpa_buildCapabilities(TI_UINT16 replayCnt);
-TI_UINT32  admCtrlWpa_parseSuiteVal(admCtrl_t *pAdmCtrl, TI_UINT8* suiteVal,wpaIeData_t *pWpaData,TI_UINT32 maxVal);
-TI_STATUS admCtrlWpa_checkCipherSuiteValidity (ECipherSuite unicastSuite, ECipherSuite broadcastSuite, ECipherSuite encryptionStatus);
-static TI_STATUS admCtrlWpa_get802_1x_AkmExists (admCtrl_t *pAdmCtrl, TI_BOOL *wpa_802_1x_AkmExists);
-
-
-/**
-*
-* admCtrlWpa_config  - Configure XCC admission control.
-*
-* \b Description: 
-*
-* Configure XCC admission control.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa_config(admCtrl_t *pAdmCtrl)
-{
-    TI_STATUS           status;
-    TRsnPaeConfig       paeConfig;
-
-    /* check and set admission control default parameters */
-    pAdmCtrl->authSuite =   RSN_AUTH_OPEN;
-    if (pAdmCtrl->unicastSuite == TWD_CIPHER_NONE)
-    {
-        pAdmCtrl->unicastSuite = TWD_CIPHER_TKIP;
-    }
-    if (pAdmCtrl->broadcastSuite == TWD_CIPHER_NONE)
-    {
-        pAdmCtrl->broadcastSuite = TWD_CIPHER_TKIP;
-    }
-
-    /* set callback functions (API) */
-    pAdmCtrl->getInfoElement = admCtrlWpa_getInfoElement;
-    pAdmCtrl->setSite = admCtrlWpa_setSite;
-    pAdmCtrl->evalSite = admCtrlWpa_evalSite;
-
-    pAdmCtrl->getPmkidList      = admCtrl_nullGetPMKIDlist;
-    pAdmCtrl->setPmkidList      = admCtrl_nullSetPMKIDlist;
-    pAdmCtrl->resetPmkidList    = admCtrl_resetPMKIDlist;
-    pAdmCtrl->getPreAuthStatus = admCtrl_nullGetPreAuthStatus;
-	pAdmCtrl->startPreAuth	= admCtrl_nullStartPreAuth;
-    pAdmCtrl->get802_1x_AkmExists = admCtrlWpa_get802_1x_AkmExists;
-
-    /* set cipher suite */                                  
-    switch (pAdmCtrl->externalAuthMode)
-    {
-    case RSN_EXT_AUTH_MODE_WPA:
-    case RSN_EXT_AUTH_MODE_WPAPSK:
-        /* The cipher suite should be set by the External source via 
-        the Encryption field*/
-        pAdmCtrl->keyMngSuite = RSN_KEY_MNG_802_1X;
-        break;
-    case RSN_EXT_AUTH_MODE_WPANONE:
-        pAdmCtrl->keyMngSuite = RSN_KEY_MNG_NONE;
-        /* Not supported */
-    default:
-        return TI_NOK;
-    }
-
-
-    paeConfig.authProtocol = pAdmCtrl->externalAuthMode;
-    paeConfig.unicastSuite = pAdmCtrl->unicastSuite;
-    paeConfig.broadcastSuite = pAdmCtrl->broadcastSuite;
-    paeConfig.keyExchangeProtocol = pAdmCtrl->keyMngSuite;
-	/* set default PAE configuration */
-    status = pAdmCtrl->pRsn->setPaeConfig(pAdmCtrl->pRsn, &paeConfig);
-
-    return status;
-}
-
-
-
-
-TI_STATUS admCtrlWpa_dynamicConfig(admCtrl_t *pAdmCtrl,wpaIeData_t *pWpaData)
-{
-    TI_STATUS           status;
-    TRsnPaeConfig       paeConfig;
-
-
-    /* set callback functions (API) */
-    pAdmCtrl->getInfoElement = admCtrlWpa_getInfoElement;
-
-    switch (pAdmCtrl->externalAuthMode)
-    {
-    case RSN_EXT_AUTH_MODE_WPA:
-    case RSN_EXT_AUTH_MODE_WPAPSK:
-        /* The cipher suite should be set by the External source via 
-        the Encryption field*/
-        pAdmCtrl->keyMngSuite = RSN_KEY_MNG_802_1X;
-        break;
-    case RSN_EXT_AUTH_MODE_WPANONE:
-        pAdmCtrl->keyMngSuite = RSN_KEY_MNG_NONE;
-        /* Not supported */
-    default:
-        return TI_NOK;
-    }
-
-
-    paeConfig.authProtocol = pAdmCtrl->externalAuthMode;
-    paeConfig.unicastSuite = pWpaData->unicastSuite[0];
-    paeConfig.broadcastSuite = pWpaData->broadcastSuite;
-    paeConfig.keyExchangeProtocol = pAdmCtrl->keyMngSuite;
-	/* set default PAE configuration */
-    status = pAdmCtrl->pRsn->setPaeConfig(pAdmCtrl->pRsn, &paeConfig);
-
-    return status;
-}
-
-/**
-*
-* admCtrlWpa_getInfoElement - Get the current information element.
-*
-* \b Description: 
-*
-* Get the current information element.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - pIe - IE buffer \n
-*  I   - pLength - length of IE \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-
-TI_STATUS admCtrlWpa_getInfoElement(admCtrl_t *pAdmCtrl, TI_UINT8 *pIe, TI_UINT32 *pLength)
-{
-    wpaIePacket_t   localWpaPkt;
-    wpaIePacket_t   *pWpaIePacket;
-    TI_UINT8        length;
-    TI_UINT16       tempInt;
-    TIWLN_SIMPLE_CONFIG_MODE wscMode;
-
-    /* Get Simple-Config state */
-    siteMgr_getParamWSC(pAdmCtrl->pRsn->hSiteMgr, &wscMode); /* SITE_MGR_SIMPLE_CONFIG_MODE */
-
-    if (pIe==NULL)
-    {
-        *pLength = 0;
-        return TI_NOK;
-    }
-
-    if ((wscMode != TIWLN_SIMPLE_CONFIG_OFF) && 
-        (pAdmCtrl->broadcastSuite == TWD_CIPHER_NONE) && 
-        (pAdmCtrl->unicastSuite == TWD_CIPHER_NONE))
-    {
-      *pLength = 0;
-      return TI_NOK;
-    }
-    
-    /* Check validity of WPA IE */
-    if (!broadcastCipherSuiteValidity[pAdmCtrl->networkMode][pAdmCtrl->broadcastSuite])
-    {   /* check Group suite validity */                                          
-        *pLength = 0;
-        return TI_NOK;
-    }
-   
-    
-    if (pAdmCtrl->unicastSuite == TWD_CIPHER_WEP)
-    {   /* check pairwise suite validity */                                       
-        *pLength = 0;
-        return TI_NOK;
-    }
-
-    /* Build Wpa IE */
-    pWpaIePacket = &localWpaPkt;
-    os_memoryZero(pAdmCtrl->hOs, pWpaIePacket, sizeof(wpaIePacket_t));
-    pWpaIePacket->elementid= WPA_IE_ID;
-    os_memoryCopy(pAdmCtrl->hOs, (void *)pWpaIePacket->oui, wpaIeOuiIe, 3);
-    pWpaIePacket->ouiType = WPA_OUI_DEF_TYPE;
-
-	tempInt = WPA_OUI_MAX_VERSION;
-	COPY_WLAN_WORD(&pWpaIePacket->version, &tempInt);
-
-    length = sizeof(wpaIePacket_t)-2;
-
-    /* check defaults */
-    if (pAdmCtrl->replayCnt==1)
-    {
-        length -= 2; /* 2: capabilities + 4: keyMng suite, 2: keyMng count*/
-#if 0 /* The following was removed since there are APs which do no accept
-	the default WPA IE */
-		if (pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPA)
-		{
-			length -= 6; /* 2: capabilities + 4: keyMng suite, 2: keyMng count*/
-			if (pAdmCtrl->unicastSuite == TWD_CIPHER_TKIP)
-			{
-				length -= 6; /* 4: unicast suite, 2: unicast count */
-				if (pAdmCtrl->broadcastSuite == TWD_CIPHER_TKIP)
-				{
-					length -= 4;  /* broadcast suite */
-				}
-			}
-		}
-#endif
-	}
-
-    pWpaIePacket->length = length;
-    *pLength = length+2;
-
-	if (length>=WPA_IE_MIN_DEFAULT_LENGTH)
-    {   /* build Capabilities */
-        pWpaIePacket->capabilities = ENDIAN_HANDLE_WORD(admCtrlWpa_buildCapabilities(pAdmCtrl->replayCnt));
-	}
-
-	if (length>=WPA_IE_MIN_KEY_MNG_SUITE_LENGTH(1))
-	{
-        /* build keyMng suite */
-
-		tempInt = 0x0001;
-		COPY_WLAN_WORD(&pWpaIePacket->authKeyMngSuiteCnt, &tempInt);
-
-        os_memoryCopy(pAdmCtrl->hOs, (void *)pWpaIePacket->authKeyMngSuite, wpaIeOuiIe, 3);
-        
-        switch (pAdmCtrl->externalAuthMode)
-        {
-        case RSN_EXT_AUTH_MODE_OPEN:
-        case RSN_EXT_AUTH_MODE_SHARED_KEY:
-        case RSN_EXT_AUTH_MODE_AUTO_SWITCH:
-            pWpaIePacket->authKeyMngSuite[3] = WPA_IE_KEY_MNG_NONE;
-            break;
-		case RSN_EXT_AUTH_MODE_WPA:
-			{
-#ifdef XCC_MODULE_INCLUDED
-				TI_UINT8	akmSuite[DOT11_OUI_LEN];
-
-				if (admCtrlXCC_getCckmAkm(pAdmCtrl, akmSuite))
-				{
-					os_memoryCopy(pAdmCtrl->hOs, (void*)pWpaIePacket->authKeyMngSuite, akmSuite, DOT11_OUI_LEN);
-				}
-				else
-#endif
-				{
-					pWpaIePacket->authKeyMngSuite[3] = WPA_IE_KEY_MNG_801_1X;
-				}
-			}
-
-            break;
-
-        case RSN_EXT_AUTH_MODE_WPAPSK:
-            pWpaIePacket->authKeyMngSuite[3] = WPA_IE_KEY_MNG_PSK_801_1X;
-            break;
-        default:
-            pWpaIePacket->authKeyMngSuite[3] = WPA_IE_KEY_MNG_NONE;
-            break;
-        }
-         
-    }
-
-    
-    if (length>=WPA_IE_MIN_PAIRWISE_SUITE_LENGTH)
-    {  
- 
-#ifdef XCC_MODULE_INCLUDED       
-        if ((pAdmCtrl->pRsn->paeConfig.unicastSuite==TWD_CIPHER_CKIP) || 
-            (pAdmCtrl->pRsn->paeConfig.broadcastSuite==TWD_CIPHER_CKIP))
-        {
-           admCtrlXCC_getWpaCipherInfo(pAdmCtrl,pWpaIePacket);
-        }
-        else
-#endif
-        {
-        
-            /* build pairwise suite */
-
-			tempInt = 0x0001;
-			COPY_WLAN_WORD(&pWpaIePacket->pairwiseSuiteCnt, &tempInt);
-
-            os_memoryCopy(pAdmCtrl->hOs, (void *)pWpaIePacket->pairwiseSuite, wpaIeOuiIe, 3);
-            pWpaIePacket->pairwiseSuite[3] = (TI_UINT8)pAdmCtrl->pRsn->paeConfig.unicastSuite;
-       
-            if (length>=WPA_IE_GROUP_SUITE_LENGTH)
-            {   /* build group suite */
-                os_memoryCopy(pAdmCtrl->hOs, (void *)pWpaIePacket->groupSuite, wpaIeOuiIe, 3);
-                pWpaIePacket->groupSuite[3] = (TI_UINT8)pAdmCtrl->pRsn->paeConfig.broadcastSuite;
-            }
-        }
-    }
-    os_memoryCopy(pAdmCtrl->hOs, (TI_UINT8*)pIe, (TI_UINT8*)pWpaIePacket, sizeof(wpaIePacket_t));
-    return TI_OK;
-
-}
-/**
-*
-* admCtrlWpa_setSite  - Set current primary site parameters for registration.
-*
-* \b Description: 
-*
-* Set current primary site parameters for registration.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - pRsnData - site's RSN data \n
-*  O   - pAssocIe - result IE of evaluation \n
-*  O   - pAssocIeLen - length of result IE of evaluation \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on site is aproved, TI_NOK on site is rejected.
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa_setSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen)
-{
-    TI_STATUS           status;
-    paramInfo_t         *pParam;
-    TTwdParamInfo       tTwdParam;
-    wpaIeData_t         wpaData;
-    ECipherSuite        encryptionStatus;
-    admCtrlWpa_validity_t *pAdmCtrlWpa_validity=NULL;
-    TI_UINT8            *pWpaIe;
-    TI_UINT8            index;
-
-    *pAssocIeLen = 0;
-
-    if (pRsnData==NULL)
-    {
-        return TI_NOK;
-    }
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pAdmCtrl->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    if (pRsnData->pIe==NULL)
-    {
-		/* configure the MLME module with the 802.11 OPEN authentication suite, 
-			THe MLME will configure later the authentication module */
-        pParam->paramType = MLME_LEGACY_TYPE_PARAM;
-        pParam->content.mlmeLegacyAuthType = AUTH_LEGACY_OPEN_SYSTEM;
-        status = mlme_setParam(pAdmCtrl->hMlme, pParam);
-        goto adm_ctrl_wpa_end;
-    }
-
-#ifdef XCC_MODULE_INCLUDED
-	/* Check if Aironet IE exists */
-	admCtrlXCC_setExtendedParams(pAdmCtrl, pRsnData);
-#endif /*XCC_MODULE_INCLUDED*/
-
-    /* Check if any-WPA mode is supported and WPA2 info elem is presented */
-    /* If yes - perform WPA2 set site  procedure                          */
-    if(pAdmCtrl->WPAMixedModeEnable && pAdmCtrl->WPAPromoteFlags)
-    {
-        if((admCtrl_parseIe(pAdmCtrl, pRsnData, &pWpaIe, RSN_IE_ID)== TI_OK) &&
-           (pWpaIe != NULL))
-        {
-           status = admCtrlWpa2_setSite(pAdmCtrl, pRsnData,  pAssocIe, pAssocIeLen);
-           if(status == TI_OK)
-               goto adm_ctrl_wpa_end;
-        }
-    }
-    
-	status = admCtrl_parseIe(pAdmCtrl, pRsnData, &pWpaIe, WPA_IE_ID);
-	if (status != TI_OK)                                                         
-	{                                                                                    
-        goto adm_ctrl_wpa_end;
-	}
-    status = admCtrlWpa_parseIe(pAdmCtrl, pWpaIe, &wpaData);
-    if (status != TI_OK)
-    {
-        goto adm_ctrl_wpa_end;
-    }
-    if ((wpaData.unicastSuite[0]>=MAX_WPA_CIPHER_SUITE) ||
-        (wpaData.broadcastSuite>=MAX_WPA_CIPHER_SUITE) ||
-        (pAdmCtrl->unicastSuite>=MAX_WPA_CIPHER_SUITE))
-    {
-        status = TI_NOK;
-        goto adm_ctrl_wpa_end;
-    }
-
-    pAdmCtrl->encrInSw = wpaData.XCCKp;
-    pAdmCtrl->micInSw = wpaData.XCCMic; 
-
-    /*Because ckip is a proprietary encryption for Cisco then a different validity check is needed */
-    if(wpaData.broadcastSuite == TWD_CIPHER_CKIP || wpaData.unicastSuite[0] ==  TWD_CIPHER_CKIP)
-    {
-        pAdmCtrl->getCipherSuite(pAdmCtrl, &encryptionStatus);
-	/*Funk supplicant can support CCKM only if it configures the driver to TKIP encryption. */
-        if (encryptionStatus != TWD_CIPHER_TKIP) {
-            status = TI_NOK;
-            goto adm_ctrl_wpa_end;
-        }
-        if (pAdmCtrl->encrInSw)
-            pAdmCtrl->XCCSupport = TI_TRUE;
-    }
-    else
-    {
-        /* Check validity of Group suite */
-        if (!broadcastCipherSuiteValidity[pAdmCtrl->networkMode][wpaData.broadcastSuite])
-        {   /* check Group suite validity */                                          
-            status = TI_NOK;
-            goto adm_ctrl_wpa_end;
-        }
-
-        pAdmCtrl->getCipherSuite(pAdmCtrl, &encryptionStatus);
-        for (index=0; index<wpaData.unicastSuiteCnt; index++)
-        {
-            pAdmCtrlWpa_validity = &admCtrlWpa_validityTable[wpaData.unicastSuite[index]][wpaData.broadcastSuite][encryptionStatus];
-            if (pAdmCtrlWpa_validity->status ==TI_OK)
-            {
-                break;
-            }
-        }
-
-        if (pAdmCtrlWpa_validity->status != TI_OK)
-        {
-            status = pAdmCtrlWpa_validity->status;
-            goto adm_ctrl_wpa_end;
-        }
-   
-        /* set cipher suites */
-        wpaData.unicastSuite[0] = pAdmCtrlWpa_validity->unicast ;/*wpaData.unicastSuite[0];*/
-        wpaData.broadcastSuite = pAdmCtrlWpa_validity->broadcast; /*wpaData.broadcastSuite;*/
-    }
-    /* set external auth mode according to the key Mng Suite */
-    switch (wpaData.KeyMngSuite[0])
-    {
-    case WPA_IE_KEY_MNG_NONE:
-        pAdmCtrl->externalAuthMode = RSN_EXT_AUTH_MODE_OPEN;
-        break;
-	case WPA_IE_KEY_MNG_801_1X:
-#ifdef XCC_MODULE_INCLUDED
-	case WPA_IE_KEY_MNG_CCKM:
-#endif
-        pAdmCtrl->externalAuthMode = RSN_EXT_AUTH_MODE_WPA;
-        break;
-    case WPA_IE_KEY_MNG_PSK_801_1X:
-#if 0 /* code will remain here until the WSC spec will be closed*/
-         if ((wpaData.KeyMngSuiteCnt > 1) && (wpaData.KeyMngSuite[1] == WPA_IE_KEY_MNG_801_1X))
-        {
-           /*WLAN_OS_REPORT (("Overriding for simple-config - setting external auth to MODE WPA\n"));*/
-           /*pAdmCtrl->externalAuthMode = RSN_EXT_AUTH_MODE_WPA;*/
-        }
-         else
-         {
-            /*pAdmCtrl->externalAuthMode = RSN_EXT_AUTH_MODE_WPAPSK;*/
-         }
-#endif
-        break;
-    default:
-        pAdmCtrl->externalAuthMode = RSN_EXT_AUTH_MODE_OPEN;
-        break;
-    }
-      
-
-#ifdef XCC_MODULE_INCLUDED
-	pParam->paramType = XCC_CCKM_EXISTS;
-	pParam->content.XCCCckmExists = (wpaData.KeyMngSuite[0]==WPA_IE_KEY_MNG_CCKM) ? TI_TRUE : TI_FALSE;
-	XCCMngr_setParam(pAdmCtrl->hXCCMngr, pParam);
-#endif
-    /* set replay counter */
-    pAdmCtrl->replayCnt = wpaData.replayCounters;
-
-    *pAssocIeLen = pRsnData->ieLen;
-    if (pAssocIe != NULL)
-    {
-        os_memoryCopy(pAdmCtrl->hOs, pAssocIe, &wpaData, sizeof(wpaIeData_t));
-    }
-
-
-    /* Now we configure the MLME module with the 802.11 legacy authentication suite, 
-        THe MLME will configure later the authentication module */
-    pParam->paramType = MLME_LEGACY_TYPE_PARAM;
-#ifdef XCC_MODULE_INCLUDED
-	if (pAdmCtrl->networkEapMode!=OS_XCC_NETWORK_EAP_OFF)
-    {
-        pParam->content.mlmeLegacyAuthType = AUTH_LEGACY_RESERVED1;
-    }
-	else
-#endif
-	{
-		pParam->content.mlmeLegacyAuthType = AUTH_LEGACY_OPEN_SYSTEM;
-	}
-    
-    
-    status = mlme_setParam(pAdmCtrl->hMlme, pParam);
-    if (status != TI_OK)
-    {
-        goto adm_ctrl_wpa_end;
-    }
-
-    pParam->paramType = RX_DATA_EAPOL_DESTINATION_PARAM;
-    pParam->content.rxDataEapolDestination = OS_ABS_LAYER;
-    status = rxData_setParam(pAdmCtrl->hRx, pParam);
-    if (status != TI_OK)
-    {
-        goto adm_ctrl_wpa_end;
-    }
-
-	/* Configure privacy status in HAL so that HW is prepared to recieve keys */
-	tTwdParam.paramType = TWD_RSN_SECURITY_MODE_PARAM_ID;   
-	tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)wpaData.unicastSuite[0];
-	status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
-	if (status != TI_OK)
-	{
-        goto adm_ctrl_wpa_end;		
-	}
-
-#ifdef XCC_MODULE_INCLUDED
-	    
-	/* set MIC and KP in HAL  */
-    tTwdParam.paramType = TWD_RSN_XCC_SW_ENC_ENABLE_PARAM_ID; 
-    tTwdParam.content.rsnXCCSwEncFlag = wpaData.XCCKp;
-    status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
-    if (status != TI_OK)
-    {
-        goto adm_ctrl_wpa_end;
-    }
-    tTwdParam.paramType = TWD_RSN_XCC_MIC_FIELD_ENABLE_PARAM_ID; 
-    tTwdParam.content.rsnXCCMicFieldFlag = wpaData.XCCMic;
-    status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
-    
-    if (status != TI_OK)
-    {
-        goto adm_ctrl_wpa_end;        
-    }
-#endif /*XCC_MODULE_INCLUDED*/
-
-    /* re-config PAE */
-    status = admCtrlWpa_dynamicConfig(pAdmCtrl,&wpaData);
-    if (status != TI_OK)
-    {
-        goto adm_ctrl_wpa_end;
-    }
-adm_ctrl_wpa_end:
-    os_memoryFree(pAdmCtrl->hOs, pParam, sizeof(paramInfo_t));
-    return status;
-}
-
-/**
-*
-* admCtrlWpa_evalSite  - Evaluate site for registration.
-*
-* \b Description: 
-*
-* evaluate site RSN capabilities against the station's cap.
-* If the BSS type is infrastructure, the station matches the site only if it's WEP status is same as the site
-* In IBSS, it does not matter
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - Context \n
-*  I   - pRsnData - site's RSN data \n
-*  O   - pEvaluation - Result of evaluation \n
-*  
-* \b RETURNS:
-*
-*  TI_OK 
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSiteParams *pRsnSiteParams, TI_UINT32 *pEvaluation)
-{
-    TI_STATUS               status;
-    wpaIeData_t             wpaData;
-    admCtrlWpa_validity_t   admCtrlWpa_validity;
-    ECipherSuite            encryptionStatus;
-    TIWLN_SIMPLE_CONFIG_MODE wscMode;
-    TI_UINT8                *pWpaIe;
-    TI_UINT8                index;
-
-	/* Get Simple-Config state */
-    status = siteMgr_getParamWSC(pAdmCtrl->pRsn->hSiteMgr, &wscMode); /* SITE_MGR_SIMPLE_CONFIG_MODE */
-
-	*pEvaluation = 0;
-
-    if (pRsnData==NULL)
-    {
-        return TI_NOK;
-    }
-    if ((pRsnData->pIe==NULL) && (wscMode == TIWLN_SIMPLE_CONFIG_OFF))
-    {
-        return TI_NOK;
-    }
-    
-    if (pRsnSiteParams->bssType != BSS_INFRASTRUCTURE)
-    {
-        return TI_NOK;
-    }
-	
-    /* Set initial values for admCtrlWpa_validity as none*/
-    admCtrlWpa_validity = admCtrlWpa_validityTable[TWD_CIPHER_NONE][TWD_CIPHER_NONE][TWD_CIPHER_NONE];
-
-   	/* Check if WPA-any mode is supported and WPA2 info elem is presented */
-    /* If yes - perform WPA2 site evaluation                              */
-    if(pAdmCtrl->WPAMixedModeEnable && pAdmCtrl->WPAPromoteFlags)
-    {
-    	if((admCtrl_parseIe(pAdmCtrl, pRsnData, &pWpaIe, RSN_IE_ID)== TI_OK)  &&
-           (pWpaIe != NULL))
-        {
-            status = admCtrlWpa2_evalSite(pAdmCtrl, pRsnData, pRsnSiteParams, pEvaluation);
-            if(status == TI_OK)
-                return status;
-        }
-    }
-
-	status = admCtrl_parseIe(pAdmCtrl, pRsnData, &pWpaIe, WPA_IE_ID);
-	if ((status != TI_OK) && (wscMode == TIWLN_SIMPLE_CONFIG_OFF))                                                        
-	{                                                                                    
-		return status;                                                        
-	}
-    /* If found WPA Information Element */
-    if (pWpaIe != NULL)
-    {
-    status = admCtrlWpa_parseIe(pAdmCtrl, pWpaIe, &wpaData);
-    if (status != TI_OK)
-    {
-        return status;
-    }
-
-	/* check keyMngSuite validity */
-    switch (wpaData.KeyMngSuite[0])
-    {
-    case WPA_IE_KEY_MNG_NONE:
-        TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa_evalSite: KeyMngSuite[0]=WPA_IE_KEY_MNG_NONE\n");
-        status = (pAdmCtrl->externalAuthMode <= RSN_EXT_AUTH_MODE_AUTO_SWITCH) ? TI_OK : TI_NOK;
-		break;
-    case WPA_IE_KEY_MNG_801_1X:
-#ifdef XCC_MODULE_INCLUDED
-	case WPA_IE_KEY_MNG_CCKM:
-		/* CCKM is allowed only in 802.1x auth */
-#endif
-       TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa_evalSite: KeyMngSuite[0]=WPA_IE_KEY_MNG_801_1X\n");
-        status = (pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPA) ? TI_OK : TI_NOK;
-		break;
-    case WPA_IE_KEY_MNG_PSK_801_1X:
-       TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa_evalSite: KeyMngSuite[0]=WPA_IE_KEY_MNG_PSK_801_1X\n");
-        status = ((pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPAPSK) ||
-					(wscMode && (pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPA))) ? TI_OK : TI_NOK;        		
-        break;
-    default:
-        status = TI_NOK;
-        break;
-    }
-
-    TRACE2(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa_evalSite: pAdmCtrl->externalAuthMode = %d, Status = %d\n",pAdmCtrl->externalAuthMode,status);
-
-    if (status != TI_OK)
-    {
-        return status;
-    }
-
-	/*Because ckip is a proprietary encryption for Cisco then a different validity check is needed */
-    if(wpaData.broadcastSuite == TWD_CIPHER_CKIP || wpaData.unicastSuite[0] ==  TWD_CIPHER_CKIP)
-    {
-        pAdmCtrl->getCipherSuite(pAdmCtrl, &encryptionStatus);
-        if (encryptionStatus != TWD_CIPHER_TKIP) 
-            return TI_NOK;
-    }
-    else
-    {
-		/* Check cipher suite validity */
-        pAdmCtrl->getCipherSuite(pAdmCtrl, &encryptionStatus);
-        for (index=0; index<wpaData.unicastSuiteCnt; index++)
-        {
-			admCtrlWpa_validity = admCtrlWpa_validityTable[wpaData.unicastSuite[index]][wpaData.broadcastSuite][encryptionStatus];
-            if (admCtrlWpa_validity.status ==TI_OK)
-            {
-                break;
-            }
-        }
-
-        if (admCtrlWpa_validity.status!=TI_OK)
-        {
-            return admCtrlWpa_validity.status;
-        }
-
-		wpaData.broadcastSuite  = admCtrlWpa_validity.broadcast;
-        wpaData.unicastSuite[0] = admCtrlWpa_validity.unicast;
-        *pEvaluation = admCtrlWpa_validity.evaluation;
-    }
-
-	/* Check privacy bit if not in mixed mode */
-    if (!pAdmCtrl->mixedMode)
-    {   /* There's no mixed mode, so make sure that the privacy Bit matches the privacy mode*/
-        if (((pRsnData->privacy) && (wpaData.unicastSuite[0]==TWD_CIPHER_NONE)) ||
-            ((!pRsnData->privacy) && (wpaData.unicastSuite[0]>TWD_CIPHER_NONE)))
-        {
-            *pEvaluation = 0;
-        }
-    }
-
-    }
-    else
-    {
-       TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "didn't find WPA IE\n");
-       if (wscMode == TIWLN_SIMPLE_CONFIG_OFF)
-          return TI_NOK;
-       TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "metric is 1\n");
-       *pEvaluation = 1;
-        pAdmCtrl->broadcastSuite = TWD_CIPHER_NONE;
-        pAdmCtrl->unicastSuite = TWD_CIPHER_NONE;
-    }
-
-	/* always return TI_OK */
-    return TI_OK;
-}
-
-
-/**
-*
-* admCtrlWpa_parseIe  - Parse an WPA information element.
-*
-* \b Description: 
-*
-* Parse an WPA information element. 
-* Builds a structure of the unicast adn broadcast cihper suites,
-* the key management suite and the capabilities.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - pointer to admCtrl context
-*  I   - pWpaIe - pointer to WPA IE buffer  \n
-*  O   - pWpaData - capabilities structure
-*  
-*  
-* \b RETURNS:
-*
-* TI_OK on success, TI_NOK on failure. 
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa_parseIe(admCtrl_t *pAdmCtrl, TI_UINT8 *pWpaIe, wpaIeData_t *pWpaData)
-{
-
-    wpaIePacket_t   *wpaIePacket = (wpaIePacket_t*)pWpaIe;
-    TI_UINT8           *curWpaIe;
-    TI_UINT8           curLength = WPA_IE_MIN_LENGTH;
-
-    TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa_IE: DEBUG: admCtrlWpa_parseIe\n\n");
-
-    if ((pWpaData == NULL) || (pWpaIe == NULL))
-    {
-        return TI_NOK;
-    }
-
-    if ((wpaIePacket->length < WPA_IE_MIN_LENGTH) ||
-        (wpaIePacket->elementid != WPA_IE_ID) ||
-        (wpaIePacket->ouiType > WPA_OUI_MAX_TYPE) || (ENDIAN_HANDLE_WORD(wpaIePacket->version) > WPA_OUI_MAX_VERSION) ||               
-        (os_memoryCompare(pAdmCtrl->hOs, (TI_UINT8*)wpaIePacket->oui, wpaIeOuiIe, 3)))
-    {
-        TRACE7(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa_ParseIe Error: length=0x%x, elementid=0x%x, ouiType=0x%x, version=0x%x, oui=0x%x, 0x%x, 0x%x\n", wpaIePacket->length,wpaIePacket->elementid, wpaIePacket->ouiType, wpaIePacket->version, wpaIePacket->oui[0], wpaIePacket->oui[1],wpaIePacket->oui[2]);
-
-        return TI_NOK; 
-    }
-    /* Set default values */
-    pWpaData->broadcastSuite = TWD_CIPHER_TKIP;
-    pWpaData->unicastSuiteCnt = 1;
-    pWpaData->unicastSuite[0] = TWD_CIPHER_TKIP;
-    pWpaData->KeyMngSuiteCnt = 1;
-    pWpaData->KeyMngSuite[0] = (ERsnKeyMngSuite)WPA_IE_KEY_MNG_801_1X;
-    pWpaData->bcastForUnicatst = 1;
-    pWpaData->replayCounters = 1;
-
-    pWpaData->XCCKp = TI_FALSE;
-    pWpaData->XCCMic = TI_FALSE;
-
-
-    /* Group Suite */
-    if (wpaIePacket->length >= WPA_IE_GROUP_SUITE_LENGTH)
-    {
-        pWpaData->broadcastSuite = (ECipherSuite)admCtrlWpa_parseSuiteVal(pAdmCtrl, (TI_UINT8 *)wpaIePacket->groupSuite,pWpaData,TWD_CIPHER_WEP104);
-        curLength = WPA_IE_GROUP_SUITE_LENGTH;
-        TRACE2(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa_IE: GroupSuite%x, broadcast %x \n", wpaIePacket->groupSuite[3], pWpaData->broadcastSuite);
-    } else
-    {
-        return TI_OK;
-    }
-    /* Unicast Suite */ 
-    if (wpaIePacket->length >= WPA_IE_MIN_PAIRWISE_SUITE_LENGTH)
-    {
-        TI_UINT16 pairWiseSuiteCnt = ENDIAN_HANDLE_WORD(wpaIePacket->pairwiseSuiteCnt);
-        TI_BOOL   cipherSuite[MAX_WPA_UNICAST_SUITES]={TI_FALSE, TI_FALSE, TI_FALSE, TI_FALSE, TI_FALSE, TI_FALSE , TI_FALSE};
-        TI_INT32  index, unicastSuiteIndex=0;
-
-        curWpaIe = (TI_UINT8*)&(wpaIePacket->pairwiseSuite);
-        for (index=0; (index<pairWiseSuiteCnt) && (wpaIePacket->length >= (WPA_IE_MIN_PAIRWISE_SUITE_LENGTH+(index+1)*4)); index++)
-        {
-            ECipherSuite   curCipherSuite;
-
-            curCipherSuite = (ECipherSuite)admCtrlWpa_parseSuiteVal(pAdmCtrl, curWpaIe,pWpaData,TWD_CIPHER_WEP104);
-            TRACE2(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa_IE: pairwiseSuite %x , unicast %x \n", curWpaIe[3], curCipherSuite);
-
-            if ((curCipherSuite!=TWD_CIPHER_UNKNOWN) && (curCipherSuite<MAX_WPA_UNICAST_SUITES))
-            {
-                cipherSuite[curCipherSuite] =  TI_TRUE;
-            }
-            curWpaIe +=4; 
-        }
-        for (index=MAX_WPA_UNICAST_SUITES-1; index>=0; index--)
-        {
-            if (cipherSuite[index])
-            {
-                pWpaData->unicastSuite[unicastSuiteIndex] = (ECipherSuite)index;
-                TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa_IE: unicast %x \n", pWpaData->unicastSuite[unicastSuiteIndex]);
-                unicastSuiteIndex++;
-            }
-        }
-        pWpaData->unicastSuiteCnt = unicastSuiteIndex;
-        curLength = WPA_IE_MIN_KEY_MNG_SUITE_LENGTH(pairWiseSuiteCnt);
-        
-    } else
-    {
-        return TI_OK;
-    }
-    /* KeyMng Suite */
-    if (wpaIePacket->length >= curLength)
-    {
-        TI_UINT16              keyMngSuiteCnt = ENDIAN_HANDLE_WORD(*curWpaIe);
-        TI_UINT16              index;
-        ERsnKeyMngSuite   maxKeyMngSuite = (ERsnKeyMngSuite)WPA_IE_KEY_MNG_NONE;
-
-        /* Include all AP key management supported suites in the wpaData structure */
-        pWpaData->KeyMngSuiteCnt = keyMngSuiteCnt;
-
-        curWpaIe +=2;
-        pAdmCtrl->wpaAkmExists = TI_FALSE;
-        for (index=0; (index<keyMngSuiteCnt) && (wpaIePacket->length >= (curLength+index*4)); index++)
-        {
-            ERsnKeyMngSuite curKeyMngSuite;
-
-#ifdef XCC_MODULE_INCLUDED
-            curKeyMngSuite = (ERsnKeyMngSuite)admCtrlXCC_parseCckmSuiteVal(pAdmCtrl, curWpaIe);
-			if (curKeyMngSuite == WPA_IE_KEY_MNG_CCKM)
-			{	/* CCKM is the maximum AKM */
-				maxKeyMngSuite =  curKeyMngSuite;
-			}
-			else
-#endif
-			{
-				curKeyMngSuite = (ERsnKeyMngSuite)admCtrlWpa_parseSuiteVal(pAdmCtrl, curWpaIe,pWpaData,WPA_IE_KEY_MNG_PSK_801_1X);
-			}
-            TRACE2(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa_IE: authKeyMng %x , keyMng %x \n", curWpaIe[3], curKeyMngSuite);
-
-            if ((curKeyMngSuite>maxKeyMngSuite) && (curKeyMngSuite!=WPA_IE_KEY_MNG_NA)
-				&& (curKeyMngSuite!=WPA_IE_KEY_MNG_CCKM))
-            {
-                maxKeyMngSuite =  curKeyMngSuite;
-            }
-            if (curKeyMngSuite==WPA_IE_KEY_MNG_801_1X)
-            {   /* If 2 AKM exist, save also the second priority */
-                pAdmCtrl->wpaAkmExists = TI_TRUE;
-            }
-
-            curWpaIe +=4; 
-
-            /* Include all AP key management supported suites in the wpaData structure */
-	    if ((index+1) < MAX_WPA_KEY_MNG_SUITES)
-                pWpaData->KeyMngSuite[index+1] = curKeyMngSuite;
-
-        }
-        pWpaData->KeyMngSuite[0] = maxKeyMngSuite;
-        curLength += (index-1)*4;
-        TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa_IE: keyMng %x \n", pWpaData->KeyMngSuite[0]);
-
-    } else
-    {
-        return TI_OK;
-    }
-    /* Parse capabilities */
-    if (wpaIePacket->length >= (curLength+2))
-    {
-        TI_UINT16 capabilities = ENDIAN_HANDLE_WORD(*((TI_UINT16 *)curWpaIe));
-
-        pWpaData->bcastForUnicatst = (capabilities & WPA_GROUP_4_UNICAST_CAPABILITY_MASK) >> WPA_REPLAY_GROUP4UNI_CAPABILITY_SHIFT;
-        pWpaData->replayCounters =   (capabilities & WPA_REPLAY_COUNTERS_CAPABILITY_MASK) >> WPA_REPLAY_COUNTERS_CAPABILITY_SHIFT;
-        switch (pWpaData->replayCounters)
-        {
-        case 0: pWpaData->replayCounters=1;
-            break;
-        case 1: pWpaData->replayCounters=2;
-            break;
-        case 2: pWpaData->replayCounters=4;
-            break;
-        case 3: pWpaData->replayCounters=16;
-            break;
-        default: pWpaData->replayCounters=0;
-            break;
-        }
-        TRACE3(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa_IE: capabilities %x, bcastForUnicatst %x, replayCounters %x\n", capabilities, pWpaData->bcastForUnicatst, pWpaData->replayCounters);
-
-    }
-
-
-    return TI_OK;
-
-}
-
-
-TI_UINT16 admCtrlWpa_buildCapabilities(TI_UINT16 replayCnt)
-{
-    TI_UINT16 capabilities=0;
-    /* Bit1: group key for unicast */
-    capabilities = 0;
-    capabilities = capabilities << WPA_REPLAY_GROUP4UNI_CAPABILITY_SHIFT;
-    /* Bits 2&3: Replay counter */
-    switch (replayCnt)
-    {
-    case 1:  replayCnt=0;
-        break;
-    case 2:  replayCnt=1;
-        break;
-    case 4:  replayCnt=2;
-        break;
-    case 16: replayCnt=3;
-        break;
-    default: replayCnt=0;
-        break;
-    }
-
-    capabilities |= replayCnt << WPA_REPLAY_COUNTERS_CAPABILITY_SHIFT;
-    return 	capabilities;
-
-}
-
-
-TI_UINT32  admCtrlWpa_parseSuiteVal(admCtrl_t *pAdmCtrl, TI_UINT8* suiteVal, wpaIeData_t *pWpaData, TI_UINT32 maxVal)
-{
-    TI_UINT32  suite;
-
-    if ((pAdmCtrl==NULL) || (suiteVal==NULL))
-    {
-        return TWD_CIPHER_UNKNOWN;
-    }
-    if (!os_memoryCompare(pAdmCtrl->hOs, suiteVal, wpaIeOuiIe, 3))
-    {
-        suite =  (ECipherSuite)((suiteVal[3]<=maxVal) ? suiteVal[3] : TWD_CIPHER_UNKNOWN); 
-    } else
-    {
-#ifdef XCC_MODULE_INCLUDED
-        suite = admCtrlXCC_WpaParseSuiteVal(pAdmCtrl,suiteVal,pWpaData);
-#else
-        suite = TWD_CIPHER_UNKNOWN;
-#endif
-    }
-    return 	suite;
-}
-
-
-TI_STATUS admCtrlWpa_checkCipherSuiteValidity (ECipherSuite unicastSuite, ECipherSuite broadcastSuite, ECipherSuite encryptionStatus)
-{
-    ECipherSuite maxCipher;
-
-    maxCipher = (unicastSuite>=broadcastSuite) ? unicastSuite : broadcastSuite ;
-    if (maxCipher != encryptionStatus)
-    {
-        return TI_NOK;
-    }
-    if ((unicastSuite != TWD_CIPHER_NONE) && (broadcastSuite>unicastSuite))
-    {
-        return TI_NOK;
-    }
-    return TI_OK;
-}
-
-static TI_STATUS admCtrlWpa_get802_1x_AkmExists (admCtrl_t *pAdmCtrl, TI_BOOL *wpa_802_1x_AkmExists)
-{
-    *wpa_802_1x_AkmExists = pAdmCtrl->wpaAkmExists;
-    return TI_OK;
-}
-
-
-
diff --git a/wl1271/stad/src/Connection_Managment/admCtrlWpa.h b/wl1271/stad/src/Connection_Managment/admCtrlWpa.h
deleted file mode 100644
index 1da616b..0000000
--- a/wl1271/stad/src/Connection_Managment/admCtrlWpa.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * admCtrlWpa.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file admCtrlWpa.h
- *  \brief Admission control API
- *
- *  \see admCtrl.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Admission Control	    		                                *
- *   PURPOSE: Admission Control Module API                              	*
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _ADM_CTRL_WPA_H_
-#define _ADM_CTRL_WPA_H_
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-
-/* RSN admission control prototypes */
-
-
-/* Structures */
-
-
-
-#define MAX_WPA_UNICAST_SUITES        (TWD_CIPHER_CKIP+1)
-
-#define WPA_OUI_MAX_VERSION           0x1
-#define WPA_OUI_DEF_TYPE              0x1
-#define WPA_OUI_MAX_TYPE			  0x2
-
-#define WPA_GROUP_4_UNICAST_CAPABILITY_MASK  	0x0002
-#define WPA_REPLAY_COUNTERS_CAPABILITY_MASK 	0x000c
-#define WPA_REPLAY_GROUP4UNI_CAPABILITY_SHIFT 	1
-#define WPA_REPLAY_COUNTERS_CAPABILITY_SHIFT 	2
-
-#define WPA_IE_MIN_LENGTH 				 	6
-#define WPA_IE_GROUP_SUITE_LENGTH 		 	10
-#define WPA_IE_MIN_PAIRWISE_SUITE_LENGTH 	16
-#define WPA_IE_MIN_DEFAULT_LENGTH 			24
-#define WPA_IE_MIN_KEY_MNG_SUITE_LENGTH(pairwiseCnt) (18+4*pairwiseCnt)
-
-typedef enum 
-{
-	WPA_IE_KEY_MNG_NONE				= 0,		/**< no key management available */
-	WPA_IE_KEY_MNG_801_1X			= 1,		/**< "802.1X" key management - WPA default*/
-	WPA_IE_KEY_MNG_PSK_801_1X		= 2,		/**< "WPA PSK */
-	WPA_IE_KEY_MNG_CCKM			    = 3,		/**< WPA CCKM */
-	WPA_IE_KEY_MNG_NA			    = 4			/**< NA */
-} keyMngSuite_e;
-
-
-#define	MAX_WPA_KEY_MNG_SUITES   	(WPA_IE_KEY_MNG_CCKM+1)
-
-
-typedef struct
-{
-
-	TI_UINT8  				elementid;	   /* WPA information element id is 0xDD */	   
-	TI_UINT8  				length;			   
-    TI_UINT8  				oui[DOT11_OUI_LEN - 1];
-	TI_UINT8  				ouiType;
-    TI_UINT16 				version;
-    TI_UINT8 				groupSuite[DOT11_OUI_LEN];
-    TI_UINT16 				pairwiseSuiteCnt;
-	TI_UINT8				pairwiseSuite[DOT11_OUI_LEN];
-	TI_UINT16 				authKeyMngSuiteCnt;
-	TI_UINT8				authKeyMngSuite[DOT11_OUI_LEN];
-    TI_UINT16				capabilities;
-} wpaIePacket_t;
-
-
-/* WPA capabilities structure */
-typedef struct
-{
-    ECipherSuite 		broadcastSuite;
-    TI_UINT16 			unicastSuiteCnt;
-	ECipherSuite		unicastSuite[MAX_WPA_UNICAST_SUITES];
-	TI_UINT16 			KeyMngSuiteCnt;
-	ERsnKeyMngSuite	    KeyMngSuite[MAX_WPA_KEY_MNG_SUITES];
-    TI_UINT8			bcastForUnicatst;
-	TI_UINT8			replayCounters;
-    TI_BOOL             XCCKp;
-    TI_BOOL             XCCMic;
-
-} wpaIeData_t;
-
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS admCtrlWpa_getInfoElement(admCtrl_t *pAdmCtrl, TI_UINT8 *pIe, TI_UINT32 *pLength);
-
-TI_STATUS admCtrlWpa_setSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen);
-
-TI_STATUS admCtrlWpa_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSiteParams *pRsnSiteParams, TI_UINT32 *pEvaluation);
-
-#endif /*  _ADM_CTRL_WPA_H_*/
-
diff --git a/wl1271/stad/src/Connection_Managment/admCtrlWpa2.c b/wl1271/stad/src/Connection_Managment/admCtrlWpa2.c
deleted file mode 100644
index 1f68caf..0000000
--- a/wl1271/stad/src/Connection_Managment/admCtrlWpa2.c
+++ /dev/null
@@ -1,1905 +0,0 @@
-/*
- * admCtrlWpa2.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file admCtrlWpa2.c
- *  \brief WPA2 Admission control methods
- *
- *  \see admCtrl.h
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Admission Control                                             *
- *   PURPOSE: Admission Control Module API                                  *
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_20
-#include "osApi.h"
-#include "timer.h"
-#include "paramOut.h"
-#include "mlmeApi.h"
-#include "802_11Defs.h"
-#include "DataCtrl_Api.h"
-#include "report.h"
-#include "rsn.h"
-#include "admCtrl.h"
-#include "admCtrlWpa2.h"
-#include "osDot11.h"
-#include "siteMgrApi.h"
-#include "smeApi.h"
-#include "EvHandler.h"
-#include "admCtrl.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "admCtrlWpa.h"
-#include "admCtrlXCC.h"
-#include "XCCMngr.h"
-#endif
-#include "TWDriver.h"
-
-
-/* Constants */
-#define MAX_NETWORK_MODE 2
-#define MAX_WPA2_CIPHER_SUITE 6
-
-#define PMKID_CAND_LIST_MEMBUFF_SIZE  (2*sizeof(TI_UINT32) + (sizeof(OS_802_11_PMKID_CANDIDATE) * PMKID_MAX_NUMBER))
-#define PMKID_MIN_BUFFER_SIZE    2*sizeof(TI_UINT32) + MAC_ADDR_LEN + PMKID_VALUE_SIZE
-
-#define TI_WLAN_COPY_UINT16_UNALIGNED(addr, val) {\
-    *((TI_UINT8 *) &(addr))   = (TI_UINT8)(val & 0x00FF); \
-    *((TI_UINT8 *) &(addr) + 1)   = (TI_UINT8)((val & 0xFF00) >> 8);}
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* Local functions definitions */
-
-/* Global variables */
-static TI_UINT8 wpa2IeOuiIe[3] = { 0x00, 0x0f, 0xac};
-
-static TI_BOOL broadcastCipherSuiteValidity[MAX_NETWORK_MODE][MAX_WPA2_CIPHER_SUITE]=
-{
-    /* RSN_IBSS */  {
-/* NONE       */    TI_FALSE,
-/* WEP40      */    TI_FALSE,
-/* TKIP       */    TI_TRUE,
-/* AES_WRAP   */    TI_FALSE,
-/* AES_CCMP   */    TI_TRUE,
-/* WEP104     */    TI_FALSE},
-
-    /* RSN_INFRASTRUCTURE */  {
-/* NONE       */    TI_FALSE,
-/* WEP        */    TI_TRUE,
-/* TKIP       */    TI_TRUE,
-/* AES_WRAP   */    TI_FALSE,
-/* AES_CCMP   */    TI_TRUE,
-/* WEP104     */    TI_TRUE}
-};
-
-/** WPA2 admission table. Used to verify admission parameters to an AP */
-/* table parameters:
-    Max unicast cipher in the IE
-    Max broadcast cipher in the IE
-    Encryption status 
-*/
-typedef struct
-{
-    TI_STATUS        status;
-    ECipherSuite     unicast;
-    ECipherSuite     broadcast;
-    TI_UINT8            evaluation; 
-} admCtrlWpa2_validity_t;
-
-static admCtrlWpa2_validity_t    admCtrlWpa2_validityTable[MAX_WPA2_CIPHER_SUITE][MAX_WPA2_CIPHER_SUITE][MAX_WPA2_CIPHER_SUITE] =
-{
-/* AP unicast NONE */ {
-        /* AP multicast NONE */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP40 */ { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP40 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP40 */ { TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_WEP ,1},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_WEP104 ,1}},
-        /* AP multicast TKIP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_TKIP ,2},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WRAP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_AES_WRAP ,3},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast CCMP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_AES_CCMP ,3},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP104 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP40 */ { TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_WEP ,1},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_OK,  TWD_CIPHER_NONE, TWD_CIPHER_WEP104 ,1}}},
-/* AP unicast WEP */  {
-        /* AP multicast NONE */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast TKIP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WRAP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WRAP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast CCMP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP104 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}}},
-/* AP unicast TKIP */  {
-        /* AP multicast NONE */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_OK,  TWD_CIPHER_TKIP, TWD_CIPHER_WEP  ,4},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast TKIP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_OK,  TWD_CIPHER_TKIP, TWD_CIPHER_TKIP ,7},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WRAP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast CCMP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP104 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_OK,  TWD_CIPHER_TKIP, TWD_CIPHER_WEP104 ,4},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}}},
-/* AP unicast AES_WRAP */ {
-        /* AP multicast NONE */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP40 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_OK,  TWD_CIPHER_AES_WRAP, TWD_CIPHER_WEP ,5},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast TKIP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_OK,  TWD_CIPHER_AES_WRAP, TWD_CIPHER_TKIP ,6},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WRAP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_OK,  TWD_CIPHER_AES_WRAP, TWD_CIPHER_AES_WRAP ,8},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast CCMP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP104 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_OK,  TWD_CIPHER_AES_WRAP, TWD_CIPHER_WEP104 ,5},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}}},
-/* AP unicast AES_CCMP */ {
-        /* AP multicast NONE */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_OK,  TWD_CIPHER_AES_CCMP, TWD_CIPHER_WEP ,5},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast TKIP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_OK,  TWD_CIPHER_AES_CCMP, TWD_CIPHER_TKIP ,6},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_OK,  TWD_CIPHER_AES_CCMP, TWD_CIPHER_TKIP ,6},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WRAP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast CCMP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_OK,  TWD_CIPHER_AES_CCMP, TWD_CIPHER_AES_CCMP ,6},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_OK,  TWD_CIPHER_AES_CCMP, TWD_CIPHER_AES_CCMP ,8},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_OK,  TWD_CIPHER_AES_CCMP, TWD_CIPHER_WEP104 ,5},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}}},
-/* AP unicast WEP104 */  {
-        /* AP multicast NONE */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast TKIP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WRAP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast CCMP */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}},
-        /* AP multicast WEP104 */ {
-            /* STA NONE */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA TKIP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA AES */   { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA CCMP */  { TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0},
-            /* STA WEP104 */{ TI_NOK, TWD_CIPHER_NONE, TWD_CIPHER_NONE ,0}}}
-
-
-};
-
-
-/* PMKID cache */
-/* static wpa2_pmkid_cache_t wpa2_pmkid_cache; */
-
-/* Function prototypes */
-
-TI_STATUS admCtrlWpa2_parseIe(admCtrl_t *pAdmCtrl, TI_UINT8 *pWpa2Ie, wpa2IeData_t *pWpa2Data);
-TI_UINT16 admCtrlWpa2_buildCapabilities(admCtrl_t *pAdmCtrl);
-TI_UINT32  admCtrlWpa2_parseSuiteVal(admCtrl_t *pAdmCtrl, TI_UINT8* suiteVal, TI_UINT32 maxVal, TI_UINT32 unknownVal);
-TI_STATUS admCtrlWpa2_checkCipherSuiteValidity(ECipherSuite unicastSuite, ECipherSuite broadcastSuite, ECipherSuite encryptionStatus);
-TI_STATUS admCtrlWpa2_getCipherSuiteMetric (admCtrl_t *pAdmCtrl, wpa2IeData_t *pWpa2Data, TI_UINT32 *metric, 
-                                            ECipherSuite *uSuite,  ECipherSuite  *bSuite);
-TI_STATUS admCtrlWpa2_DynamicConfig(admCtrl_t *pAdmCtrl, TRsnPaeConfig *pPaeConfig);
-
-TI_STATUS admCtrlWpa2_resetPMKIDCache(admCtrl_t *pAdmCtrl);
-/*TI_STATUS admCtrlWpa2_sendPMKIDCandListAfterDelay(admCtrl_t * pAdmCtrl, TI_UINT32 delay);*/
-TI_STATUS admCtrlWpa2_getPMKIDList(admCtrl_t * pAdmCtrl,OS_802_11_PMKID *pmkidList);
-TI_STATUS admCtrlWpa2_setPMKIDList(admCtrl_t * pAdmCtrl, OS_802_11_PMKID *pmkidList);
-
-TI_STATUS admCtrlWpa2_addPMKID(admCtrl_t * pAdmCtrl, TMacAddr * pBSSID, pmkidValue_t pmkID);
-TI_STATUS admCtrlWpa2_findPMKID(admCtrl_t * pAdmCtrl, TMacAddr *pBSSID, 
-                                pmkidValue_t *pPMKID, TI_UINT8  *cacheIndex);
-
-static TI_BOOL admCtrlWpa2_getPreAuthStatus(admCtrl_t *pAdmCtrl, TMacAddr *givenAP, TI_UINT8  *cacheIndex);
-
-static TI_STATUS admCtrlWpa2_startPreAuth(admCtrl_t *pAdmCtrl, TBssidList4PreAuth *pBssidList);
-
-static void admCtrlWpa2_buildAndSendPMKIDCandList(TI_HANDLE hHandle, TBssidList4PreAuth *apList);
-
-static TI_STATUS admCtrlWpa2_get802_1x_AkmExists (admCtrl_t *pAdmCtrl, TI_BOOL *wpa_802_1x_AkmExists);
-
-/**
-*
-* admCtrlWpa_config  - Configure XCC admission control.
-*
-* \b Description: 
-*
-* Configure XCC admission control.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa2_config(admCtrl_t *pAdmCtrl)
-{
-    TI_STATUS           status;
-    TRsnPaeConfig     paeConfig;
-
-    /* check and set admission control default parameters */
-    pAdmCtrl->authSuite =   RSN_AUTH_OPEN;
-    if (pAdmCtrl->unicastSuite == TWD_CIPHER_NONE)
-    {
-        pAdmCtrl->unicastSuite = TWD_CIPHER_AES_CCMP;
-    }
-    if (pAdmCtrl->broadcastSuite == TWD_CIPHER_NONE)
-    {
-        pAdmCtrl->broadcastSuite = TWD_CIPHER_AES_CCMP;
-    }
-
-    /* set callback functions (API) */
-    pAdmCtrl->getInfoElement = admCtrlWpa2_getInfoElement;
-    pAdmCtrl->setSite  = admCtrlWpa2_setSite;
-    pAdmCtrl->evalSite = admCtrlWpa2_evalSite;
-
-    pAdmCtrl->getPmkidList      = admCtrlWpa2_getPMKIDList;
-    pAdmCtrl->setPmkidList      = admCtrlWpa2_setPMKIDList;
-    pAdmCtrl->resetPmkidList    = admCtrlWpa2_resetPMKIDCache;
-    pAdmCtrl->getPreAuthStatus = admCtrlWpa2_getPreAuthStatus;
-    pAdmCtrl->startPreAuth = admCtrlWpa2_startPreAuth;
-    pAdmCtrl->get802_1x_AkmExists = admCtrlWpa2_get802_1x_AkmExists;
-
-    /* set key management suite (AKMP) */
-    switch (pAdmCtrl->externalAuthMode)
-    {
-    case RSN_EXT_AUTH_MODE_WPA2:
-    case RSN_EXT_AUTH_MODE_WPA2PSK:
-        pAdmCtrl->keyMngSuite = RSN_KEY_MNG_802_1X;
-        break;
-    case RSN_EXT_AUTH_MODE_WPANONE:
-        pAdmCtrl->keyMngSuite = RSN_KEY_MNG_NONE;
-        /* Not supported */
-    default:
-        return TI_NOK;
-    }
-
-
-    paeConfig.authProtocol = pAdmCtrl->externalAuthMode;
-    paeConfig.unicastSuite = pAdmCtrl->unicastSuite;
-    paeConfig.broadcastSuite = pAdmCtrl->broadcastSuite;
-    paeConfig.keyExchangeProtocol = pAdmCtrl->keyMngSuite;
-    /* set default PAE configuration */
-    status = pAdmCtrl->pRsn->setPaeConfig(pAdmCtrl->pRsn, &paeConfig);
-
-    return status;
-}
-
-
-/**
-*
-* admCtrlWpa2_getInfoElement - Get the current information element.
-*
-* \b Description: 
-*
-* Get the current information element.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - pIe - IE buffer \n
-*  I   - pLength - length of IE \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-
-TI_STATUS admCtrlWpa2_getInfoElement(admCtrl_t *pAdmCtrl, TI_UINT8 *pIe, TI_UINT32 *pLength)
-{
-    wpa2IePacket_t     *pWpa2IePacket;
-    TI_UINT8           length = 0;
-    TMacAddr           assocBssid;
-    TMacAddr           pBssid;
-    pmkidValue_t       pmkId;
-    TI_STATUS          status;
-    TI_UINT8           index;
-
-    if (pIe==NULL)
-    {
-        *pLength = 0;
-        return TI_NOK;
-    }
-
-    /* check Group suite validity */
-    if (!broadcastCipherSuiteValidity[pAdmCtrl->networkMode][pAdmCtrl->broadcastSuite])
-    {
-        *pLength = 0;
-        return TI_NOK;
-    }
-
-    /* Init Wpa2 IE (RSN IE) */
-    pWpa2IePacket = (wpa2IePacket_t*)pIe;
-    os_memoryZero(pAdmCtrl->hOs, pWpa2IePacket, sizeof(wpa2IePacket_t));
-    /* Fill the element ID */
-    pWpa2IePacket->elementid = RSN_IE_ID;
-    SET_WLAN_WORD(&pWpa2IePacket->version,ENDIAN_HANDLE_WORD(WPA2_OUI_MAX_VERSION));
-    length += 2;
-    /* build group suite */
-    os_memoryCopy(pAdmCtrl->hOs, (void *)pWpa2IePacket->groupSuite, wpa2IeOuiIe, 3);
-    pWpa2IePacket->groupSuite[3] = (TI_UINT8)pAdmCtrl->pRsn->paeConfig.broadcastSuite;
-    length += 4;
-    /* build pairwise suite - we always send only one pairwise suite */
-    SET_WLAN_WORD(&pWpa2IePacket->pairwiseSuiteCnt,ENDIAN_HANDLE_WORD(0x0001));
-    length += 2;
-    os_memoryCopy(pAdmCtrl->hOs, (void *)pWpa2IePacket->pairwiseSuite, wpa2IeOuiIe, 3);
-    pWpa2IePacket->pairwiseSuite[3] = (TI_UINT8)pAdmCtrl->pRsn->paeConfig.unicastSuite;
-    length += 4;    
-    /* build keyMng suite - we always send only one key mgmt  suite*/
-    SET_WLAN_WORD(&pWpa2IePacket->authKeyMngSuiteCnt,ENDIAN_HANDLE_WORD(0x0001));
-    length += 2;
-    os_memoryCopy(pAdmCtrl->hOs, (void *)pWpa2IePacket->authKeyMngSuite, wpa2IeOuiIe, 3);    
-    switch (pAdmCtrl->externalAuthMode)
-    {
-    case RSN_EXT_AUTH_MODE_OPEN:
-    case RSN_EXT_AUTH_MODE_SHARED_KEY:
-    case RSN_EXT_AUTH_MODE_AUTO_SWITCH:
-        pWpa2IePacket->authKeyMngSuite[3] = WPA2_IE_KEY_MNG_NONE;
-        break;
-    case RSN_EXT_AUTH_MODE_WPA2:
-    case RSN_EXT_AUTH_MODE_WPA:   /* for Any-WPA/WPA-Mixed mode */
-        {
-#ifdef XCC_MODULE_INCLUDED
-            TI_UINT8   akmSuite[DOT11_OUI_LEN];
-
-            if (admCtrlXCC_getCckmAkm(pAdmCtrl, akmSuite))
-            {
-                os_memoryCopy(pAdmCtrl->hOs, (void*)pWpa2IePacket->authKeyMngSuite, akmSuite, DOT11_OUI_LEN);
-            }
-            else
-#endif
-            {
-                pWpa2IePacket->authKeyMngSuite[3] = WPA2_IE_KEY_MNG_801_1X;
-            }
-        }
-        break;
-    case RSN_EXT_AUTH_MODE_WPA2PSK:
-    case RSN_EXT_AUTH_MODE_WPAPSK:
-        pWpa2IePacket->authKeyMngSuite[3] = WPA2_IE_KEY_MNG_PSK_801_1X;
-        break;
-    default:
-        pWpa2IePacket->authKeyMngSuite[3] = WPA2_IE_KEY_MNG_NONE;
-        break;
-    }
-    length += 4;   
-    /* build Capabilities */
-    SET_WLAN_WORD(&pWpa2IePacket->capabilities,ENDIAN_HANDLE_WORD(admCtrlWpa2_buildCapabilities(pAdmCtrl)));
-    length += 2;
-    /* build PMKID list: we support no more than 1 PMKSA per AP, */
-    /* so no more than 1 PMKID can be sent in the RSN IE         */
-    if(pAdmCtrl->preAuthSupport && 
-       (pAdmCtrl->pRsn->paeConfig.authProtocol == RSN_EXT_AUTH_MODE_WPA2))
-    {
-        /* Init value of PMKID count is 0 */
-        SET_WLAN_WORD(&pWpa2IePacket->pmkIdCnt,ENDIAN_HANDLE_WORD(0));
-        length += 2;
-        status = ctrlData_getParamBssid(pAdmCtrl->pRsn->hCtrlData, CTRL_DATA_CURRENT_BSSID_PARAM, pBssid);
-		MAC_COPY(assocBssid, pBssid);
-        TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa2_getInfoElement - find PMKID \n");
-        status = admCtrlWpa2_findPMKID(pAdmCtrl, &assocBssid, &pmkId, &index);
-        if(status == TI_OK)
-        {
-            TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa2_getInfoElement - PMKID was found! \n");
-            SET_WLAN_WORD(&pWpa2IePacket->pmkIdCnt,ENDIAN_HANDLE_WORD(1));
-            os_memoryCopy(pAdmCtrl->hOs, (TI_UINT8 *)pWpa2IePacket->pmkId, 
-                      (TI_UINT8 *)pmkId, PMKID_VALUE_SIZE);
-            length += PMKID_VALUE_SIZE;
-        }
-    }   
-    pWpa2IePacket->length = length;    /* RSN IE length without IEid and length field */
-    *pLength              = length+2;  /* The whole length of the RSN IE */
-    TRACE_INFO_HEX(pAdmCtrl->hReport, pIe, *pLength);
-    return TI_OK;
-
-}
-/**
-*
-* admCtrlWpa2_setSite  - Set current primary site parameters for registration.
-*
-* \b Description: 
-*
-* Set current primary site parameters for registration.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - context \n
-*  I   - pRsnData - site's RSN data \n
-*  O   - pAssocIe - result IE of evaluation \n
-*  O   - pAssocIeLen - length of result IE of evaluation \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on site is aproved, TI_NOK on site is rejected.
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa2_setSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen)
-{
-    TI_STATUS               status;
-    paramInfo_t             *pParam;
-    TTwdParamInfo           tTwdParam;
-    wpa2IeData_t            wpa2Data;
-    TRsnPaeConfig           paeConfig;
-    TI_UINT8                *pWpa2Ie;
-    ECipherSuite            uSuite, bSuite;
-
-    *pAssocIeLen = 0;
-
-    if (pRsnData==NULL)
-    {
-        return TI_NOK;
-    }
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pAdmCtrl->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    if (pRsnData->pIe==NULL)
-    {
-        /* configure the MLME module with the 802.11 OPEN authentication suite, 
-            THe MLME will configure later the authentication module */
-        pParam->paramType = MLME_LEGACY_TYPE_PARAM;
-        pParam->content.mlmeLegacyAuthType = AUTH_LEGACY_OPEN_SYSTEM;
-        status = mlme_setParam(pAdmCtrl->hMlme, pParam);
-        goto adm_ctrl_wpa2_end;
-    }
-
-#ifdef XCC_MODULE_INCLUDED
-    /* Clean MIC and KP flags in the HAL.                */
-    /* It is needed if the previous privacy mode was XCC */
-    tTwdParam.paramType = TWD_RSN_XCC_SW_ENC_ENABLE_PARAM_ID; 
-    tTwdParam.content.rsnXCCSwEncFlag = TI_FALSE;
-    status = TWD_SetParam (pAdmCtrl->pRsn->hTWD, &tTwdParam);
-
-    tTwdParam.paramType = TWD_RSN_XCC_MIC_FIELD_ENABLE_PARAM_ID; 
-    tTwdParam.content.rsnXCCMicFieldFlag = TI_FALSE;
-    status = TWD_SetParam (pAdmCtrl->pRsn->hTWD, &tTwdParam);
-
-    /* Check if Aironet IE exists */
-    admCtrlXCC_setExtendedParams(pAdmCtrl, pRsnData);
-
-#endif /*XCC_MODULE_INCLUDED*/
-    
-    status = admCtrl_parseIe(pAdmCtrl, pRsnData, &pWpa2Ie, RSN_IE_ID);
-    if (status != TI_OK)                                                         
-    {
-        goto adm_ctrl_wpa2_end;
-    }
-    TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa2_setSite: RSN_IE=\n");
-    TRACE_INFO_HEX(pAdmCtrl->hReport, pRsnData->pIe, pRsnData->ieLen);
-    status = admCtrlWpa2_parseIe(pAdmCtrl, pWpa2Ie, &wpa2Data);
-    if (status != TI_OK)
-    {
-        goto adm_ctrl_wpa2_end;
-    }
-    if ((wpa2Data.unicastSuite[0]>=MAX_WPA2_CIPHER_SUITE) ||
-        (wpa2Data.broadcastSuite>=MAX_WPA2_CIPHER_SUITE) ||
-        (pAdmCtrl->unicastSuite>=MAX_WPA2_CIPHER_SUITE))
-    {
-        status = TI_NOK;
-        goto adm_ctrl_wpa2_end;
-    }
-    /* Check validity of Group suite */
-    if (!broadcastCipherSuiteValidity[pAdmCtrl->networkMode][wpa2Data.broadcastSuite])
-    {   /* check Group suite validity */                                          
-        status = TI_NOK;
-        goto adm_ctrl_wpa2_end;
-    }
-
-    status = admCtrlWpa2_getCipherSuiteMetric (pAdmCtrl, &wpa2Data, NULL, &uSuite, &bSuite);
-    if (status != TI_OK)
-        goto adm_ctrl_wpa2_end;
-
-    /* set replay counter */
-    pAdmCtrl->replayCnt = wpa2Data.ptkReplayCounters;
-
-    *pAssocIeLen = pRsnData->ieLen;
-    if (pAssocIe != NULL)
-    {
-        os_memoryCopy(pAdmCtrl->hOs, pAssocIe, &wpa2Data, sizeof(wpa2IeData_t));
-    }
-
-    /* re-config PAE with updated unicast and broadcast suite values            */
-    /* If STA works in WpaMixed mode/AnyWpa mode, set PAE auth. mode to WPA2    */
-    paeConfig.authProtocol = pAdmCtrl->externalAuthMode;
-
-    if(pAdmCtrl->WPAPromoteFlags)
-    {
-       if(pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPA)
-          paeConfig.authProtocol   = RSN_EXT_AUTH_MODE_WPA2;
-       if(pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPAPSK)
-          paeConfig.authProtocol   = RSN_EXT_AUTH_MODE_WPA2PSK;
-    }
-
-#ifdef XCC_MODULE_INCLUDED
-    pParam->paramType = XCC_CCKM_EXISTS;
-    pParam->content.XCCCckmExists = (wpa2Data.KeyMngSuite[0]==WPA2_IE_KEY_MNG_CCKM) ? TI_TRUE : TI_FALSE;
-    XCCMngr_setParam(pAdmCtrl->hXCCMngr, pParam);
-#endif
-
-    paeConfig.keyExchangeProtocol = pAdmCtrl->keyMngSuite;
-    paeConfig.unicastSuite        = uSuite;    /* Updated value */
-    paeConfig.broadcastSuite      = bSuite;    /* Updated value */
-    status = admCtrlWpa2_DynamicConfig(pAdmCtrl, &paeConfig);
-
-    if (status != TI_OK)
-    {
-        goto adm_ctrl_wpa2_end;
-    }
-
-    /* Now we configure the MLME module with the 802.11 legacy authentication suite, 
-        THe MLME will configure later the authentication module */
-    pParam->paramType = MLME_LEGACY_TYPE_PARAM;
-#ifdef XCC_MODULE_INCLUDED
-    if (pAdmCtrl->networkEapMode!=OS_XCC_NETWORK_EAP_OFF)
-    {
-        pParam->content.mlmeLegacyAuthType = AUTH_LEGACY_RESERVED1;
-    }
-    else
-#endif
-    {
-        pParam->content.mlmeLegacyAuthType = AUTH_LEGACY_OPEN_SYSTEM;
-    }
-    status = mlme_setParam(pAdmCtrl->hMlme, pParam);
-    if (status != TI_OK)
-    {
-        goto adm_ctrl_wpa2_end;
-    }
-
-    pParam->paramType = RX_DATA_EAPOL_DESTINATION_PARAM;
-    pParam->content.rxDataEapolDestination = OS_ABS_LAYER;
-    status = rxData_setParam(pAdmCtrl->hRx, pParam);
-    if (status != TI_OK)
-    {
-        goto adm_ctrl_wpa2_end;
-    }
-
-    /* Configure privacy status in HAL so that HW is prepared to recieve keys */
-    tTwdParam.paramType = TWD_RSN_SECURITY_MODE_PARAM_ID;
-    tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)paeConfig.unicastSuite;
-    status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
-adm_ctrl_wpa2_end:
-    os_memoryFree(pAdmCtrl->hOs, pParam, sizeof(paramInfo_t));
-    return status;
-}
-
-/**
-*
-* admCtrlWpa_evalSite  - Evaluate site for registration.
-*
-* \b Description: 
-*
-* evaluate site RSN capabilities against the station's cap.
-* If the BSS type is infrastructure, the station matches the site only if it's WEP status is same as the site
-* In IBSS, it does not matter
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - Context \n
-*  I   - pRsnData - site's RSN data \n
-*  O   - pEvaluation - Result of evaluation \n
-*  
-* \b RETURNS:
-*
-*  TI_OK 
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa2_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSiteParams *pRsnSiteParams, TI_UINT32 *pEvaluation)
-{
-    TI_STATUS               status;
-    wpa2IeData_t            wpa2Data;
-    TI_UINT8                *pWpa2Ie;
-    ECipherSuite            uSuite, bSuite; 
-    TI_UINT8                i = 0;
-    TIWLN_SIMPLE_CONFIG_MODE  wscMode = TIWLN_SIMPLE_CONFIG_OFF;
-
-    *pEvaluation = 0;
-
-    if (pRsnData==NULL)
-    {
-        return TI_NOK;
-    }
-    if (pRsnData->pIe==NULL)
-    {
-        return TI_NOK;
-    }
-    
-    if (pRsnSiteParams->bssType != BSS_INFRASTRUCTURE)
-    {
-        return TI_NOK;
-    }
-
-    /* Get Simple-Config state */
-    siteMgr_getParamWSC(pAdmCtrl->pRsn->hSiteMgr, &wscMode); /* SITE_MGR_SIMPLE_CONFIG_MODE */
-    status = admCtrl_parseIe(pAdmCtrl, pRsnData, &pWpa2Ie, RSN_IE_ID);
-    if (status != TI_OK)                                                         
-    {                                                                                    
-        return status;                                                        
-    }
-    TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa2_evalSite, IE=\n");
-
-    TRACE_INFO_HEX(pAdmCtrl->hReport, pRsnData->pIe, pRsnData->ieLen);
-
-    status = admCtrlWpa2_parseIe(pAdmCtrl, pWpa2Ie, &wpa2Data);
-    if (status != TI_OK)
-    {
-        return status;
-    }
-
-	/* check keyMngSuite validity */
-    status = TI_NOK;
-    for(i = 0; 
-       (i < wpa2Data.KeyMngSuiteCnt) &&(i<MAX_WPA2_KEY_MNG_SUITES)&& (status != TI_OK);
-        i++)
-    {
-    	switch (wpa2Data.KeyMngSuite[i])
-       	{
-          	case WPA2_IE_KEY_MNG_NONE:
-            	status = (pAdmCtrl->externalAuthMode <= RSN_EXT_AUTH_MODE_AUTO_SWITCH) ? TI_OK : TI_NOK;
-              	break;
-          	case WPA2_IE_KEY_MNG_801_1X:
-#ifdef XCC_MODULE_INCLUDED
-			/* CCKM is allowed only in 802.1x auth */
-          	case WPA2_IE_KEY_MNG_CCKM:
-#endif
-
-            	if(!pAdmCtrl->WPAPromoteFlags)
-               		status = (pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPA2) ? TI_OK : TI_NOK;
-              	else
-                 	/* Any-WPA mode is supported */
-                 	status = ((pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPA2) ||
-                        (pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPA)) ? TI_OK : TI_NOK;
-              	break;
-          	case WPA2_IE_KEY_MNG_PSK_801_1X:
-				if(!pAdmCtrl->WPAPromoteFlags)
-                	status = (pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPA2PSK) ? TI_OK : TI_NOK;
-             	else
-             		/* Any-WPA mode is supported */
-                	status = ((pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPA2PSK) ||
-                				(wscMode && (pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPA)) ||
-                    			(pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPAPSK)) ? TI_OK : TI_NOK;					
-
-				if ((status == TI_NOK) && (wpa2Data.KeyMngSuiteCnt > 1) && (wpa2Data.KeyMngSuite[1] == WPA2_IE_KEY_MNG_801_1X) && (pAdmCtrl->externalAuthMode == RSN_EXT_AUTH_MODE_WPA2))
-                {
-                TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Overriding AKM suite evaluation for simple-config\n");
-                    status = TI_OK;
-				}
-				break;
-       		default:
-           TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_ERROR, "admCtrlWpa2_evalSite, default, wpa2Data.KeyMngSuite[i]=%d \n",wpa2Data.KeyMngSuite[i]);
-             	status = TI_NOK;
-             	break;
-       	}
-    }
-
-    if (status != TI_OK)
-    {
-        TRACE3(pAdmCtrl->hReport, REPORT_SEVERITY_ERROR, "admCtrlWpa2_evalSite, status=%d, externalAuthMode=%d, WPAPromoteFlags=%d \n", status, pAdmCtrl->externalAuthMode, pAdmCtrl->WPAPromoteFlags);
-        return status;
-    }
-
-    /* Check cipher suite validity */
-    if(admCtrlWpa2_getCipherSuiteMetric(pAdmCtrl, &wpa2Data, pEvaluation, &uSuite, &bSuite) != TI_OK)
-        return TI_NOK;
-
-    /* Check privacy bit if not in mixed mode */
-    if (!pAdmCtrl->mixedMode)
-    {   /* There's no mixed mode, so make sure that the privacy Bit matches the privacy mode*/
-        if (((pRsnData->privacy) && (uSuite == TWD_CIPHER_NONE)) ||
-            ((!pRsnData->privacy) && (uSuite > TWD_CIPHER_NONE)))
-        {
-            *pEvaluation = 0;
-            TRACE2(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa2_evalSite, mixedMode is TI_FALSE, privacy=%d, uSuite=%d\n", pRsnData->privacy, uSuite);
-            return TI_NOK;
-        }
-    }
-
-    /* always return TI_OK */
-    return TI_OK;
-}
-
-
-/**
-*
-* admCtrlWpa2_parseIe  - Parse an WPA information element.
-*
-* \b Description: 
-*
-* Parse an WPA information element. 
-* Builds a structure of the unicast adn broadcast cihper suites,
-* the key management suite and the capabilities.
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - pointer to admCtrl context
-*  I   - pWpa2Ie  - pointer to WPA IE (RSN IE) buffer  \n
-*  O   - pWpa2Data - WPA2 IE (RSN IE) structure after parsing
-*  
-*  
-* \b RETURNS:
-*
-* TI_OK on success, TI_NOK on failure. 
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa2_parseIe(admCtrl_t *pAdmCtrl, TI_UINT8 *pWpa2Ie, wpa2IeData_t *pWpa2Data)
-{
-    dot11_RSN_t      *wpa2Ie       =  (dot11_RSN_t *)pWpa2Ie;
-    TI_UINT16            temp2bytes =0, capabilities;
-    TI_UINT8             dataOffset = 0, i = 0, j = 0, curKeyMngSuite = 0;
-    ECipherSuite     curCipherSuite = TWD_CIPHER_NONE;
-
-    TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa2_IE: DEBUG: admCtrlWpa2_parseIe\n\n");
-
-    if ((pWpa2Data == NULL) || (pWpa2Ie == NULL))
-    {
-        return TI_NOK;
-    }
-
-    COPY_WLAN_WORD(&temp2bytes, wpa2Ie->rsnIeData);
-    dataOffset += 2;
-
-    /* Check the header fields and the version */
-    if((wpa2Ie->hdr[0] != RSN_IE_ID) || (wpa2Ie->hdr[1] < WPA2_IE_MIN_LENGTH) ||
-       (temp2bytes != WPA2_OUI_MAX_VERSION))
-    {
-        TRACE3(pAdmCtrl->hReport, REPORT_SEVERITY_ERROR, "Wpa2_ParseIe Error: length=0x%x, elementid=0x%x, version=0x%x\n", wpa2Ie->hdr[1], wpa2Ie->hdr[0], temp2bytes);
-
-        return TI_NOK; 
-    }
-
-
-    /* Set default values */
-    os_memoryZero(pAdmCtrl->hOs, pWpa2Data, sizeof(wpa2IeData_t));
-
-    pWpa2Data->broadcastSuite = TWD_CIPHER_AES_CCMP;
-    pWpa2Data->unicastSuiteCnt = 1;
-    pWpa2Data->unicastSuite[0] = TWD_CIPHER_AES_CCMP;
-    pWpa2Data->KeyMngSuiteCnt = 1;
-    pWpa2Data->KeyMngSuite[0] = WPA2_IE_KEY_MNG_801_1X;
-
-    /* If we've reached the end of the received RSN IE */
-    if(wpa2Ie->hdr[1] < WPA2_IE_GROUP_SUITE_LENGTH)
-        return TI_OK;
-    
-    /* Processing of Group Suite field - 4 bytes*/
-    pWpa2Data->broadcastSuite = (ECipherSuite)admCtrlWpa2_parseSuiteVal(pAdmCtrl, (TI_UINT8 *)wpa2Ie->rsnIeData + dataOffset,
-                                                          TWD_CIPHER_WEP104, TWD_CIPHER_UNKNOWN);
-    dataOffset +=4;
-    TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa2_IE: GroupSuite %x \n", pWpa2Data->broadcastSuite);
-
-
-    /* Processing of Pairwise (Unicast) Cipher Suite - 2 bytes counter and list of 4-byte entries */
-    if(wpa2Ie->hdr[1] < WPA2_IE_MIN_PAIRWISE_SUITE_LENGTH)
-        return TI_OK;
-
-    COPY_WLAN_WORD(&pWpa2Data->unicastSuiteCnt, wpa2Ie->rsnIeData + dataOffset);
-    dataOffset += 2;
-
-    if(pWpa2Data->unicastSuiteCnt > UNICAST_CIPHER_MAXNO_IN_RSNIE)
-    {
-        /* something wrong in the RSN IE */
-        TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_ERROR, "Wpa2_ParseIe Error: Pairwise cipher suite count is  %d \n", pWpa2Data->unicastSuiteCnt);
-        return TI_NOK;
-    }
-
-    /* Get unicast cipher suites */
-    for(i = 0; i < pWpa2Data->unicastSuiteCnt; i++)
-    {
-        curCipherSuite = (ECipherSuite)admCtrlWpa2_parseSuiteVal(pAdmCtrl, (TI_UINT8 *)wpa2Ie->rsnIeData + dataOffset, 
-                                                   TWD_CIPHER_WEP104, TWD_CIPHER_UNKNOWN);
-        if(curCipherSuite == TWD_CIPHER_NONE)
-            curCipherSuite = pWpa2Data->broadcastSuite;
-
-        pWpa2Data->unicastSuite[i] = curCipherSuite;
-        dataOffset +=4;
-
-        TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa_IE: unicast suite %x \n", curCipherSuite);
-    }
-
-    /* Sort all the unicast suites supported by the AP in the decreasing order */
-    /* (so the best cipher suite will be the first)                            */
-    if(pWpa2Data->unicastSuiteCnt > 1)
-    {
-       for(i = 0; i < (pWpa2Data->unicastSuiteCnt -1); i ++)
-       {
-           for(j = 0; j < i; j ++)
-           {
-               if(pWpa2Data->unicastSuite[j] > pWpa2Data->unicastSuite[j + 1])
-               {
-                   curCipherSuite               = pWpa2Data->unicastSuite[j];
-                   pWpa2Data->unicastSuite[j]   = pWpa2Data->unicastSuite[j+1];
-                   pWpa2Data->unicastSuite[j+1] = curCipherSuite;
-               }
-           }
-       }
-    }
-
-    /* If we've reached the end of the received RSN IE */
-    if (wpa2Ie->hdr[1] == dataOffset)
-        return TI_OK;
-
-     /* KeyMng Suite */
-    COPY_WLAN_WORD(&(pWpa2Data->KeyMngSuiteCnt), wpa2Ie->rsnIeData + dataOffset);
-
-     dataOffset += 2;
-     pAdmCtrl->wpaAkmExists = TI_FALSE;
-     for(i = 0; i < pWpa2Data->KeyMngSuiteCnt; i++)
-     {
-#ifdef XCC_MODULE_INCLUDED
-            curKeyMngSuite = admCtrlXCC_parseCckmSuiteVal4Wpa2(pAdmCtrl, (TI_UINT8 *)(wpa2Ie->rsnIeData + dataOffset));
-            if (curKeyMngSuite == WPA2_IE_KEY_MNG_CCKM)
-            {  /* CCKM is the maximum AKM */
-                pWpa2Data->KeyMngSuite[i] = curKeyMngSuite;
-            }
-            else
-#endif
-            {
-                curKeyMngSuite = admCtrlWpa2_parseSuiteVal(pAdmCtrl, (TI_UINT8 *)wpa2Ie->rsnIeData + dataOffset, 
-                            WPA2_IE_KEY_MNG_PSK_801_1X, WPA2_IE_KEY_MNG_NA);
-            }
-
-
-        TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa2_IE: authKeyMng %x  \n", curKeyMngSuite);
-
-         if ((curKeyMngSuite != WPA2_IE_KEY_MNG_NA) && 
-             (curKeyMngSuite != WPA2_IE_KEY_MNG_CCKM))
-         {
-             pWpa2Data->KeyMngSuite[i] = curKeyMngSuite;
-         }
-
-         if (curKeyMngSuite==WPA2_IE_KEY_MNG_801_1X)
-         {   /* If 2 AKM exist, save also the second priority */
-             pAdmCtrl->wpaAkmExists = TI_TRUE;
-         }
-
-         dataOffset += 4;
-
-		 /* Include all AP key management supported suites in the wpaData structure */
-            pWpa2Data->KeyMngSuite[i+1] = curKeyMngSuite;
-     }
-
-    /* If we've reached the end of the received RSN IE */
-    if (wpa2Ie->hdr[1] == dataOffset)
-        return TI_OK;
-
-    /* Parse capabilities */
-    COPY_WLAN_WORD(&capabilities, wpa2Ie->rsnIeData + dataOffset);
-    pWpa2Data->bcastForUnicatst  = (TI_UINT8)(capabilities & WPA2_GROUP_4_UNICAST_CAPABILITY_MASK)>> 
-                                           WPA2_GROUP_4_UNICAST_CAPABILITY_SHIFT;
-    pWpa2Data->ptkReplayCounters = (TI_UINT8)(capabilities &  WPA2_PTK_REPLAY_COUNTERS_CAPABILITY_MASK)>> 
-                                           WPA2_PTK_REPLAY_COUNTERS_CAPABILITY_SHIFT;
-
-    switch (pWpa2Data->ptkReplayCounters)
-    {
-    case 0: pWpa2Data->ptkReplayCounters=1;
-            break;
-    case 1: pWpa2Data->ptkReplayCounters=2;
-            break;
-    case 2: pWpa2Data->ptkReplayCounters=4;
-            break;
-    case 3: pWpa2Data->ptkReplayCounters=16;
-            break;
-    default: pWpa2Data->ptkReplayCounters=1;
-            break;
-   }
-   pWpa2Data->gtkReplayCounters = (TI_UINT8)(capabilities & 
-                                        WPA2_GTK_REPLAY_COUNTERS_CAPABILITY_MASK) >> 
-                                        WPA2_GTK_REPLAY_COUNTERS_CAPABILITY_SHIFT;
-   switch (pWpa2Data->gtkReplayCounters)
-   {
-   case 0: pWpa2Data->gtkReplayCounters=1;
-            break;
-   case 1: pWpa2Data->gtkReplayCounters=2;
-            break;
-   case 2: pWpa2Data->gtkReplayCounters=4;
-            break;
-   case 3: pWpa2Data->gtkReplayCounters=16;
-            break;
-   default: pWpa2Data->gtkReplayCounters=1;
-            break;
-   }
-
-   pWpa2Data->preAuthentication = (TI_UINT8)(capabilities & WPA2_PRE_AUTH_CAPABILITY_MASK);
-
-   TRACE5(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "Wpa2_IE: capabilities %x, preAuthentication = %x, bcastForUnicatst %x, ptk = %x, gtk = %x\n", capabilities, pWpa2Data->preAuthentication, pWpa2Data->bcastForUnicatst, pWpa2Data->ptkReplayCounters, pWpa2Data->gtkReplayCounters);
-
-    return TI_OK;
-
-}
-
-
-TI_UINT16 admCtrlWpa2_buildCapabilities(admCtrl_t *pAdmCtrl)
-{
-   TI_UINT16 capabilities = 0;
-   TI_UINT16 replayCnt;
-
-
-   /* Bit 0 - Pre-authentication is set to 0             */
-   /* when RSN IE is sent from a STA (in assoc request)  */
-
-   /* Bit1: group key for unicast is set to 0*/
-
-   /* Bits 2&3: PTKSA Replay counter; bits 4&5 GTKSA replay Counters */
-   switch (pAdmCtrl->replayCnt)
-   {
-   case 1:  replayCnt=0;
-       break;
-   case 2:  replayCnt=1;
-       break;
-   case 4:  replayCnt=2;
-       break;
-   case 16: replayCnt=3;
-       break;
-   default: replayCnt=0;
-       break;
-   }
-
-   capabilities |= replayCnt << WPA2_PTK_REPLAY_COUNTERS_CAPABILITY_SHIFT;
-   capabilities |= replayCnt << WPA2_GTK_REPLAY_COUNTERS_CAPABILITY_SHIFT;
-
-   return   capabilities;
-
-}
-
-
-TI_UINT32  admCtrlWpa2_parseSuiteVal(admCtrl_t *pAdmCtrl, TI_UINT8* suiteVal, TI_UINT32 maxVal, TI_UINT32 unknownVal)
-{
-    TI_UINT32  suite;
-
-    if ((pAdmCtrl==NULL) || (suiteVal==NULL))
-    {
-        return TWD_CIPHER_UNKNOWN;
-    }
-    if (!os_memoryCompare(pAdmCtrl->hOs, suiteVal, wpa2IeOuiIe, 3))
-    {
-        suite =  (ECipherSuite)((suiteVal[3]<=maxVal) ? suiteVal[3] : unknownVal); 
-    } else
-    {
-        suite = unknownVal;
-    }
-    return  suite;
-
-}
-
-
-TI_STATUS admCtrlWpa2_checkCipherSuiteValidity (ECipherSuite unicastSuite, ECipherSuite broadcastSuite, ECipherSuite encryptionStatus)
-{
-    ECipherSuite maxCipher;
-
-    maxCipher = (unicastSuite>=broadcastSuite) ? unicastSuite : broadcastSuite ;
-    if (maxCipher != encryptionStatus)
-    {
-        return TI_NOK;
-    }
-    if ((unicastSuite != TWD_CIPHER_NONE) && (broadcastSuite>unicastSuite))
-    {
-        return TI_NOK;
-    }
-    return TI_OK;
-}
-
-TI_STATUS admCtrlWpa2_getCipherSuiteMetric (admCtrl_t *pAdmCtrl, wpa2IeData_t *pWpa2Data, TI_UINT32 *metric, 
-                                            ECipherSuite *uSuite, ECipherSuite  *bSuite)
-{
-   ECipherSuite   encryption   = TWD_CIPHER_NONE;
-   ECipherSuite   unicastSuite = TWD_CIPHER_NONE, brdcstSuite = TWD_CIPHER_NONE;
-   admCtrlWpa2_validity_t  admCtrlWpa2_validity;
-   TI_UINT32     maxMetric = 0, index = 0;
-   TI_STATUS  status = TI_NOK;
-
-   /* Set admCtrlWpa2_validity initial values */
-   admCtrlWpa2_validity = admCtrlWpa2_validityTable[TWD_CIPHER_NONE][TWD_CIPHER_NONE][TWD_CIPHER_NONE];
-
-   /* Check validity of configured encryption (cipher) and validity of */
-   /* promoted cipher (in case of AnyWPA (WPAmixed mode))              */
-   pAdmCtrl->getCipherSuite(pAdmCtrl, &encryption);
-   TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION , "admCtrlWpa2_getCipherSuiteMetric, encryption=%d\n", encryption);
-
-   while(encryption != TWD_CIPHER_NONE) 
-   {
-      for (index=0; index<pWpa2Data->unicastSuiteCnt; index++)
-      {
-          admCtrlWpa2_validity = 
-          admCtrlWpa2_validityTable[pWpa2Data->unicastSuite[index]][pWpa2Data->broadcastSuite][encryption];
-          if (admCtrlWpa2_validity.status == TI_OK)
-          {
-              TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION , "admCtrlWpa2_getCipherSuiteMetric, break: validity.evaluation=%d\n", admCtrlWpa2_validity.evaluation);
-              break;
-          }
-      }
-
-      if ((admCtrlWpa2_validity.status == TI_OK) && (admCtrlWpa2_validity.evaluation > maxMetric))
-      {
-          TRACE2(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION , "admCtrlWpa2_getCipherSuiteMetric, validity.evaluation=%d, maxMetric=%d\n", admCtrlWpa2_validity.evaluation, maxMetric);
-
-          maxMetric       = admCtrlWpa2_validity.evaluation;
-          status          = admCtrlWpa2_validity.status;
-          unicastSuite    = admCtrlWpa2_validity.unicast;
-          brdcstSuite     = admCtrlWpa2_validity.broadcast;
-      }
-
-      if((pAdmCtrl->WPAPromoteFlags & ADMCTRL_WPA_OPTION_ENABLE_PROMOTE_CIPHER) &&
-         (encryption != TWD_CIPHER_AES_CCMP))
-         encryption = TWD_CIPHER_AES_CCMP;
-      else
-         encryption = TWD_CIPHER_NONE;
-
-    }  /* End of "while encryption" stmt */
-
-   if(metric)
-      *metric = maxMetric;
-
-   if(uSuite)
-      *uSuite = unicastSuite;
-
-   if(bSuite)
-      *bSuite = brdcstSuite;
-
-    return status;
-}
-
-
-/**
-*
-* admCtrlWpa2_DynamicConfig  - Dynamic setting of WPA2 config parameters.
-*
-* \b Description: 
-*
-*   Sets  WPA2 callback procedures and PAE configuration parameters.
-*   This procedure is similar to admCtrlWpa2_Config procedure.
-*   The main difference is that admCtrlWpa2_Config sets the DEFAULT VALUES
-*   of the configuration parameters and so it should be called during
-*   initialization of the driver code or when Auth mode or Encryption status
-*   parameters are beeing set.
-*   admCtrlWpa2_DynamicConfig set the updated values of WPA2 configuration  
-*   parameters which gets after negotiation with an AP. So the procedure 
-*   should be called during setSite stage.
-*   
-* \b ARGS:
-*
-*  I   - pAdmCtrl    - pointer to admCtrl context
-*  I   - pPaeConfig  - pointer to PAE structure
-*
-* \b RETURNS:
-*
-* TI_OK on success, TI_NOK on failure. 
-*
-* \sa 
-*/
-
-TI_STATUS admCtrlWpa2_DynamicConfig(admCtrl_t *pAdmCtrl, TRsnPaeConfig *pPaeConfig)
-{
-    TI_STATUS status = TI_OK;
-
-    /* Set those WPA2 params and callback procedures used after setSite stage */
-    pAdmCtrl->getInfoElement = admCtrlWpa2_getInfoElement;
-
-    pAdmCtrl->getPmkidList      = admCtrlWpa2_getPMKIDList;
-    pAdmCtrl->setPmkidList      = admCtrlWpa2_setPMKIDList;
-    pAdmCtrl->resetPmkidList    = admCtrlWpa2_resetPMKIDCache;
-    pAdmCtrl->getPreAuthStatus = admCtrlWpa2_getPreAuthStatus;
-    pAdmCtrl->startPreAuth = admCtrlWpa2_startPreAuth;
-
-    /* set key management suite */
-    switch (pAdmCtrl->externalAuthMode)
-    {
-    case RSN_EXT_AUTH_MODE_WPA2:
-    case RSN_EXT_AUTH_MODE_WPA2PSK:
-        pAdmCtrl->keyMngSuite = RSN_KEY_MNG_802_1X;
-        break;
-    case RSN_EXT_AUTH_MODE_WPA:  /* It is any-WPA (WPA-mixed mode ) */
-    case RSN_EXT_AUTH_MODE_WPAPSK:
-        pAdmCtrl->keyMngSuite = RSN_KEY_MNG_802_1X;
-        break;
-    case RSN_EXT_AUTH_MODE_WPANONE:
-        pAdmCtrl->keyMngSuite = RSN_KEY_MNG_NONE;
-        /* Not supported */
-    default:
-        return TI_NOK;
-    }
-
-    /* Config PAE (if needed) */
-    if(pPaeConfig)
-       status = pAdmCtrl->pRsn->setPaeConfig(pAdmCtrl->pRsn, pPaeConfig);
-
-    return status;
-}
-
-
-
-
-/**
-*
-* admCtrlWpa2_findPMKID 
-*
-* \b Description: 
-*
-* Retrieve an AP's PMKID (if exist)
-
-* \b ARGS:
-*
-*  I   - pAdmCtrl - pointer to admCtrl context
-*  I   - pBSSID   - pointer to AP's BSSID address 
-*  O   - pmkID    - pointer to AP's PMKID (if it is NULL ptr, only
-*                   cache index will be returned to the caller)
-*  O   - cacheIndex  - index of the cache table entry containing the 
-                       bssid
-*  
-* \b RETURNS:
-*
-* TI_OK on success, TI_NOK on failure. 
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa2_findPMKID (admCtrl_t * pAdmCtrl, TMacAddr *pBSSID, 
-                                 pmkidValue_t *pPMKID, TI_UINT8  *cacheIndex)
-{
-
-    TI_UINT8           i     = 0;
-    TI_BOOL            found = TI_FALSE;
-    TMacAddr    entryMac;
-    TI_STATUS       status = TI_NOK;
-
-    while(!found && (i < ADMCTRL_PMKID_CACHE_SIZE) && 
-                    (i <= pAdmCtrl->pmkid_cache.entriesNumber))
-    {
-		MAC_COPY (entryMac, pAdmCtrl->pmkid_cache.pmkidTbl[i].bssId);
-        if (MAC_EQUAL (entryMac, *pBSSID))
-        {
-            found       = TI_TRUE;
-            *cacheIndex = i;
-            if(pPMKID)
-            {
-               os_memoryCopy(pAdmCtrl->hOs, (void*)pPMKID,
-                             pAdmCtrl->pmkid_cache.pmkidTbl[i].pmkId, 
-                             PMKID_VALUE_SIZE);
-            }
-        }
-        i++;
-    }
-
-    if(found)
-        status = TI_OK;
-
-    return status;
-
-}
-
-
-/**
-*
-* admCtrlWpa2_getPMKIDList 
-*
-* \b Description: 
-*
-* Returns content of the PMKID cache 
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl        - pointer to admCtrl context
-*  O   - pmkidList       - memory buffer where the procedure writes the PMKIDs
-*                          Supplied by the caller procedure. .
-*  
-* \b RETURNS:
-*
-* TI_OK on success, TI_NOK on failure. 
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa2_getPMKIDList (admCtrl_t * pAdmCtrl,OS_802_11_PMKID *pmkidList)
-{
-
-    TI_UINT8   neededLength, i = 0;
-    TI_UINT8   NumOfEntries = pAdmCtrl->pmkid_cache.entriesNumber;
-    TI_UINT8   *bssid, *pmkid;
-
-    if(!pAdmCtrl->preAuthSupport)
-        return PARAM_NOT_SUPPORTED;
-
-    /* Check the buffer length */
-    if(NumOfEntries > 1)
-       neededLength = 30 + ((NumOfEntries - 1) * (MAC_ADDR_LEN + PMKID_VALUE_SIZE));
-    else
-       neededLength = 30;
-
-    if(neededLength > pmkidList->Length)
-    {
-        /* The buffer length is not enough */
-        pmkidList->Length = neededLength;
-        return TI_NOK;
-    }
-
-    /* The buffer is big enough. Fill the info */
-    pmkidList->Length         = neededLength;
-    pmkidList->BSSIDInfoCount = NumOfEntries;
-
-    TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "RSN:  Get PMKID cache.  Number of entries  = %d \n", NumOfEntries);
-
-    for (i = 0; i < NumOfEntries; i++ )
-    {
-        bssid = (TI_UINT8 *) pAdmCtrl->pmkid_cache.pmkidTbl[i].bssId;
-        pmkid = (TI_UINT8 *)pAdmCtrl->pmkid_cache.pmkidTbl[i].pmkId;
-
-        MAC_COPY(pmkidList->osBSSIDInfo[i].BSSID, bssid);
-
-        os_memoryCopy(pAdmCtrl->hOs,
-                      (void *)pmkidList->osBSSIDInfo[i].PMKID,
-                      &pmkid, 
-                      PMKID_VALUE_SIZE);
-
-        TRACE22(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "RSN:  BSSID:  %.2X-%.2X-%.2X-%.2X-%.2X-%.2X   PMKID: %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X  \n", bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5], pmkid[0], pmkid[1], pmkid[2], pmkid[3], pmkid[4], pmkid[5], pmkid[6], pmkid[7], pmkid[8], pmkid[9], pmkid[10],pmkid[11], pmkid[12],pmkid[13],pmkid[14],pmkid[15]);
-    }
-
-    return TI_OK;
-
-}
-
-/**
-*
-* admCtrlWpa2_addPMKID 
-*
-* \b Description: 
-*
-* Add/Set an AP's PMKID received from the Supplicant 
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - pointer to admCtrl context
-*  I   - pBSSID   - pointer to AP's BSSID address 
-*  I   - pmkID    - AP's PMKID
-*  
-* \b RETURNS:
-*
-* TI_OK on success, TI_NOK on failure. 
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa2_addPMKID (admCtrl_t * pAdmCtrl, TMacAddr *pBSSID, pmkidValue_t pmkID)
-{
-   TI_UINT8         cacheIndex;
-   TI_STATUS     status = TI_NOK;
-
-   /* Try to find the pBSSId in the PMKID cache */
-   status = admCtrlWpa2_findPMKID (pAdmCtrl, pBSSID, NULL, &cacheIndex);
-
-   if(status == TI_OK)
-   {
-       /* Entry for the bssid has been found; Update PMKID */
-       os_memoryCopy(pAdmCtrl->hOs, 
-                    (void*)&pAdmCtrl->pmkid_cache.pmkidTbl[cacheIndex].pmkId,
-                    pmkID, PMKID_VALUE_SIZE);
-       /*pAdmCtrl->pmkid_cache.pmkidTbl[cacheIndex].generationTs = os_timeStampMs(pAdmCtrl->hOs); */
-   }
-   else
-   {
-       /* The new entry is added to the next free entry. */
-       /* Copy the new entry to the next free place.     */
-       cacheIndex = pAdmCtrl->pmkid_cache.nextFreeEntry;
-       MAC_COPY (pAdmCtrl->pmkid_cache.pmkidTbl[cacheIndex].bssId, *pBSSID);
-       os_memoryCopy(pAdmCtrl->hOs, 
-                     (void*)&pAdmCtrl->pmkid_cache.pmkidTbl[cacheIndex].pmkId,
-                     (void*)pmkID, 
-                     PMKID_VALUE_SIZE);
-
-       /* Update the next free entry index. (If the table is full, a new entry */
-       /* will override the oldest entries from the beginning of the table)    */
-       /* Update the number of entries. (it cannot be more than max cach size) */
-       pAdmCtrl->pmkid_cache.nextFreeEntry  = (cacheIndex + 1) % ADMCTRL_PMKID_CACHE_SIZE;
-
-       if(pAdmCtrl->pmkid_cache.entriesNumber < ADMCTRL_PMKID_CACHE_SIZE)
-          pAdmCtrl->pmkid_cache.entriesNumber ++;
-   }
-
-        TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "RSN   Add PMKID   Entry index is %d \n", cacheIndex);
-        TRACE22(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "RSN:  BSSID: %.2X-%.2X-%.2X-%.2X-%.2X-%.2X  PMKID: %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X  \n", (*pBSSID)[0], (*pBSSID)[1], (*pBSSID)[2], (*pBSSID)[3], (*pBSSID)[4], (*pBSSID)[5], pmkID[0], pmkID[1], pmkID[2], pmkID[3], pmkID[4], pmkID[5], pmkID[6], pmkID[7], pmkID[8], pmkID[9], pmkID[10],pmkID[11], pmkID[12],pmkID[13],pmkID[14],pmkID[15]);
-
-
-
-   return TI_OK;
-}
-
-/**
-*
-* admCtrlWpa2_setPMKIDList 
-*
-* \b Description: 
-*
-* Set PMKID cache 
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl        - pointer to admCtrl context
-*  O   - pmkidList       - memory buffer where the procedure reads the PMKIDs from
-*                          Supplied by the caller procedure. 
-* \b RETURNS:
-*
-* TI_OK on success, TI_NOK on failure. 
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa2_setPMKIDList (admCtrl_t * pAdmCtrl, OS_802_11_PMKID *pmkidList)
-{
-    TI_UINT8          neededLength, i = 0;
-    TI_UINT8          NumOfEntries;
-    TMacAddr   macAddr;
-
-    /* Check the minimal buffer length */
-    if (pmkidList->Length < 2*sizeof(TI_UINT32))
-    {
-        TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set PMKID list - Buffer size < min length (8 bytes). Supplied length is %d .\n", pmkidList->Length);
-        return TI_NOK;
-    }
-
-    /* Check the num of entries in the buffer: if 0 it means that */
-    /* PMKID cache has to be cleaned                              */
-    if(pmkidList->BSSIDInfoCount == 0)
-    {
-        admCtrlWpa2_resetPMKIDCache(pAdmCtrl);
-        return TI_OK;
-    }
-
-    /* Check the buffer length */
-    NumOfEntries = (TI_UINT8)pmkidList->BSSIDInfoCount;
-    neededLength =  2*sizeof(TI_UINT32) + (NumOfEntries  *(MAC_ADDR_LEN + PMKID_VALUE_SIZE));
-
-    if(pmkidList->Length < neededLength)
-    {
-        /* Something wrong goes with the buffer */
-        TRACE3(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set PMKID list - no enough room for %d entries Needed length is %d. Supplied length is %d .\n", NumOfEntries, neededLength,pmkidList->Length);
-        return TI_NOK;
-    }
-
-    /*  Write  the PMKID to the PMKID cashe */
-    pmkidList->BSSIDInfoCount = NumOfEntries;
-    for (i = 0; i < NumOfEntries; i++ )
-    {
-         MAC_COPY (macAddr, pmkidList->osBSSIDInfo[i].BSSID);
-
-         TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION , "admCtrlWpa2_setPMKIDList: Received new pre-auth AP\n");
-         if (pAdmCtrl->numberOfPreAuthCandidates)
-         {
-            pAdmCtrl->numberOfPreAuthCandidates--;
-            if (pAdmCtrl->numberOfPreAuthCandidates == 0)
-            {
-               TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION , "Stopping the Pre-Auth timer since Pre-auth is finished\n");
-               tmr_StopTimer (pAdmCtrl->hPreAuthTimerWpa2); 
-               /* Send PRE-AUTH end event to External Application */
-               admCtrl_notifyPreAuthStatus (pAdmCtrl, RSN_PRE_AUTH_END);
-            }
-
-            TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION , "admCtrlWpa2_setPMKIDList: %d APs left in candidate list\n",pAdmCtrl->numberOfPreAuthCandidates);
-
-         }
-        else
-        {
-           TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_WARNING , "admCtrlWpa2_setPMKIDList: number of candidates was already zero...\n");
-        }
-        admCtrlWpa2_addPMKID(pAdmCtrl,&macAddr, (TI_UINT8 *)pmkidList->osBSSIDInfo[i].PMKID);
-    }
-
-    return TI_OK;
-
-}
-
-/**
-*
-* admCtrlWpa2_resetPMKIDCache 
-*
-* \b Description: 
-*
-* Reset PMKID Table 
-*
-* \b ARGS:
-*
-*  I   - pAdmCtrl - pointer to admCtrl context
-*  
-* \b RETURNS:
-*
-* TI_OK on success, TI_NOK on failure. 
-*
-* \sa 
-*/
-TI_STATUS admCtrlWpa2_resetPMKIDCache (admCtrl_t *pAdmCtrl)
-{
-
-    TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "RSN:  Reset PMKID cache.  %d entries are deleted. \n", pAdmCtrl->pmkid_cache.entriesNumber);
-
-   os_memoryZero(pAdmCtrl->hOs, (void*)&pAdmCtrl->pmkid_cache, sizeof(pmkid_cache_t));
-
-   return TI_OK;
-}
-
-
-/**
-*
-* admCtrlWpa2_sendPMKIDCandidateListAfterDelay 
-*
-* \b Description: 
-*
-* New Candidate List of APs with the same SSID as the STA is connected to 
-* is generated and sent after the delay to the supplicant 
-* in order to retrieve the new PMKIDs for the APs.
-*
-* \b ARGS:
-*  I   - pAdmCtrl - pointer to admCtrl context
-*  
-* \b RETURNS:
-*
-* TI_OK on success, TI_NOK on failure. 
-*
-* \sa 
-*/
-
-static void admCtrlWpa2_buildAndSendPMKIDCandList (TI_HANDLE hHandle, TBssidList4PreAuth *apList)
-{
-
-    admCtrl_t         *pAdmCtrl = (admCtrl_t *)hHandle;
-    TI_UINT8          candIndex =0, apIndex = 0, size =0;
-    paramInfo_t       *pParam;
-    OS_802_11_PMKID_CANDIDATELIST  *pCandList;
-    TI_UINT8           memBuff[PMKID_CAND_LIST_MEMBUFF_SIZE + sizeof(TI_UINT32)];
-    dot11_RSN_t       *rsnIE = 0;
-    wpa2IeData_t      wpa2Data;
-    TI_STATUS         status = TI_NOK;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pAdmCtrl->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return;
-    }
-
-    /* Get SSID that the STA is accociated with    */
-    pParam->paramType = SME_DESIRED_SSID_ACT_PARAM;
-    status          = sme_GetParam (pAdmCtrl->pRsn->hSmeSm, pParam);
-    if(status != TI_OK) {
-        os_memoryFree(pAdmCtrl->hOs, pParam, sizeof(paramInfo_t));
-        return;
-    }
-
-    /* If the existing PMKID cache contains information for not relevant */
-    /* ssid (i.e. ssid was changed), clean up the PMKID cache and update */
-    /* the ssid in the PMKID cache */
-    if ((pAdmCtrl->pmkid_cache.ssid.len != pParam->content.smeDesiredSSID.len) || 
-         (os_memoryCompare(pAdmCtrl->hOs, (TI_UINT8 *)pAdmCtrl->pmkid_cache.ssid.str,
-          (TI_UINT8 *)pParam->content.smeDesiredSSID.str,
-                          pAdmCtrl->pmkid_cache.ssid.len) != 0))
-    {
-        admCtrlWpa2_resetPMKIDCache(pAdmCtrl);
-
-        os_memoryCopy(pAdmCtrl->hOs, (void *)pAdmCtrl->pmkid_cache.ssid.str, 
-                      (void *)pParam->content.smeDesiredSSID.str,
-                      pParam->content.siteMgrCurrentSSID.len);
-        pAdmCtrl->pmkid_cache.ssid.len = pParam->content.smeDesiredSSID.len;
-    }
-
-    /* Get list of APs of the SSID that the STA is associated with*/
-    /*os_memoryZero(pAdmCtrl->hOs, (void*)&apList, sizeof(bssidListBySsid_t));
-    status = siteMgr_GetApListBySsid (pAdmCtrl->pRsn->hSiteMgr, 
-                                      &param.content.siteMgrCurrentSSID,
-                                      &apList);
-    */
-    os_memoryFree(pAdmCtrl->hOs, pParam, sizeof(paramInfo_t));
-    if((apList == NULL) || (apList->NumOfItems == 0))
-        return;
-        
-    TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa2_buildAndSendPMKIDCandList - Entry \n");
-
-    /* fill the PMKID candidate list */
-    pCandList = (OS_802_11_PMKID_CANDIDATELIST *)(memBuff + sizeof(TI_UINT32));
-    pCandList->Version = 1;
-    for (apIndex=0; apIndex<pAdmCtrl->pmkid_cache.entriesNumber; apIndex++)
-    {
-        pAdmCtrl->pmkid_cache.pmkidTbl[apIndex].preAuthenticate = TI_FALSE;
-    }
-
-    /* Go over AP list and find APs supporting pre-authentication */
-    for(apIndex = 0; apIndex < apList->NumOfItems; apIndex++)
-    {
-        TI_UINT8 *bssidMac, i = 0;
-
-        status = TI_NOK;
-
-        if (apList->bssidList[apIndex].pRsnIEs==NULL)
-        {
-            continue;
-        }
-        /* Check is there RSN IE in this site */
-        rsnIE = 0;      
-        while( !rsnIE && (i < MAX_RSN_IE))
-        {
-            if(apList->bssidList[apIndex].pRsnIEs[i].hdr[0] == RSN_IE_ID)
-            {
-                rsnIE  = &apList->bssidList[apIndex].pRsnIEs[i];
-                status = TI_OK;
-            }
-            i ++;
-        }
-		if (rsnIE)
-		{
-			TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa2_buildAndSendPMKIDCandList - rsnIE-hdr.eleId = %x \n", rsnIE->hdr[0]);
-		}
-
-        if(status == TI_OK)
-           status = admCtrlWpa2_parseIe(pAdmCtrl, (TI_UINT8 *)rsnIE, &wpa2Data);
-
-        TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa2_buildAndSendPMKIDCandList - parseIe status = %d \n", status);
-        if(status == TI_OK)
-        {   
-            TI_BOOL        preAuthStatus;
-            TI_UINT8               cacheIndex;
-
-            preAuthStatus = admCtrlWpa2_getPreAuthStatus(pAdmCtrl, &apList->bssidList[apIndex].bssId, &cacheIndex);
-
-            TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlWpa2_buildAndSendPMKIDCandList, preAuthStatus=%d \n", preAuthStatus);
-
-            if (preAuthStatus)
-            {
-                pAdmCtrl->pmkid_cache.pmkidTbl[cacheIndex].preAuthenticate = TI_TRUE;
-            }
-
-            bssidMac = (TI_UINT8 *)apList->bssidList[apIndex].bssId;
-            MAC_COPY (pCandList->CandidateList[candIndex].BSSID, bssidMac);
- 
-            if(pAdmCtrl->preAuthSupport && (wpa2Data.preAuthentication))
-            {
-               pCandList->CandidateList[candIndex].Flags = 
-                                 OS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLE;
-            }
-            else
-            {
-                pCandList->CandidateList[candIndex].Flags = 0; 
-
-            }
- 
-            TRACE8(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "RSN:  Candidate [%d] is   %.2X-%.2X-%.2X-%.2X-%.2X-%.2X , Flags=0x%x\n", candIndex, bssidMac[0], bssidMac[1], bssidMac[2], bssidMac[3], bssidMac[4], bssidMac[5], pCandList->CandidateList[candIndex].Flags);
- 
-            candIndex ++;
-        }
-        
-    }
-    /* Add candidates that have valid PMKID, but were not in the list */
-    for (apIndex=0; apIndex<pAdmCtrl->pmkid_cache.entriesNumber; apIndex++)
-    {
-        if (!pAdmCtrl->pmkid_cache.pmkidTbl[apIndex].preAuthenticate)
-        {
-            MAC_COPY (pCandList->CandidateList[candIndex].BSSID,
-                      pAdmCtrl->pmkid_cache.pmkidTbl[apIndex].bssId);
-            pCandList->CandidateList[apIndex].Flags = 
-                OS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLE;
-            candIndex++;
-        }
-    }
-
-
-    pCandList->NumCandidates = candIndex;
-
-    
-    /* Send Status Media specific indication to OS */
-    size = sizeof(OS_802_11_PMKID_CANDIDATELIST) + 
-           (candIndex - 1) * sizeof(OS_802_11_PMKID_CANDIDATE) + sizeof(TI_UINT32);
-
-     /* Fill type of indication */
-    *(TI_UINT32*)memBuff = os802_11StatusType_PMKID_CandidateList;
-
-    pCandList->NumCandidates = candIndex;
-
-    /* Store the number of candidates sent - needed for pre-auth finish event */
-    pAdmCtrl->numberOfPreAuthCandidates = candIndex;
-    /* Start the pre-authentication finish event timer */
-    /* If the pre-authentication process is not over by the time it expires - we send an event */
-    TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION , "Starting PREAUTH timer (%d mSec)\n",pAdmCtrl->preAuthTimeout*candIndex);
-    tmr_StartTimer (pAdmCtrl->hPreAuthTimerWpa2,
-                    admCtrlWpa2_preAuthTimerExpire,
-                    (TI_HANDLE)pAdmCtrl,
-                    pAdmCtrl->preAuthTimeout * candIndex,
-                    TI_FALSE);
-
-    EvHandlerSendEvent(pAdmCtrl->hEvHandler, IPC_EVENT_MEDIA_SPECIFIC,
-                        memBuff, size);
-
-    /* Send PRE-AUTH start event to External Application */
-    admCtrl_notifyPreAuthStatus (pAdmCtrl, RSN_PRE_AUTH_START);
-    TRACE1(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "RSN:  PMKID Candidate List with %d entries has been built and sent for ssid  \n", candIndex);
-    return;
-}
-
-/**
-*
-* admCtrlWpa2_getPreAuthStatus 
-*
-* \b Description: 
-*
-* Returns the status of the Pre Auth for the BSSID. If the authentictaion mode
- * is not WPA2, then TI_FALSE will be returned.
- * For WPA2 mode, if PMKID exists fro the BSSID and its liftime is valid 
- * TI_TRUE will be returned.
- * Otherwise TI_FALSE.
-* 
-* 
-*
-* \b ARGS:
-*  I   - pAdmCtrl - pointer to admCtrl context
- * I   - givenAP  - required BSSID
-*  
-* \b RETURNS:
-*
-* TI_OK on success, TI_NOK on failure. 
-*
-* \sa 
-*/
-static TI_BOOL admCtrlWpa2_getPreAuthStatus(admCtrl_t *pAdmCtrl, TMacAddr *givenAP, TI_UINT8  *cacheIndex)
-{
-    pmkidValue_t    PMKID;
-    
-    if (admCtrlWpa2_findPMKID (pAdmCtrl, givenAP, 
-                                 &PMKID, cacheIndex)!=TI_OK)
-    {
-        return TI_FALSE;
-    }
-    return TI_TRUE;
-
-}
-
-static TI_STATUS admCtrlWpa2_startPreAuth(admCtrl_t *pAdmCtrl, TBssidList4PreAuth *pBssidList)
-{
-
-    admCtrlWpa2_buildAndSendPMKIDCandList (pAdmCtrl, pBssidList);
-    return TI_OK;
-}
-
-static TI_STATUS admCtrlWpa2_get802_1x_AkmExists (admCtrl_t *pAdmCtrl, TI_BOOL *wpa_802_1x_AkmExists)
-{
-    *wpa_802_1x_AkmExists = pAdmCtrl->wpaAkmExists;
-    return TI_OK;
-}
-
-
-
-/*-----------------------------------------------------------------------------
-Routine Name: admCtrlWpa2_preAuthTimerExpire
-Routine Description: updates the preAuthStatus
-Arguments:
-Return Value:
------------------------------------------------------------------------------*/
-void admCtrlWpa2_preAuthTimerExpire(TI_HANDLE hAdmCtrl, TI_BOOL bTwdInitOccured)
-{
-    admCtrl_t         *pAdmCtrl = (admCtrl_t *)hAdmCtrl;
-    TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_WARNING , "admCtrlWpa2_preAuthTimerExpire: PREAUTH EXPIRED !!!!!!!!");
-    /* Send PRE-AUTH end event to External Application */
-    admCtrl_notifyPreAuthStatus (pAdmCtrl, RSN_PRE_AUTH_END);
-    pAdmCtrl->numberOfPreAuthCandidates = 0;
-   return;
-}
-
diff --git a/wl1271/stad/src/Connection_Managment/admCtrlWpa2.h b/wl1271/stad/src/Connection_Managment/admCtrlWpa2.h
deleted file mode 100644
index b8fa03d..0000000
--- a/wl1271/stad/src/Connection_Managment/admCtrlWpa2.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * admCtrlWpa2.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file admCtrlWpa2.h
- *  \brief Admission control header file for WPA2
- *
- *  \see admCtrl.c and admCtrlWpa2.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Admission Control                                             *
- *   PURPOSE: Admission Control Header file for WPA2                        *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _ADM_CTRL_WPA2_H_
-#define _ADM_CTRL_WPA2_H_
-
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* WPA2 configuration parameters:                                       */
-/* defined here only for debugging purposes; should be moved from here  */
-
-#define WPA2_PRE_AUTHENTICATION_SUPPORT 1
-#define WPA2_PMKID_CACHE_SIZE           32
-#define WPA2_CANDIDATE_LIST_MAX_SIZE    16
-
-/* RSN admission control prototypes */
-
-
-/* Structures */
-
-
-
-#define MAX_WPA2_UNICAST_SUITES     (TWD_CIPHER_WEP104+1)
-#define MAX_WPA2_KEY_MNG_SUITES     (RSN_KEY_MNG_XCC+1)
-
-/* Cipher suites for group key sent in RSN IE are: WEP40, WEP104, TKIP, CCCMP */
-#define GRP_CIPHER_MAXNO_IN_RSNIE         4
-
-/* Cipher suites for unicast key sent in RSN IE are TKIP, CCMP, "use Group key"*/
-#define UNICAST_CIPHER_MAXNO_IN_RSNIE     3
-
-/* OUIs for cipher suites and appropriated values of cipherSuite_e (paramout.h file)
- *
- *   00-0F-AC-0   Use group cipher suite     RSN_CIPHER_NONE
- *   00-0F-AC-1   WEP-40                     RSN_CIPHER_WEP
- *   00-0F-AC-2   TKIP                       RSN_CIPHER_TKIP
- *   00-0F-AC-3   Reserved                   RSN_CIPHER_WRAP   not used for WPA2
- *   00-0F-AC-4   4                          RSN_CIPHER_CCMP
- *   00-0F-AC-5   WEP-104                    RSN_CIPHER_WEP104
- *   00-0F-AC 6   reserved 6 to 255          RSN_CIPHER_CKIP  - not used for WPA2
- *
- */
-
-/* Key management suites (Authentication and Key Management Protocol - AKMP)  */
-/* received in RSN IE                                                         */
-#define KEY_MGMT_SUITE_MAXNO_IN_RSN_IE  2
-
-/* OUIs for key management  
-*
-*   00-0F-AC-00  Reserved
-*   00-0F-AC-01  802.1X
-*   00-0F-AC-02  PSK
-*   00-0F-AC-03   reserved from 3 to 255
-*/
-
-/* WPA2 key management suites */
-#define WPA2_IE_KEY_MNG_NONE             0
-#define WPA2_IE_KEY_MNG_801_1X           1
-#define WPA2_IE_KEY_MNG_PSK_801_1X       2
-#define WPA2_IE_KEY_MNG_CCKM			 3
-#define WPA2_IE_KEY_MNG_NA               4
-
-
-#define WPA2_OUI_MAX_VERSION           0x1
-#define WPA2_OUI_DEF_TYPE              0x1
-#define WPA2_OUI_MAX_TYPE              0x2
-
-#define WPA2_PRE_AUTH_CAPABILITY_MASK               0x0001   /* bit 0 */
-#define WPA2_PRE_AUTH_CAPABILITY_SHIFT              0
-#define WPA2_GROUP_4_UNICAST_CAPABILITY_MASK        0x0002   /* bit 1 No Pairwise */
-#define WPA2_GROUP_4_UNICAST_CAPABILITY_SHIFT        1
-#define WPA2_PTK_REPLAY_COUNTERS_CAPABILITY_MASK    0x000c   /* bit 2 and 3 */
-#define WPA2_PTK_REPLAY_COUNTERS_CAPABILITY_SHIFT   2
-#define WPA2_GTK_REPLAY_COUNTERS_CAPABILITY_MASK    0x0030   /* bit 4 and 5 */
-#define WPA2_GTK_REPLAY_COUNTERS_CAPABILITY_SHIFT   4
-                                                             /* bit 6 - 15 - reserved */
-#define WPA2_IE_MIN_LENGTH                  4
-#define WPA2_IE_GROUP_SUITE_LENGTH          8
-#define WPA2_IE_MIN_PAIRWISE_SUITE_LENGTH   14
-#define WPA2_IE_MIN_DEFAULT_LENGTH          24
-#define WPA2_IE_MIN_KEY_MNG_SUITE_LENGTH(pairwiseCnt) (10+4*pairwiseCnt)
-
-
-
-
-/* WPA2 IE (RSN IE) packet structure                                          */
-/* This structure is used for outgoing packets, i.e. for association request  */
-/* For incoming packets (Beacon and Probe response from an AP) stucture of    */
-/* dot11_RSN_t type is used as more common stucture                           */
-typedef struct
-{
-
-    TI_UINT8               elementid;           /* WPA2 IE (RSN IE) id is 0x30 */
-    TI_UINT8               length;
-    TI_UINT16              version;
-    TI_UINT8               groupSuite[4];       /* OUI for broadcast suite */
-    TI_UINT16              pairwiseSuiteCnt;
-    TI_UINT8               pairwiseSuite[4];    /* OUI for 1 unicast suite */ 
-    TI_UINT16              authKeyMngSuiteCnt;
-    TI_UINT8               authKeyMngSuite[4];  /* OUI for 1 key mgmt suite */
-    TI_UINT16              capabilities;
-    TI_UINT16              pmkIdCnt;            /* only one PMKID is supported per AP */
-    TI_UINT8               pmkId[PMKID_VALUE_SIZE];
-} wpa2IePacket_t;
-
-
-/* WPA2 data parsed from RSN info element */
-typedef struct
-{
-
-    ECipherSuite        broadcastSuite;
-    TI_UINT16              unicastSuiteCnt;
-    ECipherSuite        unicastSuite[MAX_WPA2_UNICAST_SUITES];
-    TI_UINT16              KeyMngSuiteCnt;
-    TI_UINT8               KeyMngSuite[MAX_WPA2_KEY_MNG_SUITES];
-    TI_UINT8               preAuthentication;
-    TI_UINT8               bcastForUnicatst;
-    TI_UINT8               ptkReplayCounters;
-    TI_UINT8               gtkReplayCounters;
-    TI_UINT16              pmkIdCnt;
-    TI_UINT8               pmkId[PMKID_VALUE_SIZE];
-} wpa2IeData_t;
-
-
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS admCtrlWpa2_config(admCtrl_t *pAdmCtrl);
-
-TI_STATUS admCtrlWpa2_getInfoElement(admCtrl_t *pAdmCtrl, TI_UINT8 *pIe, TI_UINT32 *pLength);
-
-TI_STATUS admCtrlWpa2_setSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen);
-
-TI_STATUS admCtrlWpa2_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSiteParams *pRsnSiteParams, TI_UINT32 *pEvaluation);
-
-void admCtrlWpa2_preAuthTimerExpire(TI_HANDLE hadmCtrl, TI_BOOL bTwdInitOccured);
-
-#endif /*  _ADM_CTRL_WPA_H_*/
diff --git a/wl1271/stad/src/Connection_Managment/apConn.c b/wl1271/stad/src/Connection_Managment/apConn.c
deleted file mode 100644
index 0a19900..0000000
--- a/wl1271/stad/src/Connection_Managment/apConn.c
+++ /dev/null
@@ -1,2418 +0,0 @@
-/*
- * apConn.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file apConn.c
- *  \brief AP Connection
- *
- *  \see apConn.h
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  AP Connection                                                 *
- *   PURPOSE:                                                               *
- *   Roaming ability of eSTA is implemented by Roaming Manager Component and 
- *   described in "Roaming Manager module LLD" document, and by 
- *   AP Connection module. AP Connection module implemented as two sub-modules:
- *   The major one is AP Connection, that is responsible for: 
- *   - providing Roaming Manager with access to other parts of WLAN Driver, 
- *   - implementing low levels of roaming mechanism.
- *   Current BSS sub-module takes care of:
- *   - maintaining database of current AP info,
- *   - providing access to database of current AP info.
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_21
-#include "osApi.h"
-#include "report.h"
-#include "sme.h"
-#include "siteMgrApi.h"
-#include "smeApi.h"
-#include "PowerMgr_API.h"
-#include "TrafficMonitorAPI.h"
-#include "qosMngr_API.h"
-#ifdef XCC_MODULE_INCLUDED
- #include "XCCMngr.h"
-#endif
-#include "measurementMgrApi.h"
-#include "connApi.h"
-#include "EvHandler.h"
-#include "apConn.h"
-#include "currBss.h"
-#include "fsm.h"
-#include "scrApi.h"
-#include "regulatoryDomainApi.h"
-#include "TWDriver.h"
-#include "DrvMainModules.h"
-#include "GenSM.h"
-
-/*----------------------*/
-/* Constants and macros */
-/*----------------------*/
-
-#ifdef TI_DBG
- #define    AP_CONN_VALIDATE_HANDLE(hAPConnection)  \
-    if (hAPConnection == NULL)  \
-    {   \
-        WLAN_OS_REPORT(("FATAL ERROR: AP Connection context is not initiated\n"));  \
-        return TI_NOK; \
-    }
-#else
- #define    AP_CONN_VALIDATE_HANDLE(hAPConnection)
-#endif
-
-#define MAX_ROAMING_TRIGGERS  ROAMING_TRIGGER_LAST
-
-#define UPDATE_SEND_DEAUTH_PACKET_FLAG(roamingEventType) \
-            if ((roamingEventType >= ROAMING_TRIGGER_MAX_TX_RETRIES) && \
-                (roamingEventType != ROAMING_TRIGGER_SECURITY_ATTACK)) \
-            { \
-                pAPConnection->sendDeauthPacket = TI_FALSE; \
-            } 
-
-/* Init bits */
-
-
-/*--------------*/
-/* Enumerations */
-/*--------------*/
-
-/**
-* AP Connection state machine states
-*/
-typedef enum
-{
-    AP_CONNECT_STATE_IDLE = 0,          /**< Initial state */
-    AP_CONNECT_STATE_WAIT_ROAM,         /**< Connected to AP, waiting for start roaming command */
-    AP_CONNECT_STATE_SWITCHING_CHANNEL, /**< Connected to AP, switch channel in progress */
-    AP_CONNECT_STATE_WAIT_CONNECT_CMD,  /**< SCR allocated, PS mode entered; wait for cmd from Roam Mngr */
-    AP_CONNECT_STATE_PREPARE_HAND_OFF,  /**< Request CCKM for new AP, wait for response */
-    AP_CONNECT_STATE_CONNECTING,        /**< Performing Connection to new AP; wait for response from Conn SM */
-    AP_CONNECT_STATE_DISCONNECTING,     /**< Wait for completion of current link disconnection */
-    AP_CONNECT_STATE_REESTABLISH_VOICE, /**< Wait for completion of voice TSPEC re-negotiation */
-    AP_CONNECT_STATE_LAST
-} apConn_smStates;
-
-
-/**
-* AP Connection state machine events
-*/
-typedef enum
-{
-    AP_CONNECT_EVENT_PREPARE_FOR_ROAMING= 0,/**< Sent by Roam MNGR when roaming event occurs */
-    AP_CONNECT_EVENT_FINISHED_OK,           /**< Indicates successful completion of request sent to Conn SM */
-    AP_CONNECT_EVENT_FINISHED_NOT_OK,       /**< Indicates unsuccessful completion of request sent to Conn SM */
-    AP_CONNECT_EVENT_RETAIN_CURRENT_AP,     /**< Sent by Roam MNGR when it wishes to give-up roaming */
-    AP_CONNECT_EVENT_START,                 /**< Sent by SME when first time link to AP is established */
-    AP_CONNECT_EVENT_START_ROAM,            /**< Sent by Roam MNGR when it wishes to roam to new AP */
-    AP_CONNECT_EVENT_START_SWITCH_CHANNEL,  /**< Sent by Switch channel module when starting switch channel process (tx enabled) */
-    AP_CONNECT_EVENT_FINISHED_SWITCH_CH,    /**< Sent by Switch channel module when finishing switch channel process (tx enabled) */
-    AP_CONNECT_EVENT_FINISHED_HAND_OVER,    /**< Sent by XCC module when finishing hand-over */
-    AP_CONNECT_EVENT_STOP,                  /**< Disconnect current link, send stop indication to other modules */
-    AP_CONNECT_EVENT_LAST
-} apConn_smEvents;
-
-#define AP_CONNECT_NUM_STATES       AP_CONNECT_STATE_LAST    
-#define AP_CONNECT_NUM_EVENTS       AP_CONNECT_EVENT_LAST   
-
-
-/*----------*/
-/* Typedefs */
-/*----------*/
-
-/*------------*/
-/* Structures */
-/*------------*/
-
-/**
-* AP Connection control block 
-* Following structure defines parameters that can be configured externally,
-* internal variables, AP Connection state machine and handlers of other modules
-* used by AP Connection module
-*/
-typedef struct _apConn_t
-{
-    /* AP Connection state machine */
-    TI_UINT8                currentState;       /**< AP Connection state machine current state */
-    
-    /* Internal parameters */
-    TI_BOOL                 firstAttempt2Roam;  /**< TI_TRUE if still connected to original AP, TI_FALSE otherwise */
-    TI_BOOL                 roamingEnabled;     /**< If TI_FALSE, act like if no roaming callback registered. */
-    apConn_roamingTrigger_e roamReason;         /**< The most severe and recent reason for roaming */
-	APDisconnect_t			APDisconnect;		/**< The AP disconnect trigger extra information */
-    bssEntry_t              *newAP;             /**< Stores parameters of roaming candidate */
-    apConn_connRequest_e    requestType;        /**< Stores type of roaming request */
-    TI_INT8                 rssiThreshold;      /**< Stores recently configured RSSI threshold */
-    TI_UINT8                snrThreshold;       /**< Stores recently configured SNR threshold */
-    TI_UINT8                txFailureThreshold; /**< Stores recently configured consec. no ack threshold */
-    TI_UINT8                lowRateThreshold;   /**< Stores recently configured consec. no ack threshold */
-    TI_UINT32               vsIElength;         /**< Length of vendor specific info-element for assoc req (if defined) */
-    char                    *vsIEbuf;           /**< Pointer to vendor specific info-element for assoc req (if defined) */
-    TI_BOOL                 isRssiTriggerMaskedOut;
-    TI_BOOL                 isSnrTriggerMaskedOut;
-    TI_BOOL                 isConsTxFailureMaskedOut;
-    TI_BOOL                 islowRateTriggerMaskedOut;
-    TI_BOOL                 removeKeys;         /**< Indicates whether keys should be removed after disconnect or not */
-    TI_BOOL                 ignoreDeauthReason0;/**< Indicates whether to ignore DeAuth with reason 0, required for Rogue AP test XCC-V2 */
-    TI_BOOL                 sendDeauthPacket;   /**< Indicates whether to send DEAUTH packet when discommecting or not */
-    TI_UINT8                deauthPacketReasonCode;   /**< Indicates what error code to indicate in the DEAUTH packet  */
-    TI_BOOL                 voiceTspecConfigured;/**< Shall be set to TI_TRUE before roaming in case the TSPEC is configured */
-    TI_BOOL                 videoTspecConfigured;/**< Shall be set to TRUE before roaming in case the TSPEC is configured */
-    TI_BOOL                 reNegotiateTSPEC;   /**< Shall be set to TI_TRUE before hand-over if requested by Roaming Manager */
-    TI_BOOL                 resetReportedRoamingStatistics; /**< Shall be set to TI_TRUE if starting to measure traffic */
-    TI_UINT16               lastRoamingDelay;
-    TI_UINT32               roamingStartedTimestamp;
-    TI_UINT8                roamingSuccesfulHandoverNum;
-    TI_BOOL					bNonRoamingDisAssocReason; /**< Indicate whether last disconnection was called from outside (SME) */
-    
-    /** Callback functions, registered by Roaming manager */
-    apConn_roamMngrEventCallb_t  roamEventCallb;         /**< roam event triggers */
-    apConn_roamMngrCallb_t       reportStatusCallb;      /**< connection status events  */
-    apConn_roamMngrCallb_t       returnNeighborApsCallb; /**< neighbor APs list update */
-    
-    /* Handlers of other modules used by AP Connection */
-    TI_HANDLE               hOs;
-    TI_HANDLE               hReport;
-    TI_HANDLE               hCurrBSS;
-    TI_HANDLE               hRoamMng;
-    TI_HANDLE               hSme;
-    TI_HANDLE               hSiteMgr;
-    TI_HANDLE               hXCCMngr;
-    TI_HANDLE               hConnSm;
-    TI_HANDLE               hPrivacy;
-    TI_HANDLE               hQos;
-    TI_HANDLE               hEvHandler; 
-    TI_HANDLE               hScr;   
-    TI_HANDLE               hAssoc;
-    TI_HANDLE               hRegulatoryDomain;
-    TI_HANDLE               hMlme;
-    
-    /* Counters for statistics */
-    TI_UINT32               roamingTriggerEvents[MAX_ROAMING_TRIGGERS];
-    TI_UINT32               roamingSuccesfulHandoverTotalNum;   
-    TI_UINT32               roamingFailedHandoverNum;   
-    TI_UINT32               retainCurrAPNum;
-    TI_UINT32               disconnectFromRoamMngrNum;
-    TI_UINT32               stopFromSmeNum;
-
-    TI_HANDLE               hAPConnSM;
-	apConn_roamingTrigger_e	assocRoamingTrigger;
-} apConn_t;
-
-
-/*-------------------------------*/
-/* Internal functions prototypes */
-/*-------------------------------*/
-
-/* SM functions */
-static TI_STATUS apConn_smEvent(TI_UINT8 *currState, TI_UINT8 event, void* data);
-static void apConn_smNop(void *pData);
-static void apConn_smUnexpected(void *pData);
-static void apConn_smStartWaitingForTriggers(void *pData);
-static void apConn_smConnectedToNewAP(void *pData);
-static void apConn_smConfigureDriverBeforeRoaming(void *pData);
-static void apConn_smStopConnection(void *pData);
-static void apConn_smInvokeConnectionToNewAp(void *pData);
-static void apConn_smReportDisconnected(void *pData);
-static void apConn_smRetainAP(void *pData);
-static void apConn_smRequestCCKM(void *pData);
-static void apConn_smReportConnFail(void *pData);
-static void apConn_smSwChFinished(void *pData);
-static void apConn_smHandleTspecReneg (void *pData);
-
-/* other functions */
-#ifdef XCC_MODULE_INCLUDED
-static void apConn_calcNewTsf(apConn_t *hAPConnection, TI_UINT8 *tsfTimeStamp, TI_UINT32 newSiteOsTimeStamp, TI_UINT32 beaconInterval);
-#endif
-static TI_STATUS apConn_qosMngrReportResultCallb (TI_HANDLE hApConn, trafficAdmRequestStatus_e result);
-static void		 apConn_reportConnStatusToSME	 (apConn_t *pAPConnection);
-
-
-/*-------------------------------*/
-/* Public functions prototypes 	 */
-/*-------------------------------*/
-
-/**
-*
-* apConn_create
-*
-* \b Description: 
-*
-* Create the AP Connection context: 
-* allocate memory for internal variables; 
-* create state machine.
-*
-* \b ARGS:
-*
-*  I   - hOs - OS handler
-*  
-* \b RETURNS:
-*
-* Pointer to the AP Connection on success, NULL on failure 
-* (unable to allocate memory or other error).
-*
-* \sa 
-*/
-TI_HANDLE apConn_create(TI_HANDLE hOs)
-{
-    apConn_t    *pAPConnection;
-
-    if ((pAPConnection = os_memoryAlloc(hOs, sizeof(apConn_t))) != NULL)
-    {
-        pAPConnection->hOs = hOs;
-
-        /* allocate the state machine object */
-        pAPConnection->hAPConnSM = genSM_Create(hOs);
-        if (pAPConnection->hAPConnSM == NULL)
-        {
-            WLAN_OS_REPORT(("FATAL ERROR: apConn_create(): Error allocating Connection StateMachine! - aborting\n"));
-            return NULL;
-        }
-
-        /* Succeeded to create AP Connection module context - return pointer to it */
-        return pAPConnection; 
-    }
-    else /* Failed to allocate control block */
-    {
-        WLAN_OS_REPORT(("FATAL ERROR: apConn_create(): Error allocating cb - aborting\n"));
-        os_memoryFree(hOs, pAPConnection, sizeof(apConn_t));
-        return NULL;
-    }
-}
-
-/**
-*
-* apConn_unload
-*
-* \b Description: 
-*
-* Finish AP Connection module work:
-* release the allocation for state machine and internal variables.
-*
-* \b ARGS:
-*
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS apConn_unload(TI_HANDLE hAPConnection)
-{
-    apConn_t *pAPConnection;
-
-    AP_CONN_VALIDATE_HANDLE (hAPConnection);
-
-    pAPConnection = (apConn_t *)hAPConnection;
-
-    /* Unload state machine */
-    genSM_Unload(pAPConnection->hAPConnSM);
-
-    /* Free pre-allocated control block */
-    os_memoryFree (pAPConnection->hOs, pAPConnection, sizeof(apConn_t));
-
-    return TI_OK;
-}
-
-static TGenSM_actionCell apConnSM_matrix[AP_CONNECT_NUM_STATES][AP_CONNECT_NUM_EVENTS] =
-{
-    /* next state and actions for IDLE state */
-        {   {AP_CONNECT_STATE_IDLE, apConn_smUnexpected},                   /* PREPARE_FOR_ROAMING  */ 
-            {AP_CONNECT_STATE_IDLE, apConn_smUnexpected},                   /* FINISHED_OK          */
-            {AP_CONNECT_STATE_IDLE, apConn_smUnexpected},                   /* FINISHED_NOT_OK      */
-            {AP_CONNECT_STATE_IDLE, apConn_smUnexpected},                   /* RETAIN_CURRENT_AP    */ 
-            {AP_CONNECT_STATE_WAIT_ROAM,apConn_smStartWaitingForTriggers},  /* START                */ 
-            {AP_CONNECT_STATE_IDLE, apConn_smUnexpected},                   /* START_ROAM           */ 
-            {AP_CONNECT_STATE_IDLE, apConn_smUnexpected},                   /* START_SWITCH_CHANNEL */ 
-            {AP_CONNECT_STATE_IDLE, apConn_smNop},                          /* FINISHED_SWITCH_CH   */ 
-            {AP_CONNECT_STATE_IDLE, apConn_smNop},                          /* FINISHED_HAND_OVER   */ 
-            {AP_CONNECT_STATE_IDLE, apConn_smUnexpected}                    /* STOP                 */
-        },                                                                              
-        /* next state and actions for WAIT_ROAM state */
-        {   {AP_CONNECT_STATE_WAIT_CONNECT_CMD,apConn_smConfigureDriverBeforeRoaming},/* PREPARE_FOR_ROAMING  */ 
-            {AP_CONNECT_STATE_WAIT_ROAM, apConn_smUnexpected},          /* FINISHED_OK          */
-            {AP_CONNECT_STATE_WAIT_ROAM, apConn_smUnexpected},          /* FINISHED_NOT_OK      */
-            {AP_CONNECT_STATE_WAIT_ROAM, apConn_smUnexpected},          /* RETAIN_CURRENT_AP    */ 
-            {AP_CONNECT_STATE_WAIT_ROAM, apConn_smUnexpected},          /* START                */ 
-            {AP_CONNECT_STATE_WAIT_ROAM, apConn_smUnexpected},          /* START_ROAM           */ 
-            {AP_CONNECT_STATE_SWITCHING_CHANNEL, apConn_smNop},         /* START_SWITCH_CHANNEL */ 
-            {AP_CONNECT_STATE_WAIT_ROAM, apConn_smUnexpected},          /* FINISHED_SWITCH_CH   */ 
-            {AP_CONNECT_STATE_WAIT_ROAM, apConn_smUnexpected},          /* FINISHED_HAND_OVER   */ 
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smStopConnection}   /* STOP                 */
-        },                                                                              
-        /* next state and actions for SWITCHING_CHANNEL state */
-        {   {AP_CONNECT_STATE_SWITCHING_CHANNEL, apConn_smUnexpected},  /* PREPARE_FOR_ROAMING  */ 
-            {AP_CONNECT_STATE_SWITCHING_CHANNEL, apConn_smUnexpected},  /* FINISHED_OK          */
-            {AP_CONNECT_STATE_SWITCHING_CHANNEL, apConn_smUnexpected},  /* FINISHED_NOT_OK      */
-            {AP_CONNECT_STATE_SWITCHING_CHANNEL, apConn_smUnexpected},  /* RETAIN_CURRENT_AP    */ 
-            {AP_CONNECT_STATE_SWITCHING_CHANNEL, apConn_smUnexpected},  /* START                */ 
-            {AP_CONNECT_STATE_SWITCHING_CHANNEL, apConn_smUnexpected},  /* START_ROAM           */ 
-            {AP_CONNECT_STATE_SWITCHING_CHANNEL, apConn_smSwChFinished},/* START_SWITCH_CHANNEL */ 
-            {AP_CONNECT_STATE_WAIT_ROAM, apConn_smNop},                 /* FINISHED_SWITCH_CH   */ 
-            {AP_CONNECT_STATE_SWITCHING_CHANNEL, apConn_smUnexpected},  /* FINISHED_HAND_OVER   */ 
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smStopConnection}   /* STOP                 */
-        },                                                                              
-        /* next state and actions for WAIT_CONNECT_CMD state */
-        {   {AP_CONNECT_STATE_WAIT_CONNECT_CMD, apConn_smUnexpected},   /* PREPARE_FOR_ROAMING  */ 
-            {AP_CONNECT_STATE_WAIT_CONNECT_CMD, apConn_smUnexpected},   /* FINISHED_OK          */
-            {AP_CONNECT_STATE_WAIT_CONNECT_CMD, apConn_smUnexpected},   /* FINISHED_NOT_OK      */
-            {AP_CONNECT_STATE_WAIT_ROAM, apConn_smRetainAP},            /* RETAIN_CURRENT_AP    */ 
-            {AP_CONNECT_STATE_WAIT_CONNECT_CMD, apConn_smUnexpected},   /* START                */ 
-            {AP_CONNECT_STATE_PREPARE_HAND_OFF, apConn_smRequestCCKM},  /* START_ROAM           */ 
-            {AP_CONNECT_STATE_WAIT_CONNECT_CMD, apConn_smUnexpected},   /* START_SWITCH_CHANNEL */ 
-            {AP_CONNECT_STATE_WAIT_CONNECT_CMD, apConn_smUnexpected},   /* FINISHED_SWITCH_CH   */ 
-            {AP_CONNECT_STATE_WAIT_CONNECT_CMD, apConn_smUnexpected},   /* FINISHED_HAND_OVER   */ 
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smStopConnection}   /* STOP                 */
-        },                                                                              
-        /* next state and actions for PREPARE_HAND_OFF state */
-        {   {AP_CONNECT_STATE_PREPARE_HAND_OFF, apConn_smUnexpected},   /* PREPARE_FOR_ROAMING  */ 
-            {AP_CONNECT_STATE_PREPARE_HAND_OFF, apConn_smUnexpected},   /* FINISHED_OK          */
-            {AP_CONNECT_STATE_PREPARE_HAND_OFF, apConn_smUnexpected},   /* FINISHED_NOT_OK      */
-            {AP_CONNECT_STATE_PREPARE_HAND_OFF, apConn_smUnexpected},   /* RETAIN_CURRENT_AP    */ 
-            {AP_CONNECT_STATE_PREPARE_HAND_OFF, apConn_smUnexpected},   /* START                */ 
-            {AP_CONNECT_STATE_PREPARE_HAND_OFF, apConn_smUnexpected},   /* START_ROAM           */ 
-            {AP_CONNECT_STATE_PREPARE_HAND_OFF, apConn_smUnexpected},   /* START_SWITCH_CHANNEL */ 
-            {AP_CONNECT_STATE_PREPARE_HAND_OFF, apConn_smUnexpected},   /* FINISHED_SWITCH_CH   */ 
-            {AP_CONNECT_STATE_CONNECTING, apConn_smInvokeConnectionToNewAp},/* FINISHED_HAND_OVER */ 
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smStopConnection}       /* STOP               */
-        },                                                                              
-        /* next state and actions for CONNECTING state */
-        {   {AP_CONNECT_STATE_CONNECTING, apConn_smUnexpected},             /* PREPARE_FOR_ROAMING  */ 
-            {AP_CONNECT_STATE_REESTABLISH_VOICE,apConn_smHandleTspecReneg}, /* FINISHED_OK             */
-            {AP_CONNECT_STATE_WAIT_CONNECT_CMD, apConn_smReportConnFail},   /* FINISHED_NOT_OK      */
-            {AP_CONNECT_STATE_CONNECTING, apConn_smUnexpected},             /* RETAIN_CURRENT_AP    */ 
-            {AP_CONNECT_STATE_CONNECTING, apConn_smUnexpected},             /* START                */ 
-            {AP_CONNECT_STATE_CONNECTING, apConn_smUnexpected},             /* START_ROAM           */ 
-            {AP_CONNECT_STATE_CONNECTING, apConn_smUnexpected},             /* START_SWITCH_CHANNEL */ 
-            {AP_CONNECT_STATE_CONNECTING, apConn_smUnexpected},             /* FINISHED_SWITCH_CH   */ 
-            {AP_CONNECT_STATE_CONNECTING, apConn_smUnexpected},             /* FINISHED_HAND_OVER   */ 
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smStopConnection}       /* STOP                 */
-        },                                                                              
-        /* next state and actions for DISCONNECTING state */
-        {   {AP_CONNECT_STATE_DISCONNECTING, apConn_smNop},             /* PREPARE_FOR_ROAMING  */ 
-            {AP_CONNECT_STATE_IDLE, apConn_smReportDisconnected},       /* FINISHED_OK          */
-            {AP_CONNECT_STATE_IDLE, apConn_smReportDisconnected},       /* FINISHED_NOT_OK      */
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smNop},             /* RETAIN_CURRENT_AP    */ 
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smUnexpected},      /* START                */ 
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smNop},             /* START_ROAM           */ 
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smNop},             /* START_SWITCH_CHANNEL */ 
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smNop},             /* FINISHED_SWITCH_CH   */ 
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smNop},             /* FINISHED_HAND_OVER   */ 
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smNop},             /* STOP                 */
-        },                                                                             
-        /* next state and actions for REESTABLISH_VOICE state */
-        {   {AP_CONNECT_STATE_REESTABLISH_VOICE, apConn_smUnexpected},      /* PREPARE_FOR_ROAMING  */ 
-            {AP_CONNECT_STATE_WAIT_ROAM,apConn_smConnectedToNewAP},         /* FINISHED_OK          */
-            {AP_CONNECT_STATE_WAIT_CONNECT_CMD, apConn_smReportConnFail},   /* FINISHED_NOT_OK      */
-            {AP_CONNECT_STATE_REESTABLISH_VOICE, apConn_smUnexpected},      /* RETAIN_CURRENT_AP    */ 
-            {AP_CONNECT_STATE_REESTABLISH_VOICE, apConn_smUnexpected},      /* START                */ 
-            {AP_CONNECT_STATE_REESTABLISH_VOICE, apConn_smUnexpected},      /* START_ROAM           */ 
-            {AP_CONNECT_STATE_REESTABLISH_VOICE, apConn_smUnexpected},      /* START_SWITCH_CHANNEL */ 
-            {AP_CONNECT_STATE_REESTABLISH_VOICE, apConn_smUnexpected},      /* FINISHED_SWITCH_CH   */ 
-            {AP_CONNECT_STATE_REESTABLISH_VOICE, apConn_smUnexpected},      /* FINISHED_HAND_OVER   */ 
-            {AP_CONNECT_STATE_DISCONNECTING, apConn_smStopConnection}       /* STOP                 */
-        }                                                                             
-}; 
-
-
-/**
-*
-* apConn_init
-*
-* \b Description: 
-*
-* Prepare AP Connection module to work: initiate internal variables, start state machine
-*
-* \b ARGS:
-*
-*  I   - pStadHandles  - The driver modules handles  \n
-*  
-* \b RETURNS:
-*
-*  void
-*
-* \sa 
-*/
-void apConn_init (TStadHandlesList *pStadHandles)
-{
-    apConn_t *pAPConnection = (apConn_t *)(pStadHandles->hAPConnection);
-
-    pAPConnection->hReport      = pStadHandles->hReport;
-    pAPConnection->hCurrBSS     = pStadHandles->hCurrBss;
-    pAPConnection->hRoamMng     = pStadHandles->hRoamingMngr;
-    pAPConnection->hSme         = pStadHandles->hSme;
-    pAPConnection->hSiteMgr     = pStadHandles->hSiteMgr;
-    pAPConnection->hXCCMngr     = pStadHandles->hXCCMngr;
-    pAPConnection->hConnSm      = pStadHandles->hConn;
-    pAPConnection->hPrivacy     = pStadHandles->hRsn;
-    pAPConnection->hQos         = pStadHandles->hQosMngr;
-    pAPConnection->hEvHandler   = pStadHandles->hEvHandler;
-    pAPConnection->hScr         = pStadHandles->hSCR;
-    pAPConnection->hAssoc       = pStadHandles->hAssoc;
-    pAPConnection->hMlme        = pStadHandles->hMlmeSm;
-    pAPConnection->hRegulatoryDomain = pStadHandles->hRegulatoryDomain;
-    
-    pAPConnection->currentState = AP_CONNECT_STATE_IDLE;
-    pAPConnection->firstAttempt2Roam = TI_TRUE;
-    pAPConnection->roamingEnabled = TI_TRUE;
-    pAPConnection->reportStatusCallb = NULL;
-    pAPConnection->roamEventCallb = NULL;
-    pAPConnection->returnNeighborApsCallb = NULL;
-
-    pAPConnection->assocRoamingTrigger = ROAMING_TRIGGER_NONE;
-
-    genSM_Init(pAPConnection->hAPConnSM, pAPConnection->hReport);
-
-}
-
-
-TI_STATUS apConn_SetDefaults  (TI_HANDLE hAPConnection, apConnParams_t *pApConnParams)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-    TI_UINT32  index;
-
-    pAPConnection->ignoreDeauthReason0 = pApConnParams->ignoreDeauthReason0;
-
-    for (index=ROAMING_TRIGGER_NONE; index<ROAMING_TRIGGER_LAST; index++)
-    {
-        pAPConnection->roamingTriggerEvents[index] = 0;
-    }
-    pAPConnection->roamingSuccesfulHandoverNum = 0;
-    pAPConnection->roamingSuccesfulHandoverTotalNum = 0;
-    pAPConnection->roamingFailedHandoverNum = 0;
-    pAPConnection->retainCurrAPNum = 0;
-    pAPConnection->disconnectFromRoamMngrNum = 0;
-    pAPConnection->stopFromSmeNum = 0;
-    pAPConnection->txFailureThreshold = NO_ACK_DEFAULT_THRESHOLD;
-    pAPConnection->lowRateThreshold = LOW_RATE_DEFAULT_THRESHOLD;
-    pAPConnection->rssiThreshold = RSSI_DEFAULT_THRESHOLD;
-    pAPConnection->snrThreshold = SNR_DEFAULT_THRESHOLD;
-    pAPConnection->vsIElength = 0;
-    pAPConnection->isRssiTriggerMaskedOut = TI_FALSE;
-    pAPConnection->isSnrTriggerMaskedOut = TI_TRUE;
-    pAPConnection->islowRateTriggerMaskedOut = TI_FALSE;
-    pAPConnection->isConsTxFailureMaskedOut = TI_FALSE;
-    pAPConnection->removeKeys = TI_TRUE;
-    pAPConnection->sendDeauthPacket = TI_TRUE;       /* Default behavior is radio On - send DISASSOC frame */
-	pAPConnection->deauthPacketReasonCode = STATUS_UNSPECIFIED;
-    pAPConnection->voiceTspecConfigured = TI_FALSE;
-	pAPConnection->videoTspecConfigured = TI_FALSE;
-    pAPConnection->resetReportedRoamingStatistics = TI_FALSE;
-    pAPConnection->reNegotiateTSPEC = TI_FALSE;
-    pAPConnection->bNonRoamingDisAssocReason = TI_FALSE;
-
-    pAPConnection->roamingStartedTimestamp = 0;
-    pAPConnection->lastRoamingDelay = 0;
-    pAPConnection->roamingSuccesfulHandoverNum = 0;
-
-
-    genSM_SetDefaults(pAPConnection->hAPConnSM,
-                           AP_CONNECT_NUM_STATES,
-                           AP_CONNECT_NUM_EVENTS,
-                           &apConnSM_matrix[0][0],
-                           AP_CONNECT_STATE_IDLE,
-                           "AP Connection SM",
-                           NULL,
-                           NULL,
-                           __FILE_ID__);
-
-
-    return TI_OK;
-}
-
-
-/* apConn_isPsRequiredBeforeScan
-*
-* \b Description: 
-*
-* verify if the PS required before scan according if roaming triger is part of ROAMING_TRIGGER_LOW_QUALITY_GROUP 
-*
-* \b ARGS:
-*
-*  I   - hAPConnection - pointer to module\n
-*
-* \b RETURNS:
-*
-*  TRUE or FALSE.
-*
-* \sa 
-*/
-TI_BOOL apConn_isPsRequiredBeforeScan(TI_HANDLE hAPConnection)
-{
-    apConn_t * pAPConnection = (apConn_t *) hAPConnection;
-
-	/* check if part of ROAMING_TRIGGER_LOW_QUALITY_GROUP */
-	if (pAPConnection->roamReason <= ROAMING_TRIGGER_MAX_TX_RETRIES)
-		return TI_TRUE;
-	else
-		return TI_FALSE;
-}
-
-
-
-/**
-*
-* apConn_ConnCompleteInd
-*
-* \b Description: 
-*
-* Inform AP Connection about successful / unsuccessful completion 
-* of link establishing 
-*
-* \b ARGS:
-*
-*  I   - result - TI_OK if successfully connected, TI_NOK otherwise  \n
-*
-* \b RETURNS:
-*
-*  None.
-*
-* \sa 
-*/
-void apConn_ConnCompleteInd(TI_HANDLE hAPConnection, mgmtStatus_e status, TI_UINT32 uStatusCode)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-    if (status == STATUS_SUCCESSFUL) 
-    {
-        apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_FINISHED_OK, pAPConnection);
-    }
-    else
-    {
-        apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_FINISHED_NOT_OK, pAPConnection);
-    }
-}
-
-TI_STATUS apConn_getRoamThresholds(TI_HANDLE hAPConnection, roamingMngrThresholdsConfig_t *pParam)
-{
-    apConn_t * pAPConnection = (apConn_t *) hAPConnection;
-
-    pParam->lowRssiThreshold = pAPConnection->rssiThreshold;
-    pParam->lowSnrThreshold = pAPConnection->snrThreshold;
-    pParam->txRateThreshold = pAPConnection->lowRateThreshold;
-    pParam->dataRetryThreshold = pAPConnection->txFailureThreshold;
-
-    currBSS_getRoamingParams(pAPConnection->hCurrBSS, 
-                             &pParam->numExpectedTbttForBSSLoss, 
-                             &pParam->lowQualityForBackgroungScanCondition, 
-                             &pParam->normalQualityForBackgroungScanCondition);
-
-    return TI_OK;
-}
-
-TI_STATUS apConn_setRoamThresholds(TI_HANDLE hAPConnection, roamingMngrThresholdsConfig_t *pParam)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-    AP_CONN_VALIDATE_HANDLE(hAPConnection);
-
-    /* If low quality trigger threshold is set to 0 - this is the request to ignore this trigger */
-    /* Otherwise store it */
-    if (pParam->lowRssiThreshold == (TI_INT8)AP_CONNECT_TRIGGER_IGNORED) 
-    {
-        pAPConnection->isRssiTriggerMaskedOut = TI_TRUE;
-        pParam->lowRssiThreshold = pAPConnection->rssiThreshold;
-    }
-    else
-    {
-        pAPConnection->isRssiTriggerMaskedOut = TI_FALSE;
-        pAPConnection->rssiThreshold = pParam->lowRssiThreshold;
-    }
-
-    if (pParam->txRateThreshold == AP_CONNECT_TRIGGER_IGNORED) 
-    {
-        pAPConnection->islowRateTriggerMaskedOut = TI_TRUE;
-        pParam->txRateThreshold = pAPConnection->lowRateThreshold;
-    }
-    else
-    {
-        pAPConnection->islowRateTriggerMaskedOut = TI_FALSE;
-        pAPConnection->lowRateThreshold = pParam->txRateThreshold;
-    }
-
-    if (pParam->dataRetryThreshold == AP_CONNECT_TRIGGER_IGNORED) 
-    {
-        pAPConnection->isConsTxFailureMaskedOut = TI_TRUE;
-        pParam->dataRetryThreshold = pAPConnection->txFailureThreshold;
-    }
-    else
-    {
-        pAPConnection->isConsTxFailureMaskedOut = TI_FALSE;
-        pAPConnection->txFailureThreshold = pParam->dataRetryThreshold;
-    }
-
-    pAPConnection->isSnrTriggerMaskedOut = TI_FALSE;
-    pAPConnection->snrThreshold = pParam->lowSnrThreshold;
-
-    currBSS_updateRoamingTriggers(pAPConnection->hCurrBSS, pParam);
-
-    return TI_OK;
-}
-
-TI_STATUS apConn_registerRoamMngrCallb(TI_HANDLE hAPConnection, 
-                                       apConn_roamMngrEventCallb_t  roamEventCallb,
-                                       apConn_roamMngrCallb_t       reportStatusCallb,
-                                       apConn_roamMngrCallb_t       returnNeighborApsCallb)
-{
-    apConn_t *pAPConnection;
-    apConn_connStatus_t reportStatus;
-    paramInfo_t param;
-
-    AP_CONN_VALIDATE_HANDLE(hAPConnection);
-
-    pAPConnection = (apConn_t *)hAPConnection;
-
-    pAPConnection->roamEventCallb = roamEventCallb;
-    pAPConnection->reportStatusCallb = reportStatusCallb;
-    if ((pAPConnection->roamingEnabled) && (pAPConnection->currentState != AP_CONNECT_STATE_IDLE))
-    {
-        param.paramType   = ASSOC_ASSOCIATION_REQ_PARAM;
-
-        assoc_getParam(pAPConnection->hAssoc, &param);
-        reportStatus.dataBuf = (char *)(param.content.assocReqBuffer.buffer);
-        reportStatus.dataBufLength = param.content.assocReqBuffer.bufferSize;
-
-        reportStatus.status = CONN_STATUS_CONNECTED;
-        reportStatusCallb(pAPConnection->hRoamMng, &reportStatus);  
-    }
-    ((apConn_t *)hAPConnection)->returnNeighborApsCallb = returnNeighborApsCallb;
-
-    return TI_OK;
-}
-
-TI_STATUS apConn_unregisterRoamMngrCallb(TI_HANDLE hAPConnection)
-{
-    apConn_t *pAPConnection;
-
-    AP_CONN_VALIDATE_HANDLE(hAPConnection);
-
-        pAPConnection = (apConn_t *)hAPConnection;
-
-        pAPConnection->roamEventCallb = NULL;
-        pAPConnection->reportStatusCallb = NULL;
-        pAPConnection->returnNeighborApsCallb = NULL;
-
-    if ((pAPConnection->currentState != AP_CONNECT_STATE_IDLE) && (pAPConnection->currentState != AP_CONNECT_STATE_WAIT_ROAM))
-    {
-        /* Roaming Manager is unregistering it's callbacks in the middle of roaming - disconnect */
-        apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_STOP, pAPConnection);
-    }
-    return TI_OK;
-}
-
-TI_STATUS apConn_disconnect(TI_HANDLE hAPConnection)
-{
-    apConn_t *pAPConnection;
-
-    AP_CONN_VALIDATE_HANDLE(hAPConnection);
-
-    pAPConnection = (apConn_t *)hAPConnection;
-    UPDATE_SEND_DEAUTH_PACKET_FLAG(pAPConnection->roamReason);
-	if (pAPConnection->roamReason == ROAMING_TRIGGER_SECURITY_ATTACK)
-		pAPConnection->deauthPacketReasonCode = STATUS_MIC_FAILURE;
-	else
-		pAPConnection->deauthPacketReasonCode = STATUS_UNSPECIFIED;
-	apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_STOP, pAPConnection);
-    pAPConnection->disconnectFromRoamMngrNum++;
-
-    return TI_OK;
-}
-
-TI_STATUS apConn_getStaCapabilities(TI_HANDLE hAPConnection,
-                                    apConn_staCapabilities_t *ie_list)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-    apConn_staCapabilities_t *pList;
-    paramInfo_t param;
-
-    AP_CONN_VALIDATE_HANDLE(hAPConnection);
-
-        pList = ie_list;
-
-    /* Get authentication suite type */
-    param.paramType = RSN_EXT_AUTHENTICATION_MODE;
-    rsn_getParam(pAPConnection->hPrivacy, &param);      
-
-    switch (param.content.rsnExtAuthneticationMode)
-    {
-        case RSN_EXT_AUTH_MODE_OPEN:
-            pList->authMode = os802_11AuthModeOpen;
-            break;
-        case RSN_EXT_AUTH_MODE_SHARED_KEY:
-            pList->authMode = os802_11AuthModeShared;
-            break;
-        case RSN_EXT_AUTH_MODE_AUTO_SWITCH:
-            pList->authMode = os802_11AuthModeAutoSwitch;
-            break;
-        case RSN_EXT_AUTH_MODE_WPA:
-            pList->authMode = os802_11AuthModeWPA;
-            break;
-        case RSN_EXT_AUTH_MODE_WPAPSK:
-            pList->authMode = os802_11AuthModeWPAPSK;
-            break;
-        case RSN_EXT_AUTH_MODE_WPANONE:
-            pList->authMode = os802_11AuthModeWPANone;
-            break;
-        case RSN_EXT_AUTH_MODE_WPA2:
-            pList->authMode = os802_11AuthModeWPA2;
-            break;
-        case RSN_EXT_AUTH_MODE_WPA2PSK:
-            pList->authMode = os802_11AuthModeWPA2PSK;
-            break;
-        default:
-            pList->authMode = os802_11AuthModeOpen;
-            break;
-    }
-
-    /* Get encryption type */
-    param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
-    rsn_getParam(pAPConnection->hPrivacy, &param);
-
-    switch (param.content.rsnEncryptionStatus)
-    {
-        case TWD_CIPHER_NONE:
-            pList->encryptionType = OS_ENCRYPTION_TYPE_NONE;
-            break;
-        case TWD_CIPHER_WEP:
-        case TWD_CIPHER_WEP104:
-            pList->encryptionType = OS_ENCRYPTION_TYPE_WEP;
-            break;
-        case TWD_CIPHER_TKIP:
-        case TWD_CIPHER_CKIP:
-            pList->encryptionType = OS_ENCRYPTION_TYPE_TKIP;
-            break;
-        case TWD_CIPHER_AES_WRAP:
-        case TWD_CIPHER_AES_CCMP:
-            pList->encryptionType = OS_ENCRYPTION_TYPE_AES;
-            break;
-        default:
-            pList->encryptionType = OS_ENCRYPTION_TYPE_NONE;
-            break;
-    }
-
-    /* Get supported rates */
-    param.paramType = SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM;
-    siteMgr_getParam(pAPConnection->hSiteMgr, &param);
-    os_memoryCopy(pAPConnection->hOs, (void *)param.content.siteMgrDesiredSupportedRateSet.ratesString, pList->rateMask, sizeof(OS_802_11_RATES_EX));
-    
-    /* Get mode: 2.4G, 5G or Dual */
-    param.paramType = SITE_MGR_DESIRED_DOT11_MODE_PARAM;
-    siteMgr_getParam(pAPConnection->hSiteMgr, &param);
-    pList->networkType = (OS_802_11_NETWORK_TYPE)param.content.siteMgrDot11Mode;
-    switch(param.content.siteMgrDot11Mode) 
-    {
-        case DOT11_B_MODE:
-            pList->networkType = os802_11DS;
-            break;
-        case DOT11_A_MODE:
-            pList->networkType = os802_11OFDM5;
-            break;
-        case DOT11_G_MODE:
-            pList->networkType = os802_11OFDM24;
-            break;
-        case DOT11_DUAL_MODE:
-            pList->networkType = os802_11Automode;
-            break;
-        default:
-            pList->networkType = os802_11DS;
-            break;
-    }
-
-
-    /* Get XCC status */
-#ifdef XCC_MODULE_INCLUDED
-    param.paramType = XCC_ENABLED;
-    XCCMngr_getParam(pAPConnection->hXCCMngr, &param);
-    pList->XCCEnabled = (param.content.XCCEnabled==XCC_MODE_ENABLED)? TI_TRUE : TI_FALSE;
-#else
-    pList->XCCEnabled = TI_FALSE;
-#endif
-
-    /* Get QoS type */
-    param.paramType = QOS_MNGR_ACTIVE_PROTOCOL;
-    qosMngr_getParams(pAPConnection->hQos, &param);
-    pList->qosEnabled = param.content.qosSiteProtocol != QOS_NONE;
-
-    pList->regDomain = REG_DOMAIN_FIXED;
-    /* Get regulatory domain type */
-    param.paramType = REGULATORY_DOMAIN_MANAGEMENT_CAPABILITY_ENABLED_PARAM;
-    regulatoryDomain_getParam(pAPConnection->hRegulatoryDomain, &param);
-    if (param.content.spectrumManagementEnabled)
-    {   /* 802.11h is enabled (802.11h includes 802.11d) */
-        pList->regDomain = REG_DOMAIN_80211H;
-    }
-    else 
-    {
-    param.paramType = REGULATORY_DOMAIN_ENABLED_PARAM;
-    regulatoryDomain_getParam(pAPConnection->hRegulatoryDomain, &param);
-        if (param.content.regulatoryDomainEnabled)
-        {   /* 802.11d is enabled */
-            pList->regDomain = REG_DOMAIN_80211D;
-        }
-    }
-    return TI_OK;
-}
-
-TI_STATUS apConn_connectToAP(TI_HANDLE hAPConnection,
-                             bssEntry_t *newAP,
-                             apConn_connRequest_t *request,
-                             TI_BOOL reNegotiateTspec)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-    AP_CONN_VALIDATE_HANDLE(hAPConnection);
-
-    pAPConnection->requestType = request->requestType;
-
-    switch (request->requestType) 
-    {
-        case AP_CONNECT_RETAIN_CURR_AP:
-            apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_RETAIN_CURRENT_AP, pAPConnection);
-            break;
-
-        case AP_CONNECT_FULL_TO_AP:
-            pAPConnection->removeKeys = TI_TRUE;
-            pAPConnection->newAP = newAP;
-            pAPConnection->roamingFailedHandoverNum++;
-            pAPConnection->reNegotiateTSPEC = reNegotiateTspec;
-            apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_START_ROAM, pAPConnection);
-            break;
-
-        case AP_CONNECT_FAST_TO_AP:
-        case AP_CONNECT_RECONNECT_CURR_AP:
-            pAPConnection->removeKeys = TI_FALSE;
-            pAPConnection->newAP = newAP;
-            pAPConnection->roamingFailedHandoverNum++;
-            pAPConnection->reNegotiateTSPEC = reNegotiateTspec;
-            apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_START_ROAM, pAPConnection);
-            break;
-
-        default:
-            break;
-    }
-
-    /* If there is vendor specific IE to attach to Assoc req, store it now */
-    if (request->dataBufLength > 0)
-    {
-        pAPConnection->vsIEbuf = request->dataBuf;
-        pAPConnection->vsIElength = request->dataBufLength;
-    }
-
-    return TI_OK;
-}
-
-bssEntry_t *apConn_getBSSParams(TI_HANDLE hAPConnection)
-{
-#ifdef TI_DBG
-    if (hAPConnection == NULL) /* Failed to allocate control block */
-    {
-        WLAN_OS_REPORT(("FATAL ERROR: apConn_create(): Error allocating cb - aborting\n"));
-        return NULL;
-    }
-#endif
-        
-    return currBSS_getBssInfo(((apConn_t *)hAPConnection)->hCurrBSS);
-}
-
-TI_BOOL apConn_isSiteBanned(TI_HANDLE hAPConnection, TMacAddr * givenAp)
-{
-    apConn_t * pAPConnection = (apConn_t *) hAPConnection;
-
-    return rsn_isSiteBanned(pAPConnection->hPrivacy, *givenAp);
-}
-
-TI_BOOL apConn_getPreAuthAPStatus(TI_HANDLE hAPConnection, TMacAddr *givenAp)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-    paramInfo_t     param;
-
-    AP_CONN_VALIDATE_HANDLE(hAPConnection);
-
-    param.paramType = RSN_PRE_AUTH_STATUS;
-    MAC_COPY (param.content.rsnApMac, *givenAp);
-    rsn_getParam(pAPConnection->hPrivacy, &param);
-
-    return param.content.rsnPreAuthStatus;
-}
-
-TI_STATUS apConn_preAuthenticate(TI_HANDLE hAPConnection, bssList_t *listAPs)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-    TBssidList4PreAuth  apList;
-    TI_UINT32           listIndex, apListIndex;
-    bssEntry_t          *pCurrentAP;
-    TI_UINT8            *pRsnIEs;
-
-#ifdef TI_DBG
-    if ((hAPConnection == NULL) || (listAPs == NULL))
-    {
-        WLAN_OS_REPORT(("FATAL ERROR: AP Connection context is not initiated\n"));
-        return TI_NOK;
-    }
-        
-        TRACE0(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "apConn_reserveResources \n");
-#endif
-
-    for (listIndex=0, apListIndex=0; listIndex<listAPs->numOfEntries; listIndex++)
-    {
-        MAC_COPY (apList.bssidList[apListIndex].bssId, 
-				  listAPs->BSSList[listIndex].BSSID);
-
-        /* search in the buffer pointer to the beginning of the
-            RSN IE according to the IE ID */
-        if (!mlmeParser_ParseIeBuffer (pAPConnection->hMlme, listAPs->BSSList[listIndex].pBuffer, listAPs->BSSList[listIndex].bufferLength, RSN_IE_ID, &pRsnIEs, NULL, 0))
-        {
-            TRACE0(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "apConn_preAuthenticate, no RSN IE was found \n");
-            TRACE_INFO_HEX(pAPConnection->hReport, listAPs->BSSList[listIndex].pBuffer, listAPs->BSSList[listIndex].bufferLength); 
-            continue;
-        }
-
-        apList.bssidList[apListIndex].pRsnIEs = (dot11_RSN_t*)pRsnIEs;
-        apList.bssidList[apListIndex].rsnIeLen = apList.bssidList[apListIndex].pRsnIEs->hdr[1] + 2;
-        apListIndex++;
-    }
-
-    /* Start pre-auth after any Conn succ (including first), 
-    and not only when a New BSSID was added, in order to save/refresh 
-    PMKID of the current AP.*/
-    {
-        /* Add the current BSSID to the list */
-        pCurrentAP = apConn_getBSSParams(pAPConnection);
-        MAC_COPY (apList.bssidList[apListIndex].bssId, pCurrentAP->BSSID);
-        /* search in the buffer pointer to the beginning of the
-            RSN IE according to the IE ID */
-
-        if (!mlmeParser_ParseIeBuffer (pAPConnection->hMlme, pCurrentAP->pBuffer, pCurrentAP->bufferLength, RSN_IE_ID, &pRsnIEs, NULL, 0))
-        {
-            TRACE6(pAPConnection->hReport, REPORT_SEVERITY_ERROR, "apConn_preAuthenticate, no RSN IE was found in the current BSS, BSSID=0x%x-0x%x-0x%x-0x%x-0x%x-0x%x \n", pCurrentAP->BSSID[0], pCurrentAP->BSSID[1], pCurrentAP->BSSID[2], pCurrentAP->BSSID[3], pCurrentAP->BSSID[4], pCurrentAP->BSSID[5]);
-            report_PrintDump (pCurrentAP->pBuffer, pCurrentAP->bufferLength);
-            apList.bssidList[apListIndex].pRsnIEs = NULL;
-            apList.bssidList[apListIndex].rsnIeLen = 0;
-        }
-        else
-        {
-            apList.bssidList[apListIndex].pRsnIEs = (dot11_RSN_t*)pRsnIEs;
-            apList.bssidList[apListIndex].rsnIeLen = apList.bssidList[apListIndex].pRsnIEs->hdr[1] + 2;
-        }
-        apList.NumOfItems = apListIndex+1;
-        rsn_startPreAuth(pAPConnection->hPrivacy, &apList);
-    }
-    return TI_OK;
-}
-
-TI_STATUS apConn_prepareToRoaming(TI_HANDLE hAPConnection, apConn_roamingTrigger_e reason)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-    AP_CONN_VALIDATE_HANDLE(hAPConnection);
-
-    pAPConnection->roamReason = reason;
-    
-    apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_PREPARE_FOR_ROAMING, pAPConnection);
-    return TI_OK;
-}
-
-/**
-*
-* apConn_indicateSwitchChannelInProgress
-*
-* \b Description: 
-*
-* This function is called when switch channel process is started; it will trigger 
-* AP Connection state machine from 'Wait for roaming start' to 'Switch channel in progress'
-* state.
-*
-* \b ARGS:
-*
-*  I   - reason - the reason for roaming \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS apConn_indicateSwitchChannelInProgress(TI_HANDLE hAPConnection)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-    AP_CONN_VALIDATE_HANDLE(hAPConnection);
-
-    apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_START_SWITCH_CHANNEL, pAPConnection);
-    return TI_OK;
-}
-
-
-/**
-*
-* apConn_indicateSwitchChannelFinished
-*
-* \b Description: 
-*
-* This function is called when switch channel process is finished
-*
-* \b ARGS:
-*
-*  I   - reason - the reason for roaming \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS apConn_indicateSwitchChannelFinished(TI_HANDLE hAPConnection)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-    AP_CONN_VALIDATE_HANDLE(hAPConnection);
-
-    apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_FINISHED_SWITCH_CH, pAPConnection);
-
-    return TI_OK;
-}
-
-
-/**
-*
-* apConn_start
-*
-* \b Description: 
-*
-* Called by SME module when new connection has been successfully established (first time connection)
-*
-* \b ARGS:
-*
-*  I   - isValidBSS - if TI_FALSE, no roaming shall be performed, disconnect upon any roaming event; 
-*                   other parameters of current AP can be received from Current BSS module
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS apConn_start(TI_HANDLE hAPConnection, TI_BOOL roamingEnabled)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-    AP_CONN_VALIDATE_HANDLE(hAPConnection);
-
-    pAPConnection->roamingEnabled = roamingEnabled;
-
-    apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_START, pAPConnection);
-    return TI_OK;
-}
-
-
-/**
-*
-* apConn_stop
-*
-* \b Description: 
-*
-* Called by SME module when current connection must be taken down
-* (due to driver download, connection failure or any other reason)
-*
-* \b ARGS:
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS apConn_stop(TI_HANDLE hAPConnection, TI_BOOL removeKeys)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-    pAPConnection->stopFromSmeNum++;
-    pAPConnection->removeKeys = removeKeys;
-    pAPConnection->sendDeauthPacket = TI_TRUE;
-    pAPConnection->reNegotiateTSPEC = TI_FALSE;
-    pAPConnection->voiceTspecConfigured = TI_FALSE;
-	pAPConnection->videoTspecConfigured = TI_FALSE;
-
-	/* Mark that the connection is stopped due to reason outside the scope of this module */
-	if (pAPConnection->roamReason == ROAMING_TRIGGER_SECURITY_ATTACK)
-		pAPConnection->bNonRoamingDisAssocReason = TI_FALSE;
-	else
-		pAPConnection->bNonRoamingDisAssocReason = TI_TRUE;
-
-	apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_STOP, pAPConnection);
-    return TI_OK;
-}
-
-
-/**
-*
-* apConn_reportRoamingEvent
-*
-* \b Description: 
-*
-* Called when one of roaming events occur
-*
-* \b ARGS:
-*
-*  I   - roamingEventType   
-*  I   - pRoamingEventData - in case of 'Tx rate' event, or AP disconnect
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS apConn_reportRoamingEvent(TI_HANDLE hAPConnection,
-                                    apConn_roamingTrigger_e roamingEventType,
-                                    roamingEventData_u *pRoamingEventData)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection; 
-    paramInfo_t param;  /* parameter for retrieving BSSID */
-    TI_UINT16 reasonCode = 0;
-
-    AP_CONN_VALIDATE_HANDLE(hAPConnection);
-
-    TRACE4(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "apConn_reportRoamingEvent, type=%d, cur_state=%d, roamingEnabled=%d, roamEventCallb=%p  \n", roamingEventType, pAPConnection->currentState, pAPConnection->roamingEnabled, pAPConnection->roamEventCallb);
-
-    pAPConnection->assocRoamingTrigger = roamingEventType;
-
-    /* 1. Check if this is Rogue AP test case */
-    if (roamingEventType == ROAMING_TRIGGER_AP_DISCONNECT)
-    {   
-		if (pRoamingEventData != NULL)
-		{	/* Save the disconnect reason for future use */
-			pAPConnection->APDisconnect.uStatusCode     = pRoamingEventData->APDisconnect.uStatusCode;
-			pAPConnection->APDisconnect.bDeAuthenticate = pRoamingEventData->APDisconnect.bDeAuthenticate;
-            reasonCode = pRoamingEventData->APDisconnect.uStatusCode;
-		}
-        if ((pAPConnection->ignoreDeauthReason0) && (pRoamingEventData!=NULL) &&
-               (pAPConnection->APDisconnect.uStatusCode == 0))
-        {   /* This is required for Rogue AP test,
-                When Rogue AP due to invalid User name, deauth with reason 0 arrives before the Rogue AP,
-                and this XCC test fails.*/
-            TRACE0(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "apConn_reportRoamingEvent, Ignore DeAuth with reason 0 \n");
-            return TI_OK;
-        }
-        TRACE1(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "apConn_reportRoamingEvent, DeAuth with reason %d \n", pAPConnection->APDisconnect.uStatusCode);
-
-        if (pAPConnection->APDisconnect.uStatusCode == STATUS_CODE_802_1X_AUTHENTICATION_FAILED)
-        {
-          #ifdef XCC_MODULE_INCLUDED
-
-            /* Raise the EAP-Failure as event */
-            XCCMngr_rogueApDetected (pAPConnection->hXCCMngr, RSN_AUTH_STATUS_CHALLENGE_FROM_AP_FAILED);
-          #endif
-
-            
-            /* Remove AP from candidate list for a specified amount of time */
-            param.paramType = SITE_MGR_CURRENT_BSSID_PARAM;
-        	siteMgr_getParam(pAPConnection->hSiteMgr, &param);
-            
-            TRACE1(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "current station is banned from the roaming candidates list for %d Ms\n", RSN_AUTH_FAILURE_TIMEOUT);
-
-            rsn_banSite(pAPConnection->hPrivacy, param.content.siteMgrDesiredBSSID, RSN_SITE_BAN_LEVEL_FULL, RSN_AUTH_FAILURE_TIMEOUT);
-        }
-
-    }
-
-    /* 2. Check if received trigger is masked out */
-    if (((pAPConnection->isConsTxFailureMaskedOut) && (roamingEventType == ROAMING_TRIGGER_MAX_TX_RETRIES)) ||
-        ((pAPConnection->isRssiTriggerMaskedOut)   && (roamingEventType == ROAMING_TRIGGER_LOW_QUALITY)) ||
-        ((pAPConnection->isSnrTriggerMaskedOut)    && (roamingEventType == ROAMING_TRIGGER_LOW_SNR)) ||
-        ((pAPConnection->islowRateTriggerMaskedOut)&& (roamingEventType == ROAMING_TRIGGER_LOW_TX_RATE)))
-    {
-        TRACE0(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "apConn_reportRoamingEvent, trigger ignored \n");
-        return TI_OK;
-    }
-
-    /* 3.  Valid trigger received: */
-    /* 3a. Update statistics */
-    pAPConnection->roamingTriggerEvents[roamingEventType]++;
-
-	/* 3b. Store the most severe trigger */
-	if (pAPConnection->roamReason < roamingEventType)
-	{
-		pAPConnection->roamReason = roamingEventType;
-	}
-
-    /* 3c. Check if Roaming Manager is available */
-    if (((!pAPConnection->roamingEnabled) || (pAPConnection->roamEventCallb == NULL) ||
-          (pAPConnection->currentState == AP_CONNECT_STATE_IDLE))
-        && (roamingEventType > ROAMING_TRIGGER_MAX_TX_RETRIES))
-    {
-       /* 'Any SSID' configured, meaning Roaming Manager is not allowed to perform roaming, 
-           or Roaming Manager is not registered for roaming events;
-           unless this is trigger to change parameters of background scan, disconnect the link */
-        TRACE1(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "Disconnecting link due to roaming event: ev = %d\n", roamingEventType);
-
-        /*  Handle IBSS case TBD to remove 
-            Handle also the case where A first connection is in progress, and 
-            de-auth arrived. */
-        if (pAPConnection->currentState == AP_CONNECT_STATE_IDLE)
-		{
-			sme_ReportApConnStatus(pAPConnection->hSme, STATUS_DISCONNECT_DURING_CONNECT, pAPConnection->APDisconnect.uStatusCode);
-		}
-        else
-        {
-            /* Infra-structure BSS case - disconnect the link */
-            if (roamingEventType >= ROAMING_TRIGGER_AP_DISCONNECT && (roamingEventType != ROAMING_TRIGGER_TSPEC_REJECTED))
-            {
-                pAPConnection->removeKeys = TI_TRUE;
-            }
-            else
-            {
-                pAPConnection->removeKeys = TI_FALSE;
-            }
-            UPDATE_SEND_DEAUTH_PACKET_FLAG(roamingEventType);
-			if (roamingEventType == ROAMING_TRIGGER_SECURITY_ATTACK)
-				pAPConnection->deauthPacketReasonCode = STATUS_MIC_FAILURE;
-			else
-				pAPConnection->deauthPacketReasonCode = STATUS_UNSPECIFIED;
-            apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_STOP, pAPConnection);
-        }
-        return TI_OK;
-    }
-
-    /* 4. Check if we are in the middle of switching channel */
-    if (pAPConnection->currentState == AP_CONNECT_STATE_SWITCHING_CHANNEL)
-    {
-        /* Trigger received in the middle of switch channel, continue without reporting Roaming Manager */
-        TRACE1(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "Roaming event during switch channel: ev = %d\n", roamingEventType);
-        return TI_OK;
-    }
-
-    /* 5. Report Roaming Manager */
-    if ((pAPConnection->roamingEnabled == TI_TRUE) && (pAPConnection->roamEventCallb != NULL))
-    {
-        TRACE1(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "Roaming event raised: ev = %d\n", roamingEventType);
-        if (roamingEventType == ROAMING_TRIGGER_LOW_QUALITY) 
-        {
-            EvHandlerSendEvent(pAPConnection->hEvHandler, IPC_EVENT_LOW_RSSI, NULL,0);
-        }
-        /* Report to Roaming Manager */
-
-#ifdef XCC_MODULE_INCLUDED
-        /* For XCC only - if the is reason is TSPEC reject - mark this as BssLoss - To be changed later */
-        if (roamingEventType == ROAMING_TRIGGER_TSPEC_REJECTED)
-        {
-            roamingEventType = ROAMING_TRIGGER_BSS_LOSS;
-        }
-#endif        
-        pAPConnection->roamEventCallb(pAPConnection->hRoamMng, &roamingEventType, reasonCode);
-    }
-
-    return TI_OK;
-}
-
-
-/**
-*
-* apConn_RoamHandoffFinished
-*
-* \b Description: 
-*
-* Called when XCC module receives response from the supplicant or recognizes 
-* timeout while waiting for the response 
-*
-* \b ARGS:
-*
-* \b RETURNS:
-*
-* \sa 
-*/
-void apConn_RoamHandoffFinished(TI_HANDLE hAPConnection)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-#ifdef TI_DBG
-    if (hAPConnection == NULL) /* Failed to allocate control block */
-    {
-        WLAN_OS_REPORT(("FATAL ERROR: apConn_create(): Error allocating cb - aborting\n"));
-        return;
-    }
-#endif
-
-    apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_FINISHED_HAND_OVER, pAPConnection);
-}
-
-
-/**
-*
-* apConn_DisconnCompleteInd
-*
-* \b Description: 
-*
-* DISASSOCIATE Packet was sent - proceed with stopping the module
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context\n
-*
-* \b RETURNS:
-*
-*  None
-*
-* \sa 
-*/
-void apConn_DisconnCompleteInd(TI_HANDLE hAPConnection, mgmtStatus_e status, TI_UINT32 uStatusCode)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-    apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_FINISHED_OK, pAPConnection);
-}
-
-
-/**
-*
-* apConn_updateNeighborAPsList
-*
-* \b Description: 
-*
-* Called by XCC Manager when Priority APs are found  
-*
-* \b ARGS:
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-void apConn_updateNeighborAPsList(TI_HANDLE hAPConnection, neighborAPList_t *pListOfpriorityAps)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-    
-    if (pAPConnection->returnNeighborApsCallb != NULL )
-    {
-        pAPConnection->returnNeighborApsCallb(pAPConnection->hRoamMng, pListOfpriorityAps);
-    }
-}
-
-
-/**
-*
-* apConn_getRoamingStatistics
-*
-* \b Description: 
-*
-* Called from Measurement XCC sub-module when preparing TSM report to the AP. 
-*
-* \b ARGS: AP Connection handle
-*
-* \b RETURNS:
-*
-*  total number of successful roams
-*  delay of the latest successful roam
-*
-* \sa 
-*/
-void apConn_getRoamingStatistics(TI_HANDLE hAPConnection, TI_UINT8 *roamingCount, TI_UINT16 *roamingDelay)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-    
-    /* Get (and clear) total number of successful roams */
-    *roamingCount = pAPConnection->roamingSuccesfulHandoverNum;
-    pAPConnection->roamingSuccesfulHandoverNum = 0;
-
-    /* Get delay of the latest roam */
-    *roamingDelay = pAPConnection->lastRoamingDelay;
-    pAPConnection->lastRoamingDelay = 0;
-}
-
-
-
-
-/**
-*
-* apConn_resetRoamingStatistics
-*
-* \b Description: 
-*
-* Called from Measurement XCC sub-module in order to re-start roaming statistics. 
-*
-* \b ARGS: AP Connection handle
-*
-* \b RETURNS:
-*
-*  total number of successful roams
-*  delay of the latest successful roam
-*
-* \sa 
-*/
-void apConn_resetRoamingStatistics(TI_HANDLE hAPConnection)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-    
-    pAPConnection->resetReportedRoamingStatistics = TI_TRUE;
-    pAPConnection->roamingSuccesfulHandoverNum = 0;
-    pAPConnection->lastRoamingDelay = 0;
-}
-
-
-/**
-*
-* apConn_printStatistics
-*
-* \b Description: 
-*
-* Called by Site Manager when request to print statistics is requested from CLI  
-*
-* \b ARGS: AP Connection handle
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-void apConn_printStatistics(TI_HANDLE hAPConnection)
-{
-    WLAN_OS_REPORT(("-------------- Roaming Statistics ---------------\n\n"));
-    WLAN_OS_REPORT(("- Low TX rate = %d\n",     ((apConn_t *)hAPConnection)->roamingTriggerEvents[ROAMING_TRIGGER_LOW_TX_RATE]));
-    WLAN_OS_REPORT(("- Low SNR = %d\n",         ((apConn_t *)hAPConnection)->roamingTriggerEvents[ROAMING_TRIGGER_LOW_SNR]));
-    WLAN_OS_REPORT(("- Low Quality = %d\n",     ((apConn_t *)hAPConnection)->roamingTriggerEvents[ROAMING_TRIGGER_LOW_QUALITY]));
-    WLAN_OS_REPORT(("- MAX TX retries = %d\n",  ((apConn_t *)hAPConnection)->roamingTriggerEvents[ROAMING_TRIGGER_MAX_TX_RETRIES]));
-    WLAN_OS_REPORT(("- BSS Loss TX = %d\n",     ((apConn_t *)hAPConnection)->roamingTriggerEvents[ROAMING_TRIGGER_BSS_LOSS]));
-    WLAN_OS_REPORT(("- Switch Channel = %d\n",  ((apConn_t *)hAPConnection)->roamingTriggerEvents[ROAMING_TRIGGER_SWITCH_CHANNEL]));
-    WLAN_OS_REPORT(("- AP Disconnect = %d\n",   ((apConn_t *)hAPConnection)->roamingTriggerEvents[ROAMING_TRIGGER_AP_DISCONNECT]));
-    WLAN_OS_REPORT(("- SEC attack = %d\n",      ((apConn_t *)hAPConnection)->roamingTriggerEvents[ROAMING_TRIGGER_SECURITY_ATTACK]));
-    WLAN_OS_REPORT(("\n"));
-    WLAN_OS_REPORT(("- Successful roaming = %d\n",                  ((apConn_t *)hAPConnection)->roamingSuccesfulHandoverTotalNum));
-    WLAN_OS_REPORT(("- UnSuccessful roaming = %d\n",                ((apConn_t *)hAPConnection)->roamingFailedHandoverNum));
-    WLAN_OS_REPORT(("- Giving up roaming = %d\n",                   ((apConn_t *)hAPConnection)->retainCurrAPNum));
-    WLAN_OS_REPORT(("- Disconnect cmd from roaming manager = %d\n", ((apConn_t *)hAPConnection)->disconnectFromRoamMngrNum));
-    WLAN_OS_REPORT(("- Disconnect cmd from SME = %d\n",             ((apConn_t *)hAPConnection)->stopFromSmeNum));
-    WLAN_OS_REPORT(("\n"));
-}
-
-
-
-/**
-*
-* apConn_getVendorSpecificIE
-*
-* \b Description: 
-*
-* Called by Association SM when request to associate is built and sent to AP;
-* returns request updated with vendor specific info-element
-*
-* \b ARGS: 
-*
-*  I   - hAPConnection - AP Connection handle\n
-*  O   - pRequest - pointer to request buffer\n
-*  O   - len - size of returned IE\n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS apConn_getVendorSpecificIE(TI_HANDLE hAPConnection, TI_UINT8 *pRequest, TI_UINT32 *len)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-    if (pAPConnection->vsIElength > 0)
-    {
-        *len = pAPConnection->vsIElength;
-        os_memoryCopy(pAPConnection->hOs, pRequest, pAPConnection->vsIEbuf, pAPConnection->vsIElength);
-    }
-    else
-    {
-        *len = 0;
-    }
-    return TI_OK;
-}
-
-
-/* Internal functions implementation */
-
-
-/**
-*
-* apConn_smEvent
-*
-* \b Description: 
-*
-* AP Connection state machine transition function
-*
-* \b ARGS:
-*
-*  I/O - currentState - current state in the state machine\n
-*  I   - event - specific event for the state machine\n
-*  I   - pData - pointer to AP Connection context\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static TI_STATUS apConn_smEvent(TI_UINT8 *currState, TI_UINT8 event, void* data)
-{
-    apConn_t  *pAPConnection = (apConn_t *)data;
-    TGenSM    *pGenSM = (TGenSM*)pAPConnection->hAPConnSM;
-
-	TRACE2(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "apConn_smEvent: currState = %d, event = %d\n", pGenSM->uCurrentState, event);
-    genSM_Event (pAPConnection->hAPConnSM, (TI_UINT32)event, data);
-    pAPConnection->currentState = pGenSM->uCurrentState;
-
-	TRACE1(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "apConn_smEvent: newState = %d\n", pAPConnection->currentState);
-
-    return TI_OK;
-}
-
-
-/**
-*
-* apConn_smNop - Do nothing
-*
-* \b Description: 
-*
-* Do nothing in the SM.
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-static void apConn_smNop(void *pData)
-{
-	apConn_t *hReport = ((apConn_t *)pData)->hReport;
-    TRACE0(hReport, REPORT_SEVERITY_INFORMATION, "apConn_smNop\n");
-}
-
-
-/**
-*
-* apConn_smUnexpected - Unexpected event
-*
-* \b Description: 
-*
-* Unexpected event in the SM.
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* 
-*/
-void apConn_smUnexpected(void *pData)
-{
-    TRACE0(((apConn_t *)pData)->hReport, REPORT_SEVERITY_INFORMATION, "apConn_smUnexpected\n");
-}
-
-
-/**
-*
-* apConn_smStartWaitingForTriggers
-*
-* \b Description: 
-*
-* SME informs AP Connection module about successfull link establishment; start wiating for roaming triggers
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static void apConn_smStartWaitingForTriggers(void *pData)
-{
-    apConn_t    *pAPConnection;
-    apConn_connStatus_t reportStatus;  
-    paramInfo_t param;
-
-    pAPConnection = (apConn_t *)pData;
-    
-    if ((pAPConnection->roamingEnabled) && (pAPConnection->reportStatusCallb != NULL))
-    {
-        param.paramType   = ASSOC_ASSOCIATION_REQ_PARAM;
-
-        assoc_getParam(pAPConnection->hAssoc, &param);
-        reportStatus.dataBuf = (char *)(param.content.assocReqBuffer.buffer);
-        reportStatus.dataBufLength = param.content.assocReqBuffer.bufferSize;
-
-        reportStatus.status = CONN_STATUS_CONNECTED;
-        pAPConnection->reportStatusCallb(pAPConnection->hRoamMng, &reportStatus);   
-    }
-    pAPConnection->firstAttempt2Roam = TI_TRUE;
-    pAPConnection->roamReason = ROAMING_TRIGGER_NONE;
-    pAPConnection->removeKeys = TI_TRUE;
-    pAPConnection->sendDeauthPacket = TI_TRUE;
-    pAPConnection->reNegotiateTSPEC = TI_FALSE;
-    pAPConnection->voiceTspecConfigured = TI_FALSE;
-	pAPConnection->videoTspecConfigured = TI_FALSE;
-}
-
-
-/**
-*
-* apConn_smConnectedToNewAP
-*
-* \b Description: 
-*
-* After roaming was requested, Connection SM informs AP Connection module about
-* successful link re-establishment; start waiting for roaming triggers
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static void apConn_smConnectedToNewAP(void *pData)
-{
-    apConn_t    *pAPConnection;
-    apConn_connStatus_t reportStatus; 
-    paramInfo_t param;
-
-    pAPConnection = (apConn_t *)pData;
-    
-    /* Configure SCR group back to connection */
-    scr_setGroup (pAPConnection->hScr, SCR_GID_CONNECTED);
-
-    /* Erase vendor specific info-element if was defined for last AP Assoc request */
-    pAPConnection->vsIElength = 0;
-
-    /* TBD Notify Curr BSS module about update of current AP database */
-
-    if (pAPConnection->roamingFailedHandoverNum>0)
-    {
-        pAPConnection->roamingFailedHandoverNum--;
-    }
-    /* Report Roaming Manager */
-    if (pAPConnection->reportStatusCallb != NULL)
-    {
-        param.paramType   = ASSOC_ASSOCIATION_REQ_PARAM;
-
-        assoc_getParam(pAPConnection->hAssoc, &param);
-        reportStatus.dataBuf = (char *)(param.content.assocReqBuffer.buffer);
-        reportStatus.dataBufLength = param.content.assocReqBuffer.bufferSize;
-
-        reportStatus.status = CONN_STATUS_HANDOVER_SUCCESS;
-
-        pAPConnection->reportStatusCallb(pAPConnection->hRoamMng, &reportStatus);   
-    }
-    pAPConnection->firstAttempt2Roam = TI_TRUE;
-    pAPConnection->roamReason = ROAMING_TRIGGER_NONE;
-    pAPConnection->roamingSuccesfulHandoverTotalNum++;
-    pAPConnection->removeKeys = TI_TRUE;
-    pAPConnection->sendDeauthPacket = TI_TRUE;
-    pAPConnection->reNegotiateTSPEC = TI_FALSE;
-    pAPConnection->voiceTspecConfigured = TI_FALSE;
-	pAPConnection->videoTspecConfigured = TI_FALSE;
-
-    
-    if (!pAPConnection->resetReportedRoamingStatistics)
-    {
-        pAPConnection->roamingSuccesfulHandoverNum++;
-        pAPConnection->lastRoamingDelay = 
-	        (TI_UINT16)os_timeStampMs(pAPConnection->hOs) - pAPConnection->roamingStartedTimestamp;		  
-    }
-    else
-    {
-        pAPConnection->resetReportedRoamingStatistics = TI_FALSE;
-    }
-
-    /* Raise event of Roaming Completion */
-    TRACE0(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "EvHandlerSendEvent -ROAMING_COMPLETE\n");
-    EvHandlerSendEvent(pAPConnection->hEvHandler, IPC_EVENT_ROAMING_COMPLETE, NULL, 0);
-}
-
-
-/**
-*
-* apConn_smStopConnection
-*
-* \b Description: 
-*
-* Stop required before roaming was started
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static void apConn_smStopConnection(void *pData)
-{
-    apConn_t *pAPConnection;
-    DisconnectType_e disConnType;
-    pAPConnection = (apConn_t *)pData;
-    
-    TRACE2(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, "apConn_smStopConnection, calls conn_stop, removeKeys=%d, sendDeauthPacket=%d \n", pAPConnection->removeKeys, pAPConnection->sendDeauthPacket);
-    
-    /* Erase vendor specific info-element if was defined for last AP Assoc request */
-    pAPConnection->vsIElength = 0;
-    
-    /* In case AP connection was stopped by SME, and radioOn is false, meaning immidiate shutdown is required without disassoc frame */
-    /* Otherwise, ask for normal disconnection with disassoc frame */
-    disConnType = (pAPConnection->sendDeauthPacket == TI_TRUE) ? DISCONNECT_DE_AUTH : DISCONNECT_IMMEDIATE;
-
-    
-
-    /* set the SCr group to connecting */
-    scr_setGroup (pAPConnection->hScr, SCR_GID_CONNECT);
-    
-	/* Stop Connection state machine - always immediate TBD */
-	conn_stop(pAPConnection->hConnSm, 
-			  disConnType,
-			  (mgmtStatus_e)pAPConnection->deauthPacketReasonCode,
-			  pAPConnection->removeKeys, /* for Roaming, do not remove the keys */
-			  apConn_DisconnCompleteInd,
-			  pAPConnection);
-	
-	pAPConnection->deauthPacketReasonCode = STATUS_UNSPECIFIED;
-}
-
-
-/**
-*
-* apConn_smReportDisconnected
-*
-* \b Description: 
-*
-* Moving from 'Disconnecting' state to 'Idle':
-*   RoamMgr.status("not-connected")
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static void apConn_smReportDisconnected(void *pData)
-{
-    apConn_t    *pAPConnection;
-    apConn_connStatus_t reportStatus; 
-
-    pAPConnection = (apConn_t *)pData;
-
-    if (pAPConnection->reportStatusCallb != NULL) 
-    {
-        reportStatus.status = CONN_STATUS_NOT_CONNECTED;
-        pAPConnection->reportStatusCallb(pAPConnection->hRoamMng, &reportStatus);   
-    }
-    
-    pAPConnection->firstAttempt2Roam = TI_TRUE;
-
-    /* Notify SME */
-    apConn_reportConnStatusToSME(pAPConnection);
-}
-
-
-/**
-*
-* apConn_smRetainAP
-*
-* \b Description: 
-*
-* Roaming Manager gives up on roaming.
-* Moving from 'Wait for connection command' back to 'Wait for roam started.
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static void apConn_smRetainAP(void *data)
-{
-    apConn_t    *pAPConnection;
-    apConn_connStatus_t reportStatus; 
-    paramInfo_t param;
-
-    pAPConnection = (apConn_t *)data;
-
-    /* Configure SCR group back to connection */
-    scr_setGroup (pAPConnection->hScr, SCR_GID_CONNECTED);
-
-    /* Report Roaming Manager */
-    if (pAPConnection->reportStatusCallb != NULL) 
-    {
-        param.paramType   = ASSOC_ASSOCIATION_REQ_PARAM;
-
-        assoc_getParam(pAPConnection->hAssoc, &param);
-        reportStatus.dataBuf = (char *)(param.content.assocReqBuffer.buffer);
-        reportStatus.dataBufLength = param.content.assocReqBuffer.bufferSize;
-
-        reportStatus.status = CONN_STATUS_HANDOVER_SUCCESS;
-
-        pAPConnection->reportStatusCallb(pAPConnection->hRoamMng, &reportStatus);   
-    }
-    pAPConnection->retainCurrAPNum++;
-
-    pAPConnection->roamReason = ROAMING_TRIGGER_NONE;
-    pAPConnection->removeKeys = TI_TRUE;
-    pAPConnection->sendDeauthPacket = TI_TRUE;
-    pAPConnection->reNegotiateTSPEC = TI_FALSE;
-    pAPConnection->voiceTspecConfigured = TI_FALSE;
-	pAPConnection->videoTspecConfigured = TI_FALSE;
-
-}
-
-
-/**
-*
-* apConn_smRequestCCKM
-*
-* \b Description: 
-*
-* Roaming Manager requests to roaming.
-* Get CCKM (prepare hand-off).
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static void apConn_smRequestCCKM(void *data)
-{
-    apConn_t    *pAPConnection;
-    pAPConnection = (apConn_t *)data;
-	
-#ifdef XCC_MODULE_INCLUDED
-        /* Send request to XCC module */
-
-    apConn_calcNewTsf(pAPConnection, (TI_UINT8 *)&(pAPConnection->newAP->lastRxTSF), pAPConnection->newAP->lastRxHostTimestamp, pAPConnection->newAP->beaconInterval);
-    XCCMngr_startCckm(pAPConnection->hXCCMngr, &(pAPConnection->newAP->BSSID), (TI_UINT8 *)&(pAPConnection->newAP->lastRxTSF));
-#else
-    apConn_RoamHandoffFinished(pAPConnection);
-#endif
-}
-
-
-#ifdef XCC_MODULE_INCLUDED
-/**
-*
-* calcNewTsfTimestamp - Calculates the TSF
-*
-* \b Description: 
-*
-* Calculates the TSF according to the delta of the TSF from the last Beacon/Probe Resp and the current time.
-*
-* \b ARGS:
-*
-*  I   - hRoamingMngr - pointer to the roamingMngr SM context  \n
-*  I/O - tsfTimeStamp - the TSF field in the site entry of the roaming candidate AP
-*  I   - newSiteOsTimeStamp - the TS field in the site entry of the roaming candidate AP
-*
-* \b RETURNS:
-*
-*  Nothing.
-*
-* 
-*/
-static void apConn_calcNewTsf(apConn_t *hAPConnection, TI_UINT8 *tsfTimeStamp, TI_UINT32 newSiteOsTimeStamp, TI_UINT32 beaconInterval)
-{
-    apConn_t    *pAPConnection = hAPConnection;
-    TI_UINT32      osTimeStamp = os_timeStampMs(pAPConnection->hOs);
-    TI_UINT32      deltaTimeStamp; 
-    TI_UINT32      tsfLsdw,tsfMsdw, newOsTimeStamp; 
-    TI_UINT32      remainder;
-    TI_UINT8       newTsfTimestamp[TIME_STAMP_LEN];
-
-    /* get the delta TS between the TS of the last Beacon/ProbeResp-from the site table
-    and the current TS */
-    deltaTimeStamp = osTimeStamp - newSiteOsTimeStamp;
-    tsfLsdw = *((TI_UINT32*)&tsfTimeStamp[0]); 
-    tsfMsdw = *((TI_UINT32*)&tsfTimeStamp[4]);
-    
-    TRACE2(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, " TSF time LSDW reversed=%x, TSF time MSDW reversed=%x\n", tsfLsdw, tsfMsdw);
-
-    deltaTimeStamp = deltaTimeStamp*1000;/* from mSec to uSec*/
-    /* Before adding, save remainder */
-    remainder = tsfTimeStamp[3] + ((deltaTimeStamp & 0xff000000) >> 24);
-
-    /* The LS DW of the TS is the TSF taken from the last Beacon/Probe Resp
-        + the delta TS from the time the Beacon/Probe Resp arrive till now. */
-    newOsTimeStamp = deltaTimeStamp+tsfLsdw;
-
-    /* substracting one beacon interval */
-    newOsTimeStamp -= (beaconInterval * 1024); /* im usec */
-
-    /* save just for debug printout */
-    deltaTimeStamp +=osTimeStamp; /* uMsec */
-    /* update the LSB of the TSF */
-    newTsfTimestamp[0] = newOsTimeStamp & 0x000000ff;
-    newTsfTimestamp[1] = (newOsTimeStamp & 0x0000ff00) >> 8;
-    newTsfTimestamp[2] = (newOsTimeStamp & 0x00ff0000) >> 16;
-    newTsfTimestamp[3] = (newOsTimeStamp & 0xff000000) >> 24;
-
-    /* increase the MSB in case of overflow */
-    if (remainder > 0xff)
-    {
-        tsfMsdw++;
-        
-    }
-    /* update the MSB of the TSF */
-    newTsfTimestamp[4] = tsfMsdw & 0x000000ff;
-    newTsfTimestamp[5] = (tsfMsdw & 0x0000ff00) >> 8;
-    newTsfTimestamp[6] = (tsfMsdw & 0x00ff0000) >> 16;
-    newTsfTimestamp[7] = (tsfMsdw & 0xff000000) >> 24;
-
-    TRACE11(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, " NEW TSF time: reversedTsfTimeStamp= 0x%x, New deltaTimeStamp= 0x%x, \n remainder=0x%x, new tsfTimeStamp=%x-%x-%x-%x-%x-%x-%x-%x\n", newOsTimeStamp, deltaTimeStamp, remainder, newTsfTimestamp[0], newTsfTimestamp[1], newTsfTimestamp[2], newTsfTimestamp[3], newTsfTimestamp[4], newTsfTimestamp[5], newTsfTimestamp[6], newTsfTimestamp[7]);
-
-    os_memoryCopy(pAPConnection->hOs, tsfTimeStamp, newTsfTimestamp, TIME_STAMP_LEN);
-}
-#endif
-
-
-/**
-*
-* apConn_invokeConnectionToNewAp
-*
-* \b Description: 
-*
-* Got CCKM (hand-off), start re-connection to another AP
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static void apConn_smInvokeConnectionToNewAp(void *data)
-{
-    apConn_t    *pAPConnection;
-    EConnType    connType;
-    paramInfo_t param;
-    TI_UINT8     staPrivacySupported, apPrivacySupported;
-    TI_BOOL      renegotiateTspec = TI_FALSE;
-    
-	pAPConnection = (apConn_t *)data;
-
-	pAPConnection->roamingStartedTimestamp = os_timeStampMs(pAPConnection->hOs);
-
-    /* Check privacy compatibility */
-    param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
-    rsn_getParam(pAPConnection->hPrivacy, &param);
-
-    staPrivacySupported = (param.content.rsnEncryptionStatus == TWD_CIPHER_NONE) ? TI_FALSE : TI_TRUE;
-    apPrivacySupported  = ((pAPConnection->newAP->capabilities >> CAP_PRIVACY_SHIFT) & CAP_PRIVACY_MASK) ? TI_TRUE : TI_FALSE;
-
-#ifdef GEM_SUPPORTED
-	// For GEM – ignore the privacy bit of the AP. Some GEM AP’s don’t turn on the privacy
- if ((staPrivacySupported != apPrivacySupported) && (param.content.rsnEncryptionStatus != TWD_CIPHER_GEM))
-#else 
-    if (staPrivacySupported != apPrivacySupported)
-#endif
-    {
-        param.paramType = RSN_MIXED_MODE;
-        rsn_getParam(pAPConnection->hPrivacy, &param);
-
-        if (apPrivacySupported ||
-            (!param.content.rsnMixedMode && staPrivacySupported))
-        {
-            TRACE2(pAPConnection->hReport, REPORT_SEVERITY_WARNING, ": failed privacy comparison %d vs. %d\n", staPrivacySupported, apPrivacySupported);
-            apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_FINISHED_NOT_OK, pAPConnection);
-            return;
-        }
-    }
-
-    /* Update data info of desired AP; in case of first attempt to roam,
-       store previous primary site info */
-    if (siteMgr_overwritePrimarySite(pAPConnection->hSiteMgr, pAPConnection->newAP, pAPConnection->firstAttempt2Roam) != TI_OK)
-    {
-        TRACE0(pAPConnection->hReport, REPORT_SEVERITY_WARNING, ": failed to ovewrite Primary Site\n");
-        apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_FINISHED_NOT_OK, pAPConnection);
-        return;
-    }
-
-    /* Update re-associate parameter of MLME */
-    if (pAPConnection->requestType == AP_CONNECT_FAST_TO_AP || pAPConnection->requestType == AP_CONNECT_RECONNECT_CURR_AP)
-    {
-        connType = CONN_TYPE_ROAM;
-    }
-    else
-    {
-        connType = CONN_TYPE_FIRST_CONN;
-    }
-
-#ifdef XCC_MODULE_INCLUDED
-    /* Check the need in TSPEC re-negotiation */
-    if ( (pAPConnection->voiceTspecConfigured || pAPConnection->videoTspecConfigured) && pAPConnection->reNegotiateTSPEC )
-    {
-        /* If the candidate AP is at least XCCver4 AP, try to re-negotiate TSPECs */
-        if (XCCMngr_parseXCCVer(pAPConnection->hXCCMngr, 
-                                pAPConnection->newAP->pBuffer, 
-                                pAPConnection->newAP->bufferLength) >= 4)
-        {
-            renegotiateTspec = TI_TRUE;
-        }
-    }
-#endif
-
-    TRACE2(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, ": calls conn_start, removeKeys=%d, renegotiateTSPEC=%d\n", pAPConnection->removeKeys, renegotiateTspec);
-
-    /* Start Connection state machine */
-    conn_start(pAPConnection->hConnSm, 
-                      connType,
-                      apConn_ConnCompleteInd,
-                      pAPConnection,
-                      pAPConnection->removeKeys,
-                      renegotiateTspec);
-}
-
-
-/**
-*
-* apConn_smReportConnFail
-*
-* \b Description: 
-*
-* Got 'Failed' indication from Connection state machine - inform Roaming Manager Module
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static void apConn_smReportConnFail(void *data)
-{
-    apConn_t *pAPConnection;
-    apConn_connStatus_t reportStatus; 
-    paramInfo_t param;
-
-    pAPConnection = (apConn_t *)data;
-
-    pAPConnection->firstAttempt2Roam = TI_FALSE;
-    pAPConnection->resetReportedRoamingStatistics = TI_FALSE;
-
-    /* Erase vendor specific info-element if was defined for last AP Assoc request */
-    pAPConnection->vsIElength = 0;
-
-    /* Report to Roaming Manager */
-    if (pAPConnection->reportStatusCallb != NULL)
-    {
-        param.paramType   = ASSOC_ASSOCIATION_REQ_PARAM;
-
-        assoc_getParam(pAPConnection->hAssoc, &param);
-        reportStatus.dataBuf = (char *)(param.content.assocReqBuffer.buffer);
-        reportStatus.dataBufLength = param.content.assocReqBuffer.bufferSize;
-
-        reportStatus.status = CONN_STATUS_HANDOVER_FAILURE;
-
-        pAPConnection->reportStatusCallb(pAPConnection->hRoamMng, &reportStatus);   
-    }
-}
-
-
-/**
-*
-* apConn_smConfigureDriverBeforeRoaming
-*
-* \b Description: 
-*
-* Got 'Failed' indication from Connection state machine - inform Roaming Manager Module
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static void apConn_smConfigureDriverBeforeRoaming(void *pData)
-{
-    apConn_t    *pAPConnection = (apConn_t*)pData;
-    paramInfo_t param;
-	
-    /* Configure SCR group of allowed clients according to 'Roaming' rule */
-    scr_setGroup (pAPConnection->hScr, SCR_GID_ROAMING);
-    param.paramType = QOS_MNGR_VOICE_RE_NEGOTIATE_TSPEC;
-    qosMngr_getParams(pAPConnection->hQos, &param);
-    pAPConnection->voiceTspecConfigured = param.content.TspecConfigure.voiceTspecConfigure;    
-    pAPConnection->videoTspecConfigured = param.content.TspecConfigure.videoTspecConfigure;  
-    pAPConnection->resetReportedRoamingStatistics = TI_FALSE;
-}
-
-/**
-*
-* apConn_smSwChFinished
-*
-* \b Description: 
-*
-* Switch channel completed; if there were roaming Manager triggers meanwhile, 
-* inform Roaming Manager Module
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static void apConn_smSwChFinished(void *pData)
-{
-    apConn_t *pAPConnection = (apConn_t *)pData;
-
-    /* Inform Current BSS module */
-    currBSS_restartRssiCounting(pAPConnection->hCurrBSS);
-
-    /* If there are unreported roaming triggers of 'No AP' type, 
-       report them now to roaming manager */
-    if (pAPConnection->roamReason >= ROAMING_TRIGGER_MAX_TX_RETRIES)
-    {
-        if ((pAPConnection->roamingEnabled == TI_TRUE) && 
-            (pAPConnection->roamEventCallb != NULL))
-        {
-            /* Report to Roaming Manager */
-            pAPConnection->roamEventCallb(pAPConnection->hRoamMng, &pAPConnection->roamReason, (TI_UINT16)0);
-        }
-    }
-    else
-    {
-        pAPConnection->roamReason = ROAMING_TRIGGER_NONE;
-    }
-}
-
-
-/**
-*
-* apConn_smHandleTspecReneg
-*
-* \b Description: 
-*
-* This function will be called when moving from CONNECTING state to 
-* START_TSPEC_RENEGOTIATION state. It checks if TSPEC re-negotiation was requested 
-* by roaming manager, if the TSPEC for voice was defined by user application, 
-* if the re-negotiation was performed during hand-over. 
-* If so, it will trigger moving to WAIT_ROAM state, otherwise it will start 
-* TSPEC negotiation, staying in the REESTABLISHING_VOICE state and waiting 
-* for results.
-*
-* \b ARGS:
-*
-*  I   - pData - pointer to AP Connection context\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static void apConn_smHandleTspecReneg (void *pData)
-{
-    apConn_t *pAPConnection = (apConn_t *)pData;
-    paramInfo_t param;
-
-    if (pAPConnection->voiceTspecConfigured
-#ifndef XCC_MODULE_INCLUDED
-          && pAPConnection->reNegotiateTSPEC
-#endif
-        )
-        {
-#ifndef XCC_MODULE_INCLUDED        
-        param.paramType = QOS_MNGR_VOICE_RE_NEGOTIATE_TSPEC;
-        qosMngr_getParams(pAPConnection->hQos, &param);
-
-        if (param.content.TspecConfigure.voiceTspecConfigure == TI_TRUE)
-        {
-            /* TSPEC is already configured, move to CONNECTED */
-            apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_FINISHED_OK, pAPConnection);
-        }
-        else
-#endif
-        {
-            param.paramType = QOS_MNGR_RESEND_TSPEC_REQUEST;
-            param.content.qosRenegotiateTspecRequest.callback = (void *)apConn_qosMngrReportResultCallb;
-            param.content.qosRenegotiateTspecRequest.handler = pData; 
-
-            if (qosMngr_setParams(pAPConnection->hQos, &param) != TI_OK)
-            {
-                /* Re-negotiation of TSPEC cannot be performed */
-                apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_FINISHED_NOT_OK, pAPConnection);
-            }
-        }
-    }
-    else
-    {
-        /* No need to re-negotiate TSPEC, move to CONNECTED */
-        apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_FINISHED_OK, pAPConnection);
-    }
-	return;
-}
-
-
-/**
-*
-* apConn_qosMngrReportResultCallb
-*
-* \b Description: 
-*
-* This function will be transferred to QoS manager upon request to start negotiation
-* of the TSPEC for voice and signaling, and will be called when the voice TSPEC
-* renegotiation is completed. The function will generate FINISHED_OK or 
-* FINISHED_NOK events to the state machine of AP Connection, triggering change of 
-* the current state.
-*
-* \b ARGS:
-*
-*  I   - hApConn - pointer to AP Connection context\n
-*  I   - result - returned by Traffic admission control\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-static TI_STATUS apConn_qosMngrReportResultCallb (TI_HANDLE hApConn, trafficAdmRequestStatus_e result)
-{
-    apConn_t *pAPConnection = (apConn_t *)hApConn;
-
-    AP_CONN_VALIDATE_HANDLE(hApConn);
-
-    if (result == STATUS_TRAFFIC_ADM_REQUEST_ACCEPT) 
-    {
-        apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_FINISHED_OK, pAPConnection);
-    }
-    else
-    {
-        apConn_smEvent(&(pAPConnection->currentState), AP_CONNECT_EVENT_FINISHED_NOT_OK, pAPConnection);
-    }
-    return TI_OK;
-}
-
-/**
-*
-* apConn_reportConnStatusToSME
-*
-* \b Description: 
-*
-* Sends report to SME regarding the connection status
-*
-* \b ARGS:
-*
-*  I   - pAPConnection  - pointer to AP Connection context\n
-*
-* \b RETURNS:
-*
-*  OK on success, NOK otherwise.
-*
-* \sa 
-*/
-static void apConn_reportConnStatusToSME (apConn_t *pAPConnection)
-{
-	
-TRACE3(pAPConnection->hReport, REPORT_SEVERITY_INFORMATION, " roamingTrigger = %d, APDisconnectStatusCode = %d, bNonRoamingDisAssocReason = %d\n", pAPConnection->roamReason, pAPConnection->APDisconnect.uStatusCode, 		pAPConnection->bNonRoamingDisAssocReason);
-
-	/* Check if an outside reason caused the disconnection. */
-	if (pAPConnection->bNonRoamingDisAssocReason)
-	{
-		pAPConnection->bNonRoamingDisAssocReason = TI_FALSE;
-		sme_ReportApConnStatus(pAPConnection->hSme, STATUS_UNSPECIFIED, 0);
-	}
-    /* DisAssociation happened due to roaming trigger */
-	else if (pAPConnection->roamReason == ROAMING_TRIGGER_AP_DISCONNECT)
-	{	/* AP disconnect is a special case of the status delivered to SME */
-		mgmtStatus_e mgmtStatus = ( pAPConnection->APDisconnect.bDeAuthenticate ? STATUS_AP_DEAUTHENTICATE : STATUS_AP_DISASSOCIATE );
-		sme_ReportApConnStatus(pAPConnection->hSme, mgmtStatus, pAPConnection->APDisconnect.uStatusCode);
-	} 
-	else	/* Finally, just send the last roaming trigger */
-	{	
-		sme_ReportApConnStatus(pAPConnection->hSme, STATUS_ROAMING_TRIGGER, (TI_UINT32)pAPConnection->roamReason);
-	}
-}
-
-
-void apConn_setDeauthPacketReasonCode(TI_HANDLE hAPConnection, TI_UINT8 deauthReasonCode)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-	pAPConnection->deauthPacketReasonCode = deauthReasonCode;
-	pAPConnection->roamReason = ROAMING_TRIGGER_SECURITY_ATTACK;
-}
-
-TI_STATUS apConn_getAssocRoamingTrigger(TI_HANDLE hAPConnection, apConn_roamingTrigger_e *asssocRoamingTrigger)
-{
-    apConn_t *pAPConnection = (apConn_t *)hAPConnection;
-
-	*asssocRoamingTrigger = pAPConnection->assocRoamingTrigger;
-
-	return TI_OK;
-}
diff --git a/wl1271/stad/src/Connection_Managment/apConn.h b/wl1271/stad/src/Connection_Managment/apConn.h
deleted file mode 100644
index b14e0dd..0000000
--- a/wl1271/stad/src/Connection_Managment/apConn.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * apConn.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file apConn.h
- *  \brief AP Connection Module API
- *
- *  \see apConn.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  AP Connection	    		                                	*
- *   PURPOSE: AP Connection Module API                              		*
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _AP_CONNECTION_H_
-#define _AP_CONNECTION_H_
-
-#include "802_11Defs.h"
-#include "apConnApi.h"
-#include "DrvMainModules.h"
-
-/* Typedefs */
-/* This struct is used for ROAMING_TRIGGER_AP_DISCONNECT */
-typedef struct  
-{
-	TI_UINT16 uStatusCode;		/* status code of deauth/disassoc packet				   */
-	TI_BOOL   bDeAuthenticate;	/* Whether this packet is DeAuth ( if DisAssoc than TI_FALSE) */
-} APDisconnect_t;
-
-typedef union
-{
-	APDisconnect_t APDisconnect;
-	ERate		   rate;
-} roamingEventData_u;
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-/* Called by Config Manager */
-TI_HANDLE apConn_create(TI_HANDLE hOs);
-TI_STATUS apConn_unload(TI_HANDLE hAPConnection);
-void      apConn_init (TStadHandlesList *pStadHandles);
-TI_STATUS apConn_SetDefaults (TI_HANDLE hAPConnection, apConnParams_t *pApConnParams);
-
-/* Called by SME and Site Manager */
-TI_STATUS apConn_start(TI_HANDLE hAPConnection, TI_BOOL roamingEnabled);
-TI_STATUS apConn_stop(TI_HANDLE hAPConnection, TI_BOOL removeKeys);
-
-void apConn_printStatistics(TI_HANDLE hAPConnection);
-
-
-/* Called by Connection SM */
-void apConn_ConnCompleteInd(TI_HANDLE hAPConnection, mgmtStatus_e status, TI_UINT32 uStatusCode);
-
-void apConn_DisconnCompleteInd(TI_HANDLE hAPConnection, mgmtStatus_e status, TI_UINT32 uStatusCode);
-
-/* Called by Current BSS, Rate Adaptation, RSN and other modules generating roaming events */
-TI_STATUS apConn_reportRoamingEvent(TI_HANDLE hAPConnection,
-									apConn_roamingTrigger_e roamingEventType,
-									roamingEventData_u *pRoamingEventData);
-
-/* Called by XCC Manager */
-void apConn_RoamHandoffFinished(TI_HANDLE hAPConnection);
-void apConn_getRoamingStatistics(TI_HANDLE hAPConnection, TI_UINT8 *roamingCount, TI_UINT16 *roamingDelay);
-void apConn_resetRoamingStatistics(TI_HANDLE hAPConnection);
-
-void apConn_updateNeighborAPsList(TI_HANDLE hAPConnection, neighborAPList_t *pListOfpriorityAps);
-
-/* Called by Switch Channel */
-TI_STATUS apConn_indicateSwitchChannelInProgress(TI_HANDLE hAPConnection);
-TI_STATUS apConn_indicateSwitchChannelFinished(TI_HANDLE hAPConnection);
-
-/* Called by Association SM */
-TI_STATUS apConn_getVendorSpecificIE(TI_HANDLE hAPConnection, TI_UINT8 *pRequest, TI_UINT32 *len);
-
-
-TI_BOOL apConn_isPsRequiredBeforeScan(TI_HANDLE hAPConnection);
-
-void apConn_setDeauthPacketReasonCode(TI_HANDLE hAPConnection, TI_UINT8 deauthReasonCode);
-
-#endif /*  _AP_CONNECTION_H_*/
-
diff --git a/wl1271/stad/src/Connection_Managment/apConnApi.h b/wl1271/stad/src/Connection_Managment/apConnApi.h
deleted file mode 100644
index 4b8556d..0000000
--- a/wl1271/stad/src/Connection_Managment/apConnApi.h
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- * apConnApi.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file apConnApi.h
- *  \brief AP Connection Module API
- *
- *  \see apConn.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  AP Connection                                             	*
- *   PURPOSE: AP Connection Module API                                      *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _AP_CONNECTION_API_H_
-#define _AP_CONNECTION_API_H_
-
-#include "paramOut.h"
-#include "rsnApi.h"
-#include "roamingMngrTypes.h"
-
-/*-----------*/
-/* Constants */
-/*-----------*/
-
-#define AP_CONNECT_TRIGGER_IGNORED  0x0
-
-/*--------------*/
-/* Enumerations */
-/*--------------*/
-
-/** \enum apConn_connRequest_e
- * \brief	Connect to AP request types
- * 
- * \par Description
- * Lists the possible types of connection to AP requests 
- * 
- * \sa
- */
-typedef enum
-{
-/*	0	*/	AP_CONNECT_RETAIN_CURR_AP, 	 	/**< Remain connected to the current AP without authentication.
-											* Give-up on roaming, return to current AP without performing re-connection 
-											*/
-/*	1	*/	AP_CONNECT_RECONNECT_CURR_AP,   /**< Reconnect to the current AP with fast authentication.
-											* Perform roaming - connect to AP, registered as current AP 
-											*/
-/*	2	*/	AP_CONNECT_FAST_TO_AP,          /**< Roam to AP with fast authentication.
-											* Perform roaming - re-connect to new AP via RE-Assoc, parameters attached 
-											*/
-/*	3	*/	AP_CONNECT_FULL_TO_AP           /**< Roam to AP with full authentication.
-											* Perform full connection - connect to new AP via Assoc, parameters attached 
-											*/
-
-} apConn_connRequest_e;
-
-/** \enum apConn_roamingTrigger_e
- * \brief	Roaming Triggers Types
- * 
- * \par Description
- * Lists the possible types of roaming triggers
- * 
- * \sa
- */
-typedef enum
-{
-/*	0	*/	ROAMING_TRIGGER_NONE,							/**< No roaming trigger	*/
-
-/*	1	*/	ROAMING_TRIGGER_LOW_QUALITY_FOR_BG_SCAN,		/**< Low quality trigger for background scan	*/
-/*	2	*/	ROAMING_TRIGGER_NORMAL_QUALITY_FOR_BG_SCAN,		/**< Normal quality trigger for background scan	*/
-
-/*	3	*/	ROAMING_TRIGGER_LOW_TX_RATE,					/**< Low TX rate	*/
-/*	4	*/	ROAMING_TRIGGER_LOW_SNR,						/**< Low SNR rate 	*/
-/*	5	*/	ROAMING_TRIGGER_LOW_QUALITY,					/**< Low quality for roaming	*/
-
-/*	6	*/	ROAMING_TRIGGER_MAX_TX_RETRIES,					/**< Maximum TX retries	*/
-/*	7	*/	ROAMING_TRIGGER_BSS_LOSS,						/**< Missed beacon and no ACK on Unicast probe requests	*/
-/*	8	*/	ROAMING_TRIGGER_SWITCH_CHANNEL,					/**< Radar detection	*/
-
-/*	9	*/	ROAMING_TRIGGER_AP_DISCONNECT, 					/**< AP disconnect (de-authenticate or disassociate)	*/
-/*	10	*/	ROAMING_TRIGGER_SECURITY_ATTACK,				/**< Security attack	*/
-/*	11	*/	ROAMING_TRIGGER_TSPEC_REJECTED,	                /**< TSPEC Rejected	*/
-    
-/*	12	*/	ROAMING_TRIGGER_LAST							/**< Maximum roaming trigger - must be last!!!	*/
-
-} apConn_roamingTrigger_e;
-
-/** \enum apConn_connStatus_e
- * \brief	Connection Status Types
- * 
- * \par Description
- * Lists the possible types of connection status
- * 
- * \sa
- */
-typedef enum
-{
-/*	0	*/	CONN_STATUS_CONNECTED,				/**< */
-/*	1	*/	CONN_STATUS_NOT_CONNECTED,			/**< */
-/*	2	*/	CONN_STATUS_HANDOVER_FAILURE,		/**< */
-/*	3	*/	CONN_STATUS_HANDOVER_SUCCESS,		/**< */
-
-/*	4	*/	CONN_STATUS_LAST					/**< Maximum connection status - must be last!!!	*/
-
-} apConn_connStatus_e;
-
-/** \enum REG_DOMAIN_CAPABILITY
- * \brief	Regulatory Domain Capability  
- * 
- * \par Description
- * 
- * \sa
- */
-typedef enum
-{
-/*	0	*/	REG_DOMAIN_FIXED,	/**< */
-/*	1	*/	REG_DOMAIN_80211D,	/**< */  	  
-/*	2	*/	REG_DOMAIN_80211H	/**< */
-
-} REG_DOMAIN_CAPABILITY;
-
-
-/*----------*/
-/* Typedefs */
-/*----------*/
-/**
- * \brief	Roaming Manager callback type 
- * 
- * \param  hRoamingMngr	- Handle to Roaming Manager Object
- * \param  pData		- Pointer to Data
- * \return void 
- * 
- * \par Description
- *
- * 
- * \sa 	
- */ 
-typedef TI_STATUS (*apConn_roamMngrCallb_t) (TI_HANDLE hRoamingMngr, void *pData);
-
-typedef TI_STATUS (*apConn_roamMngrEventCallb_t) (TI_HANDLE hRoamingMngr, void *pData, TI_UINT16 reasonCode);
-
-/*------------*/
-/* Structures */
-/*------------*/
-
-/** \struct apConn_staCapabilities_t
- * \brief Station Capabilities
- * 
- * \par Description
- * Holds a Station Capabilities.
- * Used by the roaming manager when the capabilities of a new AP 
- * are transferred to the AP connection module
- * 
- * \sa	
- */
-typedef struct _apConn_staCapabilities_t
-{
-    OS_802_11_AUTHENTICATION_MODE   	authMode; 			/**< Authentication Mode: None, Shared, AutoSwitch, WPA, WPAPSK, WPANone, WPA2, WPA2PSK	*/     
-    OS_802_11_ENCRYPTION_TYPES      	encryptionType; 	/**< Encription Type: None, WEP, TKIP, AES */    
-    OS_802_11_NETWORK_TYPE          	networkType;  		/**< Network Type: 2.4G, 5G or Dual	*/    
-    OS_802_11_RATES_EX              	rateMask;  			/**< An array of 16 octets. Each octet contains a preferred data rate in units of 0.5 Mbps */    
-    TI_BOOL                            	XCCEnabled; 		/**< TI_TRUE - XCC enabled, TI_FALSE - XCC disabled	*/    
-    TI_BOOL                            	qosEnabled; 		/**< TI_TRUE - QOS enabled, TI_FALSE - QOS disabled */   
-    REG_DOMAIN_CAPABILITY           	regDomain;  		/**< Fixed, 802.11D, 802.11H */
-
-} apConn_staCapabilities_t;
-
-/** \struct apConn_connStatus_t
- * \brief	Connection Status 
- * 
- * \par Description
- * Holds the Report Status of the Connection and a buffer for the case 
- * of vendor specific IEs in Association Response Packet
- * 
- * \sa	
- */
-typedef struct _apConn_connStatus_t
-{
-    apConn_connStatus_e     		status;         /** Reported status of the connection */
-    TI_UINT32                  		dataBufLength;  /** (Optional) length of attached buffer */
-    TI_CHAR                    		*dataBuf;       /** (Optional) attached buffer - can be used in case of vendor specific IEs in Association Response Packet */
-} apConn_connStatus_t;
-
-/** \struct apConn_connRequest_t
- * \brief	Connection Request 
- * 
- * \par Description
- * Holds the Type of Request needed to establish the Connection, 
- * and a buffer for the case of vendor specific IEs in Association Request Packet
- * 
- * \sa	
- */
-typedef struct _apConn_connRequest_t
-{
-    apConn_connRequest_e    		requestType;    /** Type of Request to establish connection */
-    TI_UINT32                  		dataBufLength;  /** (Optional) length of attached buffer */
-    TI_CHAR                    		*dataBuf;       /** (Optional) attached buffer - can be used in case of vendor specific IEs in Association Request Packet */
-} apConn_connRequest_t;
-
-
-typedef enum
-{
-	ReAssoc = 0
-	/* The methods below are for 11r support only
-	FT_initial_ReAssoc,
-    FT_over_the_air,
-    FT_over_DS */
-} ETransitionMethod;
-
-
-typedef struct _TargetAP_t
-{
-    apConn_connRequest_t    connRequest;
-	ETransitionMethod 	    transitionMethod;
-	bssEntry_t		        newAP;
-} TargetAp_t;
-
-/*---------------------------*/
-/* External data definitions */
-/*---------------------------*/
-
-/*--------------------------------*/
-/* External functions definitions */
-/*--------------------------------*/
-
-/*---------------------*/
-/* Function prototypes */
-/*---------------------*/
-/**
- * \brief	Configure Roaming Thresholds
- * 
- * \param  hAPConnection   	- Handle to AP Connection module object
- * \param  pParam  			- Pointer to input Roaming event thresholds to configure 
- * \return TI_OK on success
- * 
- * \par Description
- * This function is used for configuring Roaming Thesholds: 
- * it is called by Roaming Manager when the application sets roaming thresholds
- * 
- * \sa
- */
-TI_STATUS apConn_setRoamThresholds(TI_HANDLE hAPConnection, roamingMngrThresholdsConfig_t *pParam);
-/**
- * \brief	Get Roaming Thresholds configuration
- * 
- * \param  hAPConnection   	- Handle to AP Connection module object
- * \param  pParam  			- Pointer to output Roaming event thresholds configuration to get 
- * \return TI_OK on success
- * 
- * \par Description
- * This function is used for getting current Roaming Thesholds configuration: 
- * it is called by Roaming Manager when the application gets roaming thresholds
- * 
- * \sa
- */
-TI_STATUS apConn_getRoamThresholds(TI_HANDLE hAPConnection, roamingMngrThresholdsConfig_t *pParam);
-/**
- * \brief	Register Roaming Manager Callbacks
- * 
- * \param  hAPConnection   			- Handle to AP Connection module object
- * \param  roamEventCallb  			- Pointer to input Roaming event callback 
- * \param  reportStatusCallb  		- Pointer to input Connection status callback 
- * \param  returnNeighborApsCallb  	- Pointer to input Neighbor AP callback 
- * \return TI_OK on success
- * 
- * \par Description
- * This function stores the roaming manager methods in the internal database of the AP connection module
- * 
- * \sa
- */
-TI_STATUS apConn_registerRoamMngrCallb(TI_HANDLE hAPConnection, 
-                                       apConn_roamMngrEventCallb_t  roamEventCallb,
-                                       apConn_roamMngrCallb_t       reportStatusCallb,
-                                       apConn_roamMngrCallb_t       returnNeighborApsCallb);
-/**
- * \brief	Un-Register Roaming Manager Callbacks
- * 
- * \param  hAPConnection   	- Handle to AP Connection module object
- * \return TI_OK on success
- * 
- * \par Description
- * This function erases the roaming manager methods from the internal database of the AP connection module. 
- * From the moment this function was called, any roaming event would cause disconnect.
- * 
- * \sa
- */
-TI_STATUS apConn_unregisterRoamMngrCallb(TI_HANDLE hAPConnection);
-/**
- * \brief	AP-Connection disconnect  
- * 
- * \param  hAPConnection   	- Handle to AP Connection module object
- * \return TI_OK on success
- * 
- * \par Description
- * Roaming Manager calls this function when it fails to find a candidate 
- * for roaming and connection with the current AP is not possible
- * 
- * \sa
- */
-TI_STATUS apConn_disconnect(TI_HANDLE hAPConnection);
-/**
- * \brief	Get Station Capabilities  
- * 
- * \param  hAPConnection   	- Handle to AP Connection module object
- * \param  ie_list   		- Pointer to output list of STA Capabilities
- * \return TI_OK on success
- * 
- * \par Description
- * Roaming Manager calls this function during selection of new candidate for roaming.
- * The local STA capabilities (IEs) of quality and privacy, which are required for 
- * evaluating AP sites suitable for roaming, are returned.
- * 
- * \sa
- */
-TI_STATUS apConn_getStaCapabilities(TI_HANDLE hAPConnection,
-                                    apConn_staCapabilities_t *ie_list);
-
-/**
- * \brief	Connect to New AP
- * 
- * \param  hAPConnection   	- Handle to AP Connection module object
- * \param  newAP   			- Pointer to input parameters list of AP candidates for roaming
- * \param  request   		- The Connection Request Type: Connect to new AP, current AP (retain to current AP or re-connect)
- * \param  reNegotiateTspec	- Set to TRUE before handover if requested by roaming manager
- * \return TI_OK on success
- * 
- * \par Description
- * Roaming Manager calls this function when it has completed the process of selection a new AP candidate for roaming. 
- * In addition, the Roaming manager informs the AP Connection module whether this is new AP or the current one, 
- * and whether to perform full roaming procedure or just to retain to current AP.
- * Precondition: ready for roaming
- * 
- * \Note
- * Calling this function with the parameter RETAIN_CURR_AP terminates the roaming process at the stage when the driver 
- * resources are occupied for roaming, but the connection with the current AP is still valid
- * \sa
- */
-TI_STATUS apConn_connectToAP(TI_HANDLE hAPConnection,
-                             bssEntry_t *newAP,
-                             apConn_connRequest_t *request,
-                             TI_BOOL reNegotiateTspec);
-
-/**
- * \brief	Connect to New AP
- * 
- * \param  hAPConnection   	- Handle to AP Connection module object
- * \return Pointer to BSS entry parameters if successful, NULL otherwise
- * 
- * \par Description
- * Roaming Manager calls this function in order to evaluate the quality of new
- * AP candidates for roaming against the quality of current AP.
- * The function returns parameters of current AP.
- * 
- * \sa
- */
-bssEntry_t *apConn_getBSSParams(TI_HANDLE hAPConnection);
-/**
- * \brief	Check if Site is Banned
- * 
- * \param  hAPConnection   	- Handle to AP Connection module object
- * \param  bssid   			- Pointer to input BSSID (MAC Address) of checked site
- * \return True if the site is banned and Falde otherwise 
- * 
- * \par Description
- * Roaming Manager calls this function during selection of new candidate for roaming.
- * Only APs which are not marked as banned are allowed to be selected. 
- * 
- * \sa
- */
-TI_BOOL apConn_isSiteBanned(TI_HANDLE hAPConnection, TMacAddr * bssid);
-/**
- * \brief	Get AP Pre-Authentication Status
- * 
- * \param  hAPConnection   	- Handle to AP Connection module object
- * \param  givenAp   		- Pointer to input BSSID (MAC Address) of checked AP
- * \return True if AP is pre-authenticated, False otherwise
- * 
- * \par Description
- * Roaming Manager calls this function during selection of new candidate for roaming.
- * Among all candidate APs of acceptable quality that are not neighbor APs, 
- * pre-authenticated APs are preferred.
- * The function returns the status of the AP, whether or not it is pre-authenticated. 
- * 
- * 
- * \sa
- */
-TI_BOOL apConn_getPreAuthAPStatus(TI_HANDLE hAPConnection, TMacAddr *givenAp);
-/**
- * \brief	Update Pre-Authentication APs List
- * 
- * \param  hAPConnection   	- Handle to AP Connection module object
- * \param  listAPs   		- Pointer to List of APs to pre-authenticate
- * \return TI_OK if the parameter was set successfully, TI_NOK otherwise
- * 
- * \par Description
- * Roaming Manager calls this function periodically in order to update the list
- * of pre-authenticated APs. The list is managed by WLAN driver and required
- * by Roaming Manager during selection of roaming candidate process.  
- * 
- * \sa
- */
-TI_STATUS apConn_preAuthenticate(TI_HANDLE hAPConnection, bssList_t *listAPs);
-/**
- * \brief	Prepare to Roaming
- * 
- * \param  hAPConnection   	- Handle to AP Connection module object
- * \param  reason   		- The reason for Roaming trigger
- * \return TI_OK if the parameter was set successfully, TI_NOK otherwise
- * 
- * \par Description
- * This function indicate the driver that Roaming process is starting. 
- * The roaming manager calls this function when roaming event 
- * is received and Roaming Manager wishes to start the roaming process, thus wants to 
- * prevent scan and measurement in the system. 
- * The function will return TI_OK if the allocation is performed, PEND if the allocation is started, 
- * TI_NOK in case the allocation is not possible. In case of successful allocation, 
- * Roaming Manager will be informed via callback about the end of the allocation. 
- * The roaming manager can initiate an immediate scan or call to connect to an AP only 
- * after prepare-to-roam is complete 
- * 
- * \sa
- */
-
-TI_STATUS apConn_prepareToRoaming(TI_HANDLE hAPConnection, apConn_roamingTrigger_e reason);
-
-TI_STATUS apConn_getAssocRoamingTrigger(TI_HANDLE hAPConnection, apConn_roamingTrigger_e *asssocRoamingTrigger);
-
-#endif /*  _AP_CONNECTION_API_H_*/
-
diff --git a/wl1271/stad/src/Connection_Managment/broadcastKey802_1x.c b/wl1271/stad/src/Connection_Managment/broadcastKey802_1x.c
deleted file mode 100644
index d1a2d69..0000000
--- a/wl1271/stad/src/Connection_Managment/broadcastKey802_1x.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * broadcastKey802_1x.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file broadcastKey802_1x.c
- * \brief broadcast key 802.1x implementation
- *
- * \see broadcastKey802_1x.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	802.1x station broadcast key SM                             *
- *   PURPOSE:   802.1x station broadcast key SM implementation				*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_22
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-
-#include "keyDerive.h"
-
-#include "broadcastKey802_1x.h"
-#include "mainKeysSm.h"
-
-
-TI_STATUS broadcastKey802_1x_start(struct _broadcastKey_t *pBroadcastKey);
-
-TI_STATUS broadcastKey802_1x_stop(struct _broadcastKey_t *pBroadcastKey);
-
-TI_STATUS broadcastKey802_1x_recvSuccess(struct _broadcastKey_t *pBroadcastKey, 
-									encodedKeyMaterial_t *pEncodedKeyMaterial);
-
-TI_STATUS broadcastKey802_1x_recvFailure(struct _broadcastKey_t *pBroadcastKey);
-
-TI_STATUS broadcastKey802_1x_distribute(struct _broadcastKey_t *pBroadcastKey);
-
-TI_STATUS broadcastKey802_1x_redistribute(struct _broadcastKey_t *pBroadcastKey);
-
-TI_STATUS broadcastKey802_1x_event(struct _broadcastKey_t *pBroadcastKey,
-							  TI_UINT8 event, 
-							  void *pData);
-
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_BroadcastKeyRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS broadcastKey802_1x_config(struct _broadcastKey_t *pBroadcastKey)
-{
-	TI_STATUS		status = TI_NOK;
-	
-	/** Station broadcast key State Machine matrix */
-	fsm_actionCell_t    broadcastKey802_1x_matrix[BCAST_KEY_802_1X_NUM_STATES][BCAST_KEY_802_1X_NUM_EVENTS] =
-	{
-		/* next state and actions for IDLE state */
-		{	{BCAST_KEY_802_1X_STATE_START, (fsm_Action_t)broadcastKeySmNop},
-			{BCAST_KEY_802_1X_STATE_IDLE, (fsm_Action_t)broadcastKeySmNop},
-			{BCAST_KEY_802_1X_STATE_IDLE, (fsm_Action_t)broadcastKeySmNop},
-			{BCAST_KEY_802_1X_STATE_IDLE, (fsm_Action_t)broadcastKeySmUnexpected}
-		},
-	
-		/* next state and actions for START state */
-		{	{BCAST_KEY_802_1X_STATE_START, (fsm_Action_t)broadcastKeySmUnexpected},
-			{BCAST_KEY_802_1X_STATE_IDLE, (fsm_Action_t)broadcastKeySmNop},
-			{BCAST_KEY_802_1X_STATE_COMPLETE, (fsm_Action_t)broadcastKey802_1x_distribute},
-			{BCAST_KEY_802_1X_STATE_START, (fsm_Action_t)broadcastKeySmNop}
-		},
-	
-		/* next state and actions for COMPLETE state */
-		{	{BCAST_KEY_802_1X_STATE_COMPLETE, (fsm_Action_t)broadcastKeySmUnexpected},
-			{BCAST_KEY_802_1X_STATE_IDLE, (fsm_Action_t)broadcastKeySmNop},
-			{BCAST_KEY_802_1X_STATE_COMPLETE, (fsm_Action_t)broadcastKey802_1x_distribute},
-			{BCAST_KEY_802_1X_STATE_COMPLETE, (fsm_Action_t)broadcastKeySmUnexpected}
-		}
-	};
-
-
-	pBroadcastKey->start = broadcastKey802_1x_start;
-	pBroadcastKey->stop = broadcastKey802_1x_stop;
-	pBroadcastKey->recvFailure = broadcastKey802_1x_recvFailure;
-	pBroadcastKey->recvSuccess = broadcastKey802_1x_recvSuccess;
-
-	pBroadcastKey->currentState = BCAST_KEY_802_1X_STATE_IDLE;
-
-	status = fsm_Config(pBroadcastKey->pBcastKeySm, 
-						&broadcastKey802_1x_matrix[0][0], 
-						BCAST_KEY_802_1X_NUM_STATES, 
-						BCAST_KEY_802_1X_NUM_EVENTS, 
-						NULL, pBroadcastKey->hOs);
-
-
-
-	return status;
-}
-
-
-/**
-*
-* broadcastKey802_1x_event
-*
-* \b Description: 
-*
-* broadcast key state machine transition function
-*
-* \b ARGS:
-*
-*  I/O - currentState - current state in the state machine\n
-*  I   - event - specific event for the state machine\n
-*  I   - pData - Data for state machine action function\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS broadcastKey802_1x_event(struct _broadcastKey_t *pBroadcastKey, TI_UINT8 event, void *pData)
-{
-	TI_STATUS 		status;
-	TI_UINT8			nextState;
-
-	status = fsm_GetNextState(pBroadcastKey->pBcastKeySm, pBroadcastKey->currentState, event, &nextState);
-	if (status != TI_OK)
-	{
-TRACE0(pBroadcastKey->hReport, REPORT_SEVERITY_ERROR, "BROADCAST_KEY_SM: ERROR: failed getting next state\n");
-		return TI_NOK;
-	}
-
-TRACE3(pBroadcastKey->hReport, REPORT_SEVERITY_INFORMATION, "STATION_BROADCAST_KEY_SM: <currentState = %d, event = %d> --> nextState = %d\n", pBroadcastKey->currentState, event, nextState);
-
-	status = fsm_Event(pBroadcastKey->pBcastKeySm, &pBroadcastKey->currentState, event, pData);
-
-	return status;
-}
-
-
-/**
-*
-* broadcastKey802_1x_start
-*
-* \b Description: 
-*
-* START event handler
-*
-* \b ARGS:
-*
-*  I   - pCtrlB - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa broadcastKey802_1x_stop()
-*/
-TI_STATUS broadcastKey802_1x_start(struct _broadcastKey_t *pBroadcastKey)
-{
-	TI_STATUS  status;
-	
-	status = broadcastKey802_1x_event(pBroadcastKey, BCAST_KEY_802_1X_EVENT_START, pBroadcastKey);
-
-	return status;
-}
-
-
-/**
-*
-* broadcastKey802_1x_stop
-*
-* \b Description: 
-*
-* START event handler
-*
-* \b ARGS:
-*
-*  I   - pCtrlB - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa broadcastKey802_1x_start()
-*/
-TI_STATUS broadcastKey802_1x_stop(struct _broadcastKey_t *pBroadcastKey)
-{
-	TI_STATUS  status;
-
-	status = broadcastKey802_1x_event(pBroadcastKey, BCAST_KEY_802_1X_EVENT_STOP, pBroadcastKey);
-
-	return status;
-}
-
-
-/**
-*
-* broadcastKey802_1x_recvSuccess
-*
-* \b Description: 
-*
-* SUCCESS event handler
-*
-* \b ARGS:
-*
-*  I   - pCtrlB - station control block  \n
-*  I   - pEncodedKeyMaterial - Encoded key material \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-*/
-TI_STATUS broadcastKey802_1x_recvSuccess(struct _broadcastKey_t *pBroadcastKey, encodedKeyMaterial_t *pEncodedKeyMaterial)
-{
-	TI_STATUS  status;
-
-	pBroadcastKey->data.pEncodedKeyMaterial = pEncodedKeyMaterial;
-
-	status = broadcastKey802_1x_event(pBroadcastKey, BCAST_KEY_802_1X_EVENT_SUCCESS, pBroadcastKey);
-
-	return status;
-}
-
-
-/**
-*
-* broadcastKey802_1x_recvFailure
-*
-* \b Description: 
-*
-* FAILURE event handler
-*
-* \b ARGS:
-*
-*  I   - pCtrlB - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-*/
-TI_STATUS broadcastKey802_1x_recvFailure(struct _broadcastKey_t *pBroadcastKey)
-{
-	TI_STATUS  status;
-	
-	status = broadcastKey802_1x_event(pBroadcastKey, BCAST_KEY_802_1X_EVENT_FAILURE, pBroadcastKey);
-
-	return status;
-}
-
-
-/**
-*
-* broadcastKey802_1x_distribute
-*
-* \b Description: 
-*
-* Distribute broadcast key material to the driver and report the main key SM on broadcast complete.
-*
-* \b ARGS:
-*
-*  I   - pData - Encoded key material  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS broadcastKey802_1x_distribute(struct _broadcastKey_t *pBroadcastKey)
-{
-	TI_STATUS  status=TI_NOK;
-	
-	if (pBroadcastKey->pKeyDerive->derive!=NULL)
-    {
-	status = pBroadcastKey->pKeyDerive->derive(pBroadcastKey->pKeyDerive, 
-											   pBroadcastKey->data.pEncodedKeyMaterial);
-    }
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	if (pBroadcastKey->pParent->reportBcastStatus!=NULL)
-    {
-	status = pBroadcastKey->pParent->reportBcastStatus(pBroadcastKey->pParent, TI_OK);
-    }
-
-	mainKeys_reAuth(pBroadcastKey->pParent);
-
-	return status;
-}
-
diff --git a/wl1271/stad/src/Connection_Managment/broadcastKey802_1x.h b/wl1271/stad/src/Connection_Managment/broadcastKey802_1x.h
deleted file mode 100644
index 3d37510..0000000
--- a/wl1271/stad/src/Connection_Managment/broadcastKey802_1x.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * broadcastKey802_1x.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file broadcastKeySM.h
- *  \brief station broadcast key SM API
- *
- *  \see broadcastKeySM.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  station broadcast key SM	                                	*
- *   PURPOSE: station broadcast key SM API		                            *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _BROADCAST_KEY_802_1X_H
-#define _BROADCAST_KEY_802_1X_H
-
-#include "paramOut.h"
-#include "fsm.h"
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-#include "broadcastKeySM.h"
-
-/* Constants */
-/** number of states in the state machine */
-#define	BCAST_KEY_802_1X_NUM_STATES		3
-
-/** number of events in the state machine */
-#define	BCAST_KEY_802_1X_NUM_EVENTS		4
-
-/* Enumerations */
-
-/** state machine states */
-typedef enum 
-{
-	BCAST_KEY_802_1X_STATE_IDLE                  = 0,
-	BCAST_KEY_802_1X_STATE_START                 = 1,
-	BCAST_KEY_802_1X_STATE_COMPLETE              = 2
-} broadcastKey802_1x_smStates;
-
-/** State machine events */
-typedef enum 
-{
-	BCAST_KEY_802_1X_EVENT_START                  = 0,
-	BCAST_KEY_802_1X_EVENT_STOP                   = 1,
-	BCAST_KEY_802_1X_EVENT_SUCCESS                = 2,
-	BCAST_KEY_802_1X_EVENT_FAILURE				  = 3
-} broadcastKey802_1x_smEvents;
-
-/* Enumerations */
-
-/* Typedefs */
-
-
-/* Structures */
-
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS broadcastKey802_1x_config(broadcastKey_t *pBroadcastKey);
-
-
-#endif /*  _BROADCAST_KEY_802_1X_H*/
diff --git a/wl1271/stad/src/Connection_Managment/broadcastKeyNone.c b/wl1271/stad/src/Connection_Managment/broadcastKeyNone.c
deleted file mode 100644
index e14e740..0000000
--- a/wl1271/stad/src/Connection_Managment/broadcastKeyNone.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * broadcastKeyNone.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file broadcastKeyNone.c
- * \brief broadcast key None implementation
- *
- * \see broadcastKeyNone.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	None station broadcast key SM                             *
- *   PURPOSE:   None station broadcast key SM implementation				*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_23
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-
-#include "keyDerive.h"
-
-#include "broadcastKeyNone.h"
-#include "mainKeysSm.h"
-
-
-
-TI_STATUS broadcastKeyNone_distribute(struct _broadcastKey_t *pBroadcastKey, encodedKeyMaterial_t *pEncodedKeyMaterial);
-TI_STATUS broadcastKeyNone_start(struct _broadcastKey_t *pBroadcastKey);
-
-
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_BroadcastKeyRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS broadcastKeyNone_config(struct _broadcastKey_t *pBroadcastKey)
-{
-
-	pBroadcastKey->start = broadcastKeyNone_start;
-	pBroadcastKey->stop = broadcastKeySmNop;
-	pBroadcastKey->recvFailure = broadcastKeySmNop;
-	pBroadcastKey->recvSuccess = broadcastKeyNone_distribute;
-
-	pBroadcastKey->currentState = 0;
-
-	return TI_OK;
-}
-
-
-/**
-*
-* broadcastKeyNone_start
-*
-* \b Description: 
-*
-* report the main key SM of broadcast complete, whithout wating for keys.
-*
-* \b ARGS:
-*
-*  I   - pBroadcastKey - context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS broadcastKeyNone_start(struct _broadcastKey_t *pBroadcastKey)
-{
-	TI_STATUS	status=TI_NOK;
-
-	if (pBroadcastKey->pParent->reportBcastStatus!=NULL)
-    {
-		status = pBroadcastKey->pParent->reportBcastStatus(pBroadcastKey->pParent, TI_OK);
-    }
-
-	return status;
-}
-
-/**
-*
-* broadcastKeyNone_distribute
-*
-* \b Description: 
-*
-* Distribute broadcast key material to the driver and report the main key SM on broadcast complete.
-*
-* \b ARGS:
-*
-*  I   - pData - Encoded key material  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS broadcastKeyNone_distribute(struct _broadcastKey_t *pBroadcastKey, encodedKeyMaterial_t *pEncodedKeyMaterial)
-{
-	TI_STATUS  status=TI_NOK;
-	
-	if (pBroadcastKey->pKeyDerive->derive!=NULL)
-    {
-        status = pBroadcastKey->pKeyDerive->derive(pBroadcastKey->pKeyDerive, 
-                                                   pEncodedKeyMaterial);
-    }
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	if (pBroadcastKey->pParent->reportBcastStatus!=NULL)
-    {
-        status = pBroadcastKey->pParent->reportBcastStatus(pBroadcastKey->pParent, TI_OK);
-    }
-
-	return status;
-}
-
diff --git a/wl1271/stad/src/Connection_Managment/broadcastKeyNone.h b/wl1271/stad/src/Connection_Managment/broadcastKeyNone.h
deleted file mode 100644
index 8783f14..0000000
--- a/wl1271/stad/src/Connection_Managment/broadcastKeyNone.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * broadcastKeyNone.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file broadcastKeyNone.h
- *  \brief station broadcast key None API
- *
- *  \see broadcastKeySM.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  station broadcast key SM	                                	*
- *   PURPOSE: station broadcast key SM API		                            *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _BROADCAST_KEY_NONE_H
-#define _BROADCAST_KEY_NONE_H
-
-#include "paramOut.h"
-#include "fsm.h"
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-#include "broadcastKeySM.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-
-/* Structures */
-
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS broadcastKeyNone_config(broadcastKey_t *pBroadcastKey);
-
-
-#endif /*  _BROADCAST_KEY_NONE_H*/
diff --git a/wl1271/stad/src/Connection_Managment/broadcastKeySM.c b/wl1271/stad/src/Connection_Managment/broadcastKeySM.c
deleted file mode 100644
index 07172fd..0000000
--- a/wl1271/stad/src/Connection_Managment/broadcastKeySM.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * broadcastKeySM.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file broadcastKeySM.c
- * \brief broadcast key SM implementation
- *
- * \see broadcastKeySM.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	broadcast key SM                               *
- *   PURPOSE:   broadcast key SM implementation				*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_24
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-
-#include "keyDerive.h"
-
-#include "broadcastKeySM.h"
-#include "broadcastKey802_1x.h"
-#include "broadcastKeyNone.h"
-
-/** number of states in the state machine */
-#define	BCAST_KEY_MAX_NUM_STATES		3
-
-/** number of events in the state machine */
-#define	BCAST_KEY_MAX_NUM_EVENTS		4
-
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_BroadcastKeyRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-broadcastKey_t* broadcastKey_create(TI_HANDLE hOs)
-{
-	TI_STATUS				status;
-	broadcastKey_t 		*pBroadcastKey;
-
-	/* allocate key parser context memory */
-	pBroadcastKey = (broadcastKey_t*)os_memoryAlloc(hOs, sizeof(broadcastKey_t));
-	if (pBroadcastKey == NULL)
-	{
-		return NULL;
-	}
-
-	os_memoryZero(hOs, pBroadcastKey, sizeof(broadcastKey_t));
-
-	/* allocate memory for association state machine */
-	status = fsm_Create(hOs, &pBroadcastKey->pBcastKeySm, BCAST_KEY_MAX_NUM_STATES, BCAST_KEY_MAX_NUM_EVENTS);
-	if (status != TI_OK)
-	{
-		os_memoryFree(hOs, pBroadcastKey, sizeof(broadcastKey_t));
-		return NULL;
-	}
-
-	pBroadcastKey->pKeyDerive = keyDerive_create(hOs);
-	if (pBroadcastKey->pKeyDerive == NULL)
-	{
-		fsm_Unload(hOs, pBroadcastKey->pBcastKeySm);
-		os_memoryFree(hOs, pBroadcastKey, sizeof(broadcastKey_t));
-		return NULL;
-	}
-
-	pBroadcastKey->hOs = hOs;
-
-	return pBroadcastKey;
-}
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_BroadcastKeyRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS broadcastKey_unload(struct _broadcastKey_t *pBroadcastKey)
-{
-	TI_STATUS		status;
-
-	status = keyDerive_unload(pBroadcastKey->pKeyDerive);
-                    
-	if (status != TI_OK)
-	{
-        TRACE0(pBroadcastKey->hReport, REPORT_SEVERITY_CONSOLE, "BCAST_KEY_SM: Error in unloading key derivation module\n");
-		WLAN_OS_REPORT(("BCAST_KEY_SM: Error in unloading key derivation module\n"));
-	}
-
-	status = fsm_Unload(pBroadcastKey->hOs, pBroadcastKey->pBcastKeySm);
-	if (status != TI_OK)
-	{
-        TRACE0(pBroadcastKey->hReport, REPORT_SEVERITY_CONSOLE, "BCAST_KEY_SM: Error in unloading state machine\n");
-		WLAN_OS_REPORT(("BCAST_KEY_SM: Error in unloading state machine\n"));
-	}
-
-	/* free key parser context memory */
-	os_memoryFree(pBroadcastKey->hOs, pBroadcastKey, sizeof(broadcastKey_t));
-
-	return TI_OK;
-}
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_BroadcastKeyRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS broadcastKey_config(struct _broadcastKey_t *pBroadcastKey,
-                              TRsnPaeConfig *pPaeConfig,
-                              struct _mainKeys_t *pParent,
-                              TI_HANDLE hReport,
-                              TI_HANDLE hOs)
-{
-	TI_STATUS		status = TI_NOK;
-
-	pBroadcastKey->hReport = hReport;
-	pBroadcastKey->hOs = hOs;
-	pBroadcastKey->pParent = pParent;
-
-	/* configure according to the keyMng suite and cipher suite */
-	switch (pPaeConfig->keyExchangeProtocol)
-	{
-	case RSN_KEY_MNG_NONE:
-		status = broadcastKeyNone_config(pBroadcastKey);
-		break;
-	case RSN_KEY_MNG_802_1X:
-		if (pPaeConfig->broadcastSuite == TWD_CIPHER_NONE)
-		{
-			status = broadcastKeyNone_config(pBroadcastKey);
-		} else {
-			status = broadcastKey802_1x_config(pBroadcastKey);
-		}
-		break;
-    default:
-		status = broadcastKeyNone_config(pBroadcastKey);
-		break;
-	}
-
-	status = keyDerive_config(pBroadcastKey->pKeyDerive, pPaeConfig->broadcastSuite, pParent, hReport, hOs);
-
-	return status;
-}
-
-
-TI_STATUS broadcastKeySmUnexpected(struct _broadcastKey_t *pBroadcastKey)
-{
-TRACE0(pBroadcastKey->hReport, REPORT_SEVERITY_ERROR, "BROADCAST_KEY_SM: ERROR: UnExpected Event\n");
-
-	return(TI_NOK);
-}
-
-TI_STATUS broadcastKeySmNop(struct _broadcastKey_t *pBroadcastKey)
-{
-	return(TI_OK);
-}
-
diff --git a/wl1271/stad/src/Connection_Managment/broadcastKeySM.h b/wl1271/stad/src/Connection_Managment/broadcastKeySM.h
deleted file mode 100644
index 2eca38f..0000000
--- a/wl1271/stad/src/Connection_Managment/broadcastKeySM.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * broadcastKeySM.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file broadcastKeySM.h
- *  \brief station broadcast key SM API
- *
- *  \see broadcastKeySM.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  station broadcast key SM	                                	*
- *   PURPOSE: station broadcast key SM API		                            *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _BROADCAST_KEY_SM_H
-#define _BROADCAST_KEY_SM_H
-
-#include "paramOut.h"
-#include "fsm.h"
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-typedef struct _broadcastKey_t    broadcastKey_t;
-
-/* Main Sec SM functions */
-typedef TI_STATUS (*broadcastKeySmStart_t)(struct _broadcastKey_t *pBroadcastKey);
-typedef TI_STATUS (*broadcastKeySmStop_t)(struct _broadcastKey_t *pBroadcastKey);
-typedef TI_STATUS (*broadcastKeySmRecvSuccess_t)(struct _broadcastKey_t *pBroadcastKey, encodedKeyMaterial_t *pEncodedKeyMaterial);
-typedef TI_STATUS (*broadcastKeySmRecvFailure_t)(struct _broadcastKey_t *pBroadcastKey);
-
-/* Structures */
-
-/* State machine associated data structures. */
-typedef struct
-{
-	encodedKeyMaterial_t    *pEncodedKeyMaterial;
-} broadcastKeyData_t;
-
-struct _broadcastKey_t
-{
-	TI_UINT8                               currentState;
-	fsm_stateMachine_t	                *pBcastKeySm;
-    broadcastKeyData_t					data;
-
-    struct _mainKeys_t                 	*pParent;
-	struct _keyDerive_t					*pKeyDerive;
-	
-	TI_HANDLE			                hReport;
-	TI_HANDLE			                hOs;
-    
-    broadcastKeySmStart_t               start;
-    broadcastKeySmStop_t                stop;
-    broadcastKeySmRecvSuccess_t			recvSuccess;
-    broadcastKeySmRecvFailure_t			recvFailure;
-};
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-broadcastKey_t* broadcastKey_create(TI_HANDLE hOs);
-
-TI_STATUS broadcastKey_unload(broadcastKey_t *pBroadcastKey);
-
-TI_STATUS broadcastKey_config(broadcastKey_t *pBroadcastKey, 
-						   TRsnPaeConfig *pPaeConfig, 
-						   struct _mainKeys_t *pParent,
-						   TI_HANDLE hReport,
-						   TI_HANDLE hOs);
-
-TI_STATUS broadcastKeySmUnexpected(struct _broadcastKey_t *pBroadcastKey);
-
-TI_STATUS broadcastKeySmNop(struct _broadcastKey_t *pBroadcastKey);
-
-#endif /*  _BROADCAST_KEY_SM_H*/
diff --git a/wl1271/stad/src/Connection_Managment/conn.c b/wl1271/stad/src/Connection_Managment/conn.c
deleted file mode 100644
index f92f04e..0000000
--- a/wl1271/stad/src/Connection_Managment/conn.c
+++ /dev/null
@@ -1,724 +0,0 @@
-/*
- * conn.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file conn.c
- *  \brief connection module interface
- *
- *  \see conn.h
- */
-
-/****************************************************************************************************/
-/*																									*/
-/*		MODULE:		conn.c																			*/
-/*		PURPOSE:	Connection module interface. The connection	itself is implemented in the files	*/
-/*					connInfra, connIbss & connSelf. This file distributes the events received to 	*/
-/*					one of the modules based on the current connection type.						*/																 	
-/*																									*/
-/****************************************************************************************************/
-
-
-#define __FILE_ID__  FILE_ID_25
-#include "tidef.h"
-#include "report.h"
-#include "osApi.h"
-#include "timer.h"
-#include "conn.h"
-#include "connApi.h"
-#include "connIbss.h"
-#include "connInfra.h"
-#include "802_11Defs.h"
-#include "smeApi.h"
-#include "paramOut.h"
-#include "siteMgrApi.h"
-#include "sme.h"
-#include "scrApi.h"
-#include "healthMonitor.h"
-#include "qosMngr_API.h"
-#include "TWDriver.h"
-#include "DrvMainModules.h"
-
-
-/* Local functions prototypes */
-static void release_module(conn_t *pConn);
-
-static void conn_DisconnectComplete (conn_t *pConn, TI_UINT8  *data, TI_UINT8   dataLength);
-
-/************************************************************************
- *                        conn_create								*
- ************************************************************************
-DESCRIPTION: Connection module creation function, called by the config mgr in creation phase 
-				performs the following:
-				-	Allocate the connection handle
-				-	Create the connection timer
-				-	Create the connection state machine
-                                                                                                   
-INPUT:      hOs -			Handle to OS		
-
-
-OUTPUT:		
-
-RETURN:     Handle to the connection module on success, NULL otherwise
-
-************************************************************************/
-TI_HANDLE conn_create(TI_HANDLE hOs)
-{
-	conn_t *pConn;
-	fsm_stateMachine_t *pFsm;
-	TI_STATUS status;
-
-	pConn = os_memoryAlloc(hOs, sizeof(conn_t));
-	if (pConn == NULL)
-	{
-		return NULL;
-	}
-	os_memoryZero (pConn->hOs, pConn, sizeof(conn_t));
-
-	/* Creating connection Ibss SM */
-	status = fsm_Create(hOs, &pFsm, CONN_IBSS_NUM_STATES, CONN_IBSS_NUM_EVENTS);
-	if (status != TI_OK)
-	{
-		release_module(pConn);
-		return NULL;
-	}
-	pConn->ibss_pFsm = pFsm;
-
-	/* Creating connection Infra SM */
-   	status = fsm_Create(hOs, &pFsm, CONN_INFRA_NUM_STATES, CONN_INFRA_NUM_EVENTS);
-	if (status != TI_OK)
-	{
-		release_module(pConn);
-		return NULL;
-	}
-	pConn->infra_pFsm = pFsm;
-
-	pConn->hOs = hOs;
-
-	return(pConn);
-}
-
-
-/************************************************************************
- *                        conn_config									*
- ************************************************************************
-DESCRIPTION: Connection module configuration function, called by the DrvMain in init phase.
-				performs the following:
-				-	Reset & initiailzes local variables
-				-	Init the handles to be used by the module
-                                                                                                   
-INPUT:      List of handles to be used by the module
-
-OUTPUT:		
-
-RETURN:     void
-
-************************************************************************/
-void conn_init (TStadHandlesList *pStadHandles)
-{
-	conn_t *pConn = (conn_t *)(pStadHandles->hConn);
-
-	pConn->state = 0;
-	os_memoryZero (pConn->hOs, &(pConn->smContext), sizeof(connSmContext_t)); 
-
-	pConn->hSiteMgr			= pStadHandles->hSiteMgr;
-	pConn->hSmeSm			= pStadHandles->hSme;
-	pConn->hMlmeSm			= pStadHandles->hMlmeSm;
-	pConn->hRsn				= pStadHandles->hRsn;
-	pConn->hRxData			= pStadHandles->hRxData;
-	pConn->hReport			= pStadHandles->hReport;
-	pConn->hOs				= pStadHandles->hOs;
-	pConn->hPwrMngr			= pStadHandles->hPowerMgr;
-	pConn->hCtrlData		= pStadHandles->hCtrlData;
-	pConn->hMeasurementMgr	= pStadHandles->hMeasurementMgr;
-	pConn->hTrafficMonitor  = pStadHandles->hTrafficMon;
-	pConn->hScr				= pStadHandles->hSCR;
-	pConn->hXCCMngr			= pStadHandles->hXCCMngr;
-	pConn->hQosMngr			= pStadHandles->hQosMngr;
-	pConn->hTWD		        = pStadHandles->hTWD;
-    pConn->hScanCncn        = pStadHandles->hScanCncn;
-	pConn->hCurrBss			= pStadHandles->hCurrBss;
-	pConn->hSwitchChannel	= pStadHandles->hSwitchChannel;
-	pConn->hEvHandler		= pStadHandles->hEvHandler;
-	pConn->hHealthMonitor	= pStadHandles->hHealthMonitor;
-	pConn->hTxMgmtQ		    = pStadHandles->hTxMgmtQ;
-    pConn->hRegulatoryDomain= pStadHandles->hRegulatoryDomain;
-    pConn->hTxCtrl          = pStadHandles->hTxCtrl;
-    pConn->hTimer           = pStadHandles->hTimer;
-	pConn->hSoftGemini		= pStadHandles->hSoftGemini;
-
-    TRACE0(pConn->hReport, REPORT_SEVERITY_INIT, ".....Connection configured successfully\n");
-}
-
-
-TI_STATUS conn_SetDefaults (TI_HANDLE 	hConn, connInitParams_t		*pConnInitParams)
-{
-    conn_t *pConn = (conn_t *)hConn;
-
-    pConn->timeout			   = pConnInitParams->connSelfTimeout;
-	pConn->connType			   = CONN_TYPE_FIRST_CONN;
-    pConn->ibssDisconnectCount = 0;
-
-	/* allocate OS timer memory */
-    pConn->hConnTimer = tmr_CreateTimer (pConn->hTimer);
-	if (pConn->hConnTimer == NULL)
-	{
-        TRACE0(pConn->hReport, REPORT_SEVERITY_ERROR, "conn_SetDefaults(): Failed to create hConnTimer!\n");
-		release_module (pConn);
-		return TI_NOK;
-	}
-	
-	TWD_RegisterEvent (pConn->hTWD,  
-                       TWD_OWN_EVENT_JOIN_CMPLT, 
-					   (void *)connInfra_JoinCmpltNotification, 
-                       pConn);
-
-	TWD_EnableEvent (pConn->hTWD, TWD_OWN_EVENT_JOIN_CMPLT);
-	
-	 /* Register for 'TWD_OWN_EVENT_DISCONNECT_COMPLETE' event */
-    TWD_RegisterEvent (pConn->hTWD, TWD_OWN_EVENT_DISCONNECT_COMPLETE, (void *)conn_DisconnectComplete, pConn);
-	TWD_EnableEvent (pConn->hTWD, TWD_OWN_EVENT_DISCONNECT_COMPLETE);
-
-	return TI_OK;
-}
-
-/************************************************************************
- *                        conn_unLoad									*
- ************************************************************************
-DESCRIPTION: Connection module unload function, called by the config mgr in the unlod phase 
-				performs the following:
-				-	Free all memory aloocated by the module
-                                                                                                   
-INPUT:      hConn	-	Connection handle.		
-
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS conn_unLoad(TI_HANDLE hConn)
-{
-	conn_t			*pConn = (conn_t *)hConn;
-
-	if (!pConn)
-    {
-		return TI_OK;
-    }
-
-	release_module(pConn);
-
-	return TI_OK;
-}
-
-/***********************************************************************
- *                        conn_setParam									
- ***********************************************************************
-DESCRIPTION: Connection set param function, called by the following:
-				-	config mgr in order to set a parameter from the OS abstraction layer.
-				-	Form inside the driver
-				In this fuction, the site manager configures the connection type in the select phase.
-				The connection type is used to distribute the connection events to the corresponding connection SM	
-                                                                                                   
-INPUT:      hConn	-	Connection handle.
-			pParam	-	Pointer to the parameter		
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS conn_setParam(TI_HANDLE		hConn, 
-					 paramInfo_t	*pParam)
-{
-	conn_t *pConn = (conn_t *)hConn;
-
-	switch(pParam->paramType)
-	{
-	case CONN_TYPE_PARAM:
-		pConn->currentConnType = pParam->content.connType;
-		switch (pParam->content.connType)
-		{
-		case CONNECTION_IBSS:
-		case CONNECTION_SELF:
-			return conn_ibssConfig(pConn);
-
-		case CONNECTION_INFRA:
-			return conn_infraConfig(pConn);
-
-		default:
-TRACE1(pConn->hReport, REPORT_SEVERITY_ERROR, "Set connection type, type is not valid, %d\n\n", pParam->content.connType);
-			return PARAM_VALUE_NOT_VALID;
-		}
-
-	case CONN_SELF_TIMEOUT_PARAM:
-		if ((pParam->content.connSelfTimeout < CONN_SELF_TIMEOUT_MIN) || (pParam->content.connSelfTimeout > CONN_SELF_TIMEOUT_MAX))
-			return PARAM_VALUE_NOT_VALID;
-		pConn->timeout = pParam->content.connSelfTimeout;
-		break;
-
-	default:
-TRACE1(pConn->hReport, REPORT_SEVERITY_ERROR, "Set param, Params is not supported, %d\n\n", pParam->paramType);
-		return PARAM_NOT_SUPPORTED;
-	}
-
-	return TI_OK;
-}
-
-/***********************************************************************
- *                        conn_getParam									
- ***********************************************************************
-DESCRIPTION: Connection get param function, called by the following:
-			-	config mgr in order to get a parameter from the OS abstraction layer.
-			-	Fomr inside the dirver	
-                                                                                                   
-INPUT:      hConn	-	Connection handle.
-			pParam	-	Pointer to the parameter		
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS conn_getParam(TI_HANDLE		hConn, 
-					 paramInfo_t	*pParam)
-{
-	conn_t *pConn = (conn_t *)hConn;
-
-	switch(pParam->paramType)
-	{
-	case CONN_TYPE_PARAM:
-		pParam->content.connType = pConn->currentConnType;
-		break;
-
-	case CONN_SELF_TIMEOUT_PARAM:
-		pParam->content.connSelfTimeout = pConn->timeout;
-		break;
-	
-	default:
-TRACE1(pConn->hReport, REPORT_SEVERITY_ERROR, "Get param, Params is not supported, %d\n\n", pParam->paramType);
-		return PARAM_NOT_SUPPORTED;
-	}
-
-	return TI_OK;
-}
-
-/***********************************************************************
- *                        conn_start									
- ***********************************************************************
-DESCRIPTION: Called by the SME SM in order to start the connection SM
-			 This function start the current connection SM	
-                                                                                                   
-INPUT:      hConn	-	Connection handle.
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS conn_start(TI_HANDLE hConn, 
-                     EConnType connType,
-		     conn_status_callback_t  pConnStatusCB,
-		     TI_HANDLE connStatCbObj,
-   		     TI_BOOL disConEraseKeys,
-		     TI_BOOL reNegotiateTspec)
-{
-	conn_t *pConn = (conn_t *)hConn;
-	paramInfo_t param;
-
-	pConn->pConnStatusCB = pConnStatusCB;
-	pConn->connStatCbObj = connStatCbObj;
-
-	pConn->connType = connType;
-	pConn->disConEraseKeys = disConEraseKeys;
-	
-	/* Initialize the DISASSOCIATE event parameters to default */ 
-	pConn->smContext.disAssocEventReason = STATUS_UNSPECIFIED;
-	pConn->smContext.disAssocEventStatusCode  = 0;
-
-	
-	/* If requested, re-negotiate voice TSPEC */
-	param.paramType = QOS_MNGR_VOICE_RE_NEGOTIATE_TSPEC;
-	param.content.TspecConfigure.voiceTspecConfigure = reNegotiateTspec; 
-    param.content.TspecConfigure.videoTspecConfigure = reNegotiateTspec; 
-
-	qosMngr_setParams(pConn->hQosMngr, &param);
-
-	switch(pConn->currentConnType)
-	{
-	case CONNECTION_IBSS:
-		return conn_ibssSMEvent(&pConn->state, CONN_IBSS_CONNECT, (TI_HANDLE) pConn);
-
-	case CONNECTION_SELF:
-		return conn_ibssSMEvent(&pConn->state, CONN_IBSS_CREATE, (TI_HANDLE) pConn);
-
-	case CONNECTION_INFRA:
-		return conn_infraSMEvent(&pConn->state, CONN_INFRA_CONNECT, (TI_HANDLE) pConn);
-
-    default:
-TRACE1(pConn->hReport, REPORT_SEVERITY_ERROR, "Start connection, invalid type %d\n\n", pConn->currentConnType);
-		return TI_NOK;
-
-	}
-}
-
-/***********************************************************************
- *                        conn_stop									
- ***********************************************************************
-DESCRIPTION: Called by the SME SM in order to stop the connection SM
-			 This function stop the current connection SM.	
-                                                                                                   
-INPUT:      hConn	-	Connection handle.
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS conn_stop(TI_HANDLE 				hConn, 
-					DisconnectType_e		disConnType, 
-					mgmtStatus_e 			reason,
-					TI_BOOL					disConEraseKeys,
-					conn_status_callback_t  pConnStatusCB,
-					TI_HANDLE 				connStatCbObj  )
-{
-	conn_t *pConn = (conn_t *)hConn;
-
-	pConn->pConnStatusCB = pConnStatusCB;
-	pConn->connStatCbObj = connStatCbObj;
-
-	pConn->disConnType 	 = disConnType;
-	pConn->disConnReasonToAP = reason;
-	pConn->disConEraseKeys = disConEraseKeys;
-
-	/* 
-	 * Mark the disconnection reason as unspecified to indicate that conn module has no information regarding the DISASSOCIATE event to be raised
-	 * by the SME
-	 */
-	pConn->smContext.disAssocEventReason = STATUS_UNSPECIFIED;
-	pConn->smContext.disAssocEventStatusCode  = 0;
-
-
-    TRACE3(pConn->hReport, REPORT_SEVERITY_INFORMATION, "conn_stop, disConnType %d, reason=%d, disConEraseKeys=%d\n\n", disConnType, reason, disConEraseKeys);
-
-	switch(pConn->currentConnType)
-	{
-	case CONNECTION_IBSS:
-	case CONNECTION_SELF:
-        pConn->ibssDisconnectCount++;
-		return conn_ibssSMEvent(&pConn->state, CONN_IBSS_DISCONNECT, (TI_HANDLE) pConn);
-
-	case CONNECTION_INFRA:
-		return conn_infraSMEvent(&pConn->state, CONN_INFRA_DISCONNECT, (TI_HANDLE) pConn);
-
-
-	default:
-TRACE1(pConn->hReport, REPORT_SEVERITY_ERROR, "Stop connection, invalid type %d\n\n", pConn->currentConnType);
-		return TI_NOK;
-	}
-}
-
-
-/***********************************************************************
- *                        conn_reportMlmeStatus									
- ***********************************************************************
-DESCRIPTION:	Called by the MLME SM when MLME status changed. 
-				Valid only in the case that the current connection type is infrastructure
-				The function calls the connection infra SM with MLME success or MLME failure 
-				according to the status
-                                                                                                   
-INPUT:      hConn	-	Connection handle.
-			status	-	MLME status
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS conn_reportMlmeStatus(TI_HANDLE			hConn, 
-							mgmtStatus_e		status,
-							TI_UINT16				uStatusCode)
-{
-	conn_t *pConn = (conn_t *)hConn;
-
-
-	/* Save the reason for the use of the SME when triggering DISASSOCIATE event */ 
-	pConn->smContext.disAssocEventReason = status;
-	pConn->smContext.disAssocEventStatusCode = uStatusCode;
-
-	if (status == STATUS_SUCCESSFUL)
-	{
-		conn_infraSMEvent(&pConn->state, CONN_INFRA_MLME_SUCC, pConn);
-	}
-	else
-	{
-        TRACE0(pConn->hReport, REPORT_SEVERITY_CONSOLE,"-------------------------------------\n");
-        TRACE0(pConn->hReport, REPORT_SEVERITY_CONSOLE,"               CONN LOST             \n");
-        TRACE0(pConn->hReport, REPORT_SEVERITY_CONSOLE,"-------------------------------------\n");
-
-#ifdef REPORT_LOG
-		WLAN_OS_REPORT(("-------------------------------------\n"));
-		WLAN_OS_REPORT(("               CONN LOST             \n"));
-		WLAN_OS_REPORT(("-------------------------------------\n"));
-#else
-		os_printf("%s: *** CONN LOST ***\n", __func__);
-#endif
-		if( pConn->connType == CONN_TYPE_ROAM )
-			pConn->disConnType = DISCONNECT_IMMEDIATE;
-		else /* connType == CONN_TYPE_ESS */
-			pConn->disConnType = DISCONNECT_DE_AUTH;
-
-        TRACE4(pConn->hReport, REPORT_SEVERITY_INFORMATION, "conn_reportMlmeStatus, disAssocEventReason %d, disAssocEventStatusCode = %d, connType=%d, disConnType=%d \n", pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode, pConn->connType, pConn->disConnType);
-
-		conn_infraSMEvent(&pConn->state, CONN_INFRA_DISCONNECT, pConn);
-	}
-
-	return TI_OK;
-}
-
-/***********************************************************************
- *                        conn_reportRsnStatus									
- ***********************************************************************
-DESCRIPTION:	Called by the RSN SM when RSN status changed. 
-				This function calls the current connection SM with RSN success or RSN failure based on the status	
-                                                                                                   
-INPUT:      hConn	-	Connection handle.
-			status	-	RSN status
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS conn_reportRsnStatus(TI_HANDLE			hConn, 
-							mgmtStatus_e		status)
-{
-	conn_t *pConn = (conn_t *)hConn;
-
-	/* Save the reason for the use of the SME when triggering DISASSOCIATE event. For now we just have STATUS_SECURITY_FAILURE */ 
-	pConn->smContext.disAssocEventReason = status;
-	pConn->smContext.disAssocEventStatusCode = 1; /* we use this status at SME, if != 0 means that assoc frame sent */
-
-	switch(pConn->currentConnType)
-	{
-	case CONNECTION_IBSS:
-	case CONNECTION_SELF:
-		if (status == STATUS_SUCCESSFUL)
-			return conn_ibssSMEvent(&pConn->state, CONN_IBSS_RSN_SUCC, (TI_HANDLE) pConn);
-		else
-			return conn_ibssSMEvent(&pConn->state, CONN_IBSS_DISCONNECT, (TI_HANDLE) pConn);
-
-
-
-	case CONNECTION_INFRA:
-		if (status == STATUS_SUCCESSFUL)
-			return conn_infraSMEvent(&pConn->state, CONN_INFRA_RSN_SUCC, (TI_HANDLE) pConn);
-		
-		else{ /* status == STATUS_SECURITY_FAILURE */
-			/*
-			 * In infrastructure - if the connection is standard 802.11 connection (ESS) then
-			 * need to disassociate. In roaming mode, the connection is stopped without sending
-			 * the reassociation frame.
-			 */
-			if( pConn->connType == CONN_TYPE_ROAM )
-				pConn->disConnType = DISCONNECT_IMMEDIATE;
-			else /* connType == CONN_TYPE_ESS */
-				pConn->disConnType = DISCONNECT_DE_AUTH;
-
-            TRACE3(pConn->hReport, REPORT_SEVERITY_INFORMATION, "conn_reportRsnStatus, disAssocEventReason %d, connType=%d, disConnType=%d \n\n", pConn->smContext.disAssocEventReason, pConn->connType, pConn->disConnType);
-
-			return conn_infraSMEvent(&pConn->state, CONN_INFRA_DISCONNECT, (TI_HANDLE) pConn);
-		}
-	case CONNECTION_NONE:
-		break;
-	}
-	
-	return TI_OK;
-}
-
-/***********************************************************************
- *                        conn_timeout									
- ***********************************************************************
-DESCRIPTION:	Called by the OS abstraction layer when the self timer expired 
-				Valid only if the current connection type is self
-				This function calls the self connection SM with timeout event
-                                                                                                   
-INPUT:      hConn	-	Connection handle.
-            bTwdInitOccured -   Indicates if TWDriver recovery occured since timer started 
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-void conn_timeout (TI_HANDLE hConn, TI_BOOL bTwdInitOccured)
-{
-	conn_t *pConn = (conn_t *)hConn;
-
-	switch(pConn->currentConnType)
-	{
-	case CONNECTION_IBSS:
-	case CONNECTION_SELF:
-		conn_ibssSMEvent(&pConn->state, CONN_IBSS_DISCONNECT, pConn);
-		break;
-
-	case CONNECTION_INFRA:
-		conn_infraSMEvent(&pConn->state, CONN_INFRA_DISCONN_COMPLETE, (TI_HANDLE) pConn);
-        /* Initiate recovery only if not already occured. */
-        if (!bTwdInitOccured) 
-        {
-		healthMonitor_sendFailureEvent(pConn->hHealthMonitor, DISCONNECT_TIMEOUT);
-        }
-		break;
-
-	case CONNECTION_NONE:
-		break;
-	}
-
-	return;
-}
-
-
-/***********************************************************************
- *                        conn_join									
- ***********************************************************************
-DESCRIPTION:	Called by the site manager when detecting that another station joined our own created IBSS 
-				Valid only if the current connection type is self
-				This function calls the self connection SM with join event
-                                                                                                   
-INPUT:      hConn	-	Connection handle.
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS conn_ibssStaJoined(TI_HANDLE hConn)
-{
-	conn_t *pConn = (conn_t *)hConn;
-
-	conn_ibssSMEvent(&pConn->state, CONN_IBSS_STA_JOINED, pConn);
-	return TI_OK;
-}
-
-
-TI_STATUS conn_ibssMerge(TI_HANDLE hConn)
-{
-	conn_t *pConn = (conn_t *)hConn;
-
-	conn_ibssSMEvent(&pConn->state, CONN_IBSS_MERGE, pConn);
-	return TI_OK;
-}
-
-
-
-/***********************************************************************
- *                        release_module									
- ***********************************************************************
-DESCRIPTION:	Release all module resources - FSMs, timer and object.
-                                                                                                   
-INPUT:      hConn	-	Connection handle.
-
-OUTPUT:		
-
-RETURN:     void
-
-************************************************************************/
-static void release_module(conn_t *pConn)
-{
-	if (pConn->ibss_pFsm)
-    {
-		fsm_Unload (pConn->hOs, pConn->ibss_pFsm);
-    }
-
-    if (pConn->infra_pFsm)
-    {
-		fsm_Unload (pConn->hOs, pConn->infra_pFsm);
-    }
-
-	if (pConn->hConnTimer)
-    {
-		tmr_DestroyTimer (pConn->hConnTimer);
-    }
-
-	os_memoryFree(pConn->hOs, pConn, sizeof(conn_t));
-}
-
-static void conn_DisconnectComplete (conn_t *pConn, TI_UINT8  *data, TI_UINT8   dataLength)
-{
-	switch(pConn->currentConnType)
-	{
-	case CONNECTION_IBSS:
-		connIbss_DisconnectComplete(pConn, data, dataLength);
-		break;
-
-	case CONNECTION_SELF:
-		connIbss_DisconnectComplete(pConn, data, dataLength);
-		break;
-
-	case CONNECTION_INFRA:
-		connInfra_DisconnectComplete(pConn, data, dataLength);
-		break;
-
-    default:
-		TRACE1(pConn->hReport, REPORT_SEVERITY_ERROR, "conn_DisconnectComplete, invalid type %d\n\n", pConn->currentConnType);
-		
-	}
-}
-
-
-#ifdef REPORT_LOG
-/**
-*
-* conn_ibssPrintStatistics
-*
-* \b Description: 
-*
-* Called by Site Manager when request to print statistics is requested from CLI  
-*
-* \b ARGS: Connection handle
-*
-* \b RETURNS:
-*
-*  None.
-*
-* \sa 
-*/
-void conn_ibssPrintStatistics(TI_HANDLE hConn)
-{   
-    conn_t *pConn = (conn_t *)hConn;
-
-    WLAN_OS_REPORT(("- IBSS Disconnect = %d\n", pConn->ibssDisconnectCount));
-    WLAN_OS_REPORT(("\n"));
-}
-#endif /*#ifdef REPORT_LOG*/
-
-
diff --git a/wl1271/stad/src/Connection_Managment/conn.h b/wl1271/stad/src/Connection_Managment/conn.h
deleted file mode 100644
index 0995275..0000000
--- a/wl1271/stad/src/Connection_Managment/conn.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * conn.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file conn.h
- *  \brief connection module internal header file
- *
- *  \see conn.c
- */
-
-/***************************************************************************/
-/*																			*/
-/*	  MODULE:	conn.h														*/
-/*    PURPOSE:	connection module internal header file						*/
-/*																			*/
-/***************************************************************************/
-#ifndef __CONN_H__
-#define __CONN_H__
-
-#include "tidef.h"
-#include "paramOut.h"
-#include "fsm.h"
-#include "802_11Defs.h"
-#include "connApi.h"
-#include "scrApi.h"
-
-typedef struct
-{
-	mgmtStatus_e			disAssocEventReason;		/* Disassoc reason to be used for upper layer	*/
-	TI_UINT32					disAssocEventStatusCode;	/* Extra information for disConnEventReason		*/
-} connSmContext_t;
-
-
-/*
- *	ibssRandomSsidGen - in IBSS, that flag indicates if the ibss must be randommaly changed. 
- *	TI_FALSE - do not generate random ibss.
- *	TI_TRUE -	generate random ibss.
- *	1.	at Start up that flag is TI_FALSE
- *  2.	after Connection fail in connIbss or connSelf SM, set the flag to TI_TRUE in order to 
- *		generate a new random ibss.
- */
-
-/* Connection handle */
-typedef struct 
-{
-	TI_UINT8				state;	
-	connSmContext_t			smContext;
-	connectionType_e		currentConnType;
-	TI_UINT32				timeout;
-	TI_HANDLE               hConnTimer;         /* This timer is used both by IBSS and BSS */
-	fsm_stateMachine_t		*ibss_pFsm;
-    fsm_stateMachine_t		*infra_pFsm;
-	EConnType				connType;
-	DisconnectType_e		disConnType;
-	mgmtStatus_e			disConnReasonToAP;
-	TI_BOOL					disConEraseKeys;
-    TI_UINT8                buf[40];            /* For dummy interrogate data (to flush cmdQueue) */
-	conn_status_callback_t  pConnStatusCB;
-	TI_HANDLE				connStatCbObj;
-	TI_BOOL 				scrRequested[ SCR_RESOURCE_NUM_OF_RESOURCES ]; /* wether SCR was requested for the two resources */
-    TI_BOOL                 bScrAcquired[ SCR_RESOURCE_NUM_OF_RESOURCES ]; /* wether SCR was acquired for the two resources */
-	TI_UINT32               ibssDisconnectCount;
-
-    /* Other modules handles */
-	TI_HANDLE				hSiteMgr;
-	TI_HANDLE				hSmeSm;
-	TI_HANDLE				hMlmeSm;
-	TI_HANDLE				hRsn;
-	TI_HANDLE				hReport;
-	TI_HANDLE				hOs;
-	TI_HANDLE				hRxData;
-	TI_HANDLE 				hPwrMngr;
-	TI_HANDLE				hCtrlData;
-	TI_HANDLE 				hQosMngr;
-	TI_HANDLE				hTWD;
-	TI_HANDLE				hMeasurementMgr;
-	TI_HANDLE				hScr;
-	TI_HANDLE				hTrafficMonitor;
-	TI_HANDLE				hXCCMngr;
-    TI_HANDLE               hScanCncn;
-	TI_HANDLE				hCurrBss;
-	TI_HANDLE				hSwitchChannel;
-	TI_HANDLE				hEvHandler;
-	TI_HANDLE				hHealthMonitor;
-	TI_HANDLE				hTxMgmtQ;
-    TI_HANDLE               hRegulatoryDomain;
-    TI_HANDLE    			hSoftGemini;
-    TI_HANDLE	            hTxCtrl;
-    TI_HANDLE	            hTimer;
-} conn_t;
-
-#endif /* __CONN_H__*/
diff --git a/wl1271/stad/src/Connection_Managment/connApi.h b/wl1271/stad/src/Connection_Managment/connApi.h
deleted file mode 100644
index 03c4ff4..0000000
--- a/wl1271/stad/src/Connection_Managment/connApi.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * connApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file connApi.h
- *  \brief connection module API
- *
- *  \see conn.c
- */
-
-/***************************************************************************/
-/*																									*/
-/*	  MODULE:	connApi.h																*/
-/*    PURPOSE:	connection module API			 								*/
-/*																									*/
-/***************************************************************************/
-#ifndef __CONN_API_H__
-#define __CONN_API_H__
-
-#include "tidef.h"
-#include "paramOut.h"
-#include "802_11Defs.h"
-#include "mlmeApi.h"
-#include "DrvMainModules.h"
-
-/*
- * Connection type enum
- */
-typedef enum
-{
-	CONN_TYPE_FIRST_CONN = 0,  /* Standart 802.11 association */
-	CONN_TYPE_ROAM             /* Perform roaming connection. (Re Association) */ 
-
-} EConnType;
-
-
-typedef enum
-{
-    CONN_TYPE_PARAM         = 0x01
-
-} EConnParam;
-
-
-/* 
-	Prototype for connection status announcment, this function is called upon connection
-   lost or connection establishment.
-*/
-typedef void (*conn_status_callback_t)( TI_HANDLE hObj, mgmtStatus_e status, TI_UINT32 uStatusCode);
-
-/* Connection interface functions prototypes */
-
-TI_HANDLE conn_create (TI_HANDLE hOs);
-
-void      conn_init (TStadHandlesList *pStadHandles);
-
-TI_STATUS conn_SetDefaults (TI_HANDLE hConn, connInitParams_t *pConnInitParams);
-
-TI_STATUS conn_unLoad (TI_HANDLE hConn);
-
-TI_STATUS conn_setParam (TI_HANDLE hConn, paramInfo_t *pParam);
-
-TI_STATUS conn_getParam (TI_HANDLE hConn, paramInfo_t *pParam);
-
-TI_STATUS conn_start(TI_HANDLE hConn, 
-                     EConnType connType,
-                     conn_status_callback_t  pConnStatusCB,
-                     TI_HANDLE connStatCbObj,
-                     TI_BOOL disConEraseKeys,
-                     TI_BOOL reNegotiateTspec);
-
-void connInfraJoinCmdCmpltNotification(TI_HANDLE CB_handle);
-
-TI_STATUS conn_stop (TI_HANDLE               hConn, 
-                     DisconnectType_e       disConnType,
-				     mgmtStatus_e 			reason,
-				     TI_BOOL					disConEraseKeys,
-				     conn_status_callback_t  pConnStatusCB,
-				     TI_HANDLE				connStatCbObj );
-
-void conn_timeout (TI_HANDLE hConn, TI_BOOL bTwdInitOccured);
-
-TI_STATUS conn_ibssStaJoined (TI_HANDLE hConn);
-TI_STATUS conn_ibssMerge (TI_HANDLE hConn);
-
-TI_STATUS conn_reportMlmeStatus(TI_HANDLE			hConn,
-							mgmtStatus_e		status,
-							TI_UINT16				uStatusCode);
-
-TI_STATUS conn_reportRsnStatus(TI_HANDLE			hConn,
-							mgmtStatus_e		status);
-
-#ifdef REPORT_LOG
-void conn_ibssPrintStatistics (TI_HANDLE hConn);
-#endif /*TI_DBG*/
-
-#endif /* __CONN_API_H__ */
diff --git a/wl1271/stad/src/Connection_Managment/connIbss.c b/wl1271/stad/src/Connection_Managment/connIbss.c
deleted file mode 100644
index 2c30011..0000000
--- a/wl1271/stad/src/Connection_Managment/connIbss.c
+++ /dev/null
@@ -1,568 +0,0 @@
-/*
- * connIbss.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file connIbss.c
- *  \brief IBSS connection implementation
- *
- *  \see connIbss.h
- */
-
-/***************************************************************************/
-/*                                                                                                  */
-/*      MODULE: connIbss.c                                                              */
-/*    PURPOSE:  IBSS connection implementation                                          */
-/*                                                                                                  */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_26
-#include "tidef.h"
-#include "report.h"
-#include "osApi.h"
-#include "conn.h"
-#include "connIbss.h"
-#include "timer.h"
-#include "fsm.h"
-#include "siteMgrApi.h"
-#include "sme.h"
-#include "rsnApi.h"
-#include "DataCtrl_Api.h"  
-#include "paramOut.h"
-#include "connApi.h"
-#include "EvHandler.h"
-#include "currBss.h"
-#include "TrafficMonitorAPI.h"
-#include "healthMonitor.h"
-#include "TWDriver.h"
-
-
-/* Local functions prototypes */
-/* Local functions prototypes */
-static TI_STATUS waitDisconnToCmplt_to_idle (void *pData);
-static TI_STATUS idle_to_selfWait(void *pData);
-
-static TI_STATUS idle_to_rsnWait(void *pData);
-    
-static TI_STATUS selfWait_to_waitToDisconnCmplt(void *pData);
-static TI_STATUS rsnWait_to_waitToDisconnCmplt(void *pData);
-static TI_STATUS connected_to_waitToDisconnCmplt(void *pData);
-static TI_STATUS selfWait_to_rsnWait(void *pData);
-static TI_STATUS rsnWait_to_connected(void *pData);
-static TI_STATUS actionUnexpected(void *pData);
-static TI_STATUS actionNop(void *pData);
-static TI_STATUS selfw_merge_rsnw(void *pData);
-static TI_STATUS rsnw_merge_rsnw(void *pData);
-static TI_STATUS conn_merge_conn(void *pData);
-
-/********************************************/
-/*      Functions Implementations           */
-/********************************************/
-
-/***********************************************************************
- *                        conn_ibssConfig                                   
- ***********************************************************************
-DESCRIPTION: IBSS Connection configuration function, called by the conection set param function
-                in the selection phase. Configures the connection state machine to IBSS connection mode
-                                                                                                   
-INPUT:      hConn   -   Connection handle.
-
-OUTPUT:     
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS conn_ibssConfig(conn_t *pConn)
-{
-
-    fsm_actionCell_t    smMatrix[CONN_IBSS_NUM_STATES][CONN_IBSS_NUM_EVENTS] =
-    {
-
-        /* next state and actions for IDLE state */
-        {   {STATE_CONN_IBSS_SELF_WAIT, idle_to_selfWait    },  /* CONN_IBSS_CREATE */
-            {STATE_CONN_IBSS_RSN_WAIT,  idle_to_rsnWait     },  /* CONN_IBSS_CONNECT    */
-            {STATE_CONN_IBSS_IDLE,      actionNop           },   /* CONN_IBSS_DISCONNECT */
-            {STATE_CONN_IBSS_IDLE,      actionUnexpected    },   /* CONN_IBSS_RSN_SUCC */
-            {STATE_CONN_IBSS_IDLE,      actionUnexpected    },   /* CONN_IBSS_STA_JOINED */
-			{STATE_CONN_IBSS_IDLE,      actionUnexpected    },   /* CONN_IBSS_MERGE */
-			{STATE_CONN_IBSS_IDLE,      actionUnexpected    }    /* CONN_IBSS_DISCONN_COMPLETE */
-        },
-
-        /* next state and actions for SELF_WAIT state */
-        {   {STATE_CONN_IBSS_SELF_WAIT, actionUnexpected    							},  /* CONN_IBSS_CREATE */
-            {STATE_CONN_IBSS_SELF_WAIT, actionUnexpected    							},  /* CONN_IBSS_CONNECT    */
-            {STATE_CONN_IBSS_WAIT_DISCONN_CMPLT,  selfWait_to_waitToDisconnCmplt 		},  /* CONN_IBSS_DISCONNECT */
-            {STATE_CONN_IBSS_SELF_WAIT, actionUnexpected    							},  /* CONN_IBSS_RSN_SUCC */
-            {STATE_CONN_IBSS_RSN_WAIT,  selfWait_to_rsnWait 							},  /* CONN_IBSS_STA_JOINED */
-			{STATE_CONN_IBSS_RSN_WAIT,  selfw_merge_rsnw    							},  /* CONN_IBSS_MERGE */
-			{STATE_CONN_IBSS_SELF_WAIT, actionUnexpected    							}   /* CONN_IBSS_DISCONN_COMPLETE */
-        },
-
-        /* next state and actions for RSN_WAIT state */
-        {   {STATE_CONN_IBSS_RSN_WAIT,  actionUnexpected    							},  /* CONN_IBSS_CREATE */
-            {STATE_CONN_IBSS_RSN_WAIT,  actionUnexpected    							},  /* CONN_IBSS_CONNECT    */
-            {STATE_CONN_IBSS_WAIT_DISCONN_CMPLT, rsnWait_to_waitToDisconnCmplt    		},  /* CONN_IBSS_DISCONNECT */
-            {STATE_CONN_IBSS_CONNECTED, rsnWait_to_connected							},  /* CONN_IBSS_RSN_SUCC */
-			{STATE_CONN_IBSS_RSN_WAIT,  actionUnexpected								}, 	/* CONN_IBSS_STA_JOINED */
-			{STATE_CONN_IBSS_RSN_WAIT,  rsnw_merge_rsnw     							},  /* CONN_IBSS_MERGE */
-			{STATE_CONN_IBSS_RSN_WAIT, actionUnexpected    								}   /* CONN_IBSS_DISCONN_COMPLETE */
-        },
-		
-        /* next state and actions for CONNECTED state */
-        {   {STATE_CONN_IBSS_CONNECTED, actionUnexpected    							},  /* CONN_IBSS_CREATE */
-            {STATE_CONN_IBSS_CONNECTED, actionUnexpected    							},  /* CONN_IBSS_CONNECT    */
-            {STATE_CONN_IBSS_WAIT_DISCONN_CMPLT, connected_to_waitToDisconnCmplt  		},  /* CONN_IBSS_DISCONNECT */
-            {STATE_CONN_IBSS_CONNECTED, actionUnexpected    							},  /* CONN_IBSS_RSN_SUCC */
-			{STATE_CONN_IBSS_CONNECTED, actionUnexpected    							},  /* CONN_IBSS_STA_JOINED */
-			{STATE_CONN_IBSS_CONNECTED,  conn_merge_conn    							},  /* CONN_IBSS_MERGE */
-			{STATE_CONN_IBSS_CONNECTED, actionUnexpected    						   	}   /* CONN_IBSS_DISCONN_COMPLETE */
-        },
-
-		 /* next state and actions for STATE_CONN_IBSS_WAIT_DISCONN_CMPLT state */
-        {   {STATE_CONN_IBSS_WAIT_DISCONN_CMPLT, actionUnexpected    		},  		/* CONN_IBSS_CREATE */
-            {STATE_CONN_IBSS_WAIT_DISCONN_CMPLT, actionUnexpected    		},  		/* CONN_IBSS_CONNECT    */
-            {STATE_CONN_IBSS_WAIT_DISCONN_CMPLT, actionUnexpected   		},  		/* CONN_IBSS_DISCONNECT */
-            {STATE_CONN_IBSS_WAIT_DISCONN_CMPLT, actionUnexpected    		},  		/* CONN_IBSS_RSN_SUCC */
-			{STATE_CONN_IBSS_WAIT_DISCONN_CMPLT, actionUnexpected    		},  		/* CONN_IBSS_STA_JOINED */
-			{STATE_CONN_IBSS_WAIT_DISCONN_CMPLT, actionUnexpected     		},  		/* CONN_IBSS_MERGE */
-			{STATE_CONN_IBSS_IDLE, 				 waitDisconnToCmplt_to_idle } 			/* CONN_IBSS_DISCONN_COMPLETE */
-        }
-        
-    };
-
-    return fsm_Config(pConn->ibss_pFsm, (fsm_Matrix_t)smMatrix, CONN_IBSS_NUM_STATES, CONN_IBSS_NUM_EVENTS, conn_ibssSMEvent, pConn->hOs);
-}
-
-
-/***********************************************************************
- *                        conn_ibssSMEvent                                  
- ***********************************************************************
-DESCRIPTION: IBSS Connection SM event processing function, called by the connection API
-                Perform the following:
-                -   Print the state movement as a result from the event
-                -   Calls the generic state machine event processing function which preform the following:
-                    -   Calls the correspoding callback function
-                    -   Move to next state
-                
-INPUT:      currentState    -   Pointer to the connection current state.
-            event   -   Received event
-            pConn   -   Connection handle
-
-OUTPUT:     
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS conn_ibssSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hConn)
-{
-   conn_t *pConn = (conn_t *)hConn;
-    TI_STATUS       status;
-    TI_UINT8       nextState;
-
-    status = fsm_GetNextState(pConn->ibss_pFsm, *currentState, event, &nextState);
-    if (status != TI_OK)
-    {
-        TRACE0(pConn->hReport, REPORT_SEVERITY_SM, "IBSS State machine error, failed getting next state\n");
-        return(TI_NOK);
-    }
-
-	TRACE3( pConn->hReport, REPORT_SEVERITY_INFORMATION, "conn_ibssSMEvent: <currentState = %d, event = %d> --> nextState = %d\n", *currentState, event, nextState);
-    status = fsm_Event(pConn->ibss_pFsm, currentState, event, (void *)pConn);
-
-    return status;
-}
-
-
-void connIbss_DisconnectComplete (conn_t *pConn, TI_UINT8  *data, TI_UINT8   dataLength)
-{
-    /* send an DISCONNECT COMPLETE event to the SM */
-    conn_ibssSMEvent(&pConn->state, CONN_IBSS_DISCONN_COMPLETE, (TI_HANDLE) pConn);
-}
-
-/************************************************************************************************************/
-/*      In the following section are listed the callback function used by the IBSS connection state machine */
-/************************************************************************************************************/
-
-/***********************************************************************
- *                        selfWait_to_rsnWait
- ***********************************************************************
-DESCRIPTION: 
-
-
-INPUT:   
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static TI_STATUS selfWait_to_rsnWait (void *pData)
-{
-	conn_t      *pConn = (conn_t *)pData;
-    paramInfo_t  param;
-
-    tmr_StopTimer (pConn->hConnTimer);
-
-    param.paramType = RX_DATA_PORT_STATUS_PARAM;
-    param.content.rxDataPortStatus = OPEN_EAPOL;
-    rxData_setParam (pConn->hRxData, &param);
-
-	/* Update TxMgmtQueue SM to enable EAPOL packets. */
-	txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_EAPOL);
-
-    return rsn_start (pConn->hRsn);
-}
-
-
-/***********************************************************************
- *                        rsnWait_to_connected
- ***********************************************************************
-DESCRIPTION: 
-
-
-INPUT:   
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static TI_STATUS rsnWait_to_connected(void *pData)
-{
-    paramInfo_t param;
-
-    conn_t *pConn=(conn_t *)pData;
-
-    TrafficMonitor_Start( pConn->hTrafficMonitor );
-
-    healthMonitor_setState(pConn->hHealthMonitor, HEALTH_MONITOR_STATE_CONNECTED);
-
-    siteMgr_start(pConn->hSiteMgr);
-
-    param.paramType = RX_DATA_PORT_STATUS_PARAM;
-    param.content.rxDataPortStatus = OPEN;
-    rxData_setParam(((conn_t *)pData)->hRxData, &param);
-
-	/* Update TxMgmtQueue SM to open Tx path to all packets. */
-	txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_OPEN);
-    
-    /* Update current BSS connection type and mode */
-    currBSS_updateConnectedState(pConn->hCurrBss, TI_TRUE, BSS_INDEPENDENT);
-
-	sme_ReportConnStatus(((conn_t *)pData)->hSmeSm, STATUS_SUCCESSFUL, 0);
-
-    return TI_OK;
-}
-
-static TI_STATUS selfw_merge_rsnw(void *pData)
-{
-    conn_t *pConn=(conn_t *)pData;
-    paramInfo_t param;
-
-	os_printf("IBSS selfw_merge_rsnw!!!!!!!!!!\n");
-
-	tmr_StopTimer (pConn->hConnTimer);
-	siteMgr_join(pConn->hSiteMgr);
-
-    param.paramType = RX_DATA_PORT_STATUS_PARAM;
-    param.content.rxDataPortStatus = OPEN_EAPOL;
-    rxData_setParam (pConn->hRxData, &param);
-
-	/* Update TxMgmtQueue SM to enable EAPOL packets. */
-	txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_EAPOL);
-
-    return rsn_start (pConn->hRsn);
-
-}
-
-
-static TI_STATUS rsnw_merge_rsnw(void *pData)
-{
-    conn_t *pConn=(conn_t *)pData;
-
-	os_printf("IBSS rsnw_merge_rsnw!!!!!!!!!!\n");
-
-	siteMgr_join(pConn->hSiteMgr);
-
-	return TI_OK;
-}
-
-
-static TI_STATUS conn_merge_conn(void *pData)
-{
-    conn_t *pConn=(conn_t *)pData;
-
-	os_printf("IBSS conn_merge_conn!!!!!!!!!!\n");
-
-	siteMgr_join(pConn->hSiteMgr);
-
-	return TI_OK;
-}
-
-static TI_STATUS waitDisconnToCmplt_to_idle (void *pData)
-{
-	conn_t      *pConn = (conn_t *)pData;
-
-	/* Inform the SME about the connection lost */
-    /* we use this status at SME, if != 0 means that assoc frame sent */
-	sme_ReportConnStatus(pConn->hSmeSm, STATUS_UNSPECIFIED, 1);
-	return TI_OK;
-}
-
-
-
-/***********************************************************************
- *                        actionUnexpected
- ***********************************************************************
-DESCRIPTION: 
-
-
-INPUT:   
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static TI_STATUS actionUnexpected(void *pData) 
-{
-#ifdef TI_DBG
-    conn_t *pConn = (conn_t *)pData; 
-    
-    TRACE0(pConn->hReport, REPORT_SEVERITY_SM, "State machine error, unexpected Event\n\n");
-#endif /*TI_DBG*/
-    
-    return TI_OK;
-}
-
-/***********************************************************************
- *                        actionNop
- ***********************************************************************
-DESCRIPTION: 
-
-
-INPUT:   
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static TI_STATUS actionNop(void *pData) 
-{
-    return TI_OK;
-}
-
-
-/***********************************************************************
- *                        selfWait_to_waitToDisconnCmplt
- ***********************************************************************
-DESCRIPTION: 
-
-
-INPUT:   
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static TI_STATUS selfWait_to_waitToDisconnCmplt (void *pData)
-{
-	conn_t      *pConn = (conn_t *)pData;
-    paramInfo_t  param;  
-
-    tmr_StopTimer (pConn->hConnTimer);
-    
-    siteMgr_removeSelfSite(pConn->hSiteMgr);
-
-    /* Update current BSS connection type and mode */
-    currBSS_updateConnectedState(pConn->hCurrBss, TI_FALSE, BSS_INDEPENDENT);
-    
-    /* stop beacon generation  */
-    param.paramType = RX_DATA_PORT_STATUS_PARAM;
-    param.content.rxDataPortStatus = CLOSE;
-    rxData_setParam(pConn->hRxData, &param);
-
-	/* Update TxMgmtQueue SM to close Tx path. */
-	txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_CLOSE);
-    
-    TWD_CmdFwDisconnect (pConn->hTWD, DISCONNECT_IMMEDIATE, STATUS_UNSPECIFIED);
-
-    return TI_OK;
-}
-
-
-
-/***********************************************************************
- *                        rsnWait_to_waitToDisconnCmplt
- ***********************************************************************
-DESCRIPTION: 
-
-
-INPUT:   
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static TI_STATUS rsnWait_to_waitToDisconnCmplt(void *pData)
-{
-    paramInfo_t     param;
-	TI_STATUS		tStatus;
-
-    tStatus = rsn_stop(((conn_t *)pData)->hRsn, TI_FALSE);
-
-    param.paramType = RX_DATA_PORT_STATUS_PARAM;
-    param.content.rxDataPortStatus = CLOSE;
-    rxData_setParam(((conn_t *)pData)->hRxData, &param);
-
-	/* Update TxMgmtQueue SM to close Tx path. */
-	txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_CLOSE);
-
-    /* Update current BSS connection type and mode */
-    currBSS_updateConnectedState(((conn_t *)pData)->hCurrBss, TI_FALSE, BSS_INDEPENDENT);
-
-    /* Stop beacon generation */
-    TWD_CmdFwDisconnect (((conn_t *)pData)->hTWD, DISCONNECT_IMMEDIATE, STATUS_UNSPECIFIED); 
-
-    return tStatus;
-}
-
-
-/***********************************************************************
- *                        connected_to_waitToDisconnCmplt
- ***********************************************************************
-DESCRIPTION: 
-
-
-INPUT:   
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static TI_STATUS connected_to_waitToDisconnCmplt(void *pData)
-{
-    conn_t *pConn=(conn_t *)pData;
-
-    TrafficMonitor_Stop(pConn->hTrafficMonitor);
-
-    healthMonitor_setState(pConn->hHealthMonitor, HEALTH_MONITOR_STATE_DISCONNECTED);
-
-    /* The logic of this action is identical to rsnWait_to_idle */
-    return rsnWait_to_waitToDisconnCmplt(pConn);
-}
-
-
-
-
-
-/***********************************************************************
- *                        idle_to_selfWait
- ***********************************************************************
-DESCRIPTION: 
-
-
-INPUT:   
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static TI_STATUS idle_to_selfWait (void *pData)
-{
-	conn_t    *pConn = (conn_t *)pData;
-    TI_UINT16  randomTime;
-
-    siteMgr_join (pConn->hSiteMgr);
-
-    /* get a randomTime that is constructed of the lower 13 bits ot the system time to 
-       get a MS random time of ~8000 ms */
-    randomTime = os_timeStampMs (pConn->hOs) & 0x1FFF;
-
-    /* Update current BSS connection type and mode */
-    currBSS_updateConnectedState (pConn->hCurrBss, TI_TRUE, BSS_INDEPENDENT);
-
-    tmr_StartTimer (pConn->hConnTimer,
-                    conn_timeout,
-                    (TI_HANDLE)pConn,
-                    pConn->timeout + randomTime,
-                    TI_FALSE);
-
-	/*  Notify that the driver is associated to the supplicant\IP stack. */
-    EvHandlerSendEvent (pConn->hEvHandler, IPC_EVENT_ASSOCIATED, NULL, 0);
-
-    return TI_OK;
-}
-
-
-
-/***********************************************************************
- *                        idle_to_rsnWait
- ***********************************************************************
-DESCRIPTION: 
-
-
-INPUT:   
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static TI_STATUS idle_to_rsnWait(void *pData)
-{
-    paramInfo_t param;
-
-    siteMgr_join(((conn_t *)pData)->hSiteMgr);
-
-    param.paramType = RX_DATA_PORT_STATUS_PARAM;
-    param.content.rxDataPortStatus = OPEN_EAPOL;
-    rxData_setParam(((conn_t *)pData)->hRxData, &param);
-
-	/* Update TxMgmtQueue SM to enable EAPOL packets. */
-	txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_EAPOL);
-    
-    /*
-     *  Notify that the driver is associated to the supplicant\IP stack. 
-     */
-    EvHandlerSendEvent(((conn_t *)pData)->hEvHandler, IPC_EVENT_ASSOCIATED, NULL,0);
-
-    /* Update current BSS connection type and mode */
-    currBSS_updateConnectedState(((conn_t *)pData)->hCurrBss, TI_TRUE, BSS_INDEPENDENT);
-    
-    return rsn_start(((conn_t *)pData)->hRsn);
-}
-
diff --git a/wl1271/stad/src/Connection_Managment/connIbss.h b/wl1271/stad/src/Connection_Managment/connIbss.h
deleted file mode 100644
index 24ba706..0000000
--- a/wl1271/stad/src/Connection_Managment/connIbss.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * connIbss.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file connIbss.h
- *  \brief IBSS connection header file
- *
- *  \see connIbss.c
- */
-
-/***************************************************************************/
-/*																									*/
-/*	  MODULE:	ibssConn.h																*/
-/*    PURPOSE:	IBSS connection header file			 								*/
-/*																									*/
-/***************************************************************************/
-#ifndef __CONN_IBSS_H__
-#define __CONN_IBSS_H__
-
-#include "tidef.h"
-#include "paramOut.h"
-#include "conn.h"
-
-/* IBSS connection SM events */
-typedef enum 
-{
-	CONN_IBSS_CREATE   		= 0,  /* Sent when establishing new IBSS. */ 
-	CONN_IBSS_CONNECT		  ,   /* Sent when trying to join existing IBSS. */
-	CONN_IBSS_DISCONNECT	  ,	  /* Stops to connection */
-	CONN_IBSS_RSN_SUCC		  ,   /* RSN keys are set to the HW */
-	CONN_IBSS_STA_JOINED	  ,   /* Event sent when other STA joined our self IBSS */
-	CONN_IBSS_MERGE			  ,
-	CONN_IBSS_DISCONN_COMPLETE,   /* Called when disconncet event is done */ 
-    CONN_IBSS_NUM_EVENTS            
-} connIbssEvent_e;
-
-/* IBSS connection states */
-typedef enum
-{
-	STATE_CONN_IBSS_IDLE 		=0,
- 
-	STATE_CONN_IBSS_SELF_WAIT	,
-	STATE_CONN_IBSS_RSN_WAIT	,
-	STATE_CONN_IBSS_CONNECTED 	,
-	STATE_CONN_IBSS_WAIT_DISCONN_CMPLT,
-    CONN_IBSS_NUM_STATES    
-} conn_ibss_state_e;
-
-
-TI_STATUS conn_ibssConfig(conn_t *pConn);
-
-TI_STATUS conn_ibssSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hConn);
-
-void IbssConnSM_ScrCB( TI_HANDLE hConn, EScrClientRequestStatus requestStatus, EScrResourceId eResource, EScePendReason pendReason);
-
-void connIbss_DisconnectComplete (conn_t *pConn, TI_UINT8  *data, TI_UINT8   dataLength);
-
-#endif /* __CONN_IBSS_H__ */
diff --git a/wl1271/stad/src/Connection_Managment/connInfra.c b/wl1271/stad/src/Connection_Managment/connInfra.c
deleted file mode 100644
index 1f02b7d..0000000
--- a/wl1271/stad/src/Connection_Managment/connInfra.c
+++ /dev/null
@@ -1,1024 +0,0 @@
-/*
- * connInfra.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file connInfra.c
- *  \brief Infra connection implementation
- *
- *  \see connInfra.h
- */
-
-/***************************************************************************/
-/*                                                                         */
-/*      MODULE: connInfra.c                                                */
-/*    PURPOSE:  Infra connection implementation                            */
-/*                                                                         */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_27
-#include "tidef.h"
-#include "report.h"
-#include "osApi.h"
-#include "conn.h"
-#include "connInfra.h"
-#include "timer.h"
-#include "fsm.h"
-#include "siteMgrApi.h"
-#include "sme.h"
-#include "rsnApi.h"
-#include "DataCtrl_Api.h"  
-#include "paramOut.h"
-#include "siteHash.h"
-#include "smeSm.h"
-#include "PowerMgr_API.h"
-#include "measurementMgrApi.h"
-#include "TrafficMonitorAPI.h"
-#include "qosMngr_API.h"
-#include "EvHandler.h"
-#include "SwitchChannelApi.h"
-#include "ScanCncn.h"
-#include "currBss.h"
-#include "healthMonitor.h"
-#include "regulatoryDomainApi.h"
-#include "txCtrl.h"
-#include "TWDriver.h"
-#include "SoftGeminiApi.h"
-#include "RxQueue_api.h"
-
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#include "XCCTSMngr.h"
-#endif
-
-#define DISCONNECT_TIMEOUT_MSEC      800
-
-/* Local functions prototypes */
-
-static TI_STATUS actionUnexpected(void *pData);
-
-static TI_STATUS actionNop(void *pData);
-
-static TI_STATUS connInfra_ScrWait(void *pData);
-
-static TI_STATUS Idle_to_Idle(void *pData);
-
-static TI_STATUS ScrWait_to_idle(void *pData);
-
-static TI_STATUS ScrWait_to_JoinWait(void *pData);
-
-static TI_STATUS JoinWait_to_mlmeWait(void *pData);
-
-static TI_STATUS JoinWait_to_WaitDisconnect(void *pData);
-
-static TI_STATUS mlmeWait_to_WaitDisconnect(void *pData);
-
-static TI_STATUS mlmeWait_to_rsnWait(void *pData);
-
-static TI_STATUS rsnWait_to_disconnect(void *pData);
-
-static TI_STATUS rsnWait_to_configHW(void *pData);
-
-static TI_STATUS configHW_to_connected(void *pData);
-
-static TI_STATUS configHW_to_disconnect(void *pData);
-
-static TI_STATUS connInfra_ScrWaitDisconn_to_disconnect(void *pData);
-
-static TI_STATUS connect_to_ScrWait(void *pData);
-
-static TI_STATUS prepare_send_disconnect(void *pData);
-
-static TI_STATUS connInfra_WaitDisconnectToIdle (void *pData);
-
-
-static TI_STATUS stopModules( conn_t *pConn, TI_BOOL bDisconnect );
-
-void InfraConnSM_ScrCB( TI_HANDLE hConn, EScrClientRequestStatus requestStatus,
-                        EScrResourceId eResource, EScePendReason pendReason );
-
-int conn_ConfigHwFinishCb(TI_HANDLE pData);
-
-/********************************************/
-/*      Functions Implementations           */
-/********************************************/
-
-
-/***********************************************************************
- *                        conn_infraConfig                                  
- ***********************************************************************
-DESCRIPTION: Infra Connection configuration function, called by the conection set param function
-                in the selection phase. Configures the connection state machine to Infra connection mode
-                                                                                                   
-INPUT:      hConn   -   Connection handle.
-
-OUTPUT:     
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS conn_infraConfig(conn_t *pConn)
-{
-    static fsm_actionCell_t    smMatrix[CONN_INFRA_NUM_STATES][CONN_INFRA_NUM_EVENTS] =
-    {
-        /* next state and actions for IDLE state */
-        {   {STATE_CONN_INFRA_SCR_WAIT_CONN, connInfra_ScrWait},        /* "EVENT_CONNECT"  */
-            {STATE_CONN_INFRA_IDLE, actionNop       },                  /* "EVENT_SCR_SUCC"*/
-            {STATE_CONN_INFRA_IDLE, actionNop       },                  /* "EVENT_JOIN_CMD_CMPLT */
-            {STATE_CONN_INFRA_IDLE, Idle_to_Idle    },                  /* "EVENT_DISCONNECT"       */
-            {STATE_CONN_INFRA_IDLE, actionUnexpected},                  /* "EVENT_MLME_SUCC"*/
-            {STATE_CONN_INFRA_IDLE, actionUnexpected},                  /* "EVENT_RSN_SUCC" */
-            {STATE_CONN_INFRA_IDLE, actionNop},                         /* "EVENT_CONFIG_HW" */
-            {STATE_CONN_INFRA_IDLE, actionUnexpected}                   /* "EVENT_DISCONN_COMPLETE" */
-        },
-
-        /* next state and actions for SCR_WAIT_CONN state */
-        {   {STATE_CONN_INFRA_SCR_WAIT_CONN     , actionUnexpected},    /* "EVENT_CONNECT"  */
-            {STATE_CONN_INFRA_WAIT_JOIN_CMPLT, ScrWait_to_JoinWait},    /* "EVENT_SCR_SUCC"*/
-            {STATE_CONN_INFRA_SCR_WAIT_CONN     , actionUnexpected},    /* "EVENT_JOIN_CMD_CMPLT */
-            {STATE_CONN_INFRA_IDLE,     ScrWait_to_idle},               /* "EVENT_DISCONNECT"       */
-            {STATE_CONN_INFRA_SCR_WAIT_CONN     , actionUnexpected},    /* "EVENT_MLME_SUCC"*/
-            {STATE_CONN_INFRA_SCR_WAIT_CONN     , actionUnexpected},    /* "EVENT_RSN_SUCC" */
-            {STATE_CONN_INFRA_SCR_WAIT_CONN     , actionNop},           /* "EVENT_CONFIG_HW "*/
-            {STATE_CONN_INFRA_SCR_WAIT_CONN     , actionNop}            /* "EVENT_DISCONN_COMPLETE" */
-        },
-
-        /* next state and actions for WAIT_JOIN_CMPLT */
-        {   {STATE_CONN_INFRA_WAIT_JOIN_CMPLT, actionUnexpected},       /* "EVENT_CONNECT"    */
-            {STATE_CONN_INFRA_WAIT_JOIN_CMPLT, actionUnexpected},       /* "EVENT_SCR_SUCC"*/
-            {STATE_CONN_INFRA_MLME_WAIT,       JoinWait_to_mlmeWait},   /* "EVENT_JOIN_CMD_CMPLT"   */
-            {STATE_CONN_INFRA_WAIT_DISCONNECT, JoinWait_to_WaitDisconnect},/* "EVENT_DISCONNECT"       */
-            {STATE_CONN_INFRA_WAIT_JOIN_CMPLT, actionUnexpected},       /* "EVENT_MLME_SUCC"*/
-            {STATE_CONN_INFRA_WAIT_JOIN_CMPLT, actionUnexpected},       /* "EVENT_RSN_SUCC" */
-            {STATE_CONN_INFRA_WAIT_JOIN_CMPLT, actionNop},              /* "EVENT_CONFIG_HW"        */
-            {STATE_CONN_INFRA_WAIT_JOIN_CMPLT, actionUnexpected}        /* "EVENT_DISCONN_COMPLETE" */
-        
-        },
-
-        /* next state and actions for MLME_WAIT state */
-        {   {STATE_CONN_INFRA_MLME_WAIT, actionUnexpected},             /* "EVENT_CONNECT"  */
-            {STATE_CONN_INFRA_MLME_WAIT, actionUnexpected},             /* "EVENT_SCR_SUCC" */
-            {STATE_CONN_INFRA_MLME_WAIT, actionUnexpected},             /* "EVENT_JOIN_CMD_CMPLT"*/
-            {STATE_CONN_INFRA_WAIT_DISCONNECT, mlmeWait_to_WaitDisconnect}, /* "EVENT_DISCONNECT"       */
-            {STATE_CONN_INFRA_RSN_WAIT,  mlmeWait_to_rsnWait},          /* "EVENT_MLME_SUCC"*/
-            {STATE_CONN_INFRA_MLME_WAIT, actionUnexpected},             /* "EVENT_RSN_SUCC" */
-            {STATE_CONN_INFRA_MLME_WAIT, actionUnexpected},             /* "EVENT_CONFIG_HW" */
-            {STATE_CONN_INFRA_MLME_WAIT, actionUnexpected}              /* "EVENT_DISCONN_COMPLETE" */   
-        },
-        
-        /* next state and actions for RSN_WAIT state */
-        {   {STATE_CONN_INFRA_RSN_WAIT,     actionUnexpected},          /* "EVENT_CONNECT"  */
-            {STATE_CONN_INFRA_RSN_WAIT,     actionUnexpected},          /* "EVENT_SCR_SUCC" */
-            {STATE_CONN_INFRA_RSN_WAIT,     actionUnexpected},          /* "EVENT_JOIN_CMD_CMPLT"*/
-            {STATE_CONN_INFRA_WAIT_DISCONNECT,    rsnWait_to_disconnect},   /* "EVENT_DISCONNECT" */
-            {STATE_CONN_INFRA_RSN_WAIT,     actionUnexpected},          /* "EVENT_MLME_SUCC"*/
-            {STATE_CONN_INFRA_CONFIG_HW,    rsnWait_to_configHW},       /* "EVENT_RSN_SUCC" */
-            {STATE_CONN_INFRA_RSN_WAIT,     actionUnexpected},          /* "EVENT_CONFIG_HW"        */
-            {STATE_CONN_INFRA_RSN_WAIT,     actionUnexpected}           /* "EVENT_DISCONN_COMPLETE" */
-        },
-        
-        /* next state and actions for CONFIG_HW state */
-        {   {STATE_CONN_INFRA_CONFIG_HW, actionUnexpected},             /* "EVENT_CONNECT"  */
-            {STATE_CONN_INFRA_CONFIG_HW, actionUnexpected},             /* "EVENT_SCR_SUCC" */
-            {STATE_CONN_INFRA_CONFIG_HW, actionUnexpected},             /* "EVENT_JOIN_CMD_CMPLT"*/
-            {STATE_CONN_INFRA_WAIT_DISCONNECT, configHW_to_disconnect},     /* "EVENT_DISCONNECT"       */
-            {STATE_CONN_INFRA_CONFIG_HW, actionUnexpected},             /* "EVENT_MLME_SUCC"*/
-            {STATE_CONN_INFRA_CONFIG_HW, actionUnexpected},             /* "EVENT_RSN_SUCC" */
-            {STATE_CONN_INFRA_CONNECTED, configHW_to_connected},        /* "EVENT_CONFIG_HW"        */
-            {STATE_CONN_INFRA_CONFIG_HW, actionUnexpected}              /* "EVENT_DISCONN_COMPLETE" */   
-        },
-
-        /* next state and actions for CONNECTED state */
-        {   {STATE_CONN_INFRA_SCR_WAIT_CONN, connect_to_ScrWait},   /* "EVENT_CONNECT"  */
-            {STATE_CONN_INFRA_CONNECTED, actionUnexpected},         /* "EVENT_SCR_SUCC"*/
-            {STATE_CONN_INFRA_CONNECTED, actionUnexpected},         /* "EVENT_JOIN_CMD_CMPLT" */
-            {STATE_CONN_INFRA_SCR_WAIT_DISCONN, connInfra_ScrWait}, /* "EVENT_DISCONNECT"       */
-            {STATE_CONN_INFRA_CONNECTED, actionUnexpected},         /* "EVENT_MLME_SUCC"*/
-            {STATE_CONN_INFRA_CONNECTED, actionUnexpected},         /* "EVENT_RSN_SUCC" */
-            {STATE_CONN_INFRA_CONNECTED, actionUnexpected},         /* "STATE_CONN_INFRA_CONFIG_HW" */
-            {STATE_CONN_INFRA_CONNECTED, actionUnexpected}          /* "EVENT_DISCONN_COMPLETE" */   
-        },
-        
-        /* next state and actions for SCR_WAIT_DISCONN state */
-        {   {STATE_CONN_INFRA_SCR_WAIT_DISCONN, actionUnexpected},     /* "EVENT_CONNECT"  */
-            {STATE_CONN_INFRA_WAIT_DISCONNECT       , connInfra_ScrWaitDisconn_to_disconnect},  /* "EVENT_SCR_SUCC"*/
-            {STATE_CONN_INFRA_SCR_WAIT_DISCONN, actionUnexpected},     /* "EVENT_JOIN_CMD_CMPLT */
-            {STATE_CONN_INFRA_SCR_WAIT_DISCONN, ScrWait_to_idle},      /* "EVENT_DISCONNECT"       */
-            {STATE_CONN_INFRA_SCR_WAIT_DISCONN, actionUnexpected},     /* "EVENT_MLME_SUCC"*/
-            {STATE_CONN_INFRA_SCR_WAIT_DISCONN, actionUnexpected},     /* "EVENT_RSN_SUCC" */
-            {STATE_CONN_INFRA_SCR_WAIT_DISCONN, actionNop},            /* "EVENT_CONFIG_HW "*/
-            {STATE_CONN_INFRA_SCR_WAIT_DISCONN, actionNop}             /* "EVENT_DISCONN_COMPLETE" */
-        },
-
-        /* next state and actions for STATE_CONN_INFRA_WAIT_DISCONNECT state */
-        {   {STATE_CONN_INFRA_WAIT_DISCONNECT, actionUnexpected},               /* "EVENT_CONNECT"  */
-            {STATE_CONN_INFRA_WAIT_DISCONNECT, actionUnexpected},               /* "STATE_CONN_INFRA_SCR_WAIT_CONN"*/
-            {STATE_CONN_INFRA_WAIT_DISCONNECT, actionUnexpected},               /* "EVENT_JOIN_CMD_CMPLT" */
-            {STATE_CONN_INFRA_WAIT_DISCONNECT, actionUnexpected},               /* "EVENT_DISCONNECT" */
-            {STATE_CONN_INFRA_WAIT_DISCONNECT, actionUnexpected},               /* "EVENT_MLME_SUCC"*/
-            {STATE_CONN_INFRA_WAIT_DISCONNECT, actionUnexpected},               /* "EVENT_RSN_SUCC" */
-            {STATE_CONN_INFRA_WAIT_DISCONNECT, actionUnexpected},               /* "STATE_CONN_INFRA_CONFIG_HW"  */
-            {STATE_CONN_INFRA_IDLE           , connInfra_WaitDisconnectToIdle}  /* "EVENT_DISCONN_COMPLETE" */       
-        }
-        
-    };
-
-    scr_registerClientCB( pConn->hScr, SCR_CID_CONNECT, InfraConnSM_ScrCB, pConn );
-
-    return fsm_Config(pConn->infra_pFsm, (fsm_Matrix_t)smMatrix, CONN_INFRA_NUM_STATES, CONN_INFRA_NUM_EVENTS, conn_infraSMEvent, pConn->hOs);
-}
-
-/***********************************************************************
- *                        conn_infraSMEvent                                 
- ***********************************************************************
-DESCRIPTION: Infra Connection SM event processing function, called by the connection API
-                Perform the following:
-                -   Print the state movement as a result from the event
-                -   Calls the generic state machine event processing function which preform the following:
-                    -   Calls the correspoding callback function
-                    -   Move to next state
-                
-INPUT:      currentState    -   Pointer to the connection current state.
-            event   -   Received event
-            pConn   -   Connection handle
-
-OUTPUT:     
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS conn_infraSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hConn)
-{
-   conn_t *pConn = (conn_t *)hConn;
-    TI_STATUS       status;
-    TI_UINT8       nextState;
-
-    status = fsm_GetNextState(pConn->infra_pFsm, *currentState, event, &nextState);
-    if (status != TI_OK)
-    {
-        TRACE0(pConn->hReport, REPORT_SEVERITY_SM, "State machine error, failed getting next state\n");
-        return(TI_NOK);
-    }
-
-	TRACE3( pConn->hReport, REPORT_SEVERITY_INFORMATION, "conn_infraSMEvent: <currentState = %d, event = %d> --> nextState = %d\n", *currentState, event, nextState);
-
-    status = fsm_Event(pConn->infra_pFsm, currentState, event, (void *)pConn);
-
-    return status;
-}
-
-/************************************************************************************************************/
-/*      In the following section are listed the callback function used by the Infra connection state machine    */
-/************************************************************************************************************/
-
-/* JOIN, SET_DATA_PORT_NOTIFY, START_MLME */
-static TI_STATUS ScrWait_to_JoinWait(void *pData)
-{
-    TI_STATUS status;
-    conn_t *pConn = (conn_t *)pData; 
-
-    status = siteMgr_join(((conn_t *)pData)->hSiteMgr );
-    /* If the Join command was failed we report the SME that connection failure so it could exit connecting state */
-    if (status != TI_OK)
-    {
-       TRACE0(pConn->hReport, REPORT_SEVERITY_ERROR, "Join command has failed!\n");
-    }
-    return status;
-}
-
-
-static TI_STATUS JoinWait_to_mlmeWait(void *pData)
-{
-    TI_STATUS status;
-    paramInfo_t *pParam;
-    conn_t *pConn = (conn_t *)pData;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    /* Set the BA session policies to the FW */
-    qosMngr_SetBaPolicies(pConn->hQosMngr);
-
-    pParam->paramType = SITE_MGR_CURRENT_CHANNEL_PARAM;
-    siteMgr_getParam(pConn->hSiteMgr, pParam);
-
-    pParam->paramType = REGULATORY_DOMAIN_TX_POWER_AFTER_SELECTION_PARAM;
-    pParam->content.channel = pParam->content.siteMgrCurrentChannel;
-    regulatoryDomain_setParam(pConn->hRegulatoryDomain, pParam);
-
-    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
-    pParam->content.rxDataPortStatus = OPEN_NOTIFY;
-    status = rxData_setParam(pConn->hRxData, pParam);
-    if (status != TI_OK)
-    {
-        TRACE1( pConn->hReport, REPORT_SEVERITY_FATAL_ERROR, "JoinWait_to_mlmeWait: rxData_setParam return 0x%x.\n", status);
-        os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
-        return status;
-    }
-
-    /* Update TxMgmtQueue SM to open Tx path only for Mgmt packets. */
-    txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_MGMT);
-
-    /* 
-     * Set the reassociation flag in the association logic.
-     */ 
-    pParam->paramType = MLME_RE_ASSOC_PARAM;
-
-    if( pConn->connType == CONN_TYPE_ROAM )
-        pParam->content.mlmeReAssoc = TI_TRUE;
-    else 
-        pParam->content.mlmeReAssoc = TI_FALSE;
-
-    status = mlme_setParam(pConn->hMlmeSm, pParam);
-
-    if (status != TI_OK)
-    {
-        TRACE1( pConn->hReport, REPORT_SEVERITY_FATAL_ERROR, "JoinWait_to_mlmeWait: mlme_setParam return 0x%x.\n", status);
-    }
-    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
-    return mlme_start(pConn->hMlmeSm);
-}
-
-
-/* STOP_MLME, SET_DATA_PORT_CLOSE, DIS_JOIN */
-static TI_STATUS mlmeWait_to_WaitDisconnect(void *pData)
-{
-    TI_STATUS   status;
-    paramInfo_t *pParam;
-    conn_t      *pConn = (conn_t *)pData;
-
-    status = mlme_stop( pConn->hMlmeSm, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP );
-    if (status != TI_OK)
-        return status;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
-    pParam->content.rxDataPortStatus = CLOSE;
-    rxData_setParam(pConn->hRxData, pParam);
-
-    /* Update TxMgmtQueue SM to close Tx path. */
-    txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_CLOSE);
-
-    /* Start the disconnect complete time out timer. 
-       Disconect Complete event, which stops the timer. */
-    tmr_StartTimer (pConn->hConnTimer, conn_timeout, (TI_HANDLE)pConn, DISCONNECT_TIMEOUT_MSEC, TI_FALSE);
-
-    /* FW will send the disconn frame according to disConnType */ 
-    TWD_CmdFwDisconnect (pConn->hTWD, pConn->disConnType, pConn->disConnReasonToAP); 
-
-#ifdef XCC_MODULE_INCLUDED
-    XCCMngr_updateIappInformation(pConn->hXCCMngr, XCC_DISASSOC);
-#endif
-    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
-    return TI_OK;
-}
-
-/* This function is called from the WAIT_FOR_JOIN_CB_CMPLT state (before mlme_start)
-  - all we need to do is call siteMgr_disJoin */
-static TI_STATUS JoinWait_to_WaitDisconnect(void *pData)
-{
-    conn_t *pConn = (conn_t *)pData; 
-
-    /* Start the disconnect complete time out timer. 
-       Disconect Complete event, which stops the timer. */
-    tmr_StartTimer (pConn->hConnTimer, conn_timeout, (TI_HANDLE)pConn, DISCONNECT_TIMEOUT_MSEC, TI_FALSE);
-
-    /* FW will send the disconn frame according to disConnType */ 
-    TWD_CmdFwDisconnect (pConn->hTWD, pConn->disConnType, pConn->disConnReasonToAP); 
-    
-   return TI_OK;
-}
-
-/* SET_DATA_PORT_EAPOL, START_RSN */
-static TI_STATUS mlmeWait_to_rsnWait(void *pData)
-{
-    TI_STATUS status;
-    paramInfo_t *pParam;
-    conn_t *pConn = (conn_t *)pData;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
-    pParam->content.rxDataPortStatus = OPEN_EAPOL;
-    status = rxData_setParam(pConn->hRxData, pParam);
-    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
-    if (status != TI_OK)
-        return status;
-    /* Update TxMgmtQueue SM to enable EAPOL packets. */
-    txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_EAPOL);
-    
-    /*
-     *  Notify that the driver is associated to the supplicant\IP stack. 
-     */
-    EvHandlerSendEvent(pConn->hEvHandler, IPC_EVENT_ASSOCIATED, NULL,0);
-    status = rsn_start(pConn->hRsn);
-    return status;
-}
-
-
-
-/* STOP_RSN, SET_DATA_PORT_CLOSE, STOP_MLME, DIS_JOIN */
-static TI_STATUS rsnWait_to_disconnect(void *pData)
-{
-    TI_STATUS status;
-    paramInfo_t *pParam;
-    conn_t *pConn = (conn_t *)pData;
-
-    status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys);
-    if (status != TI_OK)
-        return status;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
-    pParam->content.rxDataPortStatus = CLOSE;
-    status = rxData_setParam(pConn->hRxData, pParam);
-    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
-    if (status != TI_OK)
-        return status;
-
-    /* Update TxMgmtQueue SM to close Tx path for all except Mgmt packets. */
-    txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_MGMT);
-
-    status = mlme_stop( pConn->hMlmeSm, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP );
-
-    if (status != TI_OK)
-        return status;
-
-    /* send disconnect command to firmware */
-    prepare_send_disconnect(pData);
-
-    return TI_OK;
-}
-
-
-/* STOP_RSN, SET_DATA_PORT_CLOSE, STOP_MLME, DIS_JOIN */
-static TI_STATUS configHW_to_disconnect(void *pData)
-{
-    TI_STATUS status;
-    paramInfo_t *pParam;
-    conn_t *pConn = (conn_t *)pData;
-
-    status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys );
-    if (status != TI_OK)
-        return status;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
-    pParam->content.rxDataPortStatus = CLOSE;
-    status = rxData_setParam(pConn->hRxData, pParam);
-    if (status == TI_OK) 
-    {
-        /* Update TxMgmtQueue SM to close Tx path for all except Mgmt packets. */
-        txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_MGMT);
-
-        status = mlme_stop( pConn->hMlmeSm, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP );
-        if (status == TI_OK) 
-        {
-            pParam->paramType = REGULATORY_DOMAIN_DISCONNECT_PARAM;
-            regulatoryDomain_setParam(pConn->hRegulatoryDomain, pParam);
-        
-            /* Must be called AFTER mlme_stop. since De-Auth packet should be sent with the
-                supported rates, and stopModules clears all rates. */
-            stopModules(pConn, TI_TRUE);
-        
-            /* send disconnect command to firmware */
-            prepare_send_disconnect(pData);
-        }
-    }
-    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
-    return status;
-}
-
-static TI_STATUS connInfra_ScrWaitDisconn_to_disconnect(void *pData)
-{
-    TI_STATUS status;
-    paramInfo_t *pParam;
-    conn_t *pConn = (conn_t *)pData;
-    
-    status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys);
-    if (status != TI_OK)
-        return status;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
-    pParam->content.rxDataPortStatus = CLOSE;
-    status = rxData_setParam(pConn->hRxData, pParam);
-    if (status == TI_OK) 
-    {
-        /* Update TxMgmtQueue SM to close Tx path for all except Mgmt packets. */
-        txMgmtQ_SetConnState(pConn->hTxMgmtQ, TX_CONN_STATE_MGMT);
-    
-        pParam->paramType = REGULATORY_DOMAIN_DISCONNECT_PARAM;
-        regulatoryDomain_setParam(pConn->hRegulatoryDomain, pParam);
-    
-        status = mlme_stop(pConn->hMlmeSm, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP);
-        if (status == TI_OK) 
-        {
-            /* Must be called AFTER mlme_stop. since De-Auth packet should be sent with the
-                supported rates, and stopModules clears all rates. */
-            stopModules(pConn, TI_TRUE);
-        
-            /* send disconnect command to firmware */
-            prepare_send_disconnect(pData);
-        }
-    }
-    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
-    return status;
-
-}
-
-
-static TI_STATUS rsnWait_to_configHW(void *pData)
-{
-    conn_t *pConn=(conn_t *)pData;
-    TI_STATUS status;
-    paramInfo_t *pParam;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    /* Open the RX to DATA */
-    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
-    pParam->content.rxDataPortStatus = OPEN;
-    status = rxData_setParam(pConn->hRxData, pParam);
-    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
-    if (status != TI_OK)
-         return status;
-
-    status = qosMngr_connect(pConn->hQosMngr);
-    if (status != TI_OK)
-    {
-         TRACE2(pConn->hReport, REPORT_SEVERITY_ERROR, "Infra Conn status=%d, have to return (%d)\n",status,__LINE__);
-         return status;
-    }
-
-    status = measurementMgr_connected(pConn->hMeasurementMgr);
-    if (status != TI_OK)
-    {
-         TRACE2(pConn->hReport, REPORT_SEVERITY_ERROR, "Infra Conn status=%d, have to return (%d)\n",status,__LINE__);
-         return status;
-    }
-
-    status = TrafficMonitor_Start(pConn->hTrafficMonitor);
-    if (status != TI_OK)
-    {
-         TRACE2(pConn->hReport, REPORT_SEVERITY_ERROR, "Infra Conn status=%d, have to return (%d)\n",status,__LINE__);
-         return status;
-    }
-
-    healthMonitor_setState(pConn->hHealthMonitor, HEALTH_MONITOR_STATE_CONNECTED);
-
-    switchChannel_start(pConn->hSwitchChannel);
-
-    scanCncn_SwitchToConnected (pConn->hScanCncn);
-
-    PowerMgr_startPS(pConn->hPwrMngr);
-    
-    TRACE1(pConn->hReport, REPORT_SEVERITY_INFORMATION, "rsnWait_to_configHW: setStaStatus %d\n",STA_STATE_CONNECTED);
-    TWD_CmdSetStaState(pConn->hTWD, STA_STATE_CONNECTED, (void *)conn_ConfigHwFinishCb, pData);
-
-    return TI_OK;
-}
-
-/* last command of rsnWait_to_configHW callback */
-int conn_ConfigHwFinishCb(TI_HANDLE pData)
-{
-    conn_t *pConn = (conn_t *)pData;
-
-    TRACE0(pConn->hReport, REPORT_SEVERITY_INFORMATION, "conn_MboxFlushFinishCb: called \n");
-    return conn_infraSMEvent(&pConn->state, CONN_INFRA_HW_CONFIGURED, pConn);
-}
-
-static TI_STATUS configHW_to_connected(void *pData)
-{
-    conn_t          *pConn=(conn_t *)pData;
-    EScrResourceId  uResourceIndex;
-
-    /* Update TxMgmtQueue SM to open Tx path to all packets. */
-    txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_OPEN);
-
-#ifdef XCC_MODULE_INCLUDED
-    XCCMngr_updateIappInformation(pConn->hXCCMngr, XCC_ASSOC_OK);
-#endif
-
-    /* Start keep alive process */
-    siteMgr_start(pConn->hSiteMgr);
-
-    /* free both SCR resources */
-    for (uResourceIndex = SCR_RESOURCE_SERVING_CHANNEL;
-         uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES;
-         uResourceIndex++)
-    {
-        scr_clientComplete(pConn->hScr, SCR_CID_CONNECT, uResourceIndex );
-        pConn->scrRequested[ uResourceIndex ] = TI_FALSE;
-    }
-
-    /* Update current BSS connection type and mode */
-    currBSS_updateConnectedState(pConn->hCurrBss, TI_TRUE, BSS_INFRASTRUCTURE);
-
-    pConn->pConnStatusCB( pConn->connStatCbObj, STATUS_SUCCESSFUL, 0);
-    
-    SoftGemini_SetPSmode(pConn->hSoftGemini);
-#ifdef REPORT_LOG  
-    TRACE0(pConn->hReport, REPORT_SEVERITY_CONSOLE, "************ NEW CONNECTION ************\n"); 
-    WLAN_OS_REPORT(("************ NEW CONNECTION ************\n"));
-    siteMgr_printPrimarySiteDesc(pConn->hSiteMgr);
-    TRACE0(pConn->hReport, REPORT_SEVERITY_CONSOLE, "****************************************\n"); 
-    WLAN_OS_REPORT(("****************************************\n"));
-#else
-    os_printf("%s: *** NEW CONNECTION ***\n", __func__);
-#endif
-
-    return TI_OK;
-}
-
-
-static TI_STATUS actionUnexpected(void *pData) 
-{
-#ifdef TI_DBG
-    conn_t *pConn = (conn_t *)pData; 
-    
-    TRACE0(pConn->hReport, REPORT_SEVERITY_SM, "State machine error, unexpected Event\n\n");
-#endif /*TI_DBG*/
-    
-    return TI_OK;
-}
-
-static TI_STATUS actionNop(void *pData) 
-{
-    return TI_OK;
-}
-
-
-static TI_STATUS connInfra_ScrWait(void *pData)
-{
-    conn_t *pConn = (conn_t *)pData;
-    EScrClientRequestStatus scrReplyStatus[ SCR_RESOURCE_NUM_OF_RESOURCES ];
-    EScePendReason          scrPendReason[ SCR_RESOURCE_NUM_OF_RESOURCES ];
-    EScrResourceId          uResourceIndex;
-
-    TRACE0( pConn->hReport, REPORT_SEVERITY_INFORMATION, "Infra Connnect SM: Requesting SCR.\n");
-
-    /* request the SCR for both resources, and act according to return status */
-    for (uResourceIndex = SCR_RESOURCE_SERVING_CHANNEL;
-         uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES;
-         uResourceIndex++)
-    {
-        scrReplyStatus[ uResourceIndex ] = scr_clientRequest( pConn->hScr, SCR_CID_CONNECT, 
-                                                              uResourceIndex, 
-                                                              &(scrPendReason[ uResourceIndex ]));
-        pConn->scrRequested[ uResourceIndex ] = TI_TRUE;
-
-        /* sanity check */
-        if ((scrReplyStatus[ uResourceIndex ] > SCR_CRS_PEND) ||
-            (scrReplyStatus[ uResourceIndex ] < SCR_CRS_RUN))
-        {
-            TRACE2(pConn->hReport, REPORT_SEVERITY_ERROR , "Idle_to_ScrWait: SCR for resource %d returned status %d\n", uResourceIndex, scrReplyStatus[ uResourceIndex ]);
-            return TI_NOK;
-        }
-    }
-
-    /* analyze SCR results: */
-    /* both returned run - continue to next stage */
-    if ((SCR_CRS_RUN == scrReplyStatus[ SCR_RESOURCE_SERVING_CHANNEL ]) &&
-        (SCR_CRS_RUN == scrReplyStatus[ SCR_RESOURCE_PERIODIC_SCAN ]))
-    {
-        /* send an SCR SUCCESS event to the SM */
-        TRACE0( pConn->hReport, REPORT_SEVERITY_INFORMATION, "Infra Conn: SCR acquired.\n");
-        conn_infraSMEvent(&pConn->state, CONN_INFRA_SCR_SUCC, (TI_HANDLE) pConn);
-    }
-    else
-    {
-        /* mark which resource is pending (or both) */
-        for (uResourceIndex = SCR_RESOURCE_PERIODIC_SCAN;
-             uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES;
-             uResourceIndex++)
-        {
-            if (SCR_CRS_PEND == scrReplyStatus[ uResourceIndex ])
-            {
-                TRACE2( pConn->hReport, REPORT_SEVERITY_INFORMATION, "Infra Conn: SCR pending for resource %d with pend reason: %d, stay in wait SCR state.\n", uResourceIndex, scrPendReason);
-                pConn->bScrAcquired[ uResourceIndex ] = TI_FALSE;
-            }
-            else
-            {
-                pConn->bScrAcquired[ uResourceIndex ] = TI_TRUE;
-            }
-        }
-    }
-    return TI_OK;
-}
-
-
-
-void InfraConnSM_ScrCB( TI_HANDLE hConn, EScrClientRequestStatus requestStatus,
-                        EScrResourceId eResource, EScePendReason pendReason )
-{
-    conn_t *pConn = (conn_t *)hConn;
-
-    TRACE2( pConn->hReport, REPORT_SEVERITY_INFORMATION, "InfraConnSM_ScrCB called by SCR for resource %d. Status is: %d.\n", eResource, requestStatus);
-    
-    /* act according to the request staus */
-    switch ( requestStatus )
-    {
-    case SCR_CRS_RUN:
-        TRACE0( pConn->hReport, REPORT_SEVERITY_INFORMATION, "Infra Conn: SCR acquired.\n");
-        /* mark that the SCR was acquired for this resource */
-        pConn->bScrAcquired[ eResource ] = TI_TRUE;
-
-        /* if both resources had now been acquired */
-        if ((TI_TRUE == pConn->bScrAcquired[ SCR_RESOURCE_SERVING_CHANNEL ]) &&
-            (TI_TRUE == pConn->bScrAcquired[ SCR_RESOURCE_PERIODIC_SCAN ]))
-        {
-            /* send an SCR SUCCESS event to the SM */
-            conn_infraSMEvent(&pConn->state, CONN_INFRA_SCR_SUCC, (TI_HANDLE) pConn);
-        }
-        break;
-
-    case SCR_CRS_FW_RESET:
-        /* Ignore FW reset, the MLME SM will handle re-try of the conn */
-        TRACE0( pConn->hReport, REPORT_SEVERITY_INFORMATION, "Infra Conn: Recovery occured.\n");
-        break;
-
-    default:
-        TRACE3( pConn->hReport, REPORT_SEVERITY_ERROR, "Illegal SCR request status:%d, pend reason:%d, resource: %d.\n", requestStatus, pendReason, eResource);
-        break;
-    }
-}
-
-
-
-static TI_STATUS ScrWait_to_idle(void *pData)
-{
-    conn_t          *pConn = (conn_t *)pData;
-    EScrResourceId  uResourceIndex;
-
-    TRACE0( pConn->hReport, REPORT_SEVERITY_INFORMATION, "Infra Connnect SM: Stop event while in SCR wait, moving to IDLE.\n");
-
-    /* free both SCR resources */
-    for (uResourceIndex = SCR_RESOURCE_SERVING_CHANNEL;
-         uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES;
-         uResourceIndex++)
-    {
-        scr_clientComplete(pConn->hScr, SCR_CID_CONNECT, uResourceIndex );
-        pConn->scrRequested[ uResourceIndex ] = TI_FALSE;
-    }
-
-    /*
-     * Call the connection lost callback set by the SME or AP_CONN.
-     */
-    pConn->pConnStatusCB( pConn->connStatCbObj, pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode);
-
-    return TI_OK;
-}
-
-
-static TI_STATUS stopModules( conn_t *pConn, TI_BOOL bDisconnect )
-{
-   
-    measurementMgr_disconnected(pConn->hMeasurementMgr);
-
-    rxData_stop(pConn->hRxData);
-
-    ctrlData_stop(pConn->hCtrlData);
-    
-    TrafficMonitor_Stop(pConn->hTrafficMonitor);
-
-    switchChannel_stop(pConn->hSwitchChannel);
-
-    healthMonitor_setState(pConn->hHealthMonitor, HEALTH_MONITOR_STATE_DISCONNECTED);
-
-    siteMgr_stop(pConn->hSiteMgr);
-
-    /* stopping power save */
-    PowerMgr_stopPS(pConn->hPwrMngr, bDisconnect);
-
-    scanCncn_SwitchToNotConnected (pConn->hScanCncn);
-
-    /* Set Current BSS Module to stop triggerring roaming events */
-    currBSS_updateConnectedState(pConn->hCurrBss, TI_FALSE, BSS_INFRASTRUCTURE);
-
-    SoftGemini_unSetPSmode(pConn->hSoftGemini);
-
-    return TI_OK;
-}
-
-
-static TI_STATUS prepare_send_disconnect(void *pData)
-{
-    conn_t          *pConn = (conn_t *)pData;
-
-    txCtrlParams_setEapolEncryptionStatus(pConn->hTxCtrl, DEF_EAPOL_ENCRYPTION_STATUS);
-    qosMngr_disconnect (pConn->hQosMngr, TI_TRUE);
-
-#ifdef XCC_MODULE_INCLUDED
-    measurementMgr_disableTsMetrics(pConn->hMeasurementMgr, MAX_NUM_OF_AC);
-#endif
-
-    /* Start the disconnect complete time out timer. 
-       Disconect Complete event, which stops the timer. */
-    tmr_StartTimer (pConn->hConnTimer, conn_timeout, (TI_HANDLE)pConn, DISCONNECT_TIMEOUT_MSEC, TI_FALSE);
-
-    /* FW will send the disconn frame according to disConnType */ 
-    TWD_CmdFwDisconnect (pConn->hTWD, pConn->disConnType, pConn->disConnReasonToAP); 
-
-#ifdef XCC_MODULE_INCLUDED
-    XCCMngr_updateIappInformation(pConn->hXCCMngr, XCC_DISASSOC);
-#endif
-
-    return TI_OK;
-}
-
-static TI_STATUS connInfra_WaitDisconnectToIdle(void *pData)
-{
-    conn_t          *pConn = (conn_t *)pData;
-    EScrResourceId  uResourceIndex;
-
-    /* close all BA sessions */
-    TWD_CloseAllBaSessions(pConn->hTWD);
-
-    /* Stop the disconnect timeout timer. */
-    tmr_StopTimer (pConn->hConnTimer);
-
-    /*
-     * In case of connection failuer we might get here without freeing the SCR.
-     */
-    for (uResourceIndex = SCR_RESOURCE_SERVING_CHANNEL;
-         uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES;
-         uResourceIndex++)
-    {
-        if (pConn->scrRequested[ uResourceIndex ] == TI_TRUE)
-        {
-            scr_clientComplete(pConn->hScr, SCR_CID_CONNECT, uResourceIndex );
-            pConn->scrRequested[ uResourceIndex ] = TI_FALSE;
-        }
-    }
-
-    /*
-     * Call the connection lost callback set by the SME or AP_CONN.
-     */
-    pConn->pConnStatusCB( pConn->connStatCbObj, pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode);
-
-    return TI_OK;
-}
-
-static TI_STATUS connect_to_ScrWait(void *pData)
-{
-    TI_STATUS   status;
-    paramInfo_t *pParam;
-    conn_t      *pConn = (conn_t *)pData;
-
-    /*
-     * This function performs roaming by two steps:
-     * First - close the current connection without notify the SME.
-     * Second - start new connection in reassociation mode.
-     */ 
-
-    /* close all BA sessions */
-    TWD_CloseAllBaSessions(pConn->hTWD);
-
-    status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys);
-    if (status != TI_OK)
-        return status;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
-    pParam->content.rxDataPortStatus = CLOSE;
-    status = rxData_setParam(pConn->hRxData, pParam);
-    if (status == TI_OK)
-    {
-        /* Update TxMgmtQueue SM to close Tx path. */
-        txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_CLOSE);
-
-        status = mlme_stop(pConn->hMlmeSm, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP);
-        if (status == TI_OK)
-        {
-            pParam->paramType = REGULATORY_DOMAIN_DISCONNECT_PARAM;
-            regulatoryDomain_setParam(pConn->hRegulatoryDomain, pParam);
-
-#ifdef XCC_MODULE_INCLUDED
-            XCCMngr_updateIappInformation(pConn->hXCCMngr, XCC_DISASSOC);
-#endif
-        /* Must be called AFTER mlme_stop. since De-Auth packet should be sent with the
-            supported rates, and stopModules clears all rates. */
-            stopModules(pConn, TI_FALSE);
-
-            txCtrlParams_setEapolEncryptionStatus(pConn->hTxCtrl, DEF_EAPOL_ENCRYPTION_STATUS);
-            qosMngr_disconnect (pConn->hQosMngr, TI_FALSE);
-
-        /* 
-         * Start new connection.
-         */ 
-            connInfra_ScrWait(pConn);
-        }
-    }
-
-    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
-    return status;
-}
-
-static TI_STATUS Idle_to_Idle(void *pData)
-{
-    conn_t *pConn = (conn_t *)pData;
-
-    /* 
-     * In case we are in IDLE and getting DISCONNECT event, we need to inform
-     * the SME\AP_connection that we are disconnected. 
-     * Call the connection lost callback set by the SME or AP_CONN.
-     */
-    pConn->pConnStatusCB( pConn->connStatCbObj, pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode);
-
-    return TI_OK;
-}
-
-/***********************************************************************
-                connInfra_JoinCmpltNotification
- ***********************************************************************
-DESCRIPTION: Call back upon receving Join Event Complete.
-
-INPUT:      hSiteMgr    -   site mgr handle.
-
-OUTPUT:
-
-RETURN:     
-************************************************************************/
-TI_STATUS connInfra_JoinCmpltNotification(TI_HANDLE hconn)
-{
-    conn_t *pConn = (conn_t *)hconn;
-    
-    TRACE0(pConn->hReport, REPORT_SEVERITY_INFORMATION, "connInfra_JoinCmpltNotification: has been called\n");
-
-   if (pConn->currentConnType == CONNECTION_INFRA ) {
-       conn_infraSMEvent(&pConn->state, CONN_INFRA_JOIN_CMD_CMPLT, pConn);
-   }
-
-   return TI_OK;
-}
-
-void connInfra_DisconnectComplete (conn_t *pConn, TI_UINT8  *data, TI_UINT8   dataLength)
-{
-    /* send an DISCONNECT COMPLETE event to the SM */
-    conn_infraSMEvent(&pConn->state, CONN_INFRA_DISCONN_COMPLETE, (TI_HANDLE) pConn);
-}
diff --git a/wl1271/stad/src/Connection_Managment/connInfra.h b/wl1271/stad/src/Connection_Managment/connInfra.h
deleted file mode 100644
index 6e32867..0000000
--- a/wl1271/stad/src/Connection_Managment/connInfra.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * connInfra.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file connInfra.h
- *  \brief Infra connection header file
- *
- *  \see connInfra.c
- */
-
-/***************************************************************************/
-/*																									*/
-/*	  MODULE:	infraConn.h																*/
-/*    PURPOSE:	Infrastructure connection header file			 								*/
-/*																									*/
-/***************************************************************************/
-#ifndef __CONN_INFRA_H__
-#define __CONN_INFRA_H__
-
-#include "tidef.h"
-#include "paramOut.h"
-#include "conn.h"
-
-/* Infra connection SM events */
-typedef enum 
-{
-	CONN_INFRA_CONNECT				= 0,
-	CONN_INFRA_SCR_SUCC ,
-    CONN_INFRA_JOIN_CMD_CMPLT ,
-	CONN_INFRA_DISCONNECT ,
-	CONN_INFRA_MLME_SUCC ,
-	CONN_INFRA_RSN_SUCC	,
-	CONN_INFRA_HW_CONFIGURED ,
-	CONN_INFRA_DISCONN_COMPLETE ,
-    CONN_INFRA_NUM_EVENTS			
-} connInfraEvent_e;
-
-/* Infra connection states */
-typedef enum
-{
-	STATE_CONN_INFRA_IDLE	                 = 0,
-	STATE_CONN_INFRA_SCR_WAIT_CONN			 = 1,
-    STATE_CONN_INFRA_WAIT_JOIN_CMPLT         = 2,
-	STATE_CONN_INFRA_MLME_WAIT			     = 3,
-	STATE_CONN_INFRA_RSN_WAIT			     = 4,
-	STATE_CONN_INFRA_CONFIG_HW 		         = 5,
-    STATE_CONN_INFRA_CONNECTED			     = 6,
-    STATE_CONN_INFRA_SCR_WAIT_DISCONN   	 = 7,
-    STATE_CONN_INFRA_WAIT_DISCONNECT         = 8,
-    CONN_INFRA_NUM_STATES
-} infra_state_e;
-
-TI_STATUS conn_infraConfig(conn_t *pConn);
-
-TI_STATUS conn_infraSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hConn);
-
-TI_STATUS connInfra_JoinCmpltNotification(TI_HANDLE hconn);
-
-void connInfra_DisconnectComplete (conn_t *pConn, TI_UINT8  *data, TI_UINT8   dataLength);
-
-#endif /* __CONN_INFRA_H__ */
diff --git a/wl1271/stad/src/Connection_Managment/externalSec.c b/wl1271/stad/src/Connection_Managment/externalSec.c
deleted file mode 100644
index 64d7c9b..0000000
--- a/wl1271/stad/src/Connection_Managment/externalSec.c
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * externalSec.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file externalSec.c
- * \brief station externalSec implementation
- *
- * \see externalSec.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	station externalSec		                                    *
- *   PURPOSE:   station uexternalSec implementation						    *
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_134
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-#include "smeApi.h"
-#include "mainSecSm.h"
-#include "externalSec.h"
-#include "connApi.h"
-
-TI_STATUS externalSecSM_Nop(struct externalSec_t *pExternalSec);
-TI_STATUS externalSecSM_start(mainSec_t *pMainSec);
-TI_STATUS externalSecSM_stop(mainSec_t *pMainSec);
-TI_STATUS externalSecSM_setPort(struct externalSec_t *pExternalSec);
-TI_STATUS externalSecSM_Unexpected(struct externalSec_t *pExternalSec);
-/**
-*
-* Function  - externalSec_config.
-*
-* \b Description: 
-*
-* Called by mainSecSM (mainSec_config). 
-* builds the SM and register the mainSec start and stop events.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-TI_STATUS externalSec_config(mainSec_t *pMainSec)
-{
-    struct externalSec_t	 *pExtSec = pMainSec-> pExternalSec;
-	TI_STATUS                status = TI_NOK;
-	
-	/** Station externalSec State Machine matrix */
-    fsm_actionCell_t externalSec_matrix[EXTERNAL_SEC_NUM_STATES][EXTERNAL_SEC_NUM_EVENTS] =
-	{
-    	/* next state and actions for IDLE state */
-        {	
-            {EXTERNAL_SEC_STATE_WAIT,(fsm_Action_t)externalSecSM_Nop},       /*EXTERNAL_SEC_EVENT_START */	  
-            {EXTERNAL_SEC_STATE_IDLE,(fsm_Action_t)externalSecSM_Unexpected},       /*EXTERNAL_SEC_EVENT_COMPLETE*/
-            {EXTERNAL_SEC_STATE_IDLE,(fsm_Action_t)externalSecSM_Nop}        /*EXTERNAL_SEC_EVENT_STOP */
-        },
-    	
-    	/* next state and actions for Wait state */
-    	{	
-            {EXTERNAL_SEC_STATE_WAIT,(fsm_Action_t)externalSecSM_Unexpected},/*EXTERNAL_SEC_EVENT_START */
-            {EXTERNAL_SEC_STATE_IDLE,(fsm_Action_t)externalSecSM_setPort},    /*EXTERNAL_SEC_EVENT_COMPLETE*/
-            {EXTERNAL_SEC_STATE_IDLE,(fsm_Action_t)externalSecSM_Nop}        /*EXTERNAL_SEC_EVENT_STOP */
-    	}
-	};
-
-    pExtSec->hOs = pMainSec->hOs;
-    pExtSec->hReport = pMainSec->hReport;
-    pExtSec->pParent = pMainSec;
-    pMainSec->start = (mainSecSmStart_t)externalSecSM_start;
-    pMainSec->stop = (mainSecSmStart_t)externalSecSM_stop;
-    pExtSec->currentState = EXTERNAL_SEC_STATE_IDLE;
-
-    status = fsm_Config(pExtSec->pExternalSecSm, 
-						&externalSec_matrix[0][0], 
-						EXTERNAL_SEC_NUM_STATES, 
-						EXTERNAL_SEC_NUM_EVENTS, 
-						NULL, pExtSec->hOs);
-
-
-	return status;
-}
-
-/**
-*
-* Function  - externalSec_create.
-*
-* \b Description: 
-*
-* Called by mainSecSM (mainSec_create). 
-* Registers the function 'rsn_UnicastKeyRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-struct externalSec_t* externalSec_create(TI_HANDLE hOs)
-{
-    struct externalSec_t    *pHandle;
-    TI_STATUS		        status;
-	
-    /* allocate association context memory */
-    pHandle = (struct externalSec_t*)os_memoryAlloc(hOs, sizeof(struct externalSec_t));
-    if (pHandle == NULL)
-    {
-        return NULL;
-    }
-	
-    os_memoryZero(hOs, pHandle, sizeof(struct externalSec_t));
-	
-    /* allocate memory for association state machine */
-    status = fsm_Create(hOs,&pHandle->pExternalSecSm, EXTERNAL_SEC_NUM_STATES, EXTERNAL_SEC_NUM_EVENTS);
-
-    if (status != TI_OK)
-    {
-        os_memoryFree(hOs, pHandle, sizeof(struct externalSec_t));
-        return NULL;
-    }
-	
-    return pHandle;
-}
-
-/**
-*
-* Function  - externalSec_Destroy.
-*
-* \b Description:
-*
-* Called by mainSecSM (mainSec_unload).
-*
-* \b ARGS:
-*
-*
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure.
-*
-*/
-TI_STATUS externalSec_Destroy (struct externalSec_t *pExternalSec)
-{
-    TI_STATUS	status;
-
-    if (pExternalSec == NULL)
-    {
-        return TI_NOK;
-    }
-    status = fsm_Unload(pExternalSec->hOs, pExternalSec->pExternalSecSm);
-    if (status != TI_OK)
-    {
-        /* report failure but don't stop... */
-        TRACE0(pExternalSec->hReport, REPORT_SEVERITY_ERROR, "EXTERNAL SECURITY: Error releasing FSM memory \n");
-    }
-
-    os_memoryFree(pExternalSec->hOs, pExternalSec, sizeof(struct externalSec_t));
-    return TI_OK;
-}
-
-/**
-*
-* Function  - externalSecSM_start.
-*
-* \b Description: 
-*
-* Called upon the EXTERNAL_SEC_EVENT_START event  
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-TI_STATUS externalSecSM_start(mainSec_t *pMainSec)
-{
-	/* called by the rsn_start() */
-	return externalSec_event(pMainSec->pExternalSec, EXTERNAL_SEC_EVENT_START, pMainSec->pExternalSec);
-}
-
-/**
-*
-* Function  - externalSecSM_stop.
-*
-* \b Description: 
-*
-* Called upon the EXTERNAL_SEC_EVENT_STOP event  
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-TI_STATUS externalSecSM_stop(mainSec_t *pMainSec)
-{
-	/* called by the rsn_stop() */
-    return externalSec_event(pMainSec->pExternalSec, EXTERNAL_SEC_EVENT_STOP, pMainSec->pExternalSec);
-}
-
-/**
-*
-* Function  - externalSec_event.
-*
-* \b Description: 
-*
-* Called by the  rsn_PortStatus_Set() API upon external set port status cmd. 
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-TI_STATUS externalSec_event(struct externalSec_t *pExternalSec, TI_UINT8 event, void *pData)
-{
-    TI_STATUS   status;
-    TI_UINT8    nextState;
-
-    status = fsm_GetNextState(pExternalSec->pExternalSecSm,
-                              pExternalSec->currentState,
-                              event,
-                              &nextState);
-    if (status != TI_OK)
-    {
-        TRACE0(pExternalSec->hReport, REPORT_SEVERITY_ERROR, "EXTERNAL_SEC_SM: ERROR: failed getting next state\n");
-        return TI_NOK;
-	}
-
-    TRACE3(pExternalSec->hReport, REPORT_SEVERITY_INFORMATION, "STATION_EXT_SEC_SM: <currentState = %d, event = %d> --> nextState = %d\n", pExternalSec->currentState, event, nextState);
-    status = fsm_Event(pExternalSec->pExternalSecSm,
-                       &pExternalSec->currentState,
-                       event,
-                       pData);
-
-    return status;
-}
-
-
-/**
-*
-* Function  - externalSecSM_setPort.
-*
-* \b Description: 
-*
-* Call the connection report status API. 
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-TI_STATUS externalSecSM_setPort(struct externalSec_t *pExternalSec)
-{
-    TI_STATUS       status = TI_OK;	
-    struct _rsn_t   *pRsn;
-
-    pRsn = pExternalSec->pParent->pParent;
-    if (TI_TRUE == pExternalSec->bPortStatus)
-    {
-        status  = conn_reportRsnStatus(pRsn->hConn, (mgmtStatus_e)STATUS_SUCCESSFUL);
-    }
-    else
-    {
-        status = conn_reportRsnStatus(pRsn->hConn, (mgmtStatus_e)STATUS_SECURITY_FAILURE);
-    }
-	
-    return status;
-}
-
-
-TI_STATUS externalSec_rsnComplete(struct externalSec_t *pExternalSec)
-{
-	return externalSec_event(pExternalSec, EXTERNAL_SEC_EVENT_COMPLETE, pExternalSec);
-}
-
-/**
-*
-* Function  - externalSecSM_Nop.
-*
-* \b Description: 
-*
-* Do nothing
-*
-* \b ARGS:
-*
-* \b RETURNS: TI_OK
-*
-*/
-TI_STATUS externalSecSM_Nop(struct externalSec_t *pExternalSec)
-{
-    return(TI_OK);
-}
-
-/**
-*
-* Function  - externalSecSM_Unexpected.
-*
-* \b Description: 
-*
-* Do nothing
-*
-* \b ARGS:
-*
-* \b RETURNS: TI_STATUS
-*
-*/
-TI_STATUS externalSecSM_Unexpected(struct externalSec_t *pExternalSec)
-{
-    TRACE0(pExternalSec->hReport, REPORT_SEVERITY_ERROR, "EXTERNAL_SEC_SM: ERROR UnExpected Event\n");
-    return(TI_OK);
-}
diff --git a/wl1271/stad/src/Connection_Managment/externalSec.h b/wl1271/stad/src/Connection_Managment/externalSec.h
deleted file mode 100644
index e19a54f..0000000
--- a/wl1271/stad/src/Connection_Managment/externalSec.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * externalSec.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file externalSec.h
- *  \brief station externalSec API
- *
- *  \see externalSec.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  externalSec	                                	            *
- *   PURPOSE: station external security		                                *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _EXTERNAL_SEC_H
-#define _EXTERNAL_SEC_H
-
-#include "paramOut.h"
-#include "fsm.h"
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-/* Constants */
-/** number of states in the state machine */
-#define	EXTERNAL_SEC_NUM_STATES		2
-
-/** number of events in the state machine */
-#define  EXTERNAL_SEC_NUM_EVENTS	3
-
-/* Enumerations */
-
-/** state machine states */
-typedef enum 
-{
-	EXTERNAL_SEC_STATE_IDLE        = 0,
-	EXTERNAL_SEC_STATE_WAIT        = 1
-} externalSec_smStates;
-
-
-/** State machine events */
-typedef enum 
-{
-	EXTERNAL_SEC_EVENT_START       = 0,
-	EXTERNAL_SEC_EVENT_COMPLETE    = 1,
-	EXTERNAL_SEC_EVENT_STOP	       = 2
-} externalSec_smSEvents;
-
-/* Typedefs */
-
-/* Structures */
-struct externalSec_t
-{
-    TI_UINT8            currentState;
-    fsm_stateMachine_t  *pExternalSecSm;
-    mainSec_t           *pParent;
-    TI_HANDLE           hOs; 
-    TI_HANDLE           hReport;
-    TI_BOOL             bPortStatus;
-};
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS externalSec_config(mainSec_t *pMainSec);
-struct externalSec_t* externalSec_create(TI_HANDLE hOs);
-TI_STATUS externalSec_Destroy(struct externalSec_t *pExternalSec);
-TI_STATUS externalSec_event(struct externalSec_t *pExternalSec, TI_UINT8 event, void *pData);
-TI_STATUS externalSec_rsnComplete(struct externalSec_t *pExternalSec);
-#endif /* _EXTERNAL_SEC_H*/
diff --git a/wl1271/stad/src/Connection_Managment/keyDerive.c b/wl1271/stad/src/Connection_Managment/keyDerive.c
deleted file mode 100644
index 6a2eab4..0000000
--- a/wl1271/stad/src/Connection_Managment/keyDerive.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * keyDerive.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file keyDeriveSM.c
- * \brief station unicast key SM implementation
- *
- * \see keyDeriveSM.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	station unicast key SM		                                *
- *   PURPOSE:   station unicast key SM implementation						*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_28
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-
-#include "keyDerive.h"
-#include "keyDeriveWep.h"
-#include "keyDeriveTkip.h"
-#include "keyDeriveAes.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "keyDeriveCkip.h"
-#endif
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_KeyDeriveRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-keyDerive_t* keyDerive_create(TI_HANDLE hOs)
-{
-	keyDerive_t 		*pKeyDerive;
-
-	/* allocate key parser context memory */
-	pKeyDerive = (keyDerive_t*)os_memoryAlloc(hOs, sizeof(keyDerive_t));
-	if (pKeyDerive == NULL)
-	{
-		return NULL;
-	}
-
-	os_memoryZero(hOs, pKeyDerive, sizeof(keyDerive_t));
-
-	pKeyDerive->hOs = hOs;
-
-	return pKeyDerive;
-}
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_KeyDeriveRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS keyDerive_unload(struct _keyDerive_t *pKeyDerive)
-{
-	/* free key parser context memory */
-	os_memoryFree(pKeyDerive->hOs, pKeyDerive, sizeof(keyDerive_t));
-
-	return TI_OK;
-}
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_KeyDeriveRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS keyDerive_config(struct _keyDerive_t *pKeyDerive,
-						ECipherSuite cipher,
-						struct _mainKeys_t *pMainKeys,
-						TI_HANDLE hReport,
-						TI_HANDLE hOs)
-{
-
-	TI_STATUS		status = TI_NOK;
-
-	pKeyDerive->hReport = hReport;
-	pKeyDerive->hOs = hOs;
-	pKeyDerive->pMainKeys = pMainKeys;
-
-    switch (cipher)
-	{
-    case TWD_CIPHER_NONE:
-		status = keyDeriveNone_config(pKeyDerive);
-        break;
-	case TWD_CIPHER_WEP:
-    case TWD_CIPHER_WEP104:
-		status = keyDeriveWep_config(pKeyDerive);
-		break;
-	case TWD_CIPHER_TKIP:
-		status = keyDeriveTkip_config(pKeyDerive);
-		break;
-#ifdef XCC_MODULE_INCLUDED
-	case TWD_CIPHER_CKIP: 
-  	status = keyDeriveCkip_config(pKeyDerive);
-		break;
-#endif
-
-	case TWD_CIPHER_AES_CCMP:
-		status = keyDeriveAes_config(pKeyDerive);
-		break;
-	default:
-		return TI_NOK;
-	}
-
-	return status;
-}
-
-
-
diff --git a/wl1271/stad/src/Connection_Managment/keyDerive.h b/wl1271/stad/src/Connection_Managment/keyDerive.h
deleted file mode 100644
index 7373cd5..0000000
--- a/wl1271/stad/src/Connection_Managment/keyDerive.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * keyDerive.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file unicastKeySM.h
- *  \brief station unicast key SM API
- *
- *  \see unicastKeySM.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  station unicast key SM	                                	*
- *   PURPOSE: station unicast key SM API		                            *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _KEY_DERIVE_H
-#define _KEY_DERIVE_H
-
-#include "paramOut.h"
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-typedef struct _keyDerive_t    keyDerive_t;
-
-/* Main Sec SM functions */
-typedef TI_STATUS (*keyDeriveDerive_t)(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKeyMaterial);
-typedef TI_STATUS (*keyDeriveRemove_t)(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKeyMaterial);
-
-/* Structures */
-
-/* State machine associated data structures. */
-struct _keyDerive_t
-{
-	encodedKeyMaterial_t	key;
-
-	struct _mainKeys_t     	*pMainKeys;
-	
-	TI_HANDLE				hReport;
-	TI_HANDLE			    hOs;
-    
-	keyDeriveDerive_t		derive;
-	keyDeriveRemove_t		remove;
-};
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-keyDerive_t* keyDerive_create(TI_HANDLE hOs);
-
-TI_STATUS keyDerive_unload(keyDerive_t *pKeyDerive);
-
-TI_STATUS keyDerive_config(keyDerive_t *pKeyDerive, 
-						ECipherSuite cipher, 
-						struct _mainKeys_t *pParent,
-						TI_HANDLE hReport,
-						TI_HANDLE hOs);
-
-
-#endif /*  _KEY_DERIVE_H*/
diff --git a/wl1271/stad/src/Connection_Managment/keyDeriveAes.c b/wl1271/stad/src/Connection_Managment/keyDeriveAes.c
deleted file mode 100644
index e68cec3..0000000
--- a/wl1271/stad/src/Connection_Managment/keyDeriveAes.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * keyDeriveAes.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file keyDeriveAes.c
- * \brief AES encryption key derivation implementation.
- *
- * \see aesBroadcastKeyDerivation.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	AES broadcast key derivation                                *
- *   PURPOSE:   AES broadcast key derivation                                *
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_29
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-
-#include "keyDerive.h"
-#include "keyDeriveAes.h"
-
-#include "mainKeysSm.h"
-
-/**
-*
-* keyDeriveAes_config
-*
-* \b Description: 
-*
-* AES broadcast key derivation configuration function: 
-*			- Initializes the derive & remove callback functions
-* \b ARGS: 
-*
-*  None
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveAes_config(struct _keyDerive_t *pKeyDerive)
-{
-	pKeyDerive->derive = keyDeriveAes_derive;
-	pKeyDerive->remove = keyDeriveAes_remove;
-
-	return TI_OK;
-}
-
-
-/**
-*
-* keyDeriveAes_derive
-*
-* \b Description: 
-*
-* AES key derivation function: 
-*					- Decodes the key material.
-*					- Distribute the decoded key material to the driver.
-*
-* \b ARGS: 
-*
-*  I - p - Pointer to the encoded key material.
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveAes_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
-{
-	TI_STATUS status;
-	TSecurityKeys	key;
-	keyMaterialAes_t   *keyMaterialAes = NULL;
-	
-	/* Small verification */
-	if ((pEncodedKey==NULL) || (pKeyDerive == NULL))
-	{
-		return TI_NOK;
-	}
-	
-    /* Note: Reduce 2 bytes from the size of keyMaterialAes_t in the following check, 
-	         because it is added as padding at the end due to the OS_PACKED removal. */
-    if ( pEncodedKey->keyLen < (sizeof(keyMaterialAes_t) - 2) )
-	{
-TRACE1(pKeyDerive->hReport, REPORT_SEVERITY_ERROR, "KEY_DERIVE_AES: ERROR: wrong key length %d !!!\n",						pEncodedKey->keyLen);
-		return TI_NOK;
-	}
-
-	keyMaterialAes = (keyMaterialAes_t*)pEncodedKey->pData;
-
-	
-	/* Fill security key structure */
-	os_memoryZero(pKeyDerive->hOs, &key, sizeof(TSecurityKeys));
-
-	key.keyType   = KEY_AES;
-	key.keyIndex  = (TI_UINT8)pEncodedKey->keyId;
-	key.encLen    = DERIVE_AES_KEY_LEN;
-	os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, pEncodedKey->pData + MAC_ADDR_LEN+KEY_RSC_LEN, 
-		          DERIVE_AES_KEY_LEN);
-
-	/* Copy MAC address key */
-	MAC_COPY (key.macAddress, keyMaterialAes->macAddress);
-	/* Copy RSC */
-	os_memoryCopy(pKeyDerive->hOs, (void *)key.keyRsc, (void *)keyMaterialAes->keyRSC, KEY_RSC_LEN);
-
-	status = pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key);
-	if (status == TI_OK)
-	{
-		os_memoryCopy(pKeyDerive->hOs, &pKeyDerive->key, pEncodedKey, sizeof(encodedKeyMaterial_t));
-	}
-	
-	return status;
-}
-
-/**
-*
-* keyDeriveAes_remove
-*
-* \b Description: 
-*
-* AES key remove function: 
-*			- Remove the key material from the driver.
-*
-* \b ARGS: 
-*
-*  None.
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveAes_remove(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
-{
-	TI_STATUS status;
-	TSecurityKeys	key;
-	
-	if ((pEncodedKey==NULL) || (pKeyDerive == NULL))
-	{
-		return TI_NOK;
-	}
-	
-	os_memoryZero(pKeyDerive->hOs, &key, sizeof(TSecurityKeys));
-	key.keyType  = KEY_AES;
-	key.keyIndex = (TI_UINT8)pEncodedKey->keyId;
-	key.encLen    = DERIVE_AES_KEY_LEN;
-	MAC_COPY (key.macAddress, pEncodedKey->pData);
-
-	status = pKeyDerive->pMainKeys->removeKey(pKeyDerive->pMainKeys, &key);
-	if (status == TI_OK)
-	{
-		os_memoryZero(pKeyDerive->hOs, &pKeyDerive->key, sizeof(encodedKeyMaterial_t));
-	}
-	
-	return status;
-}
-
diff --git a/wl1271/stad/src/Connection_Managment/keyDeriveAes.h b/wl1271/stad/src/Connection_Managment/keyDeriveAes.h
deleted file mode 100644
index 26c9664..0000000
--- a/wl1271/stad/src/Connection_Managment/keyDeriveAes.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * keyDeriveAes.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file keyDeriveAes.h
- *  \brief AES key derivation API
- *
- *  \see keyDeriveAes.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	AES encryption key derivation                               *
- *   PURPOSE:   AES encryption key derivation API                           *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _KEY_DERIVE_AES_H
-#define _KEY_DERIVE_AES_H
-
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-#include "keyDerive.h"
-
-#define DERIVE_AES_KEY_LEN 16   /* 128 bit key  */
-
-
-typedef struct
-{
-    TI_UINT8   macAddress[MAC_ADDR_LEN];
-    TI_UINT8   keyRSC[KEY_RSC_LEN]; 
-    TI_UINT8   encKey[DERIVE_AES_KEY_LEN];
-} keyMaterialAes_t;
-
-/* AES key derivation init function. */
-TI_STATUS keyDeriveAes_config(struct _keyDerive_t *pKeyDerive);
-
-TI_STATUS keyDeriveAes_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey);
-TI_STATUS keyDeriveAes_remove(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey);
-
-#endif /*  _KEY_DERIVE_AES_H  */
diff --git a/wl1271/stad/src/Connection_Managment/keyDeriveCkip.c b/wl1271/stad/src/Connection_Managment/keyDeriveCkip.c
deleted file mode 100644
index c364e3b..0000000
--- a/wl1271/stad/src/Connection_Managment/keyDeriveCkip.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * keyDeriveCkip.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file wepBroadcastKeyDerivation.c
- * \brief WEP broadcast key derivation implementation.
- *
- * \see wepBroadcastKeyDerivation.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	WEP broadcast key derivation                                *
- *   PURPOSE:   WEP broadcast key derivation                                *
- *                                                                          *
- ****************************************************************************/
-
-#ifdef XCC_MODULE_INCLUDED
-#define __FILE_ID__  FILE_ID_30
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-
-
-#include "keyDerive.h"
-#include "keyDeriveCkip.h"
-
-#include "mainKeysSm.h"
-#include "mainSecSm.h"
-#include "admCtrl.h"
-
-/**
-*
-* keyDeriveCkip_config
-*
-* \b Description: 
-*
-* CKIP key derivation init function: 
-*							- Initializes the derive & remove callback functions
-*							- Resets the key material in the system control block								
-*
-* \b ARGS: 
-*
-*  None
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveCkip_config(struct _keyDerive_t *pKeyDerive)
-{
-    pKeyDerive->derive = keyDeriveCkip_derive;
-    pKeyDerive->remove = keyDeriveCkip_remove;
-
-    return TI_OK;
-}
-
-
-/**
-*
-* keyDeriveCkip_derive
-*
-* \b Description: 
-*
-* CKIP key derivation function: 
-*							- Decodes the key material.
-*							- Distribute the decoded key material to the driver.
-*
-* \b ARGS: 
-*
-*  I - p - Pointer to the encoded key material.
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveCkip_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
-{
-    TI_STATUS           status;
-    TSecurityKeys      key;
-    TI_UINT8               ckipIndex, keyIndex;
-    TI_UINT8               ckipKey[KEY_DERIVE_CKIP_ENC_LEN];
-
-    key.keyType = KEY_XCC;
-    key.keyIndex = (TI_UINT8)pEncodedKey->keyId;
-
-    if (pEncodedKey->keyLen != KEY_DERIVE_CKIP_ENC_LEN)
-    {
-        if ((pEncodedKey->keyLen != KEY_DERIVE_CKIP_5_LEN) && (pEncodedKey->keyLen != KEY_DERIVE_CKIP_13_LEN))
-        {
-            TRACE1(pKeyDerive->hReport, REPORT_SEVERITY_ERROR, "KEY_DERIVE_CKIP: ERROR: wrong key length %d !!!\n", pEncodedKey->keyLen);
-            return TI_NOK;
-        }
-
-        keyIndex=0;
-        for (ckipIndex=0; ckipIndex<KEY_DERIVE_CKIP_ENC_LEN; ckipIndex++)
-        {
-           ckipKey[ckipIndex]= pEncodedKey->pData[keyIndex];
-		   keyIndex++;
-		   if (keyIndex >= pEncodedKey->keyLen)
-		   {
-				keyIndex = 0;
-		   }
-           /*keyIndex = ((keyIndex+1) <pEncodedKey->keyLen) ? keyIndex+1 : 0;*/
-        }
-    }
-    else 
-    {
-        for (ckipIndex=0; ckipIndex<KEY_DERIVE_CKIP_ENC_LEN; ckipIndex++)
-        {
-           ckipKey[ckipIndex]= pEncodedKey->pData[ckipIndex];
-        }
-    }
-
-    if (pKeyDerive->pMainKeys->pParent->pParent->pAdmCtrl->encrInSw)
-    {
-        key.encLen = KEY_DERIVE_CKIP_ENC_LEN;
-    }
-    else
-    {
-        key.encLen = pEncodedKey->keyLen;
-    }
-    
-    /* Copy encryption key - not expand */
-    os_memoryCopy(pKeyDerive->hOs, (void*)key.encKey, ckipKey, key.encLen);
-    /* Copy the MIC keys */
-    os_memoryCopy(pKeyDerive->hOs, (void*)key.micRxKey, ckipKey, KEY_DERIVE_CKIP_ENC_LEN);
-    os_memoryCopy(pKeyDerive->hOs, (void*)key.micTxKey, ckipKey, KEY_DERIVE_CKIP_ENC_LEN);
-
-    status = pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key);
-    if (status == TI_OK)
-    {
-        os_memoryCopy(pKeyDerive->hOs, &pKeyDerive->key, pEncodedKey, sizeof(encodedKeyMaterial_t));
-    }
-
-    return status;
-}
- 
-/**
-*
-* wepBroadcastKeyDerivationRemove
-*
-* \b Description: 
-*
-* WEP broadcast key removal function: 
-*							- Remove the key material from the driver.
-*
-* \b ARGS: 
-*
-*  None.
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveCkip_remove(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
-{
-    TI_STATUS status;
-    TSecurityKeys  key;
-
-    os_memoryZero(pKeyDerive->hOs, &key, sizeof(TSecurityKeys));
-    key.keyType = KEY_XCC;
-    key.keyIndex = (TI_UINT8)pEncodedKey->keyId;
-    key.encLen = KEY_DERIVE_CKIP_ENC_LEN;
-	MAC_COPY (key.macAddress, pEncodedKey->pData);
-
-    status = pKeyDerive->pMainKeys->removeKey(pKeyDerive->pMainKeys, &key);
-    if (status == TI_OK)
-    {
-        os_memoryZero(pKeyDerive->hOs, &pKeyDerive->key, sizeof(encodedKeyMaterial_t));
-    }
-
-    return status;
-}
-
-#endif /* XCC_MODULE_INCLUDED */
-
diff --git a/wl1271/stad/src/Connection_Managment/keyDeriveCkip.h b/wl1271/stad/src/Connection_Managment/keyDeriveCkip.h
deleted file mode 100644
index f368b53..0000000
--- a/wl1271/stad/src/Connection_Managment/keyDeriveCkip.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * keyDeriveCkip.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file keyDeriveCkip.h
- *  \brief CKIP key derivation API
- *
- *  \see keyDeriveCkip.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	WEP broadcast key derivation                                *
- *   PURPOSE:   WEP broadcast key derivation API                            *
- *                                                                          *
- ****************************************************************************/
-
-#ifdef XCC_MODULE_INCLUDED
-#ifndef _KEY_DERIVE_CKIP_H
-#define _KEY_DERIVE_CKIP_H
-
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-#include "keyDerive.h"
-
-#define KEY_DERIVE_CKIP_ENC_LEN 16
-#define KEY_DERIVE_CKIP_5_LEN   5
-#define KEY_DERIVE_CKIP_13_LEN  13
-
-
-/* WEP broadcast key derivation init function. */
-TI_STATUS keyDeriveCkip_config(struct _keyDerive_t *pKeyDerive);
-
-TI_STATUS keyDeriveCkip_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey);
-TI_STATUS keyDeriveCkip_remove(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey);
-
-#endif /*  __INCLUDE_WEP_BROADCAST_KEY_DERIVATION_H */
-#endif /* XCC_MODULE_INCLUDED */
diff --git a/wl1271/stad/src/Connection_Managment/keyDeriveTkip.c b/wl1271/stad/src/Connection_Managment/keyDeriveTkip.c
deleted file mode 100644
index 409ad35..0000000
--- a/wl1271/stad/src/Connection_Managment/keyDeriveTkip.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * keyDeriveTkip.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file wepBroadcastKeyDerivation.c
- * \brief WEP broadcast key derivation implementation.
- *
- * \see wepBroadcastKeyDerivation.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	WEP broadcast key derivation                                *
- *   PURPOSE:   WEP broadcast key derivation                                *
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_31
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-
-#include "keyDerive.h"
-#include "keyDeriveTkip.h"
-
-#include "mainKeysSm.h"
-
-/**
-*
-* keyDeriveTkip_config
-*
-* \b Description: 
-*
-* TKIP key derivation init function: 
-*							- Initializes the derive & remove callback functions
-*							- Resets the key material in the system control block								
-*
-* \b ARGS: 
-*
-*  None
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveTkip_config(struct _keyDerive_t *pKeyDerive)
-{
-    pKeyDerive->derive = keyDeriveTkip_derive;
-    pKeyDerive->remove = keyDeriveTkip_remove;
-
-    return TI_OK;
-}
-
-
-/**
-*
-* keyDeriveTkip_derive
-*
-* \b Description: 
-*
-* TKIP key derivation function: 
-*							- Decodes the key material.
-*							- Distribute the decoded key material to the driver.
-*
-* \b ARGS: 
-*
-*  I - p - Pointer to the encoded key material.
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveTkip_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
-{
-    TI_STATUS           status;
-    TSecurityKeys      key;
-    keyMaterialTkip_t   *keyMaterialTkip;
-    
-    if (pEncodedKey==NULL)
-    {
-        return TI_NOK;
-    }
-
-    key.keyType = KEY_TKIP;
-    key.keyIndex = (TI_UINT8)pEncodedKey->keyId;
-    key.encLen = KEY_DERIVE_TKIP_ENC_LEN;
-
-    /* Note: Reduce 2 bytes from the size of keyMaterialTkip_t in the following check, 
-	         because it is added as padding at the end due to the OS_PACKED removal. */
-    if ( pEncodedKey->keyLen < (sizeof(keyMaterialTkip_t) - 2) )
-    {
-        TRACE1(pKeyDerive->hReport, REPORT_SEVERITY_ERROR, "KEY_DERIVE_TKIP: ERROR: wrong key length %d !!!\n", pEncodedKey->keyLen);
-        return TI_NOK;
-    }
-
-    keyMaterialTkip = (keyMaterialTkip_t*)pEncodedKey->pData;
-    /* Copy encryption key */
-    os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, (void *)keyMaterialTkip->encKey, KEY_DERIVE_TKIP_ENC_LEN);
-    if (pEncodedKey->keyId & 0x10000000)
-    {   /* Copy MIC RX */
-        os_memoryCopy(pKeyDerive->hOs, (void *)key.micTxKey, (void *)keyMaterialTkip->micRxKey, KEY_DERIVE_TKIP_MIC_LEN);
-        /* Copy MIC RX */
-        os_memoryCopy(pKeyDerive->hOs, (void *)key.micRxKey, (void *)keyMaterialTkip->micTxKey, KEY_DERIVE_TKIP_MIC_LEN);
-    }
-    else
-    {  /* Copy MIC RX */
-        os_memoryCopy(pKeyDerive->hOs, (void *)key.micRxKey, (void *)keyMaterialTkip->micRxKey, KEY_DERIVE_TKIP_MIC_LEN);
-        /* Copy MIC RX */
-        os_memoryCopy(pKeyDerive->hOs, (void *)key.micTxKey, (void *)keyMaterialTkip->micTxKey, KEY_DERIVE_TKIP_MIC_LEN);
-    }
-    
-    /* Copy MAC address key */
-    MAC_COPY (key.macAddress, keyMaterialTkip->macAddress);
-    /* Copy RSC */
-    os_memoryCopy(pKeyDerive->hOs, (void *)key.keyRsc, (void *)keyMaterialTkip->keyRSC, KEY_RSC_LEN);
-
-
-    status = pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key);
-    if (status == TI_OK)
-    {
-        os_memoryCopy(pKeyDerive->hOs, &pKeyDerive->key, pEncodedKey, sizeof(encodedKeyMaterial_t));
-    }
-
-    return status;
-}
-
-/**
-*
-* wepBroadcastKeyDerivationRemove
-*
-* \b Description: 
-*
-* WEP broadcast key removal function: 
-*							- Remove the key material from the driver.
-*
-* \b ARGS: 
-*
-*  None.
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveTkip_remove(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
-{
-    TI_STATUS status;
-    TSecurityKeys  key;
-
-    os_memoryZero(pKeyDerive->hOs, &key, sizeof(TSecurityKeys));
-    key.keyType = KEY_TKIP;
-    key.keyIndex = (TI_UINT8)pEncodedKey->keyId;
-    key.encLen = KEY_DERIVE_TKIP_ENC_LEN;
-	MAC_COPY (key.macAddress, pEncodedKey->pData);
-
-    status = pKeyDerive->pMainKeys->removeKey(pKeyDerive->pMainKeys, &key);
-    if (status == TI_OK)
-    {
-        os_memoryZero(pKeyDerive->hOs, &pKeyDerive->key, sizeof(encodedKeyMaterial_t));
-    }
-
-    return status;
-}
-
diff --git a/wl1271/stad/src/Connection_Managment/keyDeriveTkip.h b/wl1271/stad/src/Connection_Managment/keyDeriveTkip.h
deleted file mode 100644
index e43e165..0000000
--- a/wl1271/stad/src/Connection_Managment/keyDeriveTkip.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * keyDeriveTkip.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file keyDeriveTkip.h
- *  \brief TKIP key derivation API
- *
- *  \see keyDeriveTkip.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	WEP broadcast key derivation                                *
- *   PURPOSE:   WEP broadcast key derivation API                            *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _KEY_DERIVE_TKIP_H
-#define _KEY_DERIVE_TKIP_H
-
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-#include "keyDerive.h"
-
-#define KEY_DERIVE_TKIP_ENC_LEN 16
-#define KEY_DERIVE_TKIP_MIC_LEN 8
-
-typedef struct
-{
-    TI_UINT8   macAddress[MAC_ADDR_LEN];    
-    TI_UINT8   keyRSC[KEY_RSC_LEN]; 
-    TI_UINT8   encKey[KEY_DERIVE_TKIP_ENC_LEN];
-    TI_UINT8   micRxKey[KEY_DERIVE_TKIP_MIC_LEN];
-    TI_UINT8   micTxKey[KEY_DERIVE_TKIP_MIC_LEN];
-} keyMaterialTkip_t;
-
-/* WEP broadcast key derivation init function. */
-TI_STATUS keyDeriveTkip_config(struct _keyDerive_t *pKeyDerive);
-
-TI_STATUS keyDeriveTkip_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey);
-TI_STATUS keyDeriveTkip_remove(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey);
-
-#endif /*  __INCLUDE_WEP_BROADCAST_KEY_DERIVATION_H*/
diff --git a/wl1271/stad/src/Connection_Managment/keyDeriveWep.c b/wl1271/stad/src/Connection_Managment/keyDeriveWep.c
deleted file mode 100644
index 165ef97..0000000
--- a/wl1271/stad/src/Connection_Managment/keyDeriveWep.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * keyDeriveWep.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file wepBroadcastKeyDerivation.c
- * \brief WEP broadcast key derivation implementation.
- *
- * \see wepBroadcastKeyDerivation.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	WEP broadcast key derivation                                *
- *   PURPOSE:   WEP broadcast key derivation                                *
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_32
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-
-#include "keyDerive.h"
-#include "keyDeriveWep.h"
-
-#include "mainKeysSm.h"
-
-/**
-*
-* rsn_wepBroadcastKeyDerivationInit
-*
-* \b Description: 
-*
-* WEP broadcast key derivation init function: 
-*							- Initializes the derive & remove callback functions
-*							- Resets the key material in the system control block								
-*
-* \b ARGS: 
-*
-*  None
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveWep_config(struct _keyDerive_t *pKeyDerive)
-{
-	pKeyDerive->derive = keyDeriveWep_derive;
-	pKeyDerive->remove = keyDeriveWep_remove;
-
-	return TI_OK;
-}
-
-
-/**
-*
-* wepBroadcastKeyDerivationDerive
-*
-* \b Description: 
-*
-* WEP broadcast key derivation function: 
-*							- Decodes the key material.
-*							- Distribute the decoded key material to the driver.
-*
-* \b ARGS: 
-*
-*  I - p - Pointer to the encoded key material.
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveWep_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
-{
-	TI_STATUS status;
-	TSecurityKeys	key;
-	
-    if (pEncodedKey==NULL)
-    {
-        return TI_NOK;
-    }
-	
-	if ((pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_40) && 
-		(pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_104) && 
-		(pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_232))
-	{	
-        TRACE1(pKeyDerive->hReport, REPORT_SEVERITY_ERROR, "DeriveWep_derive: ERROR: it is not WEP key lenghth (len=%d) !!!\n", pEncodedKey->keyLen);
-        return TI_NOK;
-   	}
-
-	key.keyType = KEY_WEP;
-	key.keyIndex = (TI_UINT8)pEncodedKey->keyId;
-	key.encLen = (TI_UINT16)pEncodedKey->keyLen;
-	os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, pEncodedKey->pData, pEncodedKey->keyLen);
-
-	status = pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key);
-	if (status == TI_OK)
-	{
-		os_memoryCopy(pKeyDerive->hOs, &pKeyDerive->key, pEncodedKey, sizeof(encodedKeyMaterial_t));
-	}
-	
-	return status;
-}
-
-/**
-*
-* wepBroadcastKeyDerivationRemove
-*
-* \b Description: 
-*
-* WEP broadcast key removal function: 
-*							- Remove the key material from the driver.
-*
-* \b ARGS: 
-*
-*  None.
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveWep_remove(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
-{
-	TI_STATUS status;
-	TSecurityKeys	key;
-	
-    os_memoryZero(pKeyDerive->hOs, &key, sizeof(TSecurityKeys));
-	key.keyType = KEY_WEP;
-	key.keyIndex = (TI_UINT8)pEncodedKey->keyId;
-	key.encLen = (TI_UINT16)pKeyDerive->key.keyLen;
-	MAC_COPY (key.macAddress, pEncodedKey->pData);
-
-	status = pKeyDerive->pMainKeys->removeKey(pKeyDerive->pMainKeys, &key);
-	if (status == TI_OK)
-	{
-		os_memoryZero(pKeyDerive->hOs, &pKeyDerive->key, sizeof(encodedKeyMaterial_t));
-	}
-	
-	return status;
-}
-
-
-
-TI_STATUS keyDeriveNone_config(struct _keyDerive_t *pKeyDerive)
-{
-	pKeyDerive->derive = keyDeriveNone_derive;
-	pKeyDerive->remove = keyDeriveNone_remove;
-
-	return TI_OK;
-}
-
-
-TI_STATUS keyDeriveNone_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
-{
-	TSecurityKeys	key;
-	
-    if (pEncodedKey==NULL)
-    {
-        return TI_NOK;
-    }
-
-	if ((pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_40) && 
-		(pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_104) && 
-		(pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_232))
-	{	
-        return TI_NOK;
-   	}
-
-	key.keyType = KEY_WEP;
-	key.keyIndex = (TI_UINT8)pEncodedKey->keyId;
-	key.encLen = (TI_UINT16)pEncodedKey->keyLen;
-	os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, pEncodedKey->pData, pEncodedKey->keyLen);
-
-	pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key);
-	
-	return TI_OK;
-}
-
-
-/**
-*
-* keyDeriveNone_remove
-*
-* \b Description: 
-*
-* WEP broadcast key removal function: 
-*							- Remove the key material from the driver.
-*
-* \b ARGS: 
-*
-*  None.
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS keyDeriveNone_remove(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
-{
-	
-    return TI_OK;
-}
-
-
-
-
diff --git a/wl1271/stad/src/Connection_Managment/keyDeriveWep.h b/wl1271/stad/src/Connection_Managment/keyDeriveWep.h
deleted file mode 100644
index 4a54b62..0000000
--- a/wl1271/stad/src/Connection_Managment/keyDeriveWep.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * keyDeriveWep.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file wepBroadcastKeyDerivation.h
- *  \brief WEP broadcast key derivation API
- *
- *  \see wepBroadcastKeyDerivation.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	WEP broadcast key derivation                                *
- *   PURPOSE:   WEP broadcast key derivation API                            *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _KEY_DERIVE_WEP_H
-#define _KEY_DERIVE_WEP_H
-
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-#include "keyDerive.h"
-
-
-#define DERIVE_WEP_KEY_LEN_40	 5  /* 40 bit (5 byte) key */
-#define DERIVE_WEP_KEY_LEN_104	 13 /* 104 bit (13 byte) key */
-#define DERIVE_WEP_KEY_LEN_232	 29 /* 232 bit (29 byte) key */
-
-
-/* WEP broadcast key derivation init function. */
-TI_STATUS keyDeriveWep_config(struct _keyDerive_t *pKeyDerive);
-
-TI_STATUS keyDeriveWep_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey);
-
-TI_STATUS keyDeriveWep_remove(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey);
-
-TI_STATUS keyDeriveNone_config(struct _keyDerive_t *pKeyDerive);
-
-TI_STATUS keyDeriveNone_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey);
-
-TI_STATUS keyDeriveNone_remove(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey);
-
-#endif /*  __INCLUDE_WEP_BROADCAST_KEY_DERIVATION_H*/
diff --git a/wl1271/stad/src/Connection_Managment/keyParser.c b/wl1271/stad/src/Connection_Managment/keyParser.c
deleted file mode 100644
index a746550..0000000
--- a/wl1271/stad/src/Connection_Managment/keyParser.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * keyParser.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file keyParser.c
- * \brief KEY parser module implementation.
- *
- * \see keyParser.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	KEY parser                                                  *
- *   PURPOSE:   KEY parser implementation									*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_33
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-
-#include "keyParser.h" 
-#include "keyParserExternal.h"
-#include "keyParserWep.h"
-
-TI_STATUS keyParserNone_config(keyParser_t *pKeyParser);
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_keyParserRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-keyParser_t* keyParser_create(TI_HANDLE hOs)
-{
-	keyParser_t 		*pKeyParser;
-
-	/* allocate key parser context memory */
-	pKeyParser = (keyParser_t*)os_memoryCAlloc(hOs, 1, sizeof(keyParser_t));
-	if (pKeyParser == NULL)
-	{
-		return NULL;
-	}
-
-	pKeyParser->hOs = hOs;
-
-	return pKeyParser;
-}
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_keyParserRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS keyParser_unload(struct _keyParser_t *pKeyParser)
-{
-	/* free key parser context memory */
-	os_memoryFree(pKeyParser->hOs, pKeyParser, sizeof(keyParser_t));
-
-	return TI_OK;
-}
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_keyParserRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS keyParser_config(struct _keyParser_t *pKeyParser,
-						TRsnPaeConfig *pPaeConfig,
-                        struct _unicastKey_t *pUcastKey,
-                        struct _broadcastKey_t *pBcastKey,
-                        struct _mainKeys_t *pParent,
-						TI_HANDLE hReport,
-						TI_HANDLE hOs,
-                        TI_HANDLE hCtrlData)
-{
-    
-    pKeyParser->pParent = pParent;
-    pKeyParser->pUcastKey = pUcastKey;
-    pKeyParser->pBcastKey = pBcastKey;
-    pKeyParser->pPaeConfig = pPaeConfig;
-
-    pKeyParser->hReport = hReport;
-	pKeyParser->hOs = hOs;
-    pKeyParser->hCtrlData = hCtrlData;
-
-	keyParserExternal_config(pKeyParser);
-	
-	return TI_OK;
-}
-
-
-
-TI_STATUS keyParserNone_config(keyParser_t *pKeyParser)
-{
-	pKeyParser->recv = NULL;
-	pKeyParser->replayReset = NULL;
-	
-	return TI_OK;
-	
-}
-
-
-TI_STATUS keyParser_nop(keyParser_t *pKeyParser)
-{
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_INFORMATION, "KEY_PARSER: nop \n");
-	
-	return TI_OK;
-}
-
-
diff --git a/wl1271/stad/src/Connection_Managment/keyParser.h b/wl1271/stad/src/Connection_Managment/keyParser.h
deleted file mode 100644
index 185fd9c..0000000
--- a/wl1271/stad/src/Connection_Managment/keyParser.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * keyParser.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file keyParser.h
- *  \brief key parser API
- *
- *  \see keyParser.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Key Parser	                                            *
- *   PURPOSE: key Parser module API                                    *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _KEY_PARSER_H
-#define _KEY_PARSER_H
-
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-/* Constants */
-#define MAX_REPLAY_COUNTER_LEN		8
-
-/* Enumerations */
-
-/* Typedefs */
-
-typedef struct _keyParser_t	keyParser_t;
-
-/* RSN admission control prototypes */
-
-typedef TI_STATUS (*keyParser_recv_t)(struct _keyParser_t *pKeyParser, TI_UINT8 *pKeyData, TI_UINT32 keyDataLen);
-typedef TI_STATUS (*keyParser_config_t)(struct _keyParser_t *pKeyParser, TI_HANDLE hReport, TI_HANDLE hOs);
-typedef TI_STATUS (*keyParser_replayReset_t)(struct _keyParser_t *pKeyParser);
-typedef TI_STATUS (*keyParser_remove_t)(struct _keyParser_t *pKeyParser, TI_UINT8 *pKeyData, TI_UINT32 keyDataLen);
-
-/* Structures */
-
-struct _keyParser_t
-{
-	TI_UINT8					replayCounter[MAX_REPLAY_COUNTER_LEN];
-
-	struct _mainKeys_t		*pParent;
-	struct _unicastKey_t	*pUcastKey;
-	struct _broadcastKey_t	*pBcastKey;
-
-	TRsnPaeConfig         *pPaeConfig;
-
-	TI_HANDLE 				hReport;
-	TI_HANDLE 				hOs;
-    TI_HANDLE               hCtrlData;
-
-	keyParser_config_t		config;
-	keyParser_recv_t		recv;
-	keyParser_replayReset_t replayReset;
-	keyParser_remove_t		remove;
-};
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-keyParser_t* keyParser_create(TI_HANDLE hOs);
-
-TI_STATUS keyParser_config(struct _keyParser_t *pKeyParser,
-						TRsnPaeConfig *pPaeConfig,
-                        struct _unicastKey_t *pUcastKey,
-                        struct _broadcastKey_t *pBcastKey,
-                        struct _mainKeys_t *pParent,
-						TI_HANDLE hReport,
-						TI_HANDLE hOs,
-                        TI_HANDLE hCtrlData);
-
-TI_STATUS keyParser_unload(struct _keyParser_t *pKeyParser);
-
-TI_STATUS keyParser_nop(keyParser_t *pKeyParser);
-
-#endif /*  _KEY_PARSER_H*/
diff --git a/wl1271/stad/src/Connection_Managment/keyParserExternal.c b/wl1271/stad/src/Connection_Managment/keyParserExternal.c
deleted file mode 100644
index c56f505..0000000
--- a/wl1271/stad/src/Connection_Managment/keyParserExternal.c
+++ /dev/null
@@ -1,393 +0,0 @@
-/*
- * keyParserExternal.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file keyParserExternal.c
- * \brief External key parser implementation.
- *
- * \see keyParser.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	External Key Parser                                             *
- *   PURPOSE:   EAP parser implementation                                   *
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_34
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-
-#include "keyTypes.h"
-
-#include "keyParser.h"
-#include "keyParserExternal.h"
-#include "mainKeysSm.h"
-#include "mainSecSm.h"
-#include "admCtrl.h"
-
-#include "unicastKeySM.h"
-#include "broadcastKeySM.h"
-#include "DataCtrl_Api.h"
-
-#define  TKIP_KEY_LEN 32
-#define  AES_KEY_LEN  16
-
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_keyParserRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS keyParserExternal_config(struct _keyParser_t *pKeyParser)
-{
-	pKeyParser->recv = keyParserExternal_recv;
-	pKeyParser->replayReset = keyParser_nop;
-	pKeyParser->remove = keyParserExternal_remove;
-	return TI_OK;
-}
-
-
-/**
-*
-* keyParserExternal_recv
-*
-* \b Description: 
-*
-* External key Parser receive function:
-*							- Called by NDIS (Windows)  upon receiving an External Key.
-*							- Filters the following keys:								
-*								- Keys with invalid key index
-*								- Keys with invalid MAC address
-*
-* \b ARGS:
-*
-*  I   - pKeyParser - Pointer to the keyParser context  \n
-*  I   - pKeyData - A pointer to the Key Data. \n
-*  I   - keyDataLen - The Key Data length. \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-*/
-
-TI_STATUS keyParserExternal_recv(struct _keyParser_t *pKeyParser,
-						  TI_UINT8 *pKeyData, TI_UINT32 keyDataLen)
-{
-	TI_STATUS						status;
-	OS_802_11_KEY 	                *pKeyDesc;
-	encodedKeyMaterial_t    		encodedKeyMaterial;
-    paramInfo_t  					macParam;
-	TI_BOOL                         macEqual2Associated=TI_FALSE;
-	TI_BOOL							macIsBroadcast=TI_FALSE;
-    TI_BOOL                         wepKey = TI_FALSE;
-	TI_UINT8						broadcastMacAddr[MAC_ADDR_LEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-	TI_UINT8						nullMacAddr[MAC_ADDR_LEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
-    TI_UINT8                        keyBuffer[MAC_ADDR_LEN+KEY_RSC_LEN+MAX_EXT_KEY_DATA_LENGTH];
-    
-
-    if (pKeyData == NULL)                             
-	{                                                 
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: NULL KEY Data\n");
-		return TI_NOK;
-	}
-	
-	pKeyDesc = (OS_802_11_KEY*)pKeyData;
-
-    /* copy the key data, mac address and RSC */
-	MAC_COPY (keyBuffer, pKeyDesc->BSSID);
-	/* configure keyRSC value (if needed) */
-    if (pKeyDesc->KeyIndex & EXT_KEY_RSC_KEY_MASK)
-	{	/* set key recieve sequence counter */
-        os_memoryCopy(pKeyParser->hOs, &keyBuffer[MAC_ADDR_LEN], (TI_UINT8*)&(pKeyDesc->KeyRSC), KEY_RSC_LEN);
-	}
-    else
-    {
-        os_memoryZero(pKeyParser->hOs, &keyBuffer[MAC_ADDR_LEN], KEY_RSC_LEN);
-    }
-
-    /* check type and validity of keys */
-    /* check MAC Address validity */
-	macParam.paramType = CTRL_DATA_CURRENT_BSSID_PARAM;
-	status = ctrlData_getParam(pKeyParser->hCtrlData, &macParam);
-
-	if (status != TI_OK)
-	{
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: Cannot get MAC address !!!\n");
-        return TI_NOK;
-	}
-
-	/* check key length */
-	if((pKeyDesc->KeyLength != WEP_KEY_LEN_40) && 
-		(pKeyDesc->KeyLength != WEP_KEY_LEN_104) && 
-		(pKeyDesc->KeyLength != WEP_KEY_LEN_232) &&
-		(pKeyDesc->KeyLength != TKIP_KEY_LEN) && 
-		(pKeyDesc->KeyLength != AES_KEY_LEN) )
-		
-	{
-TRACE1(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: Incorrect key length - %d \n", pKeyDesc->KeyLength);
-		return TI_NOK;
-	}
-	if (MAC_EQUAL(macParam.content.ctrlDataCurrentBSSID, pKeyDesc->BSSID))
-	{	
-        macEqual2Associated = TI_TRUE;
-   	}
-	if (MAC_EQUAL (pKeyDesc->BSSID, broadcastMacAddr))
-	{	
-        macIsBroadcast = TI_TRUE;
-   	}
-	if ((pKeyDesc->KeyLength == WEP_KEY_LEN_40) || 
-		(pKeyDesc->KeyLength == WEP_KEY_LEN_104) || 
-		(pKeyDesc->KeyLength == WEP_KEY_LEN_232))
-	{	/* In Add WEP the MAC address is nulled, since it's irrelevant */
-        macEqual2Associated = TI_TRUE;
-        wepKey = TI_TRUE;
-   	}
-
-    if (pKeyDesc->KeyIndex & EXT_KEY_SUPP_AUTHENTICATOR_MASK)
-    {  /* The key is being set by an Authenticator - not allowed in IBSS mode */
-    	if (pKeyParser->pParent->pParent->pParent->pAdmCtrl->networkMode == RSN_IBSS)
-        {	/* in IBSS only Broadcast MAC is allowed */
-        TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: Authenticator set key in IBSS mode !!!\n");
-        	return TI_NOK;
-        }
-
-    }
-
-    if (pKeyDesc->KeyIndex & EXT_KEY_REMAIN_BITS_MASK)
-    {  /* the reamining bits in the key index are not 0 (when they should be) */
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: Key index bits 8-27 should be 0 !!!\n");
-		return TI_NOK;
-    }
-    
-    encodedKeyMaterial.pData  = (char *) keyBuffer;
-	/* Check key length according to the cipher suite - TKIP, etc...??? */
-    if (wepKey)
-    {
-        if (!((pKeyDesc->KeyLength == WEP_KEY_LEN_40) || (pKeyDesc->KeyLength == WEP_KEY_LEN_104) 
-              || (pKeyDesc->KeyLength == WEP_KEY_LEN_232)))
-        {	/*Invalid key length*/
-            TRACE1(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "WEP_KEY_PARSER: ERROR: Invalid Key length: %d !!!\n", pKeyDesc->KeyLength);
-            return TI_NOK;
-        }
-
-        os_memoryCopy(pKeyParser->hOs, &keyBuffer[0], pKeyDesc->KeyMaterial, pKeyDesc->KeyLength);
-        if (MAC_EQUAL (nullMacAddr, pKeyDesc->BSSID))
-        {   
-            macIsBroadcast = TI_TRUE;
-        } 
-
-        encodedKeyMaterial.keyLen = pKeyDesc->KeyLength;
-    }
-    else /* this is TKIP or CKIP */
-    {   
-        if ((pKeyDesc->KeyLength == AES_KEY_LEN) && (pKeyParser->pPaeConfig->unicastSuite == TWD_CIPHER_CKIP))
-        {
-            os_memoryCopy(pKeyParser->hOs, &keyBuffer[0], pKeyDesc->KeyMaterial, pKeyDesc->KeyLength);
-            encodedKeyMaterial.keyLen = pKeyDesc->KeyLength;
-        }
-        else
-        {
-            os_memoryCopy(pKeyParser->hOs, 
-                          &keyBuffer[MAC_ADDR_LEN+KEY_RSC_LEN],
-                          pKeyDesc->KeyMaterial, 
-                          pKeyDesc->KeyLength);
-
-            encodedKeyMaterial.keyLen = MAC_ADDR_LEN+KEY_RSC_LEN+pKeyDesc->KeyLength;
-        }
-    }
-
-    encodedKeyMaterial.keyId  = pKeyDesc->KeyIndex;
-
-TRACE2(pKeyParser->hReport, REPORT_SEVERITY_INFORMATION, "EXT_KEY_PARSER: Key received keyId=%x, keyLen=%d \n",						    pKeyDesc->KeyIndex, pKeyDesc->KeyLength                             );
-
-    if (pKeyDesc->KeyIndex & EXT_KEY_PAIRWISE_GROUP_MASK)
-    {	/* Pairwise key */
-        /* check that the lower 8 bits of the key index are 0 */
-        if (!wepKey && (pKeyDesc->KeyIndex & 0xff))
-        {
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_WARNING, "EXT_KEY_PARSER: ERROR: Pairwise key must have index 0 !!!\n");
-            return TI_NOK;
-        }
-
-		if (macIsBroadcast)
-		{
-            TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: Broadcast MAC address for unicast !!!\n");
-			return TI_NOK;
-		}
-		if (pKeyDesc->KeyIndex & EXT_KEY_TRANSMIT_MASK)
-		{	/* tx only pairwase key */
-			/* set unicast keys */
-        	if (pKeyParser->pUcastKey->recvSuccess!=NULL)
-            {
-        	status = pKeyParser->pUcastKey->recvSuccess(pKeyParser->pUcastKey, &encodedKeyMaterial);
-            }
-		} else {
-			/* recieve only pairwase keys are not allowed */
-            TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: recieve only pairwase keys are not allowed !!!\n");
-            return TI_NOK;
-		}
-
-    }
-    else
-    {   /* set broadcast keys */
-        if (!macIsBroadcast)
-        {	/* not broadcast MAC */
-        	if (pKeyParser->pParent->pParent->pParent->pAdmCtrl->networkMode == RSN_IBSS)
-        	{	/* in IBSS only Broadcast MAC is allowed */
-            TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: not broadcast MAC in IBSS mode !!!\n");
-            	return TI_NOK;
-        	}
-        	else if (!macEqual2Associated)
-        	{	/* ESS mode and MAC is different than the associated one */
-        		/* save the key for later */
-				status = TI_OK; /* pKeyParser->pBcastKey->saveKey(pKeyParser->pBcastKey, &encodedKey);*/
-        	}
-			else
-			{	/* MAC is equal to the associated one - configure immediately */
-                if (!wepKey)
-				{
-					MAC_COPY (keyBuffer, broadcastMacAddr);
-				}
-        		if (pKeyParser->pBcastKey->recvSuccess!=NULL)
-                {
-					status =  pKeyParser->pBcastKey->recvSuccess(pKeyParser->pBcastKey, &encodedKeyMaterial);
-				}
-			}
-        }
-		else
-		{   /* MAC is broadcast - configure immediately */
-			if (!wepKey)
-			{
-				MAC_COPY (keyBuffer, broadcastMacAddr);
-			}
-		 	
-			/* set broadcast key */
-			if (pKeyParser->pBcastKey->recvSuccess!=NULL)
-			{
-				status =  pKeyParser->pBcastKey->recvSuccess(pKeyParser->pBcastKey, &encodedKeyMaterial);
-			}
-
-			if (pKeyDesc->KeyIndex & EXT_KEY_TRANSMIT_MASK)
-			{	/* Group key used to transmit */
-				/* set as unicast key as well */
-				if (pKeyParser->pUcastKey->recvSuccess!=NULL)
-				{
-					status = pKeyParser->pUcastKey->recvSuccess(pKeyParser->pUcastKey, &encodedKeyMaterial);
-				}
-			}
-		}
-    }
-				  
-	return status;
-}
-
-
-
-
-TI_STATUS keyParserExternal_remove(struct _keyParser_t *pKeyParser, TI_UINT8 *pKeyData, TI_UINT32 keyDataLen)
-{
-	TI_STATUS				status;
-	OS_802_11_KEY	 		*pKeyDesc;
-    paramInfo_t  			macParam;
-	encodedKeyMaterial_t    encodedKeyMaterial;
-	TI_UINT8				broadcastMacAddr[MAC_ADDR_LEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-    TI_UINT8                keyBuffer[MAC_ADDR_LEN+KEY_RSC_LEN+MAX_EXT_KEY_DATA_LENGTH];
-
-	if (pKeyData == NULL)
-	{
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: NULL KEY Data\n");
-		return TI_NOK;
-	}
-	
-	pKeyDesc = (OS_802_11_KEY*)pKeyData;
-
-    if (pKeyDesc->KeyIndex & EXT_KEY_TRANSMIT_MASK)
-	{	/* Bit 31 should always be zero */
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: Remove TX bit in key index can't be 1\n");
-		return TI_NOK;
-	}
-	if (pKeyDesc->KeyIndex & EXT_KEY_REMAIN_BITS_MASK)
-	{	/* Bits 8-29 should always be zero */
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: Remove none zero key index\n");
-		return TI_NOK;
-	}
-	
-	encodedKeyMaterial.keyId = pKeyDesc->KeyIndex;
-	encodedKeyMaterial.keyLen = 0;
-    encodedKeyMaterial.pData = (char *) keyBuffer;
-
-	if (pKeyDesc->KeyIndex & EXT_KEY_PAIRWISE_GROUP_MASK)
-	{	/* delete all pairwise keys or for the current BSSID */
-		if (!MAC_EQUAL(pKeyDesc->BSSID, broadcastMacAddr))
-		{
-			MAC_COPY (keyBuffer, pKeyDesc->BSSID);
-		} 
-        else 
-        {
-			macParam.paramType = CTRL_DATA_CURRENT_BSSID_PARAM;
-			status = ctrlData_getParam(pKeyParser->hCtrlData, &macParam);
-			if (status != TI_OK)
-			{
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: Cannot get MAC address !!!\n");
-				return TI_NOK;
-			}
-			
-			MAC_COPY (keyBuffer, macParam.content.ctrlDataCurrentBSSID);
-		}
-
-        status =  pKeyParser->pUcastKey->pKeyDerive->remove(pKeyParser->pUcastKey->pKeyDerive, &encodedKeyMaterial);
-	}
-	else
-	{	/* delete all group keys or for the current BSSID */
-		MAC_COPY (keyBuffer, broadcastMacAddr);
-        status =  pKeyParser->pBcastKey->pKeyDerive->remove(pKeyParser->pUcastKey->pKeyDerive, &encodedKeyMaterial);
-	}
-
-	return status;
-}
diff --git a/wl1271/stad/src/Connection_Managment/keyParserExternal.h b/wl1271/stad/src/Connection_Managment/keyParserExternal.h
deleted file mode 100644
index d9c1407..0000000
--- a/wl1271/stad/src/Connection_Managment/keyParserExternal.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * keyParserExternal.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file keyParserExternal.h
- *  \brief WEP Key PArser Header file
- *
- *  \see keyParser.h
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	keyParserExternal.h											   */
-/*    PURPOSE:	External key parser											   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _KEY_PARSER_EXTERNAL_H
-#define _KEY_PARSER_EXTERNAL_H
-
-#include "fsm.h"
-#include "keyParser.h"
-
-/* Constants */
-#define MAX_EXT_KEY_DATA_LENGTH   32
-
-
-#define EXT_KEY_TRANSMIT_MASK				0x80000000		/*< bit 31 of key index field */
-#define EXT_KEY_PAIRWISE_GROUP_MASK			0x40000000		/*< bit 30 of key index field */
-#define EXT_KEY_RSC_KEY_MASK				0x20000000		/*< bit 29 of key index field */
-#define EXT_KEY_SUPP_AUTHENTICATOR_MASK		0x10000000		/*< bit 28 of key index field */
-#define EXT_KEY_REMAIN_BITS_MASK			0x0FFFFF00		/*< remaining 20 bits in external key index */
-
-#define WEP_KEY_LEN_40	 5  /* 40 bit (5 byte) key */
-#define WEP_KEY_LEN_104	 13 /* 104 bit (13 byte) key */
-#define WEP_KEY_LEN_232	 29 /* 232 bit (29 byte) key */
-
-                                                      
-/* Enumerations */                                    
-                                                      
-/* Typedefs */                                        
-               
-
-
-
-typedef struct
-{
-	TI_UINT32		Length;						    		/* The length of the whole structure */
-	TI_UINT32		KeyIndex;								/* The key index to add or remove */
-	TI_UINT8		macAddress[MAC_ADDR_LEN];	/**< Remote station MAC address*/
-} keyParserExternal_keyRemoveDesc_t;
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS keyParserExternal_config(struct _keyParser_t *pKeyParser);
-
-TI_STATUS keyParserExternal_recv(struct _keyParser_t *pKeyParser,
-						  TI_UINT8 *pPacket, TI_UINT32 packetLen);
-
-TI_STATUS keyParserExternal_remove(struct _keyParser_t *pKeyParser, TI_UINT8 *pKeyData, TI_UINT32 keyDataLen);
-
-#endif /*_KEY_PARSER_EXTERNAL_H*/
-
diff --git a/wl1271/stad/src/Connection_Managment/keyParserWep.c b/wl1271/stad/src/Connection_Managment/keyParserWep.c
deleted file mode 100644
index ab3c56d..0000000
--- a/wl1271/stad/src/Connection_Managment/keyParserWep.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * keyParserWep.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file KeyParserWep.c
- * \brief Wep key parser implementation.
- *
- * \see keyParser.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	Wep Key Parser                                             *
- *   PURPOSE:   EAP parser implementation                                   *
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_35
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-
-#include "keyTypes.h"
-
-#include "keyParser.h"
-#include "keyParserWep.h"
-#include "mainKeysSm.h"
-
-#include "unicastKeySM.h"
-#include "broadcastKeySM.h"
-
-
-TI_STATUS keyParserWep_recv(struct _keyParser_t *pKeyParser, TI_UINT8 *pKeyData, TI_UINT32 keyDataLen);
-TI_STATUS keyParserWep_remove(struct _keyParser_t *pKeyParser, TI_UINT8 *pKeyData, TI_UINT32 keyDataLen);
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_keyParserRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS keyParserWep_config(struct _keyParser_t *pKeyParser)
-{
-	pKeyParser->recv = keyParserWep_recv;
-	pKeyParser->replayReset = keyParser_nop;
-	pKeyParser->remove = keyParserWep_remove;
-	return TI_OK;
-}
-
-
-/**
-*
-* keyParserWep_recv
-*
-* \b Description: 
-*
-* WEP key Parser receive function:
-*							- Called by the utility or NDIS (Windows)  upon receiving a WEP Key.
-*							- Filters the following keys:								
-*								- Per Client Keys
-*								- Keys with size different than 40-bit, 104-bit and 232-bit
-*								- Keys with invalid key index
-*
-* \b ARGS:
-*
-*  I   - pKeyParser - Pointer to the keyParser context  \n
-*  I   - pKeyData - A pointer to the Key Data. \n
-*  I   - keyDataLen - The Key Data length. \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-*/
-TI_STATUS keyParserWep_recv(struct _keyParser_t *pKeyParser,
-						  TI_UINT8 *pKeyData, TI_UINT32 keyDataLen)
-{
-	TI_STATUS				        status;
-	OS_802_11_KEY 	                *pKeyDesc;
-    TSecurityKeys                  securityKey;
-	
-	if (pKeyData == NULL)
-	{
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "WEP_KEY_PARSER: ERROR: NULL KEY Data\n");
-		return TI_NOK;
-	}
-	
-	pKeyDesc = (OS_802_11_KEY*)pKeyData; 
-
-	if ((pKeyDesc->KeyLength < MIN_KEY_LEN ) || (pKeyDesc->KeyLength >= MAX_KEY_LEN ))
-    {
-        TRACE1(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "WEP_KEY_PARSER: ERROR: Key Length out of bounds=%d\n", pKeyDesc->KeyLength);
-        return TI_NOK;
-    }
-
-    if (pKeyDesc->KeyIndex & WEP_KEY_REMAIN_BITS_MASK)
-    {  /* the reamining bits in the key index are not 0 (when they should be) */
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "WEP_KEY_PARSER: ERROR: Key index bits 8-29 should be 0 !!!\n");
-		return TI_NOK;
-    }
-
-    securityKey.keyType = KEY_WEP;
-    securityKey.encLen = (TI_UINT16)pKeyDesc->KeyLength;
-    securityKey.keyIndex = pKeyDesc->KeyIndex;
-    os_memoryCopy(pKeyParser->hOs, (void *)securityKey.encKey, pKeyDesc->KeyMaterial, pKeyDesc->KeyLength);
-	
-    TRACE2(pKeyParser->hReport, REPORT_SEVERITY_INFORMATION, "WEP_KEY_PARSER: Key received keyId=%x, keyLen=%d\n",						    pKeyDesc->KeyIndex, pKeyDesc->KeyLength);
-
-
-    /* We accept only 40, 104 or 232 -bit WEP keys*/
-    if (!((securityKey.encLen == WEP_KEY_LEN_40) || (securityKey.encLen == WEP_KEY_LEN_104) 
-          || (securityKey.encLen == WEP_KEY_LEN_232)))
-    {	/*Invalid key length*/
-        TRACE1(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "WEP_KEY_PARSER: ERROR: Invalid Key length: %d !!!\n", securityKey.encLen);
-        return TI_NOK;
-    }
-    /* configure key for Tx and Rx */
-    if (pKeyDesc->KeyIndex & WEP_KEY_TRANSMIT_MASK)
-    {	/* configure default key for Tx - unicast */
-        status = pKeyParser->pParent->setDefaultKeyId(pKeyParser->pParent, (TI_UINT8)securityKey.keyIndex);
-        if (status!=TI_OK)
-        {
-            return status;
-        }        
-    }
-    /* configure key for Tx - unicast, and Rx - broadcast*/
-    status = pKeyParser->pParent->setKey(pKeyParser->pParent, &securityKey);
-
-	return status;
-}
-
-
-
-TI_STATUS keyParserWep_remove(struct _keyParser_t *pKeyParser, TI_UINT8 *pKeyData, TI_UINT32 keyDataLen)
-{
-	TI_STATUS				status;
-	OS_802_11_KEY			*pKeyDesc;
-	encodedKeyMaterial_t    encodedKeyMaterial;
-    TI_UINT8                keyBuffer[MAC_ADDR_LEN+KEY_RSC_LEN+MAX_WEP_KEY_DATA_LENGTH];
-
-	if (pKeyData == NULL)
-	{
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "EXT_KEY_PARSER: ERROR: NULL KEY Data\n");
-		return TI_NOK;
-	}
-	
-	pKeyDesc = (OS_802_11_KEY*)pKeyData;
-
-    if (pKeyDesc->KeyIndex & WEP_KEY_TRANSMIT_MASK)
-	{	/* Bit 31 should always be zero */
-TRACE0(pKeyParser->hReport, REPORT_SEVERITY_ERROR, "WEP_KEY_PARSER: ERROR: Remove TX key index\n");
-		return TI_NOK;
-	}
-
-	encodedKeyMaterial.keyId = pKeyDesc->KeyIndex;
-	encodedKeyMaterial.keyLen = 0;
-    encodedKeyMaterial.pData = (char *) keyBuffer;
-    MAC_COPY (keyBuffer, pKeyDesc->BSSID);
-
-	/* which should we delete ????*/
-    status =  pKeyParser->pBcastKey->pKeyDerive->remove(pKeyParser->pUcastKey->pKeyDerive, &encodedKeyMaterial);
-	return status;
-
-}
diff --git a/wl1271/stad/src/Connection_Managment/keyParserWep.h b/wl1271/stad/src/Connection_Managment/keyParserWep.h
deleted file mode 100644
index 1f5422a..0000000
--- a/wl1271/stad/src/Connection_Managment/keyParserWep.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * keyParserWep.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file keyParserWep.h
- *  \brief WEP Key PArser Header file
- *
- *  \see keyParser.h
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	keyParserWep.h											   */
-/*    PURPOSE:	WEP key parser											   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _KEY_PARSER_WEP_H
-#define _KEY_PARSER_WEP_H
-
-#include "fsm.h"
-#include "keyParser.h"
-
-/* Constants */
-#define MAX_WEP_KEY_DATA_LENGTH   32
-
-#define WEP_KEY_TRANSMIT_MASK			0x80000000		/*< bit 31 of key index field */
-#define WEP_KEY_PER_CLIENT_MASK			0x40000000		/*< bit 30 of key index field */
-#define WEP_KEY_REMAIN_BITS_MASK		0x3FFFFF00		/*< bits 8-29 of key index field */
-
-
-
-#define WEP_KEY_LEN_40	 5  /* 40 bit (5 byte) key */
-#define WEP_KEY_LEN_104	 13 /* 104 bit (13 byte) key */
-#define WEP_KEY_LEN_232	 29 /* 232 bit (29 byte) key */
-
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS keyParserWep_config(struct _keyParser_t *pKeyParser);
-
-TI_STATUS keyParserWep_recv(struct _keyParser_t *pKeyParser,
-						  TI_UINT8 *pPacket, TI_UINT32 packetLen);
-
-TI_STATUS keyParserWep_remove(struct _keyParser_t *pKeyParser, TI_UINT8 *pKeyData, TI_UINT32 keyDataLen);
-
-#endif /*_KEY_PARSER_WEP_H*/
-
diff --git a/wl1271/stad/src/Connection_Managment/keyTypes.h b/wl1271/stad/src/Connection_Managment/keyTypes.h
deleted file mode 100644
index 70e061b..0000000
--- a/wl1271/stad/src/Connection_Managment/keyTypes.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * keyTypes.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file eapolParserMainInternal.h
- * \brief EAPOL frame parser internal definitions header file.
- *
- *
- * \see  eapolParseerMain.c,  eapolBuilderMain.h,  eapolBuilderMain.c, eapolParserMain.h
-*/
-
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:                                                                *
- *   PURPOSE:                                                               *
- *   CREATOR: Alexander Sirotkin.                                           *
- *            Demiurg@ti.com                                                *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef  _KEY_TYPES_H
-#define  _KEY_TYPES_H
-
-#include "tidef.h"
-
-/* Constatnts */
-
-
-#define SESSION_KEY_LEN				16
-
-/* Structures */
-
-typedef struct
-{
-	TI_UINT32	keyId;                          /**< Decoded key Id */
-	TI_UINT32	keyLen;							/**< Key length */
-	char	*pData;							/**< Pointer to the material to derive the key from */
-} encodedKeyMaterial_t;
-
-
-#endif /*  _EAPOL_PARSER_INTERNAL_H*/
diff --git a/wl1271/stad/src/Connection_Managment/mainKeysSm.c b/wl1271/stad/src/Connection_Managment/mainKeysSm.c
deleted file mode 100644
index 969ceb6..0000000
--- a/wl1271/stad/src/Connection_Managment/mainKeysSm.c
+++ /dev/null
@@ -1,980 +0,0 @@
-/*
- * mainKeysSm.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file mainKeySM.c
- * \brief Main key state machine implementation.
- *
- * \see mainKeySM.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Main key SM													*
- *   PURPOSE: Main key SM implmentation				  						*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_36
-#include "osApi.h"
-#include "paramOut.h"
-#include "timer.h"
-#include "report.h"
-#include "rsn.h"
-#include "rsnApi.h"
-#include "smeApi.h"
-#include "mainSecSm.h"                         
-#include "keyParser.h" 
-#include "broadcastKeySM.h"
-#include "unicastKeySM.h"  
-#include "mainKeysSm.h"
-#include "mainKeysSmInternal.h"
-#include "DataCtrl_Api.h"
-#include "admCtrl.h"
-#include "EvHandler.h"
-#include "TI_IPC_Api.h"
-#include "connApi.h"
-
-static TI_STATUS mainKeys_smEvent(struct _mainKeys_t *pMainKeys, TI_UINT8 event, void* pData);
-
-/**
-*
-* mainKeys_create
-*
-* \b Description: 
-*
-* Allocate memory for the main security context, and create all the rest of the needed contexts.
-*
-* \b ARGS:
-*
-*  I - hOs - OS handle for OS operations.
-*
-* \b RETURNS:
-*
-*  pointer to main security context. If failed, returns NULL.
-*
-* \sa 
-*/
-mainKeys_t* mainKeys_create(TI_HANDLE hOs)
-{
-	mainKeys_t 	*pHandle;
-	TI_STATUS		status;
-
-	/* allocate association context memory */
-	pHandle = (mainKeys_t*)os_memoryAlloc(hOs, sizeof(mainKeys_t));
-	if (pHandle == NULL)
-	{
-		return NULL;
-	}
-
-	os_memoryZero(hOs, pHandle, sizeof(mainKeys_t));
-
-	/* allocate memory for association state machine */
-	status = fsm_Create(hOs, &pHandle->pMainKeysSm, MAIN_KEYS_NUM_STATES, MAIN_KEYS_NUM_EVENTS);
-	if (status != TI_OK)
-	{
-		os_memoryFree(hOs, pHandle, sizeof(mainKeys_t));
-		return NULL;
-	}
-
-	pHandle->pKeyParser = keyParser_create(hOs);
-	if (pHandle->pKeyParser == NULL)
-	{
-		fsm_Unload(hOs, pHandle->pMainKeysSm);
-		os_memoryFree(hOs, pHandle, sizeof(mainKeys_t));
-		return NULL;
-	}
-
-	pHandle->pBcastSm = broadcastKey_create(hOs);
-	if (pHandle->pBcastSm == NULL)
-	{
-		keyParser_unload(pHandle->pKeyParser);
-		fsm_Unload(hOs, pHandle->pMainKeysSm);
-		os_memoryFree(hOs, pHandle, sizeof(mainKeys_t));
-		return NULL;
-	}
-
-	pHandle->pUcastSm = unicastKey_create(hOs);
-	if (pHandle->pBcastSm == NULL)
-	{
-		broadcastKey_unload(pHandle->pBcastSm);
-		keyParser_unload(pHandle->pKeyParser);
-		fsm_Unload(hOs, pHandle->pMainKeysSm);
-		os_memoryFree(hOs, pHandle, sizeof(mainKeys_t));
-		return NULL;
-	}
-    
-	pHandle->hOs = hOs;
-    
-	/* At first Timeout we will send MediaSpecific Event   */
-	/* At any other Timeout we will send the Timeout Event */
-
-	pHandle->mainKeysTimeoutCounter = TI_FALSE;
-    
-	return pHandle;
-}
-
-/**
-*
-* mainKeys_config
-*
-* \b Description: 
-*
-* Init main security state machine state machine
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainKeys_config (mainKeys_t    *pMainKeys, 
-                           TRsnPaeConfig *pPaeConfig, 
-                           void          *pParent,
-                           TI_HANDLE      hReport,
-                           TI_HANDLE      hOs,
-                           TI_HANDLE      hCtrlData,
-                           TI_HANDLE      hEvHandler,
-                           TI_HANDLE      hConn,
-                           TI_HANDLE      hRsn,
-                           TI_HANDLE      hTimer)
-
-{
-    TI_STATUS      status;
-
-	/** Main key State Machine matrix */
-	fsm_actionCell_t    mainKeysSM_matrix[MAIN_KEYS_NUM_STATES][MAIN_KEYS_NUM_EVENTS] =
-	{
-		/* next state and actions for IDLE state */
-		{	{MAIN_KEYS_STATE_START, (fsm_Action_t)mainKeys_startIdle}, 
-			{MAIN_KEYS_STATE_IDLE, (fsm_Action_t)mainKeySmNop},
-			{MAIN_KEYS_STATE_IDLE, (fsm_Action_t)mainKeySmUnexpected},
-			{MAIN_KEYS_STATE_IDLE, (fsm_Action_t)mainKeySmUnexpected},
-			{MAIN_KEYS_STATE_IDLE, (fsm_Action_t)mainKeySmUnexpected}
-		},
-
-		/* next state and actions for START state */
-		{	{MAIN_KEYS_STATE_START, (fsm_Action_t)mainKeySmUnexpected},
-			{MAIN_KEYS_STATE_IDLE, (fsm_Action_t)mainKeys_stopStart}, 
-			{MAIN_KEYS_STATE_UNICAST_COMPLETE, (fsm_Action_t)mainKeySmNop},
-			{MAIN_KEYS_STATE_BROADCAST_COMPLETE, (fsm_Action_t)mainKeySmNop},
-			{MAIN_KEYS_STATE_START, (fsm_Action_t)mainKeys_smTimeOut}
-		},
-
-		/* next state and actions for UNICAST COMPLETE state */
-		{	{MAIN_KEYS_STATE_UNICAST_COMPLETE, (fsm_Action_t)mainKeySmUnexpected},
-			{MAIN_KEYS_STATE_IDLE, (fsm_Action_t)mainKeys_stopUcastComplete}, 
-			{MAIN_KEYS_STATE_UNICAST_COMPLETE, (fsm_Action_t)mainKeySmNop},
-			{MAIN_KEYS_STATE_COMPLETE, (fsm_Action_t)mainKeys_bcastCompleteUcastComplete},
-			{MAIN_KEYS_STATE_UNICAST_COMPLETE, (fsm_Action_t)mainKeys_smTimeOut}
-		},
-
-		/* next state and actions for BROADCAST COMPLETE state */
-		{	{MAIN_KEYS_STATE_BROADCAST_COMPLETE, (fsm_Action_t)mainKeySmUnexpected},
-			{MAIN_KEYS_STATE_IDLE, (fsm_Action_t)mainKeys_stopBcastComplete},
-			{MAIN_KEYS_STATE_COMPLETE, (fsm_Action_t)mainKeys_ucastCompleteBcastComplete},
-			{MAIN_KEYS_STATE_BROADCAST_COMPLETE, (fsm_Action_t)mainKeySmNop},
-			{MAIN_KEYS_STATE_BROADCAST_COMPLETE, (fsm_Action_t)mainKeys_smTimeOut}
-		},
-
-		/* next state and actions for COMPLETE state */
-		{	{MAIN_KEYS_STATE_COMPLETE, (fsm_Action_t)mainKeySmUnexpected},
-			{MAIN_KEYS_STATE_IDLE, (fsm_Action_t)mainKeys_stopComplete},
-			{MAIN_KEYS_STATE_COMPLETE, (fsm_Action_t)mainKeySmNop},
-			{MAIN_KEYS_STATE_COMPLETE, (fsm_Action_t)mainKeySmNop},
-			{MAIN_KEYS_STATE_COMPLETE, (fsm_Action_t)mainKeySmUnexpected}
-		}
-	};
-
-	pMainKeys->hCtrlData = hCtrlData;
-	pMainKeys->hOs = hOs;
-	pMainKeys->hReport = hReport;
-    pMainKeys->hEvHandler = hEvHandler;
-    pMainKeys->hConn = hConn;
-    pMainKeys->hRsn = hRsn;
-    pMainKeys->hTimer = hTimer;
-
-    pMainKeys->pParent = pParent;
-	pMainKeys->keysTimeout = MAIN_KEYS_TIMEOUT;
-
-	pMainKeys->start = mainKeys_start;
-	pMainKeys->stop = mainKeys_stop;
-	pMainKeys->reportUcastStatus = mainKeys_reportUcastStatus;
-	pMainKeys->reportBcastStatus = mainKeys_reportBcastStatus;
-	pMainKeys->setKey = mainKeys_setKey;
-	pMainKeys->removeKey = mainKeys_removeKey;
-	pMainKeys->setDefaultKeyId = mainKeys_setDefaultKeyId;
-	pMainKeys->getSessionKey = mainKeys_getSessionKey;
-
-	pMainKeys->currentState = MAIN_KEYS_STATE_IDLE;
-
-	/* allocate OS timer memory */
-    if (pMainKeys->hSessionTimer == NULL)
-    {
-        pMainKeys->hSessionTimer = tmr_CreateTimer (pMainKeys->hTimer);
-        if (pMainKeys->hSessionTimer == NULL)
-        {
-            TRACE0(pMainKeys->hReport, REPORT_SEVERITY_ERROR, "mainKeys_config(): Failed to create hSessionTimer!\n");
-            return TI_NOK;
-        }
-	}
-
-    status = fsm_Config(pMainKeys->pMainKeysSm, &mainKeysSM_matrix[0][0], 
-						MAIN_KEYS_NUM_STATES, MAIN_KEYS_NUM_EVENTS, NULL, pMainKeys->hOs);
-	if (status != TI_OK)
-	{
-TRACE0(pMainKeys->hReport, REPORT_SEVERITY_ERROR, "MAIN_KEYS_SM: Error in configuring SM\n");
-		return status;
-	}
-
-	status = keyParser_config(pMainKeys->pKeyParser, 
-                              pPaeConfig, 
-                              pMainKeys->pUcastSm, 
-                              pMainKeys->pBcastSm, 
-                              pMainKeys, 
-                              hReport, 
-                              hOs,
-                              hCtrlData);
-	if (status != TI_OK)
-	{
-TRACE0(pMainKeys->hReport, REPORT_SEVERITY_ERROR, "MAIN_KEYS_SM: Error in configuring key parser\n");
-		return status;
-	}
-
-	status = broadcastKey_config(pMainKeys->pBcastSm, pPaeConfig, pMainKeys, hReport, hOs);
-	if (status != TI_OK)
-	{
-TRACE0(pMainKeys->hReport, REPORT_SEVERITY_ERROR, "MAIN_KEYS_SM: Error in configuring broadcast key SM\n");
-		return status;
-	}
-    
-	status = unicastKey_config(pMainKeys->pUcastSm, pPaeConfig, pMainKeys, hReport, hOs);
-	if (status != TI_OK)
-	{
-TRACE0(pMainKeys->hReport, REPORT_SEVERITY_ERROR, "MAIN_KEYS_SM: Error in configuring unicast key SM\n");
-		return status;
-	}
-	
-	return TI_OK;
-}
-
-/**
-*
-* mainKeys_config
-*
-* \b Description: 
-*
-* Init main security state machine state machine
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainKeys_unload(mainKeys_t *pMainKeys)
-{
-	TI_STATUS	status;
-
-	if (pMainKeys == NULL)
-	{
-		return TI_NOK;
-	}
-
-	status = fsm_Unload(pMainKeys->hOs, pMainKeys->pMainKeysSm);
-    if (status != TI_OK)
-	{
-		/* report failure but don't stop... */
-        TRACE0(pMainKeys->hReport, REPORT_SEVERITY_ERROR, "MAIN_KEYS_SM: Error releasing FSM memory \n");
-	}
-
-	if (pMainKeys->hSessionTimer)
-	{
-		tmr_DestroyTimer (pMainKeys->hSessionTimer);
-	}
-    pMainKeys->hSessionTimer = NULL;
-	
-    status = keyParser_unload(pMainKeys->pKeyParser);
-    if (status != TI_OK)
-	{
-		/* report failure but don't stop... */
-        TRACE0(pMainKeys->hReport, REPORT_SEVERITY_ERROR, "MAIN_KEYS_SM: Error unloading key parser\n");
-	}
-
-	status = broadcastKey_unload(pMainKeys->pBcastSm);
-    if (status != TI_OK)
-	{
-		/* report failure but don't stop... */
-        TRACE0(pMainKeys->hReport, REPORT_SEVERITY_ERROR, "MAIN_KEYS_SM: Error unloading broadcast key SM\n");
-	}
-
-	status = unicastKey_unload(pMainKeys->pUcastSm);
-    if (status != TI_OK)
-	{
-		/* report failure but don't stop... */
-        TRACE0(pMainKeys->hReport, REPORT_SEVERITY_ERROR, "MAIN_KEYS_SM: Error unloading unicast key SM\n");
-	}
-	
-	os_memoryFree(pMainKeys->hOs, pMainKeys, sizeof(mainKeys_t));
-
-    return TI_OK;
-}
-
-
-/**
-*
-* rsn_mainKeySmStart
-*
-* \b Description: 
-*
-* START event handler
-*
-* \b ARGS:
-*
-*  I   - pCtrlB - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa rsn_mainKeySmStop()
-*/
-
-TI_STATUS mainKeys_start(struct _mainKeys_t *pMainKeys)
-{
-	TI_STATUS  status;
-
-	status = mainKeys_smEvent(pMainKeys, MAIN_KEYS_EVENT_START, pMainKeys);
-
-	return status;
-}
-
-/**
-*
-* rsn_mainKeySmStop
-*
-* \b Description: 
-*
-* STOP event handler
-*
-* \b ARGS:
-*
-*  I   - pCtrlB - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa rsn_mainKeySmStart()
-*/
-
-TI_STATUS mainKeys_stop(struct _mainKeys_t *pMainKeys)
-{
-	TI_STATUS  status;
-
-	status = mainKeys_smEvent(pMainKeys, MAIN_KEYS_EVENT_STOP, pMainKeys);
-
-	return status;
-}
-
-/**
-*
-* rsn_mainKeySmReportUnicastComplete
-*
-* \b Description: 
-*
-* UNICAST_COMPLETE event handler
-*
-* \b ARGS:
-*
-*  I   - pCtrlB - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa rsn_mainKeySmReportBroadcastComplete()
-*/
-
-TI_STATUS mainKeys_reportUcastStatus(struct _mainKeys_t *pMainKeys, TI_STATUS ucastStatus)
-{
-	TI_STATUS    status=TI_NOK;
-    EExternalAuthMode extAuthMode;
-	struct _rsn_t *pRsn = pMainKeys->pParent->pParent;
-
-	if (ucastStatus == TI_OK)
-	{
-
-		txCtrlParams_setCurrentPrivacyInvokedMode(pRsn->hTxCtrl, TI_TRUE);
-        
-		status = pRsn->pAdmCtrl->getExtAuthMode(pRsn->pAdmCtrl, &extAuthMode);
-        if (status != TI_OK)
-        {
-            return status;
-        }
-        if (extAuthMode >= RSN_EXT_AUTH_MODE_WPA)
-        {
-			txCtrlParams_setEapolEncryptionStatus(pRsn->hTxCtrl, TI_TRUE);
-        }
-        else
-        {
-			txCtrlParams_setEapolEncryptionStatus(pRsn->hTxCtrl, TI_FALSE);
-        }
-		
-        status = mainKeys_smEvent(pMainKeys, MAIN_KEYS_EVENT_UCAST_COMPLETE, pMainKeys);
-	}
-
-	return status;
-}
-
-
-/**
-*
-* rsn_mainKeySmReportBroadcastComplete
-*
-* \b Description: 
-*
-* BROADCAST_COMPLETE event handler
-*
-* \b ARGS:
-*
-*  I   - pCtrlB - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa rsn_mainKeySmReportUnicastComplete()
-*/
-
-TI_STATUS mainKeys_reportBcastStatus(struct _mainKeys_t *pMainKeys, TI_STATUS bcastStatus)
-{
-	TI_STATUS  status=TI_NOK;
-
-	if (bcastStatus == TI_OK)
-	{
-		status = mainKeys_smEvent(pMainKeys, MAIN_KEYS_EVENT_BCAST_COMPLETE, pMainKeys);
-	}
-
-	return status;
-}
-
-/**
-*
-* mainKeySmSessionTimeout
-*
-* \b Description: 
-*
-* SESSION_TIMEOUOT event handler
-*
-* \b ARGS:
-*
-*  I   - pData - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS mainKeys_setKey(struct _mainKeys_t *pMainKeys, TSecurityKeys *pKey)
-{
-	return (pMainKeys->pParent->setKey(pMainKeys->pParent, pKey));
-}
-
-/**
-*
-* mainKeySmSessionTimeout
-*
-* \b Description: 
-*
-* SESSION_TIMEOUOT event handler
-*
-* \b ARGS:
-*
-*  I   - pData - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS mainKeys_removeKey(struct _mainKeys_t *pMainKeys, TSecurityKeys *pKey)
-{
-	return (pMainKeys->pParent->removeKey(pMainKeys->pParent, pKey));
-}
-
-/**
-*
-* mainKeySmSessionTimeout
-*
-* \b Description: 
-*
-* SESSION_TIMEOUOT event handler
-*
-* \b ARGS:
-*
-*  I   - pData - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS mainKeys_setDefaultKeyId(struct _mainKeys_t *pMainKeys, TI_UINT8 keyId)
-{
-	return (pMainKeys->pParent->setDefaultKeyId(pMainKeys->pParent, keyId));
-}
-
-/**
-*
-* mainKeySmSessionTimeout
-*
-* \b Description: 
-*
-* SESSION_TIMEOUOT event handler
-*
-* \b ARGS:
-*
-*  I   - pData - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS mainKeys_getSessionKey(struct _mainKeys_t *pMainKeys, TI_UINT8 *pKey, TI_UINT32 *pKeyLen)
-{
-	TI_STATUS		status;
-
-	status = pMainKeys->pParent->getSessionKey(pMainKeys->pParent, pKey, pKeyLen);
-
-	return status;
-}
-
-/**
-*
-* mainKeySmSessionTimeout
-*
-* \b Description: 
-*
-* SESSION_TIMEOUOT event handler
-*
-* \b ARGS:
-*
-*  I   - pMainKeys - module handle  \n
-*  I   - bTwdInitOccured - Indicates if TWDriver recovery occured since timer started   \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-void mainKeys_sessionTimeout(void *pMainKeys, TI_BOOL bTwdInitOccured)
-{
-
-	mainKeys_smEvent(pMainKeys, MAIN_KEYS_EVENT_SESSION_TIMEOUOT, pMainKeys);
-
-}
-
-
-static TI_STATUS mainKeys_smEvent(struct _mainKeys_t *pMainKeys, TI_UINT8 event, void* pData)
-{
-	TI_STATUS		status;
-	TI_UINT8		nextState;
-
-
-	status = fsm_GetNextState(pMainKeys->pMainKeysSm, pMainKeys->currentState, event, &nextState);
-	if (status != TI_OK)
-	{
-TRACE0(pMainKeys->hReport, REPORT_SEVERITY_ERROR, "MAIN_KEYS_SM: ERROR - failed getting next state \n");
-
-		return(TI_NOK);
-	}
-
-	TRACE3( pMainKeys->hReport, REPORT_SEVERITY_INFORMATION, "mainKeys_smEvent: <currentState = %d, event = %d> --> nextState = %d\n", pMainKeys->currentState, event, nextState);
-
-	status = fsm_Event(pMainKeys->pMainKeysSm, &pMainKeys->currentState, event, pData);
-
-	return status;
-}
-/**
-*
-* mainKeySmStartSubKeySmsAndTimer
-*
-* \b Description: 
-*
-* Starts unicast & broadcast key SMs and session timer.
-*
-* \b ARGS:
-*
-*  I   - pData - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-
-TI_STATUS mainKeys_startIdle(struct _mainKeys_t *pMainKeys)
-{
-	TI_STATUS  status;
-	
-	status = pMainKeys->pUcastSm->start(pMainKeys->pUcastSm);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	status = pMainKeys->pBcastSm->start(pMainKeys->pBcastSm);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-    tmr_StartTimer (pMainKeys->hSessionTimer,
-                    mainKeys_sessionTimeout,
-                    (TI_HANDLE)pMainKeys,
-                    pMainKeys->keysTimeout,
-                    TI_FALSE);
-	
-	status = pMainKeys->pKeyParser->replayReset(pMainKeys->pKeyParser);
-
-	return status;
-}
-
-
-/**
-*
-* mainKeySmStopSubKeySmsAndTimer
-*
-* \b Description: 
-*
-* Stops unicast & broadcast key SMs and session timer.
-*
-* \b ARGS:
-*
-*  I   - pData - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS mainKeys_stopStart(struct _mainKeys_t *pMainKeys)
-{
-	TI_STATUS  status = TI_OK;
-
-	status = pMainKeys->pUcastSm->stop(pMainKeys->pUcastSm);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	status = pMainKeys->pBcastSm->stop(pMainKeys->pBcastSm);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	tmr_StopTimer (pMainKeys->hSessionTimer);
-	
-	return status;
-}
-
-
-/**
-*
-* mainKeySmStopSubKeySmsAndTimer
-*
-* \b Description: 
-*
-* Stops unicast & broadcast key SMs and session timer.
-*
-* \b ARGS:
-*
-*  I   - pData - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS mainKeys_stopUcastComplete(struct _mainKeys_t *pMainKeys)
-{
-	TI_STATUS  status = TI_OK;
-
-	status = pMainKeys->pUcastSm->stop(pMainKeys->pUcastSm);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	status = pMainKeys->pBcastSm->stop(pMainKeys->pBcastSm);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	tmr_StopTimer (pMainKeys->hSessionTimer);
-	
-	return status;
-}
-
-/**
-*
-* mainKeySmReportComplete
-*
-* \b Description: 
-*
-* Report key complete to the main security SM.
-*
-* \b ARGS:
-*
-*  I   - pData - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS mainKeys_bcastCompleteUcastComplete(struct _mainKeys_t *pMainKeys)
-{
-	TI_STATUS  status;
-
-    TRACE0(pMainKeys->hReport, REPORT_SEVERITY_INFORMATION, "mainKeys_bcastCompleteUcastComplete - sending Interrogate \n");
-
-    tmr_StopTimer (pMainKeys->hSessionTimer);
-
-	status = pMainKeys->pParent->reportKeysStatus(pMainKeys->pParent, TI_OK);
-
-	return status;
-}
-
-
-/**
-*
-* mainKeySmStopSubKeySmsAndTimer
-*
-* \b Description: 
-*
-* Stops unicast & broadcast key SMs and session timer.
-*
-* \b ARGS:
-*
-*  I   - pData - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS mainKeys_stopBcastComplete(struct _mainKeys_t *pMainKeys)
-{
-	TI_STATUS  status = TI_OK;
-
-	status = pMainKeys->pUcastSm->stop(pMainKeys->pUcastSm);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	status = pMainKeys->pBcastSm->stop(pMainKeys->pBcastSm);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	tmr_StopTimer (pMainKeys->hSessionTimer);
-	
-	return status;
-}
-
-/**
-*
-* mainKeySmReportComplete
-*
-* \b Description: 
-*
-* Report key complete to the main security SM.
-*
-* \b ARGS:
-*
-*  I   - pData - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS mainKeys_ucastCompleteBcastComplete(struct _mainKeys_t *pMainKeys)
-{
-	TI_STATUS  status;
-
-    TRACE0(pMainKeys->hReport, REPORT_SEVERITY_INFORMATION, "mainKeys_ucastCompleteBcastComplete \n");
-
-	tmr_StopTimer (pMainKeys->hSessionTimer);
-	pMainKeys->mainKeysTimeoutCounter = TI_FALSE;
-	status = pMainKeys->pParent->reportKeysStatus(pMainKeys->pParent, TI_OK);
-
-	return status;
-}
-
-/**
-*
-* mainKeySmStopSubKeySmsAndTimer
-*
-* \b Description: 
-*
-* Stops unicast & broadcast key SMs and session timer.
-*
-* \b ARGS:
-*
-*  I   - pData - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS mainKeys_stopComplete(struct _mainKeys_t *pMainKeys)
-{
-	TI_STATUS  status = TI_OK;
-
-	status = pMainKeys->pUcastSm->stop(pMainKeys->pUcastSm);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	status = pMainKeys->pBcastSm->stop(pMainKeys->pBcastSm);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	return status;
-}
-
-/**
-*
-* mainKeySmLogMessage
-*
-* \b Description: 
-*
-* Prints Log messge.\n
-* Start session timer.
-*
-* \b ARGS:
-*
-*  I   - pData - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS mainKeys_smTimeOut(void* data)
-{
-	OS_802_11_AUTHENTICATION_REQUEST   *request;
-	TI_UINT8                   AuthBuf[sizeof(TI_UINT32) + sizeof(OS_802_11_AUTHENTICATION_REQUEST)];
-	paramInfo_t				param;
-	TI_STATUS				status;
-	struct _mainKeys_t 		*pMainKeys = (struct _mainKeys_t *)data;
-
-
-TRACE1(pMainKeys->hReport, REPORT_SEVERITY_INFORMATION, "MAIN_KEY_SM: TRAP: Session Timeout for station , mainKeysTimeoutCounter=%d\n", pMainKeys->mainKeysTimeoutCounter);
-
-	request = (OS_802_11_AUTHENTICATION_REQUEST *)(AuthBuf + sizeof(TI_UINT32));
-	request->Length = sizeof(OS_802_11_AUTHENTICATION_REQUEST);
-
-	param.paramType = CTRL_DATA_CURRENT_BSSID_PARAM;
-	status = ctrlData_getParam(pMainKeys->hCtrlData, &param);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-    TRACE1(pMainKeys->hReport, REPORT_SEVERITY_INFORMATION, "current station is banned from the roaming candidates list for %d Ms\n", RSN_MAIN_KEYS_SESSION_TIMEOUT);
-
-    rsn_banSite(pMainKeys->hRsn, param.content.ctrlDataCurrentBSSID, RSN_SITE_BAN_LEVEL_FULL, RSN_MAIN_KEYS_SESSION_TIMEOUT);
-	
-
-	/* mainKeysTimeoutCounter is a boolean variable, With states:	*/
-	/* TI_TRUE - It is a Timeout Association Event						*/ 
-	/* TI_FALSE - It is a Media specific Event							*/
-
-	if (!pMainKeys->mainKeysTimeoutCounter)
-	{
-		/* Fill Media specific indication fields and send to OS/User    */ 
-		MAC_COPY (request->BSSID, param.content.ctrlDataCurrentBSSID);
-	
-		request->Flags = OS_802_11_REQUEST_REAUTH;
-	
-		*(TI_UINT32*)AuthBuf = os802_11StatusType_Authentication;
-	
-TRACE1(pMainKeys->hReport, REPORT_SEVERITY_INFORMATION, " %d Ms\n",RSN_MAIN_KEYS_SESSION_TIMEOUT);
-	
-		EvHandlerSendEvent(pMainKeys->hEvHandler, IPC_EVENT_MEDIA_SPECIFIC, (TI_UINT8*)AuthBuf,
-							sizeof(TI_UINT32) + sizeof(OS_802_11_AUTHENTICATION_REQUEST));
-	
-        tmr_StartTimer (pMainKeys->hSessionTimer,
-                        mainKeys_sessionTimeout,
-                        (TI_HANDLE)pMainKeys,
-                        pMainKeys->keysTimeout,
-                        TI_FALSE);
-
-		pMainKeys->mainKeysTimeoutCounter = TI_TRUE;
-	}
-	else
-	{
-        pMainKeys->mainKeysTimeoutCounter = TI_FALSE;
-        rsn_reportAuthFailure(pMainKeys->hRsn, RSN_AUTH_STATUS_TIMEOUT);
-        conn_reportRsnStatus(pMainKeys->hConn, (mgmtStatus_e)STATUS_SECURITY_FAILURE);
-	}
-	return TI_OK;
-}
-
-
-TI_STATUS mainKeySmUnexpected(struct _mainKeys_t *pMainKeys)
-{
-TRACE0(pMainKeys->hReport, REPORT_SEVERITY_ERROR, "MAIN_KEY_SM: ERROR UnExpected Event\n");
-
-	return(TI_OK);
-}
-
-TI_STATUS mainKeySmNop(struct _mainKeys_t *pMainKeys)
-{
-	return(TI_OK);
-}
-
-void mainKeys_reAuth(TI_HANDLE pHandle)
-{
-	mainKeys_t 	*pMainKeys = (mainKeys_t *)pHandle;
-
-	rsn_reAuth(pMainKeys->hRsn);
-}
diff --git a/wl1271/stad/src/Connection_Managment/mainKeysSm.h b/wl1271/stad/src/Connection_Managment/mainKeysSm.h
deleted file mode 100644
index de6a023..0000000
--- a/wl1271/stad/src/Connection_Managment/mainKeysSm.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * mainKeysSm.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file mainKeysSm.h
- *  \brief RSN main security SM
- *
- *  \see mainKeysSm.c
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	mainKeysSm.h												   */
-/*    PURPOSE:	RSN main security SM									   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _MAIN_KEYS_SM_H
-#define _MAIN_KEYS_SM_H
-
-#include "paramOut.h"
-#include "fsm.h"
-#include "rsnApi.h"
-#include "keyTypes.h"
-#include "keyParser.h"
-#include "unicastKeySM.h"
-#include "broadcastKeySM.h"
-
-/* Constants */
-
-#define MAIN_KEYS_TIMEOUT			20000
-
-/* Enumerations */
-
-/* Typedefs */
-
-typedef struct _mainKeys_t    mainKeys_t;
-
-/* Main Sec SM functions */
-typedef TI_STATUS (*mainKeysSmStart_t)(struct _mainKeys_t *pMainKeys);
-typedef TI_STATUS (*mainKeysSmStop_t)(struct _mainKeys_t *pMainKeys);
-typedef TI_STATUS (*mainKeysSmReportUcastStatus_t)(struct _mainKeys_t *pMainKeys, TI_STATUS authStatus);
-typedef TI_STATUS (*mainKeysSmReportBcastStatus_t)(struct _mainKeys_t *pMainKeys, TI_STATUS authStatus);
-typedef TI_STATUS (*mainKeysSmReportReKey_t)(struct _mainKeys_t *pMainKeys);
-typedef TI_STATUS (*mainKeysSmSetKey_t)(struct _mainKeys_t *pMainKeys, TSecurityKeys *pKey);
-typedef TI_STATUS (*mainKeysSmRemoveKey_t)(struct _mainKeys_t *pMainKeys, TSecurityKeys *pKey);
-typedef TI_STATUS (*mainKeysSmSetDefaultKeyId_t)(struct _mainKeys_t *pMainKeys, TI_UINT8 keyId);
-typedef TI_STATUS (*mainKeysSmGetSessionKey_t)(struct _mainKeys_t *pMainKeys, TI_UINT8 *pKey, TI_UINT32 *pKeyLen);
-
-/* Structures */
-
-typedef struct
-{
-	TI_STATUS		status;
-} mainKeysData_t;
-
-struct _mainKeys_t
-{
-	TI_UINT8                            currentState;
-	TI_UINT32                           keysTimeout;
-    mainKeysData_t						data;
-	fsm_stateMachine_t	                *pMainKeysSm;
-    TI_BOOL			 	                mainKeysTimeoutCounter;
-
-	TI_HANDLE							hCtrlData;
-	TI_HANDLE			                hReport;
-	TI_HANDLE			                hOs;
-    TI_HANDLE                           hEvHandler;
-    TI_HANDLE                           hConn;
-    TI_HANDLE                           hRsn;
-	TI_HANDLE							hTimer;
-
-    TI_HANDLE							hSessionTimer;
-
-	keyParser_t							*pKeyParser;
-	unicastKey_t						*pUcastSm;
-	broadcastKey_t						*pBcastSm;
-    struct _mainSec_t                  	*pParent;
-
-    mainKeysSmStart_t                   start;
-    mainKeysSmStop_t                    stop;
-    mainKeysSmReportUcastStatus_t		reportUcastStatus;
-    mainKeysSmReportBcastStatus_t       reportBcastStatus;
-    mainKeysSmReportReKey_t				reportReKey;
-	mainKeysSmSetKey_t					setKey; 
-	mainKeysSmRemoveKey_t				removeKey;
-	mainKeysSmSetDefaultKeyId_t			setDefaultKeyId;
-	mainKeysSmGetSessionKey_t			getSessionKey;
-};
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-mainKeys_t* mainKeys_create(TI_HANDLE hOs);
-
-TI_STATUS mainKeys_unload(mainKeys_t *pmainKeys);
-
-TI_STATUS mainKeys_config (mainKeys_t    *pMainKeys, 
-                           TRsnPaeConfig *pPaeConfig, 
-                           void          *pParent,
-                           TI_HANDLE      hReport,
-                           TI_HANDLE      hOs,
-                           TI_HANDLE      hCtrlData,
-                           TI_HANDLE      hEvHandler,
-                           TI_HANDLE      hConn,
-                           TI_HANDLE      hRsn,
-                           TI_HANDLE      hTimer);
-
-void mainKeys_reAuth(TI_HANDLE pHandle);
-
-#endif
-
diff --git a/wl1271/stad/src/Connection_Managment/mainKeysSmInternal.h b/wl1271/stad/src/Connection_Managment/mainKeysSmInternal.h
deleted file mode 100644
index 7ede633..0000000
--- a/wl1271/stad/src/Connection_Managment/mainKeysSmInternal.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * mainKeysSmInternal.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file mainKeysSm.h
- *  \brief RSN main security SM
- *
- *  \see mainKeysSm.c
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	mainKeysSm.h												   */
-/*    PURPOSE:	RSN main security SM									   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _MAIN_KEYS_INTERNAL_H
-#define _MAIN_KEYS_INTERNAL_H
-
-#include "paramOut.h"
-#include "rsnApi.h"
-
-#include "mainKeysSm.h"
-
-/* Constants */
-
-
-/* Enumerations */
-
-/* Typedefs */
-
-/** state machine states */
-typedef enum 
-{
-	MAIN_KEYS_STATE_IDLE                  = 0,	
-	MAIN_KEYS_STATE_START                 = 1,	
-	MAIN_KEYS_STATE_UNICAST_COMPLETE      = 2,		
-	MAIN_KEYS_STATE_BROADCAST_COMPLETE    = 3,	
-	MAIN_KEYS_STATE_COMPLETE              = 4,
-    MAIN_KEYS_NUM_STATES
-} mainKeys_smStates;
-
-/** State machine events */
-typedef enum 
-{
-	MAIN_KEYS_EVENT_START					= 0,
-	MAIN_KEYS_EVENT_STOP					= 1,
-	MAIN_KEYS_EVENT_UCAST_COMPLETE			= 2,
-	MAIN_KEYS_EVENT_BCAST_COMPLETE			= 3,
-	MAIN_KEYS_EVENT_SESSION_TIMEOUOT		= 4,
-    MAIN_KEYS_NUM_EVENTS
-} mainKeys_smEvents;
-
-
-/* Main Sec SM functions */
-
-/* Structures */
-
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS mainKeys_start(struct _mainKeys_t *pMainKeys);
-TI_STATUS mainKeys_stop(struct _mainKeys_t *pMainKeys);
-TI_STATUS mainKeys_reportUcastStatus(struct _mainKeys_t *pMainKeys, TI_STATUS ucastStatus);
-TI_STATUS mainKeys_reportBcastStatus(struct _mainKeys_t *pMainKeys, TI_STATUS bcastStatus);
-void mainKeys_sessionTimeout(void *pMainKeys, TI_BOOL bTwdInitOccured);
-TI_STATUS mainKeys_setKey(struct _mainKeys_t *pMainKeys, TSecurityKeys *pKey);
-TI_STATUS mainKeys_removeKey(struct _mainKeys_t *pMainKeys, TSecurityKeys *pKey);
-TI_STATUS mainKeys_setDefaultKeyId(struct _mainKeys_t *pMainKeys, TI_UINT8 keyId);
-TI_STATUS mainKeys_getSessionKey(struct _mainKeys_t *pMainKeys, TI_UINT8 *pKey, TI_UINT32 *pKeyLen);
-
-TI_STATUS mainKeys_startIdle(struct _mainKeys_t *pMainKeys);
-TI_STATUS mainKeys_stopStart(struct _mainKeys_t *pMainKeys);
-TI_STATUS mainKeys_stopUcastComplete(struct _mainKeys_t *pMainKeys);
-TI_STATUS mainKeys_bcastCompleteUcastComplete(struct _mainKeys_t *pMainKeys);
-TI_STATUS mainKeys_smTimeOut(void* data);
-TI_STATUS mainKeys_stopBcastComplete(struct _mainKeys_t *pMainKeys);
-TI_STATUS mainKeys_ucastCompleteBcastComplete(struct _mainKeys_t *pMainKeys);
-TI_STATUS mainKeys_stopComplete(struct _mainKeys_t *pMainKeys);
-TI_STATUS mainKeySmUnexpected(struct _mainKeys_t *pMainKeys);
-TI_STATUS mainKeySmNop(struct _mainKeys_t *pMainKeys);
-TI_STATUS mainKeySmSetKeyCompleted(struct _mainKeys_t *pMainKeys);
-
-
-
-
-#endif
-
diff --git a/wl1271/stad/src/Connection_Managment/mainSecKeysOnly.c b/wl1271/stad/src/Connection_Managment/mainSecKeysOnly.c
deleted file mode 100644
index 68d433d..0000000
--- a/wl1271/stad/src/Connection_Managment/mainSecKeysOnly.c
+++ /dev/null
@@ -1,428 +0,0 @@
-/*
- * mainSecKeysOnly.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file mainSecSm.c
- *  \brief 802.1X finite state machine header file
- *
- *  \see mainSecSm.h
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	mainSecSm.c											   	   */
-/*    PURPOSE:	Main Security State Machine API					   		   */
-/*																	 	   */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_37
-#include "osApi.h"
-#include "paramOut.h"
-#include "fsm.h"
-#include "report.h"
-#include "DataCtrl_Api.h"
-#include "smeApi.h"
-#include "rsn.h"
-#include "rsnApi.h"
-#include "mainSecSm.h"
-#include "mainSecKeysOnly.h"
-#include "mainKeysSm.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Global variables */
-
-/* functions */
-TI_STATUS mainSecKeysOnly_getAuthState(mainSec_t *pMainSec, TIWLN_SECURITY_STATE *supp1XState);
-
-TI_STATUS mainSecKeysOnly_reportAuthFailure(mainSec_t *pMainSec, EAuthStatus authStatus) ;
-TI_STATUS mainSecKeysOnly_setAuthIdentity(mainSec_t *pMainSec, authIdentity_t *authIdentity);
-/**
-*
-* rsn_mainSecSmKeysOnlyInit
-*
-* \b Description: 
-*
-* Init main security state machine state machine
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSecKeysOnly_config(mainSec_t *pMainSec, 
-						  TRsnPaeConfig *pPaeConfig)
-{
-	TI_STATUS				status;
-	/** Main 802.1X State Machine matrix */
-	fsm_actionCell_t	mainSecKeysOnly_matrix[MAIN_SEC_KEYS_ONLY_NUM_STATES][MAIN_SEC_KEYS_ONLY_NUM_EVENTS] =
-	{
-		/* next state and actions for IDLE state */
-		{{MAIN_KO_STATE_START, (fsm_Action_t)mainSecKeysOnly_startIdle},
-		 {MAIN_KO_STATE_IDLE, (fsm_Action_t)mainSecKeysOnly_Nop},
-		 {MAIN_KO_STATE_IDLE, (fsm_Action_t)mainSecKeysOnly_unexpected},
-		 {MAIN_KO_STATE_IDLE, (fsm_Action_t)mainSecKeysOnly_unexpected}
-		},
-		/* next state and actions for START state */
-		{{MAIN_KO_STATE_START, (fsm_Action_t)mainSecKeysOnly_Nop},
-		 {MAIN_KO_STATE_IDLE, (fsm_Action_t)mainSecKeysOnly_stopStart},
-		 {MAIN_KO_STATE_AUTHORIZED, (fsm_Action_t)mainSecKeysOnly_keysCompleteStart},
-		 {MAIN_KO_STATE_NONAUTHORIZED, (fsm_Action_t)mainSecKeysOnly_keysTOStart},
-		},
-		/* next state and actions for AUTHORIZED state */
-		{{MAIN_KO_STATE_AUTHORIZED, (fsm_Action_t)mainSecKeysOnly_unexpected},
-		 {MAIN_KO_STATE_IDLE, (fsm_Action_t)mainSecKeysOnly_stopAuthorized},
-		 {MAIN_KO_STATE_AUTHORIZED, (fsm_Action_t)mainSecKeysOnly_Nop},
-		 {MAIN_KO_STATE_AUTHORIZED, (fsm_Action_t)mainSecKeysOnly_unexpected},
-		},
-		/* next state and actions for NONAUTORIZED state */
-		{{MAIN_KO_STATE_START, (fsm_Action_t)mainSecKeysOnly_unexpected},
-		 {MAIN_KO_STATE_IDLE, (fsm_Action_t)mainSecKeysOnly_stopNonAuthorized},
-		 {MAIN_KO_STATE_NONAUTHORIZED, (fsm_Action_t)mainSecKeysOnly_unexpected},
-		 {MAIN_KO_STATE_NONAUTHORIZED, (fsm_Action_t)mainSecKeysOnly_unexpected},
-		}
-	};
-
-    status = fsm_Config(pMainSec->pMainSecSm, &mainSecKeysOnly_matrix[0][0], 
-						MAIN_SEC_KEYS_ONLY_NUM_STATES, MAIN_SEC_KEYS_ONLY_NUM_EVENTS, NULL, pMainSec->hOs);
-	if (status != TI_OK)
-	{
-TRACE0(pMainSec->hReport, REPORT_SEVERITY_ERROR, "MAIN_SEC_SM: Error in configuring full SM\n");
-		return status;
-	}
-
-    pMainSec->currentState          = MAIN_KO_STATE_IDLE;
-	pMainSec->start 				= mainSecKeysOnly_start;
-	pMainSec->stop 					= mainSecKeysOnly_stop;
-	pMainSec->reportKeysStatus 		= mainSecKeysOnly_reportKeysStatus;
-	pMainSec->getAuthState 			= (mainSecSm_getAuthState_t)mainSecKeysOnly_getAuthState;
-	pMainSec->reportReAuthenticate 	= (mainSecSmReportReauthentication_t)mainSecKeysOnly_unexpected;
-	pMainSec->setSessionKey 		= (mainSecSmSetSessionKey_t)mainSecKeysOnly_unexpected;
-	pMainSec->getSessionKey 		= (mainSecSmGetSessionKey_t)mainSecKeysOnly_unexpected;
-	pMainSec->reportAuthStatus 		= (mainSecSmReportAuthStatus_t)mainSecKeysOnly_unexpected;
-	pMainSec->getAuthIdentity  		= (mainSecSm_getAuthIdentity_t)mainSecKeysOnly_unexpected;
-	pMainSec->setAuthIdentity  		= (mainSecSm_getAuthIdentity_t)mainSecKeysOnly_setAuthIdentity;
-    pMainSec->reportAuthFailure     = (mainSecSm_reportAuthFailure_t)mainSecKeysOnly_reportAuthFailure;
-    
-    TRACE0(pMainSec->hReport, REPORT_SEVERITY_INFORMATION, "mainSecKeysOnly_config\n");
-
-    return TI_OK;
-}
-
-/**
-*
-* mainSecSmNull_Start
-*
-* \b Description: 
-*
-* Start the NULL main security SM. Reports success to the rsn module immediately.
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSecKeysOnly_start(mainSec_t *pMainSec)
-{
-    TI_STATUS status;
-
-    status = fsm_Event(pMainSec->pMainSecSm, &pMainSec->currentState, MAIN_KO_EVENT_START, pMainSec); 
-    
-    return status;
-}
-
-/**
-*
-* mainSecSmNull_Stop
-*
-* \b Description: 
-*
-* Start the NULL main security SM. Reports success to the rsn module immediately.
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSecKeysOnly_stop(mainSec_t *pMainSec)
-{
-    TI_STATUS status;
-
-    status = fsm_Event(pMainSec->pMainSecSm, &pMainSec->currentState, MAIN_KO_EVENT_STOP, pMainSec); 
-    
-    return status;
-}
- 
-/**
-*
-* mainSecSmNull_Stop
-*
-* \b Description: 
-*
-* Start the NULL main security SM. Reports success to the rsn module immediately.
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSecKeysOnly_reportKeysStatus(mainSec_t *pMainSec, TI_STATUS keysStatus)
-{
-	TI_STATUS status;
-
-	pMainSec->data.status = keysStatus;
-
-	if (keysStatus == TI_OK)
-	{
-		status = fsm_Event(pMainSec->pMainSecSm, &pMainSec->currentState, MAIN_KO_EVENT_KEYS_COMPLETE, pMainSec);
-	} else {
-TRACE0(pMainSec->hReport, REPORT_SEVERITY_ERROR, "MAIN_SEC_SM: Error in Keys\n");
-		status  = TI_OK;
-	}
-
-	return status;
-}
-
-/**
-*
-* mainSecSmNull_setKey
-*
-* \b Description: 
-*
-* Start the NULL main security SM. Reports success to the rsn module immediately.
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSecKeysOnly_setSessionKey(mainSec_t *pMainSec, TI_UINT8* pKey, TI_UINT8 keyLen)
-{
-	os_memoryCopy(pMainSec->hOs, pMainSec->sessionKey, pKey, keyLen);
-	pMainSec->sessionKeyLen = keyLen;
-
-	return TI_OK;
-}
-
-/**
-*
-* mainSecSmNull_setKey
-*
-* \b Description: 
-*
-* Start the NULL main security SM. Reports success to the rsn module immediately.
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSecKeysOnly_getSessionKey(mainSec_t *pMainSec, TI_UINT8* pKey, TI_UINT32* pKeyLen)
-{
-	os_memoryCopy(pMainSec->hOs, pKey, pMainSec->sessionKey, pMainSec->sessionKeyLen);
-	*pKeyLen = pMainSec->sessionKeyLen;
-
-	return TI_OK;
-}
-
-
-
-/* State machine implementation functions */
-
-TI_STATUS mainSecKeysOnly_startIdle(struct _mainSec_t *pMainSec)
-{
-    TI_STATUS		status = TI_OK;
-
-TRACE0(pMainSec->hReport, REPORT_SEVERITY_SM, "MAIN_SEC_SM: mainSecKeysOnly_StartIdle...\n");
-	status =  pMainSec->pMainKeys->start(pMainSec->pMainKeys);
-	
-	return status;
-}
-
-TI_STATUS mainSecKeysOnly_stopStart(struct _mainSec_t *pMainSec)
-{
-    TI_STATUS		status = TI_OK;
-
-TRACE0(pMainSec->hReport, REPORT_SEVERITY_SM, "MAIN_SEC_SM: mainSecKeysOnly_StopStart...\n");
-	status =  pMainSec->pMainKeys->stop(pMainSec->pMainKeys);
-
-	return status;
-}
-
-TI_STATUS mainSecKeysOnly_keysCompleteStart(struct _mainSec_t *pMainSec)
-{
-    TI_STATUS		status = TI_OK;
-
-TRACE0(pMainSec->hReport, REPORT_SEVERITY_SM, "MAIN_SEC_SM: mainSecKeysOnly_KeysCompleteAuthenticated...\n");
-	status =  pMainSec->pParent->reportStatus(pMainSec->pParent, pMainSec->data.status);
-	
-	return(status);
-}
-
-TI_STATUS mainSecKeysOnly_keysTOStart(struct _mainSec_t *pMainSec)
-{
-    TI_STATUS		status = TI_OK;
-
-	return(status);
-}
-
-TI_STATUS mainSecKeysOnly_stopAuthorized(struct _mainSec_t *pMainSec)
-{
-    TI_STATUS		status = TI_OK;
-
-TRACE0(pMainSec->hReport, REPORT_SEVERITY_SM, "MAIN_SEC_SM: mainSecKeysOnly_StopAuthorized...\n");
-	status =  pMainSec->pMainKeys->stop(pMainSec->pMainKeys);
-	
-	return(status);
-}
-
-TI_STATUS mainSecKeysOnly_stopNonAuthorized(struct _mainSec_t *pMainSec)
-{
-    TI_STATUS		status = TI_OK;
-
-TRACE0(pMainSec->hReport, REPORT_SEVERITY_SM, "MAIN_SEC_SM: mainSecKeysOnly_StopNonAuthorized...\n");
-	status =  pMainSec->pMainKeys->stop(pMainSec->pMainKeys);
-	
-	return(status);
-}
-
-/* state machine action functions */
-
-TI_STATUS mainSecKeysOnly_Nop(void* pData)
-{
-	return(TI_OK);
-}
-
-TI_STATUS mainSecKeysOnly_unexpected(void* pData)
-{
-	return TI_NOK;
-}
-
- /**
-*
-* mainSecKeysOnly_getAuthState:  \n 
-*
-* \b Description: 
-*
-* Get authentication state from supp1x SM.
-*
-* \b ARGS:
-*
-*  I   - pMainSec - pMainSec SM context  \n
-*  I   - authIdentity - pointer to authentication state \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-
-TI_STATUS mainSecKeysOnly_getAuthState(mainSec_t *pMainSec, TIWLN_SECURITY_STATE *secState)
-{
-	switch (pMainSec->currentState)
-	{
-	case MAIN_KO_STATE_START:
-		*secState = eSecurityStateAuthenticating;
-		break;
-
-	case MAIN_KO_STATE_AUTHORIZED:
-		*secState = eSecurityStateAuthenticated;
-		break;
-
-	case MAIN_KO_STATE_NONAUTHORIZED:
-		*secState = eSecurityStateNotAuthenticated ;
-		break;
-
-	default:
-		*secState = eSecurityStateHalted;
-		break;
-	}
-	
-	return TI_OK;
-
-} /*mainSecKeysOnly_getAuthState*/
-
-
-TI_STATUS mainSecKeysOnly_reportAuthFailure(mainSec_t *pMainSec, EAuthStatus authStatus) 
-{
-
-    return TI_OK;
-}
-
-
-TI_STATUS mainSecKeysOnly_setAuthIdentity(mainSec_t *pMainSec, authIdentity_t *authIdentity)
-{
-
-	return TI_OK;
-} 
diff --git a/wl1271/stad/src/Connection_Managment/mainSecKeysOnly.h b/wl1271/stad/src/Connection_Managment/mainSecKeysOnly.h
deleted file mode 100644
index 2c08c37..0000000
--- a/wl1271/stad/src/Connection_Managment/mainSecKeysOnly.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * mainSecKeysOnly.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file MainSecSm.h
- *  \brief RSN main security SM
- *
- *  \see MainSecSm.c
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	MainSecSm.h												   */
-/*    PURPOSE:	RSN main security SM									   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _MAIN_SEC_KEYS_ONLY_H
-#define _MAIN_SEC_KEYS_ONLY_H
-
-#include "fsm.h"
-#include "mainSecSm.h"
-
-/* Constants */
-
-/** number of events in the state machine */
-#define	MAIN_SEC_KEYS_ONLY_NUM_EVENTS		4
-
-/** number of states in the state machine */
-#define	MAIN_SEC_KEYS_ONLY_NUM_STATES		4
-
-/* Enumerations */
-
-/* state machine states */
-typedef enum 
-{
-	MAIN_KO_STATE_IDLE				= 0,
-	MAIN_KO_STATE_START				= 1,
-	MAIN_KO_STATE_AUTHORIZED		= 2,
-	MAIN_KO_STATE_NONAUTHORIZED		= 3
-} main_keysOnlyStates;
-
-/* State machine inputs */
-typedef enum 
-{
-	MAIN_KO_EVENT_START				= 0,
-	MAIN_KO_EVENT_STOP				= 1,
-	MAIN_KO_EVENT_KEYS_COMPLETE		= 2,
-	MAIN_KO_EVENT_SEC_ATTACK		= 3
-} main_keysOnlyEvents;
-
-
-/* Typedefs */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS mainSecKeysOnly_config(mainSec_t *pMainSec, 
-                            TRsnPaeConfig *pPaeConfig);
-
-TI_STATUS mainSecKeysOnly_start(mainSec_t *pMainSec);
-
-TI_STATUS mainSecKeysOnly_stop(mainSec_t *pMainSec);
-
-TI_STATUS mainSecKeysOnly_setSessionKey(mainSec_t *pMainSec, TI_UINT8* pKey, TI_UINT8 keyLen);
-
-TI_STATUS mainSecKeysOnly_getSessionKey(mainSec_t *pMainSec, TI_UINT8* pKey, TI_UINT32* pKeyLen);
-
-TI_STATUS mainSecKeysOnly_reportKeysStatus(mainSec_t *pMainSec, TI_STATUS keyStatus);
-
-/* state machine functions */
-
-TI_STATUS mainSecKeysOnly_startIdle(struct _mainSec_t *pMainSec);
-
-TI_STATUS mainSecKeysOnly_stopStart(struct _mainSec_t *pMainSec);
-
-TI_STATUS mainSecKeysOnly_keysCompleteStart(struct _mainSec_t *pMainSec);
-
-TI_STATUS mainSecKeysOnly_keysTOStart(struct _mainSec_t *pMainSec);
-
-TI_STATUS mainSecKeysOnly_stopAuthorized(struct _mainSec_t *pMainSec);
-
-TI_STATUS mainSecKeysOnly_stopNonAuthorized(struct _mainSec_t *pMainSec);
-
-/* state machine action functions */
-
-TI_STATUS mainSecKeysOnly_StartMainKeySm(void* pData);
-
-TI_STATUS mainSecKeysOnly_StopMainKeySm(void* pData);
-
-TI_STATUS mainSecKeysOnly_ReportAuthSuccess(void* pData);
-
-TI_STATUS mainSecKeysOnly_ReportAuthFailure(void* pData);
-
-TI_STATUS mainSecKeysOnly_Nop(void* pData);
-
-TI_STATUS mainSecKeysOnly_unexpected(void* pData);
-
-#endif
-
diff --git a/wl1271/stad/src/Connection_Managment/mainSecNull.c b/wl1271/stad/src/Connection_Managment/mainSecNull.c
deleted file mode 100644
index c694ebb..0000000
--- a/wl1271/stad/src/Connection_Managment/mainSecNull.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * mainSecNull.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file mainSecSm.c
- *  \brief 802.1X finite state machine header file
- *
- *  \see mainSecSm.h
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	mainSecSm.c											   	   */
-/*    PURPOSE:	Main Security State Machine API					   		   */
-/*																	 	   */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_38
-#include "osApi.h"
-#include "paramOut.h"
-#include "report.h"
-#include "DataCtrl_Api.h"
-#include "smeApi.h"
-#include "rsn.h"
-#include "rsnApi.h"
-#include "mainSecSm.h"
-#include "mainSecNull.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Global variables */
-
-/* Local function prototypes */
-
-/* functions */
-
-/**
-*
-* rsn_mainSecSmFullInit
-*
-* \b Description: 
-*
-* Init main security state machine state machine
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSecSmNull_config(mainSec_t *pMainSec, 
-                            TRsnPaeConfig *pPaeConfig)
-{
-    pMainSec->start = (mainSecSmStart_t)mainSecSmNull_start;
-	pMainSec->stop = mainSecSmNull_stop;
-	pMainSec->reportAuthStatus = NULL;
-	pMainSec->reportKeysStatus = mainSecNull_reportKeysStatus;
-	pMainSec->reportReAuthenticate = NULL;
-	pMainSec->getAuthIdentity  = NULL;
-	pMainSec->setAuthIdentity  = (mainSecSm_getAuthIdentity_t)mainSecNull_setAuthIdentity;
-    pMainSec->getAuthState = mainSecNull_getAuthState;
-    pMainSec->reportAuthFailure  = (mainSecSm_reportAuthFailure_t)mainSecNull_reportAuthFailure;
-    return TI_OK;
-}
-
-/**
-*
-* mainSecSmNull_Start
-*
-* \b Description: 
-*
-* Start the NULL main security SM. Reports success to the rsn module immediately.
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSecSmNull_start(mainSec_t *pMainSec)
-{
-    TI_STATUS status;
-
-    status = rsn_reportStatus(pMainSec->pParent, TI_OK); 
-    
-    return status;
-}
-
-/**
-*
-* mainSecSmNull_Stop
-*
-* \b Description: 
-*
-* Start the NULL main security SM. Reports success to the rsn module immediately.
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSecSmNull_stop(mainSec_t *pMainSec)
-{
-    return TI_OK;
-}
-
-/**
-*
-* mainSecNull_reportKeysStatus
-*
-* \b Description: 
-*
-* Start the NULL main security SM. Reports success to the rsn module immediately.
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSecNull_reportKeysStatus(mainSec_t *pMainSec, TI_STATUS keysStatus)
-{
-
-	return TI_OK;
-} 
-/**
-*
-* mainSecKeysOnly_getAuthState:  \n 
-*
-* \b Description: 
-*
-* Get authentication state from supp1x SM.
-*
-* \b ARGS:
-*
-*  I   - pMainSec - pMainSec SM context  \n
-*  I   - authIdentity - pointer to authentication state \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-
-TI_STATUS mainSecNull_getAuthState(mainSec_t *pMainSec, TIWLN_SECURITY_STATE *secState)
-{
-	*secState = eSecurityStateHalted; 
-	return TI_OK;
-
-} /*mainSecKeysOnly_getAuthState*/
-
-
-TI_STATUS mainSecSmNull_nop(mainSec_t *pMainSec)
-{
-	return TI_OK;
-
-} /*mainSecKeysOnly_getAuthState*/
-
-
-TI_STATUS mainSecNull_reportAuthFailure(mainSec_t *pMainSec, EAuthStatus authStatus) 
-{
-    return TI_OK;
-}
-
-
-TI_STATUS mainSecNull_setAuthIdentity(mainSec_t *pMainSec, authIdentity_t *authIdentity)
-{
-
-	return TI_OK;
-}
diff --git a/wl1271/stad/src/Connection_Managment/mainSecNull.h b/wl1271/stad/src/Connection_Managment/mainSecNull.h
deleted file mode 100644
index 8d57e11..0000000
--- a/wl1271/stad/src/Connection_Managment/mainSecNull.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * mainSecNull.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file MainSecSm.h
- *  \brief RSN main security SM
- *
- *  \see MainSecSm.c
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	MainSecSm.h												   */
-/*    PURPOSE:	RSN main security SM									   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _MAIN_SEC_NULL_SM_H
-#define _MAIN_SEC_NULL_SM_H
-
-#include "fsm.h"
-#include "mainSecSm.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS mainSecSmNull_config(mainSec_t *pMainSec, 
-                            TRsnPaeConfig *pPaeConfig);
-
-TI_STATUS mainSecSmNull_start(mainSec_t *pMainSec);
-
-TI_STATUS mainSecSmNull_stop(mainSec_t *pMainSec);
-
-TI_STATUS mainSecNull_reportKeysStatus(mainSec_t *pMainSec, TI_STATUS keysStatus);
-
-TI_STATUS mainSecNull_getAuthState(mainSec_t *pMainSec, TIWLN_SECURITY_STATE *supp1XState);
-
-TI_STATUS mainSecNull_reportAuthFailure(mainSec_t *pMainSec, EAuthStatus authStatus);
-TI_STATUS mainSecNull_setAuthIdentity(mainSec_t *pMainSec, authIdentity_t *authIdentity);
-
-#endif
-
diff --git a/wl1271/stad/src/Connection_Managment/mainSecSm.c b/wl1271/stad/src/Connection_Managment/mainSecSm.c
deleted file mode 100644
index ea9ea15..0000000
--- a/wl1271/stad/src/Connection_Managment/mainSecSm.c
+++ /dev/null
@@ -1,395 +0,0 @@
-/*
- * mainSecSm.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file mainSecSm.c
- *  \brief 802.1X finite state machine header file
- *
- *  \see mainSecSm.h
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*      MODULE: mainSecSm.c                                                */
-/*    PURPOSE:  Main Security State Machine API                            */
-/*                                                                         */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_39
-#include "osApi.h"
-#include "paramOut.h"
-#include "report.h"
-#include "DataCtrl_Api.h"
-#include "smeApi.h"
-#include "rsn.h"
-#include "rsnApi.h"
-#include "mainSecSm.h"
-#include "mainSecNull.h"
-#include "mainSecKeysOnly.h"
-#include "mainKeysSm.h"
-#include "externalSec.h"
-
-/* Constants */
-
-/** number of events in the state machine */
-#define MAIN_SEC_MAX_NUM_EVENTS     7
-
-/** number of states in the state machine */
-#define MAIN_SEC_MAX_NUM_STATES     6
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Global variables */
-
-/* Local function prototypes */
-
-TI_STATUS mainSec_setKey(struct _mainSec_t *pMainSec, TSecurityKeys *pKey);
-TI_STATUS mainSec_removeKey(struct _mainSec_t *pMainSec, TSecurityKeys *pKey);
-TI_STATUS mainSec_setDefaultKeyId(struct _mainSec_t *pMainSec, TI_UINT8 keyId);
-
-/* functions */
-
-/**
-*
-* mainSec_create
-*
-* \b Description: 
-*
-* Allocate memory for the main security context, and create all the rest of the needed contexts.
-*
-* \b ARGS:
-*
-*  I - hOs - OS handle for OS operations.
-*
-* \b RETURNS:
-*
-*  pointer to main security context. If failed, returns NULL.
-*
-* \sa 
-*/
-mainSec_t* mainSec_create(TI_HANDLE hOs)
-{
-    mainSec_t   *pHandle;
-    TI_STATUS       status;
-
-    /* allocate association context memory */
-    pHandle = (mainSec_t*)os_memoryAlloc(hOs, sizeof(mainSec_t));
-    if (pHandle == NULL)
-    {
-        return NULL;
-    }
-
-    os_memoryZero(hOs, pHandle, sizeof(mainSec_t));
-
-    /* allocate memory for association state machine */
-    status = fsm_Create(hOs, &pHandle->pMainSecSm, MAIN_SEC_MAX_NUM_STATES, MAIN_SEC_MAX_NUM_EVENTS);
-    if (status != TI_OK)
-    {
-        os_memoryFree(hOs, pHandle, sizeof(mainSec_t));
-        return NULL;
-    }
-
-    pHandle->pMainKeys = mainKeys_create(hOs);
-    if (pHandle->pMainKeys == NULL)
-    {
-        fsm_Unload(hOs, pHandle->pMainSecSm);
-        os_memoryFree(hOs, pHandle, sizeof(mainSec_t));
-        return NULL;
-    }
-
-    pHandle->pKeyParser = pHandle->pMainKeys->pKeyParser;
-    pHandle->hOs = hOs;
-    
-    /* created only for external security mode */
-    pHandle->pExternalSec = externalSec_create(hOs);
-
-    if (pHandle->pExternalSec == NULL)
-    {
-        fsm_Unload(hOs, pHandle->pMainSecSm);
-        mainKeys_unload(pHandle->pMainKeys);
-        os_memoryFree(hOs, pHandle, sizeof(mainSec_t));
-        return NULL;
-    }
-
-    return pHandle;
-}
-
-/**
-*
-* mainSec_config
-*
-* \b Description: 
-*
-* Init main security state machine state machine
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSec_config (mainSec_t *pMainSec, 
-                          mainSecInitData_t *pInitData, 
-                          void *pParent,
-                          TI_HANDLE hReport,
-                          TI_HANDLE hOs,
-                          TI_HANDLE hCtrlData,
-                          TI_HANDLE hEvHandler,
-                          TI_HANDLE hConn,
-                          TI_HANDLE hTimer)
-{
-    TI_STATUS               status;
-
-    pMainSec->setKey = mainSec_setKey;
-    pMainSec->removeKey = mainSec_removeKey;
-    pMainSec->setDefaultKeyId = mainSec_setDefaultKeyId;
-
-    pMainSec->pParent = pParent;
-    pMainSec->hReport = hReport;
-    pMainSec->hOs = hOs;
-
-    TRACE4(pMainSec->hReport, REPORT_SEVERITY_SM, "MainSec SM: config, authProtocol = %d, keyExchangeProtocol=%d, unicastSuite=%d, broadcastSuite=%d\n", pInitData->pPaeConfig->authProtocol, pInitData->pPaeConfig->keyExchangeProtocol, pInitData->pPaeConfig->unicastSuite, pInitData->pPaeConfig->broadcastSuite);
-
-    if (TI_TRUE == pMainSec->pParent->bRsnExternalMode)
-    {
-            status = externalSec_config(pMainSec);
-    }
-    else
-    {
-         switch (pInitData->pPaeConfig->keyExchangeProtocol)
-         {
-            case RSN_KEY_MNG_NONE:
-                status = mainSecSmNull_config(pMainSec, pInitData->pPaeConfig);
-                break;
-            case RSN_KEY_MNG_802_1X:
-                status = mainSecKeysOnly_config(pMainSec, pInitData->pPaeConfig);
-                break;
-            default:
-                status = mainSecSmNull_config(pMainSec, pInitData->pPaeConfig);
-                break;
-         }
-    }
-
-    status  = mainKeys_config (pMainSec->pMainKeys, 
-                               pInitData->pPaeConfig, 
-                               pMainSec, 
-                               pMainSec->hReport, 
-                               pMainSec->hOs, 
-                               hCtrlData, 
-                               hEvHandler, 
-                               hConn, 
-                               pMainSec->pParent,
-                               hTimer);
-    if (status != TI_OK)
-    {
-        TRACE0(pMainSec->hReport, REPORT_SEVERITY_ERROR, "MAIN_SEC_SM: error in configuring mainKeys SM\n");
-        return status;
-    }
-
-    TRACE0(pMainSec->hReport, REPORT_SEVERITY_SM, "MAIN_SEC_SM: successful configuration SM\n");
-
-    return status;
-}
-
-/**
-*
-* mainSec_config
-*
-* \b Description: 
-*
-* Init main security state machine state machine
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSec_unload(mainSec_t *pMainSec)
-{
-    TI_STATUS   status;
-
-    if (pMainSec == NULL)
-    {
-        return TI_NOK;
-    }
-
-    status = mainKeys_unload(pMainSec->pMainKeys);
-    if (status != TI_OK)
-    {
-        /* report failure but don't stop... */
-        TRACE0(pMainSec->hReport, REPORT_SEVERITY_ERROR, "MAIN_SEC_SM: Error releasing Main Keys SM memory \n");
-    }
-
-    status = fsm_Unload(pMainSec->hOs, pMainSec->pMainSecSm);
-    if (status != TI_OK)
-    {
-        /* report failure but don't stop... */
-        TRACE0(pMainSec->hReport, REPORT_SEVERITY_ERROR, "MAIN_SEC_SM: Error releasing FSM memory \n");
-    }
-
-    status = externalSec_Destroy (pMainSec->pExternalSec);
-    if (status != TI_OK)
-    {
-        /* report failure but don't stop... */
-        TRACE0(pMainSec->hReport, REPORT_SEVERITY_ERROR, "MAIN_SEC_SM: Error releasing External Security SM memory \n");
-    }
-
-    os_memoryFree(pMainSec->hOs, pMainSec, sizeof(mainSec_t));
-
-    return TI_OK;
-}
-
-/**
-*
-* mainSec_setKey
-*
-* \b Description: 
-*
-* Start the NULL main security SM. Reports success to the rsn module immediately.
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSec_setKey(struct _mainSec_t *pMainSec, TSecurityKeys *pKey)
-{
-    TI_STATUS               status = TI_OK;
-    
-    if ((pMainSec == NULL) || (pKey == NULL))
-    {
-        return TI_NOK;
-    }
-
-    if (pKey->keyType != KEY_NULL)
-    {
-        TRACE6(pMainSec->hReport, REPORT_SEVERITY_INFORMATION, "MAIN_SEC_SM: setting key #%d, value = 0x%X 0x%X 0x%X 0x%X 0x%X\n", pKey->keyIndex, (TI_UINT8)pKey->encKey[0], (TI_UINT8)pKey->encKey[1], (TI_UINT8)pKey->encKey[2], (TI_UINT8)pKey->encKey[3], (TI_UINT8)pKey->encKey[4]);
-
-        status = pMainSec->pParent->setKey(pMainSec->pParent, pKey);
-    }
-    
-    return status;
-}
-
-/**
-*
-* mainSec_removeKey
-*
-* \b Description: 
-*
-* Start the NULL main security SM. Reports success to the rsn module immediately.
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSec_removeKey(struct _mainSec_t *pMainSec, TSecurityKeys *pKey)
-{
-    TI_STATUS               status = TI_OK;
-    
-    if ((pMainSec == NULL) || (pKey == NULL))
-    {
-        return TI_NOK;
-    }
-
-    if (pKey->keyType != KEY_NULL)
-    {
-        TRACE1(pMainSec->hReport, REPORT_SEVERITY_INFORMATION, "MAIN_SEC_SM: removing key #%d, \n", pKey->keyIndex);
-
-        status = pMainSec->pParent->removeKey(pMainSec->pParent, pKey);
-    }
-    
-    return status;
-}
-
-/**
-*
-* mainSec_setDefaultKeyId
-*
-* \b Description: 
-*
-* Start the NULL main security SM. Reports success to the rsn module immediately.
-*
-* \b ARGS:
-*
-*  none
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS mainSec_setDefaultKeyId(struct _mainSec_t *pMainSec, TI_UINT8 keyId)
-{
-    TI_STATUS               status = TI_OK;
-
-    if (pMainSec == NULL)
-    {
-        return TI_NOK;
-    }
-
-    status = pMainSec->pParent->setDefaultKeyId(pMainSec->pParent, keyId);
-    
-    return status;
-}
-
-
diff --git a/wl1271/stad/src/Connection_Managment/mainSecSm.h b/wl1271/stad/src/Connection_Managment/mainSecSm.h
deleted file mode 100644
index 6541aeb..0000000
--- a/wl1271/stad/src/Connection_Managment/mainSecSm.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * mainSecSm.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file MainSecSm.h
- *  \brief RSN main security SM
- *
- *  \see MainSecSm.c
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	MainSecSm.h												   */
-/*    PURPOSE:	RSN main security SM									   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _MAIN_SEC_SM_H
-#define _MAIN_SEC_SM_H
-
-#include "paramOut.h"
-#include "fsm.h"
-#include "rsnApi.h"
-#include "rsn.h"
-#include "keyTypes.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-typedef struct _mainSec_t    mainSec_t;
-
-/* Main Sec SM functions */
-typedef TI_STATUS (*mainSecSmStart_t)(struct _mainSec_t *pMainSec);
-typedef TI_STATUS (*mainSecSmStop_t)(struct _mainSec_t *pMainSec);
-typedef TI_STATUS (*mainSecSmReportAuthStatus_t)(struct _mainSec_t *pMainSec, TI_STATUS authStatus);
-typedef TI_STATUS (*mainSecSmReportKeysStatus_t)(struct _mainSec_t *pMainSec, TI_STATUS keyStatus);
-typedef TI_STATUS (*mainSecSmReportReauthentication_t)(struct _mainSec_t *pMainSec);
-typedef TI_STATUS (*mainSecSmSetSessionKey_t)(struct _mainSec_t *pMainSec, TI_UINT8* pKey, TI_UINT8 keyLen);
-typedef TI_STATUS (*mainSecSmGetSessionKey_t)(struct _mainSec_t *pMainSec, TI_UINT8* pKey, TI_UINT32* pKeyLen);
-typedef TI_STATUS (*mainSecSmSetKey_t)(struct _mainSec_t *pMainSec, TSecurityKeys *pKey);
-typedef TI_STATUS (*mainSecSmRemoveKey_t)(struct _mainSec_t *pMainSec, TSecurityKeys *pKey);
-typedef TI_STATUS (*mainSecSmSetDefaultKeyId_t)(struct _mainSec_t *pMainSec, TI_UINT8 keyId);
-typedef TI_STATUS (*mainSecSmEapolRecv_t)(struct _mainSec_t *pMainSec, TI_UINT8 *pPacket);
-typedef TI_STATUS (*mainSecSm_getAuthIdentity_t)(struct _mainSec_t *pMainSec, authIdentity_t *authIdentity);
-typedef TI_STATUS (*mainSecSm_getAuthState_t)(struct _mainSec_t *pMainSec, TIWLN_SECURITY_STATE *secState);
-typedef TI_STATUS (*mainSecSm_reportAuthFailure_t)(struct _mainSec_t *pMainSec, EAuthStatus authStatus);
-
-/* Structures */
-
-typedef struct
-{
-	TRsnPaeConfig   		*pPaeConfig;
-	TI_UINT32				heldPeriod;
-	TI_UINT32				startPeriod;
-	TI_UINT32				authPeriod;
-	TI_UINT32				maxStart;
-	TI_UINT8				*pUserId;
-	TI_UINT8				idLen;
-	TI_UINT8				*pUserPasswd;
-	TI_UINT8				pwdLen;
-} mainSecInitData_t;
-
-typedef struct
-{
-	TI_STATUS		status;
-} mainSecData_t;
-
-struct _mainSec_t
-{
-	TI_UINT8                            currentState;
-    TI_UINT32				            startCount;
-	fsm_stateMachine_t	                *pMainSecSm;
-	TI_BOOL				                PrivacyOptionImplemented;
-    mainSecData_t						data;
-	TI_UINT8							sessionKey[SESSION_KEY_LEN];
-	TI_UINT8							sessionKeyLen;
-
-    struct _rsn_t                      	*pParent;
-	TI_HANDLE			                hReport;
-	TI_HANDLE			                hOs;
-	
-    struct _mainKeys_t                  *pMainKeys; 
-    struct _keyParser_t                 *pKeyParser;
-    struct externalSec_t                *pExternalSec;
-    mainSecSmStart_t                    start;
-    mainSecSmStop_t                     stop;
-    mainSecSmReportAuthStatus_t         reportAuthStatus;
-    mainSecSmReportKeysStatus_t       	reportKeysStatus;
-    mainSecSmReportReauthentication_t   reportReAuthenticate;
-	mainSecSmSetSessionKey_t			setSessionKey;
-	mainSecSmGetSessionKey_t			getSessionKey;
-	mainSecSmSetKey_t					setKey;
-	mainSecSmRemoveKey_t				removeKey;
-	mainSecSmSetDefaultKeyId_t			setDefaultKeyId;
-    mainSecSm_getAuthIdentity_t  		getAuthIdentity;
-    mainSecSm_getAuthIdentity_t  		setAuthIdentity;
-	mainSecSm_getAuthState_t 			getAuthState;
-    mainSecSm_reportAuthFailure_t       reportAuthFailure;
-
-};
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-mainSec_t* mainSec_create(TI_HANDLE hOs);
-
-TI_STATUS mainSec_unload(mainSec_t *pMainSec);
-
-TI_STATUS mainSec_config (mainSec_t *pMainSec, 
-                          mainSecInitData_t *pInitData, 
-                          void *pParent,
-                          TI_HANDLE hReport,
-                          TI_HANDLE hOs,
-                          TI_HANDLE hCtrlData,
-                          TI_HANDLE hEvHandler,
-                          TI_HANDLE hConn,
-                          TI_HANDLE hTimer);
-
-#endif
-
diff --git a/wl1271/stad/src/Connection_Managment/rsn.c b/wl1271/stad/src/Connection_Managment/rsn.c
deleted file mode 100644
index 0222010..0000000
--- a/wl1271/stad/src/Connection_Managment/rsn.c
+++ /dev/null
@@ -1,2442 +0,0 @@
-/*
- * rsn.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file rsn.c
- *  \brief 802.11 rsniation SM source
- *
- *  \see rsnSM.h
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*      MODULE: rsnSM.c                                                    */
-/*    PURPOSE:  802.11 rsniation SM source                                 */
-/*                                                                         */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_40
-#include "osApi.h"
-#include "paramOut.h"
-#include "timer.h"
-#include "report.h"
-#include "DataCtrl_Api.h"
-#include "siteMgrApi.h"
-#include "smeApi.h"
-#include "mainSecSm.h"
-#include "admCtrl.h"
-#include "rsnApi.h"
-#include "rsn.h"
-#include "keyParser.h"
-#include "EvHandler.h"
-#include "TI_IPC_Api.h"
-#include "sme.h"
-#include "apConn.h"
-#include "802_11Defs.h"
-#include "externalSec.h"
-#include "connApi.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "admCtrlWpa.h"
-#include "XCCMngr.h"
-#include "admCtrlXCC.h"
-#endif
-#include "TWDriver.h"
-#include "DrvMainModules.h"
-#include "PowerMgr_API.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Global variables */
-
-/* Local function prototypes */
-TI_STATUS rsn_sendKeysNotSet(rsn_t *pRsn);
-void rsn_pairwiseReKeyTimeout(TI_HANDLE hRsn, TI_BOOL bTwdInitOccured);
-void rsn_groupReKeyTimeout(TI_HANDLE hRsn, TI_BOOL bTwdInitOccured);
-void rsn_micFailureReportTimeout (TI_HANDLE hRsn, TI_BOOL bTwdInitOccured);
-static rsn_siteBanEntry_t * findEntryForInsert(TI_HANDLE hRsn);
-static rsn_siteBanEntry_t * findBannedSiteAndCleanup(TI_HANDLE hRsn, TMacAddr siteBssid);
-
-/* functions */
-
-/**
-*
-* rsn_Create - allocate memory for rsniation SM
-*
-* \b Description: 
-*
-* Allocate memory for rsniation SM. \n
-*       Allocates memory for Rsniation context. \n
-*       Allocates memory for rsniation timer. \n
-*       Allocates memory for rsniation SM matrix. \n
-*
-* \b ARGS:
-*
-*  I   - hOs - OS context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_mainSecKeysOnlyStop()
-*/
-TI_HANDLE rsn_create(TI_HANDLE hOs)
-{
-    rsn_t  *pRsn;
-
-    /* allocate rsniation context memory */
-    pRsn = (rsn_t*)os_memoryAlloc (hOs, sizeof(rsn_t));
-    if (pRsn == NULL)
-    {
-        return NULL;
-    }
-
-    os_memoryZero (hOs, pRsn, sizeof(rsn_t));
-    
-    /* create admission control */
-    pRsn->pAdmCtrl = admCtrl_create (hOs);
-    if (pRsn->pAdmCtrl == NULL)
-    {
-        os_memoryFree (hOs, pRsn, sizeof(rsn_t));
-        return NULL;
-    }
-
-    /* create main security SM */
-    pRsn->pMainSecSm = mainSec_create (hOs);
-    if (pRsn->pMainSecSm == NULL)
-    {
-        admCtrl_unload (pRsn->pAdmCtrl);
-        os_memoryFree (hOs, pRsn, sizeof(rsn_t));
-        return NULL;
-    }
-
-    pRsn->pKeyParser = pRsn->pMainSecSm->pKeyParser;
-    
-    pRsn->hOs = hOs;
-    
-    return pRsn;
-}
-
-
-/**
-*
-* rsn_Unload - unload rsniation SM from memory
-*
-* \b Description: 
-*
-* Unload rsniation SM from memory
-*
-* \b ARGS:
-*
-*  I   - hRsn - rsniation SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_mainSecKeysOnlyStop() 
-*/
-TI_STATUS rsn_unload (TI_HANDLE hRsn)
-{
-    rsn_t           *pRsn;
-    TI_STATUS       status;
-
-    if (hRsn == NULL)
-    {
-        return TI_NOK;
-    }
-
-    pRsn = (rsn_t*)hRsn;
-
-	if (pRsn->hMicFailureReportWaitTimer)
-	{
-		tmr_DestroyTimer (pRsn->hMicFailureReportWaitTimer);
-	}
-	if (pRsn->hMicFailureGroupReKeyTimer)
-	{
-		tmr_DestroyTimer (pRsn->hMicFailureGroupReKeyTimer);
-	}
-	if (pRsn->hMicFailurePairwiseReKeyTimer)
-	{
-		tmr_DestroyTimer (pRsn->hMicFailurePairwiseReKeyTimer);
-	}
-
-    status = admCtrl_unload (pRsn->pAdmCtrl);
-    status = mainSec_unload (pRsn->pMainSecSm);
-    
-    os_memoryFree (pRsn->hOs, hRsn, sizeof(rsn_t));
-
-    return status;
-}
-
-
-/**
-*
-* rsn_init - Init module
-*
-* \b Description: 
-*
-* Init module handles and variables.
-*
-* \b RETURNS:
-*
-*  void
-*
-* \sa rsn_Create, rsn_Unload
-*/
-void rsn_init (TStadHandlesList *pStadHandles)
-{
-    rsn_t *pRsn = (rsn_t*)(pStadHandles->hRsn);
-
-    pRsn->eGroupKeyUpdate = GROUP_KEY_UPDATE_FALSE;
-    pRsn->ePairwiseKeyUpdate = PAIRWISE_KEY_UPDATE_FALSE;
-    pRsn->PrivacyOptionImplemented = TI_TRUE;
-    
-	pRsn->hTxCtrl   = pStadHandles->hTxCtrl;
-    pRsn->hRx       = pStadHandles->hRxData;
-    pRsn->hConn     = pStadHandles->hConn;
-    pRsn->hTWD      = pStadHandles->hTWD;
-    pRsn->hCtrlData = pStadHandles->hCtrlData;
-    pRsn->hSiteMgr  = pStadHandles->hSiteMgr;
-    pRsn->hReport   = pStadHandles->hReport;
-    pRsn->hOs       = pStadHandles->hOs;
-    pRsn->hXCCMngr  = pStadHandles->hXCCMngr;
-    pRsn->hEvHandler= pStadHandles->hEvHandler;
-    pRsn->hSmeSm    = pStadHandles->hSme;
-    pRsn->hAPConn   = pStadHandles->hAPConnection;
-    pRsn->hMlme     = pStadHandles->hMlmeSm;
-    pRsn->hPowerMgr = pStadHandles->hPowerMgr;
-    pRsn->hTimer    = pStadHandles->hTimer;
-    pRsn->hCurrBss  = pStadHandles->hCurrBss;
-
-    pRsn->setPaeConfig = rsn_setPaeConfig;
-    pRsn->getNetworkMode = rsn_getNetworkMode;
-    pRsn->setKey = rsn_setKey;
-    pRsn->removeKey = rsn_removeKey;
-    pRsn->reportStatus = rsn_reportStatus;
-    pRsn->setDefaultKeyId = rsn_setDefaultKeyId;
-	pRsn->getPortStatus = rsn_getPortStatus;
-	pRsn->setPortStatus = rsn_setPortStatus;
-
-    pRsn->defaultKeysOn = TI_TRUE;
-    pRsn->eapType = OS_EAP_TYPE_NONE;
-    pRsn->numOfBannedSites = 0;
-	pRsn->genericIE.length = 0;
-}
-
-
-TI_STATUS rsn_SetDefaults (TI_HANDLE hRsn, TRsnInitParams *pInitParam)
-{
-    rsn_t       *pRsn = (rsn_t*)hRsn;
-    TI_UINT8     keyIndex;
-    TI_STATUS    status;
-
-    /* Create the module's timers */
-    pRsn->hMicFailureReportWaitTimer = tmr_CreateTimer (pRsn->hTimer);
-    if (pRsn->hMicFailureReportWaitTimer == NULL)
-    {
-        TRACE0(pRsn->hReport, REPORT_SEVERITY_ERROR, "rsn_SetDefaults(): Failed to create hMicFailureReportWaitTimer!\n");
-		return TI_NOK;
-    }
-    pRsn->hMicFailureGroupReKeyTimer = tmr_CreateTimer (pRsn->hTimer);
-    if (pRsn->hMicFailureGroupReKeyTimer == NULL)
-    {
-        TRACE0(pRsn->hReport, REPORT_SEVERITY_ERROR, "rsn_SetDefaults(): Failed to create hMicFailureGroupReKeyTimer!\n");
-		return TI_NOK;
-    }
-
-    /* Configure the RSN external mode (by default we're in internal mode) */
-    pRsn->bRsnExternalMode = 0;
-
-
-    pRsn->hMicFailurePairwiseReKeyTimer = tmr_CreateTimer (pRsn->hTimer);
-    if (pRsn->hMicFailurePairwiseReKeyTimer == NULL)
-    {
-        TRACE0(pRsn->hReport, REPORT_SEVERITY_ERROR, "rsn_SetDefaults(): Failed to create hMicFailurePairwiseReKeyTimer!\n");
-		return TI_NOK;
-    }
-
-	pRsn->bPairwiseMicFailureFilter = pInitParam->bPairwiseMicFailureFilter;
-    /* config the admission control with the authentication suite selected.
-       Admission control will configure the main security SM. */
-    status = admCtrl_config (pRsn->pAdmCtrl, 
-                             pRsn->hMlme, 
-                             pRsn->hRx, 
-                             pRsn->hReport, 
-                             pRsn->hOs, 
-                             pRsn, 
-                             pRsn->hXCCMngr, 
-                             pRsn->hPowerMgr, 
-                             pRsn->hEvHandler, 
-                             pRsn->hTimer,
-                             pRsn->hCurrBss,
-                             pInitParam);
-
-    if (status != TI_OK)
-    {
-        return status;
-    }            
-
-    /* Configure keys from registry */
-    if (pInitParam->privacyOn)
-    {
-        pRsn->wepStaticKey = TI_TRUE;
-    }
-
-    pRsn->defaultKeyId = pInitParam->defaultKeyId;
-    for (keyIndex = 0; keyIndex < MAX_KEYS_NUM; keyIndex++)
-    {
-        os_memoryCopy (pRsn->hOs, &pRsn->keys[keyIndex], &pInitParam->keys[keyIndex], sizeof(TSecurityKeys));
-        if (pRsn->keys[keyIndex].keyType != KEY_NULL)
-        {
-            pRsn->wepDefaultKeys[keyIndex] = TI_TRUE;
-        }
-        pRsn->keys_en [keyIndex] = TI_FALSE;
-    }
-
-    return status;
-}
-
-
-/**
-*
-* rsn_reconfig - re-configure a rsniation
-*
-* \b Description: 
-*
-* Re-configure rsniation 
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsniation SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_Create, rsn_Unload
-*/
-TI_STATUS rsn_reconfig (TI_HANDLE hRsn)
-{
-    rsn_t  *pRsn = (rsn_t *)hRsn;
-    TI_UINT8   keyIndex;
-
-    /* Mark all keys as removed */
-    for (keyIndex = 0; keyIndex < MAX_KEYS_NUM; keyIndex++)
-        pRsn->keys_en [keyIndex] = TI_FALSE;       
-
-    return TI_OK;
-}
-
-
-/** 
-*
-* rsn_setDefaultKeys - 
-*
-* \b Description: 
-*
-* 
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsn SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_Stop, rsn_Recv
-*/
-TI_STATUS rsn_setDefaultKeys(rsn_t *pRsn)
-{
-    TI_STATUS       status = TI_OK;
-    TTwdParamInfo   tTwdParam;
-    TI_UINT8           keyIndex;
-
-    for (keyIndex = 0; keyIndex < MAX_KEYS_NUM; keyIndex++)
-    {
-        /* Set the WEP key to the HAL */
-        if (pRsn->wepDefaultKeys[keyIndex] /*pRsn->keys[keyIndex].encLen>0*/)
-        {
-            /* Change key type to WEP-key before setting*/
-            pRsn->keys[keyIndex].keyType = KEY_WEP;
-
-            status = pRsn->pMainSecSm->setKey (pRsn->pMainSecSm, &pRsn->keys[keyIndex]);
-
-            if (status != TI_OK)
-            {
-                TRACE1(pRsn->hReport, REPORT_SEVERITY_ERROR, "RSN: Setting key #%d failed \n", keyIndex);
-                return status;
-            }
-        }
-    }
-
-    /* Now we configure default key ID to the HAL */
-    if (pRsn->defaultKeyId < MAX_KEYS_NUM)
-    {
-        tTwdParam.paramType = TWD_RSN_DEFAULT_KEY_ID_PARAM_ID;
-        tTwdParam.content.configureCmdCBParams.pCb = &pRsn->defaultKeyId;
-        tTwdParam.content.configureCmdCBParams.fCb = NULL;
-        tTwdParam.content.configureCmdCBParams.hCb = NULL;
-        status = TWD_SetParam (pRsn->hTWD, &tTwdParam); 
-
-        TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: default key ID =%d \n", pRsn->defaultKeyId);
-    }
-
-    return status;
-}
-
-
-/** 
-*
-* rsn_Start - Start event for the rsniation SM
-*
-* \b Description: 
-*
-* Start event for the rsniation SM
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsniation SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_Stop, rsn_Recv
-*/
-TI_STATUS rsn_start(TI_HANDLE hRsn)
-{
-    TI_STATUS           status;
-    rsn_t               *pRsn;
-    ECipherSuite        suite;
-    EExternalAuthMode   extAuthMode;
-    TTwdParamInfo       tTwdParam;
-
-    pRsn = (rsn_t*)hRsn;
-
-    if (pRsn == NULL)
-    {
-        return TI_NOK;
-    }
-
-    TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "rsn_start ...\n");
-    pRsn->rsnStartedTs = os_timeStampMs (pRsn->hOs);
-
-    status = pRsn->pMainSecSm->start (pRsn->pMainSecSm);
-    /* Set keys that need to be set */
-    pRsn->defaultKeysOn = TI_FALSE;
-    pRsn->pAdmCtrl->getCipherSuite (pRsn->pAdmCtrl, &suite);
-    pRsn->pAdmCtrl->getExtAuthMode (pRsn->pAdmCtrl, &extAuthMode);
-
-    if (pRsn->wepStaticKey && ( (suite == TWD_CIPHER_WEP) || (suite == TWD_CIPHER_CKIP) ) )
-    {   /* set default WEP keys */
-        status = rsn_sendKeysNotSet (pRsn);
-        pRsn->eapType = OS_EAP_TYPE_NONE;
-    }
-    else if (suite == TWD_CIPHER_NONE && extAuthMode != RSN_EXT_AUTH_MODE_OPEN)
-    {   /* remove previously WEP key for SHARED */
-        pRsn->wepStaticKey = TI_FALSE;
-        status = rsn_removedDefKeys (pRsn);
-
-        /* Set None to HAL */
-        tTwdParam.paramType = TWD_RSN_SECURITY_MODE_PARAM_ID;
-        tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_NONE;
-        status = TWD_SetParam (pRsn->hTWD, &tTwdParam);
-
-    }
-    else if (suite==TWD_CIPHER_NONE)
-    {
-        pRsn->eapType = OS_EAP_TYPE_NONE;
-    }
-
-    return status;
-}
-
-
-TI_STATUS rsn_sendKeysNotSet(rsn_t *pRsn)
-{
-    TI_UINT8           keyIndex;
-    OS_802_11_KEY   rsnOsKey;
-    TI_STATUS       status = TI_OK;
-    
-    for (keyIndex = 0; keyIndex < MAX_KEYS_NUM; keyIndex++)
-    {
-        if (pRsn->wepDefaultKeys[keyIndex])
-        {
-            rsnOsKey.KeyIndex  = pRsn->keys[keyIndex].keyIndex;
-            rsnOsKey.KeyLength = pRsn->keys[keyIndex].encLen;
-            rsnOsKey.Length    = sizeof(rsnOsKey);
-
-            /* Change key type to WEP-key before setting*/
-            pRsn->keys[keyIndex].keyType = KEY_WEP;
-
-            MAC_COPY (rsnOsKey.BSSID, pRsn->keys[keyIndex].macAddress);
-            os_memoryCopy (pRsn->hOs, &rsnOsKey.KeyRSC, 
-                           (void *)pRsn->keys[keyIndex].keyRsc, 
-                           KEY_RSC_LEN);
-            os_memoryCopy (pRsn->hOs, rsnOsKey.KeyMaterial, 
-                           (void *)pRsn->keys[keyIndex].encKey, 
-                           MAX_KEY_LEN /*pRsn->keys[keyIndex].encLen*/);
-           
-            /* Set WEP transmit key mask on the default key */
-            if (keyIndex == pRsn->defaultKeyId)
-            {
-                rsnOsKey.KeyIndex |= 0x80000000;
-            }
-
-            status = pRsn->pKeyParser->recv (pRsn->pKeyParser, (TI_UINT8*)&rsnOsKey, sizeof(rsnOsKey));
-        }
-    }
-
-    return status;
-}
-
-
-TI_STATUS rsn_removedDefKeys (TI_HANDLE hRsn)
-{
-    TI_UINT8  keyIndex;
-    rsn_t  *pRsn = (rsn_t*)hRsn;
-    
-    TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "rsn_removedDefKeys Enter \n");
-    
-    for (keyIndex = 0; keyIndex < MAX_KEYS_NUM; keyIndex++)
-    {
-        TSecurityKeys   key;
-
-        TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "rsn_removedDefKeys, Remove keyId=%d\n", keyIndex);
-       
-        pRsn->wepDefaultKeys[keyIndex] = TI_FALSE;
-        os_memoryCopy (pRsn->hOs, &key, &pRsn->keys[keyIndex], sizeof(TSecurityKeys));
-        pRsn->removeKey (pRsn, &key);
-       
-        /* Set WEP transmit key mask on the default key */
-        if (keyIndex == pRsn->defaultKeyId)
-        {
-            pRsn->defaultKeyId = 0;
-        }
-    }
-
-    return TI_OK;
-}
-
-
-/**
-*
-* rsn_Stop - Stop event for the rsniation SM
-*
-* \b Description: 
-*
-* Stop event for the rsniation SM
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsniation SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_Start, rsn_Recv
-*/
-TI_STATUS rsn_stop (TI_HANDLE hRsn, TI_BOOL removeKeys)
-{
-    TI_STATUS        status;
-    rsn_t           *pRsn;
-    TI_UINT8            keyIndex;
-    TSecurityKeys   key;
-
-    pRsn = (rsn_t*)hRsn;
-
-    if (pRsn == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: calling STOP... removeKeys=%d\n", removeKeys);
-
-    for (keyIndex = 0; keyIndex < MAX_KEYS_NUM; keyIndex++)
-    {
-        os_memoryCopy (pRsn->hOs, &key, &pRsn->keys[keyIndex], sizeof(TSecurityKeys));
-        key.keyIndex = keyIndex;
-
-        if (!pRsn->wepDefaultKeys[keyIndex])
-        {	/* Remove only dynamic keys. Default keys are removed by calling: rsn_removedDefKeys() */
-            TRACE2(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "rsn_stop, Remove keyIndex=%d, key.keyIndex=%d\n",keyIndex, key.keyIndex);
-            
-            TRACE_INFO_HEX(pRsn->hReport, (TI_UINT8 *)key.macAddress, 6);
-
-            pRsn->removeKey (pRsn, &key);
-        }
-
-    }
-
-    tmr_StopTimer (pRsn->hMicFailureReportWaitTimer);
-
-    /* Stop the pre-authentication timer in case we are disconnecting */
-    tmr_StopTimer (pRsn->pAdmCtrl->hPreAuthTimerWpa2);
-
-    status = pRsn->pMainSecSm->stop (pRsn->pMainSecSm);
-
-    pRsn->eGroupKeyUpdate = GROUP_KEY_UPDATE_FALSE;
-    pRsn->ePairwiseKeyUpdate = PAIRWISE_KEY_UPDATE_FALSE;
-    pRsn->defaultKeysOn = TI_TRUE;
-
-#ifdef XCC_MODULE_INCLUDED
-	pRsn->pAdmCtrl->networkEapMode = OS_XCC_NETWORK_EAP_OFF;
-#endif
-
-    if (removeKeys)
-    {   /* reset PMKID list if exist */
-        pRsn->pAdmCtrl->resetPmkidList (pRsn->pAdmCtrl);
-        /* reset unicast and broadcast ciphers after disconnect */
-        pRsn->pAdmCtrl->unicastSuite = TWD_CIPHER_NONE;
-        pRsn->pAdmCtrl->broadcastSuite = TWD_CIPHER_NONE;
-    }
-
-    return status;
-}
-
-TI_STATUS rsn_getParamEncryptionStatus(TI_HANDLE hRsn, ECipherSuite *rsnStatus)
-{ /* RSN_ENCRYPTION_STATUS_PARAM */
-    rsn_t       *pRsn = (rsn_t *)hRsn;
-    TI_STATUS   status = TI_NOK;
-
-    if ( (NULL == pRsn) || (NULL == rsnStatus) )
-    {
-        return status;
-    }
-    status = pRsn->pAdmCtrl->getCipherSuite(pRsn->pAdmCtrl, rsnStatus);
-    return status;
-}
-
-/**
-*
-* rsn_GetParam - Get a specific parameter from the rsniation SM
-*
-* \b Description: 
-*
-* Get a specific parameter from the rsniation SM.
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsniation SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_Start, rsn_Stop
-*/
-TI_STATUS rsn_getParam(TI_HANDLE hRsn, void *param)
-{
-    rsn_t       *pRsn = (rsn_t *)hRsn;
-    paramInfo_t *pParam = (paramInfo_t *)param;
-    TI_STATUS   status = TI_OK;
-
-    if ( (NULL == pRsn) || (NULL == pParam) )
-    {
-        return TI_NOK;
-    }
-
-    switch (pParam->paramType)
-    {
-    case RSN_PRIVACY_OPTION_IMPLEMENTED_PARAM:
-        pParam->content.rsnPrivacyOptionImplemented = TI_TRUE;
-        break;
-
-    case RSN_KEY_PARAM:
-        pParam->content.pRsnKey = &pRsn->keys[pParam->content.pRsnKey->keyIndex];
-        if (pParam->content.pRsnKey->keyIndex == pRsn->defaultKeyId)
-        {
-            pParam->content.pRsnKey->keyIndex |= 0x80000000;
-            TRACE1(pRsn->hReport, REPORT_SEVERITY_WARNING, "default Key: %d\n", pRsn->defaultKeyId);
-        }
-        break;
-
-    case RSN_SECURITY_STATE_PARAM:
-        status = pRsn->pMainSecSm->getAuthState (pRsn->pMainSecSm, (TIWLN_SECURITY_STATE*)&(pParam->content.rsnAuthState));
-        break;
-
-    case RSN_ENCRYPTION_STATUS_PARAM: 
-        status = pRsn->pAdmCtrl->getCipherSuite (pRsn->pAdmCtrl, &pParam->content.rsnEncryptionStatus);
-        break;
-
-    case RSN_EXT_AUTHENTICATION_MODE:
-        status = pRsn->pAdmCtrl->getExtAuthMode (pRsn->pAdmCtrl, &pParam->content.rsnExtAuthneticationMode);
-        break;
-
-    case RSN_MIXED_MODE:
-        status = pRsn->pAdmCtrl->getMixedMode (pRsn->pAdmCtrl, &pParam->content.rsnMixedMode);
-        break;
-
-    case RSN_AUTH_ENCR_CAPABILITY:
-        status = pRsn->pAdmCtrl->getAuthEncrCap(pRsn->pAdmCtrl, pParam->content.pRsnAuthEncrCapability);
-        break;
-
-    case RSN_PMKID_LIST:
-        pParam->content.rsnPMKIDList.Length = pParam->paramLength;
-        status = pRsn->pAdmCtrl->getPmkidList (pRsn->pAdmCtrl, &pParam->content.rsnPMKIDList);
-        pParam->paramLength = pParam->content.rsnPMKIDList.Length + 2 * sizeof(TI_UINT32);
-        break;
-
-    case RSN_PRE_AUTH_STATUS:
-        {
-            TI_UINT8 cacheIndex;
-        
-            pParam->content.rsnPreAuthStatus = pRsn->pAdmCtrl->getPreAuthStatus (pRsn->pAdmCtrl, &pParam->content.rsnApMac, &cacheIndex);
-        }
-        break;
-
-    case  RSN_WPA_PROMOTE_AVAILABLE_OPTIONS:
-        status = pRsn->pAdmCtrl->getWPAMixedModeSupport (pRsn->pAdmCtrl, &pParam->content.rsnWPAMixedModeSupport);
-        TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Get WPA Mixed MODE support  %d \n",pParam->content.rsnWPAMixedModeSupport);
-        break;
-
-    case RSN_WPA_PROMOTE_OPTIONS:
-        status = pRsn->pAdmCtrl->getPromoteFlags (pRsn->pAdmCtrl, 
-                                                  &pParam->content.rsnWPAPromoteFlags);
-                TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Get WPA promote flags  %d \n",pParam->content.rsnWPAPromoteFlags);
-        
-        break;
-
-#ifdef XCC_MODULE_INCLUDED
-    case RSN_XCC_NETWORK_EAP:
-        status = pRsn->pAdmCtrl->getNetworkEap (pRsn->pAdmCtrl, &pParam->content.networkEap);
-        break;
-#endif
-    case RSN_EAP_TYPE:
-        pParam->content.eapType = pRsn->eapType;
-        TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Get RSN_EAP_TYPE eapType  %d \n", pParam->content.eapType);
-        break;
-
-    case WPA_801_1X_AKM_EXISTS:
-
-        status = pRsn->pAdmCtrl->get802_1x_AkmExists(pRsn->pAdmCtrl, &pParam->content.wpa_802_1x_AkmExists);
-        TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Get WPA_801_1X_AKM_EXISTS  %d \n", pParam->content.wpa_802_1x_AkmExists);
-        break;
-
-    case RSN_DEFAULT_KEY_ID:
-        pParam->content.rsnDefaultKeyID = pRsn->defaultKeyId;
-        TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Get RSN_DEFAULT_KEY_ID  %d \n", pParam->content.rsnDefaultKeyID);
-        break;
-
-    case RSN_PORT_STATUS_PARAM:
-		TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Get Port Status\n"  );
-
-		if (pRsn->bRsnExternalMode) {
-				pParam->content.rsnPortStatus = pRsn->getPortStatus( pRsn );
-		} else {
-				status = TI_NOK;
-		}
-        break;
-
-    case RSN_EXTERNAL_MODE_PARAM:
-		TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Get External Mode\n"  );
-
-		pParam->content.rsnExternalMode = pRsn->bRsnExternalMode;
-        break;
-
-    default:
-        return TI_NOK;
-    }
-    
-    return status;
-}
-
-
-/**
-*
-* rsn_SetParam - Set a specific parameter to the rsniation SM
-*
-* \b Description: 
-*
-* Set a specific parameter to the rsniation SM.
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsniation SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_Start, rsn_Stop
-*/
-TI_STATUS rsn_setParam (TI_HANDLE hRsn, void *param)
-{
-    rsn_t               *pRsn;
-    paramInfo_t         *pParam = (paramInfo_t*)param;
-    TTwdParamInfo       tTwdParam;
-    TI_STATUS           status = TI_OK;
-
-    pRsn = (rsn_t*)hRsn;
-
-    if ( (NULL == pRsn) || (NULL == pParam) )
-    {
-        return TI_NOK;
-    }
-
-    TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set rsn_setParam   %X \n", pParam->paramType);
-
-    switch (pParam->paramType)
-    {
-
-    case RSN_DEFAULT_KEY_ID:
-    {
-        TI_UINT8  defKeyId, i;
-
-        defKeyId = pParam->content.rsnDefaultKeyID;
-        
-        if(defKeyId >= MAX_KEYS_NUM)
-        {
-            TRACE0(pRsn->hReport, REPORT_SEVERITY_ERROR, "RSN: Error - the value of the default Key Id  is incorrect \n");
-            return TI_NOK;
-        }
-
-        /* Clean transmit flag (1 in the bit31) in the previous default key */
-        for(i = 0; i < MAX_KEYS_NUM; i++)
-        {
-            pRsn->keys[i].keyIndex &= 0x7FFFFFFF;
-        }
-
-        /* Set the default key ID value in the RSN data structure */ 
-        pRsn->defaultKeyId = defKeyId;
-
-        /* Set the default key ID in the HAL */
-        tTwdParam.paramType = TWD_RSN_DEFAULT_KEY_ID_PARAM_ID;
-        tTwdParam.content.configureCmdCBParams.pCb = &pRsn->defaultKeyId;
-        tTwdParam.content.configureCmdCBParams.fCb = NULL;
-        tTwdParam.content.configureCmdCBParams.hCb = NULL;
-        status = TWD_SetParam (pRsn->hTWD, &tTwdParam); 
-
-        TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: default key ID =%d \n", pRsn->defaultKeyId);
-
-        sme_Restart (pRsn->hSmeSm);
-        break;
-    }
-
-    case RSN_ADD_KEY_PARAM:
-    {
-        TI_UINT8           keyIndex, i = 0;
-        ECipherSuite   cipherSuite;
-
-        status = pRsn->pAdmCtrl->getCipherSuite (pRsn->pAdmCtrl, &cipherSuite);
-        if (status !=TI_OK)
-        {
-            return status;
-        }
-        
-        TRACE2(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set RSN_ADD_KEY_PARAM KeyIndex  %x , keyLength=%d\n", pParam->content.rsnOsKey.KeyIndex,pParam->content.rsnOsKey.KeyLength);
-        keyIndex = (TI_UINT8)pParam->content.rsnOsKey.KeyIndex;
-        if (keyIndex >= MAX_KEYS_NUM)
-        {
-			return TI_NOK;
-        }
-       
-		status = pRsn->pKeyParser->recv (pRsn->pKeyParser, (TI_UINT8*)&pParam->content.rsnOsKey, sizeof(pParam->content.rsnOsKey));
-
-        if (status != TI_OK)
-        {
-TRACE1(pRsn->hReport, REPORT_SEVERITY_WARNING, ": pRsn->pKeyParser->recv satus returned with status=%x. returning with NOK\n", status);
-            return TI_NOK;
-        }
-
-        /* If the Key is not BAD, it may be that WEP key is sent before WEP status is set, 
-            save the key, and set it later at rsn_start */
-
-		/* If default Key not cleaned by calling rsn_removedDefKeys for keyIndex, Clean it */
-		if (pRsn->wepDefaultKeys[keyIndex] == TI_TRUE) 
-		{
-			TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "Set RSN_ADD_KEY_PARAM KeyIndex  %x\n", keyIndex);
-			TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "Set RSN_ADD_KEY_PARAM wepDefaultKeys=%d\n", pRsn->wepDefaultKeys[keyIndex]);
-             
-			pRsn->wepDefaultKeys[keyIndex] = TI_FALSE;
-			
-		}
-
-		pRsn->keys[keyIndex].keyIndex = pParam->content.rsnOsKey.KeyIndex;
-		pRsn->keys[keyIndex].encLen = pParam->content.rsnOsKey.KeyLength;
-		MAC_COPY (pRsn->keys[keyIndex].macAddress, pParam->content.rsnOsKey.BSSID);
-		os_memoryCopy (pRsn->hOs, (void *)pRsn->keys[keyIndex].keyRsc, (TI_UINT8*)&(pParam->content.rsnOsKey.KeyRSC), KEY_RSC_LEN);
-		os_memoryCopy (pRsn->hOs, (void *)pRsn->keys[keyIndex].encKey, pParam->content.rsnOsKey.KeyMaterial, MAX_KEY_LEN);
-           
-        /* Process the transmit flag (31-st bit of keyIndex).        */
-        /* If the added key has the TX bit set to TI_TRUE (i.e. the key */
-        /* is the new transmit key (default key), update             */
-        /* RSN data def.key Id and clean this bit in all other keys  */
-        if (pParam->content.rsnOsKey.KeyIndex & 0x80000000)
-        {
-            pRsn->defaultKeyId = keyIndex;
-            
-            for (i = 0; i < MAX_KEYS_NUM; i ++)
-            {
-                if (i != keyIndex)
-                {
-                    pRsn->keys[i].keyIndex &= 0x7FFFFFFF;
-                }
-            }
-        }
-        
-        if (pRsn->defaultKeysOn)
-        {   /* This is a WEP default key */
-            TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN_ADD_KEY_PARAM, Default key configured - keyIndex=%d-TI_TRUE\n", keyIndex);
-
-            pRsn->wepDefaultKeys[keyIndex] = TI_TRUE;
-            pRsn->wepStaticKey = TI_TRUE;
-            status = TI_OK;
-        }
-        break;
-    }
-    case RSN_REMOVE_KEY_PARAM:
-    {
-        TI_UINT8           keyIndex;
-        ECipherSuite   cipherSuite;
-
-        status = pRsn->pAdmCtrl->getCipherSuite (pRsn->pAdmCtrl, &cipherSuite);
-        if (status !=TI_OK)
-        {
-            return status;
-        }
-        /*if (cipherSuite == RSN_CIPHER_NONE)
-        {
-            TRACE0(pRsn->hReport, REPORT_SEVERITY_ERROR, "RSN: Error Remove Wep/Key when no encryption \n");
-            return TI_NOK;
-        }*/
-
-        TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set RSN_REMOVE_KEY_PARAM KeyIndex  %x \n", pParam->content.rsnOsKey.KeyIndex);
-        keyIndex = (TI_UINT8)pParam->content.rsnOsKey.KeyIndex;
-        if (keyIndex >= MAX_KEYS_NUM)
-        {
-            return TI_NOK;
-        }
-        
-        status = pRsn->pKeyParser->remove (pRsn->pKeyParser, 
-                                           (TI_UINT8*)&pParam->content.rsnOsKey, 
-                                           sizeof(pParam->content.rsnOsKey));
-
-        if (status == TI_OK)
-        {
-            pRsn->keys[keyIndex].keyType = KEY_NULL;
-            pRsn->keys[keyIndex].keyIndex &= 0x000000FF;
-        }
-
-        break;
-    }
-    
-    case RSN_ENCRYPTION_STATUS_PARAM: 
-        {
-            ECipherSuite   cipherSuite;
-
-            TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set RSN_ENCRYPTION_STATUS_PARAM rsnEncryptionStatus  %d \n", pParam->content.rsnEncryptionStatus);
-
-            pRsn->pAdmCtrl->getCipherSuite (pRsn->pAdmCtrl, &cipherSuite);
-            if (cipherSuite != pParam->content.rsnEncryptionStatus)
-            {
-                status = pRsn->pAdmCtrl->setUcastSuite (pRsn->pAdmCtrl, pParam->content.rsnEncryptionStatus);
-                status = pRsn->pAdmCtrl->setBcastSuite (pRsn->pAdmCtrl, pParam->content.rsnEncryptionStatus);
-                TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, " status = %d \n", status);
-            }
-            pRsn->defaultKeysOn = TI_TRUE;
-        }
-        break;
-
-    case RSN_EXT_AUTHENTICATION_MODE:
-        {
-            EExternalAuthMode  extAuthMode;
-
-            pRsn->pAdmCtrl->getExtAuthMode (pRsn->pAdmCtrl, &extAuthMode);
-            if (pParam->content.rsnExtAuthneticationMode!=extAuthMode)
-            {
-                TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set RSN_EXT_AUTHENTICATION_MODE rsnExtAuthneticationMode  %d \n", pParam->content.rsnExtAuthneticationMode);
-                
-                /*
-TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: remove all Keys\n");
-
-                for (keyIndex=0; keyIndex<MAX_KEYS_NUM; keyIndex++)
-                {
-                    os_memoryCopy(pRsn->hOs, &key, &pRsn->keys[keyIndex], sizeof(TSecurityKeys));
-                    pRsn->removeKey(pRsn, &key);
-
-                }*/
-
-                status = pRsn->pAdmCtrl->setExtAuthMode (pRsn->pAdmCtrl, pParam->content.rsnExtAuthneticationMode);
-            }
-            pRsn->defaultKeysOn = TI_TRUE;
-        }
-        break;
-
-#ifdef XCC_MODULE_INCLUDED
-    case RSN_XCC_NETWORK_EAP:
-        {
-            OS_XCC_NETWORK_EAP      networkEap;
-
-            pRsn->pAdmCtrl->getNetworkEap (pRsn->pAdmCtrl, &networkEap);
-            if (networkEap != pParam->content.networkEap)
-            {
-                TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set RSN_XCC_NETWORK_EAP networkEap  %d \n", pParam->content.networkEap);
-                
-                status = pRsn->pAdmCtrl->setNetworkEap (pRsn->pAdmCtrl, pParam->content.networkEap);
-                if (status == TI_OK) 
-                {
-                    /*status = RE_SCAN_NEEDED;*/
-                }
-            }
-        }
-        break;
-#endif
-    case RSN_MIXED_MODE:
-        {
-            TI_BOOL mixedMode;
-        
-            pRsn->pAdmCtrl->getMixedMode (pRsn->pAdmCtrl, &mixedMode);
-            if (mixedMode!=pParam->content.rsnMixedMode)
-            {
-                status = pRsn->pAdmCtrl->setMixedMode (pRsn->pAdmCtrl, pParam->content.rsnMixedMode);
-                
-                TRACE2(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set RSN_MIXED_MODE mixedMode  %d, status=%d \n", pParam->content.rsnMixedMode, status);
-            }
-            break;
-        }
-
-    case RSN_PMKID_LIST:
-        TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set RSN_PMKID_LIST \n");
-
-        TRACE_INFO_HEX(pRsn->hReport, (TI_UINT8*)&pParam->content.rsnPMKIDList ,sizeof(OS_802_11_PMKID));
-         status = pRsn->pAdmCtrl->setPmkidList (pRsn->pAdmCtrl, 
-                                                &pParam->content.rsnPMKIDList);
-         if(status == TI_OK)
-         {
-            TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set RSN_PMKID_LIST:   %d PMKID entries has been added to the cache.\n", pParam->content.rsnPMKIDList.BSSIDInfoCount);
-         }
-         else
-         {
-            TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set RSN_PMKID_LIST failure");
-         }
-        break;
-
-    case RSN_WPA_PROMOTE_OPTIONS:
-         status = pRsn->pAdmCtrl->setPromoteFlags (pRsn->pAdmCtrl, 
-                                                   pParam->content.rsnWPAPromoteFlags);
-         if(status == TI_OK)
-         {
-            TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set WPA promote options:  %d \n", pParam->content.rsnWPAPromoteFlags);
-         }
-         else
-         {
-            TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set WPA promote options failure");
-         }
-        break;
-
-    case RSN_EAP_TYPE:
-        TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set RSN_EAP_TYPE eapType  %d \n", pParam->content.eapType);
-
-        pRsn->eapType = pParam->content.eapType;
-	pRsn->defaultKeysOn = TI_TRUE;
-        break;
-
-    case RSN_SET_KEY_PARAM:
-        {
-            TSecurityKeys *pSecurityKey = pParam->content.pRsnKey;
-            TI_UINT32     keyIndex;
-            TI_UINT8      j=0;
-
-            TRACE2(pRsn->hReport,REPORT_SEVERITY_INFORMATION,"RSN:Set RSN_SET_KEY_PARAM KeyIndex %x,keyLength=%d\n",pSecurityKey->keyIndex,pSecurityKey->encLen);
-
-            if(pSecurityKey->keyIndex >= MAX_KEYS_NUM)
-            {
-                return TI_NOK;
-            }
-
-           keyIndex = (TI_UINT8)pSecurityKey->keyIndex;
-		/* Remove the key when the length is 0, or the type is not set */
-		   if ( (pSecurityKey->keyType == KEY_NULL) ||
-				 (pSecurityKey->encLen == 0))
-		   {
-				/* Clearing a key */
-				status = rsn_removeKey( pRsn, pSecurityKey );
-				break;
-           }
-		   else
-		   {
-           status = rsn_setKey (pRsn, pSecurityKey);  /* send key to FW*/
-
-           if (status == TI_OK)
-           {
-               //os_memoryCopy(pKeyDerive->hOs,&pRsn->pKeyParser->pUcastKey/pBcastKey, pEncodedKey, sizeof(encodedKeyMaterial_t));	
-           } /* check this copy */
-
-
-           /* If the Key is not BAD, it may be that WEP key is sent before WEP status is set,
-           save the key, and set it later at rsn_start */
-
-           pRsn->keys[keyIndex].keyIndex = pSecurityKey->keyIndex;
-           pRsn->keys[keyIndex].encLen = pSecurityKey->encLen;
-           MAC_COPY (pRsn->keys[keyIndex].macAddress, pSecurityKey->macAddress);
-           os_memoryCopy(pRsn->hOs,(void*)pRsn->keys[keyIndex].keyRsc, (TI_UINT8*)&(pSecurityKey->keyRsc), KEY_RSC_LEN);
-           os_memoryCopy (pRsn->hOs, (void *)pRsn->keys[keyIndex].encKey, (void*)pSecurityKey->encKey, MAX_KEY_LEN);
-
-           /* Process the transmit flag (31-st bit of keyIndex).        */
-           /* If the added key has the TX bit set to TI_TRUE (i.e. the key */
-           /* is the new transmit key (default key), update             */
-           /* RSN data def.key Id and clean this bit in all other keys  */
-           if (pSecurityKey->keyIndex & 0x80000000)
-           {
-               pRsn->defaultKeyId = keyIndex;
-
-               for (j = 0; j < MAX_KEYS_NUM; j++)
-               {
-                   if (j != keyIndex)
-                   {
-                       pRsn->keys[j].keyIndex &= 0x7FFFFFFF;
-                   }
-               }
-           }
-
-           if (pRsn->defaultKeysOn)
-           {   /* This is a WEP default key */
-               TRACE1(pRsn->hReport,REPORT_SEVERITY_INFORMATION, "RSN_SET_KEY_PARAM, Default key configured-keyIndex=%d-TI_TRUE\n", keyIndex);
-
-               pRsn->wepDefaultKeys[keyIndex] = TI_TRUE;
-               pRsn->wepStaticKey = TI_TRUE;
-               status = TI_OK;
-           }
-           break;
-        }
-       }
-       break;
-
-
-    case RSN_PORT_STATUS_PARAM:
-            TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set Port Status %d \n", pParam->content.rsnPortStatus);
-
-            if (pRsn->bRsnExternalMode) {
-                    status = pRsn->setPortStatus( hRsn, pParam->content.rsnPortStatus );
-            } else {
-                    status = TI_NOK;
-            }
-            break;
-
-    case RSN_GENERIC_IE_PARAM:
-            TRACE4(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set Generic IE: length=%d, IE=%02x%02x%02x... \n",
-                   pParam->content.rsnGenericIE.length,
-               pParam->content.rsnGenericIE.data[0], pParam->content.rsnGenericIE.data[1],pParam->content.rsnGenericIE.data[2] );
-
-            status = TI_OK;
-
-            /* make sure it's a valid IE: datal-ength > 2 AND a matching length field */
-            if ((pParam->content.rsnGenericIE.length > 2) &&
-                ((pParam->content.rsnGenericIE.data[1] + 2) == pParam->content.rsnGenericIE.length)) {
-                    /* Setting the IE */
-                    pRsn->genericIE.length = pParam->content.rsnGenericIE.length;
-                    os_memoryCopy(pRsn->hOs,(void*)pRsn->genericIE.data, (TI_UINT8*)pParam->content.rsnGenericIE.data, pParam->content.rsnGenericIE.length);
-            } else if ( pParam->content.rsnGenericIE.length == 0 ) {
-                    /* Deleting the IE */
-                    pRsn->genericIE.length = pParam->content.rsnGenericIE.length;
-            } else {
-                    TRACE0(pRsn->hReport, REPORT_SEVERITY_ERROR, "RSN: Set Generic IE: FAILED sanity checks \n" );
-                    status = TI_NOK;
-            }
-	    break;
-
-    case RSN_EXTERNAL_MODE_PARAM:
-		TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Set External Mode\n"  );
-
-		pRsn->bRsnExternalMode = pParam->content.rsnExternalMode;
-            break;
-
-    default:
-        return TI_NOK;
-    }
-
-    return status;
-}
-
-
-/**
-*
-* rsn_eventRecv - Set a specific parameter to the rsniation SM
-*
-* \b Description: 
-*
-* Set a specific parameter to the rsniation SM.
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsniation SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_Start, rsn_Stop
-*/
-TI_STATUS rsn_reportStatus (rsn_t *pRsn, TI_STATUS rsnStatus)
-{
-    TI_STATUS           status = TI_OK;
-    paramInfo_t         param;
-    EExternalAuthMode   extAuthMode;
-
-    if (pRsn == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    if (rsnStatus == TI_OK)
-    {
-        /* set EAPOL encryption status according to authentication protocol */
-        pRsn->rsnCompletedTs = os_timeStampMs (pRsn->hOs);
-        
-        status = pRsn->pAdmCtrl->getExtAuthMode (pRsn->pAdmCtrl, &extAuthMode);
-        if (status != TI_OK)
-        {
-            return status;
-        }
-
-        if (extAuthMode >= RSN_EXT_AUTH_MODE_WPA)
-			txCtrlParams_setEapolEncryptionStatus (pRsn->hTxCtrl, TI_TRUE);
-		else
-			txCtrlParams_setEapolEncryptionStatus (pRsn->hTxCtrl, TI_FALSE);
-		
-        /* set WEP invoked mode according to cipher suite */
-        switch (pRsn->paeConfig.unicastSuite)
-        {
-        case TWD_CIPHER_NONE:
-            param.content.txDataCurrentPrivacyInvokedMode = TI_FALSE;
-            break;
-        
-        default:
-            param.content.txDataCurrentPrivacyInvokedMode = TI_TRUE;
-            break;
-        }
-
-		if (pRsn->bRsnExternalMode) {
-				param.content.txDataCurrentPrivacyInvokedMode = TI_TRUE;
-                txCtrlParams_setEapolEncryptionStatus (pRsn->hTxCtrl, TI_FALSE);
-		}
-
-		txCtrlParams_setCurrentPrivacyInvokedMode(pRsn->hTxCtrl, param.content.txDataCurrentPrivacyInvokedMode);
-        /* The value of exclude unencrypted should be as privacy invoked */
-        param.paramType = RX_DATA_EXCLUDE_UNENCRYPTED_PARAM;
-        rxData_setParam (pRsn->hRx, &param);
-        
-        param.paramType = RX_DATA_EXCLUDE_BROADCAST_UNENCRYPTED_PARAM;
-        if (pRsn->pAdmCtrl->mixedMode)
-        {   /* do not exclude Broadcast packets */
-            param.content.txDataCurrentPrivacyInvokedMode = TI_FALSE;
-        }
-        rxData_setParam (pRsn->hRx, &param);
-    } 
-
-    else 
-        rsnStatus = (TI_STATUS)STATUS_SECURITY_FAILURE;
-
-    status = conn_reportRsnStatus (pRsn->hConn, (mgmtStatus_e)rsnStatus);
-
-    if (status!=TI_OK)
-    {
-        return status;
-    }
-    
-    if (rsnStatus == TI_OK)
-    {
-        EvHandlerSendEvent (pRsn->hEvHandler, IPC_EVENT_AUTH_SUCC, NULL, 0);
-    }
-
-    TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: rsn_reportStatus \n");
-
-    return TI_OK;
-}
-
-
-/**
-*
-* rsn_eventRecv - Set a specific parameter to the rsniation SM
-*
-* \b Description: 
-*
-* Set a specific parameter to the rsniation SM.
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsniation SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_Start, rsn_Stop
-*/
-TI_STATUS rsn_setPaeConfig(rsn_t *pRsn, TRsnPaeConfig *pPaeConfig)
-{
-    TI_STATUS           status;
-    mainSecInitData_t   initData;
-
-    if ( (NULL == pRsn) || (NULL == pPaeConfig) )
-    {
-        return TI_NOK;
-    }
-
-    TRACE2(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: Calling set PAE config..., unicastSuite = %d, broadcastSuite = %d \n", pPaeConfig->unicastSuite, pPaeConfig->broadcastSuite);
-    
-    os_memoryCopy(pRsn->hOs, &pRsn->paeConfig, pPaeConfig, sizeof(TRsnPaeConfig));
-
-    initData.pPaeConfig = &pRsn->paeConfig;
-
-    status = mainSec_config (pRsn->pMainSecSm, 
-                             &initData, 
-                             pRsn, 
-                             pRsn->hReport, 
-                             pRsn->hOs, 
-                             pRsn->hCtrlData,
-                             pRsn->hEvHandler, 
-                             pRsn->hConn,
-                             pRsn->hTimer);
-
-    return status;
-}
-
-
-/**
-*
-* rsn_eventRecv - Set a specific parameter to the rsniation SM
-*
-* \b Description: 
-*
-* Set a specific parameter to the rsniation SM.
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsniation SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_Start, rsn_Stop
-*/
-TI_STATUS rsn_getNetworkMode(rsn_t *pRsn, ERsnNetworkMode *pNetMode)
-{
-    paramInfo_t     param;
-    TI_STATUS       status;
-
-    param.paramType = CTRL_DATA_CURRENT_BSS_TYPE_PARAM;
-
-    status =  ctrlData_getParam (pRsn->hCtrlData, &param);
-
-    if (status == TI_OK)
-    {
-        if (param.content.ctrlDataCurrentBssType == BSS_INFRASTRUCTURE)
-        {
-            *pNetMode = RSN_INFRASTRUCTURE;
-        } 
-        else 
-        {
-            *pNetMode = RSN_IBSS;
-        }
-    }
-    else 
-    {
-        return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-
-/**
-*
-* rsn_eventRecv - Set a specific parameter to the rsniation SM
-*
-* \b Description: 
-*
-* Set a specific parameter to the rsniation SM.
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsniation SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_Start, rsn_Stop
-*/
-TI_STATUS rsn_evalSite(TI_HANDLE hRsn, TRsnData *pRsnData, TRsnSiteParams *pRsnSiteParams, TI_UINT32 *pMetric)
-{
-
-    rsn_t       *pRsn;
-    TI_STATUS    status;
-
-    if ( (NULL == pRsnData) || (NULL == hRsn) )
-    {
-        *pMetric = 0;
-        return TI_NOK;
-    }
-
-    pRsn = (rsn_t*)hRsn;
-
-    if (rsn_isSiteBanned(hRsn, pRsnSiteParams->bssid) == TI_TRUE)
-    {
-        *pMetric = 0;
-        TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": Site is banned!\n");
-        return TI_NOK;
-    }
-
-	if ( pRsn->bRsnExternalMode ) {
-			/* In external mode, the supplicant is responsible to make sure that site security matches */
-			status = TI_OK;
-	} else {
-    status = pRsn->pAdmCtrl->evalSite (pRsn->pAdmCtrl, pRsnData, pRsnSiteParams, pMetric);
-	}
-
-    TRACE2(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": pMetric=%d status=%d\n", *pMetric, status);
-
-    return status;
-}
-
-
-/**
-*
-* rsn_getInfoElement - 
-*
-* \b Description: 
-*
-* Get the RSN information element.
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsn SM context  \n
-*  I/O - pRsnIe - Pointer to the return information element \n
-*  I/O - pRsnIeLen - Pointer to the returned IE's length \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS rsn_getInfoElement(TI_HANDLE hRsn, TI_UINT8 *pRsnIe, TI_UINT32 *pRsnIeLen)
-{
-    rsn_t       *pRsn;
-    TI_STATUS   status;
-    TI_UINT32   ie_len = 0;
-
-    if ( (NULL == hRsn) || (NULL == pRsnIe) || (NULL == pRsnIeLen) )
-    {
-        return TI_NOK;
-    }
-
-    pRsn = (rsn_t*)hRsn;
-
-    if (!pRsn->bRsnExternalMode) 
-		{
-
-    status = pRsn->pAdmCtrl->getInfoElement (pRsn->pAdmCtrl, pRsnIe, &ie_len);
-
-    TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "rsn_getInfoElement pRsnIeLen= %d\n",*pRsnIeLen);
-
-    if ( status != TI_OK ) {
-    return status;   
-    }
-
-    pRsnIe += ie_len;
-		}
-
-    status = rsn_getGenInfoElement(hRsn, pRsnIe, pRsnIeLen);
-
-    *pRsnIeLen += ie_len;
-
-    return status;
-
-}
-
-
-#ifdef XCC_MODULE_INCLUDED
-/**
-*
-* rsn_getXCCExtendedInfoElement - 
-*
-* \b Description: 
-*
-* Get the Aironet information element.
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsn SM context  \n
-*  I/O - pRsnIe - Pointer to the return information element \n
-*  I/O - pRsnIeLen - Pointer to the returned IE's length \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS rsn_getXCCExtendedInfoElement(TI_HANDLE hRsn, TI_UINT8 *pRsnIe, TI_UINT8 *pRsnIeLen)
-{
-    rsn_t       *pRsn;
-    TI_STATUS   status;
-
-    if ( (NULL == hRsn) || (NULL == pRsnIe) || (NULL == pRsnIeLen) )
-    {
-        return TI_NOK;
-    }
-
-    pRsn = (rsn_t*)hRsn;
-
-    status = admCtrlXCC_getInfoElement (pRsn->pAdmCtrl, pRsnIe, pRsnIeLen);
-
-    TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "rsn_getXCCExtendedInfoElement pRsnIeLen= %d\n",*pRsnIeLen);
-
-    return status;    
-}
-#endif
-
-
-/**
-*
-* rsn_eventRecv - Set a specific parameter to the rsniation SM
-*
-* \b Description: 
-*
-* Set a specific parameter to the rsniation SM.
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsniation SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_Start, rsn_Stop
-*/
-TI_STATUS rsn_setSite(TI_HANDLE hRsn, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen)
-{
-    rsn_t      *pRsn;
-    TI_STATUS   status;
-
-    if ( (NULL == pRsnData) || (NULL == hRsn) )
-    {
-        *pAssocIeLen = 0;
-        return TI_NOK;
-    }
-
-    pRsn = (rsn_t*)hRsn;
-
-    status = pRsn->pAdmCtrl->setSite (pRsn->pAdmCtrl, pRsnData, pAssocIe, pAssocIeLen);
-
-    TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "rsn_setSite ieLen= %d\n",pRsnData->ieLen);
-    return status;
-}
-
-
-TI_STATUS rsn_setKey (rsn_t *pRsn, TSecurityKeys *pKey)
-{
-    TTwdParamInfo       tTwdParam;
-    TI_UINT8            keyIndex;
-    TI_BOOL				macIsBroadcast = TI_FALSE;
-    TI_STATUS           status = TI_OK;
-
-	if (pRsn == NULL || pKey == NULL)
-	{
-		return TI_NOK;
-	}
-
-	keyIndex = (TI_UINT8)pKey->keyIndex;
-    if (keyIndex >= MAX_KEYS_NUM)
-    {
-        return TI_NOK;
-    }
-
-    if (pKey->keyType != KEY_NULL)
-    {
-
-			/* If in external mode, set driver's security mode according to the key */
-			if (pRsn->bRsnExternalMode) {
-					tTwdParam.paramType = TWD_RSN_SECURITY_MODE_PARAM_ID;
-
-					switch (pKey->keyType) {
-					case KEY_TKIP:
-							tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_TKIP;
-							break;
-					case KEY_AES:
-							tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_AES_CCMP;
-							break;
-#ifdef GEM_SUPPORTED
-					case KEY_GEM:
-							tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_GEM;
-							status = pRsn->pAdmCtrl->setUcastSuite (pRsn->pAdmCtrl, TWD_CIPHER_GEM);
-							status = pRsn->pAdmCtrl->setBcastSuite (pRsn->pAdmCtrl, TWD_CIPHER_GEM);
-							break;
-#endif
-					case KEY_WEP:
-							tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_WEP;
-							break;
-					case KEY_NULL:
-					case KEY_XCC:
-					default:
-							tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_NONE;
-							break;
-					}
-					status = TWD_SetParam(pRsn->hTWD, &tTwdParam);
-					if ( status != TI_OK ) {
-							return status;
-					}
-			}
-
-        /* set the size to reserve for encryption to the tx */
-        /* update this parameter only in accordance with pairwise key setting */
-       if (!MAC_BROADCAST(pKey->macAddress))
-        {
-
-        /* set the size to reserve for encryption to the tx */
-            switch (pKey->keyType)
-            {
-                case KEY_TKIP:
-			        txCtrlParams_setEncryptionFieldSizes (pRsn->hTxCtrl, IV_FIELD_SIZE);
-                    break;
-                case KEY_AES:
-			        txCtrlParams_setEncryptionFieldSizes (pRsn->hTxCtrl, AES_AFTER_HEADER_FIELD_SIZE);
-                    break;
-#ifdef GEM_SUPPORTED
-			    case KEY_GEM:
-#endif
-                case KEY_WEP:
-                case KEY_NULL:
-                case KEY_XCC:
-                default:
-			        txCtrlParams_setEncryptionFieldSizes (pRsn->hTxCtrl, 0);
-                    break;
-            }
-
-        }
-
-        pRsn->keys[keyIndex].keyType = pKey->keyType;
-        pRsn->keys[keyIndex].keyIndex = keyIndex;
-
-		if (!pRsn->bRsnExternalMode) {
-        
-        macIsBroadcast = MAC_BROADCAST (pKey->macAddress);
-		if ((pRsn->keys[keyIndex].keyType != KEY_NULL )&&
-			macIsBroadcast && !MAC_BROADCAST((pRsn->keys[keyIndex].macAddress)))
-		{	/* In case a new Group key is set instead of a Unicast key, 
-			first remove the UNIcast key from FW */
-			rsn_removeKey(pRsn, &pRsn->keys[keyIndex]);
-		}
-
-		if (macIsBroadcast)
-        {
-            TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: rsn_setKey, Group ReKey timer started\n");
-            tmr_StopTimer (pRsn->hMicFailureGroupReKeyTimer);
-            tmr_StartTimer (pRsn->hMicFailureGroupReKeyTimer,
-                            rsn_groupReKeyTimeout,
-                            (TI_HANDLE)pRsn,
-                            RSN_MIC_FAILURE_RE_KEY_TIMEOUT,
-                            TI_FALSE);
-            pRsn->eGroupKeyUpdate = GROUP_KEY_UPDATE_TRUE;
-        }
-		else 
-        {
-			if (pRsn->bPairwiseMicFailureFilter)	/* the value of this flag is taken from registry */
-			{
-				TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: rsn_setKey, Pairwise ReKey timer started\n");
-				tmr_StopTimer (pRsn->hMicFailurePairwiseReKeyTimer);
-				tmr_StartTimer (pRsn->hMicFailurePairwiseReKeyTimer,
-								rsn_pairwiseReKeyTimeout,
-								(TI_HANDLE)pRsn,
-								RSN_MIC_FAILURE_RE_KEY_TIMEOUT,
-								TI_FALSE);
-				pRsn->ePairwiseKeyUpdate = PAIRWISE_KEY_UPDATE_TRUE;
-			}
-        }
-		}
- 
-        /* Mark key as added */
-        pRsn->keys_en [keyIndex] = TI_TRUE;
-
-        tTwdParam.paramType = TWD_RSN_KEY_ADD_PARAM_ID;
-        tTwdParam.content.configureCmdCBParams.pCb = (TI_UINT8*) pKey;
-        tTwdParam.content.configureCmdCBParams.fCb = NULL;
-        tTwdParam.content.configureCmdCBParams.hCb = NULL;
-        status = TWD_SetParam (pRsn->hTWD, &tTwdParam);
-    TRACE3(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: rsn_setKey, KeyType=%d, KeyId = 0x%lx,encLen=0x%x\n", pKey->keyType,pKey->keyIndex, pKey->encLen);
-
-    TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "\nEncKey = ");
-
-    TRACE_INFO_HEX(pRsn->hReport, (TI_UINT8 *)pKey->encKey, pKey->encLen);
-
-    if (pKey->keyType != KEY_WEP)
-    { 
-        TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "\nMac address = ");
-        TRACE_INFO_HEX(pRsn->hReport, (TI_UINT8 *)pKey->macAddress, MAC_ADDR_LEN);
-        TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "\nRSC = ");
-        TRACE_INFO_HEX(pRsn->hReport, (TI_UINT8 *)pKey->keyRsc, KEY_RSC_LEN);
-        TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "\nMic RX = ");
-        TRACE_INFO_HEX(pRsn->hReport, (TI_UINT8 *)pKey->micRxKey, MAX_KEY_LEN);
-        TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "\nMic TX = ");
-        TRACE_INFO_HEX(pRsn->hReport, (TI_UINT8 *)pKey->micTxKey, MAX_KEY_LEN);
-    }
-    }
-
-    return status; 
-}
-
-
-TI_STATUS rsn_removeKey (rsn_t *pRsn, TSecurityKeys *pKey)
-{
-    TI_STATUS           status = TI_OK;
-    TTwdParamInfo       tTwdParam;
-    TI_UINT8               keyIndex;
-
-	if (pRsn == NULL || pKey == NULL)
-	{
-		return TI_NOK;
-	}
-
-	keyIndex = (TI_UINT8)pKey->keyIndex;
-    if (keyIndex >= MAX_KEYS_NUM)
-    {
-        return TI_NOK;
-    }
-
-    TRACE2(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "rsn_removeKey Entry, keyType=%d, keyIndex=0x%lx\n",pKey->keyType, keyIndex);
-
-    /* Now set to the RSN structure. */
-    if (pRsn->keys_en[keyIndex])
-    {
-        tTwdParam.paramType = TWD_RSN_KEY_REMOVE_PARAM_ID;
-        /*os_memoryCopy(pRsn->hOs, &tTwdParam.content.rsnKey, pKey, sizeof(TSecurityKeys));*/
-        tTwdParam.content.configureCmdCBParams.pCb = (TI_UINT8*) pKey;
-        tTwdParam.content.configureCmdCBParams.fCb = NULL;
-        tTwdParam.content.configureCmdCBParams.hCb = NULL;
-
-        if ( pKey->keyType == KEY_NULL ) {
-				/* If keytype is unknown, retreive it from the RSN context */
-				pKey->keyType = pRsn->keys[keyIndex].keyType;
-        }
-
-        /* If keyType is TKIP or AES, set the encLen to the KEY enc len - 16 */
-        if (pKey->keyType == KEY_TKIP || pKey->keyType == KEY_AES)
-        {
-            pKey->encLen = 16;
-            if (keyIndex != 0)
-            {   
-                const TI_UINT8 broadcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-                /* 
-                 * if keyType is TKIP or AES, and the key index is broadcast, overwrite the MAC address as broadcast 
-                 * for removing the Broadcast key from the FW 
-                 */
-                MAC_COPY (pKey->macAddress, broadcast);
-            }
-        }
-		else if (pKey->keyType == KEY_WEP)
-		{
-			/* In full driver we use only WEP default keys. To remove it we make sure that the MAC address is NULL */
-			os_memoryZero(pRsn->hOs,(void*)pKey->macAddress,sizeof(TMacAddr)); 
-		}
-
-       
-        /* Mark key as deleted */
-        pRsn->keys_en[keyIndex] = TI_FALSE;
-
-        status = TWD_SetParam (pRsn->hTWD, &tTwdParam);
-        
-        TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "rsn_removeKey in whal, status =%d\n", status);
-
-        /* clean the key flags*/
-        pRsn->keys[keyIndex].keyIndex &= 0x000000FF;
-        pRsn->keys[keyIndex].keyType   = KEY_NULL;
-        pRsn->keys[keyIndex].encLen    = 0;
-        pRsn->wepDefaultKeys[keyIndex] = TI_FALSE;        
-    }
-
-    return status; 
-}
-
-
-TI_STATUS rsn_setDefaultKeyId(rsn_t *pRsn, TI_UINT8 keyId)
-{
-    TI_STATUS               status = TI_OK;
-    TTwdParamInfo           tTwdParam;
-
-    if (pRsn == NULL)
-    {
-        return TI_NOK;
-    }
-    pRsn->defaultKeyId = keyId;
-    /* Now we configure default key ID to the HAL */
-    tTwdParam.paramType = TWD_RSN_DEFAULT_KEY_ID_PARAM_ID;
-    tTwdParam.content.configureCmdCBParams.pCb = &keyId;
-    tTwdParam.content.configureCmdCBParams.fCb = NULL;
-    tTwdParam.content.configureCmdCBParams.hCb = NULL;
-    status = TWD_SetParam (pRsn->hTWD, &tTwdParam); 
-    
-    TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "RSN: rsn_setDefaultKeyId, KeyId = 0x%lx\n", keyId);
-    return status;
-}
-
-
-TI_STATUS rsn_reportAuthFailure(TI_HANDLE hRsn, EAuthStatus authStatus) 
-{
-    TI_STATUS    status = TI_OK;
-    rsn_t       *pRsn;
-    paramInfo_t param;
-
-    if (hRsn==NULL)
-    {
-        return TI_NOK;
-    }
-
-    pRsn = (rsn_t*)hRsn;
-
-    /* Remove AP from candidate list for a specified amount of time */
-	param.paramType = CTRL_DATA_CURRENT_BSSID_PARAM;
-	status = ctrlData_getParam(pRsn->hCtrlData, &param);
-	if (status != TI_OK)
-	{
-TRACE0(pRsn->hReport, REPORT_SEVERITY_ERROR, "rsn_reportAuthFailure, unable to retrieve BSSID \n");
-	}
-    else
-    {
-        TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "current station is banned from the roaming candidates list for %d Ms\n", RSN_AUTH_FAILURE_TIMEOUT);
-
-        rsn_banSite(hRsn, param.content.ctrlDataCurrentBSSID, RSN_SITE_BAN_LEVEL_FULL, RSN_AUTH_FAILURE_TIMEOUT);
-    }
-
-	
-#ifdef XCC_MODULE_INCLUDED
-TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "CALLING rougeAP, status= %d \n",authStatus);
-    status = XCCMngr_rogueApDetected (pRsn->hXCCMngr, authStatus);
-#endif
-    TI_VOIDCAST(pRsn);
-    return status;
-}
-
-
-/******
-This is the CB function for mic failure event from the FW 
-*******/
-TI_STATUS rsn_reportMicFailure(TI_HANDLE hRsn, TI_UINT8 *pType, TI_UINT32 Length)
-{
-    rsn_t                               *pRsn = (rsn_t *) hRsn;
-    ERsnSiteBanLevel                    banLevel;
-    OS_802_11_AUTHENTICATION_REQUEST    *request;
-    TI_UINT8 AuthBuf[sizeof(TI_UINT32) + sizeof(OS_802_11_AUTHENTICATION_REQUEST)];
-    paramInfo_t                         param;
-    TI_UINT8                               failureType;
-
-    failureType = *pType;
-
-   if (((pRsn->paeConfig.unicastSuite == TWD_CIPHER_TKIP) && (failureType == KEY_TKIP_MIC_PAIRWISE)) ||
-        ((pRsn->paeConfig.broadcastSuite == TWD_CIPHER_TKIP) && (failureType == KEY_TKIP_MIC_GROUP)))
-    {
-        /* check if the MIC failure is group and group key update */
-        /* was performed during the last 3 seconds */
-        if ((failureType == KEY_TKIP_MIC_GROUP) &&
-            (pRsn->eGroupKeyUpdate == GROUP_KEY_UPDATE_TRUE))
-        {
-            TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": Group MIC failure ignored, key update was performed within the last 3 seconds.\n");
-            return TI_OK;
-        }
-
-		/* check if the MIC failure is pairwise and pairwise key update */
-        /* was performed during the last 3 seconds */
-        if ((failureType == KEY_TKIP_MIC_PAIRWISE) &&
-            (pRsn->ePairwiseKeyUpdate == PAIRWISE_KEY_UPDATE_TRUE))
-        {	
-            TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": Pairwise MIC failure ignored, key update was performed within the last 3 seconds.\n");
-            return TI_OK;
-        }
-
-        /* Prepare the Authentication Request */
-        request = (OS_802_11_AUTHENTICATION_REQUEST *)(AuthBuf + sizeof(TI_UINT32));
-        request->Length = sizeof(OS_802_11_AUTHENTICATION_REQUEST);
-
-        param.paramType = CTRL_DATA_CURRENT_BSSID_PARAM;
-        if (ctrlData_getParam (pRsn->hCtrlData, &param) != TI_OK)
-        {
-            return TI_NOK;
-        }
-        
-        /* Generate 802 Media specific indication event */
-        *(TI_UINT32*)AuthBuf = os802_11StatusType_Authentication;
-
-        MAC_COPY (request->BSSID, param.content.ctrlDataCurrentBSSID);
-
-        if (failureType == KEY_TKIP_MIC_PAIRWISE)
-        {
-            request->Flags = OS_802_11_REQUEST_PAIRWISE_ERROR;
-        }
-        else
-        {
-            request->Flags = OS_802_11_REQUEST_GROUP_ERROR;
-        }
-
-		EvHandlerSendEvent (pRsn->hEvHandler, 
-                            IPC_EVENT_MEDIA_SPECIFIC, 
-                            (TI_UINT8*)AuthBuf,
-                            sizeof(TI_UINT32) + sizeof(OS_802_11_AUTHENTICATION_REQUEST));
-
-		if ( pRsn->bRsnExternalMode ) {
-			return TI_OK;
-		}
-
-        /* Update and check the ban level to decide what actions need to take place */
-        banLevel = rsn_banSite (hRsn, param.content.ctrlDataCurrentBSSID, RSN_SITE_BAN_LEVEL_HALF, RSN_MIC_FAILURE_TIMEOUT);
-        if (banLevel == RSN_SITE_BAN_LEVEL_FULL)
-        {
-            /* Site is banned so prepare to disconnect */
-            TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": Second MIC failure, closing Rx port...\n");
-
-            param.paramType = RX_DATA_PORT_STATUS_PARAM;
-            param.content.rxDataPortStatus = CLOSE;
-            rxData_setParam(pRsn->hRx, &param);
-
-            /* stop the mic failure Report timer and start a new one for 0.5 seconds */
-            tmr_StopTimer (pRsn->hMicFailureReportWaitTimer);
-		    apConn_setDeauthPacketReasonCode(pRsn->hAPConn, STATUS_MIC_FAILURE);
-            tmr_StartTimer (pRsn->hMicFailureReportWaitTimer,
-                            rsn_micFailureReportTimeout,
-                            (TI_HANDLE)pRsn,
-                            RSN_MIC_FAILURE_REPORT_TIMEOUT,
-                            TI_FALSE);
-        }
-        else
-        {
-            /* Site is only half banned so nothing needs to be done for now */
-            TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": First MIC failure, business as usual for now...\n");
-        }
-    }
-
-    return TI_OK;
-}
-
-
-void rsn_groupReKeyTimeout(TI_HANDLE hRsn, TI_BOOL bTwdInitOccured)
-{
-    rsn_t *pRsn;
-
-    pRsn = (rsn_t*)hRsn;
-
-    if (pRsn == NULL)
-    {
-        return;
-    }
-
-    pRsn->eGroupKeyUpdate = GROUP_KEY_UPDATE_FALSE;
-}
-
-
-void rsn_pairwiseReKeyTimeout(TI_HANDLE hRsn, TI_BOOL bTwdInitOccured)
-{
-    rsn_t *pRsn;
-
-    pRsn = (rsn_t*)hRsn;
-
-    if (pRsn == NULL)
-    {
-        return;
-    }
-
-    pRsn->ePairwiseKeyUpdate = PAIRWISE_KEY_UPDATE_FALSE;
-}
-
-void rsn_micFailureReportTimeout (TI_HANDLE hRsn, TI_BOOL bTwdInitOccured)
-{
-    rsn_t *pRsn;
-
-    pRsn = (rsn_t*)hRsn;
-
-    if (pRsn == NULL)
-    {
-        return;
-    }
-
-    TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": MIC failure reported, disassociating...\n");
-
-    apConn_reportRoamingEvent (pRsn->hAPConn, ROAMING_TRIGGER_SECURITY_ATTACK, NULL);
-}
-
-
-/**
-*
-* rsn_resetPMKIDList - 
-*
-* \b Description: 
-*   Cleans up the PMKID cache.
-*   Called when SSID is being changed.
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsniation SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*/
-
-TI_STATUS rsn_resetPMKIDList(TI_HANDLE hRsn)
-{
-    rsn_t  *pRsn = (rsn_t*)hRsn;
-
-    if (!pRsn)
-        return TI_NOK;
-
-    return (pRsn->pAdmCtrl->resetPmkidList (pRsn->pAdmCtrl));
-}
-
-
-void rsn_debugFunc(TI_HANDLE hRsn)
-{
-    rsn_t *pRsn;
-
-    if (hRsn == NULL)
-    {
-        return;
-    }
-    pRsn = (rsn_t*)hRsn;
-
-    WLAN_OS_REPORT(("rsnStartedTs, ts = %d\n", pRsn->rsnStartedTs));
-    WLAN_OS_REPORT(("rsnCompletedTs, ts = %d\n", pRsn->rsnCompletedTs));  
-}
-
-
-/**
-*
-* rsn_startPreAuth - 
-*
-* \b Description: 
-*
-* Start pre-authentication on a list of given BSSIDs.
-*
-* \b ARGS:
-*
-*  I   - hRsn - Rsniation SM context  \n
-*  I/O - pBssidList - list of BSSIDs that require Pre-Auth \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS rsn_startPreAuth(TI_HANDLE hRsn, TBssidList4PreAuth *pBssidList)
-{
-    rsn_t       *pRsn;
-    TI_STATUS    status;
-
-    if ( (NULL == hRsn) || (NULL == pBssidList) )
-    {
-        return TI_NOK;
-    }
-
-    pRsn = (rsn_t*)hRsn;
-
-    status = pRsn->pAdmCtrl->startPreAuth (pRsn->pAdmCtrl, pBssidList);
-
-    TRACE0(pRsn->hReport, REPORT_SEVERITY_INFORMATION, "rsn_startPreAuth \n");
-
-    return status;
-}
-
-
-/**
- *
- * isSiteBanned - 
- *
- * \b Description: 
- *
- * Returns whether or not the site with the specified Bssid is banned or not. 
- *
- * \b ARGS:
- *
- *  I   - hRsn - RSN module context \n
- *  I   - siteBssid - The desired site's bssid \n
- *
- * \b RETURNS:
- *
- *  TI_NOK iff site is banned.
- *
- */
-TI_BOOL rsn_isSiteBanned(TI_HANDLE hRsn, TMacAddr siteBssid)
-{
-    rsn_t * pRsn = (rsn_t *) hRsn;
-    rsn_siteBanEntry_t * entry;
-
-    /* Check if site is in the list */
-    if ((entry = findBannedSiteAndCleanup(hRsn, siteBssid)) == NULL)
-    {
-        return TI_FALSE;
-    }
-
-    TRACE7(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": Site %02X-%02X-%02X-%02X-%02X-%02X found with ban level %d...\n", siteBssid[0], siteBssid[1], siteBssid[2], siteBssid[3], siteBssid[4], siteBssid[5], entry->banLevel);
-
-    return (entry->banLevel == RSN_SITE_BAN_LEVEL_FULL);
-}
-
-
-/**
- *
- * rsn_PortStatus_Set API implementation-
- *
- * \b Description:
- *
- * set the status port according to the status flag
- *
- * \b ARGS:
- *
- *  I   - hRsn - RSN module context \n
- *  I   - state - The status flag \n
- *
- * \b RETURNS:
- *
- *  TI_STATUS.
- *
- */
-TI_STATUS rsn_setPortStatus(TI_HANDLE hRsn, TI_BOOL state)
-{
-    rsn_t                   *pRsn = (rsn_t *)hRsn;
-    struct externalSec_t	*pExtSec;
-
-    pExtSec = pRsn->pMainSecSm->pExternalSec;
-    pExtSec->bPortStatus = state;
-    if (state)
-			pRsn->reportStatus( pRsn, TI_OK );
-    return externalSec_rsnComplete(pExtSec);
-}
-
-
-/**
- *
- * rsn_banSite - 
- *
- * \b Description: 
- *
- * Bans the specified site from being associated to for the specified duration.
- * If a ban level of WARNING is given and no previous ban was in effect the
- * warning is marked down but other than that nothing happens. In case a previous
- * warning (or ban of course) is still in effect
- *
- * \b ARGS:
- *
- *  I   - hRsn - RSN module context \n
- *  I   - siteBssid - The desired site's bssid \n
- *  I   - banLevel - The desired level of ban (Warning / Ban)
- *  I   - durationMs - The duration of ban in milliseconds
- *
- * \b RETURNS:
- *
- *  The level of ban (warning / banned).
- *
- */
-ERsnSiteBanLevel rsn_banSite(TI_HANDLE hRsn, TMacAddr siteBssid, ERsnSiteBanLevel banLevel, TI_UINT32 durationMs)
-{
-    rsn_t * pRsn = (rsn_t *) hRsn;
-    rsn_siteBanEntry_t * entry;
-
-    /* Try finding the site in the list */
-    if ((entry = findBannedSiteAndCleanup(hRsn, siteBssid)) != NULL)
-    {
-        /* Site found so a previous ban is still in effect */ 
-        TRACE6(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": Site %02X-%02X-%02X-%02X-%02X-%02X found and has been set to ban level full!\n", siteBssid[0], siteBssid[1], siteBssid[2], siteBssid[3], siteBssid[4], siteBssid[5]);
-
-        entry->banLevel = RSN_SITE_BAN_LEVEL_FULL;
-    }
-    else
-    {
-        /* Site doesn't appear in the list, so find a place to insert it */
-        TRACE7(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": Site %02X-%02X-%02X-%02X-%02X-%02X added with ban level %d!\n", siteBssid[0], siteBssid[1], siteBssid[2], siteBssid[3], siteBssid[4], siteBssid[5], banLevel);
-
-        entry = findEntryForInsert (hRsn);
-
-		MAC_COPY (entry->siteBssid, siteBssid);
-        entry->banLevel = banLevel;
-
-        pRsn->numOfBannedSites++;
-    }
-
-    entry->banStartedMs = os_timeStampMs (pRsn->hOs);
-    entry->banDurationMs = durationMs;
-
-    return entry->banLevel;
-}
-
-
-/**
- *
- * findEntryForInsert - 
- *
- * \b Description: 
- *
- * Returns a place to insert a new banned site. 
- *
- * \b ARGS:
- *
- *  I   - hRsn - RSN module context \n
- *
- * \b RETURNS:
- *
- *  A pointer to a suitable site entry.
- *
- */
-static rsn_siteBanEntry_t * findEntryForInsert(TI_HANDLE hRsn)
-{
-    rsn_t * pRsn = (rsn_t *) hRsn;
-
-    /* In the extreme case that the list is full we overwrite an old entry */
-    if (pRsn->numOfBannedSites == RSN_MAX_NUMBER_OF_BANNED_SITES)
-    {
-        TRACE0(pRsn->hReport, REPORT_SEVERITY_ERROR, ": No room left to insert new banned site, overwriting old one!\n");
-
-        return &(pRsn->bannedSites[0]);
-    }
-
-    return &(pRsn->bannedSites[pRsn->numOfBannedSites]);
-}
-
-
-/**
- *
- * findBannedSiteAndCleanup - 
- *
- * \b Description: 
- *
- * Searches the banned sites list for the desired site while cleaning up
- * expired sites found along the way.
- * 
- * Note that this function might change the structure of the banned sites 
- * list so old iterators into the list might be invalidated.
- *
- * \b ARGS:
- *
- *  I   - hRsn - RSN module context \n
- *  I   - siteBssid - The desired site's bssid \n
- *
- * \b RETURNS:
- *
- *  A pointer to the desired site's entry if found,
- *  NULL otherwise.
- *
- */
-static rsn_siteBanEntry_t * findBannedSiteAndCleanup(TI_HANDLE hRsn, TMacAddr siteBssid)
-{
-    rsn_t * pRsn = (rsn_t *) hRsn;
-    int iter;
-
-    for (iter = 0; iter < pRsn->numOfBannedSites; iter++)
-    {
-        /* If this entry has expired we'd like to clean it up */
-        if (os_timeStampMs(pRsn->hOs) - pRsn->bannedSites[iter].banStartedMs >= pRsn->bannedSites[iter].banDurationMs)
-        {
-            TRACE1(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": Found expired entry at index %d, cleaning it up...\n", iter);
-
-            /* Replace this entry with the last one */
-            pRsn->bannedSites[iter] = pRsn->bannedSites[pRsn->numOfBannedSites - 1];
-            pRsn->numOfBannedSites--;
-
-            /* we now repeat the iteration on this entry */
-            iter--;
-
-            continue;
-        }
-
-        /* Is this the entry for the site we're looking for? */
-        if (MAC_EQUAL (siteBssid, pRsn->bannedSites[iter].siteBssid))
-        {
-            TRACE7(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": Site %02X-%02X-%02X-%02X-%02X-%02X found at index %d!\n", siteBssid[0], siteBssid[1], siteBssid[2], siteBssid[3], siteBssid[4], siteBssid[5], iter);
-
-            return &pRsn->bannedSites[iter];
-        } 
-    }
-
-    /* Entry not found... */
-    TRACE6(pRsn->hReport, REPORT_SEVERITY_INFORMATION, ": Site %02X-%02X-%02X-%02X-%02X-%02X not found...\n", siteBssid[0], siteBssid[1], siteBssid[2], siteBssid[3], siteBssid[4], siteBssid[5]);
-
-    return NULL;
-}
-
-/**
- *
- * rsn_getPortStatus -
- *
- * \b Description:
- *
- * Returns the extrenalSec port status
- *
- * \b ARGS:
- *
- *  pRsn - pointer to RSN module context \n
- *
- * \b RETURNS:
- *
- *  TI_BOOL - the port status True = Open , False = Close
- *
- */
-TI_BOOL rsn_getPortStatus(rsn_t *pRsn)
-{
-    struct externalSec_t	*pExtSec;
-
-    pExtSec = pRsn->pMainSecSm->pExternalSec;
-    return pExtSec->bPortStatus;
-}
-
-/**
- *
- * rsn_getGenInfoElement -
- *
- * \b Description:
- *
- * Copies the Generic IE to a given buffer
- *
- * \b ARGS:
- *
- *  I     pRsn           - pointer to RSN module context \n
- *  O     out_buff       - pointer to the output buffer  \n
- *  O     out_buf_length - length of data copied into output buffer \n
- *
- * \b RETURNS:
- *
- *  TI_UINT8 - The amount of bytes copied.
- *
- */
-TI_STATUS rsn_getGenInfoElement(rsn_t *pRsn, TI_UINT8 *out_buff, TI_UINT32 *out_buf_length)
-{
-	if ( !(pRsn && out_buff && out_buf_length) ) {
-			return TI_NOK;
-	}
-
-	*out_buf_length = pRsn->genericIE.length;
-	if (pRsn->genericIE.length > 0) {
-			os_memoryCopy(pRsn->hOs, out_buff, pRsn->genericIE.data, pRsn->genericIE.length);
-	}
-
-	return TI_OK;
-}
-
-/**
- *
- * rsn_clearGenInfoElement -
- *
- * \b Description:
- *
- * Clears the Generic IE
- *
- * \b ARGS:
- *
- *  I     pRsn           - pointer to RSN module context \n
- *
- */
-void rsn_clearGenInfoElement(rsn_t *pRsn )
-{
-    os_memoryZero(pRsn->hOs, &pRsn->genericIE, sizeof(pRsn->genericIE));
-}
-
-
-#ifdef RSN_NOT_USED
-
-static TI_INT16 convertAscii2Unicode(TI_INT8* userPwd, TI_INT16 len)
-{
-    TI_INT16 i;
-    TI_INT8 unsiiPwd[MAX_PASSWD_LEN];
-    
-
-    for (i=0; i<len; i++)
-    {
-        unsiiPwd[i] = userPwd[i];
-    }
-    for (i=0; i<len; i++)
-    {
-        userPwd[i*2] = unsiiPwd[i];
-        userPwd[i*2+1] = 0;
-    }
-    return (TI_INT16)(len*2);     
-}
-
-#endif
-
-/***************************************************************************
-*							rsn_reAuth				                   *
-****************************************************************************
-* DESCRIPTION:	This is a callback function called by the whalWPA module whenever
-*				a broadcast TKIP key was configured to the FW.
-*				It does the following:
-*					-	resets the ReAuth flag
-*					-	stops the ReAuth timer
-*					-	restore the PS state
-*					-	Send RE_AUTH_COMPLETED event to the upper layer.
-*
-* INPUTS:		hRsn - the object
-*
-* OUTPUT:		None
-*
-* RETURNS:		None
-*
-***************************************************************************/
-void rsn_reAuth(TI_HANDLE hRsn)
-{
-	rsn_t *pRsn;
-
-	pRsn = (rsn_t*)hRsn;
-
-	if (pRsn == NULL)
-	{
-		return;
-	}
-
-	if (rxData_IsReAuthInProgress(pRsn->hRx))
-	{
-		rxData_SetReAuthInProgress(pRsn->hRx, TI_FALSE);
-		rxData_StopReAuthActiveTimer(pRsn->hRx);
-		rxData_ReauthDisablePriority(pRsn->hRx);
-		EvHandlerSendEvent(pRsn->hEvHandler, IPC_EVENT_RE_AUTH_COMPLETED, NULL, 0);
-	}
-}
diff --git a/wl1271/stad/src/Connection_Managment/rsn.h b/wl1271/stad/src/Connection_Managment/rsn.h
deleted file mode 100644
index 73d1174..0000000
--- a/wl1271/stad/src/Connection_Managment/rsn.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * rsn.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file assocSM.h
- *  \brief 802.11 Association SM
- *
- *  \see assocSM.c
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*      MODULE: assocSM.h                                                  */
-/*    PURPOSE:  802.11 Association SM                                      */
-/*                                                                         */
-/***************************************************************************/
-
-#ifndef _RSN_H
-#define _RSN_H
-
-#include "rsnApi.h"
-#include "paramOut.h"
-#include "siteHash.h"
-
-/* Constants */
-#define RSN_MAX_IDENTITY_LEN            64
-#define RSN_MAX_PASSWD_LEN              128
-
-#define RSN_MAX_NUMBER_OF_EVENTS        6
-#define RSN_MAX_NUMBER_OF_BANNED_SITES  16
-#define RSN_MIC_FAILURE_REPORT_TIMEOUT     500
-#define RSN_MIC_FAILURE_TIMEOUT         (60000 + RSN_MIC_FAILURE_REPORT_TIMEOUT)
-#define RSN_MAIN_KEYS_SESSION_TIMEOUT   RSN_AUTH_FAILURE_TIMEOUT 
-#define RSN_MIC_FAILURE_RE_KEY_TIMEOUT  3000
-
-/* Enumerations */
-typedef enum 
-{
-    MIC_FAILURE_FALSE,
-    MIC_FAILURE_TRUE,
-    MIC_FAILURE_BLOCK
-} rsn_micFailureStatus_e;
-
-typedef enum 
-{
-    GROUP_KEY_UPDATE_FALSE,
-    GROUP_KEY_UPDATE_TRUE
-} rsn_groupKeyUpdate_e;
-
-typedef enum 
-{
-	PAIRWISE_KEY_UPDATE_FALSE,
-	PAIRWISE_KEY_UPDATE_TRUE
-} rsn_pairwiseKeyUpdate_e;
-
-
-/* Typedefs */
-typedef struct _rsn_t   rsn_t;
-         
-typedef TI_STATUS (*rsn_eventCallback_t)(void* pCtx, void *pData);
-typedef TI_STATUS (*rsn_setPaeConfig_t)(rsn_t *pRsn, TRsnPaeConfig *pPaeConfig);
-typedef TI_STATUS (*rsn_getNetworkMode_t)(rsn_t *pRsn, ERsnNetworkMode *pNetMode);
-
-typedef TI_STATUS (*rsn_setKey_t)(rsn_t *pMainSec, TSecurityKeys *pKey);
-typedef TI_STATUS (*rsn_removeKey_t)(rsn_t *pMainSec, TSecurityKeys *pKey);
-typedef TI_STATUS (*rsn_setDefaultKeyId_t)(rsn_t *pMainSec, TI_UINT8 keyId);
-typedef TI_STATUS (*rsn_reportStatus_t)(rsn_t *pRsn, TI_STATUS rsnStatus);
-typedef TI_STATUS (*rsn_sendEapol_t)(rsn_t *pRsn, TI_UINT8 *pPacket, TI_UINT32 length);
-typedef TI_STATUS (*rsn_getSiteEntry_t)(rsn_t *pRsn, TMacAddr *macAddress, siteEntry_t *curSiteEntry);
-typedef TI_BOOL (*rsn_getPortStatus_t)(rsn_t *pRsn);
-typedef TI_STATUS (*rsn_setPortStatus_t)(TI_HANDLE hRsn, TI_BOOL state);
-
-typedef struct
-{
-    rsn_eventCallback_t     eventFunc;
-    void                    *pCtx;
-} rsn_eventStruct_t;
-
-typedef struct
-{
-    char                 id[RSN_MAX_IDENTITY_LEN];       /**< User identity string */
-    TI_UINT8             idLength;                       /**< User identity string length */
-    char                 password[RSN_MAX_PASSWD_LEN];   /**< User password string */
-    TI_UINT8             pwdLength;                      /**< User password string length */
-} authIdentity_t;
-
-typedef struct 
-{
-    ERsnSiteBanLevel        banLevel;
-    TI_UINT32               banStartedMs;
-    TI_UINT32               banDurationMs;
-    TMacAddr                siteBssid;
-} rsn_siteBanEntry_t;
-
-struct _rsn_t
-{
-    rsn_eventStruct_t      events[RSN_MAX_NUMBER_OF_EVENTS];
-    TRsnPaeConfig          paeConfig;
-    TI_BOOL                PrivacyOptionImplemented;
-    
-    TSecurityKeys          keys[MAX_KEYS_NUM];
-    TI_BOOL                keys_en [MAX_KEYS_NUM];
-    TI_UINT8               defaultKeyId;
-    TI_BOOL                defaultKeysOn;
-    TI_BOOL                wepDefaultKeys[MAX_KEYS_NUM];
-    TI_BOOL                wepStaticKey;
-    rsn_groupKeyUpdate_e   eGroupKeyUpdate;
-    rsn_pairwiseKeyUpdate_e	ePairwiseKeyUpdate;
-    OS_802_11_EAP_TYPES    eapType;
-
-	rsnGenericIE_t         genericIE;
-    rsn_siteBanEntry_t     bannedSites[RSN_MAX_NUMBER_OF_BANNED_SITES];
-    TI_UINT8               numOfBannedSites;
-
-    TI_HANDLE              hMicFailureReportWaitTimer;
-	TI_HANDLE			   hMicFailureGroupReKeyTimer;
-	TI_HANDLE              hMicFailurePairwiseReKeyTimer;
-    TI_BOOL                bPairwiseMicFailureFilter;
-
-    struct _admCtrl_t      *pAdmCtrl;
-    struct _mainSec_t      *pMainSecSm;
-
-    struct _keyParser_t    *pKeyParser;
-
-    TI_HANDLE              hTxCtrl;
-    TI_HANDLE              hRx;
-    TI_HANDLE              hConn;
-    TI_HANDLE              hCtrlData;
-    TI_HANDLE              hTWD;
-    TI_HANDLE              hSiteMgr;
-    TI_HANDLE              hReport;
-    TI_HANDLE              hOs;
-    TI_HANDLE              hXCCMngr;
-    TI_HANDLE              hEvHandler;
-    TI_HANDLE              hSmeSm;
-    TI_HANDLE              hAPConn;
-    TI_HANDLE              hMlme;
-    TI_HANDLE              hPowerMgr;
-    TI_HANDLE              hTimer;
-    TI_HANDLE              hCurrBss;
-    
-    rsn_setPaeConfig_t     setPaeConfig;
-    rsn_getNetworkMode_t   getNetworkMode;
-    rsn_setKey_t           setKey;
-    rsn_removeKey_t        removeKey;
-    rsn_setDefaultKeyId_t  setDefaultKeyId;
-    rsn_reportStatus_t     reportStatus;
-    rsn_setPortStatus_t    setPortStatus;
-    rsn_getPortStatus_t    getPortStatus;
-
-    TI_UINT32              rsnStartedTs;
-    TI_UINT32              rsnCompletedTs;
-    TI_BOOL                bRsnExternalMode;
-};
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS rsn_reportStatus(rsn_t *pRsn, TI_STATUS status);
-
-TI_STATUS rsn_setPaeConfig(rsn_t *pRsn, TRsnPaeConfig *pPaeConfig);
-
-TI_STATUS rsn_getNetworkMode(rsn_t *pRsn, ERsnNetworkMode *pNetMode);
-
-TI_STATUS rsn_setKey(rsn_t *pMainSec, TSecurityKeys *pKey);
-
-TI_STATUS rsn_removeKey(rsn_t *pMainSec, TSecurityKeys *pKey);
-
-TI_STATUS rsn_setDefaultKeyId(rsn_t *pMainSec, TI_UINT8 keyId);
-
-TI_STATUS rsn_setDefaultKeys(rsn_t *pHandle);
-
-TI_BOOL rsn_getPortStatus(rsn_t *pRsn);
-
-TI_STATUS rsn_setPortStatus(TI_HANDLE hRsn, TI_BOOL state);
-
-TI_STATUS rsn_getGenInfoElement(rsn_t *pRsn, TI_UINT8 *out_buff, TI_UINT32 *out_buf_length);
-
-void rsn_clearGenInfoElement(rsn_t *pRsn);
-
-#endif
-
diff --git a/wl1271/stad/src/Connection_Managment/rsnApi.h b/wl1271/stad/src/Connection_Managment/rsnApi.h
deleted file mode 100644
index 656d95d..0000000
--- a/wl1271/stad/src/Connection_Managment/rsnApi.h
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * rsnApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file utilsReplvl.h
- *  \brief Report level API
- *
- *  \see utilsReplvl.c
- */
-
-/***************************************************************************/
-/*                                                                                                  */
-/*    MODULE:   utilsReplvl.h                                                               */
-/*    PURPOSE:  Report level API                                            */
-/*                                                                                                  */
-/***************************************************************************/
-#ifndef __RSN_API_H__
-#define __RSN_API_H__
-
-#include "tidef.h"
-#include "TWDriver.h"
-#include "802_11Defs.h"
-#include "DrvMainModules.h"
-
-/* Constants */
-
-#define RSN_MAC_ADDR_LEN            6
-#define MAX_KEY_RSC_LEN             8
-#define MAX_SSN_KEY_DATA_LENGTH     32
-#define RSN_AUTH_FAILURE_TIMEOUT    30000
-#define MAX_NUM_OF_PRE_AUTH_BSSIDS  16
-#define MAX_KEYS_NUM                4
-
-
-/* Enumerations */
-
-
-
-/** RSN supported authentication suites */
-typedef enum
-{
-    RSN_AUTH_OPEN           = 0,        /*< Legacy Open authentication suite */
-    RSN_AUTH_SHARED_KEY     = 1,        /*< Legacy Shared Key authentication suite */
-    RSN_AUTH_AUTO_SWITCH    = 2,        /*< Automatic authentication suite */
-    RSN_AUTH_NONE           = 255       /*< no authentication suite */
-
-} EAuthSuite;
-
-
-/* Available External authentication modes for admission control */
-typedef enum
-{
-    RSN_EXT_AUTH_MODE_OPEN           =   RSN_AUTH_OPEN,
-    RSN_EXT_AUTH_MODE_SHARED_KEY     =   RSN_AUTH_SHARED_KEY,
-    RSN_EXT_AUTH_MODE_AUTO_SWITCH    =   RSN_AUTH_AUTO_SWITCH,
-    RSN_EXT_AUTH_MODE_WPA,
-    RSN_EXT_AUTH_MODE_WPAPSK,
-    RSN_EXT_AUTH_MODE_WPANONE,
-    RSN_EXT_AUTH_MODE_WPA2,
-    RSN_EXT_AUTH_MODE_WPA2PSK,
-    /* Not a real mode, defined as upper bound */
-    RSN_EXT_AUTH_MODEMAX          
-
-} EExternalAuthMode;
-
-
-typedef enum
-{
-    RSN_AUTH_STATUS_INVALID_TYPE                = 0x0001,
-    RSN_AUTH_STATUS_TIMEOUT                     = 0x0002,
-    RSN_AUTH_STATUS_CHALLENGE_FROM_AP_FAILED    = 0x0003,
-    RSN_AUTH_STATUS_CHALLENGE_TO_AP_FAILED      = 0x0004
-
-} EAuthStatus;
-
-
-/** RSN key management suites */
-typedef enum 
-{
-    RSN_KEY_MNG_NONE                = 0,        /**< no key management available */
-    RSN_KEY_MNG_802_1X              = 1,        /**< "802.1X" key management */
-    RSN_KEY_MNG_WPA                 = 2,        /**< "WPA 4 way handshake" key management */
-    RSN_KEY_MNG_XCC                 = 3,        /**< "XCC" key management */
-    RSN_KEY_MNG_UNKNOWN             = 255       /**< UNKNOWN key management available */
-
-} ERsnKeyMngSuite;
-
-
-/** Available cipher suites for admission control */
-typedef enum 
-{
-    RSN_IBSS                = 0,        /**< IBSS mode */
-    RSN_INFRASTRUCTURE      = 1         /**< Infrastructure mode */
-
-} ERsnNetworkMode;
-
-
-/** Port Access Entity role type */
-typedef enum
-{
-    RSN_PAE_AP      = 0,
-    RSN_PAE_SUPP    = 1
-
-} ERsnPaeRole;
-
-
-/** RSN Events */
-typedef enum 
-{
-    RSN_EVENT_EAPOL_RECV            = 0x0,      /**< EAPOL frame received in the RX */
-    RSN_EVENT_SEC_ATTACK_DETECT     = 0x1,      /**< Security Attack detection */
-    RSN_EVENT_RAW_KEY_RECV          = 0x2,      /**< Raw key recive */
-    RSN_EVENT_KEY_REMOVE            = 0x3       /**< Key remove event */
-
-} ERsnEvent;  
-
-
-/** Site ben levels */
-typedef enum 
-{
-    RSN_SITE_BAN_LEVEL_HALF = 1,
-    RSN_SITE_BAN_LEVEL_FULL = 2
-
-} ERsnSiteBanLevel;
-
-
-/* Typedefs */
-
-/** Port Access Entity structure */
-typedef struct
-{
-    EExternalAuthMode   authProtocol;
-    ERsnKeyMngSuite     keyExchangeProtocol;
-    ECipherSuite        unicastSuite;
-    ECipherSuite        broadcastSuite;
-
-} TRsnPaeConfig;
-
-
-typedef struct
-{
-    TI_BOOL             privacy;
-    TI_UINT8            *pIe;
-    TI_UINT8            ieLen;
-
-} TRsnData;
-
-
-typedef struct 
-{
-   TMacAddr             bssId;
-   dot11_RSN_t          *pRsnIEs;
-   TI_UINT8             rsnIeLen;
-
-} TBssidRsnInfo;
-
-
-typedef struct 
-{
-   TI_UINT8             NumOfItems;
-   TBssidRsnInfo        bssidList[MAX_NUM_OF_PRE_AUTH_BSSIDS];
-
-} TBssidList4PreAuth;
-
-
-typedef struct
-{
-    EAuthSuite          authSuite;
-    TI_BOOL             privacyOn;
-    TSecurityKeys       keys[MAX_KEYS_NUM];
-    TI_UINT8            defaultKeyId;
-    EExternalAuthMode   externalAuthMode;
-    TI_BOOL             mixedMode;
-    TI_BOOL             WPAMixedModeEnable;
-    TI_BOOL             preAuthSupport;
-    TI_UINT32           preAuthTimeout;
-    TI_BOOL             bRsnExternalMode;
-    TI_BOOL             bPairwiseMicFailureFilter;
-
-} TRsnInitParams;
-
-typedef struct
-{
-	ScanBssType_e 				bssType;
-	TMacAddr 	  				bssid;
-	Tdot11HtInformationUnparse  *pHTInfo;
-	Tdot11HtCapabilitiesUnparse *pHTCapabilities;
-} TRsnSiteParams;
-
-
-/* Prototypes */
-
-TI_HANDLE rsn_create(TI_HANDLE hOs);
-
-TI_STATUS rsn_unload(TI_HANDLE hRsn);
-
-void      rsn_init (TStadHandlesList *pStadHandles);
-
-TI_STATUS rsn_SetDefaults (TI_HANDLE hRsn, TRsnInitParams *pInitParam);
-
-TI_STATUS rsn_reconfig(TI_HANDLE hRsn);
-
-TI_STATUS rsn_start(TI_HANDLE hRsn);
-
-TI_STATUS rsn_stop(TI_HANDLE hRsn, TI_BOOL removeKeys);
-
-TI_STATUS rsn_eventRecv(TI_HANDLE hRsn, ERsnEvent event, void* pData);
-
-TI_STATUS rsn_setParam(TI_HANDLE hCtrlData, void *pParam);
-
-TI_STATUS rsn_getParamEncryptionStatus(TI_HANDLE hRsn, ECipherSuite *rsnStatus);
-TI_STATUS rsn_getParam(TI_HANDLE hCtrlData, void *pParam);
-
-TI_STATUS rsn_evalSite(TI_HANDLE hRsn, TRsnData *pRsnData, TRsnSiteParams *pRsnSiteParams, TI_UINT32 *pMetric);
-
-TI_STATUS rsn_setSite(TI_HANDLE hRsn, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen);
-
-TI_STATUS rsn_getInfoElement(TI_HANDLE hRsn, TI_UINT8 *pRsnIe, TI_UINT32 *pRsnIeLen);
-
-#ifdef XCC_MODULE_INCLUDED
-TI_STATUS rsn_getXCCExtendedInfoElement(TI_HANDLE hRsn, TI_UINT8 *pRsnIe, TI_UINT8 *pRsnIeLen);
-#endif
-
-TI_STATUS rsn_reportAuthFailure(TI_HANDLE hRsn, EAuthStatus authStatus);
-
-TI_STATUS rsn_reportMicFailure(TI_HANDLE hRsn, TI_UINT8 *pType, TI_UINT32 Length);
-
-TI_STATUS rsn_resetPMKIDList(TI_HANDLE hRsn);
-
-TI_STATUS rsn_removedDefKeys(TI_HANDLE hRsn);
-
-TI_STATUS rsn_startPreAuth(TI_HANDLE hRsn, TBssidList4PreAuth *pBssidList);
-
-ERsnSiteBanLevel rsn_banSite(TI_HANDLE hRsn, TMacAddr siteBssid, ERsnSiteBanLevel banLevel, TI_UINT32 durationMs);
-
-TI_BOOL rsn_isSiteBanned(TI_HANDLE hRsn, TMacAddr siteBssid);
-
-void rsn_MboxFlushFinishCb(TI_HANDLE handle, TI_UINT16 MboxStatus, char *InterrogateParamsBuf);
-
-TI_STATUS rsn_setPortStatus(TI_HANDLE hRsn, TI_BOOL state);
-
-void rsn_reAuth(TI_HANDLE hRsn);
-
-#endif /* __RSN_API_H__*/
diff --git a/wl1271/stad/src/Connection_Managment/sme.c b/wl1271/stad/src/Connection_Managment/sme.c
deleted file mode 100644
index 9e0d542..0000000
--- a/wl1271/stad/src/Connection_Managment/sme.c
+++ /dev/null
@@ -1,1000 +0,0 @@
-/*
- * sme.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  sme.c
- *  \brief SME implementation
- *
- *  \see   sme.h, smeSm.c smePrivate.h
- */
-
-
-#define __FILE_ID__  FILE_ID_41
-#include "smePrivate.h"
-#include "GenSM.h"
-#include "scanResultTable.h"
-#include "smeSm.h"
-#include "siteMgrApi.h"
-#include "regulatoryDomainApi.h"
-#include "connApi.h"
-
-
-/** 
- * \fn     sme_Create 
- * \brief  Creates the SME module. Allocates system resources
- * 
- * Creates the SME module. Allocates system resources
- * 
- * \param  hOS - handle to the OS adaptation layer
- * \return Handle to the SME object
- * \sa     sme_Init, sme_SetDefaults, sme_Destroy
- */ 
-TI_HANDLE sme_Create (TI_HANDLE hOS)
-{
-    TSme    *pSme;
-
-    /* allocate space for the SME object */
-    pSme = (TSme*)os_memoryAlloc (hOS, sizeof (TSme));
-    if (NULL == pSme)
-    {
-        WLAN_OS_REPORT (("sme_Create: unable to allocate memor yfor SME object. SME craetion failed\n"));
-        return NULL;
-    }
-
-    /*  nullify SME object */
-    os_memoryZero (hOS, (void*)pSme, sizeof (TSme));
-
-    /* store OS handle */
-    pSme->hOS = hOS;
-    
-    /* Create SME generic state-machine */
-    pSme->hSmeSm = genSM_Create (hOS);
-    if (NULL == pSme->hSmeSm)
-    {
-        WLAN_OS_REPORT (("sme_Create: unable to create SME generic SM. SME creation failed\n"));
-        sme_Destroy ((TI_HANDLE)pSme);
-        return NULL;
-    }
-
-    /* Create SME scan result table */
-    pSme->hSmeScanResultTable = scanResultTable_Create (hOS, SME_SCAN_TABLE_ENTRIES);
-    if (NULL == pSme->hSmeScanResultTable)
-    {
-        WLAN_OS_REPORT (("sme_Create: unable to create scan result table. SME creation failed\n"));
-        sme_Destroy ((TI_HANDLE)pSme);
-        return NULL;
-    }
-
-    return (TI_HANDLE)pSme;
-}
-
-/** 
- * \fn     sme_Init
- * \brief  Initializes the SME object. Store module handles
- * 
- * Initializes the SME object. Store module handles
- * 
- * \param  pStadHandles - pointer to the handles structure
- * \return None
- * \sa     sme_Create, sme_SetDefaults
- */ 
-void sme_Init (TStadHandlesList *pStadHandles)
-{
-    TSme        *pSme = pStadHandles->hSme;
-
-    /* Store object handles */
-    pSme->hReport       = pStadHandles->hReport;
-    pSme->hScanCncn     = pStadHandles->hScanCncn;
-    pSme->hApConn       = pStadHandles->hAPConnection;
-    pSme->hConn         = pStadHandles->hConn;
-    pSme->hScr          = pStadHandles->hSCR;
-    pSme->hRegDomain    = pStadHandles->hRegulatoryDomain;
-    pSme->hEvHandler    = pStadHandles->hEvHandler;
-    pSme->hSiteMgr      = pStadHandles->hSiteMgr;
-    pSme->hRsn          = pStadHandles->hRsn;
-    pSme->hDrvMain      = pStadHandles->hDrvMain;
-    pSme->hTwd          = pStadHandles->hTWD;
-
-
-    /* Initialize the scan result table object */
-    scanResultTable_Init (pSme->hSmeScanResultTable, pStadHandles, SCAN_RESULT_TABLE_CLEAR);
-
-    /* Initialize the SME state-machine object */
-    genSM_Init (pSme->hSmeSm, pStadHandles->hReport);
-}
-
-/** 
- * \fn     sme_SetDefaults
- * \brief  Set default values to the SME (and the SM and scan result table)
- * 
- * Set default values to the SME (and the SM and scan result table)
- * 
- * \param  hSme - handle to the SME object
- * \param  pInitParams - values read from registry / ini file
- * \return None
- * \sa     sme_Create, sme_Init
- */ 
-void sme_SetDefaults (TI_HANDLE hSme, TSmeModifiedInitParams *pModifiedInitParams, TSmeInitParams *pInitParams)
-{
-    TSme        *pSme = (TSme*)hSme;
-
-    /* copy init params */
-    os_memoryCopy (pSme->hOS, &(pSme->tInitParams), pInitParams, sizeof (TSmeInitParams));
-
-    /* initialize SME varaibles */   
-    pSme->bRadioOn = pModifiedInitParams->bRadioOn;
-    pSme->eConnectMode = pModifiedInitParams->eConnectMode;
-    if (CONNECT_MODE_AUTO == pSme->eConnectMode)
-    {
-        pSme->hScanResultTable = pSme->hSmeScanResultTable;
-    }
-    else if (CONNECT_MODE_MANUAL == pSme->eConnectMode) 
-    {
-        pSme->hScanResultTable = pSme->hScanCncnScanResulTable;
-    }
-
-    pSme->eBssType = pModifiedInitParams->eDesiredBssType;
-    MAC_COPY (pSme->tBssid, pModifiedInitParams->tDesiredBssid);
-
-    pSme->tSsid.len = pModifiedInitParams->tDesiredSsid.len;
-    if ( pSme->tSsid.len > MAX_SSID_LEN )
-    {
-        TRACE2( pSme->hReport, REPORT_SEVERITY_ERROR, "sme_SetDefaults. pSme->tSsid.len=%d exceeds the limit %d\n", pSme->tSsid.len, MAX_SSID_LEN);
-        pSme->tSsid.len = MAX_SSID_LEN;
-    }
-    os_memoryCopy (pSme->hOS, &(pSme->tSsid.str[ 0 ]), &(pModifiedInitParams->tDesiredSsid.str[ 0 ]), pSme->tSsid.len);
-    if (OS_802_11_SSID_JUNK (pSme->tSsid.str, pSme->tSsid.len))
-    {
-        pSme->eSsidType = SSID_TYPE_INVALID;
-        pSme->bConnectRequired = TI_FALSE;
-    }
-    else if (0 == pSme->tSsid.len)
-    {
-        pSme->eSsidType = SSID_TYPE_ANY;
-        pSme->bConnectRequired = TI_TRUE;
-    }
-    else
-    {
-        pSme->eSsidType = SSID_TYPE_SPECIFIC;
-        pSme->bConnectRequired = TI_TRUE;
-    }
-
-    pSme->eLastConnectMode = CONNECT_MODE_AUTO;
-    pSme->bAuthSent = TI_FALSE;
-    pSme->bReselect = TI_FALSE;
-    pSme->uScanCount = 0;
-    pSme->bRunning = TI_FALSE;
-
-    /* Initialize the SME state-machine */
-    genSM_SetDefaults (pSme->hSmeSm, SME_SM_NUMBER_OF_STATES, SME_SM_NUMBER_OF_EVENTS, (TGenSM_matrix)tSmMatrix,
-                       SME_SM_STATE_IDLE, "SME SM", uStateDescription, uEventDescription, __FILE_ID__);
-
-    /* register scan conecntrator CB */
-    scanCncn_RegisterScanResultCB (pSme->hScanCncn, SCAN_SCC_DRIVER, sme_ScanResultCB, hSme);
-}
-
-/** 
- * \fn      sme_setScanResultTable
- * \brief   Sets the scanResultTable pointer for the manual mode.
- * \param   hSme - handle to the SME object
- * \param   hScanResultTable - pointer to ScanResultTable
- * \return  none
- */
-void sme_SetScanResultTable(TI_HANDLE hSme, TI_HANDLE hScanResultTable)
-{
-    TSme        *pSme = (TSme*)hSme;
-
-    pSme->hScanCncnScanResulTable = hScanResultTable;
-    if (CONNECT_MODE_MANUAL == pSme->eConnectMode) 
-    {
-        pSme->hScanResultTable = pSme->hScanCncnScanResulTable;
-    }
-}
-
-/** 
- * \fn     sme_Destroy
- * \brief  Destroys the SME object. De-allocates system resources
- * 
- * Destroys the SME object. De-allocates system resources
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     sme_Create
- */ 
-void sme_Destroy (TI_HANDLE hSme)
-{
-    TSme        *pSme = (TSme*)hSme;
-
-    /* destroy the scan result table */
-    if (NULL != pSme->hSmeScanResultTable)
-    {
-        scanResultTable_Destroy (pSme->hSmeScanResultTable);
-    }
-
-    /* destroy the SME generic state machine */
-    if (NULL != pSme->hSmeSm)
-    {
-        genSM_Unload (pSme->hSmeSm);
-    }
-
-    /* free the SME object */
-    os_memoryFree (pSme->hOS, hSme, sizeof (TSme));
-}
-
-/** 
- * \fn     sme_Start
- * \brief  Starts SME operation
- * 
- * Starts SME operation. Send probe request templates and send a start event to the SM.
- * Only the DrvMain module could & is call that function !!!
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     sme_Stop
- */ 
-void sme_Start (TI_HANDLE hSme)
-{
-    TSme                *pSme = (TSme*)hSme;
-
-    TRACE1(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Start: called, bRadioOn = %d\n", pSme->bRadioOn);
-
-    pSme->bRunning = TI_TRUE;
-
-    /* 
-     * call setDefaultProbeReqTemplate at sme_Start() due to the fact in order to set prob req template 
-     * all moudules need to be set already 
-     */
-    setDefaultProbeReqTemplate (pSme->hSiteMgr);
-
-    /* if radio is on, start the SM */
-    if (TI_TRUE == pSme->bRadioOn)
-    {
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_START, hSme);
-    }
-}
-
-/** 
- * \fn     sme_Stop
- * \brief  Stops the driver (shuts-down the radio)
- * 
- * Stops the driver (shuts-down the radio)
- * 
- * \param  hSme - handle to the SME object
- * \param  pCBFunc - callback function to be called when stop operation is doen
- * \param  hCBHanlde - handle to supply to the callback function
- * \return None
- * \sa     sme_Start
- */ 
-void sme_Stop (TI_HANDLE hSme)
-{
-    TSme                *pSme = (TSme*)hSme;
-
-    TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Stop called\n");
-
-    pSme->bRunning = TI_FALSE;
-
-    /* mark that running flag is send a stop event to the SM */
-    sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_STOP, hSme);
-}
-
-/** 
- * \fn     sme_Restart
- * \brief  Called due to a paramter value change in site mgr. Triggers a disconnect.
- * 
- * Called due to a paramter value change in site mgr. Triggers a disconnect.
- * 
- * \param  hSme - handle to the SME object
- * \param  eReason - the reason for restarting the SME
- * \return None
- */ 
-void sme_Restart (TI_HANDLE hSme)
-{
-    TSme                *pSme = (TSme*)hSme;
-
-    TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Restart called.\n");
-
-    pSme->uScanCount = 0;
-
-    sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_DISCONNECT, hSme);
-}
-
-/** 
- * \fn     sme_SetParam
- * \brief  Set parameters values
- * 
- * Set parameters values
- * 
- * \note   Note is indicated here 
- * \param  hSme - handle to the SME object
- * \param  pParam - pointer to the param to set
- * \return PARAM_NOT_SUPPORTED for an unrecognized parameter, TI_OK if successfull.
- * \sa     sme_GetParam
- */ 
-TI_STATUS sme_SetParam (TI_HANDLE hSme, paramInfo_t *pParam)
-{
-    TSme                *pSme = (TSme*)hSme;
-
-    TRACE1(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_SetParam: param type is 0x%x\n", pParam->paramType);
-
-    switch (pParam->paramType)
-    {
-    case SME_RADIO_ON_PARAM:
-        /* if new value is different than current one */
-        if (pSme->bRadioOn != pParam->content.smeRadioOn)
-        {
-            /* set new radio on value and send an event to the state-machine accordingly */
-            pSme->bRadioOn = pParam->content.smeRadioOn;
-            if (TI_TRUE == pSme->bRadioOn)
-            {
-                if(TI_TRUE == pSme->bRunning)
-                {
-                    sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_START, hSme);
-                }
-            }
-            else
-            {
-                sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_STOP, hSme);
-            }
-        }
-        break;
-
-    case SME_DESIRED_SSID_PARAM:
-
-        if (pParam->content.smeDesiredSSID.len > MAX_SSID_LEN)
-        {
-            return PARAM_VALUE_NOT_VALID;   /* SSID length is out of range */
-        }
-
-        /* if new value is different than current one */
-        if ((pSme->tSsid.len != pParam->content.smeDesiredSSID.len) || 
-            (0 != os_memoryCompare (pSme->hOS, (TI_UINT8 *)&(pSme->tSsid.str[ 0 ]),
-                                    (TI_UINT8 *)&(pParam->content.smeDesiredSSID.str[ 0 ]), pSme->tSsid.len)))
-        {
-            /* set new desired SSID */
-            os_memoryCopy (pSme->hOS, &(pSme->tSsid.str[ 0 ]), &(pParam->content.smeDesiredSSID.str[ 0 ]), pParam->content.smeDesiredSSID.len);
-            pSme->tSsid.len = pParam->content.smeDesiredSSID.len;
-
-            pSme->uScanCount = 0;
-
-            /* now send a disconnect event */
-            sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_DISCONNECT, hSme);
-        }
-        break;
-
-    case SME_DESIRED_SSID_ACT_PARAM:
-
-        if (pParam->content.smeDesiredSSID.len > MAX_SSID_LEN)
-        {
-            return PARAM_VALUE_NOT_VALID;   /* SSID length is out of range */
-        }
-
-        pSme->bRadioOn = TI_TRUE;
-
-        /* if new value is different than current one */
-        if ((pSme->tSsid.len != pParam->content.smeDesiredSSID.len) || 
-            (0 != os_memoryCompare (pSme->hOS, (TI_UINT8 *)&(pSme->tSsid.str[ 0 ]),
-                                    (TI_UINT8 *)&(pParam->content.smeDesiredSSID.str[ 0 ]), pSme->tSsid.len)))
-        {
-            /* set new desired SSID */
-            os_memoryCopy (pSme->hOS, &(pSme->tSsid.str[ 0 ]), &(pParam->content.smeDesiredSSID.str[ 0 ]), pParam->content.smeDesiredSSID.len);
-            pSme->tSsid.len = pParam->content.smeDesiredSSID.len;
-        }
-        /* also set SSID type and connect required flag */
-        if (OS_802_11_SSID_JUNK (pSme->tSsid.str, pSme->tSsid.len))
-        {
-            pSme->eSsidType = SSID_TYPE_INVALID;
-            pSme->bConnectRequired = TI_FALSE;
-        }
-        else if (0 == pSme->tSsid.len)
-        {
-            pSme->eSsidType = SSID_TYPE_ANY;
-            pSme->bConnectRequired = TI_TRUE;
-        }
-        else
-        {
-            pSme->eSsidType = SSID_TYPE_SPECIFIC;
-            pSme->bConnectRequired = TI_TRUE;
-        }
-        pSme->uScanCount = 0;
-
-        /* if  junk SSID */
-        if(TI_FALSE == pSme->bConnectRequired)
-        {
-            pSme->bConstantScan = TI_FALSE;
-        }
-
-        /* now send a disconnect event */
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_DISCONNECT, hSme);
-        break;
-
-    case SME_DESIRED_BSSID_PARAM:
-        /* if new value is different than current one */
-        if (TI_FALSE == MAC_EQUAL (pSme->tBssid, pParam->content.smeDesiredBSSID))
-        {
-            /* set new BSSID */
-            MAC_COPY (pSme->tBssid, pParam->content.smeDesiredBSSID);
-            pSme->uScanCount = 0;
-            /* now send a disconnect event */
-            sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_DISCONNECT, hSme);
-        }
-        break;
-
-    case SME_CONNECTION_MODE_PARAM:
-        /* if new value is different than current one */
-        if (pSme->eConnectMode != pParam->content.smeConnectionMode)
-        {
-            /* set new connection mode */
-            pSme->eConnectMode = pParam->content.smeConnectionMode;
-            pSme->uScanCount = 0;
-            if (CONNECT_MODE_AUTO == pSme->eConnectMode)
-            {
-                pSme->hScanResultTable = pSme->hSmeScanResultTable;
-            }
-            else if (CONNECT_MODE_MANUAL == pSme->eConnectMode) 
-            {
-                pSme->hScanResultTable = pSme->hScanCncnScanResulTable;
-            }
-        /* now send a disconnect event */
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_DISCONNECT, hSme);
-        }
-        break;
-
-    case SME_DESIRED_BSS_TYPE_PARAM:
-        /* if new value is different than current one */
-        if (pSme->eBssType != pParam->content.smeDesiredBSSType)
-        {
-            /* set new BSS type */
-            pSme->eBssType = pParam->content.smeDesiredBSSType;
-            pSme->uScanCount = 0;
-            /* now send a disconnect event */
-            sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_DISCONNECT, hSme);
-        }
-        break;
-
-    case SME_WSC_PB_MODE_PARAM:
-
-        if (pParam->content.siteMgrWSCMode.WSCMode != TIWLN_SIMPLE_CONFIG_OFF)
-        {
-         pSme->bConstantScan = TI_TRUE;
-         pSme->uScanCount = 0;
-         /* now send a disconnect event */
-         sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_DISCONNECT, hSme);
-        }
-        else
-        {
-         pSme->bConstantScan = TI_FALSE;
-        }
-        break;
-
-    default:
-        TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_SetParam: unrecognized param type %d\n", pParam->paramType);
-        return PARAM_NOT_SUPPORTED;
-        /* break;*/
-    }
-
-    return TI_OK;
-}
-
-/**
- * \fn     sme_GetParam
- * \brief  Retrieves a parameter from the SME
- * 
- * Retrieves a parameter from the SME
- * 
- * \param  hSme - handle to the SME object
- * \param  pParam - pointer to the param to retrieve
- * \return PARAM_NOT_SUPPORTED for an unrecognized parameter, TI_OK if successfull.
- * \sa     sme_SetParam
- */ 
-TI_STATUS sme_GetParam (TI_HANDLE hSme, paramInfo_t *pParam)
-{
-    TSme                *pSme = (TSme*)hSme;
-
-    TRACE1(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_GetParam: param type is 0x%x\n", pParam->paramType);
-
-    switch (pParam->paramType)
-    {
-    case SME_RADIO_ON_PARAM:
-        pParam->content.smeRadioOn = pSme->bRadioOn;
-        break;
-
-    case SME_DESIRED_SSID_ACT_PARAM:
-        pParam->content.smeDesiredSSID.len = pSme->tSsid.len;
-        os_memoryCopy (pSme->hOS, &(pParam->content.smeDesiredSSID.str[ 0 ]), 
-                       &(pSme->tSsid.str[ 0 ]), pSme->tSsid.len);
-        break;
-
-    case SME_DESIRED_BSSID_PARAM:
-        MAC_COPY (pParam->content.smeDesiredBSSID, pSme->tBssid);
-        break;
-
-    case SME_CONNECTION_MODE_PARAM:
-        pParam->content.smeConnectionMode = pSme->eConnectMode;
-        break;
-
-    case SME_DESIRED_BSS_TYPE_PARAM:
-        pParam->content.smeDesiredBSSType = pSme->eBssType;
-        break;
-
-    case SME_CONNECTION_STATUS_PARAM:
-        switch (genSM_GetCurrentState (pSme->hSmeSm))
-        {
-        case SME_SM_STATE_IDLE:
-            pParam->content.smeSmConnectionStatus = eDot11RadioDisabled;
-            break;
-        case SME_SM_STATE_WAIT_CONNECT:
-            pParam->content.smeSmConnectionStatus = eDot11Disassociated;
-            break;
-        case SME_SM_STATE_SCANNING:
-            pParam->content.smeSmConnectionStatus = eDot11Scaning;
-            break;
-        case SME_SM_STATE_CONNECTING:
-            pParam->content.smeSmConnectionStatus = eDot11Connecting;
-            break;
-        case SME_SM_STATE_CONNECTED:
-            pParam->content.smeSmConnectionStatus = eDot11Associated;
-            break;
-        case SME_SM_STATE_DISCONNECTING:
-            pParam->content.smeSmConnectionStatus = eDot11Disassociated;
-            break;
-        }
-        break;
-
-    default:
-        TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_GetParam: unrecognized param type %d\n", pParam->paramType);
-        return PARAM_NOT_SUPPORTED;
-        /* break;*/
-    }
-
-    return TI_OK;
-}
-
-/** 
- * \fn     sme_ScanResultCB
- * \brief  Callback function from scan concentrator for results and scan complete indications
- * 
- * Callback function from scan concentrator for results and scan complete indications
- * 
- * \param  hSme - handle to the SME object
- * \param  eStatus - the reason for calling the CB  
- * \param  pFrameInfo - frame information (if the CB is called due to received frame)
- * \param  uSPSStatus - SPS attened channels (if the CB is called to inidcate an SPS scan complete)
- * \return None
- */ 
-void sme_ScanResultCB (TI_HANDLE hSme, EScanCncnResultStatus eStatus,
-                       TScanFrameInfo* pFrameInfo, TI_UINT16 uSPSStatus)
-{
-    TSme                *pSme = (TSme*)hSme;
-    paramInfo_t	        param;
-
-    switch (eStatus)
-    {
-    /* a frame was received - update the scan result table */
-    case SCAN_CRS_RECEIVED_FRAME:
-        TRACE6(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_ScanResultCB: received frame from BSSID %02x:%02x:%02x:%02x:%02x:%02x\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
-
-        /* 
-         * in auto mode in order to find country IE only !!!
-         * filter frames according to desired SSID, in case we are also trying to find 
-         * country IE in passive scan, to avoid a table overflow (in manual mode, the SME table must be equal to the app
-         * table, the app is responsible to decide which SSIDs to use for scan)
-         */
-        if (CONNECT_MODE_AUTO == pSme->eConnectMode)
-        {
-            if (SSID_TYPE_SPECIFIC == pSme->eSsidType)
-            {
-#ifndef XCC_MODULE_INCLUDED
-                if ((pSme->tSsid.len == pFrameInfo->parsedIEs->content.iePacket.pSsid->hdr[ 1 ]) &&
-                    (0 == os_memoryCompare (pSme->hOS, (TI_UINT8 *)&(pSme->tSsid.str[ 0 ]),
-                                            (TI_UINT8 *)&(pFrameInfo->parsedIEs->content.iePacket.pSsid->serviceSetId[ 0 ]),
-                                            pSme->tSsid.len)))
-#endif
-                {
-                    if (TI_OK != scanResultTable_UpdateEntry (pSme->hScanResultTable, pFrameInfo->bssId, pFrameInfo))
-                    {
-                        TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ScanResultCB: unable to update specific entry for BSSID %02x:%02x:%02x:%02x:%02x:%02x\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
-                    }
-                }
-            }
-            else
-            {
-                if (TI_OK != scanResultTable_UpdateEntry (pSme->hScanResultTable, pFrameInfo->bssId, pFrameInfo))
-                {
-                    TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ScanResultCB: unable to update entry for BSSID %02x:%02x:%02x:%02x:%02x:%02x because table is full\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
-                }
-            }
-        }
-        else
-        /* manual mode */
-        {
-            if (TI_OK != scanResultTable_UpdateEntry (pSme->hSmeScanResultTable, pFrameInfo->bssId, pFrameInfo))
-            {
-                TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ScanResultCB: unable to update application scan entry for BSSID %02x:%02x:%02x:%02x:%02x:%02x\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
-            }
-        }
-        break;
-
-    /* scan was completed successfully */
-    case SCAN_CRS_SCAN_COMPLETE_OK:
-    /* an error occured, try selecting a site anyway */
-    case SCAN_CRS_SCAN_ABORTED_FW_RESET:
-    case SCAN_CRS_SCAN_ABORTED_HIGHER_PRIORITY:
-    case SCAN_CRS_SCAN_FAILED:
-    case SCAN_CRS_TSF_ERROR:
-        TRACE1(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_ScanResultCB: received scan complete indication with status %d\n", eStatus);
-
-        /* stablizie the scan result table - delete its contenst if no results were recived during last scan */
-        scanResultTable_SetStableState (pSme->hScanResultTable);
-
-        if (CONNECT_MODE_AUTO == pSme->eConnectMode)
-        {
- 
-           /* try to select a site */
-           pSme->pCandidate = sme_Select (hSme);
-
-           /* if no matching site was found */
-           if (NULL == pSme->pCandidate)
-           {
-               /* for IBSS or any, if no entries where found, add the self site */
-               if (pSme->eBssType == BSS_INFRASTRUCTURE)
-               {
-                   TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_ScanResultCB: No candidate available, sending connect failure\n");
-
-                   sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-                   break;
-               }
-
-               {
-                   TI_UINT8     uDesiredChannel;
-
-                   param.paramType = SITE_MGR_DESIRED_CHANNEL_PARAM;
-                   siteMgr_getParam(pSme->hSiteMgr, &param);
-                   uDesiredChannel = param.content.siteMgrDesiredChannel;
-
-                   if (uDesiredChannel >= SITE_MGR_CHANNEL_A_MIN)
-                   {
-                       param.content.channelCapabilityReq.band = RADIO_BAND_5_0_GHZ;
-                   } 
-                   else 
-                   {
-                       param.content.channelCapabilityReq.band = RADIO_BAND_2_4_GHZ;
-                   }
-
-                   /*
-                   update the regulatory domain with the selected band
-                   */
-                   /* Check if the selected channel is valid according to regDomain */
-                   param.paramType = REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES;
-                   param.content.channelCapabilityReq.scanOption = ACTIVE_SCANNING;
-                   param.content.channelCapabilityReq.channelNum = uDesiredChannel;
-
-                   regulatoryDomain_getParam (pSme->hRegDomain,&param);
-                   if (!param.content.channelCapabilityRet.channelValidity)
-                   {
-                       TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "IBSS SELECT FAILURE  - No channel !!!\n\n");
-
-                       sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-
-                       break;
-                   }
-
-                   pSme->pCandidate = (TSiteEntry *)addSelfSite(pSme->hSiteMgr);
-
-                   if (pSme->pCandidate == NULL)
-                   {
-                       TRACE0(pSme->hReport, REPORT_SEVERITY_ERROR , "IBSS SELECT FAILURE  - could not open self site !!!\n\n");
-
-                       sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-
-                       break;
-                   }
-
-#ifdef REPORT_LOG    
-                   TRACE6(pSme->hReport, REPORT_SEVERITY_CONSOLE,"%%%%%%%%%%%%%%	SELF SELECT SUCCESS, bssid: %X-%X-%X-%X-%X-%X	%%%%%%%%%%%%%%\n\n", pSme->pCandidate->bssid[0], pSme->pCandidate->bssid[1], pSme->pCandidate->bssid[2], pSme->pCandidate->bssid[3], pSme->pCandidate->bssid[4], pSme->pCandidate->bssid[5]);
-                   WLAN_OS_REPORT (("%%%%%%%%%%%%%%	SELF SELECT SUCCESS, bssid: %02x.%02x.%02x.%02x.%02x.%02x %%%%%%%%%%%%%%\n\n", pSme->pCandidate->bssid[0], pSme->pCandidate->bssid[1], pSme->pCandidate->bssid[2], pSme->pCandidate->bssid[3], pSme->pCandidate->bssid[4], pSme->pCandidate->bssid[5]));
-#endif
-                }
-           }
-
-           /* a connection candidate is available, send a connect event */
-           sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT, hSme);
-        }
-        break;        
-
-    /*
-     * scan was stopped according to SME request (should happen when moving to disconnecting from scanning), send a 
-     * connect failure event to move out of disconnecting
-     */
-    case SCAN_CRS_SCAN_STOPPED:
-        TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_ScanResultCB: received scan stopped indication\n");
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-        break;
-
-    default:
-        TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ScanResultCB: received unrecognized status %d\n", eStatus);
-        break;
-    }
-}
-
-/** 
- * \fn     sme_MeansurementScanResult
- * \brief  Callback function from Meansurement for results
- * 
- * Callback function from Meansurement for results used for scans wehen the SME is in Meansurement.
- * 
- * \param  hSme - handle to the SME object
- * \param  pFrameInfo - frame information (if the CB is called due to received frame)
- * \return None
- */ 
-void sme_MeansurementScanResult (TI_HANDLE hSme, EScanCncnResultStatus eStatus, TScanFrameInfo* pFrameInfo)
-{
-    TSme                *pSme = (TSme*)hSme;
-
-    switch (eStatus)
-    {
-    /* a frame was received - update the scan result table */
-    case SCAN_CRS_RECEIVED_FRAME:
-        TRACE6(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_MeansurementScanResult: received frame from BSSID %02x:%02x:%02x:%02x:%02x:%02x\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
-    
-        if (TI_OK != scanResultTable_UpdateEntry (pSme->hSmeScanResultTable, pFrameInfo->bssId, pFrameInfo))
-        {
-            TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_MeansurementScanResult: unable to update entry for BSSID %02x:%02x:%02x:%02x:%02x:%02x because table is full\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
-        }
-        break;
-
-    /* scan was completed successfully */
-    case SCAN_CRS_SCAN_COMPLETE_OK:
-    /* an error occured, try selecting a site anyway */
-    case SCAN_CRS_SCAN_ABORTED_FW_RESET:
-    case SCAN_CRS_SCAN_STOPPED:
-    case SCAN_CRS_SCAN_ABORTED_HIGHER_PRIORITY:
-    case SCAN_CRS_SCAN_FAILED:
-    case SCAN_CRS_TSF_ERROR:
-        TRACE1(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_MeansurementScanResult: received scan complete indication with status %d\n", eStatus);
-
-        /* stablizie the scan result table - delete its contenst if no results were recived during last scan */
-        scanResultTable_SetStableState (pSme->hSmeScanResultTable);
-        break;
-
-    default:
-        TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_AppScanResult: received unrecognized status %d\n", eStatus);
-        break;
-    }
- 
-}
-
-
-/** 
- * \fn     Function declaration 
- * \brief  Function brief description goes here 
- * 
- * Function detailed description goes here 
- * 
- * \note   Note is indicated here 
- * \param  Parameter name - parameter description
- * \param  Â… 
- * \return Return code is detailed here 
- * \sa     Reference to other relevant functions 
- */
-void sme_ReportConnStatus (TI_HANDLE hSme, mgmtStatus_e eStatusType, TI_UINT32 uStatusCode)
-{
-    TSme                *pSme = (TSme*)hSme;
-
-    TRACE2(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_ReportConnStatus: statusType = %d, uStatusCode = %d\n", eStatusType, uStatusCode);
-
-    /* Act according to status */
-    switch (eStatusType)
-    {
-    /* connection was successful */
-    case STATUS_SUCCESSFUL:
-        pSme->bAuthSent = TI_TRUE;
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_SUCCESS, hSme);
-        break;
-
-    case STATUS_ASSOC_REJECT:
-    case STATUS_SECURITY_FAILURE:
-    case STATUS_AP_DEAUTHENTICATE:
-    case STATUS_AP_DISASSOCIATE:
-    case STATUS_ROAMING_TRIGGER:
-    case STATUS_AUTH_REJECT:
-        /* Indicate the authentication and/or association was sent to the AP */
-        pSme->bAuthSent = TI_TRUE;
-
-        /* keep the disassociation status and code, for sending event to user-mode */
-        pSme->tDisAssoc.eMgmtStatus = eStatusType;
-        pSme->tDisAssoc.uStatusCode = uStatusCode;
-
-        /* try to find the next connection candidate */
-        pSme->pCandidate = sme_Select (hSme);
-        /* if the next connection candidate exists */
-        if (NULL != pSme->pCandidate)
-        {
-            sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT, hSme);
-        }
-        else
-        {
-            sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-        }
-        break;
-
-        /* Note that in case of unspecified status we won't update the status. This is done since this function could be called twice */
-        /* for example: apConn called this function and than SME called conn_stop and this function is called again                   */
-        /* we use this status at SME, if != 0 means that assoc frame sent */
-    case STATUS_UNSPECIFIED:
-            pSme->bAuthSent = TI_TRUE;
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-        break;
-
-    default:
-        TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ReportConnStatus: unknown statusType = %d\n", eStatusType);
-        break;
-    }
-}
-
-/** 
- * \fn     sme_ReportApConnStatus
- * \brief  Used by AP connection (and Soft-gemini) modules to report connection status
- * 
- * Used by AP connection (and Soft-gemini) modules to report connection status
- * 
- * \param  hSme - handle to the SME object
- * \param  eStatusType - connection status
- * \param  uStatus code - extended status information (if available)
- * \return None
- * \sa     sme_ReportConnStatus
- */
-void sme_ReportApConnStatus (TI_HANDLE hSme, mgmtStatus_e eStatusType, TI_UINT32 uStatusCode)
-{
-    TSme                *pSme = (TSme*)hSme;
-
-    TRACE2(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_ReportApConnStatus: statusType = %d, uStatusCode = %d\n", eStatusType, uStatusCode);
-
-    /* Act according to status */
-    switch (eStatusType)
-    {
-
-    /* SG re-select */
-    case STATUS_SG_RESELECT:
-        pSme->bReselect = TI_TRUE;
-        pSme->bConnectRequired = TI_TRUE;
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-        break;
-
-    /* shouldn't happen (not from AP conn) */
-    case STATUS_SUCCESSFUL:
-        TRACE0(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ReportApConnStatus: received STATUS_SUCCESSFUL\n");
-        break;
-
-    case STATUS_UNSPECIFIED:
-    case STATUS_AUTH_REJECT:
-    case STATUS_ASSOC_REJECT:
-    case STATUS_SECURITY_FAILURE:
-    case STATUS_AP_DEAUTHENTICATE:
-    case STATUS_AP_DISASSOCIATE:
-    case STATUS_ROAMING_TRIGGER:
-       
-        /* keep the disassociation status and code, for sending event to user-mode */
-        pSme->tDisAssoc.eMgmtStatus = eStatusType;
-        pSme->tDisAssoc.uStatusCode = uStatusCode;
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-        break;
-
-    case STATUS_DISCONNECT_DURING_CONNECT:
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_DISCONNECT, hSme);
-        break;
-
-    default:
-        TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ReportApConnStatus: received unrecognized status: %d\n", eStatusType);
-
-    }
-}
-
-/** 
- * \fn     sme_ConnectScanReport
- * \brief  get the handler to the Scan Result Table used for connection to AP.
- * 
- * \param  hSme - handle to the SME object
- * \param  uStatus code - extended status information (if available)
- * \return None
- */
-void sme_ConnectScanReport (TI_HANDLE hSme, TI_HANDLE *hScanResultTable)
-{
-    TSme                *pSme = (TSme*)hSme;
-
-    *hScanResultTable = pSme->hScanResultTable;
-}
-
-/** 
- * \fn     sme_MeasureScanReport
- * \brief  get the handler to the Sme Scan Result Table.
- * 
- * \param  hSme - handle to the SME object
- * \param  uStatus code - extended status information (if available)
- * \return None
- */
-void sme_MeasureScanReport (TI_HANDLE hSme, TI_HANDLE *hScanResultTable)
-{
-    TSme                *pSme = (TSme*)hSme;
-
-    *hScanResultTable = pSme->hSmeScanResultTable;
-}
-
-
-/** 
- * \fn     SME_ConnectRequired
- * \brief  start connection sequence by set the flag ConnectRequired and issue DISCONNECT event.
- *         called by CommandDispatcher in OSE OS.
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     SME_Disconnect
- */
-void SME_ConnectRequired (TI_HANDLE hSme)
-{
-    TSme *pSme = (TSme*)hSme;
-
-    pSme->bRadioOn = TI_TRUE;
-    pSme->uScanCount = 0;
-    pSme->bConnectRequired = TI_TRUE;
-
-    /* now send a disconnect event */
-    sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_DISCONNECT, hSme);
-}
-
-/** 
- * \fn     SME_Disconnect
- * \brief  perform disconnect by clear the flag ConnectRequired and issue DISCONNECT event.
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     SME_ConnectRequired
- */
-void SME_Disconnect (TI_HANDLE hSme)
-{
-    TSme *pSme = (TSme*)hSme;
-
-    pSme->bConnectRequired = TI_FALSE;
-    /* turn off WSC PB mode */
-    pSme->bConstantScan = TI_FALSE;
-
-    /* now send a disconnect event */
-    sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_DISCONNECT, hSme);
-}
-
-void sme_SmEvent(TI_HANDLE hGenSm, TI_UINT32 uEvent, void* pData)
-{
-    TSme *pSme = (TSme*)pData;
-    TGenSM    *pGenSM = (TGenSM*)hGenSm;
-
-    TRACE2(pSme->hReport, REPORT_SEVERITY_INFORMATION, "sme_SmEvent: Current State = %d, sending event %d\n", (pGenSM->uCurrentState), (uEvent));
-    genSM_Event(pGenSM, uEvent, pData);
-}
diff --git a/wl1271/stad/src/Connection_Managment/sme.h b/wl1271/stad/src/Connection_Managment/sme.h
deleted file mode 100644
index 327ca92..0000000
--- a/wl1271/stad/src/Connection_Managment/sme.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * sme.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  sme.h
- *  \brief SME API declarations
- *
- *  \see   sme.c, smeSm.c, smePrivate.h
- */
-
-
-#ifndef __SME_H__
-#define __SME_H__
-
-#include "tidef.h"
-#include "DrvMainModules.h"
-#include "ScanCncn.h"
-#include "paramOut.h"
-
-#define SME_SCAN_TABLE_ENTRIES 32
-
-typedef enum
-{
-    SSID_TYPE_ANY = 0,
-    SSID_TYPE_SPECIFIC,
-    SSID_TYPE_INVALID
-} ESsidType;
-
-typedef enum
-{
-    SME_RESTART_REASON_EXTERNAL_PARAM_CHANGED = 0,
-    SME_RESTART_REASON_WSC_PB_MODE
-} ESmeRestartReason;
-
-typedef void (*TSmeSmCbFunc)(TI_HANDLE hCbHndl); 
-
-TI_HANDLE   sme_Create (TI_HANDLE hOS);
-void        sme_Init (TStadHandlesList *pStadHandles);
-void        sme_SetDefaults (TI_HANDLE hSme, TSmeModifiedInitParams *pModifiedInitParams, TSmeInitParams *pInitParams);
-void        sme_Destroy (TI_HANDLE hSme);
-void        sme_Start (TI_HANDLE hSme);
-void        sme_Stop (TI_HANDLE hSme);
-void        sme_Restart (TI_HANDLE hSme);
-void        sme_ScanResultCB (TI_HANDLE hSme, EScanCncnResultStatus eStatus,
-                              TScanFrameInfo* pFrameInfo, TI_UINT16 uSPSStatus);
-void        sme_MeansurementScanResult (TI_HANDLE hSme, EScanCncnResultStatus eStatus, TScanFrameInfo* pFrameInfo);
-void        sme_ReportConnStatus (TI_HANDLE hSme, mgmtStatus_e eStatusType, TI_UINT32 uStatusCode);
-void        sme_ReportApConnStatus (TI_HANDLE hSme, mgmtStatus_e eStatusType, TI_UINT32 uStatusCode);
-
-void        sme_ConnectScanReport (TI_HANDLE hSme, TI_HANDLE *hScanResultTable);
-void        sme_MeasureScanReport (TI_HANDLE hSme, TI_HANDLE *hScanResultTable);
-
-#endif /* __SME_H__ */
-
diff --git a/wl1271/stad/src/Connection_Managment/smeApi.h b/wl1271/stad/src/Connection_Managment/smeApi.h
deleted file mode 100644
index d22b6f7..0000000
--- a/wl1271/stad/src/Connection_Managment/smeApi.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * smeApi.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file smeMgr.h
- *  \brief SME interface
- *
- *  
- */
-
-/****************************************************************************/
-/*																			*/
-/*		MODULE:		smeApi.h												*/
-/*		PURPOSE:	SME interface to Other core modules						*/
-/*																			*/
-/****************************************************************************/
-#ifndef __SME_API_H__
-#define __SME_API_H__
-
-#include "tidef.h"
-#include "paramOut.h"
-#include "mlmeApi.h"
-#include "ScanCncn.h"
-
-/* Typedefs */
-typedef enum
-{
-	NO_MATCH = 0,
-	MATCH		= 1
-} match_e;
-
-/* Prototypes */
-
-TI_STATUS   sme_SetParam (TI_HANDLE hSme, paramInfo_t *pParam);
-TI_STATUS   sme_GetParam (TI_HANDLE hSme, paramInfo_t *pParam);
-void        SME_ConnectRequired (TI_HANDLE hSme);
-void        SME_Disconnect (TI_HANDLE hSme);
-void        sme_SetScanResultTable(TI_HANDLE hSme, TI_HANDLE hScanResultTable);
-#endif /* __SME_API_H__ */
diff --git a/wl1271/stad/src/Connection_Managment/smePrivate.h b/wl1271/stad/src/Connection_Managment/smePrivate.h
deleted file mode 100644
index a36973f..0000000
--- a/wl1271/stad/src/Connection_Managment/smePrivate.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * smePrivate.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  smePrivate.h
- *  \brief SME private declaratnions
- *
- *  \see   sme.c, sme.h, smeSm.c
- */
-
-
-#ifndef __SME_PRIVATE_H__
-#define __SME_PRIVATE_H__
-
-#include "tidef.h"
-#include "TWDriver.h"
-#include "sme.h"
-#include "scanResultTable.h"
-
-typedef struct
-{
-    mgmtStatus_e    eMgmtStatus;     /* Contains the last DisAssociation reason towards upper layer                  */
-    TI_UINT32       uStatusCode;     /* Extra information to the reason. i.e. packet status code or roaming trigger  */
-} TDisAssocReason;
-
-typedef struct
-{
-    /* Handles to other modules */
-    TI_HANDLE       hOS;
-    TI_HANDLE       hReport;
-    TI_HANDLE       hScanCncn;
-    TI_HANDLE       hApConn;
-    TI_HANDLE       hConn;
-    TI_HANDLE       hScr;
-    TI_HANDLE       hRegDomain;
-    TI_HANDLE       hEvHandler;
-    TI_HANDLE       hSiteMgr;
-    TI_HANDLE       hRsn;
-    TI_HANDLE       hScanResultTable;          /* Working table - points to one of the next two tables */
-    TI_HANDLE       hSmeScanResultTable;       /* Sme local table */
-    TI_HANDLE       hScanCncnScanResulTable;   /* Scan Cncn table - table used by the application */
-    TI_HANDLE       hSmeSm;
-    TI_HANDLE       hDrvMain;
-    TI_HANDLE       hTwd;
-
-    /* parameters */
-    TI_BOOL         bRadioOn;
-    EConnectMode    eConnectMode;
-    ScanBssType_e   eBssType;
-    TMacAddr        tBssid;
-    ESsidType       eSsidType;
-    TSsid           tSsid;
-
-    /* internal state-machine variables */
-    TI_BOOL         bConnectRequired;
-    TI_BOOL         bRunning;
-    EConnectMode    eLastConnectMode;
-    TI_BOOL         bAuthSent;
-    TI_UINT32       uScanCount;
-    TI_BOOL         bReselect;      /* for SG Avalanche */
-
-    TI_BOOL         bConstantScan;  /* scan constantly, for WSC PB mode */
-    TSiteEntry      *pCandidate;
-	TSiteEntry      tCandidate;     /* used to store the selected entry of sme_Select*/
-    TDisAssocReason tDisAssoc;
-
-    TSmeInitParams  tInitParams;
-    TPeriodicScanParams	tScanParams; /* temporary storage for scan command */
-
-} TSme;
-
-TSiteEntry *sme_Select (TI_HANDLE hSme);
-
-
-#endif /* __SME_PRIVATE_H__ */
diff --git a/wl1271/stad/src/Connection_Managment/smeSelect.c b/wl1271/stad/src/Connection_Managment/smeSelect.c
deleted file mode 100644
index 332d541..0000000
--- a/wl1271/stad/src/Connection_Managment/smeSelect.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * smeSelect.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  smeSelect.c
- *  \brief SME select function implementation
- *
- *  \see   smeSm.h, smeSm.c, sme.c, sme.h, smePrivate.h
- */
-
-
-#define __FILE_ID__  FILE_ID_42
-#include "smePrivate.h"
-#include "scanResultTable.h"
-#include "rsnApi.h"
-#include "siteMgrApi.h"
-#include "EvHandler.h"
-#include "GenSM.h"
-#include "smeSm.h"
-#include "tidef.h"
-
-static TI_BOOL sme_SelectSsidMatch (TI_HANDLE hSme, TSsid *pSiteSsid, TSsid *pDesiredSsid, 
-                                    ESsidType eDesiredSsidType);
-static TI_BOOL sme_SelectBssidMatch (TMacAddr *pSiteBssid, TMacAddr *pDesiredBssid);
-static TI_BOOL sme_SelectBssTypeMatch (ScanBssType_e eSiteBssType, ScanBssType_e eDesiredBssType);
-static TI_BOOL sme_SelectWscMatch (TI_HANDLE hSme, TSiteEntry *pCurrentSite, 
-                                   TI_BOOL *pbWscPbAbort, TI_BOOL *pbWscPbApFound);
-static TI_BOOL sme_SelectRsnMatch (TI_HANDLE hSme, TSiteEntry *pCurrentSite);
-
-/** 
- * \fn     sme_Select
- * \brief  Select a connection candidate from the scan result table
- * 
- * Select a connection candidate from the scan result table.
- * 
- * Connection candidate must match SSID, BSSID, BSS type, RSN and WSC settings, has the best
- * RSSI level from all matching sites, and connection was not attempted to it in this SME cycle
- * (since last scan was completed)
- * 
- * \param  hSme - handle to the SME object
- * \return A pointer to the selected site, NULL if no site macthes the selection criteria
- */ 
-TSiteEntry *sme_Select (TI_HANDLE hSme)
-{
-    TSme            *pSme = (TSme*)hSme;
-    TSiteEntry      *pCurrentSite, *pSelectedSite = NULL;
-    TI_INT8         iSelectedSiteRssi = -127; /* minimum RSSI */
-    TI_BOOL         bWscPbAbort, pWscPbApFound = TI_FALSE;
-    int             apFoundCtr =0;
-    TIWLN_SIMPLE_CONFIG_MODE eWscMode;
-
-    TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Select called\n");
-
-    /* on SG avalanche, select is not needed, send connect event automatically */
-    if (TI_TRUE == pSme->bReselect)
-    {
-        paramInfo_t *pParam;
-
-        TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Select: reselect flag is on, reselecting the current site\n");
-
-        pParam = (paramInfo_t *)os_memoryAlloc(pSme->hOS, sizeof(paramInfo_t));
-        if (!pParam)
-        {
-            return NULL;
-        }
-
-        pSme->bReselect = TI_FALSE;
-
-        /* Get Primary Site */
-        pParam->paramType = SITE_MGR_GET_PRIMARY_SITE;
-        siteMgr_getParam(pSme->hSiteMgr, pParam);
-        pCurrentSite = pParam->content.pPrimarySite;
-        os_memoryFree(pSme->hOS, pParam, sizeof(paramInfo_t));
-        return pCurrentSite;
-    }
-
-    /* get the first site from the scan result table */
-    pCurrentSite = scanResultTable_GetFirst (pSme->hScanResultTable);
-
-    /* check all sites */
-    while (NULL != pCurrentSite)
-    {
-        TRACE6(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Select: considering BSSID: %02x:%02x:%02x:%02x:%02x:%02x for selection\n", pCurrentSite->bssid[ 0 ], pCurrentSite->bssid[ 1 ], pCurrentSite->bssid[ 2 ], pCurrentSite->bssid[ 3 ], pCurrentSite->bssid[ 4 ], pCurrentSite->bssid[ 5 ]);
-
-        /* if this site was previously selected in the current SME connection attempt, and conn mode is auto */
-        if (TI_TRUE == pCurrentSite->bConsideredForSelect)
-        {
-            TRACE6(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Select: BSSID: %02x:%02x:%02x:%02x:%02x:%02x was selected previously\n", pCurrentSite->bssid[ 0 ], pCurrentSite->bssid[ 1 ], pCurrentSite->bssid[ 2 ], pCurrentSite->bssid[ 3 ], pCurrentSite->bssid[ 4 ], pCurrentSite->bssid[ 5 ]);
-            /* get the next site and continue the loop */
-            pCurrentSite = scanResultTable_GetNext (pSme->hScanResultTable);
-            continue;
-        }
-
-        /* check if site matches */
-        /* first check SSID match */
-        if (TI_FALSE == sme_SelectSsidMatch (hSme, &(pCurrentSite->ssid), &(pSme->tSsid), pSme->eSsidType))
-        /* site doesn't match */
-        {
-            TRACE6(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Select: BSSID: %02x:%02x:%02x:%02x:%02x:%02x doesn't match SSID\n", pCurrentSite->bssid[ 0 ], pCurrentSite->bssid[ 1 ], pCurrentSite->bssid[ 2 ], pCurrentSite->bssid[ 3 ], pCurrentSite->bssid[ 4 ], pCurrentSite->bssid[ 5 ]);
-            pCurrentSite->bConsideredForSelect = TI_TRUE; /* don't try this site again */
-            /* get the next site and continue the loop */
-            pCurrentSite = scanResultTable_GetNext (pSme->hScanResultTable);
-            continue;
-        }
-
-        /* Now check BSSID match */
-        if (TI_FALSE == sme_SelectBssidMatch (&(pCurrentSite->bssid), &(pSme->tBssid)))
-        /* site doesn't match */
-        {
-            TRACE6(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Select: BSSID: %02x:%02x:%02x:%02x:%02x:%02x doesn't match SSID\n", pCurrentSite->bssid[ 0 ], pCurrentSite->bssid[ 1 ], pCurrentSite->bssid[ 2 ], pCurrentSite->bssid[ 3 ], pCurrentSite->bssid[ 4 ], pCurrentSite->bssid[ 5 ]);
-            pCurrentSite->bConsideredForSelect = TI_TRUE; /* don't try this site again */
-            /* get the next site and continue the loop */
-            pCurrentSite = scanResultTable_GetNext (pSme->hScanResultTable);
-            continue;
-        }
-
-        /* and BSS type match */
-        if (TI_FALSE == sme_SelectBssTypeMatch (pCurrentSite->bssType, pSme->eBssType))
-        /* site doesn't match */
-        {
-            TRACE6(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Select: BSSID: %02x:%02x:%02x:%02x:%02x:%02x doesn't match BSS type\n", pCurrentSite->bssid[ 0 ], pCurrentSite->bssid[ 1 ], pCurrentSite->bssid[ 2 ], pCurrentSite->bssid[ 3 ], pCurrentSite->bssid[ 4 ], pCurrentSite->bssid[ 5 ]);
-            pCurrentSite->bConsideredForSelect = TI_TRUE; /* don't try this site again */
-            /* get the next site and continue the loop */
-            pCurrentSite = scanResultTable_GetNext (pSme->hScanResultTable);
-            continue;
-        }
-
-         if (pCurrentSite->WSCSiteMode == TIWLN_SIMPLE_CONFIG_PBC_METHOD)
-         {
-           apFoundCtr++;
-         }
-         if (apFoundCtr > 1)
-         {
-           pWscPbApFound = TI_TRUE;
-         }
-
-        /* and simple config match */
-        if (TI_FALSE == sme_SelectWscMatch (hSme, pCurrentSite, &bWscPbAbort, &pWscPbApFound))
-        /* site doesn't match */
-        {
-            /* also check if abort was indicated */
-            if (TI_TRUE == bWscPbAbort)
-            {
-                /* send event to user mode to indicate this */
-                EvHandlerSendEvent (pSme->hEvHandler, IPC_EVENT_WPS_SESSION_OVERLAP, NULL, 0);
-                /* select failed - will rescan in time */
-                return NULL;
-            }
-            TRACE6(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Select: BSSID: %02x:%02x:%02x:%02x:%02x:%02x doesn't match WSC\n", pCurrentSite->bssid[ 0 ], pCurrentSite->bssid[ 1 ], pCurrentSite->bssid[ 2 ], pCurrentSite->bssid[ 3 ], pCurrentSite->bssid[ 4 ], pCurrentSite->bssid[ 5 ]);
-            pCurrentSite->bConsideredForSelect = TI_TRUE; /* don't try this site again */
-            /* get the next site and continue the loop */
-            pCurrentSite = scanResultTable_GetNext (pSme->hScanResultTable);
-            continue;
-        }
-
-        /* and security match */
-        siteMgr_getParamWSC(pSme->hSiteMgr, &eWscMode); 
-
-        /* we don't need to check RSN match while WSC is active */
-        if ((pCurrentSite->WSCSiteMode == TIWLN_SIMPLE_CONFIG_OFF) || (pCurrentSite->WSCSiteMode != eWscMode))
-        {
-            if (TI_FALSE == sme_SelectRsnMatch (hSme, pCurrentSite))
-            /* site doesn't match */
-            {
-                TRACE6(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Select: BSSID: %02x:%02x:%02x:%02x:%02x:%02x doesn't match RSN\n", pCurrentSite->bssid[ 0 ], pCurrentSite->bssid[ 1 ], pCurrentSite->bssid[ 2 ], pCurrentSite->bssid[ 3 ], pCurrentSite->bssid[ 4 ], pCurrentSite->bssid[ 5 ]);
-                pCurrentSite->bConsideredForSelect = TI_TRUE; /* don't try this site again */
-                /* get the next site and continue the loop */
-                pCurrentSite = scanResultTable_GetNext (pSme->hScanResultTable);
-                continue;
-            }
-        }
-
-        /* and rate match */
-        if (TI_FALSE == siteMgr_SelectRateMatch (pSme->hSiteMgr, pCurrentSite))
-        /* site doesn't match */
-        {
-            TRACE6(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Select: BSSID: %02x:%02x:%02x:%02x:%02x:%02x doesn't match rates\n", pCurrentSite->bssid[ 0 ], pCurrentSite->bssid[ 1 ], pCurrentSite->bssid[ 2 ], pCurrentSite->bssid[ 3 ], pCurrentSite->bssid[ 4 ], pCurrentSite->bssid[ 5 ]);
-            pCurrentSite->bConsideredForSelect = TI_TRUE; /* don't try this site again */
-            /* get the next site and continue the loop */
-            pCurrentSite = scanResultTable_GetNext (pSme->hScanResultTable);
-            continue;
-        }
-
-        if (TI_TRUE == pCurrentSite->bChannelSwitchAnnoncIEFound)
-        {
-            TRACE6(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Select: BSSID: %02x:%02x:%02x:%02x:%02x:%02x has channel switch IE so ignore it \n", pCurrentSite->bssid[ 0 ], pCurrentSite->bssid[ 1 ], pCurrentSite->bssid[ 2 ], pCurrentSite->bssid[ 3 ], pCurrentSite->bssid[ 4 ], pCurrentSite->bssid[ 5 ]);
-            pCurrentSite->bConsideredForSelect = TI_TRUE; /* don't try this site again */
-            /* get the next site and continue the loop */
-            pCurrentSite = scanResultTable_GetNext (pSme->hScanResultTable);
-            continue;
-        }
-
-        /* if this site RSSI is higher than current maximum, select it */
-        if (pCurrentSite->rssi > iSelectedSiteRssi)
-        {
-            TRACE6(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Select: BSSID: %02x:%02x:%02x:%02x:%02x:%02x match and has highest RSSI so far!\n", pCurrentSite->bssid[ 0 ], pCurrentSite->bssid[ 1 ], pCurrentSite->bssid[ 2 ], pCurrentSite->bssid[ 3 ], pCurrentSite->bssid[ 4 ], pCurrentSite->bssid[ 5 ]);
-            pSelectedSite = pCurrentSite;
-            iSelectedSiteRssi = pCurrentSite->rssi;
-        }
-
-        /* and continue to the next site */
-        pCurrentSite = scanResultTable_GetNext (pSme->hScanResultTable);
-    }
-
-    /* if a matching site was found */
-    if (NULL != pSelectedSite)
-    {
-        /* mark that a connection to this site was (actually is) attempted */
-        pSelectedSite->bConsideredForSelect = TI_TRUE;
-
-        /* hope this is the correct place for siteMgr_changeBandParams */
-        siteMgr_changeBandParams (pSme->hSiteMgr, pSelectedSite->eBand);
-
-        /*
-         * Coordinate between SME module site table and Site module site Table 
-         * copy candidate AP to Site module site Table.
-         */
-        siteMgr_CopyToPrimarySite(pSme->hSiteMgr, pSelectedSite);
-
-		/* copy the result, rather than returning a pointer to the entry in the scan result table.
-		 * This is done since the table might change durring the connection process, and the pointer 
-		 * will point to the wrong entry in the table, causing connection/disconnection problems */
-		os_memoryCopy(pSme->hOS, &(pSme->tCandidate), pSelectedSite, sizeof(TSiteEntry));
-
-		return &(pSme->tCandidate);
-    }
-
-    /* return NULL if no site was selected */
-    return NULL;
-}
-
-/** 
- * \fn     sme_SelectSsidMatch
- * \brief  Check if a site SSID matches the desired SSID for selection
- * 
- * Check if a site SSID matches the desired SSID for selection
- * 
- * \param  hSme - handle to the SME object
- * \param  pSiteSsid - the site SSID
- * \param  pDesiredSsid - the desired SSID
- * \param  edesiredSsidType - the desired SSID type
- * \return TI_TRUE if SSIDs match, TI_FALSE if they don't
- * \sa     sme_Select
- */ 
-TI_BOOL sme_SelectSsidMatch (TI_HANDLE hSme, TSsid *pSiteSsid, TSsid *pDesiredSsid, 
-                             ESsidType eDesiredSsidType)
-{
-    TSme        *pSme = (TSme*)hSme;
-
-	/*If SSID length is 0 (hidden SSID)- Discard*/
-	if (pSiteSsid->len == 0)
-	{
-		return TI_FALSE;
-	}
-
-    /* if the desired SSID type is any, return TRUE (site matches) */
-    if (SSID_TYPE_ANY == eDesiredSsidType)
-    {
-        return TI_TRUE;
-    }
-    /* It looks like it never happens. Anyway decided to check */
-    if (( pSiteSsid->len > MAX_SSID_LEN ) ||
-        ( pDesiredSsid->len > MAX_SSID_LEN ))
-    {
-        TRACE3( pSme->hReport, REPORT_SEVERITY_ERROR,
-               "sme_SelectSsidMatch. pSme->tSsid.len=%d or pDesiredSsid->len =%d exceed the limit %d\n",
-                   pSiteSsid->len, pDesiredSsid->len, MAX_SSID_LEN);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return TI_FALSE;
-    }
-    /* otherwise, check if the SSIDs match */
-    if ((pSiteSsid->len == pDesiredSsid->len) && /* lngth match */
-        (0 == os_memoryCompare (pSme->hOS, (TI_UINT8 *)&(pSiteSsid->str[ 0 ]), (TI_UINT8 *)&(pDesiredSsid->str[ 0 ]), pSiteSsid->len))) /* content match */
-    {
-        return TI_TRUE;
-    }
-    else
-    {
-        return TI_FALSE;
-    }
-}
-
-/** 
- * \fn     sme_SelectBssidMatch
- * \brief  Check if a site BSSID matches the desired BSSID for selection
- * 
- * Check if a site BSSID matches the desired BSSID for selection
- * 
- * \param  pSiteBssid - the site BSSID
- * \param  pDesiredBssid - the desired BSSID
- * \return TI_TRUE if BSSIDs match, TI_FALSE if they don't
- * \sa     sme_Select
- */ 
-TI_BOOL sme_SelectBssidMatch (TMacAddr *pSiteBssid, TMacAddr *pDesiredBssid)
-{
-    /* check if the desired BSSID is broadcast (no need to match) */
-    if (TI_TRUE == MAC_BROADCAST (*pDesiredBssid))
-    {
-        return TI_TRUE;
-    }
-
-    /* if the desired BSSID is not any BSSID, check if the site BSSID equals the desired BSSID */
-    if (TI_TRUE == MAC_EQUAL (*pDesiredBssid, *pSiteBssid))
-    {
-        return TI_TRUE;
-    }
-
-    /* no match */
-    return TI_FALSE;
-}
-
-/** 
- * \fn     sme_SelectBssTypeMatch
- * \brief  Checks if the desired BSS type match the BSS type of a site
- * 
- * Checks if the desired BSS type match the BSS type of a site
- * 
- * \param  eSiteBssType - the site BSS type
- * \param  edesiredBssType - the desired BSS type
- * \return TI_TRUE if the BSS types matches, TI_FALSE if they don't
- * \sa     sme_Select
- */ 
-TI_BOOL sme_SelectBssTypeMatch (ScanBssType_e eSiteBssType, ScanBssType_e eDesiredBssType)
-{
-    /* if the desired type is any, there is a match */
-    if (BSS_ANY == eDesiredBssType)
-    {
-        return TI_TRUE;
-    }
-
-    /* if the BSS types equal, there is a match */
-    if (eDesiredBssType == eSiteBssType)
-    {
-        return TI_TRUE;
-    }
-
-    /* no match */
-    return TI_FALSE;
-}
-
-/** 
- * \fn     sme_SelectWscMatch
- * \brief  checks if the configred WSC mode equals the WSC mode of a site
- * 
- * checks if the configred WSC mode equals the WSC mode of a site
- * 
- * \param  hSme - handle to the SME object
- * \param  pCurrentSite - site to check
- * \return TI_TRUE if site macthes current WSC mode, TI_FALSE if it doesn't match 
- * \sa     sme_Select
- */ 
-TI_BOOL sme_SelectWscMatch (TI_HANDLE hSme, TSiteEntry *pCurrentSite, 
-                            TI_BOOL *pbWscPbAbort, TI_BOOL *pbWscPbApFound)
-{
-    TSme            *pSme = (TSme*)hSme;
-    TIWLN_SIMPLE_CONFIG_MODE  wscMode;
-
-    /* get the WSC mode from site mgr */
-    siteMgr_getParamWSC(pSme->hSiteMgr, &wscMode); /* SITE_MGR_SIMPLE_CONFIG_MODE - get the WSC mode from site mgr */
-
-    /* if simple config is off, site match */
-    if (TIWLN_SIMPLE_CONFIG_OFF == wscMode)
-    {
-        return TI_TRUE;
-    }
-
-    /* if WSC is supported, and more than one AP with PB configuration is found - indicate to abort */
-    if ((TI_TRUE == *pbWscPbApFound) && (TIWLN_SIMPLE_CONFIG_PBC_METHOD == pCurrentSite->WSCSiteMode))
-    {
-        TRACE1(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_SelectWscMatch: WSC mode is %d, and more than one AP with WSC PB found - aborting\n", wscMode);
-        *pbWscPbAbort = TI_TRUE;
-        return TI_FALSE;
-    }
-    else
-    {
-        /* indicate NOT to abort the select process */
-        *pbWscPbAbort = TI_FALSE;
-    }
-
-    /* if configured simple config mode equals site simple config mode, site match */
-    if (pCurrentSite->WSCSiteMode == wscMode)
-    {
-        return TI_TRUE;
-    }
-
-    /* site doesn't match */
-    return TI_FALSE;
-}
-
-/** 
- * \fn     sme_SelectRsnMatch
- * \brief  Checks if the configured scurity settings match those of a site
- * 
- * Checks if the configured scurity settings match those of a site
- * 
- * \param  hSme - handle to the SME object
- * \param  pCurrentSite - the site to check
- * \return TI_TRUE if site matches RSN settings, TI FALSE if it doesn't
- * \sa     sme_Select
- */ 
-TI_BOOL sme_SelectRsnMatch (TI_HANDLE hSme, TSiteEntry *pCurrentSite)
-{
-    TSme            *pSme = (TSme*)hSme;
-	TRsnData    	tRsnData;
-    dot11_RSN_t     *pRsnIe;
-    TI_UINT8        uRsnIECount=0;
-    TI_UINT8        uCurRsnData[255];
-    TI_UINT32       uLength = 0;
-    TI_UINT32       uMetric;
-	TRsnSiteParams  tRsnSiteParams;
-
-	tRsnSiteParams.bssType = pCurrentSite->bssType;
-	MAC_COPY(tRsnSiteParams.bssid, pCurrentSite->bssid);
-	tRsnSiteParams.pHTCapabilities = &pCurrentSite->tHtCapabilities;
-	tRsnSiteParams.pHTInfo = &pCurrentSite->tHtInformation;
-
-    /* copy all RSN IE's */
-    pRsnIe = pCurrentSite->pRsnIe;
-    while ((uLength < pCurrentSite->rsnIeLen) && (uRsnIECount < MAX_RSN_IE))
-    {
-        if (uLength + 2 + pRsnIe->hdr[ 1 ] > sizeof (uCurRsnData))
-        {
-           TRACE4( pSme->hReport, REPORT_SEVERITY_ERROR,
-                  "sme_SelectRsnMatch. uRsnIECount=%d, uLength=%d; required copy of %d bytes exceeds the buffer limit %d\n",
-                   uRsnIECount, uLength, pRsnIe->hdr[ 1 ] +2, sizeof (uCurRsnData));
-           handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-           return TI_FALSE;
-        }
-        uCurRsnData[ 0 + uLength ] = pRsnIe->hdr[ 0 ];
-        uCurRsnData[ 1 + uLength ] = pRsnIe->hdr[ 1 ];
-        os_memoryCopy (pSme->hOS, &uCurRsnData[ 2 + uLength ], pRsnIe->rsnIeData, pRsnIe->hdr[ 1 ]); 
-        uLength += pRsnIe->hdr[ 1 ] + 2;
-        pRsnIe += 1;
-        uRsnIECount++;
-    }
-    /* sanity check - make sure RSN IE's size is not too big */
-    if (uLength < pCurrentSite->rsnIeLen) 
-    {
-        TRACE2(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_SelectRsnMatch, RSN IE is too long: rsnIeLen=%d, MAX_RSN_IE=%d\n", pCurrentSite->rsnIeLen, MAX_RSN_IE);
-    }
-
-    /* call the RSN to evaluate the site */
-    tRsnData.pIe = (pCurrentSite->rsnIeLen == 0) ? NULL : uCurRsnData;
-    tRsnData.ieLen = pCurrentSite->rsnIeLen;
-    tRsnData.privacy = pCurrentSite->privacy;
-    if (rsn_evalSite (pSme->hRsn, &tRsnData, &tRsnSiteParams , &uMetric) != TI_OK)
-    {
-        /* no match */
-        return TI_FALSE;
-    }
-    else
-    {
-        /* match! */
-        return TI_TRUE;
-    }
-}
-
diff --git a/wl1271/stad/src/Connection_Managment/smeSm.c b/wl1271/stad/src/Connection_Managment/smeSm.c
deleted file mode 100644
index f582c7f..0000000
--- a/wl1271/stad/src/Connection_Managment/smeSm.c
+++ /dev/null
@@ -1,1007 +0,0 @@
-/*
- * smeSm.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  smeSm.c
- *  \brief SME state machine implementation
- *
- *  \see   smeSm.h, sme.c, sme.h
- */
-
-
-#define __FILE_ID__  FILE_ID_43
-#include "GenSM.h"
-#include "smeSm.h"
-#include "smePrivate.h"
-#include "connApi.h"
-#include "apConn.h"
-#include "ScanCncn.h"
-#include "scanResultTable.h"
-#include "EvHandler.h"
-#include "regulatoryDomainApi.h"
-#include "siteMgrApi.h"
-#include "DrvMain.h"
-
-
-static OS_802_11_DISASSOCIATE_REASON_E eDisassocConvertTable[ MGMT_STATUS_MAX_NUM +1] = 
-{
-    OS_DISASSOC_STATUS_UNSPECIFIED,
-    OS_DISASSOC_STATUS_UNSPECIFIED,
-    OS_DISASSOC_STATUS_AUTH_REJECT,
-    OS_DISASSOC_STATUS_ASSOC_REJECT,
-    OS_DISASSOC_STATUS_SECURITY_FAILURE,
-    OS_DISASSOC_STATUS_AP_DEAUTHENTICATE,
-    OS_DISASSOC_STATUS_AP_DISASSOCIATE,
-    OS_DISASSOC_STATUS_ROAMING_TRIGGER,
-    OS_DISASSOC_STATUS_UNSPECIFIED,
-    OS_DISASSOC_STATUS_UNSPECIFIED,
-    OS_DISASSOC_STATUS_UNSPECIFIED,
-    OS_DISASSOC_STATUS_UNSPECIFIED,
-    OS_DISASSOC_STATUS_UNSPECIFIED,
-    OS_DISASSOC_STATUS_UNSPECIFIED,
-    OS_DISASSOC_STATUS_UNSPECIFIED,
-    OS_DISASSOC_STATUS_UNSPECIFIED
-};
-
-#define SME_CONVERT_DISASSOC_CODES(disassocReason)     (eDisassocConvertTable[ (disassocReason) ]) 
-
-static void smeSm_Start (TI_HANDLE hSme);
-static void smeSm_Stop (TI_HANDLE hSme);
-static void smeSm_PreConnect (TI_HANDLE hSme);
-static void smeSm_Connect (TI_HANDLE hSme);
-static void smeSm_ConnectSuccess (TI_HANDLE hSme);
-static void smeSm_Disconnect (TI_HANDLE hSme);
-static void smeSm_DisconnectDone (TI_HANDLE hSme);
-static void smeSm_StopScan (TI_HANDLE hSme);
-static void smeSm_StopConnect (TI_HANDLE hSme);
-static void smeSm_ConnWhenConnecting (TI_HANDLE hSme);
-static void smeSm_ActionUnexpected (TI_HANDLE hSme);
-static void smeSm_NopAction (TI_HANDLE hSme);
-static void smeSm_CheckStartConditions (TI_HANDLE hSme);
-
-static TI_STATUS sme_StartScan (TI_HANDLE hSme);
-static void sme_updateScanCycles (TI_HANDLE hSme,
-                                  TI_BOOL bDEnabled,
-                                  TI_BOOL bCountryValid,
-                                  TI_BOOL bConstantScan);
-static void sme_CalculateCyclesNumber (TI_HANDLE hSme, TI_UINT32 uTotalTimeMs);
-
-TGenSM_actionCell tSmMatrix[ SME_SM_NUMBER_OF_STATES ][ SME_SM_NUMBER_OF_EVENTS ] = 
-    {
-        { /* SME_SM_STATE_IDLE */
-            { SME_SM_STATE_WAIT_CONNECT, smeSm_Start },             /* SME_SM_EVENT_START */
-            { SME_SM_STATE_IDLE, smeSm_ActionUnexpected },          /* SME_SM_EVENT_STOP */
-            { SME_SM_STATE_IDLE, smeSm_ActionUnexpected },          /* SME_SM_EVENT_CONNECT */
-            { SME_SM_STATE_IDLE, smeSm_ActionUnexpected },          /* SME_SM_EVENT_CONNECT_SUCCESS */
-            { SME_SM_STATE_IDLE, smeSm_ActionUnexpected },          /* SME_SM_EVENT_CONNECT_FAILURE */ 
-            { SME_SM_STATE_IDLE, smeSm_CheckStartConditions },          /* SME_SM_EVENT_DISCONNECT */
-        },
-        { /* SME_SM_STATE_WAIT_CONNECT */
-            { SME_SM_STATE_WAIT_CONNECT, smeSm_ActionUnexpected },  /* SME_SM_EVENT_START */
-            { SME_SM_STATE_IDLE, smeSm_Stop },                      /* SME_SM_EVENT_STOP */
-            { SME_SM_STATE_SCANNING, smeSm_PreConnect },            /* SME_SM_EVENT_CONNECT */
-            { SME_SM_STATE_WAIT_CONNECT, smeSm_ActionUnexpected },  /* SME_SM_EVENT_CONNECT_SUCCESS */
-            { SME_SM_STATE_WAIT_CONNECT, smeSm_ActionUnexpected },  /* SME_SM_EVENT_CONNECT_FAILURE */ 
-            { SME_SM_STATE_WAIT_CONNECT, smeSm_Start },             /* SME_SM_EVENT_DISCONNECT */
-        },
-        { /* SME_SM_STATE_SCANNING */
-            { SME_SM_STATE_SCANNING, smeSm_ActionUnexpected },      /* SME_SM_EVENT_START */
-            { SME_SM_STATE_DISCONNECTING, smeSm_StopScan },         /* SME_SM_EVENT_STOP */
-            { SME_SM_STATE_CONNECTING, smeSm_Connect },             /* SME_SM_EVENT_CONNECT */
-            { SME_SM_STATE_SCANNING, smeSm_ActionUnexpected },      /* SME_SM_EVENT_CONNECT_SUCCESS */
-            { SME_SM_STATE_WAIT_CONNECT, smeSm_DisconnectDone },    /* SME_SM_EVENT_CONNECT_FAILURE */ 
-            { SME_SM_STATE_DISCONNECTING, smeSm_StopScan },         /* SME_SM_EVENT_DISCONNECT */
-        },
-        { /* SME_SM_STATE_CONNECTING */
-            { SME_SM_STATE_CONNECTING, smeSm_ActionUnexpected },    /* SME_SM_EVENT_START */
-            { SME_SM_STATE_DISCONNECTING, smeSm_StopConnect },      /* SME_SM_EVENT_STOP */
-            { SME_SM_STATE_CONNECTING, smeSm_ConnWhenConnecting },  /* SME_SM_EVENT_CONNECT */
-            { SME_SM_STATE_CONNECTED, smeSm_ConnectSuccess },       /* SME_SM_EVENT_CONNECT_SUCCESS */
-            { SME_SM_STATE_WAIT_CONNECT, smeSm_DisconnectDone },    /* SME_SM_EVENT_CONNECT_FAILURE */ 
-            { SME_SM_STATE_DISCONNECTING, smeSm_StopConnect },      /* SME_SM_EVENT_DISCONNECT */
-        },
-        { /* SME_SM_STATE_CONNECTED */
-            { SME_SM_STATE_CONNECTED, smeSm_ActionUnexpected },     /* SME_SM_EVENT_START */
-            { SME_SM_STATE_DISCONNECTING, smeSm_Disconnect },       /* SME_SM_EVENT_STOP */
-            { SME_SM_STATE_CONNECTED, smeSm_ActionUnexpected },     /* SME_SM_EVENT_CONNECT */
-            { SME_SM_STATE_CONNECTED, smeSm_ActionUnexpected },     /* SME_SM_EVENT_CONNECT_SUCCESS */
-            { SME_SM_STATE_WAIT_CONNECT, smeSm_DisconnectDone },    /* SME_SM_EVENT_CONNECT_FAILURE */ 
-            { SME_SM_STATE_DISCONNECTING, smeSm_Disconnect },       /* SME_SM_EVENT_DISCONNECT */
-        },
-        { /* SME_SM_STATE_DISCONNECTING */
-            { SME_SM_STATE_DISCONNECTING, smeSm_ActionUnexpected }, /* SME_SM_EVENT_START */
-            { SME_SM_STATE_DISCONNECTING, smeSm_ActionUnexpected }, /* SME_SM_EVENT_STOP */
-            { SME_SM_STATE_DISCONNECTING, smeSm_ActionUnexpected }, /* SME_SM_EVENT_CONNECT */
-            { SME_SM_STATE_DISCONNECTING, smeSm_ActionUnexpected }, /* SME_SM_EVENT_CONNECT_SUCCESS */
-            { SME_SM_STATE_WAIT_CONNECT, smeSm_DisconnectDone },    /* SME_SM_EVENT_CONNECT_FAILURE */ 
-            { SME_SM_STATE_DISCONNECTING, smeSm_NopAction }, /* SME_SM_EVENT_DISCONNECT */
-        }
-    };
-
-TI_INT8*  uStateDescription[] = 
-    {
-        "IDLE",
-        "WAIT_CONNECT",
-        "SCANNING",
-        "CONNECTING",
-        "CONNECTED",
-        "DISCONNECTING"
-    };
-
-TI_INT8*  uEventDescription[] = 
-    {
-        "START",
-        "STOP",
-        "CONNECT",
-        "CONNECT_SUCCESS",
-        "CONNECT_FAILURE",
-        "DISCONNECT"
-    };
-
-/** 
- * \fn     smeSm_Start
- * \brief  Starts STA opeartion by moving SCR out of idle group and starting connection process
- * 
- * Starts STA opeartion by moving SCR out of idle group and starting connection process
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     smeSm_Stop, sme_start 
- */ 
-void smeSm_Start (TI_HANDLE hSme)
-{
-    TSme    *pSme = (TSme*)hSme;
-
-    /* set SCR group according to connection mode */
-    if (CONNECT_MODE_AUTO == pSme->eConnectMode)
-    {
-        TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "smeSm_Start: changing SCR group to DRV scan\n");
-        scr_setGroup (pSme->hScr, SCR_GID_DRV_SCAN);
-    }
-    else
-    {
-        TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "smeSm_Start: changing SCR group to APP scan\n");
-        scr_setGroup (pSme->hScr, SCR_GID_APP_SCAN);
-    }
-
-    if ((TI_FALSE == pSme->bRadioOn) || (TI_FALSE == pSme->bRunning)) 
-    {
-        /* Radio is off so send stop event */
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_STOP, hSme);
-    }
-    else if (TI_TRUE == pSme->bConnectRequired)
-    {
-        /* if connection was required, start the process */
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT, hSme);
-    }
-}
-
-/** 
- * \fn     smeSm_Stop
- * \brief  Turns off the STA
- * 
- * Turns off the STA by moving the SCr to idle
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     smeSm_Start, sme_Stop
- */ 
-void smeSm_Stop (TI_HANDLE hSme)
-{
-    TSme    *pSme = (TSme*)hSme;
-
-    /* set SCR group to idle */
-    scr_setGroup (pSme->hScr, SCR_GID_IDLE);
-
-    if (TI_FALSE == pSme->bRunning)
-    {
-        /* call DrvMain */
-        drvMain_SmeStop (pSme->hDrvMain);
-    }
-}
-
-/** 
- * \fn     smeSm_PreConnect
- * \brief  Initiates the connection process
- * 
- * Initiates the connection process - for automatic mode, start scan, for manual mode - triggers connection
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     smeSm_Connect, smeSm_ConnectSuccess
- */ 
-void smeSm_PreConnect (TI_HANDLE hSme)
-{
-    TSme *pSme = (TSme *)hSme;
-    paramInfo_t	*pParam;
-
-    /* set the connection mode with which this connection attempt is starting */
-    pSme->eLastConnectMode = pSme->eConnectMode;
- 
-    /* mark that no authentication/assocaition was yet sent */
-    pSme->bAuthSent = TI_FALSE;
-
-    /* try to find a connection candidate (manual mode have already performed scann */
-    pSme->pCandidate = sme_Select (hSme);
-    if (NULL != pSme->pCandidate)
-    {
-        /* candidate is available - attempt connection */
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT, hSme);
-    }
-    /* no candidate */
-    else
-    {
-        if (CONNECT_MODE_AUTO == pSme->eConnectMode)
-        {
-            /* automatic mode - start scanning */
-            if (TI_OK != sme_StartScan (hSme))
-            {
-                TRACE0(pSme->hReport, REPORT_SEVERITY_ERROR , "smeSm_PreConnect: unable to start scan, stopping the SME\n");
-                pSme->bRadioOn = TI_FALSE;
-                sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-            }
-
-            /* update scan count counter */
-            if(pSme->uScanCount < PERIODIC_SCAN_MAX_INTERVAL_NUM)
-            {
-                pSme->uScanCount++;
-            }
-
-        }
-        else		/* Manual mode */
-        {
-			/* for IBSS or any, if no entries where found, add the self site */
-			if (pSme->eBssType == BSS_INFRASTRUCTURE)
-            {
-                /* makr whether we need to stop the attempt connection in manual mode */
-                pSme->bConnectRequired = TI_FALSE;
-
-				TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "smeSm_PreConnect: No candidate available, sending connect failure\n");
-                /* manual mode and no connection candidate is available - connection failed */
-                sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-			}
-
-			else		/* IBSS */
-			{
-				TI_UINT8    uDesiredChannel;
-                TI_BOOL     channelValidity;
-
-		        pSme->bConnectRequired = TI_FALSE;
-
-                pParam = (paramInfo_t *)os_memoryAlloc(pSme->hOS, sizeof(paramInfo_t));
-                if (!pParam)
-                {
-                    return;
-                }
-
-				pParam->paramType = SITE_MGR_DESIRED_CHANNEL_PARAM;
-				siteMgr_getParam(pSme->hSiteMgr, pParam);
-				uDesiredChannel = pParam->content.siteMgrDesiredChannel;
-
-				if (uDesiredChannel >= SITE_MGR_CHANNEL_A_MIN)
-				{
-				   pParam->content.channelCapabilityReq.band = RADIO_BAND_5_0_GHZ;
-				}
-				else
-				{
-				   pParam->content.channelCapabilityReq.band = RADIO_BAND_2_4_GHZ;
-				}
-
-				/*
-				update the regulatory domain with the selected band
-				*/
-				/* Check if the selected channel is valid according to regDomain */
-				pParam->paramType = REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES;
-				pParam->content.channelCapabilityReq.scanOption = ACTIVE_SCANNING;
-				pParam->content.channelCapabilityReq.channelNum = uDesiredChannel;
-
-				regulatoryDomain_getParam (pSme->hRegDomain, pParam);
-                channelValidity = pParam->content.channelCapabilityRet.channelValidity;
-                os_memoryFree(pSme->hOS, pParam, sizeof(paramInfo_t));
-				if (!channelValidity)
-				{
-				   TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "IBSS SELECT FAILURE  - No channel !!!\n\n");
-
-				   sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-
-				   return;
-				}
-
-				pSme->pCandidate = (TSiteEntry *)addSelfSite(pSme->hSiteMgr);
-
-				if (pSme->pCandidate == NULL)
-				{
-				   TRACE0(pSme->hReport, REPORT_SEVERITY_ERROR , "IBSS SELECT FAILURE  - could not open self site !!!\n\n");
-
-				   sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-
-				   return;
-				}
-
-#ifdef REPORT_LOG
-				TRACE6(pSme->hReport, REPORT_SEVERITY_CONSOLE,"%%%%%%%%%%%%%%	SELF SELECT SUCCESS, bssid: %X-%X-%X-%X-%X-%X	%%%%%%%%%%%%%%\n\n", pSme->pCandidate->bssid[0], pSme->pCandidate->bssid[1], pSme->pCandidate->bssid[2], pSme->pCandidate->bssid[3], pSme->pCandidate->bssid[4], pSme->pCandidate->bssid[5]);
-                WLAN_OS_REPORT (("%%%%%%%%%%%%%%	SELF SELECT SUCCESS, bssid: %02x.%02x.%02x.%02x.%02x.%02x %%%%%%%%%%%%%%\n\n", pSme->pCandidate->bssid[0], pSme->pCandidate->bssid[1], pSme->pCandidate->bssid[2], pSme->pCandidate->bssid[3], pSme->pCandidate->bssid[4], pSme->pCandidate->bssid[5]));
-#endif
-				/* a connection candidate is available, send a connect event */
-				sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT, hSme);
-			}
-        }
-    }
-}
-
-/** 
- * \fn     smeSm_Connect
- * \brief  Starts a connection process with the selected network
- * 
- * Starts a connection process with the selected network
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     smeSm_PreConnect, smeSm_ConnectSuccess
- */ 
-void smeSm_Connect (TI_HANDLE hSme)
-{
-    TSme            *pSme = (TSme*)hSme;
-    TI_STATUS       tStatus;
-    paramInfo_t     *pParam;
-
-    /* Sanity check - if no connection candidate was found so far */
-    if (NULL == pSme->pCandidate)
-    {
-        TRACE0(pSme->hReport, REPORT_SEVERITY_ERROR , "smeSm_Connect: No candidate available, sending connect failure\n");
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
-    }
-    else
-    {
-        pParam = (paramInfo_t *)os_memoryAlloc(pSme->hOS, sizeof(paramInfo_t));
-        if (!pParam)
-        {
-            return;
-        }
-
-       /* set SCR group */
-       if (BSS_INFRASTRUCTURE == pSme->pCandidate->bssType)
-       {
-           scr_setGroup (pSme->hScr, SCR_GID_CONNECT);
-       }
-
-       /***************** Config Connection *************************/
-       pParam->paramType = CONN_TYPE_PARAM;	
-       if (BSS_INDEPENDENT == pSme->pCandidate->bssType)
-           if (SITE_SELF == pSme->pCandidate->siteType)
-           {
-               pParam->content.connType = CONNECTION_SELF;
-           }
-           else
-           {
-               pParam->content.connType = CONNECTION_IBSS;
-           }
-       else
-           pParam->content.connType = CONNECTION_INFRA;
-       conn_setParam(pSme->hConn, pParam);
-       os_memoryFree(pSme->hOS, pParam, sizeof(paramInfo_t));
-
-       /* start the connection process */
-       tStatus = conn_start (pSme->hConn, CONN_TYPE_FIRST_CONN, sme_ReportConnStatus, hSme, TI_FALSE, TI_FALSE);
-       if (TI_OK != tStatus)
-       {
-           TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "smeSm_Connect: conn_start returned status %d\n", tStatus);
-       }
-    }
-}
-
-/** 
- * \fn     smeSm_ConnectSuccess
- * \brief  Handles connection success indication
- * 
- * Handles connection success indication - starts AP conn and set SCR group to connected
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     smeSm_PreConnect, smeSm_Connect
- */ 
-void smeSm_ConnectSuccess (TI_HANDLE hSme)
-{
-    TSme        *pSme = (TSme*)hSme;
-
-    pSme->uScanCount = 0;
-
-    /* connection succedded to the connection candidate - start AP connection */
-    if (BSS_INFRASTRUCTURE == pSme->pCandidate->bssType)
-    {
-        /* Start the AP connection */
-        apConn_start (pSme->hApConn, 
-                      (pSme->tSsid.len != 0) && !OS_802_11_SSID_JUNK (pSme->tSsid.str, pSme->tSsid.len));
-    }
-
-    /* Set SCR group to connected */
-    scr_setGroup (pSme->hScr, SCR_GID_CONNECTED);
-}
-
-/** 
- * \fn     smeSm_Disconnect
- * \brief  Starts a disconnect by calling the AP connection or connect modules
- * 
- * Starts a disconnect by calling the AP connection or connect modules
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     smeSm_DisconnectDone
- */ 
-void smeSm_Disconnect (TI_HANDLE hSme)
-{
-    TSme        *pSme = (TSme*)hSme;
-    TI_STATUS   tStatus;
-
-    /* set the SCr group to connecting */
-    scr_setGroup (pSme->hScr, SCR_GID_CONNECT);
-
-    if (BSS_INFRASTRUCTURE == pSme->pCandidate->bssType)
-    {
-		 /* Call the AP connection to perform disconnect */
-		 tStatus = apConn_stop (pSme->hApConn, TI_TRUE);
-	}
-	else 
-	{
-	    /* In IBSS disconnect is done directly with the connection SM */ 
-		tStatus = conn_stop(pSme->hConn, DISCONNECT_DE_AUTH, STATUS_UNSPECIFIED,
-						   TI_TRUE, sme_ReportConnStatus, hSme);
-		if (tStatus != TI_OK)
-		{
-TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "smeSm_Disconnect: conn_stop retruned %d\n", tStatus);
-		}
-    }
-}
-
-/** 
- * \fn     smeSm_DisconnectDone
- * \brief  Finish a disconnect process
- * 
- * Finish a disconnect process by sending the appropriate event and restarting the state-machine
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     smeSm_Disconnect
- */ 
-void smeSm_DisconnectDone (TI_HANDLE hSme)
-{
-    TSme        *pSme = (TSme*)hSme;
-    OS_802_11_DISASSOCIATE_REASON_T	    tEventReason;
-
-    if (TI_FALSE == pSme->bReselect)
-    {
-        /* send an event notifying the disassocation */
-        if (TI_TRUE == pSme->bAuthSent)
-        {
-            tEventReason.eDisAssocType = SME_CONVERT_DISASSOC_CODES (pSme->tDisAssoc.eMgmtStatus);
-            tEventReason.uStatusCode = pSme->tDisAssoc.uStatusCode;
-            EvHandlerSendEvent (pSme->hEvHandler, IPC_EVENT_DISASSOCIATED, (TI_UINT8*)&tEventReason,
-                                sizeof(OS_802_11_DISASSOCIATE_REASON_T));
-        }
-        else if (CONNECT_MODE_AUTO != pSme->eLastConnectMode)
-        {
-            EvHandlerSendEvent (pSme->hEvHandler, IPC_EVENT_NOT_ASSOCIATED, NULL, 0);
-        }
-    }
-
-    siteMgr_disSelectSite (pSme->hSiteMgr);
-    
-    /* try to reconnect */
-    smeSm_Start (hSme);
-}
-
-/** 
- * \fn     smeSm_StopScan
- * \brief  Stops the SME scan operation
- * 
- * Stops the SME scan operation
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     smeSm_PreConnect, sme_StartScan
- */ 
-void smeSm_StopScan (TI_HANDLE hSme)
-{
-    TSme        *pSme = (TSme*)hSme;
-
-    scanCncn_StopPeriodicScan (pSme->hScanCncn, SCAN_SCC_DRIVER);
-}
-
-/** 
- * \fn     smeSm_StopConnect
- * \brief  Stops the connect module
- * 
- * Stops the connect module (if the SME is stopped during a connect attempt
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     smeSm_Connect
- */ 
-void smeSm_StopConnect (TI_HANDLE hSme)
-{
-    TSme        *pSme = (TSme*)hSme;
-    TI_STATUS   tStatus;
-
-    tStatus = conn_stop (pSme->hConn, DISCONNECT_DE_AUTH, STATUS_UNSPECIFIED,
-                         TI_TRUE, sme_ReportConnStatus, hSme);
-
-    if (TI_OK != tStatus)
-    {
-        TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "smeSm_StopConnect: conn_stop returned status %d\n", tStatus);
-    }
-}
-
-/** 
- * \fn     smeSm_ConnWhenConnecting 
- * \brief  Starts the connect process again
- * 
- * Starts the connect process again
- * 
- * \param  hSme - handle to the SME object
- * \return None
- * \sa     smeSm_Connect
- */ 
-void smeSm_ConnWhenConnecting (TI_HANDLE hSme)
-{
-    TSme        *pSme = (TSme*)hSme;
-    TI_STATUS   tStatus;
-
-    /* start the connection process */
-    tStatus = conn_start (pSme->hConn, CONN_TYPE_FIRST_CONN, sme_ReportConnStatus, hSme, TI_FALSE, TI_FALSE);
-    if (TI_OK != tStatus)
-    {
-        TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "smeSm_ConnWhenConnecting: conn_start returned status %d\n", tStatus);
-    }
-}
-
-/** 
- * \fn     smeSm_ActionUnexpected
- * \brief  Called when an unexpected event (for current state) is received
- * 
- * Called when an unexpected event (for current state) is received
- * 
- * \param  hSme - handle to the SME object
- * \return None
- */ 
-void smeSm_ActionUnexpected (TI_HANDLE hSme)
-{
-    TSme        *pSme = (TSme*)hSme;
-
-    TRACE0(pSme->hReport, REPORT_SEVERITY_ERROR , "smeSm_ActionUnexpected called\n");
-}
-
-/** 
- * \fn     smeSm_NopAction
- * \brief  Called when event call and don't need to do nothing.
- * 
- * \param  hSme - handle to the SME object
- * \return None
- */ 
-void smeSm_NopAction (TI_HANDLE hSme)
-{
-    TSme        *pSme = (TSme*)hSme;
-
-    TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "smeSm_NopAction called\n");
-}
-
-void smeSm_CheckStartConditions (TI_HANDLE hSme)
-{
-    TSme        *pSme = (TSme*)hSme;
-
-    if ((TI_TRUE == pSme->bRunning) && (TI_TRUE == pSme->bRadioOn))
-    {
-        /* send a start event */
-        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_START, hSme);
-    }
-}
-
-
-/* do we need to verify G only / A only / dual-band with site mgr? or rely on channels only? */
-
-/** 
- * \fn     sme_StartScan
- * \brief  Set scan parameters and calls scan concnetartor to start the scan operation.
- * 
- * Set scan parameters and calls scan concnetartor to start the scan operation.
- * 
- * Scan parameters are set according to scan target - find country IE, find desired SSID, or both
- * (one on each band). To find country IE we use passive scan forever, to find the desired SSID we
- * use active scan until the current country IE expires. In addition, we take into account the WSC PB
- * mode - scan constantly for two minutes (but under the country validity and expiry constraints)
- * 
- * \param  hSme - handle to the SME object
- * \return TI_OK if scan started successfully, TI_NOK otherwise
- * \sa     smeSm_PreConnect
- */ 
-TI_STATUS sme_StartScan (TI_HANDLE hSme)
-{
-    TSme            *pSme = (TSme*)hSme;
-    paramInfo_t     *pParam;
-    TI_BOOL         bDEnabled, bCountryValid;
-    TI_BOOL         bBandChannelExist[ RADIO_BAND_NUM_OF_BANDS ];
-    TI_BOOL         bBandCountryFound[ RADIO_BAND_NUM_OF_BANDS ];
-    TI_STATUS       tStatus;
-    TI_UINT32       uIndex;
-
-    /* get 802.11d enable state */
-    pParam = (paramInfo_t *)os_memoryAlloc(pSme->hOS, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    pParam->paramType = REGULATORY_DOMAIN_ENABLED_PARAM;
-    regulatoryDomain_getParam (pSme->hRegDomain, pParam);
-    bDEnabled = pParam->content.regulatoryDomainEnabled;
-
-    pParam->paramType = REGULATORY_DOMAIN_IS_COUNTRY_FOUND;
-    /* get country validity for all bands */
-    for (uIndex = 0; uIndex < RADIO_BAND_NUM_OF_BANDS; uIndex++)
-    {
-        pParam->content.eRadioBand = (ERadioBand)uIndex;
-        regulatoryDomain_getParam (pSme->hRegDomain, pParam);
-        bBandCountryFound[ uIndex ] = pParam->content.bIsCountryFound;
-        /* also nullify the channel exist indication for this band */
-        bBandChannelExist[ uIndex ] = TI_FALSE;
-    }
-    os_memoryFree(pSme->hOS, pParam, sizeof(paramInfo_t));
-
-    /* First fill the channels */
-    for (uIndex = 0; uIndex < pSme->tInitParams.uChannelNum; uIndex++)
-    {
-        /* for each channel, if country is found, set active scan */
-        pSme->tScanParams.tChannels[ uIndex ].eBand = pSme->tInitParams.tChannelList[ uIndex ].eBand;
-        pSme->tScanParams.tChannels[ uIndex ].uChannel = pSme->tInitParams.tChannelList[ uIndex ].uChannel;
-        pSme->tScanParams.tChannels[ uIndex ].uMaxDwellTimeMs = pSme->tInitParams.uMaxScanDuration;
-        pSme->tScanParams.tChannels[ uIndex ].uMinDwellTimeMs = pSme->tInitParams.uMinScanDuration;
-        pSme->tScanParams.tChannels[ uIndex ].uTxPowerLevelDbm = DEF_TX_POWER;
-
-        /* if 802.11d is disabled, or country is available for this band */
-        if ((TI_FALSE == bDEnabled) || 
-            (TI_TRUE == bBandCountryFound[ pSme->tInitParams.tChannelList[ uIndex ].eBand ]))
-        {
-            /* set active scan */
-            pSme->tScanParams.tChannels[ uIndex ].eScanType = SCAN_TYPE_NORMAL_ACTIVE;
-        }
-        /* 802.11d is enabled and no country available */
-        else
-        {
-            /* set passive scan */
-            pSme->tScanParams.tChannels[ uIndex ].eScanType = SCAN_TYPE_NORMAL_PASSIVE;
-
-            /* 
-             * in order to fined country set uMaxDwellTimeMs ( that at passive scan set the passiveScanDuration ) 
-             * to significant value 
-             */
-            pSme->tScanParams.tChannels[ uIndex ].uMaxDwellTimeMs = SCAN_CNCN_REGULATORY_DOMAIN_PASSIVE_DWELL_TIME_DEF;
-        }
-        /* mark that a channel exists for this band */
-        bBandChannelExist[ pSme->tInitParams.tChannelList[ uIndex ].eBand ] = TI_TRUE;
-    }
-    /* set number of channels */
-    pSme->tScanParams.uChannelNum = pSme->tInitParams.uChannelNum;
-
-    /* now, fill global parameters */
-    pSme->tScanParams.uProbeRequestNum = pSme->tInitParams.uProbeReqNum;
-    pSme->tScanParams.iRssiThreshold = pSme->tInitParams.iRssiThreshold;
-    pSme->tScanParams.iSnrThreshold = pSme->tInitParams.iSnrThreshold;
-    pSme->tScanParams.bTerminateOnReport = TI_TRUE;
-    pSme->tScanParams.uFrameCountReportThreshold = 1; 
-
-    /* 
-     * if for at least one band country is known and scan is performed on this band - means we need to 
-     * take into consideration country expiry, plus we are scanning for the desired SSID
-     */
-    bCountryValid = ((TI_TRUE == bBandChannelExist[ RADIO_BAND_2_4_GHZ ]) && (TI_TRUE == bBandCountryFound[ RADIO_BAND_2_4_GHZ ])) ||
-                    ((TI_TRUE == bBandChannelExist[ RADIO_BAND_5_0_GHZ ]) && (TI_TRUE == bBandCountryFound[ RADIO_BAND_5_0_GHZ ]));
-
-    /* set SSID(s) and BSS type according to 802.11d status, and country availability */
-    /* if 802.11d is disabled */
-    if (TI_FALSE == bDEnabled)
-    {
-        pSme->tScanParams.eBssType = pSme->eBssType;
-        /* set the deisred SSID, or any SSID if this is the desired SSID */
-        if (SSID_TYPE_ANY == pSme->eSsidType)
-        {
-            pSme->tScanParams.uSsidNum = 0;
-            pSme->tScanParams.uSsidListFilterEnabled = 1;
-        }
-        else
-        {
-            pSme->tScanParams.tDesiredSsid[ 0 ].eVisability = SCAN_SSID_VISABILITY_HIDDEN;
-            os_memoryCopy (pSme->hOS, &(pSme->tScanParams.tDesiredSsid[ 0 ].tSsid), &(pSme->tSsid), sizeof (TSsid));
-            pSme->tScanParams.uSsidNum = 1;
-            pSme->tScanParams.uSsidListFilterEnabled = 1;
-
-#ifdef XCC_MODULE_INCLUDED
-            pSme->tScanParams.uSsidListFilterEnabled = (TI_UINT8)TI_FALSE;
-            pSme->tScanParams.uSsidNum = 2;
-            pSme->tScanParams.tDesiredSsid[ 1 ].tSsid.len = 0;
-            pSme->tScanParams.tDesiredSsid[ 1 ].eVisability =  SCAN_SSID_VISABILITY_PUBLIC;
-#endif
-
-        }
-    }
-    /* Country code exists and scan is performed on this band - take country expiry timr into account */
-    else if (TI_TRUE == bCountryValid)
-    {
-        TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_StartScan: performing active scan to find desired SSID\n");
-
-        /* we already know that at least on one band we know the country IE, so we scan for our SSID */
-        pSme->tScanParams.tDesiredSsid[ 0 ].eVisability = SCAN_SSID_VISABILITY_HIDDEN;
-        os_memoryCopy (pSme->hOS, &(pSme->tScanParams.tDesiredSsid[ 0 ].tSsid), &(pSme->tSsid), sizeof (TSsid));
-        /* 
-         * if, in addition, we scan the other band to find its country, and the desired SSDI is not any SSID, 
-         * add an empty SSID
-         */
-        if ((SSID_TYPE_ANY != pSme->eSsidType) &&
-            (((TI_TRUE == bBandChannelExist[ RADIO_BAND_2_4_GHZ ]) && (TI_FALSE == bBandCountryFound[ RADIO_BAND_2_4_GHZ ])) ||
-             ((TI_TRUE == bBandChannelExist[ RADIO_BAND_5_0_GHZ ]) && (TI_FALSE == bBandCountryFound[ RADIO_BAND_5_0_GHZ ]))))
-        {
-            pSme->tScanParams.tDesiredSsid[ 1 ].eVisability = SCAN_SSID_VISABILITY_PUBLIC;
-            pSme->tScanParams.tDesiredSsid[ 1 ].tSsid.len = 0;
-            pSme->tScanParams.uSsidNum = 2;
-            pSme->tScanParams.uSsidListFilterEnabled = 1;
-            /* 
-             * since we are also looking for an AP with country IE (not include in IBSS), we need to make sure
-             * the desired BSS type include infrastructure BSSes.
-             */
-            if (BSS_INDEPENDENT == pSme->eBssType)
-            {
-                /* the desired is only IBSS - scan for any */
-                pSme->tScanParams.eBssType = BSS_ANY;
-            }
-            else
-            {
-                /* the desired is either infrastructure or any - use it */
-                pSme->tScanParams.eBssType = pSme->eBssType;
-            }
-        }
-        else
-        {
-            pSme->tScanParams.uSsidNum = 1;
-            pSme->tScanParams.uSsidListFilterEnabled = 1;
-            /* only looking for the desired SSID - set the desired BSS type */
-            pSme->tScanParams.eBssType = pSme->eBssType;
-        }
-    }
-    /* no scanned band has a counrty code - meaning all scan is passive (to find country) */
-    else
-    {
-        TRACE0(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_StartScan: performing passive scan to find country IE\n");
-        pSme->tScanParams.eBssType = BSS_INFRASTRUCTURE; /* only an AP would transmit a country IE */
-        pSme->tScanParams.uSsidNum = 0;
-        pSme->tScanParams.uSsidListFilterEnabled = 1;
-    }
-
-    /* update scan cycle number and scan intervals according to 802.11d status and country availability  */
-    sme_updateScanCycles (hSme, bDEnabled, bCountryValid, pSme->bConstantScan);
-
-    /* Finally(!!!), start the scan */
-    tStatus = scanCncn_StartPeriodicScan (pSme->hScanCncn, SCAN_SCC_DRIVER, &(pSme->tScanParams));
-    if (SCAN_CRS_SCAN_RUNNING != tStatus)
-    {
-        TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_StartScan: scan concentrator returned status %d\n", tStatus);
-        return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-/** 
- * \fn     sme_updateScanCycles
- * \brief  Updates the scan intervals and cycle number according to 802.11d status, country availability and WSC PB mode
- * 
- * Updates the scan intervals and cycle number according to 802.11d status, country availability and WSC PB mode.
- * Possible scenarios - D disabled - WSC PB off - scan forever with supplied intervals
- *                    - D enabled - country unknown - WSC PB off - scan forever with supplied intervals
- *                    - D disabled - WSC PB on - scan for two minutes with zero intervals
- *                    - D enabled - country unknown - WSC PB on - scan for two minutes with zero intervals
- *                    - D enabled - country known - WSC PB off - scan until country expiry with supplied intervals
- *                    - D enabled - country known - WSC PB on - scan for the minimu of two minutes and country expiry with zero intervals
- * 
- * \param  hSme - handle to the SME object
- * \param  bDEnabled - TRUE if 802.11d is enabled
- * \param  bCountryValid - TRUE if a country IE is valid for a band on which we scan
- * \param  bConstantScan - TRUE if WSC PB mode is on
- * \return None
- * \sa     sme_CalculateCyclesNumber, sme_StartScan
- */ 
-void sme_updateScanCycles (TI_HANDLE hSme,
-                           TI_BOOL bDEnabled,
-                           TI_BOOL bCountryValid,
-                           TI_BOOL bConstantScan)
-{
-    TSme            *pSme = (TSme*)hSme;
-    TI_UINT32       uIndex, uScanPeriodMs, uScanDurationMs;
-    paramInfo_t     *pParam;
-
-    /* 802.11d is disabled, or no country is valid */
-    if ((TI_FALSE == bDEnabled) || (TI_FALSE == bCountryValid))
-    {
-        /* WSC PB mode is disabled */
-        if (TI_FALSE == bConstantScan)
-        {
-            /* 
-             * copy intervals
-             * In order to avoid tight loop of scan-select or scan-select-connecting operation, 
-             * the prepare scan function takes into account the value of the scan_count when setting the 16 periods in the scan command
-             */
-            os_memoryCopy (pSme->hOS, &(pSme->tScanParams.uCycleIntervalMsec[ 0 ]),
-                           &(pSme->tInitParams.uScanIntervals[ pSme->uScanCount ]), sizeof (TI_UINT32) * (PERIODIC_SCAN_MAX_INTERVAL_NUM - pSme->uScanCount));
-
-            for(uIndex = (PERIODIC_SCAN_MAX_INTERVAL_NUM - pSme->uScanCount); uIndex < PERIODIC_SCAN_MAX_INTERVAL_NUM; uIndex++)
-            {
-                pSme->tScanParams.uCycleIntervalMsec[ uIndex ] = pSme->tInitParams.uScanIntervals[ PERIODIC_SCAN_MAX_INTERVAL_NUM - 1 ];
-            }
-
-            /* scan for default number (until a result is found) */
-            pSme->tScanParams.uCycleNum = pSme->tInitParams.uCycleNum;
-        }
-        /* WSC PB mode is enabled */
-        else
-        {
-
-            /* nullify all intervals */
-            os_memoryZero (pSme->hOS, &(pSme->tScanParams.uCycleIntervalMsec[ 0 ]),
-                           sizeof (TI_UINT32) * PERIODIC_SCAN_MAX_INTERVAL_NUM);
-
-            /* calculate the duration of one scan cycle */
-            uScanDurationMs = 0;
-            for (uIndex = 0; uIndex < pSme->tScanParams.uChannelNum; uIndex++)
-            {
-                uScanDurationMs += pSme->tScanParams.tChannels[ uIndex ].uMaxDwellTimeMs;
-            }
-
-            /* set the number of cycles - 2 minutes divided by one cycle duration */
-            pSme->tScanParams.uCycleNum = (120000 / uScanDurationMs) + 1;
-        }
-    }
-    /* 802.11d is enabled, and country is valid on at least one band */
-    else
-    {
-        pParam = (paramInfo_t *)os_memoryAlloc(pSme->hOS, sizeof(paramInfo_t));
-        if (!pParam)
-        {
-            return;
-        }
-
-        /* get country expiry time */
-        pParam->paramType = REGULATORY_DOMAIN_TIME_TO_COUNTRY_EXPIRY;
-        regulatoryDomain_getParam (pSme->hRegDomain, pParam);
-
-        /* WSC PB mode is disabled */
-        if (TI_FALSE == bConstantScan)
-        {
-            /* 
-             * copy intervals
-             * In order to avoid tight loop of scan-select or scan-select-connecting operation, 
-             * the prepare scan function takes into account the value of the scan_count when setting the 16 periods in the scan command
-             */
-            os_memoryCopy (pSme->hOS, &(pSme->tScanParams.uCycleIntervalMsec[ 0 ]),
-                           &(pSme->tInitParams.uScanIntervals[ pSme->uScanCount ]), sizeof (TI_UINT32) * (PERIODIC_SCAN_MAX_INTERVAL_NUM - pSme->uScanCount));
-
-            for(uIndex = (PERIODIC_SCAN_MAX_INTERVAL_NUM - pSme->uScanCount); uIndex < PERIODIC_SCAN_MAX_INTERVAL_NUM; uIndex++)
-            {
-                pSme->tScanParams.uCycleIntervalMsec[ uIndex ] = pSme->tInitParams.uScanIntervals[ PERIODIC_SCAN_MAX_INTERVAL_NUM - 1 ];
-            }
- 
-            /* set cycle number according to country expiry time */
-            sme_CalculateCyclesNumber (hSme, pParam->content.uTimeToCountryExpiryMs);
-        }
-        /* WSC PB mode is enabled */
-        else
-        {
-            /* turn off WSC PB mode (for next scan) */
-            pSme->bConstantScan = TI_FALSE;
-
-            /* set scan period to minimum of WSC PB duration (2 minutes) and country expiry time */
-            uScanPeriodMs = TI_MIN (120000, pParam->content.uTimeToCountryExpiryMs);
-
-            /* nullify all intervals */
-            os_memoryZero (pSme->hOS, &(pSme->tScanParams.uCycleIntervalMsec[ 0 ]),
-                           sizeof (TI_UINT32) * PERIODIC_SCAN_MAX_INTERVAL_NUM);
-
-            /* calculate the duration of one scan cycle */
-            uScanDurationMs = 0;
-            for (uIndex = 0; uIndex < pSme->tScanParams.uChannelNum; uIndex++)
-            {
-                uScanDurationMs += pSme->tScanParams.tChannels[ uIndex ].uMaxDwellTimeMs;
-            }
-
-            if (uScanDurationMs != 0)
-            {
-                /* set the number of cycles - scan period divided by one cycle duration */
-                pSme->tScanParams.uCycleNum = (uScanPeriodMs / uScanDurationMs) + 1;
-            }
-            else
-            {
-                pSme->tScanParams.uCycleNum = pSme->tInitParams.uCycleNum;
-            }
-        }
-        os_memoryFree(pSme->hOS, pParam, sizeof(paramInfo_t));
-    }
-
-    /* in case independent mode and to avoid supplicant send disconnect event after 60s */
-    if (pSme->eBssType != BSS_INFRASTRUCTURE)
-    {
-        pSme->tScanParams.uCycleNum = 1;
-    }
-}
-
-/** 
- * \fn     sme_CalculateCyclesNumber
- * \brief  Calculates the cycle number required for a gicen time, according to scan intervals
- * 
- * Calculates the cycle number required for a gicen time, according to scan intervals. First check the 16
- * different intervals, and if more time is available, find how many cycles still fit. Write the result
- * to the SME scan command
- * 
- * \param  hSme - handle to the SME object
- * \param  uToTalTimeMs - the total periodic scan operation duartion
- * \return None
- * \sa     sme_updateScanCycles, sme_StartScan
- */ 
-void sme_CalculateCyclesNumber (TI_HANDLE hSme, TI_UINT32 uTotalTimeMs)
-{
-    TSme            *pSme = (TSme*)hSme;
-    TI_UINT32       uIndex, uCurrentTimeMs = 0;
-
-    /* 
-     * the total time should exceed country code expiration by one interval (so that next scan wouldn't
-     * have a valid country code)
-     */
-
-    /* nullify cycle number */
-    pSme->tScanParams.uCycleNum = 0;
-    /* now find how many cycles fit within this time. First, check if all first 16 configured intervals fit */
-    for (uIndex = 0; 
-         (uIndex < PERIODIC_SCAN_MAX_INTERVAL_NUM) && (uCurrentTimeMs < uTotalTimeMs);
-         uIndex++)
-    {
-        pSme->tScanParams.uCycleNum++;
-        uCurrentTimeMs += pSme->tScanParams.uCycleIntervalMsec[ uIndex ];
-    }
-    /* now find out how many more cycles with the last interval still fits */
-    if (uCurrentTimeMs < uTotalTimeMs)
-    {
-        /* 
-         * divide the reamining time (time until expiry minus the total time calculated so far)
-         * by the last interval time, to get how many more scans would fit after the first 16 intervals
-         */
-        pSme->tScanParams.uCycleNum += (uTotalTimeMs - uCurrentTimeMs) / 
-                                            pSme->tScanParams.uCycleIntervalMsec[ PERIODIC_SCAN_MAX_INTERVAL_NUM - 1];
-        /* and add one, to compensate for the reminder */
-        pSme->tScanParams.uCycleNum++;
-    }
-}
-
diff --git a/wl1271/stad/src/Connection_Managment/smeSm.h b/wl1271/stad/src/Connection_Managment/smeSm.h
deleted file mode 100644
index 8ab0a16..0000000
--- a/wl1271/stad/src/Connection_Managment/smeSm.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * smeSm.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file   smeSm.h
- *  \brief SME SM internal header file
- *
- *  \see smeSm.c
- */
-
-#ifndef __SME_SM_H__
-#define __SME_SM_H__
-
-#include "GenSM.h"
-
-void sme_SmEvent(TI_HANDLE hGenSm, TI_UINT32 uEvent, void* pData);
-
-typedef enum
-{
-    SME_SM_STATE_IDLE = 0,
-    SME_SM_STATE_WAIT_CONNECT,
-    SME_SM_STATE_SCANNING,
-    SME_SM_STATE_CONNECTING,
-    SME_SM_STATE_CONNECTED,
-    SME_SM_STATE_DISCONNECTING,
-    SME_SM_NUMBER_OF_STATES
-} ESmeSmStates;
-
-typedef enum
-{
-    SME_SM_EVENT_START = 0,
-    SME_SM_EVENT_STOP,
-    SME_SM_EVENT_CONNECT,
-    SME_SM_EVENT_CONNECT_SUCCESS,
-    SME_SM_EVENT_CONNECT_FAILURE,
-    SME_SM_EVENT_DISCONNECT,
-    SME_SM_NUMBER_OF_EVENTS
-} ESmeSmEvents;
-
-extern TGenSM_actionCell tSmMatrix[ SME_SM_NUMBER_OF_STATES ][ SME_SM_NUMBER_OF_EVENTS ];
-extern TI_INT8*  uStateDescription[];
-extern TI_INT8*  uEventDescription[];
-
-#endif /* __SME_SM_H__ */
-
-
diff --git a/wl1271/stad/src/Connection_Managment/unicastKey802_1x.c b/wl1271/stad/src/Connection_Managment/unicastKey802_1x.c
deleted file mode 100644
index 6650fee..0000000
--- a/wl1271/stad/src/Connection_Managment/unicastKey802_1x.c
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * unicastKey802_1x.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file unicastKey802_1x.c
- * \brief station unicast key 802_1x implementation
- *
- * \see unicastKey802_1x.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	station unicast key 802_1x		                                *
- *   PURPOSE:   station unicast key 802_1x implementation						*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_44
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-
-#include "unicastKey802_1x.h"
-#include "mainKeysSm.h"
-
-/** number of states in the state machine */
-#define	UCAST_KEY_802_1X_MAX_NUM_STATES		3
-
-/** number of events in the state machine */
-#define	UCAST_KEY_802_1X_MAX_NUM_EVENTS		4
-
-
-TI_STATUS unicastKey802_1x_start(struct _unicastKey_t *pUnicastKey);
-
-TI_STATUS unicastKey802_1x_stop(struct _unicastKey_t *pUnicastKey);
-
-TI_STATUS unicastKey802_1x_recvSuccess(struct _unicastKey_t *pUnicastKey, 
-									encodedKeyMaterial_t *pEncodedKeyMaterial);
-
-TI_STATUS unicastKey802_1x_recvFailure(struct _unicastKey_t *pUnicastKey);
-
-TI_STATUS unicastKey802_1x_distribute(struct _unicastKey_t *pUnicastKey);
-
-TI_STATUS unicastKey802_1x_redistribute(struct _unicastKey_t *pUnicastKey);
-
-TI_STATUS unicastKey802_1x_event(struct _unicastKey_t *pUnicastKey,
-							  TI_UINT8 event, 
-							  void *pData);
-
-
-
-/**
-*
-* Function  - Config KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_UnicastKeyRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS unicastKey802_1x_config(struct _unicastKey_t *pUnicastKey)
-{
-	TI_STATUS		status = TI_NOK;
-
-	/** 802.1X Station unicast key State Machine matrix */
-	fsm_actionCell_t    unicastKey802_1x_matrix[UCAST_KEY_802_1X_NUM_STATES][UCAST_KEY_802_1X_NUM_EVENTS] =
-	{
-		/* next state and actions for IDLE state */
-		{	{UCAST_KEY_802_1X_STATE_START, (fsm_Action_t)unicastKeySmNop},
-			{UCAST_KEY_802_1X_STATE_IDLE, (fsm_Action_t)unicastKeySmNop},
-			{UCAST_KEY_802_1X_STATE_IDLE, (fsm_Action_t)unicastKeySmNop},
-			{UCAST_KEY_802_1X_STATE_IDLE, (fsm_Action_t)unicastKeySmUnexpected}
-		},
-	
-		/* next state and actions for START state */
-		{	{UCAST_KEY_802_1X_STATE_START, (fsm_Action_t)unicastKeySmUnexpected},
-			{UCAST_KEY_802_1X_STATE_IDLE, (fsm_Action_t)unicastKeySmNop},
-			{UCAST_KEY_802_1X_STATE_COMPLETE, (fsm_Action_t)unicastKey802_1x_distribute},
-			{UCAST_KEY_802_1X_STATE_START, (fsm_Action_t)unicastKeySmNop}
-		},
-	
-		/* next state and actions for COMPLETE state */
-		{	{UCAST_KEY_802_1X_STATE_COMPLETE, (fsm_Action_t)unicastKeySmUnexpected},
-			{UCAST_KEY_802_1X_STATE_IDLE, (fsm_Action_t)unicastKeySmNop},
-			{UCAST_KEY_802_1X_STATE_COMPLETE, (fsm_Action_t)unicastKey802_1x_distribute},
-			{UCAST_KEY_802_1X_STATE_COMPLETE, (fsm_Action_t)unicastKeySmUnexpected}
-		}
-	};
-
-
-	pUnicastKey->start = unicastKey802_1x_start;
-	pUnicastKey->stop = unicastKey802_1x_stop;
-	pUnicastKey->recvFailure = unicastKey802_1x_recvFailure;
-	pUnicastKey->recvSuccess = unicastKey802_1x_recvSuccess;
-
-	pUnicastKey->currentState = UCAST_KEY_802_1X_STATE_IDLE;
-
-	status = fsm_Config(pUnicastKey->pUcastKeySm, 
-						&unicastKey802_1x_matrix[0][0], 
-						UCAST_KEY_802_1X_NUM_STATES, 
-						UCAST_KEY_802_1X_NUM_EVENTS, 
-						NULL, pUnicastKey->hOs);
-
-	
-	return status;
-}
-
-
-
-/**
-*
-* unicastKey802_1x_event
-*
-* \b Description: 
-*
-* 802.1x station unicast key state machine transition function
-*
-* \b ARGS:
-*
-*  I/O - currentState - current state in the state machine\n
-*  I   - event - specific event for the state machine\n
-*  I   - pData - Data for state machine action function\n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS unicastKey802_1x_event(struct _unicastKey_t *pUnicastKey, TI_UINT8 event, void *pData)
-{
-	TI_STATUS 		status;
-	TI_UINT8		nextState;
-
-	status = fsm_GetNextState(pUnicastKey->pUcastKeySm, pUnicastKey->currentState, event, &nextState);
-	if (status != TI_OK)
-	{
-TRACE0(pUnicastKey->hReport, REPORT_SEVERITY_ERROR, "UNICAST_KEY_802_1x: ERROR: failed getting next state\n");
-		return TI_NOK;
-	}
-
-TRACE3(pUnicastKey->hReport, REPORT_SEVERITY_INFORMATION, "STATION_UNICAST_KEY_802_1x: <currentState = %d, event = %d> --> nextState = %d\n", pUnicastKey->currentState, event, nextState);
-
-	status = fsm_Event(pUnicastKey->pUcastKeySm, &pUnicastKey->currentState, event, pData);
-
-	return status;
-}
-
-
-/**
-*
-* unicastKey802_1x_start
-*
-* \b Description: 
-*
-* START event handler
-*
-* \b ARGS:
-*
-*  I   - pCtrlB - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa unicastKey802_1x_stop()
-*/
-TI_STATUS unicastKey802_1x_start(struct _unicastKey_t *pUnicastKey)
-{
-	TI_STATUS  status;
-	
-	status = unicastKey802_1x_event(pUnicastKey, UCAST_KEY_802_1X_EVENT_START, pUnicastKey);
-
-	return status;
-}
-
-
-/**
-*
-* unicastKey802_1x_stop
-*
-* \b Description: 
-*
-* START event handler
-*
-* \b ARGS:
-*
-*  I   - pCtrlB - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-* \sa unicastKey802_1x_start()
-*/
-TI_STATUS unicastKey802_1x_stop(struct _unicastKey_t *pUnicastKey)
-{
-	TI_STATUS  status;
-
-	status = unicastKey802_1x_event(pUnicastKey, UCAST_KEY_802_1X_EVENT_STOP, pUnicastKey);
-
-	return status;
-}
-
-
-/**
-*
-* unicastKey802_1x_recvSuccess
-*
-* \b Description: 
-*
-* SUCCESS event handler
-*
-* \b ARGS:
-*
-*  I   - pCtrlB - station control block  \n
-*  I   - pEncodedKeyMaterial - Encoded key material \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-*/
-TI_STATUS unicastKey802_1x_recvSuccess(struct _unicastKey_t *pUnicastKey, encodedKeyMaterial_t *pEncodedKeyMaterial)
-{
-	TI_STATUS  status;
-
-	pUnicastKey->data.pEncodedKeyMaterial = pEncodedKeyMaterial;
-
-	status = unicastKey802_1x_event(pUnicastKey, UCAST_KEY_802_1X_EVENT_SUCCESS, pUnicastKey);
-
-	return status;
-}
-
-
-/**
-*
-* unicastKey802_1x_recvFailure
-*
-* \b Description: 
-*
-* FAILURE event handler
-*
-* \b ARGS:
-*
-*  I   - pCtrlB - station control block  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*
-*/
-TI_STATUS unicastKey802_1x_recvFailure(struct _unicastKey_t *pUnicastKey)
-{
-	TI_STATUS  status;
-	
-	status = unicastKey802_1x_event(pUnicastKey, UCAST_KEY_802_1X_EVENT_FAILURE, pUnicastKey);
-
-	return status;
-}
-
-
-/**
-*
-* unicastKey802_1x_distribute
-*
-* \b Description: 
-*
-* Distribute unicast key material to the driver and report the main key SM on unicast complete.
-*
-* \b ARGS:
-*
-*  I   - pData - Encoded key material  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS unicastKey802_1x_distribute(struct _unicastKey_t *pUnicastKey)
-{
-	TI_STATUS  status=TI_NOK;
-	
-	if (pUnicastKey->pKeyDerive->derive!=NULL)
-    {
-	status = pUnicastKey->pKeyDerive->derive(pUnicastKey->pKeyDerive, 
-												   pUnicastKey->data.pEncodedKeyMaterial);
-    }
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	if (pUnicastKey->pParent->setDefaultKeyId!=NULL)
-    {
-	status = pUnicastKey->pParent->setDefaultKeyId(pUnicastKey->pParent,
-												   (TI_UINT8)pUnicastKey->data.pEncodedKeyMaterial->keyId);
-    }
-	if (status != TI_OK)
-	{
-		return status;
-	}
-
-	if (pUnicastKey->pParent->reportUcastStatus!=NULL)
-    {
-	status = pUnicastKey->pParent->reportUcastStatus(pUnicastKey->pParent, TI_OK);
-    }
-
-	return status;
-}
diff --git a/wl1271/stad/src/Connection_Managment/unicastKey802_1x.h b/wl1271/stad/src/Connection_Managment/unicastKey802_1x.h
deleted file mode 100644
index 87d652a..0000000
--- a/wl1271/stad/src/Connection_Managment/unicastKey802_1x.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * unicastKey802_1x.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file unicastKeySM.h
- *  \brief station unicast key SM API
- *
- *  \see unicastKeySM.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  station unicast key SM	                                	*
- *   PURPOSE: station unicast key SM API		                            *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _UNICAST_KEY_802_1X_H
-#define _UNICAST_KEY_802_1X_H
-
-#include "paramOut.h"
-#include "fsm.h"
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-#include "keyDerive.h"
-#include "unicastKeySM.h"
-
-/* Constants */
-/** number of states in the state machine */
-#define	UCAST_KEY_802_1X_NUM_STATES		3
-
-/** number of events in the state machine */
-#define	UCAST_KEY_802_1X_NUM_EVENTS		4
-
-/* Enumerations */
-
-/** state machine states */
-typedef enum 
-{
-	UCAST_KEY_802_1X_STATE_IDLE                  = 0,
-	UCAST_KEY_802_1X_STATE_START                 = 1,
-	UCAST_KEY_802_1X_STATE_COMPLETE              = 2
-} unicastKey802_1x_smStates;
-
-/** State machine events */
-typedef enum 
-{
-	UCAST_KEY_802_1X_EVENT_START                  = 0,
-	UCAST_KEY_802_1X_EVENT_STOP                   = 1,
-	UCAST_KEY_802_1X_EVENT_SUCCESS                = 2,
-	UCAST_KEY_802_1X_EVENT_FAILURE				  = 3
-} unicastKey802_1x_smEvents;
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-
-TI_STATUS unicastKey802_1x_config(struct _unicastKey_t *pUnicastKey);
-
-
-#endif /*  _UNICAST_KEY_802_1X_H*/
diff --git a/wl1271/stad/src/Connection_Managment/unicastKeyNone.c b/wl1271/stad/src/Connection_Managment/unicastKeyNone.c
deleted file mode 100644
index dfb092d..0000000
--- a/wl1271/stad/src/Connection_Managment/unicastKeyNone.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * unicastKeyNone.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file unicastKeyNone.c
- * \brief station unicast key None implementation
- *
- * \see unicastKeyNone.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	station unicast key None		                            *
- *   PURPOSE:   station unicast key None implementation						*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_45
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-
-#include "unicastKeyNone.h"
-#include "mainKeysSm.h"
-
-
-TI_STATUS unicastKeyNone_start(struct _unicastKey_t *pUnicastKey);
-TI_STATUS unicastKeyNone_distribute(struct _unicastKey_t *pUnicastKey, encodedKeyMaterial_t *pEncodedKeyMaterial);
-
-
-
-/**
-*
-* Function  - Config KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_UnicastKeyRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS unicastKeyNone_config(struct _unicastKey_t *pUnicastKey)
-{
-
-	pUnicastKey->start = unicastKeyNone_start;
-	pUnicastKey->stop = unicastKeySmNop;
-	pUnicastKey->recvFailure = unicastKeySmNop;
-	pUnicastKey->recvSuccess = unicastKeyNone_distribute;
-
-	pUnicastKey->currentState = 0;
-
-	
-	return TI_OK;
-}
-
-/**
-*
-* unicastKeyNone_start
-*
-* \b Description: 
-*
-* report the main key SM of unicast complete, whithout wating for keys.
-*
-* \b ARGS:
-*
-*  I   - pUnicastKey - context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS unicastKeyNone_start(struct _unicastKey_t *pUnicastKey)
-{
-	TI_STATUS	status=TI_NOK;
-
-	if (pUnicastKey->pParent->reportUcastStatus!=NULL)
-    {
-		status = pUnicastKey->pParent->reportUcastStatus(pUnicastKey->pParent, TI_OK);
-    }
-
-	return status;
-}
-
-/**
-*
-* unicastKeyNone_distribute
-*
-* \b Description: 
-*
-* Distribute unicast key material to the driver and report the main key SM on unicast complete.
-*
-* \b ARGS:
-*
-*  I   - pData - Encoded key material  \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK otherwise.
-*/
-TI_STATUS unicastKeyNone_distribute(struct _unicastKey_t *pUnicastKey, encodedKeyMaterial_t *pEncodedKeyMaterial)
-{
-	TI_STATUS  status=TI_NOK;
-	
-	if ((pUnicastKey==NULL) || (pEncodedKeyMaterial==NULL))
-    {
-        return TI_NOK;
-    }
-    
-    if (pUnicastKey->pKeyDerive->derive!=NULL)
-    {
-        status = pUnicastKey->pKeyDerive->derive(pUnicastKey->pKeyDerive, 
-                                                       pEncodedKeyMaterial);
-    }
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	if (pUnicastKey->pParent->setDefaultKeyId!=NULL)
-    {
-        status = pUnicastKey->pParent->setDefaultKeyId(pUnicastKey->pParent,
-                                                       (TI_UINT8)pEncodedKeyMaterial->keyId);
-    }
-	if (status != TI_OK)
-	{
-		return status;
-	}
-
-	if (pUnicastKey->pParent->reportUcastStatus!=NULL)
-    {
-        status = pUnicastKey->pParent->reportUcastStatus(pUnicastKey->pParent, TI_OK);
-    }
-
-	return status;
-}
diff --git a/wl1271/stad/src/Connection_Managment/unicastKeyNone.h b/wl1271/stad/src/Connection_Managment/unicastKeyNone.h
deleted file mode 100644
index fff8ee1..0000000
--- a/wl1271/stad/src/Connection_Managment/unicastKeyNone.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * unicastKeyNone.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file unicastKeyNone.h
- *  \brief station unicast key None API
- *
- *  \see unicastKeyNone.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  station unicast key None	                                	*
- *   PURPOSE: station unicast key None API		                            *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _UNICAST_KEY_NONE_H
-#define _UNICAST_KEY_NONE_H
-
-#include "paramOut.h"
-#include "fsm.h"
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-#include "keyDerive.h"
-#include "unicastKeySM.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-
-TI_STATUS unicastKeyNone_config(struct _unicastKey_t *pUnicastKey);
-
-
-#endif /*  _UNICAST_KEY_NONE_H*/
diff --git a/wl1271/stad/src/Connection_Managment/unicastKeySM.c b/wl1271/stad/src/Connection_Managment/unicastKeySM.c
deleted file mode 100644
index a8d450e..0000000
--- a/wl1271/stad/src/Connection_Managment/unicastKeySM.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * unicastKeySM.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file unicastKeySM.c
- * \brief station unicast key SM implementation
- *
- * \see unicastKeySM.h
-*/
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:	station unicast key SM		                                *
- *   PURPOSE:   station unicast key SM implementation						*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_46
-#include "osApi.h"
-#include "report.h"
-#include "rsnApi.h"
-
-#include "unicastKeySM.h"
-#include "unicastKey802_1x.h"
-#include "unicastKeyNone.h"
-
-/** number of states in the state machine */
-#define	UCAST_KEY_MAX_NUM_STATES		3
-
-/** number of events in the state machine */
-#define	UCAST_KEY_MAX_NUM_EVENTS		4
-
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_UnicastKeyRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-unicastKey_t* unicastKey_create(TI_HANDLE hOs)
-{
-	TI_STATUS				status;
-	unicastKey_t 		*pUnicastKey;
-
-	/* allocate key parser context memory */
-	pUnicastKey = (unicastKey_t*)os_memoryAlloc(hOs, sizeof(unicastKey_t));
-	if (pUnicastKey == NULL)
-	{
-		return NULL;
-	}
-
-	os_memoryZero(hOs, pUnicastKey, sizeof(unicastKey_t));
-
-	/* allocate memory for association state machine */
-	status = fsm_Create(hOs, &pUnicastKey->pUcastKeySm, UCAST_KEY_MAX_NUM_STATES, UCAST_KEY_MAX_NUM_EVENTS);
-	if (status != TI_OK)
-	{
-		os_memoryFree(hOs, pUnicastKey, sizeof(unicastKey_t));
-		return NULL;
-	}
-
-	pUnicastKey->pKeyDerive = keyDerive_create(hOs);
-	if (pUnicastKey->pKeyDerive == NULL)
-	{
-		fsm_Unload(hOs, pUnicastKey->pUcastKeySm);
-		os_memoryFree(hOs, pUnicastKey, sizeof(unicastKey_t));
-		return NULL;
-	}
-
-	pUnicastKey->hOs = hOs;
-
-	return pUnicastKey;
-}
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_UnicastKeyRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS unicastKey_unload(struct _unicastKey_t *pUnicastKey)
-{
-	TI_STATUS		status;
-
-	status = keyDerive_unload(pUnicastKey->pKeyDerive);
-	if (status != TI_OK)
-	{                  
-        TRACE0(pUnicastKey->hReport, REPORT_SEVERITY_CONSOLE,"BCAST_KEY_SM: Error in unloading key derivation module\n");
-		WLAN_OS_REPORT(("BCAST_KEY_SM: Error in unloading key derivation module\n"));
-	}
-
-	status = fsm_Unload(pUnicastKey->hOs, pUnicastKey->pUcastKeySm);
-	if (status != TI_OK)
-	{
-        TRACE0(pUnicastKey->hReport, REPORT_SEVERITY_CONSOLE,"BCAST_KEY_SM: Error in unloading state machine\n");
-		WLAN_OS_REPORT(("BCAST_KEY_SM: Error in unloading state machine\n"));
-	}
-
-	/* free key parser context memory */
-	os_memoryFree(pUnicastKey->hOs, pUnicastKey, sizeof(unicastKey_t));
-
-	return TI_OK;
-}
-
-/**
-*
-* Function  - Init KEY Parser module.
-*
-* \b Description: 
-*
-* Called by RSN Manager. 
-* Registers the function 'rsn_UnicastKeyRecv()' at the distributor to receive KEY frames upon receiving a KEY_RECV event.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_STATUS - 0 on success, any other value on failure. 
-*
-*/
-
-TI_STATUS unicastKey_config(struct _unicastKey_t *pUnicastKey,
-						 TRsnPaeConfig *pPaeConfig,
-						 struct _mainKeys_t *pParent,
-						 TI_HANDLE hReport,
-						 TI_HANDLE hOs)
-{
-	TI_STATUS		status = TI_NOK;
-
-	pUnicastKey->hReport = hReport;
-	pUnicastKey->hOs = hOs;
-	pUnicastKey->pParent = pParent;
-
-	/* configure according to the keyMng suite and cipher suite */
-    switch (pPaeConfig->keyExchangeProtocol)
-    {
-    case RSN_KEY_MNG_NONE:
-       status = unicastKeyNone_config(pUnicastKey);
-       break;
-    case RSN_KEY_MNG_802_1X:
-       if (pPaeConfig->unicastSuite == TWD_CIPHER_NONE)
-   	    {
-   	    	status = unicastKeyNone_config(pUnicastKey);
-   	    } else {
-   	    	status = unicastKey802_1x_config(pUnicastKey);
-   	    }
-   	break;
-    default:
-   	    status = unicastKeyNone_config(pUnicastKey);
-   	    break;
-    }
-
-	status = keyDerive_config(pUnicastKey->pKeyDerive, pPaeConfig->unicastSuite, pParent, hReport, hOs);
-	
-	return status;
-}
-
-
-TI_STATUS unicastKeySmUnexpected(struct _unicastKey_t *pUnicastKey)
-{
-TRACE0(pUnicastKey->hReport, REPORT_SEVERITY_ERROR, "UNICAST_KEY_SM: ERROR: UnExpected Event\n");
-
-	return(TI_NOK);
-}
-
-TI_STATUS unicastKeySmNop(struct _unicastKey_t *pUnicastKey)
-{
-	return(TI_OK);
-}
-
diff --git a/wl1271/stad/src/Connection_Managment/unicastKeySM.h b/wl1271/stad/src/Connection_Managment/unicastKeySM.h
deleted file mode 100644
index ecc84d4..0000000
--- a/wl1271/stad/src/Connection_Managment/unicastKeySM.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * unicastKeySM.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file unicastKeySM.h
- *  \brief station unicast key SM API
- *
- *  \see unicastKeySM.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  station unicast key SM	                                	*
- *   PURPOSE: station unicast key SM API		                            *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _UNICAST_KEY_SM_H
-#define _UNICAST_KEY_SM_H
-
-#include "paramOut.h"
-#include "fsm.h"
-#include "rsnApi.h"
-#include "keyTypes.h"
-
-#include "keyDerive.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-typedef struct _unicastKey_t    unicastKey_t;
-
-/* Main Sec SM functions */
-typedef TI_STATUS (*unicastKeySmStart_t)(struct _unicastKey_t *pUnicastKey);
-typedef TI_STATUS (*unicastKeySmStop_t)(struct _unicastKey_t *pUnicastKey);
-typedef TI_STATUS (*unicastKeySmRecvSuccess_t)(struct _unicastKey_t *pUnicastKey, encodedKeyMaterial_t *pEncodedKeyMaterial);
-typedef TI_STATUS (*unicastKeySmRecvFailure_t)(struct _unicastKey_t *pUnicastKey);
-
-/* Structures */
-
-/* State machine associated data structures. */
-typedef struct
-{
-	encodedKeyMaterial_t    *pEncodedKeyMaterial;
-} unicastKeyData_t;
-
-struct _unicastKey_t
-{
-	TI_UINT8                               currentState;
-	fsm_stateMachine_t	                *pUcastKeySm;
-    unicastKeyData_t					data;
-
-    struct _mainKeys_t                 	*pParent;
-	keyDerive_t							*pKeyDerive;
-	
-	TI_HANDLE			                hReport;
-	TI_HANDLE			                hOs;
-    
-    unicastKeySmStart_t               	start;
-    unicastKeySmStop_t                	stop;
-    unicastKeySmRecvSuccess_t			recvSuccess;
-    unicastKeySmRecvFailure_t			recvFailure;
-};
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-unicastKey_t* unicastKey_create(TI_HANDLE hOs);
-
-TI_STATUS unicastKey_unload(unicastKey_t *punicastKey);
-
-TI_STATUS unicastKey_config(struct _unicastKey_t *pUnicastKey, 
-						   TRsnPaeConfig *pPaeConfig, 
-						   struct _mainKeys_t *pParent,
-						   TI_HANDLE hReport,
-						   TI_HANDLE hOs);
-
-TI_STATUS unicastKeySmUnexpected(struct _unicastKey_t *pUnicastKey);
-
-TI_STATUS unicastKeySmNop(struct _unicastKey_t *pUnicastKey);
-
-#endif /*  _UNICAST_KEY_SM_H*/
diff --git a/wl1271/stad/src/Ctrl_Interface/CmdDispatcher.c b/wl1271/stad/src/Ctrl_Interface/CmdDispatcher.c
deleted file mode 100644
index 135c772..0000000
--- a/wl1271/stad/src/Ctrl_Interface/CmdDispatcher.c
+++ /dev/null
@@ -1,535 +0,0 @@
-/*
- * CmdDispatcher.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   CmdDispatcher.c 
- *  \brief  The CmdDispatcher module. Handles user commbands dispatching to the driver modules.
- *  
- *  \see    CmdDispatcher.h
- */
-
-#define __FILE_ID__  FILE_ID_47
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "DrvMain.h"
-#include "connApi.h"
-#include "siteMgrApi.h"
-#include "smeApi.h"
-#include "SoftGeminiApi.h"
-#include "roamingMngrApi.h"
-#include "qosMngr_API.h"
-#include "PowerMgr_API.h"
-#include "ScanCncn.h"
-#include "scanMngrApi.h"
-#include "regulatoryDomainApi.h"
-#include "measurementMgrApi.h"
-#include "TWDriver.h"
-#include "debug.h"
-#include "DrvMainModules.h"
-#include "CmdDispatcher.h"
-#include "healthMonitor.h"
-#include "currBssApi.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#endif
-
-
-/* Set/get params function prototype */
-typedef TI_STATUS (*TParamFunc) (TI_HANDLE handle, paramInfo_t *pParam);
-
-typedef struct
-{
-    TParamFunc          set; 
-    TParamFunc          get; 
-    TI_HANDLE           handle; 
-
-} TParamAccess;
-
-/* The module's object */
-typedef struct
-{
-    /* Other modules handles */
-    TI_HANDLE    hOs;
-    TI_HANDLE    hReport;
-    TI_HANDLE    hAuth;
-    TI_HANDLE    hAssoc;
-    TI_HANDLE    hRxData;
-    TI_HANDLE    hTxCtrl;
-    TI_HANDLE    hCtrlData;
-    TI_HANDLE    hSiteMgr;
-    TI_HANDLE    hConn;
-    TI_HANDLE    hRsn;
-    TI_HANDLE    hSme;
-    TI_HANDLE    hScanCncn;
-    TI_HANDLE    hScanMngr;
-    TI_HANDLE    hMlmeSm;
-    TI_HANDLE    hRegulatoryDomain;
-    TI_HANDLE    hMeasurementMgr;
-    TI_HANDLE    hRoamingMngr;
-    TI_HANDLE    hSoftGemini;
-    TI_HANDLE    hQosMngr;
-    TI_HANDLE    hPowerMgr;
-    TI_HANDLE    hHealthMonitor;
-    TI_HANDLE    hTWD;
-    TI_HANDLE    hCurrBss;
-#ifdef XCC_MODULE_INCLUDED
-    TI_HANDLE    hXCCMngr;
-#endif
-
-    /* Table of params set/get functions */
-    TParamAccess paramAccessTable[MAX_PARAM_MODULE_NUMBER]; 
-
-#ifdef TI_DBG
-    TStadHandlesList *pStadHandles;  /* Save modules list pointer just for the debug functions */
-#endif
-
-} TCmdDispatchObj;
-
-
-/* Internal functions prototypes */
-static void      cmdDispatch_ConfigParamsAccessTable (TCmdDispatchObj *pCmdDispatch);
-static TI_STATUS cmdDispatch_SetTwdParam  (TI_HANDLE hCmdDispatch, paramInfo_t *pParam);
-static TI_STATUS cmdDispatch_GetTwdParam  (TI_HANDLE hCmdDispatch, paramInfo_t *pParam);
-
-#ifdef TI_DBG
-static TI_STATUS cmdDispatch_DebugFuncSet (TI_HANDLE hCmdDispatch, paramInfo_t *pParam);
-static TI_STATUS cmdDispatch_DebugFuncGet (TI_HANDLE hCmdDispatch, paramInfo_t *pParam);	/*yael - this function is not in use*/
-#endif
-
-
-
-/** 
- * \fn     cmdDispatch_Create
- * \brief  Create the module
- * 
- * Create the Command-Dispatcher module
- * 
- * \note   
- * \param  hOs - Handle to the Os Abstraction Layer                           
- * \return Handle to the allocated module (NULL if failed) 
- * \sa     
- */ 
-TI_HANDLE cmdDispatch_Create (TI_HANDLE hOs)
-{
-    TCmdDispatchObj *pCmdDispatch;
-
-    /* allocate CmdDispatcher module */
-    pCmdDispatch = os_memoryAlloc (hOs, (sizeof(TCmdDispatchObj)));
-    
-    if (!pCmdDispatch)
-    {
-        WLAN_OS_REPORT(("Error allocating the CmdDispatcher Module\n"));
-        return NULL;
-    }
-
-    /* Reset CmdDispatcher module */
-    os_memoryZero (hOs, pCmdDispatch, (sizeof(TCmdDispatchObj)));
-
-    pCmdDispatch->hOs = hOs;
-
-    return (TI_HANDLE)pCmdDispatch;
-}
-
-
-/** 
- * \fn     cmdDispatch_Init
- * \brief  Save modules handles and fill the configuration table
- * 
- * Save other modules handles, and fill the configuration table 
- *     with the Get/Set functions.
- * 
- * \note   
- * \param  pStadHandles  - The driver modules handles
- * \return void  
- * \sa     
- */ 
-void cmdDispatch_Init (TStadHandlesList *pStadHandles)
-{
-    TCmdDispatchObj *pCmdDispatch = (TCmdDispatchObj *)(pStadHandles->hCmdDispatch);
-    
-    /* Save modules handles */
-    pCmdDispatch->hReport           = pStadHandles->hReport;
-    pCmdDispatch->hAuth             = pStadHandles->hAuth;
-    pCmdDispatch->hAssoc            = pStadHandles->hAssoc;
-    pCmdDispatch->hRxData           = pStadHandles->hRxData;
-    pCmdDispatch->hTxCtrl           = pStadHandles->hTxCtrl;
-    pCmdDispatch->hCtrlData         = pStadHandles->hCtrlData;
-    pCmdDispatch->hSiteMgr          = pStadHandles->hSiteMgr;
-    pCmdDispatch->hConn             = pStadHandles->hConn;
-    pCmdDispatch->hRsn              = pStadHandles->hRsn;
-    pCmdDispatch->hSme              = pStadHandles->hSme;
-    pCmdDispatch->hScanCncn         = pStadHandles->hScanCncn;
-    pCmdDispatch->hScanMngr         = pStadHandles->hScanMngr;
-    pCmdDispatch->hMlmeSm           = pStadHandles->hMlmeSm; 
-    pCmdDispatch->hRegulatoryDomain = pStadHandles->hRegulatoryDomain;
-    pCmdDispatch->hMeasurementMgr   = pStadHandles->hMeasurementMgr;
-    pCmdDispatch->hRoamingMngr      = pStadHandles->hRoamingMngr;
-    pCmdDispatch->hSoftGemini       = pStadHandles->hSoftGemini;
-    pCmdDispatch->hQosMngr          = pStadHandles->hQosMngr;
-    pCmdDispatch->hPowerMgr         = pStadHandles->hPowerMgr;
-    pCmdDispatch->hHealthMonitor    = pStadHandles->hHealthMonitor;
-    pCmdDispatch->hTWD              = pStadHandles->hTWD;
-    pCmdDispatch->hCurrBss          = pStadHandles->hCurrBss;
-#ifdef XCC_MODULE_INCLUDED
-    pCmdDispatch->hXCCMngr          = pStadHandles->hXCCMngr;
-#endif
-
-#ifdef TI_DBG
-    pCmdDispatch->pStadHandles = pStadHandles;  /* Save modules list pointer just for the debug functions */
-#endif
-
-    /* Fill the configuration table with the Get/Set functions */
-    cmdDispatch_ConfigParamsAccessTable (pCmdDispatch);
-}
-
-
-/** 
- * \fn     cmdDispatch_Destroy
- * \brief  Destroy the module object
- * 
- * Destroy the module object.
- * 
- * \note   
- * \param  hCmdDispatch - The object                                          
- * \return TI_OK - Unload succesfull, TI_NOK - Unload unsuccesfull 
- * \sa     
- */ 
-TI_STATUS cmdDispatch_Destroy (TI_HANDLE hCmdDispatch)
-{
-    TCmdDispatchObj  *pCmdDispatch = (TCmdDispatchObj *)hCmdDispatch;
-
-    /* Free the module object */
-    os_memoryFree (pCmdDispatch->hOs, pCmdDispatch, sizeof(TCmdDispatchObj));
-
-    return TI_OK;
-}
-
-
-/** 
- * \fn     cmdDispatch_ConfigParamsAccessTable
- * \brief  Fill the configuration table with the Get/Set functions
- * 
- * Called in the configuration phase by the driver, performs the following:
- *   - for each module that supply a Get/Set services to his parameters, 
- *        fill the corresponding entry in the params access table with the following:
- *          - Get function
- *          - Set function
- *          - Handle to the module
- * This table is used when Getting/Setting a parameter from the OS abstraction layer.
- * 
- * \note   
- * \param  pCmdDispatch - The object                                          
- * \return void
- * \sa     
- */ 
-static void cmdDispatch_ConfigParamsAccessTable (TCmdDispatchObj *pCmdDispatch)
-{
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(AUTH_MODULE_PARAM) - 1].set = auth_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(AUTH_MODULE_PARAM) - 1].get = auth_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(AUTH_MODULE_PARAM) - 1].handle = pCmdDispatch->hAuth;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(ASSOC_MODULE_PARAM) - 1].set = assoc_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(ASSOC_MODULE_PARAM) - 1].get = assoc_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(ASSOC_MODULE_PARAM) - 1].handle = pCmdDispatch->hAssoc;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(RX_DATA_MODULE_PARAM) - 1].set = rxData_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(RX_DATA_MODULE_PARAM) - 1].get = rxData_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(RX_DATA_MODULE_PARAM) - 1].handle = pCmdDispatch->hRxData;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(TX_CTRL_MODULE_PARAM) - 1].set = txCtrlParams_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(TX_CTRL_MODULE_PARAM) - 1].get = txCtrlParams_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(TX_CTRL_MODULE_PARAM) - 1].handle = pCmdDispatch->hTxCtrl;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(CTRL_DATA_MODULE_PARAM) - 1].set = ctrlData_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(CTRL_DATA_MODULE_PARAM) - 1].get = ctrlData_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(CTRL_DATA_MODULE_PARAM) - 1].handle = pCmdDispatch->hCtrlData;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SITE_MGR_MODULE_PARAM) - 1].set = siteMgr_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SITE_MGR_MODULE_PARAM) - 1].get = siteMgr_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SITE_MGR_MODULE_PARAM) - 1].handle = pCmdDispatch->hSiteMgr;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(CONN_MODULE_PARAM) - 1].set = conn_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(CONN_MODULE_PARAM) - 1].get = conn_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(CONN_MODULE_PARAM) - 1].handle = pCmdDispatch->hConn;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(RSN_MODULE_PARAM) - 1].set = (TParamFunc)rsn_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(RSN_MODULE_PARAM) - 1].get = (TParamFunc)rsn_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(RSN_MODULE_PARAM) - 1].handle = pCmdDispatch->hRsn;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(TWD_MODULE_PARAM) - 1].set = cmdDispatch_SetTwdParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(TWD_MODULE_PARAM) - 1].get = cmdDispatch_GetTwdParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(TWD_MODULE_PARAM) - 1].handle = (TI_HANDLE)pCmdDispatch;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(REPORT_MODULE_PARAM) - 1].set = (TParamFunc)report_SetParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(REPORT_MODULE_PARAM) - 1].get = (TParamFunc)report_GetParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(REPORT_MODULE_PARAM) - 1].handle = pCmdDispatch->hReport;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SME_MODULE_PARAM) - 1].set = sme_SetParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SME_MODULE_PARAM) - 1].get = sme_GetParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SME_MODULE_PARAM) - 1].handle = pCmdDispatch->hSme;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SCAN_CNCN_PARAM) - 1].set = scanCncnApp_SetParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SCAN_CNCN_PARAM) - 1].get = scanCncnApp_GetParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SCAN_CNCN_PARAM) - 1].handle = pCmdDispatch->hScanCncn;
-    
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SCAN_MNGR_PARAM) - 1].set = scanMngr_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SCAN_MNGR_PARAM) - 1].get = scanMngr_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SCAN_MNGR_PARAM) - 1].handle = pCmdDispatch->hScanMngr;
-    
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(MLME_SM_MODULE_PARAM) - 1].set = mlme_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(MLME_SM_MODULE_PARAM) - 1].get = mlme_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(MLME_SM_MODULE_PARAM) - 1].handle = pCmdDispatch->hMlmeSm;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(REGULATORY_DOMAIN_MODULE_PARAM) - 1].set = regulatoryDomain_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(REGULATORY_DOMAIN_MODULE_PARAM) - 1].get = regulatoryDomain_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(REGULATORY_DOMAIN_MODULE_PARAM) - 1].handle = pCmdDispatch->hRegulatoryDomain;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(MEASUREMENT_MODULE_PARAM) - 1].set = measurementMgr_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(MEASUREMENT_MODULE_PARAM) - 1].get = measurementMgr_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(MEASUREMENT_MODULE_PARAM) - 1].handle = pCmdDispatch->hMeasurementMgr;
-
-#ifdef XCC_MODULE_INCLUDED
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(XCC_MANAGER_MODULE_PARAM) - 1].set = XCCMngr_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(XCC_MANAGER_MODULE_PARAM) - 1].get = XCCMngr_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(XCC_MANAGER_MODULE_PARAM) - 1].handle = pCmdDispatch->hXCCMngr;
-#endif
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(ROAMING_MANAGER_MODULE_PARAM) - 1].set = roamingMngr_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(ROAMING_MANAGER_MODULE_PARAM) - 1].get = roamingMngr_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(ROAMING_MANAGER_MODULE_PARAM) - 1].handle = pCmdDispatch->hRoamingMngr;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SOFT_GEMINI_PARAM) - 1].set = SoftGemini_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SOFT_GEMINI_PARAM) - 1].get = SoftGemini_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(SOFT_GEMINI_PARAM) - 1].handle = pCmdDispatch->hSoftGemini;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(QOS_MANAGER_PARAM) - 1].set = qosMngr_setParams;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(QOS_MANAGER_PARAM) - 1].get = qosMngr_getParams;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(QOS_MANAGER_PARAM) - 1].handle = pCmdDispatch->hQosMngr;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(POWER_MANAGER_PARAM) - 1].set = powerMgr_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(POWER_MANAGER_PARAM) - 1].get = powerMgr_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(POWER_MANAGER_PARAM) - 1].handle = pCmdDispatch->hPowerMgr;
-
-#ifdef TI_DBG
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(MISC_MODULE_PARAM) - 1].set = cmdDispatch_DebugFuncSet;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(MISC_MODULE_PARAM) - 1].get = cmdDispatch_DebugFuncGet;	/*yael - this function is not in use*/
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(MISC_MODULE_PARAM) - 1].handle = (TI_HANDLE)pCmdDispatch;
-#endif 
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(HEALTH_MONITOR_MODULE_PARAM) - 1].set = healthMonitor_SetParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(HEALTH_MONITOR_MODULE_PARAM) - 1].get = healthMonitor_GetParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(HEALTH_MONITOR_MODULE_PARAM) - 1].handle = pCmdDispatch->hHealthMonitor;
-
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(CURR_BSS_MODULE_PARAM) - 1].set = currBSS_setParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(CURR_BSS_MODULE_PARAM) - 1].get = currBSS_getParam;
-    pCmdDispatch->paramAccessTable[GET_PARAM_MODULE_NUMBER(CURR_BSS_MODULE_PARAM) - 1].handle = pCmdDispatch->hCurrBss;
-}
-
-
-/** 
- * \fn     cmdDispatch_SetParam
- * \brief  Set a driver parameter
- * 
- * Called by the OS abstraction layer in order to set a parameter in the driver.
- * If the parameter can not be set from outside the driver it returns a failure status.
- * The parameters is set to the module that uses as its father in the system
- *     (refer to the file paramOut.h for more explanations).
- * 
- * \note   
- * \param  hCmdDispatch - The object                                          
- * \param  param        - The parameter information                                          
- * \return result of parameter setting 
- * \sa     
- */ 
-TI_STATUS cmdDispatch_SetParam (TI_HANDLE hCmdDispatch, void *param)                          
-{
-    TCmdDispatchObj *pCmdDispatch = (TCmdDispatchObj *)hCmdDispatch;
-    paramInfo_t     *pParam = (paramInfo_t *)param;
-    TI_UINT32        moduleNumber;
-
-    moduleNumber = GET_PARAM_MODULE_NUMBER(pParam->paramType);
-
-    if  (moduleNumber > MAX_PARAM_MODULE_NUMBER)
-    {
-        return PARAM_MODULE_NUMBER_INVALID;
-    }
-
-	if ((pCmdDispatch->paramAccessTable[moduleNumber - 1].set == 0) ||
-		(pCmdDispatch->paramAccessTable[moduleNumber - 1].get == 0) ||
-		(pCmdDispatch->paramAccessTable[moduleNumber - 1].handle == 0))
-	{
-	    WLAN_OS_REPORT(("cmdDispatch_SetParam(): NULL pointers!!!, return, ParamType=0x%x\n", pParam->paramType));
-		return TI_NOK;
-	}
-
-    TRACE2(pCmdDispatch->hReport, REPORT_SEVERITY_INFORMATION , "cmdDispatch_SetParam(): ParamType=0x%x, ModuleNumber=0x%x\n",							 pParam->paramType, moduleNumber);
-
-    return pCmdDispatch->paramAccessTable[moduleNumber - 1].set(pCmdDispatch->paramAccessTable[moduleNumber - 1].handle, pParam);
-}
-
-
-/** 
- * \fn     cmdDispatch_GetParam
- * \brief  Get a driver parameter
- * 
- * Called by the OS abstraction layer in order to get a parameter the driver.
- * If the parameter can not be get from outside the driver it returns a failure status.
- * The parameter is get from the module that uses as its father in the system
- *    (refer to the file paramOut.h for more explanations).
- * 
- * \note   
- * \param  hCmdDispatch - The object                                          
- * \param  param        - The parameter information                                          
- * \return result of parameter getting 
- * \sa     
- */ 
-TI_STATUS cmdDispatch_GetParam (TI_HANDLE hCmdDispatch, void *param)
-{
-    TCmdDispatchObj *pCmdDispatch = (TCmdDispatchObj *) hCmdDispatch;
-    paramInfo_t     *pParam = (paramInfo_t *) param;
-    TI_UINT32        moduleNumber;
-    TI_STATUS        status;
-
-    moduleNumber = GET_PARAM_MODULE_NUMBER(pParam->paramType);
-
-    if  (moduleNumber > MAX_PARAM_MODULE_NUMBER)
-    {
-        return PARAM_MODULE_NUMBER_INVALID;
-    }
-
-	if ((pCmdDispatch->paramAccessTable[moduleNumber - 1].set == 0) ||
-		(pCmdDispatch->paramAccessTable[moduleNumber - 1].get == 0) ||
-		(pCmdDispatch->paramAccessTable[moduleNumber - 1].handle == 0))
-	{
-	    WLAN_OS_REPORT(("cmdDispatch_GetParam(): NULL pointers!!!, return, ParamType=0x%x\n", pParam->paramType));
-		return TI_NOK;
-	}
-
-    TRACE2(pCmdDispatch->hReport, REPORT_SEVERITY_INFORMATION , "cmdDispatch_GetParam(): ParamType=0x%x, ModuleNumber=0x%x\n",							 pParam->paramType, moduleNumber);
-
-    status = pCmdDispatch->paramAccessTable[moduleNumber - 1].get(pCmdDispatch->paramAccessTable[moduleNumber - 1].handle, pParam);
-
-    return status;    
-}
-
-
-/** 
- * \fn     cmdDispatch_SetTwdParam / cmdDispatch_GetParam
- * \brief  Set/Get a TWD parameter
- * 
- * Set/Get a TWD parameter.
- * 
- * \note   
- * \param  hCmdDispatch - The object                                          
- * \param  param        - The parameter information                                          
- * \return parameter set/get result
- * \sa     
- */ 
-static TI_STATUS cmdDispatch_SetTwdParam (TI_HANDLE hCmdDispatch, paramInfo_t *pParam)
-{
-    TCmdDispatchObj *pCmdDispatch = (TCmdDispatchObj *)hCmdDispatch;
-
-    pParam->paramType &= ~(SET_BIT | GET_BIT | TWD_MODULE_PARAM | ASYNC_PARAM | ALLOC_NEEDED_PARAM);
-
-    return TWD_SetParam (pCmdDispatch->hTWD, (TTwdParamInfo *)pParam);
-}
-
-static TI_STATUS cmdDispatch_GetTwdParam (TI_HANDLE hCmdDispatch, paramInfo_t *pParam)
-{
-    TCmdDispatchObj *pCmdDispatch = (TCmdDispatchObj *)hCmdDispatch;
-
-    pParam->paramType &= ~(SET_BIT | GET_BIT | TWD_MODULE_PARAM | ASYNC_PARAM | ALLOC_NEEDED_PARAM);
-
-    return TWD_GetParam (pCmdDispatch->hTWD, (TTwdParamInfo *)pParam);
-}
-
-
-
-
-/** 
- * \fn     cmdDispatch_DebugFuncSet / cmdDispatch_DebugFuncGet
- * \brief  Set/Get a debug function parameter
- * 
- * Set/Get a debug function parameter.
- * 
- * \note   
- * \param  hCmdDispatch - The object                                          
- * \param  param        - The parameter information                                          
- * \return parameter set/get result
- * \sa     
- */ 
-
-#ifdef TI_DBG
-
-static TI_STATUS cmdDispatch_DebugFuncSet (TI_HANDLE hCmdDispatch, paramInfo_t *pParam)
-{
-    TCmdDispatchObj *pCmdDispatch = (TCmdDispatchObj *)hCmdDispatch;
-    
-    if (hCmdDispatch == NULL || pParam == NULL)
-    {
-        return TI_NOK;
-    }
-
-    switch (pParam->paramType)
-    {
-	case DEBUG_ACTIVATE_FUNCTION:
-		debugFunction (pCmdDispatch->pStadHandles, 
-					   *(TI_UINT32*)&pParam->content, 
-                       (void*)((TI_UINT32*)&pParam->content + 1));
-		break;
-	default:
-TRACE1(pCmdDispatch->hReport, REPORT_SEVERITY_ERROR, "cmdDispatch_DebugFuncSet bad param=%X\n", pParam->paramType);
-		break;
-    }
-    return TI_OK;
-}       
-
-
-
-/*yael - this function is not in use*/
-static TI_STATUS cmdDispatch_DebugFuncGet (TI_HANDLE hCmdDispatch, paramInfo_t *pParam)
-{
-    if (hCmdDispatch == NULL || pParam == NULL)
-    {
-        return TI_NOK;
-    }
-
-	/*yael - no use for that function */
-
-    return TI_OK;
-}
-
-#endif  /* TI_DBG */
-
-
diff --git a/wl1271/stad/src/Ctrl_Interface/CmdDispatcher.h b/wl1271/stad/src/Ctrl_Interface/CmdDispatcher.h
deleted file mode 100644
index 6d0c1dd..0000000
--- a/wl1271/stad/src/Ctrl_Interface/CmdDispatcher.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * CmdDispatcher.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   CmdDispatcher.h
- *  \brief  CmdDispatcher module header file.                                  
- *
- *  \see    CmdDispatcher.c
- */
-
-#ifndef _CMD_DISPATCHER_H_
-#define _CMD_DISPATCHER_H_
-
-#include "DrvMainModules.h"
-
-
-/* Public Functions Prototypes */
-/* =========================== */
-
-TI_HANDLE cmdDispatch_Create   (TI_HANDLE hOs);
-void      cmdDispatch_Init     (TStadHandlesList *pStadHandles);
-TI_STATUS cmdDispatch_Destroy  (TI_HANDLE hCmdDispatch);
-TI_STATUS cmdDispatch_SetParam (TI_HANDLE hCmdDispatch, void *param);                         
-TI_STATUS cmdDispatch_GetParam (TI_HANDLE hCmdDispatch, void *param);
-
-
-#endif  /* _CMD_DISPATCHER_H_ */
-
-
diff --git a/wl1271/stad/src/Ctrl_Interface/CmdHndlr.c b/wl1271/stad/src/Ctrl_Interface/CmdHndlr.c
deleted file mode 100644
index 26db480..0000000
--- a/wl1271/stad/src/Ctrl_Interface/CmdHndlr.c
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
- * CmdHndlr.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/** \file   CmdHndlr.c 
- *  \brief  The Command-Hnadler module.
- *  
- *  \see    CmdHndlr.h
- */
-
-#define __FILE_ID__  FILE_ID_48
-#include "tidef.h"
-#include "commonTypes.h"
-#include "osApi.h"
-#include "report.h"
-#include "queue.h"
-#include "context.h"
-#include "CmdHndlr.h"
-#include "CmdInterpret.h"
-#include "DrvMainModules.h"
-
-
-/* The queue may contain only one command per configuration application but set as unlimited */
-#define COMMANDS_QUE_SIZE   QUE_UNLIMITED_SIZE   
-
-/* Command module internal data */
-typedef struct 
-{
-   TI_HANDLE       hOs;            
-   TI_HANDLE       hReport;        
-   TI_HANDLE       hContext;       
-   TI_HANDLE       hCmdInterpret;
-
-   TI_HANDLE       hCmdQueue;       /* Handle to the commands queue */
-   TI_BOOL         bProcessingCmds; /* Indicates if currently processing commands */
-   TI_UINT32       uContextId;      /* ID allocated to this module on registration to context module */
-   TConfigCommand *pCurrCmd;        /* Pointer to the command currently being processed */
-} TCmdHndlrObj;
-
-/* External functions prototypes */
-extern void wlanDrvIf_CommandDone (TI_HANDLE hOs, void *pSignalObject, TI_UINT8 *CmdResp_p);
-
-/** 
- * \fn     cmdHndlr_Create
- * \brief  Create the module
- * 
- * Create the module object
- * 
- * \note   
- * \param  hOs - Handle to the Os Abstraction Layer                           
- * \return Handle to the allocated module (NULL if failed) 
- * \sa     
- */ 
-TI_HANDLE cmdHndlr_Create (TI_HANDLE hOs, TI_HANDLE hEvHandler)
-{
-    TCmdHndlrObj *pCmdHndlr = (TCmdHndlrObj *) os_memoryAlloc (hOs, sizeof(TCmdHndlrObj));
-
-    if (pCmdHndlr == NULL) 
-    {
-        return NULL;
-    }
-
-    os_memoryZero (hOs, (void *)pCmdHndlr, sizeof(TCmdHndlrObj));
-
-    pCmdHndlr->hOs = hOs;
-
-    pCmdHndlr->hCmdInterpret = cmdInterpret_Create (hOs);
-
-    if (pCmdHndlr->hCmdInterpret == NULL) 
-    {
-		cmdHndlr_Destroy ((TI_HANDLE) pCmdHndlr, (TI_HANDLE) hEvHandler);
-        return NULL;
-    }
-
-    return (TI_HANDLE) pCmdHndlr;
-}
-
-
-/** 
- * \fn     cmdHndlr_Destroy
- * \brief  Destroy the module object
- * 
- * Destroy the module object.
- * 
- * \note   
- * \param  hCmdHndlr - The object                                          
- * \return TI_OK 
- * \sa     
- */ 
-TI_STATUS cmdHndlr_Destroy (TI_HANDLE hCmdHndlr, TI_HANDLE hEvHandler)
-{
-    TCmdHndlrObj *pCmdHndlr = (TCmdHndlrObj *)hCmdHndlr;
-
-	if (pCmdHndlr->hCmdInterpret)
-	{
-		cmdInterpret_Destroy (pCmdHndlr->hCmdInterpret, hEvHandler);
-	}
-
-    cmdHndlr_ClearQueue (hCmdHndlr);
-
-	if (pCmdHndlr->hCmdQueue)
-	{
-		que_Destroy (pCmdHndlr->hCmdQueue);
-	}
-
-	os_memoryFree (pCmdHndlr->hOs, hCmdHndlr, sizeof(TCmdHndlrObj));
-
-    return TI_OK;
-}
-
-
-/** 
- * \fn     cmdHndlr_ClearQueue
- * \brief  Clear commands queue
- * 
- * Dequeue and free all queued commands.
- * 
- * \note   
- * \param  hCmdHndlr - The object                                          
- * \return void 
- * \sa     
- */ 
-void cmdHndlr_ClearQueue (TI_HANDLE hCmdHndlr)
-{
-    TCmdHndlrObj    *pCmdHndlr = (TCmdHndlrObj *)hCmdHndlr;
-    TConfigCommand  *pCurrCmd;
-
-    /* Dequeue and free all queued commands */
-    do {
-        context_EnterCriticalSection (pCmdHndlr->hContext);
-        pCurrCmd = (TConfigCommand *)que_Dequeue(pCmdHndlr->hCmdQueue);
-        context_LeaveCriticalSection (pCmdHndlr->hContext);
-        if (pCurrCmd != NULL) {
-            /* Just release the semaphore. The command is freed subsequently. */
-            os_SignalObjectSet (pCmdHndlr->hOs, pCurrCmd->pSignalObject);
-        }
-    } while (pCurrCmd != NULL);
-}
-
-
-/** 
- * \fn     cmdHndlr_Init 
- * \brief  Init required handles and registries
- * 
- * Init required handles and module variables, create the commands-queue and 
- *     register as the context-engine client.
- * 
- * \note    
- * \param  pStadHandles  - The driver modules handles
- * \return void  
- * \sa     
- */ 
-void cmdHndlr_Init (TStadHandlesList *pStadHandles)
-{
-    TCmdHndlrObj *pCmdHndlr = (TCmdHndlrObj *)(pStadHandles->hCmdHndlr);
-    TI_UINT32     uNodeHeaderOffset;
-
-    pCmdHndlr->hReport  = pStadHandles->hReport;
-    pCmdHndlr->hContext = pStadHandles->hContext;
-
-    cmdInterpret_Init (pCmdHndlr->hCmdInterpret, pStadHandles);
-
-    /* The offset of the queue-node-header from the commands structure entry is needed by the queue */
-    uNodeHeaderOffset = TI_FIELD_OFFSET(TConfigCommand, tQueNodeHdr); 
-
-    /* Create and initialize the commands queue */
-    pCmdHndlr->hCmdQueue = que_Create (pCmdHndlr->hOs, pCmdHndlr->hReport, COMMANDS_QUE_SIZE, uNodeHeaderOffset);
-
-    /* Register to the context engine and get the client ID */
-    pCmdHndlr->uContextId = context_RegisterClient (pCmdHndlr->hContext,
-                                                    cmdHndlr_HandleCommands,
-                                                    (TI_HANDLE)pCmdHndlr,
-                                                    TI_FALSE,
-                                                    "COMMAND",
-                                                    sizeof("COMMAND"));
-
-	if(pCmdHndlr->hReport != NULL)
-	{
-		os_setDebugOutputToLogger(TI_FALSE);
-	}
-}
-
-
-/** 
- * \fn     cmdHndlr_InsertCommand 
- * \brief  Insert a new command to the driver
- * 
- * Insert a new command to the commands queue from user context.
- * If commands are not beeing processed set a request to start processing in the driver context.
- * Wait on the current command's signal until its processing is completed.
- * Note that this prevents the user application from sending further commands before completion.
- * 
- * \note   
- * \param  hCmdHndlr    - The module object
- * \param  cmd          - User request
- * \param  others       - The command flags, data and params
- * \return TI_OK if command processed successfully, TI_NOK if failed in processing or memory allocation.  
- * \sa     cmdHndlr_HandleCommands, cmdHndlr_Complete
- */ 
-TI_STATUS cmdHndlr_InsertCommand (TI_HANDLE     hCmdHndlr,
-                                  TI_UINT32     cmd,
-                                  TI_UINT32     flags,
-                                  void         *buffer1,
-                                  TI_UINT32     buffer1_len,
-                                  void         *buffer2,
-                                  TI_UINT32     buffer2_len,
-                                  TI_UINT32    *param3,
-                                  TI_UINT32    *param4)
-{
-    TCmdHndlrObj     *pCmdHndlr = (TCmdHndlrObj *)hCmdHndlr;
-	TConfigCommand   *pNewCmd;
-	TI_STATUS         eStatus;
-
-	/* Allocated command structure */
-	pNewCmd = os_memoryAlloc (pCmdHndlr->hOs, sizeof (TConfigCommand));
-	if (pNewCmd == NULL)
-	{
-		return TI_NOK;
-	}
-    os_memoryZero (pCmdHndlr->hOs, (void *)pNewCmd, sizeof(TConfigCommand));
-
-	/* Copy user request into local structure */
-	pNewCmd->cmd = cmd;
-	pNewCmd->flags = flags;
-	pNewCmd->buffer1 = buffer1;
-	pNewCmd->buffer1_len = buffer1_len;
-	pNewCmd->buffer2 = buffer2;
-	pNewCmd->buffer2_len = buffer2_len;
-	pNewCmd->param3 = param3;
-	pNewCmd->param4 = param4;
-	pNewCmd->pSignalObject = os_SignalObjectCreate (pCmdHndlr->hOs); /* initialize "complete-flag" */
-
-	/* If creating the signal object failed */
-	if (pNewCmd->pSignalObject == NULL)
-	{
-		os_printf("cmdPerform: Failed to create signalling object\n");
-		/* free allocated memory and return error */
-		os_memoryFree (pCmdHndlr->hOs, pNewCmd, sizeof (TConfigCommand));
-		return TI_NOK;
-	}
-
-    /* Indicate the start of command process, from adding it to the queue until get return status form it */  
-    pNewCmd->bWaitFlag = TI_TRUE;
-
-    /* Enter critical section to protect queue access */
-    context_EnterCriticalSection (pCmdHndlr->hContext);
-
-    /* Enqueue the command (if failed, release memory and return NOK) */
-    eStatus = que_Enqueue (pCmdHndlr->hCmdQueue, (TI_HANDLE)pNewCmd);
-    if (eStatus != TI_OK) 
-    {
-        os_printf("cmdPerform: Failed to enqueue new command\n");
-        os_SignalObjectFree (pCmdHndlr->hOs, pNewCmd->pSignalObject);
-        pNewCmd->pSignalObject = NULL;
-        os_memoryFree (pCmdHndlr->hOs, pNewCmd, sizeof (TConfigCommand));
-        context_LeaveCriticalSection (pCmdHndlr->hContext);  /* Leave critical section */
-        return TI_NOK;
-    }
-
-    /* 
-     * Note: The bProcessingCmds flag is used for indicating if we are already processing
-     *           the queued commands, so the context-engine shouldn't invoke cmdHndlr_HandleCommands.
-     *       This is important because if we make this decision according to the queue being empty,
-     *           there may be a command under processing (already dequeued) while the queue is empty.
-     *       Note that although we are blocking the current command's originator, there may be another
-     *           application that will issue a command.
-     */
-
-    if (pCmdHndlr->bProcessingCmds)
-    {
-        /* No need to schedule the driver (already handling commands) so just leave critical section */
-        context_LeaveCriticalSection (pCmdHndlr->hContext);
-    }
-    else
-    {
-        /* Indicate that we are handling queued commands (before leaving critical section!) */
-        pCmdHndlr->bProcessingCmds = TI_TRUE;
-
-        /* Leave critical section */
-        context_LeaveCriticalSection (pCmdHndlr->hContext);
-
-        /* Request driver task schedule for command handling (after we left critical section!) */
-        context_RequestSchedule (pCmdHndlr->hContext, pCmdHndlr->uContextId);
-    }
-
-	/* Wait until the command is executed */
-	os_SignalObjectWait (pCmdHndlr->hOs, pNewCmd->pSignalObject);
-
-	/* After "wait" - the command has already been processed by the drivers' context */
-	/* Indicate the end of command process, from adding it to the queue until get return status form it */  
-	pNewCmd->bWaitFlag = TI_FALSE;
-
-	/* Copy the return code */
-	eStatus = pNewCmd->return_code;
-
-	/* Free signalling object and command structure */
-	os_SignalObjectFree (pCmdHndlr->hOs, pNewCmd->pSignalObject);
-	pNewCmd->pSignalObject = NULL;
-
-	/* If command not completed in this context (Async) don't free the command memory */
-	if(COMMAND_PENDING != pNewCmd->eCmdStatus)
-	{
-		os_memoryFree (pCmdHndlr->hOs, pNewCmd, sizeof (TConfigCommand));
-	}
-
-	/* Return to calling process with command return code */
-	return eStatus;
-}
-
-
-
-/** 
- * \fn     cmdHndlr_HandleCommands 
- * \brief  Handle queued commands
- * 
- * While there are queued commands, dequeue a command and call the 
- *     commands interpreter (OID or WEXT selected at compile time).
- * If the command processing is not completed in this context (pending), we exit and 
- *     this function is called again upon commnad completion, so it can continue processing 
- *     further queued commands (if any).
- * 
- * \note    
- * \param  hCmdHndlr - The module object
- * \return void
- * \sa     cmdHndlr_InsertCommand, cmdHndlr_Complete
- */ 
-void cmdHndlr_HandleCommands (TI_HANDLE hCmdHndlr)
-{
-    TCmdHndlrObj     *pCmdHndlr = (TCmdHndlrObj *)hCmdHndlr;
-
-    while (1)
-    {
-        /* Enter critical section to protect queue access */
-        context_EnterCriticalSection (pCmdHndlr->hContext);
-
-        /* Dequeue a command */
-        pCmdHndlr->pCurrCmd = (TConfigCommand *) que_Dequeue (pCmdHndlr->hCmdQueue);
-
-        /* If we have got a command */
-        if (pCmdHndlr->pCurrCmd) 
-        {
-            /* Leave critical section */
-            context_LeaveCriticalSection (pCmdHndlr->hContext);
-
-            /* Convert to driver structure and execute command */
-            pCmdHndlr->pCurrCmd->eCmdStatus = cmdInterpret_convertAndExecute (pCmdHndlr->hCmdInterpret, pCmdHndlr->pCurrCmd);
-
-            /* 
-             *  If command not completed in this context (Async), return.
-             *    (we'll be called back upon command completion) 
-             */
-            if(COMMAND_PENDING == pCmdHndlr->pCurrCmd->eCmdStatus)
-            {
-                return;
-            }
-
-            /* Command was completed so free the wait signal and continue to next command */
-            wlanDrvIf_CommandDone(pCmdHndlr->hOs, pCmdHndlr->pCurrCmd->pSignalObject, pCmdHndlr->pCurrCmd->CmdRespBuffer); 
-
-            pCmdHndlr->pCurrCmd = NULL;
-
-        }
-
-        /* Else, we don't have commands to handle */
-        else
-        {
-            /* Indicate that we are not handling commands (before leaving critical section!) */
-            pCmdHndlr->bProcessingCmds = TI_FALSE;
-
-            /* Leave critical section */
-            context_LeaveCriticalSection (pCmdHndlr->hContext);
-
-            /* Exit (no more work) */
-            return;
-        }
-    }
-}
-
-
-/** 
- * \fn     cmdHndlr_Complete 
- * \brief  called whenever a command has finished executing
- * 
- * This routine is called whenever a command has finished executing.
- * Either called by the cmdHndlr_HandleCommands if completed in the same context, 
- *     or by the CmdInterpreter module when tcompleted in a later context (Async).
- * 
- * \note    
- * \param  hCmdHndlr - The module object
- * \return void
- * \sa     cmdHndlr_InsertCommand, cmdHndlr_HandleCommands
- */ 
-void cmdHndlr_Complete (TI_HANDLE hCmdHndlr)
-{
-    TCmdHndlrObj *pCmdHndlr = (TCmdHndlrObj *)hCmdHndlr;
-    TI_BOOL       bLocalWaitFlag;
-
-    if (pCmdHndlr->pCurrCmd)
-    {
-        /* set Status to COMPLETE */
-        pCmdHndlr->pCurrCmd->eCmdStatus = TI_OK;
-    
-        /* save the wait flag before free semaphore */
-        bLocalWaitFlag = pCmdHndlr->pCurrCmd->bWaitFlag;
-
-        wlanDrvIf_CommandDone(pCmdHndlr->hOs, pCmdHndlr->pCurrCmd->pSignalObject, pCmdHndlr->pCurrCmd->CmdRespBuffer); 
-
-        /* if cmdHndlr_InsertCommand() not wait to cmd complete? */
-        if (TI_FALSE == bLocalWaitFlag)
-        {
-            /* no wait, free the command memory */
-            os_memoryFree (pCmdHndlr->hOs, pCmdHndlr->pCurrCmd, sizeof (TConfigCommand));
-        }
-
-        pCmdHndlr->pCurrCmd = NULL;
-
-        return;
-    }
-
-    TRACE0(pCmdHndlr->hReport, REPORT_SEVERITY_ERROR, "cmdHndlr_Complete(): pCurrCmd is NULL!\n");
-}
-
-
-/** 
- * \fn     cmdHndlr_GetStat
- * \brief  Get driver statistics
- * 
- * Get the driver statistics (Tx, Rx, signal quality).
- *
- * \note   
- * \param  hCmdHndlr - The object                                          
- * \return The driver statistics pointer 
- * \sa     
- */ 
-void * cmdHndlr_GetStat (TI_HANDLE hCmdHndlr)
-{
-    TCmdHndlrObj *pCmdHndlr = (TCmdHndlrObj *)hCmdHndlr;
-
-    return cmdInterpret_GetStat (pCmdHndlr->hCmdInterpret);
-}
-
-
-/** 
- * \fn     cmdHndlr_Enable & cmdHndlr_Disable
- * \brief  Enable/Disable invoking CmdHndlr module from driver-task
- * 
- * Called by the Driver-Main Init SM to enable/disable external inputs processing.
- * Calls the context-engine enable/disable function accordingly.
- *
- * \note   
- * \param  hCmdHndlr - The object                                          
- * \return void 
- * \sa     
- */ 
-void cmdHndlr_Enable (TI_HANDLE hCmdHndlr)
-{
-    TCmdHndlrObj *pCmdHndlr = (TCmdHndlrObj *)hCmdHndlr;
-
-    context_EnableClient (pCmdHndlr->hContext, pCmdHndlr->uContextId);
-}
-
-void cmdHndlr_Disable (TI_HANDLE hCmdHndlr)
-{
-    TCmdHndlrObj *pCmdHndlr = (TCmdHndlrObj *)hCmdHndlr;
-
-    context_DisableClient (pCmdHndlr->hContext, pCmdHndlr->uContextId);
-}
-
diff --git a/wl1271/stad/src/Ctrl_Interface/CmdHndlr.h b/wl1271/stad/src/Ctrl_Interface/CmdHndlr.h
deleted file mode 100644
index 886e7fe..0000000
--- a/wl1271/stad/src/Ctrl_Interface/CmdHndlr.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * CmdHndlr.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef CMD_H
-#define CMD_H
-
-#include "queue.h"
-#include "DrvMainModules.h"
-#include "WlanDrvIf.h"
-
-/* The configuration commands structure */
-typedef struct 
-{
-    TQueNodeHdr tQueNodeHdr;                            /* The header used for queueing the command */
-    TI_UINT32   cmd;
-    TI_UINT32   flags;
-    void       *buffer1;
-    TI_UINT32   buffer1_len;
-    void       *buffer2;
-    TI_UINT32   buffer2_len;
-    TI_UINT32  *param3;
-    TI_UINT32  *param4;
-    void       *pSignalObject;                          /* use to save handle to complete mechanism per OS */
-    void       *local_buffer;
-    TI_UINT32   local_buffer_len;
-    TI_UINT32   return_code;
-    TI_STATUS	eCmdStatus;                             /* (PEND / COMPLETE) */
-    TI_BOOL	    bWaitFlag; 	                            /* (TRUE / FALSE) */
-    /*
-     * TCmdRespUnion is defined for each OS:
-     * For Linx and WM that defined is empty.
-     * For OSE the new typedef includes all "Done" typedefs in union from EMP code (H files).
-     */
-    TI_UINT8	CmdRespBuffer[sizeof(TCmdRespUnion)];   
-} TConfigCommand;
-
-
-TI_HANDLE cmdHndlr_Create (TI_HANDLE hOs, TI_HANDLE hEvHandler);
-TI_STATUS cmdHndlr_Destroy (TI_HANDLE hCmdHndlr, TI_HANDLE hEvHandler);
-void      cmdHndlr_ClearQueue (TI_HANDLE hCmdHndlr);
-void      cmdHndlr_Init (TStadHandlesList *pStadHandles);
-TI_STATUS cmdHndlr_InsertCommand (TI_HANDLE     hCmdHndlr,
-                                  TI_UINT32     cmd,
-                                  TI_UINT32     flags,
-                                  void         *buffer1,
-                                  TI_UINT32     buffer1_len,
-                                  void         *buffer2,
-                                  TI_UINT32     buffer2_len,
-                                  TI_UINT32    *param3,
-                                  TI_UINT32    *param4);
-void      cmdHndlr_HandleCommands (TI_HANDLE hCmdHndlr);
-void      cmdHndlr_Complete (TI_HANDLE hCmdHndlr);
-void     *cmdHndlr_GetStat (TI_HANDLE hCmdHndlr);
-void      cmdHndlr_Enable  (TI_HANDLE hCmdHndlr);
-void      cmdHndlr_Disable (TI_HANDLE hCmdHndlr);
-
-#endif
diff --git a/wl1271/stad/src/Ctrl_Interface/CmdInterpret.h b/wl1271/stad/src/Ctrl_Interface/CmdInterpret.h
deleted file mode 100644
index 80b2a36..0000000
--- a/wl1271/stad/src/Ctrl_Interface/CmdInterpret.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * CmdInterpret.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-#ifndef CMDINTERPRET_H
-#define CMDINTERPRET_H
-
-/*  Command interpreter header file */
-
-TI_HANDLE cmdInterpret_Create (TI_HANDLE hOs);
-
-TI_STATUS cmdInterpret_Destroy (TI_HANDLE hCmdInterpret, TI_HANDLE hEvHandler);
-
-void cmdInterpret_Init (TI_HANDLE hCmdInterpret, TStadHandlesList *pStadHandles);
-
-int cmdInterpret_convertAndExecute (TI_HANDLE hCmdInterpret, TConfigCommand *cmdObj);
-
-int cmdInterpret_ServiceCompleteCB (TI_HANDLE hCmdInterpret, int status, void *buffer);
-
-void cmdInterpret_convertToOs (TI_HANDLE hCmdInterpret, TConfigCommand *cmdPtr);
-
-void *cmdInterpret_GetStat (TI_HANDLE hCmdInterpret);
-
-#endif
diff --git a/wl1271/stad/src/Ctrl_Interface/DrvMain.c b/wl1271/stad/src/Ctrl_Interface/DrvMain.c
deleted file mode 100644
index 3ce112d..0000000
--- a/wl1271/stad/src/Ctrl_Interface/DrvMain.c
+++ /dev/null
@@ -1,1766 +0,0 @@
-/*
- * DrvMain.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   DrvMain.c 
- *  \brief  The DrvMain module. Handles driver init, stop and recovery processes.
- *  
- *  \see    DrvMain.h
- */
-
-#define __FILE_ID__  FILE_ID_49
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "context.h"
-#include "timer.h"
-#include "CmdHndlr.h"
-#include "DrvMain.h"
-#include "scrApi.h"
-#include "EvHandler.h"
-#include "connApi.h"
-#include "siteMgrApi.h"
-#include "sme.h"
-#include "SoftGeminiApi.h"
-#include "roamingMngrApi.h"
-#include "qosMngr_API.h"
-#include "TrafficMonitor.h"
-#include "PowerMgr_API.h"
-#include "EvHandler.h"
-#include "apConn.h"
-#include "currBss.h"
-#include "SwitchChannelApi.h"
-#include "ScanCncn.h"
-#include "healthMonitor.h"
-#include "scanMngrApi.h"
-#include "regulatoryDomainApi.h"
-#include "measurementMgrApi.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#endif
-#include "TxnQueue.h"
-#include "TWDriver.h"
-#include "debug.h"
-#include "host_platform.h"
-#include "StaCap.h"
-#include "WlanDrvCommon.h"
-#include "DrvMainModules.h"
-#include "CmdDispatcher.h"
-
-
-#define SM_WATCHDOG_TIME_MS     20000  /* SM processes timeout is 20 sec. */
-
-#define SDIO_CONNECT_THRESHOLD  8
-
-/* This is used to prevent endless recovery loops */
-#define MAX_NUM_OF_RECOVERY_TRIGGERS 5
-
-/* Handle failure status from the SM callbacks by triggering the SM with FAILURE event */
-#define HANDLE_CALLBACKS_FAILURE_STATUS(hDrvMain, eStatus)      \
-            if (eStatus != TI_OK) { drvMain_SmEvent (hDrvMain, SM_EVENT_FAILURE);  return; }
-    
-/* The DrvMain SM states */
-typedef enum
-{
-    /*  0 */ SM_STATE_IDLE,
-    /*  1 */ SM_STATE_WAIT_INI_FILE,
-    /*  2 */ SM_STATE_WAIT_NVS_FILE,
-    /*  3 */ SM_STATE_HW_INIT,
-    /*  4 */ SM_STATE_DOWNLOAD_FW_FILE,
-    /*  5 */ SM_STATE_WAIT_FW_FILE,
-    /*  6 */ SM_STATE_FW_INIT,
-    /*  7 */ SM_STATE_FW_CONFIG,
-    /*  8 */ SM_STATE_OPERATIONAL,  
-    /*  9 */ SM_STATE_DISCONNECTING,
-    /* 10 */ SM_STATE_STOPPING,     
-    /* 11 */ SM_STATE_STOPPED,      
-    /* 12 */ SM_STATE_STOPPING_ON_FAIL,       
-    /* 13 */ SM_STATE_FAILED        
-
-} ESmState;
-
-/* The DrvMain SM events */
-typedef enum
-{
-    /*  0 */ SM_EVENT_START,
-    /*  1 */ SM_EVENT_INI_FILE_READY,
-    /*  2 */ SM_EVENT_NVS_FILE_READY,
-    /*  3 */ SM_EVENT_HW_INIT_COMPLETE,
-    /*  4 */ SM_EVENT_FW_FILE_READY,
-    /*  5 */ SM_EVENT_FW_INIT_COMPLETE,
-    /*  6 */ SM_EVENT_FW_CONFIG_COMPLETE,
-    /*  7 */ SM_EVENT_STOP,          
-    /*  8 */ SM_EVENT_RECOVERY,      
-    /*  9 */ SM_EVENT_DISCONNECTED,  
-    /* 10 */ SM_EVENT_STOP_COMPLETE, 
-    /* 11 */ SM_EVENT_FAILURE
-
-} ESmEvent;
-
-/* The module's object */
-typedef struct
-{
-    TStadHandlesList  tStadHandles; /* All STAD modules handles (distributed in driver init process) */
-	TI_BOOL           bRecovery;    /* Indicates if we are during recovery process */
-	TI_UINT32         uNumOfRecoveryAttempts;    /* Indicates if we are during recovery process */
-	ESmState          eSmState;     /* The DrvMain SM state. */
-	ESmEvent          ePendingEvent;/* A pending event issued when the SM is busy */
-    TI_UINT32         uPendingEventsCount; /* Counts the number of events pending for SM execution */
-    TFileInfo         tFileInfo;    /* Information of last file retrieved by os_GetFile() */
-    TI_UINT32         uContextId;   /* ID allocated to this module on registration to context module */
-    EActionType       eAction;      /* The last action (start/stop) inserted to the driver */
-    void             *hSignalObj;   /* The signal object used for waiting for action completion */
-    TBusDrvCfg        tBusDrvCfg;   /* A union (struc per each supported bus type) for the bus driver configuration */
-    TI_UINT32         uRxDmaBufLen; /* The bus driver Rx DMA buffer length (needed as a limit for Rx aggregation length) */
-    TI_UINT32         uTxDmaBufLen; /* The bus driver Tx DMA buffer length (needed as a limit for Tx aggregation length) */
-
-} TDrvMain;
-
-
-static void drvMain_Init (TI_HANDLE hDrvMain);
-static void drvMain_InitHwCb (TI_HANDLE hDrvMain, TI_STATUS eStatus);
-static void drvMain_InitFwCb (TI_HANDLE hDrvMain, TI_STATUS eStatus);
-static void drvMain_ConfigFwCb (TI_HANDLE hDrvMain, TI_STATUS eStatus);
-static void drvMain_TwdStopCb (TI_HANDLE hDrvMain, TI_STATUS eStatus);
-static void drvMain_InitFailCb (TI_HANDLE hDrvMain, TI_STATUS eStatus);
-static void drvMain_InitLocals (TDrvMain *pDrvMain);
-/* static void drvMain_SmWatchdogTimeout (TI_HANDLE hDrvMain); */
-static void drvMain_SmEvent (TI_HANDLE hDrvMain, ESmEvent eEvent);
-static void drvMain_Sm (TI_HANDLE hDrvMain, ESmEvent eEvent);
-
-/* External functions prototypes */
-
-/** \brief WLAN Driver I/F Get file
- * 
- * \param  hOs         - OS module object handle
- * \param  pFileInfo   - Pointer to output file information
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * This function provides access to a requested init file:
- * It provides the requested file information and call the requester callback.
- * Note that in Linux the files were previously loaded to driver memory by the loader
- * 
- * \sa
- */ 
-extern int  wlanDrvIf_GetFile (TI_HANDLE hOs, TFileInfo *pFileInfo);
-/** \brief WLAN Driver I/F Update Driver State
- * 
- * \param  hOs          - OS module object handle
- * \param  eDriverState - New Driver State
- * \return void
- * 
- * \par Description
- * This function Update the driver state (Idle | Running | Stopped |Failed):
- * 
- * \sa
- */
-extern void wlanDrvIf_UpdateDriverState (TI_HANDLE hOs, EDriverSteadyState eDriverState);
-/** \brief WLAN Driver I/F Set MAC Address
- * 
- * \param  hOs          - OS module object handle
- * \param  pMacAddr     - Pointer to MAC address to set
- * \return void
- * 
- * \par Description
- * This function Update the driver MAC address by copy it to the network interface structure
- * 
- * \sa
- */
-extern void wlanDrvIf_SetMacAddress (TI_HANDLE hOs, TI_UINT8 *pMacAddr);
-/** \brief OS Init Table INI File
- * 
- * \param  hOs              - OS module object handle
- * \param  InitTable        - Pointer to initialization table
- * \param  file_buf         - Pointer to Input buffer from INI file
- * \param  file_length      - Length of input buffer from INI file
- * \return void
- * 
- * \par Description
- * This function perform Initializing of init table accrding to data from INI file and driver defaults
- * 
- * \sa
- */
-extern int  osInitTable_IniFile (TI_HANDLE hOs, TInitTable *InitTable, char *file_buf, int file_length);
-
-
-
-/* 
- * \fn     drvMain_Create
- * \brief  Create the driver modules
- * 
- * Create all STAD and TWD modules.
- * Then call all modules init functions which initializes their handles and variables.
- * 
- * \note   
- * \param  hOs          - Handle to the Os Abstraction Layer                           
- * \param  pDrvMainHndl - Pointer for returning the DrvMain handle.                      
- * \param  pCmdHndlr    - Pointer for returning the CmdHndlr handle.                      
- * \param  pContext     - Pointer for returning the Context handle.                      
- * \param  pTxDataQ     - Pointer for returning the TxDataQ handle.                      
- * \param  pTxMgmtQ     - Pointer for returning the TxMgmtQ handle.                      
- * \param  pTxCtrl      - Pointer for returning the TxCtrl handle.                      
- * \param  pTwd         - Pointer for returning the TWD handle.                      
- * \param  pEvHandler   - Pointer for returning the EvHndler handle.                      
- * \return Handle to the DrvMain module (NULL if failed) 
- * \sa     
- */ 
-TI_STATUS drvMain_Create (TI_HANDLE  hOs, 
-                          TI_HANDLE *pDrvMainHndl, 
-                          TI_HANDLE *pCmdHndlr, 
-                          TI_HANDLE *pContext, 
-                          TI_HANDLE *pTxDataQ, 
-                          TI_HANDLE *pTxMgmtQ,
-                          TI_HANDLE *pTxCtrl,
-                          TI_HANDLE *pTwd,
-                          TI_HANDLE *pEvHandler,
-		                  TI_HANDLE *pCmdDispatch,
-                          TI_HANDLE *pReport)
-{
-    /* Create the DrvMain module object. */
-    TDrvMain *pDrvMain = (TDrvMain *) os_memoryAlloc (hOs, sizeof(TDrvMain));
-
-    if (pDrvMain == NULL) 
-    {
-        return TI_NOK;
-    }
-
-    os_memoryZero (hOs, (void *)pDrvMain, sizeof(TDrvMain));
-
-    pDrvMain->tStadHandles.hDrvMain = (TI_HANDLE)pDrvMain;
-    pDrvMain->tStadHandles.hOs = hOs;
-
-/* 
- *   Create all driver modules
- *   =========================
- */
-
-    pDrvMain->tStadHandles.hContext = context_Create (hOs);
-    if (pDrvMain->tStadHandles.hContext == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hTimer = tmr_Create (hOs);
-    if (pDrvMain->tStadHandles.hTimer == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hSCR = scr_create (hOs);
-    if (pDrvMain->tStadHandles.hSCR == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hTxnQ = txnQ_Create (hOs);
-    if (pDrvMain->tStadHandles.hTxnQ == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hEvHandler = EvHandler_Create (hOs);
-    if (pDrvMain->tStadHandles.hEvHandler == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hReport = report_Create (hOs);
-    if (pDrvMain->tStadHandles.hReport == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hConn = conn_create (hOs);
-    if (pDrvMain->tStadHandles.hConn == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hScanCncn = scanCncn_Create (hOs);
-    if (pDrvMain->tStadHandles.hScanCncn == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hSme = sme_Create (hOs);
-    if (pDrvMain->tStadHandles.hSme == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hSiteMgr = siteMgr_create (hOs);
-    if (pDrvMain->tStadHandles.hSiteMgr == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hMlmeSm = mlme_create (hOs);
-    if (pDrvMain->tStadHandles.hMlmeSm == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hAuth = auth_create (hOs);
-    if (pDrvMain->tStadHandles.hAuth == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hAssoc = assoc_create (hOs);
-    if (pDrvMain->tStadHandles.hAssoc == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hRxData = rxData_create (hOs);
-    if (pDrvMain->tStadHandles.hRxData == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hTxCtrl = txCtrl_Create (hOs);
-    if (pDrvMain->tStadHandles.hTxCtrl == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hTxDataQ = txDataQ_Create(hOs);
-    if (pDrvMain->tStadHandles.hTxDataQ == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hTxMgmtQ = txMgmtQ_Create(hOs);
-    if (pDrvMain->tStadHandles.hTxMgmtQ == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hTxPort = txPort_create (hOs);
-    if (pDrvMain->tStadHandles.hTxPort == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hCtrlData = ctrlData_create (hOs);
-    if (pDrvMain->tStadHandles.hCtrlData == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hTrafficMon = TrafficMonitor_create (hOs);
-    if (pDrvMain->tStadHandles.hTrafficMon == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hRsn = rsn_create (hOs);
-    if (pDrvMain->tStadHandles.hRsn == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hRegulatoryDomain = regulatoryDomain_create (hOs);
-    if (pDrvMain->tStadHandles.hRegulatoryDomain == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hMeasurementMgr = measurementMgr_create (hOs);
-    if (pDrvMain->tStadHandles.hMeasurementMgr == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hSoftGemini = SoftGemini_create (hOs);
-    if (pDrvMain->tStadHandles.hSoftGemini == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-#ifdef XCC_MODULE_INCLUDED
-    pDrvMain->tStadHandles.hXCCMngr = XCCMngr_create (hOs);
-    if (pDrvMain->tStadHandles.hXCCMngr == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-#else
-    pDrvMain->tStadHandles.hXCCMngr = NULL;
-#endif
-
-    pDrvMain->tStadHandles.hRoamingMngr = roamingMngr_create (hOs);
-    if (pDrvMain->tStadHandles.hRoamingMngr == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hAPConnection = apConn_create (hOs);
-    if (pDrvMain->tStadHandles.hAPConnection == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hCurrBss = currBSS_create (hOs);
-    if (pDrvMain->tStadHandles.hCurrBss == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hQosMngr = qosMngr_create (hOs);
-    if (pDrvMain->tStadHandles.hQosMngr == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hPowerMgr = PowerMgr_create (hOs);
-    if (pDrvMain->tStadHandles.hPowerMgr == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hSwitchChannel = switchChannel_create (hOs);
-    if (pDrvMain->tStadHandles.hSwitchChannel == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hScanMngr = scanMngr_create (hOs);
-    if (NULL == pDrvMain->tStadHandles.hScanMngr)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hHealthMonitor = healthMonitor_create (hOs);
-    if (NULL == pDrvMain->tStadHandles.hHealthMonitor)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hTWD = TWD_Create (hOs);
-    if (pDrvMain->tStadHandles.hTWD == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hCmdHndlr = cmdHndlr_Create (hOs, pDrvMain->tStadHandles.hEvHandler);
-    if (pDrvMain->tStadHandles.hCmdHndlr == NULL) 
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hCmdDispatch = cmdDispatch_Create (hOs);
-    if (pDrvMain->tStadHandles.hCmdDispatch == NULL) 
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    pDrvMain->tStadHandles.hStaCap = StaCap_Create (hOs);
-    if (pDrvMain->tStadHandles.hStaCap == NULL)
-    {
-        drvMain_Destroy (pDrvMain);
-        return TI_NOK;
-    }
-
-    /* Bind all modules handles */
-    drvMain_Init ((TI_HANDLE)pDrvMain);
-
-
-    /* Provide required handles to the OAL */
-    *pDrvMainHndl = (TI_HANDLE)pDrvMain;
-    *pCmdHndlr    = pDrvMain->tStadHandles.hCmdHndlr;
-    *pContext     = pDrvMain->tStadHandles.hContext;
-    *pTxDataQ     = pDrvMain->tStadHandles.hTxDataQ;
-    *pTxMgmtQ     = pDrvMain->tStadHandles.hTxMgmtQ;
-    *pTxCtrl      = pDrvMain->tStadHandles.hTxCtrl;
-    *pTwd         = pDrvMain->tStadHandles.hTWD;
-    *pEvHandler   = pDrvMain->tStadHandles.hEvHandler;
-    *pReport      = pDrvMain->tStadHandles.hReport;
-    *pCmdDispatch = pDrvMain->tStadHandles.hCmdDispatch;
-
-    WLAN_INIT_REPORT (("drvMain_Create: success\n"));
-
-    return TI_OK;
-}
-
-/* 
- * \fn     drvMain_Destroy
- * \brief  Destroy driver
- * 
- * Destroy all STAD and TWD modules and resources.
- * 
- * \note   
- * \param  hDrvMain - The DrvMain object
- * \return TI_OK if succeeded, TI_NOK if failed. 
- * \sa     drvMain_Create
- */ 
-TI_STATUS drvMain_Destroy (TI_HANDLE  hDrvMain)
-{
-    TDrvMain *pDrvMain = (TDrvMain *)hDrvMain;
-
-    hPlatform_Wlan_Hardware_DeInit ();
-
-    if (pDrvMain == NULL) 
-    {
-        return TI_NOK;
-    }
-
-    if (pDrvMain->tStadHandles.hScanMngr != NULL)
-    {
-        scanMngr_unload (pDrvMain->tStadHandles.hScanMngr);
-    }
-
-    if (pDrvMain->tStadHandles.hSiteMgr != NULL)
-    {
-        siteMgr_unLoad (pDrvMain->tStadHandles.hSiteMgr);
-    }
-
-    if (pDrvMain->tStadHandles.hSme != NULL)
-    {
-        sme_Destroy (pDrvMain->tStadHandles.hSme);
-    }
-
-    if (pDrvMain->tStadHandles.hConn != NULL)
-    {
-        conn_unLoad (pDrvMain->tStadHandles.hConn);
-    }
-
-    if (pDrvMain->tStadHandles.hTWD != NULL)
-    {
-        TWD_Destroy (pDrvMain->tStadHandles.hTWD);
-    }
-
-    if (pDrvMain->tStadHandles.hScanCncn != NULL)
-    {
-        scanCncn_Destroy (pDrvMain->tStadHandles.hScanCncn);
-    }
-
-    if (pDrvMain->tStadHandles.hTrafficMon != NULL)
-    {
-        TrafficMonitor_Destroy (pDrvMain->tStadHandles.hTrafficMon);
-    }
-
-    if (pDrvMain->tStadHandles.hCtrlData != NULL)
-    {
-        ctrlData_unLoad (pDrvMain->tStadHandles.hCtrlData);
-    }
-
-    if (pDrvMain->tStadHandles.hTxCtrl != NULL)
-    {
-        txCtrl_Unload (pDrvMain->tStadHandles.hTxCtrl);
-    }
-
-    if (pDrvMain->tStadHandles.hTxDataQ != NULL)
-    {
-        txDataQ_Destroy (pDrvMain->tStadHandles.hTxDataQ);
-    }
-
-    if (pDrvMain->tStadHandles.hTxMgmtQ != NULL)
-    {
-        txMgmtQ_Destroy (pDrvMain->tStadHandles.hTxMgmtQ);
-    }
-
-    if (pDrvMain->tStadHandles.hTxPort != NULL)
-    {
-        txPort_unLoad (pDrvMain->tStadHandles.hTxPort);
-    }
-
-    if (pDrvMain->tStadHandles.hRxData != NULL)
-    {
-        rxData_unLoad (pDrvMain->tStadHandles.hRxData);
-    }
-
-    if (pDrvMain->tStadHandles.hAssoc != NULL)
-    {
-        assoc_unload (pDrvMain->tStadHandles.hAssoc);
-    }
-
-    if (pDrvMain->tStadHandles.hAuth != NULL)
-    {
-        auth_unload (pDrvMain->tStadHandles.hAuth);
-    }
-
-    if (pDrvMain->tStadHandles.hMlmeSm != NULL)
-    {
-        mlme_unload (pDrvMain->tStadHandles.hMlmeSm);
-    }
-
-    if (pDrvMain->tStadHandles.hSCR != NULL)
-    {
-        scr_release (pDrvMain->tStadHandles.hSCR);
-    }
-
-
-    if (pDrvMain->tStadHandles.hRsn != NULL)
-    {
-        rsn_unload (pDrvMain->tStadHandles.hRsn);
-    }
-
-    if (pDrvMain->tStadHandles.hRegulatoryDomain != NULL)
-    {
-        regulatoryDomain_destroy (pDrvMain->tStadHandles.hRegulatoryDomain);
-    }
-
-    if (pDrvMain->tStadHandles.hMeasurementMgr != NULL)
-    {
-        measurementMgr_destroy (pDrvMain->tStadHandles.hMeasurementMgr);
-    }
-
-    if (pDrvMain->tStadHandles.hSoftGemini != NULL)
-    {
-        SoftGemini_destroy (pDrvMain->tStadHandles.hSoftGemini);
-    }
-
-#ifdef XCC_MODULE_INCLUDED
-    if (pDrvMain->tStadHandles.hXCCMngr != NULL)
-    {
-        XCCMngr_unload (pDrvMain->tStadHandles.hXCCMngr);
-    }
-#endif
-
-    if (pDrvMain->tStadHandles.hRoamingMngr != NULL)
-    {
-        roamingMngr_unload (pDrvMain->tStadHandles.hRoamingMngr);
-    }
-
-    if (pDrvMain->tStadHandles.hQosMngr != NULL)
-    {
-        qosMngr_destroy (pDrvMain->tStadHandles.hQosMngr);
-    }
-
-    if (pDrvMain->tStadHandles.hPowerMgr != NULL)
-    {
-        PowerMgr_destroy (pDrvMain->tStadHandles.hPowerMgr);
-    }
-
-    if (pDrvMain->tStadHandles.hAPConnection != NULL)
-    {
-        apConn_unload (pDrvMain->tStadHandles.hAPConnection);
-    }
-
-    if (pDrvMain->tStadHandles.hCurrBss != NULL)
-    {
-        currBSS_unload (pDrvMain->tStadHandles.hCurrBss);
-    }
-
-    if (pDrvMain->tStadHandles.hSwitchChannel != NULL)
-    {
-        switchChannel_unload (pDrvMain->tStadHandles.hSwitchChannel);
-    }
-
-    if (pDrvMain->tStadHandles.hHealthMonitor != NULL)
-    {
-        healthMonitor_unload (pDrvMain->tStadHandles.hHealthMonitor);
-    }
-
-    if (pDrvMain->tStadHandles.hCmdHndlr && pDrvMain->tStadHandles.hEvHandler)
-    {
-        cmdHndlr_Destroy (pDrvMain->tStadHandles.hCmdHndlr, pDrvMain->tStadHandles.hEvHandler);
-    }
-
-    if (pDrvMain->tStadHandles.hEvHandler != NULL)
-    {
-         EvHandlerUnload (pDrvMain->tStadHandles.hEvHandler);
-    }
-
-    if (pDrvMain->tStadHandles.hCmdDispatch) 
-    {
-        cmdDispatch_Destroy (pDrvMain->tStadHandles.hCmdDispatch);
-    }
-
-    if (pDrvMain->tStadHandles.hTxnQ != NULL)
-    {
-        txnQ_Destroy (pDrvMain->tStadHandles.hTxnQ);
-    }
-    /* Note: The Timer module must be destroyed last, so all created timers are already destroyed!! */
-    if (pDrvMain->tStadHandles.hTimer != NULL)
-    {
-        tmr_Destroy (pDrvMain->tStadHandles.hTimer);
-    }
-
-    /* Note: Moved after timers for locks */
-    if (pDrvMain->tStadHandles.hContext != NULL)
-    {
-        context_Destroy (pDrvMain->tStadHandles.hContext);
-    }
-
-    if (pDrvMain->tStadHandles.hStaCap != NULL)
-    {
-        StaCap_Destroy (pDrvMain->tStadHandles.hStaCap);
-    }
-
-    if (pDrvMain->tStadHandles.hReport != NULL)
-    {
-        report_Unload (pDrvMain->tStadHandles.hReport);
-    }
-
-    /* Destroy the DrvMain object */
-    os_memoryFree (pDrvMain->tStadHandles.hOs, hDrvMain, sizeof(TDrvMain));
-
-    return TI_OK;
-}
-
-void drvMain_SmeStop (TI_HANDLE hDrvMain)
-{
-    drvMain_SmEvent (hDrvMain, SM_EVENT_DISCONNECTED);
-}
-
-
-/* 
- * \fn     drvMain_Init
- * \brief  Init driver modules
- * 
- * Called from OS context following the driver creation.
- * Calls all STAD and TWD modules Init functions, which are saving other modules handles,
- *     registering to other modules and initializing their variables.
- * 
- * \note   
- * \param  hDrvMain - The DrvMain object
- * \return void 
- * \sa     drvMain_Create
- */ 
-static void drvMain_Init (TI_HANDLE hDrvMain)
-{
-    TDrvMain    *pDrvMain = (TDrvMain *) hDrvMain;
-    TStadHandlesList *pModules = &pDrvMain->tStadHandles; /* The STAD modules handles list */
-
-    /* 
-     *  Init all modules handles, variables and registries 
-     */
-    context_Init (pModules->hContext, pModules->hOs, pModules->hReport);
-    tmr_Init (pModules->hTimer, pModules->hOs, pModules->hReport, pModules->hContext);
-    txnQ_Init (pModules->hTxnQ, pModules->hOs, pModules->hReport, pModules->hContext);
-    scr_init (pModules);
-    conn_init (pModules);
-    ctrlData_init (pModules,
-                 #ifdef XCC_MODULE_INCLUDED
-                   XCCMngr_LinkTestRetriesUpdate, pModules->hXCCMngr);
-                 #else
-                   NULL, NULL);
-                 #endif                 
-    siteMgr_init (pModules);
-    regulatoryDomain_init (pModules);
-    scanCncn_Init (pModules);
-    auth_init (pModules);
-    mlme_init (pModules);    
-    assoc_init (pModules);
-    rxData_init (pModules);
-    txCtrl_Init (pModules);
-    txDataQ_Init (pModules);
-    txMgmtQ_Init (pModules);
-    txPort_init (pModules);
-    TrafficMonitor_Init (pModules, 1000 /* pInitTable->trafficMonitorMinIntervalPercentage */);
-    sme_Init (pModules);
-    rsn_init (pModules);
-    measurementMgr_init (pModules);
-#ifdef XCC_MODULE_INCLUDED
-    XCCMngr_init (pModules);
-#endif
-    scanMngr_init (pModules);
-    currBSS_init (pModules); 
-    apConn_init (pModules);
-    roamingMngr_init (pModules);
-    qosMngr_init (pModules);
-    switchChannel_init (pModules);
-    healthMonitor_init (pModules);
-    PowerMgr_init (pModules);
-    SoftGemini_init (pModules);                                                                                
-    cmdDispatch_Init (pModules);                                                                                
-    StaCap_Init (pModules);                                                                 
-    cmdHndlr_Init (pModules);
-
-    /* Init TWD component (handles, variables and registries) and provide callbacks for next steps */
-    TWD_Init (pModules->hTWD,
-              pModules->hReport,
-              pModules->hDrvMain,
-              pModules->hTimer,
-              pModules->hContext,
-              pModules->hTxnQ,
-              (TTwdCallback)drvMain_InitHwCb,
-              (TTwdCallback)drvMain_InitFwCb,
-              (TTwdCallback)drvMain_ConfigFwCb,
-              (TTwdCallback)drvMain_TwdStopCb,
-              (TTwdCallback)drvMain_InitFailCb);
-
-    /* Init DrvMain module local variables */
-    drvMain_InitLocals (pDrvMain);
-}
-
-
-/* 
- * \fn     drvMain_SetDefaults
- * \brief  Set driver default configuration
- * 
- * Configure all STAD and TWD modules with their default settings from the ini-file.
- * Timers creation is also done at this stage.
- * 
- * \note   
- * \param  hDrvMain - The DrvMain object
- * \param  pBuf     - The ini-file data.
- * \param  uLength  - The ini-file length.
- * \return TI_OK if succeeded, TI_NOK if failed. 
- * \sa     drvMain_Init
- */ 
-static TI_STATUS drvMain_SetDefaults (TI_HANDLE hDrvMain, TI_UINT8 *pBuf, TI_UINT32 uLength)
-{
-    TDrvMain   *pDrvMain = (TDrvMain *) hDrvMain;
-    TInitTable *pInitTable;
-    TI_STATUS   eStatus;
-
-    pInitTable = os_memoryAlloc (pDrvMain->tStadHandles.hOs, sizeof(TInitTable));
-
-    /* Parse defaults */
-    eStatus = osInitTable_IniFile (pDrvMain->tStadHandles.hOs, pInitTable, (char*)pBuf, (int)uLength);
-
-    /*
-     *  Configure modules with their default settings
-     */
-    report_SetDefaults (pDrvMain->tStadHandles.hReport, &pInitTable->tReport);
-    context_SetDefaults (pDrvMain->tStadHandles.hContext, &pInitTable->tContextInitParams);
-    TWD_SetDefaults (pDrvMain->tStadHandles.hTWD, &pInitTable->twdInitParams);
-    conn_SetDefaults (pDrvMain->tStadHandles.hConn, &pInitTable->connInitParams);
-    ctrlData_SetDefaults (pDrvMain->tStadHandles.hCtrlData, &pInitTable->ctrlDataInitParams);
-    regulatoryDomain_SetDefaults (pDrvMain->tStadHandles.hRegulatoryDomain, &pInitTable->regulatoryDomainInitParams);
-    scanCncn_SetDefaults (pDrvMain->tStadHandles.hScanCncn, &pInitTable->tScanCncnInitParams);
-    auth_SetDefaults (pDrvMain->tStadHandles.hAuth, &pInitTable->authInitParams);
-    assoc_SetDefaults (pDrvMain->tStadHandles.hAssoc, &pInitTable->assocInitParams);
-    rxData_SetDefaults (pDrvMain->tStadHandles.hRxData, &pInitTable->rxDataInitParams);
-    sme_SetDefaults (pDrvMain->tStadHandles.hSme, &pInitTable->tSmeModifiedInitParams, &pInitTable->tSmeInitParams);
-    rsn_SetDefaults (pDrvMain->tStadHandles.hRsn, &pInitTable->rsnInitParams);
-    measurementMgr_SetDefaults (pDrvMain->tStadHandles.hMeasurementMgr, &pInitTable->measurementInitParams);
-#ifdef XCC_MODULE_INCLUDED
-    XCCMngr_SetDefaults (pDrvMain->tStadHandles.hXCCMngr, &pInitTable->XCCMngrParams);
-#endif /*XCC_MODULE_INCLUDED*/
-    apConn_SetDefaults (pDrvMain->tStadHandles.hAPConnection, &pInitTable->apConnParams);
-    qosMngr_SetDefaults (pDrvMain->tStadHandles.hQosMngr, &pInitTable->qosMngrInitParams);
-    switchChannel_SetDefaults (pDrvMain->tStadHandles.hSwitchChannel, &pInitTable->SwitchChannelInitParams);
-    healthMonitor_SetDefaults (pDrvMain->tStadHandles.hHealthMonitor, &pInitTable->healthMonitorInitParams);
-    PowerMgr_SetDefaults (pDrvMain->tStadHandles.hPowerMgr, &pInitTable->PowerMgrInitParams);
-    SoftGemini_SetDefaults (pDrvMain->tStadHandles.hSoftGemini, &pInitTable->SoftGeminiInitParams);
-    txDataQ_SetDefaults (pDrvMain->tStadHandles.hTxDataQ, &pInitTable->txDataInitParams);
-    txCtrl_SetDefaults (pDrvMain->tStadHandles.hTxCtrl, &pInitTable->txDataInitParams);
-    currBSS_SetDefaults (pDrvMain->tStadHandles.hCurrBss, &pInitTable->tCurrBssInitParams);
-    mlme_SetDefaults (pDrvMain->tStadHandles.hMlmeSm, &pInitTable->tMlmeInitParams);
-
-    scanMngr_SetDefaults(pDrvMain->tStadHandles.hScanMngr, &pInitTable->tRoamScanMngrInitParams);
-    roamingMngr_setDefaults(pDrvMain->tStadHandles.hRoamingMngr, &pInitTable->tRoamScanMngrInitParams);
-
-    /* Note: The siteMgr_SetDefaults includes many settings that relate to other modules so keep it last!! */ 
-    siteMgr_SetDefaults (pDrvMain->tStadHandles.hSiteMgr, &pInitTable->siteMgrInitParams);
-
-    /* Set DrvMain local defaults */
-    pDrvMain->tBusDrvCfg.tSdioCfg.uBlkSizeShift         = pInitTable->tDrvMainParams.uSdioBlkSizeShift;
-    pDrvMain->tBusDrvCfg.tSdioCfg.uBusDrvThreadPriority = pInitTable->tDrvMainParams.uBusDrvThreadPriority;
-    os_SetDrvThreadPriority (pDrvMain->tStadHandles.hOs, pInitTable->tDrvMainParams.uWlanDrvThreadPriority);
-
-    /* Release the init table memory */
-    os_memoryFree (pDrvMain->tStadHandles.hOs, pInitTable, sizeof(TInitTable));
-
-    return eStatus;
-}
- 
-
-/* 
- * \fn     drvMain_xxx...Cb
- * \brief  Callback functions for the init/stop stages completion
- *
- * The following callback functions are called from other modules (most from TWD)
- *     when the current init/stop step is completed.
- * Note that the callbacks are called anyway, either in the original context (if completed), or
- *     in another context if pending. 
- * The first case (same context) may lead to a recursion of the SM, so a special handling is added
- *     to the SM to prevent recursion (see drvMain_Sm).
- * 
- * drvMain_InitHwCb   - HW init completion callback
- * drvMain_InitFwCb   - FW init (mainly download) completion callback
- * drvMain_ConfigFwCb - FW configuration completion callback
- * drvMain_TwdStopCb  - TWD stopping completion callback
- * drvMain_InitFailCb - FW init faulty completion callback
- * drvMain_SmeStopCb  - SME stopping completion callback
- * drvMain_GetFileCb  - Getting-file completion callback
- * 
- * \note   
- * \param  hDrvMain - The DrvMain object
- * \param  eStatus  - The process result (TI_OK if succeeded, TI_NOK if failed)
- * \return void 
- * \sa     drvMain_Create
- */ 
-static void drvMain_InitHwCb (TI_HANDLE hDrvMain, TI_STATUS eStatus)
-{
-    HANDLE_CALLBACKS_FAILURE_STATUS(hDrvMain, eStatus);
-    drvMain_SmEvent (hDrvMain, SM_EVENT_HW_INIT_COMPLETE);
-}
-
-static void drvMain_InitFwCb (TI_HANDLE hDrvMain, TI_STATUS eStatus)
-{
-    HANDLE_CALLBACKS_FAILURE_STATUS(hDrvMain, eStatus);
-    drvMain_SmEvent (hDrvMain, SM_EVENT_FW_INIT_COMPLETE);
-}
-
-static void drvMain_ConfigFwCb (TI_HANDLE hDrvMain, TI_STATUS eStatus)
-{
-    HANDLE_CALLBACKS_FAILURE_STATUS(hDrvMain, eStatus);
-    drvMain_SmEvent (hDrvMain, SM_EVENT_FW_CONFIG_COMPLETE);
-}
-
-static void drvMain_TwdStopCb (TI_HANDLE hDrvMain, TI_STATUS eStatus)
-{
-    HANDLE_CALLBACKS_FAILURE_STATUS(hDrvMain, eStatus);
-    drvMain_SmEvent (hDrvMain, SM_EVENT_STOP_COMPLETE);
-}
-
-static void drvMain_InitFailCb (TI_HANDLE hDrvMain, TI_STATUS eStatus)
-{
-    drvMain_SmEvent (hDrvMain, SM_EVENT_FAILURE);
-    /* 
-     * Note that this call will pass the SM to the FAILED state, since this event 
-     *     is not handled by any state.
-     */
-}
-
-static void drvMain_InvokeAction (TI_HANDLE hDrvMain)
-{
-    TDrvMain *pDrvMain = (TDrvMain *)hDrvMain;
-
-    switch (pDrvMain->eAction)
-    {
-    case ACTION_TYPE_START:
-        drvMain_SmEvent (hDrvMain, SM_EVENT_START);
-        break;
-    case ACTION_TYPE_STOP:
-        drvMain_SmEvent (hDrvMain, SM_EVENT_STOP);
-        break;
-        default:    
-            TRACE1(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_ERROR , "drvMain_InvokeAction(): Action=%d\n", pDrvMain->eAction);
-    }
-}
-
-static void drvMain_GetFileCb (TI_HANDLE hDrvMain)
-{
-    TDrvMain *pDrvMain = (TDrvMain *)hDrvMain;
-    ESmEvent  eSmEvent;
-
-    switch (pDrvMain->tFileInfo.eFileType)
-    {
-        case FILE_TYPE_INI:     eSmEvent = SM_EVENT_INI_FILE_READY;    break;
-        case FILE_TYPE_NVS:     eSmEvent = SM_EVENT_NVS_FILE_READY;    break;
-        case FILE_TYPE_FW:      eSmEvent = SM_EVENT_FW_FILE_READY;     break;
-        case FILE_TYPE_FW_NEXT: eSmEvent = SM_EVENT_FW_FILE_READY;     break;
-        default:    
-            TRACE1(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_ERROR , "drvMain_GetFileCb(): Unknown eFileType=%d\n", pDrvMain->tFileInfo.eFileType);
-            return;
-    }
-    drvMain_SmEvent (hDrvMain, eSmEvent);
-}
-
-
-/*
- * \fn     drvMain_InitLocals
- * \brief  Init DrvMain module
- * 
- * Init the DrvMain variables, register to other modules and set device power to off.
- * 
- * \note   
- * \param  pDrvMain - The DrvMain object
- * \return void 
- * \sa     drvMain_Init
- */ 
-static void drvMain_InitLocals (TDrvMain *pDrvMain)
-{
-    /* Initialize the module's local varniables to default values */
-    pDrvMain->tFileInfo.eFileType   = FILE_TYPE_INI;
-    pDrvMain->tFileInfo.fCbFunc     = drvMain_GetFileCb;
-    pDrvMain->tFileInfo.hCbHndl     = (TI_HANDLE)pDrvMain;
-    pDrvMain->eSmState              = SM_STATE_IDLE;
-    pDrvMain->uPendingEventsCount   = 0;
-	pDrvMain->bRecovery             = TI_FALSE; 
-	pDrvMain->uNumOfRecoveryAttempts = 0;
-	pDrvMain->eAction               = ACTION_TYPE_NONE; 
-
-    /* Register the Action callback to the context engine and get the client ID */
-    pDrvMain->uContextId = context_RegisterClient (pDrvMain->tStadHandles.hContext,
-                                                   drvMain_InvokeAction,
-                                                   (TI_HANDLE)pDrvMain,
-                                                   TI_TRUE,
-                                                   "ACTION",
-                                                   sizeof("ACTION"));
-
-    /* Platform specific HW preparations */
-	hPlatform_Wlan_Hardware_Init(pDrvMain->tStadHandles.hOs);
-
-    /* Insure that device power is off (expected to be) */
-    hPlatform_DevicePowerOff ();
-}
-
-
-/* 
- * \fn     drvMain_InitHw & drvMain_InitFw
- * \brief  Init HW and Init FW sequences
- * 
- * drvMain_InitHw - HW init sequence which writes and reads some HW registers
- *                      that are needed prior to FW download.
- * drvMain_InitFw - FW init sequence which downloads the FW image and waits for 
- *                      FW init-complete indication.
- * 
- * \note   
- * \param  hDrvMain - The DrvMain object
- * \param  pBuf     - The file data (NVS for HW-init, FW-Image for FW-init).
- * \param  uLength  - The file length.
- * \return TI_OK if succeeded, TI_NOK if failed. 
- * \sa     
- */ 
-static TI_STATUS drvMain_InitHw (TI_HANDLE hDrvMain, TI_UINT8 *pbuf, TI_UINT32 uLength)
-{
-    TDrvMain   *pDrvMain = (TDrvMain *) hDrvMain;
-
-    return TWD_InitHw (pDrvMain->tStadHandles.hTWD, pbuf, uLength, pDrvMain->uRxDmaBufLen, pDrvMain->uTxDmaBufLen);
-}
-
-static TI_STATUS drvMain_InitFw (TI_HANDLE hDrvMain, TFileInfo *pFileInfo)
-{
-    TDrvMain   *pDrvMain = (TDrvMain *) hDrvMain;
-
-    return TWD_InitFw (pDrvMain->tStadHandles.hTWD, pFileInfo);
-}
-
-
-/* 
- * \fn     drvMain_ConfigFw
- * \brief  Configure the FW
- * 
- * The step that follows the FW Init (mainly FW download).
- * The Command-Mailbox interface is enabled here and the FW is configured.
- * 
- * \note   
- * \param  pDrvMain - The DrvMain object
- * \return TI_OK 
- * \sa     drvMain_Init
- */ 
-static TI_STATUS drvMain_ConfigFw (TI_HANDLE hDrvMain)
-{
-    TDrvMain    *pDrvMain = (TDrvMain *) hDrvMain;
-
-    /* get pointer to FW static info (already in driver memory) */
-    TFwInfo     *pFwInfo  = TWD_GetFWInfo (pDrvMain->tStadHandles.hTWD); 
-    TI_UINT8    *pMacAddr = (TI_UINT8 *)pFwInfo->macAddress; /* STA MAC address */
-
-    /* Update driver's MAC address */
-    wlanDrvIf_SetMacAddress (pDrvMain->tStadHandles.hOs, pMacAddr);
-
-    /*
-     *  Exit from init mode should be before smeSM starts. this enable us to send
-     *  command to the MboxQueue(that store the command) while the interrupts are masked.
-     *  the interrupt would be enable at the end of the init process.
-     */
-    TWD_ExitFromInitMode (pDrvMain->tStadHandles.hTWD);
-
-    /* Configure the FW from the TWD DB */
-    TWD_ConfigFw (pDrvMain->tStadHandles.hTWD);
-
-    TRACE0(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_INIT , "EXIT FROM INIT\n");
-
-    /* Print the driver and firmware version and the mac address */
-    os_printf("\n");
-    os_printf("-----------------------------------------------------\n");
-    os_printf("Driver Version  : %s\n", SW_VERSION_STR);
-    os_printf("Firmware Version: %s\n", pFwInfo->fwVer);
-    os_printf("Station ID      : %02X-%02X-%02X-%02X-%02X-%02X\n",
-              pMacAddr[0], pMacAddr[1], pMacAddr[2], pMacAddr[3], pMacAddr[4], pMacAddr[5]);
-    os_printf("-----------------------------------------------------\n");
-    os_printf("\n");
-
-    return TI_OK;
-}
-
-
-/* 
- * \fn     drvMain_StopActivities
- * \brief  Freeze driver activities
- * 
- * Freeze all driver activities due to stop command or recovery process.
- * 
- * \note   
- * \param  pDrvMain - The DrvMain object
- * \return TI_OK if succeeded, TI_NOK if failed. 
- * \sa     drvMain_EnableActivities
- */ 
-static TI_STATUS drvMain_StopActivities (TDrvMain *pDrvMain)
-{
-    txPort_suspendTx (pDrvMain->tStadHandles.hTxPort);
-
-    /* Disable External Inputs (IRQs and commands) */
-    TWD_DisableInterrupts(pDrvMain->tStadHandles.hTWD);
-    cmdHndlr_Disable (pDrvMain->tStadHandles.hCmdHndlr);
-
-    /* Initiate TWD Restart */
-    return TWD_Stop (pDrvMain->tStadHandles.hTWD);
-}
-
-
-/* 
- * \fn     drvMain_EnableActivities
- * \brief  Enable driver activities
- * 
- * Enable driver activities after init or recovery process completion.
- * 
- * \note   
- * \param  pDrvMain - The DrvMain object
- * \return void 
- * \sa     drvMain_StopActivities
- */ 
-static void drvMain_EnableActivities (TDrvMain *pDrvMain)
-{
-    txPort_resumeTx (pDrvMain->tStadHandles.hTxPort);
-
-   /* Enable External Inputs (IRQ is enabled elsewhere) */
-    cmdHndlr_Enable (pDrvMain->tStadHandles.hCmdHndlr);
-
-    /* Enable external events from FW */
-    TWD_EnableExternalEvents (pDrvMain->tStadHandles.hTWD);
-
-    
-}
-
-
-/* 
- * \fn     drvMain_ClearQueuedEvents
- * \brief  Enable driver activities
- * 
- * Clear all external events queues (Tx, commands and timers) upon driver stop.
- * 
- * \note   
- * \param  pDrvMain - The DrvMain object
- * \return void 
- * \sa     
- */ 
-static void drvMain_ClearQueuedEvents (TDrvMain *pDrvMain)
-{
-    txDataQ_ClearQueues (pDrvMain->tStadHandles.hTxDataQ);
-    txMgmtQ_ClearQueues (pDrvMain->tStadHandles.hTxMgmtQ);
-    cmdHndlr_ClearQueue (pDrvMain->tStadHandles.hCmdHndlr);
-    tmr_ClearOperQueue (pDrvMain->tStadHandles.hTimer);
-}
-
-
-/* 
- * \fn     drvMain_InsertAction
- * \brief  Get start/stop action and trigger handling
- * 
- * Get start or stop action command from OAL, save it and trigger driver task
- *     for handling it.
- * Wait on a signal object until the requested process is completed.
- * 
- * \note   
- * \param  hDrvMain - The DrvMain object
- * \param  eAction  - The requested action
- * \return void 
- * \sa     
- */ 
-TI_STATUS drvMain_InsertAction (TI_HANDLE hDrvMain, EActionType eAction)
-{
-    TDrvMain *pDrvMain = (TDrvMain *) hDrvMain;
-
-    context_EnterCriticalSection(pDrvMain->tStadHandles.hContext);
-    if (pDrvMain->eAction == eAction)
-    {
-        context_LeaveCriticalSection(pDrvMain->tStadHandles.hContext);
-        TRACE0(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_CONSOLE, "Action is identical to last action!\n");
-        WLAN_OS_REPORT(("Action %d is identical to last action!\n", eAction));
-        return TI_OK;
-    }
-
-    /* Save the requested action */
-    pDrvMain->eAction = eAction;
-    context_LeaveCriticalSection(pDrvMain->tStadHandles.hContext);
-
-    /* Create signal object */
-    /* 
-     * Notice that we must create the signal object before asking for ReSchedule,
-     * because we might receive it immidiatly, and then we will be in a different context 
-     * with null signal object.
-     */
-    pDrvMain->hSignalObj = os_SignalObjectCreate (pDrvMain->tStadHandles.hOs);
-    if (pDrvMain->hSignalObj == NULL) 
-    {
-        TRACE0(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_ERROR , "drvMain_InsertAction(): Couldn't allocate signal object!\n");
-        return TI_NOK;
-    }
-
-    /* Request driver task schedule for action handling */
-    context_RequestSchedule (pDrvMain->tStadHandles.hContext, pDrvMain->uContextId);
-
-    /* Wait for the action processing completion */
-    os_SignalObjectWait (pDrvMain->tStadHandles.hOs, pDrvMain->hSignalObj);
-
-    /* After "wait" - the action has already been processed in the driver's context */
-
-    /* Free signalling object */
-    os_SignalObjectFree (pDrvMain->tStadHandles.hOs, pDrvMain->hSignalObj);
-    pDrvMain->hSignalObj = NULL;
-
-    if (pDrvMain->eSmState == SM_STATE_FAILED)
-    return TI_NOK;
-
-    return TI_OK;
-}
-
-
-/* 
- * \fn     drvMain_Recovery
- * \brief  Initiate recovery process
- * 
- * Initiate recovery process upon HW/FW error detection (in the Health-Monitor).
- * 
- * \note   
- * \param  hDrvMain - The DrvMain object
- * \return TI_OK if started recovery, TI_NOK if recovery is already in progress. 
- * \sa     
- */ 
-TI_STATUS drvMain_Recovery (TI_HANDLE hDrvMain)
-{
-    TDrvMain         *pDrvMain = (TDrvMain *) hDrvMain;
-
-    if (!pDrvMain->bRecovery)
-    {
-        TRACE1(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_CONSOLE,".....drvMain_Recovery, ts=%d\n", os_timeStampMs(pDrvMain->tStadHandles.hOs));
-#ifdef REPORT_LOG
-        WLAN_OS_REPORT((".....drvMain_Recovery, ts=%d\n", os_timeStampMs(pDrvMain->tStadHandles.hOs)));
-#else
-        printk("%s\n",__func__);
-#endif
-        pDrvMain->bRecovery = TI_TRUE;
-        drvMain_SmEvent (hDrvMain, SM_EVENT_RECOVERY);
-        return TI_OK;
-    }
-    else
-    {
-        TRACE0(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_ERROR, "drvMain_Recovery: ****  Recovery already in progress!  ****\n");
-
-		/* nesting recoveries... Try again */
-		drvMain_SmEvent (hDrvMain, SM_EVENT_RECOVERY);
-        return TI_NOK;
-    }
-}
-
-
-/* 
- * \fn     drvMain_RecoveryNotify
- * \brief  Notify STAD modules about recovery
- * 
- * Notify the relevant STAD modules that recovery took place (after completed).
- * 
- * \note   
- * \param  pDrvMain - The DrvMain object
- * \return void 
- * \sa     
- */ 
-static void drvMain_RecoveryNotify (TDrvMain *pDrvMain)
-{
-    txCtrl_NotifyFwReset (pDrvMain->tStadHandles.hTxCtrl);
-    scr_notifyFWReset (pDrvMain->tStadHandles.hSCR);
-    PowerMgr_notifyFWReset (pDrvMain->tStadHandles.hPowerMgr);
-
-    TRACE1(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_CONSOLE, ".....drvMain_RecoveryNotify: End Of Recovery, ts=%d\n", os_timeStampMs(pDrvMain->tStadHandles.hOs));
-    WLAN_OS_REPORT((".....drvMain_RecoveryNotify: End Of Recovery, ts=%d\n", os_timeStampMs(pDrvMain->tStadHandles.hOs)));
-}
-
-
-/* 
- * \fn     drvMain_SmWatchdogTimeout
- * \brief  SM watchdog timer expiry handler
- * 
- * This is the callback function called upon expiartion of the watchdog timer.
- * It is called by the OS-API in timer expiry context, and it issues a failure event to the SM.
- * Note that we can't switch to the driver task as for other timers, since we are using
- *     this timer to protect the init processes, and anyway we just need to stop the driver.
- * 
- * \note   
- * \param  hDrvMain - The DrvMain object
- * \return void
- * \sa     
- */ 
-
-#if 0
-static void drvMain_SmWatchdogTimeout (TI_HANDLE hDrvMain)
-{
-    TDrvMain *pDrvMain = (TDrvMain *)hDrvMain;
-
-    TRACE1(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_ERROR , "drvMain_SmWatchdogTimeout():  State = %d\n", pDrvMain->eSmState);
-
-    /* Send failure event directly to the SM (so the drvMain_SmEvent won't block it).  */
-
-    drvMain_Sm ((TI_HANDLE)pDrvMain, SM_EVENT_FAILURE);
-}
-#endif
-
-/* 
- * \fn     drvMain_SmEvent
- * \brief  Issue DrvMain SM event
- * 
- * Each event that is handled by the DrvMain state machine, is introduced through this function.
- * To prevent SM recursion, the SM is invoeked only if it's not already handling the 
- *      previous event. 
- * If the SM is busy, the current event is saved until the previous handling is completed.
- * 
- * \note   Recursion may happen because some SM activities generate SM events in the same context.
- * \param  hDrvMain - The DrvMain object
- * \param  eEvent   - The event issued to the SM
- * \return void 
- * \sa     
- */ 
-static void drvMain_SmEvent (TI_HANDLE hDrvMain, ESmEvent eEvent)
-{
-    TDrvMain *pDrvMain = (TDrvMain *)hDrvMain;
-
-    /* Increment pending events counter and save last event. */
-    pDrvMain->uPendingEventsCount++;
-    pDrvMain->ePendingEvent = eEvent;
-
-    /* If the SM is busy, save event and exit (will be handled when current event is finished) */
-    if (pDrvMain->uPendingEventsCount > 1)
-    {
-        /* Only one pending event is expected (in addition to the handled one, so two together). */
-        if (pDrvMain->uPendingEventsCount > 2)
-        {
-            TRACE3(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_ERROR , "drvMain_SmEvent():  Multiple pending events (%d), State = %d, Event = %d\n", pDrvMain->uPendingEventsCount, pDrvMain->eSmState, eEvent);
-        }
-
-        /* Exit. The current event will be handled by the following while loop of the first instance. */
-        return;
-    }
-
-    /* Invoke the SM with the current event and further events issued by the last SM invocation. */
-    while (pDrvMain->uPendingEventsCount > 0)
-    {
-        drvMain_Sm (hDrvMain, pDrvMain->ePendingEvent);
-
-        /* 
-         * Note: The SM may issue another event by calling this function and incrementing 
-         *           the counter. 
-         *       In this case, only the upper part of this function is run, and the pending
-         *           event is hanlded in the next while loo[.
-         */
-
-        pDrvMain->uPendingEventsCount--;
-    }
-}
-
-
-/* 
- * \fn     drvMain_Sm
- * \brief  The DrvMain state machine
- * 
- * The DrvMain state machine, which handles all driver init, recovery and stop processes.
- * 
- * \note   Since the SM may be called back from its own context, recursion is prevented 
- *             by postponing the last event.
- * \param  hDrvMain - The DrvMain object
- * \param  eEvent   - The event that triggers the SM
- * \return void 
- * \sa     
- */ 
-static void drvMain_Sm (TI_HANDLE hDrvMain, ESmEvent eEvent)
-{
-    TDrvMain    *pDrvMain   = (TDrvMain *)hDrvMain;
-    TI_STATUS    eStatus    = TI_NOK;
-    TI_HANDLE    hOs        = pDrvMain->tStadHandles.hOs;
-    TI_UINT32    uSdioConIndex = 0;
-    TI_BOOL      tmpRecovery;
-
-    TRACE2(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_INFORMATION , "drvMain_Sm():  State = %d, Event = %d\n", pDrvMain->eSmState, eEvent);
-
-    /* 
-     *  General explenations:
-     *  =====================
-     *  1) This SM calls some functions that may complete their processing in another context.
-     *     All of these functions (wlanDrvIf_GetFile, drvMain_InitHw, drvMain_InitFw, drvMain_ConfigFw,
-     *         drvMain_StopActivities, smeSm_start, smeSm_stop) are provided with a callback which 
-     *         they always call upon completion, even if they are completed in the original (SM) context.
-     *     Since these callbacks are calling the SM, a simple mechanism is added to prevent
-     *         recursion, by postponing the last event if the SM is still in the previous event's context.
-     *  2) In any case of unexpected event, the eStatus remains TI_NOK, leading to the FAILED state!
-     *     FAILED state is also reached if any of the functions listed in note 1 returns TI_NOK.
-     *     Note that if these functions detect a failure in another context, they may call their callback
-     *         with the eStatus parameter set to TI_NOK, or call the drvMain_InitFailCb callback.
-     *     All these cases lead to FAILED state which terminates all driver activities and wait for destroy.
-     *  3) Note that the wlanDrvIf_GetFile is always completed in the original context, and the
-     *         option of completion in a later context is only for future use.
-     *  4) All processes (Start, Stop, Relcovery) are protected by a watchdog timer to let
-     *         the user free the driver in case of deadlock during the process.
-     */
-
-    switch (pDrvMain->eSmState) 
-    {
-    case SM_STATE_IDLE:
-        /*
-         * We get a START action after all modules are created and linked.
-         * Disable further actions, start watchdog timer and request for the ini-file.
-         */
-        if (eEvent == SM_EVENT_START) 
-        {
-            pDrvMain->eSmState = SM_STATE_WAIT_INI_FILE;
-            context_DisableClient (pDrvMain->tStadHandles.hContext, pDrvMain->uContextId);
-            pDrvMain->tFileInfo.eFileType = FILE_TYPE_INI;
-            eStatus = wlanDrvIf_GetFile (hOs, &pDrvMain->tFileInfo);
-        }
-        break;
-    case SM_STATE_WAIT_INI_FILE:
-        /* 
-         * We've got the ini-file.
-         * Set STAD and TWD modules defaults according to the ini-file, 
-         *     turn on the device and request for the NVS file.
-         */
-        if (eEvent == SM_EVENT_INI_FILE_READY) 
-        {
-            pDrvMain->eSmState = SM_STATE_WAIT_NVS_FILE;
-            drvMain_SetDefaults (hDrvMain, pDrvMain->tFileInfo.pBuffer, pDrvMain->tFileInfo.uLength);
-            hPlatform_DevicePowerOn ();
-
-            pDrvMain->tFileInfo.eFileType = FILE_TYPE_NVS;
-            eStatus = wlanDrvIf_GetFile (hOs, &pDrvMain->tFileInfo);
-        }
-        break;
-
-    case SM_STATE_WAIT_NVS_FILE:
-
-        /* SDBus Connect connection validation  */
-        for(uSdioConIndex=0; (uSdioConIndex < SDIO_CONNECT_THRESHOLD) && (eStatus != TI_OK); uSdioConIndex++)
-        {
-			/* : We should split the call to txnQ_ConnectBus to other state in order to support Async bus connection */
-            eStatus = txnQ_ConnectBus(pDrvMain->tStadHandles.hTxnQ, &pDrvMain->tBusDrvCfg, NULL, NULL, &pDrvMain->uRxDmaBufLen, &pDrvMain->uTxDmaBufLen); 
-
-            if((eStatus != TI_OK) &&
-			   (uSdioConIndex < (SDIO_CONNECT_THRESHOLD - 1)))
-            {
-                     TRACE0(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_WARNING , "SDBus Connect Failed\n");
-                     WLAN_OS_REPORT(("Try to SDBus Connect again...\n"));
-                     if (uSdioConIndex > 1)
-						hPlatform_DevicePowerOffSetLongerDelay();
-					 else
-						hPlatform_DevicePowerOff();
-                     hPlatform_DevicePowerOn();
-            }
-        }
-
-        if(eStatus != TI_OK)
-        {
-			WLAN_OS_REPORT(("SDBus Connect Failed, Set Object Event !!\r\n"));
-			TRACE0(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_ERROR , "SDBus Connect Failed, Set Object Event !!\r\n");
-			if (!pDrvMain->bRecovery)
-			{
-				os_SignalObjectSet(hOs, pDrvMain->hSignalObj);
-			}
-        }
-        else /* SDBus Connect success */
-        {
-            /*
-             * We've got the NVS file.
-             * Start HW-Init process providing the NVS file.
-             */
-            if (eEvent == SM_EVENT_NVS_FILE_READY)
-            {
-                pDrvMain->eSmState = SM_STATE_HW_INIT;
-                eStatus = drvMain_InitHw (hDrvMain, pDrvMain->tFileInfo.pBuffer, pDrvMain->tFileInfo.uLength);
-            }
-        }
-        break;
-    case SM_STATE_HW_INIT:
-        /*
-         * HW-Init process is completed.
-         * Request for the FW image file.
-         */
-        if (eEvent == SM_EVENT_HW_INIT_COMPLETE)
-        {
-            pDrvMain->tFileInfo.eFileType = FILE_TYPE_FW;
-            pDrvMain->eSmState = SM_STATE_DOWNLOAD_FW_FILE;
-            eStatus = wlanDrvIf_GetFile (hOs, &pDrvMain->tFileInfo);
-        }
-        break;
-    case SM_STATE_DOWNLOAD_FW_FILE:
-        if (eEvent == SM_EVENT_FW_FILE_READY)
-        {
-            pDrvMain->tFileInfo.eFileType = FILE_TYPE_FW_NEXT;
-            if (pDrvMain->tFileInfo.bLast == TI_TRUE)
-            {
-            pDrvMain->eSmState = SM_STATE_FW_INIT;
-            }
-            else
-            {
-                pDrvMain->eSmState = SM_STATE_WAIT_FW_FILE;
-            }
-            /*
-             * We've got the FW image file.
-             * Start FW-Init process (mainly FW image download) providing the FW image file.
-             */
-            eStatus = drvMain_InitFw (hDrvMain, &pDrvMain->tFileInfo);
-        }
-        break;
-    case SM_STATE_WAIT_FW_FILE:
-        if (eEvent == SM_EVENT_FW_INIT_COMPLETE)
-        {
-            pDrvMain->eSmState = SM_STATE_DOWNLOAD_FW_FILE;
-            eStatus = wlanDrvIf_GetFile (hOs, &pDrvMain->tFileInfo);
-        }
-        break;
-    case SM_STATE_FW_INIT:
-        /*
-         * FW-Init process is completed.
-         * Free the semaphore of the START action to enable the OS interface.
-         * Enable interrupts (or polling for debug).
-         * Start FW-Configuration process, and free the semaphore of the START action.
-         *
-         * Note that in some OSs, the semaphore must be released in order to enable the
-         *     interrupts, and the interrupts are needed for the configuration process!
-         */
-        if (eEvent == SM_EVENT_FW_INIT_COMPLETE)
-        {
-            pDrvMain->eSmState = SM_STATE_FW_CONFIG;
-            TWD_EnableInterrupts(pDrvMain->tStadHandles.hTWD);
-          #ifdef PRIODIC_INTERRUPT
-            /* Start periodic interrupts. It means that every period of time the FwEvent SM will be called */
-            os_periodicIntrTimerStart (hOs);
-          #endif
-            eStatus = drvMain_ConfigFw (hDrvMain);
-        }
-        break;
-    case SM_STATE_FW_CONFIG:
-        /*
-         * FW-configuration process is completed.
-         * Stop watchdog timer.
-         * For recovery, notify the relevant STAD modules.
-         * For regular start, start the SME which handles the connection process.
-         * Update timer and OAL about entering OPERATIONAL state (OAL ignores recovery)
-         * Enable driver activities and external events.
-         * Enable STOP action
-         * We are now in OPERATIONAL state, i.e. the driver is fully operational!
-         */
-
-        tmpRecovery = pDrvMain->bRecovery;
-        if (eEvent == SM_EVENT_FW_CONFIG_COMPLETE) 
-        {
-            pDrvMain->eSmState = SM_STATE_OPERATIONAL;
-            if (pDrvMain->bRecovery) 
-            {
-                pDrvMain->uNumOfRecoveryAttempts = 0;
-                drvMain_RecoveryNotify (pDrvMain);
-                pDrvMain->bRecovery = TI_FALSE;
-            }
-            else 
-            {
-                sme_Start (pDrvMain->tStadHandles.hSme); 
-                wlanDrvIf_UpdateDriverState (hOs, DRV_STATE_RUNNING);
-            }
-            tmr_UpdateDriverState (pDrvMain->tStadHandles.hTimer, TI_TRUE);
-            drvMain_EnableActivities (pDrvMain);
-            context_EnableClient (pDrvMain->tStadHandles.hContext, pDrvMain->uContextId);
-            eStatus = TI_OK;
-           
-        }
-        if (!tmpRecovery)
-        {
-            os_SignalObjectSet(hOs, pDrvMain->hSignalObj);
-        }
-        break;
-    case SM_STATE_OPERATIONAL:
-        /* 
-         * Disable start/stop commands and start watchdog timer.
-         * Update timer and OAL about exiting OPERATIONAL state (OAL ignores recovery).
-         * For STOP, stop SME (handle disconnection) and move to DISCONNECTING state.
-         * For recovery, stop driver activities and move to STOPPING state.
-         * Note that driver-stop process may be Async if we are during Async bus transaction.
-         */
-        
-        context_DisableClient (pDrvMain->tStadHandles.hContext, pDrvMain->uContextId);
-        tmr_UpdateDriverState (pDrvMain->tStadHandles.hTimer, TI_FALSE);
-        if (eEvent == SM_EVENT_STOP) 
-        {
-            pDrvMain->eSmState = SM_STATE_DISCONNECTING;
-            wlanDrvIf_UpdateDriverState (hOs, DRV_STATE_STOPING);
-            sme_Stop (pDrvMain->tStadHandles.hSme);
-            eStatus = TI_OK;
-        }
-        else if (eEvent == SM_EVENT_RECOVERY) 
-        {
-            pDrvMain->eSmState = SM_STATE_STOPPING;
-            eStatus = drvMain_StopActivities (pDrvMain);
-        }
-        
-        break;
-    case SM_STATE_DISCONNECTING:
-        /* 
-         * Note that this state is not relevant for recovery.
-         * SME stop is completed 
-         * Stop driver activities and move to STOPPING state.
-         * Note that driver stop process may be Async if we are during Async bus transaction.
-         */
-        
-        if (eEvent == SM_EVENT_DISCONNECTED) 
-        {
-            pDrvMain->eSmState = SM_STATE_STOPPING;
-            eStatus = drvMain_StopActivities (pDrvMain);
-        }
-        break;
-    case SM_STATE_STOPPING:
-        /* 
-         * Driver stopping process is done.
-         * Turn device power off.
-         * For recovery, turn device power back on, request NVS file and continue with
-         *     the init process (recover back all the way to OPERATIONAL state).
-         * For STOP process, the driver is now fully stopped (STOPPED state), so stop watchdog timer,
-         *     clear all events queues, free the semaphore of the STOP action and enable START action.
-         */
-        
-        if (eEvent == SM_EVENT_STOP_COMPLETE) 
-        {
-            txnQ_DisconnectBus (pDrvMain->tStadHandles.hTxnQ);
-            hPlatform_DevicePowerOff ();
-            if (pDrvMain->bRecovery) 
-            {
-                hPlatform_DevicePowerOn ();
-                pDrvMain->eSmState = SM_STATE_WAIT_NVS_FILE;
-                pDrvMain->tFileInfo.eFileType = FILE_TYPE_NVS;
-                eStatus = wlanDrvIf_GetFile (hOs, &pDrvMain->tFileInfo);
-            }
-            else 
-            {
-                pDrvMain->eSmState = SM_STATE_STOPPED;
-                drvMain_ClearQueuedEvents (pDrvMain);
-                scr_notifyFWReset(pDrvMain->tStadHandles.hSCR);
-                os_SignalObjectSet (hOs, pDrvMain->hSignalObj);
-                context_EnableClient (pDrvMain->tStadHandles.hContext, pDrvMain->uContextId);
-                wlanDrvIf_UpdateDriverState (hOs, DRV_STATE_STOPPED);
-                eStatus = TI_OK;
-            }
-        }
-        
-        break;
-    case SM_STATE_STOPPED:
-        /* 
-         * A START action command was inserted, so we go through the init process.
-         * Disable further actions, start watchdog timer, turn on device and request NVS file.
-         */
-        
-        context_DisableClient (pDrvMain->tStadHandles.hContext, pDrvMain->uContextId);
-        if (eEvent == SM_EVENT_START) 
-        {
-            hPlatform_DevicePowerOn ();
-            pDrvMain->eSmState = SM_STATE_WAIT_NVS_FILE;
-            pDrvMain->tFileInfo.eFileType = FILE_TYPE_NVS;
-            eStatus = wlanDrvIf_GetFile (hOs, &pDrvMain->tFileInfo);
-        }
-        break;
-    case SM_STATE_STOPPING_ON_FAIL:
-        /*
-         * Driver stopping process upon failure is completed.
-         * Turn off the device and move to FAILED state.
-         */
-        
-        pDrvMain->eSmState = SM_STATE_FAILED;
-        txnQ_DisconnectBus (pDrvMain->tStadHandles.hTxnQ);
-        hPlatform_DevicePowerOff ();
-        if (!pDrvMain->bRecovery)
-        {
-            os_SignalObjectSet (hOs, pDrvMain->hSignalObj);
-        }
-        else if (pDrvMain->uNumOfRecoveryAttempts < MAX_NUM_OF_RECOVERY_TRIGGERS) 
-        {
-            pDrvMain->uNumOfRecoveryAttempts++;
-            pDrvMain->eSmState = SM_STATE_STOPPING;
-            eStatus = drvMain_StopActivities (pDrvMain);
-        }
-        WLAN_OS_REPORT(("[WLAN] Exit application\n"));
-        pDrvMain->bRecovery = TI_FALSE;
-        break;
-    case SM_STATE_FAILED:
-        /* Nothing to do except waiting for Destroy */
-        break;
-    default:
-        TRACE2(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_ERROR , "drvMain_Sm: Unknown state, eEvent=%u at state=%u\n", eEvent, pDrvMain->eSmState);
-        /* Note: Handled below as a failure since the status remains TI_NOK */
-        break;  
-    }
-
-    /* Handle failures (status = NOK) if not handled yet */
-    if ((eStatus == TI_NOK) && 
-        (pDrvMain->eSmState != SM_STATE_FAILED) &&
-        (pDrvMain->eSmState != SM_STATE_STOPPING_ON_FAIL))
-    {
-        TRACE3(pDrvMain->tStadHandles.hReport, REPORT_SEVERITY_ERROR , "drvMain_Sm: eEvent=%u at state=%u, status=%d\n", eEvent, pDrvMain->eSmState, eStatus);
-        pDrvMain->eSmState = SM_STATE_STOPPING_ON_FAIL;
-        wlanDrvIf_UpdateDriverState (hOs, DRV_STATE_FAILED);
-
-        /* 
-         * Stop all activities. This may be completed in a different context if
-         *     we should wait for an Async bus transaction completion.
-         * The drvMain_TwdStopCb is called from the TWD in any case to pass
-         *     us to the SM_STATE_FAILED state (where we wait for Destroy).
-         */
-        eStatus = drvMain_StopActivities (pDrvMain);
-    }
-}
diff --git a/wl1271/stad/src/Ctrl_Interface/DrvMain.h b/wl1271/stad/src/Ctrl_Interface/DrvMain.h
deleted file mode 100644
index 3ca7755..0000000
--- a/wl1271/stad/src/Ctrl_Interface/DrvMain.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * DrvMain.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-#ifndef DRVMAIN_H
-#define DRVMAIN_H
-
-
-#include "paramOut.h"
-#include "WlanDrvCommon.h"
-
-
-/* Driver-Main module external functions */
-
-TI_STATUS drvMain_Create 			(TI_HANDLE  hOs, 
-									 TI_HANDLE *pDrvMainHndl, 
-									 TI_HANDLE *pCmdHndlr, 
-									 TI_HANDLE *pContext, 
-									 TI_HANDLE *pTxDataQ, 
-									 TI_HANDLE *pTxMgmtQ,
-									 TI_HANDLE *pTxCtrl,
-									 TI_HANDLE *pTwd,
-									 TI_HANDLE *pEvHandler,
-                                     TI_HANDLE *pCmdDispatch,
-                                     TI_HANDLE *pReport);
-TI_STATUS drvMain_Destroy           (TI_HANDLE  hDrvMain);
-TI_STATUS drvMain_InsertAction      (TI_HANDLE  hDrvMain, EActionType eAction);
-TI_STATUS drvMain_Recovery          (TI_HANDLE  hDrvMain);
-void      drvMain_SmeStop           (TI_HANDLE hDrvMain);
-
-#endif
diff --git a/wl1271/stad/src/Ctrl_Interface/DrvMainModules.h b/wl1271/stad/src/Ctrl_Interface/DrvMainModules.h
deleted file mode 100644
index 67aecd2..0000000
--- a/wl1271/stad/src/Ctrl_Interface/DrvMainModules.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * DrvMainModules.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DRVMAIN_MODULES_H
-#define DRVMAIN_MODULES_H
-
-#include "tidef.h"
-
-/* STAD Modules Handles List */
-typedef struct
-{
-    TI_HANDLE           hDrvMain;
-    TI_HANDLE           hOs;
-    TI_HANDLE           hReport;
-    TI_HANDLE           hContext;
-    TI_HANDLE           hTimer;
-    TI_HANDLE           hTWD;
-    TI_HANDLE           hCmdHndlr;
-    TI_HANDLE           hSme;
-    TI_HANDLE           hSiteMgr;
-    TI_HANDLE           hConn;
-    TI_HANDLE           hMlmeSm;
-    TI_HANDLE           hAuth;
-    TI_HANDLE           hAssoc;
-    TI_HANDLE           hRxData;
-    TI_HANDLE           hTxCtrl;
-    TI_HANDLE           hTxPort;
-    TI_HANDLE           hTxDataQ;
-    TI_HANDLE           hTxMgmtQ;
-    TI_HANDLE           hCtrlData;
-    TI_HANDLE           hTrafficMon;
-    TI_HANDLE           hRsn;
-    TI_HANDLE           hRegulatoryDomain;
-    TI_HANDLE           hMeasurementMgr;
-    TI_HANDLE           hSoftGemini;
-    TI_HANDLE           hXCCMngr;
-    TI_HANDLE           hRoamingMngr;
-    TI_HANDLE           hQosMngr;
-    TI_HANDLE           hPowerMgr;
-    TI_HANDLE           hPowerSrv;
-    TI_HANDLE           hEvHandler;
-    TI_HANDLE           hAPConnection;
-    TI_HANDLE           hCurrBss;
-    TI_HANDLE           hSwitchChannel;
-    TI_HANDLE           hSCR;               
-    TI_HANDLE           hScanCncn;          
-    TI_HANDLE           hScanMngr;          
-    TI_HANDLE           hHealthMonitor; 
-    TI_HANDLE           hCmdDispatch; 
-    TI_HANDLE           hStaCap;
-    TI_HANDLE           hTxnQ;
-
-} TStadHandlesList;
-
-
-#endif  /* DRVMAIN_MODULES_H */
diff --git a/wl1271/stad/src/Ctrl_Interface/EvHandler.c b/wl1271/stad/src/Ctrl_Interface/EvHandler.c
deleted file mode 100644
index 91b594d..0000000
--- a/wl1271/stad/src/Ctrl_Interface/EvHandler.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * EvHandler.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#define __FILE_ID__  FILE_ID_50
-#include "IPCKernelApi.h"
-#include "EvHandler.h"
-#include "osApi.h"
-#include "osDebug.h"
-
-#ifndef _WINDOWS
-#include "windows_types.h"
-#else
-#include <windows.h>
-#endif /*_WINDOWS*/
-
-#ifdef EV_HANDLER_DEBUG
-TI_HANDLE ghEvHandler; /* for debug, remove later*/
-#endif
-
-/* ************************** Upper Interface **********************************/
-
-TI_HANDLE EvHandler_Create (TI_HANDLE hOs)
-{
-    TEvHandlerObj *pEvHandler;
-
-    PRINT(DBG_INIT_LOUD, (" EvHandlerInit\n"));
-    pEvHandler = os_memoryAlloc(hOs,sizeof(TEvHandlerObj));
-
-    if(NULL == pEvHandler)
-    {
-        PRINT(DBG_INIT_LOUD, ("EvHandler_Create() - Allocation failed! Returning NULL.\n"));
-        return NULL;
-    }
-
-    os_memoryZero(hOs,pEvHandler,sizeof(TEvHandlerObj));
-
-    #ifdef EV_HANDLER_DEBUG
-    ghEvHandler= pEvHandler;
-      PRINTF(DBG_INIT_VERY_LOUD, ("EvHandlerInit: ghEvHandler set to %08X\n", ghEvHandler));
-    #endif
-
-    pEvHandler->hOs = hOs;
-
-    pEvHandler->LastUMEventType = 0xFFFFFFFF;
-
-    return (TI_HANDLE) pEvHandler;
-}
-
-TI_UINT32 EvHandlerUnload (TI_HANDLE hEvHandler)
-{
-
-    TEvHandlerObj *pEvHandler;
-
-    PRINT(DBG_INIT_LOUD, (" ev_handler_unLoad\n"));
-    pEvHandler = (TEvHandlerObj *)hEvHandler;
-
-    os_memoryFree(pEvHandler->hOs,pEvHandler,sizeof(TEvHandlerObj));
-
-    return TI_OK;
-}
-
-
-TI_UINT32 EvHandlerRegisterEvent(TI_HANDLE hEvHandler, TI_UINT8* pData, TI_UINT32 Length)
-{
-    TEvHandlerObj *pEvHandler;
-    IPC_EVENT_PARAMS *pEvParams;
-    TI_UINT32 ModuleIndex;
-
-    if( (hEvHandler==NULL) || (pData == NULL)){
-        PRINT(DBG_INIT_ERROR, "EvHandler:EvHandlerRegisterEvent Bad Handle passed \n");
-        return TI_NOK;
-    }
-
-#ifdef EV_HANDLER_DEBUG
-    if (ghEvHandler !=  hEvHandler)
-    {
-        return TI_NOK;
-    }
-#endif
-
-    pEvHandler  = (TEvHandlerObj *)hEvHandler;
-    pEvParams = (IPC_EVENT_PARAMS *)pData;
-
-    PRINTF(DBG_INIT_LOUD, (" EvHandlerRegisterEvent EventType = %d \n",pEvParams->uEventType));
-
-    /* used to be: if ( sizeof(IPC_EVENT_PARAMS) != Length)
-       relaxed size checking (okay if output buffer is larger)  */
-    if (sizeof(IPC_EVENT_PARAMS) > Length)
-    {
-        PRINTF(DBG_INIT_ERROR, (" EvHandlerRegisterEvent Error sizeof(IPC_EVENT_PARAMS) != Length,"
-                               "%d != %d \n",sizeof(IPC_EVENT_PARAMS), (int)Length));
-        return (TI_UINT32)STATUS_INVALID_PARAMETER;
-    }
-
-    if (pEvParams->uEventType >= IPC_EVENT_MAX){
-        PRINTF(DBG_INIT_ERROR, (" EvHandlerRegisterEvent Error - Invalid Event Type = %d \n",
-              pEvParams->uEventType));
-        return (TI_UINT32)STATUS_INVALID_PARAMETER;
-    }
-
-    ModuleIndex = 0;
-
-    while ((ModuleIndex < MAX_REGISTERED_MODULES) &&
-       (pEvHandler->RegistrationArray[pEvParams->uEventType][ModuleIndex].uEventID != NULL))
-    {
-        ModuleIndex++;
-    }
-
-    if (ModuleIndex == MAX_REGISTERED_MODULES)
-    {
-        PRINTF(DBG_INIT_WARNING, (" EvHandlerRegisterEvent %d "
-                                  "Registration queue full or event already registered!\n",
-                                  pEvParams->uEventType));
-        return (TI_UINT32)STATUS_INVALID_PARAMETER;
-    }
-
-    os_memoryCopy(pEvHandler->hOs,(TI_UINT8*)&pEvHandler->RegistrationArray[pEvParams->uEventType][ModuleIndex],
-                    (TI_UINT8*)pEvParams,Length);
-
-    pEvParams->uEventID = (TI_HANDLE)&pEvHandler->RegistrationArray[pEvParams->uEventType][ModuleIndex];
-
-    pEvHandler->RegistrationArray[pEvParams->uEventType][ModuleIndex].uEventID = pEvParams->uEventID;
-
-    PRINT(DBG_INIT_LOUD, " EvHandlerRegisterEvent Out \n");
-    return STATUS_SUCCESS;
-
-}
-
-
-TI_UINT32 EvHandlerUnRegisterEvent(TI_HANDLE hEvHandler, TI_HANDLE uEventID)
-{
-    TEvHandlerObj *pEvHandler;
-    IPC_EVENT_PARAMS *pEvParams;
-    TI_UINT32 ModuleIndex;
-
-#ifdef EV_HANDLER_DEBUG
-    if (ghEvHandler !=  hEvHandler )
-    {
-          return TI_NOK;
-    }
-#endif
-
-    if (uEventID == NULL)
-    {
-        return TI_NOK;
-    }
-
-    pEvHandler = (TEvHandlerObj *)hEvHandler;
-    pEvParams  = (IPC_EVENT_PARAMS *)uEventID;
-
-    PRINTF(DBG_INIT_LOUD, (" EvHandlerUnRegisterEvent EventType = %d \n",pEvParams->uEventType));
-
-    if( pEvParams->uEventType >= IPC_EVENT_MAX){
-        PRINTF(DBG_INIT_ERROR, (" EvHandlerRegisterEvent Error Event Type = %d \n",
-              pEvParams->uEventType));
-        return (TI_UINT32)STATUS_INVALID_PARAMETER;
-    }
-
-    ModuleIndex = 0;
-
-    while ((ModuleIndex < MAX_REGISTERED_MODULES) &&
-           (pEvHandler->RegistrationArray[pEvParams->uEventType][ModuleIndex].uEventID != pEvParams->uEventID))
-    {
-        ModuleIndex++;
-    }
-
-    if (ModuleIndex == MAX_REGISTERED_MODULES)
-    {
-        PRINTF(DBG_INIT_ERROR, (" EvHandlerUnRegisterEvent %d "
-                               "Registration queue doesn't hold this event!\n",
-                               pEvParams->uEventType ));
-        return (TI_UINT32)STATUS_INVALID_PARAMETER;
-    }
-    pEvHandler->RegistrationArray[pEvParams->uEventType][ModuleIndex].uEventID = NULL;
-
-    return STATUS_SUCCESS;
-}
-
-/* ************************** Upper Interface End*********************************/
-
-/* ************************** Bottom Interface **********************************/
-
-TI_UINT32 EvHandlerSendEvent(TI_HANDLE hEvHandler, TI_UINT32 EvType, TI_UINT8* pData, TI_UINT32 Length)
-{
-    TEvHandlerObj *pEvHandler;
-    IPC_EV_DATA*         pNewEvent;
-    TI_UINT32            TailIndex=0;
-    TI_UINT32            ModuleIndex=0;
-
-    PRINTF(DBG_INIT_LOUD, (" EvHandlerSendEvent %d  \n", EvType));
-
-    if(hEvHandler == NULL){
-        PRINT(DBG_INIT_ERROR, "EvHandlerSendEvent Bad Handle passed \n");
-        return TI_NOK;
-    }
-
-#ifdef EV_HANDLER_DEBUG
-    if (ghEvHandler !=  hEvHandler)
-    {
-        return TI_NOK;
-    }
-#endif
-
-    pEvHandler  = (TEvHandlerObj *)hEvHandler;
-
-    TailIndex   = pEvHandler->SendEventArray.TailIndex;
-
-    while ((ModuleIndex < MAX_REGISTERED_MODULES) && (EvType <= IPC_EVENT_MAX))
-    {
-        if (pEvHandler->RegistrationArray[EvType][ModuleIndex].uEventID != NULL )
-        {
-            if(pEvHandler->SendEventArray.Counter == MAX_SEND_EVENTS)
-            {
-                PRINT(DBG_INIT_ERROR, " EvHandlerSendEvent Array Full u Fool! \n");
-                return TI_NOK;
-            }
-
-            pNewEvent = &pEvHandler->SendEventArray.Array[TailIndex];
-
-            /* copy the event parameters and data to the events queue*/
-            os_memoryCopy(pEvHandler->hOs,(TI_UINT8*)&pNewEvent->EvParams,
-                            (TI_UINT8*)&pEvHandler->RegistrationArray[EvType][ModuleIndex],
-                            sizeof(IPC_EVENT_PARAMS));
-
-            os_memoryZero(pEvHandler->hOs,(TI_UINT8*)pNewEvent->uBuffer, sizeof(pNewEvent->uBuffer));
-
-            os_memoryCopy(pEvHandler->hOs,
-                          (TI_UINT8*)pNewEvent->uBuffer,
-                          (TI_UINT8*)pData,
-                          Length);
-
-            pNewEvent->uBufferSize = Length;
-
-            if(pNewEvent->EvParams.uDeliveryType ==  DELIVERY_PUSH)
-            {
-                    PRINTF(DBG_INIT_LOUD, (" EvHandlerSendEvent %d to OS \n", EvType));
-                    PRINTF(DBG_INIT_LOUD, ("EvHandlerSendEvent Matching OS Registered event found at EvType = %d,"
-                                          "ModuleIndex = %d  \n", EvType, ModuleIndex));
-                    IPC_EventSend (pEvHandler->hOs,(TI_UINT8*)pNewEvent,sizeof(IPC_EV_DATA));
-            }
-            else {
-
-                pEvHandler->LastUMEventType = EvType;
-                pEvHandler->SendEventArray.TailIndex = (TailIndex+1) % MAX_SEND_EVENTS;
-                pEvHandler->SendEventArray.Counter++;
-                TailIndex   = pEvHandler->SendEventArray.TailIndex;
-                PRINTF(DBG_INIT_LOUD, (" EvHandlerSendEvent %d to User Mode \n", EvType));
-                PRINTF(DBG_INIT_LOUD, ("EvHandlerSendEvent Matching User Mode Registered event found at EvType = %d,"
-                                       "ModuleIndex = %d  \n", EvType, ModuleIndex));
-                if (pEvHandler->SendEventArray.Counter == 1)
-                {
-                    IPC_EventSend (pEvHandler->hOs,NULL,0);
-                }
-            }
-        } /* end if*/
-
-       ModuleIndex++;
-
-   } /* end of while*/
-
-    return TI_OK;
-}
-
- /* ************************** Bottom Interface End **********************************/
diff --git a/wl1271/stad/src/Ctrl_Interface/EvHandler.h b/wl1271/stad/src/Ctrl_Interface/EvHandler.h
deleted file mode 100644
index 9da8d21..0000000
--- a/wl1271/stad/src/Ctrl_Interface/EvHandler.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * EvHandler.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _EVHANDLER_H_
-#define _EVHANDLER_H_
-
-
-#include "TI_IPC_Api.h"
-
-
-typedef struct 
-{
-    IPC_EV_DATA Array[MAX_SEND_EVENTS];
-    TI_UINT32       TailIndex; /* Points to the next free node*/
-    TI_UINT32       HeadIndex; /* Points to the first occupied node*/
-    TI_UINT32       Counter;
-}EV_CYCL_ARRAY, *PEV_CYCL_ARRAY;
-
-typedef struct 
-{
-    TI_HANDLE		   hOs;
-    IPC_EVENT_PARAMS   RegistrationArray[IPC_EVENT_MAX][MAX_REGISTERED_MODULES];
-    EV_CYCL_ARRAY      SendEventArray;
-    TI_UINT32          LastUMEventType;
-
-}TEvHandlerObj;
-
-/* Upper Interface*/
-TI_HANDLE EvHandler_Create         (TI_HANDLE hOs);
-
-TI_UINT32 EvHandlerUnload          (TI_HANDLE hEvHandler);
-
-TI_UINT32 EvHandlerRegisterEvent   (TI_HANDLE hEvHandler, TI_UINT8* pData,   TI_UINT32 Length);
-
-TI_UINT32 EvHandlerUnRegisterEvent (TI_HANDLE hEvHandler, TI_HANDLE uEventID);
-
-TI_UINT32 EvHandlerMaskEvent       (TI_HANDLE hEvHandler, TI_UINT32 uEventID);
-
-TI_UINT32 EvHandlerUnMaskEvent     (TI_HANDLE hEvHandler, TI_UINT32 uEventID);
-
-TI_UINT32 EvHandlerGetEventData    (TI_HANDLE hEvHandler, TI_UINT8* pData, TI_UINT32* pLength);
-/* Bottom Interface*/
-
-TI_UINT32 EvHandlerSendEvent       (TI_HANDLE hEvHandler, TI_UINT32 EvType, TI_UINT8* pData, TI_UINT32 Length);
-
-
-#endif
diff --git a/wl1271/stad/src/Data_link/Ctrl.c b/wl1271/stad/src/Data_link/Ctrl.c
deleted file mode 100644
index 6e04ede..0000000
--- a/wl1271/stad/src/Data_link/Ctrl.c
+++ /dev/null
@@ -1,1111 +0,0 @@
-/*
- * Ctrl.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/***************************************************************************/
-/*                                                                         */
-/*      MODULE:     Ctrl.c                                                 */
-/*      PURPOSE:    Control module functions                               */
-/*                                                                         */
-/***************************************************************************/
-#define __FILE_ID__  FILE_ID_51
-#include "Ctrl.h"
-#include "802_11Defs.h"
-#include "DataCtrl_Api.h"
-#include "osApi.h"
-#include "report.h" 
-#include "smeApi.h"
-#include "siteMgrApi.h"
-#include "TrafficMonitorAPI.h"
-#include "TI_IPC_Api.h"
-#include "EvHandler.h"
-#include "apConn.h"
-#include "rate.h"
-#include "TWDriver.h"
-#include "DrvMainModules.h"
-#include "StaCap.h"
-
-static void selectRateTable(TI_HANDLE hCtrlData, TI_UINT32 rateMask);
-static void ctrlData_setTxRatePolicies(ctrlData_t *pCtrlData);
-static void ctrlData_UnregisterTrafficIntensityEvents (TI_HANDLE hCtrlData);
-static void ctrlData_RegisterTrafficIntensityEvents (TI_HANDLE hCtrlData);
-static void ctrlData_storeTSRateSet(ctrlData_t *pCtrlData, TTxDataQosParams *tsrsParams);
-static void ctrlData_TrafficThresholdCrossed(TI_HANDLE Context,TI_UINT32 Cookie);
-
-
-/* definitions for medium usage calculations - in uSec units*/
-#define AVERAGE_ACK_TIME   10
-#define AVERAGE_CTS_TIME   20
-#define B_SIFS             10
-
-#define SHORT_PREAMBLE_TIME   96
-#define LONG_PREAMBLE_TIME    192
-
-#define OFDM_PREAMBLE      12
-#define OFDM_SIGNAL_EXT    6
-#define OFDM_PLCP_HDR      24
-
-#define OFDM_DURATION           (B_SIFS + OFDM_PLCP_HDR + OFDM_SIGNAL_EXT)
-#define NONOFDM_SHORT_DURATION  (B_SIFS + SHORT_PREAMBLE_TIME)
-#define NONOFDM_LONG_DURATION   (B_SIFS + LONG_PREAMBLE_TIME)
-
-/*************************************************************************
-*                        ctrlData_create                                 *
-**************************************************************************
-* DESCRIPTION:  This function initializes the Ctrl data module.                 
-*                                                      
-* INPUT:        hOs - handle to Os Abstraction Layer
-*               
-* RETURN:       Handle to the allocated Ctrl data control block
-************************************************************************/
-TI_HANDLE ctrlData_create(TI_HANDLE hOs)
-{
-    TI_HANDLE hCtrlData;
-
-    if( hOs  == NULL )
-    {
-        WLAN_OS_REPORT(("FATAL ERROR: ctrlData_create(): OS handle Error - Aborting\n"));
-        return NULL;
-    }
-
-    /* alocate Control module control block */
-    hCtrlData = os_memoryAlloc (hOs, sizeof(ctrlData_t));
-    if (!hCtrlData)
-    {
-        return NULL;
-    }
-
-    /* reset control module control block */
-    os_memoryZero (hOs, hCtrlData, sizeof(ctrlData_t));
-
-    ((ctrlData_t *)hCtrlData)->hOs = hOs;
-
-    return (hCtrlData);
-}
-
-
-/***************************************************************************
-*                           ctrlData_config                                *
-****************************************************************************
-* DESCRIPTION:  This function configures the Ctrl Data module       
-* 
-* INPUTS:       pStadHandles        - Other modules handles
-*               retriesUpdateCBFunc - Link test retries callback function
-*               retriesUpdateCBObj  - Link test retries callback handle
-*               
-* OUTPUT:       
-* 
-* RETURNS:      void
-***************************************************************************/
-void ctrlData_init (TStadHandlesList *pStadHandles,                       
-                    retriesCB_t       retriesUpdateCBFunc,
-                    TI_HANDLE         retriesUpdateCBObj)	
-{
-    ctrlData_t *pCtrlData = (ctrlData_t *)(pStadHandles->hCtrlData);
-
-    /* set objects handles */
-    pCtrlData->hTWD         = pStadHandles->hTWD;  
-    pCtrlData->hSiteMgr     = pStadHandles->hSiteMgr;
-	pCtrlData->hTxCtrl      = pStadHandles->hTxCtrl;
-    pCtrlData->hRxData      = pStadHandles->hRxData;
-    pCtrlData->hOs          = pStadHandles->hOs;
-    pCtrlData->hReport      = pStadHandles->hReport;
-    pCtrlData->hAPConn      = pStadHandles->hAPConnection;
-    pCtrlData->hEvHandler   = pStadHandles->hEvHandler;
-    pCtrlData->hTrafficMonitor = pStadHandles->hTrafficMon;
-    pCtrlData->hTxDataQ     = pStadHandles->hTxDataQ;
-    pCtrlData->hStaCap      = pStadHandles->hStaCap;
-
-#ifdef XCC_MODULE_INCLUDED
-	/* Register the link test retries CB */
-	pCtrlData->retriesUpdateCBFunc = retriesUpdateCBFunc;
-	pCtrlData->retriesUpdateCBObj  = retriesUpdateCBObj;
-#endif
-    
-    TRACE0(pCtrlData->hReport, REPORT_SEVERITY_INIT, ".....Ctrl Data configured successfully ...\n");
-}
-
-
-TI_STATUS ctrlData_SetDefaults (TI_HANDLE hCtrlData, ctrlDataInitParams_t *ctrlDataInitParams)
-{
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-    TI_UINT32 ac;
-
-    /*  set Control module parameters */
-    pCtrlData->ctrlDataDesiredIbssProtection = ctrlDataInitParams->ctrlDataDesiredIbssProtection;
-    pCtrlData->ctrlDataIbssProtectionType = ctrlDataInitParams->ctrlDataDesiredIbssProtection;
-    pCtrlData->ctrlDataRtsCtsStatus = ctrlDataInitParams->ctrlDataDesiredCtsRtsStatus;
-
-    MAC_COPY (pCtrlData->ctrlDataDeviceMacAddress, 
-              ctrlDataInitParams->ctrlDataDeviceMacAddress);
-
-    pCtrlData->ctrlDataCurrentBssType = BSS_INFRASTRUCTURE;
-
-    /* Set short/long retry for all ACs plus one policy for management packets */
-    for (ac=0; ac < MAX_NUM_OF_AC + 1; ac++)
-    {
-        pCtrlData->ctrlDataTxRatePolicy.rateClass[ac].longRetryLimit  = ctrlDataInitParams->ctrlDataTxRatePolicy.longRetryLimit;
-        pCtrlData->ctrlDataTxRatePolicy.rateClass[ac].shortRetryLimit = ctrlDataInitParams->ctrlDataTxRatePolicy.shortRetryLimit;
-    }
-
-    /* Set enabled rates bitmap for each rates mode */
-    pCtrlData->policyEnabledRatesMaskCck   = ctrlDataInitParams->policyEnabledRatesMaskCck;
-    pCtrlData->policyEnabledRatesMaskOfdm  = ctrlDataInitParams->policyEnabledRatesMaskOfdm; 
-    pCtrlData->policyEnabledRatesMaskOfdmA = ctrlDataInitParams->policyEnabledRatesMaskOfdmA; 
-    pCtrlData->policyEnabledRatesMaskOfdmN = ctrlDataInitParams->policyEnabledRatesMaskOfdmN;
-
-    ctrlData_updateTxRateAttributes(hCtrlData); /* Update TxCtrl module with rate change.*/
-
-    /* Initialize traffic intensity threshold parameters */
-    pCtrlData->ctrlDataTrafficIntensityEventsEnabled = ctrlDataInitParams->ctrlDataTrafficThresholdEnabled;
-    pCtrlData->ctrlDataTrafficIntensityThresholds.uHighThreshold = ctrlDataInitParams->ctrlDataTrafficThreshold.uHighThreshold;
-    pCtrlData->ctrlDataTrafficIntensityThresholds.uLowThreshold = ctrlDataInitParams->ctrlDataTrafficThreshold.uLowThreshold;
-    pCtrlData->ctrlDataTrafficIntensityThresholds.TestInterval = ctrlDataInitParams->ctrlDataTrafficThreshold.TestInterval;
-
-    TRACE4(pCtrlData->hReport, REPORT_SEVERITY_INFORMATION, "\nTraffic Intensity parameters:\nEvents enabled = %d\nuHighThreshold = %d\nuLowThreshold = %d\nTestInterval = %d\n\n", pCtrlData->ctrlDataTrafficIntensityEventsEnabled, pCtrlData->ctrlDataTrafficIntensityThresholds.uHighThreshold, pCtrlData->ctrlDataTrafficIntensityThresholds.uLowThreshold, pCtrlData->ctrlDataTrafficIntensityThresholds.TestInterval);
-
-    /* Register the traffic intensity events with the traffic monitor */
-    ctrlData_RegisterTrafficIntensityEvents (pCtrlData);
-
-    /* If the events are enabled, start notification, if disabled - then do nothing */
-    ctrlData_ToggleTrafficIntensityNotification (pCtrlData, pCtrlData->ctrlDataTrafficIntensityEventsEnabled);
-
-    return TI_OK;
-}
-
-
-/***************************************************************************
-*                           ctrlData_unLoad                                *
-****************************************************************************
-* DESCRIPTION:  This function unload the Ctrl data module. 
-* 
-* INPUTS:       hCtrlData - the object
-*       
-* OUTPUT:       
-* 
-* RETURNS:      TI_OK - Unload succesfull
-*               TI_NOK - Unload unsuccesfull
-***************************************************************************/
-TI_STATUS ctrlData_unLoad(TI_HANDLE hCtrlData)  
-{
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-
-    /* check parameters validity */
-    if( pCtrlData == NULL )
-    {
-        return TI_NOK;
-    }
-
-    /* free control module object */
-    os_memoryFree(pCtrlData->hOs, hCtrlData, sizeof(ctrlData_t));
-
-    return TI_OK;
-}
-
-TI_STATUS ctrlData_getParamProtType(TI_HANDLE hCtrlData, erpProtectionType_e *protType)
-{ /* CTRL_DATA_CURRENT_IBSS_PROTECTION_PARAM */
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-
-    *protType = pCtrlData->ctrlDataIbssProtectionType;
-    return TI_OK;
-}
-
-TI_STATUS ctrlData_getParamPreamble(TI_HANDLE hCtrlData, EPreamble *preamble)
-{ /* CTRL_DATA_CURRENT_PREAMBLE_TYPE_PARAM */
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-
-    *preamble = pCtrlData->ctrlDataCurrentPreambleType;
-    return TI_OK;
-}
-
-/***************************************************************************
-*                           ctrlData_getParamBssid                         *
-****************************************************************************
-* DESCRIPTION:  get a specific parameter related to Bssid
-* 
-* INPUTS:       hCtrlData - the object
-*               paramVal  - type of parameter
-*               
-*       
-* OUTPUT:       bssid
-* 
-* RETURNS:      TI_OK
-*               TI_NOK
-***************************************************************************/
-TI_STATUS ctrlData_getParamBssid(TI_HANDLE hCtrlData, EInternalParam paramVal, TMacAddr bssid)
-{
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-
-    if (paramVal == CTRL_DATA_CURRENT_BSSID_PARAM) {
-        MAC_COPY (bssid, pCtrlData->ctrlDataCurrentBSSID);
-    }
-    else if (paramVal == CTRL_DATA_MAC_ADDRESS) {
-        TFwInfo *pFwInfo = TWD_GetFWInfo (pCtrlData->hTWD);
-        MAC_COPY (bssid, pFwInfo->macAddress); 
-    }
-
-    return TI_OK;
-}
-
-/***************************************************************************
-*                           ctrlData_getParam                              *
-****************************************************************************
-* DESCRIPTION:  get a specific parameter
-* 
-* INPUTS:       hCtrlData - the object
-*               
-*       
-* OUTPUT:       pParamInfo - structure which include the value of 
-*               the requested parameter
-* 
-* RETURNS:      TI_OK
-*               TI_NOK
-***************************************************************************/
-
-TI_STATUS ctrlData_getParam(TI_HANDLE hCtrlData, paramInfo_t *pParamInfo)   
-{
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-    
-    TRACE1(pCtrlData->hReport, REPORT_SEVERITY_INFORMATION, "ctrlData_getParam() : param=0x%x \n", pParamInfo->paramType);
-
-    switch (pParamInfo->paramType)
-    {
-    case CTRL_DATA_CURRENT_BSSID_PARAM:          
-		MAC_COPY (pParamInfo->content.ctrlDataCurrentBSSID, 
-                  pCtrlData->ctrlDataCurrentBSSID);
-        break; 
-
-    case CTRL_DATA_CURRENT_BSS_TYPE_PARAM:  
-        pParamInfo->content.ctrlDataCurrentBssType = pCtrlData->ctrlDataCurrentBssType;        
-        break; 
-
-    case CTRL_DATA_CURRENT_PREAMBLE_TYPE_PARAM: 
-        pParamInfo->content.ctrlDataCurrentPreambleType = pCtrlData->ctrlDataCurrentPreambleType;        
-        break; 
-
-    case CTRL_DATA_MAC_ADDRESS:   
-        {
-            TFwInfo *pFwInfo = TWD_GetFWInfo (pCtrlData->hTWD);
-            MAC_COPY (pParamInfo->content.ctrlDataDeviceMacAddress, pFwInfo->macAddress); 
-        }
-        break;
-
-    case CTRL_DATA_CURRENT_PROTECTION_STATUS_PARAM:
-        pParamInfo->content.ctrlDataProtectionEnabled = pCtrlData->ctrlDataProtectionEnabled;
-        break;
-
-    case CTRL_DATA_CURRENT_IBSS_PROTECTION_PARAM:
-        pParamInfo->content.ctrlDataIbssProtecionType = pCtrlData->ctrlDataIbssProtectionType;
-        break;
-
-    case CTRL_DATA_CURRENT_RTS_CTS_STATUS_PARAM:
-        pParamInfo->content.ctrlDataRtsCtsStatus = pCtrlData->ctrlDataRtsCtsStatus;
-        break;
-
-    case CTRL_DATA_CLSFR_TYPE:
-        txDataClsfr_GetClsfrType (pCtrlData->hTxDataQ, &pParamInfo->content.ctrlDataClsfrType);
-        break;
-
-    case CTRL_DATA_TRAFFIC_INTENSITY_THRESHOLD:
-        pParamInfo->content.ctrlDataTrafficIntensityThresholds.uHighThreshold = pCtrlData->ctrlDataTrafficIntensityThresholds.uHighThreshold;
-        pParamInfo->content.ctrlDataTrafficIntensityThresholds.uLowThreshold = pCtrlData->ctrlDataTrafficIntensityThresholds.uLowThreshold;
-        pParamInfo->content.ctrlDataTrafficIntensityThresholds.TestInterval = pCtrlData->ctrlDataTrafficIntensityThresholds.TestInterval;
-        break;
-
-    default:
-        TRACE0(pCtrlData->hReport, REPORT_SEVERITY_ERROR, " ctrlData_getParam() : PARAMETER NOT SUPPORTED \n");
-		return (PARAM_NOT_SUPPORTED);
-    }
-
-    return (TI_OK);
-}
-
-/***************************************************************************
-*                           ctrlData_buildSupportedHwRates                 *
-****************************************************************************
-* DESCRIPTION:  builds HwRatesBitMap (supported rates) for txRatePolicy by anding
-*                   the AP support and the Policy rates (Enabled/Disabled rates)
-* 
-* OUTPUT:       
-* 
-* RETURNS:      TI_OK
-*               TI_NOK
-***************************************************************************/
-static TI_UINT32 ctrlData_buildSupportedHwRates (TI_UINT32 APsupport,
-                                                 TI_UINT32 policySupport)
-{
-    TI_UINT32  AppRateBitMap = 0;
-    TI_UINT32  HwRatesBitMap = 0;
-
-    /* 1. AND all Supported Rates masks */
-    AppRateBitMap = APsupport & policySupport;
-
-    /* 2. Incase there are no mutual rates: ignor Policy Rate Settings (use only AP Rates) */
-	if ( AppRateBitMap == 0 )
-	{
-		AppRateBitMap = APsupport;
-    }
-
-    /* 3. Set total supported rates bit map for txRatePolicy */
-    rate_DrvBitmapToHwBitmap (AppRateBitMap, &HwRatesBitMap);
-
-    return HwRatesBitMap;
-}
-
-
-/***************************************************************************
-*                           ctrlData_setTxRatePolicies                     *
-****************************************************************************
-* DESCRIPTION:  This function sets rate fallback policies to be configured to FW
-*               If TSRS is defined to specific AC, the policy is derived from it,
-*               otherwise it is derived from pre-defined map
-* 
-* INPUTS:       pCtrlData - the object
-*       
-* RETURNS:      -
-*               
-***************************************************************************/
-static void ctrlData_setTxRatePolicies(ctrlData_t *pCtrlData)
-{
-    TI_UINT32 		ac; 
-	TI_UINT32 		uPolicyRateMask;    /* policy rates */
-	TI_UINT32 		uSupportedRateMask; /* AP supported rates */
-    TI_UINT32       fwPolicyID = 0;
-    TI_UINT32       uEnabledHwRatesMask;
-    TI_UINT32       uShiftedBit;
-    TI_UINT32       i;
-    TTwdParamInfo   param;
-
-    for (ac = 0; ac < MAX_NUM_OF_AC; ac++)
-    {
-        /* 1. If a special rate set is defined for this AC, use its related policy */
-        /*    Otherwise use default settings for this class */
-        if (pCtrlData->tsrsParameters[ac].supportedRatesMask != 0)
-        {
-            uPolicyRateMask    = pCtrlData->tsrsParameters[ac].policyClassRateMask;
-            uSupportedRateMask = pCtrlData->tsrsParameters[ac].supportedRatesMask;
-        }
-        else
-        {
-            uPolicyRateMask    = pCtrlData->uCurrPolicyEnabledRatesMask;
-            uSupportedRateMask = pCtrlData->ctrlDataCurrentRateMask;
-        }
-
-        /* 2. Build a bitMap for the supported rates */
-        uEnabledHwRatesMask = ctrlData_buildSupportedHwRates (uSupportedRateMask, uPolicyRateMask);   
-        pCtrlData->ctrlDataTxRatePolicy.rateClass[fwPolicyID].txEnabledRates = uEnabledHwRatesMask;
-
-        TRACE2(pCtrlData->hReport, REPORT_SEVERITY_INFORMATION, "ctrlData_setTxRatePolicies: AC %d, rate-policy 0x%x", ac, uEnabledHwRatesMask);
-
-        /* Note that Long/Short retries are pre-set during configuration stage */
-
-        /* 3. Finally, increase total number of policies */
-        pCtrlData->tsrsParameters[ac].fwPolicyID = fwPolicyID++;
-
-    } /* for (ac = 0; ac < MAX_NUM_OF_AC; ac++) */
-
-    /* Add a specific policy for management packets, which uses only the lowest supported rate */
-    pCtrlData->uMgmtPolicyId = fwPolicyID;
-    uShiftedBit = 1;
-    for (i = 0; i < 32; i++)
-    {
-        if ((uShiftedBit & uEnabledHwRatesMask) != 0)
-        {
-            break;
-        }
-        uShiftedBit = uShiftedBit << 1;
-    }
-    pCtrlData->ctrlDataTxRatePolicy.rateClass[fwPolicyID].txEnabledRates = uShiftedBit;
-    fwPolicyID++;
-
-    /* Download policies to the FW. Num of policies is 8 - one for each AC for every class */
-    TRACE1(pCtrlData->hReport, REPORT_SEVERITY_INFORMATION, "ctrlData_setTxRatePolicies: num of Rate policies: %d\n", fwPolicyID);
-
-    pCtrlData->ctrlDataTxRatePolicy.numOfRateClasses = fwPolicyID;
-    param.paramType = TWD_TX_RATE_CLASS_PARAM_ID;
-    param.content.pTxRatePlicy = &pCtrlData->ctrlDataTxRatePolicy;
-
-    TWD_SetParam (pCtrlData->hTWD, &param);
-}
-
-
-/***************************************************************************
-*                           ctrlData_setParam                              *
-****************************************************************************
-* DESCRIPTION:  set a specific parameter
-* 
-* INPUTS:       hCtrlData - the object
-*               pParamInfo - structure which include the value to set for 
-*               the requested parameter
-*       
-* OUTPUT:       
-* 
-* RETURNS:      TI_OK
-*               TI_NOK
-***************************************************************************/
-
-TI_STATUS ctrlData_setParam(TI_HANDLE hCtrlData, paramInfo_t *pParamInfo)   
-{
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-    TTwdParamInfo param;
-
-    TRACE1(pCtrlData->hReport, REPORT_SEVERITY_INFORMATION, "ctrlData_setParam() : param=0x%x \n", pParamInfo->paramType);
-
-    switch (pParamInfo->paramType)
-    {
-    case CTRL_DATA_RATE_CONTROL_ENABLE_PARAM:
-        selectRateTable(pCtrlData, pCtrlData->ctrlDataCurrentRateMask);
-
-        ctrlData_setTxRatePolicies(pCtrlData);
-
-		ctrlData_updateTxRateAttributes(hCtrlData); /* Update the TxCtrl module with rate changes. */
-
-        break; 
-        
-    case CTRL_DATA_CURRENT_BSSID_PARAM:          
-		MAC_COPY (pCtrlData->ctrlDataCurrentBSSID,
-			      pParamInfo->content.ctrlDataCurrentBSSID);
-		txCtrlParams_setBssId (pCtrlData->hTxCtrl, &(pCtrlData->ctrlDataCurrentBSSID));
-        break; 
-
-    case CTRL_DATA_CURRENT_BSS_TYPE_PARAM:
-        if( pParamInfo->content.ctrlDataCurrentBssType != BSS_INFRASTRUCTURE &&
-            pParamInfo->content.ctrlDataCurrentBssType != BSS_INDEPENDENT )
-            return(PARAM_VALUE_NOT_VALID);
-
-        pCtrlData->ctrlDataCurrentBssType = pParamInfo->content.ctrlDataCurrentBssType;        
-		txCtrlParams_setBssType (pCtrlData->hTxCtrl, pCtrlData->ctrlDataCurrentBssType);
-        break; 
-
-    case CTRL_DATA_CURRENT_PREAMBLE_TYPE_PARAM: 
-        if( pParamInfo->content.ctrlDataCurrentPreambleType != PREAMBLE_LONG &&
-            pParamInfo->content.ctrlDataCurrentPreambleType != PREAMBLE_SHORT )
-            return(PARAM_VALUE_NOT_VALID);
- pCtrlData->ctrlDataCurrentPreambleType = pParamInfo->content.ctrlDataCurrentPreambleType;        
-        break; 
-
-    case CTRL_DATA_CURRENT_SUPPORTED_RATE_MASK_PARAM:
-        pCtrlData->ctrlDataCurrentRateMask = pParamInfo->content.ctrlDataCurrentRateMask;
-        selectRateTable(pCtrlData, pCtrlData->ctrlDataCurrentRateMask);
-		ctrlData_updateTxRateAttributes(hCtrlData); /* Update the TxCtrl module with rate changes. */
-        break; 
-
-    case CTRL_DATA_TSRS_PARAM:
-        ctrlData_storeTSRateSet(pCtrlData, &pParamInfo->content.txDataQosParams);
-
-        break;
-
-    case CTRL_DATA_CURRENT_PROTECTION_STATUS_PARAM:
-        if (pCtrlData->ctrlDataProtectionEnabled != pParamInfo->content.ctrlDataProtectionEnabled)
-        {
-            pCtrlData->ctrlDataProtectionEnabled = pParamInfo->content.ctrlDataProtectionEnabled;
-
-            /* set indication also to TNET */
-            param.paramType = TWD_CTS_TO_SELF_PARAM_ID;
-            if(pCtrlData->ctrlDataProtectionEnabled == TI_TRUE)
-                param.content.halCtrlCtsToSelf = CTS_TO_SELF_ENABLE;
-            else
-                param.content.halCtrlCtsToSelf = CTS_TO_SELF_DISABLE;
-            
-            TWD_SetParam (pCtrlData->hTWD, &param);
-
-
-            /* In case of using protection fragmentation should be disabled */
-            param.paramType = TWD_FRAG_THRESHOLD_PARAM_ID;
-            if(pCtrlData->ctrlDataProtectionEnabled == TI_TRUE)
-            {
-                /* save last non-protection mode fragmentation threshold */
-                TWD_GetParam(pCtrlData->hTWD,&param);
-                pCtrlData->lastFragmentThreshold = param.content.halCtrlFragThreshold;
-                /* set fragmentation threshold to max (disable) */
-                param.content.halCtrlFragThreshold = TWD_FRAG_THRESHOLD_MAX;
-            }
-            else
-                param.content.halCtrlFragThreshold = pCtrlData->lastFragmentThreshold;
-            
-            TWD_SetParam(pCtrlData->hTWD,&param);
-        }
-
-        break;
-
-    case CTRL_DATA_CURRENT_IBSS_PROTECTION_PARAM:
-        if(ERP_PROTECTION_STANDARD == pCtrlData->ctrlDataDesiredIbssProtection) 
-        {
-            pCtrlData->ctrlDataIbssProtectionType = pParamInfo->content.ctrlDataIbssProtecionType;
-        }
-        else
-        {
-            pCtrlData->ctrlDataIbssProtectionType = ERP_PROTECTION_NONE;
-        }
-                       
-        /* set indication also to TNET */
-        param.paramType = TWD_CTS_TO_SELF_PARAM_ID;
-        if(pCtrlData->ctrlDataIbssProtectionType != ERP_PROTECTION_NONE)
-            param.content.halCtrlCtsToSelf = CTS_TO_SELF_ENABLE;
-        else
-            param.content.halCtrlCtsToSelf = CTS_TO_SELF_DISABLE;
-
-        TWD_SetParam (pCtrlData->hTWD, &param);
-        break;
-
-    case CTRL_DATA_CURRENT_RTS_CTS_STATUS_PARAM:
-        pCtrlData->ctrlDataRtsCtsStatus = pParamInfo->content.ctrlDataRtsCtsStatus;
-        break;
-    case CTRL_DATA_CLSFR_TYPE:
-        txDataClsfr_SetClsfrType (pCtrlData->hTxDataQ, pParamInfo->content.ctrlDataClsfrType);
-        break;
-
-    case CTRL_DATA_CLSFR_CONFIG:
-        txDataClsfr_InsertClsfrEntry(pCtrlData->hTxDataQ, &pParamInfo->content.ctrlDataClsfrInsertTable);
-        break;
-
-    case CTRL_DATA_CLSFR_REMOVE_ENTRY:
-        txDataClsfr_RemoveClsfrEntry(pCtrlData->hTxDataQ, &pParamInfo->content.ctrlDataClsfrInsertTable);
-       break;
-       
-    case CTRL_DATA_TOGGLE_TRAFFIC_INTENSITY_EVENTS:
-
-            /* Enable or disable events according to flag */
-            ctrlData_ToggleTrafficIntensityNotification (pCtrlData, (TI_BOOL)pParamInfo->content.ctrlDataTrafficIntensityEventsFlag);
-        
-        break;
-
-    case CTRL_DATA_TRAFFIC_INTENSITY_THRESHOLD:
-        {
-            OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS *localParams = &pParamInfo->content.ctrlDataTrafficIntensityThresholds;
-            TI_BOOL savedEnableFlag;   /* Used to save previous enable/disable flag - before stopping/starting events for change in params */
-        
-            /* If any of the parameters has changed, we need to re-register with the Traffic Monitor */
-            if ((localParams->uHighThreshold != pCtrlData->ctrlDataTrafficIntensityThresholds.uHighThreshold) ||
-                (localParams->uLowThreshold != pCtrlData->ctrlDataTrafficIntensityThresholds.uLowThreshold) ||
-                (localParams->TestInterval != pCtrlData->ctrlDataTrafficIntensityThresholds.TestInterval))
-            {
-
-                os_memoryCopy(pCtrlData->hOs, &pCtrlData->ctrlDataTrafficIntensityThresholds,
-                                localParams,
-                                sizeof(OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS));
-
-                savedEnableFlag = pCtrlData->ctrlDataTrafficIntensityEventsEnabled;
-
-                /* Turn off traffic events */
-                ctrlData_ToggleTrafficIntensityNotification (pCtrlData, TI_FALSE);
-
-                /* Unregister current events */
-                ctrlData_UnregisterTrafficIntensityEvents (pCtrlData);
-                
-                /* And re-register with new thresholds */
-                ctrlData_RegisterTrafficIntensityEvents (pCtrlData);
-
-                /* Enable events if they were enabled  */
-                ctrlData_ToggleTrafficIntensityNotification (pCtrlData, savedEnableFlag);
-
-            }
-        }
-        
-        break;
-
-    default:
-TRACE0(pCtrlData->hReport, REPORT_SEVERITY_ERROR, " ctrlData_setParam() : PARAMETER NOT SUPPORTED \n");
-        return (PARAM_NOT_SUPPORTED);
-    }
-
-    return (TI_OK);
-}
-
-
-/***************************************************************************
-*                           selectRateTable                                *
-****************************************************************************
-* DESCRIPTION:  
-*
-* INPUTS:       hCtrlData - the object
-*               
-* OUTPUT:       
-*
-* RETURNS:      
-***************************************************************************/
-
-static void selectRateTable(TI_HANDLE hCtrlData, TI_UINT32 rateMask)
-{
-    paramInfo_t param;
-    ERate       rate;
-    TI_BOOL     b11nEnable;
-    
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-
-    rate = rate_GetMaxFromDrvBitmap (rateMask);
-
-    param.paramType = SITE_MGR_OPERATIONAL_MODE_PARAM;
-    siteMgr_getParam(pCtrlData->hSiteMgr, &param);
-
-    switch(param.content.siteMgrDot11OperationalMode)
-    {
-        case DOT11_B_MODE:
-            pCtrlData->uCurrPolicyEnabledRatesMask = pCtrlData->policyEnabledRatesMaskCck;
-            break;
-
-        case DOT11_G_MODE:
-            if( (rate == DRV_RATE_11M) || 
-                (rate == DRV_RATE_5_5M)|| 
-                (rate == DRV_RATE_2M)  || 
-                (rate == DRV_RATE_1M)    )
-            {
-                pCtrlData->uCurrPolicyEnabledRatesMask = pCtrlData->policyEnabledRatesMaskCck;
-            }
-            else
-            {
-               pCtrlData->uCurrPolicyEnabledRatesMask = pCtrlData->policyEnabledRatesMaskOfdm;
-            }
-            break;
-
-        case DOT11_A_MODE:
-            pCtrlData->uCurrPolicyEnabledRatesMask = pCtrlData->policyEnabledRatesMaskOfdmA;
-            break;
-
-        case DOT11_DUAL_MODE:
-        case DOT11_MAX_MODE:
-        case DOT11_N_MODE:
-            TRACE0(pCtrlData->hReport, REPORT_SEVERITY_ERROR, " uCurrPolicyEnabledRatesMask not configured !!!");
-            break;
-    }
-
-    /* add HT MCS rates */
-    StaCap_IsHtEnable (pCtrlData->hStaCap, &b11nEnable);
-    if (b11nEnable == TI_TRUE)
-    {
-        if ((rate == DRV_RATE_MCS_0) |
-            (rate == DRV_RATE_MCS_1) |
-            (rate == DRV_RATE_MCS_2) |
-            (rate == DRV_RATE_MCS_3) |
-            (rate == DRV_RATE_MCS_4) |
-            (rate == DRV_RATE_MCS_5) |
-            (rate == DRV_RATE_MCS_6) |
-            (rate == DRV_RATE_MCS_7))
-        {
-            pCtrlData->uCurrPolicyEnabledRatesMask = pCtrlData->policyEnabledRatesMaskOfdmN;
-        }
-    }
-}
-
-
-/***************************************************************************
-*                           ctrlData_stop                                  *
-****************************************************************************
-* DESCRIPTION:  This function stop the link control algorithms. 
-*
-* INPUTS:       hCtrlData - the object
-*       
-* OUTPUT:       
-* 
-* RETURNS:      TI_OK
-*               TI_NOK
-***************************************************************************/
-
-TI_STATUS ctrlData_stop(TI_HANDLE hCtrlData)    
-{
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-
-    /* set Preamble length option to default value*/
-    pCtrlData->ctrlDataCurrentPreambleType = DEF_CURRENT_PREAMBLE;
-
-    os_memoryZero(pCtrlData->hOs, 
-                  &pCtrlData->tsrsParameters, 
-                  sizeof(pCtrlData->tsrsParameters));
-
-    TRACE0(pCtrlData->hReport, REPORT_SEVERITY_INFORMATION, " ctrlData_stop() : Link control algorithms stoped \n");
-
-    return TI_OK;
-}
-
-
-/***************************************************************************
-*						ctrlData_updateTxRateAttributes		               *
-****************************************************************************
-* DESCRIPTION:	This function updates the TxCtrl module with all Tx rate attributes 
-*				  whenever any of them changes.
-*				It is called from ctrlData_setParam() after any rate param update.
-***************************************************************************/
-void ctrlData_updateTxRateAttributes(TI_HANDLE hCtrlData)	
-{
-	ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-	TI_UINT8    ac;
-
-	/* For each AC, get current Tx-rate policy for Data and for Mgmt packets and update the TxCtrl module. */
-	for (ac = 0; ac < MAX_NUM_OF_AC; ac++) 
-	{
-		txCtrlParams_updateMgmtRateAttributes(pCtrlData->hTxCtrl, pCtrlData->uMgmtPolicyId, ac);
-		txCtrlParams_updateDataRateAttributes(pCtrlData->hTxCtrl, pCtrlData->tsrsParameters[ac].fwPolicyID, ac);
-	}
-}
-
-/***************************************************************************
-*                   ctrlData_getCurrBssTypeAndCurrBssId                    *
-****************************************************************************
-* DESCRIPTION:  This function return the current BSSID and the 
-*               current BSS Type
-*
-* INPUTS:       hCtrlData - the object
-*               
-* OUTPUT:       pCurrBssid - pointer to return the current bssid    
-*               pCurrBssType - pointer to return the current bss type 
-*
-* RETURNS:      void
-***************************************************************************/
-void ctrlData_getCurrBssTypeAndCurrBssId(TI_HANDLE hCtrlData, TMacAddr *pCurrBssid, 
-                                           ScanBssType_e *pCurrBssType)
-{
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-    
-	MAC_COPY (*pCurrBssid, pCtrlData->ctrlDataCurrentBSSID);
-    *pCurrBssType = pCtrlData->ctrlDataCurrentBssType;
-
-}
-
-
-/*-----------------------------------------------------------------------------
-Routine Name: ctrlData_ToggleTrafficIntensityNotification
-Routine Description: turns ON/OFF traffic intensity notification events
-                     from Traffic Monitor module
-Arguments:
-Return Value:
------------------------------------------------------------------------------*/
-void ctrlData_ToggleTrafficIntensityNotification (TI_HANDLE hCtrlData, TI_BOOL enabledFlag)
-{
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-    TI_UINT8 idx;
-
-   if (enabledFlag)
-   {
-      for (idx=0; idx < CTRL_DATA_TRAFFIC_INTENSITY_MAX_EVENTS; idx++)
-      {
-         TrafficMonitor_StartEventNotif (pCtrlData->hTrafficMonitor,pCtrlData->ctrlDataTrafficThresholdEvents[idx]);
-      }
-      TRACE0(pCtrlData->hReport, REPORT_SEVERITY_INFORMATION, "ctrlData_ToggleTrafficIntensityNotification (TI_TRUE)\n");
-   }
-   else
-   {
-      for (idx=0; idx < CTRL_DATA_TRAFFIC_INTENSITY_MAX_EVENTS; idx++)
-      {
-         TrafficMonitor_StopEventNotif (pCtrlData->hTrafficMonitor,pCtrlData->ctrlDataTrafficThresholdEvents[idx]);
-      }
-      TRACE0(pCtrlData->hReport, REPORT_SEVERITY_INFORMATION, "ctrlData_ToggleTrafficIntensityNotification (TI_FALSE)\n");
-   }
-   pCtrlData->ctrlDataTrafficIntensityEventsEnabled = enabledFlag;
-
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name: ctrlData_UnregisterTrafficIntensityEvents
-Routine Description: unregisters existing events from traffic monitor
-Arguments:
-Return Value:
------------------------------------------------------------------------------*/
-static void ctrlData_UnregisterTrafficIntensityEvents (TI_HANDLE hCtrlData)
-{
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-    TI_UINT8 idx;
-
-    /* Loop through events and unregister them */
-    for (idx=0; idx < CTRL_DATA_TRAFFIC_INTENSITY_MAX_EVENTS; idx++)
-    {
-       TrafficMonitor_UnregEvent (pCtrlData->hTrafficMonitor,pCtrlData->ctrlDataTrafficThresholdEvents[idx]);
-    }
-
-    TRACE0(pCtrlData->hReport, REPORT_SEVERITY_INFORMATION, "ctrlData_UnregisterTrafficIntensityEvents: Unregistered all events\n");
-
-}
-
-
-/*-----------------------------------------------------------------------------
-Routine Name: ctrlData_RegisterTrafficIntensityEvents
-Routine Description: Registers traffic intensity threshold events through traffic monitor
-Arguments:
-Return Value:
------------------------------------------------------------------------------*/
-static void ctrlData_RegisterTrafficIntensityEvents (TI_HANDLE hCtrlData)
-{
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-    TrafficAlertRegParm_t TrafficAlertRegParm;
-    TI_STATUS status;
-
-    /* Register high threshold "direction up" event */
-    TrafficAlertRegParm.CallBack = ctrlData_TrafficThresholdCrossed;
-    TrafficAlertRegParm.Context = hCtrlData; 
-    TrafficAlertRegParm.Cookie =  CTRL_DATA_TRAFFIC_INTENSITY_HIGH_CROSSED_ABOVE;    
-    TrafficAlertRegParm.Direction = TRAFF_UP;
-    TrafficAlertRegParm.Trigger = TRAFF_EDGE;
-    TrafficAlertRegParm.TimeIntervalMs = pCtrlData->ctrlDataTrafficIntensityThresholds.TestInterval;
-    TrafficAlertRegParm.Threshold = pCtrlData->ctrlDataTrafficIntensityThresholds.uHighThreshold;
-    TrafficAlertRegParm.MonitorType = TX_RX_DIRECTED_FRAMES;
-    pCtrlData->ctrlDataTrafficThresholdEvents[0] = TrafficMonitor_RegEvent(pCtrlData->hTrafficMonitor,&TrafficAlertRegParm,TI_FALSE); 
-
-    if (pCtrlData->ctrlDataTrafficThresholdEvents[0] == NULL)
-    {
-         TRACE0(pCtrlData->hReport, REPORT_SEVERITY_ERROR, " ctrlData_RegisterTrafficIntensityEvents() : Failed to register high treshold event (TRAFF_UP) \n");
-         return;
-    }
-
-    /* Register high threshold "direction down" event*/
-    TrafficAlertRegParm.Cookie =  CTRL_DATA_TRAFFIC_INTENSITY_HIGH_CROSSED_BELOW;    
-    TrafficAlertRegParm.Direction = TRAFF_DOWN;
-    TrafficAlertRegParm.Trigger = TRAFF_EDGE;
-    TrafficAlertRegParm.Threshold = pCtrlData->ctrlDataTrafficIntensityThresholds.uHighThreshold;
-    pCtrlData->ctrlDataTrafficThresholdEvents[1] = TrafficMonitor_RegEvent(pCtrlData->hTrafficMonitor,&TrafficAlertRegParm,TI_FALSE); 
-
-    if (pCtrlData->ctrlDataTrafficThresholdEvents[1] == NULL)
-    {
-         TRACE0(pCtrlData->hReport, REPORT_SEVERITY_ERROR, " ctrlData_RegisterTrafficIntensityEvents() : Failed to register high treshold event (TRAFF_DOWN) \n");
-         return;
-    }
-
-    /* Define the "direction below" and "direction above" events as opposites (events that reset eachother)*/
-    status = TrafficMonitor_SetRstCondition(pCtrlData->hTrafficMonitor,
-                                            pCtrlData->ctrlDataTrafficThresholdEvents[0],
-                                            pCtrlData->ctrlDataTrafficThresholdEvents[1],
-                                            TI_TRUE);
-
-    if (status != TI_OK)
-    {
-      TRACE1(pCtrlData->hReport, REPORT_SEVERITY_ERROR , "ctrlData_RegisterTrafficIntensityEvents: TrafficMonitor_SetRstCondition returned status = %d\n",status);
-    }
-
-    /* Register low threshold "direction up" event */
-    TrafficAlertRegParm.Cookie =  CTRL_DATA_TRAFFIC_INTENSITY_LOW_CROSSED_ABOVE;    
-    TrafficAlertRegParm.Direction = TRAFF_UP;
-    TrafficAlertRegParm.Trigger = TRAFF_EDGE;
-    TrafficAlertRegParm.Threshold = pCtrlData->ctrlDataTrafficIntensityThresholds.uLowThreshold;
-    pCtrlData->ctrlDataTrafficThresholdEvents[2] = TrafficMonitor_RegEvent(pCtrlData->hTrafficMonitor,&TrafficAlertRegParm,TI_FALSE); 
-
-    if (pCtrlData->ctrlDataTrafficThresholdEvents[2] == NULL)
-    {
-         TRACE0(pCtrlData->hReport, REPORT_SEVERITY_ERROR, " ctrlData_RegisterTrafficIntensityEvents() : Failed to register low treshold event (TRAFF_UP) \n");
-         return;
-    }
-
-    /* Register low threshold "direction below" event */
-    TrafficAlertRegParm.Cookie =  CTRL_DATA_TRAFFIC_INTENSITY_LOW_CROSSED_BELOW;
-    TrafficAlertRegParm.Direction = TRAFF_DOWN;
-    TrafficAlertRegParm.Trigger = TRAFF_EDGE;
-    TrafficAlertRegParm.Threshold = pCtrlData->ctrlDataTrafficIntensityThresholds.uLowThreshold;
-    pCtrlData->ctrlDataTrafficThresholdEvents[3] = TrafficMonitor_RegEvent(pCtrlData->hTrafficMonitor,&TrafficAlertRegParm,TI_FALSE); 
-
-    if (pCtrlData->ctrlDataTrafficThresholdEvents[3] == NULL)
-    {
-         TRACE0(pCtrlData->hReport, REPORT_SEVERITY_ERROR, " ctrlData_RegisterTrafficIntensityEvents() : Failed to register low treshold event (TRAFF_DOWN) \n");
-         return;
-    }
-
-    /* Define the "direction below" and "direction above" events as opposites (events that reset eachother)*/
-    status = TrafficMonitor_SetRstCondition(pCtrlData->hTrafficMonitor,
-                                            pCtrlData->ctrlDataTrafficThresholdEvents[2],
-                                            pCtrlData->ctrlDataTrafficThresholdEvents[3],
-                                            TI_TRUE);
-
-    if (status != TI_OK)
-    {
-      TRACE1(pCtrlData->hReport, REPORT_SEVERITY_ERROR , "ctrlData_RegisterTrafficIntensityEvents: TrafficMonitor_SetRstCondition returned status = %d\n",status);
-    }
-  
-    TRACE0(pCtrlData->hReport, REPORT_SEVERITY_INFORMATION, " ctrlData_RegisterTrafficIntensityEvents() : finished registering all events \n");
-
-}
-
-
-/*-----------------------------------------------------------------------------
-Routine Name: ctrlData_TrafficThresholdCrossed
-Routine Description: called whenever traffic intensity threshold is crossed. 
-                     notifies event handler to send appropriate event with threshold parameters.
-Arguments:
-Return Value:
------------------------------------------------------------------------------*/
-static void ctrlData_TrafficThresholdCrossed(TI_HANDLE Context,TI_UINT32 Cookie)
-{
-    ctrlData_t *pCtrlData = (ctrlData_t *)Context;
-    trafficIntensityThresholdCross_t crossInfo;
-
-    switch(Cookie) 
-    {
-    case CTRL_DATA_TRAFFIC_INTENSITY_HIGH_CROSSED_ABOVE:
-            crossInfo.thresholdCross = (TI_UINT32)HIGH_THRESHOLD_CROSS;
-            crossInfo.thresholdCrossDirection = (TI_UINT32)CROSS_ABOVE;
-            EvHandlerSendEvent(pCtrlData->hEvHandler, IPC_EVENT_TRAFFIC_INTENSITY_THRESHOLD_CROSSED, (TI_UINT8 *)&crossInfo,sizeof(trafficIntensityThresholdCross_t));
-       break;
-
-    case CTRL_DATA_TRAFFIC_INTENSITY_HIGH_CROSSED_BELOW:
-            crossInfo.thresholdCross = (TI_UINT32)HIGH_THRESHOLD_CROSS;
-            crossInfo.thresholdCrossDirection = (TI_UINT32)CROSS_BELOW;
-            EvHandlerSendEvent(pCtrlData->hEvHandler, IPC_EVENT_TRAFFIC_INTENSITY_THRESHOLD_CROSSED, (TI_UINT8 *)&crossInfo,sizeof(trafficIntensityThresholdCross_t));
-       break;
-
-    case CTRL_DATA_TRAFFIC_INTENSITY_LOW_CROSSED_ABOVE:
-            crossInfo.thresholdCross = (TI_UINT32)LOW_THRESHOLD_CROSS;
-            crossInfo.thresholdCrossDirection = (TI_UINT32)CROSS_ABOVE;
-            EvHandlerSendEvent(pCtrlData->hEvHandler, IPC_EVENT_TRAFFIC_INTENSITY_THRESHOLD_CROSSED, (TI_UINT8 *)&crossInfo,sizeof(trafficIntensityThresholdCross_t));
-       break;
-
-    case CTRL_DATA_TRAFFIC_INTENSITY_LOW_CROSSED_BELOW:
-            crossInfo.thresholdCross = (TI_UINT32)LOW_THRESHOLD_CROSS;
-            crossInfo.thresholdCrossDirection = (TI_UINT32)CROSS_BELOW;
-            EvHandlerSendEvent(pCtrlData->hEvHandler, IPC_EVENT_TRAFFIC_INTENSITY_THRESHOLD_CROSSED, (TI_UINT8 *)&crossInfo,sizeof(trafficIntensityThresholdCross_t));
-       break;
-    default:
-         TRACE0(pCtrlData->hReport, REPORT_SEVERITY_ERROR, " ctrlData_TrafficThresholdCrossed() : Unknown cookie received from traffic monitor !!! \n");
-       break;
-   }
-    
-}
-
-/*************************************************************************
- *                                                                       *
- *                          DEBUG FUNCTIONS                              *
- *                                                                       *
- *************************************************************************/
-
-#ifdef TI_DBG
-
-void ctrlData_printTxParameters(TI_HANDLE hCtrlData)
-{
-#ifdef REPORT_LOG
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-
-    WLAN_OS_REPORT(("            Tx Parameters            \n"));
-    WLAN_OS_REPORT(("-------------------------------------\n"));
-    WLAN_OS_REPORT(("currentPreamble                     = %d\n\n",pCtrlData->ctrlDataCurrentPreambleType));
-    WLAN_OS_REPORT(("ctrlDataCurrentRateMask             = 0x%X\n",pCtrlData->ctrlDataCurrentRateMask));
-#endif
-}  
-
-
-void ctrlData_printCtrlBlock(TI_HANDLE hCtrlData)
-{
-#ifdef REPORT_LOG
-    ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
-    TI_UINT32  i;
-
-    WLAN_OS_REPORT(("    CtrlData BLock    \n"));
-    WLAN_OS_REPORT(("----------------------\n"));
-
-    WLAN_OS_REPORT(("hSiteMgr = 0x%X\n",pCtrlData->hSiteMgr));
-    WLAN_OS_REPORT(("hTWD = 0x%X\n",pCtrlData->hTWD));
-    WLAN_OS_REPORT(("hOs = 0x%X\n",pCtrlData->hOs));
-    WLAN_OS_REPORT(("hReport = 0x%X\n",pCtrlData->hReport));
-
-    WLAN_OS_REPORT(("ctrlDataDeviceMacAddress = 0x%X.0x%X.0x%X.0x%X.0x%X.0x%X. \n", pCtrlData->ctrlDataDeviceMacAddress[0],
-                                                                                    pCtrlData->ctrlDataDeviceMacAddress[1],
-                                                                                    pCtrlData->ctrlDataDeviceMacAddress[2],
-                                                                                    pCtrlData->ctrlDataDeviceMacAddress[3],
-                                                                                    pCtrlData->ctrlDataDeviceMacAddress[4],
-                                                                                    pCtrlData->ctrlDataDeviceMacAddress[5]));
-
-    WLAN_OS_REPORT(("ctrlDataCurrentBSSID = 0x%X.0x%X.0x%X.0x%X.0x%X.0x%X. \n", pCtrlData->ctrlDataCurrentBSSID[0],
-                                                                                pCtrlData->ctrlDataCurrentBSSID[1],
-                                                                                pCtrlData->ctrlDataCurrentBSSID[2],
-                                                                                pCtrlData->ctrlDataCurrentBSSID[3],
-                                                                                pCtrlData->ctrlDataCurrentBSSID[4],
-                                                                                pCtrlData->ctrlDataCurrentBSSID[5]));
-
-    WLAN_OS_REPORT(("ctrlDataCurrentBssType      = %d\n", pCtrlData->ctrlDataCurrentBssType));
-    WLAN_OS_REPORT(("ctrlDataCurrentRateMask     = 0x%X\n", pCtrlData->ctrlDataCurrentRateMask));
-    WLAN_OS_REPORT(("ctrlDataCurrentPreambleType = %d\n", pCtrlData->ctrlDataCurrentPreambleType));
-
-    WLAN_OS_REPORT(("Traffic Intensity threshold events status: %s\n", (pCtrlData->ctrlDataTrafficIntensityEventsEnabled ? "Enabled" : "Disabled")));
-    WLAN_OS_REPORT(("Traffic Intensity high threshold: %d packets/sec \n", pCtrlData->ctrlDataTrafficIntensityThresholds.uHighThreshold));
-    WLAN_OS_REPORT(("Traffic Intensity low threshold: %d packets/sec \n", pCtrlData->ctrlDataTrafficIntensityThresholds.uLowThreshold));
-    WLAN_OS_REPORT(("Traffic Intensity test interval: %d ms\n", pCtrlData->ctrlDataTrafficIntensityThresholds.TestInterval));
-
-    for (i=0; i < pCtrlData->ctrlDataTxRatePolicy.numOfRateClasses; i++)
-    {
-        WLAN_OS_REPORT(("Rate Enable/Disable Mask = 0x%x\n",
-						pCtrlData->ctrlDataTxRatePolicy.rateClass[i].txEnabledRates));
-
-        WLAN_OS_REPORT(("Long retry = %d, Short retry = %d\n",
-						pCtrlData->ctrlDataTxRatePolicy.rateClass[i].longRetryLimit,
-						pCtrlData->ctrlDataTxRatePolicy.rateClass[i].shortRetryLimit));
-    }
-#endif
-}
-
-
-#endif /*TI_DBG*/
-
-
-/***************************************************************************
-*                           ctrlData_storeTSRateSet                        
-****************************************************************************
-* DESCRIPTION:  This function translates TSRS rates into map of retransmissions
-*               similar to predefined clients rates retransmissions, and stores
-*               in the Ctrl database
-*
-* INPUTS:       pCtrlData - the object
-*               acID
-*               rates array
-*
-* RETURNS:      -
-****************************************************************************/
-static void ctrlData_storeTSRateSet(ctrlData_t *pCtrlData, TTxDataQosParams *tsrsParams)
-{
-    TI_UINT32 rateCount;
-    TI_UINT32 acID;
-    TI_UINT32 tsrsRequestedMap;
-    ERate rateNumber;
-
-    acID = tsrsParams->acID;
-    os_memoryZero(pCtrlData->hOs, 
-                  &(pCtrlData->tsrsParameters[acID]), 
-                  sizeof(pCtrlData->tsrsParameters[acID]));
-
-    tsrsRequestedMap = 0;
-
-    for (rateCount = 0; rateCount < tsrsParams->tsrsArrLen; rateCount++) 
-    {
-        /* Erase Most significant bit in case it was raised to mark nominal PHY rates (& 0x7F) */
-        /* Convert multiplication of 500kb/sec to ERate and then to ETxRateClassId */
-        /* and update retransmission map in accordance to rate definitions */
-        rateNumber = rate_NumberToDrv ((tsrsParams->tsrsArr[rateCount] & 0x7F) >> 1);
-
-        pCtrlData->tsrsParameters[acID].policyClassRateMask = pCtrlData->uCurrPolicyEnabledRatesMask;
-
-        tsrsRequestedMap |= 1 << (rateNumber - 1);
-    }
-    /* Update supportedRatesMask according to TSRS rates and rates supported */
-    pCtrlData->tsrsParameters[acID].supportedRatesMask = tsrsRequestedMap;
-
-    /* Check that Rate Fallback policy map is not empty; if this is the case, ignore pre-defined policy */
-    if (pCtrlData->tsrsParameters[acID].policyClassRateMask == 0)
-    {
-        pCtrlData->tsrsParameters[acID].policyClassRateMask = pCtrlData->tsrsParameters[acID].supportedRatesMask;
-    }
-}
-
-
-
-
diff --git a/wl1271/stad/src/Data_link/Ctrl.h b/wl1271/stad/src/Data_link/Ctrl.h
deleted file mode 100644
index 9e9d3f2..0000000
--- a/wl1271/stad/src/Data_link/Ctrl.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Ctrl.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   tx.h                                                       */
-/*    PURPOSE:  Tx module Header file                                      */
-/*                                                                         */
-/***************************************************************************/
-#ifndef _CTRL_H_
-#define _CTRL_H_
-
-#include "tidef.h"
-#include "paramOut.h"
-#include "rxXfer_api.h"
-#include "DataCtrl_Api.h"
-
-
-#define     DEF_CURRENT_PREAMBLE                        PREAMBLE_LONG
-#define     ALL_RATES_AVAILABLE                         0xFFFFFFFF                      
-
-typedef enum
-{
-    CTRL_DATA_TRAFFIC_INTENSITY_HIGH_CROSSED_ABOVE,
-    CTRL_DATA_TRAFFIC_INTENSITY_HIGH_CROSSED_BELOW,
-    CTRL_DATA_TRAFFIC_INTENSITY_LOW_CROSSED_ABOVE,
-    CTRL_DATA_TRAFFIC_INTENSITY_LOW_CROSSED_BELOW,
-    CTRL_DATA_TRAFFIC_INTENSITY_MAX_EVENTS
-} ctrlData_trafficIntensityEvents_e;
-
-
-#define TS_EXCEEDS(currTime,expTime) (currTime > expTime)
-#define TS_ADVANCE(currTime,expTime,delta) (expTime = currTime + (delta))
-
-typedef struct 
-{
-    TI_UINT32 supportedRatesMask;
-    TI_UINT32 policyClassRateMask;
-    TI_UINT32 fwPolicyID;
-}tsrsParameters_t;
-
-typedef struct
-{
-    TI_HANDLE               hSiteMgr;
-    TI_HANDLE               hTxCtrl;
-    TI_HANDLE               hRxData;
-    TI_HANDLE               hTWD;  
-    TI_HANDLE               hOs;
-    TI_HANDLE               hReport;
-    TI_HANDLE               hAPConn;
-    TI_HANDLE               hEvHandler;
-    TI_HANDLE               hTrafficMonitor;
-    TI_HANDLE               hTxDataQ;
-    TI_HANDLE               hStaCap;
-    
-    TMacAddr                ctrlDataCurrentBSSID; 
-    ScanBssType_e           ctrlDataCurrentBssType; 
-    TI_UINT32               ctrlDataCurrentRateMask;
-    EPreamble               ctrlDataCurrentPreambleType; 
-    TMacAddr                ctrlDataDeviceMacAddress; 
-    TI_BOOL                 ctrlDataProtectionEnabled;
-    RtsCtsStatus_e          ctrlDataRtsCtsStatus;
-    erpProtectionType_e     ctrlDataIbssProtectionType;
-    erpProtectionType_e     ctrlDataDesiredIbssProtection; /* 0 = CTS protaction disable ; 1 = Standard CTS protaction */
-
-    /*
-     * txRatePolicy section
-     */
-
-    /* txRatePolicies - here we store the policy and set it to the FW */
-    TTxRatePolicy           ctrlDataTxRatePolicy;
-
-    /* number of retries for each rate in each class in the policy that we set to the FW */ 
-	TI_UINT32               policyEnabledRatesMaskCck;
-	TI_UINT32               policyEnabledRatesMaskOfdm;
-	TI_UINT32               policyEnabledRatesMaskOfdmA;
-	TI_UINT32               policyEnabledRatesMaskOfdmN;
-
-    TI_UINT32               uCurrPolicyEnabledRatesMask;    /* holds the current used En/Dis Rates Mask */
-    TI_UINT32               uMgmtPolicyId;                  /* the management packets policy ID */
-
-#ifdef XCC_MODULE_INCLUDED
-    /* Callback for update retries in Link Test */
-    retriesCB_t             retriesUpdateCBFunc;
-    TI_HANDLE               retriesUpdateCBObj;
-#endif
-
-    /* Flag to indicate whether traffic intensity events should be sent or not */
-    TI_BOOL                 ctrlDataTrafficIntensityEventsEnabled;
-    OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS ctrlDataTrafficIntensityThresholds;
-    TI_HANDLE               ctrlDataTrafficThresholdEvents[CTRL_DATA_TRAFFIC_INTENSITY_MAX_EVENTS];
-
-    tsrsParameters_t        tsrsParameters[MAX_NUM_OF_AC];
-
-    /* holds last fragmentation threshold */
-    TI_UINT16               lastFragmentThreshold;
-
-} ctrlData_t;
-
-
-#endif
diff --git a/wl1271/stad/src/Data_link/DataCtrl_Api.h b/wl1271/stad/src/Data_link/DataCtrl_Api.h
deleted file mode 100644
index baa4f4f..0000000
--- a/wl1271/stad/src/Data_link/DataCtrl_Api.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * DataCtrl_Api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*                                                                         */
-/*      PURPOSE:    DataCtrl module api functions header file              */
-/*                                                                         */
-/***************************************************************************/
-
-#ifndef _DATA_CTRL_API_H_
-#define _DATA_CTRL_API_H_
-
-#include "paramOut.h"
-#include "rxXfer_api.h"
-#include "802_11Defs.h"
-#include "GeneralUtilApi.h"
-#include "DrvMainModules.h"
-
-/* Include all core Tx modules APIs */
-#include "txCtrl_Api.h"
-#include "txPort_Api.h"
-#include "txDataQueue_Api.h"
-#include "txMgmtQueue_Api.h"
-
-
-typedef enum
-{
-    RX_DATA_EAPOL_DESTINATION_PARAM = 0x01,
-    RX_DATA_PORT_STATUS_PARAM       = 0x02
-
-} ERxDataParam;
-
-
-/*  RX MODULE   */
-/*--------------*/
-
-/* Rx module interface functions */
-
-#define RECV_OK                  0x1
-#define DIRECTED_BYTES_RECV      0x2
-#define DIRECTED_FRAMES_RECV     0x4
-#define MULTICAST_BYTES_RECV     0x8
-#define MULTICAST_FRAMES_RECV    0x10   
-#define BROADCAST_BYTES_RECV     0x20    
-#define BROADCAST_FRAMES_RECV    0x40
-
-#define NO_RX_NOTIFICATION  0x0
-
-#define ALL_RCV_FRAME (DIRECTED_FRAMES_RECV|MULTICAST_FRAMES_RECV|BROADCAST_FRAMES_RECV)
-
-#define  MAX_RX_NOTIF_REQ_ELMENTS 8
-
-
-/*TI_HANDLE rxData_create (msduReceiveCB_t* msduReceiveCB, TI_HANDLE hOs);  */
-TI_HANDLE rxData_create (TI_HANDLE hOs);    
-
-void      rxData_init (TStadHandlesList *pStadHandles);
-
-TI_STATUS rxData_SetDefaults (TI_HANDLE hRxData, rxDataInitParams_t * rxDataInitParams);
-                         
-void      rxData_receivePacketFromWlan (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr);
-
-TI_STATUS rxData_stop(TI_HANDLE hRxData);
-
-TI_STATUS rxData_unLoad(TI_HANDLE hRxData); 
-
-TI_STATUS ctrlData_getParamProtType(TI_HANDLE hCtrlData, erpProtectionType_e *protType);
-
-TI_STATUS ctrlData_getParamPreamble(TI_HANDLE hCtrlData, EPreamble *preamble);
-
-TI_STATUS ctrlData_getParamBssid(TI_HANDLE hCtrlData, EInternalParam paramVal, TMacAddr bssid);
-
-TI_STATUS rxData_getParam(TI_HANDLE hRxData, paramInfo_t *pParamInfo);  
-
-TI_STATUS rxData_setParam(TI_HANDLE hRxData, paramInfo_t *pParamInfo);  
-
-TI_STATUS rxData_getTiwlnCounters(TI_HANDLE hRxData, TIWLN_COUNTERS *pTiwlnCounters);
-
-void      rxData_resetCounters(TI_HANDLE hRxData);
-
-TI_HANDLE rxData_RegNotif(TI_HANDLE hRxData,TI_UINT16 EventMask,GeneralEventCall_t CallBack,TI_HANDLE context,TI_UINT32 Cookie);
-
-TI_STATUS rxData_UnRegNotif(TI_HANDLE hRxData,TI_HANDLE RegEventHandle);
-
-TI_STATUS rxData_AddToNotifMask(TI_HANDLE hRxData,TI_HANDLE Notifh,TI_UINT16 EventMask);
-
-void rxData_SetReAuthInProgress(TI_HANDLE hRxData, TI_BOOL	value);
-
-TI_BOOL rxData_IsReAuthInProgress(TI_HANDLE hRxData);
-
-void rxData_StopReAuthActiveTimer(TI_HANDLE hRxData);
-void rxData_ReauthDisablePriority(TI_HANDLE hRxData);
-
-/* debug functions */
-void rxData_resetDbgCounters(TI_HANDLE hRxData);
-void rxData_printRxBlock(TI_HANDLE hRxData);
-void rxData_printRxCounters(TI_HANDLE hRxData);
-void rxData_startRxThroughputTimer(TI_HANDLE hRxData); 
-void rxData_stopRxThroughputTimer(TI_HANDLE hRxData); 
-void rxData_printRxDataFilter(TI_HANDLE hRxData);
-
-
-
-/* CONTROL MODULE */
-/*----------------*/
-
-#define XFER_OK                 0x1
-#define DIRECTED_BYTES_XFER     0x2
-#define DIRECTED_FRAMES_XFER    0x4
-#define MULTICAST_BYTES_XFER    0x8
-#define MULTICAST_FRAMES_XFER   0x10
-#define BROADCAST_BYTES_XFER    0x20
-#define BROADCAST_FRAMES_XFER   0x40
-
-#define  MAX_TX_NOTIF_REQ_ELMENTS 8
-
-
-typedef struct
-{
-    TMacAddr    ctrlDataDeviceMacAddress; 
-} ctrlDataConfig_t; 
-
-/* retries for the next link test packet Callback */
-typedef void (*retriesCB_t)(TI_HANDLE handle, TI_UINT8 ackFailures);
-
-/*******************************/
-/* Control module interface functions */
-TI_HANDLE ctrlData_create(TI_HANDLE hOs);
-
-void      ctrlData_init (TStadHandlesList *pStadHandles,                       
-                         retriesCB_t       retriesUpdateCBFunc,
-                         TI_HANDLE         retriesUpdateCBObj);
-
-TI_STATUS ctrlData_SetDefaults (TI_HANDLE hCtrlData, ctrlDataInitParams_t *ctrlDataInitParams);
-
-TI_STATUS ctrlData_unLoad(TI_HANDLE hCtrlData); 
-
-TI_STATUS ctrlData_getParam(TI_HANDLE hCtrlData, paramInfo_t *pParamInfo);  
-
-TI_STATUS ctrlData_setParam(TI_HANDLE hCtrlData, paramInfo_t *pParamInfo);  
-
-TI_STATUS ctrlData_stop(TI_HANDLE hCtrlData);
-
-TI_STATUS ctrlData_getTiwlnCounters(TI_HANDLE hCtrlData, TIWLN_COUNTERS *pTiwlnCounters);   
-
-void ctrlData_updateTxRateAttributes(TI_HANDLE hCtrlData);	
-
-void ctrlData_getCurrBssTypeAndCurrBssId(TI_HANDLE hCtrlData, TMacAddr *pCurrBssid, 
-                                         ScanBssType_e *pCurrBssType);  
-
-void ctrlData_txCompleteStatus(TI_HANDLE hCtrlData, TxResultDescriptor_t *pTxResultInfo,
-							   EHwRateBitFiled HwTxRequestRate, TI_UINT8 txPktFlags);
-
-void ctrlData_ToggleTrafficIntensityNotification (TI_HANDLE hCtrlData, TI_BOOL enabledFlag);
-
-
-/* dbg functions */
-/*---------------*/
-#ifdef TI_DBG
-void ctrlData_printTxParameters(TI_HANDLE hCtrlData);
-void ctrlData_printCtrlBlock(TI_HANDLE hCtrlData);
-#endif /* TI_DBG */
-
-
-#endif  /* _DATA_CTRL_API_H_ */
-
diff --git a/wl1271/stad/src/Data_link/GeneralUtil.c b/wl1271/stad/src/Data_link/GeneralUtil.c
deleted file mode 100644
index 4db873d..0000000
--- a/wl1271/stad/src/Data_link/GeneralUtil.c
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * GeneralUtil.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#define __FILE_ID__  FILE_ID_52
-#include "GeneralUtilApi.h"
-#include "GeneralUtil.h"
-#include "report.h"
-#include "osApi.h"
-
-/*************************************************************************
-*                        LIST OBJ                                        *
-**************************************************************************
-**************************************************************************
-*
- *	The list object mange the allocation and deallocation of generic element.
- *  The obj create a list of N generic elements and fined a free entry for the Alloc process.
- *  And free the entry for dealloc.
- *
- *
-***************************************************************************/
-
-
-
-/*************************************************************************
-*                        List_create                                     *
-**************************************************************************
-* DESCRIPTION:	This function initializes the List data module.                 
-*                                                      
-* INPUT:		hOs - handle to Os Abstraction Layer
-*				MaxNumOfElements - the number of elemnts that will be Managed by the list
-                ContainerSize - The size of the basic data type managed by the list
-* OUTPUT:		
-*				
-*
-* RETURN:		Handle to the allocated List data control block
-************************************************************************/
-TI_HANDLE List_create(TI_HANDLE hOs,int MaxNumOfElements,int ContainerSize)
-{
-    int index;
-    List_t *List;
-
-	if( hOs  == NULL )
-	{
-	    WLAN_OS_REPORT(("FATAL ERROR:List_create(): OS handle Error - Aborting\n"));
-		return NULL;
-	}
-
-	/* alocate List block */
-	List = (List_t*)os_memoryAlloc(hOs, sizeof(List_t));
-	if(List == NULL)
-	    return NULL;
-
-    
-    /* alocate the List of Elements */
-    List->ElementList =(ListElement_t*)os_memoryAlloc(hOs, (sizeof(ListElement_t)*MaxNumOfElements));
-	if(List->ElementList == NULL)
-    {
-        os_memoryFree(List->hOs, List, sizeof(List_t));
-        return NULL;
-    }
-    
-    /*Allocate the Data containers*/
-    for(index=0;index<MaxNumOfElements;index++)
-    {
-        List->ElementList[index].Container = os_memoryAlloc(hOs,ContainerSize);
-        if(List->ElementList[index].Container == NULL)
-            break;
-        List->ElementList[index].Inuse = TI_FALSE;
-    }
-    if (index != MaxNumOfElements)  /*Not all the list element was allocated and*/
-    {                                /*therefore we free the entire list and rap it up*/
-       index--;
-       for(;index>=0;index--)
-            os_memoryFree(hOs,List->ElementList[index].Container,ContainerSize);
-       os_memoryFree(List->hOs, List->ElementList, (sizeof(ListElement_t)*MaxNumOfElements));
-       os_memoryFree(List->hOs,List,(sizeof(List_t)));
-       return NULL;
-   
-    }
-   
-    List->MaxNumOfElements = MaxNumOfElements;
-    List->ContainerSize = ContainerSize;
-	return((TI_HANDLE)List);
-}
-
-
-/***************************************************************************
-*							List_Destroy				                   *
-****************************************************************************
-* DESCRIPTION:	This function unload the List data module. 
-* 
-* INPUTS:		hCtrlData - the object
-*		
-* OUTPUT:		
-* 
-* RETURNS:		TI_OK - Unload succesfull
-*				TI_NOK - Unload unsuccesfull
-***************************************************************************/
-TI_STATUS List_Destroy(TI_HANDLE hList)	
-{
-    List_t* List = (List_t*)hList;
-    int index;
-    
-    if(List!=NULL)
-    {
-  	    if(List->ElementList != NULL)
-        {
-           for(index=0;index<List->MaxNumOfElements;index++)
-             os_memoryFree(List->hOs,List->ElementList[index].Container,List->ContainerSize);
-
-           os_memoryFree(List->hOs,List->ElementList,(sizeof(ListElement_t)*List->MaxNumOfElements));
-        }
-        os_memoryFree(List->hOs, List, sizeof(List_t));
-    }
-    return TI_OK;
-}
-
-/***************************************************************************
-*							List_AllocElement   		                   *
-****************************************************************************
-*   
-* 
-*    Fined an empty entry in the list and returns 
-*    a pointer to a memory that contains an element that not in use.
-*
-*    Note in multi Task environment we need to add semaphore to protect the
-*    Function.   
-* 
-***************************************************************************/
-TI_HANDLE List_AllocElement(TI_HANDLE hList)
-{
-    List_t* List = (List_t*)hList;
-    int index;
-    
-    if (List == NULL)
-        return NULL;
-
-    for(index=0;index<List->MaxNumOfElements;index++)
-    {
-        if(!(List->ElementList[index].Inuse))
-        {
-           List->ElementList[index].Inuse = TI_TRUE;
-           os_memoryZero(List->hOs,List->ElementList[index].Container,List->ContainerSize);
-           return((TI_HANDLE)List->ElementList[index].Container);
-        }
-    }
-    return NULL;  
-}
-
-
-/***************************************************************************
-*							List_FreeElement				               *
-****************************************************************************
-*   
-*   Marks the entry that was allocated as free.
-*   An alloc process can use this space.
-*
-* 
-*
-***************************************************************************/
-TI_STATUS List_FreeElement(TI_HANDLE hList,TI_HANDLE Container)
-{
-    List_t* List = (List_t*)hList;
-    int index;
-
-    if (List == NULL)
-        return TI_NOK;
-
-    for(index=0;index<List->MaxNumOfElements;index++)
-    {
-        if(List->ElementList[index].Container == Container) 
-        {
-            if(!List->ElementList[index].Inuse)
-                return TI_NOK;  /*double free not legal*/
-            List->ElementList[index].Inuse = TI_FALSE; 
-            return TI_OK;
-        }
-    }
-    return TI_NOK;
-}
-
-
-/***************************************************************************
-*							List_GetFirst				                   *
-****************************************************************************
-*   
-*  For purposes of searching the element list (going over all the element in the list)
-*  Get first is used to reset an index for the search.
-*  This function is work combined with GetNext. 
-* 
-*   Note this function can't be used in multi Task environment.
-*
-***************************************************************************/
-TI_HANDLE List_GetFirst(TI_HANDLE hList)
-{
-    List_t* List = (List_t*)hList;
-    int index;
-
-    if (List == NULL)
-        return NULL;
-
-    for(index=0;index<List->MaxNumOfElements;index++)
-    {
-        if(List->ElementList[index].Inuse) 
-        {
-           List->CurrentIndex = index;
-           return (List->ElementList[index].Container); 
-        }
-    }
-    return NULL;
-}
-
-
-/***************************************************************************
-*							List_GetNext				                   *
-****************************************************************************
-*   
-*  This function returns the next element in the list till null
-*  that indicate that there no more element or we have reached the end of the list.
-*  This function is work combined with GetFirst. 
-* 
-*  Note this function can't be used in multi Task environment.
-*
-***************************************************************************/
-TI_HANDLE List_GetNext(TI_HANDLE hList)
-{
-    List_t* List = (List_t*)hList;
-    int index;
-
-    if (List == NULL)
-        return NULL;
-    
-    /* the code works fine even if the elment is the last*/
-    for(index=List->CurrentIndex+1;index<List->MaxNumOfElements;index++)
-    {
-        if(List->ElementList[index].Inuse) 
-        {
-           List->CurrentIndex = index;
-           return (List->ElementList[index].Container); 
-
-        }
-    }
-    return NULL;
-}
-
-
-
-
-/***************************************************************************
-*							DISTRIBUTOR MANAGER				               *
-****************************************************************************
-***************************************************************************
-*
- *    	PURPOSE:The distributor manger supplies
- *       1. Register mechanism that has a callback function and the condition 
- *       (bit mask format) that will be used to distinguish if to call this callback. 
- *       2. Event occurrence function that go over all the registered function and compare 
- *       the input mask to the callback mask condition. 
- *
- *	
- *
-***************************************************************************/
-
-
-
-/***************************************************************************
-*							DistributorMgr_Create		                   *
-****************************************************************************
-*
-***************************************************************************/
-TI_HANDLE DistributorMgr_Create(TI_HANDLE hOs , int MaxNotifReqElment)
-{
-    DistributorMgr_t *DistributorMgr;
-    
-	DistributorMgr = (DistributorMgr_t*)os_memoryAlloc(hOs, sizeof(DistributorMgr_t));
-	if(DistributorMgr == NULL)
-        return NULL;
-    DistributorMgr->hOs = hOs;
-    DistributorMgr->DistributionList = (List_t*)List_create(hOs,MaxNotifReqElment,sizeof(NotifReqElment_t));
-    if (DistributorMgr->DistributionList == NULL)
-    {
-        os_memoryFree(hOs, DistributorMgr, sizeof(DistributorMgr_t));
-        return NULL;
-    } 
-    return (TI_HANDLE)DistributorMgr;
-}
-
-
-
-/************************************************************************/
-/*               DistributorMgr_Destroy                                 */
-/************************************************************************/
-TI_STATUS DistributorMgr_Destroy(TI_HANDLE hDistributorMgr)
-{
-    DistributorMgr_t *DistributorMgr =(DistributorMgr_t*)hDistributorMgr;
-    
-     if(DistributorMgr == NULL)
-        return TI_NOK;
-
-    List_Destroy(DistributorMgr->DistributionList);
-    
-    os_memoryFree(DistributorMgr->hOs, hDistributorMgr, sizeof(DistributorMgr_t));
-    
-    return TI_OK;
-
-}
-
-/***************************************************************************
-*						DistributorMgr_Reg				                   *
-****************************************************************************
-*   
-*  Use by the client to register a callback function 
-*  with the mask condition that will trigger the call.
-* 
-* input
-*    TI_UINT16 Mask 
-*    TI_HANDLE CallBack
-*    HANDLE Context 
-*    TI_UINT32 Cookie
-* 
-*
-***************************************************************************/
-TI_HANDLE DistributorMgr_Reg(TI_HANDLE hDistributorMgr,TI_UINT16 Mask,TI_HANDLE CallBack,
-                             TI_HANDLE Context,TI_UINT32 Cookie)
-{
-    DistributorMgr_t *DistributorMgr = (DistributorMgr_t*)hDistributorMgr;
-    NotifReqElment_t *NotifReqElment;
-        
-   	if(DistributorMgr == NULL)
-        return NULL;
-
-    NotifReqElment = (NotifReqElment_t*)List_AllocElement(DistributorMgr->DistributionList);
-    if (NotifReqElment == NULL) 
-		return NULL  ;
-
-    NotifReqElment->CallBack = (GeneralEventCall_t)CallBack;
-    NotifReqElment->Mask = Mask;
-    NotifReqElment->Context = Context;
-    NotifReqElment->Cookie = Cookie;
-    NotifReqElment->HaltReq = TI_FALSE;
-    return (TI_HANDLE)NotifReqElment;
-}
-
-
-/***************************************************************************
-*						DistributorMgr_ReReg				               *
-****************************************************************************
-*
-***************************************************************************/
-TI_STATUS DistributorMgr_ReReg(TI_HANDLE hDistributorMgr,TI_HANDLE ReqElmenth ,TI_UINT16 Mask,TI_HANDLE CallBack,TI_HANDLE Context,TI_UINT32 Cookie)
-{
-    DistributorMgr_t *DistributorMgr = (DistributorMgr_t*)hDistributorMgr;
-    NotifReqElment_t *NotifReqElment = (NotifReqElment_t*)ReqElmenth;
-    
-   	if(DistributorMgr == NULL)
-        return TI_NOK;
-
-    if (NotifReqElment == NULL) 
-		return TI_NOK;
-
-    NotifReqElment->CallBack = (GeneralEventCall_t)CallBack;
-    NotifReqElment->Mask = Mask;
-    NotifReqElment->Context = Context;
-    NotifReqElment->Cookie = Cookie;
-    return TI_OK;
-}
-
-
-/***************************************************************************
-*						DistributorMgr_AddToMask			               *
-****************************************************************************
-*   
-* Use this function to add mask bit to the bit mask condition that triggers the Callback 
-*
-*
-***************************************************************************/
-TI_STATUS DistributorMgr_AddToMask(TI_HANDLE hDistributorMgr,TI_HANDLE ReqElmenth,TI_UINT16 Mask)
-{
-    DistributorMgr_t *DistributorMgr = (DistributorMgr_t*)hDistributorMgr;
-    NotifReqElment_t *NotifReqElment = (NotifReqElment_t*)ReqElmenth;
-     
-    if(DistributorMgr == NULL)
-        return TI_NOK;
-
-    if (NotifReqElment == NULL) 
-		return TI_NOK;
-
-    NotifReqElment->Mask |= Mask;
-    return TI_OK;
-}
-
-
-/***************************************************************************
-*						DistributorMgr_HaltNotif			               *
-****************************************************************************
-*   
-* Use this function to add mask bit to the bit mask condition that triggers the Callback 
-*
-*
-***************************************************************************/
-void DistributorMgr_HaltNotif(TI_HANDLE ReqElmenth)
-{
-    NotifReqElment_t *NotifReqElment = (NotifReqElment_t*)ReqElmenth;
-       
-    if (NotifReqElment == NULL) 
-	    return;
-
-    NotifReqElment->HaltReq = TI_TRUE;
-   
-}
-
-
-/***************************************************************************
-*						DistributorMgr_RestartNotif			               *
-****************************************************************************
-*   
-* Use this function to add mask bit to the bit mask condition that triggers the Callback 
-*
-*
-***************************************************************************/
-void DistributorMgr_RestartNotif(TI_HANDLE ReqElmenth)
-{
-    NotifReqElment_t *NotifReqElment = (NotifReqElment_t*)ReqElmenth;
-       
-    if (NotifReqElment == NULL) 
-	    return;
-
-    NotifReqElment->HaltReq = TI_FALSE;
-   
-}
-/***************************************************************************
-*						DistributorMgr_UnReg				               *
-****************************************************************************
-* 
-*
-***************************************************************************/
-TI_STATUS DistributorMgr_UnReg(TI_HANDLE hDistributorMgr,TI_HANDLE RegEventHandle)
-{
-    DistributorMgr_t *DistributorMgr = (DistributorMgr_t*)hDistributorMgr;
-
-  	if(DistributorMgr == NULL)
-        return TI_NOK;
-
-    return List_FreeElement(DistributorMgr->DistributionList, RegEventHandle);
-}
-
-
-/***************************************************************************
-*						DistributorMgr_EventCall		                   *
-****************************************************************************
-*   
-* When the client needs to invoke the callback calls function that corresponds 
-* to a specific event mask it will call this function with the desired mask. 
-* And event count that can be used to aggregate the events. 
-* that way calling this function not for every event
-*
-***************************************************************************/
-void DistributorMgr_EventCall(TI_HANDLE hDistributorMgr,TI_UINT16 Mask,int EventCount)
-{
-    DistributorMgr_t *DistributorMgr = (DistributorMgr_t*)hDistributorMgr;
-    NotifReqElment_t *NotifReqElment;
-
-    if(DistributorMgr == NULL)
-        return;
- 
-    NotifReqElment = (NotifReqElment_t*)List_GetFirst(DistributorMgr->DistributionList);
-    
-    while(NotifReqElment)
-    {
-        if((NotifReqElment->Mask & Mask) && !(NotifReqElment->HaltReq))
-        {
-            NotifReqElment->CallBack(NotifReqElment->Context,EventCount,Mask,
-                                     NotifReqElment->Cookie);
-        }
-        NotifReqElment = (NotifReqElment_t*)List_GetNext(DistributorMgr->DistributionList);
-    }
-}
-
-
-
-/*******************************************************/
diff --git a/wl1271/stad/src/Data_link/GeneralUtil.h b/wl1271/stad/src/Data_link/GeneralUtil.h
deleted file mode 100644
index eb3e631..0000000
--- a/wl1271/stad/src/Data_link/GeneralUtil.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * GeneralUtil.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*	  MODULE:	TrafficMonitor.h												       */
-/*    PURPOSE:	TrafficMonitor module Header file		 							   */
-/*																		   */
-/***************************************************************************/
-#ifndef _GENERALUTIL_H_
-#define _GENERALUTIL_H_
-
-
-#include "tidef.h"
-#include "GeneralUtilApi.h"
-
-
-
-
-/*******************************************************************************************/
-typedef struct
-{
-	TI_HANDLE			Container;
-    TI_BOOL                Inuse; 
-}ListElement_t;
-
-
-typedef struct
-{
-    int                 CurrentIndex; 
-    int                 MaxNumOfElements;      
-    int                 ContainerSize;    
-    ListElement_t	    *ElementList;
-    TI_HANDLE           hOs; 
-}List_t;
-
-
-/*******************************************************************************************/
-
-
-/*******************************************************************************************/
-typedef struct{
-    List_t *DistributionList;
-    TI_HANDLE hOs; 
-}DistributorMgr_t;   
-
-
-typedef struct{
-    TI_UINT16              Mask;
-    TI_BOOL                HaltReq;
-    GeneralEventCall_t  CallBack;
-    TI_HANDLE           Context;
-    TI_UINT32              Cookie;
-}NotifReqElment_t;
-
-/*******************************************************************************************/
-
-
-#endif
diff --git a/wl1271/stad/src/Data_link/GeneralUtilApi.h b/wl1271/stad/src/Data_link/GeneralUtilApi.h
deleted file mode 100644
index dbf22cd..0000000
--- a/wl1271/stad/src/Data_link/GeneralUtilApi.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * GeneralUtilApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*	  MODULE:	TrafficMonitor.h												       */
-/*    PURPOSE:	TrafficMonitor module Header file		 							   */
-/*																		   */
-/***************************************************************************/
-#ifndef _GENERALUTIL_API_H_
-#define _GENERALUTIL_API_H_
-
-#include "tidef.h"
-#include "paramOut.h" /* check tis include*/
-/**/
-/* call back functions prototype.*/
-/**/
-typedef void (*GeneralEventCall_t)(TI_HANDLE Context,int EventCount,TI_UINT16 Mask,TI_UINT32 Cookie);
-               
-
-TI_HANDLE DistributorMgr_Create(TI_HANDLE hOs , int MaxNotifReqElment); 
-TI_STATUS DistributorMgr_Destroy(TI_HANDLE hDistributorMgr);
-TI_HANDLE DistributorMgr_Reg(TI_HANDLE hDistributorMgr,TI_UINT16 Mask,TI_HANDLE CallBack,TI_HANDLE Context,TI_UINT32 Cookie);
-TI_STATUS DistributorMgr_ReReg(TI_HANDLE hDistributorMgr,TI_HANDLE ReqElmenth ,TI_UINT16 Mask,TI_HANDLE CallBack,TI_HANDLE Context,TI_UINT32 Cookie);
-TI_STATUS DistributorMgr_AddToMask(TI_HANDLE hDistributorMgr,TI_HANDLE ReqElmenth,TI_UINT16 Mask);
-TI_STATUS DistributorMgr_UnReg(TI_HANDLE hDistributorMgr,TI_HANDLE RegEventHandle);
-void DistributorMgr_HaltNotif(TI_HANDLE ReqElmenth);
-void DistributorMgr_RestartNotif(TI_HANDLE ReqElmenth);
-void DistributorMgr_EventCall(TI_HANDLE hDistributorMgr,TI_UINT16 Mask,int EventCount); 
-
-
-TI_HANDLE List_create(TI_HANDLE hOs,int MaxNumOfElements,int ContainerSize);
-TI_STATUS List_Destroy(TI_HANDLE hList)	;
-TI_HANDLE List_AllocElement(TI_HANDLE hList);
-TI_STATUS List_FreeElement(TI_HANDLE hList,TI_HANDLE Container);
-TI_HANDLE List_GetFirst(TI_HANDLE List);
-TI_HANDLE List_GetNext(TI_HANDLE List);
-
-
-#endif
diff --git a/wl1271/stad/src/Data_link/TrafficMonitor.c b/wl1271/stad/src/Data_link/TrafficMonitor.c
deleted file mode 100644
index 08f7f46..0000000
--- a/wl1271/stad/src/Data_link/TrafficMonitor.c
+++ /dev/null
@@ -1,1340 +0,0 @@
-/*
- * TrafficMonitor.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/***************************************************************************/
-/*                                                                         */
-/*              MODULE:         TrafficMonitor.c                           */
-/*              PURPOSE:        Traffic Monitor                            */
-/*                                                                         */
-/***************************************************************************/
-#define __FILE_ID__  FILE_ID_55
-#include "TrafficMonitorAPI.h"
-#include "TrafficMonitor.h"
-#include "DataCtrl_Api.h"
-#include "osApi.h"
-#include "report.h"
-#include "timer.h"
-#include "DrvMainModules.h"
-
-
-/* Percentage of max down events test interval to use in our "traffic down" timer */ 
-#define MIN_INTERVAL_PERCENT 50
-
-/*#define TRAFF_TEST*/
-#ifdef TRAFF_TEST
-/*for TEST Function*/
-TI_HANDLE TestTrafficMonitor;
-TI_HANDLE TestEventTimer;
-TI_HANDLE Alert1;
-TI_HANDLE Alert2;
-TI_HANDLE Alert3;
-TI_HANDLE Alert4;
-void PrintElertStus();
-void TestEventFunc (TI_HANDLE hTrafficMonitor, TI_BOOL bTwdInitOccured);
-#endif
-
-
-/************************************************************************/
-/*           Function prototype                                         */
-/************************************************************************/
-static void TimerMonitor_TimeOut (TI_HANDLE hTrafficMonitor, TI_BOOL bTwdInitOccured);
-static void TrafficMonitor_updateBW(BandWidth_t *pBandWidth, TI_UINT32 uCurrentTS);
-static TI_UINT32 TrafficMonitor_calcBW(BandWidth_t *pBandWidth, TI_UINT32 uCurrentTS);
-static TI_BOOL isThresholdDown(TrafficAlertElement_t *AlertElement,TI_UINT32 CurrentTime);
-static TI_BOOL isThresholdUp(TrafficAlertElement_t *AlertElement , TI_UINT32 CurrentTime);
-static void SimpleByteAggregation(TI_HANDLE TraffElem,int Count);
-static void SimpleFrameAggregation(TI_HANDLE TraffElem,int Count);
-static TI_HANDLE TrafficMonitor_ExitFunc(TrafficMonitor_t *TrafficMonitor,TI_HANDLE hOs);
-static TI_STATUS FindRstElemEntryIndex (TrafficMonitor_t *TrafficMonitor,TrafficAlertElement_t  *TrafficAlertElement,int *Index);
-static TI_STATUS TrafficMonitor_SetMask(TrafficMonitor_t *TrafficMonitor,TrafficAlertElement_t *TrafficAlertElement,TraffEvntOptNum_t MaskType);
-
-static void TrafficMonitor_UpdateDownTrafficTimerState (TI_HANDLE hTrafficMonitor);
-static void TrafficMonitor_ChangeDownTimerStatus (TI_HANDLE hTrafficMonitor, TI_UINT32 downEventsFound, TI_UINT32 minIntervalTime);
-
-/************************************************************************/
-/*                      TrafficMonitor_create                           */
-/************************************************************************/
-TI_HANDLE TrafficMonitor_create(TI_HANDLE hOs)
-{
-    TrafficMonitor_t *TrafficMonitor;
-    
-    /* Allocate the data structure TrafficMonitor*/     
-        TrafficMonitor = (TrafficMonitor_t*)os_memoryAlloc(hOs, sizeof(TrafficMonitor_t));
-        if (TrafficMonitor == NULL)
-        return NULL;
-
-    os_memoryZero(hOs,TrafficMonitor,sizeof(TrafficMonitor_t));
-
-#ifdef TRAFF_TEST
-	TestEventTimer = NULL;
-#endif
-
-    TrafficMonitor->hOs = hOs;
-    
-    /*Creates the list that will hold all the registered alert requests*/
-    TrafficMonitor->NotificationRegList = List_create(hOs,MAX_MONITORED_REQ,sizeof(TrafficAlertElement_t));
-    if (TrafficMonitor->NotificationRegList == NULL)
-        return TrafficMonitor_ExitFunc(TrafficMonitor,hOs);
- 
-    return (TI_HANDLE)TrafficMonitor;
-}
-
-
-/************************************************************************/
-/*                    TrafficMonitor_ExitFunc                           */
-/************************************************************************/
-static TI_HANDLE TrafficMonitor_ExitFunc(TrafficMonitor_t *TrafficMonitor,TI_HANDLE hOs)
-{
-    if (TrafficMonitor)
-    {
-        if(TrafficMonitor->hTrafficMonTimer)
-        {
-            tmr_DestroyTimer (TrafficMonitor->hTrafficMonTimer);
-        }
-        os_memoryFree(hOs, TrafficMonitor, sizeof(TrafficMonitor_t));            
-    }
-    return NULL;
-}
-
-
-
-/************************************************************************/
-/*                    TrafficMonitor_config                             */
-/************************************************************************/
-void TrafficMonitor_Init (TStadHandlesList *pStadHandles, TI_UINT32 BWwindowMs)
-{
-    TrafficMonitor_t *TrafficMonitor = (TrafficMonitor_t *)(pStadHandles->hTrafficMon);
-    TI_UINT32 uCurrTS = os_timeStampMs (TrafficMonitor->hOs);
-        
-    /* Create the base threshold timer that will serve all the down thresholds*/
-    TrafficMonitor->hTrafficMonTimer = tmr_CreateTimer (pStadHandles->hTimer);
-
-    TrafficMonitor->Active = TI_FALSE;
-
-    TrafficMonitor->hRxData = pStadHandles->hRxData;
-    TrafficMonitor->hTxCtrl = pStadHandles->hTxCtrl;
-    TrafficMonitor->hTimer  = pStadHandles->hTimer;
-
-        /*Init All the bandwidth elements in the system */
-	os_memoryZero(TrafficMonitor->hOs,&TrafficMonitor->DirectTxFrameBW,sizeof(BandWidth_t));
-	os_memoryZero(TrafficMonitor->hOs,&TrafficMonitor->DirectRxFrameBW,sizeof(BandWidth_t));
-	TrafficMonitor->DirectRxFrameBW.auFirstEventsTS[0] = uCurrTS;
-	TrafficMonitor->DirectTxFrameBW.auFirstEventsTS[0] = uCurrTS;
-    
-    /*Registering to the RX module for notification.*/
-    TrafficMonitor->RxRegReqHandle = rxData_RegNotif (pStadHandles->hRxData, 
-                                                      DIRECTED_FRAMES_RECV,
-                                                      TrafficMonitor_Event,
-                                                      TrafficMonitor,
-                                                      RX_TRAFF_MODULE);
-
-    /*Registering to the TX module for notification .*/
-    TrafficMonitor->TxRegReqHandle = txCtrlParams_RegNotif (pStadHandles->hTxCtrl, 
-                                                            DIRECTED_FRAMES_XFER,
-                                                            TrafficMonitor_Event,
-                                                            TrafficMonitor,
-                                                            TX_TRAFF_MODULE);
-
-    TrafficMonitor->DownTimerEnabled = TI_FALSE;
-    TrafficMonitor->trafficDownTestIntervalPercent = MIN_INTERVAL_PERCENT;
-
-#ifdef TRAFF_TEST
-    TestTrafficMonitor = TrafficMonitor;
-    TestEventTimer = tmr_CreateTimer (pStadHandles->hTimer);
-    tmr_StartTimer (TestEventTimer, TestEventFunc, (TI_HANDLE)TrafficMonitor, 5000, TI_TRUE);
-#endif
-}
-
-/************************************************************************/
-/*                TrafficMonitor_Start                                  */
-/************************************************************************/
-TI_STATUS TrafficMonitor_Start(TI_HANDLE hTrafficMonitor)       
-{
-    TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
-    TrafficAlertElement_t *AlertElement;
-    TI_UINT32 CurentTime;
-  
-
-    if(TrafficMonitor == NULL)
-        return TI_NOK;
-
-    /*starts the bandwidth TIMER*/
-    if(!TrafficMonitor->Active) /*To prevent double call to timer start*/
-    {
-        TrafficMonitor_UpdateDownTrafficTimerState (TrafficMonitor);	
-    }
-   
-    AlertElement  = (TrafficAlertElement_t*)List_GetFirst(TrafficMonitor->NotificationRegList);
-    CurentTime = os_timeStampMs(TrafficMonitor->hOs);
-   
-    /* go over all the Down elements and reload the timer*/    
-    while(AlertElement)
-    {
-        if(AlertElement->CurrentState != ALERT_WAIT_FOR_RESET) 
-        {
-            AlertElement->EventCounter = 0;
-            AlertElement->TimeOut = AlertElement->TimeIntervalMs + CurentTime;
-        }
-        AlertElement = (TrafficAlertElement_t*)List_GetNext(TrafficMonitor->NotificationRegList);
-    }
-    TrafficMonitor->Active = TI_TRUE;
-
-    return TI_OK;
-}
-
-
-
-/************************************************************************/
-/*              TrafficMonitor_Stop                                     */
-/************************************************************************/
-TI_STATUS TrafficMonitor_Stop(TI_HANDLE hTrafficMonitor)        
-{
-    TrafficMonitor_t       *pTrafficMonitor = (TrafficMonitor_t*)hTrafficMonitor;
-    TrafficAlertElement_t  *AlertElement;
-       
-    if (pTrafficMonitor == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    if (pTrafficMonitor->Active) /*To prevent double call to timer stop*/
-    {
-    
-        pTrafficMonitor->Active = TI_FALSE;  
-   
-        pTrafficMonitor->DownTimerEnabled = TI_FALSE;
-        tmr_StopTimer (pTrafficMonitor->hTrafficMonTimer);
-    }  
-
-    /* Set all events state to ALERT_OFF to enable them to "kick" again once after TrafficMonitor is started */
-    AlertElement = (TrafficAlertElement_t*)List_GetFirst(pTrafficMonitor->NotificationRegList);
-    
-    while(AlertElement)
-    {
-        AlertElement->CurrentState = ALERT_OFF;
-        AlertElement = (TrafficAlertElement_t*)List_GetNext(pTrafficMonitor->NotificationRegList);
-    }  
-    
-    return TI_OK;
-}
-
-
-
-/************************************************************************/
-/*                  TrafficMonitor_Destroy                              */
-/************************************************************************/
-TI_STATUS TrafficMonitor_Destroy(TI_HANDLE hTrafficMonitor)     
-{
-    TrafficMonitor_t *TrafficMonitor = (TrafficMonitor_t*)hTrafficMonitor;
-
-    if (TrafficMonitor)
-    {
-        /*Unregister from the RX/TX module for the required notification*/
-        txCtrlParams_UnRegNotif(TrafficMonitor->hTxCtrl,TrafficMonitor->TxRegReqHandle);
-        rxData_UnRegNotif(TrafficMonitor->hRxData,TrafficMonitor->RxRegReqHandle);
-
-        if(TrafficMonitor->NotificationRegList)
-        {
-            List_Destroy(TrafficMonitor->NotificationRegList);
-        }
-
-        if(TrafficMonitor->hTrafficMonTimer)
-        {
-            tmr_DestroyTimer (TrafficMonitor->hTrafficMonTimer);
-        }
-        
-#ifdef TRAFF_TEST
-		if (TestEventTimer)
-		{
-			tmr_DestroyTimer (TestEventTimer);
-		}
-#endif    
-    
-        os_memoryFree(TrafficMonitor->hOs, TrafficMonitor, sizeof(TrafficMonitor_t)); 
-
-        return TI_OK;
-    }
-    
-    return TI_NOK;
-}
-
-
-/***********************************************************************
- *                        TrafficMonitor_RegEvent                               
- ***********************************************************************
-DESCRIPTION: Reg event processing function, Perform the following:
-
-                                
-INPUT:          hTrafficMonitor -       Traffic Monitor the object.
-                        
-            TrafficAlertRegParm -       structure which include values to set for 
-                                                the requested Alert event
-                        
-            AutoResetCreate - is only relevant to edge alerts. 
-                  If AutoResetCreate flag is set to true then the registration function will create a conjunction reset element automatic
-                 this reset element will be with the same threshold but opposite in direction
- 
-                 If AutoResetCreate flag is set to false then the reset element will be supplied afterward by the user with the function
-                 TrafficMonitor_SetRstCondition() the alert will not be active till the reset function will be set.
-
-OUTPUT:         
-
-RETURN:     TrafficAlertElement pointer on success, NULL otherwise
-
-************************************************************************/
-TI_HANDLE TrafficMonitor_RegEvent(TI_HANDLE hTrafficMonitor,TrafficAlertRegParm_t *TrafficAlertRegParm,TI_BOOL AutoResetCreate)
-{
-    TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
-    TrafficAlertElement_t  *TrafficAlertElement;
-    TI_UINT32 CurentTime ;
-   
-    if(TrafficMonitor == NULL)
-       return NULL;
-
-    CurentTime = os_timeStampMs(TrafficMonitor->hOs);
-
-    /*Gets a TrafficAlertElement_t memory from the list to assign to the registered request*/
-    TrafficAlertElement = (TrafficAlertElement_t*)List_AllocElement(TrafficMonitor->NotificationRegList);
-    if (TrafficAlertElement == NULL) 
-    {   /* add print*/
-                return NULL  ;
-    }
-
-    /*Init the alert element with the registered parameters.*/
-    TrafficAlertElement->CallBack = TrafficAlertRegParm->CallBack;
-    TrafficAlertElement->Context  = TrafficAlertRegParm->Context;
-    TrafficAlertElement->Cookie  = TrafficAlertRegParm->Cookie;
-    TrafficAlertElement->Direction = TrafficAlertRegParm->Direction;
-    TrafficAlertElement->Threshold = TrafficAlertRegParm->Threshold;
-    TrafficAlertElement->Trigger = TrafficAlertRegParm->Trigger;
-    TrafficAlertElement->TimeIntervalMs = TrafficAlertRegParm->TimeIntervalMs;
-    TrafficAlertElement->TimeOut = CurentTime + TrafficAlertRegParm->TimeIntervalMs;
-    TrafficAlertElement->EventCounter = 0;
-    TrafficMonitor_SetMask(TrafficMonitor,TrafficAlertElement,TrafficAlertRegParm->MonitorType);
-    
-    TrafficAlertElement->CurrentState = ALERT_OFF;
-    TrafficAlertElement->AutoCreated = TI_FALSE;
-    TrafficAlertElement->Enabled = TI_FALSE;
-    /*In case that this is an Edge alert there is a need for a reset condition element*/
-    /*corresponding to the Alert request but opposite in the direction.*/
-    /*Note that the reset condition for this (new) reset element, is the Alert Element it self.*/
-    if(TrafficAlertElement->Trigger == TRAFF_EDGE)
-    {
-        if(AutoResetCreate)
-        {
-            /*Gets a TrafficAlertElement_t memory from the list to assign to the reset elemnt*/
-            TrafficAlertElement->ResetElment[0] = (TrafficAlertElement_t*)List_AllocElement(TrafficMonitor->NotificationRegList);
-            if( TrafficAlertElement->ResetElment[0] == NULL)
-            {
-                List_FreeElement(TrafficMonitor->NotificationRegList,TrafficAlertElement);
-                return NULL;
-            }
-
-            /*
-             copy the Traffic Element init params to the reset Elemnt Except for
-             the direction and the call back that is set to null the CurrentState set to disable.   
-             And the reset condition,that points to the muster alert.
-             */
-            os_memoryCopy(TrafficMonitor->hOs,TrafficAlertElement->ResetElment[0],TrafficAlertElement,sizeof(TrafficAlertElement_t));
-            TrafficAlertElement->ResetElment[0]->CallBack = NULL;
-            /*opposite in the direction from the TrafficAlertElement->Direction*/
-            if (TrafficAlertRegParm->Direction == TRAFF_UP)
-                TrafficAlertElement->ResetElment[0]->Direction = TRAFF_DOWN;
-            else
-                TrafficAlertElement->ResetElment[0]->Direction = TRAFF_UP;
-            TrafficAlertElement->ResetElment[0]->CurrentState = ALERT_WAIT_FOR_RESET;
-            TrafficAlertElement->ResetElment[0]->ResetElment[0] = TrafficAlertElement;
-            TrafficAlertElement->ResetElment[0]->AutoCreated = TI_TRUE;
- 
-            TrafficAlertElement->ResetElment[0]->RstWasAssigned = TI_TRUE;
-            TrafficAlertElement->RstWasAssigned = TI_TRUE;
-   
-        }
-        else/* The reset element will be supplied afterward by the user in the meanwhile disable the alert till then*/
-        {
-            TrafficAlertElement->RstWasAssigned = TI_FALSE;
-            TrafficAlertElement->CurrentState = ALERT_WAIT_FOR_RESET;
-        }
-        
-    }
-
-    TrafficMonitor_UpdateDownTrafficTimerState (TrafficMonitor);
-
-    return TrafficAlertElement;
-}
- 
-
-/************************************************************************/
-/*                  FindRstElemEntryIndex                               */
-/************************************************************************/
-/* Gets a TrafficAlertElement_t memory from the list to assign to the reset elemnt
- * for internal use
- ************************************************************************/
-static TI_STATUS FindRstElemEntryIndex (TrafficMonitor_t *TrafficMonitor,TrafficAlertElement_t  *TrafficAlertElement,int *Index)
-{
-    int i;
-    /*Find an empty Rst element entry*/
-    for(i=0;(i<MAX_RST_ELMENT_PER_ALERT) && TrafficAlertElement->ResetElment[i];i++);
-    if(i == MAX_RST_ELMENT_PER_ALERT)
-        return TI_NOK;
-    *Index  = i;
-    return TI_OK;
-}
-
-/************************************************************************/
-/*                  TrafficMonitor_SetMask                              */
-/************************************************************************/
-/*
- *      Convert the Mask from the types that declared in the 
- *  TrafficMonitorAPI to the types that are used in the Rx Tx modules.
- *  And update the TX and RX module of the new event req
- *  Sets the aggregation function that corresponds to the specific mask type
- ************************************************************************/
-static TI_STATUS TrafficMonitor_SetMask(TrafficMonitor_t *TrafficMonitor,TrafficAlertElement_t *TrafficAlertElement,TraffEvntOptNum_t MaskType)
-{
-    TI_UINT32 TxMask = 0;
-    TI_UINT32 RxMask = 0;
-    
-   switch(MaskType) {
-   case TX_RX_DIRECTED_FRAMES:
-        TxMask = DIRECTED_FRAMES_XFER;
-        RxMask = DIRECTED_FRAMES_RECV;
-        TrafficAlertElement->ActionFunc = SimpleFrameAggregation;
-        break;
-   case TX_ALL_MSDU_FRAMES:
-        TxMask = DIRECTED_FRAMES_XFER|MULTICAST_FRAMES_XFER|BROADCAST_FRAMES_XFER;
-        TrafficAlertElement->ActionFunc = SimpleFrameAggregation;
-    break;
-   case RX_ALL_MSDU_FRAMES:
-        RxMask = DIRECTED_FRAMES_RECV|MULTICAST_FRAMES_RECV|BROADCAST_FRAMES_RECV;
-        TrafficAlertElement->ActionFunc = SimpleFrameAggregation;
-        break;
-   case TX_RX_ALL_MSDU_FRAMES:
-        TxMask = DIRECTED_FRAMES_XFER|MULTICAST_FRAMES_XFER|BROADCAST_FRAMES_XFER;
-        RxMask = DIRECTED_FRAMES_RECV|MULTICAST_FRAMES_RECV|BROADCAST_FRAMES_RECV;
-        TrafficAlertElement->ActionFunc = SimpleFrameAggregation;
-        break;
-    case TX_RX_ALL_MSDU_IN_BYTES:
-        TxMask = DIRECTED_BYTES_XFER|MULTICAST_BYTES_XFER|BROADCAST_BYTES_XFER;
-        RxMask = DIRECTED_BYTES_RECV|MULTICAST_BYTES_RECV|BROADCAST_BYTES_RECV;
-        TrafficAlertElement->ActionFunc = SimpleByteAggregation;
-        break;
-   case TX_RX_DIRECTED_IN_BYTES:
-        TxMask = DIRECTED_BYTES_XFER;
-        RxMask = DIRECTED_BYTES_RECV;
-        TrafficAlertElement->ActionFunc = SimpleByteAggregation;
-    break;
-   case TX_RX_ALL_802_11_DATA_IN_BYTES:
-        TxMask = DIRECTED_BYTES_XFER | MULTICAST_BYTES_XFER;
-        RxMask = DIRECTED_BYTES_RECV | MULTICAST_BYTES_RECV;
-        TrafficAlertElement->ActionFunc = SimpleByteAggregation;
-    break;
-   case TX_RX_ALL_802_11_DATA_FRAMES:
-        TxMask = DIRECTED_FRAMES_XFER | MULTICAST_FRAMES_XFER;
-        RxMask = DIRECTED_FRAMES_RECV | MULTICAST_FRAMES_RECV;
-        TrafficAlertElement->ActionFunc = SimpleFrameAggregation;
-    break;
-   default:
-        WLAN_OS_REPORT(("TrafficMonitor_SetMask - unknown parameter: %d\n", MaskType));
-       return TI_NOK;
-   }
- 
-   
-   if(RxMask)
-   {
-       TrafficAlertElement->MonitorMask[RX_TRAFF_MODULE] = RxMask;
-       if(rxData_AddToNotifMask(TrafficMonitor->hRxData,TrafficMonitor->RxRegReqHandle,RxMask) == TI_NOK)
-           return TI_NOK;
-   }
-   
-   if(TxMask)
-   {
-       TrafficAlertElement->MonitorMask[TX_TRAFF_MODULE] = TxMask;
-       if(txCtrlParams_AddToNotifMask(TrafficMonitor->hTxCtrl,TrafficMonitor->TxRegReqHandle,TxMask) == TI_NOK)
-           return TI_NOK;
-   }
-
-   return TI_OK;
-}
-
-
-/***********************************************************************
- *                        TrafficMonitor_SetRstCondition                        
- ***********************************************************************
-DESCRIPTION: Reg event processing function, Perform the following:
-             Sets the given reset element to the Alert element. 
-             if MutualRst is set, then The operation is done vise versa .  
-                                
-INPUT:          hTrafficMonitor -       Traffic Monitor the object.
-                        
-            EventHandle -         Alert event
-            
-            ResetEventHandle  Alert Event that will be  used to as the rest for above.
-                        
-            MutualRst - if the 2 elements are used to reset One another. 
-
-NOTE        If the reset element event condition is the same as the alert element the user 
-            have to check the that threshold is bigger or smaller according to the direction 
-            else it can create a deadlock
-
-OUTPUT:         
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS TrafficMonitor_SetRstCondition(TI_HANDLE hTrafficMonitor, TI_HANDLE EventHandle,TI_HANDLE ResetEventHandle,TI_BOOL MutualRst)
-{
-    TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
-    TrafficAlertElement_t *TrafficAlertElement = (TrafficAlertElement_t*)EventHandle;
-    TrafficAlertElement_t *TrafficResetAlertElement = (TrafficAlertElement_t*)ResetEventHandle;
-    int i,x;
-    TI_UINT32 CurentTime ;
-
-    if((TrafficMonitor == NULL) || (EventHandle == NULL) || (TrafficResetAlertElement == NULL)) 
-        return TI_NOK;
-
-    
-    CurentTime = os_timeStampMs(TrafficMonitor->hOs);
-
-    /*
-    Check that validity of the reset condition 
-    1.The reset condition is edge.
-    2.The direction is opposite from the main alert.
-    3.The threshold is bigger or smaller according to the direction 
-    This condition is not checked but the user have check it else it can create a deadlock..
-    */
-    if((TrafficResetAlertElement->Trigger != TRAFF_EDGE) || (TrafficAlertElement->Trigger != TRAFF_EDGE))
-        return TI_NOK;
-    if(TrafficResetAlertElement->Direction == TrafficAlertElement->Direction)
-        return TI_NOK;
-
-
-    /*Find an empty Rst element entry*/
-    if(FindRstElemEntryIndex(TrafficMonitor,TrafficResetAlertElement,&i) == TI_NOK)
-        return TI_NOK;
-    
-    TrafficResetAlertElement->ResetElment[i] = TrafficAlertElement;
-    
-    /*if we know for sure that No Rst Element was assigned  
-    therefore that element was in disable mode and we have to enable it.*/
-    if (!(TrafficAlertElement->RstWasAssigned))
-    {
-        TrafficAlertElement->RstWasAssigned = TI_TRUE;
-        TrafficAlertElement->CurrentState = ALERT_OFF;
-        TrafficAlertElement->TimeOut = CurentTime + TrafficAlertElement->TimeIntervalMs;
-        TrafficAlertElement->EventCounter =0;
-    }
-    
-
-    if(MutualRst)
-    {
-      /*Find an empty Rst element entry in the TempRstAlertElement*/
-      if(FindRstElemEntryIndex(TrafficMonitor,TrafficAlertElement,&x) == TI_NOK)
-      {
-        /*this clean up is not complete*/
-        TrafficResetAlertElement->ResetElment[i] = NULL;
-        return TI_NOK;
-      }
-
-      TrafficAlertElement->ResetElment[x] = TrafficResetAlertElement;
-      /*if know for sure that No Rst Element was assigned  
-      therefore that element was in disable mode and we have to enable it.*/
-      if (!(TrafficResetAlertElement->RstWasAssigned))
-      {
-        TrafficResetAlertElement->RstWasAssigned = TI_TRUE;
-        TrafficResetAlertElement->CurrentState = ALERT_OFF;
-        TrafficResetAlertElement->TimeOut = CurentTime + TrafficAlertElement->TimeIntervalMs;
-        TrafficResetAlertElement->EventCounter = 0;
-      }
-    }
-    return TI_OK;
-}
-
-
-/************************************************************************/
-/*               TrafficMonitor_CleanRelatedRef                         */
-/************************************************************************/
-void TrafficMonitor_CleanRelatedRef(TrafficMonitor_t *TrafficMonitor,TrafficAlertElement_t *TrafficAlertElement)
-{
- 
-    int i;
-    TrafficAlertElement_t *AlertElement  = (TrafficAlertElement_t*)List_GetFirst(TrafficMonitor->NotificationRegList);
-      
-    /* go over all the Down elements and check for alert ResetElment that ref to TrafficAlertElement*/    
-    while(AlertElement)
-    {
-        for(i=0;i<MAX_RST_ELMENT_PER_ALERT;i++)
-        {
-            if(AlertElement->ResetElment[i] == TrafficAlertElement)
-                AlertElement->ResetElment[i] = NULL;
-        }
-        AlertElement = (TrafficAlertElement_t*)List_GetNext(TrafficMonitor->NotificationRegList);
-    } 
-}
- 
-
-
-/************************************************************************/
-/*          TrafficMonitor_StopNotif                                   */
-/************************************************************************/
-void TrafficMonitor_StopEventNotif(TI_HANDLE hTrafficMonitor,TI_HANDLE EventHandle)
-{
-    TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
-    TrafficAlertElement_t *TrafficAlertElement = (TrafficAlertElement_t*)EventHandle;
-
-    if(TrafficMonitor == NULL)
-        return ;
-
-    if(TrafficAlertElement == NULL)
-        return ;
-
-    TrafficAlertElement->Enabled = TI_FALSE;
-    TrafficMonitor_UpdateDownTrafficTimerState (hTrafficMonitor);
-
-}
-
-
-
-/************************************************************************/
-/*          TrafficMonitor_StartNotif                                   */
-/************************************************************************/
-void TrafficMonitor_StartEventNotif(TI_HANDLE hTrafficMonitor, TI_HANDLE EventHandle)
-{
-    TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
-    TrafficAlertElement_t *TrafficAlertElement = (TrafficAlertElement_t*)EventHandle;
-
-    if(TrafficMonitor == NULL)
-        return ;
-
-    if(TrafficAlertElement == NULL)
-        return ;
-
-    TrafficAlertElement->Enabled = TI_TRUE;
-    TrafficMonitor_UpdateDownTrafficTimerState (hTrafficMonitor);
-}
-
-
-
-/************************************************************************/
-/*          TrafficMonitor_StartNotif                                   */
-/************************************************************************/
-void TrafficMonitor_ResetEvent(TI_HANDLE hTrafficMonitor, TI_HANDLE EventHandle)
-{
-    TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
-    TrafficAlertElement_t *TrafficAlertElement = (TrafficAlertElement_t*)EventHandle;
-
-    if(TrafficMonitor == NULL)
-        return ;
-
-    if(TrafficAlertElement == NULL)
-        return ;
-
-    TrafficAlertElement->CurrentState = ALERT_OFF;
-
-    TrafficMonitor_UpdateDownTrafficTimerState (TrafficMonitor);
-}
-
-
-
-/************************************************************************/
-/*          TrafficMonitor_UnregEvent                                   */
-/************************************************************************/
-void TrafficMonitor_UnregEvent(TI_HANDLE hTrafficMonitor, TI_HANDLE EventHandle)
-{
-    TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
-    TrafficAlertElement_t *TrafficAlertElement = (TrafficAlertElement_t*)EventHandle;
-
-    if(TrafficMonitor == NULL)
-        return ;
-    
-    /*If it was an edge alert then there can be one more alert element to free.*/
-    /*one is the alert, and the second is the reset element that corresponds to this alert*/
-    /*if it was  Auto Created*/
-    if (TrafficAlertElement->ResetElment[0])
-      if (TrafficAlertElement->ResetElment[0]->AutoCreated)
-       List_FreeElement(TrafficMonitor->NotificationRegList,TrafficAlertElement->ResetElment);
-
-    TrafficMonitor_CleanRelatedRef(TrafficMonitor,TrafficAlertElement);
-
-    List_FreeElement(TrafficMonitor->NotificationRegList,EventHandle);
-
-    TrafficMonitor_UpdateDownTrafficTimerState (TrafficMonitor);
-}
- 
-
-
-/***********************************************************************
- *                        isThresholdUp                 
- ***********************************************************************
-DESCRIPTION: Evaluate if alert element as crossed his threshold 
-             if yes it operate the callback registered for this alert and take care of the alert state.  
-                         For alert with UP direction the following algorithm is preformed
-             If the threshold is passed in the req time interval or less. then
-             For Level
-                The alert mode is changed to ON & the next timeout is set to the next interval.
-             For Edge
-                The alert mode is changed to wait for reset and the reset element is set to off.
-                And his timeout is set
-
-INPUT:                          
-            EventHandle -         Alert event
-            CurrentTime - the current time Time stamp 
-            
-OUTPUT:         
-
-RETURN:     If  threshold crossed TI_TRUE else False
-
-************************************************************************/
-static TI_BOOL isThresholdUp(TrafficAlertElement_t *AlertElement , TI_UINT32 CurrentTime)
-{  
-    int i;
-    
-    if (AlertElement->TimeOut < CurrentTime)        
-    {
-        AlertElement->EventCounter = AlertElement->LastCounte;
-        AlertElement->TimeOut = CurrentTime + AlertElement->TimeIntervalMs;
-    }
-    
-    if (AlertElement->EventCounter > AlertElement->Threshold)
-    {
-        AlertElement->EventCounter = 0;
-        /*Sets the new due time (time out)*/
-        AlertElement->TimeOut = CurrentTime + AlertElement->TimeIntervalMs;
-        
-        /*For Edge alert change the alert status to wait for reset and 
-        The corresponding reset element from wait for reset To off.
-        That way toggling the two elements*/
-        if(AlertElement->Trigger == TRAFF_EDGE)
-        {
-            AlertElement->CurrentState = ALERT_WAIT_FOR_RESET;
-            for(i=0;i<MAX_RST_ELMENT_PER_ALERT;i++)
-            {
-                TrafficAlertElement_t *rstElmt = AlertElement->ResetElment[i];
-                if(rstElmt != NULL)
-                    if(rstElmt->CurrentState == ALERT_WAIT_FOR_RESET)
-                    {
-                        rstElmt->CurrentState = ALERT_OFF;
-                        rstElmt->EventCounter = 0;
-                        rstElmt->TimeOut = CurrentTime + rstElmt->TimeIntervalMs;
-                    }
-            }
-        }
-        else 
-            AlertElement->CurrentState = ALERT_ON;
-        
-        /*Call the callback function*/
-        if((AlertElement->CallBack != NULL) && AlertElement->Enabled)
-            AlertElement->CallBack(AlertElement->Context,AlertElement->Cookie);
-        return TI_TRUE;
-    }
-    
-    return TI_FALSE;
-}
-
-
-
-/***********************************************************************
- *                        isThresholdDown               
- ***********************************************************************
-DESCRIPTION: Evaluate if alert element as crossed his threshold 
-             if yes it operate the callback registered for this alert and take care of the alert state.  
-                         For alert with DOWN direction the following algorithm is preformed
-             If the threshold is passed (EventCounter < Threshold) in the req time only. then
-             For Level
-               The alert mode is changed to ON & the next timeout is set to the next interval.
-               If the alert condition will still be on.then the next alert will be in the next time interval
-            For Edge
-               The alert mode is changed to wait for reset and the reset element is set to off.
-               And his timeout is set.
-
-INPUT:                          
-            EventHandle -         Alert event
-            CurrentTime - the current time Time stamp 
-            
-OUTPUT:         
-
-RETURN:     If threshold crossed TI_TRUE else False
-
-************************************************************************/
-static TI_BOOL isThresholdDown(TrafficAlertElement_t *AlertElement , TI_UINT32 CurrentTime)
-{
-    int i;
-    TI_BOOL returnVal = TI_FALSE;
-
-    /*
-    if its end of window time.
-    */
-    if (AlertElement->TimeOut <= CurrentTime)        
-    {
-        /*
-        if there was a down edge event.
-        */
-        if (AlertElement->EventCounter <= AlertElement->Threshold)
-        {
-            /*For Edge alert change the alert status to wait for reset and 
-            The corresponding reset element from wait for reset To off.
-            That way toggling the two elements*/
-            if(AlertElement->Trigger == TRAFF_EDGE)
-            {
-                AlertElement->CurrentState = ALERT_WAIT_FOR_RESET;
-                for(i=0;i<MAX_RST_ELMENT_PER_ALERT;i++)
-                {
-                    TrafficAlertElement_t *rstElmt = AlertElement->ResetElment[i];
-                    if(rstElmt != NULL)
-                        if(rstElmt->CurrentState == ALERT_WAIT_FOR_RESET)
-                        {
-                            rstElmt->CurrentState = ALERT_OFF;
-                            rstElmt->EventCounter = 0;
-                            rstElmt->TimeOut = CurrentTime + rstElmt->TimeIntervalMs;
-                        }
-                }
-            }
-            else 
-                AlertElement->CurrentState = ALERT_ON;
-            
-            /*Call the callback function*/
-            if((AlertElement->CallBack != NULL) && AlertElement->Enabled)
-                AlertElement->CallBack(AlertElement->Context,AlertElement->Cookie);
-            
-            returnVal = TI_TRUE;
-        }
-
-        /* end of time window - clear the event counter for the new window.*/
-        AlertElement->EventCounter = 0;
-        /*Sets the new due time (time out)*/
-        AlertElement->TimeOut = CurrentTime + AlertElement->TimeIntervalMs;
-    }
-    else
-    {
-        /*
-        In case we find out that the alert condition will not Occur for this frame window,
-        therefor start a new alert examine cycle (the next farme window).
-        (Not wait till the timeout of this current frame window)
-        */
-        if(AlertElement->EventCounter > AlertElement->Threshold)
-        {
-            AlertElement->EventCounter = 0;
-            AlertElement->TimeOut = CurrentTime + AlertElement->TimeIntervalMs;
-        }
-    }
-    return returnVal;
-}
-
-
-
-/************************************************************************/
-/*              TimerMonitor_TimeOut                                    */
-/************************************************************************/
-/*
- *      Timer function that is called for every x time interval 
- *   That will invoke a process if any down limit as occurred. 
- *
- ************************************************************************/
-static void TimerMonitor_TimeOut (TI_HANDLE hTrafficMonitor, TI_BOOL bTwdInitOccured)
-{
-    
-    TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
-    TrafficAlertElement_t *AlertElement;
-    TI_UINT32 CurentTime;
-    TI_UINT32 activeTrafDownEventsNum = 0;
-    TI_UINT32 trafficDownMinTimeout = 0xFFFFFFFF;
-  
-    if(TrafficMonitor == NULL)
-        return;
-
-    AlertElement  = (TrafficAlertElement_t*)List_GetFirst(TrafficMonitor->NotificationRegList);
-    CurentTime = os_timeStampMs(TrafficMonitor->hOs);
-    
-    
-    /* go over all the Down elements and check for alert */    
-    while(AlertElement)
-    {
-        if(AlertElement->CurrentState != ALERT_WAIT_FOR_RESET) 
-        {
-            if (AlertElement->Direction == TRAFF_DOWN)
-            {
-               isThresholdDown(AlertElement,CurentTime);
-            }   
-        }
- 
-         if ((AlertElement->Direction == TRAFF_DOWN) && (AlertElement->Trigger == TRAFF_EDGE) && (AlertElement->CurrentState == ALERT_OFF) && (AlertElement->Enabled == TI_TRUE))
-{
-            /* Increase counter of active traffic down events */
-            activeTrafDownEventsNum++;
-
-            /* Search for the alert with the most short Interval time - will be used to start timer */
-            if ((AlertElement->TimeIntervalMs) < (trafficDownMinTimeout))
-               trafficDownMinTimeout = AlertElement->TimeIntervalMs;
-         }
-    
-        AlertElement = (TrafficAlertElement_t*)List_GetNext(TrafficMonitor->NotificationRegList);
-    }   
-    
-   TrafficMonitor_ChangeDownTimerStatus (TrafficMonitor,activeTrafDownEventsNum,trafficDownMinTimeout);
-    
-}
-
-/***********************************************************************
- *                        TrafficMonitor_IsEventOn
- ***********************************************************************
-DESCRIPTION: Returns the current status of an event element.
-
-INPUT:      TrafficAlertElement_t 
-
-
-OUTPUT:    bool
-
-RETURN:     True = ON  false = OFF
-
-************************************************************************/
-TI_BOOL TrafficMonitor_IsEventOn(TI_HANDLE EventHandle)
-{
-    TrafficAlertElement_t *TrafficAlertElement = (TrafficAlertElement_t*)EventHandle;
-
-    if(TrafficAlertElement == NULL)
-        return TI_FALSE;
-    
-    
-    if (TrafficAlertElement->CurrentState == ALERT_OFF)
-        return TI_FALSE;
-    else
-        return TI_TRUE;
-
-}
-
-
-
-/***********************************************************************
- *                        TrafficMonitor_GetFrameBandwidth                        
- ***********************************************************************
-DESCRIPTION: Returns the total direct frames in the Rx and Tx per second. 
-                                
-INPUT:          hTrafficMonitor -       Traffic Monitor the object.
-                        
-            
-OUTPUT:         
-
-RETURN:     Total BW
-************************************************************************/
-int TrafficMonitor_GetFrameBandwidth(TI_HANDLE hTrafficMonitor)
-{
-	TrafficMonitor_t 	*pTrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
-	TI_UINT32 			uCurentTS;
-   
-	if(pTrafficMonitor == NULL)
-        return TI_NOK;
-
-	uCurentTS = os_timeStampMs(pTrafficMonitor->hOs);
-
-	/* Calculate BW for Rx & Tx */
-	return ( TrafficMonitor_calcBW(&pTrafficMonitor->DirectRxFrameBW, uCurentTS) +
-			 TrafficMonitor_calcBW(&pTrafficMonitor->DirectTxFrameBW, uCurentTS) );
-}
-
-/***********************************************************************
-*                        TrafficMonitor_updateBW                        
-***********************************************************************
-DESCRIPTION: Upon receiving an event of Tx/Rx (a packet was sent or received), This function is 
-				called and performs BW calculation.
-
-INPUT:          
-				pBandWidth		- BW of Rx or Tx	
-				uCurrentTS		- current TS of the recent event
-
-OUTPUT:         pBandWidth		- updated counters and TS
-
-************************************************************************/
-void TrafficMonitor_updateBW(BandWidth_t *pBandWidth, TI_UINT32 uCurrentTS)
-{
-	/* Check if we should move to the next window */
-	if ( (uCurrentTS - pBandWidth->auFirstEventsTS[pBandWidth->uCurrentWindow]) < (SIZE_OF_WINDOW_MS) )
-	{	
-		pBandWidth->auWindowCounter[pBandWidth->uCurrentWindow]++;
-	}
-	else	/* next window */
-	{	
-		/* increment current window and mark the first event received */	
-		pBandWidth->uCurrentWindow = (pBandWidth->uCurrentWindow + 1) & CYCLIC_COUNTER_ELEMENT;
-		pBandWidth->auFirstEventsTS[pBandWidth->uCurrentWindow] = uCurrentTS;
-		pBandWidth->auWindowCounter[pBandWidth->uCurrentWindow] = 1;
-	}
-}
-/***********************************************************************
-*                        TrafficMonitor_calcBW                        
-***********************************************************************
-DESCRIPTION: Returns the total direct frames in Rx or Tx.
-			 It is called when outside module request the BW. 
-			 Calculate band width by summing up the sliding windows.
-
-INPUT:       pBandWidth		- BW of Rx or Tx	
-			 uCurrentTS		- current TS
-
-RETURN:     Total BW
-************************************************************************/
-TI_UINT32 TrafficMonitor_calcBW(BandWidth_t *pBandWidth, TI_UINT32 uCurrentTS)
-{
-	TI_UINT32 uTotalTime = uCurrentTS - pBandWidth->auFirstEventsTS[pBandWidth->uCurrentWindow];
-	TI_UINT32 uTotalBW = 0;
-	TI_INT32  iter = (TI_INT32)pBandWidth->uCurrentWindow;
-	TI_INT32  iNextIter = (iter - 1) & CYCLIC_COUNTER_ELEMENT;	/* Always one less than i */
-
-	/* As long as the summed windows are less than BW_WINDOW_MS and we didn't loop the whole array */
-	while ( (uTotalTime < BW_WINDOW_MS) && (iNextIter != pBandWidth->uCurrentWindow))
-	{ 
-		uTotalBW	+= pBandWidth->auWindowCounter[iter];
-		/* add next window time - next loop will check if we exceeded the BW window */
-		uTotalTime   = uCurrentTS - pBandWidth->auFirstEventsTS[iNextIter];
-
-		iter = iNextIter; 
-		iNextIter = (iter - 1) & CYCLIC_COUNTER_ELEMENT;					
-	} ;
-
-	/* 
-	 * Note that if (iNextIter == pBandWidth->uCurrentWindow) than the calculated BW could be up to 
-	 * SIZE_OF_WINDOW_MS less than BW_WINDOW_MS 
-	 */
-	return uTotalBW;
-}
-
-
-/***********************************************************************
- *                        TrafficMonitor_Event                  
- ***********************************************************************
-DESCRIPTION: this function is called for every event that was requested from the Tx or Rx
-             The function preformes update of the all the relevant Alert in the system 
-             that corresponds to the event. checks the Alert Status due to this event.
-             
- 
-                                
-INPUT:          hTrafficMonitor -       Traffic Monitor the object.
-                        
-            Count - evnet count.
-            Mask - the event mask that That triggered this function.
-            
-            MonitorModuleType Will hold the module type from where this function was called. 
-            
-OUTPUT:         
-
-RETURN:     
-
-************************************************************************/
-void TrafficMonitor_Event(TI_HANDLE hTrafficMonitor,int Count,TI_UINT16 Mask,TI_UINT32 MonitorModuleType)
-{
-    TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
-    TrafficAlertElement_t *AlertElement;
-    TI_UINT32 activeTrafDownEventsNum = 0;
-    TI_UINT32 trafficDownMinTimeout = 0xFFFFFFFF;
-    TI_UINT32 uCurentTS;
-
-    if(TrafficMonitor == NULL)
-        return;
-
-    if(!TrafficMonitor->Active)   
-        return;
-
-	uCurentTS = os_timeStampMs(TrafficMonitor->hOs);
-
-    /* for BW calculation */
-    if(MonitorModuleType == RX_TRAFF_MODULE)
-    {
-        if(Mask & DIRECTED_FRAMES_RECV)
-		{
-            TrafficMonitor_updateBW(&TrafficMonitor->DirectRxFrameBW, uCurentTS); 
-		} 
-    }
-    else if (MonitorModuleType == TX_TRAFF_MODULE)
-    {
-        if(Mask & DIRECTED_FRAMES_XFER)
-		{
-            TrafficMonitor_updateBW(&TrafficMonitor->DirectTxFrameBW, uCurentTS);
-		}
-    }
-    else  
-	{
-        return; /* module type does not exist, error return */
-	}
-
-    AlertElement  = (TrafficAlertElement_t*)List_GetFirst(TrafficMonitor->NotificationRegList);
-    
-    /* go over all the elements and check for alert */    
-    while(AlertElement)
-    {
-        if(AlertElement->CurrentState != ALERT_WAIT_FOR_RESET) 
-        {
-            if(AlertElement->MonitorMask[MonitorModuleType] & Mask)
-            {
-                AlertElement->ActionFunc(AlertElement,Count);
-                if (AlertElement->Direction == TRAFF_UP)
-                {
-                    isThresholdUp(AlertElement, uCurentTS);
-                }
-            }
-
-            if ((AlertElement->Direction == TRAFF_DOWN) && (AlertElement->Trigger == TRAFF_EDGE) && (AlertElement->CurrentState == ALERT_OFF) && (AlertElement->Enabled == TI_TRUE))
-            {
-               /* Increase counter of active traffic down events */
-               activeTrafDownEventsNum++;
-
-               /* Search for the alert with the most short Interval time - will be used to start timer */
-               if ((AlertElement->TimeIntervalMs) < (trafficDownMinTimeout))
-                  trafficDownMinTimeout = AlertElement->TimeIntervalMs;
-            }
-
-        }
-        AlertElement = (TrafficAlertElement_t*)List_GetNext(TrafficMonitor->NotificationRegList);
-    }
-
-    TrafficMonitor_ChangeDownTimerStatus (TrafficMonitor,activeTrafDownEventsNum,trafficDownMinTimeout);
-
-}
-
-
-/*
- *      Used as the aggregation function that is used by the alerts for counting the events. 
- */
-static void SimpleByteAggregation(TI_HANDLE TraffElem,int Count)
-{
-    TrafficAlertElement_t *AlertElement = TraffElem;
-    AlertElement->EventCounter += Count;
-    AlertElement->LastCounte = Count; 
-}
-
-
-/*
- *      Used as the aggregation function for frame. (count is not used)
- */
-static void SimpleFrameAggregation(TI_HANDLE TraffElem,int Count)
-{
-    TrafficAlertElement_t *AlertElement = TraffElem;
-    AlertElement->EventCounter++;
-    AlertElement->LastCounte = 1; 
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name: TrafficMonitor_UpdateDownTrafficTimerState
-Routine Description: called whenever a "down" alert is called, or any other change in the alert list.
-                     used to either start or stop the "traffic down" timer.
-                     loops through alert list, searches for active traffic down events.
-Arguments:
-Return Value:
------------------------------------------------------------------------------*/
-static void TrafficMonitor_UpdateDownTrafficTimerState (TI_HANDLE hTrafficMonitor)
-{
-	TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
-    TrafficAlertElement_t *AlertElement;
-    TI_UINT32 activeTrafDownEventsNum = 0;
-    TI_UINT32 trafficDownMinTimeout = 0xFFFFFFFF;
-
-    AlertElement  = (TrafficAlertElement_t*)List_GetFirst(TrafficMonitor->NotificationRegList);
-    
-    while(AlertElement)
-    {
-
-      if ((AlertElement->Direction == TRAFF_DOWN) && (AlertElement->Trigger == TRAFF_EDGE) && (AlertElement->CurrentState == ALERT_OFF) && (AlertElement->Enabled == TI_TRUE))
-      {
-         /* Increase counter of active traffic down events */
-         activeTrafDownEventsNum++;
-
-         /* Search for the alert with the most short Interval time - will be used to start timer */
-         if ((AlertElement->TimeIntervalMs) < (trafficDownMinTimeout))
-            trafficDownMinTimeout = AlertElement->TimeIntervalMs;
-      }
-
-      AlertElement = (TrafficAlertElement_t*)List_GetNext(TrafficMonitor->NotificationRegList);
-
-    }
-   
-    TrafficMonitor_ChangeDownTimerStatus (TrafficMonitor,activeTrafDownEventsNum,trafficDownMinTimeout);
-
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name: TrafficMonitor_ChangeDownTimerStatus
-Routine Description: Start or stop down traffic timer according to number of down events found and minInterval time.
-Arguments:
-Return Value:
------------------------------------------------------------------------------*/
-static void TrafficMonitor_ChangeDownTimerStatus (TI_HANDLE hTrafficMonitor, TI_UINT32 downEventsFound, TI_UINT32 minIntervalTime)
-{
-	TrafficMonitor_t *pTrafficMonitor = (TrafficMonitor_t*)hTrafficMonitor;
-    
-    if ((downEventsFound == 0) && pTrafficMonitor->DownTimerEnabled)
-    {
-        pTrafficMonitor->DownTimerEnabled = TI_FALSE;
-        tmr_StopTimer (pTrafficMonitor->hTrafficMonTimer);
-        os_wake_unlock(pTrafficMonitor->hOs);
-    }
-    else if ((downEventsFound > 0) && (pTrafficMonitor->DownTimerEnabled == TI_FALSE))
-    {
-        os_wake_lock(pTrafficMonitor->hOs);
-        pTrafficMonitor->DownTimerEnabled = TI_TRUE;
-        /* Start the timer with user defined percentage of the the minimum interval discovered earlier */
-        tmr_StartTimer (pTrafficMonitor->hTrafficMonTimer,
-                        TimerMonitor_TimeOut,
-                        (TI_HANDLE)pTrafficMonitor,
-                        ((minIntervalTime * pTrafficMonitor->trafficDownTestIntervalPercent) / 100), 
-                        TI_TRUE);
-    }
-}
-
-#ifdef TI_DBG
-
-/*-----------------------------------------------------------------------------
-Routine Name: TrafficMonitor_UpdateActiveEventsCounters
-Routine Description: 
-Arguments:
-Return Value:
------------------------------------------------------------------------------*/
-void TrafficMonitor_UpdateActiveEventsCounters (TI_HANDLE hTrafficMonitor)
-{
-	TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
-    TrafficAlertElement_t *AlertElement;
-    TI_UINT32 activeTrafDownEventsNum = 0;
-
-    AlertElement  = (TrafficAlertElement_t*)List_GetFirst(TrafficMonitor->NotificationRegList);
-    
-    while(AlertElement)
-    {
-      if ((AlertElement->Direction == TRAFF_DOWN) && (AlertElement->Trigger == TRAFF_EDGE) && (AlertElement->CurrentState == ALERT_OFF) && (AlertElement->Enabled == TI_TRUE))
-      {
-         activeTrafDownEventsNum++;
-      }
-      AlertElement = (TrafficAlertElement_t*)List_GetNext(TrafficMonitor->NotificationRegList);
-    }
-
-}
-
-
-#endif
-
-#ifdef TRAFF_TEST
-/*
- *      TEST Function 
- */
-void func1(TI_HANDLE Context,TI_UINT32 Cookie)
-{
-    switch(Cookie) {
-    case 1:
-                WLAN_OS_REPORT(("TRAFF - ALERT UP limit - 50 ON"));
-        break;
-    case 2:
-                WLAN_OS_REPORT(("TRAFF - ALERT UP limit - 30 ON"));
-    break;
-    case 3:
-                WLAN_OS_REPORT(("TRAFF - ALERT DOWN limit - 25 ON"));  
-    break;
-    case 4:
-                WLAN_OS_REPORT(("TRAFF - ALERT DOWN limit - 10 ON"));  
-    break;
-   }
-    
-}
-
-
-void PrintElertStus()
-{
-    TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)TestTrafficMonitor;
-    TrafficAlertElement_t *AlertElement  = (TrafficAlertElement_t*)List_GetFirst(TrafficMonitor->NotificationRegList);
-      
-    /* go over all the Down elements and check for alert ResetElment that ref to TrafficAlertElement*/    
-    while(AlertElement)
-    {
-        if(AlertElement->CurrentState == ALERT_WAIT_FOR_RESET)
-            WLAN_OS_REPORT(("TRAFF - ALERT ALERT_WAIT_FOR_RESET"));
-        else
-            WLAN_OS_REPORT(("TRAFF - ALERT ENABLED"));
-
-            
-        AlertElement = (TrafficAlertElement_t*)List_GetNext(TrafficMonitor->NotificationRegList);
-    } 
-}
-
-void TestEventFunc (TI_HANDLE hTrafficMonitor, TI_BOOL bTwdInitOccured)
-{
-
-    static flag = TI_TRUE;
-    TrafficAlertRegParm_t TrafficAlertRegParm ;
-    if(flag)
-    {
-
-        TrafficAlertRegParm.CallBack = func1;
-        TrafficAlertRegParm.Context = NULL ; 
-        TrafficAlertRegParm.Cookie =  1 ;    
-        TrafficAlertRegParm.Direction = TRAFF_UP ;
-        TrafficAlertRegParm.Trigger = TRAFF_EDGE;
-        TrafficAlertRegParm.TimeIntervalMs = 1000;
-        TrafficAlertRegParm.Threshold = 50;
-        TrafficAlertRegParm.MonitorType = TX_RX_DIRECTED_FRAMES;
-        Alert1 = TrafficMonitor_RegEvent(TestTrafficMonitor,&TrafficAlertRegParm,TI_FALSE);   
-        
-        TrafficAlertRegParm.CallBack = func1;
-        TrafficAlertRegParm.Context = NULL ; 
-        TrafficAlertRegParm.Cookie =  2 ;    
-        TrafficAlertRegParm.Direction = TRAFF_UP ;
-        TrafficAlertRegParm.Trigger = TRAFF_EDGE;
-        TrafficAlertRegParm.TimeIntervalMs = 1000;
-        TrafficAlertRegParm.Threshold = 30;
-        TrafficAlertRegParm.MonitorType = TX_RX_DIRECTED_FRAMES;
-        Alert2 = TrafficMonitor_RegEvent(TestTrafficMonitor,&TrafficAlertRegParm,TI_FALSE);
-        
-      
-        TrafficAlertRegParm.CallBack = func1;
-        TrafficAlertRegParm.Context = NULL ; 
-        TrafficAlertRegParm.Cookie =  3 ;    
-        TrafficAlertRegParm.Direction = TRAFF_DOWN ;
-        TrafficAlertRegParm.Trigger = TRAFF_EDGE;
-        TrafficAlertRegParm.TimeIntervalMs = 1000;
-        TrafficAlertRegParm.Threshold = 25;
-        TrafficAlertRegParm.MonitorType = TX_RX_DIRECTED_FRAMES;
-        Alert3 = TrafficMonitor_RegEvent(TestTrafficMonitor,&TrafficAlertRegParm,TI_FALSE);   
-        
-        TrafficAlertRegParm.CallBack = func1;
-        TrafficAlertRegParm.Context = NULL ; 
-        TrafficAlertRegParm.Cookie =  4 ;    
-        TrafficAlertRegParm.Direction = TRAFF_DOWN ;
-        TrafficAlertRegParm.Trigger = TRAFF_LEVEL;
-        TrafficAlertRegParm.TimeIntervalMs = 1000;
-        TrafficAlertRegParm.Threshold = 10;
-        TrafficAlertRegParm.MonitorType = TX_RX_DIRECTED_FRAMES;
-        Alert4 = TrafficMonitor_RegEvent(TestTrafficMonitor,&TrafficAlertRegParm,TI_FALSE);
-        
-       TrafficMonitor_SetRstCondition(TestTrafficMonitor, Alert1,Alert3,TI_TRUE);
-       TrafficMonitor_SetRstCondition(TestTrafficMonitor, Alert2,Alert3,TI_FALSE);
-       flag = TI_FALSE;
-    }
-
-    PrintElertStus();
-
-}
-
-#endif
diff --git a/wl1271/stad/src/Data_link/TrafficMonitor.h b/wl1271/stad/src/Data_link/TrafficMonitor.h
deleted file mode 100644
index 6606c57..0000000
--- a/wl1271/stad/src/Data_link/TrafficMonitor.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * TrafficMonitor.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*                                                                          */
-/*        MODULE:       TrafficMonitor.h                                    */
-/*    PURPOSE:  TrafficMonitor module Header file                           */
-/*                                                                          */
-/***************************************************************************/
-#ifndef _TRAFFIC_MONITOR_H
-#define _TRAFFIC_MONITOR_H
-
-
-#include "tidef.h"
-#include "GeneralUtilApi.h"
-#include "TrafficMonitorAPI.h"
-
-/* time interval to load for the down limit alert Timer *
- *(TrafficMonitor_t->TrafficMonTimer)                   */
-#define MIN_MONITOR_INTERVAL  50 /*mSec*/
-
-/*The max number of Alert Element that the traffic monitor will be able to Manage.*/
-#define MAX_MONITORED_REQ     32
-
-/* The max number of Alert element that can                *
- * be associated to other alert element for reset condition*/
-#define MAX_RST_ELMENT_PER_ALERT 3
-
-/* BW Window in MS. changing this number must take NUM_OF_SLIDING_WINDOWS into consideration  */ 
-#define BW_WINDOW_MS			1000
-
-#define NUM_OF_SLIDING_WINDOWS 8							/* Must be power of 2 !!!							 */
-#define CYCLIC_COUNTER_ELEMENT (NUM_OF_SLIDING_WINDOWS - 1)	/* Note that it is aligned to NUM_OF_SLIDING_WINDOWS */
-
-#define SIZE_OF_WINDOW_MS	   ( BW_WINDOW_MS / NUM_OF_SLIDING_WINDOWS) /* 125 Ms */
-
-/* BandWidth_t 
-	This struct is used for the sliding windows algorithm used to calculate the band width */
-typedef struct
-{
-    TI_UINT32           uCurrentWindow;
-    TI_UINT32           auFirstEventsTS[NUM_OF_SLIDING_WINDOWS];
-    TI_UINT32           auWindowCounter[NUM_OF_SLIDING_WINDOWS];
-}BandWidth_t;
-
-
-/* The traffic manger class structure */
-typedef struct
-{
-    TI_BOOL             Active;
-    TI_HANDLE           NotificationRegList;
-
-    TI_HANDLE           hOs;
-    TI_HANDLE           hTimer;
-    TI_HANDLE           hRxData;
-    TI_HANDLE           hTxCtrl;
-    
-    TI_HANDLE           TxRegReqHandle;
-    TI_HANDLE           RxRegReqHandle;
-    
-    BandWidth_t         DirectTxFrameBW;
-    BandWidth_t         DirectRxFrameBW;
-    
-    TI_UINT8		    trafficDownTestIntervalPercent;	/* Percentage of max down events test interval     */
-                                                        /*to use in our "traffic down" timer               */    
-    TI_BOOL             DownTimerEnabled;	/* Indicates whether the "down traffic" timer is active or not */
-
-    TI_HANDLE           hTrafficMonTimer;
-
-}TrafficMonitor_t;
-
-
-/* Function definition that used for event Aggregation/filtering/etc.. */
-typedef void (*TraffActionFunc_t)(TI_HANDLE TraffElem,int Count); 
-                
-/* This enum holds the event providers that are optional in the system */
-typedef enum
-{
-        TX_TRAFF_MODULE                                 = 0,
-        RX_TRAFF_MODULE                         = 1,
-    MAX_NUM_MONITORED_MODULES  /* Don't move this enum this index defines the 
-                                  number of module that can be monitored.*/                   
-}MonModuleTypes_t;
-
-
-
-/*
- *      Alert State option enum 
- *  0.  disabled
- *  1.  ON but not active
- *  2.  ON and active
- */
-typedef enum {
-    ALERT_WAIT_FOR_RESET = 0,          /* Event has been triggered, awaiting reset event to occur */
-        ALERT_OFF,
-    ALERT_ON
-}TraffAlertState_t;
-
-
-/* Basic Alert element structure */
-typedef struct AlertElement_t
-{
-    /*initial param*/
-    TraffAlertState_t   CurrentState; 
-    int                             EventCounter;
-    int                             Threshold;
-    TI_UINT32                              TimeOut;  
-    TraffDirection_t    Direction;
-    TraffTrigger_t      Trigger;
-    TI_BOOL                Enabled;
-    int                             LastCounte;
-        TraffEevntCall_t        CallBack;
-    TI_HANDLE           Context ;
-    TI_UINT32              Cookie;    
-    TI_UINT32              TimeIntervalMs;               
-    TI_BOOL                AutoCreated;
-    TI_BOOL                RstWasAssigned;
-    TraffActionFunc_t   ActionFunc;
-    TI_UINT32              MonitorMask[MAX_NUM_MONITORED_MODULES];
-    struct AlertElement_t  *ResetElment[MAX_RST_ELMENT_PER_ALERT];     
-}TrafficAlertElement_t;
-
-#endif
diff --git a/wl1271/stad/src/Data_link/TrafficMonitorAPI.h b/wl1271/stad/src/Data_link/TrafficMonitorAPI.h
deleted file mode 100644
index 9fd71a6..0000000
--- a/wl1271/stad/src/Data_link/TrafficMonitorAPI.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * TrafficMonitorAPI.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*                                                                                                                                                 */
-/*        MODULE:       TrafficMonitor.h                                                                           */
-/*    PURPOSE:  TrafficMonitor module Header file                                              */
-/*                                                                                                                                                 */
-/***************************************************************************/
-#ifndef _TRAFFIC_MONITOR_API_H
-#define _TRAFFIC_MONITOR_API_H
-
-#include "DataCtrl_Api.h"
-#include "DrvMainModules.h"
-
-/**/
-/* call back functions prototype.*/
-/**/
-typedef void (*TraffEevntCall_t)(TI_HANDLE Context,TI_UINT32 Cookie);
-
-
-/*
- *      This enum list all the available traffic monitor event 
- *  that a client can register to.
- */
-typedef enum
-{
-    TX_ALL_MSDU_FRAMES =1,                          
-    RX_ALL_MSDU_FRAMES,
-    TX_RX_DIRECTED_FRAMES,
-    TX_RX_ALL_MSDU_FRAMES,
-    TX_RX_ALL_MSDU_IN_BYTES,
-    TX_RX_DIRECTED_IN_BYTES,
-    TX_RX_ALL_802_11_DATA_IN_BYTES,
-    TX_RX_ALL_802_11_DATA_FRAMES
-} TraffEvntOptNum_t;
-
- 
-
-typedef enum
-{
-    TRAFF_EDGE = 0,
-    TRAFF_LEVEL 
-}TraffTrigger_t;
-
-typedef enum
-{
-    TRAFF_UP = 0,
-    TRAFF_DOWN 
-}TraffDirection_t;
-
-typedef struct
-{
-    /*initial param*/
-        TraffEevntCall_t    CallBack;
-    TI_HANDLE           Context; 
-    TI_UINT32              Cookie;    
-    TraffDirection_t    Direction;
-    TraffTrigger_t      Trigger;
-    int                                 Threshold;
-    TI_UINT32              TimeIntervalMs;
-    TraffEvntOptNum_t   MonitorType;
-}TrafficAlertRegParm_t;
-
-
-/*********************************************************************/
-
-
-TI_HANDLE TrafficMonitor_create(TI_HANDLE hOs);
-void TrafficMonitor_Init (TStadHandlesList *pStadHandles, TI_UINT32 BWwindowMs);
-TI_STATUS TrafficMonitor_Destroy(TI_HANDLE hTrafficMonitor);
-TI_HANDLE TrafficMonitor_RegEvent(TI_HANDLE hTrafficMonitor, TrafficAlertRegParm_t *TrafficAlertRegParm, TI_BOOL AutoResetCreate);
-TI_STATUS TrafficMonitor_SetRstCondition(TI_HANDLE hTrafficMonitor,TI_HANDLE EventHandle,TI_HANDLE ResetEventHandle,TI_BOOL MutualRst);
-int TrafficMonitor_GetFrameBandwidth(TI_HANDLE hTrafficMonitor);
-void TrafficMonitor_UnregEvent(TI_HANDLE hTrafficMonitor, TI_HANDLE EventHandle);
-void TrafficMonitor_Event(TI_HANDLE hTrafficMonitor,int Count,TI_UINT16 Mask,TI_UINT32 MonitorModuleType);
-void TrafficMonitor_StopEventNotif(TI_HANDLE hTrafficMonitor,TI_HANDLE EventHandle);
-void TrafficMonitor_StartEventNotif(TI_HANDLE hTrafficMonitor,TI_HANDLE EventHandle);
-void TrafficMonitor_ResetEvent(TI_HANDLE hTrafficMonitor, TI_HANDLE EventHandle);
-TI_STATUS TrafficMonitor_Stop(TI_HANDLE hTrafficMonitor);       
-TI_STATUS TrafficMonitor_Start(TI_HANDLE hTrafficMonitor);      
-TI_BOOL TrafficMonitor_IsEventOn(TI_HANDLE EventHandle);
-
-
-
-
-#endif
-
-
diff --git a/wl1271/stad/src/Data_link/TxDataClsfr.c b/wl1271/stad/src/Data_link/TxDataClsfr.c
deleted file mode 100644
index 1d19c7f..0000000
--- a/wl1271/stad/src/Data_link/TxDataClsfr.c
+++ /dev/null
@@ -1,777 +0,0 @@
-/*
- * TxDataClsfr.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   txDataClsfr.c 
- *  \brief  The Tx Data Classifier sub-module (under txDataQueue module).
- *  
- *  \see    txDataQueue.h (the classifier uses the same object as txDataQueue)
- */
-
-#define __FILE_ID__  FILE_ID_59
-#include "paramOut.h"
-#include "osApi.h"
-#include "report.h"
-#include "context.h"
-#include "Ethernet.h"
-#include "TWDriver.h"
-#include "txDataQueue.h"
-
-
-
-/** 
- * \fn     txDataClsfr_Config 
- * \brief  Configure the classifier paramters
- * 
- * Configure the classifier parameters according to the init parameters.
- * Called from the txDataQueue configuration function.
- * 
- * \note   
- * \param  hTxDataQ     - The object handle                                         
- * \param  pClsfrInitParams - Pointer to the classifier init params
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     
- */ 
-TI_STATUS txDataClsfr_Config (TI_HANDLE hTxDataQ, TClsfrParams *pClsfrInitParams)
-{
-    TTxDataQ     *pTxDataQ = (TTxDataQ *)hTxDataQ;
-    TClsfrParams *pParams  = &pTxDataQ->tClsfrParams; /* where to save the new params */
-    TI_UINT32     uActualEntryCount;
-    TI_UINT32     i, j;
-    TI_BOOL       bConflictFound;
-    
-    /* Active classification algorithm */
-    pParams->eClsfrType = pClsfrInitParams->eClsfrType;
-
-    /* the number of active entries */
-    if (pClsfrInitParams->uNumActiveEntries <= NUM_OF_CLSFR_TABLE_ENTRIES)
-        pParams->uNumActiveEntries = pClsfrInitParams->uNumActiveEntries;
-    else 
-        pParams->uNumActiveEntries = NUM_OF_CLSFR_TABLE_ENTRIES;
-
-    /* Initialization of the classification table */
-    switch (pParams->eClsfrType)
-    {
-        case D_TAG_CLSFR:
-			pParams->uNumActiveEntries = 0;
-        break;
-        
-        case DSCP_CLSFR:
-            uActualEntryCount=0;
-            for (i = 0; i < pParams->uNumActiveEntries; i++)
-            {
-               bConflictFound = TI_FALSE;
-                /* check conflict */
-                for (j = 0; j < i; j++)
-                {
-                   /* Detect both duplicate and conflicting entries */
-                    if (pParams->ClsfrTable[j].Dscp.CodePoint == pClsfrInitParams->ClsfrTable[i].Dscp.CodePoint)
-                    {
-                        TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_WARNING , "ERROR: txDataClsfr_Config(): duplicate/conflicting classifier entries\n");
-                        bConflictFound = TI_TRUE;
-                    }
-                }
-                if (bConflictFound == TI_FALSE)
-                {
-                  pParams->ClsfrTable[uActualEntryCount].Dscp.CodePoint = pClsfrInitParams->ClsfrTable[i].Dscp.CodePoint;
-                  pParams->ClsfrTable[uActualEntryCount].DTag = pClsfrInitParams->ClsfrTable[i].DTag;
-                  uActualEntryCount++;
-                }
-            }
-            pParams->uNumActiveEntries = uActualEntryCount;
-        break;
-
-        case PORT_CLSFR:
-           uActualEntryCount=0;
-            for (i = 0; (i < pParams->uNumActiveEntries) ; i++)
-            {
-				bConflictFound = TI_FALSE;
-                /* check conflict */
-                for (j = 0; j < i; j++)
-                {
-                    /* Detect both duplicate and conflicting entries */
-                    if (pParams->ClsfrTable[j].Dscp.DstPortNum == pClsfrInitParams->ClsfrTable[i].Dscp.DstPortNum)
-                    {
-                        TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_WARNING , "ERROR: txDataClsfr_Config(): classifier entries conflict\n");
-                        bConflictFound = TI_TRUE;
-                    }
-                }
-                if (bConflictFound == TI_FALSE)
-                {
-                  pParams->ClsfrTable[uActualEntryCount].Dscp.DstPortNum = pClsfrInitParams->ClsfrTable[i].Dscp.DstPortNum;
-                  pParams->ClsfrTable[uActualEntryCount].DTag = pClsfrInitParams->ClsfrTable[i].DTag;
-                  uActualEntryCount++;
-                }
-            }
-            pParams->uNumActiveEntries = uActualEntryCount;
-        break;  
-
-        case IPPORT_CLSFR:
-           uActualEntryCount=0;
-            for (i=0; (i < pParams->uNumActiveEntries ) ; i++)
-            {
-				bConflictFound = TI_FALSE;
-                /* check conflict */
-                for (j = 0; j < i; j++)
-                {
-                   /* Detect both duplicate and conflicting entries */
-                    if ((pParams->ClsfrTable[j].Dscp.DstIPPort.DstIPAddress == pClsfrInitParams->ClsfrTable[i].Dscp.DstIPPort.DstIPAddress)&& 
-                    (pParams->ClsfrTable[j].Dscp.DstIPPort.DstPortNum == pClsfrInitParams->ClsfrTable[i].Dscp.DstIPPort.DstPortNum))
-                    {
-                        TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_WARNING , "ERROR: txDataClsfr_Config(): classifier entries conflict\n");
-                        bConflictFound = TI_TRUE;
-                    }
-                }
-                if (bConflictFound == TI_FALSE)
-                {
-                  pParams->ClsfrTable[uActualEntryCount].Dscp.DstIPPort.DstIPAddress = pClsfrInitParams->ClsfrTable[i].Dscp.DstIPPort.DstIPAddress;
-                  pParams->ClsfrTable[uActualEntryCount].Dscp.DstIPPort.DstPortNum = pClsfrInitParams->ClsfrTable[i].Dscp.DstIPPort.DstPortNum;
-                  pParams->ClsfrTable[uActualEntryCount].DTag = pClsfrInitParams->ClsfrTable[i].DTag;
-                  uActualEntryCount++;
-                }
-            }
-            pParams->uNumActiveEntries = uActualEntryCount;
-        break;  
-
-        default:
-            TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_WARNING , "ERROR: txDataClsfr_Config(): Classifier type -- unknown --> set to D-Tag\n");
-            pParams->eClsfrType = D_TAG_CLSFR;
-			pParams->uNumActiveEntries = 0;
-        break;  
-    }
-    
-    return TI_OK;
-}
-
-
-/** 
- * \fn     getIpAndUdpHeader 
- * \brief  Get IP & UDP headers addresses if exist
- * 
- * This function gets the addresses of the IP and UDP headers
- *
- * \note   A local inline function!
- * \param  pTxDataQ    - The object handle                                         
- * \param  pPktCtrlBlk - Pointer to the packet
- * \param  pIpHeader   - Pointer to pointer to IP header
- * \param  pUdpHeader  - Pointer to pointer to UDP header 
- * \return TI_OK on success, TI_NOK if it's not an IP packet
- * \sa     
- */ 
-static inline TI_STATUS getIpAndUdpHeader(TTxDataQ   *pTxDataQ, 
-                                          TTxCtrlBlk *pPktCtrlBlk,
-                                          TI_UINT8  **pIpHeader, 
-                                          TI_UINT8  **pUdpHeader)
-{
-    TI_UINT8 *pEthHead = pPktCtrlBlk->tTxnStruct.aBuf[0];
-	TI_UINT8  ipHeaderLen = 0;
-  
-	/* check if frame is IP according to ether type */
-    if( ( HTOWLANS(((TEthernetHeader *)pEthHead)->type) ) != ETHERTYPE_IP)
-    {
-        TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_INFORMATION, " getIpAndUdpHeader: EthTypeLength is not 0x0800 \n");
-        return TI_NOK;
-    }
-
-    /* set the pointer to the beginning of the IP header and calculate it's size */
-    *pIpHeader  = pPktCtrlBlk->tTxnStruct.aBuf[1];
-    ipHeaderLen = ((*(unsigned char*)(*pIpHeader) & 0x0f) * 4);
-
-    /* Set the pointer to the beggining of the TCP/UDP header */
-    if (ipHeaderLen == pPktCtrlBlk->tTxnStruct.aLen[1])
-    {
-        *pUdpHeader = pPktCtrlBlk->tTxnStruct.aBuf[2];  
-    }
-    else 
-    {
-        *pUdpHeader = *pIpHeader + ipHeaderLen;  
-    }
-
-    return TI_OK;
-}
-
-
-/** 
- * \fn     txDataClsfr_ClassifyTxPacket 
- * \brief  Configure the classifier paramters
- * 
- * This function classifies the given Tx packet according to the classifier parameters. 
- * It sets the TID field with the classification result.
- * The classification is according to one of the following methods:
- * - D-Tag  - Transparent (TID = Dtag)
- * - DSCP   - According to the DSCP field in the IP header - the default method!
- * - Dest UDP-Port   
- * - Dest IP-Addr & UDP-Port
- *
- * \note   
- * \param  hTxDataQ    - The object handle                                         
- * \param  pPktCtrlBlk - Pointer to the classified packet
- * \param  uPacketDtag - The packet priority optionaly set by the OAL
- * \return TI_OK on success, PARAM_VALUE_NOT_VALID in case of input parameters problems.
- * \sa     
- */ 
-TI_STATUS txDataClsfr_ClassifyTxPacket (TI_HANDLE hTxDataQ, TTxCtrlBlk *pPktCtrlBlk, TI_UINT8 uPacketDtag)
-{
-    TTxDataQ     *pTxDataQ = (TTxDataQ *)hTxDataQ;
-    TClsfrParams *pClsfrParams = &pTxDataQ->tClsfrParams;
-    TI_UINT8     *pUdpHeader = NULL;
-    TI_UINT8     *pIpHeader = NULL;
-    TI_UINT8   uDscp;
-    TI_UINT16  uDstUdpPort;
-    TI_UINT32  uDstIpAdd;
-    TI_UINT32  i;
-
-    pPktCtrlBlk->tTxDescriptor.tid = 0;
-
-    switch(pClsfrParams->eClsfrType)
-    {
-            /* Trivial mapping D-tag to D-tag */
-        case D_TAG_CLSFR:
-            if (uPacketDtag > MAX_NUM_OF_802_1d_TAGS)
-            {
-                TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR , "txDataClsfr_ClassifyTxPacket(): uPacketDtag error\n");
-                return PARAM_VALUE_NOT_VALID;
-            }
-            pPktCtrlBlk->tTxDescriptor.tid = uPacketDtag;
-            TRACE1(pTxDataQ->hReport, REPORT_SEVERITY_INFORMATION , "Classifier D_TAG_CLSFR. uPacketDtag = %d\n", uPacketDtag);
-        break;
-
-        case DSCP_CLSFR:
-            if( (getIpAndUdpHeader(pTxDataQ, pPktCtrlBlk, &pIpHeader, &pUdpHeader) != TI_OK) 
-                || (pIpHeader == NULL) )
-            {
-                TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_INFORMATION , "txDataClsfr_ClassifyTxPacket(): DSCP clsfr, getIpAndUdpHeader mismatch\n");
-				return PARAM_VALUE_NOT_VALID; 
-            }
-
-            /* DSCP to D-tag mapping */
-            uDscp =  *((TI_UINT8 *)(pIpHeader + 1)); /* Fetching the DSCP from the header */
-            uDscp = (uDscp >> 2);
-            
-            /* looking for the specific DSCP, if found, its corresponding D-tag is set to the TID */
-            for(i = 0; i < pClsfrParams->uNumActiveEntries; i++)
-            {
-                if (pClsfrParams->ClsfrTable[i].Dscp.CodePoint == uDscp)
-				{
-                    pPktCtrlBlk->tTxDescriptor.tid = pClsfrParams->ClsfrTable[i].DTag;
-                    TRACE2(pTxDataQ->hReport, REPORT_SEVERITY_INFORMATION , "Classifier DSCP_CLSFR found match - entry %d - Tid = %d\n",i,pPktCtrlBlk->tTxDescriptor.tid);
-					break;
-				}
-            }
-        break;
-
-        case PORT_CLSFR:
-            if( (getIpAndUdpHeader(pTxDataQ, pPktCtrlBlk, &pIpHeader, &pUdpHeader) != TI_OK) ||
-                (pUdpHeader == NULL) )
-            {
-                TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_INFORMATION, " txDataClsfr_ClassifyTxPacket() : DstPort clsfr, getIpAndUdpHeader error\n");
-                return PARAM_VALUE_NOT_VALID; 
-            }
-
-            uDstUdpPort = *((TI_UINT16 *)(pUdpHeader + 2));
-            uDstUdpPort = HTOWLANS(uDstUdpPort);
-            
-            /* Looking for the specific port number. If found, its corresponding D-tag is set to the TID. */
-            for(i = 0; i < pClsfrParams->uNumActiveEntries; i++)
-            {
-                if (pClsfrParams->ClsfrTable[i].Dscp.DstPortNum == uDstUdpPort)
-				{
-                    pPktCtrlBlk->tTxDescriptor.tid = pClsfrParams->ClsfrTable[i].DTag;
-                    TRACE2(pTxDataQ->hReport, REPORT_SEVERITY_INFORMATION , "Classifier PORT_CLSFR found match - entry %d - Tid = %d\n", i, pPktCtrlBlk->tTxDescriptor.tid);
-					break;
-				}
-            }
-        break;
-
-        case IPPORT_CLSFR: 
-            if ( (getIpAndUdpHeader(pTxDataQ, pPktCtrlBlk, &pIpHeader, &pUdpHeader) != TI_OK) 
-                 || (pIpHeader == NULL) || (pUdpHeader == NULL) )
-            {
-                TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_INFORMATION, "txDataClsfr_ClassifyTxPacket(): Dst IP&Port clsfr, getIpAndUdpHeader error\n");
-                return PARAM_VALUE_NOT_VALID; 
-            }
-
-            uDstUdpPort = *((TI_UINT16 *)(pUdpHeader + 2));
-            uDstUdpPort = HTOWLANS(uDstUdpPort);
-            uDstIpAdd = *((TI_UINT32 *)(pIpHeader + 16));
-            
-            /* 
-             * Looking for the specific pair of dst IP address and dst port number.
-             * If found, its corresponding D-tag is set to the TID.                                                         
-             */
-            for(i = 0; i < pClsfrParams->uNumActiveEntries; i++)
-            {
-                if ((pClsfrParams->ClsfrTable[i].Dscp.DstIPPort.DstIPAddress == uDstIpAdd) &&
-                    (pClsfrParams->ClsfrTable[i].Dscp.DstIPPort.DstPortNum == uDstUdpPort))
-				{
-                    pPktCtrlBlk->tTxDescriptor.tid = pClsfrParams->ClsfrTable[i].DTag;
-                    TRACE2(pTxDataQ->hReport, REPORT_SEVERITY_INFORMATION , "Classifier IPPORT_CLSFR found match - entry %d - Tid = %d\n", i, pPktCtrlBlk->tTxDescriptor.tid);
-					break;
-				}
-            }
-        break;
-        
-        default:
-            TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "txDataClsfr_ClassifyTxPacket(): eClsfrType error\n");
-    }
-
-    return TI_OK;
-}
-
-
-/** 
- * \fn     txDataClsfr_InsertClsfrEntry 
- * \brief  Insert a new entry to classifier table
- * 
- * Add a new entry to the classification table.
- * If the new entry is invalid or conflicts with existing entries, the operation is canceled.
- *
- * \note   
- * \param  hTxDataQ - The object handle                                         
- * \param  pNewEntry    - Pointer to the new entry to insert
- * \return TI_OK on success, PARAM_VALUE_NOT_VALID in case of input parameters problems.
- * \sa     txDataClsfr_RemoveClsfrEntry
- */ 
-TI_STATUS txDataClsfr_InsertClsfrEntry(TI_HANDLE hTxDataQ, TClsfrTableEntry *pNewEntry)
-{
-    TTxDataQ      *pTxDataQ     = (TTxDataQ *)hTxDataQ;
-    TClsfrParams  *pClsfrParams = &pTxDataQ->tClsfrParams;
-    TI_UINT32     i;
-
-	if(pNewEntry == NULL)
-    {
-        TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "Classifier_InsertClsfrEntry(): NULL ConfigBuffer pointer Error - Aborting\n");
-		return PARAM_VALUE_NOT_VALID;
-    }
-    
-    /* If no available entries, exit */
-    if (pClsfrParams->uNumActiveEntries == NUM_OF_CLSFR_TABLE_ENTRIES)
-    {
-        TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "Classifier_InsertClsfrEntry(): Bad Number Of Entries - Aborting\n");
-        return PARAM_VALUE_NOT_VALID;
-    }
-    
-    if (pClsfrParams->eClsfrType == D_TAG_CLSFR)
-    {
-        TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "Classifier_InsertClsfrEntry(): D-Tag classifier - Aborting\n");
-        return PARAM_VALUE_NOT_VALID;
-    }
-
-    /* Check new entry and conflict with existing entries and if OK, insert to classifier table */
-    switch (pClsfrParams->eClsfrType)
-    {
-        case DSCP_CLSFR:
-    
-            /* Check entry */
-            if ( (pNewEntry->Dscp.CodePoint > CLASSIFIER_CODE_POINT_MAX) || 
-                 (pNewEntry->DTag > CLASSIFIER_DTAG_MAX) ) 
-            {
-                TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "Classifier_InsertClsfrEntry(): bad parameter - Aborting\n");
-                return PARAM_VALUE_NOT_VALID;
-            }
-            
-            /* Check conflict*/
-            for (i = 0; i < pClsfrParams->uNumActiveEntries; i++)
-            {
-               /* Detect both duplicate and conflicting entries */
-                if (pClsfrParams->ClsfrTable[i].Dscp.CodePoint == pNewEntry->Dscp.CodePoint)
-                {
-                    TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "Classifier_InsertClsfrEntry(): classifier entries conflict - Aborting\n");
-                    return PARAM_VALUE_NOT_VALID;
-                }
-            } 
-
-            /* Insert new entry to classifier table. */
-            /* Note: Protect from txDataClsfr_ClassifyTxPacket context preemption. */
-            context_EnterCriticalSection (pTxDataQ->hContext);
-            pClsfrParams->ClsfrTable[pClsfrParams->uNumActiveEntries].Dscp.CodePoint = pNewEntry->Dscp.CodePoint;
-            pClsfrParams->ClsfrTable[pClsfrParams->uNumActiveEntries].DTag = pNewEntry->DTag;
-            context_LeaveCriticalSection (pTxDataQ->hContext);
-            
-        break;
-        
-        case PORT_CLSFR:
-
-            /* Check entry */
-            if ((pNewEntry->DTag > CLASSIFIER_DTAG_MAX) || 
-                (pNewEntry->Dscp.DstPortNum > CLASSIFIER_PORT_MAX-1) || 
-                (pNewEntry->Dscp.DstPortNum < CLASSIFIER_PORT_MIN) )
-            {
-                TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "Classifier_InsertClsfrEntry(): bad parameter - Aborting\n");
-                return PARAM_VALUE_NOT_VALID;
-            }
-            
-            /* Check conflict*/
-            for (i = 0; i < pClsfrParams->uNumActiveEntries; i++)
-            {
-               /* Detect both duplicate and conflicting entries */
-                if ((pClsfrParams->ClsfrTable[i].Dscp.DstPortNum == pNewEntry->Dscp.DstPortNum))
-                {
-                    TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "Classifier_InsertClsfrEntry(): classifier entries conflict - Aborting\n");
-                     return PARAM_VALUE_NOT_VALID;
-                }
-            }     
-
-            /* Insert new entry to classifier table. */            
-            /* Note: Protect from txDataClsfr_ClassifyTxPacket context preemption. */
-            context_EnterCriticalSection (pTxDataQ->hContext);
-            pClsfrParams->ClsfrTable[pClsfrParams->uNumActiveEntries].Dscp.DstPortNum = pNewEntry->Dscp.DstPortNum;
-            pClsfrParams->ClsfrTable[pClsfrParams->uNumActiveEntries].DTag = pNewEntry->DTag;
-            context_LeaveCriticalSection (pTxDataQ->hContext);
-                                
-        break;
-        
-        case IPPORT_CLSFR:
-
-            /* Check entry */
-            if ( (pNewEntry->DTag > CLASSIFIER_DTAG_MAX) || 
-                 (pNewEntry->Dscp.DstIPPort.DstPortNum > CLASSIFIER_PORT_MAX-1) || 
-                 (pNewEntry->Dscp.DstIPPort.DstPortNum < CLASSIFIER_PORT_MIN) || 
-                 (pNewEntry->Dscp.DstIPPort.DstIPAddress > CLASSIFIER_IPADDRESS_MAX-1) || 
-                 (pNewEntry->Dscp.DstIPPort.DstIPAddress < CLASSIFIER_IPADDRESS_MIN+1) )
-            {
-                TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "Classifier_InsertClsfrEntry(): bad parameter - Aborting\n");
-                return PARAM_VALUE_NOT_VALID;
-            }
-
-            /* Check conflict*/
-            for (i = 0; i < pClsfrParams->uNumActiveEntries; i++)
-            {
-               /* Detect both duplicate and conflicting entries */
-                if ( (pClsfrParams->ClsfrTable[i].Dscp.DstIPPort.DstIPAddress == pNewEntry->Dscp.DstIPPort.DstIPAddress) && 
-                     (pClsfrParams->ClsfrTable[i].Dscp.DstIPPort.DstPortNum == pNewEntry->Dscp.DstIPPort.DstPortNum))
-                {
-                    TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "Classifier_InsertClsfrEntry(): classifier entries conflict - Aborting\n");
-                     return PARAM_VALUE_NOT_VALID;
-                }
-            }  
-
-            /* Insert new entry to classifier table */            
-            /* Note: Protect from txDataClsfr_ClassifyTxPacket context preemption. */
-            context_EnterCriticalSection (pTxDataQ->hContext);
-            pClsfrParams->ClsfrTable[pClsfrParams->uNumActiveEntries].Dscp.DstIPPort.DstIPAddress = pNewEntry->Dscp.DstIPPort.DstIPAddress;
-            pClsfrParams->ClsfrTable[pClsfrParams->uNumActiveEntries].Dscp.DstIPPort.DstPortNum = pNewEntry->Dscp.DstIPPort.DstPortNum;
-            pClsfrParams->ClsfrTable[pClsfrParams->uNumActiveEntries].DTag = pNewEntry->DTag;
-            context_LeaveCriticalSection (pTxDataQ->hContext);
-
-        break;
-
-        default:
-TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "Classifier_InsertClsfrEntry(): Classifier type -- unknown - Aborting\n");
-            
-    } 
-    
-    /* Increment the number of classifier active entries */
-    pClsfrParams->uNumActiveEntries++;
-
-    return TI_OK;
-}
-
-
-/** 
- * \fn     txDataClsfr_RemoveClsfrEntry 
- * \brief  Remove an entry from classifier table
- * 
- * Remove an entry from classifier table.
- *
- * \note   
- * \param  hTxDataQ - The object handle                                         
- * \param  pRemEntry    - Pointer to the entry to remove
- * \return TI_OK on success, PARAM_VALUE_NOT_VALID in case of input parameters problems.
- * \sa     txDataClsfr_InsertClsfrEntry
- */ 
-TI_STATUS txDataClsfr_RemoveClsfrEntry(TI_HANDLE hTxDataQ, TClsfrTableEntry *pRemEntry)
-{
-    TTxDataQ      *pTxDataQ     = (TTxDataQ *)hTxDataQ;
-    TClsfrParams  *pClsfrParams = &pTxDataQ->tClsfrParams;
-    TI_UINT32     i, j;
-
-	if(pRemEntry == NULL)
-    {
-        TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "classifier_RemoveClsfrEntry(): NULL ConfigBuffer pointer Error - Aborting\n");
-		return PARAM_VALUE_NOT_VALID;
-    }
-    
-    if (pClsfrParams->uNumActiveEntries == 0)
-    {
-        TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "classifier_RemoveClsfrEntry(): Classifier table is empty - Aborting\n");
-		return PARAM_VALUE_NOT_VALID;
-    }
-   
-    if (pClsfrParams->eClsfrType == D_TAG_CLSFR)
-    {
-        TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "classifier_RemoveClsfrEntry(): D-Tag classifier - Aborting\n");
-        return PARAM_VALUE_NOT_VALID;
-    }
-
-    /* Check conflicts with classifier table entries */
-    /* check all conflicts, if all entries are TI_OK --> insert to classifier table*/
- 
-    switch (pClsfrParams->eClsfrType)
-    {
-        case DSCP_CLSFR:
-
-           /* Find the classifier entry */
-           i = 0;
-            while ((i < pClsfrParams->uNumActiveEntries) &&
-                  ((pClsfrParams->ClsfrTable[i].Dscp.CodePoint != pRemEntry->Dscp.CodePoint) ||
-                  (pClsfrParams->ClsfrTable[i].DTag != pRemEntry->DTag)))
-            {   
-              i++;
-            }
-
-           /* If we have reached the number of active entries, it means we couldn't find the requested entry */
-            if (i == pClsfrParams->uNumActiveEntries)
-           {
-                TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "classifier_RemoveClsfrEntry(): Entry not found - Aborting\n");
-               return PARAM_VALUE_NOT_VALID;
-           }
-
-            /* Shift all entries above the removed one downward */
-            /* Note: Protect from txDataClsfr_ClassifyTxPacket context preemption. */
-            context_EnterCriticalSection (pTxDataQ->hContext);
-            for (j = i; j < pClsfrParams->uNumActiveEntries - 1; j++)
-                {
-                   /* Move entries */
-                pClsfrParams->ClsfrTable[j].Dscp.CodePoint = pClsfrParams->ClsfrTable[j+1].Dscp.CodePoint;
-                pClsfrParams->ClsfrTable[j].DTag = pClsfrParams->ClsfrTable[j+1].DTag;
-                } 
-            context_LeaveCriticalSection (pTxDataQ->hContext);
-          
-        break;
-        
-        case PORT_CLSFR:
-
-           /* Find the classifier entry */
-           i = 0;
-            while ((i < pClsfrParams->uNumActiveEntries) &&
-                  ((pClsfrParams->ClsfrTable[i].Dscp.DstPortNum != pRemEntry->Dscp.DstPortNum) ||
-                  (pClsfrParams->ClsfrTable[i].DTag != pRemEntry->DTag)))
-            {   
-              i++;
-            }
-
-           /* If we have reached the number of active entries, it means we couldn't find the requested entry */
-            if (i == pClsfrParams->uNumActiveEntries)
-           {
-                TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "classifier_RemoveClsfrEntry(): Entry not found - Aborting\n");
-               return PARAM_VALUE_NOT_VALID;
-           }
-
-            /* Shift all entries above the removed one downward */
-            /* Note: Protect from txDataClsfr_ClassifyTxPacket context preemption. */
-            context_EnterCriticalSection (pTxDataQ->hContext);
-			for (j = i; j < pClsfrParams->uNumActiveEntries - 1; j++)
-                {
-                pClsfrParams->ClsfrTable[j].Dscp.DstPortNum = pClsfrParams->ClsfrTable[j+1].Dscp.DstPortNum;
-                pClsfrParams->ClsfrTable[j].DTag = pClsfrParams->ClsfrTable[j+1].DTag;
-            } 
-            context_LeaveCriticalSection (pTxDataQ->hContext);
-                                
-        break;
-        
-        case IPPORT_CLSFR:
-
-            /* Find the classifier entry */
-            i = 0;
-            while ((i < pClsfrParams->uNumActiveEntries) &&
-                  ((pClsfrParams->ClsfrTable[i].Dscp.DstIPPort.DstIPAddress != pRemEntry->Dscp.DstIPPort.DstIPAddress) ||
-                  (pClsfrParams->ClsfrTable[i].Dscp.DstIPPort.DstPortNum != pRemEntry->Dscp.DstIPPort.DstPortNum) ||
-                  (pClsfrParams->ClsfrTable[i].DTag != pRemEntry->DTag)))
-            {   
-                i++;
-            }
-
-            /* If we have reached the number of active entries, it means we couldn't find the requested entry */
-            if (i == pClsfrParams->uNumActiveEntries)
-            {
-                TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "classifier_RemoveClsfrEntry(): Entry not found - Aborting\n");
-                return PARAM_VALUE_NOT_VALID;
-            }
-
-            /* Shift all entries above the removed one downward. */
-            /* Note: Protect from txDataClsfr_ClassifyTxPacket context preemption. */
-            context_EnterCriticalSection (pTxDataQ->hContext);
-			for (j = i; j < pClsfrParams->uNumActiveEntries - 1; j++)
-            {
-                pClsfrParams->ClsfrTable[j].Dscp.DstIPPort.DstIPAddress = pClsfrParams->ClsfrTable[j+1].Dscp.DstIPPort.DstIPAddress;
-                pClsfrParams->ClsfrTable[j].Dscp.DstIPPort.DstPortNum = pClsfrParams->ClsfrTable[j+1].Dscp.DstIPPort.DstPortNum;
-                pClsfrParams->ClsfrTable[j].DTag = pClsfrParams->ClsfrTable[j+1].DTag;
-            } 
-            context_LeaveCriticalSection (pTxDataQ->hContext);
-
-        break;
-
-        default:
-TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "classifier_RemoveClsfrEntry(): Classifier type -- unknown - Aborting\n");
-    } 
-    
-    /* Decrement the number of classifier active entries */
-    pClsfrParams->uNumActiveEntries--;
-
-    return TI_OK;
-}
-
-
-/** 
- * \fn     txDataClsfr_SetClsfrType & txDataClsfr_GetClsfrType 
- * \brief  Set / Get classifier type
- * 
- * Set / Get classifier type.
- * When setting type, the table is emptied!
- *
- * \note   
- * \param  hTxDataQ  - The object handle                                         
- * \param  eNewClsfrType - New type
- * \return TI_OK on success, PARAM_VALUE_NOT_VALID in case of input parameters problems.
- * \sa     
- */ 
-TI_STATUS txDataClsfr_SetClsfrType (TI_HANDLE hTxDataQ, EClsfrType eNewClsfrType)
-{
-    TTxDataQ *pTxDataQ = (TTxDataQ *)hTxDataQ;
-
-	if (eNewClsfrType > CLSFR_TYPE_MAX)
-	{
-TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "Classifier_setClsfrType(): classifier type exceed its MAX \n");
-		return PARAM_VALUE_NOT_VALID;
-    }
-	
-	if (pTxDataQ->tClsfrParams.eClsfrType == eNewClsfrType)
-	{
-TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_WARNING, "Classifier_setClsfrType(): equal classifier type --> will empty classifier table \n");
-    }
-	
-	/* Update type and empty table. */
-    /* Note: Protect from txDataClsfr_ClassifyTxPacket context preemption. */
-    context_EnterCriticalSection (pTxDataQ->hContext);
-    pTxDataQ->tClsfrParams.eClsfrType = eNewClsfrType;
-	pTxDataQ->tClsfrParams.uNumActiveEntries = 0;
-    context_LeaveCriticalSection (pTxDataQ->hContext);
-
-    return TI_OK;
-}
-
-TI_STATUS txDataClsfr_GetClsfrType (TI_HANDLE hTxDataQ, EClsfrType *pClsfrType)
-{
-    TTxDataQ *pTxDataQ = (TTxDataQ *)hTxDataQ;
-
-	*pClsfrType = pTxDataQ->tClsfrParams.eClsfrType;
-	return TI_OK;
-}
-
-
-
-#ifdef TI_DBG
-
-/** 
- * \fn     txDataClsfr_PrintClsfrTable 
- * \brief  Print classifier table
- * 
- * Print the classifier table for debug
- *
- * \note   
- * \param  hTxDataQ  - The object handle                                         
- * \return void
- * \sa     
- */ 
-void txDataClsfr_PrintClsfrTable (TI_HANDLE hTxDataQ)
-{
-    TTxDataQ      *pTxDataQ     = (TTxDataQ *)hTxDataQ;
-    TClsfrParams  *pClsfrParams = &pTxDataQ->tClsfrParams;
-	TI_UINT32      uIpAddr, i;
-
-	if (pClsfrParams->eClsfrType == D_TAG_CLSFR)
-	{
-		WLAN_OS_REPORT (("D_TAG classifier type selected...Nothing to print...\n"));
-		return;
-	}
-
-	WLAN_OS_REPORT (("Number of active entries in classifier table : %d\n",pClsfrParams->uNumActiveEntries));
-
-	switch (pClsfrParams->eClsfrType)
-	{
-		case DSCP_CLSFR:
-			WLAN_OS_REPORT (("+------+-------+\n"));
-			WLAN_OS_REPORT (("| Code | D-Tag |\n"));
-			WLAN_OS_REPORT (("+------+-------+\n"));
-
-			for (i = 0; i < pClsfrParams->uNumActiveEntries; i++)  
-            {
-				WLAN_OS_REPORT (("| %5d | %5d |\n",
-                    pClsfrParams->ClsfrTable[i].Dscp.CodePoint,pClsfrParams->ClsfrTable[i].DTag));
-			}
-
-			WLAN_OS_REPORT (("+-------+-------+\n"));
-			break;
-
-		case PORT_CLSFR:
-			WLAN_OS_REPORT (("+-------+-------+\n"));
-			WLAN_OS_REPORT (("| Port  | D-Tag |\n"));
-			WLAN_OS_REPORT (("+-------+-------+\n"));
-
-			for (i = 0; i < pClsfrParams->uNumActiveEntries; i++)  
-            {
-				WLAN_OS_REPORT (("| %5d | %5d |\n",
-                    pClsfrParams->ClsfrTable[i].Dscp.DstPortNum,pClsfrParams->ClsfrTable[i].DTag));
-			}
-
-			WLAN_OS_REPORT (("+-------+-------+\n"));
-			break;
-
-		case IPPORT_CLSFR:
-
-			WLAN_OS_REPORT (("+-------------+-------+-------+\n"));
-			WLAN_OS_REPORT (("| IP Address  | Port  | D-Tag |\n"));
-			WLAN_OS_REPORT (("+-------------+-------+-------+\n"));
-
-			for (i = 0; i < pClsfrParams->uNumActiveEntries; i++)  
-            {
-				uIpAddr = pClsfrParams->ClsfrTable[i].Dscp.DstIPPort.DstIPAddress;
-				WLAN_OS_REPORT (("| %02x.%02x.%02x.%02x | %5d | %5d |\n",
-                    (uIpAddr & 0xFF),((uIpAddr >> 8) & (0xFF)),((uIpAddr >> 16) & (0xFF)),((uIpAddr >> 24) & (0xFF)),
-                    pClsfrParams->ClsfrTable[i].Dscp.DstIPPort.DstPortNum, pClsfrParams->ClsfrTable[i].DTag));
-			}
-
-			WLAN_OS_REPORT (("+-------------+-------+-------+\n"));
-			break;
-
-		default:
-TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "Classifier_InsertClsfrEntry(): Classifier type -- unknown - Aborting\n");
-			break;
-	}
-}
-
-#endif  /* TI_DBG */
-
-
-
diff --git a/wl1271/stad/src/Data_link/rx.c b/wl1271/stad/src/Data_link/rx.c
deleted file mode 100644
index c197963..0000000
--- a/wl1271/stad/src/Data_link/rx.c
+++ /dev/null
@@ -1,2083 +0,0 @@
-/*
- * rx.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/***************************************************************************/
-/*                                                                         */
-/*      MODULE: Rx.c                                                       */
-/*    PURPOSE:  Rx module functions                                        */
-/*                                                                         */
-/***************************************************************************/
-#define __FILE_ID__  FILE_ID_54
-#include "tidef.h"
-#include "paramOut.h"
-#include "rx.h"
-#include "osApi.h"
-#include "timer.h"
-#include "DataCtrl_Api.h"
-#include "Ctrl.h"
-#include "802_11Defs.h"
-#include "Ethernet.h"
-#include "report.h"
-#include "rate.h"
-#include "mlmeApi.h"
-#include "rsnApi.h"
-#include "smeApi.h"
-#include "siteMgrApi.h"
-#include "GeneralUtil.h"
-#include "EvHandler.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#endif
-#include "TWDriver.h"
-#include "RxBuf.h"
-#include "DrvMainModules.h"
-#include "bmtrace_api.h"
-#include "PowerMgr_API.h"
-
-
-#define EAPOL_PACKET                    0x888E
-#define IAPP_PACKET                     0x0000
-#define PREAUTH_EAPOL_PACKET            0x88C7
-
-
-#define RX_DATA_FILTER_FLAG_NO_BIT_MASK         0
-#define RX_DATA_FILTER_FLAG_USE_BIT_MASK        1
-#define RX_DATA_FILTER_FLAG_IP_HEADER           0
-#define RX_DATA_FILTER_FLAG_ETHERNET_HEADER     2
-#define RX_DATA_FILTER_ETHERNET_HEADER_BOUNDARY 14
-
-#define PADDING_ETH_PACKET_SIZE                 2
-
-/* CallBack for recieving packet from rxXfer */
-static void rxData_ReceivePacket (TI_HANDLE   hRxData,  void  *pBuffer);
-
-static ERxBufferStatus rxData_RequestForBuffer (TI_HANDLE   hRxData, void **pBuf, TI_UINT16 aLength, TI_UINT32 uEncryptionFlag,PacketClassTag_e ePacketClassTag);
-
-#if 0
-static TI_STATUS rxData_checkBssIdAndBssType(TI_HANDLE hRxData, 
-											 dot11_header_t* dot11_header,
-											 TMacAddr **rxBssid, 
-											 ScanBssType_e  *currBssType,
-											 TMacAddr  *currBssId);
-#endif
-static TI_STATUS rxData_convertWlanToEthHeader (TI_HANDLE hRxData, void *pBuffer, TI_UINT16 * etherType);
-static TI_STATUS rxData_ConvertAmsduToEthPackets (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr);
-static void rxData_dataPacketDisptcher (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr);
-static void rxData_discardPacket (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr);
-static void rxData_discardPacketVlan (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr);
-static void rxData_rcvPacketInOpenNotify (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr);
-static void rxData_rcvPacketEapol (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr);
-static void rxData_rcvPacketData (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr);
-
-static TI_STATUS rxData_enableDisableRxDataFilters(TI_HANDLE hRxData, TI_BOOL enabled);
-static TI_STATUS rxData_addRxDataFilter(TI_HANDLE hRxData, TRxDataFilterRequest* request);
-static TI_STATUS rxData_removeRxDataFilter(TI_HANDLE hRxData, TRxDataFilterRequest* request);
-
-
-#ifdef XCC_MODULE_INCLUDED
-static void rxData_rcvPacketIapp(TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr);
-#endif
-#ifdef TI_DBG
-static void rxData_printRxThroughput(TI_HANDLE hRxData, TI_BOOL bTwdInitOccured);
-#endif
-
-static void rxData_StartReAuthActiveTimer(TI_HANDLE hRxData);
-static void reAuthTimeout(TI_HANDLE hRxData, TI_BOOL bTwdInitOccured);
-static void rxData_ReauthEnablePriority(TI_HANDLE hRxData);
-
-
-/*************************************************************************
-*                        rxData_create                                   *
-**************************************************************************
-* DESCRIPTION:  This function initializes the Rx data module.                 
-*                                                      
-* INPUT:        hOs - handle to Os Abstraction Layer
-*
-* OUTPUT:      
-*
-* RETURN:       Handle to the allocated Rx data control block
-************************************************************************/
-TI_HANDLE rxData_create (TI_HANDLE hOs)
-{
-    rxData_t *pRxData;
-
-    /* check parameters validity */
-    if (hOs == NULL)
-    {
-        WLAN_OS_REPORT(("FATAL ERROR: rxData_create(): OS handle Error - Aborting\n"));
-        return NULL;
-    }
-    
-
-    /* alocate Rx module control block */
-    pRxData = os_memoryAlloc(hOs, (sizeof(rxData_t)));
-
-    if (!pRxData)
-    {
-        WLAN_OS_REPORT(("FATAL ERROR: rxData_create(): Error Creating Rx Module - Aborting\n"));
-        return NULL;
-    }
-
-    /* reset Rx control block */
-    os_memoryZero (hOs, pRxData, (sizeof(rxData_t)));
-
-    pRxData->RxEventDistributor = DistributorMgr_Create (hOs, MAX_RX_NOTIF_REQ_ELMENTS);
-
-    pRxData->hOs = hOs;
-
-    return (TI_HANDLE)pRxData;
-}
-
-/***************************************************************************
-*                           rxData_config                                  *
-****************************************************************************
-* DESCRIPTION:  This function configures the Rx Data module     
-* 
-* INPUTS:       pStadHandles  - The driver modules handles
-*
-* OUTPUT:       
-* 
-* RETURNS:      void
-***************************************************************************/
-void rxData_init (TStadHandlesList *pStadHandles)
-{
-    rxData_t *pRxData = (rxData_t *)(pStadHandles->hRxData);
-
-    pRxData->hCtrlData  = pStadHandles->hCtrlData; 
-    pRxData->hTWD       = pStadHandles->hTWD;
-    pRxData->hMlme      = pStadHandles->hMlmeSm; 
-    pRxData->hRsn       = pStadHandles->hRsn;
-    pRxData->hSiteMgr   = pStadHandles->hSiteMgr;
-    pRxData->hOs        = pStadHandles->hOs;
-    pRxData->hReport    = pStadHandles->hReport;
-    pRxData->hXCCMgr    = pStadHandles->hXCCMngr;
-    pRxData->hEvHandler = pStadHandles->hEvHandler;
-    pRxData->hTimer     = pStadHandles->hTimer;
-    pRxData->hPowerMgr  = pStadHandles->hPowerMgr;
-
-    pRxData->rxDataExcludeUnencrypted = DEF_EXCLUDE_UNENCYPTED; 
-    pRxData->rxDataExludeBroadcastUnencrypted = DEF_EXCLUDE_UNENCYPTED;
-    pRxData->rxDataEapolDestination = DEF_EAPOL_DESTINATION;
-    pRxData->rxDataPortStatus = DEF_RX_PORT_STATUS;
-	pRxData->genericEthertype = EAPOL_PACKET;
-
-    /*
-     * configure rx data dispatcher 
-     */
-
-    /* port status close */
-    pRxData->rxData_dispatchBuffer[CLOSE][DATA_DATA_PACKET]  = &rxData_discardPacket;       /* data  */
-    pRxData->rxData_dispatchBuffer[CLOSE][DATA_EAPOL_PACKET] = &rxData_discardPacket;       /* eapol */
-    pRxData->rxData_dispatchBuffer[CLOSE][DATA_IAPP_PACKET]  = &rxData_discardPacket;       /* Iapp  */
-    pRxData->rxData_dispatchBuffer[CLOSE][DATA_VLAN_PACKET]  = &rxData_discardPacketVlan;   /* VLAN  */
-
-    /* port status open notify */
-    pRxData->rxData_dispatchBuffer[OPEN_NOTIFY][DATA_DATA_PACKET]  = &rxData_rcvPacketInOpenNotify; /* data  */ 
-    pRxData->rxData_dispatchBuffer[OPEN_NOTIFY][DATA_EAPOL_PACKET] = &rxData_rcvPacketInOpenNotify; /* eapol */ 
-    pRxData->rxData_dispatchBuffer[OPEN_NOTIFY][DATA_IAPP_PACKET]  = &rxData_rcvPacketInOpenNotify; /* Iapp  */ 
-    pRxData->rxData_dispatchBuffer[OPEN_NOTIFY][DATA_VLAN_PACKET]  = &rxData_discardPacketVlan;     /* VLAN  */
-
-    /* port status open eapol */
-    pRxData->rxData_dispatchBuffer[OPEN_EAPOL][DATA_DATA_PACKET]  = &rxData_discardPacket;      /* data  */ 
-    pRxData->rxData_dispatchBuffer[OPEN_EAPOL][DATA_EAPOL_PACKET] = &rxData_rcvPacketEapol;     /* eapol */ 
-    pRxData->rxData_dispatchBuffer[OPEN_EAPOL][DATA_IAPP_PACKET]  = &rxData_discardPacket;      /* Iapp  */ 
-    pRxData->rxData_dispatchBuffer[OPEN_EAPOL][DATA_VLAN_PACKET]  = &rxData_discardPacketVlan;  /* VLAN  */
-
-    /* port status open */
-    pRxData->rxData_dispatchBuffer[OPEN][DATA_DATA_PACKET]  = &rxData_rcvPacketData;    /* data  */ 
-    pRxData->rxData_dispatchBuffer[OPEN][DATA_EAPOL_PACKET] = &rxData_rcvPacketEapol;   /* eapol */ 
-#ifdef XCC_MODULE_INCLUDED
-    pRxData->rxData_dispatchBuffer[OPEN][DATA_IAPP_PACKET]  = &rxData_rcvPacketIapp;    /* Iapp  */ 
-#else
-    pRxData->rxData_dispatchBuffer[OPEN][DATA_IAPP_PACKET]  = &rxData_rcvPacketData;    /* Iapp  */ 
-#endif
-    pRxData->rxData_dispatchBuffer[OPEN][DATA_VLAN_PACKET]  = &rxData_discardPacketVlan;/* VLAN  */
-
-    /* register CB's for request buffer and receive CB to the lower layers */
-    TWD_RegisterCb (pRxData->hTWD,
-                    TWD_EVENT_RX_RECEIVE_PACKET,
-                    (void *)rxData_ReceivePacket, 
-                    pStadHandles->hRxData);
-
-    TWD_RegisterCb (pRxData->hTWD,
-                    TWD_EVENT_RX_REQUEST_FOR_BUFFER,
-                    (void*)rxData_RequestForBuffer, 
-                    pStadHandles->hRxData);
-}
-
-
-TI_STATUS rxData_SetDefaults (TI_HANDLE hRxData, rxDataInitParams_t * rxDataInitParams)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-    int i;
-
-    /* init rx data filters */
-    pRxData->filteringEnabled = rxDataInitParams->rxDataFiltersEnabled;
-    pRxData->filteringDefaultAction = rxDataInitParams->rxDataFiltersDefaultAction;
-    TWD_CfgEnableRxDataFilter (pRxData->hTWD, pRxData->filteringEnabled, pRxData->filteringDefaultAction);
-
-    for (i = 0; i < MAX_DATA_FILTERS; ++i)
-    {
-        if (rxDataInitParams->rxDataFilterRequests[i].maskLength > 0)
-        {
-            if (rxData_addRxDataFilter(hRxData, &rxDataInitParams->rxDataFilterRequests[i]) != TI_OK)
-            {
-                TRACE1(pRxData->hReport, REPORT_SEVERITY_ERROR, ": Invalid Rx Data Filter configured at init stage (at index %d)!\n", i);
-            }
-        }
-    }
-
-	pRxData->reAuthActiveTimer = tmr_CreateTimer (pRxData->hTimer);
-	if (pRxData->reAuthActiveTimer == NULL)
-	{
-        WLAN_OS_REPORT(("rxData_SetDefaults(): Failed to create reAuthActiveTimer!\n"));
-		return TI_NOK;
-	}
-
-    pRxData->reAuthActiveTimeout = rxDataInitParams->reAuthActiveTimeout;
-
-	rxData_SetReAuthInProgress(pRxData, TI_FALSE);
-
-#ifdef TI_DBG
-    /* reset counters */
-    rxData_resetCounters(pRxData);
-    rxData_resetDbgCounters(pRxData);
-
-    /* allocate timer for debug throughput */
-    pRxData->hThroughputTimer = tmr_CreateTimer (pRxData->hTimer);
-    if (pRxData->hThroughputTimer == NULL)
-    {
-        TRACE0(pRxData->hReport, REPORT_SEVERITY_ERROR, "rxData_SetDefaults(): Failed to create hThroughputTimer!\n");
-        return TI_NOK;
-    }
-    pRxData->rxThroughputTimerEnable = TI_FALSE;
-#endif
-
-
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_INIT, ".....Rx Data configured successfully\n");
-
-    return TI_OK;
-}
-
-/***************************************************************************
-*                           rxData_unLoad                                  *
-****************************************************************************
-* DESCRIPTION:  This function unload the Rx data module. 
-* 
-* INPUTS:       hRxData - the object
-*       
-* OUTPUT:       
-* 
-* RETURNS:      TI_OK - Unload succesfull
-*               TI_NOK - Unload unsuccesfull
-***************************************************************************/
-TI_STATUS rxData_unLoad(TI_HANDLE hRxData)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    /* check parameters validity */
-    if (pRxData == NULL)
-    {
-        return TI_NOK;
-    }
-
-    DistributorMgr_Destroy(pRxData->RxEventDistributor);
-
-#ifdef TI_DBG
-    /* destroy periodic rx throughput timer */
-	if (pRxData->hThroughputTimer)
-	{
-		tmr_DestroyTimer (pRxData->hThroughputTimer);
-	}
-  #endif
-
-	if (pRxData->reAuthActiveTimer)
-	{
-		tmr_DestroyTimer (pRxData->reAuthActiveTimer);
-	}
-
-    /* free Rx Data controll block */
-    os_memoryFree(pRxData->hOs, pRxData, sizeof(rxData_t));
-
-    return TI_OK;
-}
-
-
-/***************************************************************************
-*                           rxData_stop                                    *
-****************************************************************************
-* DESCRIPTION:  this function stop the rx data. 
-* 
-* INPUTS:       hRxData - the object
-*       
-* OUTPUT:       
-* 
-* RETURNS:      TI_OK - stop succesfull
-*               TI_NOK - stop unsuccesfull
-***************************************************************************/
-TI_STATUS rxData_stop (TI_HANDLE hRxData)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    /* check parameters validity */
-    if (pRxData == NULL)
-    {
-        return TI_NOK;
-    }
-
-    pRxData->rxDataExcludeUnencrypted = DEF_EXCLUDE_UNENCYPTED; 
-    pRxData->rxDataExludeBroadcastUnencrypted = DEF_EXCLUDE_UNENCYPTED;
-    pRxData->rxDataEapolDestination = DEF_EAPOL_DESTINATION;
-    pRxData->rxDataPortStatus = DEF_RX_PORT_STATUS;
-
-  #ifdef TI_DBG
-    /* reset counters */
-    /*rxData_resetCounters(pRxData);*/
-    /*rxData_resetDbgCounters(pRxData);*/
-
-    /* stop throughput timer */
-    if (pRxData->rxThroughputTimerEnable)
-    {
-        tmr_StopTimer (pRxData->hThroughputTimer);
-        pRxData->rxThroughputTimerEnable = TI_FALSE;
-    }
-  #endif
-
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_stop() :  Succeeded.\n");
-
-    return TI_OK;
-
-}
-
-/***************************************************************************
-*                           rxData_getParam                                *
-****************************************************************************
-* DESCRIPTION:  get a specific parameter
-* 
-* INPUTS:       hRxData - the object
-*               
-* OUTPUT:       pParamInfo - structure which include the value of 
-*               the requested parameter
-* 
-* RETURNS:      TI_OK
-*               TI_NOK
-***************************************************************************/
-TI_STATUS rxData_getParam(TI_HANDLE hRxData, paramInfo_t *pParamInfo)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    /* check handle validity */
-    if (pRxData == NULL)
-    {
-        return TI_NOK;
-    }
-
-    switch (pParamInfo->paramType)
-    {
-        case RX_DATA_EXCLUDE_UNENCRYPTED_PARAM:
-            pParamInfo->content.rxDataExcludeUnencrypted = pRxData->rxDataExcludeUnencrypted;
-            break;
-
-        case RX_DATA_EAPOL_DESTINATION_PARAM:
-            pParamInfo->content.rxDataEapolDestination = pRxData->rxDataEapolDestination;
-            break;
-
-        case RX_DATA_PORT_STATUS_PARAM:
-            pParamInfo->content.rxDataPortStatus = pRxData->rxDataPortStatus;
-            break;
-
-        case RX_DATA_COUNTERS_PARAM:
-            pParamInfo->content.siteMgrTiWlanCounters.RecvOk = pRxData->rxDataCounters.RecvOk;              
-            pParamInfo->content.siteMgrTiWlanCounters.DirectedBytesRecv = pRxData->rxDataCounters.DirectedBytesRecv;        
-            pParamInfo->content.siteMgrTiWlanCounters.DirectedFramesRecv = pRxData->rxDataCounters.DirectedFramesRecv;      
-            pParamInfo->content.siteMgrTiWlanCounters.MulticastBytesRecv = pRxData->rxDataCounters.MulticastBytesRecv;      
-            pParamInfo->content.siteMgrTiWlanCounters.MulticastFramesRecv = pRxData->rxDataCounters.MulticastFramesRecv;    
-            pParamInfo->content.siteMgrTiWlanCounters.BroadcastBytesRecv = pRxData->rxDataCounters.BroadcastBytesRecv;      
-            pParamInfo->content.siteMgrTiWlanCounters.BroadcastFramesRecv = pRxData->rxDataCounters.BroadcastFramesRecv;    
-            break;
-
-        case RX_DATA_GET_RX_DATA_FILTERS_STATISTICS:
-            TWD_ItrDataFilterStatistics (pRxData->hTWD, 
-                                         pParamInfo->content.interogateCmdCBParams.fCb,
-                                         pParamInfo->content.interogateCmdCBParams.hCb, 
-                                         pParamInfo->content.interogateCmdCBParams.pCb);
-            break;
-
-        case RX_DATA_RATE_PARAM:
-            pParamInfo->content.siteMgrCurrentRxRate = pRxData->uLastDataPktRate;
-            break;
-
-        default:
-            TRACE0(pRxData->hReport, REPORT_SEVERITY_ERROR, " rxData_getParam() : PARAMETER NOT SUPPORTED \n");
-            return (PARAM_NOT_SUPPORTED);
-    }
-
-    return TI_OK;
-}
-
-/***************************************************************************
-*                           rxData_setParam                                *
-****************************************************************************
-* DESCRIPTION:  set a specific parameter
-* 
-* INPUTS:       hRxData - the object
-*               pParamInfo - structure which include the value to set for 
-*               the requested parameter
-*       
-* OUTPUT:       
-* 
-* RETURNS:      TI_OK
-*               TI_NOK
-***************************************************************************/
-TI_STATUS rxData_setParam(TI_HANDLE hRxData, paramInfo_t *pParamInfo)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    /* check handle validity */
-    if( pRxData == NULL  )
-    {
-        return TI_NOK;
-    }
-
-    switch (pParamInfo->paramType)
-    {
-        case RX_DATA_EXCLUDE_UNENCRYPTED_PARAM:
-            pRxData->rxDataExcludeUnencrypted = pParamInfo->content.rxDataExcludeUnencrypted;
-            break;
-        case RX_DATA_EXCLUDE_BROADCAST_UNENCRYPTED_PARAM:
-            pRxData->rxDataExludeBroadcastUnencrypted = pParamInfo->content.rxDataExcludeUnencrypted;
-            break;
-        case RX_DATA_EAPOL_DESTINATION_PARAM:
-            pRxData->rxDataEapolDestination = pParamInfo->content.rxDataEapolDestination;
-            break;
-
-        case RX_DATA_PORT_STATUS_PARAM:
-            pRxData->rxDataPortStatus = pParamInfo->content.rxDataPortStatus;
-            break;
-
-        case RX_DATA_ENABLE_DISABLE_RX_DATA_FILTERS:
-            return rxData_enableDisableRxDataFilters(hRxData, pParamInfo->content.rxDataFilterEnableDisable);
-
-        case RX_DATA_ADD_RX_DATA_FILTER:
-        {
-            TRxDataFilterRequest* pRequest = &pParamInfo->content.rxDataFilterRequest;            
-
-            return rxData_addRxDataFilter(hRxData, pRequest);
-        }
-
-        case RX_DATA_REMOVE_RX_DATA_FILTER:
-        {
-            TRxDataFilterRequest* pRequest = &pParamInfo->content.rxDataFilterRequest;
-            
-            return rxData_removeRxDataFilter(hRxData, pRequest);
-        }
-
-        case RX_DATA_GENERIC_ETHERTYPE_PARAM:
-            pRxData->genericEthertype = pParamInfo->content.rxGenericEthertype;
-            break;
-
-        default:
-            TRACE0(pRxData->hReport, REPORT_SEVERITY_ERROR, " rxData_setParam() : PARAMETER NOT SUPPORTED \n");
-            return (PARAM_NOT_SUPPORTED);
-    }
-
-    return TI_OK;
-}
-
-/***************************************************************************
-*                     rxData_enableDisableRxDataFilters                    *
-****************************************************************************
-* DESCRIPTION:  
-*               
-* 
-* INPUTS:       
-*               
-*               
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-*               
-***************************************************************************/
-static TI_STATUS rxData_enableDisableRxDataFilters(TI_HANDLE hRxData, TI_BOOL enabled)
-{
-    rxData_t * pRxData = (rxData_t *) hRxData;
-
-    /* assert 0 or 1 */
-    if (enabled != TI_FALSE)
-        enabled = 1;
-
-    if (enabled == pRxData->filteringEnabled)
-        return TI_OK;
-
-    pRxData->filteringEnabled = enabled;
-
-    return TWD_CfgEnableRxDataFilter (pRxData->hTWD, pRxData->filteringEnabled, pRxData->filteringDefaultAction);
-}
-
-/***************************************************************************
-*                          findFilterRequest                               *
-****************************************************************************
-* DESCRIPTION:  
-*               
-* 
-* INPUTS:       
-*               
-*               
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-*               
-***************************************************************************/
-static int findFilterRequest(TI_HANDLE hRxData, TRxDataFilterRequest* request)
-{
-    rxData_t * pRxData = (rxData_t *) hRxData;
-    int i;
-    
-    for (i = 0; i < MAX_DATA_FILTERS; ++i)
-    {
-        if (pRxData->isFilterSet[i])
-        {
-            if ((pRxData->filterRequests[i].offset == request->offset) &&
-                (pRxData->filterRequests[i].maskLength == request->maskLength) &&
-                (pRxData->filterRequests[i].patternLength == request->patternLength))
-            {
-                if ((os_memoryCompare(pRxData->hOs, pRxData->filterRequests[i].mask, request->mask, request->maskLength) == 0) &&
-                    (os_memoryCompare(pRxData->hOs, pRxData->filterRequests[i].pattern, request->pattern, request->patternLength) == 0))
-                    return i;
-            }
-        }
-    }
-
-    return -1;
-}
-
-/***************************************************************************
-*                            closeFieldPattern                             *
-****************************************************************************
-* DESCRIPTION:  
-*               
-* 
-* INPUTS:       
-*               
-*               
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-*               
-***************************************************************************/
-static void closeFieldPattern (rxData_t * pRxData, rxDataFilterFieldPattern_t * fieldPattern, TI_UINT8 * fieldPatterns, TI_UINT8 * lenFieldPatterns)
-{
-    //fieldPatterns[*lenFieldPatterns] = fieldPattern->offset;
-	os_memoryCopy(pRxData->hOs, fieldPatterns + *lenFieldPatterns, (TI_UINT8 *)&fieldPattern->offset, sizeof(fieldPattern->offset));
-    *lenFieldPatterns += sizeof(fieldPattern->offset);
-
-    fieldPatterns[*lenFieldPatterns] = fieldPattern->length;
-    *lenFieldPatterns += sizeof(fieldPattern->length);
-
-    fieldPatterns[*lenFieldPatterns] = fieldPattern->flag;
-    *lenFieldPatterns += sizeof(fieldPattern->flag);
-
-    os_memoryCopy(pRxData->hOs, fieldPatterns + *lenFieldPatterns, fieldPattern->pattern, fieldPattern->length);
-    *lenFieldPatterns += fieldPattern->length;
-
-    /* if the pattern bit mask is enabled add it to the end of the request */
-    if ((fieldPattern->flag & RX_DATA_FILTER_FLAG_USE_BIT_MASK) == RX_DATA_FILTER_FLAG_USE_BIT_MASK)
-    {
-        os_memoryCopy(pRxData->hOs, fieldPatterns + *lenFieldPatterns, fieldPattern->mask, fieldPattern->length);
-        *lenFieldPatterns += fieldPattern->length;
-    }
-
-    TRACE3(pRxData->hReport, REPORT_SEVERITY_INFORMATION, ": Closed field pattern, length = %d, total length = %d, pattern bit mask = %d.\n", fieldPattern->length, *lenFieldPatterns, ((fieldPattern->flag & RX_DATA_FILTER_FLAG_USE_BIT_MASK) == RX_DATA_FILTER_FLAG_USE_BIT_MASK));
-}
-
-
-/***************************************************************************
-*                         parseRxDataFilterRequest                         *
-****************************************************************************
-* DESCRIPTION:  
-*               
-* 
-* INPUTS:       
-*               
-*               
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-*               
-***************************************************************************/
-static int parseRxDataFilterRequest(TI_HANDLE hRxData, TRxDataFilterRequest* request, TI_UINT8 * numFieldPatterns, TI_UINT8 * lenFieldPatterns, TI_UINT8 * fieldPatterns)
-{
-    rxData_t * pRxData = (rxData_t *) hRxData;
-
-    int maskIter;
-    int patternIter = 0;
-
-    /* used to store field patterns while they are built */
-    TI_BOOL isBuildingFieldPattern = TI_FALSE;
-    rxDataFilterFieldPattern_t fieldPattern;
-
-    for (maskIter = 0; maskIter < request->maskLength * 8; ++maskIter)
-    {
-        /* which byte in the mask and which bit in the byte we're at */
-        int bit = maskIter % 8;
-        int byte = maskIter / 8;
-
-        /* is the bit in the mask set */
-        TI_BOOL isSet = ((request->mask[byte] & (1 << bit)) == (1 << bit));
-
-        TRACE4(pRxData->hReport, REPORT_SEVERITY_INFORMATION, ": MaskIter = %d, Byte = %d, Bit = %d, isSet = %d\n", maskIter, byte, bit, isSet);
-
-        /* if we're in the midst of building a field pattern, we need to close in case */
-        /* the current bit is not set or we've reached the ethernet header boundary */
-        if (isBuildingFieldPattern)
-        {
-            if ((isSet == TI_FALSE) || (request->offset + maskIter == RX_DATA_FILTER_ETHERNET_HEADER_BOUNDARY))
-            {
-                closeFieldPattern(hRxData, &fieldPattern, fieldPatterns, lenFieldPatterns);
-
-                isBuildingFieldPattern = TI_FALSE;
-            }
-        }
-
-        /* nothing to do in case the bit is not set */
-        if (isSet)
-        {
-            /* if not already building a field pattern, create a new one */
-            if (isBuildingFieldPattern == TI_FALSE)
-            {
-                TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, ": Creating a new field pattern.\n");
-
-                isBuildingFieldPattern = TI_TRUE;
-                ++(*numFieldPatterns);
-
-                if (*numFieldPatterns > RX_DATA_FILTER_MAX_FIELD_PATTERNS)
-                {
-                    TRACE1(pRxData->hReport, REPORT_SEVERITY_ERROR, ": Invalid filter, too many field patterns, maximum of %u is allowed!\n", RX_DATA_FILTER_MAX_FIELD_PATTERNS);
-
-                    return TI_NOK;
-                }
-
-                fieldPattern.offset = request->offset + maskIter;
-                fieldPattern.length = 0;
-
-                /* we don't support the mask per bit feature yet. */
-                fieldPattern.flag = RX_DATA_FILTER_FLAG_NO_BIT_MASK;
-
-                /* first 14 bits are used for the Ethernet header, rest for the IP header */
-                if (fieldPattern.offset < RX_DATA_FILTER_ETHERNET_HEADER_BOUNDARY)
-                {
-                    fieldPattern.flag |= RX_DATA_FILTER_FLAG_ETHERNET_HEADER;
-                }
-                else
-                {
-                    fieldPattern.flag |= RX_DATA_FILTER_FLAG_IP_HEADER;
-                    fieldPattern.offset -= RX_DATA_FILTER_ETHERNET_HEADER_BOUNDARY;
-                }
-
-                TRACE2(pRxData->hReport, REPORT_SEVERITY_INFORMATION, ": offset = %d, flag = %d.\n", fieldPattern.offset, fieldPattern.flag);
-            }
-
-            /* check that the pattern is long enough */
-            if (patternIter > request->patternLength)
-            {
-                TRACE0(pRxData->hReport, REPORT_SEVERITY_ERROR, ": Invalid filter, mask and pattern length are not consistent!\n");
-
-                return TI_NOK;
-            }
-
-            /* add the current pattern byte to the field pattern */
-            fieldPattern.pattern[fieldPattern.length++] = request->pattern[patternIter++];
-
-            /* check pattern matching boundary */
-            if (fieldPattern.offset + fieldPattern.length >= RX_DATA_FILTER_FILTER_BOUNDARY)
-            {
-                TRACE1(pRxData->hReport, REPORT_SEVERITY_ERROR, ": Invalid filter, pattern matching cannot exceed first %u characters.\n", RX_DATA_FILTER_FILTER_BOUNDARY);
-
-                return TI_NOK;
-            }
-        }
-    }
-
-    /* check that the pattern is long enough */
-    if (patternIter != request->patternLength)
-    {
-        TRACE0(pRxData->hReport, REPORT_SEVERITY_ERROR, ": Invalid filter, mask and pattern lengths are not consistent!\n");
-
-        return TI_NOK;
-    }
-
-    /* close the last field pattern if needed */
-    if (isBuildingFieldPattern)
-    {
-        closeFieldPattern (hRxData, &fieldPattern, fieldPatterns, lenFieldPatterns);
-    }
-
-    return TI_OK;
-}
-
-
-/***************************************************************************
-*                           rxData_setRxDataFilter                         *
-****************************************************************************
-* DESCRIPTION:  
-*               
-* 
-* INPUTS:       
-*               
-*               
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-*               
-***************************************************************************/
-static TI_STATUS rxData_addRxDataFilter (TI_HANDLE hRxData, TRxDataFilterRequest* request)
-{
-    rxData_t * pRxData = (rxData_t *) hRxData;
-
-    /* firmware request fields */
-    TI_UINT8 index = 0;
-    TI_UINT8 numFieldPatterns = 0;
-    TI_UINT8 lenFieldPatterns = 0;
-    TI_UINT8 fieldPatterns[MAX_DATA_FILTER_SIZE];
-
-    /* does the filter already exist? */
-    if (findFilterRequest(hRxData, request) >= 0)
-    {
-        TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, ": Filter already exists.\n");
-
-        return RX_FILTER_ALREADY_EXISTS;
-    }
-
-    /* find place for insertion */
-    for (index = 0; index < MAX_DATA_FILTERS; ++index)
-    {
-        if (pRxData->isFilterSet[index] == TI_FALSE)
-            break;
-    }
-
-    /* are all filter slots taken? */
-    if (index == MAX_DATA_FILTERS)
-    {
-        TRACE0(pRxData->hReport, REPORT_SEVERITY_ERROR, ": No place to insert filter!\n");
-
-        return RX_NO_AVAILABLE_FILTERS;
-    }
-
-    TRACE1(pRxData->hReport, REPORT_SEVERITY_INFORMATION, ": Inserting filter at index %d.\n", index);
-
-    /* parse the filter request into discrete field patterns */
-    if (parseRxDataFilterRequest(hRxData, request, &numFieldPatterns, &lenFieldPatterns, fieldPatterns) != TI_OK)
-        return TI_NOK;
-
-    if (numFieldPatterns == 0)
-        return TI_NOK;
-
-    /* Store configuration for future manipulation */
-    pRxData->isFilterSet[index] = TI_TRUE;
-    os_memoryCopy(pRxData->hOs, &pRxData->filterRequests[index], request, sizeof(pRxData->filterRequests[index]));
-
-    /* Send configuration to firmware */
-    return TWD_CfgRxDataFilter (pRxData->hTWD, 
-                                index, 
-                                ADD_FILTER, 
-                                FILTER_SIGNAL, 
-                                numFieldPatterns, 
-                                lenFieldPatterns, 
-                                fieldPatterns);
-
-}
-
-/***************************************************************************
-*                         rxData_removeRxDataFilter                        *
-****************************************************************************
-* DESCRIPTION:  
-*               
-* 
-* INPUTS:       
-*               
-*               
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-*               
-***************************************************************************/
-static TI_STATUS rxData_removeRxDataFilter (TI_HANDLE hRxData, TRxDataFilterRequest* request)
-{
-    rxData_t * pRxData = (rxData_t *) hRxData;
-
-    int index = findFilterRequest(hRxData, request);
-
-    /* does the filter exist? */
-    if (index < 0)
-    {
-        TRACE0(pRxData->hReport, REPORT_SEVERITY_WARNING, ": Remove data filter request received but the specified filter was not found!");
-
-        return RX_FILTER_DOES_NOT_EXIST;
-    }
-
-    TRACE1(pRxData->hReport, REPORT_SEVERITY_INFORMATION, ": Removing filter at index %d.", index);
-
-    pRxData->isFilterSet[index] = TI_FALSE;
-
-    return TWD_CfgRxDataFilter (pRxData->hTWD, 
-                                index, 
-                                REMOVE_FILTER, 
-                                FILTER_SIGNAL, 
-                                0, 
-                                0, 
-                                NULL);
-}
-
-/***************************************************************************
-*                       rxData_DistributorRxEvent                          *
-****************************************************************************
-* DESCRIPTION:  
-*               
-* 
-* INPUTS:       
-*               
-*               
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-*               
-***************************************************************************/
-static void rxData_DistributorRxEvent (rxData_t *pRxData, TI_UINT16 Mask, int DataLen)
-{
-    DistributorMgr_EventCall (pRxData->RxEventDistributor, Mask, DataLen);
-}
-
-/***************************************************************************
-*                       rxData_RegNotif                                    *
-****************************************************************************/
-TI_HANDLE rxData_RegNotif (TI_HANDLE hRxData, TI_UINT16 EventMask, GeneralEventCall_t CallBack, TI_HANDLE context, TI_UINT32 Cookie)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    if (!hRxData)
-        return NULL;
-
-    return DistributorMgr_Reg (pRxData->RxEventDistributor, EventMask, (TI_HANDLE)CallBack, context, Cookie);
-}
-
-/***************************************************************************
-*                       rxData_AddToNotifMask                              *
-****************************************************************************/
-TI_STATUS rxData_AddToNotifMask (TI_HANDLE hRxData, TI_HANDLE Notifh, TI_UINT16 EventMask)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    if (!hRxData)
-        return TI_NOK;
-
-    return DistributorMgr_AddToMask (pRxData->RxEventDistributor, Notifh, EventMask);
-}
-
-
-/***************************************************************************
-*                       rxData_UnRegNotif                                  *
-****************************************************************************/
-TI_STATUS rxData_UnRegNotif(TI_HANDLE hRxData,TI_HANDLE RegEventHandle)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-    
-    if (!hRxData)
-        return TI_NOK;
-
-    return DistributorMgr_UnReg (pRxData->RxEventDistributor, RegEventHandle);
-}
-
-
-/***************************************************************************
-*                       rxData_receivePacketFromWlan                       *
-****************************************************************************
-* DESCRIPTION:  this function is called by the GWSI for each received Buffer.
-*               It filter and distribute the received Buffer. 
-* 
-* INPUTS:       hRxData - the object
-*               pBuffer - the received Buffer.
-*               pRxAttr - Rx attributes
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-***************************************************************************/
-void rxData_receivePacketFromWlan (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr)
-{
-    rxData_t        *pRxData    = (rxData_t *)hRxData;
-    TMacAddr        address3;
-    dot11_header_t  *pDot11Hdr;
-
-    TRACE1(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_receivePacketFromWlan() : pRxAttr->packetType = %d\n", pRxAttr->ePacketType);
-
-    switch (pRxAttr->ePacketType)
-    {
-    case TAG_CLASS_MANAGEMENT:
-    case TAG_CLASS_BCN_PRBRSP:
-
-        TRACE1(pRxData->hReport, REPORT_SEVERITY_INFORMATION, "rxData_receivePacketFromWlan(): Received management Buffer len = %d\n", RX_BUF_LEN(pBuffer));
-
-        /* update siteMngr 
-         *
-         * the BSSID in mgmt frames is always addr3 in the header 
-         * must copy address3 since Buffer is freed in mlmeParser_recv
-         */  
-        pDot11Hdr = (dot11_header_t*)RX_BUF_DATA(pBuffer);
-        
-        os_memoryCopy(pRxData->hOs, &address3, &pDot11Hdr->address3, sizeof(address3));
-
-        /* distribute mgmt pBuffer to mlme */
-        if( mlmeParser_recv(pRxData->hMlme, pBuffer, pRxAttr) != TI_OK )
-        {
-            TRACE0(pRxData->hReport, REPORT_SEVERITY_ERROR, " rxData_receivePacketFromWlan() : MLME returned error \n");
-        }
-        break;
-
-    case TAG_CLASS_DATA:
-    case TAG_CLASS_QOS_DATA:
-    case TAG_CLASS_AMSDU:
-    case TAG_CLASS_EAPOL:
-        {
-            CL_TRACE_START_L3();
-            TRACE1(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_receivePacketFromWlan() : Received Data Buffer len = %d\n", RX_BUF_LEN(pBuffer));
-
-            /* send pBuffer to data dispatcher */
-            rxData_dataPacketDisptcher(hRxData, pBuffer, pRxAttr);
-            CL_TRACE_END_L3("tiwlan_drv.ko", "INHERIT", "RX", ".DataPacket");
-            break;
-        }
-
-    default:
-        TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_receivePacketFromWlan(): Received unspecified packet type !!! \n");
-        RxBufFree(pRxData->hOs, pBuffer); 
-        break;
-    }
-}
-
-/***************************************************************************
-*                       rxData_dataPacketDisptcher                         *
-****************************************************************************
-* DESCRIPTION:  this function is called upon receving data Buffer,
-*               it dispatches the packet to the approciate function according to 
-*               data packet type and rx port status. 
-* 
-* INPUTS:       hRxData - the object
-*               pBuffer - the received Buffer.
-*               pRxAttr - Rx attributes
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-***************************************************************************/
-
-static void rxData_dataPacketDisptcher (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-    portStatus_e DataPortStatus;
-    rxDataPacketType_e DataPacketType;
-
-    /* get rx port status */
-    DataPortStatus = pRxData->rxDataPortStatus;
-
-    /* discard data packets received while rx data port is closed */
-    if (DataPortStatus == CLOSE)
-    {
-        TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_dataPacketDisptcher() : Received Data Buffer while Rx data port is closed \n");
-
-        rxData_discardPacket (hRxData, pBuffer, pRxAttr);
-        return;
-    }
-
-    /* get data packet type */
-
-    pRxData->uLastDataPktRate = pRxAttr->Rate;  /* save Rx packet rate for statistics */
-
-#ifdef XCC_MODULE_INCLUDED
-    if (XCCMngr_isIappPacket (pRxData->hXCCMgr, pBuffer) == TI_TRUE)
-    {
-        TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_dataPacketDisptcher() : Received Iapp Buffer  \n");
-
-        DataPacketType = DATA_IAPP_PACKET;
-
-        /* dispatch Buffer according to packet type and current rx data port status */
-        pRxData->rxData_dispatchBuffer[DataPortStatus][DataPacketType] (hRxData, pBuffer, pRxAttr);
-    }
-    else
-#endif
-    {
-        /* A-MSDU ? */
-        if (TAG_CLASS_AMSDU == pRxAttr->ePacketType)
-        {
-           rxData_ConvertAmsduToEthPackets (hRxData, pBuffer, pRxAttr);
-        }
-        else
-        {
-           TI_UINT16 etherType = 0;
-           TEthernetHeader * pEthernetHeader;
-
-           /*
-            * if Host processes received packets, the header translation
-            * from WLAN to ETH is done here. The conversion has been moved
-            * here so that IAPP packets aren't converted.
-            */
-           rxData_convertWlanToEthHeader (hRxData, pBuffer, &etherType);
-
-           pEthernetHeader = (TEthernetHeader *)RX_ETH_PKT_DATA(pBuffer);
-
-           if (etherType == ETHERTYPE_802_1D)
-           {
-               TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_dataPacketDisptcher() : Received VLAN packet  \n");
-
-               DataPacketType = DATA_VLAN_PACKET;
-           }
-           else if ((HTOWLANS(pEthernetHeader->type) == EAPOL_PACKET) ||
-					(HTOWLANS(pEthernetHeader->type) == pRxData->genericEthertype))
-           {
-				TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_dataPacketDisptcher() : Received Eapol packet  \n");
-
-				if (rxData_IsReAuthInProgress(pRxData))
-				{
-					/* ReAuth already in progress, restart timer */
-					rxData_StopReAuthActiveTimer(pRxData);
-					rxData_StartReAuthActiveTimer(pRxData);
-				}
-				else
-				{
-					if (PowerMgr_getReAuthActivePriority(pRxData->hPowerMgr))
-					{
-						/* ReAuth not in progress yet, force active, set flag, restart timer, send event */
-						rxData_SetReAuthInProgress(pRxData, TI_TRUE);
-						rxData_StartReAuthActiveTimer(pRxData);
-						rxData_ReauthEnablePriority(pRxData);
-						EvHandlerSendEvent(pRxData->hEvHandler, IPC_EVENT_RE_AUTH_STARTED, NULL, 0);
-					}
-				}
-
-				DataPacketType = DATA_EAPOL_PACKET;
-           }
-           else
-           {
-               TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_dataPacketDisptcher() : Received Data packet  \n");
-
-               DataPacketType = DATA_DATA_PACKET;
-           }
-
-           /* dispatch Buffer according to packet type and current rx data port status */
-           pRxData->rxData_dispatchBuffer[DataPortStatus][DataPacketType] (hRxData, pBuffer, pRxAttr);
-        }
-    }
-
-}
-
-/***************************************************************************
-*                       rxData_discardPacket                                   *
-****************************************************************************
-* DESCRIPTION:  this function is called to discard Buffer
-* 
-* INPUTS:       hRxData - the object
-*               pBuffer - the received Buffer.
-*               pRxAttr - Rx attributes
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-***************************************************************************/
-static void rxData_discardPacket (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    TRACE2(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_discardPacket: rx port status = %d , Buffer status = %d  \n", pRxData->rxDataPortStatus, pRxAttr->status);
-
-    pRxData->rxDataDbgCounters.excludedFrameCounter++;
-
-    /* free Buffer */
-    RxBufFree(pRxData->hOs, pBuffer); 
-
-}
-
-/***************************************************************************
-*                       rxData_discardPacketVlan                                   *
-****************************************************************************
-* DESCRIPTION:  this function is called to discard Buffer
-* 
-* INPUTS:       hRxData - the object
-*               pBuffer - the received Buffer.
-*               pRxAttr - Rx attributes
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-***************************************************************************/
-static void rxData_discardPacketVlan (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_WARNING, " rxData_discardPacketVlan : drop packet that contains VLAN tag\n");
-
-    pRxData->rxDataDbgCounters.rxDroppedDueToVLANIncludedCnt++;
-
-    /* free Buffer */
-    RxBufFree(pRxData->hOs, pBuffer); 
-}
-
-
-/***************************************************************************
-*                       rxData_rcvPacketInOpenNotify                         *
-****************************************************************************
-* DESCRIPTION:  this function is called upon receving data Eapol packet type 
-*               while rx port status is "open notify"
-* 
-* INPUTS:       hRxData - the object
-*               pBuffer - the received Buffer.
-*               pRxAttr - Rx attributes
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-***************************************************************************/
-static void rxData_rcvPacketInOpenNotify (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_ERROR, " rxData_rcvPacketInOpenNotify: receiving data packet while in rx port status is open notify\n");
-
-    pRxData->rxDataDbgCounters.rcvUnicastFrameInOpenNotify++;
-
-    /* free Buffer */
-    RxBufFree(pRxData->hOs, pBuffer); 
-}
-
-
-/***************************************************************************
-*                       rxData_rcvPacketEapol                               *
-****************************************************************************
-* DESCRIPTION:  this function is called upon receving data Eapol packet type 
-*               while rx port status is "open  eapol"
-* 
-* INPUTS:       hRxData - the object
-*               pBuffer - the received Buffer.
-*               pRxAttr - Rx attributes
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-***************************************************************************/
-static void rxData_rcvPacketEapol(TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_rcvPacketEapol() : Received an EAPOL frame tranferred to OS\n");
-
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_rcvPacketEapol() : Received an EAPOL frame tranferred to OS\n");
-
-    EvHandlerSendEvent (pRxData->hEvHandler, IPC_EVENT_EAPOL, NULL, 0);
-    os_receivePacket (pRxData->hOs, (struct RxIfDescriptor_t*)pBuffer, pBuffer, (TI_UINT16)RX_ETH_PKT_LEN(pBuffer));
-
-}
-
-/***************************************************************************
-*                       rxData_rcvPacketData                                 *
-****************************************************************************
-* DESCRIPTION:  this function is called upon receving data "data" packet type 
-*               while rx port status is "open"
-* 
-* INPUTS:       hRxData - the object
-*               pBuffer - the received Buffer.
-*               pRxAttr - Rx attributes
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-***************************************************************************/
-static void rxData_rcvPacketData(TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-    TEthernetHeader *pEthernetHeader;
-    TI_UINT16 EventMask = 0;
-    TFwInfo *pFwInfo;
-
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_rcvPacketData() : Received DATA frame tranferred to OS\n");
-
-    /* check encryption status */
-    pEthernetHeader = (TEthernetHeader *)RX_ETH_PKT_DATA(pBuffer);
-    if (!MAC_MULTICAST (pEthernetHeader->dst))
-    {  /* unicast frame */
-        if((pRxData->rxDataExcludeUnencrypted) && (!(pRxAttr->packetInfo & RX_DESC_ENCRYPT_MASK)))
-        {
-            pRxData->rxDataDbgCounters.excludedFrameCounter++;
-            /* free Buffer */
-            TRACE0(pRxData->hReport, REPORT_SEVERITY_WARNING, " rxData_rcvPacketData() : exclude unicast unencrypted is TI_TRUE & packet encryption is OFF\n");
-
-            RxBufFree(pRxData->hOs, pBuffer);
-            return;
-        }
-    }
-    else
-    {  /* broadcast frame */
-        if ((pRxData->rxDataExludeBroadcastUnencrypted) && (!(pRxAttr->packetInfo & RX_DESC_ENCRYPT_MASK)))
-        {
-            pRxData->rxDataDbgCounters.excludedFrameCounter++;
-            /* free Buffer */
-            TRACE0(pRxData->hReport, REPORT_SEVERITY_WARNING, " rxData_rcvPacketData() : exclude broadcast unencrypted is TI_TRUE & packet encryption is OFF\n");
-
-            RxBufFree(pRxData->hOs, pBuffer);
-            return;
-        }
-
-        /*
-         * Discard multicast/broadcast frames that we sent ourselves.
-         * Per IEEE 802.11-2007 section 9.2.7: "STAs shall filter out
-         * broadcast/multicast messages that contain their address as
-         * the source address."
-         */
-        pFwInfo = TWD_GetFWInfo (pRxData->hTWD);
-        if (MAC_EQUAL(pFwInfo->macAddress, pEthernetHeader->src))
-        {
-            pRxData->rxDataDbgCounters.excludedFrameCounter++;
-            /* free Buffer */
-            RxBufFree(pRxData->hOs, pBuffer);
-            return;
-        }
-    }
-
-    /* update traffic monitor parameters */
-    pRxData->rxDataCounters.RecvOk++;
-    EventMask |= RECV_OK;
-
-    if (!MAC_MULTICAST (pEthernetHeader->dst)) 
-    {
-        /* Directed frame */
-        pRxData->rxDataCounters.DirectedFramesRecv++;
-        pRxData->rxDataCounters.DirectedBytesRecv += RX_ETH_PKT_LEN(pBuffer);
-        EventMask |= DIRECTED_BYTES_RECV;  
-        EventMask |= DIRECTED_FRAMES_RECV;
-    }
-    else if (MAC_BROADCAST (pEthernetHeader->dst)) 
-    {
-        /* Broadcast frame */
-        pRxData->rxDataCounters.BroadcastFramesRecv++;
-        pRxData->rxDataCounters.BroadcastBytesRecv += RX_ETH_PKT_LEN(pBuffer);
-        EventMask |= BROADCAST_BYTES_RECV;  
-        EventMask |= BROADCAST_FRAMES_RECV;
-    }
-    else 
-    {
-        /* Multicast Address */
-        pRxData->rxDataCounters.MulticastFramesRecv++;
-        pRxData->rxDataCounters.MulticastBytesRecv += RX_ETH_PKT_LEN(pBuffer);
-        EventMask |= MULTICAST_BYTES_RECV;  
-        EventMask |= MULTICAST_FRAMES_RECV;
-    }
-    pRxData->rxDataCounters.LastSecBytesRecv += RX_ETH_PKT_LEN(pBuffer);
-
-    /*Handle PREAUTH_EAPOL_PACKET*/
-    if (HTOWLANS(pEthernetHeader->type) == PREAUTH_EAPOL_PACKET)
-    {
-        TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_rcvPacketData() : Received an Pre-Auth EAPOL frame tranferred to OS\n");
-    }
-
-    rxData_DistributorRxEvent (pRxData, EventMask, RX_ETH_PKT_LEN(pBuffer));
-
-    /* deliver packet to os */
-    os_receivePacket (pRxData->hOs, (struct RxIfDescriptor_t*)pBuffer, pBuffer, (TI_UINT16)RX_ETH_PKT_LEN(pBuffer));
-}
-
-
-/***************************************************************************
-*                       rxData_rcvPacketIapp                                 *
-****************************************************************************
-* DESCRIPTION:  this function is called upon receving data IAPP packet type 
-*               while rx port status is "open"
-* 
-* INPUTS:       hRxData - the object
-*               pBuffer - the received Buffer.
-*               pRxAttr - Rx attributes
-*       
-* OUTPUT:       
-* 
-* RETURNS:      
-***************************************************************************/
-#ifdef XCC_MODULE_INCLUDED
-
-static void rxData_rcvPacketIapp(TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_rcvPacketIapp() : Received IAPP frame tranferred to XCCMgr\n");
-
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_rcvPacketIapp() : Received IAPP frame tranferred to XCCMgr\n");
-
-    /* tranfer packet to XCCMgr */
-    XCCMngr_recvIAPPPacket (pRxData->hXCCMgr, pBuffer, pRxAttr);
-
-    /* free Buffer */
-    RxBufFree(pRxData->hOs, pBuffer); 
-}
-
-#endif
-
-
-/****************************************************************************
-*                       rxData_convertWlanToEthHeader                       *
-*****************************************************************************
-* DESCRIPTION:  this function convert the Packet header from 802.11 header 
-*               format to ethernet format
-* 
-* INPUTS:       hRxData - the object
-*               pBuffer - the received pBuffer in 802.11 format
-*       
-* OUTPUT:       pEthPacket  - pointer to the received pBuffer in ethernet format
-*               uEthLength - ethernet packet length
-* 
-* RETURNS:      TI_OK/TI_NOK
-***************************************************************************/
-static TI_STATUS rxData_convertWlanToEthHeader (TI_HANDLE hRxData, void *pBuffer, TI_UINT16 * etherType)
-{
-    TEthernetHeader      EthHeader;
-    Wlan_LlcHeader_T    *pWlanSnapHeader;   
-    TI_UINT8            *dataBuf;
-    dot11_header_t      *pDot11Header;
-    TI_UINT32            lengthDelta;
-    TI_UINT16            swapedTypeLength;
-    TI_UINT32            headerLength;
-    TI_UINT8             createEtherIIHeader;
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    dataBuf = (TI_UINT8 *)RX_BUF_DATA(pBuffer);
-
-    /* Setting the mac header len according to the received FrameControl field in the Mac Header */
-    GET_MAX_HEADER_SIZE (dataBuf, &headerLength);
-    pDot11Header = (dot11_header_t*) dataBuf;
-    pWlanSnapHeader = (Wlan_LlcHeader_T*)((TI_UINT32)dataBuf + (TI_UINT32)headerLength);
-    
-    swapedTypeLength = WLANTOHS (pWlanSnapHeader->Type);
-    *etherType = swapedTypeLength;
- 
-    /* Prepare the Ethernet header. */
-    if( ENDIAN_HANDLE_WORD(pDot11Header->fc) & DOT11_FC_FROM_DS)
-    {   /* Infrastructure  bss */
-        MAC_COPY (EthHeader.dst, pDot11Header->address1);
-        MAC_COPY (EthHeader.src, pDot11Header->address3);
-    }
-    else
-    {   /* Independent bss */
-        MAC_COPY (EthHeader.dst, pDot11Header->address1);
-        MAC_COPY (EthHeader.src, pDot11Header->address2);
-    }
-    
-    createEtherIIHeader = TI_FALSE;
-	/* See if the LLC header in the frame shows the SAP SNAP... */
-	if((SNAP_CHANNEL_ID == pWlanSnapHeader->DSAP) &&
-	   (SNAP_CHANNEL_ID == pWlanSnapHeader->SSAP) &&
-	   (LLC_CONTROL_UNNUMBERED_INFORMATION == pWlanSnapHeader->Control))
-	{
-		/* Check for the Bridge Tunnel OUI in the SNAP Header... */
-		if((SNAP_OUI_802_1H_BYTE0 == pWlanSnapHeader->OUI[ 0 ]) &&
-		   (SNAP_OUI_802_1H_BYTE1 == pWlanSnapHeader->OUI[ 1 ]) &&
-		   (SNAP_OUI_802_1H_BYTE2 == pWlanSnapHeader->OUI[ 2 ]))
-		{
-			/* Strip the SNAP header by skipping over it.                  */
-			/* Start moving data from the Ethertype field in the SNAP      */
-			/* header.  Move to the TypeLength field in the 802.3 header.  */
-			createEtherIIHeader = TI_TRUE;
-		}
-		/* Check for the RFC 1042 OUI in the SNAP Header   */
-		else
-		{
-			/* Check for the RFC 1042 OUI in the SNAP Header   */
-			if(	(SNAP_OUI_RFC1042_BYTE0 == pWlanSnapHeader->OUI[ 0 ]) &&
-				(SNAP_OUI_RFC1042_BYTE1 == pWlanSnapHeader->OUI[ 1 ]) &&
-				(SNAP_OUI_RFC1042_BYTE2 == pWlanSnapHeader->OUI[ 2 ]))
-			{
-			/* See if the Ethertype is in our selective translation table  */
-			/* (Appletalk AARP and DIX II IPX are the two protocols in     */
-			/* our 'table')                                                */
-				if((ETHERTYPE_APPLE_AARP != swapedTypeLength) &&
-					(ETHERTYPE_DIX_II_IPX != swapedTypeLength))
-			{
-				/* Strip the SNAP header by skipping over it. */
-				createEtherIIHeader = TI_TRUE;
-			}
-		}
-	}
-    }
-
-    if( createEtherIIHeader == TI_TRUE )
-    {
-    /* The LEN/TYPE bytes are set to TYPE, the entire WLAN+SNAP is removed.*/
-    lengthDelta = headerLength + WLAN_SNAP_HDR_LEN - ETHERNET_HDR_LEN;
-    EthHeader.type = pWlanSnapHeader->Type;
-    }
-    else
-    {
-	/* The LEN/TYPE bytes are set to frame LEN, only the WLAN header is removed, */
-	/* the entire 802.3 or 802.2 header is not removed.*/
-	lengthDelta = headerLength - ETHERNET_HDR_LEN;
-	EthHeader.type = WLANTOHS((TI_UINT16)(RX_BUF_LEN(pBuffer) - headerLength));
-    }
-    
-    /* Replace the 802.11 header and the LLC with Ethernet packet. */
-    dataBuf += lengthDelta;
-    os_memoryCopy (pRxData->hOs, dataBuf, (void*)&EthHeader, ETHERNET_HDR_LEN);
-    RX_ETH_PKT_DATA(pBuffer) = dataBuf;
-    RX_ETH_PKT_LEN(pBuffer)  = RX_BUF_LEN(pBuffer) - lengthDelta;
-
-    return TI_OK;
-}
-
-
-/**
- * \brief convert A-MSDU to several ethernet packets
- * 
- * \param hRxData - the object
- * \param pBuffer - the received Buffer in A-MSDU 802.11n format
- * \param pRxAttr - Rx attributes
- * \return TI_OK on success or TI_NOK on failure 
- * 
- * \par Description
- * Static function
- * This function convert the A-MSDU Packet from A-MSDU 802.11n packet
- * format to several ethernet packets format and pass them to the OS layer
- *
- * \sa
- */ 
-static TI_STATUS rxData_ConvertAmsduToEthPackets (TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxAttr)
-{
-
-    TEthernetHeader     *pMsduEthHeader;
-    TEthernetHeader     *pEthHeader;
-    Wlan_LlcHeader_T    *pWlanSnapHeader;   
-    TI_UINT8            *pAmsduDataBuf;
-    TI_UINT16            uAmsduDataLen;
-    void                *pDataBuf;
-    TI_UINT16            uDataLen;
-    TI_UINT32            lengthDelta;
-    TI_UINT16            swapedTypeLength;
-    TI_UINT32            headerLength;
-    rxDataPacketType_e   DataPacketType;
-    rxData_t            *pRxData = (rxData_t *)hRxData;
-
-    /* total AMPDU header */
-    pAmsduDataBuf = (TI_UINT8 *)RX_BUF_DATA(pBuffer);
-    /* Setting the mac header len according to the received FrameControl field in the Mac Header */
-    GET_MAX_HEADER_SIZE (pAmsduDataBuf, &headerLength);
-    
-    /* 
-     * init loop setting 
-     */
-    /* total AMPDU size */
-    uAmsduDataLen = (TI_UINT16)(RX_BUF_LEN(pBuffer) - headerLength);
-    /* ETH header */
-    pMsduEthHeader = (TEthernetHeader *)(pAmsduDataBuf + headerLength);
-    /* ETH length, in A-MSDU the MSDU header type contain the MSDU length and not the type */
-    uDataLen = WLANTOHS(pMsduEthHeader->type);
-
-    TRACE1(pRxData->hReport, REPORT_SEVERITY_INFORMATION, "rxData_ConvertAmsduToEthPackets(): A-MSDU received in length %d \n",uAmsduDataLen);
-
-    /* if we have another packet at the AMSDU */
-    while((uDataLen < uAmsduDataLen) && (uAmsduDataLen > ETHERNET_HDR_LEN + FCS_SIZE))  
-    {
-        /* allocate a new buffer */
-        /* RxBufAlloc() add an extra word for alignment the MAC payload */
-        rxData_RequestForBuffer (hRxData, &pDataBuf, sizeof(RxIfDescriptor_t) + WLAN_SNAP_HDR_LEN + ETHERNET_HDR_LEN + uDataLen, 0, TAG_CLASS_AMSDU);
-        if (NULL == pDataBuf)
-        {
-            TRACE1(pRxData->hReport, REPORT_SEVERITY_ERROR, "rxData_ConvertAmsduToEthPackets(): cannot alloc MSDU packet. length %d \n",uDataLen);
-            rxData_discardPacket (hRxData, pBuffer, pRxAttr);
-            return TI_NOK;
-        }
-
-        /* read packet type from LLC */
-        pWlanSnapHeader = (Wlan_LlcHeader_T*)((TI_UINT8*)pMsduEthHeader + ETHERNET_HDR_LEN);
-        swapedTypeLength = WLANTOHS (pWlanSnapHeader->Type);
-
-        /* copy the RxIfDescriptor */
-        os_memoryCopy (pRxData->hOs, pDataBuf, pBuffer, sizeof(RxIfDescriptor_t));
-
-        /* update length, in the RxIfDescriptor the Len in words (4B) */
-        ((RxIfDescriptor_t *)pDataBuf)->length = (sizeof(RxIfDescriptor_t) + WLAN_SNAP_HDR_LEN + ETHERNET_HDR_LEN + uDataLen) >> 2;
-        ((RxIfDescriptor_t *)pDataBuf)->extraBytes = 4 - ((sizeof(RxIfDescriptor_t) + WLAN_SNAP_HDR_LEN + ETHERNET_HDR_LEN + uDataLen) & 0x3);
-
-        /* Prepare the Ethernet header pointer. */ 
-        /* add padding in the start of the buffer in order to align ETH payload */
-        pEthHeader = (TEthernetHeader *)((TI_UINT8 *)(RX_BUF_DATA(pDataBuf)) + 
-                                         WLAN_SNAP_HDR_LEN + 
-                                         PADDING_ETH_PACKET_SIZE);
-
-        /* copy the Ethernet header */
-        os_memoryCopy (pRxData->hOs, pEthHeader, pMsduEthHeader, ETHERNET_HDR_LEN);
-
-        /* The LEN/TYPE bytes are set to TYPE */
-        pEthHeader->type = pWlanSnapHeader->Type;
-
-        /* Delta length for the next packet */
-        lengthDelta = ETHERNET_HDR_LEN + uDataLen;
-
-        /* copy the packet payload */
-        if (uDataLen > WLAN_SNAP_HDR_LEN)
-            os_memoryCopy (pRxData->hOs,
-                       (((TI_UINT8*)pEthHeader) + ETHERNET_HDR_LEN), 
-                       ((TI_UINT8*)pMsduEthHeader) + ETHERNET_HDR_LEN + WLAN_SNAP_HDR_LEN, 
-                       uDataLen - WLAN_SNAP_HDR_LEN);
-
-        /* set the packet type */
-        if (swapedTypeLength == ETHERTYPE_802_1D)
-        {
-            TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_ConvertAmsduToEthPackets() : Received VLAN Buffer  \n");
-
-            DataPacketType = DATA_VLAN_PACKET;
-        }
-        else if (HTOWLANS(pEthHeader->type) == EAPOL_PACKET)
-        {
-            TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_ConvertAmsduToEthPackets() : Received Eapol pBuffer  \n");
-
-            DataPacketType = DATA_EAPOL_PACKET;
-        }
-        else
-        {
-            TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_ConvertAmsduToEthPackets() : Received Data pBuffer  \n");
-
-            DataPacketType = DATA_DATA_PACKET;
-        }
-
-        /* update buffer setting */
-        /* save the ETH packet address */
-        RX_ETH_PKT_DATA(pDataBuf) = pEthHeader;
-        /* save the ETH packet size */
-        RX_ETH_PKT_LEN(pDataBuf) = uDataLen + ETHERNET_HDR_LEN - WLAN_SNAP_HDR_LEN;
-
-        /* star of MSDU packet always align acceding to 11n spec */
-        lengthDelta = (lengthDelta + ALIGN_4BYTE_MASK) & ~ALIGN_4BYTE_MASK;
-        pMsduEthHeader = (TEthernetHeader *)(((TI_UINT8*)pMsduEthHeader) + lengthDelta);
-
-        if(uAmsduDataLen > lengthDelta)
-        {
-            /* swich to the next MSDU */
-            uAmsduDataLen = uAmsduDataLen - lengthDelta;
-
-            /* Clear the EndOfBurst flag for all packets except the last one */
-            ((RxIfDescriptor_t *)pDataBuf)->driverFlags &= ~DRV_RX_FLAG_END_OF_BURST;
-        }
-        else
-        {
-            /* no more MSDU */
-            uAmsduDataLen = 0;
-        }
-
-
-        /* in A-MSDU the MSDU header type contain the MSDU length and not the type */
-        uDataLen = WLANTOHS(pMsduEthHeader->type);
-
-
-        /* dispatch Buffer according to packet type and current rx data port status */
-        pRxData->rxData_dispatchBuffer[pRxData->rxDataPortStatus][DataPacketType] (hRxData, pDataBuf, pRxAttr);
-
-    } /* while end */
-
-
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, "rxData_ConvertAmsduToEthPackets(): A-MSDU Packe conversion done.\n");
-
-    /* free the A-MSDU packet */
-    RxBufFree(pRxData->hOs, pBuffer);
-
-    return TI_OK;
-}
-
-/****************************************************************************************
- *                        rxData_ReceivePacket                                              *
- ****************************************************************************************
-DESCRIPTION:    receive packet CB from RxXfer.
-                parse the status and other parameters and forward the frame to  
-                rxData_receivePacketFromWlan()
-                
-INPUT:          Rx frame with its parameters    
-
-OUTPUT:
-
-RETURN:         
-
-************************************************************************/
-static void rxData_ReceivePacket (TI_HANDLE   hRxData,
-                                  void  *pBuffer)
-{
-    rxData_t            *pRxData    = (rxData_t *)hRxData;
-
-    TRACE1(pRxData->hReport, REPORT_SEVERITY_INFORMATION, "rxData_ReceivePacket: Received BUF %x\n", pBuffer);
-
-    if (pBuffer)
-    {
-        RxIfDescriptor_t    *pRxParams  = (RxIfDescriptor_t*)pBuffer;
-        TRxAttr             RxAttr; 
-        ERate               appRate;
-        dot11_header_t      *pHdr;
-
-        /*
-         * First thing we do is getting the dot11_header, and than we check the status, since the header is
-         * needed for RX_MIC_FAILURE_ERROR 
-         */
-
-        pHdr = (dot11_header_t *)RX_BUF_DATA(pBuffer);
-
-        /* Check status */
-        switch (pRxParams->status & RX_DESC_STATUS_MASK)
-        {
-            case RX_DESC_STATUS_SUCCESS:
-                break;
-            
-            case RX_DESC_STATUS_DECRYPT_FAIL:
-            {
-                /* This error is not important before the Connection, so we ignore it when portStatus is not OPEN */
-                if (pRxData->rxDataPortStatus == OPEN) 
-                {
-                    TRACE0(pRxData->hReport, REPORT_SEVERITY_WARNING, "rxData_ReceivePacket: Received Packet with RX_DESC_DECRYPT_FAIL\n");
-                }
-            
-                RxBufFree(pRxData->hOs, pBuffer); 
-                return;
-            }
-            case RX_DESC_STATUS_MIC_FAIL:
-            {
-                TI_UINT8 uKeyType; 
-                paramInfo_t Param;
-                TMacAddr* pMac = &pHdr->address1; /* hold the first mac address */
-                /* Get BSS type */
-                Param.paramType = SITE_MGR_CURRENT_BSS_TYPE_PARAM;
-                siteMgr_getParam (pRxData->hSiteMgr, &Param);
-     
-                /* For multicast/broadcast frames or in IBSS the key used is GROUP, else - it's Pairwise */
-                if (MAC_MULTICAST(*pMac) || Param.content.siteMgrCurrentBSSType == BSS_INDEPENDENT)
-                {
-                    uKeyType = (TI_UINT8)KEY_TKIP_MIC_GROUP;
-	                TRACE0(pRxData->hReport, REPORT_SEVERITY_ERROR, "rxData_ReceivePacket: Received Packet MIC failure. Type = Group\n");
-                }
-                /* Unicast on infrastructure */
-                else 
-                {
-                    uKeyType = (TI_UINT8)KEY_TKIP_MIC_PAIRWISE;
-	                TRACE0(pRxData->hReport, REPORT_SEVERITY_ERROR, "rxData_ReceivePacket: Received Packet MIC failure. Type = Pairwise\n");
-                }
-    
-    
-                rsn_reportMicFailure (pRxData->hRsn, &uKeyType, sizeof(uKeyType));
-                RxBufFree(pRxData->hOs, pBuffer); 
-                return;
-            }
-    
-            case RX_DESC_STATUS_DRIVER_RX_Q_FAIL:
-            {
-                /* Rx queue error - free packet and return */
-                TRACE0(pRxData->hReport, REPORT_SEVERITY_ERROR, "rxData_ReceivePacket: Received Packet with Rx queue error \n");
-  
-                RxBufFree(pRxData->hOs, pBuffer); 
-                return;
-            }
-
-            default:    
-                    /* Unknown error - free packet and return */
-                    TRACE1(pRxData->hReport, REPORT_SEVERITY_ERROR, "rxData_ReceivePacket: Received Packet with unknown status = %d\n", (pRxParams->status & RX_DESC_STATUS_MASK));
-    
-                    RxBufFree(pRxData->hOs, pBuffer); 
-                    return;
-            }
-
-        TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION , "Receive good Packet\n");
-        
-        if (rate_PolicyToDrv ((ETxRateClassId)(pRxParams->rate), &appRate) != TI_OK)
-        {
-            TRACE1(pRxData->hReport, REPORT_SEVERITY_ERROR , "rxData_ReceivePacket: can't convert hwRate=0x%x\n", pRxParams->rate);
-        }
-        
-        /*
-         * Set rx attributes 
-         */ 
-        RxAttr.channel    = pRxParams->channel;
-        RxAttr.packetInfo = pRxParams->flags;
-        RxAttr.ePacketType= pRxParams->packet_class_tag;
-        RxAttr.Rate       = appRate;
-        RxAttr.Rssi       = pRxParams->rx_level;
-        RxAttr.SNR        = pRxParams->rx_snr;
-        RxAttr.status     = pRxParams->status & RX_DESC_STATUS_MASK;
-        /* for now J band not implemented */
-        RxAttr.band       = ((pRxParams->flags & RX_DESC_BAND_MASK) == RX_DESC_BAND_A) ? 
-                            RADIO_BAND_5_0_GHZ : RADIO_BAND_2_4_GHZ ;
-        RxAttr.eScanTag   = (EScanResultTag)(pRxParams->proccess_id_tag);
-        /* timestamp is 32 bit so do bytes copy to avoid exception in case the RxInfo is in 2 bytes offset */
-        os_memoryCopy (pRxData->hOs,
-                       (void *)&(RxAttr.TimeStamp), 
-                       (void *)&(pRxParams->timestamp), 
-                       sizeof(pRxParams->timestamp) );
-        RxAttr.TimeStamp = ENDIAN_HANDLE_LONG(RxAttr.TimeStamp);
-
-        TRACE8(pRxData->hReport, REPORT_SEVERITY_INFORMATION, "rxData_ReceivePacket: channel=%d, info=0x%x, type=%d, rate=0x%x, RSSI=%d, SNR=%d, status=%d, scan tag=%d\n", RxAttr.channel, RxAttr.packetInfo, RxAttr.ePacketType, RxAttr.Rate, RxAttr.Rssi, RxAttr.SNR, RxAttr.status, RxAttr.eScanTag);
-
-        rxData_receivePacketFromWlan (hRxData, pBuffer, &RxAttr);
-
-        /* 
-         *  Buffer MUST be freed until now 
-         */
-    }
-    else
-    {
-        TRACE0(pRxData->hReport, REPORT_SEVERITY_ERROR , "rxData_ReceivePacket: null Buffer received");
-    }
-}
-
-
-/****************************************************************************************
- *                        rxData_RequestForBuffer                                              *
- ****************************************************************************************
-DESCRIPTION:     RX request for buffer
-                uEncryptionflag API are for GWSI use.
-INPUT:          
-
-OUTPUT:
-
-RETURN:         
-
-************************************************************************/
-static ERxBufferStatus rxData_RequestForBuffer (TI_HANDLE   hRxData,
-                                      void **pBuf,
-                                      TI_UINT16 aLength, 
-                                      TI_UINT32 uEncryptionflag,
-                                      PacketClassTag_e ePacketClassTag)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    TRACE1(pRxData->hReport, REPORT_SEVERITY_INFORMATION , " RequestForBuffer, length = %d \n",aLength);
-
-    *pBuf = RxBufAlloc (pRxData->hOs, aLength, ePacketClassTag);
-
-    if (*pBuf)
-    {
-        return RX_BUF_ALLOC_COMPLETE;
-    }
-    else 
-    {
-        return RX_BUF_ALLOC_OUT_OF_MEM;
-    }
-}
-
-
-/*******************************************************************
-*                        DEBUG FUNCTIONS                           *
-*******************************************************************/
-
-#ifdef TI_DBG
-
-/***************************************************************************
-*                        rxData_resetCounters                              *
-****************************************************************************
-* DESCRIPTION:  This function reset the Rx Data module counters
-*
-* INPUTS:       hRxData - the object
-*
-* OUTPUT:       
-* 
-* RETURNS:      void
-***************************************************************************/
-void rxData_resetCounters(TI_HANDLE hRxData)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    os_memoryZero(pRxData->hOs, &pRxData->rxDataCounters, sizeof(rxDataCounters_t));
-}
-
-/***************************************************************************
-*                        rxData_resetDbgCounters                           *
-****************************************************************************
-* DESCRIPTION:  This function reset the Rx Data module debug counters
-*
-* INPUTS:       hRxData - the object
-*
-* OUTPUT:       
-* 
-* RETURNS:      void
-***************************************************************************/
-
-void rxData_resetDbgCounters(TI_HANDLE hRxData)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    os_memoryZero(pRxData->hOs, &pRxData->rxDataDbgCounters, sizeof(rxDataDbgCounters_t));
-}
-
-
-/***************************************************************************
-*                            test functions                                *
-***************************************************************************/
-void rxData_printRxCounters (TI_HANDLE hRxData)
-{
-#ifdef REPORT_LOG
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    if (pRxData) 
-    {
-        WLAN_OS_REPORT(("RecvOk = %d\n", pRxData->rxDataCounters.RecvOk));
-        WLAN_OS_REPORT(("DirectedBytesRecv = %d\n", pRxData->rxDataCounters.DirectedBytesRecv));
-        WLAN_OS_REPORT(("DirectedFramesRecv = %d\n", pRxData->rxDataCounters.DirectedFramesRecv));
-        WLAN_OS_REPORT(("MulticastBytesRecv = %d\n", pRxData->rxDataCounters.MulticastBytesRecv));
-        WLAN_OS_REPORT(("MulticastFramesRecv = %d\n", pRxData->rxDataCounters.MulticastFramesRecv));
-        WLAN_OS_REPORT(("BroadcastBytesRecv = %d\n", pRxData->rxDataCounters.BroadcastBytesRecv));
-        WLAN_OS_REPORT(("BroadcastFramesRecv = %d\n", pRxData->rxDataCounters.BroadcastFramesRecv));
-    
-        /* debug counters */
-        WLAN_OS_REPORT(("excludedFrameCounter = %d\n", pRxData->rxDataDbgCounters.excludedFrameCounter));
-        WLAN_OS_REPORT(("rxDroppedDueToVLANIncludedCnt = %d\n", pRxData->rxDataDbgCounters.rxDroppedDueToVLANIncludedCnt));    
-        WLAN_OS_REPORT(("rxWrongBssTypeCounter = %d\n", pRxData->rxDataDbgCounters.rxWrongBssTypeCounter));
-        WLAN_OS_REPORT(("rxWrongBssIdCounter = %d\n", pRxData->rxDataDbgCounters.rxWrongBssIdCounter));
-        WLAN_OS_REPORT(("rcvUnicastFrameInOpenNotify = %d\n", pRxData->rxDataDbgCounters.rcvUnicastFrameInOpenNotify));        
-    }
-#endif
-}
-
-
-void rxData_printRxBlock(TI_HANDLE hRxData)
-{
-#ifdef REPORT_LOG
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    WLAN_OS_REPORT(("hCtrlData = 0x%X\n", pRxData->hCtrlData));
-    WLAN_OS_REPORT(("hMlme = 0x%X\n", pRxData->hMlme));
-    WLAN_OS_REPORT(("hOs = 0x%X\n", pRxData->hOs));
-    WLAN_OS_REPORT(("hReport = 0x%X\n", pRxData->hReport));
-    WLAN_OS_REPORT(("hRsn = 0x%X\n", pRxData->hRsn));
-    WLAN_OS_REPORT(("hSiteMgr = 0x%X\n", pRxData->hSiteMgr));
-
-    WLAN_OS_REPORT(("hCtrlData = 0x%X\n", pRxData->hCtrlData));
-    WLAN_OS_REPORT(("hMlme = 0x%X\n", pRxData->hMlme));
-    WLAN_OS_REPORT(("hOs = 0x%X\n", pRxData->hOs));
-    WLAN_OS_REPORT(("hReport = 0x%X\n", pRxData->hReport));
-    WLAN_OS_REPORT(("hRsn = 0x%X\n", pRxData->hRsn));
-    WLAN_OS_REPORT(("hSiteMgr = 0x%X\n", pRxData->hSiteMgr));
-
-    WLAN_OS_REPORT(("rxDataPortStatus = %d\n", pRxData->rxDataPortStatus));
-    WLAN_OS_REPORT(("rxDataExcludeUnencrypted = %d\n", pRxData->rxDataExcludeUnencrypted));
-    WLAN_OS_REPORT(("rxDataEapolDestination = %d\n", pRxData->rxDataEapolDestination));
-#endif
-}
-
-
-void rxData_startRxThroughputTimer (TI_HANDLE hRxData)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    if (!pRxData->rxThroughputTimerEnable)
-    {
-        /* reset throughput counter */
-        pRxData->rxDataCounters.LastSecBytesRecv = 0;
-        pRxData->rxThroughputTimerEnable = TI_TRUE;
-
-        /* start 1 sec throughput timer */
-        tmr_StartTimer (pRxData->hThroughputTimer,
-                        rxData_printRxThroughput,
-                        (TI_HANDLE)pRxData,
-                        1000,
-                        TI_TRUE);
-    }
-}
-
-
-void rxData_stopRxThroughputTimer (TI_HANDLE hRxData)
-{
-
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    if (pRxData->rxThroughputTimerEnable)
-    {
-        tmr_StopTimer (pRxData->hThroughputTimer);
-        pRxData->rxThroughputTimerEnable = TI_FALSE;
-    } 
-}
-
-
-static void rxData_printRxThroughput (TI_HANDLE hRxData, TI_BOOL bTwdInitOccured)
-{
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    WLAN_OS_REPORT (("\n"));
-    WLAN_OS_REPORT (("-------------- Rx Throughput Statistics ---------------\n"));
-    WLAN_OS_REPORT (("Throughput = %d KBits/sec\n", pRxData->rxDataCounters.LastSecBytesRecv * 8 / 1024));
-
-    /* reset throughput counter */
-    pRxData->rxDataCounters.LastSecBytesRecv = 0;
-}
-
-void rxData_printRxDataFilter (TI_HANDLE hRxData)
-{
-    TI_UINT32 index;
-    rxData_t *pRxData = (rxData_t *)hRxData;
-
-    for (index=0; index<MAX_DATA_FILTERS; index++)
-     {
-        if (pRxData->isFilterSet[index])
-        {
-            WLAN_OS_REPORT (("index=%d, pattern & mask\n", index));
-            report_PrintDump(pRxData->filterRequests[index].pattern, pRxData->filterRequests[index].patternLength);
-            report_PrintDump(pRxData->filterRequests[index].mask, pRxData->filterRequests[index].maskLength);
-        }
-        else
-        {
-            WLAN_OS_REPORT (("No Filter defined for index-%d\n", index));
-        }
-     }
-}
-
-#endif /*TI_DBG*/
-
-/****************************************************************************
- *                      rxData_SetReAuthInProgress()
- ****************************************************************************
- * DESCRIPTION:	Sets the ReAuth flag value
- *
- * INPUTS: hRxData - the object
- *		   value - value to set the flag to
- *
- * OUTPUT:	None
- *
- * RETURNS:	OK or NOK
- ****************************************************************************/
-void rxData_SetReAuthInProgress(TI_HANDLE hRxData, TI_BOOL	value)
-{
-	rxData_t *pRxData = (rxData_t *)hRxData;
-
-	TRACE1(pRxData->hReport, REPORT_SEVERITY_INFORMATION , "Set ReAuth flag to %d\n", value);
-
-	pRxData->reAuthInProgress = value;
-}
-
-/****************************************************************************
- *                      rxData_IsReAuthInProgress()
- ****************************************************************************
- * DESCRIPTION:	Returns the ReAuth flag value
- *
- * INPUTS: hRxData - the object
- *
- * OUTPUT:	None
- *
- * RETURNS:	ReAuth flag value
- ****************************************************************************/
-TI_BOOL rxData_IsReAuthInProgress(TI_HANDLE hRxData)
-{
-	rxData_t *pRxData = (rxData_t *)hRxData;
-	return pRxData->reAuthInProgress;
-}
-
-/****************************************************************************
-*						rxData_StartReAuthActiveTimer   	                *
-*****************************************************************************
-* DESCRIPTION:	this function starts the ReAuthActive timer
-*
-* INPUTS:		hRxData - the object
-*
-* OUTPUT:		None
-*
-* RETURNS:		None
-***************************************************************************/
-static void rxData_StartReAuthActiveTimer(TI_HANDLE hRxData)
-{
-	rxData_t *pRxData = (rxData_t *)hRxData;
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION , "Start ReAuth Active Timer\n");
-    tmr_StartTimer (pRxData->reAuthActiveTimer,
-                    reAuthTimeout,
-                    (TI_HANDLE)pRxData,
-                    pRxData->reAuthActiveTimeout,
-                    TI_FALSE);
-}
-
-/****************************************************************************
-*						rxData_StopReAuthActiveTimer   						*
-*****************************************************************************
-* DESCRIPTION:	this function stops the ReAuthActive timer
-*
-* INPUTS:		hRxData - the object
-*
-* OUTPUT:		None
-*
-* RETURNS:		None
-***************************************************************************/
-void rxData_StopReAuthActiveTimer(TI_HANDLE hRxData)
-{
-	rxData_t *pRxData = (rxData_t *)hRxData;
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION , "Stop ReAuth Active Timer\n");
-    tmr_StopTimer (pRxData->reAuthActiveTimer);
-}
-
-/****************************************************************************
-*						reAuthTimeout   									*
-*****************************************************************************
-* DESCRIPTION:	this function ia called when the ReAuthActive timer elapses
-*				It resets the Reauth flag and restore the PS state.
-*				It also sends RE_AUTH_TERMINATED event to upper layer.
-*
-* INPUTS:		hRxData - the object
-*
-* OUTPUT:		None
-*
-* RETURNS:		None
-***************************************************************************/
-static void reAuthTimeout(TI_HANDLE hRxData, TI_BOOL bTwdInitOccured)
-{
-	rxData_t *pRxData = (rxData_t *)hRxData;
-
-    TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION , "ReAuth Active Timeout\n");
-	rxData_SetReAuthInProgress(pRxData, TI_FALSE);
-	rxData_ReauthDisablePriority(pRxData);
-    EvHandlerSendEvent(pRxData->hEvHandler, IPC_EVENT_RE_AUTH_TERMINATED, NULL, 0);
-}
-
-void rxData_ReauthEnablePriority(TI_HANDLE hRxData)
-{
-	rxData_t *pRxData = (rxData_t *)hRxData;
-	paramInfo_t param;
-
-    param.paramType = POWER_MGR_ENABLE_PRIORITY;
-    param.content.powerMngPriority = POWER_MANAGER_REAUTH_PRIORITY;
-    powerMgr_setParam(pRxData->hPowerMgr,&param);
-}
-
-void rxData_ReauthDisablePriority(TI_HANDLE hRxData)
-{
-	rxData_t *pRxData = (rxData_t *)hRxData;
-    paramInfo_t param;
-
-    param.paramType = POWER_MGR_DISABLE_PRIORITY;
-    param.content.powerMngPriority = POWER_MANAGER_REAUTH_PRIORITY;
-    powerMgr_setParam(pRxData->hPowerMgr,&param);
-}
diff --git a/wl1271/stad/src/Data_link/rx.h b/wl1271/stad/src/Data_link/rx.h
deleted file mode 100644
index 76cab1e..0000000
--- a/wl1271/stad/src/Data_link/rx.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * rx.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	rx.h													   */
-/*    	PURPOSE:	Rx module functions header file						   */
-/*																		   */
-/***************************************************************************/
-#ifndef _RX_DATA_H_
-#define _RX_DATA_H_
-
-#include "paramOut.h"
-#include "TWDriver.h"
-
-#define DEF_EXCLUDE_UNENCYPTED				TI_FALSE
-#define DEF_EAPOL_DESTINATION				OS_ABS_LAYER
-#define DEF_RX_PORT_STATUS					CLOSE
-
-typedef struct 
-{
-	TI_UINT32		excludedFrameCounter;	
-	TI_UINT32		rxDroppedDueToVLANIncludedCnt;    
-    TI_UINT32		rxWrongBssTypeCounter;
-	TI_UINT32		rxWrongBssIdCounter;
-    TI_UINT32      rcvUnicastFrameInOpenNotify;
-}rxDataDbgCounters_t;
-
-
-/*                         |                           |                         |
- 31 30 29 28 | 27 26 25 24 | 23 22 21 20 | 19 18 17 16 | 15 14 13 12 | 11 10 9 8 | 7 6 5 4 | 3 2 1 0
-                           |                           |                         |
-*/                                           
-
-
-typedef enum
-{
-	DATA_IAPP_PACKET  = 0,
-	DATA_EAPOL_PACKET = 1,
-	DATA_DATA_PACKET  = 2,
-    DATA_VLAN_PACKET  = 3,
-	MAX_NUM_OF_RX_DATA_TYPES
-}rxDataPacketType_e;
-
-
-
-typedef void (*rxData_pBufferDispatchert) (TI_HANDLE hRxData , void *pBuffer, TRxAttr *pRxAttr);
-
-
-typedef struct 
-{
-	/* Handles */
-	TI_HANDLE	 		hCtrlData;
-	TI_HANDLE	 		hTWD;
-	TI_HANDLE			hMlme;
-	TI_HANDLE			hOs;
-	TI_HANDLE			hRsn;
-	TI_HANDLE			hReport;
-	TI_HANDLE			hSiteMgr;
-	TI_HANDLE			hXCCMgr;
-    TI_HANDLE           hEvHandler;
-    TI_HANDLE           hTimer;
-    TI_HANDLE           RxEventDistributor;
-	TI_HANDLE           hThroughputTimer;
-	TI_HANDLE			hPowerMgr;
-    TI_BOOL             rxThroughputTimerEnable;
-	TI_BOOL             rxDataExcludeUnencrypted;
-    TI_BOOL             rxDataExludeBroadcastUnencrypted;
-	eapolDestination_e 	rxDataEapolDestination;
-
-	portStatus_e  		rxDataPortStatus;
-	
-    /* Rx Data Filters */
-    filter_e            filteringDefaultAction;
-    TI_BOOL             filteringEnabled;
-    TI_BOOL             isFilterSet[MAX_DATA_FILTERS];
-    TRxDataFilterRequest filterRequests[MAX_DATA_FILTERS];
-
-	/* Counters */
-	rxDataCounters_t	rxDataCounters;
-	rxDataDbgCounters_t	rxDataDbgCounters;
-
-	rxData_pBufferDispatchert rxData_dispatchBuffer[MAX_NUM_OF_RX_PORT_STATUS][MAX_NUM_OF_RX_DATA_TYPES];
-
-	TI_INT32				prevSeqNum;
-
- 	TI_UINT32           uLastDataPktRate;  /* save Rx packet rate for statistics */
-
-	TI_BOOL			    reAuthInProgress;
-	TI_HANDLE			reAuthActiveTimer;
-	TI_UINT32			reAuthActiveTimeout;
-
-
-    /* Generic Ethertype support */
-    TI_UINT16           genericEthertype;
-}rxData_t;
-
-#endif
diff --git a/wl1271/stad/src/Data_link/txCtrl.c b/wl1271/stad/src/Data_link/txCtrl.c
deleted file mode 100644
index 22977cd..0000000
--- a/wl1271/stad/src/Data_link/txCtrl.c
+++ /dev/null
@@ -1,1378 +0,0 @@
-/*
- * txCtrl.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*******************************************************************************/
-/*                                                                             */
-/*      MODULE: txCtrl.c                                                       */
-/*    PURPOSE:  The central Tx path module.                                    */
-/*              Prepares Tx packets sent from the data-queue and mgmt-queue    */
-/*                for copy to the FW, including building the header and the    */
-/*                Tx-descriptor.                                               */
-/*                                                                             */
-/*******************************************************************************/
-#define __FILE_ID__  FILE_ID_56
-#include "tidef.h"
-#include "paramOut.h"
-#include "osApi.h"
-#include "TWDriver.h"
-#include "DataCtrl_Api.h"
-#include "802_11Defs.h"
-#include "Ethernet.h"
-#include "report.h"
-#include "timer.h"
-#include "TI_IPC_Api.h"
-#include "EvHandler.h"
-#include "qosMngr_API.h"
-#include "healthMonitor.h"
-#include "txCtrl.h"
-#include "txCtrl_Api.h"
-#include "DrvMainModules.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#endif
-#include "bmtrace_api.h"
-
-
-/* 
- * Module internal functions prototypes:
- */
-
-/* Note: put here and not in txCtrl.h to avoid warning in the txCtrl submodules that include txCtrl.h */ 
- 
-static void   txCtrl_TxCompleteCb (TI_HANDLE hTxCtrl, TxResultDescriptor_t *pTxResultInfo);
-static void   txCtrl_BuildDataPkt (txCtrl_t *pTxCtrl, TTxCtrlBlk *pPktCtrlBlk,
-                                   TI_UINT32 uAc, TI_UINT32 uBackpressure);
-static void	  txCtrl_BuildMgmtPkt (txCtrl_t *pTxCtrl, TTxCtrlBlk *pPktCtrlBlk, TI_UINT32 uAc);
-static void   txCtrl_UpdateHighestAdmittedAcTable (txCtrl_t *pTxCtrl);
-static void   txCtrl_UpdateAcToTidMapping (txCtrl_t *pTxCtrl);
-static void   txCtrl_UpdateBackpressure (txCtrl_t *pTxCtrl, TI_UINT32 freedAcBitmap);
-static void   txCtrl_UpdateTxCounters (txCtrl_t *pTxCtrl, 
-                                       TxResultDescriptor_t *pTxResultInfo,
-                                       TTxCtrlBlk *pPktCtrlBlk, 
-                                       TI_UINT32 ac, 
-                                       TI_BOOL bIsDataPkt);
-#ifdef XCC_MODULE_INCLUDED  /* Needed only for XCC-V4 */
-static void   txCtrl_SetTxDelayCounters (txCtrl_t *pTxCtrl, 
-                                         TI_UINT32 ac, 
-                                         TI_UINT32 fwDelay, 
-                                         TI_UINT32 driverDelay, 
-                                         TI_UINT32 mediumDelay);
-#endif /* XCC_MODULE_INCLUDED */
-
-
-/********************************************************************************
-*																				*
-*                       MACROS and INLINE FUNCTIONS           					*
-*																				*
-*********************************************************************************/
-/* Get the highest admitted AC equal or below the requested one. */
-/* AC to TID translation is bivalent so update TID only if the AC was changed. */
-#define SELECT_AC_FOR_TID(ptc,tid,ac)                      \
-	ac = ptc->highestAdmittedAc[WMEQosTagToACTable[tid]];  \
-    if (ac != WMEQosTagToACTable[tid])                     \
-		tid = WMEQosAcToTid[ac]
-
-/* Update packet length in the descriptor according to HW interface requirements */
-static inline TI_UINT16 txCtrl_TranslateLengthToFw (TTxCtrlBlk *pPktCtrlBlk)
-{
-    TI_UINT16 uPktLen = pPktCtrlBlk->tTxDescriptor.length;
-    TI_UINT16 uLastWordPad;
-    TI_UINT32 uBufNum;
-
-    uPktLen = (uPktLen + 3) & 0xFFFC;                               /* Add alignment bytes if needed */
-    uLastWordPad = uPktLen - pPktCtrlBlk->tTxDescriptor.length;     /* Find number of alignment bytes added */
-    uPktLen = uPktLen >> 2;                                         /* Convert length to words */
-	pPktCtrlBlk->tTxDescriptor.length = ENDIAN_HANDLE_WORD(uPktLen);/* Save FW format length in descriptor */
-
-    /* Find last buffer (last buffer in use is pointed by uBufNum-1) */
-    for (uBufNum = 1; uBufNum < MAX_XFER_BUFS; uBufNum++) 
-    {
-        if (pPktCtrlBlk->tTxnStruct.aLen[uBufNum] == 0)
-        {
-            break;
-        }
-    }
-    /* Add last word alignment pad also to the last buffer length */
-    pPktCtrlBlk->tTxnStruct.aLen[uBufNum - 1] += uLastWordPad;
-    
-    return uLastWordPad;
-}
-
-/* Translate packet timestamp to FW time, and update also lifeTime and uDriverDelay */
-static inline void txCtrl_TranslateTimeToFw (txCtrl_t *pTxCtrl, TTxCtrlBlk *pPktCtrlBlk, TI_UINT16 uLifeTime)
-{
-    TI_UINT32 uPktStartTime = pPktCtrlBlk->tTxDescriptor.startTime;  /* Contains host start time */
-
-    /* Save host packet handling time until this point (for statistics) */
-    pPktCtrlBlk->tTxPktParams.uDriverDelay = os_timeStampMs (pTxCtrl->hOs) - uPktStartTime;
-
-    /* Translate packet timestamp to FW time and undate descriptor */
-    uPktStartTime = TWD_TranslateToFwTime (pTxCtrl->hTWD, uPktStartTime); 
-	pPktCtrlBlk->tTxDescriptor.startTime = ENDIAN_HANDLE_LONG (uPktStartTime);
-	pPktCtrlBlk->tTxDescriptor.lifeTime  = ENDIAN_HANDLE_WORD (uLifeTime);
-}
-
-
-
-/********************************************************************************
-*																				*
-*                       PUBLIC  FUNCTIONS  IMPLEMENTATION						*
-*																				*
-*********************************************************************************/
-
-/*************************************************************************
-*                        txCtrl_Create                                   *
-**************************************************************************
-* DESCRIPTION:  This function initializes the Tx module.
-*
-* INPUT:        hOs - handle to Os Abstraction Layer
-*
-* OUTPUT:
-*
-* RETURN:       Handle to the allocated Tx data control block
-*************************************************************************/
-TI_HANDLE txCtrl_Create (TI_HANDLE hOs)
-{
-	txCtrl_t *pTxCtrl;
-
-	/* allocate Tx module control block */
-	pTxCtrl = os_memoryAlloc(hOs, (sizeof(txCtrl_t)));
-
-	if (!pTxCtrl)
-		return NULL;
-
-	/* reset tx control object */
-	os_memoryZero(hOs, pTxCtrl, (sizeof(txCtrl_t)));
-
-	pTxCtrl->TxEventDistributor = DistributorMgr_Create(hOs, MAX_TX_NOTIF_REQ_ELMENTS);
-
-	pTxCtrl->hOs = hOs;
-
-	return pTxCtrl;
-}
-
-
-/***************************************************************************
-*                           txCtrl_Init                                  *
-****************************************************************************
-* DESCRIPTION:  This function configures the TxCtrl module.
-***************************************************************************/
-void txCtrl_Init (TStadHandlesList *pStadHandles)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)(pStadHandles->hTxCtrl);
-	TI_UINT32 ac;
-
-	/* Save other modules handles */
-	pTxCtrl->hOs			= pStadHandles->hOs;
-	pTxCtrl->hReport		= pStadHandles->hReport;
-	pTxCtrl->hCtrlData		= pStadHandles->hCtrlData;
-	pTxCtrl->hTWD		    = pStadHandles->hTWD;
-	pTxCtrl->hTxDataQ	    = pStadHandles->hTxDataQ;
-	pTxCtrl->hTxMgmtQ	    = pStadHandles->hTxMgmtQ;
-	pTxCtrl->hEvHandler		= pStadHandles->hEvHandler;
-	pTxCtrl->hHealthMonitor = pStadHandles->hHealthMonitor;
-	pTxCtrl->hTimer         = pStadHandles->hTimer;
-	pTxCtrl->hStaCap        = pStadHandles->hStaCap;
-	pTxCtrl->hXCCMngr       = pStadHandles->hXCCMngr;
-	pTxCtrl->hQosMngr       = pStadHandles->hQosMngr;
-	pTxCtrl->hRxData        = pStadHandles->hRxData;
-
-	/* Set Tx parameters to defaults */
-	pTxCtrl->headerConverMode = HDR_CONVERT_NONE;
-	pTxCtrl->currentPrivacyInvokedMode = DEF_CURRENT_PRIVACY_MODE;
-	pTxCtrl->eapolEncryptionStatus = DEF_EAPOL_ENCRYPTION_STATUS;
-	pTxCtrl->encryptionFieldSize = 0;
-	pTxCtrl->currBssType = BSS_INFRASTRUCTURE;
-	pTxCtrl->busyAcBitmap = 0;
-	pTxCtrl->dbgPktSeqNum = 0;		
-	pTxCtrl->bCreditCalcTimerRunning = TI_FALSE;
-	pTxCtrl->genericEthertype = ETHERTYPE_EAPOL;
-
-	for (ac = 0; ac < MAX_NUM_OF_AC; ac++)
-	{
-		pTxCtrl->aMsduLifeTimeTu[ac] = MGMT_PKT_LIFETIME_TU;
-		pTxCtrl->ackPolicy[ac] = ACK_POLICY_LEGACY;
-		pTxCtrl->admissionState[ac] = AC_ADMITTED;
-		pTxCtrl->admissionRequired[ac] = ADMISSION_NOT_REQUIRED;
-		pTxCtrl->useAdmissionAlgo[ac] = TI_FALSE;
-		pTxCtrl->mediumTime[ac] = 0;
-		pTxCtrl->lastCreditCalcTimeStamp[ac] = 0;
-		pTxCtrl->credit[ac] = 0;
-	}
-
-	/* Reset counters */
-	txCtrlParams_resetCounters (pStadHandles->hTxCtrl);
-
-#ifdef TI_DBG
-	txCtrlParams_resetDbgCounters (pStadHandles->hTxCtrl);
-#endif
-
-	/* Register the Tx-Complete callback function. */
-	TWD_RegisterCb (pTxCtrl->hTWD, 
-			TWD_EVENT_TX_RESULT_SEND_PKT_COMPLETE, 
-			(void*)txCtrl_TxCompleteCb, 
-			pStadHandles->hTxCtrl);
-
-	/* Register the Update-Busy-Map callback function. */
-	TWD_RegisterCb (pTxCtrl->hTWD, 
-			TWD_EVENT_TX_HW_QUEUE_UPDATE_BUSY_MAP, 
-			(void *)txCtrl_UpdateBackpressure, 
-			pStadHandles->hTxCtrl);
-
-	TRACE0(pTxCtrl->hReport, REPORT_SEVERITY_INIT, ".....Tx Data configured successfully\n");
-}
-
-
-/*************************************************************************
-*                        txCtrl_SetDefaults                                   *
-**************************************************************************
-* DESCRIPTION:  
-*
-* INPUT:        
-*               txDataInitParams - Tx Data creation parameters
-*               
-* OUTPUT:
-*
-* RETURN:       
-*************************************************************************/
-TI_STATUS txCtrl_SetDefaults (TI_HANDLE hTxCtrl, txDataInitParams_t *txDataInitParams)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	pTxCtrl->creditCalculationTimeout = txDataInitParams->creditCalculationTimeout;
-	pTxCtrl->bCreditCalcTimerEnabled  = txDataInitParams->bCreditCalcTimerEnabled;
-
-	/* Update queues mapping (AC/TID/Backpressure) after module init. */
-	txCtrl_UpdateQueuesMapping (hTxCtrl); 
-
-	/* allocate timer for credit calculation */
-	pTxCtrl->hCreditTimer = tmr_CreateTimer (pTxCtrl->hTimer);
-	if (pTxCtrl->hCreditTimer == NULL)
-	{
-		TRACE0(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, "txCtrl_SetDefaults(): Failed to create hCreditTimer!\n");
-		return TI_NOK;
-	}
-
-	return TI_OK;
-}
-
-
-/***************************************************************************
-*                           txCtrl_Unload                                  *
-****************************************************************************
-* DESCRIPTION:  This function unload the tx ctrl module. 
-*
-***************************************************************************/
-TI_STATUS txCtrl_Unload (TI_HANDLE hTxCtrl)
-{
-    txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-    if (pTxCtrl == NULL)
-    {
-        return TI_NOK;
-    }
-
-    DistributorMgr_Destroy (pTxCtrl->TxEventDistributor);
-
-	if (pTxCtrl->hCreditTimer)
-	{
-		tmr_DestroyTimer (pTxCtrl->hCreditTimer);
-	}
-
-    /* free Tx Data control block */
-    os_memoryFree (pTxCtrl->hOs, pTxCtrl, sizeof(txCtrl_t));
-
-    return TI_OK;
-}
-
-
-
-/*******************************************************************************
-*                          txCtrl_XmitData		                               *
-********************************************************************************
-* DESCRIPTION:  Get a packet from the data-queue, allocate HW resources and CtrlBlk,
-*				  build header and descriptor, and send it to HW by TxXfer.
-*
-* RETURNS:      STATUS_XMIT_SUCCESS - Packet sent succesfully
-*				STATUS_XMIT_BUSY    - Packet dropped due to lack of HW resources, retransmit later.
-*				STATUS_XMIT_ERROR   - Packet dropped due to an unexpected problem (bug).
-********************************************************************************/
-TI_STATUS txCtrl_XmitData (TI_HANDLE hTxCtrl, TTxCtrlBlk *pPktCtrlBlk)
-{
-    txCtrl_t   *pTxCtrl = (txCtrl_t *)hTxCtrl;
-	ETxnStatus eStatus;       /* The Xfer return value (different than this function's return values). */
-	TI_UINT32  uAc;
-	TI_UINT32  uBackpressure = 0; /* HwQueue's indication when the current queue becomes busy. */
-    ETxHwQueStatus eHwQueStatus;
-	CL_TRACE_START_L3();
-    
-	/* Get an admitted AC corresponding to the packet TID. 
-	 * If downgraded due to admission limitation, the TID is downgraded as well. 
-	 */
-	SELECT_AC_FOR_TID (pTxCtrl, pPktCtrlBlk->tTxDescriptor.tid, uAc);
-
-#ifdef TI_DBG
-TRACE3(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, "txCtrl_XmitData(): Pkt Tx, DescID=%d, AC=%d, Len=%d\n", pPktCtrlBlk->tTxDescriptor.descID, uAc, pPktCtrlBlk->tTxDescriptor.length );
-
-	pTxCtrl->dbgCounters.dbgNumPktsSent[uAc]++;
-#endif
-
-	/* Call TxHwQueue for Hw resources allocation. */
-	{
-		CL_TRACE_START_L4();
-		eHwQueStatus = TWD_txHwQueue_AllocResources (pTxCtrl->hTWD, pPktCtrlBlk);
-		CL_TRACE_END_L4("tiwlan_drv.ko", "INHERIT", "TX", ".allocResources");
-	}
-
-	/* If the current AC can't get more packets, stop it in data-queue module. */
-	if (eHwQueStatus == TX_HW_QUE_STATUS_STOP_NEXT)
-	{
-#ifdef TI_DBG
-		pTxCtrl->dbgCounters.dbgNumPktsBackpressure[uAc]++;
-        TRACE2(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, "txCtrl_XmitData(): Backpressure = 0x%x, queue = %d\n", uBackpressure, uAc);
-#endif
-        uBackpressure = 1 << uAc;
-		pTxCtrl->busyAcBitmap |= uBackpressure; /* Set the busy bit of the current AC. */
-		txDataQ_StopQueue (pTxCtrl->hTxDataQ, pTxCtrl->admittedAcToTidMap[uAc]);
-	}
-
-	/* If current packet can't be transmitted due to lack of resources, return with BUSY value. */
-	else if (eHwQueStatus == TX_HW_QUE_STATUS_STOP_CURRENT)
-	{
-#ifdef TI_DBG
-		pTxCtrl->dbgCounters.dbgNumPktsBusy[uAc]++;
-        TRACE1(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, "txCtrl_XmitData(): Queue busy - Packet dropped, queue = %d\n", uAc);
-#endif
-		txDataQ_StopQueue (pTxCtrl->hTxDataQ, pTxCtrl->admittedAcToTidMap[uAc]);
-		CL_TRACE_END_L3("tiwlan_drv.ko", "INHERIT", "TX", "");
-		return STATUS_XMIT_BUSY;
-	}
-	
-	/* Prepare the packet control-block including the Tx-descriptor. */
-	{
-		CL_TRACE_START_L4();
-		txCtrl_BuildDataPkt(pTxCtrl, pPktCtrlBlk, uAc, uBackpressure);
-		CL_TRACE_END_L4("tiwlan_drv.ko", "INHERIT", "TX", ".FillCtrlBlk");
-	}
-
-	/* Call the Tx-Xfer to start packet transfer to the FW and return its result. */
-	{
-		CL_TRACE_START_L4();
-		eStatus = TWD_txXfer_SendPacket (pTxCtrl->hTWD, pPktCtrlBlk);
-		CL_TRACE_END_L4("tiwlan_drv.ko", "INHERIT", "TX", ".XferSendPacket");
-	}
-
-	if (eStatus == TXN_STATUS_ERROR)
-	{
-#ifdef TI_DBG  
-TRACE2(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, "txCtrl_XmitData(): Xfer Error, queue = %d, Status = %d\n", uAc, eStatus);
-		pTxCtrl->dbgCounters.dbgNumPktsError[uAc]++;	
-#endif
-
-		/* Free the packet resources (packet and CtrlBlk)  */
-        txCtrl_FreePacket (pTxCtrl, pPktCtrlBlk, TI_NOK);
-
-		CL_TRACE_END_L3("tiwlan_drv.ko", "INHERIT", "TX", "");
-		return STATUS_XMIT_ERROR;
-	}
-
-#ifdef TI_DBG  
-    pTxCtrl->dbgCounters.dbgNumPktsSuccess[uAc]++;	
-#endif
-    CL_TRACE_END_L3("tiwlan_drv.ko", "INHERIT", "TX", "");
-    return STATUS_XMIT_SUCCESS;
-}
-
-
-/*******************************************************************************
-*                          txCtrl_XmitMgmt		                               *
-********************************************************************************
-* DESCRIPTION:  Get a packet from the Mgmt-Queue (management, EAPOL or IAPP), 
-*				  allocate HW resources and CtrlBlk, build header if Ethernet (EAPOL),
-*				  build descriptor, and send packet to HW by TxXfer.
-*
-* RETURNS:      STATUS_XMIT_SUCCESS - Packet sent succesfully.
-*				STATUS_XMIT_BUSY - Packet dropped due to lack of HW resources, retransmit later.
-*				STATUS_XMIT_ERROR - Packet dropped due to an unexpected problem (bug).
-********************************************************************************/
-TI_STATUS txCtrl_XmitMgmt (TI_HANDLE hTxCtrl, TTxCtrlBlk *pPktCtrlBlk)
-{
-    txCtrl_t   *pTxCtrl = (txCtrl_t *)hTxCtrl;
-	ETxnStatus eStatus;      /* The Xfer return value (different than this function's return values). */
-	TI_UINT32  uAc;  /* The AC selected for the packet transmission. */
-	TI_UINT32  uBackpressure = 0;/* HwQueue's indication when the current queue becomes busy. */
-    ETxHwQueStatus eHwQueStatus;
-
-	/* Get an admitted AC corresponding to the packet TID. 
-	 * If downgraded due to admission limitation, the TID is downgraded as well. 
-	 */
-	SELECT_AC_FOR_TID (pTxCtrl, pPktCtrlBlk->tTxDescriptor.tid, uAc);
-
-#ifdef TI_DBG
-	pTxCtrl->dbgCounters.dbgNumPktsSent[uAc]++;
-#endif
-
-	/* Call TxHwQueue for Hw resources allocation. */
-   	eHwQueStatus = TWD_txHwQueue_AllocResources (pTxCtrl->hTWD, pPktCtrlBlk);
-
-	/* If the used AC can't get more packets, stop it in mgmt-queue module. */
-	if (eHwQueStatus == TX_HW_QUE_STATUS_STOP_NEXT)
-	{
-#ifdef TI_DBG
-		pTxCtrl->dbgCounters.dbgNumPktsBackpressure[uAc]++;
-        TRACE2(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, "txCtrl_XmitMgmt(): Backpressure = 0x%x, queue = %d\n", uBackpressure, uAc);
-#endif
-        uBackpressure = 1 << uAc;
-		pTxCtrl->busyAcBitmap |= uBackpressure; /* Set the busy bit of the current AC. */
-		txMgmtQ_StopQueue (pTxCtrl->hTxMgmtQ, pTxCtrl->admittedAcToTidMap[uAc]);
-	}
-
-	/* If current packet can't be transmitted due to lack of resources, return with BUSY value. */
-	else if (eHwQueStatus == TX_HW_QUE_STATUS_STOP_CURRENT)
-	{
-#ifdef TI_DBG
-		pTxCtrl->dbgCounters.dbgNumPktsBusy[uAc]++;
-        TRACE1(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, "txCtrl_XmitMgmt(): Queue busy - Packet dropped, queue = %d\n", uAc);
-#endif
-		txMgmtQ_StopQueue (pTxCtrl->hTxMgmtQ, pTxCtrl->admittedAcToTidMap[uAc]);
-		return STATUS_XMIT_BUSY;
-	}
-	
-	/* Prepare the packet control-block including the Tx-descriptor. */
-	txCtrl_BuildMgmtPkt (pTxCtrl, pPktCtrlBlk, uAc);
-    
-	/* Call the Tx-Xfer to start packet transfer to the FW and return the result. */
-	eStatus = TWD_txXfer_SendPacket (pTxCtrl->hTWD, pPktCtrlBlk);
-
-	if (eStatus == TXN_STATUS_ERROR)
-	{
-#ifdef TI_DBG  
-TRACE1(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, "txCtrl_XmitMgmt(): Xfer Error, Status = %d\n", eStatus);
-		pTxCtrl->dbgCounters.dbgNumPktsError[uAc]++;	
-#endif
-		/* Free the packet resources (packet and CtrlBlk)  */
-        txCtrl_FreePacket (pTxCtrl, pPktCtrlBlk, TI_NOK);
-		return STATUS_XMIT_ERROR;
-	}
-
-#ifdef TI_DBG  
-    pTxCtrl->dbgCounters.dbgNumPktsSuccess[uAc]++;	
-#endif
-    return STATUS_XMIT_SUCCESS;
-}
-
-
-/***************************************************************************
-*                           txCtrl_UpdateQueuesMapping 
-****************************************************************************
-* DESCRIPTION:  This function should be called upon the following events:
-*					1) Init
-*					2) ACs admission required change (upon association)
-*					3) ACs admission state change (upon association and add/delete Tspec).
-*				It updates the following mappings (by this oredr!):
-*					1) Update mapping from requested-AC to highest-admitted-AC.
-*					2) Update mapping from actual-AC to requested-TID (for backpressure mapping).
-*					3) Update TID-backpressure bitmap, and if changed update data-queue and mgmt-queue.
-*
-***************************************************************************/
-void txCtrl_UpdateQueuesMapping (TI_HANDLE hTxCtrl)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-	
-	/* Update mapping from requested-AC to highest-admitted-AC. */
-	txCtrl_UpdateHighestAdmittedAcTable (pTxCtrl);
-
-	/* Update mapping from actual-AC to requested-TID (for backpressure mapping). */
-	txCtrl_UpdateAcToTidMapping (pTxCtrl);
-
-	/* Update TID-backpressure bitmap, and if changed update data-queue and mgmt-queue. */
-	txCtrl_UpdateBackpressure (pTxCtrl, 0);
-}
-
-
-/***************************************************************************
-*                           txCtrl_AllocPacketBuffer
-****************************************************************************
-* DESCRIPTION:  Allocate a raw buffer for the whole Tx packet.
-                Used for driver generated packets and when the OAL needs to 
-                    copy the packet to a new buffer (e.g. to gather multiple buffers). 
-***************************************************************************/
-void *txCtrl_AllocPacketBuffer (TI_HANDLE hTxCtrl, TTxCtrlBlk *pPktCtrlBlk, TI_UINT32 uPacketLen)
-{
-    txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-    void     *pRawBuf = os_memoryAlloc (pTxCtrl->hOs, uPacketLen);
-
-    if (pRawBuf) 
-    {
-        /* Indicate that the packet is in a raw buffer (i.e. not OS packet) and save its address and length */
-        pPktCtrlBlk->tTxPktParams.uFlags |= TX_CTRL_FLAG_PKT_IN_RAW_BUF;
-        
-        /* Save buffer address and length for the free operation */
-        pPktCtrlBlk->tTxPktParams.pInputPkt    = pRawBuf;
-        pPktCtrlBlk->tTxPktParams.uInputPktLen = uPacketLen;
-        
-        TRACE2(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, "txCtrl_AllocPacketBuffer(): pRawBuf = 0x%x, uPacketLen = %d\n", pRawBuf, uPacketLen);
-    } 
-    else 
-    {
-        TRACE1(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, "txCtrl_AllocPacketBuffer(): uPacketLen = %d, returning NULL\n", uPacketLen);
-    }
-
-    return pRawBuf;
-}
-
-
-/***************************************************************************
-*                           txCtrl_FreePacket 
-****************************************************************************
-* DESCRIPTION:  Free the packet resources, including the packet and the CtrlBlk 
-***************************************************************************/
-void txCtrl_FreePacket (TI_HANDLE hTxCtrl, TTxCtrlBlk *pPktCtrlBlk, TI_STATUS eStatus)
-{
-    txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-    TRACE3(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, "txCtrl_FreePacket(): RawBufFlag = 0x%x, pBuf = 0x%x, Len = %d\n", (pPktCtrlBlk->tTxPktParams.uFlags & TX_CTRL_FLAG_PKT_IN_RAW_BUF), pPktCtrlBlk->tTxPktParams.pInputPkt, pPktCtrlBlk->tTxPktParams.uInputPktLen);
-
-    /* If the packet is in a raw buffer, free its memory */
-    if (pPktCtrlBlk->tTxPktParams.uFlags & TX_CTRL_FLAG_PKT_IN_RAW_BUF)
-    {
-        os_memoryFree (pTxCtrl->hOs, 
-                       pPktCtrlBlk->tTxPktParams.pInputPkt, 
-                       pPktCtrlBlk->tTxPktParams.uInputPktLen);
-    }
-    /* If the original packet is in OS format, call the OAL to free it */
-    else 
-    {
-        wlanDrvIf_FreeTxPacket (pTxCtrl->hOs, pPktCtrlBlk, eStatus);
-    }
-
-    /* Free the CtrlBlk */
-    TWD_txCtrlBlk_Free (pTxCtrl->hTWD, pPktCtrlBlk);
-}
-
-
-
-/********************************************************************************
-*																				*
-*                       LOCAL  FUNCTIONS  IMPLEMENTATION						*
-*																				*
-*********************************************************************************/
-
-
-/*************************************************************************
-*                        txCtrl_TxCompleteCb		                             *
-**************************************************************************
-* DESCRIPTION:  Called by the TWD upon Tx-complete of one packet.
-*				Handle packet result:
-*				- Update counters (statistics and medium-usage)
-*				- Free the packet resources (Wbuf and CtrlBlk)
-*
-* INPUT:    hTWD -  The Tnetw-Driver handle.
-*		    pTxResultInfo - The packet's Tx result information.   
-*              
-*************************************************************************/
-static void txCtrl_TxCompleteCb (TI_HANDLE hTxCtrl, TxResultDescriptor_t *pTxResultInfo)
-{
-    txCtrl_t    *pTxCtrl = (txCtrl_t *)hTxCtrl;
-	TTxCtrlBlk  *pPktCtrlBlk;
-	TI_UINT32	ac;
-	TI_BOOL	    bIsDataPkt;
-	CL_TRACE_START_L3();
-
-	/* Get packet ctrl-block by desc-ID. */
-	pPktCtrlBlk = TWD_txCtrlBlk_GetPointer (pTxCtrl->hTWD, pTxResultInfo->descID);
-	ac = WMEQosTagToACTable[pPktCtrlBlk->tTxDescriptor.tid];
-
-#ifdef TI_DBG
-	/* If the pointed entry is already free, print error and exit (not expected to happen). */
-	if (pPktCtrlBlk->pNextFreeEntry != NULL)
-	{
-TRACE2(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, "txCtrl_TxCompleteCb(): Pkt already free!!, DescID=%d, AC=%d\n", pTxResultInfo->descID, ac);
-		CL_TRACE_END_L3("tiwlan_drv.ko", "INHERIT", "TX_Cmplt", "");
-		return;
-	}
-TRACE3(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, "txCtrl_TxCompleteCb(): Pkt Tx Complete, DescID=%d, AC=%d, Status=%d\n", pTxResultInfo->descID, ac, pTxResultInfo->status);
-#endif
-	/* Update the TKIP/AES sequence-number according to the Tx data packet security-seq-num. */
-	/* Note: The FW always provides the last used seq-num so no need to check if the current 
-			 packet is data and WEP is on. */
-	TWD_SetSecuritySeqNum (pTxCtrl->hTWD, pTxResultInfo->lsbSecuritySequenceNumber);
-
-	bIsDataPkt = ( (pPktCtrlBlk->tTxPktParams.uPktType == TX_PKT_TYPE_ETHER) || 
-		           (pPktCtrlBlk->tTxPktParams.uPktType == TX_PKT_TYPE_WLAN_DATA) );
-
-#ifdef XCC_MODULE_INCLUDED    
-	/* If it's a XCC link-test packet, call its handler. */
-	if (pPktCtrlBlk->tTxPktParams.uFlags & TX_CTRL_FLAG_LINK_TEST)
-    {
-        CL_TRACE_START_L4();
-        XCCMngr_LinkTestRetriesUpdate (pTxCtrl->hXCCMngr, pTxResultInfo->ackFailures);
-        CL_TRACE_END_L4("tiwlan_drv.ko", "INHERIT", "TX_Cmplt", ".XCCLinkTest");
-    }
-#endif
-
-	/* Add the medium usage time for the specific queue. */
-	pTxCtrl->totalUsedTime[ac] += (TI_UINT32)ENDIAN_HANDLE_WORD(pTxResultInfo->mediumUsage);
-
-	/* update TX counters for txDistributer */
-    {
-        CL_TRACE_START_L4();
-        txCtrl_UpdateTxCounters (pTxCtrl, pTxResultInfo, pPktCtrlBlk, ac, bIsDataPkt);
-        CL_TRACE_END_L4("tiwlan_drv.ko", "INHERIT", "TX_Cmplt", ".Cntrs");
-    }
-
-	/* Free the packet resources (packet and CtrlBlk)  */
-    txCtrl_FreePacket (pTxCtrl, pPktCtrlBlk, TI_OK);
-
-	CL_TRACE_END_L3("tiwlan_drv.ko", "INHERIT", "TX_Cmplt", "");
-}
-
-
-/***************************************************************************
-*                   txCtrl_BuildDataPktHdr                                 *
-****************************************************************************
-* DESCRIPTION:  this function builds the WLAN header from ethernet format, 
-*               including 802.11-MAC, LLC/SNAP, security padding, alignment padding.
-*
-* INPUTS:       hTxCtrl - the object
-*               pPktCtrlBlk - data packet control block (Ethernet header)
-*
-* RETURNS:      uHdrAlignPad - Num of bytes (0 or 2) added at the header's beginning for 4-bytes alignment.
-***************************************************************************/
-
-TI_UINT32 txCtrl_BuildDataPktHdr (TI_HANDLE hTxCtrl, TTxCtrlBlk *pPktCtrlBlk, AckPolicy_e eAckPolicy)
-{
-    txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;    
-    TEthernetHeader     *pEthHeader;
-    dot11_header_t      *pDot11Header;
-    Wlan_LlcHeader_T    *pWlanSnapHeader;
-	EHeaderConvertMode	eQosMode = pTxCtrl->headerConverMode;
-	TI_UINT32			uHdrLen = 0;
-	TI_UINT32			uHdrAlignPad = 0;
-	TI_UINT16			uQosControl;
-	TI_UINT16			fc = 0;
- 	TI_UINT16           typeLength;
-
-
-	/* 
-	 * Handle encryption if needed, for data or EAPOL (decision was done at RSN):
-	 *   - Set WEP bit in header.
-	 *   - Add padding for FW security overhead: 4 bytes for TKIP, 8 for AES.
-	 */
-
-       	if (( (pPktCtrlBlk->tTxPktParams.uPktType == TX_PKT_TYPE_EAPOL)
-			  &&
-			  pTxCtrl->eapolEncryptionStatus) 
-		 ||
-			((pPktCtrlBlk->tTxPktParams.uPktType != TX_PKT_TYPE_EAPOL)
-			  &&
-			  pTxCtrl->currentPrivacyInvokedMode ))
-        {
-			fc |= DOT11_FC_WEP;
-			uHdrLen += pTxCtrl->encryptionFieldSize;
-			uHdrAlignPad = pTxCtrl->encryptionFieldSize % 4;
-	}
-
-	/*
-	 * Handle QoS if needed:
-	 */
-    if (eQosMode == HDR_CONVERT_QOS)
-	{
-		uHdrAlignPad = (uHdrAlignPad + HEADER_PAD_SIZE) % 4; /* Add 2 bytes pad at the header beginning for 4 bytes alignment. */
-		pDot11Header = (dot11_header_t *)&(pPktCtrlBlk->aPktHdr[uHdrAlignPad]);
-		uHdrLen += WLAN_QOS_HDR_LEN;
-
-        /* add empty 4Byte for HT control field set via the FW */
-        if (pTxCtrl->tTxCtrlHtControl.bHtEnable == TI_TRUE)
-        {
-            uHdrLen += WLAN_QOS_HT_CONTROL_FIELD_LEN;
-            fc |= DOT11_FC_ORDER;
-        }
-
-		/* Set Qos control fields. */
-		uQosControl = (TI_UINT16)(pPktCtrlBlk->tTxDescriptor.tid); 
-		if ( TI_UNLIKELY(eAckPolicy == ACK_POLICY_NO_ACK) )
-			uQosControl |= DOT11_QOS_CONTROL_DONT_ACK;
-		COPY_WLAN_WORD(&pDot11Header->qosControl, &uQosControl); /* copy with endianess handling. */
-	}
-	else  /* No QoS (legacy header, padding is not needed). */
-	{
-		pDot11Header = (dot11_header_t *)&(pPktCtrlBlk->aPktHdr[uHdrAlignPad]);
-		uHdrLen += WLAN_HDR_LEN;
-	}
-	uHdrLen += uHdrAlignPad;
-
-    /* Before the header translation the first buf-pointer points to the Ethernet header. */	
-	pEthHeader = (TEthernetHeader *)(pPktCtrlBlk->tTxnStruct.aBuf[0]);
-
-    if (TI_UNLIKELY(MAC_MULTICAST(pEthHeader->dst)))
-    {
-        pPktCtrlBlk->tTxPktParams.uFlags |= TX_CTRL_FLAG_MULTICAST;
-        if (MAC_BROADCAST(pEthHeader->dst))
-        {
-            pPktCtrlBlk->tTxPktParams.uFlags |= TX_CTRL_FLAG_BROADCAST;
-        }
-    }
-
-	/* Set MAC header fields for Independent-BSS case. */
-    if ( TI_UNLIKELY(pTxCtrl->currBssType == BSS_INDEPENDENT) )
-    {
-        MAC_COPY (pDot11Header->address1, pEthHeader->dst);
-        MAC_COPY (pDot11Header->address2, pEthHeader->src);
-        MAC_COPY (pDot11Header->address3, pTxCtrl->currBssId);
-
-        if (eQosMode == HDR_CONVERT_QOS)
-            fc |= DOT11_FC_DATA_QOS;
-        else
-            fc |= DOT11_FC_DATA;
-    }
-
-	/* Set MAC header fields for Infrastructure-BSS case. */
-    else
-    {
-        MAC_COPY (pDot11Header->address1, pTxCtrl->currBssId);
-        MAC_COPY (pDot11Header->address2, pEthHeader->src);
-        MAC_COPY (pDot11Header->address3, pEthHeader->dst);
-
-        if (eQosMode == HDR_CONVERT_QOS)
-            fc |= DOT11_FC_DATA_QOS | DOT11_FC_TO_DS;
-        else
-            fc |= DOT11_FC_DATA | DOT11_FC_TO_DS;
-    }
-
-	COPY_WLAN_WORD(&pDot11Header->fc, &fc); /* copy with endianess handling. */
-	
-    /* Set the SNAP header pointer right after the other header parts handled above. */
-    pWlanSnapHeader = (Wlan_LlcHeader_T *)&(pPktCtrlBlk->aPktHdr[uHdrLen]);
-    
-	typeLength = HTOWLANS(pEthHeader->type);
-
-    /* Detect the packet type and decide if to create a     */
-    /*          new SNAP or leave the original LLC.         */
-    /*------------------------------------------------------*/
-   	if( typeLength > ETHERNET_MAX_PAYLOAD_SIZE )
-    {
-        /* Create the SNAP Header:     */
-        /*-----------------------------*/
-        /*
-         * Make a working copy of the SNAP header
-         * initialised to zero
-         */
-		
-        pWlanSnapHeader->DSAP = SNAP_CHANNEL_ID;
-        pWlanSnapHeader->SSAP = SNAP_CHANNEL_ID;
-        pWlanSnapHeader->Control = LLC_CONTROL_UNNUMBERED_INFORMATION;
-
-        /* Check to see if the Ethertype matches anything in the translation     */
-        /* table (Appletalk AARP or DixII/IPX).  If so, add the 802.1h           */
-        /* SNAP.                                                                 */
-
-        if(( ETHERTYPE_APPLE_AARP == typeLength ) ||
-           ( ETHERTYPE_DIX_II_IPX == typeLength ))
-        {
-            /* Fill out the SNAP Header with 802.1H extention   */
-            pWlanSnapHeader->OUI[0] = SNAP_OUI_802_1H_BYTE0;
-			pWlanSnapHeader->OUI[1] = SNAP_OUI_802_1H_BYTE1;
-			pWlanSnapHeader->OUI[2] = SNAP_OUI_802_1H_BYTE2;
-
-        }
-        else
-        {
-            /* otherwise, add the RFC1042 SNAP   */
-    		pWlanSnapHeader->OUI[0] = SNAP_OUI_RFC1042_BYTE0;
-			pWlanSnapHeader->OUI[1] = SNAP_OUI_RFC1042_BYTE0;
-			pWlanSnapHeader->OUI[2] = SNAP_OUI_RFC1042_BYTE0;
-        }
-
-        /* set type length */
-        pWlanSnapHeader->Type = pEthHeader->type;
-    
-        /* Add the SNAP length to the total header length. */
-        uHdrLen += sizeof(Wlan_LlcHeader_T);
-    }
-
-    /* Replace first buffer pointer and length to the descriptor and WLAN-header (instead of Ether header) */
-    pPktCtrlBlk->tTxnStruct.aBuf[0] = (TI_UINT8 *)&(pPktCtrlBlk->tTxDescriptor);
-    pPktCtrlBlk->tTxnStruct.aLen[0] = sizeof(TxIfDescriptor_t) + uHdrLen;
-    pPktCtrlBlk->tTxDescriptor.length += pPktCtrlBlk->tTxnStruct.aLen[0] - ETHERNET_HDR_LEN;
-
-	/* Return the number of bytes (0 or 2) added at the header's beginning for 4-bytes alignment. */
-    return uHdrAlignPad;
-}
-
-
-/***************************************************************************
-*                       txCtrl_BuildDataPkt                            
-****************************************************************************
-* DESCRIPTION:  Prepare the Data packet control-block including the Tx-descriptor.
-***************************************************************************/
-static void txCtrl_BuildDataPkt (txCtrl_t *pTxCtrl, TTxCtrlBlk *pPktCtrlBlk, 
-                                 TI_UINT32 uAc, TI_UINT32 uBackpressure)
-{
-	TI_UINT32 uHdrAlignPad; /* Num of bytes added between Tx-descriptor and header for 4 bytes alignment (0 or 2). */
-    TI_UINT16 uLastWordPad; /* Num of bytes added at the end of the packet for 4 bytes alignment */
-	TI_UINT16 uTxDescAttr;
-	AckPolicy_e eAckPolicy = pTxCtrl->ackPolicy[uAc];
-
-	/* Build packet header (including MAC, LLC/SNAP, security padding, header alignment padding). */
-    uHdrAlignPad = txCtrl_BuildDataPktHdr ((TI_HANDLE)pTxCtrl, pPktCtrlBlk, eAckPolicy);
-
-	/* Update packet length in the descriptor according to HW interface requirements */
-    uLastWordPad = txCtrl_TranslateLengthToFw (pPktCtrlBlk);
-
-    /* Set the descriptor attributes */
-	uTxDescAttr  = pTxCtrl->dataPktDescAttrib;
-    uTxDescAttr |= uLastWordPad << TX_ATTR_OFST_LAST_WORD_PAD;
-	uTxDescAttr |= pTxCtrl->dataRatePolicy[uAc] << TX_ATTR_OFST_RATE_POLICY;
-	if (uHdrAlignPad)
-	{
-		uTxDescAttr |= TX_ATTR_HEADER_PAD;
-	}
-	if (uBackpressure)
-    {
-		uTxDescAttr |= TX_ATTR_TX_CMPLT_REQ;  /* Request immediate Tx-Complete from FW if the AC is busy */
-    }
-    if (TI_UNLIKELY(pTxCtrl->currBssType == BSS_INDEPENDENT) &&
-        (pPktCtrlBlk->tTxPktParams.uFlags & TX_CTRL_FLAG_MULTICAST))
-	{
-        /* If packet is Broadcast in IBSS, overwrite rate policy with mgmt value. */
-		uTxDescAttr &= ~TX_ATTR_RATE_POLICY;
-		uTxDescAttr |= pTxCtrl->mgmtRatePolicy[uAc] << TX_ATTR_OFST_RATE_POLICY;
-	}
-	pPktCtrlBlk->tTxDescriptor.txAttr = ENDIAN_HANDLE_WORD(uTxDescAttr); 
-
-    /* Translate packet timestamp to FW time (also updates lifeTime and driverHandlingTime) */
-    txCtrl_TranslateTimeToFw (pTxCtrl, pPktCtrlBlk, pTxCtrl->aMsduLifeTimeTu[uAc]);
-
-    /* Indicate that the packet is transfered to the FW, and the descriptor fields are in FW format! */
-    pPktCtrlBlk->tTxPktParams.uFlags |= TX_CTRL_FLAG_SENT_TO_FW;
-
-#ifdef TI_DBG  
-	pTxCtrl->dbgPktSeqNum++;
-	pTxCtrl->dbgCounters.dbgNumPktsXfered[uAc]++;	/* Count packets sent to Xfer. */
-#endif
-}
-
-
-/***************************************************************************
-*                       txCtrl_BuildMgmtPkt                            
-****************************************************************************
-* DESCRIPTION:  Prepare the Mgmt-Queue packet control-block including the Tx-descriptor.
-***************************************************************************/
-static void txCtrl_BuildMgmtPkt (txCtrl_t *pTxCtrl, TTxCtrlBlk *pPktCtrlBlk, TI_UINT32 uAc)
-{
-	TI_UINT32 uHdrAlignPad; /* Num of bytes added between Tx-descriptor and header for alignment (0 or 2). */
-    TI_UINT16 uLastWordPad; /* Num of bytes added at the end of the packet for 4 bytes alignment */
-	TI_UINT16 uTxDescAttr;
-	TI_UINT16 uRatePolicy;
-	TI_UINT8  uPktType = pPktCtrlBlk->tTxPktParams.uPktType;
-	dot11_header_t *pDot11Header;
-	
-	/* If EAPOL packet (Ethernet), build header (including MAC,SNAP,security pad & alignment pad). */
-	if (uPktType == TX_PKT_TYPE_EAPOL)
-	{
-        uHdrAlignPad = txCtrl_BuildDataPktHdr ((TI_HANDLE)pTxCtrl, pPktCtrlBlk, ACK_POLICY_LEGACY);
-
-		uRatePolicy = pTxCtrl->dataRatePolicy[uAc];
-	}
-
-	/*  Other types are already in WLAN format so copy header from Wbuf to Ctrl-Blk. */
-	else         
-	{
-		TI_UINT32 uHdrLen = pPktCtrlBlk->tTxnStruct.aLen[0];
-		TI_UINT32 uHdrLenDelta; /* Add the header pad (2 bytes) and Tx-Descriptor length */
-
-		/*  
-         * Update the length fields to include the header pad and the Tx-Descriptor.
-         * Note: The mgmt-queue provides the header length without the alignment pad, so if 
-		 *       it's not 4-byte aligned, a 2-bytes pad was added at the header beginning. 
-		 */
-		uHdrAlignPad = (uHdrLen & ALIGN_4BYTE_MASK) ? HEADER_PAD_SIZE : 0;  
-        uHdrLenDelta = uHdrAlignPad + sizeof(TxIfDescriptor_t);
-        pPktCtrlBlk->tTxnStruct.aBuf[0]   -= uHdrLenDelta;
-        pPktCtrlBlk->tTxnStruct.aLen[0]   += uHdrLenDelta;
-        pPktCtrlBlk->tTxDescriptor.length += uHdrLenDelta;
-		
-		uRatePolicy = pTxCtrl->mgmtRatePolicy[uAc];
-
-        if (uPktType == TX_PKT_TYPE_WLAN_DATA)  
-		{
-			/* If QoS mode, update TID in QoS header in case it was downgraded. */
-			/* Note: Qos-hdr update for EAPOL is done in txCtrl_BuildDataPktHeader() and doesn't exist in mgmt. */
-			if (pTxCtrl->headerConverMode == HDR_CONVERT_QOS)
-			{
-				TI_UINT16 tidWord = (TI_UINT16)pPktCtrlBlk->tTxDescriptor.tid;
-				pDot11Header = (dot11_header_t *)&(pPktCtrlBlk->aPktHdr[uHdrAlignPad]);
-				COPY_WLAN_WORD(&pDot11Header->qosControl, &tidWord); /* copy with endianess handling. */
-			}
-		}
-	}
-
-	/* Update packet length in the descriptor according to HW interface requirements */
-    uLastWordPad = txCtrl_TranslateLengthToFw (pPktCtrlBlk);
-
-	/* Set fields in the descriptor attributes bitmap. */
-	uTxDescAttr  = uRatePolicy << TX_ATTR_OFST_RATE_POLICY;
-	uTxDescAttr |= pTxCtrl->txSessionCount << TX_ATTR_OFST_SESSION_COUNTER;
-    uTxDescAttr |= uLastWordPad << TX_ATTR_OFST_LAST_WORD_PAD;
-	uTxDescAttr |= TX_ATTR_TX_CMPLT_REQ;
-	if (uHdrAlignPad)
-    {
-		uTxDescAttr |= TX_ATTR_HEADER_PAD;
-    }
-	pPktCtrlBlk->tTxDescriptor.txAttr = ENDIAN_HANDLE_WORD(uTxDescAttr); 
-
-    /* Translate packet timestamp to FW time (also updates lifeTime and driverHandlingTime) */
-    txCtrl_TranslateTimeToFw (pTxCtrl, pPktCtrlBlk, MGMT_PKT_LIFETIME_TU);
-
-    /* Indicate that the packet is transfered to the FW, and the descriptor fields are in FW format! */
-    pPktCtrlBlk->tTxPktParams.uFlags |= TX_CTRL_FLAG_SENT_TO_FW;
-
-#ifdef TI_DBG  
-	pTxCtrl->dbgPktSeqNum++;
-	pTxCtrl->dbgCounters.dbgNumPktsXfered[uAc]++;	/* Count packets sent to Xfer. */
-#endif
-}
-
-
-/***************************************************************************
-*                           txCtrl_UpdateHighestAdmittedAcTable 
-****************************************************************************
-* DESCRIPTION:  This function updates the table that provides for each requested AC  
-*				  the highest AC that can be currently used, as follows:
-*					If requested AC is admitted use it.
-*					If not, find highest AC below it that doesn't require admission.
-*				This function should be called opon the following events:
-*					1) Init
-*					2) ACs admission required change (upon association)
-*					3) ACs admission state change (upon association and add/delete Tspec).
-*
-***************************************************************************/
-static void txCtrl_UpdateHighestAdmittedAcTable (txCtrl_t *pTxCtrl)
-{
-	int			 inputIdx;
-	int			 outputIdx;
-	EAcTrfcType inputAc;
-	EAcTrfcType outputAc; 
-        
-	/* Loop over all ACs in priority order (BE is higher priority than BK). */
-	for (inputIdx = 0; inputIdx < MAX_NUM_OF_AC; inputIdx++)
-	{
-		inputAc = priorityOrderedAc[inputIdx];
-
-		/* If input AC is admitted, use it. */
-		if(pTxCtrl->admissionState[inputAc] == AC_ADMITTED)
-			pTxCtrl->highestAdmittedAc[inputAc] = inputAc;
-
-		/* If input AC is not admitted, find next highest priority AC that doesn't require admission. */
-		else	
-		{
-			/* Loop from input AC downward by priority order. */
-			for (outputIdx = inputIdx; outputIdx >= 0; outputIdx--)
-			{
-				outputAc = priorityOrderedAc[outputIdx]; /* Get priority ordered AC. */
-
-				/* Break with first (highest) AC that doesn't require admission (we don't want to 
-				 *   redirect traffic to an AC that requires admission even if admitted for other traffic).
-				 */
-				if(pTxCtrl->admissionRequired[outputAc] == ADMISSION_NOT_REQUIRED)
-					break;
-			}
-
-			/* If we've found a valid AC insert it, else use BE as default. */
-			if (outputIdx >= 0)
-				pTxCtrl->highestAdmittedAc[inputAc] = outputAc;
-			else
-				pTxCtrl->highestAdmittedAc[inputAc] = QOS_AC_BE; 
-		}
-	}
-}
-
-
-/***************************************************************************
-*                           txCtrl_UpdateAcToTidMapping 
-****************************************************************************
-* DESCRIPTION:  This function updates the table that provides per each AC  
-*				  a bitmap of the TIDs that are mapped to it when transitting packets.
-*				Note that this mapping considers the ACs admission states.
-*				It is used for mapping ACs backpressure to TIDs (for updating the data/mgmt queues)
-*
-*				This table is updated after txCtrl_UpdateHighestAdmittedAcTable() is called!
-*				It may also effect the backpressure picture seen by the Data-Queue and
-*				  Mgmt-Queue, so they should be updated subsequently.
-*
-***************************************************************************/
-static void txCtrl_UpdateAcToTidMapping (txCtrl_t *pTxCtrl)
-{
-	TI_UINT32	tid;
-	EAcTrfcType inputAc;
-	EAcTrfcType admittedAc; 
-        
-    os_memoryZero(pTxCtrl->hOs, (void *)&(pTxCtrl->admittedAcToTidMap[0]), sizeof(pTxCtrl->admittedAcToTidMap));
-
-	/* Loop over all TIDs. */
-	for (tid = 0; tid < MAX_NUM_OF_802_1d_TAGS; tid++)
-	{
-		/* Find the AC that is used for transmitting this TID. */
-		inputAc = (EAcTrfcType)WMEQosTagToACTable[tid];					/* Standard translation from TID to AC. */
-		admittedAc = pTxCtrl->highestAdmittedAc[inputAc];	/* The actual AC that is used for Tx. */
-
-		/* Set the bit related to the TID in the correlated AC. */
-		pTxCtrl->admittedAcToTidMap[admittedAc] |= 1 << tid;		
-	}
-}
-
-
-/***************************************************************************
-*                           txCtrl_UpdateBackpressure 
-****************************************************************************
-* DESCRIPTION:  This function is called whenever the busy-TIDs bitmap may change, 
-*				  (except on packet-xmit - handled separately for performance). 
-*				This includes:
-*					1) Init
-*					2) ACs admission required change (upon association)
-*					3) ACs admission state change (upon association and add/delete Tspec).
-*					4) Tx-Complete - provides also freed ACs.
-*
-*				It updates the local bitmap, and the data-queue and mgmt-queue.
-*
-***************************************************************************/
-static void txCtrl_UpdateBackpressure (txCtrl_t *pTxCtrl, TI_UINT32 freedAcBitmap)
-{
-	TI_UINT32 busyAcBitmap = pTxCtrl->busyAcBitmap;
-	TI_UINT32 busyTidBitmap = 0;
-	TI_UINT32 ac = 0;
-
-	
-	busyAcBitmap &= ~freedAcBitmap;			/* Clear backpressure bits of freed ACs. */
-	pTxCtrl->busyAcBitmap = busyAcBitmap;	/* Save new bitmap before manipulating it. */
-
-	/* Loop while there are busy ACs. */
-	while (busyAcBitmap)
-	{
-		/* If the AC is busy, add its related TIDs to the total busy TIDs bitmap. */
-		if (busyAcBitmap & 1)
-			busyTidBitmap |= pTxCtrl->admittedAcToTidMap[ac];
-
-		/* Move to next AC. */
-		busyAcBitmap = busyAcBitmap >> 1;
-		ac++;
-	}
-
-    TRACE6(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, "txCtrl_UpdateBackpressure(): busyTidBitmap = 0x%x, busyAcBitmap = 0x%x, HighestAdmittedAc[3,2,1,0] = %d, %d, %d, %d\n", busyTidBitmap, pTxCtrl->busyAcBitmap, pTxCtrl->highestAdmittedAc[3], 		pTxCtrl->highestAdmittedAc[2], pTxCtrl->highestAdmittedAc[1], pTxCtrl->highestAdmittedAc[0]);
-
-	/* Save new bitmap and update the data-queue and mgmt-queue. */
-	pTxCtrl->busyTidBitmap = busyTidBitmap;
-	txDataQ_UpdateBusyMap (pTxCtrl->hTxDataQ, busyTidBitmap);
-	txMgmtQ_UpdateBusyMap (pTxCtrl->hTxMgmtQ, busyTidBitmap);
-}
-
-
-/****************************************************************************
- *                      txCtrl_SetTxDelayCounters()
- ****************************************************************************
- * DESCRIPTION:          Update transmission path delay counters.
-*
-* INPUTS:       hTxCtrl - the object
-*               ac - the AC to count delay for
-*				fwDelay - the time consumed in FW for packet transmission
-*				driverDelay - the time consumed in driver for packet transmission
-*
-* OUTPUT:
-*
-* RETURNS:
- ****************************************************************************/
-
-#ifdef XCC_MODULE_INCLUDED  /* Needed only for XCC-V4 */
-
-static void txCtrl_SetTxDelayCounters (txCtrl_t *pTxCtrl, 
-                                       TI_UINT32 ac, 
-                                       TI_UINT32 fwDelay, 
-                                       TI_UINT32 driverDelay, 
-                                       TI_UINT32 mediumDelay)
-{
-	int     rangeIndex;
-	TI_UINT32  totalTxDelayUsec = fwDelay + driverDelay;
-
-	/* Increment the delay range counter that the current packet Tx delay falls in. */
-	for (rangeIndex = TX_DELAY_RANGE_MIN; rangeIndex <= TX_DELAY_RANGE_MAX; rangeIndex++)
-	{
-		if ( (totalTxDelayUsec >= txDelayRangeStart[rangeIndex]) &&
-			 (totalTxDelayUsec <= txDelayRangeEnd  [rangeIndex]) )
-		{
-			pTxCtrl->txDataCounters[ac].txDelayHistogram[rangeIndex]++;
-			break;
-		}
-	}
-	
-	/* Update total delay and FW delay sums and packets number for average delay calculation. */
-	/* Note: Accumulate Total-Delay in usec to avoid division per packet (convert to msec 
-	         only when results are requested by user). */
-	if (pTxCtrl->SumTotalDelayUs[ac] < 0x7FFFFFFF) /* verify we are not close to the edge. */
-	{
-		pTxCtrl->txDataCounters[ac].NumPackets++; 
-		pTxCtrl->SumTotalDelayUs[ac] += totalTxDelayUsec;   
-        pTxCtrl->txDataCounters[ac].SumFWDelayUs += fwDelay;
-        pTxCtrl->txDataCounters[ac].SumMacDelayUs += mediumDelay;
-	}
-	else  /* If we get close to overflow, restart average accumulation. */
-	{
-		pTxCtrl->txDataCounters[ac].NumPackets = 1; 
-		pTxCtrl->SumTotalDelayUs[ac] = totalTxDelayUsec;   
-        pTxCtrl->txDataCounters[ac].SumFWDelayUs = fwDelay;
-        pTxCtrl->txDataCounters[ac].SumMacDelayUs = mediumDelay;
-	}
-}
-
-#endif /* XCC_MODULE_INCLUDED */
-
-
-
-/***************************************************************************
-*                       txCtrl_UpdateTxCounters                            
-****************************************************************************
-* DESCRIPTION:  Update Tx statistics counters according to the transmitted packet.
-***************************************************************************/
-static void txCtrl_UpdateTxCounters (txCtrl_t *pTxCtrl, 
-                                     TxResultDescriptor_t *pTxResultInfo,
-                                     TTxCtrlBlk *pPktCtrlBlk, 
-                                     TI_UINT32 ac, 
-                                     TI_BOOL bIsDataPkt)
-{
-	TI_UINT32 pktLen;
-    TI_UINT32 dataLen;
-	TI_UINT32 retryHistogramIndex;
-    TI_UINT16 EventMask = 0;
-
-    pktLen = (TI_UINT32)ENDIAN_HANDLE_WORD(pPktCtrlBlk->tTxDescriptor.length);
-    pktLen = pktLen << 2;
-
-#ifdef TI_DBG
-
-	/* update debug counters. */
-	pTxCtrl->dbgCounters.dbgNumTxCmplt[ac]++;
-	if (pTxResultInfo->status == TX_SUCCESS) 
-	{
-		pTxCtrl->dbgCounters.dbgNumTxCmpltOk[ac]++;
-		pTxCtrl->dbgCounters.dbgNumTxCmpltOkBytes[ac] += pktLen;
-	}
-	else
-	{
-		pTxCtrl->dbgCounters.dbgNumTxCmpltError[ac]++;
-
-		if (pTxResultInfo->status == TX_HW_ERROR        ||
-			pTxResultInfo->status == TX_KEY_NOT_FOUND   ||
-			pTxResultInfo->status == TX_PEER_NOT_FOUND)
-		{
-TRACE1(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, "txCtrl_UpdateTxCounters(): TxResult = %d !!!\n", pTxResultInfo->status);
-		}
-        else 
-        {
-TRACE1(pTxCtrl->hReport, REPORT_SEVERITY_WARNING, "txCtrl_UpdateTxCounters(): TxResult = %d !!!\n", pTxResultInfo->status);
-        }
-	}
-
-#endif /* TI_DBG */
-
-	/* If it's not a data packet, exit (the formal statistics are only on network stack traffic). */
-	if ( !bIsDataPkt )
-		return;
-
-	if (pTxResultInfo->status == TX_SUCCESS) 
-	{
-		/* update the retry histogram */
-		retryHistogramIndex = (pTxResultInfo->ackFailures >= TX_RETRY_HISTOGRAM_SIZE) ? 
-							   (TX_RETRY_HISTOGRAM_SIZE - 1) : pTxResultInfo->ackFailures;
-		pTxCtrl->txDataCounters[ac].RetryHistogram[retryHistogramIndex]++;
-
-#ifdef XCC_MODULE_INCLUDED
-		/* update delay histogram */
-		txCtrl_SetTxDelayCounters (pTxCtrl, 
-        						   ac, 
-        						   ENDIAN_HANDLE_LONG(pTxResultInfo->fwHandlingTime), 
-        						   pPktCtrlBlk->tTxPktParams.uDriverDelay, 
-        						   ENDIAN_HANDLE_LONG(pTxResultInfo->mediumDelay));  
-#endif
-
-		if (pTxCtrl->headerConverMode == HDR_CONVERT_QOS)
-        {
-			dataLen = pktLen - (WLAN_WITH_SNAP_QOS_HEADER_MAX_SIZE - ETHERNET_HDR_LEN);
-        }
-        else
-        {
-			dataLen = pktLen - (WLAN_WITH_SNAP_HEADER_MAX_SIZE - ETHERNET_HDR_LEN);
-        }
-
-        if (pPktCtrlBlk->tTxPktParams.uFlags & TX_CTRL_FLAG_MULTICAST)
-        {
-            if (pPktCtrlBlk->tTxPktParams.uFlags & TX_CTRL_FLAG_BROADCAST)
-            {
-                /* Broadcast frame */
-                pTxCtrl->txDataCounters[ac].BroadcastFramesXmit++;
-                pTxCtrl->txDataCounters[ac].BroadcastBytesXmit += dataLen;
-                EventMask |= BROADCAST_BYTES_XFER;
-                EventMask |= BROADCAST_FRAMES_XFER;
-            }
-            else 
-            {
-                /* Multicast Address */
-                pTxCtrl->txDataCounters[ac].MulticastFramesXmit++;
-                pTxCtrl->txDataCounters[ac].MulticastBytesXmit += dataLen;
-                EventMask |= MULTICAST_BYTES_XFER;
-                EventMask |= MULTICAST_FRAMES_XFER;
-            }
-        }
-        else 
-        {
-            /* Save last data Tx rate for applications' query */
-            EHwBitRate eHwTxRate = ENDIAN_HANDLE_LONG((EHwBitRate)(pTxResultInfo->rate)); 
-            rate_PolicyToDrv (eHwTxRate, &pTxCtrl->eCurrentTxRate);
-
-            /* Directed frame statistics */
-            pTxCtrl->txDataCounters[ac].DirectedFramesXmit++;
-            pTxCtrl->txDataCounters[ac].DirectedBytesXmit += dataLen;
-            EventMask |= DIRECTED_BYTES_XFER;
-            EventMask |= DIRECTED_FRAMES_XFER;
-        }
-
-        pTxCtrl->txDataCounters[ac].XmitOk++;
-        EventMask |= XFER_OK;
-
-		/* update the max consecutive retry failures (if needed) */
-		if (pTxCtrl->currentConsecutiveRetryFail > pTxCtrl->txDataCounters[ac].MaxConsecutiveRetryFail)
-        {
-			pTxCtrl->txDataCounters[ac].MaxConsecutiveRetryFail = pTxCtrl->currentConsecutiveRetryFail;
-        }
-		pTxCtrl->currentConsecutiveRetryFail = 0;
-
-		if(pTxCtrl->TxEventDistributor)
-        {
-			DistributorMgr_EventCall(pTxCtrl->TxEventDistributor, EventMask, dataLen);
-        }
-	}
-	else	/* Handle Errors */
-	{
-		/* 
-			NOTE: if the FW sets more then 1 error bit  at a time change the error handling
-			code below 
-		*/
-		if (pTxResultInfo->status == TX_RETRY_EXCEEDED) 
-		{
-			pTxCtrl->txDataCounters[ac].RetryFailCounter++;
-			pTxCtrl->currentConsecutiveRetryFail++;
-		}
-		else if (pTxResultInfo->status == TX_TIMEOUT) 
-		{
-			pTxCtrl->txDataCounters[ac].TxTimeoutCounter++;
-		}
-		else
-		{
-			pTxCtrl->txDataCounters[ac].OtherFailCounter++;
-		}
-	}
-}
-
-
-/***************************************************************************
-*                           txCtrl_notifyFwReset                           *
-****************************************************************************
-* DESCRIPTION:  Go over all CtrlBlk entries and free the active ones including the packet.
-***************************************************************************/
-TI_STATUS txCtrl_NotifyFwReset (TI_HANDLE hTxCtrl)
-{
-	txCtrl_t   *pTxCtrl = (txCtrl_t *)hTxCtrl;
-	TI_UINT32  entry;
-	TTxCtrlBlk *pPktCtrlBlk;
-
-	pTxCtrl->busyAcBitmap = 0; /* clean busy bitmap */
-	txCtrl_UpdateBackpressure(pTxCtrl, 0);
-
-	for (entry = 0; entry < CTRL_BLK_ENTRIES_NUM-1; entry++)
-	{
-		/* Get packet ctrl-block by desc-ID. */
-		pPktCtrlBlk = TWD_txCtrlBlk_GetPointer(pTxCtrl->hTWD, entry);
-		if (pPktCtrlBlk->pNextFreeEntry == 0)
-		{
-		    /* Don't free if the packet still in tx input queues */
-		    if ((pPktCtrlBlk->tTxPktParams.uFlags & TX_CTRL_FLAG_SENT_TO_FW))
-		    {
-		        /* Free the packet resources (packet and CtrlBlk)  */
-		        txCtrl_FreePacket (pTxCtrl, pPktCtrlBlk, TI_NOK);
-		    }
-		}
-	}
-
-	return TI_OK;
-} /* txCtrl_notifyFwReset */
-
-
-/***************************************************************************
-*                           txCtrl_CheckForTxStuck                         *
-****************************************************************************
-* DESCRIPTION:  Check if there are stale packets in the TxCtrlTable. 
-* The criterion for staleness is function of life time (2 times the longest life time)
-* Note that only packets that were not sent to the FW are checked for simplicity!
-***************************************************************************/
-TI_STATUS txCtrl_CheckForTxStuck (TI_HANDLE hTxCtrl)
-{
-	txCtrl_t   *pTxCtrl = (txCtrl_t *)hTxCtrl;
-	TI_UINT32  entry;
-	TTxCtrlBlk *pPktCtrlBlk;
-	TI_UINT32  uPktAge;		/* Time in uSec since packet start time. */
-
-	for (entry = 0; entry < CTRL_BLK_ENTRIES_NUM-1; entry++)
-	{
-		/* Get packet ctrl-block by desc-ID. */
-		pPktCtrlBlk = TWD_txCtrlBlk_GetPointer(pTxCtrl->hTWD, entry);
-
-        /* If entry is in use */
-		if (pPktCtrlBlk->pNextFreeEntry == 0)
-		{
-            /* If the packet wasn't sent to the FW yet (time is in host format) */
-            if ((pPktCtrlBlk->tTxPktParams.uFlags & TX_CTRL_FLAG_SENT_TO_FW) == 0)
-            {
-                /* If packet age is more than twice the maximum lifetime, return NOK */
-                uPktAge = os_timeStampMs (pTxCtrl->hOs) - pPktCtrlBlk->tTxDescriptor.startTime;
-                if (uPktAge > ((MGMT_PKT_LIFETIME_TU << SHIFT_BETWEEN_TU_AND_USEC) * 2))
-                {
-                    return TI_NOK; /* call for recovery */
-                }
-            }
-		}
-	}
-
-	return TI_OK;
-} /* txCtrl_FailureTest */
-
-
-
diff --git a/wl1271/stad/src/Data_link/txCtrl.h b/wl1271/stad/src/Data_link/txCtrl.h
deleted file mode 100644
index b2e0745..0000000
--- a/wl1271/stad/src/Data_link/txCtrl.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * txCtrl.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   txCtrl.h                                                   */
-/*    PURPOSE:  txCtrl module Header file                                  */
-/*                                                                         */
-/***************************************************************************/
-#ifndef _TX_CTRL_H_
-#define _TX_CTRL_H_
-
-
-#include "paramOut.h"
-#include "DataCtrl_Api.h"
-
-
-extern void wlanDrvIf_FreeTxPacket (TI_HANDLE hOs, TTxCtrlBlk *pPktCtrlBlk, TI_STATUS eStatus);
-
-
-#define DEF_TX_PORT_STATUS              CLOSE
-#define DEF_CURRENT_PRIVACY_MODE        TI_FALSE
-#define DEF_EAPOL_ENCRYPTION_STATUS     TI_FALSE
-#define HEADER_PAD_SIZE                 2       /* 2-byte pad before header with QoS, for 4-byte alignment */
-#define MGMT_PKT_LIFETIME_TU            2000    /* Mgmt pkts lifetime in TUs (1024 usec). */
-
-/* defined in qosMngr.c - standard WMM translation from TID to AC. */
-extern int WMEQosTagToACTable[MAX_NUM_OF_802_1d_TAGS];
-extern const TI_UINT8 WMEQosAcToTid[MAX_NUM_OF_AC];
-
-/* The TX delay histogram ranges start and end in uSec. */
-static const TI_UINT32 txDelayRangeStart[TX_DELAY_RANGES_NUM] = {    0,  1000, 10000, 20000, 40000, 60000,  80000, 100000, 200000 };
-static const TI_UINT32 txDelayRangeEnd  [TX_DELAY_RANGES_NUM] = { 1000, 10000, 20000, 40000, 60000, 80000, 100000, 200000, 0xFFFFFFFF };
-
-/* BE is ordered here above BK for priority sensitive functions (BE is 0 but has higher priority than BK). */
-static const EAcTrfcType priorityOrderedAc[] = {QOS_AC_BK, QOS_AC_BE, QOS_AC_VI, QOS_AC_VO};
-
-typedef struct 
-{
-    TI_UINT32  dbgNumPktsSent[MAX_NUM_OF_AC];       /* Pkts sent by data-queue or mgmt-queue. */
-    TI_UINT32  dbgNumPktsBackpressure[MAX_NUM_OF_AC];/* Pkts for which backpressure was set by HW-Q */
-    TI_UINT32  dbgNumPktsBusy[MAX_NUM_OF_AC];      /* Pkts for which busy was received from HW-Q */
-    TI_UINT32  dbgNumPktsXfered[MAX_NUM_OF_AC];    /* Pkts sent to Xfer */
-    TI_UINT32  dbgNumPktsSuccess[MAX_NUM_OF_AC];   /* Pkts for which success was received from Xfer */
-    TI_UINT32  dbgNumPktsPending[MAX_NUM_OF_AC];   /* Pkts for which pending was received from Xfer */
-    TI_UINT32  dbgNumPktsError[MAX_NUM_OF_AC];     /* Pkts for which error was received from Xfer */
-    TI_UINT32  dbgNumTxCmplt[MAX_NUM_OF_AC];        /* Pkts that reached complete CB */
-    TI_UINT32  dbgNumTxCmpltOk[MAX_NUM_OF_AC];     /* Pkts that reached complete CB with status TI_OK */
-    TI_UINT32  dbgNumTxCmpltError[MAX_NUM_OF_AC];  /* Pkts that reached complete CB with status TI_NOK */
-    TI_UINT32  dbgNumTxCmpltOkBytes[MAX_NUM_OF_AC];/* Acknowledged bytes (complete status TI_OK) */
-    TI_UINT32  dbgNumXferCmplt;                    /* Number of Xfer-Complete events (after pending). */
-} txDataDbgCounters_t;
-
-
-
-/* 
- *  Module object structure. 
- */
-typedef struct 
-{
-    /* Handles */
-    TI_HANDLE           hOs;
-    TI_HANDLE           hReport;
-    TI_HANDLE           hCtrlData;
-    TI_HANDLE           hTWD;
-    TI_HANDLE           hTxDataQ;
-    TI_HANDLE           hTxMgmtQ;
-    TI_HANDLE           hEvHandler;
-    TI_HANDLE           TxEventDistributor;
-    TI_HANDLE           hHealthMonitor;
-    TI_HANDLE           hTimer;
-    TI_HANDLE           hStaCap;
-    TI_HANDLE           hXCCMngr;
-    TI_HANDLE           hQosMngr;
-    TI_HANDLE           hRxData;
-
-    TI_HANDLE           hCreditTimer;   /* The medium-usage credit timer handle */
-
-    /* External parameters */
-    EHeaderConvertMode  headerConverMode;  /* QoS header needed for data or not. */
-    TI_BOOL             currentPrivacyInvokedMode;
-    TI_BOOL             eapolEncryptionStatus;
-    TI_UINT8            encryptionFieldSize;  /* size to reserve in WLAN header for encryption */
-    ScanBssType_e       currBssType;
-    TMacAddr            currBssId;
-    TI_UINT16           aMsduLifeTimeTu[MAX_NUM_OF_AC];
-    AckPolicy_e         ackPolicy[MAX_NUM_OF_AC];
-    TtxCtrlHtControl    tTxCtrlHtControl;
-	TI_UINT16           genericEthertype;
-
-    /* ACs admission and busy mapping */
-    TI_UINT32           busyAcBitmap;   /* Current bitmap of busy ACs (in HW-Q backpressure format). */
-    TI_UINT32           busyTidBitmap;  /* Current bitmap of busy TIDs reflected from admitted ACs. */
-    TI_UINT32           admittedAcToTidMap[MAX_NUM_OF_AC]; /* From HW-AC to bitmap of TIDs that currently use it. */
-    EAcTrfcType         highestAdmittedAc[MAX_NUM_OF_AC]; /* Provide highest admitted AC equal or below given AC. */
-    ETrafficAdmState    admissionState[MAX_NUM_OF_AC];    /* AC is allowed to transmit or not. */
-    EAdmissionState     admissionRequired[MAX_NUM_OF_AC]; /* AC requires AP's admission or not. */
-
-    /* Tx Attributes */
-    TI_UINT32           mgmtRatePolicy[MAX_NUM_OF_AC];  /* Current rate policy for mgmt packets per AC. */
-    TI_UINT32           dataRatePolicy[MAX_NUM_OF_AC];  /* Current rate policy for data packets per AC. */
-    TI_UINT16           txSessionCount;     /* Current Tx-Session index as configured to FW in last Join command. */
-    TI_UINT16           dataPktDescAttrib;  /* A prototype of Tx-desc attrib bitmap for data pkts. */
-    TI_UINT8            dbgPktSeqNum;       /* Increment every tx-pkt, insert in descriptor for debug. */
-
-    /* Counters */
-    TTxDataCounters     txDataCounters[MAX_NUM_OF_AC]; /* Save Tx statistics per Tx-queue. */
-    TI_UINT32           SumTotalDelayUs[MAX_NUM_OF_AC]; /* Store pkt delay sum in Usecs to avoid divide per 
-                                                            pkt, and covert to msec on user request. */
-    TI_UINT32           currentConsecutiveRetryFail; /* current consecutive number of tx failures due to max retry */
-    ERate               eCurrentTxRate;                 /* Save last data Tx rate for applications' query */
-
-    /* credit calculation parameters */
-	TI_BOOL				bCreditCalcTimerEnabled;        /* credit timer is enabled from registry */
-	TI_BOOL				bCreditCalcTimerRunning;        /* credit calculation timer is running */
-    TI_UINT32           creditCalculationTimeout;
-    TI_INT32            lowMediumUsageThreshold[MAX_NUM_OF_AC];
-    TI_INT32            highMediumUsageThreshold[MAX_NUM_OF_AC];
-    TI_UINT32           lastCreditCalcTimeStamp[MAX_NUM_OF_AC];
-    TI_BOOL             useAdmissionAlgo[MAX_NUM_OF_AC];
-    TI_INT32            credit[MAX_NUM_OF_AC];
-    TI_UINT32           mediumTime[MAX_NUM_OF_AC];
-    TI_UINT32           totalUsedTime[MAX_NUM_OF_AC];
-
-#ifdef TI_DBG
-    txDataDbgCounters_t dbgCounters;    /* debug counters */
-#endif
-
-} txCtrl_t;
-
-
-
-#endif  /* _TX_CTRL_H_ */
diff --git a/wl1271/stad/src/Data_link/txCtrlParams.c b/wl1271/stad/src/Data_link/txCtrlParams.c
deleted file mode 100644
index 9fdee31..0000000
--- a/wl1271/stad/src/Data_link/txCtrlParams.c
+++ /dev/null
@@ -1,816 +0,0 @@
-/*
- * txCtrlParams.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*******************************************************************************/
-/*                                                                             */
-/*      MODULE: txCtrlParams.c                                                 */
-/*    PURPOSE:  The txCtrl module parameters handling.                         */
-/*              This is a part of the txCtrl module (using the same object).   */
-/*                                                                             */
-/*******************************************************************************/
-
-#define __FILE_ID__  FILE_ID_57
-#include "tidef.h"
-#include "report.h"
-#include "paramOut.h"
-#include "osApi.h"
-#include "timer.h"
-#include "EvHandler.h"
-#include "txCtrl.h"
-
-
-
-
-
-/***********************************************************************
- *                        calcCreditFromTimer
- ***********************************************************************
-DESCRIPTION:    This function is called when credit calculation timer
-				is expired. it calculate the credit for the admission ctrl
-				credit algorithm
-
-
-INPUT:	    hTxCtrl         - handle to the ts data object
-            bTwdInitOccured - Indicates if TWDriver recovery occured since timer started 
-
-OUTPUT:     None
-
-RETURN:     void
-************************************************************************/
-static void calcCreditFromTimer(TI_HANDLE hTxCtrl, TI_BOOL bTwdInitOccured)
-{
-	OS_802_11_THRESHOLD_CROSS_INDICATION_PARAMS	mediumTimeCross;
-	txCtrl_t	*pTxCtrl = (txCtrl_t *)hTxCtrl;
-	TI_UINT32		ac;
-	TI_INT32		prevCredit;
-	TI_INT32		highCreditThreshold;
-	TI_INT32		lowCreditThreshold;
-	TI_INT32		usageRatio;
-	TI_INT32		currUsage;
-	TI_INT32		prevUsage;
-	TI_UINT32		currentTimeStamp = os_timeStampMs(pTxCtrl->hOs);  /* get current time stamp */
-	
-	/* 
-	 *  For each AC under admission control calculate the new usage and credit time,
-	 *     and send events if a threshold is crossed. 
-	 */
-	for(ac = 0 ; ac < MAX_NUM_OF_AC ; ac++)
-	{
-		/* check if this queue is under admission ctrl operation */
-		if(pTxCtrl->mediumTime[ac] == 0)
-		{
-TRACE1(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, ": ac = %d mediumTime = 0 \n", ac);
-			
-			continue;
-		}
-
-		/* in case of wraparound */
-		if(currentTimeStamp < pTxCtrl->lastCreditCalcTimeStamp[ac])
-			pTxCtrl->lastCreditCalcTimeStamp[ac] = 0;
-		
-		/* store prev credit */
-		prevCredit = pTxCtrl->credit[ac];
-
-		/* Calculate the medium usage ratio:    totalUsedTime / mediumTime * 1000
-		   Note that since the totalUsedTime is in usec and not msec we don't multiply by 1000.	 */
-		usageRatio = pTxCtrl->totalUsedTime[ac] / pTxCtrl->mediumTime[ac];
-
-		/* calculate credit */
-		pTxCtrl->credit[ac] += (currentTimeStamp - pTxCtrl->lastCreditCalcTimeStamp[ac]) - usageRatio;
-		
-		/* update last time stamp */
-		pTxCtrl->lastCreditCalcTimeStamp[ac] = currentTimeStamp;
-
-		/* in case credit is bigger than mediumTime -> set credit to medium time */
-		if (pTxCtrl->credit[ac] > (TI_INT32)(pTxCtrl->mediumTime[ac]) )
-			pTxCtrl->credit[ac] = pTxCtrl->mediumTime[ac];
-
-       TRACE2(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, "credit = %d  | TotalUsedTime = %d\n", pTxCtrl->credit[ac], pTxCtrl->totalUsedTime[ac]/1000);
-
-		/* Check medium-usage threshold cross events */
-		/*********************************************/
-		/*
-		 * The medium-usage events are defined as follows:
-		 * The high threshold triggers event only when crossed upward (traffic increased above threshold).
-		 * The low threshold triggers event only when crossed downward (traffic decreased below threshold).
-		 * Thus, the two thresholds provide hysteresis and prevent multiple triggering.
-		 * The high threshold should be greater than the low threshold. 
-		 * 
-		 *   Note:	The driver doesn't delay traffic even if violating the usage limit!
-		 *			It only indicates the user application about the thresholds crossing.
-		 */
-
-		highCreditThreshold = (TI_INT32)((pTxCtrl->mediumTime[ac])*(pTxCtrl->highMediumUsageThreshold[ac])/100); 
-		lowCreditThreshold  = (TI_INT32)((pTxCtrl->mediumTime[ac])*(pTxCtrl->lowMediumUsageThreshold[ac])/100);
-
-		/* The credit is getting more negative as we get closer to the medium usage limit, so we invert
-		     it before comparing to the thresholds (lower credit means higher usage). */
-		currUsage = -pTxCtrl->credit[ac];
-		prevUsage = -prevCredit;
-
-		/* crossing below the low threshold */
-		if ( (currUsage < lowCreditThreshold) && (prevUsage >= lowCreditThreshold) )
-		{
-			/* send event */
-			mediumTimeCross.uAC = ac;
-			mediumTimeCross.uHighOrLowThresholdFlag = (TI_UINT32)LOW_THRESHOLD_CROSS;
-			mediumTimeCross.uAboveOrBelowFlag = (TI_UINT32)CROSS_BELOW;
-
-			EvHandlerSendEvent(pTxCtrl->hEvHandler, IPC_EVENT_MEDIUM_TIME_CROSS, 
-				(TI_UINT8 *)&mediumTimeCross, sizeof(OS_802_11_THRESHOLD_CROSS_INDICATION_PARAMS));
-
-            TRACE3(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, "crossed below low threshold !!! prevUsage = %d, currUsage = %d, lowCreditThreshold = %d\n",				prevUsage, currUsage, lowCreditThreshold);
-		}
-		
-		/* crossing above the high threshold */
-		else if ( (currUsage > highCreditThreshold) && (prevUsage <= highCreditThreshold) )
-		{
-			/* send event */
-			mediumTimeCross.uAC = ac;
-			mediumTimeCross.uHighOrLowThresholdFlag = (TI_UINT32)HIGH_THRESHOLD_CROSS;
-			mediumTimeCross.uAboveOrBelowFlag = (TI_UINT32)CROSS_ABOVE;
-
-			EvHandlerSendEvent(pTxCtrl->hEvHandler, IPC_EVENT_MEDIUM_TIME_CROSS, 
-				(TI_UINT8 *)&mediumTimeCross, sizeof(OS_802_11_THRESHOLD_CROSS_INDICATION_PARAMS));
-
-            TRACE3(pTxCtrl->hReport, REPORT_SEVERITY_INFORMATION, "crossed above high threshold !!! prevUsage = %d, currUsage = %d, highCreditThreshold = %d\n",				prevUsage, currUsage, highCreditThreshold);
-		}
-
-		/* reset totalUsedTime */
-		pTxCtrl->totalUsedTime[ac] = 0;
-	}
-}
-
-
-/****************************************************************************
- *                      updateDataPktPrototype()
- ****************************************************************************
- * DESCRIPTION:	Updates the data packet prototype values according to 
-				changed parameters (e.g. rate policy change). 
- ****************************************************************************/
-static void updateDataPktPrototype(txCtrl_t *pTxCtrl)
-{
-	pTxCtrl->dataPktDescAttrib = pTxCtrl->txSessionCount << TX_ATTR_OFST_SESSION_COUNTER;
-}
-
-
-/***************************************************************************
-*                       txCtrlParams_resetCounters                               
-****************************************************************************
-* DESCRIPTION:  Reset the tx data module counters
-*
-* INPUTS:       hTxCtrl - the object
-*
-* OUTPUT:
-*
-* RETURNS:
-***************************************************************************/
-void txCtrlParams_resetCounters(TI_HANDLE hTxCtrl)
-{
-    txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-    os_memoryZero(pTxCtrl->hOs, &pTxCtrl->txDataCounters, sizeof(TTxDataCounters) * MAX_NUM_OF_AC);
-    os_memoryZero(pTxCtrl->hOs, &pTxCtrl->SumTotalDelayUs, sizeof(pTxCtrl->SumTotalDelayUs));
-	pTxCtrl->currentConsecutiveRetryFail = 0;
-}
-
-
-/***************************************************************************
-*                       txCtrlParams_RegNotif                                    *
-****************************************************************************/
-TI_HANDLE txCtrlParams_RegNotif(TI_HANDLE hTxCtrl, TI_UINT16 EventMask, GeneralEventCall_t CallBack,
-						  TI_HANDLE context, TI_UINT32 Cookie)
-{
-    txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-    if (!hTxCtrl)
-        return NULL;
-    return DistributorMgr_Reg(pTxCtrl->TxEventDistributor,EventMask,(TI_HANDLE)CallBack,context,Cookie);
-}
-
-
-/***************************************************************************
-*                       txCtrlParams_AddToNotifMask                              *
-****************************************************************************/
-TI_STATUS txCtrlParams_AddToNotifMask(TI_HANDLE hTxCtrl, TI_HANDLE Notifh, TI_UINT16 EventMask)
-{
-    txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-    if (!hTxCtrl)
-        return TI_NOK;
-    return DistributorMgr_AddToMask(pTxCtrl->TxEventDistributor, Notifh, EventMask);
-}
-
-
-/***************************************************************************
-*                       txCtrlParams_UnRegNotif                                  *
-****************************************************************************/
-TI_STATUS txCtrlParams_UnRegNotif(TI_HANDLE hTxCtrl, TI_HANDLE RegEventHandle)
-{
-    txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-    if (!hTxCtrl)
-        return TI_NOK;
-
-    return (DistributorMgr_UnReg(pTxCtrl->TxEventDistributor,RegEventHandle));
-}
-
-
-/***********************************************************************
- *                        txCtrlParams_setAdmissionCtrlParams
- ***********************************************************************
-DESCRIPTION:    This function is called for add/delete a tspec in order
-				to update parameters.
-
-INPUT:			hTxCtrl - handale to the ts data object
-				acId - the AC of the tspec
-				mediumTime	- tha alocated medium time for this UP 
-				minimumPHYRate - the min phy rate to send a packet of this UP
-				admFlag - indicate if the its addition or deletion of tspec 
-
-OUTPUT:     None
-
-RETURN:     void
-************************************************************************/
-TI_STATUS txCtrlParams_setAdmissionCtrlParams(TI_HANDLE hTxCtrl, TI_UINT8 acId, TI_UINT16 mediumTime, 
-											  TI_UINT32 minimumPHYRate, TI_BOOL admFlag)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-	TI_UINT32	i;
-
-	if(admFlag == TI_TRUE) 
-	{
-		/* tspec added */
-		pTxCtrl->mediumTime[acId] = mediumTime;
-        pTxCtrl->admissionState[acId] = AC_ADMITTED;
-		pTxCtrl->useAdmissionAlgo[acId] = TI_TRUE;
-		pTxCtrl->lastCreditCalcTimeStamp[acId] = os_timeStampMs(pTxCtrl->hOs);
-		pTxCtrl->credit[acId] = mediumTime;
-	}
-	else
-	{
-		/* tspaec deleted */
-		pTxCtrl->mediumTime[acId] = 0;
-        pTxCtrl->admissionState[acId] = AC_NOT_ADMITTED;
-		pTxCtrl->useAdmissionAlgo[acId] = TI_FALSE;
-		pTxCtrl->lastCreditCalcTimeStamp[acId] = 0;
-		pTxCtrl->credit[acId] = 0;
-	}
-
-	/* Update the Tx queues mapping after admission change. */
-	txCtrl_UpdateQueuesMapping (hTxCtrl);
-	
-	/* If the timer was not enabled in registry than we will never set it */
-	if (pTxCtrl->bCreditCalcTimerEnabled)
-	{
-    	/* enable disable credit calculation timer */
-    	for (i = 0; i < MAX_NUM_OF_AC; i++)
-    	{
-    		if (pTxCtrl->useAdmissionAlgo[i])
-    		{
-    			if (!pTxCtrl->bCreditCalcTimerRunning)
-    			{
-    				pTxCtrl->bCreditCalcTimerRunning = TI_TRUE;
-                    tmr_StartTimer (pTxCtrl->hCreditTimer,
-                                    calcCreditFromTimer,
-                                    (TI_HANDLE)pTxCtrl,
-                                    pTxCtrl->creditCalculationTimeout, 
-                                    TI_TRUE);
-    			}
-    			
-    			return TI_OK;
-    		}
-    	}
-    
-    	/* in all queues useAdmissionAlgo is not TRUE, so stop timer if running */
-        if (pTxCtrl->bCreditCalcTimerRunning)
-        {
-            tmr_StopTimer (pTxCtrl->hCreditTimer);
-            pTxCtrl->bCreditCalcTimerRunning = TI_FALSE;
-        }
-    }
-
-	return TI_OK;
-}
-
-
-/***************************************************************************
-*                           txCtrlParams_getParam                           
-****************************************************************************
-* DESCRIPTION:  Get a specific parameter by an external user application.
-*
-* OUTPUT:       pParamInfo - structure which include the value of
-*               the requested parameter
-***************************************************************************/
-TI_STATUS txCtrlParams_getParam(TI_HANDLE hTxCtrl, paramInfo_t *pParamInfo)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-	TI_UINT32 ac;
-
-    if(pTxCtrl == NULL)  /* check handle validity */
-    {
-        return TI_NOK;
-    }
-
-    switch (pParamInfo->paramType)
-    {
-    case TX_CTRL_COUNTERS_PARAM:
-		/* Convert total-delays units from usec to mSec. */
-		for(ac = 0 ; ac < MAX_NUM_OF_AC ; ac++)
-		{
-			pTxCtrl->txDataCounters[ac].SumTotalDelayMs = pTxCtrl->SumTotalDelayUs[ac] / 1000;
-		}
-        os_memoryCopy( pTxCtrl->hOs, pParamInfo->content.pTxDataCounters, &(pTxCtrl->txDataCounters[0]), 
-                       sizeof(TTxDataCounters) * MAX_NUM_OF_AC);
-		pParamInfo->paramLength = sizeof(TTxDataCounters) * MAX_NUM_OF_AC;
-        break;
-
-	case TX_CTRL_GET_DATA_FRAME_COUNTER:
-		pParamInfo->content.txPacketsCount = 0;
-		for (ac = 0; ac < MAX_NUM_OF_AC; ac++)
-        	pParamInfo->content.txPacketsCount += pTxCtrl->txDataCounters[ac].XmitOk;				
-        break;
-
-	case TX_CTRL_REPORT_TS_STATISTICS:
-		ac = pParamInfo->content.tsMetricsCounters.acID;
-		os_memoryCopy(pTxCtrl->hOs, 
-					  pParamInfo->content.tsMetricsCounters.pTxDataCounters, 
-					  &(pTxCtrl->txDataCounters[ac]), 
-					  sizeof(TTxDataCounters));
-		os_memoryZero(pTxCtrl->hOs, &(pTxCtrl->txDataCounters[ac]), sizeof(TTxDataCounters));
-		break;
-
-	case TX_CTRL_GENERIC_ETHERTYPE:
-		pParamInfo->content.txGenericEthertype = pTxCtrl->genericEthertype;
-		break;
-
-
-    default:
-        TRACE0(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, ": PARAMETER NOT SUPPORTED\n");
-        return PARAM_NOT_SUPPORTED;
-    }
-
-    return TI_OK;
-}
-
-
-/***************************************************************************
-*                           txCtrlParams_setParam                           
-****************************************************************************
-* DESCRIPTION:  Set a specific parameter by an external user application.
-*
-* INPUTS:       hTxCtrl - the object
-*               pParamInfo - structure which include the value to set for
-*               the requested parameter
-***************************************************************************/
-TI_STATUS txCtrlParams_setParam(TI_HANDLE hTxCtrl, paramInfo_t *pParamInfo)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-	TI_UINT8 acID;
-
-    if(pTxCtrl == NULL)  /* check handle validity */
-    {
-        return TI_NOK;
-    }
-	
-    switch (pParamInfo->paramType)
-    {
-    case TX_CTRL_SET_MEDIUM_USAGE_THRESHOLD:
-		acID = (TI_UINT8)pParamInfo->content.txDataMediumUsageThreshold.uAC;
-		if(acID < MAX_NUM_OF_AC)
-		{
-			pTxCtrl->highMediumUsageThreshold[acID] = 
-				pParamInfo->content.txDataMediumUsageThreshold.uHighThreshold;
-			pTxCtrl->lowMediumUsageThreshold[acID] = 
-				pParamInfo->content.txDataMediumUsageThreshold.uLowThreshold;
-		}
-		else
-TRACE1(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, ": Wrong AC (AC=%d > 3)\n", acID);
-		break;
-
-    case TX_CTRL_GET_MEDIUM_USAGE_THRESHOLD:
-		/* Note: SET operation is used for GET, because AC parameter should be supplied from Utility- 
-	         Adapter to driver (copy of user supplied block of data is only performed in SetParam calls). */
-		acID = (TI_UINT8)pParamInfo->content.txDataMediumUsageThreshold.uAC;
-		pParamInfo->content.txDataMediumUsageThreshold.uHighThreshold = pTxCtrl->highMediumUsageThreshold[acID];
-		pParamInfo->content.txDataMediumUsageThreshold.uLowThreshold  = pTxCtrl->lowMediumUsageThreshold[acID];
-		break;
-
-    case TX_CTRL_POLL_AP_PACKETS_FROM_AC:
-       TRACE0(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, ": Poll-AP is not supported in this version!!\n");
-       return PARAM_NOT_SUPPORTED;
-
-	case TX_CTRL_RESET_COUNTERS_PARAM:
-		txCtrlParams_resetCounters(hTxCtrl);
-		break;
-
-	case TX_CTRL_GENERIC_ETHERTYPE:
-        pTxCtrl->genericEthertype = pParamInfo->content.txGenericEthertype;
-		{
-				paramInfo_t param;
-				param.paramType = RX_DATA_GENERIC_ETHERTYPE_PARAM;
-				param.content.rxGenericEthertype = pTxCtrl->genericEthertype;
-				rxData_setParam(pTxCtrl->hRxData, &param);
-		}
-		break;
-
-
-    default:
-        TRACE0(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, ": PARAMETER NOT SUPPORTED\n");
-        return PARAM_NOT_SUPPORTED;
-    }
-
-    return TI_OK;
-}
-
-
-/***********************************************************************
- *                        txCtrlParams_setBssId
- ***********************************************************************
-DESCRIPTION:    Update the BSS-ID.
-************************************************************************/
-void txCtrlParams_setBssId (TI_HANDLE hTxCtrl, TMacAddr *pCurrBssId)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	MAC_COPY (pTxCtrl->currBssId, *pCurrBssId);
-}
-
-
-/***********************************************************************
- *                        txCtrlParams_setBssType
- ***********************************************************************
-DESCRIPTION:    Update the BSS type.
-************************************************************************/
-void txCtrlParams_setBssType (TI_HANDLE hTxCtrl, ScanBssType_e currBssType)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	pTxCtrl->currBssType = currBssType;
-}
-
-
-/***********************************************************************
- *                        txCtrlParams_setQosHeaderConverMode
- ***********************************************************************
-DESCRIPTION:    Update the BSS type.
-************************************************************************/
-void txCtrlParams_setQosHeaderConverMode (TI_HANDLE hTxCtrl, EHeaderConvertMode  headerConverMode)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	pTxCtrl->headerConverMode = headerConverMode;
-
-	updateDataPktPrototype(pTxCtrl);  /* Needed due to QoS mode change. */
-}
-
-/** 
- * \fn     txCtrlParams_SetHtControl() 
- * \brief  Update The HT Control Field on txCtrl module. 
- * 
- * \note    
- * \param  hTxCtrl - the hTxCtrl handle.
- * \param  pHtCapabilitiesIe - input structure.
- * \return TI_OK on success or TI_NOK on failure  
- * \sa     
- */ 
-TI_STATUS txCtrlParams_SetHtControl (TI_HANDLE hTxCtrl, TtxCtrlHtControl *pHtControl)
-{
-    txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
- 
-    pTxCtrl->tTxCtrlHtControl.bHtEnable = pHtControl->bHtEnable;
-
-    return TI_OK;
-}
-
-/***********************************************************************
- *                        txCtrlParams_setCurrentPrivacyInvokedMode
- ***********************************************************************
-DESCRIPTION:    Update the current privacy invoked mode.
-************************************************************************/
-void txCtrlParams_setCurrentPrivacyInvokedMode (TI_HANDLE hTxCtrl, TI_BOOL currentPrivacyInvokedMode)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	pTxCtrl->currentPrivacyInvokedMode = currentPrivacyInvokedMode;
-}
-
-
-/***********************************************************************
- *                        txCtrlParams_setEapolEncryptionStatus
- ***********************************************************************
-DESCRIPTION:    Update the Eapol Encryption Status.
-************************************************************************/
-void txCtrlParams_setEapolEncryptionStatus (TI_HANDLE hTxCtrl, TI_BOOL eapolEncryptionStatus)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	pTxCtrl->eapolEncryptionStatus = eapolEncryptionStatus;
-}
-
-
-/***********************************************************************
- *                        txCtrlParams_setEncryptionFieldSizes
- ***********************************************************************
-DESCRIPTION:    Update the encryption field size for the header padding.
-************************************************************************/
-void txCtrlParams_setEncryptionFieldSizes (TI_HANDLE hTxCtrl, TI_UINT8 encryptionFieldSize)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	pTxCtrl->encryptionFieldSize = encryptionFieldSize;
-}
-
-
-/***********************************************************************
- *                        txCtrlParams_getCurrentEncryptionInfo
- ***********************************************************************
-DESCRIPTION:    Provide the current encryption mode and padding size.
-************************************************************************/
-void txCtrlParams_getCurrentEncryptionInfo (TI_HANDLE hTxCtrl, 
-                                            TI_BOOL    *pCurrentPrivacyInvokedMode,
-                                            TI_UINT8   *pEncryptionFieldSize)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-    *pCurrentPrivacyInvokedMode = pTxCtrl->currentPrivacyInvokedMode;
-    *pEncryptionFieldSize = pTxCtrl->encryptionFieldSize;
-}
-
-
-/***********************************************************************
- *                        txCtrlParams_GetTxRate
- ***********************************************************************
-DESCRIPTION:    Provide the last successfull data packet Tx rate.
-************************************************************************/
-ERate txCtrlParams_GetTxRate (TI_HANDLE hTxCtrl)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-    return pTxCtrl->eCurrentTxRate;
-}
-
-
-/***********************************************************************
- *                        txCtrlParams_setAcAdmissionStatus
- ***********************************************************************
-DESCRIPTION:    Update the AC admission status - required or not and admitted or not.
-				Update also the queues mapping in case it should change.
-************************************************************************/
-void txCtrlParams_setAcAdmissionStatus (TI_HANDLE hTxCtrl, 
-                                        TI_UINT8 ac, 
-                                        EAdmissionState admissionRequired,
-										ETrafficAdmState admissionState)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	pTxCtrl->admissionRequired[ac] = admissionRequired;
-	pTxCtrl->admissionState[ac]    = admissionState;
-
-	/* Update the Tx queues mapping after admission change. */
-	txCtrl_UpdateQueuesMapping (hTxCtrl);
-}
-
-
-/***********************************************************************
- *                        txCtrlParams_setAcMsduLifeTime
- ***********************************************************************
-DESCRIPTION:    Update the AC MSDU lifetime. The units are TUs (1024 usec).
-************************************************************************/
-void txCtrlParams_setAcMsduLifeTime (TI_HANDLE hTxCtrl, TI_UINT8 ac, TI_UINT32 uMsduLifeTimeTu)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	pTxCtrl->aMsduLifeTimeTu[ac] = (TI_UINT16)uMsduLifeTimeTu;
-}
-
-
-/***********************************************************************
- *                        txCtrlParams_setAcAckPolicy
- ***********************************************************************
-DESCRIPTION:    Update the AC Ack policy.
-************************************************************************/
-void txCtrlParams_setAcAckPolicy (TI_HANDLE hTxCtrl, TI_UINT8 ac, AckPolicy_e ackPolicy)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	pTxCtrl->ackPolicy[ac] = ackPolicy;
-}
-
-
-/***********************************************************************
- *                     txCtrlParams_updateMgmtRateAttributes
- ***********************************************************************
-DESCRIPTION:    Update per AC the rate policy for Mgmnt packets or IBSS BCAST packets.
-************************************************************************/
-void txCtrlParams_updateMgmtRateAttributes(TI_HANDLE hTxCtrl, TI_UINT8 ratePolicyId, TI_UINT8 ac)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	pTxCtrl->mgmtRatePolicy[ac] = ratePolicyId;
-}
-
-
-/***********************************************************************
- *                     txCtrlParams_updateDataRateAttributes
- ***********************************************************************
-DESCRIPTION:    Update per AC the rate policy for regular data packets (excluding IBSS BCAST packets).
-************************************************************************/
-void txCtrlParams_updateDataRateAttributes(TI_HANDLE hTxCtrl, TI_UINT8 ratePolicyId, TI_UINT8 ac)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	pTxCtrl->dataRatePolicy[ac] = ratePolicyId;
-}
-
-
-/***********************************************************************
- *                     txCtrlParams_updateTxSessionCount
- ***********************************************************************
-DESCRIPTION:    Update the current Tx-session index configured to FW.
-************************************************************************/
-void txCtrlParams_updateTxSessionCount(TI_HANDLE hTxCtrl, TI_UINT16 txSessionCount)
-{
-	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-	pTxCtrl->txSessionCount = txSessionCount;
-
-	updateDataPktPrototype(pTxCtrl);
-}
-
-
-
-
-/********************************************************************************
-*																				*
-*                       DEBUG  FUNCTIONS  IMPLEMENTATION						*
-*																				*
-*********************************************************************************/
-
-#ifdef TI_DBG
-
-/***********************************************************************
- *                     txCtrlParams_printInfo
- ***********************************************************************
-DESCRIPTION:    Print module internal information.
-************************************************************************/
-void txCtrlParams_printInfo(TI_HANDLE hTxCtrl)
-{
-#ifdef REPORT_LOG
-    txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-    WLAN_OS_REPORT(("-------------- Tx-Ctrl Module Information --------------\n"));
-    WLAN_OS_REPORT(("========================================================\n"));
-
-    WLAN_OS_REPORT(("ACs Mapping:\n"));
-    WLAN_OS_REPORT(("------------\n"));
-    WLAN_OS_REPORT(("admissionRequired[3,2,1,0]   =  %d,   %d,   %d,   %d\n", 
-		pTxCtrl->admissionRequired[3], pTxCtrl->admissionRequired[2],
-		pTxCtrl->admissionRequired[1], pTxCtrl->admissionRequired[0]));
-    WLAN_OS_REPORT(("admissionState[3,2,1,0]      =  %d,   %d,   %d,   %d\n", 
-		pTxCtrl->admissionState[3], pTxCtrl->admissionState[2],
-		pTxCtrl->admissionState[1], pTxCtrl->admissionState[0]));
-    WLAN_OS_REPORT(("highestAdmittedAc[3,2,1,0]   =  %d,   %d,   %d,   %d\n", 
-		pTxCtrl->highestAdmittedAc[3], pTxCtrl->highestAdmittedAc[2],
-		pTxCtrl->highestAdmittedAc[1], pTxCtrl->highestAdmittedAc[0]));
-    WLAN_OS_REPORT(("admittedAcToTidMap[3,2,1,0]  =  0x%x, 0x%x, 0x%x, 0x%x\n", 
-		pTxCtrl->admittedAcToTidMap[3], pTxCtrl->admittedAcToTidMap[2],
-		pTxCtrl->admittedAcToTidMap[1], pTxCtrl->admittedAcToTidMap[0]));
-    WLAN_OS_REPORT(("busyAcBitmap                 = 0x%x\n", pTxCtrl->busyAcBitmap));
-    WLAN_OS_REPORT(("busyTidBitmap                = 0x%x\n", pTxCtrl->busyTidBitmap));
-    WLAN_OS_REPORT(("--------------------------------------------------------\n"));
-
-    WLAN_OS_REPORT(("Tx Attributes:\n"));
-    WLAN_OS_REPORT(("--------------\n"));
-    WLAN_OS_REPORT(("mgmtRatePolicy[3,2,1,0]      =  %d,   %d,   %d,   %d\n", 
-		pTxCtrl->mgmtRatePolicy[3], pTxCtrl->mgmtRatePolicy[2],
-		pTxCtrl->mgmtRatePolicy[1], pTxCtrl->mgmtRatePolicy[0]));
-    WLAN_OS_REPORT(("dataRatePolicy[3,2,1,0]      =  %d,   %d,   %d,   %d\n", 
-		pTxCtrl->dataRatePolicy[3], pTxCtrl->dataRatePolicy[2],
-		pTxCtrl->dataRatePolicy[1], pTxCtrl->dataRatePolicy[0]));
-    WLAN_OS_REPORT(("dataPktDescAttrib            = 0x%x\n", pTxCtrl->dataPktDescAttrib));
-    WLAN_OS_REPORT(("--------------------------------------------------------\n"));
-
-    WLAN_OS_REPORT(("Parameters:\n"));
-    WLAN_OS_REPORT(("----------\n"));
-    WLAN_OS_REPORT(("headerConverMode             = %d\n", pTxCtrl->headerConverMode));
-    WLAN_OS_REPORT(("currentPrivacyInvokedMode    = %d\n", pTxCtrl->currentPrivacyInvokedMode));
-    WLAN_OS_REPORT(("eapolEncryptionStatus        = %d\n", pTxCtrl->eapolEncryptionStatus));
-    WLAN_OS_REPORT(("encryptionFieldSize          = %d\n", pTxCtrl->encryptionFieldSize));
-    WLAN_OS_REPORT(("currBssType                  = %d\n", pTxCtrl->currBssType));
-    WLAN_OS_REPORT(("========================================================\n\n"));
-#endif
-}
-
-
-/***********************************************************************
- *                     txCtrlParams_printDebugCounters
- ***********************************************************************
-DESCRIPTION:    Print Tx statistics debug counters.
-************************************************************************/
-void txCtrlParams_printDebugCounters(TI_HANDLE hTxCtrl)
-{
-#ifdef REPORT_LOG
-    txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-    TI_UINT32 ac;
-
-    WLAN_OS_REPORT(("-------------- Tx-Ctrl Statistics Per AC ---------------\n"));
-    WLAN_OS_REPORT(("========================================================\n"));
-
-    WLAN_OS_REPORT(("---------- Packets Sent To Tx-Ctrl ---------------------\n"));
-    for(ac = 0; ac < MAX_NUM_OF_AC; ac++)
-        WLAN_OS_REPORT(("AC %d = %d\n", ac, pTxCtrl->dbgCounters.dbgNumPktsSent[ac]));
-
-    WLAN_OS_REPORT(("---------- Number of Queue-Stop (BP) -------------------\n"));
-    for(ac = 0; ac < MAX_NUM_OF_AC; ac++)
-        WLAN_OS_REPORT(("AC %d = %d\n", ac, pTxCtrl->dbgCounters.dbgNumPktsBackpressure[ac]));
-
-    WLAN_OS_REPORT(("---------- Number of AC Busy (Requeue pkt) -------------\n"));
-    for(ac = 0; ac < MAX_NUM_OF_AC; ac++)
-        WLAN_OS_REPORT(("AC %d = %d\n", ac, pTxCtrl->dbgCounters.dbgNumPktsBusy[ac]));
-
-    WLAN_OS_REPORT(("---------- Packets Sent to Xfer ------------------------\n"));
-    for(ac = 0; ac < MAX_NUM_OF_AC; ac++)
-        WLAN_OS_REPORT(("AC %d = %d\n", ac, pTxCtrl->dbgCounters.dbgNumPktsXfered[ac]));
-
-    WLAN_OS_REPORT(("----------- Xfer rc = Success --------------------------\n"));
-    for(ac = 0; ac < MAX_NUM_OF_AC; ac++)
-        WLAN_OS_REPORT(("AC %d = %d\n", ac, pTxCtrl->dbgCounters.dbgNumPktsSuccess[ac]));
-
-    WLAN_OS_REPORT(("----------- Xfer rc = Pending --------------------------\n"));
-    for(ac = 0; ac < MAX_NUM_OF_AC; ac++)
-        WLAN_OS_REPORT(("AC %d = %d\n", ac, pTxCtrl->dbgCounters.dbgNumPktsPending[ac]));
-
-    WLAN_OS_REPORT(("----------- Xfer rc = Error ----------------------------\n"));
-    for(ac = 0; ac < MAX_NUM_OF_AC; ac++)
-        WLAN_OS_REPORT(("AC %d = %d\n", ac, pTxCtrl->dbgCounters.dbgNumPktsError[ac]));
-
-    WLAN_OS_REPORT(("----------- Number of Tx-Complete Packets --------------\n"));
-    for(ac = 0; ac < MAX_NUM_OF_AC; ac++)
-        WLAN_OS_REPORT(("AC %d = %d\n", ac, pTxCtrl->dbgCounters.dbgNumTxCmplt[ac]));
-
-    WLAN_OS_REPORT(("----------- Number of Tx-Complete Packets TI_OK -----------\n"));
-    for(ac = 0; ac < MAX_NUM_OF_AC; ac++)
-        WLAN_OS_REPORT(("AC %d = %d\n", ac, pTxCtrl->dbgCounters.dbgNumTxCmpltOk[ac]));
-
-    WLAN_OS_REPORT(("----------- Number of Tx-Complete Packets Fails --------\n"));
-    for(ac = 0; ac < MAX_NUM_OF_AC; ac++)
-        WLAN_OS_REPORT(("AC %d = %d\n", ac, pTxCtrl->dbgCounters.dbgNumTxCmpltError[ac]));
-
-    WLAN_OS_REPORT(("----------- Number of Tx-Complete Bytes TI_OK -------------\n"));
-    for(ac = 0; ac < MAX_NUM_OF_AC; ac++)
-        WLAN_OS_REPORT(("AC %d = %d\n", ac, pTxCtrl->dbgCounters.dbgNumTxCmpltOkBytes[ac]));
-    WLAN_OS_REPORT(("--------------------------------------------------------\n"));
-
-    WLAN_OS_REPORT(("Total Number of Xfer-Complete Events = %d\n", pTxCtrl->dbgCounters.dbgNumXferCmplt));
-    WLAN_OS_REPORT(("Total Number of Xfer-Pending  Events = %d\n", 
-		pTxCtrl->dbgCounters.dbgNumPktsPending[0] +	pTxCtrl->dbgCounters.dbgNumPktsPending[1] +
-		pTxCtrl->dbgCounters.dbgNumPktsPending[2] +	pTxCtrl->dbgCounters.dbgNumPktsPending[3]));
-    WLAN_OS_REPORT(("========================================================\n\n"));
-#endif
-}
-
-
-/***************************************************************************
-*                       txCtrlParams_resetDbgCounters                       
-****************************************************************************
-* DESCRIPTION:  Reset the tx data module debug counters
-***************************************************************************/
-void txCtrlParams_resetDbgCounters(TI_HANDLE hTxCtrl)
-{
-    txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
-
-    os_memoryZero(pTxCtrl->hOs, &pTxCtrl->dbgCounters, sizeof(txDataDbgCounters_t));
-}
-
-
-
-#endif   /* TI_DBG */
diff --git a/wl1271/stad/src/Data_link/txCtrlServ.c b/wl1271/stad/src/Data_link/txCtrlServ.c
deleted file mode 100644
index 0638eaa..0000000
--- a/wl1271/stad/src/Data_link/txCtrlServ.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * txCtrlServ.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************/
-/*                                                                          */
-/*  MODULE:     txCtrlServ.c                                                */
-/*                                                                          */
-/*  PURPOSE:    Tx services module, e.g. send-null packet.                  */
-/*              A sub-module of TxCtrl module (uses it's object).           */
-/*                                                                          */
-/****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_58
-#include "paramOut.h"
-#include "osApi.h"
-#include "TWDriver.h"
-#include "report.h"
-#include "txCtrl.h"
-#include "Ethernet.h"
-#include "qosMngr_API.h"
-
-
-
-/***********************************************************************
- *                        txCtrlServ_buildNullFrame
- ***********************************************************************
-
-DESCRIPTION:    Build Null frame Function.
-                The function does the following:
-                -   Builds Null Data Frame, considering current QoS mode.
-
-INPUT:      hTxCtrl     - Tx Ctrl module handle (the txServ uses the txCtrl object!!).
-            pFrame      - A pointer to a buffer where the frame should be stored
-            pLength     - A pointer to a placeholder for the frame length
-
-************************************************************************/
-TI_STATUS txCtrlServ_buildNullFrame(TI_HANDLE hTxCtrl, TI_UINT8* pFrame, TI_UINT32* pLength)
-{
-    txCtrl_t            *pTxCtrl = (txCtrl_t *)hTxCtrl;
-    EHeaderConvertMode  qosMode = pTxCtrl->headerConverMode;
-    dot11_header_t      *pHeader; /* Note : there is no body for null frame */
-    TI_STATUS           status;
-    TI_UINT16           fc;
-
-    pHeader = (dot11_header_t*)(pFrame);
-
-    if (qosMode == HDR_CONVERT_QOS)
-    {
-        *pLength = WLAN_QOS_HDR_LEN;
-		SET_WLAN_WORD(&pHeader->qosControl, 0);     /* We are using user priority 0 (BE) so no need for shift and endianess */
-    }
-    else
-    {
-        *pLength = WLAN_HDR_LEN;
-    }
-
-
-    /* Set the Frame Control with Null Data type, QoS or non-QoS */
-    if (qosMode == HDR_CONVERT_QOS)
-        fc = DOT11_FC_DATA_NULL_QOS | DOT11_FC_TO_DS;
-    else
-        fc = DOT11_FC_DATA_NULL_FUNCTION | DOT11_FC_TO_DS;
-    COPY_WLAN_WORD(&pHeader->fc, &fc); /* copy with endianess handling. */
-
-    /* copy destination mac address */
-    status = ctrlData_getParamBssid(pTxCtrl->hCtrlData, CTRL_DATA_CURRENT_BSSID_PARAM, pHeader->address3);
-    if (status != TI_OK)
-    {
-        return TI_NOK;
-    }
-
-    /* copy source mac address */
-    status = ctrlData_getParamBssid(pTxCtrl->hCtrlData, CTRL_DATA_MAC_ADDRESS, pHeader->address2);
-    if (status != TI_OK)
-    {
-        return TI_NOK;
-    }
-
-    /* copy BSSID (destination mac address) */
-    MAC_COPY (pHeader->address1, pHeader->address3);
-
-    return status;
-}
-
-
-/***********************************************************************
- *                        txCtrlServ_buildWlanHeader
- ***********************************************************************
-
-DESCRIPTION:    Build WLAN header from Ethernet header.
-
-INPUT:      hTxCtrl     - Tx Ctrl module handle (the txServ uses the txCtrl object!!).
-            pFrame      - A pointer to a buffer where the frame should be stored
-            pLength     - A pointer to a placeholder for the frame length
-
-************************************************************************/
-TI_STATUS txCtrlServ_buildWlanHeader(TI_HANDLE hTxCtrl, TI_UINT8* pFrame, TI_UINT32* pLength)
-{
-    txCtrl_t         *pTxCtrl = (txCtrl_t *)hTxCtrl;
-    TI_STATUS        status;
-    TMacAddr         daBssid;
-    TMacAddr         saBssid;
-    EQosProtocol     qosProt;
-    ScanBssType_e    currBssType;
-    TMacAddr         currBssId;
-    TI_UINT32        headerLength;
-    TI_UINT16        headerFlags;
-    TI_BOOL          currentPrivacyInvokedMode;
-    TI_UINT8         encryptionFieldSize;
-    TTxCtrlBlk       tPktCtrlBlk;
-    dot11_header_t   *pDot11Header = (dot11_header_t*)(tPktCtrlBlk.aPktHdr);
-    Wlan_LlcHeader_T *pWlanSnapHeader;
-
-    /* 
-     * If QoS is used, add two bytes padding before the header for 4-bytes alignment.
-     * Note that the header length doesn't include it, so the txCtrl detects the pad existence
-     *   by checking if the header-length is a multiple of 4. 
-     */
-    qosMngr_getParamsActiveProtocol(pTxCtrl->hQosMngr, &qosProt);
-
-    if (qosProt == QOS_WME)  
-    {
-        headerLength = WLAN_QOS_HDR_LEN;
-        headerFlags  = DOT11_FC_DATA_QOS | DOT11_FC_TO_DS;
-        pDot11Header->qosControl = 0;
-    }
-    else
-    {
-        headerLength = WLAN_HDR_LEN;
-        headerFlags  = DOT11_FC_DATA | DOT11_FC_TO_DS;
-    }
-
-    /* 
-     * Handle encryption if needed (decision was done at RSN and is provided by TxCtrl):
-     *   - Set WEP bit in header.
-     *   - Add padding for FW security overhead: 4 bytes for TKIP, 8 for AES.  
-     */
-    txCtrlParams_getCurrentEncryptionInfo (hTxCtrl, 
-                                           &currentPrivacyInvokedMode,
-                                           &encryptionFieldSize);
-    if (currentPrivacyInvokedMode)
-    {
-        headerFlags |= DOT11_FC_WEP;
-        headerLength += encryptionFieldSize;
-    }
-    
-    COPY_WLAN_WORD (&pDot11Header->fc, &headerFlags); /* copy with endianess handling. */
-
-    /* Get the Destination MAC address */
-    status = ctrlData_getParamBssid (pTxCtrl->hCtrlData, CTRL_DATA_CURRENT_BSSID_PARAM, daBssid);
-    if (status != TI_OK)
-    {
-        return TI_NOK;
-    }
-
-    /* Get the Source MAC address */
-    status = ctrlData_getParamBssid (pTxCtrl->hCtrlData, CTRL_DATA_MAC_ADDRESS, saBssid);
-    if (status != TI_OK)
-    {
-        return TI_NOK;
-    }
-
-    /* receive BssId and Bss Type from control module */
-    ctrlData_getCurrBssTypeAndCurrBssId (pTxCtrl->hCtrlData, &currBssId, &currBssType);
-    if (currBssType != BSS_INFRASTRUCTURE)
-    {
-        return TI_NOK;
-    }
-
-    /* copy BSSID */
-    MAC_COPY (pDot11Header->address1, currBssId);
-    /* copy source mac address */
-    MAC_COPY (pDot11Header->address2, saBssid);
-    /* copy destination mac address*/
-    MAC_COPY (pDot11Header->address3, daBssid);
-
-
-    /* Set the SNAP header pointer right after the other header parts handled above. */
-    pWlanSnapHeader = (Wlan_LlcHeader_T *)&(tPktCtrlBlk.aPktHdr[headerLength]);
-    
-   	pWlanSnapHeader->DSAP = SNAP_CHANNEL_ID;
-   	pWlanSnapHeader->SSAP = SNAP_CHANNEL_ID;
-   	pWlanSnapHeader->Control = LLC_CONTROL_UNNUMBERED_INFORMATION;
-
-    /* add RFC1042. */
-	pWlanSnapHeader->OUI[0] = SNAP_OUI_RFC1042_BYTE0;
-	pWlanSnapHeader->OUI[1] = SNAP_OUI_RFC1042_BYTE1;
-	pWlanSnapHeader->OUI[2] = SNAP_OUI_RFC1042_BYTE2;
-
-    /* set ETH type to IP */
-    pWlanSnapHeader->Type = HTOWLANS(ETHERTYPE_IP);
-
-    /* Add the SNAP length to the total header length. */
-    headerLength += sizeof(Wlan_LlcHeader_T);
-
-    /* copy WLAN header */
-    os_memoryCopy (pTxCtrl->hOs, pFrame, tPktCtrlBlk.aPktHdr, headerLength);
-    *pLength = headerLength;
-
-    return TI_OK;
-}
-
diff --git a/wl1271/stad/src/Data_link/txCtrl_Api.h b/wl1271/stad/src/Data_link/txCtrl_Api.h
deleted file mode 100644
index cd68368..0000000
--- a/wl1271/stad/src/Data_link/txCtrl_Api.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * txCtrl_Api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   txCtrl_Api.h                                               */
-/*    PURPOSE:  TxCtrl module API Header file                              */
-/*                                                                         */
-/***************************************************************************/
-#ifndef _TX_CTRL_API_H_
-#define _TX_CTRL_API_H_
-
-#include "GeneralUtilApi.h"
-#include "DrvMainModules.h"
-
-/* TxCtrl Xmit results */
-typedef enum
-{
-    STATUS_XMIT_SUCCESS,
-    STATUS_XMIT_BUSY,
-    STATUS_XMIT_ERROR
-} EStatusXmit;
-
-
-typedef struct 
-{
-	TI_BOOL    bHtEnable;	                        /* current flag of HT Capabilities enabled */
-    TI_UINT32  uTxCtrlHtControl;        	        /* The HT Control Field for futur use. for now empty and the FW set it */
-} TtxCtrlHtControl;
-
-
-/* Build the buffers descriptor of a typical two buffers (header & data) Tx packet */
-#define BUILD_TX_TWO_BUF_PKT_BDL(pPktCtrlBlk, pHdrBuf, uHdrLen, pDataBuf, uDataLen)  \
-    pPktCtrlBlk->tTxnStruct.aBuf[0]   = (TI_UINT8 *) (pHdrBuf);    \
-    pPktCtrlBlk->tTxnStruct.aLen[0]   = (TI_UINT16 ) (uHdrLen);    \
-    pPktCtrlBlk->tTxnStruct.aBuf[1]   = (TI_UINT8 *) (pDataBuf);   \
-    pPktCtrlBlk->tTxnStruct.aLen[1]   = (TI_UINT16 ) (uDataLen);   \
-    pPktCtrlBlk->tTxnStruct.aLen[2]   = 0;                         \
-    pPktCtrlBlk->tTxDescriptor.length = (TI_UINT16)((uHdrLen) + (uDataLen));
-
-
-/****************************************************************/
-/*                  MODULE  PUBLIC  FUNCTIONS                   */
-/****************************************************************/ 
-
-/* 
- *  The TxCtrl MAIN public functions (in txCtrl.c):
- */
-TI_HANDLE txCtrl_Create (TI_HANDLE hOs);
-void      txCtrl_Init (TStadHandlesList *pStadHandles);
-TI_STATUS txCtrl_SetDefaults (TI_HANDLE hTxCtrl, txDataInitParams_t *txDataInitParams);
-TI_STATUS txCtrl_Unload (TI_HANDLE hTxCtrl);
-TI_STATUS txCtrl_XmitData (TI_HANDLE hTxCtrl, TTxCtrlBlk *pPktCtrlBlk);
-TI_STATUS txCtrl_XmitMgmt (TI_HANDLE hTxCtrl, TTxCtrlBlk *pPktCtrlBlk);
-void      txCtrl_UpdateQueuesMapping (TI_HANDLE hTxCtrl);
-void *    txCtrl_AllocPacketBuffer (TI_HANDLE hTxCtrl, TTxCtrlBlk *pPktCtrlBlk, TI_UINT32 uPacketLen);
-void      txCtrl_FreePacket (TI_HANDLE hTxCtrl, TTxCtrlBlk *pPktCtrlBlk, TI_STATUS eStatus);
-TI_STATUS txCtrl_NotifyFwReset(TI_HANDLE hTxCtrl);
-TI_STATUS txCtrl_CheckForTxStuck(TI_HANDLE hTxCtrl);
-TI_UINT32 txCtrl_BuildDataPktHdr (TI_HANDLE hTxCtrl, TTxCtrlBlk *pPktCtrlBlk, AckPolicy_e ackPolicy);
-
-
-/* 
- *  The txCtrlParams.c sub-module public functions:
- */
-void      txCtrlParams_resetCounters(TI_HANDLE hTxCtrl);
-TI_HANDLE txCtrlParams_RegNotif(TI_HANDLE hTxCtrl, 
-                                TI_UINT16 EventMask, 
-                                GeneralEventCall_t CallBack,
-                                TI_HANDLE context, 
-                                TI_UINT32 Cookie);
-TI_STATUS txCtrlParams_AddToNotifMask(TI_HANDLE hTxCtrl, TI_HANDLE Notifh, TI_UINT16 EventMask);
-TI_STATUS txCtrlParams_UnRegNotif(TI_HANDLE hTxCtrl, TI_HANDLE RegEventHandle);
-TI_STATUS txCtrlParams_setAdmissionCtrlParams(TI_HANDLE hTxCtrl, 
-                                              TI_UINT8 acId, 
-                                              TI_UINT16 mediumTime, 
-                                              TI_UINT32 minimumPHYRate, 
-                                              TI_BOOL admFlag);
-TI_STATUS txCtrlParams_getParam(TI_HANDLE hTxCtrl, paramInfo_t *pParamInfo);    
-TI_STATUS txCtrlParams_setParam(TI_HANDLE hTxCtrl, paramInfo_t *pParamInfo);
-TI_STATUS txCtrlParams_SetHtControl (TI_HANDLE hTxCtrl, TtxCtrlHtControl *pHtControl);
-void txCtrlParams_setBssId (TI_HANDLE hTxCtrl, TMacAddr *pCurrBssId);
-void txCtrlParams_setBssType (TI_HANDLE hTxCtrl, ScanBssType_e currBssType);
-void txCtrlParams_setQosHeaderConverMode (TI_HANDLE hTxCtrl, EHeaderConvertMode  headerConverMode);
-void txCtrlParams_setCurrentPrivacyInvokedMode (TI_HANDLE hTxCtrl, TI_BOOL currentPrivacyInvokedMode);
-void txCtrlParams_setEapolEncryptionStatus (TI_HANDLE hTxCtrl, TI_BOOL eapolEncryptionStatus);
-void txCtrlParams_setEncryptionFieldSizes (TI_HANDLE hTxCtrl, TI_UINT8 encryptionFieldSize);
-void txCtrlParams_getCurrentEncryptionInfo (TI_HANDLE hTxCtrl, 
-                                            TI_BOOL    *pCurrentPrivacyInvokedMode,
-                                            TI_UINT8   *pEncryptionFieldSize);
-ERate txCtrlParams_GetTxRate (TI_HANDLE hTxCtrl);
-void txCtrlParams_setAcAdmissionStatus (TI_HANDLE hTxCtrl, 
-                                        TI_UINT8 ac, 
-                                        EAdmissionState admissionRequired,
-                                        ETrafficAdmState admissionState);
-void txCtrlParams_setAcMsduLifeTime (TI_HANDLE hTxCtrl, TI_UINT8 ac, TI_UINT32 msduLifeTime);
-void txCtrlParams_setAcAckPolicy (TI_HANDLE hTxCtrl, TI_UINT8 ac, AckPolicy_e ackPolicy);
-void txCtrlParams_updateMgmtRateAttributes(TI_HANDLE hTxCtrl, TI_UINT8 ratePolicyId, TI_UINT8 ac);
-void txCtrlParams_updateDataRateAttributes(TI_HANDLE hTxCtrl, TI_UINT8 ratePolicyId, TI_UINT8 ac);
-void txCtrlParams_updateTxSessionCount(TI_HANDLE hTxCtrl, TI_UINT16 txSessionCount);
-#ifdef TI_DBG
-void txCtrlParams_printInfo(TI_HANDLE hTxCtrl);
-void txCtrlParams_printDebugCounters(TI_HANDLE hTxCtrl);
-void txCtrlParams_resetDbgCounters(TI_HANDLE hTxCtrl);
-#endif /* TI_DBG */
-
-
-/* 
- *  The txCtrlServ.c sub-module public functions:
- */
-TI_STATUS txCtrlServ_buildNullFrame(TI_HANDLE hTxCtrl, TI_UINT8* pFrame, TI_UINT32* pLength);
-TI_STATUS txCtrlServ_buildWlanHeader(TI_HANDLE hTxCtrl, TI_UINT8* pFrame, TI_UINT32* pLength);
-
-#endif /* _TX_CTRL_API_H_ */
diff --git a/wl1271/stad/src/Data_link/txDataQueue.c b/wl1271/stad/src/Data_link/txDataQueue.c
deleted file mode 100644
index ac5ef43..0000000
--- a/wl1271/stad/src/Data_link/txDataQueue.c
+++ /dev/null
@@ -1,823 +0,0 @@
-/*
- * txDataQueue.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   txDataQueue.c 
- *  \brief  The Tx Data Queues module.
- *  
- *  \see    txDataQueue.h
- */
-
-
-#define __FILE_ID__  FILE_ID_60
-#include "paramOut.h"
-#include "osApi.h"
-#include "report.h"
-#include "timer.h"
-#include "queue.h"
-#include "context.h"
-#include "Ethernet.h"
-#include "TWDriver.h"
-#include "DataCtrl_Api.h"
-#include "txDataQueue.h"
-#include "txCtrl.h"
-#include "DrvMainModules.h"
-#include "bmtrace_api.h"
-
-
-/* Internal Functions prototypes */
-static void txDataQ_RunScheduler (TI_HANDLE hTxDataQ);
-static void txDataQ_UpdateQueuesBusyState (TTxDataQ *pTxDataQ, TI_UINT32 uTidBitMap);
-static void txDataQ_TxSendPaceTimeout (TI_HANDLE hTxDataQ, TI_BOOL bTwdInitOccured);
-extern void wlanDrvIf_StopTx (TI_HANDLE hOs);
-extern void wlanDrvIf_ResumeTx (TI_HANDLE hOs);
-
-
-
-/***************************************************************************
-*                      PUBLIC  FUNCTIONS  IMPLEMENTATION				   *
-****************************************************************************/
-
-
-/** 
- * \fn     txDataQ_Create
- * \brief  Create the module and its queues
- * 
- * Create the Tx Data module and its queues.
- * 
- * \note   
- * \param  hOs - Handle to the Os Abstraction Layer                           
- * \return Handle to the allocated Tx Data Queue module (NULL if failed) 
- * \sa     
- */ 
-TI_HANDLE txDataQ_Create(TI_HANDLE hOs)
-{
-    TTxDataQ *pTxDataQ;
-
-    /* allocate TxDataQueue module */
-    pTxDataQ = os_memoryAlloc (hOs, (sizeof(TTxDataQ)));
-	
-    if (!pTxDataQ)
-	{
-        WLAN_OS_REPORT(("Error allocating the TxDataQueue Module\n"));
-		return NULL;
-	}
-
-    /* Reset TxDataQueue module */
-    os_memoryZero (hOs, pTxDataQ, (sizeof(TTxDataQ)));
-
-    return (TI_HANDLE)pTxDataQ;
-}
-
-
-/** 
- * \fn     txDataQ_Init
- * \brief  Save required modules handles
- * 
- * Save other modules handles.
- * 
- * \note   
- * \param  pStadHandles  - The driver modules handles
- * \return void  
- * \sa     
- */ 
-void txDataQ_Init (TStadHandlesList *pStadHandles)
-{
-    TTxDataQ  *pTxDataQ = (TTxDataQ *)(pStadHandles->hTxDataQ);
-    TI_UINT32  uNodeHeaderOffset = TI_FIELD_OFFSET(TTxnStruct, tTxnQNode);
-    TI_UINT8   uQueId;
-	
-    /* save modules handles */
-    pTxDataQ->hContext	= pStadHandles->hContext;
-    pTxDataQ->hTxCtrl	= pStadHandles->hTxCtrl;
-    pTxDataQ->hOs		= pStadHandles->hOs;
-    pTxDataQ->hReport	= pStadHandles->hReport;
-    pTxDataQ->hTxMgmtQ	= pStadHandles->hTxMgmtQ;
-    pTxDataQ->hTWD	    = pStadHandles->hTWD;
-
-    /* Configures the Port Default status to Close */
-	pTxDataQ->bDataPortEnable = TI_FALSE;
-
-	/* Configures the LastQueId to zero => scheduler will strart from Queue 1*/
-	pTxDataQ->uLastQueId = 0;
-	
-	/* init the number of the Data queue to be used */
-	pTxDataQ->uNumQueues = MAX_NUM_OF_AC;
-
-	/* init the max size of the Data queues */
-	pTxDataQ->aQueueMaxSize[QOS_AC_BE] = DATA_QUEUE_DEPTH_BE;
-	pTxDataQ->aQueueMaxSize[QOS_AC_BK] = DATA_QUEUE_DEPTH_BK;
-	pTxDataQ->aQueueMaxSize[QOS_AC_VI] = DATA_QUEUE_DEPTH_VI;
-	pTxDataQ->aQueueMaxSize[QOS_AC_VO] = DATA_QUEUE_DEPTH_VO;
-
-    /* Create the tx data queues */
-	for (uQueId = 0; uQueId < pTxDataQ->uNumQueues; uQueId++)
-    {
-        pTxDataQ->aQueues[uQueId] = que_Create (pTxDataQ->hOs, 
-                                                pTxDataQ->hReport, 
-                                                pTxDataQ->aQueueMaxSize[uQueId], 
-                                                uNodeHeaderOffset);
-		
-		/* If any Queues' allocation failed, print error, free TxDataQueue module and exit */
-		if (pTxDataQ->aQueues[uQueId] == NULL)
-		{
-            TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_CONSOLE , "Failed to create queue\n");
-			WLAN_OS_REPORT(("Failed to create queue\n"));
-			os_memoryFree (pTxDataQ->hOs, pTxDataQ, sizeof(TTxDataQ));
-			return;
-		}
-
-		/* Configure the Queues default values */
-		pTxDataQ->aQueueBusy[uQueId] = TI_FALSE;   
-        pTxDataQ->aNetStackQueueStopped[uQueId] = TI_FALSE;  
-        pTxDataQ->aTxSendPaceThresh[uQueId] = 1;
-    }
-
-    pTxDataQ->hTxSendPaceTimer = tmr_CreateTimer (pStadHandles->hTimer);
-	if (pTxDataQ->hTxSendPaceTimer == NULL)
-	{
-        TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "txDataQ_Init(): Failed to create hTxSendPaceTimer!\n");
-		return;
-	}
-    
-    /* Register to the context engine and get the client ID */
-    pTxDataQ->uContextId = context_RegisterClient (pTxDataQ->hContext,
-                                                   txDataQ_RunScheduler,
-                                                   (TI_HANDLE)pTxDataQ,
-                                                   TI_TRUE,
-                                                   "TX_DATA",
-                                                   sizeof("TX_DATA"));
-}
-
-
-/** 
- * \fn     txDataQ_SetDefaults
- * \brief  Configure module with default settings
- * 
- * Init the Tx Data queues.
- * Register as the context-engine client.
- * 
- * \note   
- * \param  hTxDataQ - The object                                          
- * \param  Other modules handles                              
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     
- */ 
-TI_STATUS txDataQ_SetDefaults (TI_HANDLE  hTxDataQ, txDataInitParams_t *pTxDataInitParams)
-{
-    TTxDataQ  *pTxDataQ = (TTxDataQ *)hTxDataQ;
-	TI_STATUS  eStatus;
-
-    /* configure the classifier sub-module */
-    eStatus = txDataClsfr_Config (hTxDataQ, &pTxDataInitParams->ClsfrInitParam);
-    if (eStatus != TI_OK)
-    {  
-        TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_CONSOLE ,"FATAL ERROR: txDataQ_SetDefaults(): txDataClsfr_Config failed - Aborting\n");
-        WLAN_OS_REPORT(("FATAL ERROR: txDataQ_SetDefaults(): txDataClsfr_Config failed - Aborting\n"));
-        return eStatus;
-    }
-
-    /* Save the module's parameters settings */
-	pTxDataQ->bStopNetStackTx              = pTxDataInitParams->bStopNetStackTx;
-	pTxDataQ->aTxSendPaceThresh[QOS_AC_BE] = pTxDataInitParams->uTxSendPaceThresh;
-	pTxDataQ->aTxSendPaceThresh[QOS_AC_BK] = pTxDataInitParams->uTxSendPaceThresh;
-	pTxDataQ->aTxSendPaceThresh[QOS_AC_VI] = pTxDataInitParams->uTxSendPaceThresh;
-	pTxDataQ->aTxSendPaceThresh[QOS_AC_VO] = 1;     /* Don't delay voice packts! */
-
-    TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_INIT, ".....Tx Data Queue configured successfully\n");
-	
-    return TI_OK;
-}
-
-
-/** 
- * \fn     txDataQ_Destroy
- * \brief  Destroy the module and its queues
- * 
- * Clear and destroy the queues and then destroy the module object.
- * 
- * \note   
- * \param  hTxDataQ - The object                                          
- * \return TI_OK - Unload succesfull, TI_NOK - Unload unsuccesfull 
- * \sa     
- */ 
-TI_STATUS txDataQ_Destroy (TI_HANDLE hTxDataQ)
-{
-    TTxDataQ  *pTxDataQ = (TTxDataQ *)hTxDataQ;
-    TI_STATUS  status = TI_OK;
-    TI_UINT32  uQueId;
-
-    /* Dequeue and free all queued packets */
-    txDataQ_ClearQueues (hTxDataQ);
-
-    /* Free Data queues */
-    for (uQueId = 0 ; uQueId < pTxDataQ->uNumQueues ; uQueId++)
-    {
-        if (que_Destroy(pTxDataQ->aQueues[uQueId]) != TI_OK)
-		{
-            TRACE1(pTxDataQ->hReport, REPORT_SEVERITY_ERROR, "txDataQueue_unLoad: fail to free Data Queue number: %d\n",uQueId);
-			status = TI_NOK;
-		}
-    }
-
-    /* free timer */
-    if (pTxDataQ->hTxSendPaceTimer)
-    {
-        tmr_DestroyTimer (pTxDataQ->hTxSendPaceTimer);
-    }
-
-    /* Free Tx Data Queue Module */
-    os_memoryFree (pTxDataQ->hOs, pTxDataQ, sizeof(TTxDataQ));
-
-    return status;
-}
-
-
-/** 
- * \fn     txDataQ_ClearQueues
- * \brief  Clear all queues
- * 
- * Dequeue and free all queued packets.
- * 
- * \note   
- * \param  hTxDataQ - The object                                          
- * \return void 
- * \sa     
- */ 
-void txDataQ_ClearQueues (TI_HANDLE hTxDataQ)
-{
-    TTxDataQ   *pTxDataQ = (TTxDataQ *)hTxDataQ;
-    TTxCtrlBlk *pPktCtrlBlk;
-    TI_UINT32  uQueId;
-
-    /* Dequeue and free all queued packets */
-    for (uQueId = 0 ; uQueId < pTxDataQ->uNumQueues ; uQueId++)
-    {
-        do {
-            context_EnterCriticalSection (pTxDataQ->hContext);
-            pPktCtrlBlk = (TTxCtrlBlk *) que_Dequeue(pTxDataQ->aQueues[uQueId]);
-            context_LeaveCriticalSection (pTxDataQ->hContext);
-            if (pPktCtrlBlk != NULL) {
-                txCtrl_FreePacket (pTxDataQ->hTxCtrl, pPktCtrlBlk, TI_NOK);
-            }
-        } while (pPktCtrlBlk != NULL);
-    }
-}
-
-
-/** 
- * \fn     txDataQ_InsertPacket
- * \brief  Insert packet in queue and schedule task
- * 
- * This function is called by the hard_start_xmit() callback function. 
- * If the packet it an EAPOL, forward it to the Mgmt-Queue.
- * Otherwise, classify the packet, enqueue it and request 
- *   context switch for handling it in the driver's context.
- *
- * \note   
- * \param  hTxDataQ    - The object                                          
- * \param  pPktCtrlBlk - Pointer to the packet                                         
- * \param  uPacketDtag - The packet priority optionaly set by the OAL
- * \return TI_OK - if the packet was queued, TI_NOK - if the packet was dropped. 
- * \sa     txDataQ_Run
- */ 
-TI_STATUS txDataQ_InsertPacket (TI_HANDLE hTxDataQ, TTxCtrlBlk *pPktCtrlBlk, TI_UINT8 uPacketDtag)
-{
-    TTxDataQ        *pTxDataQ = (TTxDataQ *)hTxDataQ;
-	TEthernetHeader *pEthHead = (TEthernetHeader *)(pPktCtrlBlk->tTxnStruct.aBuf[0]);
-	TI_STATUS        eStatus;
-    TI_UINT32        uQueId;
-    TI_UINT32        uQueSize;
-    txCtrl_t         *pTxCtrl = (txCtrl_t *)(pTxDataQ->hTxCtrl);
-    TI_BOOL          bRequestSchedule = TI_FALSE;
-    TI_BOOL          bStopNetStack = TI_FALSE;
-	CL_TRACE_START_L3();
-
-    /* If packet is EAPOL or from the generic Ethertype, forward it to the Mgmt-Queue and exit */
-    if ((HTOWLANS(pEthHead->type) == ETHERTYPE_EAPOL) ||
-		(HTOWLANS(pEthHead->type) == pTxCtrl->genericEthertype))
-    {
-		pPktCtrlBlk->tTxPktParams.uPktType = TX_PKT_TYPE_EAPOL;
-
-        return txMgmtQ_Xmit (pTxDataQ->hTxMgmtQ, pPktCtrlBlk, TI_TRUE);
-        /* Note: The last parameter indicates that we are running in external context */
-    }
-    
-    pPktCtrlBlk->tTxPktParams.uPktType = TX_PKT_TYPE_ETHER;
-
-    /* Enter critical section to protect classifier data and queue access */
-    context_EnterCriticalSection (pTxDataQ->hContext);
-
-	/* Call the Classify function to set the TID field */
-	if (txDataClsfr_ClassifyTxPacket (hTxDataQ, pPktCtrlBlk, uPacketDtag) != TI_OK)
-	{
-#ifdef TI_DBG
-		pTxDataQ->uClsfrMismatchCount++;
-TRACE0(pTxDataQ->hReport, REPORT_SEVERITY_WARNING, "txDataQueue_xmit: No matching classifier found \n");
-#endif /* TI_DBG */
-	}
-
-	/* Enqueue the packet in the appropriate Queue */
-    uQueId = aTidToQueueTable[pPktCtrlBlk->tTxDescriptor.tid];
-    eStatus = que_Enqueue (pTxDataQ->aQueues[uQueId], (TI_HANDLE)pPktCtrlBlk);
-
-    /* Get number of packets in current queue */
-    uQueSize = que_Size (pTxDataQ->aQueues[uQueId]);
-
-    /* If the current queue is not stopped */
-    if (pTxDataQ->aQueueBusy[uQueId] == TI_FALSE)
-    {
-        /* If the queue has the desired number of packets, request switch to driver context for handling them */
-        if (uQueSize == pTxDataQ->aTxSendPaceThresh[uQueId])
-        {
-            tmr_StopTimer (pTxDataQ->hTxSendPaceTimer);
-            bRequestSchedule = TI_TRUE;
-        }
-        /* If below Tx-Send pacing threshold, start timer to trigger packets handling if expired */
-        else if (uQueSize < pTxDataQ->aTxSendPaceThresh[uQueId]) 
-        {
-            tmr_StartTimer (pTxDataQ->hTxSendPaceTimer, 
-                            txDataQ_TxSendPaceTimeout, 
-                            hTxDataQ, 
-                            TX_SEND_PACE_TIMEOUT_MSEC, 
-                            TI_FALSE);
-        }
-    }
-
-    /* If allowed to stop network stack and the queue is full, indicate to stop network and 
-          to schedule Tx handling (both are executed below, outside the critical section!) */
-	if ((pTxDataQ->bStopNetStackTx) && (uQueSize == pTxDataQ->aQueueMaxSize[uQueId]))
-	{
-		pTxDataQ->aNetStackQueueStopped[uQueId] = TI_TRUE;
-        bRequestSchedule = TI_TRUE;
-        bStopNetStack = TI_TRUE;
-    }
-
-    /* Leave critical section */
-    context_LeaveCriticalSection (pTxDataQ->hContext);
-
-    /* If needed, schedule Tx handling */
-	if (bRequestSchedule)
-    {
-        context_RequestSchedule (pTxDataQ->hContext, pTxDataQ->uContextId);
-    }
-
-    /* If needed, stop the network stack Tx */
-	if (bStopNetStack)
-	{
-		/* Stop the network stack from sending Tx packets as we have at least one date queue full.
-		Note that in some of the OS's (e.g Win Mobile) it is implemented by blocking the thread*/
-		wlanDrvIf_StopTx (pTxDataQ->hOs);
-    }
-
-	if (eStatus != TI_OK)
-    {
-        /* If the packet can't be queued drop it */
-        txCtrl_FreePacket (pTxDataQ->hTxCtrl, pPktCtrlBlk, TI_NOK);
-#ifdef TI_DBG
-		pTxDataQ->aQueueCounters[uQueId].uDroppedPacket++;
-#endif /* TI_DBG */
-    }
-	else
-    {
-#ifdef TI_DBG
-		pTxDataQ->aQueueCounters[uQueId].uEnqueuePacket++;
-#endif /* TI_DBG */
-    }
-
-    CL_TRACE_END_L3 ("tiwlan_drv.ko", "INHERIT", "TX", "");
-
-    return eStatus;
-}
-
-
-/** 
- * \fn     txDataQ_StopQueue
- * \brief  Set queue's busy indication
- * 
- * This function is called by the txCtrl_xmitData() if the queue's backpressure 
- *   indication is set. 
- * It sets the internal queue's Busy indication.
- *
- * \note   
- * \param  hTxDataQ - The object                                          
- * \param  uTidBitMap   - The changed TIDs busy bitmap                                          
- * \return void 
- * \sa     txDataQ_UpdateBusyMap 
- */ 
-void txDataQ_StopQueue (TI_HANDLE hTxDataQ, TI_UINT32 uTidBitMap)
-{
-	TTxDataQ *pTxDataQ = (TTxDataQ *)hTxDataQ;
-
-	/* Set the relevant queue(s) busy flag */
-	txDataQ_UpdateQueuesBusyState (pTxDataQ, uTidBitMap);
-}
-
-
-/** 
- * \fn     txDataQ_UpdateBusyMap
- * \brief  Set queue's busy indication
- * 
- * This function is called by the txCtrl if the backpressure map per TID is changed.
- * This could be as a result of Tx-Complete, admission change or association.
- * The function modifies the internal queue's Busy indication and calls the scheduler.
- *
- * \note   
- * \param  hTxDataQ - The object                                          
- * \param  uTidBitMap   - The changed TIDs busy bitmap                                          
- * \return void 
- * \sa     txDataQ_StopQueue
- */ 
-void txDataQ_UpdateBusyMap (TI_HANDLE hTxDataQ, TI_UINT32 tidBitMap)
-{
-	TTxDataQ *pTxDataQ = (TTxDataQ *)hTxDataQ;
-	
-	/* Update the Queue(s) mode */
-	txDataQ_UpdateQueuesBusyState (pTxDataQ, tidBitMap);
-
-	/* Run the scheduler */
-	txDataQ_RunScheduler (hTxDataQ);
-}
-
-
-/** 
- * \fn     txDataQ_StopAll
- * \brief  Disable Data-Queue module access to Tx path.
- * 
- * Called by the Tx-Port when the data-queue module can't access the Tx path.
- * Sets stop-all-queues indication.
- *
- * \note   
- * \param  hTxDataQ - The object                                          
- * \return void 
- * \sa     txDataQ_WakeAll  
- */ 
-void txDataQ_StopAll (TI_HANDLE hTxDataQ)
-{
-    TTxDataQ *pTxDataQ = (TTxDataQ *)hTxDataQ;
-
-	/* Disable the data Tx port */
-	pTxDataQ->bDataPortEnable = TI_FALSE;
-}
-
-
-/** 
- * \fn     txDataQ_WakeAll
- * \brief  Enable Data-Queue module access to Tx path.
- * 
- * Called by the Tx-Port when the data-queue module can access the Tx path.
- * Clears the stop-all-queues indication and calls the scheduler.
- *
- * \note   
- * \param  hTxDataQ - The object                                          
- * \return void 
- * \sa     txDataQ_StopAll
- */ 
-void txDataQ_WakeAll (TI_HANDLE hTxDataQ)
-{
-    TTxDataQ *pTxDataQ = (TTxDataQ *)hTxDataQ;
-
-	/* Enable the data Tx port */
-	pTxDataQ->bDataPortEnable = TI_TRUE;
-
-	/* Run the scheduler */
-	txDataQ_RunScheduler (hTxDataQ);
-}
-
-
-/***************************************************************************
-*                       DEBUG  FUNCTIONS  IMPLEMENTATION			       *
-****************************************************************************/
-
-#ifdef TI_DBG
-
-/** 
- * \fn     txDataQ_PrintModuleParams
- * \brief  Print Module Parameters
- * 
- * Print Module Parameters
- *
- * \note   
- * \param  hTxDataQ - The object                                          
- * \return void 
- * \sa     
- */ 
-void txDataQ_PrintModuleParams (TI_HANDLE hTxDataQ) 
-{
-	TTxDataQ *pTxDataQ = (TTxDataQ *)hTxDataQ;
-	TI_UINT32      qIndex;
-	
-	WLAN_OS_REPORT(("--------- txDataQueue_printModuleParams ----------\n\n"));
-	
-	WLAN_OS_REPORT(("bStopNetStackTx = %d\n",pTxDataQ->bStopNetStackTx));
-	WLAN_OS_REPORT(("bDataPortEnable = %d\n",pTxDataQ->bDataPortEnable));
-	WLAN_OS_REPORT(("uNumQueues      = %d\n",pTxDataQ->uNumQueues));
-	WLAN_OS_REPORT(("uLastQueId      = %d\n",pTxDataQ->uLastQueId));
-	WLAN_OS_REPORT(("uContextId      = %d\n",pTxDataQ->uContextId));
-
-	for (qIndex = 0; qIndex < pTxDataQ->uNumQueues; qIndex++)
-    {
-		WLAN_OS_REPORT(("aQueueBusy[%d]            = %d\n", qIndex, pTxDataQ->aQueueBusy[qIndex]));
-    }
-	for (qIndex = 0; qIndex < pTxDataQ->uNumQueues; qIndex++)
-    {
-        WLAN_OS_REPORT(("aQueueMaxSize[%d]         = %d\n", qIndex, pTxDataQ->aQueueMaxSize[qIndex]));
-    }
-	for (qIndex = 0; qIndex < pTxDataQ->uNumQueues; qIndex++)
-    {
-        WLAN_OS_REPORT(("aTxSendPaceThresh[%d]     = %d\n", qIndex, pTxDataQ->aTxSendPaceThresh[qIndex]));
-    }
-	for (qIndex = 0; qIndex < pTxDataQ->uNumQueues; qIndex++)
-    {
-        WLAN_OS_REPORT(("aNetStackQueueStopped[%d] = %d\n", qIndex, pTxDataQ->aNetStackQueueStopped[qIndex]));
-    }
-
-	WLAN_OS_REPORT(("-------------- Queues Info -----------------------\n"));
-	for (qIndex = 0; qIndex < MAX_NUM_OF_AC; qIndex++)
-    {
-        WLAN_OS_REPORT(("Que %d:\n", qIndex));
-        que_Print (pTxDataQ->aQueues[qIndex]);
-    }
-
-	WLAN_OS_REPORT(("--------------------------------------------------\n\n"));
-}
-
-
-/** 
- * \fn     txDataQ_PrintQueueStatistics
- * \brief  Print queues statistics
- * 
- * Print queues statistics
- *
- * \note   
- * \param  hTxDataQ - The object                                          
- * \return void 
- * \sa     
- */ 
-void txDataQ_PrintQueueStatistics (TI_HANDLE hTxDataQ)
-{
-#ifdef REPORT_LOG
-    TTxDataQ *pTxDataQ = (TTxDataQ *)hTxDataQ;
-    TI_UINT32      qIndex;
-
-    WLAN_OS_REPORT(("-------------- txDataQueue_printStatistics -------\n\n"));
-
-	WLAN_OS_REPORT(("uClsfrMismatchCount      = %d\n",pTxDataQ->uClsfrMismatchCount));
-    WLAN_OS_REPORT(("uTxSendPaceTimeoutsCount = %d\n",pTxDataQ->uTxSendPaceTimeoutsCount));
-	
-    WLAN_OS_REPORT(("-------------- Enqueue to queues -----------------\n"));
-    for(qIndex = 0; qIndex < MAX_NUM_OF_AC; qIndex++)
-        WLAN_OS_REPORT(("Que[%d]: = %d\n",qIndex, pTxDataQ->aQueueCounters[qIndex].uEnqueuePacket));
-	
-    WLAN_OS_REPORT(("-------------- Dequeue from queues ---------------\n"));
-    for(qIndex = 0; qIndex < MAX_NUM_OF_AC; qIndex++)
-        WLAN_OS_REPORT(("Que[%d]: = %d\n",qIndex, pTxDataQ->aQueueCounters[qIndex].uDequeuePacket));
-
-    WLAN_OS_REPORT(("-------------- Requeue to queues -----------------\n"));
-    for(qIndex = 0; qIndex < MAX_NUM_OF_AC; qIndex++)
-        WLAN_OS_REPORT(("Que[%d]: = %d\n",qIndex, pTxDataQ->aQueueCounters[qIndex].uRequeuePacket));
-
-    WLAN_OS_REPORT(("-------------- Sent to TxCtrl --------------------\n"));
-    for(qIndex = 0; qIndex < MAX_NUM_OF_AC; qIndex++)
-        WLAN_OS_REPORT(("Que[%d]: = %d\n",qIndex, pTxDataQ->aQueueCounters[qIndex].uXmittedPacket));
-
-    WLAN_OS_REPORT(("-------------- Dropped - Queue Full --------------\n"));
-    for(qIndex = 0; qIndex < MAX_NUM_OF_AC; qIndex++)
-        WLAN_OS_REPORT(("Que[%d]: = %d\n",qIndex, pTxDataQ->aQueueCounters[qIndex].uDroppedPacket));
-
-    WLAN_OS_REPORT(("--------------------------------------------------\n\n"));
-#endif
-}
-
-
-/** 
- * \fn     txDataQ_ResetQueueStatistics
- * \brief  Reset queues statistics
- * 
- * Reset queues statistics
- *
- * \note   
- * \param  hTxDataQ - The object                                          
- * \return void 
- * \sa     
- */ 
-void txDataQ_ResetQueueStatistics (TI_HANDLE hTxDataQ) 
-{
-	TTxDataQ *pTxDataQ = (TTxDataQ *)hTxDataQ;
-
-    os_memoryZero(pTxDataQ->hOs, &pTxDataQ->aQueueCounters, sizeof(pTxDataQ->aQueueCounters));
-    pTxDataQ->uTxSendPaceTimeoutsCount = 0;
-}
-
-
-#endif /* TI_DBG */
-	  
-		
-		  
-/***************************************************************************
-*                      INTERNAL  FUNCTIONS  IMPLEMENTATION				   *
-****************************************************************************/
-
-
-/** 
- * \fn     txDataQ_RunScheduler
- * \brief  The module's Tx scheduler
- * 
- * This function is the Data-Queue scheduler.
- * It selects a packet to transmit from the tx queues and sends it to the TxCtrl.
- * The queues are selected in a round-robin order.
- * The function is called by one of:
- *     txDataQ_Run()
- *     txDataQ_UpdateBusyMap()
- *     txDataQ_WakeAll()
- *
- * \note   
- * \param  hTxDataQ - The object                                          
- * \return void 
- * \sa     
- */ 
-static void txDataQ_RunScheduler (TI_HANDLE hTxDataQ)
-{
-	TTxDataQ   *pTxDataQ = (TTxDataQ *)hTxDataQ;
-	TI_UINT32  uIdleIterationsCount = 0;  /* Count iterations without packet transmission (for exit criteria) */
-	TI_UINT32  uQueId = pTxDataQ->uLastQueId;  /* The last iteration queue */
-	EStatusXmit eStatus;  /* The return status of the txCtrl_xmitData function */
-    TTxCtrlBlk *pPktCtrlBlk; /* Pointer to the packet to be dequeued and sent */
-
-	while(1)
-	{
-		/* If the Data port is closed or the scheduler couldn't send packets from 
-		     all queues, indicate end of current packets burst and exit */
-		if ( !pTxDataQ->bDataPortEnable  ||  (uIdleIterationsCount >= pTxDataQ->uNumQueues) )
-		{
-            TWD_txXfer_EndOfBurst (pTxDataQ->hTWD);
-			return;
-		}
-
-		/* Selecting the next queue */
-		uQueId++;
-		if (uQueId == pTxDataQ->uNumQueues)
-        {
-			uQueId = 0;
-        }
-		pTxDataQ->uLastQueId = uQueId;
-		
-		/* Increment the idle iterations counter */
-		uIdleIterationsCount++;
-
-		/* If the queue is busy (AC is full), continue to next queue. */
-		if (pTxDataQ->aQueueBusy[uQueId])
-        {
-			continue;
-        }
-
-		/* Dequeue a packet in a critical section */
-        context_EnterCriticalSection (pTxDataQ->hContext);
-		pPktCtrlBlk = (TTxCtrlBlk *) que_Dequeue (pTxDataQ->aQueues[uQueId]);
-        context_LeaveCriticalSection (pTxDataQ->hContext);
-
-		/* If the queue was empty, continue to the next queue */
-		if (pPktCtrlBlk == NULL)
-        {
-			if ((pTxDataQ->bStopNetStackTx) && pTxDataQ->aNetStackQueueStopped[uQueId])
-			{
-				pTxDataQ->aNetStackQueueStopped[uQueId] = TI_FALSE;
-				/*Resume the TX process as our date queues are empty*/
-				wlanDrvIf_ResumeTx (pTxDataQ->hOs);
-			}
-
-			continue;
-        }
-
-#ifdef TI_DBG
-		pTxDataQ->aQueueCounters[uQueId].uDequeuePacket++;
-#endif /* TI_DBG */
-
-		/* Send the packet */
-		eStatus = txCtrl_XmitData (pTxDataQ->hTxCtrl, pPktCtrlBlk);
-
-		/* 
-         * If the return status is busy it means that the packet was not sent
-         *   so we need to requeue it for future try.
-         */
-		if(eStatus == STATUS_XMIT_BUSY)
-		{
-            TI_STATUS eQueStatus;
-
-            /* Requeue the packet in a critical section */
-            context_EnterCriticalSection (pTxDataQ->hContext);
-			eQueStatus = que_Requeue (pTxDataQ->aQueues[uQueId], (TI_HANDLE)pPktCtrlBlk);
-            if (eQueStatus != TI_OK) 
-            {
-                /* If the packet can't be queued drop it */
-                /* Note: may happen only if this thread was preempted between the   
-                   dequeue and requeue and new packets were inserted into this quque */
-                txCtrl_FreePacket (pTxDataQ->hTxCtrl, pPktCtrlBlk, TI_NOK);
-#ifdef TI_DBG
-                pTxDataQ->aQueueCounters[uQueId].uDroppedPacket++;
-#endif /* TI_DBG */
-            }
-            context_LeaveCriticalSection (pTxDataQ->hContext);
-
-#ifdef TI_DBG
-			pTxDataQ->aQueueCounters[uQueId].uRequeuePacket++;
-#endif /* TI_DBG */
-
-			continue;
-		}
-
-		/* If we reach this point, a packet was sent successfully so reset the idle iterations counter. */
-		uIdleIterationsCount = 0;
-
-#ifdef TI_DBG
-		pTxDataQ->aQueueCounters[uQueId].uXmittedPacket++;
-#endif /* TI_DBG */
-
-	} /* End of while */
-
-	/* Unreachable code */
-}
-
-
-/** 
- * \fn     txDataQ_UpdateQueuesBusyState
- * \brief  Update queues' busy state
- * 
- * Update the Queues Mode to Busy according to the input TidBitMap.
-*               Each Tid that is set indicates that the related Queue is Busy. 
-*
- * \note   
- * \param  hTxDataQ - The object                                          
- * \param  uTidBitMap   - The changed TIDs busy bitmap                                          
- * \return void 
- * \sa     
- */ 
-static void txDataQ_UpdateQueuesBusyState (TTxDataQ *pTxDataQ, TI_UINT32 uTidBitMap)
-{
-	TI_UINT32 uTidIdx;
-	
-	/* Go over the TidBitMap and update the related queue busy state */
-	for (uTidIdx = 0; uTidIdx < MAX_NUM_OF_802_1d_TAGS; uTidIdx++, uTidBitMap >>= 1)
-	{
-		if (uTidBitMap & 0x1) /* this Tid is busy */
-        {
-			pTxDataQ->aQueueBusy[aTidToQueueTable[uTidIdx]] = TI_TRUE;
-        }
-		else
-        {
-			pTxDataQ->aQueueBusy[aTidToQueueTable[uTidIdx]] = TI_FALSE;
-        }
-	}
-}
-
-
-/*
- * \brief   Handle Tx-Send-Pacing timeout.
- * 
- * \param  hTxDataQ        - Module handle
- * \param  bTwdInitOccured - Indicate if TWD restart (recovery) occured
- * \return void
- * 
- * \par Description
- * Call the Tx scheduler to handle the queued packets.
- * 
- * \sa 
- */
-static void txDataQ_TxSendPaceTimeout (TI_HANDLE hTxDataQ, TI_BOOL bTwdInitOccured)
-{
-	TTxDataQ *pTxDataQ = (TTxDataQ *)hTxDataQ;
-
-    pTxDataQ->uTxSendPaceTimeoutsCount++;
-
-    txDataQ_RunScheduler (hTxDataQ);
-}
diff --git a/wl1271/stad/src/Data_link/txDataQueue.h b/wl1271/stad/src/Data_link/txDataQueue.h
deleted file mode 100644
index 4f93d02..0000000
--- a/wl1271/stad/src/Data_link/txDataQueue.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * txDataQueue.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/***************************************************************************/
-/*																		   */
-/*	  MODULE:	TxDataQueue.h										       */
-/*    PURPOSE:	Tx Data Queue module Header file						   */
-/*																		   */
-/***************************************************************************/
-#ifndef _TX_DATA_QUEUE_H_
-#define _TX_DATA_QUEUE_H_
-
-
-#include "TWDriver.h"
-#include "DataCtrl_Api.h"
-
-
-#define TX_SEND_PACE_TIMEOUT_MSEC   1
-
-/* Max number of packets in each queue */
-#define DATA_QUEUE_DEPTH_BE  60
-#define DATA_QUEUE_DEPTH_BK  10
-#define DATA_QUEUE_DEPTH_VI  32
-#define DATA_QUEUE_DEPTH_VO  10
-#define DATA_QUEUE_DEPTH_TOTAL  (DATA_QUEUE_DEPTH_BE + DATA_QUEUE_DEPTH_BK + DATA_QUEUE_DEPTH_VI + DATA_QUEUE_DEPTH_VO)
-
-/* Verify that there are enough TxCtrlBlks for all users that are queueing packets (driver + FW) */
-#if ((DATA_QUEUE_DEPTH_TOTAL + (MGMT_QUEUES_DEPTH * 2) + NUM_TX_DESCRIPTORS) > (CTRL_BLK_ENTRIES_NUM - 2))
-    #error  Not enough TxCtrlBlks for all users !!
-#endif
-
-/* Tx packets handling statistics */
-typedef struct
-{
-	TI_UINT32 uEnqueuePacket;
-	TI_UINT32 uDequeuePacket;
-	TI_UINT32 uRequeuePacket;
-	TI_UINT32 uXmittedPacket;
-	TI_UINT32 uDroppedPacket;
-} TTxDataQueueDebugCnt;
-
-/* The module's object */
-typedef struct 
-{
-	TI_HANDLE            hContext;
-	TI_HANDLE            hTxCtrl;
-	TI_HANDLE            hOs;
-	TI_HANDLE            hReport;
-	TI_HANDLE            hTxMgmtQ;
-	TI_HANDLE            hTWD;
-			             
-	TClsfrParams		 tClsfrParams;  /* The classifier sub-module parameters */
-
-	TI_BOOL              bDataPortEnable; /* Data port open or not */
-    TI_UINT32            uContextId;  /* ID allocated to this module on registration to context module */
-    TI_HANDLE            hTxSendPaceTimer; /* If queued packets number doesn't reach threshold within timeout, Tx handling is started */  
-						   
-	/* Tx aQueues */	    	
-	TI_UINT32            uNumQueues; /* Indicates the number of allocated aQueues */
-	TI_UINT32            aQueueMaxSize[MAX_NUM_OF_AC]; /* indicates the max size of each Data queue */
-	TI_UINT32            aTxSendPaceThresh[MAX_NUM_OF_AC]; /* Number of packets to queue before scheduling Tx handling */
-	TI_HANDLE            aQueues[MAX_NUM_OF_AC];  /* The Tx aQueues handles */
-    TI_BOOL	             aQueueBusy[MAX_NUM_OF_AC]; /* per queue busy indication */
-	TI_UINT32            uLastQueId; /* the last queue processed by the scheduler */				
-	TI_BOOL				 aNetStackQueueStopped[MAX_NUM_OF_AC];/*indicate if the current queue was full and caused Tx network stack stop*/
-	TI_BOOL				 bStopNetStackTx;/*Flag to enable/disable Tx stop*/
-
-	/* Counters */
-	TTxDataQueueDebugCnt aQueueCounters[MAX_NUM_OF_AC]; /* Save Tx statistics per Tx-queue. */
-	TI_UINT32			 uClsfrMismatchCount;
-	TI_UINT32			 uTxSendPaceTimeoutsCount;
-
-} TTxDataQ;
-
-
-/* TIDs Mapping to Queues */
-static const TI_UINT32 aTidToQueueTable[MAX_NUM_OF_802_1d_TAGS] = {0, 1, 1, 0, 2, 2, 3, 3};
-
-
-#endif /* _TX_DATA_QUEUE_H_ */
diff --git a/wl1271/stad/src/Data_link/txDataQueue_Api.h b/wl1271/stad/src/Data_link/txDataQueue_Api.h
deleted file mode 100644
index 1af2277..0000000
--- a/wl1271/stad/src/Data_link/txDataQueue_Api.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * txDataQueue_Api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*																		   */
-/*    	PURPOSE:	Tx Data Queue module api functions header file		   */
-/*																		   */
-/***************************************************************************/
-
-#ifndef _TX_DATA_QUEUE_API_H_
-#define _TX_DATA_QUEUE_API_H_
-
-#include "paramOut.h"
-#include "TWDriver.h"
-#include "DrvMainModules.h"
-
-
-/* 
- * Tx-Data-Queue functions:
- */
-TI_HANDLE txDataQ_Create (TI_HANDLE hOs);
-void      txDataQ_Init (TStadHandlesList *pStadHandles);
-TI_STATUS txDataQ_SetDefaults (TI_HANDLE  hTxDataQ, txDataInitParams_t *pTxDataInitParams);
-TI_STATUS txDataQ_Destroy (TI_HANDLE hTxDataQ);
-void      txDataQ_ClearQueues (TI_HANDLE hTxDataQ);
-TI_STATUS txDataQ_InsertPacket (TI_HANDLE hTxDataQ, TTxCtrlBlk *pPktCtrlBlk, TI_UINT8 uPacketDtag);
-void      txDataQ_StopQueue (TI_HANDLE hTxDataQ, TI_UINT32 tidBitMap);
-void      txDataQ_UpdateBusyMap (TI_HANDLE hTxDataQ, TI_UINT32 tidBitMap);
-void      txDataQ_StopAll (TI_HANDLE hTxDataQ);
-void      txDataQ_WakeAll (TI_HANDLE hTxDataQ);
-
-#ifdef TI_DBG
-void      txDataQ_PrintModuleParams    (TI_HANDLE hTxDataQ);
-void      txDataQ_PrintQueueStatistics (TI_HANDLE hTxDataQ);
-void      txDataQ_ResetQueueStatistics (TI_HANDLE hTxDataQ);
-#endif /* TI_DBG */
-
-
-/* 
- * Tx-Data-Classifier functions:
- */
-TI_STATUS txDataClsfr_Config           (TI_HANDLE hTxDataQ, TClsfrParams *pClsfrInitParams);
-TI_STATUS txDataClsfr_ClassifyTxPacket (TI_HANDLE hTxDataQ, TTxCtrlBlk *pPktCtrlBlk, TI_UINT8 uPacketDtag);
-TI_STATUS txDataClsfr_InsertClsfrEntry (TI_HANDLE hTxDataQ, TClsfrTableEntry *pNewEntry);
-TI_STATUS txDataClsfr_RemoveClsfrEntry (TI_HANDLE hTxDataQ, TClsfrTableEntry *pRemEntry);
-TI_STATUS txDataClsfr_SetClsfrType     (TI_HANDLE hTxDataQ, EClsfrType eNewClsfrType);
-TI_STATUS txDataClsfr_GetClsfrType     (TI_HANDLE hTxDataQ, EClsfrType *pClsfrType);
-
-#ifdef TI_DBG
-void      txDataClsfr_PrintClsfrTable  (TI_HANDLE hTxDataQ);
-#endif /* TI_DBG */
-
-
-#endif /* _TX_DATA_QUEUE_API_H_ */
-
diff --git a/wl1271/stad/src/Data_link/txMgmtQueue.c b/wl1271/stad/src/Data_link/txMgmtQueue.c
deleted file mode 100644
index befc803..0000000
--- a/wl1271/stad/src/Data_link/txMgmtQueue.c
+++ /dev/null
@@ -1,1003 +0,0 @@
-/*
- * txMgmtQueue.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-/** \file   txMgmtQueue.c 
- *  \brief  The Tx Mgmt Queues module.
- *  
- *	DESCRIPTION:															
- *	============ 													
- *	The Management-Queues module is responsible for the following tasks:	
- *		1.	Queue the driver generated Tx packets, including management,	
- *			EAPOL and null packets until they are transmitted.				
- *			The management packets are buffered in the management-queue,	
- *			and the others in the EAPOL-queue.								
- *		2.	Maintain a state machine that follows the queues state and		
- *			the connection states and enables specific transmission types	
- *			accordingly (e.g. only management).								
- *		3.	Gain access to the Tx path when the management queues are not	
- *			empty, and return the access to the data queues when the		
- *			management queues are empty.									
- *		4.	Schedule packets transmission with strict priority of the		
- *			management queue over the EAPOL queue, and according to the		
- *			backpressure controls from the Port (all queues) and from the	
- *			Tx-Ctrl (per queue). 
- *
- *  \see    txMgmtQueue.h
- */
-
-#define __FILE_ID__  FILE_ID_61
-#include "tidef.h"
-#include "paramOut.h"
-#include "osApi.h"
-#include "TWDriver.h"
-#include "DataCtrl_Api.h"
-#include "report.h"
-#include "queue.h"
-#include "context.h"
-#include "DrvMainModules.h"
-
-
-#define MGMT_QUEUES_TID		MAX_USER_PRIORITY
-
-typedef enum
-{
-	QUEUE_TYPE_MGMT,	/* Mgmt-queue  - high-priority, for mgmt packets only. */
-	QUEUE_TYPE_EAPOL,	/* EAPOL-queue - low-priority, for other internal packets (EAPOL, NULL, IAPP). */
-	NUM_OF_MGMT_QUEUES
-} EMgmtQueueTypes;
-
-/* State-Machine Events */
-typedef enum
-{
-	SM_EVENT_CLOSE,			/* All Tx types should be closed. */
-	SM_EVENT_MGMT,			/* Allow only mgmt packets. */
-	SM_EVENT_EAPOL,			/* Allow mgmt and EAPOL packets. */
-	SM_EVENT_OPEN,			/* Allow all packets. */
-	SM_EVENT_QUEUES_EMPTY,	/* Mgmt-aQueues are now both empty. */
-	SM_EVENT_QUEUES_NOT_EMPTY /* At least one of the Mgmt-aQueues is now not empty. */
-} ESmEvent;
-
-/* State-Machine States */
-typedef enum
-{
-	SM_STATE_CLOSE,			/* All Tx path is closed. */
-	SM_STATE_MGMT,			/* Only mgmt Tx is permitted. */
-	SM_STATE_EAPOL,			/* Only mgmt and EAPOL Tx is permitted. */
-	SM_STATE_OPEN_MGMT,		/* All Tx permitted and Mgmt aQueues are currently active (date disabled). */
-	SM_STATE_OPEN_DATA		/* All Tx permitted and Data aQueues are currently active (mgmt disabled). */
-} ESmState;
-
-/* State-Machine Actions */
-typedef enum
-{
-	SM_ACTION_NULL,				
-	SM_ACTION_ENABLE_DATA,		
-	SM_ACTION_ENABLE_MGMT,		
-	SM_ACTION_RUN_SCHEDULER
-} ESmAction;
-
-/* TI_TRUE if both aQueues are empty. */
-#define ARE_ALL_MGMT_QUEUES_EMPTY(aQueues)	( (que_Size(aQueues[QUEUE_TYPE_MGMT] ) == 0)  &&  \
-											  (que_Size(aQueues[QUEUE_TYPE_EAPOL]) == 0) )
-
-typedef struct
-{
-	TI_UINT32 aEnqueuePackets[NUM_OF_MGMT_QUEUES];
-	TI_UINT32 aDequeuePackets[NUM_OF_MGMT_QUEUES];
-	TI_UINT32 aRequeuePackets[NUM_OF_MGMT_QUEUES];
-	TI_UINT32 aDroppedPackets[NUM_OF_MGMT_QUEUES];
-	TI_UINT32 aXmittedPackets[NUM_OF_MGMT_QUEUES];
-} TDbgCount;
-
-/* The module object. */
-typedef struct 
-{
-	/* Handles */
-	TI_HANDLE		hOs;
-	TI_HANDLE		hReport;
-	TI_HANDLE 		hTxCtrl;
-	TI_HANDLE 		hTxPort;
-	TI_HANDLE 		hContext;
-	TI_HANDLE       hTWD;
-		
-	TI_BOOL			bMgmtPortEnable;/* Port open for mgmt-aQueues or not. */
-	ESmState		eSmState;	    /* The current state of the SM. */	
-	ETxConnState	eTxConnState;   /* See typedef in module API. */
-    TI_UINT32       uContextId;     /* ID allocated to this module on registration to context module */
-	
-	/* Mgmt aQueues */			
-	TI_HANDLE   	aQueues[NUM_OF_MGMT_QUEUES];		   /* The mgmt-aQueues handles. */
-    TI_BOOL			aQueueBusy[NUM_OF_MGMT_QUEUES];		   /* Related AC is busy. */
-	TI_BOOL			aQueueEnabledBySM[NUM_OF_MGMT_QUEUES]; /* Queue is enabled by the SM. */
-
-	/* Debug Counters */
-	TDbgCount		tDbgCounters; /* Save Tx statistics per mgmt-queue. */
-
-} TTxMgmtQ;
-
-/* The module internal functions */
-static void mgmtQueuesSM (TTxMgmtQ *pTxMgmtQ, ESmEvent smEvent);
-static void runSchedulerNotFromSm (TTxMgmtQ *pTxMgmtQ);
-static void runScheduler (TTxMgmtQ *pTxMgmtQ);
-static void updateQueuesBusyMap (TTxMgmtQ *pTxMgmtQ, TI_UINT32 tidBitMap);
-
-/*******************************************************************************
-*                       PUBLIC  FUNCTIONS  IMPLEMENTATION					   *
-********************************************************************************/
-
-
-/** 
- * \fn     txMgmtQ_Create
- * \brief  Create the module and its queues
- * 
- * Create the Tx Mgmt Queue module and its queues.
- * 
- * \note   
- * \param  hOs - Handle to the Os Abstraction Layer                           
- * \return Handle to the allocated Tx Mgmt Queue module (NULL if failed) 
- * \sa     
- */ 
-TI_HANDLE txMgmtQ_Create (TI_HANDLE hOs)
-{
-    TTxMgmtQ *pTxMgmtQ;
-
-    /* allocate TxMgmtQueue module */
-    pTxMgmtQ = os_memoryAlloc (hOs, (sizeof(TTxMgmtQ)));
-
-    if(!pTxMgmtQ)
-	{
-        WLAN_OS_REPORT(("Error allocating the TxMgmtQueue Module\n"));
-		return NULL;
-	}
-
-    /* Reset TxMgmtQueue module */
-    os_memoryZero (hOs, pTxMgmtQ, (sizeof(TTxMgmtQ)));
-
-    return (TI_HANDLE)pTxMgmtQ;
-}
-
-
-/** 
- * \fn     txMgmtQ_Init
- * \brief  Configure module with default settings
-*
- * Get other modules handles.
- * Init the Tx Mgmt queues.
- * Register as the context-engine client.
- * 
- * \note   
- * \param  pStadHandles  - The driver modules handles
- * \return void  
- * \sa     
- */ 
-void txMgmtQ_Init (TStadHandlesList *pStadHandles)
-{
-    TTxMgmtQ  *pTxMgmtQ = (TTxMgmtQ *)(pStadHandles->hTxMgmtQ);
-    TI_UINT32  uNodeHeaderOffset = TI_FIELD_OFFSET(TTxnStruct, tTxnQNode);
-	int        uQueId;
-	
-    /* configure modules handles */
-    pTxMgmtQ->hOs		= pStadHandles->hOs;
-    pTxMgmtQ->hReport	= pStadHandles->hReport;
-    pTxMgmtQ->hTxCtrl	= pStadHandles->hTxCtrl;
-    pTxMgmtQ->hTxPort	= pStadHandles->hTxPort;
-    pTxMgmtQ->hContext	= pStadHandles->hContext;
-    pTxMgmtQ->hTWD	    = pStadHandles->hTWD;
-
-	pTxMgmtQ->bMgmtPortEnable = TI_TRUE;	/* Port Default status is open (data-queues are disabled). */
-	pTxMgmtQ->eSmState = SM_STATE_CLOSE; /* SM default state is CLOSE. */
-	pTxMgmtQ->eTxConnState = TX_CONN_STATE_CLOSE;
-
-    /* initialize tx Mgmt queues */
-	for (uQueId = 0; uQueId < NUM_OF_MGMT_QUEUES; uQueId++)
-    {
-        pTxMgmtQ->aQueues[uQueId] = que_Create (pTxMgmtQ->hOs, 
-                                                pTxMgmtQ->hReport, 
-                                                MGMT_QUEUES_DEPTH, 
-                                                uNodeHeaderOffset);
-		
-		/* If any Queues' allocation failed, print error, free TxMgmtQueue module and exit */
-		if (pTxMgmtQ->aQueues[uQueId] == NULL)
-		{
-            TRACE0(pTxMgmtQ->hReport, REPORT_SEVERITY_CONSOLE , "Failed to create queue\n");
-			WLAN_OS_REPORT(("Failed to create queue\n"));
-			os_memoryFree (pTxMgmtQ->hOs, pTxMgmtQ, sizeof(TTxMgmtQ));
-			return;
-		}
-
-		pTxMgmtQ->aQueueBusy[uQueId]        = TI_FALSE;	/* aQueueBusy default is not busy. */
-		pTxMgmtQ->aQueueEnabledBySM[uQueId] = TI_FALSE; /* Queue is disabled by the SM (state is CLOSE). */
-    }
-
-    /* Register to the context engine and get the client ID */
-    pTxMgmtQ->uContextId = context_RegisterClient (pTxMgmtQ->hContext,
-                                                   txMgmtQ_QueuesNotEmpty,
-                                                   (TI_HANDLE)pTxMgmtQ,
-                                                   TI_TRUE,
-                                                   "TX_MGMT",
-                                                   sizeof("TX_MGMT"));
-
-TRACE0(pTxMgmtQ->hReport, REPORT_SEVERITY_INIT, ".....Tx Mgmt Queue configured successfully\n");
-}
-
-
-/** 
- * \fn     txMgmtQ_Destroy
- * \brief  Destroy the module and its queues
- * 
- * Clear and destroy the queues and then destroy the module object.
- * 
- * \note   
- * \param  hTxMgmtQ - The module's object                                          
- * \return TI_OK - Unload succesfull, TI_NOK - Unload unsuccesfull 
- * \sa     
- */ 
-TI_STATUS txMgmtQ_Destroy (TI_HANDLE hTxMgmtQ)
-{
-    TTxMgmtQ  *pTxMgmtQ = (TTxMgmtQ *)hTxMgmtQ;
-    TI_STATUS  eStatus = TI_OK;
-    int        uQueId;
-
-    /* Dequeue and free all queued packets */
-    txMgmtQ_ClearQueues (hTxMgmtQ);
-
-    /* free Mgmt queues */
-    for (uQueId = 0 ; uQueId < NUM_OF_MGMT_QUEUES ; uQueId++)
-    {
-        if (que_Destroy(pTxMgmtQ->aQueues[uQueId]) != TI_OK)
-		{
-            TRACE1(pTxMgmtQ->hReport, REPORT_SEVERITY_ERROR, "txMgmtQueue_unLoad: fail to free Mgmt Queue number: %d\n",uQueId);
-			eStatus = TI_NOK;
-		}
-    }
-
-    /* free Tx Mgmt Queue Module */
-    os_memoryFree (pTxMgmtQ->hOs, pTxMgmtQ, sizeof(TTxMgmtQ));
-
-    return eStatus;
-}
-
-
-/** 
- * \fn     txMgmtQ_ClearQueues
- * \brief  Clear all queues
- * 
- * Dequeue and free all queued packets.
- * 
- * \note   
- * \param  hTxMgmtQ - The object                                          
- * \return void 
- * \sa     
- */ 
-void txMgmtQ_ClearQueues (TI_HANDLE hTxMgmtQ)
-{
-    TTxMgmtQ   *pTxMgmtQ = (TTxMgmtQ *)hTxMgmtQ;
-    TTxCtrlBlk *pPktCtrlBlk;
-    TI_UINT32  uQueId;
-
-    /* Dequeue and free all queued packets */
-    for (uQueId = 0 ; uQueId < NUM_OF_MGMT_QUEUES ; uQueId++)
-    {
-        do {
-            context_EnterCriticalSection (pTxMgmtQ->hContext);
-            pPktCtrlBlk = (TTxCtrlBlk *)que_Dequeue(pTxMgmtQ->aQueues[uQueId]);
-            context_LeaveCriticalSection (pTxMgmtQ->hContext);
-            if (pPktCtrlBlk != NULL) {
-                txCtrl_FreePacket (pTxMgmtQ->hTxCtrl, pPktCtrlBlk, TI_NOK);
-            }
-        } while (pPktCtrlBlk != NULL);
-    }
-}
-
-
-/** 
- * \fn     txMgmtQ_Xmit
- * \brief  Insert non-data packet for transmission
- * 
- * This function is used by the driver applications to send Tx packets other than the 
- *   regular data traffic, including the following packet types:
-*				- Management
-*				- EAPOL
-*				- NULL
-*				- IAPP
- * The managment packets are enqueued to the Mgmt-queue and the others to the Eapol-queue.
- * EAPOL packets may be inserted from the network stack context, so it requires switching 
- *   to the driver's context (after the packet is enqueued).
- * If the selected queue was empty before the packet insertion, the SM is called 
- *   with QUEUES_NOT_EMPTY event (in case of external context, only after the context switch).
- *
- * \note   
- * \param  hTxMgmtQ         - The module's object                                          
- * \param  pPktCtrlBlk      - Pointer to the packet CtrlBlk                                         
- * \param  bExternalContext - Indicates if called from non-driver context                                           
- * \return TI_OK - if the packet was queued, TI_NOK - if the packet was dropped. 
- * \sa     txMgmtQ_QueuesNotEmpty
- */ 
-TI_STATUS txMgmtQ_Xmit (TI_HANDLE hTxMgmtQ, TTxCtrlBlk *pPktCtrlBlk, TI_BOOL bExternalContext)
-{
-    TTxMgmtQ *pTxMgmtQ = (TTxMgmtQ *)hTxMgmtQ;
-	TI_STATUS eStatus;
-	TI_UINT32 uQueId;
-    TI_UINT32 uQueSize;
-
-	/* Always set highest TID for mgmt-queues packets. */
-	pPktCtrlBlk->tTxDescriptor.tid = MGMT_QUEUES_TID; 
-
-    /* Select queue asccording to the packet type */
-	uQueId = (pPktCtrlBlk->tTxPktParams.uPktType == TX_PKT_TYPE_MGMT) ? QUEUE_TYPE_MGMT : QUEUE_TYPE_EAPOL ;
-
-    /* Enter critical section to protect queue access */
-    context_EnterCriticalSection (pTxMgmtQ->hContext);
-
-	/* Enqueue the packet in the appropriate Queue */
-    eStatus = que_Enqueue (pTxMgmtQ->aQueues[uQueId], (TI_HANDLE)pPktCtrlBlk);
-
-    /* Get number of packets in current queue */
-    uQueSize = que_Size (pTxMgmtQ->aQueues[uQueId]);
-
-    /* Leave critical section */
-    context_LeaveCriticalSection (pTxMgmtQ->hContext);
-
-	/* If packet enqueued successfully */
-	if (eStatus == TI_OK)
-	{
-		pTxMgmtQ->tDbgCounters.aEnqueuePackets[uQueId]++;
-
-        /* If selected queue was empty before packet insertion */
-        if (uQueSize == 1) 
-        {
-            /* If called from external context (EAPOL from network), request switch to the driver's context. */
-            if (bExternalContext) 
-            {
-                context_RequestSchedule (pTxMgmtQ->hContext, pTxMgmtQ->uContextId);
-            }
-
-            /* If already in the driver's context, call the SM with QUEUES_NOT_EMPTY event. */
-            else 
-            {
-                mgmtQueuesSM(pTxMgmtQ, SM_EVENT_QUEUES_NOT_EMPTY);
-            }
-        }
-	}
-
-	else
-    {
-        /* If the packet can't be queued so drop it */
-        txCtrl_FreePacket (pTxMgmtQ->hTxCtrl, pPktCtrlBlk, TI_NOK);
-		pTxMgmtQ->tDbgCounters.aDroppedPackets[uQueId]++;
-    }
-
-    return eStatus;
-}
-
-
-/** 
- * \fn     txMgmtQ_QueuesNotEmpty
- * \brief  Context-Engine Callback
- * 
- * Context-Engine Callback for processing queues in driver's context.
- * Called after driver's context scheduling was requested in txMgmtQ_Xmit().
- * Calls the SM with QUEUES_NOT_EMPTY event.
- * 
- * \note   
- * \param  hTxMgmtQ - The module's object                                          
- * \return void 
- * \sa     txMgmtQ_Xmit
- */ 
-void txMgmtQ_QueuesNotEmpty (TI_HANDLE hTxMgmtQ)
-{
-    TTxMgmtQ  *pTxMgmtQ = (TTxMgmtQ *)hTxMgmtQ;
-
-    /* Call the SM with QUEUES_NOT_EMPTY event. */
-    mgmtQueuesSM(pTxMgmtQ, SM_EVENT_QUEUES_NOT_EMPTY);
-}
-
-
-/** 
- * \fn     txMgmtQ_StopQueue
- * \brief  Context-Engine Callback
- * 
- * This function is called by the txCtrl_xmitMgmt() if the queue's backpressure indication
- *   is set. It sets the internal queue's Busy indication.
- * 
- * \note   
- * \param  hTxMgmtQ   - The module's object                                          
- * \param  uTidBitMap - The busy TIDs bitmap                                          
- * \return void 
- * \sa     txMgmtQ_UpdateBusyMap
- */ 
-void txMgmtQ_StopQueue (TI_HANDLE hTxMgmtQ, TI_UINT32 uTidBitMap)
-{
-	TTxMgmtQ *pTxMgmtQ = (TTxMgmtQ *)hTxMgmtQ;
-
-	/* Update the Queue(s) mode */
-	updateQueuesBusyMap (pTxMgmtQ, uTidBitMap);
-}
-
-
-/** 
- * \fn     txMgmtQ_UpdateBusyMap
- * \brief  Update the queues busy map
- * 
- * This function is called by the txCtrl if the backpressure map per TID is changed.
- * This could be as a result of Tx-Complete, admission change or association.
- * The function modifies the internal queues Busy indication and calls the scheduler.
- * 
- * \note   
- * \param  hTxMgmtQ   - The module's object                                          
- * \param  uTidBitMap - The busy TIDs bitmap                                          
- * \return void 
- * \sa     txMgmtQ_StopQueue
- */ 
-void txMgmtQ_UpdateBusyMap (TI_HANDLE hTxMgmtQ, TI_UINT32 uTidBitMap)
-{
-	TTxMgmtQ *pTxMgmtQ = (TTxMgmtQ *)hTxMgmtQ;
-	
-	/* Update the Queue(s) busy map. */
-	updateQueuesBusyMap (pTxMgmtQ, uTidBitMap);
-
-	/* If the queues are not empty, run the scheduler and if they become empty update the SM. */
-	runSchedulerNotFromSm (pTxMgmtQ);
-}
-
-
-/** 
- * \fn     txMgmtQ_StopAll
- * \brief  Stop all queues transmission
- * 
- * This function is called by the Tx-Port when the whole Mgmt-queue is stopped.
- * It clears the common queues enable indication.
- * 
- * \note   
- * \param  hTxMgmtQ   - The module's object                                          
- * \return void 
- * \sa     txMgmtQ_WakeAll
- */ 
-void txMgmtQ_StopAll (TI_HANDLE hTxMgmtQ)
-{
-    TTxMgmtQ *pTxMgmtQ = (TTxMgmtQ *)hTxMgmtQ;
-
-	/* Disable the Mgmt Tx port */
-	pTxMgmtQ->bMgmtPortEnable = TI_FALSE;
-}
-
-
-/** 
- * \fn     txMgmtQ_WakeAll
- * \brief  Enable all queues transmission
- * 
- * This function is called by the Tx-Port when the whole Mgmt-queue is enabled.
- * It sets the common queues enable indication and calls the scheduler.
- * 
- * \note   
- * \param  hTxMgmtQ   - The module's object                                          
- * \return void 
- * \sa     txMgmtQ_StopAll
- */ 
-void txMgmtQ_WakeAll (TI_HANDLE hTxMgmtQ)
-{
-    TTxMgmtQ *pTxMgmtQ = (TTxMgmtQ *)hTxMgmtQ;
-
-	/* Enable the Mgmt Tx port */
-	pTxMgmtQ->bMgmtPortEnable = TI_TRUE;
-
-	/* If the queues are not empty, run the scheduler and if they become empty update the SM. */
-	runSchedulerNotFromSm (pTxMgmtQ);
-}
-
-
-/** 
- * \fn     txMgmtQ_SetConnState
- * \brief  Enable all queues transmission
- * 
- * Called by the connection SM and updates the connection state from Tx perspective 
- *   (i.e. which packet types are permitted).
-*               Calls the local SM to handle this state change.
-*
- * \note   
- * \param  hTxMgmtQ     - The module's object                                          
- * \param  eTxConnState - The new Tx connection state                                          
- * \return void 
- * \sa     mgmtQueuesSM
- */ 
-void txMgmtQ_SetConnState (TI_HANDLE hTxMgmtQ, ETxConnState eTxConnState)
-{
-    TTxMgmtQ *pTxMgmtQ = (TTxMgmtQ *)hTxMgmtQ;
-
-	pTxMgmtQ->eTxConnState = eTxConnState;
-
-	/* Call the SM with the current event. */
-	switch (eTxConnState)
-	{
-		case TX_CONN_STATE_CLOSE:	mgmtQueuesSM(pTxMgmtQ, SM_EVENT_CLOSE);		break;
-		case TX_CONN_STATE_MGMT:	mgmtQueuesSM(pTxMgmtQ, SM_EVENT_MGMT);		break;
-		case TX_CONN_STATE_EAPOL:	mgmtQueuesSM(pTxMgmtQ, SM_EVENT_EAPOL);		break;
-		case TX_CONN_STATE_OPEN:	mgmtQueuesSM(pTxMgmtQ, SM_EVENT_OPEN);		break;
-
-		default:
-TRACE1(pTxMgmtQ->hReport, REPORT_SEVERITY_ERROR, ": Unknown eTxConnState = %d\n", eTxConnState);
-	}
-}
-
-
-		
-/*******************************************************************************
-*                       INTERNAL  FUNCTIONS  IMPLEMENTATION					   *
-********************************************************************************/
-
-
-/** 
- * \fn     mgmtQueuesSM
- * \brief  The module state-machine (static function)
- * 
- * The SM follows the system management states (see ETxConnState) and the Mgmt queues
- *   status (empty or not), and contorls the Tx queues flow accordingly (mgmt and data queues).
- * For detailed explanation, see the Tx-Path LLD document!
- * 
- * \note   To avoid recursion issues, all SM actions are done at the end of the function, 
- *            since some of them may invoke the SM again.
- * \param  pTxMgmtQ - The module's object                                          
- * \param  eSmEvent - The event to act upon                                          
- * \return void 
- * \sa     txMgmtQ_SetConnState
- */ 
-static void mgmtQueuesSM (TTxMgmtQ *pTxMgmtQ, ESmEvent eSmEvent)
-{
-	ESmState  ePrevState = pTxMgmtQ->eSmState;
-	ESmAction eSmAction  = SM_ACTION_NULL;
-
-	switch(eSmEvent)
-	{
-		case SM_EVENT_CLOSE:
-			/* 
-			 * Tx link is closed (expected in any state), so disable both mgmt queues  
-			 *   and if data-queues are active disable them via txPort module.
-			 */
-			pTxMgmtQ->eSmState = SM_STATE_CLOSE;
-			pTxMgmtQ->aQueueEnabledBySM[QUEUE_TYPE_MGMT]  = TI_FALSE;
-			pTxMgmtQ->aQueueEnabledBySM[QUEUE_TYPE_EAPOL] = TI_FALSE;
-			if (ePrevState == SM_STATE_OPEN_DATA)
-				eSmAction = SM_ACTION_ENABLE_MGMT;
-			break;
-
-		case SM_EVENT_MGMT:
-			/* 
-			 * Only Mgmt packets are permitted (expected from any state):
-			 *   - Enable the mgmt queue and disable the Eapol queue.
-			 *   - If data-queues are active disable them via txPort (this will run the scheduler).
-			 *   - Else run the scheduler (to send mgmt packets if waiting).
-			 */
-			pTxMgmtQ->eSmState = SM_STATE_MGMT;
-			pTxMgmtQ->aQueueEnabledBySM[QUEUE_TYPE_MGMT]  = TI_TRUE;
-			pTxMgmtQ->aQueueEnabledBySM[QUEUE_TYPE_EAPOL] = TI_FALSE;
-			if (ePrevState == SM_STATE_OPEN_DATA)
-				eSmAction = SM_ACTION_ENABLE_MGMT;
-			else
-				eSmAction = SM_ACTION_RUN_SCHEDULER;
-			break;
-
-		case SM_EVENT_EAPOL:
-			/* 
-			 * EAPOL packets are also permitted (expected in MGMT or CLOSE state), so enable the 
-			 *   EAPOL queue and run the scheduler (to send packets from EAPOL queue if waiting).
-			 */
-			if ( (ePrevState != SM_STATE_CLOSE) && (ePrevState != SM_STATE_MGMT) )
-			{
-TRACE1(pTxMgmtQ->hReport, REPORT_SEVERITY_ERROR, "mgmtQueuesSM: Got SmEvent=EAPOL when eSmState=%d\n", ePrevState);
-			}
-			pTxMgmtQ->eSmState = SM_STATE_EAPOL;
-			pTxMgmtQ->aQueueEnabledBySM[QUEUE_TYPE_MGMT]  = TI_TRUE;
-			pTxMgmtQ->aQueueEnabledBySM[QUEUE_TYPE_EAPOL] = TI_TRUE;
-			eSmAction = SM_ACTION_RUN_SCHEDULER;
-			break;
-
-		case SM_EVENT_OPEN:
-			/* 
-			 * All packets are now permitted (expected in EAPOL state), so if the mgmt-queues
-			 *   are empty disable them and enable the data queues via txPort module.
-			 */
-			if (ePrevState != SM_STATE_EAPOL)
-			{
-TRACE1(pTxMgmtQ->hReport, REPORT_SEVERITY_ERROR, "mgmtQueuesSM: Got SmEvent=OPEN when eSmState=%d\n", ePrevState);
-			}
-			if ( ARE_ALL_MGMT_QUEUES_EMPTY(pTxMgmtQ->aQueues) )
-			{
-				pTxMgmtQ->eSmState = SM_STATE_OPEN_DATA;
-				pTxMgmtQ->aQueueEnabledBySM[QUEUE_TYPE_MGMT]  = TI_FALSE;
-				pTxMgmtQ->aQueueEnabledBySM[QUEUE_TYPE_EAPOL] = TI_FALSE;
-				eSmAction = SM_ACTION_ENABLE_DATA;
-			}
-			else
-			{
-				pTxMgmtQ->eSmState = SM_STATE_OPEN_MGMT;
-			}
-			break;
-
-		case SM_EVENT_QUEUES_EMPTY:
-			/* 
-			 * The mgmt-queues are empty, so if in OPEN_MGMT state disable the 
-			 *   mgmt-queues and enable the data-queues via txPort module.
-			 */
-			if (ePrevState == SM_STATE_OPEN_MGMT)
-			{
-				pTxMgmtQ->eSmState = SM_STATE_OPEN_DATA;
-				pTxMgmtQ->aQueueEnabledBySM[QUEUE_TYPE_MGMT]  = TI_FALSE;
-				pTxMgmtQ->aQueueEnabledBySM[QUEUE_TYPE_EAPOL] = TI_FALSE;
-				eSmAction = SM_ACTION_ENABLE_DATA;
-			}
-			else
-			{
-				/* This may happen so it's just a warning and not an error. */
-TRACE1(pTxMgmtQ->hReport, REPORT_SEVERITY_WARNING, "mgmtQueuesSM: Got SmEvent=QUEUES_EMPTY when eSmState=%d\n", ePrevState);
-			}
-			break;
-
-		case SM_EVENT_QUEUES_NOT_EMPTY:
-
-			/* A packet was inserted to the mgmt-queues */
-
-			/* 
-			 * If in OPEN_DATA state, enable mgmt-queues and disable data-queues via txPort module.
-			 *
-			 * Note: The scheduler is not run here because the txPort will call
-			 *   txMgmtQueue_wakeAll() which will run the scheduler.
-			 */
-			if (ePrevState == SM_STATE_OPEN_DATA)
-			{
-				pTxMgmtQ->eSmState = SM_STATE_OPEN_MGMT;
-				pTxMgmtQ->aQueueEnabledBySM[QUEUE_TYPE_MGMT]  = TI_TRUE;
-				pTxMgmtQ->aQueueEnabledBySM[QUEUE_TYPE_EAPOL] = TI_TRUE;
-				eSmAction = SM_ACTION_ENABLE_MGMT;
-			}
-
-			/* 
-			 * If in MGMT or EAPOL state, run the scheduler to transmit the packet.
-			 */
-			else if ( (ePrevState == SM_STATE_MGMT) || (ePrevState == SM_STATE_EAPOL) )
-			{
-				eSmAction = SM_ACTION_RUN_SCHEDULER;
-			}
-
-			else
-			{
-				/* This may happen so it's just a warning and not an error. */
-TRACE1(pTxMgmtQ->hReport, REPORT_SEVERITY_WARNING, "mgmtQueuesSM: Got SmEvent=QUEUES_NOT_EMPTY when eSmState=%d\n", ePrevState);
-			}
-			break;
-
-		default:
-TRACE1(pTxMgmtQ->hReport, REPORT_SEVERITY_ERROR, "mgmtQueuesSM: Unknown SmEvent = %d\n", eSmEvent);
-			break;
-	}
-
-TRACE6( pTxMgmtQ->hReport, REPORT_SEVERITY_INFORMATION, "mgmtQueuesSM: <currentState = %d, event = %d> --> nextState = %d, action = %d, MgmtQueEnbl=%d, EapolQueEnbl=%d\n", ePrevState, eSmEvent, pTxMgmtQ->eSmState, eSmAction, pTxMgmtQ->aQueueEnabledBySM[0], pTxMgmtQ->aQueueEnabledBySM[1]);
-
-	/* 
-	 * Execute the required action. 
-	 * Note: This is done at the end of the SM because it may start a sequence that will call the SM again!
-	 */
-	switch (eSmAction)
-	{
-		case SM_ACTION_NULL:
-			break;
-
-		case SM_ACTION_ENABLE_DATA:
-			txPort_enableData(pTxMgmtQ->hTxPort);
-			break;
-
-		case SM_ACTION_ENABLE_MGMT:
-			txPort_enableMgmt(pTxMgmtQ->hTxPort);
-			break;
-
-		case SM_ACTION_RUN_SCHEDULER:
-			runScheduler(pTxMgmtQ);
-			break;
-
-		default:
-TRACE1(pTxMgmtQ->hReport, REPORT_SEVERITY_ERROR, ": Unknown SmAction = %d\n", eSmAction);
-			break;
-	}
-}
-
-
-/** 
- * \fn     runSchedulerNotFromSm
- * \brief  Run scheduler due to other events then from SM (static function)
- * 
- * To comply with the SM behavior, this function is used for any case where the
- *    Mgmt-Queues scheduler may have work to do due to events external to the SM.
- * If the queues are not empty, this function runs the scheduler.
-*				If the scheduler emptied the queues, update the SM.
- * 
- * \note   
- * \param  pTxMgmtQ - The module's object                                          
- * \return void 
- * \sa     
- */ 
-static void runSchedulerNotFromSm (TTxMgmtQ *pTxMgmtQ)
-{
-	/* If the queues are not empty, run the scheduler. */
-	if ( !ARE_ALL_MGMT_QUEUES_EMPTY(pTxMgmtQ->aQueues) )
-	{
-		runScheduler (pTxMgmtQ);
-		
-		/* If the queues are now both empty, call the SM with QUEUES_EMPTY event. */
-		if ( ARE_ALL_MGMT_QUEUES_EMPTY(pTxMgmtQ->aQueues) )
-        {
-			mgmtQueuesSM (pTxMgmtQ, SM_EVENT_QUEUES_EMPTY);
-        }
-	}
-}
-
-
-/** 
- * \fn     runScheduler
- * \brief  The scheduler processing (static function)
- * 
- * Loops over the mgmt-queues (high priority first) and if queue enabled and
- *   has packets, dequeue a packet and send it to the TxCtrl.
-*				Exit if the port level is disabled or if couldn't send anything from both queues.
- * 
- * \note   Protect the queues access against preemption from external context (EAPOL).
- * \param  pTxMgmtQ - The module's object                                          
- * \return void 
- * \sa     
- */ 
-static void runScheduler (TTxMgmtQ *pTxMgmtQ)
-{
-	TI_STATUS  eStatus;
-    TTxCtrlBlk *pPktCtrlBlk;
-	TI_UINT32  uQueId = 0; /* start from highest priority queue */
-
-	while(1)
-	{
-		/* If the Mgmt port is closed exit. */
-		if ( !pTxMgmtQ->bMgmtPortEnable )
-		{
-			return;
-		}
-
-		/* Check that the current queue is not busy and is enabled by the state-machine. */
-		if ( !pTxMgmtQ->aQueueBusy[uQueId]  &&  pTxMgmtQ->aQueueEnabledBySM[uQueId])
-		{
-            /* Dequeue a packet in a critical section */
-            context_EnterCriticalSection (pTxMgmtQ->hContext);
-            pPktCtrlBlk = (TTxCtrlBlk *) que_Dequeue (pTxMgmtQ->aQueues[uQueId]);
-            context_LeaveCriticalSection (pTxMgmtQ->hContext);
-
-			if (pPktCtrlBlk)
-			{
-				pTxMgmtQ->tDbgCounters.aDequeuePackets[uQueId]++;
-
-				/* Send the packet */
-				eStatus = txCtrl_XmitMgmt (pTxMgmtQ->hTxCtrl, pPktCtrlBlk);
-
-				/* In case the return status is busy it means that the packet wasn't handled
-					 so we need to requeue the packet for future try. */
-				if(eStatus == STATUS_XMIT_BUSY)
-				{
-                    /* Requeue the packet in a critical section */
-                    context_EnterCriticalSection (pTxMgmtQ->hContext);
-                    que_Requeue (pTxMgmtQ->aQueues[uQueId], (TI_HANDLE)pPktCtrlBlk);
-                    context_LeaveCriticalSection (pTxMgmtQ->hContext);
-
-                    pTxMgmtQ->tDbgCounters.aRequeuePackets[uQueId]++;
-				}
-
-				/* The packet was handled by the lower Tx layers. */
-				else
-				{
-					pTxMgmtQ->tDbgCounters.aXmittedPackets[uQueId]++;
-
-					/* Successful delivery so start next tx from the high priority queue (mgmt),
-					 *	 giving it strict priority over the lower queue. 
-					 */
-					uQueId = 0;
-					continue;
-				}
-			}
-		}
-
-
-		/* If we got here we couldn't deliver a packet from current queue, so progress to lower 
-		 *	 priority queue and if already in lowest queue exit. 
-		 */
-		uQueId++;
-		if (uQueId < NUM_OF_MGMT_QUEUES)
-        {
-			continue;	/* Try sending from next queue (i.e. the EAPOL queue). */
-        }
-		else
-		{
-            /* We couldn't send from both queues so indicate end of packets burst and exit. */
-            TWD_txXfer_EndOfBurst (pTxMgmtQ->hTWD);
-			return;		
-		}
-
-	} /* End of while */
-
-	/* Unreachable code */
-}
-
-
-/** 
- * \fn     updateQueuesBusyMap
- * \brief  Update queues busy map (static function)
- * 
- * Set the queues busy indication on or off according to the highest TID bit 
- *    in the tidBitMap (1 = busy). 
-*				Note that both Mgmt and Eapol queues are mapped to TID 7.
-*
- * \note   
- * \param  pTxMgmtQ   - The module's object                                          
- * \param  uTidBitMap - The TIDs bitmap of the queue(s) to update                                          
- * \return void 
- * \sa     
- */ 
-static void updateQueuesBusyMap (TTxMgmtQ *pTxMgmtQ, TI_UINT32 uTidBitMap)
-{
-	/* Set the queues busy indication on or off according to the highest TID bit (1 = busy). */
-	if(uTidBitMap & (1 << MGMT_QUEUES_TID) )
-	{
-		pTxMgmtQ->aQueueBusy[QUEUE_TYPE_MGMT ] = TI_TRUE;
-		pTxMgmtQ->aQueueBusy[QUEUE_TYPE_EAPOL] = TI_TRUE;
-	}
-	else
-	{
-		pTxMgmtQ->aQueueBusy[QUEUE_TYPE_MGMT ] = TI_FALSE;
-		pTxMgmtQ->aQueueBusy[QUEUE_TYPE_EAPOL] = TI_FALSE;
-	}
-}
-
-
-
-/*******************************************************************************
-*                       DEBUG  FUNCTIONS  IMPLEMENTATION					   *
-********************************************************************************/
-
-#ifdef TI_DBG
-
-/** 
- * \fn     txMgmtQ_PrintModuleParams
- * \brief  Print module's parameters (debug)
- * 
- * This function prints the module's parameters.
- * 
- * \note   
- * \param  hTxMgmtQ - The module's object                                          
- * \return void 
- * \sa     
- */ 
-void txMgmtQ_PrintModuleParams (TI_HANDLE hTxMgmtQ) 
-{
-	TTxMgmtQ *pTxMgmtQ = (TTxMgmtQ *)hTxMgmtQ;
-	TI_UINT32 uQueId;
-	
-	WLAN_OS_REPORT(("-------------- txMgmtQueue Module Params -----------------\n"));
-	WLAN_OS_REPORT(("==========================================================\n"));
-	
-	WLAN_OS_REPORT(("eSmState        = %d\n", pTxMgmtQ->eSmState));
-	WLAN_OS_REPORT(("bMgmtPortEnable = %d\n", pTxMgmtQ->bMgmtPortEnable));
-	WLAN_OS_REPORT(("eTxConnState    = %d\n", pTxMgmtQ->eTxConnState));
-	WLAN_OS_REPORT(("uContextId      = %d\n", pTxMgmtQ->uContextId));
-
-	WLAN_OS_REPORT(("-------------- Queues Busy (in HW) -----------------------\n"));
-	for(uQueId = 0; uQueId < NUM_OF_MGMT_QUEUES; uQueId++)
-    {
-        WLAN_OS_REPORT(("Que[%d]:  %d\n", uQueId, pTxMgmtQ->aQueueBusy[uQueId]));
-    }
-
-	WLAN_OS_REPORT(("-------------- Queues Enabled By SM ----------------------\n"));
-	for(uQueId = 0; uQueId < NUM_OF_MGMT_QUEUES; uQueId++)
-    {
-        WLAN_OS_REPORT(("Que[%d]:  %d\n", uQueId, pTxMgmtQ->aQueueBusy[uQueId]));
-    }
-
-	WLAN_OS_REPORT(("-------------- Queues Info -------------------------------\n"));
-	for(uQueId = 0; uQueId < NUM_OF_MGMT_QUEUES; uQueId++)
-    {
-        WLAN_OS_REPORT(("Que %d:\n", uQueId));
-        que_Print (pTxMgmtQ->aQueues[uQueId]);
-    }
-
-	WLAN_OS_REPORT(("==========================================================\n\n"));
-}
-
-
-/** 
- * \fn     txMgmtQ_PrintQueueStatistics
- * \brief  Print queues statistics (debug)
- * 
- * This function prints the module's Tx statistics per Queue.
- * 
- * \note   
- * \param  hTxMgmtQ - The module's object                                          
- * \return void 
- * \sa     
- */ 
-void txMgmtQ_PrintQueueStatistics (TI_HANDLE hTxMgmtQ)
-{
-#ifdef REPORT_LOG
-    TTxMgmtQ *pTxMgmtQ = (TTxMgmtQ *)hTxMgmtQ;
-    TI_UINT32 uQueId;
-
-    WLAN_OS_REPORT(("-------------- Mgmt Queues Statistics  -------------------\n"));
-    WLAN_OS_REPORT(("==========================================================\n"));
-
-    WLAN_OS_REPORT(("-------------- Enqueue Packets ---------------------------\n"));
-    for(uQueId = 0; uQueId < NUM_OF_MGMT_QUEUES; uQueId++)
-        WLAN_OS_REPORT(("Que[%d]:  %d\n", uQueId, pTxMgmtQ->tDbgCounters.aEnqueuePackets[uQueId]));
-	
-    WLAN_OS_REPORT(("-------------- Dequeue Packets ---------------------------\n"));
-    for(uQueId = 0; uQueId < NUM_OF_MGMT_QUEUES; uQueId++)
-        WLAN_OS_REPORT(("Que[%d]:  %d\n", uQueId, pTxMgmtQ->tDbgCounters.aDequeuePackets[uQueId]));
-
-    WLAN_OS_REPORT(("-------------- Requeue Packets ---------------------------\n"));
-    for(uQueId = 0; uQueId < NUM_OF_MGMT_QUEUES; uQueId++)
-        WLAN_OS_REPORT(("Que[%d]:  %d\n", uQueId, pTxMgmtQ->tDbgCounters.aRequeuePackets[uQueId]));
-
-    WLAN_OS_REPORT(("-------------- Xmitted Packets ---------------------------\n"));
-    for(uQueId = 0; uQueId < NUM_OF_MGMT_QUEUES; uQueId++)
-        WLAN_OS_REPORT(("Que[%d]:  %d\n", uQueId, pTxMgmtQ->tDbgCounters.aXmittedPackets[uQueId]));
-
-    WLAN_OS_REPORT(("-------------- Dropped Packets (queue full) --------------\n"));
-    for(uQueId = 0; uQueId < NUM_OF_MGMT_QUEUES; uQueId++)
-        WLAN_OS_REPORT(("Que[%d]:  %d\n", uQueId, pTxMgmtQ->tDbgCounters.aDroppedPackets[uQueId]));
-
-    WLAN_OS_REPORT(("==========================================================\n\n"));
-#endif    
-}
-
-
-/** 
- * \fn     txMgmtQ_ResetQueueStatistics
- * \brief  Reset queues statistics (debug)
- * 
- * This function Resets the module's Tx statistics per Queue.
- * 
- * \note   
- * \param  hTxMgmtQ - The module's object                                          
- * \return void 
- * \sa     
- */ 
-void txMgmtQ_ResetQueueStatistics (TI_HANDLE hTxMgmtQ)
-{
-	TTxMgmtQ *pTxMgmtQ = (TTxMgmtQ *)hTxMgmtQ;
-
-    os_memoryZero(pTxMgmtQ->hOs, (void *)&(pTxMgmtQ->tDbgCounters), sizeof(TDbgCount));
-}
-
-#endif /* TI_DBG */
-	  
diff --git a/wl1271/stad/src/Data_link/txMgmtQueue_Api.h b/wl1271/stad/src/Data_link/txMgmtQueue_Api.h
deleted file mode 100644
index c42f80d..0000000
--- a/wl1271/stad/src/Data_link/txMgmtQueue_Api.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * txMgmtQueue_Api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- 
-/***************************************************************************/
-/*																		   */
-/*	  MODULE:	txMgmtQueue_Api.h									       */
-/*    PURPOSE:	Tx Mgmt Queue module API Header file					   */
-/*																		   */
-/***************************************************************************/
-#ifndef _TX_MGMT_QUEUE_API_H_
-#define _TX_MGMT_QUEUE_API_H_
-
-#include "DrvMainModules.h"
-
-
-#define MGMT_QUEUES_DEPTH	4	/* Up to 4 packets per queue. */
-
-
-/* Tx connection states updated by the connection SM. */
-typedef enum
-{
-	TX_CONN_STATE_CLOSE,	/* Tx closed for all packets. */
-	TX_CONN_STATE_MGMT,		/* Tx open only for mgmt packets. */
-	TX_CONN_STATE_EAPOL,	/* Tx open only for mgmt or EAPOL packets. */
-	TX_CONN_STATE_OPEN		/* Tx open for all packets. */
-} ETxConnState;
-
-
-/* 
- *  The module public functions:
- */
-TI_HANDLE	txMgmtQ_Create (TI_HANDLE hOs);
-void        txMgmtQ_Init (TStadHandlesList *pStadHandles);
-TI_STATUS	txMgmtQ_Destroy (TI_HANDLE hTxMgmtQ);
-void        txMgmtQ_ClearQueues (TI_HANDLE hTxMgmtQ);
-TI_STATUS   txMgmtQ_Xmit (TI_HANDLE hTxMgmtQ, TTxCtrlBlk *pPktCtrlBlk, TI_BOOL bExternalContext);
-void        txMgmtQ_QueuesNotEmpty (TI_HANDLE hTxMgmtQ);
-void		txMgmtQ_StopQueue (TI_HANDLE hTxMgmtQ, TI_UINT32 tidBitMap);
-void		txMgmtQ_UpdateBusyMap (TI_HANDLE hTxMgmtQ, TI_UINT32 tidBitMap);
-void		txMgmtQ_StopAll (TI_HANDLE hTxMgmtQ);
-void		txMgmtQ_WakeAll (TI_HANDLE hTxMgmtQ);
-void		txMgmtQ_SetConnState (TI_HANDLE hTxMgmtQ, ETxConnState txConnState);
-
-#ifdef TI_DBG
-void        txMgmtQ_PrintModuleParams (TI_HANDLE hTxMgmtQ);
-void        txMgmtQ_PrintQueueStatistics (TI_HANDLE	hTxMgmtQ);
-void        txMgmtQ_ResetQueueStatistics (TI_HANDLE	hTxMgmtQ);
-#endif
-
-
-#endif /* _TX_MGMT_QUEUE_API_H_ */
diff --git a/wl1271/stad/src/Data_link/txPort.c b/wl1271/stad/src/Data_link/txPort.c
deleted file mode 100644
index eeba41f..0000000
--- a/wl1271/stad/src/Data_link/txPort.c
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- * txPort.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  txPort.c
- *   
- *   PURPOSE: Multiplexes between the management and data queues.
- * 
- *	 DESCRIPTION:  
- *   ============
- * 		The Tx port state machine multiplexes between the management and data queues 
- *		according to the management queues requests.
- *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_62
-#include "commonTypes.h"
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "DataCtrl_Api.h"
-#include "DrvMainModules.h"
-
-
-typedef enum
-{
-    MUX_MGMT_QUEUES,	/* The management queues have access to the Tx path. */
-    MUX_DATA_QUEUES		/* The data queues have access to the Tx path. */
-} EQueuesMuxState;
-
-typedef enum
-{
-	QUEUE_ACTION_NONE,
-	QUEUE_ACTION_STOP,
-	QUEUE_ACTION_WAKE
-} EQueueAction;
-
-/* The txPort module object. */
-typedef struct 
-{
-	TI_HANDLE		hOs;
-	TI_HANDLE		hReport;
-	TI_HANDLE		hTxDataQ;
-	TI_HANDLE		hTxMgmtQ;
-
-	EQueuesMuxState queuesMuxState;
-	TI_BOOL			txSuspended;
-	TI_BOOL			mgmtQueueEnabled;
-	TI_BOOL			dataQueueEnabled;
-} TTxPortObj;
-
-/* 
- * The txPort local functions:
- */
-static void updateQueuesStates(TTxPortObj *pTxPort);
-
-/****************************************************************************
- *                      txPort_Create()
- ****************************************************************************
- * DESCRIPTION:	Create the txPort module object 
- * 
- * INPUTS:	None
- * 
- * OUTPUT:	None
- * 
- * RETURNS:	The Created object
- ****************************************************************************/
-TI_HANDLE txPort_create(TI_HANDLE hOs)
-{
-	TTxPortObj *pTxPort;
-
-	pTxPort = os_memoryAlloc(hOs, sizeof(TTxPortObj));
-	if (pTxPort == NULL)
-		return NULL;
-
-	os_memoryZero(hOs, pTxPort, sizeof(TTxPortObj));
-
-	pTxPort->hOs = hOs;
-
-	return( (TI_HANDLE)pTxPort );
-}
-
-
-/****************************************************************************
- *                      txPort_unLoad()
- ****************************************************************************
- * DESCRIPTION:	Unload the txPort module object 
- * 
- * INPUTS:	hTxPort - The object to free
- * 
- * OUTPUT:	None
- * 
- * RETURNS:	TI_OK 
- ****************************************************************************/
-TI_STATUS txPort_unLoad(TI_HANDLE hTxPort)
-{
-	TTxPortObj *pTxPort = (TTxPortObj *)hTxPort;
-
-	if (pTxPort)
-		os_memoryFree(pTxPort->hOs, pTxPort, sizeof(TTxPortObj));
-
-	return TI_OK;
-}
-
-
-/****************************************************************************
- *                      txPort_init()
- ****************************************************************************
- * DESCRIPTION:	Configure the txPort module object 
- * 
- * INPUTS:	The needed TI handles
- * 
- * OUTPUT:	None
- * 
- * RETURNS:	void
- ****************************************************************************/
-void txPort_init (TStadHandlesList *pStadHandles)
-{
-	TTxPortObj *pTxPort = (TTxPortObj *)(pStadHandles->hTxPort);
-
-	pTxPort->hReport  = pStadHandles->hReport;
-	pTxPort->hTxDataQ = pStadHandles->hTxDataQ;
-	pTxPort->hTxMgmtQ = pStadHandles->hTxMgmtQ;
-
-	pTxPort->queuesMuxState	  = MUX_MGMT_QUEUES;
-	pTxPort->txSuspended	  = TI_FALSE;
-	pTxPort->mgmtQueueEnabled = TI_TRUE;
-	pTxPort->dataQueueEnabled = TI_FALSE;
-}
-
-
-/****************************************************************************
- *                      txPort_enableData()
- ****************************************************************************
- * DESCRIPTION:	Called by the txMgmtQueue SM when the Tx path CAN be used by the
- *				  data-queues (i.e. it's not needed for mgmt). Update the queues accordingly.
- ****************************************************************************/
-void txPort_enableData(TI_HANDLE hTxPort)
-{
-	TTxPortObj *pTxPort = (TTxPortObj *)hTxPort;
-
-	pTxPort->queuesMuxState = MUX_DATA_QUEUES;
-	updateQueuesStates(pTxPort);
-} 
-
-
-/****************************************************************************
- *                      txPort_enableMgmt()
- ****************************************************************************
- * DESCRIPTION:	Called by the txMgmtQueue SM when the Tx path CAN'T be used by the
- *				  data-queues (i.e. it's needed for mgmt). Update the queues accordingly.
- ****************************************************************************/
-void txPort_enableMgmt(TI_HANDLE hTxPort)
-{
-	TTxPortObj *pTxPort = (TTxPortObj *)hTxPort;
-
-	pTxPort->queuesMuxState = MUX_MGMT_QUEUES;
-	updateQueuesStates(pTxPort);
-}
-
-
-/****************************************************************************
- *                      txPort_suspendTx()
- ****************************************************************************
- * DESCRIPTION:	Used by STAD applications (e.g. recovery) to temporarily suspend the Tx path.
- ****************************************************************************/ 
-void txPort_suspendTx(TI_HANDLE hTxPort)
-{
-	TTxPortObj *pTxPort = (TTxPortObj *)hTxPort;
-
-	pTxPort->txSuspended = TI_TRUE;
-	updateQueuesStates(pTxPort);
-}
-
-
-/****************************************************************************
- *                      txPort_resumeTx()
- ****************************************************************************
- * DESCRIPTION:	Used by STAD applications (e.g. recovery) to resume Tx path after suspended.
- ****************************************************************************/ 
-void txPort_resumeTx(TI_HANDLE hTxPort)
-{
-	TTxPortObj *pTxPort = (TTxPortObj *)hTxPort;
-
-	pTxPort->txSuspended = TI_FALSE;
-	updateQueuesStates(pTxPort);
-}
-
-
-/****************************************************************************
- *                      updateQueuesStates()
- ****************************************************************************
- * DESCRIPTION:	 Switch the Data-Queue and Mgmt-Queue Tx on/off (stop/wake)
- *				   according to the current port conditions.
- ****************************************************************************/ 
-static void updateQueuesStates (TTxPortObj *pTxPort)
-{
-	EQueueAction mgmtQueueAction = QUEUE_ACTION_NONE;
-	EQueueAction dataQueueAction = QUEUE_ACTION_NONE;
-
-	/* 
-	 * If the Tx path is not suspended:
-	 */
-	if (!pTxPort->txSuspended)
-	{
-		/* If mgmt-queues should be enabled, set required actions (awake mgmt and stop data if needed). */
-		if (pTxPort->queuesMuxState == MUX_MGMT_QUEUES)
-		{
-			if ( !pTxPort->mgmtQueueEnabled )
-				mgmtQueueAction = QUEUE_ACTION_WAKE;
-			if ( pTxPort->dataQueueEnabled )
-				dataQueueAction = QUEUE_ACTION_STOP;
-		}
-
-		/* If data-queues should be enabled, set required actions (stop mgmt and awake data if needed). */
-		else
-		{
-			if ( pTxPort->mgmtQueueEnabled )
-				mgmtQueueAction = QUEUE_ACTION_STOP;
-			if ( !pTxPort->dataQueueEnabled )
-				dataQueueAction = QUEUE_ACTION_WAKE;
-		}
-	}
-
-	/* 
-	 * If the Tx path is not available (Xfer is busy or suspension is requested),
-	 *   set required actions (stop mgmt and data if needed).
-	 */
-	else
-	{
-		if ( pTxPort->mgmtQueueEnabled )
-			mgmtQueueAction = QUEUE_ACTION_STOP;
-		if ( pTxPort->dataQueueEnabled )
-			dataQueueAction = QUEUE_ACTION_STOP;
-	}
-
-
-#ifdef TI_DBG
-	TRACE1(pTxPort->hReport, REPORT_SEVERITY_INFORMATION, ":  queuesMuxState = , TxSuspend = %d\n", pTxPort->txSuspended);
-		
-	TRACE2(pTxPort->hReport, REPORT_SEVERITY_INFORMATION, ":  PrevMgmtEnabled = %d,  PrevDataEnabled = %d, MgmtAction = , DataAction = \n", pTxPort->mgmtQueueEnabled, pTxPort->dataQueueEnabled);
-#endif /* TI_DBG */
-
-	/* 
-	 * Execute the required actions. 
-	 * Note: This is done at the end of this function because it may start a sequence that will call it again!!
-	 *       Always do WAKE action after STOP action, since WAKE may lead to more activities!!
-	 */
-	if (mgmtQueueAction == QUEUE_ACTION_STOP)
-	{
-		pTxPort->mgmtQueueEnabled = TI_FALSE;
-		txMgmtQ_StopAll (pTxPort->hTxMgmtQ);
-	}
-	if (dataQueueAction == QUEUE_ACTION_STOP)
-	{
-		pTxPort->dataQueueEnabled = TI_FALSE;
-		txDataQ_StopAll (pTxPort->hTxDataQ);
-	}
-	if (mgmtQueueAction == QUEUE_ACTION_WAKE)
-	{
-		pTxPort->mgmtQueueEnabled = TI_TRUE;
-		txMgmtQ_WakeAll (pTxPort->hTxMgmtQ);
-	}
-	if (dataQueueAction == QUEUE_ACTION_WAKE)
-	{
-		pTxPort->dataQueueEnabled = TI_TRUE;
-		txDataQ_WakeAll (pTxPort->hTxDataQ);
-	}
-}
-
diff --git a/wl1271/stad/src/Data_link/txPort_Api.h b/wl1271/stad/src/Data_link/txPort_Api.h
deleted file mode 100644
index d2c837c..0000000
--- a/wl1271/stad/src/Data_link/txPort_Api.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * txPort_Api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*	  MODULE:	txPort_Api.h										       */
-/*    PURPOSE:	Tx-Port module API										   */
-/*																		   */
-/***************************************************************************/
-#ifndef _TX_PORT_API_H_
-#define _TX_PORT_API_H_
-
-#include "commonTypes.h"
-#include "DrvMainModules.h"
-
-
-/*
- *  Tx-Port module public functions:
- */
-TI_HANDLE txPort_create (TI_HANDLE hOs);
-TI_STATUS txPort_unLoad (TI_HANDLE hTxPort);
-void txPort_init        (TStadHandlesList *pStadHandles);
-void txPort_enableData  (TI_HANDLE hTxPort);
-void txPort_enableMgmt	(TI_HANDLE hTxPort);
-void txPort_suspendTx	(TI_HANDLE hTxPort);
-void txPort_resumeTx	(TI_HANDLE hTxPort);
-
-
-#endif /* _TX_PORT_API_H_ */
diff --git a/wl1271/stad/src/Sta_Management/AssocSM.h b/wl1271/stad/src/Sta_Management/AssocSM.h
deleted file mode 100644
index dc64e37..0000000
--- a/wl1271/stad/src/Sta_Management/AssocSM.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * AssocSM.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file AssocSM.h
- *  \brief 802.11 Association SM
- *
- *  \see assocSM.c
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	AssocSM.h												   */
-/*    PURPOSE:	802.11 Association SM									   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _ASSOC_SM_H
-#define _ASSOC_SM_H
-
-#include "fsm.h"
-#include "mlmeApi.h"
-
-/* Constants */
-
-#define MAX_ASSOC_MSG_LENGTH			(512 + RSN_MAX_GENERIC_IE_LENGTH)
-
-#define ASSOC_SM_CAP_ESS_MODE			0x0001
-#define ASSOC_SM_CAP_IBSS_MODE			0x0002
-#define ASSOC_SM_CAP_CF_POLLABLE		0x0004
-#define ASSOC_SM_CAP_CF_POLL_REQ		0x0008
-#define ASSOC_SM_CAP_PIVACY				0x0010
-#define ASSOC_SM_CAP_SHORT_PREAMBLE		0x0020
-#define ASSOC_SM_CAP_PBCC				0x0040
-#define ASSOC_SM_CAP_CH_AGILITY			0x0080
-
-/* Enumerations */
-
-/* state machine states */
-typedef enum 
-{
-	ASSOC_SM_STATE_IDLE		= 0,
-	ASSOC_SM_STATE_WAIT    	= 1,
-	ASSOC_SM_STATE_ASSOC	= 2
-} assoc_smStates_t;
-
-/* State machine inputs */
-typedef enum 
-{
-	ASSOC_SM_EVENT_START		= 0,
-	ASSOC_SM_EVENT_STOP			= 1,
-	ASSOC_SM_EVENT_SUCCESS    	= 2,
-    ASSOC_SM_EVENT_FAIL			= 3,
-   	ASSOC_SM_EVENT_TIMEOUT		= 4,
-   	ASSOC_SM_EVENT_MAX_RETRY	= 5
-} assoc_smEvents_t;
-
-
-
-/* Typedefs */
-
-typedef struct
-{
-	fsm_stateMachine_t	        *pAssocSm;
-	TI_UINT32				        timeout;
-	TI_UINT8				        currentState;
-	TI_UINT32				        maxCount;
-	TI_UINT8				        retryCount;
-	TI_UINT32				        assocRejectCount;
-	TI_UINT32				        assocTimeoutCount;
-	char				        *pChalange;
-    TI_UINT8                       assocRespBuffer[MAX_ASSOC_MSG_LENGTH];
-    TI_UINT32                      assocRespLen;
-    TI_UINT8                       assocReqBuffer[MAX_ASSOC_MSG_LENGTH];
-    TI_UINT32                      assocReqLen;
-  	TI_BOOL					       reAssocResp;
-
-	TI_BOOL						reAssoc;
-	TI_BOOL 						disAssoc; /* When set dissasociation frame will be sent. */
-
-	TI_HANDLE			        hMlme;
-	TI_HANDLE			        hSiteMgr;
-	TI_HANDLE			        hCtrlData;
-	TI_HANDLE			        hTWD;
-	TI_HANDLE			        hRsn;
-	TI_HANDLE			        hReport;
-	TI_HANDLE			        hOs;
-	TI_HANDLE					hRegulatoryDomain;
-	TI_HANDLE			        hXCCMngr;
-	TI_HANDLE			        hQosMngr;
-    TI_HANDLE			        hMeasurementMgr;
-	TI_HANDLE			        hApConn;
-	TI_HANDLE			        hTimer;
-     	TI_HANDLE			        hStaCap;
-	TI_HANDLE			        hSme;
-
-	TI_HANDLE			        hAssocSmTimer;
-} assoc_t;
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS assoc_start(TI_HANDLE hAssoc);
-
-TI_STATUS reassoc_start(TI_HANDLE hAssoc);
-
-TI_STATUS assoc_stop(TI_HANDLE hAssoc);
-
-TI_STATUS assoc_recv(TI_HANDLE hAssoc, mlmeFrameInfo_t *pFrame);
-
-TI_STATUS assoc_setDisAssocFlag(TI_HANDLE hAssoc, TI_BOOL disAsoccFlag);
-
-TI_STATUS assoc_smCapBuild(assoc_t *pCtx, TI_UINT16 *cap);
-
-
-/* local functions */
-
-TI_STATUS assoc_saveAssocRespMessage(assoc_t *pAssocSm, TI_UINT8 *pAssocBuffer, TI_UINT32 length);
-
-
-#endif
-
diff --git a/wl1271/stad/src/Sta_Management/PowerMgr.c b/wl1271/stad/src/Sta_Management/PowerMgr.c
deleted file mode 100644
index 117820c..0000000
--- a/wl1271/stad/src/Sta_Management/PowerMgr.c
+++ /dev/null
@@ -1,1410 +0,0 @@
-/*
- * PowerMgr.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file PowerMgr.c
- *  \brief This is the PowerMgr module implementation.
- *  \
- *  \date 24-Oct-2005
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  PowerMgr                                                      *
- *   PURPOSE: PowerMgr Module implementation.                               *
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_71
-#include "tidef.h"
-#include "osApi.h"
-#include "timer.h"
-#include "paramOut.h"
-#include "report.h"
-#include "PowerMgr.h"
-#include "PowerMgr_API.h"
-#include "TrafficMonitorAPI.h"
-#include "qosMngr_API.h"
-#include "siteMgrApi.h"
-#include "TWDriver.h"
-#include "SoftGeminiApi.h"
-#include "DrvMainModules.h"
-#include "PowerMgrKeepAlive.h"
-#include "CmdBld.h"
-
-
-/*****************************************************************************
- **         Defines                                                         **
- *****************************************************************************/
-#define DEFAULT_LISTEN_INTERVAL (1)
-#define BET_DISABLE 0
-#define BET_ENABLE  1
-
-
-/*****************************************************************************
- **         Private Function prototypes                                      **
- *****************************************************************************/
-
-static void         powerSaveCompleteCB(TI_HANDLE hPowerMgr,TI_UINT8 PSMode,TI_UINT8 transStatus);
-static void         PowerMgrTMThresholdCrossCB( TI_HANDLE hPowerMgr, TI_UINT32 cookie );
-static void         powerMgrDisableThresholdsIndications(TI_HANDLE hPowerMgr);
-static void         powerMgrEnableThresholdsIndications(TI_HANDLE hPowerMgr);
-static void         powerMgrStartAutoPowerMode(TI_HANDLE hPowerMgr);
-static void         powerMgrRetryPsTimeout(TI_HANDLE hPowerMgr, TI_BOOL bTwdInitOccured);
-static void         powerMgrPowerProfileConfiguration(TI_HANDLE hPowerMgr, PowerMgr_PowerMode_e desiredPowerMode);
-static void         PowerMgr_setDozeModeInAuto(TI_HANDLE hPowerMgr,PowerMgr_PowerMode_e dozeMode);
-static void         PowerMgrConfigBetToFw( TI_HANDLE hPowerMgr, TI_UINT32 cookie );
-static void         PowerMgr_PsPollFailureCB( TI_HANDLE hPowerMgr );
-static void 		powerMgr_PsPollFailureTimeout( TI_HANDLE hPowerMgr, TI_BOOL bTwdInitOccured );
-static void 		powerMgr_SGSetUserDesiredwakeUpCond( TI_HANDLE hPowerMgr );
-static TI_STATUS    powerMgrSendMBXWakeUpConditions(TI_HANDLE hPowerMgr,TI_UINT8 listenInterval, ETnetWakeOn tnetWakeupOn);
-static TI_STATUS    powerMgrNullPacketRateConfiguration(TI_HANDLE hPowerMgr);
-static PowerMgr_PowerMode_e powerMgrGetHighestPriority(TI_HANDLE hPowerMgr);
-
-
-/*****************************************************************************
- **         Public Function prototypes                                      **
- *****************************************************************************/
-
-
-/****************************************************************************************
- *                        PowerMgr_create                                                           *
- ****************************************************************************************
-DESCRIPTION: Creates the object of the power Manager. 
-                performs the following:
-                -   Allocate the Power Manager handle
-                -   Creates the retry timer
-                                                                                                                   
-INPUT:          - hOs - Handle to OS        
-OUTPUT:     
-RETURN:     Handle to the Power Manager module on success, NULL otherwise
-****************************************************************************************/
-TI_HANDLE PowerMgr_create(TI_HANDLE hOs)
-{
-
-    PowerMgr_t * pPowerMgr = NULL;
-    pPowerMgr = (PowerMgr_t*) os_memoryAlloc (hOs, sizeof(PowerMgr_t));
-    if ( pPowerMgr == NULL )
-    {
-        WLAN_OS_REPORT(("PowerMgr_create - Memory Allocation Error!\n"));
-        return NULL;
-    }
-
-    os_memoryZero (hOs, pPowerMgr, sizeof(PowerMgr_t));
-
-    pPowerMgr->hOS = hOs;
-
-    /* create the power manager keep-alive sub module */
-    pPowerMgr->hPowerMgrKeepAlive = powerMgrKL_create (hOs);
-
-    return pPowerMgr;
-
-}
-
-
-/****************************************************************************************
-*                        powerSrv_destroy                                                          *
-****************************************************************************************
-DESCRIPTION: Destroy the object of the power Manager.
-               -   delete Power Manager alocation
-               -   call the destroy function of the timer
-                                                                                                                  
-INPUT:          - hPowerMgr - Handle to the Power Manager   
-OUTPUT:     
-RETURN:    TI_STATUS - TI_OK on success else TI_NOK.
-****************************************************************************************/
-TI_STATUS PowerMgr_destroy(TI_HANDLE hPowerMgr)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    /* destroy the power manager keep-alive sub module */
-    powerMgrKL_destroy (pPowerMgr->hPowerMgrKeepAlive);
-
-    if (pPowerMgr->hRetryPsTimer)
-    {
-        tmr_DestroyTimer (pPowerMgr->hRetryPsTimer);
-    }
-
-    if ( pPowerMgr->hPsPollFailureTimer != NULL )
-    {
-        tmr_DestroyTimer(pPowerMgr->hPsPollFailureTimer);
-    }
-    os_memoryFree(pPowerMgr->hOS, pPowerMgr, sizeof(PowerMgr_t));
-
-    return TI_OK;
-}
-
-
-/****************************************************************************************
-*                        PowerMgr_init                                                         *
-****************************************************************************************
-DESCRIPTION: Power Manager init function, called in init phase.
-                                                                                                                 
-INPUT:     pStadHandles  - The driver modules handles
-
-OUTPUT:     
-
-RETURN:    void
-****************************************************************************************/
-void PowerMgr_init (TStadHandlesList *pStadHandles)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)(pStadHandles->hPowerMgr);
-
-    pPowerMgr->hReport          = pStadHandles->hReport;
-    pPowerMgr->hTrafficMonitor  = pStadHandles->hTrafficMon;
-    pPowerMgr->hSiteMgr         = pStadHandles->hSiteMgr;
-    pPowerMgr->hTWD             = pStadHandles->hTWD;
-    pPowerMgr->hSoftGemini      = pStadHandles->hSoftGemini;
-    pPowerMgr->hTimer           = pStadHandles->hTimer;
-    pPowerMgr->psEnable         = TI_FALSE;
-
-    /* initialize the power manager keep-alive sub module */
-    powerMgrKL_init (pPowerMgr->hPowerMgrKeepAlive, pStadHandles);
-
-}
-
-
-TI_STATUS PowerMgr_SetDefaults (TI_HANDLE hPowerMgr, PowerMgrInitParams_t* pPowerMgrInitParams)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-    TI_UINT8 index;
-    /* used to initialize the Traffic Monitor for Auto Ps events */
-    TrafficAlertRegParm_t tmRegParam;
-    TI_STATUS status;
-
-	pPowerMgr->reAuthActivePriority		= pPowerMgrInitParams->reAuthActivePriority;
-
-    /* init power management options */
-    pPowerMgr->beaconListenInterval = pPowerMgrInitParams->beaconListenInterval;
-    pPowerMgr->dtimListenInterval = pPowerMgrInitParams->dtimListenInterval;
-    pPowerMgr->defaultPowerLevel =  pPowerMgrInitParams->defaultPowerLevel;
-    pPowerMgr->PowerSavePowerLevel =  pPowerMgrInitParams->PowerSavePowerLevel;
-    pPowerMgr->powerMngPriority  = POWER_MANAGER_USER_PRIORITY;
-    pPowerMgr->maxFullBeaconInterval = pPowerMgrInitParams->MaximalFullBeaconReceptionInterval;
-    pPowerMgr->PsPollDeliveryFailureRecoveryPeriod = pPowerMgrInitParams->PsPollDeliveryFailureRecoveryPeriod;
-
-    /*
-     set AUTO PS parameters 
-     */
-    pPowerMgr->autoModeInterval = pPowerMgrInitParams->autoModeInterval;
-    pPowerMgr->autoModeActiveTH = pPowerMgrInitParams->autoModeActiveTH;
-    pPowerMgr->autoModeDozeTH = pPowerMgrInitParams->autoModeDozeTH;
-    pPowerMgr->autoModeDozeMode = pPowerMgrInitParams->autoModeDozeMode;
-
-    /*
-     register threshold in the traffic monitor.
-     */
-  	pPowerMgr->betEnable = pPowerMgrInitParams->BetEnable; /* save BET enable flag for CLI configuration */
-	pPowerMgr->betTrafficEnable = TI_FALSE;                   /* starting without BET */
-
-    /* BET thresholds */
-    /* general parameters */
-    tmRegParam.Context = pPowerMgr;
-    tmRegParam.TimeIntervalMs = BET_INTERVAL_VALUE;
-    tmRegParam.Trigger = TRAFF_EDGE;
-    tmRegParam.MonitorType = TX_RX_ALL_802_11_DATA_FRAMES;
-    tmRegParam.CallBack = PowerMgrConfigBetToFw;
-
-    /* BET enable event */
-    tmRegParam.Direction = TRAFF_DOWN;
-    tmRegParam.Threshold = pPowerMgrInitParams->BetEnableThreshold;
-    pPowerMgr->BetEnableThreshold = pPowerMgrInitParams->BetEnableThreshold;
-    tmRegParam.Cookie = (TI_UINT32)BET_ENABLE;
-    pPowerMgr->betEnableTMEvent = TrafficMonitor_RegEvent (pPowerMgr->hTrafficMonitor,
-                                                             &tmRegParam,
-                                                             TI_FALSE);
-    /* BET disable event */
-    tmRegParam.Direction = TRAFF_UP;
-    tmRegParam.Threshold = pPowerMgrInitParams->BetDisableThreshold;
-    pPowerMgr->BetDisableThreshold = pPowerMgrInitParams->BetDisableThreshold;
-    tmRegParam.Cookie = (TI_UINT32)BET_DISABLE;
-    pPowerMgr->betDisableTMEvent = TrafficMonitor_RegEvent (pPowerMgr->hTrafficMonitor,
-                                                             &tmRegParam,
-                                                             TI_FALSE);
-
-    if ( (pPowerMgr->betDisableTMEvent == NULL) ||
-         (pPowerMgr->betEnableTMEvent == NULL))
-    {
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INIT, "PowerMgr_init - TM - ERROR registering BET events - ABROTING init!\n");
-        return TI_NOK;
-    }
-    /*
-    set the events as resets for one another
-    */
-    status = TrafficMonitor_SetRstCondition (pPowerMgr->hTrafficMonitor,
-                                            pPowerMgr->betDisableTMEvent,
-                                            pPowerMgr->betEnableTMEvent,
-                                            TI_TRUE);
-    if ( status != TI_OK )
-    {
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INIT, "PowerMgr_init - PowerMgr_init - ERROR binding BET events - ABROTING init!\n");
-        return TI_NOK;
-    }
-
-    /* general parameters */
-    tmRegParam.Context = pPowerMgr;
-
-    tmRegParam.Cookie = (TI_UINT32)POWER_MODE_ACTIVE;
-    tmRegParam.TimeIntervalMs = pPowerMgr->autoModeInterval;
-    tmRegParam.Trigger = TRAFF_EDGE;
-    tmRegParam.MonitorType = TX_RX_ALL_802_11_DATA_FRAMES;
-
-    /* Active threshold */
-    tmRegParam.CallBack = PowerMgrTMThresholdCrossCB;
-    tmRegParam.Direction = TRAFF_UP;
-    tmRegParam.Threshold = pPowerMgr->autoModeActiveTH;
-    pPowerMgr->passToActiveTMEvent = TrafficMonitor_RegEvent (pPowerMgr->hTrafficMonitor,
-                                                             &tmRegParam,
-                                                             TI_FALSE);
-    /* Doze threshold */
-    tmRegParam.Direction = TRAFF_DOWN;
-    tmRegParam.Threshold = pPowerMgr->autoModeDozeTH;
-    tmRegParam.Cookie = (TI_UINT32)POWER_MODE_SHORT_DOZE; /* diffrentiation between long / short doze is done at the 
-                                                          CB, according to configuration at time of CB invokation */
-    pPowerMgr->passToDozeTMEvent = TrafficMonitor_RegEvent (pPowerMgr->hTrafficMonitor,
-                                                           &tmRegParam,
-                                                           TI_FALSE);
-
-    if ( (pPowerMgr->passToActiveTMEvent == NULL) ||
-         (pPowerMgr->passToDozeTMEvent == NULL))
-    {
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INIT, "PowerMgr_init - PowerMgr_init - ERROR registering Auto mode events - ABROTING init!\n");
-        return TI_NOK;
-    }
-
-    /*
-    set the events as resets for one another
-    */
-    status = TrafficMonitor_SetRstCondition (pPowerMgr->hTrafficMonitor,
-                                            pPowerMgr->passToActiveTMEvent,
-                                            pPowerMgr->passToDozeTMEvent,
-                                            TI_TRUE);
-    if ( status != TI_OK )
-    {
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INIT, "PowerMgr_init - PowerMgr_init - ERROR binding Auto mode events - ABROTING init!\n");
-        return TI_NOK;
-    }
-
-    /*
-    configure the initialize power mode
-    */
-    pPowerMgr->desiredPowerModeProfile = pPowerMgrInitParams->powerMode;
-    for ( index = 0;index < POWER_MANAGER_MAX_PRIORITY;index++ )
-    {
-        pPowerMgr->powerMngModePriority[index].powerMode = pPowerMgr->desiredPowerModeProfile;
-        pPowerMgr->powerMngModePriority[index].priorityEnable = TI_FALSE;
-    }
-    pPowerMgr->powerMngModePriority[POWER_MANAGER_USER_PRIORITY].priorityEnable = TI_TRUE;
-
-    if (pPowerMgr->reAuthActivePriority)
-		pPowerMgr->powerMngModePriority[POWER_MANAGER_REAUTH_PRIORITY].powerMode = POWER_MODE_ACTIVE;
-
-    /* set the defualt power policy */
-    TWD_CfgSleepAuth (pPowerMgr->hTWD, pPowerMgr->defaultPowerLevel);
-
-
-    /*create the timers */
-    pPowerMgr->hRetryPsTimer = tmr_CreateTimer(pPowerMgr->hTimer);
-
-    pPowerMgr->hPsPollFailureTimer = tmr_CreateTimer(pPowerMgr->hTimer);
-
-    if ( (pPowerMgr->hPsPollFailureTimer == NULL) || (pPowerMgr->hRetryPsTimer == NULL))
-    {
-TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INIT, "PowerMgr_SetDefaults - ERROR creating timers - ABROTING init!\n");
-        return TI_NOK;
-    }
-
-    /* Register and Enable the PsPoll failure */
-    TWD_RegisterEvent (pPowerMgr->hTWD,
-        TWD_OWN_EVENT_PSPOLL_DELIVERY_FAILURE,
-        (void *)PowerMgr_PsPollFailureCB, 
-        hPowerMgr);
-    TWD_EnableEvent (pPowerMgr->hTWD, TWD_OWN_EVENT_PSPOLL_DELIVERY_FAILURE);
-
-    TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INIT, "PowerMgr_init - PowerMgr Initialized\n");
-
-    /* set defaults for the power manager keep-alive sub module */
-    powerMgrKL_setDefaults (pPowerMgr->hPowerMgrKeepAlive);
-
-    return TI_OK;
-}
-
-/****************************************************************************************
- *                        PowerMgr_startPS                                                          *
- ****************************************************************************************
-DESCRIPTION: Start the power save algorithm of the driver and also the 802.11 PS.
-                                                                                                                   
-INPUT:          - hPowerMgr             - Handle to the Power Manager
-
-OUTPUT:     
-RETURN:    TI_STATUS - TI_OK or PENDING on success else TI_NOK.\n
-****************************************************************************************/
-TI_STATUS PowerMgr_startPS(TI_HANDLE hPowerMgr)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-	int frameCount;
-
-    
-    TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMgr_startPS - called\n");
-
-    if ( pPowerMgr->psEnable == TI_TRUE )
-    {
-        TRACE1(pPowerMgr->hReport, REPORT_SEVERITY_ERROR, "PowerMgr_startPS - PS mechanism is already Enable! Aborting psEnable=%d !\n", pPowerMgr->psEnable);
-        /*
-        this is a FATAL ERROR of the power manager!
-        already enable power-save! thus return TI_OK, but there is an error in the upper
-        layer that call tp PowerMgr_startPS() twice - should know that power-save
-        is already enable therefor print the Error message.
-        or
-        the state machine while NOT in PS can be only in ACTIVE state and in some cases in
-        PS_PENDING state. therefore the state machine is out of sync from it logic!
-        */
-        return TI_OK;
-    }
-
-    pPowerMgr->psEnable = TI_TRUE;
-    /*set the correct rate after connection*/
-    powerMgrNullPacketRateConfiguration(hPowerMgr);
-    /*
-    if in auto mode then need to refer to the threshold cross indication from the traffic monitor,
-    else it need to refer to the configured power mode profile from the user.
-    */
-    pPowerMgr->desiredPowerModeProfile = powerMgrGetHighestPriority(hPowerMgr);
-
-    if ( pPowerMgr->desiredPowerModeProfile == POWER_MODE_AUTO )
-    {
-        powerMgrStartAutoPowerMode(hPowerMgr);
-    }
-    else /*not auto mode - according to the current profle*/
-    {
-        powerMgrPowerProfileConfiguration(hPowerMgr, pPowerMgr->desiredPowerModeProfile);
-    }
-
-    TWD_CfgSleepAuth (pPowerMgr->hTWD, pPowerMgr->PowerSavePowerLevel);
-
-   if ((pPowerMgr->betEnable)&&( pPowerMgr->desiredPowerModeProfile != POWER_MODE_ACTIVE ))
-   {
-		TrafficMonitor_StartEventNotif(pPowerMgr->hTrafficMonitor,
-									   pPowerMgr->betEnableTMEvent);
-
-		TrafficMonitor_StartEventNotif(pPowerMgr->hTrafficMonitor,
-									   pPowerMgr->betDisableTMEvent);
-
-	
-		frameCount = TrafficMonitor_GetFrameBandwidth(pPowerMgr->hTrafficMonitor);
-	
-		if (frameCount < pPowerMgr->BetEnableThreshold) 
-		{
-            pPowerMgr->betTrafficEnable = TI_TRUE;
-            
-		}
-		else if (frameCount > pPowerMgr->BetDisableThreshold) 
-		{
-			pPowerMgr->betTrafficEnable = TI_FALSE;
-        }
-       
-		PowerMgrConfigBetToFw(hPowerMgr,pPowerMgr->betTrafficEnable);
-	}
-    
-    /* also start the power manager keep-alive sub module */
-    powerMgrKL_start (pPowerMgr->hPowerMgrKeepAlive);
-
-    return TI_OK;
-}
-
-
-/****************************************************************************************
- *                        PowerMgr_stopPS                                                           *
- ****************************************************************************************
-DESCRIPTION: Stop the power save algorithm of the driver and also the 802.11 PS.
-                                                                                                                               
-INPUT:          - hPowerMgr             - Handle to the Power Manager
-
-OUTPUT:     
-RETURN:    TI_STATUS - TI_OK or PENDING on success else TI_NOK.\n
-****************************************************************************************/
-TI_STATUS PowerMgr_stopPS(TI_HANDLE hPowerMgr, TI_BOOL bDisconnect)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-    /*TI_STATUS status;*/
-
-    TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMgr_stopPS - called\n");
-
-    if ( pPowerMgr->psEnable == TI_FALSE )
-    {
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMgr_stopPS - PS is already Disable! Aborting!\n");
-        /*
-        Print Info message incase callng PowerMgr_stopPS() more than once in a row, without
-        calling to PowerMgr_startPS() in the middle.
-        this will return with TI_OK and not doing the Stop action!
-        */
-        return TI_OK;
-    }
-
-    pPowerMgr->psEnable = TI_FALSE;
-    tmr_StopTimer (pPowerMgr->hRetryPsTimer);
-
-    /* Check if PsPoll work-around is currently enabled */
-    if ( pPowerMgr->powerMngModePriority[POWER_MANAGER_PS_POLL_FAILURE_PRIORITY].priorityEnable == TI_TRUE)
-    {
-        tmr_StopTimer(pPowerMgr->hPsPollFailureTimer);
-        /* Exit the PsPoll work-around */
-        powerMgr_PsPollFailureTimeout( hPowerMgr, TI_FALSE );
-    }
-
-    if ( pPowerMgr->desiredPowerModeProfile == POWER_MODE_AUTO )
-    {
-        powerMgrDisableThresholdsIndications(hPowerMgr);
-    }
-
-    TWD_SetPsMode (pPowerMgr->hTWD, POWER_SAVE_OFF, TI_FALSE, NULL, NULL, NULL);
-
-    /* set the power policy of the system */
-    TWD_CfgSleepAuth (pPowerMgr->hTWD, pPowerMgr->defaultPowerLevel);
-    if ((pPowerMgr->betEnable)&&( pPowerMgr->desiredPowerModeProfile != POWER_MODE_ACTIVE ))
-	{
-		TrafficMonitor_StopEventNotif(pPowerMgr->hTrafficMonitor,
-									  pPowerMgr->betEnableTMEvent);
-
-		TrafficMonitor_StopEventNotif(pPowerMgr->hTrafficMonitor,
-									  pPowerMgr->betDisableTMEvent);
-	}
-
-   /* also stop the power manager keep-alive sub module */
-    powerMgrKL_stop (pPowerMgr->hPowerMgrKeepAlive, bDisconnect);
-
-    return TI_OK;
-}
-
-
-/****************************************************************************************
- *                        PowerMgr_getPsStatus                                                          *
- ****************************************************************************************
-DESCRIPTION: returns the 802.11 power save status (enable / disable).
-                                                                                                                               
-INPUT:          - hPowerMgr             - Handle to the Power Manager
-
-OUTPUT:     
-RETURN:    TI_BOOL - TI_TRUE if enable else TI_FALSE.\n
-****************************************************************************************/
-TI_BOOL PowerMgr_getPsStatus(TI_HANDLE hPowerMgr)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    return  TWD_GetPsStatus (pPowerMgr->hTWD);
-}
-
-
-/****************************************************************************************
- *                        PowerMgr_setPowerMode                                                         *
- ****************************************************************************************
-DESCRIPTION: Configure of the PowerMode profile (auto / active / short doze / long doze).
-                                                                                                                               
-INPUT:          - hPowerMgr             - Handle to the Power Manager
-            - thePowerMode      - the requested power mode (auto / active / short doze / long doze).
-OUTPUT:     
-RETURN:    TI_STATUS - TI_OK on success else TI_NOK.\n
-****************************************************************************************/
-TI_STATUS PowerMgr_setPowerMode(TI_HANDLE hPowerMgr)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-    PowerMgr_PowerMode_e powerMode;
-
-    /*in this way we will run with the highest priority that is enabled*/
-    powerMode = powerMgrGetHighestPriority(hPowerMgr);
-
-    /* sanity checking */
-    if ( powerMode >= POWER_MODE_MAX)
-    {
-        TRACE1(pPowerMgr->hReport, REPORT_SEVERITY_ERROR, "PowerMgr_setPowerMode - unknown parameter: %d\n", powerMode);
-        return TI_NOK;
-    }
-
-    TRACE1( pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMgr_setPowerMode, power mode = %d\n", powerMode);
-
-    if ( pPowerMgr->desiredPowerModeProfile != powerMode )
-    {
-        PowerMgr_PowerMode_e previousPowerModeProfile;
-        previousPowerModeProfile = pPowerMgr->desiredPowerModeProfile;
-        pPowerMgr->desiredPowerModeProfile = powerMode;
-
-        if ( pPowerMgr->desiredPowerModeProfile == POWER_MODE_AUTO )
-        {
-            if ( pPowerMgr->psEnable == TI_TRUE )
-            {
-                powerMgrStartAutoPowerMode(hPowerMgr);
-            }
-
-            /*
-            the transitions of state will be done according to the events from the
-            traffic monitor - therefor abort and wait event from the traffic monitor.
-            */
-            return TI_OK;
-        }
-        else if ( previousPowerModeProfile == POWER_MODE_AUTO )
-        {
-            /*
-            if the old power mode is AUTO and the new power mode is NOT then need
-            to disable the thresholds indications from the traffic monitor.
-            */
-            powerMgrDisableThresholdsIndications(hPowerMgr);
-        }
-        if ( pPowerMgr->psEnable == TI_TRUE )
-        {
-            powerMgrPowerProfileConfiguration(hPowerMgr, powerMode);
-        }
-    }
-    else
-    {
-        /*
-        the power mode is already configure to the module - don't need to do anything!
-        */
-        TRACE1(pPowerMgr->hReport, REPORT_SEVERITY_WARNING, "PowerMgr_setPowerMode - desiredPowerModeProfile == thePowerMode (=%d), ABORTING!\n", powerMode);
-    }
-
-    return TI_OK;
-}
-
-
-/****************************************************************************************
- *                        PowerMgr_setDozeModeInAuto                                    *
- ****************************************************************************************
-DESCRIPTION: Configure the doze mode (short-doze / long-doze) that auto mode will toggle between doze vs active.                                                                                        
-INPUT:      - hPowerMgr             - Handle to the Power Manager
-            - dozeMode      - the requested doze mode when Mgr is in Auto mode (short-doze / long-doze)
-OUTPUT:     
-RETURN:   
-****************************************************************************************/
-void PowerMgr_setDozeModeInAuto(TI_HANDLE hPowerMgr, PowerMgr_PowerMode_e dozeMode)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-    PowerMgr_PowerMode_e powerMode = powerMgrGetHighestPriority(hPowerMgr);
-
-    /* check if we are trying to configure the same Doze mode */
-    if ( dozeMode != pPowerMgr->autoModeDozeMode )
-    {
-        TRACE1(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMgr_setDozeModeInAuto - autoModeDozeMode == %d \n", dozeMode);
-
-        pPowerMgr->autoModeDozeMode = dozeMode;
-
-        /* in case we are already in Auto mode, we have to set the wake up condition MIB */
-        if ( powerMode == POWER_MODE_AUTO )
-        {
-            if ( dozeMode == POWER_MODE_SHORT_DOZE )
-            {
-                if ( pPowerMgr->beaconListenInterval > 1 )
-                {
-                    powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->beaconListenInterval,TNET_WAKE_ON_N_BEACON);       
-                }
-                else
-                {
-                    powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->beaconListenInterval,TNET_WAKE_ON_BEACON);     
-                }
-            }
-            else  /* POWER_MODE_LONG_DOZE */
-            {
-                if ( pPowerMgr->dtimListenInterval > 1 )
-                {
-                    powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->dtimListenInterval,TNET_WAKE_ON_N_DTIM);       
-                }
-                else
-                {
-                    powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->dtimListenInterval,TNET_WAKE_ON_DTIM);     
-                }
-            }
-
-            TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMgr_setDozeModeInAuto - already in Auto\n");
-        }
-    }
-    else
-    {
-        TRACE1(pPowerMgr->hReport, REPORT_SEVERITY_WARNING, "PowerMgr_setDozeModeInAuto - autoModeDozeMode == %d (same same ...)\n", dozeMode);
-    }
-}
-
-/****************************************************************************************
- *                        PowerMgr_getPowerMode                                                         *
- ****************************************************************************************
-DESCRIPTION: Get the current PowerMode of the PowerMgr module. 
-                                                                                                                               
-INPUT:          - hPowerMgr             - Handle to the Power Manager
-OUTPUT:     
-RETURN:    PowerMgr_PowerMode_e - (auto / active / short doze / long doze).\n
-****************************************************************************************/
-PowerMgr_PowerMode_e PowerMgr_getPowerMode(TI_HANDLE hPowerMgr)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    return pPowerMgr->desiredPowerModeProfile;
-}
-
-
-TI_STATUS powerMgr_setParam(TI_HANDLE thePowerMgrHandle,
-                            paramInfo_t *theParamP)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)thePowerMgrHandle;
-
-    switch ( theParamP->paramType )
-    {
-    case POWER_MGR_POWER_MODE:
-        pPowerMgr->powerMngModePriority[theParamP->content.powerMngPowerMode.PowerMngPriority].powerMode
-                        = theParamP->content.powerMngPowerMode.PowerMode;
-        PowerMgr_setPowerMode(thePowerMgrHandle);
-        if (pPowerMgr->betEnable)
-        PowerMgrConfigBetToFw(thePowerMgrHandle, pPowerMgr->betEnable );
-        break;
-
-    case POWER_MGR_DISABLE_PRIORITY:
-        pPowerMgr->powerMngModePriority[theParamP->content.powerMngPriority].priorityEnable = TI_FALSE;
-        PowerMgr_setPowerMode(thePowerMgrHandle);
-        break;
-
-    case POWER_MGR_ENABLE_PRIORITY:
-        pPowerMgr->powerMngModePriority[theParamP->content.powerMngPriority].priorityEnable = TI_TRUE;
-        PowerMgr_setPowerMode(thePowerMgrHandle);
-        break;
-
-    case POWER_MGR_POWER_LEVEL_PS:
-        pPowerMgr->PowerSavePowerLevel = theParamP->content.PowerSavePowerLevel;
-        /* If we are connected, config the new power level (this param is for connected state) */
-		if (pPowerMgr->psEnable)
-        {
-			TWD_CfgSleepAuth (pPowerMgr->hTWD, pPowerMgr->PowerSavePowerLevel);
-		}
-        break;
-
-    case POWER_MGR_POWER_LEVEL_DEFAULT:
-        pPowerMgr->defaultPowerLevel = theParamP->content.DefaultPowerLevel;
-        /* If we are NOT connected, config the new power level (this param is for disconnected state) */
-		if (!pPowerMgr->psEnable)
-		{	
-			TWD_CfgSleepAuth (pPowerMgr->hTWD, pPowerMgr->defaultPowerLevel);
-		}
-        break;
-
-    case POWER_MGR_POWER_LEVEL_DOZE_MODE:
-        PowerMgr_setDozeModeInAuto(thePowerMgrHandle,theParamP->content.powerMngDozeMode);
-        if (pPowerMgr->betEnable)
-        PowerMgrConfigBetToFw(thePowerMgrHandle, pPowerMgr->betEnable );
-        break;
-
-    case POWER_MGR_KEEP_ALIVE_ENA_DIS:
-    case POWER_MGR_KEEP_ALIVE_ADD_REM:
-        return powerMgrKL_setParam (pPowerMgr->hPowerMgrKeepAlive, theParamP);
-
-    default:
-        TRACE1(pPowerMgr->hReport, REPORT_SEVERITY_ERROR, "PowerMgr_setParam - ERROR - Param is not supported, %d\n\n", theParamP->paramType);
-
-        return PARAM_NOT_SUPPORTED;
-    }
-
-    return TI_OK;
-}
-
-
-
-TI_STATUS powerMgr_getParam(TI_HANDLE thePowerMgrHandle,
-                            paramInfo_t *theParamP)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)thePowerMgrHandle;
-
-    switch ( theParamP->paramType )
-    {
-    case POWER_MGR_POWER_MODE:
-        theParamP->content.PowerMode = PowerMgr_getPowerMode(thePowerMgrHandle);
-        break;
-
-    case POWER_MGR_POWER_LEVEL_PS:
-        theParamP->content.PowerSavePowerLevel = pPowerMgr->PowerSavePowerLevel;
-        break;
-
-    case POWER_MGR_POWER_LEVEL_DEFAULT:
-        theParamP->content.DefaultPowerLevel = pPowerMgr->defaultPowerLevel;
-        break;
-
-    case POWER_MGR_POWER_LEVEL_DOZE_MODE:
-        theParamP->content.powerMngDozeMode = pPowerMgr->autoModeDozeMode;
-        break;
-
-    case POWER_MGR_KEEP_ALIVE_GET_CONFIG:
-        return powerMgrKL_getParam (pPowerMgr->hPowerMgrKeepAlive, theParamP);
-
-    case POWER_MGR_GET_POWER_CONSUMPTION_STATISTICS:
-       
-       return cmdBld_ItrPowerConsumptionstat (pPowerMgr->hTWD,
-                             theParamP->content.interogateCmdCBParams.fCb, 
-                             theParamP->content.interogateCmdCBParams.hCb,
-                             (void*)theParamP->content.interogateCmdCBParams.pCb);
-
-
-
-
-
-    default:
-        TRACE1(pPowerMgr->hReport, REPORT_SEVERITY_ERROR, "PowerMgr_getParam - ERROR - Param is not supported, %d\n\n", theParamP->paramType);
-        return PARAM_NOT_SUPPORTED;
-    }
-
-    return TI_OK;
-}
-
-
-/*****************************************************************************
- **         Private Function prototypes                                     **
- *****************************************************************************/
-
-
-/****************************************************************************************
- *                        powerSaveCompleteCB                                                       *
- ****************************************************************************************
-DESCRIPTION: Callback for the Power server complete - gets the result of the request 
-              for PS or exit PS.
-                                                                                                                               
-INPUT:          - hPowerMgr             - Handle to the Power Manager
-            - PSMode
-            - trasStatus            - result string form the FW.
-OUTPUT:     
-RETURN:    void.\n
-****************************************************************************************/
-static void powerSaveCompleteCB(TI_HANDLE hPowerMgr,TI_UINT8 PSMode,TI_UINT8 transStatus)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    TRACE1( pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "powerSaveCompleteCB, statud = %d\n", transStatus);
-
-    /* Handling the event*/
-    switch ( (EventsPowerSave_e)transStatus )
-    {
-    case ENTER_POWER_SAVE_FAIL:
-    case EXIT_POWER_SAVE_FAIL:
-        pPowerMgr->lastPsTransaction = transStatus;
-        tmr_StartTimer (pPowerMgr->hRetryPsTimer,
-                        powerMgrRetryPsTimeout,
-                        (TI_HANDLE)pPowerMgr,
-                      RE_ENTER_PS_TIMEOUT,
-                      TI_FALSE);
-        break;
-
-    case ENTER_POWER_SAVE_SUCCESS:
-    case EXIT_POWER_SAVE_SUCCESS:
-        break;
-
-    default:
-        TRACE1( pPowerMgr->hReport, REPORT_SEVERITY_ERROR, "powerSaveCompleteCB: invliad status: %d\n", transStatus);
-        break;
-    }
-}
-
-/**
- * \\n
- * \date 30-Aug-2006\n
- * \brief Power manager callback fro TM event notification
- *
- * Function Scope \e Public.\n
- * \param hPowerMgr - handle to the power maanger object.\n
- * \param cookie - values supplied during event registration (active / doze).\n
- */
-static void PowerMgrTMThresholdCrossCB( TI_HANDLE hPowerMgr, TI_UINT32 cookie )
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    TRACE1(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMgrTMThresholdCrossCB - TM notified threshold crossed, cookie: %d\n", cookie);
-
-    /* sanity cehcking - TM notifications should only be received when PM is enabled and in auto mode */
-    if ( (pPowerMgr->psEnable == TI_TRUE) && (pPowerMgr->desiredPowerModeProfile == POWER_MODE_AUTO))
-    {
-        switch ((PowerMgr_PowerMode_e)cookie)
-        {
-        case POWER_MODE_ACTIVE:
-            powerMgrPowerProfileConfiguration( hPowerMgr, POWER_MODE_ACTIVE );
-            break;
-
-        /* threshold crossed down - need to enter configured doze mode */
-        case POWER_MODE_SHORT_DOZE:
-            powerMgrPowerProfileConfiguration( hPowerMgr, pPowerMgr->autoModeDozeMode );
-            break;
-
-        default:
-            TRACE1( pPowerMgr->hReport, REPORT_SEVERITY_ERROR, "PowerMgrTMThresholdCrossCB: TM notification with invalid cookie: %d!\n", cookie);
-            break;
-        }
-    }
-    else
-    {
-        TRACE2( pPowerMgr->hReport, REPORT_SEVERITY_ERROR, "PowerMgrTMThresholdCrossCB: TM motification when psEnable is :%d or desired profile is: %d\n", pPowerMgr->psEnable, pPowerMgr->desiredPowerModeProfile);
-    }
-
-}
-
-/****************************************************************************************
-*                        powerMgrDisableThresholdsIndications                                           *
-*****************************************************************************************
-DESCRIPTION: This will send a disable message to the traffic monitor,
-                 to stop sending indications on threshold pass.
-
-                                                                                                                              
-INPUT:          - hPowerMgr             - Handle to the Power Manager
-OUTPUT:     
-RETURN:    void.\n
-****************************************************************************************/
-static void powerMgrDisableThresholdsIndications(TI_HANDLE hPowerMgr)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    /*
-    auto is not a static/fix state, else its a dynamic state that flows between
-    the 3 static/fix states: active, short-doze and long-doze.
-    */
-    TrafficMonitor_StopEventNotif(pPowerMgr->hTrafficMonitor,
-                                  pPowerMgr->passToActiveTMEvent);
-
-    TrafficMonitor_StopEventNotif(pPowerMgr->hTrafficMonitor,
-                                  pPowerMgr->passToDozeTMEvent);
-
-}
-
-
-/****************************************************************************************
-*                        powerMgrEnableThresholdsIndications                                            *
-*****************************************************************************************
-DESCRIPTION: TThis will send an enable message to the traffic monitor,
-                to start sending indications on threshold pass.
-
-                                                                                                                              
-INPUT:          - hPowerMgr             - Handle to the Power Manager
-OUTPUT:     
-RETURN:    void.\n
-****************************************************************************************/
-static void powerMgrEnableThresholdsIndications(TI_HANDLE hPowerMgr)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    TRACE0( pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "powerMgrEnableThresholdsIndications called\n");
-    /*
-    auto is not a static/fix state, but rather a dynamic state that flows between
-    the 3 static/fix states: active, short-doze and long-doze.
-    */
-    TrafficMonitor_StartEventNotif(pPowerMgr->hTrafficMonitor,
-                                   pPowerMgr->passToActiveTMEvent);
-
-    TrafficMonitor_StartEventNotif(pPowerMgr->hTrafficMonitor,
-                                   pPowerMgr->passToDozeTMEvent);
-
-}
-
-
-/****************************************************************************************
-*                        powerMgrStartAutoPowerMode                                                 *
-*****************************************************************************************
-DESCRIPTION: configure the power manager to enter into AUTO power mode. 
-             The power manager will deside what power level will be applied 
-             acording to the traffic monitor.
-                                                                                                                              
-INPUT:          - hPowerMgr             - Handle to the Power Manager
-OUTPUT:     
-RETURN:    void.\n
-****************************************************************************************/
-static void powerMgrStartAutoPowerMode(TI_HANDLE hPowerMgr)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-    int frameCount;
-
-    frameCount = TrafficMonitor_GetFrameBandwidth(pPowerMgr->hTrafficMonitor);
-
-    TRACE0( pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "powerMgrStartAutoPowerMode: Starting auto power mode,");
-
-    /*Activates the correct profile*/
-    if ( frameCount >= pPowerMgr->autoModeActiveTH )
-    {
-        powerMgrPowerProfileConfiguration(hPowerMgr, POWER_MODE_ACTIVE);
-    }
-    else
-    {
-        powerMgrPowerProfileConfiguration(hPowerMgr, pPowerMgr->autoModeDozeMode);
-
-    }
-    /* Activates the Trafic monitoe Events*/        
-    powerMgrEnableThresholdsIndications(hPowerMgr);
-}
-
-/****************************************************************************************
-*                        powerMgrRetryPsTimeout                                                     *
-*****************************************************************************************
-DESCRIPTION: Retry function if a PS/exit PS request failed
-                                                                                                                              
-INPUT:      hPowerMgr       - Handle to the Power Manager
-            bTwdInitOccured - Indicates if TWDriver recovery occured since timer started 
-
-OUTPUT:     
-
-RETURN:    void.\n
-****************************************************************************************/
-static void powerMgrRetryPsTimeout(TI_HANDLE hPowerMgr, TI_BOOL bTwdInitOccured)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    TRACE0( pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "powerMgrRetryPsTimeout: timer expired.\n");
-
-    if ( pPowerMgr->lastPsTransaction == ENTER_POWER_SAVE_FAIL )
-    {
-        TWD_SetPsMode (pPowerMgr->hTWD, POWER_SAVE_ON, TI_TRUE, hPowerMgr,powerSaveCompleteCB, NULL);/*NULL as GWSI callback*/
-    }
-    else
-    {
-        TWD_SetPsMode (pPowerMgr->hTWD, POWER_SAVE_OFF, TI_TRUE, hPowerMgr, powerSaveCompleteCB, NULL);/*NULL as GWSI callback*/
-    }
-	return;
-}
-
-
-/****************************************************************************************
-*                        powerMgrPowerProfileConfiguration                                          *
-*****************************************************************************************
-DESCRIPTION: This function is the " builder " of the Power Save profiles. 
-             acording to the desired Power mode.
-                                                                                                                              
-INPUT:          - hPowerMgr             - Handle to the Power Manager
-OUTPUT:     
-RETURN:    void.\n
-****************************************************************************************/
-static void powerMgrPowerProfileConfiguration(TI_HANDLE hPowerMgr, PowerMgr_PowerMode_e desiredPowerMode)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    tmr_StopTimer (pPowerMgr->hRetryPsTimer);
-
-	pPowerMgr->lastPowerModeProfile = desiredPowerMode;
-
-    switch ( desiredPowerMode )
-    {
-    case POWER_MODE_AUTO:
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMode==AUTO - This mode should not be sent to the GWSI - we send AUTO instead\n");
-        break;
-
-    case POWER_MODE_ACTIVE:
-        /* set AWAKE through */
-        TWD_SetPsMode (pPowerMgr->hTWD,
-                                          POWER_SAVE_OFF, 
-                                          TI_TRUE, 
-                                          hPowerMgr,
-                                          powerSaveCompleteCB,
-                                          NULL);
-
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMode==ACTIVE\n");
-        break;
-
-    case POWER_MODE_SHORT_DOZE:
-        if ( pPowerMgr->beaconListenInterval > 1 )
-        {
-            powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->beaconListenInterval,TNET_WAKE_ON_N_BEACON);       
-        }
-        else
-        {
-            powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->beaconListenInterval,TNET_WAKE_ON_BEACON);     
-        }
-
-        TWD_SetPsMode (pPowerMgr->hTWD, 
-                                          POWER_SAVE_ON, 
-                                          TI_TRUE, 
-                                          hPowerMgr,
-                                          powerSaveCompleteCB,
-                                          NULL);
-
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMode==SHORT_DOZE\n");
-        break;
-
-    case POWER_MODE_LONG_DOZE:
-        if ( pPowerMgr->dtimListenInterval > 1 )
-        {
-            powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->dtimListenInterval,TNET_WAKE_ON_N_DTIM);       
-        }
-        else
-        {
-            powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->dtimListenInterval,TNET_WAKE_ON_DTIM);     
-        }
-        TWD_SetPsMode (pPowerMgr->hTWD, 
-                                          POWER_SAVE_ON, 
-                                          TI_TRUE, 
-                                          hPowerMgr,
-                                          powerSaveCompleteCB,
-                                          NULL);
-
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMode==LONG_DOZE\n");
-        break;
-
-	case POWER_MODE_PS_ONLY:
-		/* When in SG PS mode, configure the user desired wake-up condition */
-		powerMgr_SGSetUserDesiredwakeUpCond(pPowerMgr);
-
-        TWD_SetPsMode (pPowerMgr->hTWD, 
-                                          POWER_SAVE_ON, 
-                                          TI_TRUE, 
-                                          hPowerMgr,
-                                          powerSaveCompleteCB,
-                                          NULL);
-
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMode==PS_ONLY\n");
-        break;
-
-    default:
-        TRACE1(pPowerMgr->hReport, REPORT_SEVERITY_ERROR, "PowerMgr_setWakeUpConfiguration - ERROR - PowerMode - unknown parameter: %d\n", desiredPowerMode);
-        return;
-    }
-
-}
-
-
-/****************************************************************************************
-*                        powerMgrSendMBXWakeUpConditions                                            *
-*****************************************************************************************
-DESCRIPTION: Tsend configuration of the power management option that holds in the command
-                mailbox inner sturcture.
-                                                                                                                              
-INPUT:          - hPowerMgr             - Handle to the Power Manager
-OUTPUT:     
-RETURN:    TI_STATUS - TI_OK on success else TI_NOK.\n
-****************************************************************************************/
-static TI_STATUS powerMgrSendMBXWakeUpConditions(TI_HANDLE hPowerMgr,
-                                                 TI_UINT8 listenInterval,
-                                                 ETnetWakeOn tnetWakeupOn)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-    TPowerMgmtConfig powerMgmtConfig;
-    TI_STATUS status = TI_OK;
-
-    powerMgmtConfig.listenInterval = listenInterval;
-    powerMgmtConfig.tnetWakeupOn = tnetWakeupOn;
-
-    TRACE2(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "powerMgrSendMBXWakeUpConditions: listenInterval = %d, tnetWakeupOn = %d\n", listenInterval,tnetWakeupOn);
-
-    status = TWD_CfgWakeUpCondition (pPowerMgr->hTWD, &powerMgmtConfig);
-                                      
-    if ( status != TI_OK )
-    {
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_ERROR, "powerMgrSendMBXWakeUpConditions - Error in wae up condition IE!\n");
-    }
-    return status;
-}
-
-
-
-
-static TI_STATUS powerMgrNullPacketRateConfiguration(TI_HANDLE hPowerMgr)
-{
-    paramInfo_t     param;
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    param.paramType = SITE_MGR_CURRENT_RATE_PAIR_PARAM;
-    if ( siteMgr_getParam(pPowerMgr->hSiteMgr, &param) == TI_OK )
-    {
-        TWD_SetNullRateModulation (pPowerMgr->hTWD, (TI_UINT16)param.content.siteMgrCurrentRateMask.basicRateMask);
-    }
-    else
-    {
-        TWD_SetNullRateModulation (pPowerMgr->hTWD, (DRV_RATE_MASK_1_BARKER | DRV_RATE_MASK_2_BARKER));
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_ERROR, "powerMgrNullPacketRateConfiguration: error - faild to set rate so default was seted!\n");
-    }
-    return TI_OK;
-
-}
-
-
-static PowerMgr_PowerMode_e powerMgrGetHighestPriority(TI_HANDLE hPowerMgr)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-    int index;
-    for ( index = POWER_MANAGER_MAX_PRIORITY-1;index >= 0;index-- )
-    {
-        if ( pPowerMgr->powerMngModePriority[index].priorityEnable )
-        {
-
-            return pPowerMgr->powerMngModePriority[index].powerMode;
-        }
-
-    }
-
-    TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_ERROR, "powerMgrGetHighestPriority - error - faild to get highest priority! sefault deseired mode was returned !!!\n");
-    return pPowerMgr->desiredPowerModeProfile;
-}
-
-
- /****************************************************************************************
- *                        PowerMgr_notifyFWReset															*
- ****************************************************************************************
-DESCRIPTION: Notify the object of the power Manager about FW reset (recovery).
-			 Calls PowerSrv module to Set Ps Mode
-				                                                                                                   
-INPUT:      - hPowerMgr - Handle to the Power Manager	
-OUTPUT:		
-RETURN:    TI_STATUS - TI_OK on success else TI_NOK.
-****************************************************************************************/
-TI_STATUS PowerMgr_notifyFWReset(TI_HANDLE hPowerMgr)
-{
-	PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    TRACE2(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMgr_notifyFWReset(): psEnable = %d, lastPowerModeProfile = %d\n", pPowerMgr->psEnable, pPowerMgr->lastPowerModeProfile);
-
-	if (pPowerMgr->psEnable)
-	{
-		powerMgrPowerProfileConfiguration(hPowerMgr, pPowerMgr->lastPowerModeProfile);
-	}
-	
-    return TI_OK;
-}
-
-
-/****************************************************************************************
- *                        PowerMgrConfigBetToFw															*
- ****************************************************************************************
-DESCRIPTION: callback from TM event notification.
-				-	call PowerSrv module to Set Ps Mode
-				                                                                                                   
-INPUT:      	- hPowerMgr - Handle to the Power Manager	
-                - BetEnable - cookie:values supplied during event registration
-OUTPUT:		
-RETURN:    None.
-****************************************************************************************/
-static void PowerMgrConfigBetToFw( TI_HANDLE hPowerMgr, TI_UINT32 BetEnable )
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-    TI_UINT8 MaximumConsecutiveET;
-    TI_UINT32 listenInterval;
-    paramInfo_t param;
-    TI_UINT32 beaconInterval;
-    TI_UINT32 dtimPeriod;
-    PowerMgr_PowerMode_e powerMode;
-
-    param.paramType = SITE_MGR_BEACON_INTERVAL_PARAM;
-    siteMgr_getParam(pPowerMgr->hSiteMgr, &param);
-    beaconInterval = param.content.beaconInterval;
-
-    param.paramType = SITE_MGR_DTIM_PERIOD_PARAM;
-    siteMgr_getParam(pPowerMgr->hSiteMgr, &param);
-    dtimPeriod = param.content.siteMgrDtimPeriod;
-
-    /* get actual Power Mode */
-    if (pPowerMgr->desiredPowerModeProfile == POWER_MODE_AUTO)
-    {
-        powerMode = pPowerMgr->autoModeDozeMode;
-    }
-    else
-    {
-        powerMode = pPowerMgr->lastPowerModeProfile;
-    }
-
-    /* calc ListenInterval */
-    if (powerMode == POWER_MODE_SHORT_DOZE)
-    {
-        listenInterval = beaconInterval * pPowerMgr->beaconListenInterval;
-    }
-    else if (powerMode == POWER_MODE_LONG_DOZE)
-    {
-        listenInterval = dtimPeriod * beaconInterval * pPowerMgr->dtimListenInterval;
-    }
-    else
-    {
-        listenInterval = beaconInterval;
-    }
-
-    if (listenInterval == 0)
-    {
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_WARNING, "PowerMgrConfigBetToFw: listenInterval is ZERO\n");
-        return;
-    }
-
-    /* MaximumConsecutiveET = MaximalFullBeaconReceptionInterval / MAX( BeaconInterval, ListenInterval) */
-    MaximumConsecutiveET = pPowerMgr->maxFullBeaconInterval / listenInterval;
-
-    TRACE5(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, "PowerMgrConfigBetToFw:\n                           Power Mode = %d\n                           beaconInterval = %d\n                           listenInterval = %d\n                           Bet Enable = %d\n                           MaximumConsecutiveET = %d\n", powerMode, beaconInterval, listenInterval, BetEnable, MaximumConsecutiveET);
-
-    pPowerMgr->betEnable = BetEnable; /* save BET enable flag for CLI configuration */
-
-    TWD_CfgBet(pPowerMgr->hTWD, BetEnable, MaximumConsecutiveET);
-}
-
-/**
- * \date 10-April-2007\n
- * \brief Returns to the configured wakeup condition, when SG protective mode is done
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerMgr object.\n
- * Return Value: void.\n
- */
-static void powerMgr_SGSetUserDesiredwakeUpCond( TI_HANDLE hPowerMgr )
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-   	if (pPowerMgr->psEnable)
-	{
-		/* set wakeup condition according to user mode power save profile */
-		switch ( pPowerMgr->powerMngModePriority[ POWER_MANAGER_USER_PRIORITY ].powerMode )
-		{
-		case POWER_MODE_AUTO:
-			/*set wakeup condition according to doze mode in auto and wakup interval */
-			if ( pPowerMgr->autoModeDozeMode == POWER_MODE_SHORT_DOZE )
-			{
-				/* short doze */
-				if ( pPowerMgr->beaconListenInterval > 1 )
-				{
-					powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->beaconListenInterval,TNET_WAKE_ON_N_BEACON);       
-				}
-				else
-				{
-					powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->beaconListenInterval,TNET_WAKE_ON_BEACON);     
-				}
-			}
-			else
-			{
-				/* long doze */
-				if ( pPowerMgr->dtimListenInterval > 1 )
-				{
-					powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->dtimListenInterval,TNET_WAKE_ON_N_DTIM);       
-				}
-				else
-				{
-					powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->dtimListenInterval,TNET_WAKE_ON_DTIM);     
-				}
-			}
-			break;
-	
-		case POWER_MODE_ACTIVE:
-			break;
-	
-		case POWER_MODE_SHORT_DOZE:
-			if ( pPowerMgr->beaconListenInterval > 1 )
-			{
-				powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->beaconListenInterval,TNET_WAKE_ON_N_BEACON);       
-			}
-			else
-			{
-				powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->beaconListenInterval,TNET_WAKE_ON_BEACON);     
-			}
-			break;
-	
-		case POWER_MODE_LONG_DOZE:
-			if ( pPowerMgr->dtimListenInterval > 1 )
-			{
-				powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->dtimListenInterval,TNET_WAKE_ON_N_DTIM);       
-			}
-			else
-			{
-				powerMgrSendMBXWakeUpConditions(hPowerMgr,pPowerMgr->dtimListenInterval,TNET_WAKE_ON_DTIM);     
-			}
-			break;
-	
-		default:
-TRACE1(pPowerMgr->hReport, REPORT_SEVERITY_ERROR, ": ERROR - PowerMode for user prioirty is: %d\n", pPowerMgr->powerMngModePriority[ POWER_MANAGER_USER_PRIORITY ].powerMode);
-		}
-	}/*end of if (psEnable)*/
-}
-
-
-
-/****************************************************************************************
-*                        PowerMgr_PsPollFailureCB															*
-****************************************************************************************
-DESCRIPTION: Work around to solve AP bad behavior.
-         Some old AP's have trouble with Ps-Poll - The solution will be to exit PS for a 
-         period of time
-				                                                                                               
-INPUT:      	- hPowerMgr - Handle to the Power Manager	
-OUTPUT:		
-RETURN:    
-****************************************************************************************/
-static void PowerMgr_PsPollFailureCB( TI_HANDLE hPowerMgr )
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    if ( pPowerMgr->PsPollDeliveryFailureRecoveryPeriod )
-    {
-        paramInfo_t param;
-             
-        TRACE1(pPowerMgr->hReport, REPORT_SEVERITY_WARNING, " Oh boy, AP is not answering Ps-Poll's. enter active PS for %d Ms\n", pPowerMgr->PsPollDeliveryFailureRecoveryPeriod);
-
-        /*
-         * Set the system to Active power save 
-         */
-        param.paramType = POWER_MGR_POWER_MODE;
-        param.content.powerMngPowerMode.PowerMode = POWER_MODE_ACTIVE;
-        param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_PS_POLL_FAILURE_PRIORITY;
-        powerMgr_setParam(hPowerMgr,&param);
-        
-        param.paramType = POWER_MGR_ENABLE_PRIORITY;
-        param.content.powerMngPriority = POWER_MANAGER_PS_POLL_FAILURE_PRIORITY;
-        powerMgr_setParam(hPowerMgr,&param);
-
-        /*
-         * Set timer to exit the active mode
-         */
-        tmr_StartTimer(pPowerMgr->hPsPollFailureTimer,
-					   powerMgr_PsPollFailureTimeout,
-					   (TI_HANDLE)pPowerMgr,
-					   pPowerMgr->PsPollDeliveryFailureRecoveryPeriod,
-					   TI_FALSE);
-    } 
-    else    /* Work-around is disabled */
-    {
-        TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_WARNING, " Oh boy, AP is not answering Ps-Poll's !!!\n");
-    }
-	return;
-}
-
-/****************************************************************************************
-*                        powerMgr_PsPollFailureTimeout									*
-****************************************************************************************
-DESCRIPTION: After the timeout of ps-poll failure - return to normal behavior
-				                                                                                               
-INPUT:      	- hPowerMgr - Handle to the Power Manager	
-OUTPUT:		
-RETURN:    
-****************************************************************************************/
-static void powerMgr_PsPollFailureTimeout( TI_HANDLE hPowerMgr, TI_BOOL bTwdInitOccured )
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-    paramInfo_t param;
-
-    TRACE0(pPowerMgr->hReport, REPORT_SEVERITY_INFORMATION, " \n");
-    
-    /* disable Ps-Poll priority */
-    param.paramType = POWER_MGR_DISABLE_PRIORITY;
-    param.content.powerMngPriority = POWER_MANAGER_PS_POLL_FAILURE_PRIORITY;
-    powerMgr_setParam(hPowerMgr,&param);
-
-	return;
-}
-
-TI_BOOL PowerMgr_getReAuthActivePriority(TI_HANDLE thePowerMgrHandle)
-{
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)thePowerMgrHandle;
-	return pPowerMgr->reAuthActivePriority;
-}
diff --git a/wl1271/stad/src/Sta_Management/PowerMgr.h b/wl1271/stad/src/Sta_Management/PowerMgr.h
deleted file mode 100644
index d75af5d..0000000
--- a/wl1271/stad/src/Sta_Management/PowerMgr.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * PowerMgr.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file PowerMgr.h
- *  \brief This is the Power Manager module private (internal).
- *  \
- *  \date 24-Oct-2005
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Power Manager                                                 *
- *   PURPOSE: Power Manager Module private                                      *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _POWER_MGR_H_
-#define _POWER_MGR_H_
-
-#include "tidef.h"
-#include "paramOut.h"
-
-/*****************************************************************************
- **         Constants                                                       **
- *****************************************************************************/
-#define RE_ENTER_PS_TIMEOUT 10 /* mSec */
-
-#define BET_INTERVAL_VALUE 1000 /* mSec */
-
-/*****************************************************************************
- **         Enumerations                                                    **
- *****************************************************************************/
-
-/*****************************************************************************
- **         Typedefs                                                        **
- *****************************************************************************/
-
-/*****************************************************************************
- **         Structures                                                      **
- *****************************************************************************/
-
-typedef struct
-{
-    PowerMgr_PowerMode_e powerMode;
-    TI_BOOL priorityEnable;
-} powerMngModePriority_t;
-
-
-
-/** \struct powerMgr_t
- * this structure contain the data of the PowerMgr object.
- */
-typedef struct
-{
-    TI_HANDLE                   hOS;                            /**< Handle to the OS object */
-    TI_HANDLE                   hReport;                        /**< Handle to the Report module */
-    TI_HANDLE                   hTrafficMonitor;                /**< Handle to the Traffic Monitor object */
-    TI_HANDLE                   hSiteMgr;                       /**< Handle to the Site Mgr object */
-    TI_HANDLE                   hTWD;                           /**< Handle to the TWD object */
-    TI_HANDLE                   hSoftGemini;                    /**< Handle to the SG object */
-    TI_HANDLE                   hTimer;                         /**< Handle to the Timer module object */
-    TI_HANDLE                   hRetryPsTimer;                  /**< Handle to the retry timer */
-    TI_HANDLE                   hPsPollFailureTimer;            /**< Handle to ps-poll failure timer */
-    TI_HANDLE                   hPowerMgrKeepAlive;             /**< Handle to the keep-alive sub module */
-    PowerMgr_PowerMode_e        desiredPowerModeProfile;        /**< 
-                                                                 * The configure power mode to the system in the
-                                                                 * initialization function. This parameters is Saved
-                                                                 * for restart the module.
-                                                                 */
-    powerMngModePriority_t      powerMngModePriority[POWER_MANAGER_MAX_PRIORITY];                                                                           
-    PowerMgr_PowerMode_e        lastPowerModeProfile;           /**< 
-                                                                 * The last configured power mode. 
-                                                                 */
-    TI_BOOL                     psEnable;                       /**<
-                                                                 * The parameter holds the enable of the power save
-                                                                 * mechanism.
-                                                                 */
-    TI_UINT16                   autoModeInterval;               /**<
-                                                                 * Time period (in ms) to test the current TP before
-                                                                 * changing the current power mode.
-                                                                 */
-    TI_UINT16                   autoModeActiveTH;               /**< Threshold (in Bytes) for moving to Active mode */
-    TI_UINT16                   autoModeDozeTH;                 /**< 
-                                                                 * Threshold (in Bytes) for moving to Short-Doze from
-                                                                 * active mode.
-                                                                 */
-    PowerMgr_PowerMode_e        autoModeDozeMode;               /**< 
-                                                                 * The power mode of doze (short-doze / long-doze) that
-                                                                 * auto mode will be toggle between doze vs active.
-                                                                 */
-    PowerMgr_Priority_e         powerMngPriority;               /**<
-                                                                 * the priority of the power manager - canbe - regular user (cli) or
-                                                                 * special user i.e Soft Gemini.
-                                                                 */
-    TI_HANDLE                   passToActiveTMEvent;            /**< 
-                                                                 * Traffic Monitor event (TrafficAlertElement) for
-                                                                 * the pass to active event from the traffic monitor.
-                                                                 */
-    TI_HANDLE                   passToDozeTMEvent;              /**<
-                                                                 * Traffic Monitor event (TrafficAlertElement) for
-                                                                 * the pass to short doze from active event from the
-                                                                 * traffic monitor.
-                                                                 */
-    TI_HANDLE                   betEnableTMEvent;               /**<
-                                                                 * Traffic Monitor event (TrafficAlertElement) for
-                                                                 * enabling BET.
-                                                                 */
-    TI_HANDLE                   betDisableTMEvent;               /**<
-                                                                 * Traffic Monitor event (TrafficAlertElement) for
-                                                                 * disabling BET.
-                                                                 */
-    TI_UINT8                    beaconListenInterval;           /**< 
-                                                                 * specify how often the TNET wakes up to listen to
-                                                                 * beacon frames. the value is expressed in units of
-                                                                 * "beacon interval".
-                                                                 */
-    TI_UINT8                    dtimListenInterval;             /**< specify how often the TNET wakes up to listen to
-                                                                 * dtim frames. the value is expressed in units of
-                                                                 * "dtim interval".
-                                                                 */                                                                          
-    EPowerPolicy    			defaultPowerLevel;              /**< Power level when PS not active */
-    EPowerPolicy    			PowerSavePowerLevel;            /**< Power level when PS active */
-    EventsPowerSave_e           lastPsTransaction;              /**< Last result of PS request */
-    TI_UINT32                   maxFullBeaconInterval;          /**< Maximal time between full beacon reception */
-    TI_UINT8	                betEnable;                      /**< last configuration of BET enable/disable */
-	TI_UINT8					betTrafficEnable;
-	TI_UINT8					BetEnableThreshold;
-	TI_UINT8					BetDisableThreshold;
-    TI_UINT32                   PsPollDeliveryFailureRecoveryPeriod; /* Time to exit PS after receiving PsPoll failure event */
-
-	TI_BOOL						reAuthActivePriority;
-} PowerMgr_t;
-
-
-#endif /*  _POWER_MGR_H_  */
-
diff --git a/wl1271/stad/src/Sta_Management/PowerMgrDbgPrint.c b/wl1271/stad/src/Sta_Management/PowerMgrDbgPrint.c
deleted file mode 100644
index 6d4df01..0000000
--- a/wl1271/stad/src/Sta_Management/PowerMgrDbgPrint.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * PowerMgrDbgPrint.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file PowerMgrDbgPrint.c
- *  \brief Includes primtoputs for debugging the power manager module.
- *  \
- *  \date 29-Aug-2006
- */
-
-#ifndef __POWER_MGR_DBG_PRINT__
-#define __POWER_MGR_DBG_PRINT__
-
-#define __FILE_ID__  FILE_ID_72
-#include "tidef.h"
-#include "report.h"
-#include "osApi.h"
-#include "PowerMgr.h"
-
-#ifdef TI_DBG
-
-#define MAX_DESC_LENGTH 32
-
-#ifdef REPORT_LOG
-void powerMgrPrintPriorities( TI_HANDLE hPowerMgr, powerMngModePriority_t* pPriorities );
-
-static char booleanDesc[ 2 ][ MAX_DESC_LENGTH ] = {"no", "yes"};
-static char powerModeDesc[ POWER_MODE_MAX ][ MAX_DESC_LENGTH ] = 
-                        { "Auto", "Active", "Short doze", "Long doze", "PS only" };
-static char powerPolicyDesc[ POWERAUTHO_POLICY_NUM ][ MAX_DESC_LENGTH ] = 
-                        { "ELP", "PD", "AWAKE" };
-static char priorityDesc[ POWER_MANAGER_MAX_PRIORITY ][ MAX_DESC_LENGTH ] = 
-                        { "User priority", "Soft-Gemini priority" };
-static char psStatusDesc[ POWER_SAVE_STATUS_NUMBER ][ MAX_DESC_LENGTH ]=
-                        { "Enter fail", "Enter success", "Exit fail", "Exit succes" };
-#endif
-
-/****************************************************************************************
-*                        PowerMgr_printObject                                                          *
-****************************************************************************************
-DESCRIPTION: print configuration of the PowerMgr object - use for debug!
-                                                                                                                              
-INPUT:          - hPowerMgr             - Handle to the Power Manager
-OUTPUT:     
-RETURN:    void.\n
-****************************************************************************************/
-void PowerMgr_printObject( TI_HANDLE hPowerMgr )
-{
-#ifdef REPORT_LOG
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)hPowerMgr;
-
-    WLAN_OS_REPORT(("------------ Power Manager Object ------------\n\n"));
-    WLAN_OS_REPORT(("PS enabled: %s, desired power mode profile: %s, last power mode profile: %s\n",
-                    booleanDesc[ pPowerMgr->psEnable ], powerModeDesc[ pPowerMgr->desiredPowerModeProfile ],
-                    powerModeDesc[ pPowerMgr->lastPowerModeProfile ]));
-    WLAN_OS_REPORT(("Default power policy: %ss, PS power policy: %s\n", 
-                    powerPolicyDesc[ pPowerMgr->defaultPowerLevel ],
-                    powerPolicyDesc[ pPowerMgr->PowerSavePowerLevel ]));
-    WLAN_OS_REPORT(("Current priority: %s\n", priorityDesc[ pPowerMgr->powerMngPriority ]));
-    powerMgrPrintPriorities( hPowerMgr, pPowerMgr->powerMngModePriority );
-    WLAN_OS_REPORT(("\n------------ auto mode parameters ------------\n"));
-    WLAN_OS_REPORT(("Interval: %d, active threshold: %d, doze threshold: %d, doze mode: %s\n\n",
-                    pPowerMgr->autoModeInterval, pPowerMgr->autoModeActiveTH, pPowerMgr->autoModeDozeTH,
-                    powerModeDesc[ pPowerMgr->autoModeDozeMode ]));
-    WLAN_OS_REPORT(("Beacon listen interval:%d, DTIM listen interval:%d, last PS status: %s\n\n",
-                    pPowerMgr->beaconListenInterval, pPowerMgr->dtimListenInterval,
-                    psStatusDesc[ pPowerMgr->lastPsTransaction ]));
-    WLAN_OS_REPORT(("------------ Handles ------------\n"));
-    WLAN_OS_REPORT(("%-15s: 0x%x, %-15s:0x%x\n","hOS", pPowerMgr->hOS, "hTWD", pPowerMgr->hTWD));
-    WLAN_OS_REPORT(("%-15s: 0x%x, %-15s:0x%x\n","hReport", pPowerMgr->hReport, "hTrafficMonitor", pPowerMgr->hTrafficMonitor));
-    WLAN_OS_REPORT(("%-15s: 0x%x, %-15s:0x%x\n","hSiteMgr", pPowerMgr->hSiteMgr, "hTWD", pPowerMgr->hTWD));
-    WLAN_OS_REPORT(("%-15s: 0x%x, %-15s:0x%x\n","hRetryPsTimer", pPowerMgr->hRetryPsTimer, "hActiveTMEvent", pPowerMgr->passToActiveTMEvent));
-    WLAN_OS_REPORT(("%-15s: 0x%x\n", "hDozeTMEvent", pPowerMgr->passToDozeTMEvent));
-#endif
-}
-
-#ifdef REPORT_LOG
-void powerMgrPrintPriorities( TI_HANDLE hPowerMgr, powerMngModePriority_t* pPriorities )
-{
-    int i;
-
-    for ( i = 0; i < POWER_MANAGER_MAX_PRIORITY; i++ )
-    {
-        WLAN_OS_REPORT(("Priority: %-15s, enabled: %s, power mode: %s\n",
-                        priorityDesc[ i ], booleanDesc[ pPriorities[ i ].priorityEnable ],
-                         powerModeDesc[ pPriorities[ i ].powerMode ]));
-    }
-}
-#endif
-#endif /* TI_DBG */
-
-#endif /* __POWER_MGR_DBG_PRINT__ */
diff --git a/wl1271/stad/src/Sta_Management/PowerMgrKeepAlive.c b/wl1271/stad/src/Sta_Management/PowerMgrKeepAlive.c
deleted file mode 100644
index c271e8f..0000000
--- a/wl1271/stad/src/Sta_Management/PowerMgrKeepAlive.c
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * PowerMgrKeepAlive.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** 
- * \file  PowerMgrKeepAlive.c
- * \brief implement user keep-alive messages
- */
-
-#define __FILE_ID__  FILE_ID_73
-#include "osTIType.h"
-#include "TWDriver.h"
-#include "STADExternalIf.h"
-#include "txCtrl_Api.h"
-
-typedef struct
-{
-    TI_HANDLE           hTWD;
-    TI_HANDLE           hReport;
-    TI_HANDLE           hOs;
-    TI_HANDLE           hTxCtrl;
-    TKeepAliveConfig    tCurrentConfig;
-    TI_BOOL             bConnected;
-    TI_UINT8            wlanHeader[ WLAN_WITH_SNAP_QOS_HEADER_MAX_SIZE + AES_AFTER_HEADER_FIELD_SIZE ];
-    TI_UINT32           wlanHeaderLength;
-    TI_UINT8            tempBuffer[ KEEP_ALIVE_TEMPLATE_MAX_LENGTH + WLAN_WITH_SNAP_QOS_HEADER_MAX_SIZE + AES_AFTER_HEADER_FIELD_SIZE ];
-} TPowerMgrKL;
-
-TI_STATUS powerMgrKLConfigureMessage (TI_HANDLE hPowerMgrKL, TI_UINT32 uMessageIndex);
-
-/** 
- * \fn     powerMgrKL_create 
- * \brief  Creates the power manager keep-alive sub-module
- * 
- * Allocates memory for the keep-alive object
- * 
- * \param  hOS - handle to the os object
- * \return A handle to the power manager keep-alive sub-module 
- * \sa     powerMgrKL_destroy, powerMgrKL_init
- */
-TI_HANDLE powerMgrKL_create (TI_HANDLE hOS)
-{
-    TPowerMgrKL     *pPowerMgrKL;
-
-    /* allocate memory for the power manager keep-alive object */
-    pPowerMgrKL = os_memoryAlloc (hOS, sizeof(TPowerMgrKL));
-    if ( NULL == pPowerMgrKL)
-    {
-        return NULL;
-    }
-
-    /* store OS handle */
-    pPowerMgrKL->hOs = hOS;
-
-    return (TI_HANDLE)pPowerMgrKL;
-}
-
-/** 
- * \fn     powerMgrKL_destroy 
- * \brief  Destroys the power manager keep-alive sub-module
- * 
- * De-allocates keep-alive object memory
- * 
- * \param  hPowerMgrKL - handle to the power-manager keep-alive object
- * \return None
- * \sa     powerMgrKL_create, powerMgrKL_init
- */
-void powerMgrKL_destroy (TI_HANDLE hPowerMgrKL)
-{
-    TPowerMgrKL     *pPowerMgrKL = (TPowerMgrKL*)hPowerMgrKL;
-
-    os_memoryFree (pPowerMgrKL->hOs, hPowerMgrKL, sizeof(TPowerMgrKL));
-}
-
-/** 
- * \fn     powerMgrKL_init 
- * \brief  Initailize the power manager keep-alive sub-module
- * 
- * Stores handles to other modules
- * 
- * \param  hPowerMgrKL - handle to the power-manager keep-alive object
- * \param  hReport - handle to the report object
- * \param  hTWD - handle to the TWD object
- * \param  hTxCtrl - handle to the TX control object
- * \return None
- * \sa     powerMgrKL_destroy, powerMgrKL_create, powerMgrKL_setDefaults
- */
-void powerMgrKL_init (TI_HANDLE hPowerMgrKL,
-                      TStadHandlesList *pStadHandles)
-{
-    TPowerMgrKL     *pPowerMgrKL = (TPowerMgrKL*)hPowerMgrKL;
-
-    /* store handles */
-    pPowerMgrKL->hTWD       = pStadHandles->hTWD;
-    pPowerMgrKL->hReport    = pStadHandles->hReport;
-    pPowerMgrKL->hTxCtrl    = pStadHandles->hTxCtrl;
-}
-
-/** 
- * \fn     powerMgrKL_setDefaults
- * \brief  Set powr-manager keep-aive default initialization values
- * 
- * Set powr-manager keep-aive default initialization values
- * 
- * \param  hPowerMgrKL - handle to the power-manager keep-alive object
- * \return None
- * \sa     powerMgrKL_init
- */
-void powerMgrKL_setDefaults (TI_HANDLE hPowerMgrKL)
-{
-    TPowerMgrKL     *pPowerMgrKL = (TPowerMgrKL*)hPowerMgrKL;
-    TI_UINT32       uIndex;
-
-    /* mark the global enable / disable flag as enabled */
-    pPowerMgrKL->tCurrentConfig.enaDisFlag = TI_TRUE;
-
-    /* mark all messages as disabled */
-    for (uIndex = 0; uIndex < KEEP_ALIVE_MAX_USER_MESSAGES; uIndex++)
-    {
-        pPowerMgrKL->tCurrentConfig.templates[ uIndex ].keepAliveParams.enaDisFlag = TI_FALSE;
-    }
-
-    /* mark STA as disconnected */
-    pPowerMgrKL->bConnected = TI_FALSE;
-}
-
-/** 
- * \fn     powerMgrKL_start
- * \brief  Notifies the power-manager keep-alive upon connection to a BSS
- * 
- * Set all configured templates to the FW
- * 
- * \param  hPowerMgrKL - handle to the power-manager keep-alive object
- * \return TI_OK if succesful, TI_NOK otherwise 
- * \sa     powerMgrKL_stop, powerMgrKL_setParam
- */
-TI_STATUS powerMgrKL_start (TI_HANDLE hPowerMgrKL)
-{
-    TPowerMgrKL     *pPowerMgrKL = (TPowerMgrKL*)hPowerMgrKL;
-    TI_UINT32       uIndex;
-    TI_STATUS       status = TI_OK;
-
-    /* mark STA as connected */
-    pPowerMgrKL->bConnected = TI_TRUE;
-
-    /* build WLAN header */
-    status = txCtrlServ_buildWlanHeader (pPowerMgrKL->hTxCtrl, &(pPowerMgrKL->wlanHeader[ 0 ]), &(pPowerMgrKL->wlanHeaderLength));
-
-    /* download all enabled templates to the FW (through TWD)*/
-    for (uIndex = 0; uIndex < KEEP_ALIVE_MAX_USER_MESSAGES; uIndex++)
-    {
-        /* 
-         * if the message is enabled (disabled messages shouldn't be configured on connection, 
-         * as they are disabled by default in the FW) */
-
-        if (TI_TRUE == pPowerMgrKL->tCurrentConfig.templates[ uIndex ].keepAliveParams.enaDisFlag)
-        {
-            /* configure keep-alive to the FW (through command builder */
-            status = powerMgrKLConfigureMessage (hPowerMgrKL, uIndex);
-        }
-    }
-    return status;
-}
-
-/** 
- * \fn     powerMgrKL_stop 
- * \brief  Notifies the power-manager keep-alive upon disconnection from a BSS
- * 
- * Delete all configured templates from the FW and internal storage
- * 
- * \param  hPowerMgrKL - handle to the power-manager keep-alive object
- * \return TI_OK if succesful, TI_NOK otherwise 
- * \sa     powerMgrKL_start, powerMgrKL_setParam
- */
-void powerMgrKL_stop (TI_HANDLE hPowerMgrKL, TI_BOOL bDisconnect)
-{
-    TPowerMgrKL     *pPowerMgrKL = (TPowerMgrKL*)hPowerMgrKL;
-    TI_UINT32       uIndex;
-
-    /* mark STA as disconnected */
-    pPowerMgrKL->bConnected = TI_FALSE;
-
-    /* if this is a real disconnect */
-    if (TI_TRUE == bDisconnect)
-    {
-        /* for all congfiured messages */
-        for (uIndex = 0; uIndex < KEEP_ALIVE_MAX_USER_MESSAGES; uIndex++)
-        {
-            /* mark the message as disabled */
-            pPowerMgrKL->tCurrentConfig.templates[ uIndex ].keepAliveParams.enaDisFlag = TI_FALSE;
-        }
-    }
-    /* for roaming, don't do anything */
-}
-
-/** 
- * \fn     powerMgrKL_setParam 
- * \brief  Handles a parametr change from user-mode
- * 
- * Handles addition / removal of a template and global enable / disable flag
- * 
- * \param  hPowerMgrKL - handle to the power-manager keep-alive object
- * \param  pParam - A pointer to the paramter being set
- * \return TI_OK if succesful, TI_NOK otherwise 
- * \sa     powerMgrKL_start, powerMgrKL_stop
- */
-TI_STATUS powerMgrKL_setParam (TI_HANDLE hPowerMgrKL, paramInfo_t *pParam)
-{
-    TPowerMgrKL         *pPowerMgrKL = (TPowerMgrKL*)hPowerMgrKL;
-    TI_UINT32           uIndex;
-    TKeepAliveTemplate  *pNewTmpl;
-    TI_STATUS           status = TI_OK;
-
-    TRACE1(pPowerMgrKL->hReport, REPORT_SEVERITY_INFORMATION , "Keep-alive set param called with param type %d\n", pParam->paramType);
-
-    switch (pParam->paramType)
-    {
-    /* global keep-alive enable / disable flag */
-    case POWER_MGR_KEEP_ALIVE_ENA_DIS:
-
-        pPowerMgrKL->tCurrentConfig.enaDisFlag = pParam->content.powerMgrKeepAliveEnaDis;
-        return TWD_CfgKeepAliveEnaDis(pPowerMgrKL->hTWD, 
-                                      (TI_UINT8)pParam->content.powerMgrKeepAliveEnaDis);
-        break;
-
-    /* keep-alive template and parameters configuration */
-    case POWER_MGR_KEEP_ALIVE_ADD_REM:
-
-        pNewTmpl = pParam->content.pPowerMgrKeepAliveTemplate;
-        uIndex = pNewTmpl->keepAliveParams.index;
-
-        /* if STA is connected */
-        if (TI_TRUE == pPowerMgrKL->bConnected)
-        {
-            /* if keep-alive is already configured for this index */
-            if (TI_TRUE == pPowerMgrKL->tCurrentConfig.templates[ uIndex ].keepAliveParams.enaDisFlag)
-            {
-                /* disable previous keep-alive */
-                pPowerMgrKL->tCurrentConfig.templates[ uIndex ].keepAliveParams.enaDisFlag = TI_FALSE;
-                status = TWD_CfgKeepAlive (pPowerMgrKL->hTWD, &(pPowerMgrKL->tCurrentConfig.templates[ uIndex ].keepAliveParams));
-                if (TI_OK != status)
-                {
-                    TRACE1(pPowerMgrKL->hReport, REPORT_SEVERITY_ERROR , "powerMgrKL_setParam: error trying to clear current template %d\n", status);
-                    return status;
-                }
-            }
-
-            /* copy configuration */
-            os_memoryCopy (pPowerMgrKL->hOs, &(pPowerMgrKL->tCurrentConfig.templates[ uIndex ]),
-                           pNewTmpl, sizeof (TKeepAliveTemplate));
-
-            /* configure keep-alive to the FW (through command builder */
-            return powerMgrKLConfigureMessage (hPowerMgrKL, uIndex);
-        }
-        /* STA disconnected */
-        else
-        {
-            /* copy configuration */
-            os_memoryCopy (pPowerMgrKL->hOs, &(pPowerMgrKL->tCurrentConfig.templates[ uIndex ]),
-                           pNewTmpl, sizeof (TKeepAliveTemplate));
-        }
-        return TI_OK;
-        break;
-
-    default:
-        TRACE1(pPowerMgrKL->hReport, REPORT_SEVERITY_ERROR , "power manager keep-alive: set param with unknown param type %d\n", pParam->paramType);
-        return PARAM_NOT_SUPPORTED;
-        break;
-    }
-}
-
-/** 
- * \fn     powerMgrKL_getParam 
- * \brief  Handles a parametr request from user-mode
- * 
- * Retrieves configuration
- * 
- * \param  hPowerMgrKL - handle to the power-manager keep-alive object
- * \param  pParam - A pointer to the paramter being retrieved
- * \return TI_OK if succesful, TI_NOK otherwise 
- * \sa     powerMgrKL_start, powerMgrKL_stop
- */
-TI_STATUS powerMgrKL_getParam (TI_HANDLE hPowerMgrKL, paramInfo_t *pParam)
-{
-    TPowerMgrKL     *pPowerMgrKL = (TPowerMgrKL*)hPowerMgrKL;
-
-    TRACE1(pPowerMgrKL->hReport, REPORT_SEVERITY_INFORMATION , "Keep-alive get param called with param type %d\n", pParam->paramType);
-
-    switch (pParam->paramType)
-    {
-    case POWER_MGR_KEEP_ALIVE_GET_CONFIG:
-
-        pParam->paramLength = sizeof (TKeepAliveConfig);
-        os_memoryCopy (pPowerMgrKL->hOs, (void*)pParam->content.pPowerMgrKeepAliveConfig,
-                       (void*)&(pPowerMgrKL->tCurrentConfig), sizeof (TKeepAliveConfig));
-
-        return TI_OK;
-        break;
-
-    default:
-        TRACE1(pPowerMgrKL->hReport, REPORT_SEVERITY_ERROR , "power manager keep-alive: get param with unknown param type %d\n", pParam->paramType);
-        return PARAM_NOT_SUPPORTED;
-        break;
-    }
-}
-
-/** 
- * \fn     powerMgrKLConfigureMessage 
- * \brief  Configures keep-alive message (template and parameters)
- * 
- * Configures a keepa-live message from internal database.
- * 
- * \param  hPowerMgrKL - handle to the power-manager keep-alive object
- * \param  uMessageIndex - index of message to configure (from internal database)
- * \return TI_OK if succesful, TI_NOK otherwise 
- * \sa     powerMgrKL_start, powerMgrKL_setParam
- */
-TI_STATUS powerMgrKLConfigureMessage (TI_HANDLE hPowerMgrKL, TI_UINT32 uMessageIndex)
-{
-    TPowerMgrKL     *pPowerMgrKL    = (TPowerMgrKL*)hPowerMgrKL;
-    TI_STATUS       status          = TI_OK;
-
-    /* if the keep-alive for this index is enabled */
-    if (TI_TRUE == pPowerMgrKL->tCurrentConfig.templates[ uMessageIndex ].keepAliveParams.enaDisFlag)
-    {
-        /* configure template - first the template itself */
-        TSetTemplate    tTemplate;
-
-        tTemplate.type = KEEP_ALIVE_TEMPLATE;
-        tTemplate.index = uMessageIndex;
-        os_memoryCopy (pPowerMgrKL->hOs, &(pPowerMgrKL->tempBuffer),
-                       &(pPowerMgrKL->wlanHeader), pPowerMgrKL->wlanHeaderLength); /* copy WLAN header - was built on connection */
-        os_memoryCopy (pPowerMgrKL->hOs, &(pPowerMgrKL->tempBuffer[ pPowerMgrKL->wlanHeaderLength ]),
-                       &(pPowerMgrKL->tCurrentConfig.templates[ uMessageIndex ].msgBuffer[ 0 ]),
-                       pPowerMgrKL->tCurrentConfig.templates[ uMessageIndex ].msgBufferLength); /* copy template data */
-        tTemplate.ptr = &(pPowerMgrKL->tempBuffer[ 0 ]);                                                                     
-        tTemplate.len = pPowerMgrKL->tCurrentConfig.templates[ uMessageIndex ].msgBufferLength + pPowerMgrKL->wlanHeaderLength;
-        tTemplate.uRateMask = RATE_MASK_UNSPECIFIED;
-        status = TWD_CmdTemplate (pPowerMgrKL->hTWD, &tTemplate, NULL, NULL);
-        if (TI_OK != status)
-        {
-            TRACE1(pPowerMgrKL->hReport, REPORT_SEVERITY_ERROR , "powerMgrKLConfigureMessage: error trying to set new template %d\n", status);
-            return status;
-        }
-
-        /* and than the parameters */
-        status = TWD_CfgKeepAlive (pPowerMgrKL->hTWD, &(pPowerMgrKL->tCurrentConfig.templates[ uMessageIndex ].keepAliveParams));
-        if (TI_OK != status)
-        {
-            TRACE1(pPowerMgrKL->hReport, REPORT_SEVERITY_ERROR , "powerMgrKLConfigureMessage: error trying to set new keep-alive params %d\n", status);
-            return status;
-        }
-    }
-    /* keep-alive for this index is disabled - just disable it */
-    else
-    {
-        status = TWD_CfgKeepAlive (pPowerMgrKL->hTWD, &(pPowerMgrKL->tCurrentConfig.templates[ uMessageIndex ].keepAliveParams));
-        if (TI_OK != status)
-        {
-            TRACE1(pPowerMgrKL->hReport, REPORT_SEVERITY_ERROR , "powerMgrKLConfigureMessage: error trying to set new keep-alive params %d\n", status);
-            return status;
-        }
-    }
-
-    return status;
-}
diff --git a/wl1271/stad/src/Sta_Management/PowerMgrKeepAlive.h b/wl1271/stad/src/Sta_Management/PowerMgrKeepAlive.h
deleted file mode 100644
index 0fb8e5c..0000000
--- a/wl1271/stad/src/Sta_Management/PowerMgrKeepAlive.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * PowerMgrKeepAlive.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** 
- * \file  PowerMgrKeepAlive.h
- * \brief user keep-alive declarations
- */
-
-#ifndef __POWER_MGR_KEEP_ALIVE_H__
-#define __POWER_MGR_KEEP_ALIVE_H__
-
-TI_HANDLE powerMgrKL_create (TI_HANDLE hOS);
-void powerMgrKL_destroy (TI_HANDLE hPowerMgrKL);
-void powerMgrKL_init (TI_HANDLE hPowerMgrKL, TStadHandlesList *pStadHandles);
-void powerMgrKL_setDefaults (TI_HANDLE hPowerMgrKL);
-TI_STATUS powerMgrKL_start (TI_HANDLE hPowerMgrKL);
-TI_STATUS powerMgrKL_stop (TI_HANDLE hPowerMgrKL, TI_BOOL bDisconnect);
-TI_STATUS powerMgrKL_setParam (TI_HANDLE hPowerMgrKL, paramInfo_t *pParam);
-TI_STATUS powerMgrKL_getParam (TI_HANDLE hPowerMgrKL, paramInfo_t *pParam);
-
-#endif /* __POWER_MGR_KEEP_ALIVE_H__ */
-
diff --git a/wl1271/stad/src/Sta_Management/PowerMgr_API.h b/wl1271/stad/src/Sta_Management/PowerMgr_API.h
deleted file mode 100644
index fcb183c..0000000
--- a/wl1271/stad/src/Sta_Management/PowerMgr_API.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * PowerMgr_API.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file PowerMgr_API.h
- *  \brief This is the Power Manager module API.
- *  \
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Power Manager                                                 *
- *   PURPOSE: Power Manager Module API                                      *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _POWER_MGR_API_H_
-#define _POWER_MGR_API_H_
-
-#include "tidef.h"
-#include "paramOut.h"
-#include "DrvMainModules.h"
-
-/*****************************************************************************
- **         Constants                                                       **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         Enumerations                                                    **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         Typedefs                                                        **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         Structures                                                      **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         External data definitions                                       **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         External functions definitions                                  **
- *****************************************************************************/
-
-
-/*****************************************************************************
- **         Public Function prototypes                                      **
- *****************************************************************************/
-
-/**
- * \
- * \date 24-Oct-2005\n
- * \brief Creates the object of the power Manager.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the OS.\n
- * Return Value: TI_HANDLE - handle to the PowerMgr object.\n
- */
-TI_HANDLE PowerMgr_create(TI_HANDLE theOsHandle);
-
-/**
- * \
- * \date 24-Oct-2005\n
- * \brief Destroy the object of the power Manager.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerMgr object.\n
- * Return Value: TI_STATUS - TI_OK on success else TI_NOK.\n
- */
-TI_STATUS PowerMgr_destroy(TI_HANDLE thePowerMgrHandle);
-
-/**
- * \
- * \date 24-Oct-2005\n
- * \brief Initialization of the PowerMgr module.
- *
- * Function Scope \e Public.\n
- * Parameters:    pStadHandles - The driver modules handles  \n
- * Return Value:  void  \n
- */
-void PowerMgr_init (TStadHandlesList *pStadHandles);
-
-TI_STATUS PowerMgr_SetDefaults (TI_HANDLE hPowerMgr, PowerMgrInitParams_t* pPowerMgrInitParams);
-
-/**
- * \
- * \date 24-Oct-2005\n
- * \brief Start the power save algorithm of the driver and also the 802.11 PS.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerMgr object.\n
- * Return Value: TI_STATUS - TI_OK on success else TI_NOK.\n
- * \b Description:\n
- * PsEnable = true, and decide on the proper power mode.
- */
-TI_STATUS PowerMgr_startPS(TI_HANDLE thePowerMgrHandle);
-
-/**
- * \
- * \date 24-Oct-2005\n
- * \brief stop the power save algorithm of the driver and also the 802.11 PS.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerMgr object.\n
- * 2) TI_BOOL - indicates if this is roaming (FALSE) or disconnect (TRUE)
- * Return Value: TI_STATUS - TI_OK on success else TI_NOK.\n
- * \b Description:\n
- * PsEnable = false, and set the power mode to active.
- */
-TI_STATUS PowerMgr_stopPS(TI_HANDLE thePowerMgrHandle, TI_BOOL bDisconnect);
-
-/**
- * \
- * \date 24-Oct-2005\n
- * \brief returns the 802.11 power save status (enable / disable).
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerMgr object.\n
- * Return Value: TI_BOOL - TI_TRUE if enable else TI_FALSE.\n
-*/
-TI_BOOL PowerMgr_getPsStatus(TI_HANDLE thePowerMgrHandle);
-
-
-
-/**
- * \
- * \date 24-Oct-2005\n
- * \brief Configure of the PowerMode (auto / active / short doze / long doze).
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerMgr object.\n
- * 2) PowerMgr_PowerMode_e - the requested power mode (auto / active / short doze / long doze).
- * Return Value: TI_STATUS - TI_OK on success else TI_NOK.\n
- * \b Description:\n
- * desiredPowerModeProfile = PowerMode input parameter, and set the proper power mode.
-*/
-TI_STATUS PowerMgr_setPowerMode(TI_HANDLE thePowerMgrHandle);
-
-
-/**
- * \
- * \date 24-Oct-2005\n
- * \brief Get the current PowerMode of the PowerMgr module.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerMgr object.\n
- * Return Value: PowerMgr_PowerMode_e .\n
- */
-PowerMgr_PowerMode_e PowerMgr_getPowerMode(TI_HANDLE thePowerMgrHandle);
-    
-TI_STATUS powerMgr_getParam(TI_HANDLE thePowerMgrHandle,
-                            paramInfo_t *theParamP);
-TI_STATUS powerMgr_setParam(TI_HANDLE thePowerMgrHandle,
-                            paramInfo_t *theParamP);
-
-
-/**
- * \
- * \date 20-July-2004\n
- * \brief print configuration of the PowerMgr object - use for debug!
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerMgr object.\n
- * Return Value: void.\n
- */
-void PowerMgr_printObject(TI_HANDLE thePowerMgrHandle);
-
-/**
- * \date 10-April-2007\n
- * \brief reset PM upon recovery event.
- *
- * Function Scope \e Public.\n
- * Parameters:\n
- * 1) TI_HANDLE - handle to the PowerMgr object.\n
- * Return Value: void.\n
- */
-
-TI_STATUS PowerMgr_notifyFWReset(TI_HANDLE hPowerMgr);
-
-TI_BOOL PowerMgr_getReAuthActivePriority(TI_HANDLE thePowerMgrHandle);
-
-#endif /*_POWER_MGR_API_H_*/
diff --git a/wl1271/stad/src/Sta_Management/ScanCncn.c b/wl1271/stad/src/Sta_Management/ScanCncn.c
deleted file mode 100644
index b44da4c..0000000
--- a/wl1271/stad/src/Sta_Management/ScanCncn.c
+++ /dev/null
@@ -1,1508 +0,0 @@
-/*
- * ScanCncn.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file ScanCncn.c
- *  \brief Scan concentartor implementation
- *
- *  \see   ScanCncnSm.c, ScanCncnSmSpecific.c
- */
-
-
-#define __FILE_ID__  FILE_ID_76
-#include "ScanCncn.h"
-#include "report.h"
-#include "scrApi.h"
-#include "regulatoryDomainApi.h"
-#include "siteMgrApi.h"
-#include "healthMonitor.h"
-#include "TWDriver.h"
-#include "DrvMainModules.h"
-#include "GenSM.h"
-#include "ScanCncnPrivate.h"
-#include "ScanCncnOsSm.h"
-#include "scanResultTable.h"
-#include "smeApi.h"
-#include "apConnApi.h"
-#include "EvHandler.h"
-
-/* static functions */
-void scanCncn_SGupdateScanParams (TI_HANDLE hScanCncn, UScanParams *puScanParams, TI_BOOL bPeriodicScan) ;
-static void scanCncn_VerifyChannelsWithRegDomain (TI_HANDLE hScanCncn, UScanParams *puScanParams, TI_BOOL bPeriodicScan);
-static void scanCncn_Mix1ShotScanChannels (TScanChannelEntry *pChannelArray, TI_UINT32 uValidChannelsCount);
-static void scanCncn_MixPeriodicScanChannels (TPeriodicChannelEntry *pChannelArray, TI_UINT32 uValidChannelsCount);
-
-#define SCAN_CLIENT_FROM_TAG( tag )  tag2Client[ tag ];
-static EScanCncnClient tag2Client[ SCAN_RESULT_TAG_MAX_NUMBER ] = 
-    { SCAN_SCC_NO_CLIENT, SCAN_SCC_APP_ONE_SHOT, SCAN_SCC_DRIVER, SCAN_SCC_APP_PERIODIC, SCAN_SCC_NO_CLIENT,
-      SCAN_SCC_ROAMING_IMMED, SCAN_SCC_ROAMING_CONT };
-
-/** 
- * \fn     scanCncn_Create 
- * \brief  Create the scan concentrator object
- * 
- * Create the scan concentrator object. Allocates system resources and creates the client modules.
- * 
- * \param  hOS - handle to the OS object
- * \return hanlde to the new scan concentrator object
- * \sa     scanCncn_Destroy, scanCncn_Init, scanCncn_SetDefaults
- */ 
-TI_HANDLE scanCncn_Create (TI_HANDLE hOS)
-{
-    TScanCncn   *pScanCncn;
-    TI_UINT32   uIndex;
-
-    /* Allocate scan concentartor object memory */
-    pScanCncn = (TScanCncn*)os_memoryAlloc (hOS, sizeof (TScanCncn));
-    if (NULL == pScanCncn)
-    {
-        WLAN_OS_REPORT (("scanCncn_Create: Unable to allocate memory for scan concentrator object\n"));
-        return NULL;
-    }
-
-    /* nullify the new object */
-    os_memorySet (hOS, (void*)pScanCncn, 0, sizeof (TScanCncn));
-
-    /* Store OS handle */
-    pScanCncn->hOS = hOS;
-
-    /* Create different clients */
-    for (uIndex = 0; uIndex < SCAN_SCC_NUM_OF_CLIENTS; uIndex++)
-    {
-        pScanCncn->pScanClients[ uIndex ] = scanCncnSm_Create (hOS);
-        if (NULL == pScanCncn->pScanClients[ uIndex ])
-        {
-            WLAN_OS_REPORT (("scanCncn_Create: Unable to create client %d object\n", uIndex));
-            /* free all resources allocated so far */
-            scanCncn_Destroy ((TI_HANDLE)pScanCncn);
-            return NULL;
-        }
-    }
-
-    /* create the OS scan SM */
-    pScanCncn->hOSScanSm = scanCncnOsSm_Create ((TI_HANDLE)pScanCncn);
-    if (NULL == pScanCncn->hOSScanSm)
-    {
-        WLAN_OS_REPORT (("scanCncn_Create: Unable to create OS scan SM\n"));
-        /* free all resources allocated so far */
-        scanCncn_Destroy ((TI_HANDLE)pScanCncn);
-        return NULL;        
-    }
-
-    /* create the app scan result table */
-    pScanCncn->hScanResultTable = scanResultTable_Create (hOS, SCAN_CNCN_APP_SCAN_TABLE_ENTRIES);
-    if (NULL == pScanCncn->hScanResultTable)
-    {
-        WLAN_OS_REPORT (("scanCncn_Create: Unable to create application scan result table\n"));
-        /* free all resources allocated so far */
-        scanCncn_Destroy ((TI_HANDLE)pScanCncn);
-        return NULL;        
-    }
-
-    /* return handle to the new object */
-    return (TI_HANDLE)pScanCncn;
-}
-
-/** 
- * \fn     scanCncn_Destroy
- * \brief  Destroys the scan concentrator object
- * 
- * Destroys the scan concentrator object. Destroys the cleint modules and frees system resources.
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \return None
- * \sa     scanCncn_Create
- */ 
-void scanCncn_Destroy (TI_HANDLE hScanCncn)
-{
-    TScanCncn   *pScanCncn = (TScanCncn*)hScanCncn;
-    TI_UINT32   uIndex;
-
-    /* destory the app scan result table */
-    scanResultTable_Destroy (pScanCncn->hScanResultTable);
-
-    /* destroy the OS scan SM */
-    scanCncnOsSm_Destroy (hScanCncn);
-
-    /* destroy the client objects */
-    for (uIndex = 0; uIndex < SCAN_SCC_NUM_OF_CLIENTS; uIndex++)
-    {
-        scanCncnSm_Destroy (pScanCncn->pScanClients[ uIndex ]);
-    }
-
-    /* release the scan concentrator object */
-    os_memoryFree (pScanCncn->hOS, hScanCncn, sizeof (TScanCncn));
-}
-
-/** 
- * \fn     scanCncn_Init
- * \brief  Initializes the scan concentartor module 
- * 
- * Copy handles, register callbacks and initialize client modules
- * 
- * \param  pStadHandles - modules handles structure
- * \return None
- * \sa     scanCncn_Create, scanCncn_SetDefaults
- */ 
-void scanCncn_Init (TStadHandlesList *pStadHandles)
-{
-    TScanCncn   *pScanCncn = (TScanCncn*)pStadHandles->hScanCncn;
-    
-    /* store handles */
-    pScanCncn->hTWD = pStadHandles->hTWD;
-    pScanCncn->hReport = pStadHandles->hReport;
-    pScanCncn->hRegulatoryDomain = pStadHandles->hRegulatoryDomain;
-    pScanCncn->hSiteManager = pStadHandles->hSiteMgr;
-    pScanCncn->hSCR = pStadHandles->hSCR;
-    pScanCncn->hAPConn = pStadHandles->hAPConnection;
-    pScanCncn->hEvHandler = pStadHandles->hEvHandler;
-    pScanCncn->hMlme = pStadHandles->hMlmeSm;
-    pScanCncn->hHealthMonitor = pStadHandles->hHealthMonitor;
-    pScanCncn->hSme = pStadHandles->hSme;
-
-    /* nullify other parameters */
-    pScanCncn->eConnectionStatus = STA_NOT_CONNECTED;
-    pScanCncn->bUseSGParams = TI_FALSE; /* bUseSGParams is TI_TRUE only when SG module is enabled */
-    pScanCncn->eCurrentRunningAppScanClient = SCAN_SCC_NO_CLIENT;
-    pScanCncn->uOSScanLastTimeStamp = 0;
-    pScanCncn->bOSScanRunning = TI_FALSE;
-
-    /* initialize client objects */
-    scanCncnSm_Init (pScanCncn->pScanClients[ SCAN_SCC_ROAMING_IMMED ], pScanCncn->hReport, pScanCncn->hTWD,
-                     pScanCncn->hSCR, pScanCncn->hAPConn, pScanCncn->hMlme, (TI_HANDLE)pScanCncn,
-                     scanCncnSmImmed1Shot_ScrRequest, scanCncnSmImmed1Shot_ScrRelease, scanCncnSmImmed1Shot_StartScan,
-                     scanCncnSmImmed1Shot_StopScan, scanCncnSmImmed1Shot_Recovery, "Immediate scan SM");
-    scanCncnSm_Init (pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ], pScanCncn->hReport, pScanCncn->hTWD,
-                     pScanCncn->hSCR, pScanCncn->hAPConn, pScanCncn->hMlme, (TI_HANDLE)pScanCncn,
-                     scanCncnSmCont1Shot_ScrRequest, scanCncnSmCont1Shot_ScrRelease, scanCncnSmCont1Shot_StartScan,
-                     scanCncnSmCont1Shot_StopScan, scanCncnSmCont1Shot_Recovery, "Continuous scan SM");
-    scanCncnSm_Init (pScanCncn->pScanClients[ SCAN_SCC_DRIVER ], pScanCncn->hReport, pScanCncn->hTWD,
-                     pScanCncn->hSCR, pScanCncn->hAPConn, pScanCncn->hMlme, (TI_HANDLE)pScanCncn, 
-                     scanCncnSmDrvP_ScrRequest, scanCncnSmDrvP_ScrRelease, scanCncnSmDrvP_StartScan,
-                     scanCncnSmDrvP_StopScan, scanCncnSmDrvP_Recovery, "Driver scan SM");
-    scanCncnSm_Init (pScanCncn->pScanClients[ SCAN_SCC_APP_PERIODIC ], pScanCncn->hReport, pScanCncn->hTWD,
-                     pScanCncn->hSCR, pScanCncn->hAPConn, pScanCncn->hMlme, (TI_HANDLE)pScanCncn,
-                     scanCncnSmAppP_ScrRequest, scanCncnSmAppP_ScrRelease, scanCncnSmAppP_StartScan,
-                     scanCncnSmAppP_StopScan, scanCncnSmAppP_Recovery, "Periodic application scan SM");
-    scanCncnSm_Init (pScanCncn->pScanClients[ SCAN_SCC_APP_ONE_SHOT ], pScanCncn->hReport, pScanCncn->hTWD,
-                     pScanCncn->hSCR, pScanCncn->hAPConn, pScanCncn->hMlme, (TI_HANDLE)pScanCncn,
-                     scanCncnSmApp1Shot_ScrRequest, scanCncnSmApp1Shot_ScrRelease, scanCncnSmApp1Shot_StartScan,
-                     scanCncnSmApp1Shot_StopScan, scanCncnSmApp1Shot_Recovery, "One-shot application scan SM");
-
-    /* Initialize the OS scan SM */
-    scanCncnOsSm_Init ((TI_HANDLE)pScanCncn);
-
-    /* initlaize the application scan result table */
-    scanResultTable_Init (pScanCncn->hScanResultTable, pStadHandles, SCAN_RESULT_TABLE_DONT_CLEAR);
-}
-
-/** 
- * \fn     scanCncn_SetDefaults 
- * \brief  Set registry values to scan concentrator
- * 
- * Set registry values to scan concentrator
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  pScanConcentratorInitParams - pointer to the registry parameters struct
- * \return None
- * \sa     scanCncn_Create, scanCncn_Init
- */ 
-void scanCncn_SetDefaults (TI_HANDLE hScanCncn, TScanCncnInitParams *pScanCncnInitParams)
-{
-    TScanCncn   *pScanCncn = (TScanCncn*)hScanCncn;
-
-    /* copy registry values */
-    os_memoryCopy (pScanCncn->hOS, 
-                   &pScanCncn->tInitParams, 
-                   pScanCncnInitParams,
-                   sizeof (TScanCncnInitParams));
-
-    /* register SCR callbacks */
-    scr_registerClientCB (pScanCncn->hSCR, SCR_CID_APP_SCAN, scanCncn_ScrAppCB, (TI_HANDLE)pScanCncn);
-    scr_registerClientCB (pScanCncn->hSCR, SCR_CID_DRIVER_FG_SCAN, scanCncn_ScrDriverCB, (TI_HANDLE)pScanCncn);
-    scr_registerClientCB (pScanCncn->hSCR, SCR_CID_CONT_SCAN, scanCncn_ScrRoamingContCB, (TI_HANDLE)pScanCncn);
-    scr_registerClientCB (pScanCncn->hSCR, SCR_CID_IMMED_SCAN, scanCncn_ScrRoamingImmedCB, (TI_HANDLE)pScanCncn);
-
-    /* register TWD scan complete CB */
-    TWD_RegisterScanCompleteCb (pScanCncn->hTWD, scanCncn_ScanCompleteNotificationCB,
-                                (TI_HANDLE)pScanCncn);
-    /* register and enable periodic scan complete event with TWD */
-    TWD_RegisterEvent (pScanCncn->hTWD, TWD_OWN_EVENT_PERIODIC_SCAN_COMPLETE,
-                       (void *)scanCncn_PeriodicScanCompleteCB, (TI_HANDLE)pScanCncn);
-    TWD_EnableEvent (pScanCncn->hTWD, TWD_OWN_EVENT_PERIODIC_SCAN_COMPLETE);
-
-    /* and periodic scan report */
-    TWD_RegisterEvent (pScanCncn->hTWD, TWD_OWN_EVENT_PERIODIC_SCAN_REPORT,
-                       (void *)scanCncn_PeriodicScanReportCB, (TI_HANDLE)pScanCncn);
-    TWD_EnableEvent (pScanCncn->hTWD, TWD_OWN_EVENT_PERIODIC_SCAN_REPORT);
-
-    /* "register" the application scan result callback */
-    scanCncn_RegisterScanResultCB ((TI_HANDLE)pScanCncn, SCAN_SCC_APP_ONE_SHOT, scanCncn_AppScanResultCB, (TI_HANDLE)pScanCncn);
-    scanCncn_RegisterScanResultCB ((TI_HANDLE)pScanCncn, SCAN_SCC_APP_PERIODIC, scanCncn_AppScanResultCB, (TI_HANDLE)pScanCncn);
-
-    /* set the Scan Result Aging threshold for the scan concentrator's Scan Result Table */
-    scanResultTable_SetSraThreshold(pScanCncn->hScanResultTable, pScanCncnInitParams->uSraThreshold);
-
-    /* set to the sme the handler of the scan concentrator Scan Result Table */
-    sme_SetScanResultTable(pScanCncn->hSme, pScanCncn->hScanResultTable);
-}
-
-/** 
- * \fn     scanCncn_SwitchToConnected
- * \brief  Notifies the scan concentratoe the STA has connected to an infrastructure BSS
- * 
- * Notifies the scan concentratoe the STA has connected to an infrastructure BSS
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \return None
- * \sa     scanCncn_SwitchToNotConnected, scanCncn_SwitchToIBSS 
- */ 
-void scanCncn_SwitchToConnected (TI_HANDLE hScanCncn)
-{
-    TScanCncn   *pScanCncn = (TScanCncn*)hScanCncn;
-
-    TRACE0(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_SwitchToConnected: Switching to connected state.\n");
-    
-    /* change connection status to connected */
-    pScanCncn->eConnectionStatus = STA_CONNECTED;
-
-    /* Any running scans in other modes will be aborted (if needed) by the SCR (or have already been) */
-}
-
-/** 
- * \fn     scanCncn_SwitchToNotConnected
- * \brief  Notifies the scan concentratoe the STA has disconnected from a BSS
- * 
- * Notifies the scan concentratoe the STA has disconnected from a BSS
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \return None
- * \sa     scanCncn_SwitchToConnected, scanCncn_SwitchToIBSS
- */ 
-void scanCncn_SwitchToNotConnected (TI_HANDLE hScanCncn)
-{
-    TScanCncn   *pScanCncn = (TScanCncn*)hScanCncn;
-
-    TRACE0(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_SwitchToNotConnected: Switching to not connected state.\n");
-
-    /* change connection status to connected */
-    pScanCncn->eConnectionStatus = STA_NOT_CONNECTED;
-
-    /* Any running scans in other modes will be aborted (if needed) by the SCR (or have already been) */
-}
-
-/** 
- * \fn     scanCncn_SwitchToIBSS
- * \brief  Notifies the scan concentratoe the STA has connected to an independent BSS
- * 
- * Notifies the scan concentratoe the STA has connected to an independent BSS
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \return None
- * \sa     scanCncn_SwitchToConnected, scanCncn_SwitchToNotConnected
- */ 
-void scanCncn_SwitchToIBSS (TI_HANDLE hScanCncn)
-{
-    TScanCncn   *pScanCncn = (TScanCncn*)hScanCncn;
-
-    TRACE0(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_SwitchToIBSS: Switching to IBSS state.\n");
-
-    /* change connection status to connected */
-    pScanCncn->eConnectionStatus = STA_IBSS;
-
-    /* Any running scans in other modes will be aborted (if needed) by the SCR (or have already been) */
-}
-
-EScanCncnResultStatus scanCncn_Start1ShotScan (TI_HANDLE hScanCncn, 
-                                          EScanCncnClient eClient,
-                                          TScanParams* pScanParams)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-    paramInfo_t         *pParam;
-
-    TRACE1(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_Start1ShotScan: Received scan request from client %d\n", eClient);
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pScanCncn->hOS, sizeof(paramInfo_t));
-    if (!pParam) {
-        return SCAN_CRS_SCAN_FAILED;
-    }
-
-    /* copy scan parameters to local buffer */
-    os_memoryCopy (pScanCncn->hOS, &(pScanCncn->pScanClients[ eClient ]->uScanParams.tOneShotScanParams), 
-                   pScanParams, sizeof(TScanParams));
-
-    /* 
-     * roaming scans (continuous and immediate) require to set the current SSID, to keep the scan manager
-     * unaware of it, unless the SSID is broadcast (to allow customers to request broadcast scan)
-     */
-    if ((SCAN_SCC_ROAMING_CONT == eClient) || (SCAN_SCC_ROAMING_IMMED == eClient))
-    {
-        if (0 != pScanParams->desiredSsid.len)
-        {
-            /* set the SSID of the current AP */
-            pParam->paramType = SME_DESIRED_SSID_ACT_PARAM;
-            sme_GetParam (pScanCncn->hSme, pParam);
-            os_memoryCopy (pScanCncn->hOS, 
-                           &(pScanCncn->pScanClients[ eClient ]->uScanParams.tOneShotScanParams.desiredSsid),
-                           &(pParam->content.smeDesiredSSID),
-                           sizeof(TSsid));
-        }
-    }
-    os_memoryFree(pScanCncn->hOS, pParam, sizeof(paramInfo_t));
-
-    /* ask the reg domain which channels are allowed for the requested scan type */
-    scanCncn_VerifyChannelsWithRegDomain (hScanCncn, &(pScanCncn->pScanClients[ eClient ]->uScanParams), TI_FALSE);
-
-    /* if no channels are available for scan, return negative result */
-    if (0 == pScanCncn->pScanClients[ eClient ]->uScanParams.tOneShotScanParams.numOfChannels)
-    {
-        TRACE0(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncn_Start1ShotScan: no cahnnels to scan after reg. domain verification, can't scan\n");
-        return SCAN_CRS_SCAN_FAILED;
-    }
-
-    /* Mix the channel order in the 1 Shot Scan channel array */
-    scanCncn_Mix1ShotScanChannels (pScanCncn->pScanClients[ eClient ]->uScanParams.tOneShotScanParams.channelEntry, 
-                                   pScanCncn->pScanClients[ eClient ]->uScanParams.tOneShotScanParams.numOfChannels);
-
-    if (TI_TRUE == pScanCncn->bUseSGParams)
-    {
-        scanCncn_SGupdateScanParams (hScanCncn, &(pScanCncn->pScanClients[ eClient ]->uScanParams), TI_FALSE);
-    }
-    
-    /* mark that a scan request is in progress (to avoid client re-entrance if the scan fail) */
-    pScanCncn->pScanClients[ eClient ]->bInRequest = TI_TRUE;
-
-    /* mark the scan result as TI_OK (until other status will replace it) */
-    pScanCncn->pScanClients[ eClient ]->eScanResult = SCAN_CRS_SCAN_COMPLETE_OK;
-
-    /* send a start scan event to the SM */
-    genSM_Event (pScanCncn->pScanClients[ eClient ]->hGenSM, SCAN_CNCN_SM_EVENT_START, 
-                 (TI_HANDLE)pScanCncn->pScanClients[ eClient ]);
-
-    /* mark that the scan request is no longer in progress */
-    pScanCncn->pScanClients[ eClient ]->bInRequest = TI_FALSE;
-
-    /* 
-     * return scan result - if an error occured return the error, otherwise return running
-     * (complete_ok is set to be returned when scan is complete)
-     */
-    if (SCAN_CRS_SCAN_COMPLETE_OK != pScanCncn->pScanClients[ eClient ]->eScanResult)
-    {
-        return pScanCncn->pScanClients[ eClient ]->eScanResult;
-    }
-    return SCAN_CRS_SCAN_RUNNING;
-}
-
-void scanCncn_StopScan (TI_HANDLE hScanCncn, EScanCncnClient eClient)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-
-    TRACE1( pScanCncn->hReport, REPORT_SEVERITY_INFORMATION, "scanCncn_StopScan: Received stop scan request from client %d\n", eClient);
-
-    /* 
-     * mark that null data should be sent (different from abort, where null dats is not sent
-     * to reduce abort time)
-     */
-    pScanCncn->pScanClients[ eClient ]->bSendNullDataOnStop = TI_TRUE;
-
-    /* if no previous error has occurred, change the state to stopped */
-    if (SCAN_CRS_SCAN_COMPLETE_OK == pScanCncn->pScanClients[ eClient ]->eScanResult)
-    {
-        pScanCncn->pScanClients[ eClient ]->eScanResult = SCAN_CRS_SCAN_STOPPED;
-    }
-
-    /* send a stop scan event to the SM */
-    genSM_Event (pScanCncn->pScanClients[ eClient ]->hGenSM, SCAN_CNCN_SM_EVENT_STOP, 
-                 (TI_HANDLE)pScanCncn->pScanClients[ eClient ]);
-}
-
-/** 
- * \fn     scanCncn_StartPeriodicScan
- * \brief  Starts a periodic scan operation
- * 
- * Starts a periodic scan operation:
- *  - copies scan params to scan concentrator object
- *  - verifies the requested channels with the reg doamin
- *  - if needed, adjust to SG compensation values
- *  - send an event to the client SM
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  eClient - the client requesting the scan operation
- * \param  pScanParams - scan parameters
- * \return Scan opeartion status
- * \retval SCAN_CRS_SCAN_RUNNING - scan started successfully and is now running
- * \retval SCAN_CRS_SCAN_FAILED - scan failed to start due to an unexpected error
- * \sa     scanCncn_StopPeriodicScan
- */
-EScanCncnResultStatus scanCncn_StartPeriodicScan (TI_HANDLE hScanCncn,
-                                                  EScanCncnClient eClient,
-                                                  TPeriodicScanParams *pScanParams)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-
-    TRACE1(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_startPeriodicScan: Received scan request from client %d\n", eClient);
-
-    /* copy scan parameters to local buffer */
-    os_memoryCopy (pScanCncn->hOS, &(pScanCncn->pScanClients[ eClient ]->uScanParams.tPeriodicScanParams), 
-                   pScanParams, sizeof(TPeriodicScanParams));
-
-    /* ask the reg domain which channels are allowed for the requested scan type */
-    scanCncn_VerifyChannelsWithRegDomain (hScanCncn, &(pScanCncn->pScanClients[ eClient ]->uScanParams), TI_TRUE);
-
-    /* if no channels are available for scan, return negative result */
-    if (0 == pScanCncn->pScanClients[ eClient ]->uScanParams.tPeriodicScanParams.uChannelNum)
-    {
-        TRACE0(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncn_StartPeriodicScan: no cahnnels to scan after reg. domain verification, can't scan\n");
-        return SCAN_CRS_SCAN_FAILED;
-    }
-
-    /* Mix the channel order in the Periodic Scan channel array */
-    scanCncn_MixPeriodicScanChannels (pScanCncn->pScanClients[ eClient ]->uScanParams.tPeriodicScanParams.tChannels, 
-                                      pScanCncn->pScanClients[ eClient ]->uScanParams.tPeriodicScanParams.uChannelNum);
-
-    if (TI_TRUE == pScanCncn->bUseSGParams)
-    {
-        scanCncn_SGupdateScanParams (hScanCncn, &(pScanCncn->pScanClients[ eClient ]->uScanParams), TI_TRUE);
-    }
-    
-    /* mark that a scan request is in progress (to avoid client re-entrance if the scan fail) */
-    pScanCncn->pScanClients[ eClient ]->bInRequest = TI_TRUE;
-
-    /* mark the scan result as TI_OK (until other status will replace it) */
-    pScanCncn->pScanClients[ eClient ]->eScanResult = SCAN_CRS_SCAN_COMPLETE_OK;
-
-    /* send a start scan event to the SM */
-    genSM_Event (pScanCncn->pScanClients[ eClient ]->hGenSM, SCAN_CNCN_SM_EVENT_START, 
-                 (TI_HANDLE)pScanCncn->pScanClients[ eClient ]);
-
-    /* mark that the scan request is no longer in progress */
-    pScanCncn->pScanClients[ eClient ]->bInRequest = TI_FALSE;
-
-    /* 
-     * return scan result - if an error occured return the error, otherwise return running
-     * (complete_ok is set to be returned when scan is complete)
-     */
-    if (SCAN_CRS_SCAN_COMPLETE_OK != pScanCncn->pScanClients[ eClient ]->eScanResult)
-    {
-        return pScanCncn->pScanClients[ eClient ]->eScanResult;
-    }
-    return SCAN_CRS_SCAN_RUNNING;
-}
-
-/** 
- * \fn     scanCncn_StopPeriodicScan 
- * \brief  Stop an on-going periodic scan operation
- * 
- * Set necessary flags and send a stop scan event to the client SM 
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  eClient - the client requesting to stop the scan operation
- * \return None 
- * \sa     scanCncn_StartPeriodicScan
- */ 
-void scanCncn_StopPeriodicScan (TI_HANDLE hScanCncn, EScanCncnClient eClient)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-
-    TRACE1( pScanCncn->hReport, REPORT_SEVERITY_INFORMATION, "scanCncn_StopPeriodicScan: Received stop scan request from client %d\n", eClient);
-
-    /* if no previous error has occurred, change the state to stopped */
-    if (SCAN_CRS_SCAN_COMPLETE_OK == pScanCncn->pScanClients[ eClient ]->eScanResult)
-    {
-        pScanCncn->pScanClients[ eClient ]->eScanResult = SCAN_CRS_SCAN_STOPPED;
-    }
-
-    /* send a stop scan event to the SM */
-    genSM_Event (pScanCncn->pScanClients[ eClient ]->hGenSM, SCAN_CNCN_SM_EVENT_STOP, 
-                 (TI_HANDLE)pScanCncn->pScanClients[ eClient ]);
-}
-
-void scanCncn_RegisterScanResultCB (TI_HANDLE hScanCncn, EScanCncnClient eClient,
-                                    TScanResultCB scanResultCBFunc, TI_HANDLE scanResultCBObj)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-
-    /* save the function and object pointers */
-    pScanCncn->pScanClients[ eClient ]->tScanResultCB = scanResultCBFunc;
-    pScanCncn->pScanClients[ eClient ]->hScanResultCBObj = scanResultCBObj;
-}
-
-/**
- * \fn     scanCncn_ScanCompleteNotificationCB
- * \brief  Called when a scan is complete
- * 
- * Update scan status and send a complete event to the SM
- * 
- * \note   Must wait for all results to be received before the scan is actually completed
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  eTag - the scan type tag
- * \param  uResoultCount - number of results received during this scan
- * \param  SPSStatus - which channels were attempted (if this is an SPS scan)
- * \param  bTSFError - whether a TSF error occurred (if this is an SPS scan)
- * \param  scanStatus - scan SRV status (OK / NOK)
- * \return None
- */ 
-void scanCncn_ScanCompleteNotificationCB (TI_HANDLE hScanCncn, EScanResultTag eTag,
-                                          TI_UINT32 uResultCount, TI_UINT16 SPSStatus,
-                                          TI_BOOL bTSFError, TI_STATUS scanStatus,
-                                          TI_STATUS PSMode)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-    EScanCncnClient     eClient;
-
-    TRACE6(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_ScanCompleteNotificationCB: tag: %d, result count: %d, SPS status: %d, TSF Error: %d, scan status: %d, PS mode: %d\n", eTag, uResultCount, SPSStatus, bTSFError, scanStatus, PSMode);
-
-    /* get the scan client value from the scan tag */
-    eClient = SCAN_CLIENT_FROM_TAG (eTag);
-
-    /* update scan result if scan SRV reported error (and no error occured so far) */
-    if ((TI_OK != scanStatus) && (SCAN_CRS_SCAN_COMPLETE_OK == pScanCncn->pScanClients[ eClient ]->eScanResult))
-    {
-        pScanCncn->pScanClients[ eClient ]->eScanResult = SCAN_CRS_SCAN_FAILED;
-    }
-
-    /* for SPS: copy SPS result and update scan status according to TSF error */
-    if (SCAN_TYPE_SPS == pScanCncn->pScanClients[ eClient ]->uScanParams.tOneShotScanParams.scanType)
-    {
-        pScanCncn->pScanClients[ eClient ]->uSPSScanResult = SPSStatus;
-        if (TI_TRUE == bTSFError)
-        {
-            pScanCncn->pScanClients[ eClient ]->eScanResult = SCAN_CRS_TSF_ERROR;
-        }
-    }
-
-    /* update number of frames expected */
-    pScanCncn->pScanClients[ eClient ]->uResultExpectedNumber += uResultCount;
-
-    /* check if all frames had been received */
-    if (pScanCncn->pScanClients[ eClient ]->uResultCounter >= pScanCncn->pScanClients[ eClient ]->uResultExpectedNumber)
-    {
-        TRACE2(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_ScanCompleteNotificationCB: client %d received %d results, matching scan complete FW indication, sending scan complete event\n", eClient, pScanCncn->pScanClients[ eClient ]->uResultCounter);
-
-        /* all frames had been received, send a scan complete event to the client SM */
-        genSM_Event (pScanCncn->pScanClients[ eClient ]->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ eClient ]);
-    }
-    else
-    {
-        TRACE3(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_ScanCompleteNotificationCB: client %d received %d results, FW indicated %d results, waiting for more\n", eClient, pScanCncn->pScanClients[ eClient ]->uResultCounter, pScanCncn->pScanClients[ eClient ]->uResultExpectedNumber);
-
-        /* still waiting for some frames, turn on the scan complete pending flag */
-        pScanCncn->pScanClients[ eClient ]->bScanCompletePending = TI_TRUE;
-    }
-}
-
-/** 
- * \fn     scanCncn_PeriodicScanReportCB
- * \brief  Called when results are available but periodic scan is not yet complete
- * 
- * Called when results are available but periodic scan is not yet complete
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  str - event data
- * \param  strLen - data length
- * \return None
- * \sa     scanCncn_PeriodicScanCompleteCB
- */ 
-void scanCncn_PeriodicScanReportCB (TI_HANDLE hScanCncn, char* str, TI_UINT32 strLen)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-    EScanCncnClient     eClient;
-    EScanResultTag      eTag = (EScanResultTag)str[ 1 ];
-    TI_UINT32           uResultCount = str[ 0 ];
-
-    TRACE2(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_PeriodicScanReportCB: tag: %d, result count: %d\n", eTag, uResultCount);
-
-    /* get the scan client value from the scan tag */
-    eClient = SCAN_CLIENT_FROM_TAG (eTag);
-
-    /* update number of frames expected */
-    pScanCncn->pScanClients[ eClient ]->uResultExpectedNumber += uResultCount;
-}
-/** 
- * \fn     scanCncn_PeriodicScanReportCB
- * \brief  Called when results are available but the scan is bot yet complete
- * 
- * Called when results are available but the scan is bot yet complete
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  str - event data
- * \param  strLen - data length
- * \return None
- * \sa     scanCncn_PeriodicScanReportCB
- */
-void scanCncn_PeriodicScanCompleteCB (TI_HANDLE hScanCncn, char* str, TI_UINT32 strLen)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-    EScanCncnClient     eClient;
-    EScanResultTag      eTag = (EScanResultTag)str[1];
-    TI_UINT32           uResultCount = (TI_UINT8)(str[0]);
-
-    TRACE2(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_PeriodicScanCompleteCB: tag: %d, result count: %d\n", eTag, uResultCount);
-
-    /* get the scan client value from the scan tag */
-    eClient = SCAN_CLIENT_FROM_TAG (eTag);
-
-    /* update number of frames expected */
-    pScanCncn->pScanClients[ eClient ]->uResultExpectedNumber += uResultCount;
-
-    /* check if all frames had been received */
-    if (pScanCncn->pScanClients[ eClient ]->uResultCounter >= pScanCncn->pScanClients[ eClient ]->uResultExpectedNumber)
-    {
-        TRACE2(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_PeriodicScanCompleteCB: client %d received %d results, matching scan complete FW indication, sending scan complete event\n", eClient, pScanCncn->pScanClients[ eClient ]->uResultCounter);
-        /* all frames had been received, send a scan complete event to the client SM */
-        genSM_Event (pScanCncn->pScanClients[ eClient ]->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ eClient ]);
-    }
-    else
-    {
-        TRACE3(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_PeriodicScanCompleteCB: client %d received %d results, FW indicated %d results, waiting for more\n", eClient, pScanCncn->pScanClients[ eClient ]->uResultCounter, pScanCncn->pScanClients[ eClient ]->uResultExpectedNumber);
-        /* still waiting for some frames, turn on the scan complete pending flag */
-        pScanCncn->pScanClients[ eClient ]->bScanCompletePending = TI_TRUE;
-    }
-}
-
-/** 
- * \fn     scanCncn_MlmeResultCB
- * \brief  Handles an MLME result (received frame)
- * 
- * Filters the frame for roaming scans and passes it to the appropriate client
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  bssid - a pointer to the address of the AP sending this frame
- * \param  frameInfo - the IE in the frame
- * \param  pRxAttr - a pointer to TNET RX attributes struct
- * \param  buffer - a pointer to the frame body
- * \param  bufferLength - the frame body length
- * \return None
- */ 
-void scanCncn_MlmeResultCB (TI_HANDLE hScanCncn, TMacAddr* bssid, mlmeFrameInfo_t* frameInfo, 
-                            TRxAttr* pRxAttr, TI_UINT8* buffer, TI_UINT16 bufferLength)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-    EScanCncnClient     eClient;
-    TScanFrameInfo      tScanFrameInfo;
-    TI_BOOL             bValidResult = TI_TRUE;
-
-    /* get the scan client value from the scan tag */
-    eClient = SCAN_CLIENT_FROM_TAG (pRxAttr->eScanTag);
-
-    /* increase scan result counter */
-    pScanCncn->pScanClients[ eClient ]->uResultCounter++;
-
-    /* 
-     * erroneous results are signaled by NULL pointers and are notified to the scan concentrator to 
-     * update the counter only! 
-     */
-    if (NULL == bssid)
-    {
-        TRACE0(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_MlmeResultCB: received an empty frame notification from MLME\n");
-
-        /* invalid resuilt */
-        bValidResult = TI_FALSE;
-    }
-    /* are results valid so far (TI_TRUE == bValidResult) */
-    else
-    {
-        TRACE6(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_MlmeResultCB: received frame from BBSID: %02x:%02x:%02x:%02x:%02x:%02x\n", (*bssid)[ 0 ], (*bssid)[ 1 ], (*bssid)[ 2 ], (*bssid)[ 3 ], (*bssid)[ 4 ], (*bssid)[ 5 ]);
-
-        /* If SSID IE is missing, discard the frame */
-        if (frameInfo->content.iePacket.pSsid == NULL)
-        {
-            TRACE6(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_MlmeResultCB: discarding frame from BSSID: %02x:%02x:%02x:%02x:%02x:%02x, because SSID IE is missing!!\n", (*bssid)[ 0 ], (*bssid)[ 1 ], (*bssid)[ 2 ], (*bssid)[ 3 ], (*bssid)[ 4 ], (*bssid)[ 5 ]);
-            bValidResult = TI_FALSE;
-        }
-
-        /* If SSID length is 0 (hidden SSID) */
-        else if (frameInfo->content.iePacket.pSsid->hdr[1] == 0)
-        {
-			/* Discard the frame unless it is application scan for any SSID - In this case we want to see also the hidden SSIDs*/
-            if  (!(((SCAN_SCC_APP_ONE_SHOT == eClient) || (SCAN_SCC_APP_PERIODIC == eClient)) &&
-				    pScanCncn->pScanClients[ eClient ]->uScanParams.tOneShotScanParams.desiredSsid.len == 0))
-			{
-				TRACE6(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_MlmeResultCB: discarding frame from BSSID: %02x:%02x:%02x:%02x:%02x:%02x, because SSID is hidden (len=0)\n", (*bssid)[ 0 ], (*bssid)[ 1 ], (*bssid)[ 2 ], (*bssid)[ 3 ], (*bssid)[ 4 ], (*bssid)[ 5 ]);
-				bValidResult = TI_FALSE;
-			}
-        }
-
-       /* 
-        * for roaming continuous and immediate, discard frames from current AP, 
-        * or frames with SSID different than desired when the scan is NOT SPS
-        */
-        else if ((SCAN_SCC_ROAMING_CONT == eClient) || (SCAN_SCC_ROAMING_IMMED == eClient))
-        {
-            bssEntry_t *pCurrentAP;
-
-            pCurrentAP = apConn_getBSSParams(pScanCncn->hAPConn);
-            if(MAC_EQUAL(*bssid, pCurrentAP->BSSID) ||
-               ((os_memoryCompare (pScanCncn->hOS,
-                                   (TI_UINT8*)frameInfo->content.iePacket.pSsid->serviceSetId, 
-                                   (TI_UINT8*)pScanCncn->pScanClients[ eClient ]->uScanParams.tOneShotScanParams.desiredSsid.str, 
-                                   pScanCncn->pScanClients[ eClient ]->uScanParams.tOneShotScanParams.desiredSsid.len)) &&
-                pScanCncn->pScanClients[ eClient ]->uScanParams.tOneShotScanParams.scanType != SCAN_TYPE_SPS))
-            {
-                TRACE6(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_MlmeResultCB: discarding frame from SSID: , BSSID: %02x:%02x:%02x:%02x:%02x:%02x, because SSID different from desired or from current AP!\n", (*bssid)[ 0 ], (*bssid)[ 1 ], (*bssid)[ 2 ], (*bssid)[ 3 ], (*bssid)[ 4 ], (*bssid)[ 5 ]);
-                bValidResult = TI_FALSE;
-            }
-
-        }
-
-        /* if rssi is lower than the Rssi threshold, discard frame */
-        if ( pRxAttr->Rssi < pScanCncn->tInitParams.nRssiThreshold )
-        {
-            TRACE7(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_MlmeResultCB: discarding frame from BSSID: %02x:%02x:%02x:%02x:%02x:%02x, because RSSI = %d\n", (*bssid)[ 0 ], (*bssid)[ 1 ], (*bssid)[ 2 ], (*bssid)[ 3 ], (*bssid)[ 4 ], (*bssid)[ 5 ], pRxAttr->Rssi);
-            bValidResult = TI_FALSE;
-        }
-
-        if(TI_TRUE == bValidResult)
-        {
-            /* build the scan frame info object */
-            tScanFrameInfo.bssId = bssid;
-            tScanFrameInfo.band = (ERadioBand)pRxAttr->band;
-            tScanFrameInfo.channel = pRxAttr->channel;
-            tScanFrameInfo.parsedIEs = frameInfo;
-            tScanFrameInfo.rate = pRxAttr->Rate;
-            tScanFrameInfo.rssi = pRxAttr->Rssi;
-            tScanFrameInfo.snr = pRxAttr->SNR;
-            tScanFrameInfo.staTSF = pRxAttr->TimeStamp;
-            tScanFrameInfo.buffer = buffer;
-            tScanFrameInfo.bufferLength = bufferLength;
-
-            if (TI_TRUE == pScanCncn->tInitParams.bPushMode)
-            {
-               /* 
-                * The scan found result, send a scan report event to the use with the frame 	parameters without save the result in the scan table 
-                */
-                EvHandlerSendEvent (pScanCncn->hEvHandler, IPC_EVENT_SCAN_REPORT, (TI_UINT8*)&tScanFrameInfo, sizeof(TScanFrameInfo));
-            }
-            else
-            {
-               /* call the client result CB */
-               pScanCncn->pScanClients[ eClient ]->tScanResultCB (pScanCncn->pScanClients[ eClient ]->hScanResultCBObj,
-                                                                  SCAN_CRS_RECEIVED_FRAME, &tScanFrameInfo, 0xffff ); /* SPS status is only valid on SPS scan complete */
-            }
-        }
-    }
-
-    /* check if scan complete is pending for this frame for all results */
-    if((TI_TRUE == pScanCncn->pScanClients[ eClient ]->bScanCompletePending) &&
-       (pScanCncn->pScanClients[ eClient ]->uResultCounter == pScanCncn->pScanClients[ eClient ]->uResultExpectedNumber))
-    {
-        TRACE1(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_MlmeResultCB: received frame number %d, scan complete pending, sending scan complet event\n", pScanCncn->pScanClients[ eClient ]->uResultCounter);
-
-        /* send a scan complete event to the client SM */
-        genSM_Event (pScanCncn->pScanClients[ eClient ]->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ eClient ]);
-    }
-}
-
-/** 
- * \fn     scanCncn_ScrRoamingImmedCB
- * \brief  Called by SCR for immediate roaming client status change notification
- * 
- * Handles status change by sending the appropriate SM event
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  eRrequestStatus - the immediate scan for roaming client status
- * \param  eResource - the resource for which the CB is issued
- * \param  ePendreason - The reason for pend status, if the status is pend
- * \return None
- */ 
-void scanCncn_ScrRoamingImmedCB (TI_HANDLE hScanCncn, EScrClientRequestStatus eRequestStatus,
-                                 EScrResourceId eResource, EScePendReason ePendReason)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-
-    TRACE3(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_ScrRoamingImmedCB: status: %d, resource: %d pend reason: %d\n", eRequestStatus, eResource, ePendReason);
-
-    /* act according to the request staus */
-    switch (eRequestStatus)
-    {
-    case SCR_CRS_RUN:
-        /* send an SCR run event to the SM */
-        genSM_Event (pScanCncn->pScanClients[ SCAN_SCC_ROAMING_IMMED ]->hGenSM, SCAN_CNCN_SM_EVENT_RUN, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ SCAN_SCC_ROAMING_IMMED ]);
-        break;
-
-    case SCR_CRS_PEND:
-        /* if pending reason has changed to different group - send a reject event 
-           (should only happen when pending) */
-        if ( SCR_PR_DIFFERENT_GROUP_RUNNING == ePendReason )
-        {
-            /* send an SCR reject event to the SM - would not scan when not performing roaming */
-            pScanCncn->pScanClients[ SCAN_SCC_ROAMING_IMMED ]->eScanResult = SCAN_CRS_SCAN_FAILED;
-            genSM_Event (pScanCncn->pScanClients[ SCAN_SCC_ROAMING_IMMED ]->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, 
-                         (TI_HANDLE)pScanCncn->pScanClients[ SCAN_SCC_ROAMING_IMMED ]);
-        }
-        break;
-
-    case SCR_CRS_FW_RESET:
-        /* if no previous error has occurred, change the state to FW reset */
-        if (SCAN_CRS_SCAN_COMPLETE_OK == pScanCncn->pScanClients[ SCAN_SCC_ROAMING_IMMED ]->eScanResult)
-        {
-            pScanCncn->pScanClients[ SCAN_SCC_ROAMING_IMMED ]->eScanResult = SCAN_CRS_SCAN_ABORTED_FW_RESET;
-        }
-
-        /* send a recovery event to the SM */
-        genSM_Event (pScanCncn->pScanClients[ SCAN_SCC_ROAMING_IMMED ]->hGenSM, SCAN_CNCN_SM_EVENT_RECOVERY, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ SCAN_SCC_ROAMING_IMMED ]);
-        break;
-
-    case SCR_CRS_ABORT:
-        /* This should never happen, report error */
-    default:
-        TRACE1(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncn_ScrRoamingImmedCB: Illegal SCR request status: %d.\n", eRequestStatus);
-        break;
-    }
-}
-
-/** 
- * \fn     scanCncn_ScrRoamingContCB
- * \brief  Called by SCR for continuous roaming client status change notification
- * 
- * Handles status change by sending the appropriate SM event
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  eRrequestStatus - the continuous scan for roaming client status
- * \param  eResource - the resource for which the CB is issued
- * \param  ePendreason - The reason for pend status, if the status is pend
- * \return None
- */ 
-void scanCncn_ScrRoamingContCB (TI_HANDLE hScanCncn, EScrClientRequestStatus eRequestStatus,
-                                EScrResourceId eResource, EScePendReason ePendReason)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-
-    TRACE3(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_ScrRoamingContCB: status: %d, resource: %d pend reason: %d\n", eRequestStatus, eResource, ePendReason);
-
-    /* act according to the request staus */
-    switch (eRequestStatus)
-    {
-    case SCR_CRS_RUN:
-        /* send an SCR run event to the SM */
-        genSM_Event (pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]->hGenSM, SCAN_CNCN_SM_EVENT_RUN, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]);
-        break;
-
-    case SCR_CRS_PEND:
-        /* if pending reason has changed to different group - send a reject event (should only happen when pending) */
-        if ( SCR_PR_DIFFERENT_GROUP_RUNNING == ePendReason )
-        {
-            pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]->eScanResult = SCAN_CRS_SCAN_FAILED;
-            genSM_Event (pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, 
-                         (TI_HANDLE)pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]);
-        }
-        break;
-
-    case SCR_CRS_FW_RESET:
-        /* if no previous error has occurred, change the state to FW reset */
-        if (SCAN_CRS_SCAN_COMPLETE_OK == pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]->eScanResult)
-        {
-            pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]->eScanResult = SCAN_CRS_SCAN_ABORTED_FW_RESET;
-        }
-
-        /* send a recovery event to the SM */
-        genSM_Event (pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]->hGenSM, SCAN_CNCN_SM_EVENT_RECOVERY, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]);
-        break;
-
-
-    case SCR_CRS_ABORT:
-        /* mark not to send NULL data when scan is stopped */
-        pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]->bSendNullDataOnStop = TI_FALSE;
-
-        /* if no previous error has occurred, change the result to abort */
-        if (SCAN_CRS_SCAN_COMPLETE_OK == pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]->eScanResult)
-        {
-            pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]->eScanResult = SCAN_CRS_SCAN_ABORTED_HIGHER_PRIORITY;
-        }
-
-        /* send an abort scan event to the SM */
-        genSM_Event (pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]->hGenSM, SCAN_CNCN_SM_EVENT_ABORT, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ SCAN_SCC_ROAMING_CONT ]);
-        break;
-
-    default:
-        TRACE1(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncn_ScrRoamingContCB: Illegal SCR request status: %d.\n", eRequestStatus);
-        break;
-    }
-}
-
-/** 
- * \fn     scanCncn_ScrAppCB
- * \brief  Called by SCR for application scan client status change notification
- * 
- * Handles status change by sending the appropriate SM event
- * 
- * \note   this function is used by the SCR for both one-shot and periodic application scan
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  eRrequestStatus - the application scan client status
- * \param  eResource - the resource for which the CB is issued
- * \param  ePendreason - The reason for pend status, if the status is pend
- * \return None
- */ 
-void scanCncn_ScrAppCB (TI_HANDLE hScanCncn, EScrClientRequestStatus eRequestStatus,
-                        EScrResourceId eResource, EScePendReason ePendReason )
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-    EScanCncnClient     eClient;
-
-    TRACE3(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_ScrAppCB: status: %d, resource: %d pend reason: %d\n", eRequestStatus, eResource, ePendReason);
-
-    /* set client according to SCr resource */
-    if (SCR_RESOURCE_PERIODIC_SCAN == eResource)
-    {
-        eClient = SCAN_SCC_APP_PERIODIC;
-    }
-    else
-    {
-        eClient = SCAN_SCC_APP_ONE_SHOT;
-    }
-
-    /* act according to the request staus */
-    switch (eRequestStatus)
-    {
-    /* 
-     * Note: pend is not handled because application scan cancel its scan request when it receives pend
-     * as the SCR request result, and thus it is assumed that the application scan request will never be
-     * pending
-     */
-    case SCR_CRS_RUN:
-        /* send an SCR run event to the SM */
-        genSM_Event (pScanCncn->pScanClients[ eClient ]->hGenSM, SCAN_CNCN_SM_EVENT_RUN, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ eClient ]);
-        break;
-
-    case SCR_CRS_FW_RESET:
-        /* if no previous error has occurred, change the state to FW reset */
-        if (SCAN_CRS_SCAN_COMPLETE_OK == pScanCncn->pScanClients[ eClient ]->eScanResult)
-        {
-            pScanCncn->pScanClients[ eClient ]->eScanResult = SCAN_CRS_SCAN_ABORTED_FW_RESET;
-        }
-
-        /* send a recovery event to the SM */
-        genSM_Event (pScanCncn->pScanClients[ eClient ]->hGenSM, SCAN_CNCN_SM_EVENT_RECOVERY, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ eClient ]);
-        break;
-
-    case SCR_CRS_ABORT:  
-        /* mark not to send NULL data when scan is stopped */
-        pScanCncn->pScanClients[ eClient ]->bSendNullDataOnStop = TI_FALSE;
-
-        /* if no previous error has occurred, change the result to abort */
-        if (SCAN_CRS_SCAN_COMPLETE_OK == pScanCncn->pScanClients[ eClient ]->eScanResult)
-        {
-            pScanCncn->pScanClients[ eClient ]->eScanResult = SCAN_CRS_SCAN_ABORTED_HIGHER_PRIORITY;
-        }
-
-        /* send an abort scan event to the SM */
-        genSM_Event (pScanCncn->pScanClients[ eClient ]->hGenSM, SCAN_CNCN_SM_EVENT_ABORT, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ eClient ]);
-        break;
-
-    default:
-        TRACE1(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncn_ScrAppCB: Illegal SCR request status: %d.\n", eRequestStatus);
-        break;
-    }
-}
-
-/** 
- * \fn     scanCncn_ScrDriverCB
- * \brief  Called by SCR for driver scan client status change notification
- * 
- * Handles status change by sending the appropriate SM event
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  eRrequestStatus - the driver scan client status
- * \param  eResource - the resource for which the CB is issued
- * \param  ePendreason - The reason for pend status, if the status is pend
- * \return None
- */ 
-void scanCncn_ScrDriverCB (TI_HANDLE hScanCncn, EScrClientRequestStatus eRequestStatus,
-                           EScrResourceId eResource, EScePendReason ePendReason)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-
-    TRACE3(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_ScrDriverCB: status: %d, resource: %d pend reason: %d\n", eRequestStatus, eResource, ePendReason);
-
-    /* act according to the request staus */
-    switch (eRequestStatus)
-    {
-    case SCR_CRS_RUN:
-        /* send the next event to the SM */
-        genSM_Event (pScanCncn->pScanClients[ SCAN_SCC_DRIVER ]->hGenSM, SCAN_CNCN_SM_EVENT_RUN, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ SCAN_SCC_DRIVER ]);
-        break;
-
-    case SCR_CRS_PEND:
-        /* if pending reason has changed to different group - send a reject event (should only happen when pending) */
-        if ( SCR_PR_DIFFERENT_GROUP_RUNNING == ePendReason )
-        {
-            pScanCncn->pScanClients[ SCAN_SCC_DRIVER ]->eScanResult = SCAN_CRS_SCAN_FAILED;
-            genSM_Event (pScanCncn->pScanClients[ SCAN_SCC_DRIVER ]->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, 
-                         (TI_HANDLE)pScanCncn->pScanClients[ SCAN_SCC_DRIVER ]);
-        }
-        break;
-
-    case SCR_CRS_FW_RESET:
-        /* if no previous error has occurred, change the state to FW reset */
-        if (SCAN_CRS_SCAN_COMPLETE_OK == pScanCncn->pScanClients[ SCAN_SCC_DRIVER ]->eScanResult)
-        {
-            pScanCncn->pScanClients[ SCAN_SCC_DRIVER ]->eScanResult = SCAN_CRS_SCAN_ABORTED_FW_RESET;
-        }
-
-        /* send a recovery event to the SM */
-        genSM_Event (pScanCncn->pScanClients[ SCAN_SCC_DRIVER ]->hGenSM, SCAN_CNCN_SM_EVENT_RECOVERY, 
-                     (TI_HANDLE)pScanCncn->pScanClients[ SCAN_SCC_DRIVER ]);
-        break;
-    
-    case SCR_CRS_ABORT:
-    /* This should never happen, report error */
-    default:
-        TRACE1(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncn_ScrDriverCB: Illegal SCR request status: %d.\n", eRequestStatus);
-        break;
-    }
-}
-
-/** 
- * \fn     scanCncn_VerifyChannelsWithRegDomain
- * \brief  Verifies channel validity and TX power with the reg. domain
- * 
- * Verifies channel validity and TX power with the reg. domain. Removes invalid channels.
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  puScanParams - a pointer to the scan parmeters union
- * \param  bPeriodicScan - TRUE if the parameters are for periodic scan, FALSE if for one-shot scan
- * \return None
- */ 
-void scanCncn_VerifyChannelsWithRegDomain (TI_HANDLE hScanCncn, UScanParams *puScanParams, TI_BOOL bPeriodicScan)
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-    paramInfo_t         *pParam;
-    paramInfo_t         tDfsParam;
-    TI_UINT8            i, uChannelNum;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pScanCncn->hOS, sizeof(paramInfo_t));
-    if (!pParam) {
-        return;
-    }
-
-    /* get channel number according to scan type */
-    if (TI_TRUE == bPeriodicScan)
-    {
-        uChannelNum = puScanParams->tPeriodicScanParams.uChannelNum;
-    }
-    else
-    {
-        uChannelNum = puScanParams->tOneShotScanParams.numOfChannels;
-    }
-
-        /* check channels */
-    for (i = 0; i < uChannelNum; )
-        { /* Note that i is only increased when channel is valid - if channel is invalid, another 
-             channel is copied in its place, and thus the same index should be checked again. However,
-             since the number of channels is decreased, the loop end condition is getting nearer! */
-        pParam->paramType = REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES;
-        if (TI_TRUE == bPeriodicScan)
-        {
-            /* set band and scan type for periodic scan */
-            pParam->content.channelCapabilityReq.band = puScanParams->tPeriodicScanParams.tChannels[ i ].eBand;
-            if (puScanParams->tPeriodicScanParams.tChannels[ i ].eScanType == SCAN_TYPE_NORMAL_PASSIVE)
-            {
-                pParam->content.channelCapabilityReq.scanOption = PASSIVE_SCANNING;
-            }
-            else
-            {
-                /* query the reg. domain whether this is a DFS channel */
-                tDfsParam.paramType = REGULATORY_DOMAIN_IS_DFS_CHANNEL;
-                tDfsParam.content.tDfsChannel.eBand = puScanParams->tPeriodicScanParams.tChannels[ i ].eBand;
-                tDfsParam.content.tDfsChannel.uChannel = puScanParams->tPeriodicScanParams.tChannels[ i ].uChannel;
-                regulatoryDomain_getParam (pScanCncn->hRegulatoryDomain, &tDfsParam);
-
-                /* if this is a DFS channel */
-                if (TI_TRUE == tDfsParam.content.tDfsChannel.bDfsChannel)
-                {
-                    /* 
-                     * DFS channels are first scanned passive and than active, so reg. domain can only validate
-                     * these channels for pasiive scanning at the moment
-                     */
-                    pParam->content.channelCapabilityReq.scanOption = PASSIVE_SCANNING;
-
-                    /* set the channel scan type to DFS */
-                    puScanParams->tPeriodicScanParams.tChannels[ i ].eScanType = SCAN_TYPE_PACTSIVE;
-                    /* passive scan time is passed for all channels to the TWD, and copied there to the FW */
-                }
-                else
-                {
-                    pParam->content.channelCapabilityReq.scanOption = ACTIVE_SCANNING;
-                }
-            }
-
-            /* set channel for periodic scan */
-            pParam->content.channelCapabilityReq.channelNum =
-                puScanParams->tPeriodicScanParams.tChannels[ i ].uChannel;
-            regulatoryDomain_getParam (pScanCncn->hRegulatoryDomain, pParam);
-            if (TI_FALSE == pParam->content.channelCapabilityRet.channelValidity)
-            {   /* channel not allowed - copy the rest of the channel in its place */
-                os_memoryCopy (pScanCncn->hOS, &(puScanParams->tPeriodicScanParams.tChannels[ i ]),
-                               &(puScanParams->tPeriodicScanParams.tChannels[ i + 1 ]),
-                               sizeof(TPeriodicChannelEntry) * (puScanParams->tPeriodicScanParams.uChannelNum - i - 1));
-                puScanParams->tPeriodicScanParams.uChannelNum--;
-                uChannelNum--;
-            }
-            else
-            {
-                /* also set the power level to the minimumm between requested power and allowed power */
-                puScanParams->tPeriodicScanParams.tChannels[ i ].uTxPowerLevelDbm = 
-                        TI_MIN( pParam->content.channelCapabilityRet.maxTxPowerDbm, 
-                                puScanParams->tPeriodicScanParams.tChannels[ i ].uTxPowerLevelDbm ); 
-
-                i += 1;
-            }
-        }
-        else
-        {
-            /* set band and scan type for one-shot scan */
-            pParam->content.channelCapabilityReq.band = puScanParams->tOneShotScanParams.band;
-            if ((puScanParams->tOneShotScanParams.scanType == SCAN_TYPE_NORMAL_PASSIVE) ||
-                (puScanParams->tOneShotScanParams.scanType == SCAN_TYPE_TRIGGERED_PASSIVE) ||
-                (puScanParams->tOneShotScanParams.scanType == SCAN_TYPE_SPS))
-            {
-                pParam->content.channelCapabilityReq.scanOption = PASSIVE_SCANNING;
-            }
-            else
-            {
-                pParam->content.channelCapabilityReq.scanOption = ACTIVE_SCANNING;
-            }
-        
-            /* set channel for one-shot scan - SPS */
-            if (SCAN_TYPE_SPS == puScanParams->tOneShotScanParams.scanType)
-            {
-                pParam->content.channelCapabilityReq.channelNum = 
-                    puScanParams->tOneShotScanParams.channelEntry[ i ].SPSChannelEntry.channel;
-                regulatoryDomain_getParam (pScanCncn->hRegulatoryDomain, pParam);
-                if (TI_FALSE == pParam->content.channelCapabilityRet.channelValidity)
-                {   /* channel not allowed - copy the rest of the channel in its place */
-                    os_memoryCopy (pScanCncn->hOS, &(puScanParams->tOneShotScanParams.channelEntry[ i ]),
-                                   &(puScanParams->tOneShotScanParams.channelEntry[ i + 1 ]), 
-                                   sizeof(TScanSpsChannelEntry) * (puScanParams->tOneShotScanParams.numOfChannels - i - 1));
-                    puScanParams->tOneShotScanParams.numOfChannels--;
-                    uChannelNum--;
-                }
-                else
-                {
-                    i += 1;
-                }
-                
-            }
-            /* set channel for one-shot scan - all other scan types */
-            else
-            {
-                pParam->content.channelCapabilityReq.channelNum = 
-                    puScanParams->tOneShotScanParams.channelEntry[ i ].normalChannelEntry.channel;
-                regulatoryDomain_getParam (pScanCncn->hRegulatoryDomain, pParam);
-                if (TI_FALSE == pParam->content.channelCapabilityRet.channelValidity)
-                {   /* channel not allowed - copy the rest of the channel in its place */
-                    os_memoryCopy (pScanCncn->hOS, &(puScanParams->tOneShotScanParams.channelEntry[ i ]),
-                                   &(puScanParams->tOneShotScanParams.channelEntry[ i + 1 ]), 
-                                   sizeof(TScanNormalChannelEntry) * (puScanParams->tOneShotScanParams.numOfChannels - i - 1));
-                    puScanParams->tOneShotScanParams.numOfChannels--;
-                    uChannelNum--;
-                }
-                else
-                {
-                    puScanParams->tOneShotScanParams.channelEntry[i].normalChannelEntry.txPowerDbm = 
-                            TI_MIN (pParam->content.channelCapabilityRet.maxTxPowerDbm, 
-                                    puScanParams->tOneShotScanParams.channelEntry[i].normalChannelEntry.txPowerDbm);
-                    i += 1;
-                }
-            }
-        }
-    }
-    os_memoryFree(pScanCncn->hOS, pParam, sizeof(paramInfo_t));
-}
-
-/** 
- * \fn     scanCncn_SGconfigureScanParams
- * \brief  Configures Bluetooth coexistence compensation paramters
- * 
- * Configures Bluetooth coexistence compensation paramters.
- * This function is called when SG is enabled or disabled from the SoftGemini module.
- *          The compensation is needed since BT Activity holds the antenna and over-ride Scan activity
- *
- * \param hScanCncn - handle to the scan concentrator object.\n
- * \param bUseSGParams - whether to use the new parameters (TI_TRUE when SG is enabled)
- * \param  probeReqPercent - increasing num probe requests in that percentage
- * \param SGcompensationMaxTime - max value from which we won't increase dwelling time
- * \param SGcompensationPercent - increasing dwell time in that percentage
- * \return None
- * \sa     scanCncn_SGupdateScanParams
- */ 
-void scanCncn_SGconfigureScanParams (TI_HANDLE hScanCncn, TI_BOOL bUseSGParams,
-                                     TI_UINT8 probeReqPercent, TI_UINT32 SGcompensationMaxTime, 
-                                             TI_UINT32 SGcompensationPercent) 
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-
-    pScanCncn->bUseSGParams             = bUseSGParams;
-    pScanCncn->uSGprobeRequestPercent   = probeReqPercent;
-    pScanCncn->uSGcompensationMaxTime   = SGcompensationMaxTime;
-    pScanCncn->uSGcompensationPercent   = SGcompensationPercent;
-
-    TRACE4(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_SGconfigureScanParams: bUseSGParams=%d, numOfProbeRequest=%d, compensationMaxTime=%d, SGcompensationPercent=%d\n", pScanCncn->bUseSGParams, pScanCncn->uSGprobeRequestPercent, pScanCncn->uSGcompensationMaxTime, pScanCncn->uSGcompensationPercent);
-}
-
-/** 
- * \fn     scanCncn_SGupdateScanParams
- * \brief  Updates dwell times and probe request number to compensate for bluetooth transmissions
- * 
- * Updates dwell times and probe request number to compensate for bluetooth transmissions
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  puScanParams - a pointer to the scan parmeters union
- * \param  bPeriodicScan - TRUE if the parameters are for periodic scan, FALSE if for one-shot scan
- * \return None
- * \sa     scanCncn_SGconfigureScanParams
- */ 
-void scanCncn_SGupdateScanParams (TI_HANDLE hScanCncn, UScanParams *puScanParams, TI_BOOL bPeriodicScan) 
-{
-    TScanCncn           *pScanCncn = (TScanCncn*)hScanCncn;
-    TI_UINT32           i, uTempTime;
-
-    /* one shot scan */
-    if (TI_FALSE == bPeriodicScan)
-    {
-        /* get a pointer to the one-shot scan params */
-        TScanParams *pScanParams = &(puScanParams->tOneShotScanParams);
-
-        /* for each channel increase the min and max dwell time */
-        for (i = 0; i < pScanParams->numOfChannels; i++)
-        {   
-            /* SPS scan */
-            if (SCAN_TYPE_SPS == pScanParams->scanType)
-            {
-                if (pScanCncn->uSGcompensationMaxTime >
-                    pScanParams->channelEntry[i].SPSChannelEntry.scanDuration)
-                {
-                    uTempTime = ((pScanParams->channelEntry[i].SPSChannelEntry.scanDuration) * 
-                        (100 + pScanCncn->uSGcompensationPercent)) / 100 ;
-
-                    if (uTempTime > pScanCncn->uSGcompensationMaxTime)
-                    {
-                        uTempTime = pScanCncn->uSGcompensationMaxTime;
-                    }
-                    pScanParams->channelEntry[i].SPSChannelEntry.scanDuration = uTempTime;
-                }
-            }
-            /* all other scan types */
-            else
-            {
-                if (pScanCncn->uSGcompensationMaxTime >
-            pScanParams->channelEntry[i].normalChannelEntry.minChannelDwellTime)
-                {
-                    uTempTime = ((pScanParams->channelEntry[i].normalChannelEntry.minChannelDwellTime) * 
-                        (100 + pScanCncn->uSGcompensationPercent)) / 100 ;
-
-                    if (uTempTime > pScanCncn->uSGcompensationMaxTime)
-                    {
-                        uTempTime = pScanCncn->uSGcompensationMaxTime;
-                    }
-                    pScanParams->channelEntry[i].normalChannelEntry.minChannelDwellTime = uTempTime;
-                }
-
-                if (pScanCncn->uSGcompensationMaxTime > 
-                pScanParams->channelEntry[i].normalChannelEntry.maxChannelDwellTime)
-                {
-                    uTempTime = ((pScanParams->channelEntry[i].normalChannelEntry.maxChannelDwellTime) * 
-                        (100 + pScanCncn->uSGcompensationPercent)) / 100 ;
-                    
-                    if (uTempTime > pScanCncn->uSGcompensationMaxTime)
-                    {
-                        uTempTime = pScanCncn->uSGcompensationMaxTime;
-                    }
-                    pScanParams->channelEntry[i].normalChannelEntry.maxChannelDwellTime = uTempTime;
-                }
-            }
-        }
-
-        /* update ProbeReqNumber by SG percantage */
-        if (pScanParams->probeReqNumber > 0)
-        {
-            pScanParams->probeReqNumber = ((pScanParams->probeReqNumber) * 
-                    (100 + pScanCncn->uSGprobeRequestPercent)) / 100 ;
-        }
-    }
-    /* periodic scan */
-    else
-    {
-        TPeriodicScanParams *pPeriodicScanParams = &(puScanParams->tPeriodicScanParams);
-
-        /* for each channel increase the min and max dwell time */
-        for (i = 0; i < pPeriodicScanParams->uChannelNum; i++)
-        {   
-            if (pScanCncn->uSGcompensationMaxTime >
-                pPeriodicScanParams->tChannels[ i ].uMinDwellTimeMs)
-            {
-                uTempTime = ((pPeriodicScanParams->tChannels[ i ].uMinDwellTimeMs) * 
-                    (100 + pScanCncn->uSGcompensationPercent)) / 100 ;
-
-                if (uTempTime > pScanCncn->uSGcompensationMaxTime)
-                {
-                    uTempTime = pScanCncn->uSGcompensationMaxTime;
-                }
-                pPeriodicScanParams->tChannels[ i ].uMinDwellTimeMs = uTempTime;
-            }
-
-            if (pScanCncn->uSGcompensationMaxTime >
-                pPeriodicScanParams->tChannels[ i ].uMaxDwellTimeMs)
-            {
-                uTempTime = ((pPeriodicScanParams->tChannels[ i ].uMaxDwellTimeMs) * 
-                    (100 + pScanCncn->uSGcompensationPercent)) / 100 ;
-
-                if (uTempTime > pScanCncn->uSGcompensationMaxTime)
-                {
-                    uTempTime = pScanCncn->uSGcompensationMaxTime;
-                }
-                pPeriodicScanParams->tChannels[ i ].uMaxDwellTimeMs = uTempTime;
-            }
-        }
-
-        /* update ProbeReqNumber by SG percantage */
-        if (pPeriodicScanParams->uProbeRequestNum > 0)
-        {
-            pPeriodicScanParams->uProbeRequestNum = ((pPeriodicScanParams->uProbeRequestNum) * 
-                    (100 + pScanCncn->uSGprobeRequestPercent)) / 100 ;
-        }
-    }
-}
-
-/** 
- * \fn     scanCncn_Mix1ShotScanChannels
- * \brief  Mix the channel order in a 1 Shot Scan channel array.
- * 
- * Mix the channel order in a 1 Shot Scan channel array.
- * 
- * \param  pChannelArray - where to store allowed channels information
- * \param  uValidChannelsCount - Number of allowed channels (that were placed in the given channels array)
- * \return None
- */ 
-static void scanCncn_Mix1ShotScanChannels (TScanChannelEntry *pChannelArray, TI_UINT32 uValidChannelsCount)
-{
-    TI_UINT32 i;
-    TScanChannelEntry tTempArray[MAX_CHANNEL_IN_BAND_2_4];   
-
-    if (uValidChannelsCount <= MIN_CHANNEL_IN_BAND_2_4)
-    {
-        return;
-    }
-
-    if (uValidChannelsCount > MAX_CHANNEL_IN_BAND_2_4)
-    {
-        uValidChannelsCount = MAX_CHANNEL_IN_BAND_2_4;
-    }
-
-    /*
-     * Create new Channels Array that will mix the channels
-     * something like: 1,8,2,9,3,10,4,11,5,12,6,13,7,14
-     * For odd number of channels, the last channel will be adjacent, but never mind...
-     */
-    for (i = 0 ; i < uValidChannelsCount - 1 ; i+=2)
-    {
-        tTempArray[i] = pChannelArray[i/2];
-        tTempArray[i+1] = pChannelArray[(uValidChannelsCount+i)/2];
-    }
-
-    /* if this is the last odd channel */
-    if ((i + 1)  == uValidChannelsCount)
-    {
-        tTempArray[i] = tTempArray[i - 1];
-        tTempArray[i - 1] = pChannelArray[uValidChannelsCount - 1];
-    }
-
-    /* Now copy to the real array */
-    for (i = 0 ; i < uValidChannelsCount; i++)
-    {
-        pChannelArray[i] = tTempArray[i];
-    }
-}
-
-
-/** 
- * \fn     scanCncn_MixPeriodicScanChannels
- * \brief  Mix the channel order in a Periodic Scan channel
- * array.
- * 
- * Mix the channel order in a Periodic Scan channel array.
- * 
- * \param  pChannelArray - where to store allowed channels information
- * \param  uValidChannelsCount - Number of allowed channels (that were placed in the given channels array)
- * \return None
- */ 
-static void scanCncn_MixPeriodicScanChannels (TPeriodicChannelEntry *pChannelArray, TI_UINT32 uValidChannelsCount)
-{
-    TI_UINT32 i;
-    TPeriodicChannelEntry tTempArray[MAX_CHANNEL_IN_BAND_2_4];  
-
-    if (uValidChannelsCount <= MIN_CHANNEL_IN_BAND_2_4)
-    {
-        return;
-    }
-
-    if (uValidChannelsCount > MAX_CHANNEL_IN_BAND_2_4)
-    {
-        uValidChannelsCount = MAX_CHANNEL_IN_BAND_2_4;
-    }
-
-    /*
-     * Create new Channels Array that will mix the channels
-     * something like: 1,8,2,9,3,10,4,11,5,12,6,13,7,14
-     * For odd number of channels, the last channel will be adjacent, but never mind...
-     */
-    for (i = 0 ; i < uValidChannelsCount - 1 ; i+=2)
-    {
-        tTempArray[i] = pChannelArray[i/2];
-        tTempArray[i+1] = pChannelArray[(uValidChannelsCount+i)/2];
-    }
-
-    /* if this is the last odd channel */
-    if ((i + 1)  == uValidChannelsCount)
-    {
-        tTempArray[i] = tTempArray[i - 1];
-        tTempArray[i - 1] = pChannelArray[uValidChannelsCount - 1];
-    }
-
-    /* Now copy to the real array */
-    for (i = 0 ; i < uValidChannelsCount; i++)
-    {
-        pChannelArray[i] = tTempArray[i];
-    }
-}
diff --git a/wl1271/stad/src/Sta_Management/ScanCncn.h b/wl1271/stad/src/Sta_Management/ScanCncn.h
deleted file mode 100644
index 1c1fe0c..0000000
--- a/wl1271/stad/src/Sta_Management/ScanCncn.h
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * ScanCncn.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  ScanCncn.h
- *  \brief Scan concentartor module API
- *
- *  \see   ScanCncn.c
- */
-
-#ifndef __SCANCNCN_H__
-#define __SCANCNCN_H__
-
-#include "osTIType.h"
-#include "TWDriver.h"
-#include "scrApi.h"
-#include "mlmeApi.h"
-
-#define SCAN_CNCN_APP_SCAN_TABLE_ENTRIES 64
-
-/** \enum EScanCncnClient
- * \brief	Scan Concentrator Client
- * 
- * \par Description
- * Enumerates the different possible clients requesting scan from the scan concentrator
- * 
- * \sa
- */
-typedef enum
-{
-/*	0	*/	SCAN_SCC_ROAMING_IMMED,     	/**< Indicates a scan from the immediate scan for a roaming client */
-/*	1	*/	SCAN_SCC_ROAMING_CONT,          /**< Indicates a scan from the continuous scan for a roaming client */
-/*	2	*/	SCAN_SCC_DRIVER,                /**< Indicates a scan from the driver client (SME scan) */
-/*	3	*/	SCAN_SCC_APP_PERIODIC,          /**< Indicates application (user) periodic scan */
-/*	4	*/	SCAN_SCC_APP_ONE_SHOT,          /**< Indicates application (user) one shot scan */
-/*	5	*/	SCAN_SCC_NUM_OF_CLIENTS,        /**< Number of scan clients (used internally) */
-/*	6	*/	SCAN_SCC_NO_CLIENT              /**< No valid scan clients (used internally) */
-
-} EScanCncnClient;
-
-/** \enum EScanCncnResultStatus
- * \brief	Scan Concentrator Result Status
- * 
- * \par Description
- * Enumerates the possible scan result statuses
- * 
- * \sa
- */
-typedef enum 
-{
-/*	0	*/	SCAN_CRS_RECEIVED_FRAME = 0,            /**< Scan is still running; management frame information is passed. */
-/*	1	*/	SCAN_CRS_SCAN_COMPLETE_OK,              /**< Scan completed successfully */
-/*	2	*/	SCAN_CRS_SCAN_RUNNING,                  /**< Scan started successfully and now is running */
-/*	3	*/	SCAN_CRS_SCAN_FAILED,                   /**< 
-													* scan failed due to unexpected situation (SCR reject, no 
-													* channels available, scan SRV returned TI_NOK, etc)
-													*/
-/*	4	*/	SCAN_CRS_SCAN_STOPPED,                  /**< scan stopped by user */
-/*	5	*/	SCAN_CRS_TSF_ERROR,                     /**< TSF error (AP recovery) occurred (for SPS only): 
-													* SPS was not performed because current TSF value is less than designated TSF value.
-													*/
-/*	6	*/	SCAN_CRS_SCAN_ABORTED_FW_RESET,         /**< scan aborted due to FW reset */
-/*	7	*/	SCAN_CRS_SCAN_ABORTED_HIGHER_PRIORITY,  /**< Scan was aborted because of a higher priority client request of the channel (switched channel) */
-/*	8	*/	SCAN_CRS_NUM_OF_RES_STATUS              /**< number of possible result status */
-
-} EScanCncnResultStatus;
-
-/** \struct TScanFrameInfo
- * \brief Scan Fram Information
- * 
- * \par Description
- * This structure contains a single frame information, returned by the result CB when a frame is available.
- * It is used to pass scan results (beacons and probe responses).
- * 
- * \sa
- */ 
-typedef struct
-{
-    TMacAddr*           bssId;              /* BSSID (MAC address) of the AP from which the frame was received */
-    mlmeFrameInfo_t*    parsedIEs;          /* Information elements in the frame, which is parsed */
-    ERadioBand          band;               /* Band on which the frame was received */
-    TI_UINT8            channel;            /* Channel on which the frame was received */
-    TI_UINT32           staTSF;             /* TSF of the station when the frame was received */
-    TI_INT8             rssi;               /* RSSI level at which frame was received */
-    TI_INT8             snr;                /* SNR level at which frame was received */
-    ERate               rate;               /* Bitrate at which frame was received */
-    TI_UINT8*           buffer;             /* Frame information elements, unparsed */
-    TI_UINT16           bufferLength;       /* Length of the frame unparsed information elements */
-} TScanFrameInfo;
-
- /** \typedef TScanResultCB
-  * \brief Defines the function prototype for the scan result callback
-  * (notification by the scan concentrator to a client of either a scan
-  * termination or a result frame received).
-  */
-/**
- * \brief	Scan Result CB  
- * 
- * \param  clientObj    				- TWD module object handle
- * \param  status 				- TID number
- * \param  frameInfo 				- Policy : Enable / Disable 
- * \param  SPSStatus 					- Mac address of: SA as receiver / RA as initiator
- * \return void
- * 
- * \par Description
- * Defines the function prototype for the scan result callback
- * (notification by the scan concentrator to a client of either a scan termination or a result frame received)
- * This CB is egistered by each client and invoked by the scan concentrator, passes scan results to the caller.
- * 
- * \sa
- */
-typedef void (*TScanResultCB) (TI_HANDLE clientObj, EScanCncnResultStatus status,
-                               TScanFrameInfo* frameInfo, TI_UINT16 SPSStatus);
-
-
-TI_HANDLE               scanCncn_Create (TI_HANDLE hOS);
-void                    scanCncn_Destroy (TI_HANDLE hScanCncn);
-void                    scanCncn_Init (TStadHandlesList *pStadHandles);
-void                    scanCncn_SetDefaults (TI_HANDLE hScanCncn, TScanCncnInitParams* pScanCncnInitParams);
-void                    scanCncn_SwitchToConnected (TI_HANDLE hScanCncn);
-void                    scanCncn_SwitchToNotConnected (TI_HANDLE hScanCncn);
-void                    scanCncn_SwitchToIBSS (TI_HANDLE hScanCncn);
-/**
- * \brief Starts a one-shot scan operation
- * 
- * \param  hScanCncn 	- Handle to the scan concentrator object
- * \param  eClient 		- The client requesting the scan operation
- * \param  pScanParams 	- Parameters for the requested scan
- * \return Scan Concentrator Result Status: 
- * SCAN_CRS_SCAN_RUNNING - scan started successfully and is now running
- * SCAN_CRS_SCAN_FAILED - scan failed to start due to an unexpected error
- *
- * \par Description
- * Starts a one-shot scan operation:
- *  - copies scan params to scan concentrator object
- *  - copies current SSID for roaming scans
- *  - verifies the requested channels with the reg doamin
- *  - if needed, adjust to SG compensation values
- *  - send an event to the client SM
- * 
- * \sa	scanCncn_StopScan
- */ 
-EScanCncnResultStatus   scanCncn_Start1ShotScan (TI_HANDLE hScanCncn, EScanCncnClient eClient, TScanParams* pScanParams);
-/**
- * \brief Stop an on-going one-shot scan operation
- * 
- * \param  hScanCncn 	- Handle to the scan concentrator object
- * \param  eClient 		- The client requesting to stop the scan operation
- * \return void
- * 
- * \par Description
- * Set necessary flags and send a stop scan event to the client SM
- * 
- * \sa	scanCncn_Start1ShotScan
- */ 
-void                    scanCncn_StopScan (TI_HANDLE hScanCncn, EScanCncnClient eClient);
-EScanCncnResultStatus   scanCncn_StartPeriodicScan (TI_HANDLE hScanCncn, EScanCncnClient eClient,
-                                                    TPeriodicScanParams *pScanParams);
-void                    scanCncn_StopPeriodicScan (TI_HANDLE hScanCncn, EScanCncnClient eClient);
-/**
- * \brief Registers a scan complete object
- * 
- * \param  hScanCncn 		- Handle to the scan concentrator object
- * \param  eClient 			- The client requesting to stop the scan operation
- * \param  scanResultCBFunc - Pointer to the resulting callback function
- * \param  scanResultCBObj 	- Object passed to the scan resulting callback function
- * \return void
- * 
- * \par Description
- * Registers a callback function for a client that is called for every scan result and scan complete event. 
- * It is called by each client one time before issuing a scan request.
- * 
- * \sa	
- */ 
-void                    scanCncn_RegisterScanResultCB (TI_HANDLE hScanCncn, EScanCncnClient eClient,
-                                                       TScanResultCB scanResultCBFunc, TI_HANDLE scanResultCBObj);
-void                    scanCncn_ScanCompleteNotificationCB (TI_HANDLE hScanCncn, EScanResultTag eTag,
-                                                             TI_UINT32 uResultCount, TI_UINT16 SPSStatus,
-                                                             TI_BOOL bTSFError, TI_STATUS scanStatus,
-                                                             TI_STATUS PSMode);
-void                    scanCncn_MlmeResultCB (TI_HANDLE hScanCncn, TMacAddr* bssid, mlmeFrameInfo_t* frameInfo, 
-                                               TRxAttr* pRxAttr, TI_UINT8* buffer, TI_UINT16 bufferLength);
-void                    scanCncn_ScrRoamingImmedCB (TI_HANDLE hScanCncn, EScrClientRequestStatus eRequestStatus,
-                                                    EScrResourceId eResource, EScePendReason ePendReason);
-void                    scanCncn_ScrRoamingContCB (TI_HANDLE hScanCncn, EScrClientRequestStatus eRequestStatus,
-                                                   EScrResourceId eResource, EScePendReason ePendReason);
-void                    scanCncn_ScrAppCB (TI_HANDLE hScanCncn, EScrClientRequestStatus eRequestStatus,
-                                           EScrResourceId eResource, EScePendReason ePendReason );
-void                    scanCncn_ScrDriverCB (TI_HANDLE hScanCncn, EScrClientRequestStatus eRequestStatus,
-                                              EScrResourceId eResource, EScePendReason ePendReason);
-void                    scanCncn_SGconfigureScanParams (TI_HANDLE hScanCncn, TI_BOOL bUseSGParams,
-                                                        TI_UINT8 probeReqPercent, TI_UINT32 SGcompensationMaxTime,
-                                                        TI_UINT32 SGcompensationPercent);
-/* Scan concentrator application functions */
-TI_STATUS               scanCncnApp_SetParam (TI_HANDLE hScanCncn, paramInfo_t *pParam);
-TI_STATUS               scanCncnApp_GetParam (TI_HANDLE hScanCncn, paramInfo_t *pParam);
-void                    scanCncn_AppScanResultCB (TI_HANDLE hScanCncn, EScanCncnResultStatus status,
-                                                  TScanFrameInfo* frameInfo, TI_UINT16 SPSStatus);
-void                    scanCncn_PeriodicScanCompleteCB (TI_HANDLE hScanCncn, char* str, TI_UINT32 strLen);
-void                    scanCncn_PeriodicScanReportCB (TI_HANDLE hScanCncn, char* str, TI_UINT32 strLen);
-
-#endif /* __SCANCNCN_H__ */
-
diff --git a/wl1271/stad/src/Sta_Management/ScanCncnApp.c b/wl1271/stad/src/Sta_Management/ScanCncnApp.c
deleted file mode 100644
index 57998fb..0000000
--- a/wl1271/stad/src/Sta_Management/ScanCncnApp.c
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- * ScanCncnApp.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  ScanCncnApp.c
- *  \brief Scan concentrator application scan module implementation
- *
- *  \see   ScanCncn.h, ScanCncn.c
- */
-
-
-#define __FILE_ID__  FILE_ID_77
-#include "ScanCncnPrivate.h"
-#include "ScanCncn.h"
-#include "ScanCncnOsSm.h"
-#include "EvHandler.h"
-#include "report.h"
-#include "GenSM.h"
-#include "scanResultTable.h"
-#include "sme.h"
-#include "smeApi.h"
-
-/** 
- * \fn     scanCncnApp_SetParam
- * \brief  Parses and executes a set param command
- * 
- * Parses and executes a set param command (start/stop one-shot/periodic/OS scan)
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  pParam - the param to set
- * \return operation status (OK / NOK / PARAM_NOT_SUPPORTED)
- * \sa     scanCncnApp_GetParam 
- */ 
-TI_STATUS scanCncnApp_SetParam (TI_HANDLE hScanCncn, paramInfo_t *pParam)
-{
-    TScanCncn   *pScanCncn = (TScanCncn*)hScanCncn;
-    TI_UINT32   uCurrentTimeStamp;
-
-    TRACE1(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnApp_SetParam: recevived request of type 0x%x\n", pParam->paramType);
-
-    switch (pParam->paramType)
-    {
-    case SCAN_CNCN_START_APP_SCAN:
-
-        /* verify that scan is not currently running */
-        if (pScanCncn->eCurrentRunningAppScanClient != SCAN_SCC_NO_CLIENT)
-        {
-            TRACE1(pScanCncn->hReport, REPORT_SEVERITY_WARNING, "scanCncnApp_SetParam: trying to start app one-shot scan when client %d is currently running!\n", pScanCncn->eCurrentRunningAppScanClient);
-            /* Scan was not started successfully, send a scan complete event to the user */
-            return TI_NOK;
-        }
-
-        /* set one-shot scan as running app scan client */
-        pScanCncn->eCurrentRunningAppScanClient = SCAN_SCC_APP_ONE_SHOT;
-
-        /* Perform aging process before the scan */
-        scanResultTable_PerformAging(pScanCncn->hScanResultTable);
-
-        /* start the scan */
-        if (SCAN_CRS_SCAN_RUNNING != 
-            scanCncn_Start1ShotScan (hScanCncn, SCAN_SCC_APP_ONE_SHOT, pParam->content.pScanParams))
-        {
-            /* Scan was not started successfully, mark that no app scan is running */
-            pScanCncn->eCurrentRunningAppScanClient = SCAN_SCC_NO_CLIENT;
-            return TI_NOK;
-        }
-        break;
-
-    case SCAN_CNCN_STOP_APP_SCAN:
-        /* verify that scan is currently running */
-        if (pScanCncn->eCurrentRunningAppScanClient != SCAN_SCC_NO_CLIENT)
-        {
-            scanCncn_StopScan (hScanCncn, SCAN_SCC_APP_ONE_SHOT);
-        }
-        break;
-
-    case SCAN_CNCN_START_PERIODIC_SCAN:
-        /* verify that scan is not currently running */
-        if (SCAN_SCC_NO_CLIENT != pScanCncn->eCurrentRunningAppScanClient)
-        {
-            TRACE1(pScanCncn->hReport, REPORT_SEVERITY_WARNING, "scanCncnApp_SetParam: trying to start app periodic scan when client %d is currently running!\n", pScanCncn->eCurrentRunningAppScanClient);
-            /* Scan was not started successfully, send a scan complete event to the user */
-            return TI_NOK;
-        }
-
-        /* set one-shot scan as running app scan client */
-        pScanCncn->eCurrentRunningAppScanClient = SCAN_SCC_APP_PERIODIC;
-
-        /* Perform aging process before the scan */
-        scanResultTable_PerformAging(pScanCncn->hScanResultTable);
-
-        /* start the scan */
-        if (SCAN_CRS_SCAN_RUNNING !=
-            scanCncn_StartPeriodicScan (hScanCncn, SCAN_SCC_APP_PERIODIC, pParam->content.pPeriodicScanParams))
-        {
-            TRACE0(pScanCncn->hReport, REPORT_SEVERITY_CONSOLE , "Scan was not started. Verify scan parametrs or SME mode\n");
-            WLAN_OS_REPORT (("Scan was not started. Verify scan parametrs or SME mode\n"));
-                             
-            /* Scan was not started successfully, mark that no app scan is running */
-            pScanCncn->eCurrentRunningAppScanClient = SCAN_SCC_NO_CLIENT;
-            return TI_NOK;
-        }
-        break;
-
-    case SCAN_CNCN_STOP_PERIODIC_SCAN:
-        /* verify that scan is currently running */
-        if (pScanCncn->eCurrentRunningAppScanClient != SCAN_SCC_NO_CLIENT)
-        {
-            scanCncn_StopPeriodicScan (hScanCncn, SCAN_SCC_APP_PERIODIC);
-        }
-        break;
-
-    case SCAN_CNCN_BSSID_LIST_SCAN_PARAM:
-        /* check if OID scans are enabled in the registry */
-        if (0 == pScanCncn->tInitParams.uMinimumDurationBetweenOsScans)
-        {
-            TRACE0(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnApp_SetParam: received OS scan request when OS scans are disabled, quitting...\n");
-            return TI_NOK;
-        }
-
-        /* check if the last OID scan didn't start at a shorter duration than the configured minimum */
-        uCurrentTimeStamp = os_timeStampMs (pScanCncn->hOS);
-        if ( (uCurrentTimeStamp - pScanCncn->uOSScanLastTimeStamp) < 
-             (pScanCncn->tInitParams.uMinimumDurationBetweenOsScans * 1000) ) /*converted to ms */
-        {
-            TRACE3(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnApp_SetParam: last OID scan performed at: %d, now is: %d, min duration is: %d, too early for another scan!\n", pScanCncn->uOSScanLastTimeStamp, uCurrentTimeStamp, pScanCncn->tInitParams.uMinimumDurationBetweenOsScans);
-            return TI_NOK;
-        }
-
-        /* check that no other scan is currently running */
-        if (SCAN_SCC_NO_CLIENT != pScanCncn->eCurrentRunningAppScanClient)
-        {
-            TRACE1(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncnApp_SetParam: received OS scan request when client %d is currently running!\n", pScanCncn->eCurrentRunningAppScanClient);
-            return TI_NOK;
-        }
-
-        /* set one-shot scan as running app scan client */
-        pScanCncn->eCurrentRunningAppScanClient = SCAN_SCC_APP_ONE_SHOT;
-
-        /* mark that an OID scan process has started */
-        pScanCncn->bOSScanRunning = TI_TRUE;
-        pScanCncn->uOSScanLastTimeStamp = uCurrentTimeStamp;
-        TRACE0(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnApp_SetParam: starting OID scan process...\n");
-
-		if(0 != pParam->content.pScanParams->desiredSsid.len)
-        {
-			pScanCncn->tOsScanParams.desiredSsid.len = pParam->content.pScanParams->desiredSsid.len;
-            os_memoryCopy(pScanCncn->hOS, pScanCncn->tOsScanParams.desiredSsid.str, pParam->content.pScanParams->desiredSsid.str, pParam->content.pScanParams->desiredSsid.len);
-        }
-        else
-        {
-            pScanCncn->tOsScanParams.desiredSsid.len = 0;
-            pScanCncn->tOsScanParams.desiredSsid.str[ 0 ] = '\0'; /* broadcast scan */
-        }
-
-		pScanCncn->tOsScanParams.scanType = pParam->content.pScanParams->scanType;
-
-        /* and actually start the scan */
-        genSM_Event (pScanCncn->hOSScanSm, SCAN_CNCN_OS_SM_EVENT_START_SCAN, hScanCncn);
-
-        break;
-
-    case SCAN_CNCN_SET_SRA:
-        scanResultTable_SetSraThreshold(pScanCncn->hScanResultTable, pParam->content.uSraThreshold);
-        break;
-
-    case SCAN_CNCN_SET_RSSI:
-        pScanCncn->tInitParams.nRssiThreshold = pParam->content.nRssiThreshold;
-        break;
-
-    default:
-        TRACE1(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncnApp_SetParam: unrecognized param type :%d\n", pParam->paramType);
-        return PARAM_NOT_SUPPORTED;
-    }
-
-    return TI_OK;
-}
-
-/** 
- * \fn     scanCncnApp_GetParam
- * \brief  Parses and executes a get param command
- * 
- * Parses and executes a get param command (get BSSID list)
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  pParam - the param to get
- * \return operation status (OK / NOK / PARAM_NOT_SUPPORTED)
- * \sa     scanCncnApp_SetParam
- */ 
-TI_STATUS scanCncnApp_GetParam (TI_HANDLE hScanCncn, paramInfo_t *pParam)
-{
-    TScanCncn   *pScanCncn = (TScanCncn*)hScanCncn;
-
-    TRACE1(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnApp_GetParam: received request of type %d\n", pParam->paramType);
-
-    switch (pParam->paramType)
-    {
-
-	case SCAN_CNCN_NUM_BSSID_IN_LIST_PARAM:
-        /* retrieve the number of BSSID's in the scan result table*/
-		pParam->paramLength = sizeof(TI_UINT32);
-		pParam->content.uNumBssidInList = scanResultTable_GetNumOfBSSIDInTheList (pScanCncn->hScanResultTable);
-        break;
-        
-    case SCAN_CNCN_BSSID_LIST_SIZE_PARAM:
-        /* retrieves the size to allocate for the app scan result taBle BBSID list (see next code) */
-        pParam->paramLength = sizeof(TI_UINT32);
-		pParam->content.uBssidListSize = scanResultTable_CalculateBssidListSize (pScanCncn->hScanResultTable, TI_TRUE);
-        break;
-
-    case SCAN_CNCN_BSSID_LIST_PARAM:
-        /* retrieve the app scan result table */
-  		return scanResultTable_GetBssidList (pScanCncn->hScanResultTable, pParam->content.pBssidList, 
-                                             &pParam->paramLength, TI_TRUE);
-
-	case SCAN_CNCN_BSSID_RATE_LIST_PARAM:
-        /* retrieve supported rates list equivalent to the supported rates list
-		 in the scan result table, but is extended to include 11n rates as well*/
-		return scanResultTable_GetBssidSupportedRatesList (pScanCncn->hScanResultTable, pParam->content.pRateList,
-														   &pParam->paramLength);
-
-    default:
-        TRACE1(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncnApp_GetParam: unrecognized param type :%d\n", pParam->paramType);
-        return PARAM_NOT_SUPPORTED;
-    }
-
-    return TI_OK;
-}
-
-/** 
- * \fn     scanCncn_AppScanResultCB
- * \brief  Scan result callback for application scan
- * 
- * Scan result callback for application scan
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  status - the scan result status (scan complete, result received etc.)
- * \param  frameInfo - a pointer to the structure holding all frame related info (in case a frame was received)
- * \param  SPSStatus - a bitmap indicating on which channels scan was attempted (valid for SPS scan only!)
- * \return None
- */ 
-void scanCncn_AppScanResultCB (TI_HANDLE hScanCncn, EScanCncnResultStatus status,
-                               TScanFrameInfo* frameInfo, TI_UINT16 SPSStatus)
-{
-    TScanCncn   *pScanCncn = (TScanCncn*)hScanCncn;
-    TI_UINT32	statusData;
-
-    /* Since in Manual Mode the app and the SME use the same table
-     * there is no need to forward data to SME */
-
-    switch (status)
-    {
-    case SCAN_CRS_RECEIVED_FRAME:
-        /* Save the result in the app scan result table */
-        if (TI_OK != scanResultTable_UpdateEntry (pScanCncn->hScanResultTable, frameInfo->bssId, frameInfo))
-		{
-	        TRACE0(pScanCncn->hReport, REPORT_SEVERITY_WARNING , "scanCncn_AppScanResultCB, scanResultTable_UpdateEntry() failed\n");
-		}
-		break;
-
-    case SCAN_CRS_SCAN_COMPLETE_OK:
-
-        TRACE1(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_AppScanResultCB, received scan complete with status :%d\n", status);
-
-        /* if OS scan is running */
-        if (TI_TRUE == pScanCncn->bOSScanRunning)
-        {
-            /* send a scan complete event to the OS scan SM. It will stabliza the table when needed */
-            genSM_Event (pScanCncn->hOSScanSm, SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE, hScanCncn);
-        }
-        else
-        {
-            /* move the scan result table to stable state */
-            scanResultTable_SetStableState (pScanCncn->hScanResultTable);
-
-            /* mark that no app scan is running */
-            pScanCncn->eCurrentRunningAppScanClient = SCAN_SCC_NO_CLIENT;
-            /*
-             * The scan was finished, send a scan complete event to the user
-             * (regardless of why the scan was completed)
-             */
-            statusData = SCAN_STATUS_COMPLETE;	/* Completed status */
-			EvHandlerSendEvent (pScanCncn->hEvHandler, IPC_EVENT_SCAN_COMPLETE, (TI_UINT8 *)&statusData, sizeof(TI_UINT32));
-        }
-        break;
-
-    case SCAN_CRS_SCAN_STOPPED:
-
-        TRACE1(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_AppScanResultCB, received scan complete with status :%d\n", status);
-
-        /* if OS scan is running */
-        if (TI_TRUE == pScanCncn->bOSScanRunning)
-        {
-            /* send a scan complete event to the OS scan SM. It will stabliza the table when needed */
-            genSM_Event (pScanCncn->hOSScanSm, SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE, hScanCncn);
-        }
-        else
-        {
-            /* move the scan result table to stable state */
-            scanResultTable_SetStableState (pScanCncn->hScanResultTable);
-
-            /* mark that no app scan is running */
-            pScanCncn->eCurrentRunningAppScanClient = SCAN_SCC_NO_CLIENT;
-            /*
-             * The scan was finished, send a scan complete event to the user
-             * (regardless of why the scan was completed)
-             */
-            statusData = SCAN_STATUS_STOPPED;	/* Stopped status */
-            EvHandlerSendEvent (pScanCncn->hEvHandler, IPC_EVENT_SCAN_COMPLETE, (TI_UINT8 *)&statusData, sizeof(TI_UINT32));
-        }
-        break;
-
-    case SCAN_CRS_TSF_ERROR:
-    case SCAN_CRS_SCAN_RUNNING:
-    case SCAN_CRS_SCAN_FAILED:
-    case SCAN_CRS_SCAN_ABORTED_HIGHER_PRIORITY:
-    case SCAN_CRS_SCAN_ABORTED_FW_RESET:
-
-        TRACE1(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncn_AppScanResultCB, received scan complete with status :%d\n", status);
-
-        /* if OS scan is running */
-        if (TI_TRUE == pScanCncn->bOSScanRunning)
-        {
-            /* send a scan complete event to the OS scan SM. It will stabliza the table when needed */
-            genSM_Event (pScanCncn->hOSScanSm, SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE, hScanCncn);
-        }
-        else
-        {
-            /* move the scan result table to stable state */
-            scanResultTable_SetStableState (pScanCncn->hScanResultTable);
-
-            /* mark that no app scan is running */
-            pScanCncn->eCurrentRunningAppScanClient = SCAN_SCC_NO_CLIENT;
-            /* 
-             * The scan was finished, send a scan complete event to the user
-             * (regardless of why the scan was completed)
-             */
-            statusData = SCAN_STATUS_FAILED;		/* Failed status */
-            EvHandlerSendEvent (pScanCncn->hEvHandler, IPC_EVENT_SCAN_COMPLETE, (TI_UINT8 *)&statusData, sizeof(TI_UINT32));
-        }
-        break;
-
-    case SCAN_CRS_NUM_OF_RES_STATUS:
-    default:
-        TRACE1(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncn_AppScanResultCB, received erroneuos scan result with status :%d\n", status);
-        break;
-    }
-}
-
diff --git a/wl1271/stad/src/Sta_Management/ScanCncnOsSm.c b/wl1271/stad/src/Sta_Management/ScanCncnOsSm.c
deleted file mode 100644
index efa4a8b..0000000
--- a/wl1271/stad/src/Sta_Management/ScanCncnOsSm.c
+++ /dev/null
@@ -1,525 +0,0 @@
-/*
- * ScanCncnOsSm.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  ScanCncnOsSm.c
- *  \brief Scan concentrator OS scan state machine implementation
- *
- *  \see   ScanCncnApp.c
- */
-
-
-#define __FILE_ID__  FILE_ID_78
-#include "osTIType.h"
-#include "GenSM.h"
-#include "ScanCncnOsSm.h"
-#include "ScanCncn.h"
-#include "ScanCncnPrivate.h"
-#include "report.h"
-#include "osApi.h"
-#include "siteMgrApi.h"
-#include "regulatoryDomainApi.h"
-#include "scanResultTable.h"
-
-#define SCAN_OID_DEFAULT_PROBE_REQUEST_RATE_G                       RATE_MASK_UNSPECIFIED  /* Let the FW select */
-#define SCAN_OID_DEFAULT_PROBE_REQUEST_RATE_A                       RATE_MASK_UNSPECIFIED  /* Let the FW select */
-#define SCAN_OID_DEFAULT_PROBE_REQUEST_NUMBER_G                     3
-#define SCAN_OID_DEFAULT_PROBE_REQUEST_NUMBER_A                     3
-#define SCAN_OID_DEFAULT_MAX_DWELL_TIME_PASSIVE_G                   100000
-#define SCAN_OID_DEFAULT_MAX_DWELL_TIME_PASSIVE_A                   100000
-#define SCAN_OID_DEFAULT_MAX_DWELL_TIME_ACTIVE_G                    30000
-#define SCAN_OID_DEFAULT_MAX_DWELL_TIME_ACTIVE_A                    30000
-#define SCAN_OID_DEFAULT_MIN_DWELL_TIME_PASSIVE_G                   100000
-#define SCAN_OID_DEFAULT_MIN_DWELL_TIME_PASSIVE_A                   100000
-#define SCAN_OID_DEFAULT_MIN_DWELL_TIME_ACTIVE_G                    15000
-#define SCAN_OID_DEFAULT_MIN_DWELL_TIME_ACTIVE_A                    15000
-#define SCAN_OID_DEFAULT_EARLY_TERMINATION_EVENT_PASSIVE_G          SCAN_ET_COND_BEACON
-#define SCAN_OID_DEFAULT_EARLY_TERMINATION_EVENT_PASSIVE_A          SCAN_ET_COND_BEACON
-#define SCAN_OID_DEFAULT_EARLY_TERMINATION_EVENT_ACTIVE_G           SCAN_ET_COND_ANY_FRAME
-#define SCAN_OID_DEFAULT_EARLY_TERMINATION_EVENT_ACTIVE_A           SCAN_ET_COND_ANY_FRAME
-
-/* For WiFi  WPA OOB scenario, 4 APs need to be configure on the same channel */
-#define SCAN_OID_DEFAULT_EARLY_TERMINATION_COUNT_PASSIVE_G          4 
-#define SCAN_OID_DEFAULT_EARLY_TERMINATION_COUNT_PASSIVE_A          4
-#define SCAN_OID_DEFAULT_EARLY_TERMINATION_COUNT_ACTIVE_G           4
-#define SCAN_OID_DEFAULT_EARLY_TERMINATION_COUNT_ACTIVE_A           4
-
-static void scanCncnOsSm_ActionStartGScan (TI_HANDLE hScanCncn);
-static void scanCncnOsSm_ActionStartAScan (TI_HANDLE hScanCncn);
-static void scanCncnOsSm_ActionCompleteScan (TI_HANDLE hScanCncn);
-static void scanCncnOsSm_ActionUnexpected (TI_HANDLE hScanCncn);
-TI_UINT32   scanCncnOsSm_FillAllAvailableChannels (TI_HANDLE hScanCncn, ERadioBand eBand, EScanType eScanType,
-                                                   TScanChannelEntry *pChannelArray, TI_UINT32 uMaxDwellTime,
-                                                   TI_UINT32 uMinChannelTime, EScanEtCondition eETCondition,
-                                                   TI_UINT8 uETFrameNumber);
-
-
-static TGenSM_actionCell tSmMatrix[ SCAN_CNCN_OS_SM_NUMBER_OF_STATES ][ SCAN_CNCN_OS_SM_NUMBER_OF_EVENTS ] = 
-    {
-        { /* SCAN_CNCN_OS_SM_STATE_IDLE */
-            { SCAN_CNCN_OS_SM_STATE_SCAN_ON_G,  scanCncnOsSm_ActionStartGScan },    /* SCAN_CNCN_OS_SM_EVENT_START_SCAN */
-            { SCAN_CNCN_OS_SM_STATE_IDLE,       scanCncnOsSm_ActionUnexpected },    /* SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE */
-        },
-        { /* SCAN_CNCN_OS_SM_STATE_SCAN_ON_G */
-            { SCAN_CNCN_OS_SM_STATE_SCAN_ON_G,  scanCncnOsSm_ActionUnexpected },    /* SCAN_CNCN_OS_SM_EVENT_START_SCAN */
-            { SCAN_CNCN_OS_SM_STATE_SCAN_ON_A,  scanCncnOsSm_ActionStartAScan },    /* SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE */
-        },
-        { /* SCAN_CNCN_OS_SM_STATE_SCAN_ON_A */
-            { SCAN_CNCN_OS_SM_STATE_SCAN_ON_A,  scanCncnOsSm_ActionUnexpected },    /* SCAN_CNCN_OS_SM_EVENT_START_SCAN */
-            { SCAN_CNCN_OS_SM_STATE_IDLE,       scanCncnOsSm_ActionCompleteScan },  /* SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE */
-        }
-    };
-
-static TI_INT8  *uStateDescription[] = 
-    {
-        "IDLE",
-        "SCAN_ON_G",
-        "SCAN_ON_A"
-    };
-
-static TI_INT8  *uEventDescription[] = 
-    {
-        "START",
-        "SCAN_COMPLETE"
-    };
-
-/** 
- * \fn     scanCncnOsSm_Create
- * \brief  Creates the OS scan state-machine
- * 
- * creates the OS scan state-machine
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \return Handle to the newly created OS san SM, NULL if an error occured
- * \sa     scanCncnOsSm_Create, scanCncnOsSm_Destroy
- */
-TI_HANDLE scanCncnOsSm_Create (TI_HANDLE hScanCncn)
-{
-    TScanCncn       *pScanCncn = (TScanCncn*)hScanCncn;
-
-    return genSM_Create (pScanCncn->hOS);
-}
-
-/** 
- * \fn     scanCncnOsSm_Init
- * \brief  Initialize the OS scan state-machine
- * 
- * Initialize the OS scan state-machine
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \return None
- * \sa     scanCncnOsSm_Create
- */
-void scanCncnOsSm_Init (TI_HANDLE hScanCncn)
-{
-    TScanCncn       *pScanCncn = (TScanCncn*)hScanCncn;
-
-    /* initialize the state-machine */
-    genSM_Init (pScanCncn->hOSScanSm, pScanCncn->hReport);
-    genSM_SetDefaults (pScanCncn->hOSScanSm, SCAN_CNCN_OS_SM_NUMBER_OF_STATES, SCAN_CNCN_OS_SM_NUMBER_OF_EVENTS,
-                       (TGenSM_matrix)tSmMatrix, SCAN_CNCN_OS_SM_STATE_IDLE, "OS scan SM", uStateDescription, 
-                       uEventDescription, __FILE_ID__);
-}
-
-/** 
- * \fn     scanCncnOsSm_Destroy
- * \brief  Destroys the OS scan state-machine
- * 
- * Destroys the OS scan state-machine
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \return None
- * \sa     scanCncnOsSm_Create
- */
-void scanCncnOsSm_Destroy (TI_HANDLE hScanCncn)
-{
-    TScanCncn       *pScanCncn = (TScanCncn*)hScanCncn;
-
-    genSM_Unload (pScanCncn->hOSScanSm);
-}
-
-/** 
- * \fn     scanCncnOsSm_ActionStartGScan
- * \brief  Scan concentartor OS state machine start scan on G action function
- * 
- * Scan concentartor OS state machine start scan on G action function.
- * Starts a sacn on G using all allowed channels
- * 
- * \param  hScanCncn - handle to the scan concentartor object
- * \return None
- */ 
-void scanCncnOsSm_ActionStartGScan (TI_HANDLE hScanCncn)
-{
-    TScanCncn       *pScanCncn = (TScanCncn*)hScanCncn;
-    paramInfo_t     tParam;
-    TI_UINT32       uValidChannelsCount;
-    TI_BOOL         bRegulatoryDomainEnabled;
-
-    /* if the STA is not configured for G band or dual band, send a scan complete event to the SM */
-    tParam.paramType = SITE_MGR_DESIRED_DOT11_MODE_PARAM;
-    siteMgr_getParam (pScanCncn->hSiteManager, &tParam);
-    if ((DOT11_G_MODE != tParam.content.siteMgrDot11Mode) && (DOT11_DUAL_MODE != tParam.content.siteMgrDot11Mode))
-    {
-        TRACE0(pScanCncn->hReport , REPORT_SEVERITY_INFORMATION , "scanCncnOsSm_ActionStartGScan: STA does not work on 2.4 GHz, continuing to 5.0 GHz scan\n");
-        genSM_Event (pScanCncn->hOSScanSm, SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE, hScanCncn);
-        return;
-    }
-
-    /* build scan command header */
-    pScanCncn->tOsScanParams.band = RADIO_BAND_2_4_GHZ;
-    pScanCncn->tOsScanParams.Tid = 255;
-
-    /* query the regulatory domain if 802.11d is in use */
-    tParam.paramType = REGULATORY_DOMAIN_ENABLED_PARAM;
-    regulatoryDomain_getParam (pScanCncn->hRegulatoryDomain, &tParam );
-    bRegulatoryDomainEnabled = tParam.content.regulatoryDomainEnabled;
-
-    /* Get country code status */
-    tParam.paramType          = REGULATORY_DOMAIN_IS_COUNTRY_FOUND;
-    tParam.content.eRadioBand = RADIO_BAND_2_4_GHZ;
-    regulatoryDomain_getParam (pScanCncn->hRegulatoryDomain, &tParam);
-
-    /* scan type is passive if 802.11d is enabled and country IE was not yet found, active otherwise */
-    if (((TI_TRUE == bRegulatoryDomainEnabled) && (TI_FALSE == tParam.content.bIsCountryFound)) || SCAN_TYPE_TRIGGERED_PASSIVE == pScanCncn->tOsScanParams.scanType)
-    {
-		pScanCncn->tOsScanParams.scanType = SCAN_TYPE_TRIGGERED_PASSIVE;
-    }
-	/* All paramters in the func are hard coded, due to that we set to active if not passive */
-    else
-    {
-        pScanCncn->tOsScanParams.scanType = SCAN_TYPE_TRIGGERED_ACTIVE;
-        /* also set number and rate of probe requests */
-        pScanCncn->tOsScanParams.probeReqNumber = SCAN_OID_DEFAULT_PROBE_REQUEST_NUMBER_G;
-        pScanCncn->tOsScanParams.probeRequestRate = (ERateMask)SCAN_OID_DEFAULT_PROBE_REQUEST_RATE_G;
-    }
-    
-    /* add supported channels on G */
-    if (SCAN_TYPE_NORMAL_PASSIVE == pScanCncn->tOsScanParams.scanType )
-    {
-        uValidChannelsCount = scanCncnOsSm_FillAllAvailableChannels (hScanCncn, RADIO_BAND_2_4_GHZ, 
-                                       SCAN_TYPE_NORMAL_PASSIVE, &(pScanCncn->tOsScanParams.channelEntry[0]),
-                                       SCAN_OID_DEFAULT_MAX_DWELL_TIME_PASSIVE_G,
-                                       SCAN_OID_DEFAULT_MIN_DWELL_TIME_PASSIVE_G,
-                                       SCAN_OID_DEFAULT_EARLY_TERMINATION_EVENT_PASSIVE_G,
-                                       SCAN_OID_DEFAULT_EARLY_TERMINATION_COUNT_PASSIVE_G);
-    }
-    else
-    {
-        uValidChannelsCount = scanCncnOsSm_FillAllAvailableChannels (hScanCncn, RADIO_BAND_2_4_GHZ, 
-                                       SCAN_TYPE_NORMAL_ACTIVE, &(pScanCncn->tOsScanParams.channelEntry[0]),
-                                       SCAN_OID_DEFAULT_MAX_DWELL_TIME_ACTIVE_G,
-                                       SCAN_OID_DEFAULT_MIN_DWELL_TIME_ACTIVE_G,
-                                       SCAN_OID_DEFAULT_EARLY_TERMINATION_EVENT_ACTIVE_G,
-                                       SCAN_OID_DEFAULT_EARLY_TERMINATION_COUNT_ACTIVE_G);
-    }
-    pScanCncn->tOsScanParams.numOfChannels = uValidChannelsCount;
-
-    /* check that some channels are available */
-    if ( uValidChannelsCount > 0 )
-    {
-        EScanCncnResultStatus   eResult;
-        
-        /* send command to scan concentrator APP SM */
-        eResult = scanCncn_Start1ShotScan (hScanCncn, SCAN_SCC_APP_ONE_SHOT, &(pScanCncn->tOsScanParams));
-
-        /* if scan failed, send scan complete event to the SM */
-        if (SCAN_CRS_SCAN_RUNNING != eResult)
-        {
-            TRACE0(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncnOsSm_ActionStartGScan: scan failed on 2.4 GHz, continuing to 5.0 GHz scan\n");
-            genSM_Event (pScanCncn->hOSScanSm, SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE, hScanCncn);
-        }
-    }
-    else
-    {
-        TRACE0(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncnOsSm_ActionStartGScan: no valid cahnnels on 2.4 GHz, continuing to 5.0 GHz scan\n");
-        /* no channels to scan, send a scan complete event */
-        genSM_Event (pScanCncn->hOSScanSm, SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE, hScanCncn);
-    }
-}
-
-/** 
- * \fn     scanCncnOsSm_ActionStartAScan
- * \brief  Scan concentartor OS state machine start scan on A action function
- * 
- * Scan concentartor OS state machine start scan on A action function.
- * Starts a sacn on A using all allowed channels
- * 
- * \param  hScanCncn - handle to the scan concentartor object
- * \return None
- */ 
-void scanCncnOsSm_ActionStartAScan (TI_HANDLE hScanCncn)
-{
-    TScanCncn       *pScanCncn = (TScanCncn*)hScanCncn;
-    paramInfo_t     tParam;
-    TI_UINT32       uValidChannelsCount;
-    TI_BOOL         bRegulatoryDomainEnabled;
-
-    /* if the STA is not configured for G band or dual band, send a scan complete event to the SM */
-    tParam.paramType = SITE_MGR_DESIRED_DOT11_MODE_PARAM;
-    siteMgr_getParam (pScanCncn->hSiteManager, &tParam);
-    if ((DOT11_A_MODE != tParam.content.siteMgrDot11Mode) && (DOT11_DUAL_MODE != tParam.content.siteMgrDot11Mode))
-    {
-        TRACE0(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnOsSm_ActionStartAScan: STA does not work on 5.0 GHz, quitting\n");
-        genSM_Event (pScanCncn->hOSScanSm, SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE, hScanCncn);
-        return;
-    }
-
-    /* build scan command header */
-    pScanCncn->tOsScanParams.band = RADIO_BAND_5_0_GHZ;
-    pScanCncn->tOsScanParams.Tid = 0;
-
-    /* query the regulatory domain if 802.11d is in use */
-    tParam.paramType = REGULATORY_DOMAIN_ENABLED_PARAM;
-    regulatoryDomain_getParam (pScanCncn->hRegulatoryDomain, &tParam );
-    bRegulatoryDomainEnabled = tParam.content.regulatoryDomainEnabled;
-
-    /* Get country code status */
-    tParam.paramType          = REGULATORY_DOMAIN_IS_COUNTRY_FOUND;
-    tParam.content.eRadioBand = RADIO_BAND_5_0_GHZ;
-    regulatoryDomain_getParam (pScanCncn->hRegulatoryDomain, &tParam);
-
-    /* scan type is passive if 802.11d is enabled and country IE was not yet found, active otherwise */
-    if (((TI_TRUE == bRegulatoryDomainEnabled) && (TI_FALSE == tParam.content.bIsCountryFound)) || SCAN_TYPE_TRIGGERED_PASSIVE == pScanCncn->tOsScanParams.scanType)
-    {
-        pScanCncn->tOsScanParams.scanType = SCAN_TYPE_TRIGGERED_PASSIVE;
-    }
-    /* All paramters in the func are hard coded, due to that we set to active if not passive */
-	else
-    {
-        pScanCncn->tOsScanParams.scanType = SCAN_TYPE_TRIGGERED_ACTIVE;
-        /* also set number and rate of probe requests */
-        pScanCncn->tOsScanParams.probeReqNumber = SCAN_OID_DEFAULT_PROBE_REQUEST_NUMBER_A;
-        pScanCncn->tOsScanParams.probeRequestRate = (ERateMask)SCAN_OID_DEFAULT_PROBE_REQUEST_RATE_A;
-    }
-    
-    /* add supported channels on G */
-    if (SCAN_TYPE_NORMAL_PASSIVE == pScanCncn->tOsScanParams.scanType )
-    {
-        uValidChannelsCount = scanCncnOsSm_FillAllAvailableChannels (hScanCncn, RADIO_BAND_5_0_GHZ, 
-                                       SCAN_TYPE_NORMAL_PASSIVE, &(pScanCncn->tOsScanParams.channelEntry[0]),
-                                       SCAN_OID_DEFAULT_MAX_DWELL_TIME_PASSIVE_A,
-                                       SCAN_OID_DEFAULT_MIN_DWELL_TIME_PASSIVE_A,
-                                       SCAN_OID_DEFAULT_EARLY_TERMINATION_EVENT_PASSIVE_A,
-                                       SCAN_OID_DEFAULT_EARLY_TERMINATION_COUNT_PASSIVE_A );
-    }
-    else
-    {
-        uValidChannelsCount = scanCncnOsSm_FillAllAvailableChannels (hScanCncn, RADIO_BAND_5_0_GHZ,
-                                       SCAN_TYPE_NORMAL_ACTIVE, &(pScanCncn->tOsScanParams.channelEntry[0]),
-                                       SCAN_OID_DEFAULT_MAX_DWELL_TIME_ACTIVE_A,
-                                       SCAN_OID_DEFAULT_MIN_DWELL_TIME_ACTIVE_A,
-                                       SCAN_OID_DEFAULT_EARLY_TERMINATION_EVENT_ACTIVE_A,
-                                       SCAN_OID_DEFAULT_EARLY_TERMINATION_COUNT_ACTIVE_A );
-    }
-    pScanCncn->tOsScanParams.numOfChannels = uValidChannelsCount;
-
-    /* check that some channels are available */
-    if ( uValidChannelsCount > 0 )
-    {
-        EScanCncnResultStatus   eResult;
-
-       /* send command to scan concentrator APP SM */
-        eResult = scanCncn_Start1ShotScan (hScanCncn, SCAN_SCC_APP_ONE_SHOT, &(pScanCncn->tOsScanParams));
-
-        /* if scan failed, send scan complete event to the SM */
-        if (SCAN_CRS_SCAN_RUNNING != eResult)
-        {
-            TRACE0(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncnOsSm_ActionStartAScan: scan failed on 5.0 GHz, quitting\n");
-            genSM_Event (pScanCncn->hOSScanSm, SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE, hScanCncn);
-        }
-    }
-    else
-    {
-        TRACE0(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncnOsSm_ActionStartGScan: no valid cahnnels on 5.0 GHz, quitting\n");
-        /* no channels to scan, send a scan complete event */
-        genSM_Event (pScanCncn->hOSScanSm, SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE, hScanCncn);
-    }
-}
-
-/** 
- * \fn     scanCncnOsSm_ActionCompleteScan
- * \brief  Scan concentartor OS state machine complete scan action function
- * 
- * Scan concentartor OS state machine complete scan action function.
- * Cleans up after an OS scan cycle - stabilize the scan result table
- * 
- * \param  hScanCncn - handle to the scan concentartor object
- * \return None
- */ 
-void scanCncnOsSm_ActionCompleteScan (TI_HANDLE hScanCncn)
-{
-    TScanCncn       *pScanCncn = (TScanCncn*)hScanCncn;
-
-
-	 /*Update the table only if scan was not rejected*/
-	 if ( !pScanCncn->pScanClients[ pScanCncn->eCurrentRunningAppScanClient ]->bScanRejectedOn2_4)
-	 {
-    /* 
-     * set the result table to stable state. Note: OID scans are always done for the application, so the
-     * results will always be sent to the scan concentartor app scan result table, regardless of the
-     * SME connection mode. However, it is expected that the SME will NOT attempt to connect when an OID
-     * scan request will be received
-     */
-		  scanResultTable_SetStableState (pScanCncn->hScanResultTable);
-	 }
-	 else
-	 {
-		  pScanCncn->pScanClients[ pScanCncn->eCurrentRunningAppScanClient ]->bScanRejectedOn2_4 = TI_FALSE;
-	 }
-
-    /* mark that OID scan process is no longer running */
-    pScanCncn->bOSScanRunning = TI_FALSE;
-    /* also mark that no app scan client is running */
-    pScanCncn->eCurrentRunningAppScanClient = SCAN_SCC_NO_CLIENT;
- 
-
-    /* no need to send scan complete event - WZC (or equivalent other OS apps) will query for the results */
-}
-
-/** 
- * \fn     scanCncnOsSm_FillAllAvailableChannels
- * \brief  Fills a chhanel array with valid channels (and their params) according to band and scan type
- * 
- * Fills a chhanel array with valid channels (and their params) according to band and scan type
- * 
- * \param  hScanCncn - handle to the scan concentrator object
- * \param  eBand - band to extract channels for
- * \param  eScanType - scan type tp ectract channels for
- * \param  pChannelArray - where to store allowed channels information
- * \param  uMaxDwellTime - maximum dwell time value to be used for each channel
- * \param  uMinDwellTime - minimum dwell time value to be used for each channel
- * \param  eETCondition - early termination condition value to be used for each channel
- * \param  uETFrameNumber - early termination frame number value to be used for each channel
- * \return Number of allowed channels (that were placed in the given channels array)
- */ 
-TI_UINT32 scanCncnOsSm_FillAllAvailableChannels (TI_HANDLE hScanCncn, ERadioBand eBand, EScanType eScanType,
-                                                 TScanChannelEntry *pChannelArray, TI_UINT32 uMaxDwellTime,
-                                                 TI_UINT32 uMinChannelTime, EScanEtCondition eETCondition,
-                                                 TI_UINT8 uETFrameNumber)
-{
-    TScanCncn       *pScanCncn = (TScanCncn*)hScanCncn;
-    TI_UINT32       i, j, uAllowedChannelsCount, uValidChannelsCnt = 0;
-    paramInfo_t     tParam;
-    TI_UINT8        uTempChannelList[ SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND ];
- 
-    /* get the numnber of supported channels for this band */
-    tParam.paramType = REGULATORY_DOMAIN_ALL_SUPPORTED_CHANNELS;
-    tParam.content.siteMgrRadioBand = eBand;
-    regulatoryDomain_getParam (pScanCncn->hRegulatoryDomain, &tParam);
-    uAllowedChannelsCount = tParam.content.supportedChannels.sizeOfList;
-
-    /* for the time being don't scan more channels than fit in one command */
-    if (uAllowedChannelsCount > SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND)
-    {
-        uAllowedChannelsCount = SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND;
-    }
-
-    /* Copy allowed channels to reuse param var */
-    os_memoryCopy (pScanCncn->hOS, uTempChannelList,
-            tParam.content.supportedChannels.listOfChannels, uAllowedChannelsCount );
-
-    /* preapre the param var to request channel allowance for the requested scan type */
-    tParam.paramType = REGULATORY_DOMAIN_GET_SCAN_CAPABILITIES;
-    tParam.content.channelCapabilityReq.band = eBand;
-
-    /* add default values to channels allowed for the requested scan type and band */
-    for (i = 0; i < uAllowedChannelsCount; i++)
-    {
-        /* get specific channel allowance for scan type */
-        if ((eScanType == SCAN_TYPE_NORMAL_PASSIVE) ||
-            (eScanType == SCAN_TYPE_TRIGGERED_PASSIVE) ||
-            (eScanType == SCAN_TYPE_SPS))
-        {
-            tParam.content.channelCapabilityReq.scanOption = PASSIVE_SCANNING;
-        }
-        else
-        {
-            tParam.content.channelCapabilityReq.scanOption = ACTIVE_SCANNING;
-        }
-        tParam.content.channelCapabilityReq.channelNum = uTempChannelList[ i ];
-
-        regulatoryDomain_getParam( pScanCncn->hRegulatoryDomain, &tParam );
-        if (TI_TRUE == tParam.content.channelCapabilityRet.channelValidity)
-        {
-            /* add the channel ID */
-            pChannelArray[ uValidChannelsCnt ].normalChannelEntry.channel = uTempChannelList[ i ];
-
-            /* add other default parameters */
-            pChannelArray[ uValidChannelsCnt ].normalChannelEntry.minChannelDwellTime = uMinChannelTime;
-            pChannelArray[ uValidChannelsCnt ].normalChannelEntry.maxChannelDwellTime = uMaxDwellTime;
-            pChannelArray[ uValidChannelsCnt ].normalChannelEntry.earlyTerminationEvent = eETCondition;
-            pChannelArray[ uValidChannelsCnt ].normalChannelEntry.ETMaxNumOfAPframes = uETFrameNumber;
-            pChannelArray[ uValidChannelsCnt ].normalChannelEntry.txPowerDbm  = 
-                tParam.content.channelCapabilityRet.maxTxPowerDbm;
-
-            /* Fill broadcast BSSID */
-            for (j = 0; j < 6; j++)
-            {
-                pChannelArray[ uValidChannelsCnt ].normalChannelEntry.bssId[ j ] = 0xff;
-            }
-            uValidChannelsCnt++;
-        }
-    }
-
-    /* return the number of channels that are actually allowed for the requested scan type on the requested band */
-    return uValidChannelsCnt;
-}
-
-/** 
- * \fn     Function declaration 
- * \brief  Function brief description goes here 
- * 
- * Function detailed description goes here 
- * 
- * \note   Note is indicated here 
- * \param  Parameter name - parameter description
- * \param  Â… 
- * \return Return code is detailed here 
- * \sa     Reference to other relevant functions 
- */ 
-/**
- * \\n
- * \date 11-Jan-2005\n
- * \brief Handles an unexpected event.\n
-
- *
- * Function Scope \e Private.\n
- * \param hScanCncn - handle to the scan concentrator object.\n
- * \return always OK.\n
- */
-void scanCncnOsSm_ActionUnexpected (TI_HANDLE hScanCncn) 
-{
-    TScanCncn       *pScanCncn = (TScanCncn*)hScanCncn;
-
-    TRACE0(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncnOsSm_ActionUnexpected: Unexpeted action for current state\n");
-}
-
diff --git a/wl1271/stad/src/Sta_Management/ScanCncnOsSm.h b/wl1271/stad/src/Sta_Management/ScanCncnOsSm.h
deleted file mode 100644
index 26b03ff..0000000
--- a/wl1271/stad/src/Sta_Management/ScanCncnOsSm.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * ScanCncnOsSm.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  ScanCncnOsSm.h
- *  \brief Scan concentartor OS state-machine public definitions
- *
- *  \see   ScanCncnOsSm.c
- */
-
-#ifndef __SCAN_CNCN_OS_SM_H__
-#define __SCAN_CNCN_OS_SM_H__
-
-#include "osTIType.h"
-
-typedef enum
-{
-    SCAN_CNCN_OS_SM_STATE_IDLE = 0,
-    SCAN_CNCN_OS_SM_STATE_SCAN_ON_G,
-    SCAN_CNCN_OS_SM_STATE_SCAN_ON_A,
-    SCAN_CNCN_OS_SM_NUMBER_OF_STATES
-} EScanCncnOsSmStates;
-
-typedef enum
-{
-    SCAN_CNCN_OS_SM_EVENT_START_SCAN = 0,
-    SCAN_CNCN_OS_SM_EVENT_SCAN_COMPLETE,
-    SCAN_CNCN_OS_SM_NUMBER_OF_EVENTS
-} EScanCncnOsSmEvents;
-
-TI_HANDLE   scanCncnOsSm_Create (TI_HANDLE hScanCncn);
-void        scanCncnOsSm_Init (TI_HANDLE hScanCncn);
-void        scanCncnOsSm_Destroy (TI_HANDLE hScanCncn);
-
-#endif /* __SCAN_CNCN_OS_SM_H__ */
-
diff --git a/wl1271/stad/src/Sta_Management/ScanCncnPrivate.h b/wl1271/stad/src/Sta_Management/ScanCncnPrivate.h
deleted file mode 100644
index 1d3ba45..0000000
--- a/wl1271/stad/src/Sta_Management/ScanCncnPrivate.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * ScanCncnPrivate.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  ScanCncnPrivate.h
- *  \brief Scan concentartor module private definitions
- *
- *  \see   ScanCncn.c, ScanCncn.h, ScanCncnApp.c
- */
-
-#ifndef __SCAN_CNCN_PRIVATE_H__
-#define __SCAN_CNCN_PRIVATE_H__
-
-#include "osTIType.h"
-#include "TWDriver.h"
-#include "scrApi.h"
-#include "ScanCncnSm.h"
-
-/** \enum EConnectionStatus
- * \brief enumerates the different connection statuses
- */
-typedef enum
-{
-    STA_CONNECTED = 0,              /**< the station is connected to an infrastructure BSS */
-    STA_NOT_CONNECTED,              /**< the station is not connected to an infrastructure BSS */
-    STA_IBSS                        /**< the station is participating in an IBSS */
-} EConnectionStatus;
-
-typedef struct
-{
-    /* handles to other modules */
-    TI_HANDLE               hOS;
-    TI_HANDLE               hTWD;
-    TI_HANDLE               hReport;
-    TI_HANDLE               hRegulatoryDomain;
-    TI_HANDLE               hSiteManager;
-    TI_HANDLE               hSCR;
-    TI_HANDLE               hAPConn;
-    TI_HANDLE               hEvHandler;
-    TI_HANDLE               hMlme;
-    TI_HANDLE               hHealthMonitor;
-    TI_HANDLE               hSme;
-
-    /* client specific information */
-    TScanCncnClient         *pScanClients[ SCAN_SCC_NUM_OF_CLIENTS ];
-
-    /* SG Flags */
-    TI_BOOL                 bUseSGParams;
-    TI_UINT32               uSGcompensationPercent;
-    TI_UINT32               uSGcompensationMaxTime;
-    TI_UINT8                uSGprobeRequestPercent;   
-        
-    /* connection status */
-    EConnectionStatus       eConnectionStatus;
-    TScanCncnInitParams     tInitParams;
-
-    /* scan concentrator application sub-module data */
-    TI_HANDLE               hScanResultTable; /* application scan result table */
-    TI_HANDLE               hOSScanSm; /* OS scan state machine */
-    EScanCncnClient         eCurrentRunningAppScanClient; /* to disallow both one-shot and periodic app */
-    TI_UINT32               uOSScanLastTimeStamp;
-    TI_BOOL                 bOSScanRunning;
-    TScanParams             tOsScanParams;
-
-} TScanCncn;
-
-#endif /* __SCAN_CNCN_PRIVATE_H__ */
-
diff --git a/wl1271/stad/src/Sta_Management/ScanCncnSm.c b/wl1271/stad/src/Sta_Management/ScanCncnSm.c
deleted file mode 100644
index 7642b65..0000000
--- a/wl1271/stad/src/Sta_Management/ScanCncnSm.c
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * ScanCncnSm.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  ScanCncnSm.c
- *  \brief Scan concentrator state machine implementation
- *
- *  \see   ScanCncnSm.h, ScanCncnSmSpecific.c
- */
-
-
-#define __FILE_ID__  FILE_ID_79
-#include "osTIType.h"
-#include "GenSM.h"
-#include "ScanCncnSm.h"
-#include "report.h"
-
-/* state machine action functions */
-static void scanCncnSm_RequestScr       (TI_HANDLE hScanCncnClient);
-static void scanCncnSm_StartScan        (TI_HANDLE hScanCncnClient);
-static void scanCncnSm_StopScan         (TI_HANDLE hScanCncnClient);
-static void scanCncnSm_ScanComplete     (TI_HANDLE hScanCncnClient);
-static void scanCncnSm_Nop              (TI_HANDLE hScanCncnClient);
-static void scanCncnSm_ActionUnexpected (TI_HANDLE hScanCncnClient);
-static void scanCncnSm_RejectScan       (TI_HANDLE hScanCncnClient);
-static void scanCncnSm_Recovery         (TI_HANDLE hScanCncnClient);
-
-
-static TGenSM_actionCell tSmMatrix[ SCAN_CNCN_SM_NUMBER_OF_STATES ][ SCAN_CNCN_SM_NUMBER_OF_EVENTS ] = 
-    {
-        { /* SCAN_CNCN_SM_STATE_IDLE */
-            { SCAN_CNCN_SM_STATE_SCR_WAIT, scanCncnSm_RequestScr },         /* SCAN_CNCN_SM_EVENT_START */
-            { SCAN_CNCN_SM_STATE_IDLE, scanCncnSm_ActionUnexpected },       /* SCAN_CNCN_SM_EVENT_RUN */
-            { SCAN_CNCN_SM_STATE_IDLE, scanCncnSm_ActionUnexpected },       /* SCAN_CNCN_SM_EVENT_SCAN_COMPLETE */
-            { SCAN_CNCN_SM_STATE_IDLE, scanCncnSm_ActionUnexpected },       /* SCAN_CNCN_SM_EVENT_STOP */
-            { SCAN_CNCN_SM_STATE_IDLE, scanCncnSm_ActionUnexpected },       /* SCAN_CNCN_SM_EVENT_ABORT */ 
-            { SCAN_CNCN_SM_STATE_IDLE, scanCncnSm_ActionUnexpected },       /* SCAN_CNCN_SM_EVENT_RECOVERY */
-            { SCAN_CNCN_SM_STATE_IDLE, scanCncnSm_ActionUnexpected }        /* SCAN_CNCN_SM_EVENT_REJECT */
-        },
-        { /* SCAN_CNCN_SM_STATE_SCR_WAIT */
-            { SCAN_CNCN_SM_STATE_SCR_WAIT, scanCncnSm_ActionUnexpected },   /* SCAN_CNCN_SM_EVENT_START */
-            { SCAN_CNCN_SM_STATE_SCANNING, scanCncnSm_StartScan },          /* SCAN_CNCN_SM_EVENT_RUN */
-            { SCAN_CNCN_SM_STATE_SCR_WAIT, scanCncnSm_ActionUnexpected },   /* SCAN_CNCN_SM_EVENT_SCAN_COMPLETE */
-            { SCAN_CNCN_SM_STATE_IDLE, scanCncnSm_RejectScan },             /* SCAN_CNCN_SM_EVENT_STOP */
-            { SCAN_CNCN_SM_STATE_SCR_WAIT, scanCncnSm_ActionUnexpected },   /* SCAN_CNCN_SM_EVENT_ABORT */ 
-            { SCAN_CNCN_SM_STATE_SCR_WAIT, scanCncnSm_ActionUnexpected },   /* SCAN_CNCN_SM_EVENT_RECOVERY */
-            { SCAN_CNCN_SM_STATE_IDLE, scanCncnSm_RejectScan }              /* SCAN_CNCN_SM_EVENT_REJECT */
-        },
-        { /* SCAN_CNCN_SM_STATE_SCANNING */
-            { SCAN_CNCN_SM_STATE_SCANNING, scanCncnSm_ActionUnexpected },   /* SCAN_CNCN_SM_EVENT_START */
-            { SCAN_CNCN_SM_STATE_SCANNING, scanCncnSm_ActionUnexpected },   /* SCAN_CNCN_SM_EVENT_RUN */
-            { SCAN_CNCN_SM_STATE_IDLE, scanCncnSm_ScanComplete },           /* SCAN_CNCN_SM_EVENT_SCAN_COMPLETE */
-            { SCAN_CNCN_SM_STATE_STOPPING, scanCncnSm_StopScan },           /* SCAN_CNCN_SM_EVENT_STOP */
-            { SCAN_CNCN_SM_STATE_STOPPING, scanCncnSm_StopScan },           /* SCAN_CNCN_SM_EVENT_ABORT */
-            { SCAN_CNCN_SM_STATE_IDLE, scanCncnSm_Recovery },               /* SCAN_CNCN_SM_EVENT_RECOVERY */
-            { SCAN_CNCN_SM_STATE_SCANNING, scanCncnSm_ActionUnexpected }    /* SCAN_CNCN_SM_EVENT_REJECT */
-        },
-        { /* SCAN_CNCN_SM_STATE_STOPPING */
-            { SCAN_CNCN_SM_STATE_STOPPING, scanCncnSm_ActionUnexpected },   /* SCAN_CNCN_SM_EVENT_START */
-            { SCAN_CNCN_SM_STATE_STOPPING, scanCncnSm_ActionUnexpected },   /* SCAN_CNCN_SM_EVENT_RUN */
-            { SCAN_CNCN_SM_STATE_IDLE, scanCncnSm_ScanComplete },           /* SCAN_CNCN_SM_EVENT_SCAN_COMPLETE */
-            { SCAN_CNCN_SM_STATE_STOPPING, scanCncnSm_Nop },                /* SCAN_CNCN_SM_EVENT_STOP */
-            { SCAN_CNCN_SM_STATE_STOPPING, scanCncnSm_Nop },                /* SCAN_CNCN_SM_EVENT_ABORT */
-            { SCAN_CNCN_SM_STATE_IDLE, scanCncnSm_Recovery },               /* SCAN_CNCN_SM_EVENT_RECOVERY */
-            { SCAN_CNCN_SM_STATE_STOPPING, scanCncnSm_ActionUnexpected }    /* SCAN_CNCN_SM_EVENT_REJECT */
-        }
-    };
-
-static TI_INT8*  uStateDescription[] = 
-    {
-        "IDLE",
-        "SCR_WAIT",
-        "SCANNING",
-        "STOPPING"
-    };
-
-static TI_INT8*  uEventDescription[] = 
-    {
-        "START",
-        "RUN",
-        "SCAN_COMPLETE",
-        "STOP",
-        "ABORT",
-        "RECOVERY",
-        "REJECT",
-    };
-
-/** 
- * \fn     scanCncnSm_Create 
- * \brief  Cerates a scan concentrator client object
- * 
- * Cerates a scan concentrator client - allocates object and create a state-machine instance
- * 
- * \param  hOS - handle to the OS object
- * \return Handle to the new scan concentrator client object
- * \sa     scanCncnSm_Init, scanCncnSm_Destroy
- */ 
-TI_HANDLE scanCncnSm_Create (TI_HANDLE hOS)
-{
-    TScanCncnClient *pScanCncnClient;
-
-    /* allocate space for the scan concentartor client object */
-    pScanCncnClient = os_memoryAlloc (hOS, sizeof (TScanCncnClient));
-    if (NULL == pScanCncnClient)
-    {
-        WLAN_OS_REPORT (("scanCncnSm_Cretae: not enough space for scan concentrator client object\n"));
-        return NULL;
-    }
-
-    /* store the OS object handle */
-    pScanCncnClient->hOS = hOS;
-
-    /* allocate the state machine object */
-    pScanCncnClient->hGenSM = genSM_Create (hOS);
-    if (NULL == pScanCncnClient->hGenSM)
-    {
-        WLAN_OS_REPORT (("scanCncnSm_Cretae: not enough space for scan concentrator client state-machine\n"));
-        return NULL;
-    }
-
-    /* return the new object */
-    return (TI_HANDLE)pScanCncnClient;
-}
-
-/** 
- * \fn     scanCncnSm_Init
- * \brief  Initialize a scan concentartor client object
- * 
- * Initialize a scan concentartor client object - store handles and specific SM functions
- * 
- * \note   Some of the values (e.g. scan result CB( are initialized from the main scan concentartor object)
- * \param  hScanCncnClient - handle to the scan concnentrator client object
- * \param  hReport - handle to the report object
- * \param  hTWD - handle to the TWD object
- * \param  hSCR - handle to the SCR object
- * \param  hApConn - handle to the AP connection object
- * \param  hMlme - handle to the MLME object
- * \param  fScrRequest - SM specific SCR request finction
- * \param  fScrRelease - SM specific SCR release finction
- * \param  fStartScan - SM specific scan start finction
- * \param  fStopScan - SM specific scan stop finction
- * \param  fRecovery - SM specific recovery handling function
- * \param  pScanSmName - state machine name
- * \return None
- * \sa     scanCncnSm_Cretae 
- */ 
-void scanCncnSm_Init (TI_HANDLE hScanCncnClient, TI_HANDLE hReport, TI_HANDLE hTWD, TI_HANDLE hSCR, 
-                      TI_HANDLE hApConn, TI_HANDLE hMlme, TI_HANDLE hScanCncn, TScanPrivateSMFunction fScrRequest, 
-                      TScanPrivateSMFunction fScrRelease, TScanPrivateSMFunction fStartScan, 
-                      TScanPrivateSMFunction fStopScan, TScanPrivateSMFunction fRecovery, TI_INT8* pScanSmName)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    /* store handles */
-    pScanCncnClient->hReport = hReport;
-    pScanCncnClient->hTWD = hTWD;
-    pScanCncnClient->hSCR = hSCR;
-    pScanCncnClient->hApConn = hApConn;
-    pScanCncnClient->hMlme = hMlme;
-    pScanCncnClient->hScanCncn = hScanCncn;
-
-    /* store private functions */
-    pScanCncnClient->fScrRequest = fScrRequest;
-    pScanCncnClient->fScrRelease = fScrRelease;
-    pScanCncnClient->fStartScan = fStartScan;
-    pScanCncnClient->fStopScan = fStopScan;
-    pScanCncnClient->fRecovery = fRecovery;
-
-    /* store SM name */
-    pScanCncnClient->pScanSmName = pScanSmName;
-
-    /* initialize the state-machine */
-    genSM_Init (pScanCncnClient->hGenSM, hReport);
-    genSM_SetDefaults (pScanCncnClient->hGenSM, SCAN_CNCN_SM_NUMBER_OF_STATES, SCAN_CNCN_SM_NUMBER_OF_EVENTS,
-                       (TGenSM_matrix)tSmMatrix, SCAN_CNCN_SM_STATE_IDLE, pScanCncnClient->pScanSmName, uStateDescription, 
-                       uEventDescription, __FILE_ID__);
-}
-
-/** 
- * \fn     scanCncnSm_Destroy 
- * \brief  Destroys a scan concentartor client object
- * 
- * Destroys a scan concentartor client object. destroys the state-machine object and 
- * de-allcoates system resources
- * 
- * \param  hScanCncnClient - handle to the scan concnentrator client object
- * \return None
- * \sa     scanCncnSm_Cretae
- */ 
-void scanCncnSm_Destroy (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    /* free the state-machine */
-    genSM_Unload (pScanCncnClient->hGenSM);
-
-    /* Free object storage space */
-    os_memoryFree (pScanCncnClient->hOS, hScanCncnClient, sizeof (TScanCncnClient));
-}
-
-/** 
- * \fn     scanCncnSm_RequestScr 
- * \brief  Scan concentartor SM action function for SCR request
- * 
- * Calls the Sm specific SCR request function
- * 
- * \param  hScanCncnClient - Handle to the scan concentrator client object
- * \return None
- */ 
-void scanCncnSm_RequestScr (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    TRACE0(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSm_RequestScr: SM  requesting SCR\n");
-
-    /* 
-     * just call the specific SCR request function, it will send an event if necessary
-     * according to SCR return code by itself
-     */
-    pScanCncnClient->fScrRequest (hScanCncnClient);
-}
-
-/** 
- * \fn     scanCncnSm_StartScan 
- * \brief  Scan concentrator SM action function for starting scan
- * 
- * Register for MLME CB and call the SM specific scan start function 
- * 
- * \param  hScanCncnClient - Handle to the scan concentrator client object
- * \return None
- */ 
-void scanCncnSm_StartScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    TRACE0(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSm_StartScan: SM  attempting to start scan.\n");
-
-    /* set scan result counter and flag */
-    pScanCncnClient->uResultCounter = 0;
-    pScanCncnClient->uResultExpectedNumber = 0;
-    pScanCncnClient->bScanCompletePending = TI_FALSE;
-	pScanCncnClient->bScanRejectedOn2_4 = TI_FALSE;  
-
-    /* call the specific start scan command. It will handle errors by itself */
-    pScanCncnClient->fStartScan (hScanCncnClient);
-}
-
-/** 
- * \fn     scanCncnSm_StopScan 
- * \brief  Scan concentrator SM action function for stoping scan by outside request
- * 
- * Calls the SM specific stop scan function
- * 
- * \param  hScanCncnClient - Handle to the scan concentrator client object
- * \return None
- */ 
-void scanCncnSm_StopScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    TRACE0(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSm_StopScan: SM  is attempting to stop scan\n");
-
-    /* call the scan SRV stop scan */
-    pScanCncnClient->fStopScan (hScanCncnClient);
-}
-
-/** 
- * \fn     scanCncnSm_ScanComplete 
- * \brief  Scan concentrator SM action function for scan complete 
- * 
- * Unregister MLME, release SCR and call client scan complete CB, if not running within a request context
- * 
- * \param  hScanCncnClient - Handle to the scan concentrator client object
- * \return None
- */ 
-void scanCncnSm_ScanComplete (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    TRACE0(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSm_ScanComplete: SM  received scan complete event\n");
-
-    /* release the SCR */
-    pScanCncnClient->fScrRelease (hScanCncnClient);
-
-    /* Call the client scan complete callback */
-    if (TI_FALSE == pScanCncnClient->bInRequest)
-    {
-        pScanCncnClient->tScanResultCB (pScanCncnClient->hScanResultCBObj,
-                                        pScanCncnClient->eScanResult, NULL, pScanCncnClient->uSPSScanResult);
-    }
-}
-
-/** 
- * \fn     scanCncnSm_Nop 
- * \brief  Scan concentrator SM action function for no operation 
- * 
- * Used when no operation is required not due to an error
- * 
- * \param  hScanCncnClient - Handle to the scan concentrator client object
- * \return None
- */ 
-void scanCncnSm_Nop (TI_HANDLE hScanCncnClient)
-{
-}
-
-/** 
- * \fn     ScanCncnSm_ActionUnexpected 
- * \brief  Scan concentrator SM action function for unexpected events 
- * 
- * Print an error message
- * 
- * \param  hScanCncnClient - Handle to the scan concentrator client object
- * \return None
- */ 
-void scanCncnSm_ActionUnexpected (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    TRACE0(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "ScanCncnSm_ActionUnexpected: Unexpected event for current state\n");
-
-    /* mark the scan status as failed */
-    pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-}
-
-/** 
- * \fn     scanCncnSm_RejectScan
- * \brief  Scan concentrator SM action function for rejecting a scan by the SCR
- * 
- * Releases the SCR and calls the client scan complete CB, if not running within a request context
- * 
- * \param  hScanCncnClient - Handle to the scan concentrator client object
- * \return None
- */ 
-void scanCncnSm_RejectScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    TRACE0(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSm_RejectScan: SM  received reject event\n");
-
-     pScanCncnClient->bScanRejectedOn2_4 = TI_TRUE;
-    /* release the SCR */
-    pScanCncnClient->fScrRelease (hScanCncnClient);
-
-    /* Call the client scan complete CB */
-    if (TI_FALSE == pScanCncnClient->bInRequest)
-    {
-        pScanCncnClient->tScanResultCB (pScanCncnClient->hScanResultCBObj, pScanCncnClient->eScanResult,
-                                        NULL, pScanCncnClient->uSPSScanResult); 
-    }   
-}
-
-/** 
- * \fn     scanCncnSm_Recovery
- * \brief  Scan concentrator SM action function for handling recovery during scan
- * 
- * Calls the SM specific recovery handling function and send a scan complete event. Used to stop timer
- * on one-shot scans
- * 
- * \param  hScanCncnClient - Handle to the scan concentrator client object
- * \return None
- */ 
-void scanCncnSm_Recovery (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    TRACE0(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSm_Recovery: SM  received reject event\n");
-
-    /* Call the recovery specific function */
-    pScanCncnClient->fRecovery (hScanCncnClient);
-
-    /* Call the client scan complete callback */
-    if (TI_FALSE == pScanCncnClient->bInRequest)
-    {
-        pScanCncnClient->tScanResultCB (pScanCncnClient->hScanResultCBObj,
-                                        pScanCncnClient->eScanResult, NULL, pScanCncnClient->uSPSScanResult);
-    }
-}
-
diff --git a/wl1271/stad/src/Sta_Management/ScanCncnSm.h b/wl1271/stad/src/Sta_Management/ScanCncnSm.h
deleted file mode 100644
index 6bc9a3c..0000000
--- a/wl1271/stad/src/Sta_Management/ScanCncnSm.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * ScanCncnSm.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  ScanCncnSm.h 
- *  \brief Scan concentrator state machine declarations
- *
- *  \see   ScanCncnSm.c
- */
-
-
-#ifndef __SCAN_CNCN_SM_H__
-#define __SCAN_CNCN_SM_H__
-
-#include "osTIType.h"
-#include "TWDriver.h"
-#include "ScanCncn.h"
-
-typedef void (*TScanPrivateSMFunction)(TI_HANDLE hScanCncn);
-
-typedef union
-{
-    TPeriodicScanParams tPeriodicScanParams;
-    TScanParams         tOneShotScanParams;
-}UScanParams;
-
-typedef struct
-{
-    TI_HANDLE               hOS;
-    TI_HANDLE               hReport;
-    TI_HANDLE               hSCR;
-    TI_HANDLE               hTWD;
-    TI_HANDLE               hApConn;
-    TI_HANDLE               hMlme;
-    TI_HANDLE               hGenSM;
-    TI_HANDLE               hScanCncn;
-    TI_BOOL                 bScanCompletePending; /* TRUE if scan complete event is received
-                                                    before all results, for periodic scan */
-    TI_BOOL                 bInRequest;
-    TI_BOOL                 bSendNullDataOnStop;  /* indicates whether NULL data frame is to be sent wehn
-                                                     stopping scan to return to previous PS mode */
-    TScanPrivateSMFunction  fScrRequest;
-    TScanPrivateSMFunction  fScrRelease;
-    TScanPrivateSMFunction  fStartScan;
-    TScanPrivateSMFunction  fStopScan;
-    TScanPrivateSMFunction  fRecovery;
-
-    /* Scan complete callbacks */ 
-    TScanResultCB           tScanResultCB;
-    TI_HANDLE               hScanResultCBObj;
-
-    UScanParams             uScanParams;
-    EScanCncnResultStatus   eScanResult;
-    TI_INT8                 *pScanSmName;
-    TI_UINT16               uSPSScanResult;
-    TI_UINT32               uResultCounter;
-    TI_UINT32               uResultExpectedNumber;
-	TI_BOOL					bScanRejectedOn2_4;
-} TScanCncnClient;
-
-typedef enum
-{
-    SCAN_CNCN_SM_STATE_IDLE = 0,
-    SCAN_CNCN_SM_STATE_SCR_WAIT,
-    SCAN_CNCN_SM_STATE_SCANNING,
-    SCAN_CNCN_SM_STATE_STOPPING,
-    SCAN_CNCN_SM_NUMBER_OF_STATES
-} EScanCncnSmStates;
-
-typedef enum
-{
-    SCAN_CNCN_SM_EVENT_START = 0,
-    SCAN_CNCN_SM_EVENT_RUN,
-    SCAN_CNCN_SM_EVENT_SCAN_COMPLETE,
-    SCAN_CNCN_SM_EVENT_STOP,
-    SCAN_CNCN_SM_EVENT_ABORT,
-    SCAN_CNCN_SM_EVENT_RECOVERY,
-    SCAN_CNCN_SM_EVENT_REJECT,
-    SCAN_CNCN_SM_NUMBER_OF_EVENTS
-} EScanCncnSmEvents;
-
-TI_HANDLE   scanCncnSm_Create               (TI_HANDLE hOS);
-void        scanCncnSm_Init                 (TI_HANDLE hScanCncnClient, TI_HANDLE hReport, TI_HANDLE hTWD, 
-                                             TI_HANDLE hSCR, TI_HANDLE hApConn, TI_HANDLE hMlme, 
-                                             TI_HANDLE hScanCncn, TScanPrivateSMFunction fScrRequest, 
-                                             TScanPrivateSMFunction fScrRelease, TScanPrivateSMFunction fStartScan, 
-                                             TScanPrivateSMFunction fStopScan, TScanPrivateSMFunction fRecovery, 
-                                             TI_INT8* pScanSmName);
-void        scanCncnSm_Destroy              (TI_HANDLE hScanCncnClient);
-void        scanCncnSmApp1Shot_ScrRequest      (TI_HANDLE hScanCncnClient);
-void        scanCncnSmApp1Shot_ScrRelease      (TI_HANDLE hScanCncnClient);
-void        scanCncnSmApp1Shot_StartScan       (TI_HANDLE hScanCncnClient);
-void        scanCncnSmApp1Shot_StopScan        (TI_HANDLE hScanCncnClient);
-void        scanCncnSmApp1Shot_Recovery        (TI_HANDLE hScanCncnClient);
-void        scanCncnSmAppP_ScrRequest       (TI_HANDLE hScanCncnClient);
-void        scanCncnSmAppP_ScrRelease       (TI_HANDLE hScanCncnClient);
-void        scanCncnSmAppP_StartScan        (TI_HANDLE hScanCncnClient);
-void        scanCncnSmAppP_StopScan         (TI_HANDLE hScanCncnClient);
-void        scanCncnSmAppP_Recovery         (TI_HANDLE hScanCncnClient);
-void        scanCncnSmDrvP_ScrRequest       (TI_HANDLE hScanCncnClient);
-void        scanCncnSmDrvP_ScrRelease       (TI_HANDLE hScanCncnClient);
-void        scanCncnSmDrvP_StartScan        (TI_HANDLE hScanCncnClient);
-void        scanCncnSmDrvP_StopScan         (TI_HANDLE hScanCncnClient);
-void        scanCncnSmDrvP_Recovery         (TI_HANDLE hScanCncnClient);
-void        scanCncnSmCont1Shot_ScrRequest     (TI_HANDLE hScanCncnClient);
-void        scanCncnSmCont1Shot_ScrRelease     (TI_HANDLE hScanCncnClient);
-void        scanCncnSmCont1Shot_StartScan      (TI_HANDLE hScanCncnClient);
-void        scanCncnSmCont1Shot_StopScan       (TI_HANDLE hScanCncnClient);
-void        scanCncnSmCont1Shot_Recovery       (TI_HANDLE hScanCncnClient);
-void        scanCncnSmImmed1Shot_ScrRequest    (TI_HANDLE hScanCncnClient);
-void        scanCncnSmImmed1Shot_ScrRelease    (TI_HANDLE hScanCncnClient);
-void        scanCncnSmImmed1Shot_StartScan     (TI_HANDLE hScanCncnClient);
-void        scanCncnSmImmed1Shot_StopScan      (TI_HANDLE hScanCncnClient);
-void        scanCncnSmImmed1Shot_Recovery      (TI_HANDLE hScanCncnClient);
-
-#endif /* __SCAN_CNCN_SM_H__ */
-
diff --git a/wl1271/stad/src/Sta_Management/ScanCncnSmSpecific.c b/wl1271/stad/src/Sta_Management/ScanCncnSmSpecific.c
deleted file mode 100644
index 1198648..0000000
--- a/wl1271/stad/src/Sta_Management/ScanCncnSmSpecific.c
+++ /dev/null
@@ -1,752 +0,0 @@
-/*
- * ScanCncnSmSpecific.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- /** \file  ScanCncnSmSpecific.c
- *  \brief Scan concentrator state machine type-specific functions implemenattion
- *
- *  \see   ScanCncnSm.h, ScanCncnSm.c
- */
-
-
-#define __FILE_ID__  FILE_ID_80
-#include "scrApi.h"
-#include "GenSM.h"
-#include "TWDriver.h"
-#include "ScanCncnSm.h"
-#include "ScanCncnPrivate.h"
-#include "apConn.h"
-
-/* 
- * Aplication one-shot scan
- */
-/** 
- * \fn     scanCncnSmApp1Shot_ScrRequest 
- * \brief  Request the SCR for one-shot application scan
- * 
- * Request the SCR for one-shot application scan. handle different results.
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmApp1Shot_ScrRequest (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient         *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    EScrClientRequestStatus eScrReplyStatus;
-    EScePendReason          eScrPendReason;
-
-    /* request the SCR as application scan client, and act according to return status */
-    switch (eScrReplyStatus = scr_clientRequest (pScanCncnClient->hSCR, SCR_CID_APP_SCAN, 
-                                                 SCR_RESOURCE_SERVING_CHANNEL, &eScrPendReason))
-    {
-    case SCR_CRS_PEND:
-        /* send a reject event to the SM */
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSmApp1Shot_ScrRequest: SCR pending, pend reason: %d.\n", eScrPendReason);
-        pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, hScanCncnClient);
-        break;
-
-    case SCR_CRS_RUN:
-        /* send a run event to the SM */
-        TRACE0(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSmApp1Shot_ScrRequest: SCR acquired.\n");
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_RUN, hScanCncnClient);
-        break;
-
-    default:
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmApp1Shot_ScrRequest: SCR returned unrecognized status: %d.\n", eScrReplyStatus);
-        /* Send a reject event to recover from this error */
-        pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, hScanCncnClient);        
-        break;
-   }
-}
-
-/** 
- * \fn     scanCncnSmApp1Shot_ScrRelease
- * \brief  Release the SCR as one-shot application scan
- * 
- * Release the SCR as one-shot application scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmApp1Shot_ScrRelease (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    /* release the SCR */
-    scr_clientComplete (pScanCncnClient->hSCR, SCR_CID_APP_SCAN, SCR_RESOURCE_SERVING_CHANNEL);
-}
-
-/** 
- * \fn     scanCncnSmApp1Shot_StartScan 
- * \brief  Request scan start from TWD for one-shot application scan
- * 
- * Request scan start from TWD for one-shot application scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmApp1Shot_StartScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    TScanCncn       *pScanCncn = (TScanCncn*)pScanCncnClient->hScanCncn;
-    TI_BOOL         bPsRequired;
-    TI_STATUS       tStatus;
-
-    /* if the STA is connected, it is rquired to enter PS before scan */
-    bPsRequired = (STA_CONNECTED == pScanCncn->eConnectionStatus ? TI_TRUE : TI_FALSE);
-
-    /* call the TWD start scan - enter driver mode (PS) only if station is connected */
-    tStatus = TWD_Scan (pScanCncnClient->hTWD, &(pScanCncnClient->uScanParams.tOneShotScanParams), SCAN_RESULT_TAG_APPLICATION_ONE_SHOT,
-                       TI_FALSE, bPsRequired, TI_FALSE, POWER_SAVE_ON, /* this parameter is used only when driver mode requested */
-                       bPsRequired, NULL, NULL);
-
-    if (TI_OK != tStatus)
-    {
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmApp1Shot_StartScan: TWD returned status %d, quitting app scan.\n", tStatus);
-
-        /* mark the return status */
-        pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-
-        /* could not start scan, send a scan complete event to reset the SM */
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, hScanCncnClient);
-    }
-}
-
-/** 
- * \fn     scanCncnSmApp1Shot_StopScan
- * \brief  Request scan stop from TWD for one-shot application scan
- * 
- * Request scan stop from TWD for one-shot application scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmApp1Shot_StopScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    TScanCncn       *pScanCncn = (TScanCncn*)pScanCncnClient->hScanCncn;
-    TI_STATUS       tStatus;
-
-    /* call the TWD stop scan function */
-    if (pScanCncn->eConnectionStatus != STA_CONNECTED)
-    {
-        tStatus = TWD_StopScan (pScanCncnClient->hTWD, SCAN_RESULT_TAG_APPLICATION_ONE_SHOT, TI_FALSE, NULL, NULL);
-    }
-    else
-    {
-        tStatus = TWD_StopScan (pScanCncnClient->hTWD, SCAN_RESULT_TAG_APPLICATION_ONE_SHOT, pScanCncnClient->bSendNullDataOnStop, NULL, NULL);
-    }
-
-    /* if stop scan operation failed, send a scan complete event to reset the SM */
-    if (TI_OK != tStatus)
-    {
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmApp1Shot_StopScan: status %d from TWD_StopScan, sending scan complete to SM\n", tStatus);
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, hScanCncnClient);
-    }
-}
-
-/** 
- * \fn     scanCncnSmApp1Shot_Recovery
- * \brief  Handles recovery during scan for one-shot application scan
- * 
- * Notifies the scan SRV to stop its timer
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmApp1Shot_Recovery (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    /* Notify scan SRV to stop its timer */
-    TWD_StopScanOnFWReset (pScanCncnClient->hTWD);
-}
-
-/*
- * Aplication Periodic scan
- */
-/** 
- * \fn     scanCncnSmAppP_ScrRequest 
- * \brief  Request the SCR for periodic application scan 
- * 
- * Request the SCR for periodic application scan. Handle different results
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmAppP_ScrRequest (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient         *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    EScrClientRequestStatus eScrReplyStatus;
-    EScePendReason          eScrPendReason;
-
-    /* request the SCR as application scan client, and act according to return status */
-    switch (eScrReplyStatus = scr_clientRequest (pScanCncnClient->hSCR, SCR_CID_APP_SCAN, 
-                                                 SCR_RESOURCE_PERIODIC_SCAN, &eScrPendReason))
-    {
-    case SCR_CRS_PEND:
-        /* send a reject event to the SM */
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSmAppP_ScrRequest: SCR pending, pend reason: %d.\n", eScrPendReason);
-        pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, hScanCncnClient);
-        break;
-
-    case SCR_CRS_RUN:
-        /* send a run event to the SM */
-        TRACE0(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSmAppP_ScrRequest: SCR acquired.\n");
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_RUN, hScanCncnClient);
-        break;
-
-    default:
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmAppP_ScrRequest: SCR returned unrecognized status: %d.\n", eScrReplyStatus);
-        /* Send a reject event to recover from this error */
-        pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, hScanCncnClient);
-        break;
-   }
-}
-
-/** 
- * \fn     scanCncnSmAppP_ScrRelease 
- * \brief  Release the SCR as periodic application scan 
- * 
- * Release the SCR as periodic application scan 
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmAppP_ScrRelease (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    /* release the SCR */
-    scr_clientComplete (pScanCncnClient->hSCR, SCR_CID_APP_SCAN, SCR_RESOURCE_PERIODIC_SCAN);
-}
-
-/** 
- * \fn     scanCncnSmAppP_StartScan
- * \brief  Request scan start from TWD for periodic application scan
- * 
- * Request scan start from TWD for periodic application scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmAppP_StartScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    TScanCncn       *pScanCncn = (TScanCncn*)pScanCncnClient->hScanCncn;
-    TI_STATUS       tStatus;
-
-    /* call the TWD start scan */
-    tStatus = TWD_StartConnectionScan (pScanCncnClient->hTWD, &(pScanCncnClient->uScanParams.tPeriodicScanParams),
-                                       SCAN_RESULT_TAG_APPLICATION_PEIODIC, 
-                                       pScanCncn->tInitParams.uDfsPassiveDwellTimeMs, NULL, NULL);
-    if (TI_OK != tStatus)
-    {
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmAppP_StartScan: TWD returned status %d, quitting app scan.\n", tStatus);
-
-        /* mark the return status */
-        pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-
-        /* could not start scan, send a scan complete event to reset the SM */
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, hScanCncnClient);
-    }
-}
-
-/** 
- * \fn     scanCncnSmAppP_StopScan
- * \brief  Request scan stop from TWD for periodic application scan
- * 
- * Request scan stop from TWD for periodic application scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmAppP_StopScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    TI_STATUS       status;
-
-    /* call the TWD stop periodic scan function */
-    status = TWD_StopPeriodicScan (pScanCncnClient->hTWD, SCAN_RESULT_TAG_APPLICATION_PEIODIC, NULL, NULL);
-
-    /* if stop scan operation failed, send a scan complete event to reset the SM */
-    if (TI_OK != status)
-    {
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmAppP_StopScan: status %d from TWD_StopPeriodicScan, sending scan complete to SM\n", status);
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, hScanCncnClient);
-    }
-}
-
-/** 
- * \fn     scanCncnSmAppP_Recovery
- * \brief  Handles recovery during scan for periodic application scan
- * 
- * Handles recovery during scan for periodic application scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmAppP_Recovery (TI_HANDLE hScanCncnClient)
-{
-}
-
-/*
- * Driver periodic scan
- */
-/** 
- * \fn     scanCncnSmDrvP_ScrRequest
- * \brief  Request the SCR for periodic driver scan
- * 
- * Request the SCR for periodic driver scan. Handle different results
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmDrvP_ScrRequest (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient         *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    EScrClientRequestStatus eScrReplyStatus;
-    EScePendReason          eScrPendReason;
-
-    /* request the SCR as driver scan client, and act according to return status */
-    switch (eScrReplyStatus = scr_clientRequest( pScanCncnClient->hSCR, SCR_CID_DRIVER_FG_SCAN,
-                                                 SCR_RESOURCE_PERIODIC_SCAN, &eScrPendReason ) )
-    {
-    case SCR_CRS_PEND:
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSmAppP_ScrRequest: SCR pending, pend reason: %d.\n", eScrPendReason);
-        
-        /* check the pending reason */
-        if (SCR_PR_OTHER_CLIENT_ABORTING != eScrPendReason)
-        {
-            /* 
-             * send a reject event to the SM - would not scan if not in a different group or 
-             * another un-abortable client is running
-             */
-            pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED; 
-            genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, hScanCncnClient);
-        }
-        /* if the pending reason is another client aborting wait untill it finish abort */
-        break;
-
-    case SCR_CRS_RUN:
-        /* send a run event to the SM */
-        TRACE0(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSmAppP_ScrRequest: SCR acquired.\n");
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_RUN, hScanCncnClient);
-        break;
-
-    default:
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmAppP_ScrRequest: SCR returned unrecognized status: %d\n", eScrReplyStatus);
-        /* Send a reject event to recover from this error */
-        pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, hScanCncnClient);
-        break;
-    }
-}
-
-/** 
- * \fn     scanCncnSmDrvP_ScrRelease
- * \brief  Release the SCR as periodic driver scan
- * 
- * Release the SCR as periodic driver scan 
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmDrvP_ScrRelease (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    /* release the SCR */
-    scr_clientComplete (pScanCncnClient->hSCR, SCR_CID_DRIVER_FG_SCAN, SCR_RESOURCE_PERIODIC_SCAN);
-}
-
-/** 
- * \fn     scanCncnSmDrvP_StartScan
- * \brief  Request scan start from TWD for periodic driver scan
- * 
- * Request scan start from TWD for periodic driver scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmDrvP_StartScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    TScanCncn       *pScanCncn = (TScanCncn*)pScanCncnClient->hScanCncn;
-    TI_STATUS       status;
-
-    /* call the TWD_scan function */
-    status = TWD_StartConnectionScan (pScanCncnClient->hTWD, &(pScanCncnClient->uScanParams.tPeriodicScanParams),
-                                      SCAN_RESULT_TAG_DRIVER_PERIODIC, 
-                                      pScanCncn->tInitParams.uDfsPassiveDwellTimeMs, NULL, NULL);
-
-    if (TI_OK != status)
-    {
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmDrvP_StartScan: TWD returned status %d, quitting app scan.\n", status);
-
-        /* mark the return status */
-        pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-
-        /* could not start scan, send a scan complete event to reset the SM */
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, hScanCncnClient);
-    }
-}
-
-/** 
- * \fn     scanCncnSmDrvP_StopScan
- * \brief  Request scan stop from TWD for periodic driver scan
- * 
- * Request scan stop from TWD for periodic driver scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmDrvP_StopScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    TI_STATUS       status;
-
-    /* call the TWD stop periodic scan */
-    status = TWD_StopPeriodicScan (pScanCncnClient->hTWD, SCAN_RESULT_TAG_DRIVER_PERIODIC, NULL, NULL);
-
-    /* if stop scan operation failed, send a scan complete event to reset the SM */
-    if (TI_OK != status)
-    {
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmDrvP_StopScan: status %d from TWD_StopPeriodicScan, sending scan complete to SM\n", status);
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, hScanCncnClient);
-    }
-}
-
-/** 
- * \fn     scanCncnSmApp1Shot_Recovery
- * \brief  Handles recovery during scan for periodic driver scan
- * 
- * Handles recovery during scan for periodic driver scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmDrvP_Recovery (TI_HANDLE hScanCncnClient)
-{
-}
-
-/*
- * Continuous one-shot scan
- */
-/** 
- * \fn     scanCncnSmCont1Shot_ScrRequest
- * \brief  Request the SCR for one-shot continuous scan
- * 
- * Request the SCR for one-shot continuous scan. Handle different results
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmCont1Shot_ScrRequest (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient         *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    EScrClientRequestStatus eScrReplyStatus;
-    EScePendReason          eScrPendReason;
-
-    /* request the SCR as continuous roaming client, and act according to return status */
-    switch (eScrReplyStatus = scr_clientRequest (pScanCncnClient->hSCR, SCR_CID_CONT_SCAN, 
-                                                SCR_RESOURCE_SERVING_CHANNEL, &eScrPendReason ) )
-    {
-    case SCR_CRS_PEND:
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSmCont1Shot_ScrRequest: SCR pending, pend Reason: %d.\n", eScrPendReason);
-        /* check pend reason */
-        if (SCR_PR_DIFFERENT_GROUP_RUNNING == eScrPendReason)
-        {
-            /* send a reject event to the SM - will not scan if not in connected group */
-            pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-            genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, hScanCncnClient);
-        }
-        /* for other pending reasons wait untill current client finishes */
-        break;
-
-    case SCR_CRS_RUN:
-        /* send a run event to the SM */
-        TRACE0(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSmCont1Shot_ScrRequest: SCR acquired.\n");
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_RUN, hScanCncnClient);
-        break;
-
-    default:
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmCont1Shot_ScrRequest: SCR returned unrecognized status: %d.\n", eScrReplyStatus);
-        /* Send a reject event to recover from this error */
-        pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, hScanCncnClient);
-        break;
-    }
-}
-
-/** 
- * \fn     scanCncnSmCont1Shot_ScrRelease
- * \brief  Release the SCR as one-shot continuous scan
- * 
- * Release the SCR as one-shot continuous scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmCont1Shot_ScrRelease (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    /* release the SCR */
-    scr_clientComplete (pScanCncnClient->hSCR, SCR_CID_CONT_SCAN, SCR_RESOURCE_SERVING_CHANNEL);
-}
-
-/** 
- * \fn     scanCncnSmCont1Shot_StartScan 
- * \brief  Request scan start from TWD for one-shot continuous scan
- * 
- * Request scan start from TWD for one-shot continuous scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmCont1Shot_StartScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    TI_STATUS       status;
-
-    /* call the TWD start scan function */
-    status = TWD_Scan (pScanCncnClient->hTWD, &(pScanCncnClient->uScanParams.tOneShotScanParams), 
-                       SCAN_RESULT_TAG_CONTINUOUS, TI_FALSE, TI_TRUE, TI_FALSE, POWER_SAVE_ON, TI_TRUE,
-                       NULL, NULL);
-
-    if (TI_OK != status)
-    {
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmCont1Shot_StartScan: TWD returned status %d, quitting continuous scan.\n", status);
-
-        /* mark the return status */
-        pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-
-        /* could not start scan, send a scan complete event */
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, hScanCncnClient);
-    }
-}
-
-/** 
- * \fn     scanCncnSmCont1Shot_StopScan
- * \brief  Request scan stop from TWD for one-shot continuous scan
- * 
- * Request scan stop from TWD for one-shot continuous scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmCont1Shot_StopScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    TI_STATUS       status;
-
-    /* send a stop scan command to FW */
-    status = TWD_StopScan (pScanCncnClient->hTWD, SCAN_RESULT_TAG_CONTINUOUS, pScanCncnClient->bSendNullDataOnStop, NULL, NULL);
-
-    /* if stop scan operation failed, send a scan complete event to reset the SM */
-    if (TI_OK != status)
-    {
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmCont1Shot_StopScan: status %d from TWD_StopScan, sending scan complete to SM\n", status);
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, hScanCncnClient);
-    }
-}
-
-/** 
- * \fn     scanCncnSmCont1Shot_Recovery
- * \brief  Handles recovery during scan for one-shot continuous scan
- * 
- * Notifies the scan SRV to stop its timer
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmCont1Shot_Recovery (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    /* Notify scan SRV to stop its timer */
-    TWD_StopScanOnFWReset (pScanCncnClient->hTWD);
-}
-
-/*
- * Immediate one-shot scan
- */
-/** 
- * \fn     scanCncnSmImmed1Shot_ScrRequest
- * \brief  Request the SCR for one-shot immediate scan
- * 
- * Request the SCR for one-shot immediate scan. Handle different results
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmImmed1Shot_ScrRequest (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient         *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    EScrClientRequestStatus eScrReplyStatus;
-    EScePendReason          eScrPendReason;
-    
-    /* request the SCR as immediate roaming client, and act according to return status */
-    switch (eScrReplyStatus = scr_clientRequest (pScanCncnClient->hSCR, SCR_CID_IMMED_SCAN,
-                                                 SCR_RESOURCE_SERVING_CHANNEL, &eScrPendReason))
-    {
-    case SCR_CRS_PEND:
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSmImmed1Shot_ScrRequest: SCR pending, pend Reason: %d.\n", eScrPendReason);
-
-        /* check pend reason */
-        if ( SCR_PR_DIFFERENT_GROUP_RUNNING == eScrPendReason )
-        {
-            /* send a reject event to the SM - will not scan if not in the correct group */
-            pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-            genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, hScanCncnClient);
-        }
-        /* for other pending reasons wait untill current client finishes */
-        break;
-
-    case SCR_CRS_RUN:
-        /* send a run event to the SM */
-        TRACE0(pScanCncnClient->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnSmImmed1Shot_ScrRequest: SCR acquired.\n");
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_RUN, hScanCncnClient);
-        break;
-
-    default:
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmImmed1Shot_ScrRequest: SCR returned unrecognized status: %d.\n", eScrReplyStatus);
-        pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-        /* Send a reject event to recover from this error */
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_REJECT, hScanCncnClient);
-        break;
-    }
-}
-
-/** 
- * \fn     scanCncnSmImmed1Shot_ScrRelease
- * \brief  Release the SCR as one-shot immediate scan
- * 
- * Release the SCR as one-shot immediate scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmImmed1Shot_ScrRelease (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    /* release the SCR */
-    scr_clientComplete (pScanCncnClient->hSCR, SCR_CID_IMMED_SCAN, SCR_RESOURCE_SERVING_CHANNEL);
-}
-
-/** 
- * \fn     scanCncnSmImmed1Shot_StartScan 
- * \brief  Request scan start from TWD for one-shot immediate scan
- * 
- * Request scan start from TWD for one-shot immediate scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmImmed1Shot_StartScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    TI_BOOL         bPsRequired, bTriggeredScan;
-    TI_STATUS       status;
-
-    /* check whether enter PS is required - according to the roaming reason severity */
-    bPsRequired = apConn_isPsRequiredBeforeScan (pScanCncnClient->hApConn);
-    bTriggeredScan = ((SCAN_TYPE_TRIGGERED_ACTIVE == pScanCncnClient->uScanParams.tOneShotScanParams.scanType) ||
-                      (SCAN_TYPE_TRIGGERED_PASSIVE == pScanCncnClient->uScanParams.tOneShotScanParams.scanType) 
-                      ? TI_TRUE : TI_FALSE);
-
-    status = TWD_Scan (pScanCncnClient->hTWD, &(pScanCncnClient->uScanParams.tOneShotScanParams),
-                       SCAN_RESULT_TAG_IMMEDIATE, !bTriggeredScan, /* Triggered scan cannot be high priority */
-                       TI_TRUE, TI_TRUE, (bPsRequired ? POWER_SAVE_ON : POWER_SAVE_KEEP_CURRENT),
-                       bPsRequired, NULL, NULL);
-
-    /* call the scan SRV start scan */
-    if (TI_OK != status)
-    {
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmImmed1Shot_StartScan: TWD start scanreturned status %d, quitting immediate scan.\n", status);
-
-        /* mark the return status */
-        pScanCncnClient->eScanResult = SCAN_CRS_SCAN_FAILED;
-
-        /* could not start scan, send a scan complete event */
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, hScanCncnClient);
-    }
-}
-
-/** 
- * \fn     scanCncnSmImmed1Shot_StopScan
- * \brief  Request scan stop from TWD for one-shot immediate scan
- * 
- * Request scan stop from TWD for one-shot immediate scan
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmImmed1Shot_StopScan (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-    TI_STATUS       status;
-
-    /* call the TWD stop scan */
-    status = TWD_StopScan (pScanCncnClient->hTWD, SCAN_RESULT_TAG_IMMEDIATE, pScanCncnClient->bSendNullDataOnStop, NULL, NULL);
-
-    /* if stop scan operation failed, send a scan complete event to reset the SM */
-    if (TI_OK != status)
-    {
-        TRACE1(pScanCncnClient->hReport, REPORT_SEVERITY_ERROR , "scanCncnSmImmed1Shot_StopScan: status %d from TWD_StopScan, sending scan complete to SM\n", status);
-        genSM_Event (pScanCncnClient->hGenSM, SCAN_CNCN_SM_EVENT_SCAN_COMPLETE, hScanCncnClient);
-    }
-}
-
-/** 
- * \fn     scanCncnSmImmed1Shot_Recovery
- * \brief  Handles recovery during scan for one-shot immediate scan
- * 
- * Notifies the scan SRV to stop its timer
- * 
- * \param  hScanCncnClient - handle to the specific client object
- * \return None
- */ 
-void scanCncnSmImmed1Shot_Recovery (TI_HANDLE hScanCncnClient)
-{
-    TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;
-
-    /* Notify scan SRV to stop its timer */
-    TWD_StopScanOnFWReset (pScanCncnClient->hTWD);
-}
-
diff --git a/wl1271/stad/src/Sta_Management/StaCap.c b/wl1271/stad/src/Sta_Management/StaCap.c
deleted file mode 100644
index cf8fb9e..0000000
--- a/wl1271/stad/src/Sta_Management/StaCap.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * StaCap.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   StaCap.c 
- *  \brief  STA capabilities module that responsible to publish STA capabilities to all others modules.
- *  
- *  \see    StaCap.c
- */
-
-#define __FILE_ID__  FILE_ID_86
-#include "osApi.h"
-#include "report.h"
-#include "StaCap.h"
-#include "TWDriver.h"
-#include "802_11Defs.h"
-#include "qosMngr_API.h"
-#include "Device1273.h"
-#include "smeApi.h"
-
-/** 
- * \fn     staCap_Create 
- * \brief  Create the staCap module.
- * 
- * Allocate and clear the staCap module object.
- * 
- * \param  hOs - Handle to Os Abstraction Layer
- * \return Handle of the allocated object 
- * \sa     staCap_Destroy
- */ 
-TI_HANDLE StaCap_Create (TI_HANDLE hOs)
-{
-	TI_HANDLE hStaCap;
-
-	/* allocate module object */
-	hStaCap = os_memoryAlloc (hOs, sizeof(TStaCap));
-	
-	if (!hStaCap)
-	{
-		WLAN_OS_REPORT (("StaCap_Create():  Allocation failed!!\n"));
-		return NULL;
-	}
-	
-    os_memoryZero (hOs, hStaCap, (sizeof(TStaCap)));
-
-	return (hStaCap);
-}
-
-
-/** 
- * \fn     StaCap_Destroy
- * \brief  Destroy the module. 
- * 
- * Free the module's queues and object.
- * 
- * \param  hStaCap - The module object
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     StaCap_Create
- */ 
-TI_STATUS StaCap_Destroy (TI_HANDLE hStaCap)
-{
-    TStaCap *pStaCap = (TStaCap *)hStaCap;
-
-    /* free module object */
-	os_memoryFree (pStaCap->hOs, pStaCap, sizeof(TStaCap));
-	
-    return TI_OK;
-}
-
-
-/** 
- * \fn     StaCap_Init 
- * \brief  Init required handles 
- * 
- * Init required handles and module variables.
- * 
- * \note    
- * \param  pStadHandles  - The driver modules handles
- * \return TI_OK on success or TI_NOK on failure  
- * \sa     
- */ 
-TI_STATUS StaCap_Init (TStadHandlesList *pStadHandles)
-{
-	TStaCap *pStaCap = (TStaCap *)pStadHandles->hStaCap;
-    
-    pStaCap->hOs       = pStadHandles->hOs;
-    pStaCap->hReport   = pStadHandles->hReport;
-    pStaCap->hTWD      = pStadHandles->hTWD;
-    pStaCap->hQosMngr  = pStadHandles->hQosMngr;
-    pStaCap->hSme      = pStadHandles->hSme;
-    
-	return TI_OK;
-}
-
-
-/** 
- * \fn     StaCap_IsHtEnable
- * \brief  verify if HT enable\disable at the STA according to 11n_Enable init flag and Chip type   
- * 
- * \note   
- * \param  hStaCap - The module object
- * \param  b11nEnable - pointer to enable\disable flag 
- * \return NONE 
- * \sa     
- */ 
-void StaCap_IsHtEnable (TI_HANDLE hStaCap, TI_BOOL *b11nEnable)
-{
-    TStaCap             *pStaCap = (TStaCap *)hStaCap;
-    TTwdHtCapabilities  *pTwdHtCapabilities;
-    paramInfo_t         tParam;
-
-    tParam.paramType = SME_DESIRED_BSS_TYPE_PARAM;
-    sme_GetParam (pStaCap->hSme, &tParam);
-
-    /* If Infra-BSS, get actual HT capabilities from TWD */
-    if (tParam.content.smeDesiredBSSType == BSS_INFRASTRUCTURE) 
-    {
-        TWD_GetTwdHtCapabilities (pStaCap->hTWD, &pTwdHtCapabilities);
-        *b11nEnable = pTwdHtCapabilities->b11nEnable;
-    }
-    /* If IBSS, HT shouldn't be used */
-    else 
-    {
-        *b11nEnable = TI_FALSE;
-    }
-}
-
-
-/** 
- * \fn     StaCap_GetHtCapabilitiesIe
- * \brief  Get the desired STA HT capabilities IE. get the physical HT capabilities from TWD 
- * and build HT capabilities IE. 
- * 
- * \note   
- * \param  hStaCap - The module object
- * \param  pRequest - pointer to request buffer\n 
- * \param  len - size of returned IE\n            
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     
- */ 
-TI_STATUS StaCap_GetHtCapabilitiesIe (TI_HANDLE hStaCap, TI_UINT8 *pRequest, TI_UINT32 *pLen)
-{
-    TStaCap                 *pStaCap = (TStaCap *)hStaCap;
-    TTwdHtCapabilities      *pTwdHtCapabilities;
-    TI_UINT8			    *pDataBuf = pRequest;
-    TStaCapHtCapabilities   tHtCapabilities;
-    TI_BOOL                 bWmeEnable;
-
-    /* verify that WME flag enable */
-    qosMngr_GetWmeEnableFlag (pStaCap->hQosMngr, &bWmeEnable); 
-    if (bWmeEnable == TI_FALSE)
-    {
-        TRACE0(pStaCap->hReport, REPORT_SEVERITY_INFORMATION, "StaCap_GetHtCapabilitiesIe: 802.11n disable due to WME init flag.\n");
-   		*pLen = 0;
-		return TI_OK;
-    }
-
-    TWD_GetTwdHtCapabilities (pStaCap->hTWD, &pTwdHtCapabilities);
-    /* verify that 802.11n flag enable */
-    if (pTwdHtCapabilities->b11nEnable == TI_FALSE)
-    {
-        TRACE0(pStaCap->hReport, REPORT_SEVERITY_INFORMATION, "StaCap_GetHtCapabilitiesIe: 802.11n disable due to 11n_Enable init flag.\n");
-   		*pLen = 0;
-		return TI_OK;
-    }
-
-    /* 
-     * set TWD values to HT capabilities structure 
-     *
-     * Note: all numbers after "<<" represent the position of the values in the filed according  
-     * to 11n SPEC.
-     */
-    tHtCapabilities.uHtCapabilitiesInfo = ((pTwdHtCapabilities->uChannelWidth   << 1) |
-                                           (pTwdHtCapabilities->uRxSTBC         << 8) |
-                                           (pTwdHtCapabilities->uMaxAMSDU       << 11)|
-                                           (DSSS_CCK_MODE                       << 12));
-
-    tHtCapabilities.uHtCapabilitiesInfo |= ((((pTwdHtCapabilities->uHTCapabilitiesBitMask & CAP_BIT_MASK_LDPC_CODING)                       ? 1 : 0) << 0) |
-                                            (((pTwdHtCapabilities->uHTCapabilitiesBitMask & CAP_BIT_MASK_GREENFIELD_FRAME_FORMAT)           ? 1 : 0) << 4) |
-                                            (((pTwdHtCapabilities->uHTCapabilitiesBitMask & CAP_BIT_MASK_SHORT_GI_FOR_20MHZ_PACKETS)        ? 1 : 0) << 5) |
-                                            (((pTwdHtCapabilities->uHTCapabilitiesBitMask & CAP_BIT_MASK_SHORT_GI_FOR_40MHZ_PACKETS)        ? 1 : 0) << 6) |
-                                            (((pTwdHtCapabilities->uHTCapabilitiesBitMask & CAP_BIT_MASK_SUPPORT_FOR_STBC_IN_TRANSMISSION)  ? 1 : 0) << 7) |
-                                            (((pTwdHtCapabilities->uHTCapabilitiesBitMask & CAP_BIT_MASK_DELAYED_BLOCK_ACK)                 ? 1 : 0) << 10) |
-                                            (((pTwdHtCapabilities->uHTCapabilitiesBitMask & CAP_BIT_MASK_DSSS_CCK_IN_40_MHZ)                ? 1 : 0) << 12) |
-                                            (((pTwdHtCapabilities->uHTCapabilitiesBitMask & CAP_BIT_MASK_LSIG_TXOP_PROTECTION)              ? 1 : 0) << 15));
-
-    tHtCapabilities.uAMpduParam = ((pTwdHtCapabilities->uMaxAMPDU       << 0) |
-                                   (pTwdHtCapabilities->uAMPDUSpacing   << 2));
-
-    /* copy RX supported MCS rates */
-    os_memoryCopy (pStaCap->hOs, tHtCapabilities.tSuppMcsSet.aRxMscBitmask, pTwdHtCapabilities->aRxMCS, RX_TX_MCS_BITMASK_SIZE);
-
-    tHtCapabilities.tSuppMcsSet.uHighestSupportedDataRate = pTwdHtCapabilities->uRxMaxDataRate;
-
-    /* check if supported MCS rates identical to TX and RX */
-    if( 0 == os_memoryCompare(pStaCap->hOs, pTwdHtCapabilities->aRxMCS, pTwdHtCapabilities->aTxMCS, RX_TX_MCS_BITMASK_SIZE))
-    {
-        tHtCapabilities.tSuppMcsSet.uTxRxSetting = ((TX_MCS_SET_YES     <<  0) |    /* set supported TX MCS rate */
-                                                    (TX_RX_NOT_EQUAL_NO <<  1));    /* set TX&RX MCS rate are equal */
-    } 
-    /* in case supported MCS rates TX different from the RX */
-    else
-    {
-        TI_UINT32 i;
-
-        /* check if there are TX MCS rates supported */
-        for (i = 0; i <= (RX_TX_MCS_BITMASK_SIZE - 1); ++i) 
-        {
-            if (pTwdHtCapabilities->aTxMCS[i] != 0)
-            {
-                break;
-            }
-        }
-
-        /* TX MCS supported */
-        if(i <= (RX_TX_MCS_BITMASK_SIZE -1))
-        {
-            tHtCapabilities.tSuppMcsSet.uTxRxSetting = ((TX_MCS_SET_YES         <<  0) |    /* set supported TX MCS rates */    
-                                                        (TX_RX_NOT_EQUAL_YES    <<  1));    /* set TX&RX MCS rates different */ 
-        }
-        /* TX MCS not supported */
-        else
-        {
-            tHtCapabilities.tSuppMcsSet.uTxRxSetting = (TX_MCS_SET_NO          <<  0);      /* set no supported TX MCS rates */
-        }
-    }
-
-    tHtCapabilities.uExteCapabilities = (((pTwdHtCapabilities->uHTCapabilitiesBitMask & CAP_BIT_MASK_PCO) ? 1 : 0) << 0);
-
-    if (tHtCapabilities.uExteCapabilities != 0)
-    {
-        tHtCapabilities.uExteCapabilities |= (pTwdHtCapabilities->uPCOTransTime <<  1);  
-    }
-
-    tHtCapabilities.uExteCapabilities |= ((pTwdHtCapabilities->uMCSFeedback << 8) |
-                                          (HTC_SUPPORT_NO                   << 10));
-
-	tHtCapabilities.uTxBfCapabilities = 0x0;
-
-    tHtCapabilities.uAselCapabilities = 0x0;
-
-
-    /* build IE */
-    *pDataBuf       = HT_CAPABILITIES_IE_ID;
-    *(pDataBuf + 1) = DOT11_HT_CAPABILITIES_ELE_LEN;
-    COPY_WLAN_WORD(pDataBuf + 2, &(tHtCapabilities.uHtCapabilitiesInfo));
-    *(pDataBuf + 4) = tHtCapabilities.uAMpduParam;
-    os_memoryCopy (pStaCap->hOs, pDataBuf + 5, tHtCapabilities.tSuppMcsSet.aRxMscBitmask, RX_TX_MCS_BITMASK_SIZE);
-    COPY_WLAN_WORD(pDataBuf + 15, &(tHtCapabilities.tSuppMcsSet.uHighestSupportedDataRate));
-    *(pDataBuf + 17) = tHtCapabilities.tSuppMcsSet.uTxRxSetting;
-    /* clear the reserved bytes */
-    os_memoryZero (pStaCap->hOs, (pDataBuf + 18), 3);
-    COPY_WLAN_WORD(pDataBuf + 21, &(tHtCapabilities.uExteCapabilities));
-    COPY_WLAN_LONG(pDataBuf + 23, &(tHtCapabilities.uTxBfCapabilities));
-    *(pDataBuf + 27) = tHtCapabilities.uAselCapabilities;
-
-    *pLen = DOT11_HT_CAPABILITIES_ELE_LEN + sizeof(dot11_eleHdr_t);
-
-    return TI_OK;
-}
-
diff --git a/wl1271/stad/src/Sta_Management/StaCap.h b/wl1271/stad/src/Sta_Management/StaCap.h
deleted file mode 100644
index b07f3cc..0000000
--- a/wl1271/stad/src/Sta_Management/StaCap.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * StaCap.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-/** \file   StaCap.h 
- *  \brief  StaCap module header file.                                  
- *
- *  \see    StaCap.c
- */
-
-#ifndef _STA_CAP_H_
-#define _STA_CAP_H_
-
-#include "TWDriver.h"
-#include "DrvMainModules.h"
-
-/* The main StaCap module structure */
-typedef struct 
-{
-	TI_HANDLE   hOs;
-	TI_HANDLE   hReport;
-    TI_HANDLE   hTWD;
-    TI_HANDLE   hQosMngr;
-    TI_HANDLE   hSme;
-
-} TStaCap;	
-
-/* The Supported MCS Set field structure acording 802.11n SPEC*/
-typedef struct 
-{
-    TI_UINT8    aRxMscBitmask[RX_TX_MCS_BITMASK_SIZE];
-	TI_UINT16   uHighestSupportedDataRate;
-	TI_UINT8    uTxRxSetting;
-	TI_UINT8    aReserved[3];
-} TStaCapSuppMcsSet;	
-
-/* The HT Capabilities element structure acording 802.11n SPEC*/
-typedef struct 
-{
-    TI_UINT16	        uHtCapabilitiesInfo;
-    TI_UINT8	        uAMpduParam;
-    TStaCapSuppMcsSet   tSuppMcsSet;
-    TI_UINT16	        uExteCapabilities;
-    TI_UINT32	        uTxBfCapabilities;
-    TI_UINT8	        uAselCapabilities;
-} TStaCapHtCapabilities ;	
-
-
-/* External Functions Prototypes */
-/* ============================= */
-TI_HANDLE StaCap_Create (TI_HANDLE hOs);
-TI_STATUS StaCap_Destroy (TI_HANDLE hStaCap);
-TI_STATUS StaCap_Init (TStadHandlesList *pStadHandles);
-TI_STATUS StaCap_GetHtCapabilitiesIe (TI_HANDLE hStaCap, TI_UINT8 *pRequest, TI_UINT32 *pLen);
-void StaCap_IsHtEnable (TI_HANDLE hStaCap, TI_BOOL *b11nEnable);
-#endif  /* _STA_CAP_H_ */
-
-
diff --git a/wl1271/stad/src/Sta_Management/assocSM.c b/wl1271/stad/src/Sta_Management/assocSM.c
deleted file mode 100644
index a4740fb..0000000
--- a/wl1271/stad/src/Sta_Management/assocSM.c
+++ /dev/null
@@ -1,1630 +0,0 @@
-/*
- * assocSM.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file assocSM.c
- *  \brief 802.11 association SM source
- *
- *  \see assocSM.h
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*      MODULE: assocSM.c                                                  */
-/*    PURPOSE:  802.11 association SM source                               */
-/*                                                                         */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_63
-#include "osApi.h"
-#include "paramOut.h"
-#include "rate.h"
-#include "timer.h"
-#include "fsm.h"
-#include "report.h"
-#include "DataCtrl_Api.h"
-#include "siteMgrApi.h"
-#include "rsnApi.h"
-#include "regulatoryDomainApi.h"
-#include "mlmeBuilder.h"
-#include "mlmeApi.h"
-#include "AssocSM.h"
-#include "qosMngr_API.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCRMMngr.h"
-#include "XCCMngr.h"
-#endif
-#include "apConn.h"
-#include "TWDriver.h"
-#include "DrvMainModules.h"
-#include "StaCap.h"
-#include "smeApi.h"
-#include "rsn.h"
-
-/* Constants */
-
-/** number of states in the state machine */
-#define ASSOC_SM_NUM_STATES     3
-
-/** number of events in the state machine */
-#define ASSOC_SM_NUM_EVENTS     6
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Global variables */
-
-/* Local function prototypes */
-
-/* functions */
-
-
-/* state machine functions */
-
-
-TI_STATUS assoc_smEvent(assoc_t *pAssoc, TI_UINT8 event, void *pData);
-
-void assoc_smTimeout(TI_HANDLE hAssoc, TI_BOOL bTwdInitOccured);
-
-TI_STATUS assoc_smStartIdle(assoc_t *pAssoc);
-TI_STATUS assoc_smStopWait(assoc_t *pAssoc);
-TI_STATUS assoc_smSuccessWait(assoc_t *pAssoc);
-TI_STATUS assoc_smFailureWait(assoc_t *pAssoc);
-TI_STATUS assoc_smTimeoutWait(assoc_t *pAssoc);
-TI_STATUS assoc_smMaxRetryWait(assoc_t *pAssoc);
-TI_STATUS assoc_smStopAssoc(assoc_t *pAssoc);
-TI_STATUS assoc_smActionUnexpected(assoc_t *pAssoc);
-
-TI_STATUS assoc_smResetRetry(assoc_t *pAssoc);
-TI_STATUS assoc_smIncRetry(assoc_t *pAssoc);
-TI_STATUS assoc_smReportSuccess(assoc_t *pAssoc);
-TI_STATUS assoc_smReportFailure(assoc_t *pAssoc, TI_UINT16 uStatusCode);
-TI_STATUS assoc_smSendAssocReq(assoc_t *pAssoc);
-TI_STATUS assoc_smStartTimer(assoc_t *pAssoc);
-TI_STATUS assoc_smStopTimer(assoc_t *pAssoc);
-
-TI_STATUS assoc_smCapBuild(assoc_t *pCtx, TI_UINT16 *cap);
-TI_STATUS assoc_smSSIDBuild(assoc_t *pCtx, TI_UINT8 *pSSID, TI_UINT32 *ssidLen);
-TI_STATUS assoc_smRatesBuild(assoc_t *pCtx, TI_UINT8 *pRates, TI_UINT32 *ratesLen);
-TI_STATUS assoc_smRequestBuild(assoc_t *pCtx, TI_UINT8* reqBuf, TI_UINT32* reqLen);
-
-TI_STATUS assoc_saveAssocReqMessage(assoc_t *pAssocSm, TI_UINT8 *pAssocBuffer, TI_UINT32 length);
-TI_STATUS assoc_sendDisAssoc(assoc_t *pAssocSm, mgmtStatus_e reason);
-
-/**
-*
-* assoc_create - allocate memory for association SM
-*
-* \b Description: 
-*
-* Allocate memory for association SM. \n
-*       Allocates memory for Association context. \n
-*       Allocates memory for association SM matrix. \n
-*
-* \b ARGS:
-*
-*  I   - hOs - OS context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_mainSecSmKeysOnlyStop()
-*/
-TI_HANDLE assoc_create(TI_HANDLE hOs)
-{
-    assoc_t     *pHandle;
-    TI_STATUS       status;
-
-    /* allocate association context memory */
-    pHandle = (assoc_t*)os_memoryAlloc(hOs, sizeof(assoc_t));
-    if (pHandle == NULL)
-    {
-        return NULL;
-    }
-
-    os_memoryZero(hOs, pHandle, sizeof(assoc_t));
-
-    pHandle->hOs = hOs;
-
-    /* allocate memory for association state machine */
-    status = fsm_Create(hOs, &pHandle->pAssocSm, ASSOC_SM_NUM_STATES, ASSOC_SM_NUM_EVENTS);
-    if (status != TI_OK)
-    {
-        os_memoryFree(hOs, pHandle, sizeof(assoc_t));
-        return NULL;
-    }
-
-    return pHandle;
-}
-
-
-/**
-*
-* assocunload - unload association SM from memory
-*
-* \b Description: 
-*
-* Unload association SM from memory
-*
-* \b ARGS:
-*
-*  I   - hAssoc - association SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_mainSecSmKeysOnlyStop()
-*/
-TI_STATUS assoc_unload(TI_HANDLE hAssoc)
-{
-    TI_STATUS       status;
-    assoc_t     *pHandle;
-
-    pHandle = (assoc_t*)hAssoc;
-
-    status = fsm_Unload(pHandle->hOs, pHandle->pAssocSm);
-    if (status != TI_OK)
-    {
-        /* report failure but don't stop... */
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "ASSOC_SM: Error releasing FSM memory \n");
-    }
-    
-	if (pHandle->hAssocSmTimer)
-	{
-		tmr_DestroyTimer (pHandle->hAssocSmTimer);
-	}
-    
-    os_memoryFree(pHandle->hOs, hAssoc, sizeof(assoc_t));
-
-    return TI_OK;
-}
-
-/**
-*
-* assoc_config - configure a new association SM
-*
-* \b Description: 
-*
-* Configure a new association SM.
-*
-* \b RETURNS:
-*
-*  void
-*
-* \sa assoc_Create, assoc_Unload
-*/
-void assoc_init (TStadHandlesList *pStadHandles)
-{
-    assoc_t *pHandle = (assoc_t*)(pStadHandles->hAssoc);
-    
-    /** Main 802.1X State Machine matrix */
-    fsm_actionCell_t    assoc_smMatrix[ASSOC_SM_NUM_STATES][ASSOC_SM_NUM_EVENTS] =
-    {
-        /* next state and actions for IDLE state */
-        {{ASSOC_SM_STATE_WAIT, (fsm_Action_t)assoc_smStartIdle},
-         {ASSOC_SM_STATE_IDLE, (fsm_Action_t)assoc_smActionUnexpected},
-         {ASSOC_SM_STATE_IDLE, (fsm_Action_t)assoc_smActionUnexpected},
-         {ASSOC_SM_STATE_IDLE, (fsm_Action_t)assoc_smActionUnexpected},
-         {ASSOC_SM_STATE_IDLE, (fsm_Action_t)assoc_smActionUnexpected},
-         {ASSOC_SM_STATE_IDLE, (fsm_Action_t)assoc_smActionUnexpected}
-        },
-        /* next state and actions for WAIT state */
-        {{ASSOC_SM_STATE_WAIT, (fsm_Action_t)assoc_smActionUnexpected},
-         {ASSOC_SM_STATE_IDLE, (fsm_Action_t)assoc_smStopWait},
-         {ASSOC_SM_STATE_ASSOC, (fsm_Action_t)assoc_smSuccessWait},
-         {ASSOC_SM_STATE_IDLE, (fsm_Action_t)assoc_smFailureWait},
-         {ASSOC_SM_STATE_WAIT, (fsm_Action_t)assoc_smTimeoutWait},
-         {ASSOC_SM_STATE_IDLE, (fsm_Action_t)assoc_smMaxRetryWait}
-        },
-        /* next state and actions for ASSOC state */
-        {{ASSOC_SM_STATE_ASSOC, (fsm_Action_t)assoc_smActionUnexpected},
-         {ASSOC_SM_STATE_IDLE, (fsm_Action_t)assoc_smStopAssoc},
-         {ASSOC_SM_STATE_ASSOC, (fsm_Action_t)assoc_smActionUnexpected},
-         {ASSOC_SM_STATE_ASSOC, (fsm_Action_t)assoc_smActionUnexpected},
-         {ASSOC_SM_STATE_ASSOC, (fsm_Action_t)assoc_smActionUnexpected},
-         {ASSOC_SM_STATE_ASSOC, (fsm_Action_t)assoc_smActionUnexpected}
-        }};
-    
-    /* configure state machine */
-    fsm_Config (pHandle->pAssocSm, &assoc_smMatrix[0][0], ASSOC_SM_NUM_STATES, ASSOC_SM_NUM_EVENTS, NULL, pStadHandles->hOs);
-
-    pHandle->assocRejectCount = 0;
-    pHandle->assocTimeoutCount = 0;
-    pHandle->currentState = ASSOC_SM_STATE_IDLE;
-    
-    pHandle->hMlme             = pStadHandles->hMlmeSm;
-    pHandle->hRegulatoryDomain = pStadHandles->hRegulatoryDomain;
-    pHandle->hSiteMgr          = pStadHandles->hSiteMgr;
-    pHandle->hCtrlData         = pStadHandles->hCtrlData;
-    pHandle->hTWD              = pStadHandles->hTWD;
-    pHandle->hRsn              = pStadHandles->hRsn;
-    pHandle->hReport           = pStadHandles->hReport;
-    pHandle->hOs               = pStadHandles->hOs;
-    pHandle->hXCCMngr          = pStadHandles->hXCCMngr;
-    pHandle->hQosMngr          = pStadHandles->hQosMngr;
-    pHandle->hMeasurementMgr   = pStadHandles->hMeasurementMgr;
-    pHandle->hApConn           = pStadHandles->hAPConnection;
-    pHandle->hTimer            = pStadHandles->hTimer;
-    pHandle->hStaCap = pStadHandles->hStaCap;
-    pHandle->hSme              = pStadHandles->hSme;
-
-}
-
-
-TI_STATUS assoc_SetDefaults (TI_HANDLE hAssoc, assocInitParams_t *pAssocInitParams)
-{
-    assoc_t *pHandle = (assoc_t*)hAssoc;
-
-    pHandle->timeout = pAssocInitParams->assocResponseTimeout;
-    pHandle->maxCount = pAssocInitParams->assocMaxRetryCount;
-
-    /* allocate OS timer memory */
-    pHandle->hAssocSmTimer = tmr_CreateTimer (pHandle->hTimer);
-    if (pHandle->hAssocSmTimer == NULL)
-    {
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "assoc_SetDefaults(): Failed to create hAssocSmTimer!\n");
-        return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-
-/**
-*
-* assoc_start - Start event for the association SM
-*
-* \b Description: 
-*
-* Start event for the association SM
-*
-* \b ARGS:
-*
-*  I   - hAssoc - Association SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa assoc_Stop, assoc_Recv
-*/
-TI_STATUS assoc_start(TI_HANDLE hAssoc)
-{
-    TI_STATUS       status;
-    assoc_t     *pHandle;
-
-    pHandle = (assoc_t*)hAssoc;
-
-    if (pHandle == NULL)
-    {
-        return TI_NOK;
-    }
-
-    pHandle->reAssoc = TI_FALSE;
-
-    pHandle->disAssoc = TI_FALSE;
-
-    status = assoc_smEvent(pHandle, ASSOC_SM_EVENT_START, hAssoc);
-
-    return status;
-}
-
-
-/**
-*
-* assoc_start - Start event for the association SM
-*
-* \b Description: 
-*
-* Start event for the association SM - for Re-assoc request 
-*
-* \b ARGS:
-*
-*  I   - hAssoc - Association SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa assoc_Stop, assoc_Recv
-*/
-TI_STATUS reassoc_start(TI_HANDLE hAssoc)
-{
-    TI_STATUS       status;
-    assoc_t     *pHandle;
-
-    pHandle = (assoc_t*)hAssoc;
-
-    if (pHandle == NULL)
-    {
-        return TI_NOK;
-    }
-    pHandle->reAssoc = TI_TRUE;
-
-    status = assoc_smEvent(pHandle, ASSOC_SM_EVENT_START, hAssoc);
-
-    return status;
-}
-
-/**
-*
-* assoc_stop - Stop event for the association SM
-*
-* \b Description: 
-*
-* Stop event for the association SM
-*
-* \b ARGS:
-*
-*  I   - hAssoc - Association SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa assoc_Start, assoc_Recv
-*/
-TI_STATUS assoc_stop(TI_HANDLE hAssoc)
-{
-    TI_STATUS       status;
-    assoc_t     *pHandle;
-
-    pHandle = (assoc_t*)hAssoc;
-
-    if (pHandle == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    status = assoc_smEvent(pHandle, ASSOC_SM_EVENT_STOP, hAssoc);
-    
-    return status;
-}
-
-
-TI_STATUS assoc_setDisAssocFlag(TI_HANDLE hAssoc, TI_BOOL disAsoccFlag)
-{
-    assoc_t     *pHandle;
-    pHandle = (assoc_t*)hAssoc; 
-
-    pHandle->disAssoc = disAsoccFlag;
-
-    return TI_OK;
-}
-
-
-
-/**
-*
-* assoc_recv - Recive a message from the AP
-*
-* \b Description: 
-*
-* Parse a message form the AP and perform the appropriate event.
-*
-* \b ARGS:
-*
-*  I   - hAssoc - Association SM context  \n
-*  I   - pFrame - Frame recieved  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa assoc_Start, assoc_Stop
-*/
-TI_STATUS assoc_recv(TI_HANDLE hAssoc, mlmeFrameInfo_t *pFrame)
-{
-    TI_STATUS       status;
-    assoc_t         *pHandle = (assoc_t*)hAssoc;
-    TTwdParamInfo   tTwdParam;
-    TI_UINT16           rspStatus;
-
-    if (pHandle == NULL)
-    {
-        return TI_NOK;
-    }
-
-    /* ensure that the SM is waiting for assoc response */
-    if(pHandle->currentState != ASSOC_SM_STATE_WAIT)
-        return TI_OK;
-
-    
-    if ((pFrame->subType != ASSOC_RESPONSE) && (pFrame->subType != RE_ASSOC_RESPONSE))
-    {
-        return TI_NOK;
-    }
-
-    /* check response status */
-    rspStatus  = pFrame->content.assocRsp.status;
-    
-    if (rspStatus == 0)
-    {
-        TRsnData        rsnData;
-        dot11_RSN_t *pRsnIe;
-        TI_UINT8       curRsnData[255];
-        TI_UINT8       rsnAssocIeLen;
-        TI_UINT8        length = 0;
-
-
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "ASSOC_SM: DEBUG Success associating to AP \n");
-        
-        /* set AID to HAL */
-        tTwdParam.paramType = TWD_AID_PARAM_ID;
-        tTwdParam.content.halCtrlAid  = pFrame->content.assocRsp.aid;
-        TWD_SetParam (pHandle->hTWD, &tTwdParam);
-        
-
-        /* Get the RSN IE data */
-        pRsnIe = pFrame->content.assocRsp.pRsnIe;
-        while (length < pFrame->content.assocRsp.rsnIeLen && (pFrame->content.assocRsp.rsnIeLen < 255))
-        {
-            curRsnData[0+length] = pRsnIe->hdr[0];
-            curRsnData[1+length] = pRsnIe->hdr[1];
-            os_memoryCopy(pHandle->hOs, &curRsnData[2+length], (void *)pRsnIe->rsnIeData, pRsnIe->hdr[1]); 
-            length += pRsnIe->hdr[1] + 2;
-            pRsnIe += 1;
-        }
-        
-        if (pFrame->content.assocRsp.rsnIeLen != 0)
-        {
-            rsnData.pIe = curRsnData;
-            rsnData.ieLen = pFrame->content.assocRsp.rsnIeLen;
-            rsnData.privacy =  ((pFrame->content.assocRsp.capabilities >> CAP_PRIVACY_SHIFT) & CAP_PRIVACY_MASK) ? TI_TRUE : TI_FALSE;
-            rsn_setSite(pHandle->hRsn, &rsnData, NULL, &rsnAssocIeLen);
-        }
-
-        /* update siteMgr with capabilities and whether we are connected to Cisco AP */
-        siteMgr_assocReport(pHandle->hSiteMgr,
-                            pFrame->content.assocRsp.capabilities, pFrame->content.assocRsp.ciscoIEPresent);
-
-        /* update QoS Manager - it the QOS active protocol is NONE, or no WME IE present, it will return TI_OK */
-        /* if configured by AP, update MSDU lifetime */
-        status = qosMngr_setSite(pHandle->hQosMngr, &pFrame->content.assocRsp);
-
-        if(status != TI_OK)
-        {
-            TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "ASSOC_SM: DEBUG - Association failed : qosMngr_setSite error \n");
-            /* in case we wanted to work with qosAP and failed to connect to qos AP we want to reassociated again 
-               to another one */  
-            status = assoc_smEvent(pHandle, ASSOC_SM_EVENT_FAIL, hAssoc);
-        }
-        else
-        {
-            status = assoc_smEvent(pHandle, ASSOC_SM_EVENT_SUCCESS, hAssoc);
-        }
-    } 
-    else 
-    {
-        pHandle->assocRejectCount++;
-        
-        /* If there was attempt to renegotiate voice settings, update QoS Manager */
-        qosMngr_checkTspecRenegResults(pHandle->hQosMngr, &pFrame->content.assocRsp);
-
-        /* check failure reason */
-        switch (rspStatus)
-        {
-        case 0:
-            break;
-        case 1:
-            /* print debug message */
-            TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "ASSOC_SM: DEBUG - Association denied: Unspecified error \n");
-            break;
-        case 10:
-            /* print debug message */
-            TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "ASSOC_SM: DEBUG - Association denied: Cannot support all requested capabilities in the Capability Information field \n");
-            break;
-        case 11:
-            /* print debug message */
-            TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "ASSOC_SM: DEBUG - Association denied: Reassociation denied due to inability to confirm that association exists \n");
-            break;
-        case 12:
-            /* print debug message */
-            TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "ASSOC_SM: DEBUG - Association denied: Association denied due to reason outside the scope of this standard \n");
-            rsn_reportAuthFailure(pHandle->hRsn, RSN_AUTH_STATUS_INVALID_TYPE);
-            break;
-        case 13:
-            TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "ASSOC_SM: DEBUG - Association denied: Association denied due to wrong authentication algorithm \n");
-            rsn_reportAuthFailure(pHandle->hRsn, RSN_AUTH_STATUS_INVALID_TYPE);
-            break;
-        case 17:
-            /* print debug message */
-            TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "ASSOC_SM: DEBUG - Association denied: Association denied because AP is unable to handle additional associated stations \n");
-            break;
-        case 18:
-            /* print debug message */
-            TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "ASSOC_SM: DEBUG - Association denied: Association denied due to requesting station not supporting all of the data rates in the BSSBasicRateSet parameter \n");
-            break;
-        default:
-            /* print error message on wrong error code for association response */
-            TRACE1(pHandle->hReport, REPORT_SEVERITY_ERROR, "ASSOC_SM: ERROR - Association denied: error code (%d) irrelevant \n", rspStatus);
-            break;
-        }
-
-        status = assoc_smEvent(pHandle, ASSOC_SM_EVENT_FAIL, hAssoc);
-    }
-
-    return status;
-}
-
-/**
-*
-* assoc_getParam - Get a specific parameter from the association SM
-*
-* \b Description: 
-*
-* Get a specific parameter from the association SM.
-*
-* \b ARGS:
-*
-*  I   - hAssoc - Association SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa assoc_Start, assoc_Stop
-*/
-TI_STATUS assoc_getParam(TI_HANDLE hAssoc, paramInfo_t *pParam)
-{
-    assoc_t *pHandle = (assoc_t *)hAssoc;
-
-    if ((pHandle == NULL) || (pParam == NULL))
-    {
-        return TI_NOK;
-    }
-
-    /* serch parameter type */
-    switch (pParam->paramType)
-    {
-    case ASSOC_RESPONSE_TIMEOUT_PARAM:
-        pParam->content.assocResponseTimeout = pHandle->timeout;
-        break;
-
-    case ASSOC_COUNTERS_PARAM:
-        pParam->content.siteMgrTiWlanCounters.AssocRejects = pHandle->assocRejectCount;
-        pParam->content.siteMgrTiWlanCounters.AssocTimeouts = pHandle->assocTimeoutCount;
-        break;
-
-    case ASSOC_ASSOCIATION_REQ_PARAM:
-        pParam->content.assocReqBuffer.buffer = pHandle->assocReqBuffer;
-        pParam->content.assocReqBuffer.bufferSize = pHandle->assocReqLen;
-		pParam->content.assocReqBuffer.reAssoc = pHandle->reAssoc;
-        break;
-
-    case ASSOC_ASSOCIATION_RESP_PARAM:
-        pParam->content.assocReqBuffer.buffer = pHandle->assocRespBuffer;
-        pParam->content.assocReqBuffer.bufferSize = pHandle->assocRespLen;
-		pParam->content.assocReqBuffer.reAssoc = pHandle->reAssocResp;
-        break;
-
-    case ASSOC_ASSOCIATION_INFORMATION_PARAM:
-       {
-           TI_UINT8  reqBuffIEOffset, respBuffIEOffset;
-           TI_UINT32 RequestIELength = 0;
-           TI_UINT32 ResponseIELength = 0;
-           paramInfo_t  *lParam;
-           ScanBssType_enum bssType;
-
-           TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "ASSOC_SM: DEBUG - Association Information Get:  \n");
-           lParam = (paramInfo_t *)os_memoryAlloc(pHandle->hOs, sizeof(paramInfo_t));
-           if (!lParam)
-           {
-               return TI_NOK;
-           }
-
-           /* Assoc exists only in Infrastructure */
-           lParam->paramType = CTRL_DATA_CURRENT_BSS_TYPE_PARAM;
-           ctrlData_getParam(pHandle->hCtrlData, lParam);
-           bssType = lParam->content.ctrlDataCurrentBssType;
-           os_memoryFree(pHandle->hOs, lParam, sizeof(paramInfo_t));
-           if (bssType != BSS_INFRASTRUCTURE)
-           {
-               TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "Not in Infrastructure BSS, No ASSOC Info for GET ASSOC_ASSOCIATION_INFORMATION_PARAM\n");
-               return TI_NOK;
-           }
-
-           /* Init the result buffer to 0 */
-           os_memoryZero(pHandle->hOs ,&pParam->content, sizeof(OS_802_11_ASSOCIATION_INFORMATION));
-
-           reqBuffIEOffset  = 4;  /* In Assoc request frame IEs are located from byte 4 */
-           respBuffIEOffset = 6;  /* In Assoc response frame the IEs are located from byte 6 */
-
-            /* If the last associate was re-associciation, the current AP MAC address */
-            /* is placed before the IEs. Copy it to the result parameters.            */
-            if (pHandle->reAssoc)
-            {
-                MAC_COPY (pParam->content.assocAssociationInformation.RequestFixedIEs.CurrentAPAddress,
-                          &pHandle->assocReqBuffer[reqBuffIEOffset]);
-                reqBuffIEOffset += MAC_ADDR_LEN;
-            }
-
-            /* Calculate length of Info elements in assoc request and response frames */
-            if(pHandle->assocReqLen > reqBuffIEOffset)
-                RequestIELength = pHandle->assocReqLen - reqBuffIEOffset;
-
-            if(pHandle->assocRespLen > respBuffIEOffset)
-                ResponseIELength = pHandle->assocRespLen - respBuffIEOffset;
-
-            /* Copy the association request information */
-            pParam->content.assocAssociationInformation.Length = sizeof(OS_802_11_ASSOCIATION_INFORMATION);
-            pParam->content.assocAssociationInformation.AvailableRequestFixedIEs = OS_802_11_AI_REQFI_CAPABILITIES | OS_802_11_AI_REQFI_LISTENINTERVAL;
-            pParam->content.assocAssociationInformation.RequestFixedIEs.Capabilities = *(TI_UINT16*)&(pHandle->assocReqBuffer[0]);
-            pParam->content.assocAssociationInformation.RequestFixedIEs.ListenInterval = *(TI_UINT16*)(&pHandle->assocReqBuffer[2]);
-
-            pParam->content.assocAssociationInformation.RequestIELength = RequestIELength; 
-            pParam->content.assocAssociationInformation.OffsetRequestIEs = 0;
-            if (RequestIELength > 0)
-            {
-                pParam->content.assocAssociationInformation.OffsetRequestIEs = (TI_UINT32)&pHandle->assocReqBuffer[reqBuffIEOffset];
-            }
-            /* Copy the association response information */
-            pParam->content.assocAssociationInformation.AvailableResponseFixedIEs = 
-                OS_802_11_AI_RESFI_CAPABILITIES | OS_802_11_AI_RESFI_STATUSCODE | OS_802_11_AI_RESFI_ASSOCIATIONID;
-            pParam->content.assocAssociationInformation.ResponseFixedIEs.Capabilities = *(TI_UINT16*)&(pHandle->assocRespBuffer[0]);
-            pParam->content.assocAssociationInformation.ResponseFixedIEs.StatusCode = *(TI_UINT16*)&(pHandle->assocRespBuffer[2]);
-            pParam->content.assocAssociationInformation.ResponseFixedIEs.AssociationId = *(TI_UINT16*)&(pHandle->assocRespBuffer[4]);
-            pParam->content.assocAssociationInformation.ResponseIELength = ResponseIELength;
-            pParam->content.assocAssociationInformation.OffsetResponseIEs = 0;
-            if (ResponseIELength > 0)
-            {
-                pParam->content.assocAssociationInformation.OffsetResponseIEs = (TI_UINT32)&pHandle->assocRespBuffer[respBuffIEOffset];
-            }
-
-       }
-        break;
-    default:
-        return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-/**
-*
-* assoc_setParam - Set a specific parameter to the association SM
-*
-* \b Description: 
-*
-* Set a specific parameter to the association SM.
-*
-* \b ARGS:
-*
-*  I   - hAssoc - Association SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa assoc_Start, assoc_Stop
-*/
-TI_STATUS assoc_setParam(TI_HANDLE hAssoc, paramInfo_t *pParam)
-{
-    assoc_t     *pHandle;
-
-    pHandle = (assoc_t*)hAssoc;
-
-    if ((pHandle == NULL) || (pParam == NULL))
-    {
-        return TI_NOK;
-    }
-
-    switch (pParam->paramType)
-    {
-    case ASSOC_RESPONSE_TIMEOUT_PARAM:
-        /* check bounds */
-        if ((pParam->content.assocResponseTimeout >= ASSOC_RESPONSE_TIMEOUT_MIN) &&
-            (pParam->content.assocResponseTimeout <= ASSOC_RESPONSE_TIMEOUT_MAX))
-        {
-            pHandle->timeout = pParam->content.assocResponseTimeout;
-        } else {
-            return TI_NOK;
-        }
-        break;
-    default:
-        return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-/**
-*
-* assoc_smTimeout - Time out event activation function
-*
-* \b Description: 
-*
-* Time out event activation function.
-*
-* \b ARGS:
-*
-*  I   - hAssoc - Association SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa assoc_Start, assoc_Stop
-*/
-void assoc_smTimeout(TI_HANDLE hAssoc, TI_BOOL bTwdInitOccured)
-{
-    assoc_t     *pHandle;
-
-    pHandle = (assoc_t*)hAssoc;
-
-
-    if (pHandle == NULL)
-    {
-        return;
-    }
-    
-    pHandle->assocTimeoutCount++;
-
-    assoc_smEvent(pHandle, ASSOC_SM_EVENT_TIMEOUT, hAssoc);
-}
-
-/**
-*
-* assoc_smEvent - Perform an event on the association SM
-*
-* \b Description: 
-*
-* Perform an event on the association SM.
-*
-* \b ARGS:
-*
-*  I   - pAssoc - Association SM context  \n
-*  I   - event - Current event \n
-*  I   - pData - event related data
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa 
-*/
-TI_STATUS assoc_smEvent(assoc_t *pAssoc, TI_UINT8 event, void *pData)
-{
-    TI_STATUS       status;
-    TI_UINT8        nextState;
-
-    status = fsm_GetNextState(pAssoc->pAssocSm, pAssoc->currentState, event, &nextState);
-    if (status != TI_OK)
-    {
-        TRACE0(pAssoc->hReport, REPORT_SEVERITY_ERROR, "ASSOC_SM: ERROR - failed getting next state \n");
-
-        return(TI_NOK);
-    }
-
-	TRACE3( pAssoc->hReport, REPORT_SEVERITY_INFORMATION, "assoc_smEvent: <currentState = %d, event = %d> --> nextState = %d\n", pAssoc->currentState, event, nextState);
-
-    status = fsm_Event(pAssoc->pAssocSm, &pAssoc->currentState, event, pData);
-
-    return(status);
-}
-
-/* state machine functions */
-
-TI_STATUS assoc_smStartIdle(assoc_t *pAssoc)
-{
-    TI_STATUS       status;
-
-    status = assoc_smResetRetry(pAssoc);
-    status = assoc_smSendAssocReq(pAssoc);
-    status = assoc_smStartTimer(pAssoc);
-    status = assoc_smIncRetry(pAssoc);
-
-    return status;
-}
-
-TI_STATUS assoc_smStopWait(assoc_t *pAssoc)
-{
-    TI_STATUS       status;
-
-    status = assoc_smStopTimer(pAssoc);
-
-    return status;
-}
-
-TI_STATUS assoc_smSuccessWait(assoc_t *pAssoc)
-{
-    TI_STATUS       status;
-
-    status = assoc_smStopTimer(pAssoc);
-    status = assoc_smReportSuccess(pAssoc);
-
-    return status;
-}
-
-TI_STATUS assoc_smFailureWait(assoc_t *pAssoc)
-{
-    TI_STATUS       status;
-    TI_UINT16           uRspStatus = *(TI_UINT16*)&(pAssoc->assocRespBuffer[2]);
-
-    status = assoc_smStopTimer(pAssoc);
-
-    /* Sanity check. If the Response status is indeed not 0 */
-    if (uRspStatus) 
-    {
-        status = assoc_smReportFailure(pAssoc, uRspStatus);
-    }
-    else    /* (uRspStatus == 0) how did we get here ? */ 
-    {
-        TRACE0(pAssoc->hReport, REPORT_SEVERITY_ERROR, "while Response status is OK (0) !!! \n");
-
-        status = assoc_smReportFailure(pAssoc, (TI_UINT16)TI_NOK);
-    }
-    return status;
-}
-
-TI_STATUS assoc_smTimeoutWait(assoc_t *pAssoc)
-{
-    TI_STATUS       status;
-
-    status = assoc_smSendAssocReq(pAssoc);
-    status = assoc_smStartTimer(pAssoc);
-    status = assoc_smIncRetry(pAssoc);
-
-    return status;
-}
-
-TI_STATUS assoc_smMaxRetryWait(assoc_t *pAssoc)
-{
-    TI_STATUS       status;
-
-    status = assoc_smStopTimer(pAssoc);
-    status = assoc_smReportFailure(pAssoc, STATUS_PACKET_REJ_TIMEOUT);
-
-    return status;
-}
-
-TI_STATUS assoc_smSendAssocReq(assoc_t *pAssoc)
-{
-    TI_UINT8           *assocMsg;
-    TI_UINT32           msgLen;
-    TI_STATUS           status;
-    dot11MgmtSubType_e  assocType=ASSOC_REQUEST;
-
-    assocMsg = os_memoryAlloc(pAssoc->hOs, MAX_ASSOC_MSG_LENGTH);
-    if (!assocMsg)
-    {
-        return TI_NOK;
-    }
-
-    if (pAssoc->reAssoc)
-    {
-        assocType = RE_ASSOC_REQUEST;
-    }
-    status = assoc_smRequestBuild(pAssoc, assocMsg, &msgLen);
-    if (status == TI_OK) {
-        /* Save the association request message */
-        assoc_saveAssocReqMessage(pAssoc, assocMsg, msgLen);
-        status = mlmeBuilder_sendFrame(pAssoc->hMlme, assocType, assocMsg, msgLen, 0);
-    }
-    os_memoryFree(pAssoc->hOs, assocMsg, MAX_ASSOC_MSG_LENGTH);
-    return status;
-}
-
-TI_STATUS assoc_smStopAssoc(assoc_t *pAssoc)
-{
-    if (pAssoc->disAssoc) {
-        assoc_sendDisAssoc(pAssoc, STATUS_UNSPECIFIED);
-    }
-    return TI_OK;
-}
-
-TI_STATUS assoc_smActionUnexpected(assoc_t *pAssoc)
-{
-    return TI_OK;
-}
-
-/* local functions */
-
-
-TI_STATUS assoc_smResetRetry(assoc_t *pAssoc)
-{
-    if (pAssoc == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    pAssoc->retryCount = 0;
-    
-    return TI_OK;
-}
-
-TI_STATUS assoc_smIncRetry(assoc_t *pAssoc)
-{
-    TI_STATUS       status;
-
-    if (pAssoc == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    pAssoc->retryCount++;
-    
-    if (pAssoc->retryCount > pAssoc->maxCount)
-    {
-        status = assoc_smEvent(pAssoc, ASSOC_SM_EVENT_MAX_RETRY, pAssoc);
-
-        return status;
-    }
-
-    return TI_OK;
-}
-
-TI_STATUS assoc_smReportSuccess(assoc_t *pAssoc)
-{
-    TI_STATUS       status;
-
-    if (pAssoc == NULL)
-    {
-        return TI_NOK;
-    }
-    status = mlme_reportAssocStatus(pAssoc->hMlme, (TI_UINT16)TI_OK);
-
-    return status;
-}
-
-TI_STATUS assoc_smReportFailure(assoc_t *pAssoc, TI_UINT16 uStatusCode)
-{
-    TI_STATUS       status;
-
-    if (pAssoc == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    status = mlme_reportAssocStatus(pAssoc->hMlme, uStatusCode);
-
-    return status;
-}
-
-TI_STATUS assoc_smStartTimer(assoc_t *pAssoc)
-{
-    if (pAssoc == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    tmr_StartTimer (pAssoc->hAssocSmTimer,
-                    assoc_smTimeout,
-                    (TI_HANDLE)pAssoc,
-                    pAssoc->timeout,
-                    TI_FALSE);
-
-    return TI_OK;
-}
-
-TI_STATUS assoc_smStopTimer(assoc_t *pAssoc)
-{
-    if (pAssoc == NULL)
-    {
-        return TI_NOK;
-    }
-    
-    tmr_StopTimer (pAssoc->hAssocSmTimer);
-
-	/* If the timer was stopped it means the association is over,
-	   so we can clear the generic IE */
-	rsn_clearGenInfoElement(pAssoc->hRsn);
-
-    return TI_OK;
-}
-
-/*****************************************************************************
-**
-** Association messages builder/Parser
-**
-*****************************************************************************/
-
-TI_STATUS assoc_smCapBuild(assoc_t *pCtx, TI_UINT16 *cap)
-{
-    paramInfo_t         param;
-    TI_STATUS           status;
-    EDot11Mode          mode;
-    TI_UINT32           rateSuppMask, rateBasicMask;
-    TI_UINT8            ratesBuf[DOT11_MAX_SUPPORTED_RATES];
-    TI_UINT32           len = 0, ofdmIndex = 0;
-    TI_BOOL             b11nEnable, bWmeEnable;
-
-    *cap = 0;
-
-    /* Bss type */
-    param.paramType = CTRL_DATA_CURRENT_BSS_TYPE_PARAM;
-    status =  ctrlData_getParam(pCtx->hCtrlData, &param);
-    if (status == TI_OK)
-    {
-        if (param.content.ctrlDataCurrentBssType == BSS_INFRASTRUCTURE)
-        {
-            *cap |= DOT11_CAPS_ESS;
-        } else {
-            *cap |= DOT11_CAPS_IBSS;
-        }
-    } else {
-        return TI_NOK;
-    }
-
-    /* Privacy */
-    param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
-    status =  rsn_getParam(pCtx->hRsn, &param);
-    if (status == TI_OK)
-    {
-        if (param.content.rsnEncryptionStatus != TWD_CIPHER_NONE)
-        {
-            *cap |= DOT11_CAPS_PRIVACY;
-        }
-    } else {
-        return TI_NOK;
-    }
-
-    /* Preamble */
-    param.paramType = SITE_MGR_DESIRED_PREAMBLE_TYPE_PARAM;
-    status =  siteMgr_getParam(pCtx->hSiteMgr, &param);
-    if (status == TI_OK)
-    {
-        if (param.content.siteMgrCurrentPreambleType == PREAMBLE_SHORT)
-            *cap |= DOT11_CAPS_SHORT_PREAMBLE;
-    } else {
-        return TI_NOK;
-    }
-
-    /* Pbcc */
-    param.paramType = SITE_MGR_CURRENT_RATE_PAIR_PARAM;
-    status =  siteMgr_getParam(pCtx->hSiteMgr, &param);
-    if (status == TI_OK)
-    {
-        if(param.content.siteMgrCurrentRateMask.supportedRateMask & DRV_RATE_MASK_22_PBCC)
-            *cap |= DOT11_CAPS_PBCC;
-    } else {
-        return TI_NOK;
-    }
-
-    
-    /* Checking if the station supports Spectrum Management (802.11h) */
-    param.paramType = REGULATORY_DOMAIN_MANAGEMENT_CAPABILITY_ENABLED_PARAM;
-    status =  regulatoryDomain_getParam(pCtx->hRegulatoryDomain, &param);
-    if (status == TI_OK )
-    {
-        if( param.content.spectrumManagementEnabled)
-            *cap |= DOT11_SPECTRUM_MANAGEMENT;
-    } 
-    else
-    {
-        return TI_NOK;
-    }
-    
-    /* slot time */
-    param.paramType = SITE_MGR_OPERATIONAL_MODE_PARAM;
-    status = siteMgr_getParam(pCtx->hSiteMgr, &param);
-    if(status == TI_OK)
-    {
-        mode = param.content.siteMgrDot11OperationalMode;
-    }
-    else
-        return TI_NOK;
-
-    if(mode == DOT11_G_MODE)
-    {
-        /* new requirement: the short slot time should be set only
-           if the AP's modulation is OFDM (highest rate) */
-        
-        /* get Rates */
-        param.paramType = SITE_MGR_CURRENT_RATE_PAIR_PARAM;
-        status =  siteMgr_getParam(pCtx->hSiteMgr, &param);
-        if (status == TI_OK)
-        {
-            rateBasicMask = param.content.siteMgrCurrentRateMask.basicRateMask;
-            rateSuppMask  = param.content.siteMgrCurrentRateMask.supportedRateMask;
-        } else {
-            return TI_NOK;
-        }
-        
-        /* convert the bit map to the rates array */
-        rate_DrvBitmapToNetStr (rateSuppMask, rateBasicMask, ratesBuf, &len, &ofdmIndex);
-
-        if(ofdmIndex < len)
-            *cap |= DOT11_CAPS_SHORT_SLOT_TIME;
-
-/*      
-        param.paramType = SITE_MGR_CURRENT_MODULATION_TYPE_PARAM;
-        status = siteMgr_getParam(pCtx->hSiteMgr, &param);
-        if(param.content.siteMgrCurrentModulationType == DRV_MODULATION_OFDM)
-            *cap |= DOT11_CAPS_SHORT_SLOT_TIME;
-*/
-    }
-
-    /* Primary Site support HT ? */
-    param.paramType = SITE_MGR_PRIMARY_SITE_HT_SUPPORT;
-    siteMgr_getParam(pCtx->hSiteMgr, &param);
-
-    if (param.content.bPrimarySiteHtSupport == TI_TRUE)
-    {
-        /* Immediate Block Ack subfield - (is WME on?) AND (is HT Enable?) */
-        /* verify 11n_Enable and Chip type */
-        StaCap_IsHtEnable (pCtx->hStaCap, &b11nEnable);
-        /* verify that WME flag enable */
-        qosMngr_GetWmeEnableFlag (pCtx->hQosMngr, &bWmeEnable); 
-    
-        if ((b11nEnable != TI_FALSE) && (bWmeEnable != TI_FALSE))
-        {
-            *cap |= DOT11_CAPS_IMMEDIATE_BA;
-        }
-    }
-
-    return TI_OK;
-}
-
-
-TI_STATUS assoc_smSSIDBuild(assoc_t *pCtx, TI_UINT8 *pSSID, TI_UINT32 *ssidLen)
-{
-    paramInfo_t         param;
-    TI_STATUS               status;
-    dot11_SSID_t        *pDot11Ssid;
-
-    pDot11Ssid = (dot11_SSID_t*)pSSID;
-    /* set SSID element id */
-    pDot11Ssid->hdr[0] = SSID_IE_ID;
-
-    /* get SSID */
-    param.paramType = SME_DESIRED_SSID_ACT_PARAM;
-    status =  sme_GetParam(pCtx->hSme, &param);
-    if (status != TI_OK)
-    {
-        return status;
-    }
-    
-    /* check for ANY ssid */
-    if (param.content.smeDesiredSSID.len != 0)
-    {
-        pDot11Ssid->hdr[1] = param.content.smeDesiredSSID.len;
-        os_memoryCopy(pCtx->hOs, 
-                      (void *)pDot11Ssid->serviceSetId, 
-                      (void *)param.content.smeDesiredSSID.str, 
-                      param.content.smeDesiredSSID.len);
-
-    } else {
-        /* if ANY ssid is configured, use the current SSID */
-        param.paramType = SITE_MGR_CURRENT_SSID_PARAM;
-        status =  siteMgr_getParam(pCtx->hSiteMgr, &param);
-        if (status != TI_OK)
-        {
-            return status;
-        }
-        pDot11Ssid->hdr[1] = param.content.siteMgrCurrentSSID.len;
-        os_memoryCopy(pCtx->hOs, 
-                      (void *)pDot11Ssid->serviceSetId, 
-                      (void *)param.content.siteMgrCurrentSSID.str, 
-                      param.content.siteMgrCurrentSSID.len);
-
-    }
-
-    *ssidLen = pDot11Ssid->hdr[1] + sizeof(dot11_eleHdr_t);
-    
-    return TI_OK;
-}
-
-TI_STATUS assoc_smRatesBuild(assoc_t *pCtx, TI_UINT8 *pRates, TI_UINT32 *ratesLen)
-{
-    paramInfo_t         param;
-    TI_STATUS           status;
-    TI_UINT32           rateSuppMask, rateBasicMask;
-    dot11_RATES_t       *pDot11Rates;
-    TI_UINT32           len = 0, ofdmIndex = 0;
-    TI_UINT8            ratesBuf[DOT11_MAX_SUPPORTED_RATES];
-    EDot11Mode          mode;
-    TI_UINT32           suppRatesLen, extSuppRatesLen, i;
-    pDot11Rates = (dot11_RATES_t*)pRates;
-
-
-    /* get Rates */
-    param.paramType = SITE_MGR_CURRENT_RATE_PAIR_PARAM;
-    status =  siteMgr_getParam(pCtx->hSiteMgr, &param);
-    if (status == TI_OK)
-    {
-        rateBasicMask = param.content.siteMgrCurrentRateMask.basicRateMask;
-        rateSuppMask  = param.content.siteMgrCurrentRateMask.supportedRateMask;
-    } 
-    else 
-    {
-        return TI_NOK;
-    }
-
-    /* get operational mode */
-    param.paramType = SITE_MGR_OPERATIONAL_MODE_PARAM;
-    status = siteMgr_getParam(pCtx->hSiteMgr, &param);
-    if(status == TI_OK)
-        mode = param.content.siteMgrDot11OperationalMode;
-    else
-        return TI_NOK;
-
-    /* convert the bit map to the rates array */
-    /* remove MCS rates from Extended Supported Rates IE */
-    rateSuppMask &= ~(DRV_RATE_MASK_MCS_0_OFDM | 
-                      DRV_RATE_MASK_MCS_1_OFDM |
-                      DRV_RATE_MASK_MCS_2_OFDM |
-                      DRV_RATE_MASK_MCS_3_OFDM |
-                      DRV_RATE_MASK_MCS_4_OFDM |
-                      DRV_RATE_MASK_MCS_5_OFDM |
-                      DRV_RATE_MASK_MCS_6_OFDM |
-                      DRV_RATE_MASK_MCS_7_OFDM );
-
-    rate_DrvBitmapToNetStr (rateSuppMask, rateBasicMask, ratesBuf, &len, &ofdmIndex);
-
-    if(mode != DOT11_G_MODE || ofdmIndex == len )
-    {
-        pDot11Rates->hdr[0] = SUPPORTED_RATES_IE_ID;
-        pDot11Rates->hdr[1] = len;
-        os_memoryCopy(NULL, (void *)pDot11Rates->rates, ratesBuf, len);
-        *ratesLen = pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);
-    }
-    else 
-    {
-        /* fill in the supported rates */
-        pDot11Rates->hdr[0] = SUPPORTED_RATES_IE_ID;
-        pDot11Rates->hdr[1] = ofdmIndex;
-        os_memoryCopy(NULL, (void *)pDot11Rates->rates, ratesBuf, pDot11Rates->hdr[1]);
-        suppRatesLen = pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);
-        /* fill in the extended supported rates */
-        pDot11Rates = (dot11_RATES_t*)(pRates + suppRatesLen);
-        pDot11Rates->hdr[0] = EXT_SUPPORTED_RATES_IE_ID;
-        pDot11Rates->hdr[1] = len - ofdmIndex;
-        os_memoryCopy(NULL, (void *)pDot11Rates->rates, &ratesBuf[ofdmIndex], pDot11Rates->hdr[1]);
-        extSuppRatesLen = pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);
-        *ratesLen = suppRatesLen + extSuppRatesLen;
-    }
-
-    TRACE3(pCtx->hReport, REPORT_SEVERITY_INFORMATION, "ASSOC_SM: ASSOC_REQ - bitmapSupp= 0x%X,bitMapBasic = 0x%X, len = %d\n", rateSuppMask,rateBasicMask,len);
-    for(i=0; i<len; i++)
-    {
-        TRACE2(pCtx->hReport, REPORT_SEVERITY_INFORMATION, "ASSOC_SM: ASSOC_REQ - ratesBuf[%d] = 0x%X\n", i, ratesBuf[i]);
-    }
-
-    return TI_OK;
-}
-
-TI_STATUS assoc_powerCapabilityBuild(assoc_t *pCtx, TI_UINT8 *pPowerCapability, TI_UINT32 *powerCapabilityLen)
-{
-    paramInfo_t         param;
-    TI_STATUS               status;
-    dot11_CAPABILITY_t      *pDot11PowerCapability;
-
-    pDot11PowerCapability = (dot11_CAPABILITY_t*)pPowerCapability;
-    
-    /* set Power Capability element id */
-    pDot11PowerCapability->hdr[0] = DOT11_CAPABILITY_ELE_ID;
-    pDot11PowerCapability->hdr[1] = DOT11_CAPABILITY_ELE_LEN;
-
-    /* get power capability */
-    param.paramType = REGULATORY_DOMAIN_POWER_CAPABILITY_PARAM;
-    status =  regulatoryDomain_getParam(pCtx->hRegulatoryDomain, &param);
-
-    if (status == TI_OK)
-    {
-        pDot11PowerCapability->minTxPower = param.content.powerCapability.minTxPower;
-        pDot11PowerCapability->maxTxPower = param.content.powerCapability.maxTxPower;
-        *powerCapabilityLen = pDot11PowerCapability->hdr[1] + sizeof(dot11_eleHdr_t);
-    }
-    else
-        *powerCapabilityLen = 0;
-
-    return TI_OK;
-}
-
-TI_STATUS assoc_smRequestBuild(assoc_t *pCtx, TI_UINT8* reqBuf, TI_UINT32* reqLen)
-{
-    TI_STATUS       status;
-    TI_UINT8        *pRequest;
-    TI_UINT32       len;
-    paramInfo_t     param;
-    TTwdParamInfo   tTwdParam;
-    TI_UINT16       capabilities;
-    ECipherSuite    eCipherSuite = TWD_CIPHER_NONE; /* To be used for checking whether 
-                                                       AP supports HT rates and TKIP 
-                                                     */
-
-    pRequest = reqBuf;
-    *reqLen = 0;
-
-    /* insert capabilities */
-    status = assoc_smCapBuild(pCtx, &capabilities);
-    if (status == TI_OK)
-    {
-        *(TI_UINT16*)pRequest = capabilities;
-    }
-    else
-        return TI_NOK;
-
-    pRequest += 2;
-    *reqLen += 2;
-
-    /* insert listen interval */
-    tTwdParam.paramType = TWD_LISTEN_INTERVAL_PARAM_ID;
-    status =  TWD_GetParam (pCtx->hTWD, &tTwdParam);
-    if (status == TI_OK)
-    {
-        *(TI_UINT16*)pRequest = ENDIAN_HANDLE_WORD((TI_UINT16)tTwdParam.content.halCtrlListenInterval);
-    } else {
-        return TI_NOK;
-    }
-    
-    pRequest += 2;
-    *reqLen += 2;
-    if (pCtx->reAssoc)
-    {   /* Insert currentAPAddress element only in reassoc request*/
-        param.paramType = SITE_MGR_PREV_SITE_BSSID_PARAM;
-        status = siteMgr_getParam(pCtx->hSiteMgr, &param);
-        if (status == TI_OK)
-        {
-            MAC_COPY (pRequest, param.content.siteMgrDesiredBSSID);
-            TRACE6(pCtx->hReport, REPORT_SEVERITY_INFORMATION, "ASSOC_SM: ASSOC_REQ - prev AP = %x-%x-%x-%x-%x-%x\n", param.content.siteMgrDesiredBSSID[0], param.content.siteMgrDesiredBSSID[1], param.content.siteMgrDesiredBSSID[2], param.content.siteMgrDesiredBSSID[3], param.content.siteMgrDesiredBSSID[4], param.content.siteMgrDesiredBSSID[5]);
-
-
-            pRequest += MAC_ADDR_LEN;
-            *reqLen += MAC_ADDR_LEN;
-        }
-        else
-        {
-            TRACE0(pCtx->hReport, REPORT_SEVERITY_ERROR, "ASSOC_SM: ASSOC_REQ - No prev AP \n");
-            return status;
-
-        }
-    }
-
-    /* insert SSID element */
-    status = assoc_smSSIDBuild(pCtx, pRequest, &len);
-    if (status != TI_OK)
-    {
-        return TI_NOK;
-    }
-
-    pRequest += len;
-    *reqLen += len;
-
-    /* insert Rates element */
-    status = assoc_smRatesBuild(pCtx, pRequest, &len);
-    if (status != TI_OK)
-    {
-        return TI_NOK;
-    }
-    pRequest += len;
-    *reqLen += len;
-
-    /* Checking if the station supports Spectrum Management (802.11h) */
-    param.paramType = REGULATORY_DOMAIN_MANAGEMENT_CAPABILITY_ENABLED_PARAM;
-    status = regulatoryDomain_getParam(pCtx->hRegulatoryDomain,&param);
-    if( (status == TI_OK) && param.content.spectrumManagementEnabled)
-    {
-        /* Checking the selected AP capablities */
-        param.paramType = SITE_MGR_SITE_CAPABILITY_PARAM;
-        status =  siteMgr_getParam(pCtx->hSiteMgr,&param);
-        if(status == TI_OK && ((param.content.siteMgrSiteCapability & DOT11_SPECTRUM_MANAGEMENT) != 0)) 
-        {
-            /* insert Power capability element */
-            status = assoc_powerCapabilityBuild(pCtx, pRequest, &len);
-            if (status != TI_OK)
-            {
-                return TI_NOK;
-            }
-            pRequest += len;
-            *reqLen += len;
-#if 0
-            /* insert Supported Channels element */
-            status = assoc_supportedChannelBuild(pCtx, pRequest, &len);
-            if (status != TI_OK)
-            {
-                return TI_NOK;
-            }
-            pRequest += len;
-            *reqLen += len;
-#endif
-        }
-
-
-    }
-
-    status = qosMngr_getQosCapabiltyInfeElement(pCtx->hQosMngr,pRequest,&len);
-    if (status != TI_OK)
-    {
-        return TI_NOK;
-    }
-    pRequest += len;
-    *reqLen += len;
-
-
-#ifdef XCC_MODULE_INCLUDED
-    status = rsn_getXCCExtendedInfoElement(pCtx->hRsn, pRequest, (TI_UINT8*)&len);
-    if (status != TI_OK)
-    {
-        return TI_NOK;
-    }
-    pRequest += len;
-    *reqLen += len;
-
-    if (pCtx->reAssoc)
-    {   /* insert CCKM information element only in reassoc */
-        status = XCCMngr_getCckmInfoElement(pCtx->hXCCMngr, pRequest, (TI_UINT8*)&len);
-        
-        if (status != TI_OK)
-        {
-            return TI_NOK;
-        }
-        pRequest += len;
-        *reqLen += len;
-    }
-    status = XCCMngr_getXCCVersionInfoElement(pCtx->hXCCMngr, pRequest, (TI_UINT8*)&len);
-    if (status != TI_OK)
-    {
-        return TI_NOK;
-    }
-    pRequest += len;
-    *reqLen += len;
-
-    /* Insert Radio Mngt Capability IE */
-    status = measurementMgr_radioMngtCapabilityBuild(pCtx->hMeasurementMgr, pRequest, (TI_UINT8*)&len);
-    if (status != TI_OK)
-    {
-        return TI_NOK;
-    }
-    pRequest += len;
-    *reqLen += len;
-#endif
-
-     /* Get Simple-Config state */
-    param.paramType = SITE_MGR_SIMPLE_CONFIG_MODE;
-    status = siteMgr_getParam(pCtx->hSiteMgr, &param);
-
-   if (param.content.siteMgrWSCMode.WSCMode == TIWLN_SIMPLE_CONFIG_OFF)
-   {
-    /* insert RSN information elements */
-    status = rsn_getInfoElement(pCtx->hRsn, pRequest, &len);
-	
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-	pRequest += len;
-	*reqLen += len;
-  }
-
-    /* Privacy - Used later on HT */
-    param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
-    status          = rsn_getParam(pCtx->hRsn, &param);
-   
-    if(status == TI_OK)
-    {
-        eCipherSuite = param.content.rsnEncryptionStatus;
-    } 
-
-
-    /* Primary Site support HT ? */
-    param.paramType = SITE_MGR_PRIMARY_SITE_HT_SUPPORT;
-    siteMgr_getParam(pCtx->hSiteMgr, &param);
-
-    /* Disallow TKIP with HT Rates: If this is the case - discard HT rates from Association Request */
-    if((TI_TRUE == param.content.bPrimarySiteHtSupport) && (eCipherSuite != TWD_CIPHER_TKIP))
-    {
-        status = StaCap_GetHtCapabilitiesIe (pCtx->hStaCap, pRequest, &len);
-    	if (status != TI_OK)
-    	{
-    		return TI_NOK;
-    	}
-    	pRequest += len;
-    	*reqLen += len;
-    }
-
-	status = qosMngr_assocReqBuild(pCtx->hQosMngr,pRequest,&len);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-	pRequest += len;
-	*reqLen += len;
-
-	status = apConn_getVendorSpecificIE(pCtx->hApConn, pRequest, &len);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-	pRequest += len;
-	*reqLen += len;
- 
-    if (*reqLen>=MAX_ASSOC_MSG_LENGTH)
-    {
-        return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-
-
-TI_STATUS assoc_saveAssocRespMessage(assoc_t *pAssocSm, TI_UINT8 *pAssocBuffer, TI_UINT32 length)
-{
-    if ((pAssocSm==NULL) || (pAssocBuffer==NULL) || (length>=MAX_ASSOC_MSG_LENGTH))
-    {
-        return TI_NOK;
-    }
-    os_memoryCopy(pAssocSm->hOs, pAssocSm->assocRespBuffer, pAssocBuffer, length);  
-    pAssocSm->assocRespLen = length;
-    
-    TRACE1(pAssocSm->hReport, REPORT_SEVERITY_INFORMATION, "assoc_saveAssocRespMessage: length=%ld \n",length);
-    return TI_OK;
-}
-
-TI_STATUS assoc_saveAssocReqMessage(assoc_t *pAssocSm, TI_UINT8 *pAssocBuffer, TI_UINT32 length)
-{
-
-    if ((pAssocSm==NULL) || (pAssocBuffer==NULL) || (length>=MAX_ASSOC_MSG_LENGTH))
-    {
-        return TI_NOK;
-    }
-
-    os_memoryCopy(pAssocSm->hOs, pAssocSm->assocReqBuffer, pAssocBuffer, length);  
-    pAssocSm->assocReqLen = length;
-    
-    TRACE1(pAssocSm->hReport, REPORT_SEVERITY_INFORMATION, "assoc_saveAssocReqMessage: length=%ld \n",length);
-    return TI_OK;
-}
-
-
-TI_STATUS assoc_sendDisAssoc(assoc_t *pAssocSm, mgmtStatus_e reason)
-{
-    TI_STATUS       status;
-    disAssoc_t      disAssoc;
-
-    if (reason == STATUS_SUCCESSFUL)
-    {
-        disAssoc.reason = ENDIAN_HANDLE_WORD(STATUS_UNSPECIFIED);
-    } else {
-        disAssoc.reason = ENDIAN_HANDLE_WORD(reason);
-    }
-
-    status = mlmeBuilder_sendFrame(pAssocSm->hMlme, DIS_ASSOC, (TI_UINT8*)&disAssoc, sizeof(disAssoc_t), 0);
-
-    return status;
-}
-
-
diff --git a/wl1271/stad/src/Sta_Management/authSm.c b/wl1271/stad/src/Sta_Management/authSm.c
deleted file mode 100644
index 7260f63..0000000
--- a/wl1271/stad/src/Sta_Management/authSm.c
+++ /dev/null
@@ -1,624 +0,0 @@
-/*
- * authSm.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file authSM.c
- *  \brief 802.11 authentication SM source
- *
- *  \see authSM.h
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	authSM.c												   */
-/*    PURPOSE:	802.11 authentication SM source							   */
-/*																	 	   */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_64
-#include "osApi.h"
-
-#include "paramOut.h"
-#include "fsm.h"
-#include "report.h"
-#include "timer.h"
-#include "mlmeApi.h"
-#include "mlmeBuilder.h"
-#include "authSm.h"
-#include "openAuthSm.h"
-#include "sharedKeyAuthSm.h"
-#include "DrvMainModules.h"
-
-/* Constants */ 
-
-/** number of states in the state machine */
-#define	AUTH_SM_MAX_NUM_STATES		4
-
-/** number of events in the state machine */
-#define	AUTH_SM_MAX_NUM_EVENTS		8
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Global variables */
-
-/* Local function prototypes */
-
-/* functions */
-
-/**
-*
-* auth_create - allocate memory for authentication SM
-*
-* \b Description: 
-*
-* Allocate memory for authentication SM. \n
-* 		Allocates memory for Association context. \n
-* 		Allocates memory for authentication timer. \n
-* 		Allocates memory for authentication SM matrix. \n
-*
-* \b ARGS:
-*
-*  I   - hOs - OS context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_mainSecSmKeysOnlyStop()
-*/
-TI_HANDLE auth_create(TI_HANDLE hOs)
-{
-	auth_t 	*pHandle;
-	TI_STATUS		status;
-
-	/* allocate authentication context memory */
-	pHandle = (auth_t*)os_memoryAlloc(hOs, sizeof(auth_t));
-	if (pHandle == NULL)
-	{
-		return NULL;
-	}
-	
-	os_memoryZero(hOs, pHandle, sizeof(auth_t));
-
-	pHandle->hOs = hOs;
-    
-	/* allocate memory for authentication state machine */
-	status = fsm_Create(hOs, &pHandle->pAuthSm, AUTH_SM_MAX_NUM_STATES, AUTH_SM_MAX_NUM_EVENTS);
-	if (status != TI_OK)
-	{
-		os_memoryFree(hOs, pHandle, sizeof(auth_t));
-		return NULL;
-	}
-
-	return pHandle;
-}
-
-
-/**
-*
-* auth_unload - unload authentication SM from memory
-*
-* \b Description: 
-*
-* Unload authentication SM from memory
-*
-* \b ARGS:
-*
-*  I   - hAuth - Authentication SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_mainSecSmKeysOnlyStop()
-*/
-TI_STATUS auth_unload(TI_HANDLE hAuth)
-{
-    TI_STATUS 		status;
-	auth_t		*pHandle;
-
-	pHandle = (auth_t*)hAuth;
-
-	status = fsm_Unload(pHandle->hOs, pHandle->pAuthSm);
-    if (status != TI_OK)
-	{
-		/* report failure but don't stop... */
-TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "AUTH_SM: Error releasing FSM memory \n");
-	}
-	
-	if (pHandle->hAuthSmTimer)
-	{
-		tmr_DestroyTimer (pHandle->hAuthSmTimer);
-	}
-	
-	os_memoryFree(pHandle->hOs, pHandle, sizeof(auth_t));
-
-	return TI_OK;
-}
-
-/**
-*
-* auth_init - Init required handles and module variables,
-*
-* \b Description: 
-*
-* Init required handles and module variables,
-*
-* \b ARGS:
-*
-*  I   - pStadHandles - The driver modules handles  \n
-*
-* \b RETURNS:
-*
-*  void
-*
-* \sa auth_Create, auth_Unload
-*/
-void auth_init (TStadHandlesList *pStadHandles)
-{
-	auth_t *pHandle = (auth_t*)(pStadHandles->hAuth);
-	
-	pHandle->hMlme   = pStadHandles->hMlmeSm;
-	pHandle->hRsn    = pStadHandles->hRsn;
-	pHandle->hReport = pStadHandles->hReport;
-	pHandle->hOs     = pStadHandles->hOs;
-    pHandle->hTimer  = pStadHandles->hTimer;
-}
-
-
-TI_STATUS auth_SetDefaults (TI_HANDLE hAuth, authInitParams_t *pAuthInitParams)
-{
-    auth_t		*pHandle = (TI_HANDLE) hAuth;
-
-	pHandle->timeout = pAuthInitParams->authResponseTimeout;
-	pHandle->maxCount = pAuthInitParams->authMaxRetryCount;
-	
-	pHandle->retryCount = 0;
-	pHandle->authRejectCount = 0;
-	pHandle->authTimeoutCount = 0;
-
-	pHandle->authType = AUTH_LEGACY_NONE;
-
-	/* allocate OS timer memory */
-    pHandle->hAuthSmTimer = tmr_CreateTimer (pHandle->hTimer);
-	if (pHandle->hAuthSmTimer == NULL)
-	{
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "auth_SetDefaults(): Failed to create hAuthSmTimer!\n");
-		return TI_NOK;
-	}
-
-	return TI_OK;
-}
-
-
-/**
-*
-* auth_start - Start event for the authentication SM
-*
-* \b Description: 
-*
-* Start event for the authentication SM
-*
-* \b ARGS:
-*
-*  I   - hAuth - Authentication SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa auth_Stop, auth_Recv
-*/
-TI_STATUS auth_start(TI_HANDLE hAuth)
-{
-	auth_t		*pHandle = (auth_t*)hAuth;
-
-	if (pHandle == NULL)
-    {
-		return TI_NOK;
-    }
-
-	if (pHandle->authType == AUTH_LEGACY_NONE)
-    {
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "auth_start: pHandle->authType == AUTH_LEGACY_NONE\n");
-		return TI_NOK;
-    }
-
-	switch (pHandle->authType)
-	{
-    case AUTH_LEGACY_RESERVED1: 
-	case AUTH_LEGACY_OPEN_SYSTEM:
-		return auth_osSMEvent(&pHandle->currentState, OPEN_AUTH_SM_EVENT_START, pHandle);
-
-	case AUTH_LEGACY_SHARED_KEY:
-		return auth_skSMEvent(&pHandle->currentState, SHARED_KEY_AUTH_SM_EVENT_START, pHandle);
-
-	default:
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "auth_start: pHandle->authType unknown.\n");
-		return TI_NOK;
-	}
-}
-
-/**
-*
-* auth_stop - Stop event for the authentication SM
-*
-* \b Description: 
-*
-* Stop event for the authentication SM
-*
-* \b ARGS:
-*
-*  I   - hAuth - Authentication SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa auth_Start, auth_Recv
-*/
-TI_STATUS auth_stop(TI_HANDLE hAuth, TI_BOOL sendDeAuth, mgmtStatus_e reason )
-{
-	auth_t		*pHandle;
-
-	pHandle = (auth_t*)hAuth;
-
-	if (pHandle == NULL)
-		return TI_NOK;
-	
-	if (pHandle->authType == AUTH_LEGACY_NONE)
-		return TI_NOK;
-
-	if( sendDeAuth == TI_TRUE )
-	{
-		deAuth_t	deAuth;
-		deAuth.reason = ENDIAN_HANDLE_WORD(reason);
-		mlmeBuilder_sendFrame(pHandle->hMlme, DE_AUTH, (TI_UINT8*)&deAuth, sizeof(deAuth_t), 0);
-	}
-
-	switch (pHandle->authType)
-	{
-    case AUTH_LEGACY_RESERVED1:
-	case AUTH_LEGACY_OPEN_SYSTEM:
-		return auth_osSMEvent(&pHandle->currentState, OPEN_AUTH_SM_EVENT_STOP, pHandle);
-
-	case AUTH_LEGACY_SHARED_KEY:
-		return auth_skSMEvent(&pHandle->currentState, SHARED_KEY_AUTH_SM_EVENT_STOP, pHandle);
-
-	default:
-		return TI_NOK;
-	}
-}
-
-/**
-*
-* auth_recv - Recive a message from the AP
-*
-* \b Description: 
-*
-* Parse a message form the AP and perform the appropriate event.
-*
-* \b ARGS:
-*
-*  I   - hAuth - Authentication SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa auth_Start, auth_Stop
-*/
-TI_STATUS auth_recv(TI_HANDLE hAuth, mlmeFrameInfo_t *pFrame)
-{
-	auth_t			*pHandle;
-
-	pHandle = (auth_t*)hAuth;
-
-	if (pHandle == NULL)
-		return TI_NOK;
-	
-	if (pFrame->subType != AUTH)
-		return TI_NOK;
-
-	if (pHandle->authType == AUTH_LEGACY_NONE)
-		return TI_NOK;
-
-	if (pFrame->content.auth.status != STATUS_SUCCESSFUL)
-		pHandle->authRejectCount++;
-
-	switch (pHandle->authType)
-	{
-	case AUTH_LEGACY_RESERVED1:
-	case AUTH_LEGACY_OPEN_SYSTEM:
-		return openAuth_Recv(hAuth, pFrame);
-
-	case AUTH_LEGACY_SHARED_KEY:
-		return sharedKeyAuth_Recv(hAuth, pFrame);
-
-	default:
-		return TI_OK;
-	}
-}
-
-/**
-*
-* auth_getParam - Get a specific parameter from the authentication SM
-*
-* \b Description: 
-*
-* Get a specific parameter from the authentication SM.
-*
-* \b ARGS:
-*
-*  I   - hAuth - Authentication SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa auth_Start, auth_Stop
-*/
-TI_STATUS auth_getParam(TI_HANDLE hAuth, paramInfo_t *pParam)
-{
-	auth_t		*pHandle;
-
-	pHandle = (auth_t*)hAuth;
-
-	if ((pHandle == NULL) || (pParam == NULL))
-	{
-		return TI_NOK;
-	}
-
-	switch (pParam->paramType)
-	{
-	case AUTH_RESPONSE_TIMEOUT_PARAM:
-		pParam->content.authResponseTimeout = pHandle->timeout;
-		break;
-
-	case AUTH_COUNTERS_PARAM:
-		pParam->content.siteMgrTiWlanCounters.AuthRejects = pHandle->authRejectCount;
-		pParam->content.siteMgrTiWlanCounters.AuthTimeouts = pHandle->authTimeoutCount;
-		break;
-
-	case AUTH_LEGACY_TYPE_PARAM:
-		pParam->content.authLegacyAuthType = pHandle->authType;
-		break;
-
-	default:
-		return TI_NOK;
-	}
-
-	return TI_OK;
-}
-
-/**
-*
-* auth_setParam - Set a specific parameter to the authentication SM
-*
-* \b Description: 
-*
-* Set a specific parameter to the authentication SM.
-*
-* \b ARGS:
-*
-*  I   - hAuth - Authentication SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa auth_Start, auth_Stop
-*/
-TI_STATUS auth_setParam(TI_HANDLE hAuth, paramInfo_t *pParam)
-{
-	auth_t		*pHandle;
-
-	pHandle = (auth_t*)hAuth;
-
-	if ((pHandle == NULL) || (pParam == NULL))
-	{
-		return TI_NOK;
-	}
-
-	switch (pParam->paramType)
-	{
-	case AUTH_LEGACY_TYPE_PARAM:
-		pHandle->authType = pParam->content.authLegacyAuthType;
-
-		switch (pHandle->authType)
-		{
-        case AUTH_LEGACY_RESERVED1:
-		case AUTH_LEGACY_OPEN_SYSTEM:
-			openAuth_Config(hAuth, pHandle->hOs);
-			break;
-
-		case AUTH_LEGACY_SHARED_KEY:
-			sharedKeyAuth_Config(hAuth, pHandle->hOs);
-			break;
-
-		default:
-			return TI_NOK;
-		}
-		break;
-
-	case AUTH_RESPONSE_TIMEOUT_PARAM:
-		if ((pParam->content.authResponseTimeout >= AUTH_RESPONSE_TIMEOUT_MIN) &&
-			(pParam->content.authResponseTimeout <= AUTH_RESPONSE_TIMEOUT_MAX))
-		{
-			pHandle->timeout = pParam->content.authResponseTimeout;
-		} 
-		else 
-		{
-			return TI_NOK;
-		}
-		break;
-
-	default:
-		return TI_NOK;
-	}
-
-	return TI_OK;
-}
-
-/**
-*
-* auth_smTimeout - Set a specific parameter to the authentication SM
-*
-* \b Description: 
-*
-* Set a specific parameter to the authentication SM.
-*
-* \b ARGS:
-*
-*  I   - hAuth - authentication SM context  \n
-*  I   - bTwdInitOccured - Indicates if TWDriver recovery occured since timer started  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa auth_Start, auth_Stop
-*/
-void auth_smTimeout (TI_HANDLE hAuth, TI_BOOL bTwdInitOccured)
-{
-	auth_t		*pHandle;
-
-	pHandle = (auth_t*)hAuth;
-
-	if (pHandle == NULL)
-		return;
-	
-	if (pHandle->authType == AUTH_LEGACY_NONE)
-		return;
-
-	pHandle->authTimeoutCount++;
-
-	switch (pHandle->authType)
-	{
-    case AUTH_LEGACY_RESERVED1:
-	case AUTH_LEGACY_OPEN_SYSTEM:
-		openAuth_Timeout(pHandle);
-		break;
-
-	case AUTH_LEGACY_SHARED_KEY:
-		sharedKey_Timeout(pHandle);
-		break;
-
-	default:
-		break;
-	}
-}
-
-/*****************************************************************************
-**
-** Authentication messages builder/Parser
-**
-*****************************************************************************/
-
-/**
-*
-* auth_smMsgBuild - Build an authentication message and send it to the mlme builder
-*
-* \b Description: 
-*
-* Build an authentication message and send it to the mlme builder.
-*
-* \b ARGS:
-*
-*  I   - pAssoc - Association SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa auth_Start, auth_Stop
-*/
-TI_STATUS auth_smMsgBuild(auth_t *pCtx, TI_UINT16 seq, TI_UINT16 statusCode, TI_UINT8* pChallange, TI_UINT8 challangeLen)
-{
-	TI_STATUS				status;
-	TI_UINT8				len;
-	TI_UINT8				authMsg[MAX_AUTH_MSG_LEN];
-	authMsg_t			*pAuthMsg;
-	dot11_CHALLENGE_t	*pDot11Challenge;
-	TI_UINT8				wepOpt;
-
-	wepOpt = 0;
-
-	pAuthMsg = (authMsg_t*)authMsg;
-	
-	/* insert algorithm */
-	pAuthMsg->authAlgo = (TI_UINT16)pCtx->authType;
-
-	/* insert sequense */
-	pAuthMsg->seqNum = ENDIAN_HANDLE_WORD(seq);
-
-	/* insert status code */
-	pAuthMsg->status = ENDIAN_HANDLE_WORD(statusCode);
-
-	len = sizeof(pAuthMsg->authAlgo) + sizeof(pAuthMsg->seqNum) + sizeof(pAuthMsg->status);
-
-	if (pChallange != NULL)
-	{
-		pDot11Challenge = (dot11_CHALLENGE_t*)&authMsg[len];
-
-		pDot11Challenge->hdr[0] = CHALLANGE_TEXT_IE_ID;
-		pDot11Challenge->hdr[1] = challangeLen;
-
-		os_memoryCopy(pCtx->hOs, (void *)pDot11Challenge->text, pChallange, challangeLen);
-		len += challangeLen + 2;
-
-		wepOpt = 1;
-	}
-
-	status =  mlmeBuilder_sendFrame(pCtx->hMlme, AUTH, authMsg, len, wepOpt);
-
-	return status;
-}
-
-
-
-
-
-
-
diff --git a/wl1271/stad/src/Sta_Management/authSm.h b/wl1271/stad/src/Sta_Management/authSm.h
deleted file mode 100644
index a3b2482..0000000
--- a/wl1271/stad/src/Sta_Management/authSm.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * authSm.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file assocSm.h
- *  \brief 802.11 authentication SM
- *
- *  \see assocSm.c
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	assocSm.h												   */
-/*    PURPOSE:	802.11 authentication SM									   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _AUTH_SM_H
-#define _AUTH_SM_H
-
-#include "fsm.h"
-#include "mlmeApi.h"
-
-/* Constants */
-
-#define AUTH_MSG_HEADER_LEN		6
-#define MAX_CHALLANGE_LEN		256
-#define MAX_AUTH_MSG_LEN		MAX_CHALLANGE_LEN + AUTH_MSG_HEADER_LEN
-
-/* Enumerations */
-
-/* Typedefs */
-
-typedef struct
-{
-	TI_UINT16				status;
-	char				*pChalange;
-	TI_UINT8				challangeLen;
-} authData_t;
-
-typedef struct
-{
-	legacyAuthType_e	authType;
-	fsm_stateMachine_t	*pAuthSm;
-	TI_UINT8				currentState;
-	TI_UINT32				maxCount;
-	TI_UINT8				retryCount;
-	TI_UINT32				authRejectCount;
-	TI_UINT32				authTimeoutCount;
-	TI_UINT32				timeout;
-    authData_t          authData;
-	TI_HANDLE			hAuthSmTimer;
-
-	TI_HANDLE			hMlme;
-	TI_HANDLE			hRsn;
-	TI_HANDLE			hReport;
-	TI_HANDLE			hOs;
-	TI_HANDLE			hTimer;
-} auth_t;
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS auth_start(TI_HANDLE hAuth);
-
-TI_STATUS auth_stop(TI_HANDLE hpAuth, TI_BOOL sendDeAuth, mgmtStatus_e reason );
-
-TI_STATUS auth_recv(TI_HANDLE hAuth, mlmeFrameInfo_t *pFrame);
-
-void auth_smTimeout(TI_HANDLE hAssoc, TI_BOOL bTwdInitOccured);
-
-TI_STATUS auth_smMsgBuild(auth_t *pCtx, 
-					   TI_UINT16 seq, 
-					   TI_UINT16 statusCode, 
-					   TI_UINT8* pChallange, 
-					   TI_UINT8 challangeLen);
-
-/* local functions */
-
-#endif
-
diff --git a/wl1271/stad/src/Sta_Management/currBss.c b/wl1271/stad/src/Sta_Management/currBss.c
deleted file mode 100644
index 0ce4f40..0000000
--- a/wl1271/stad/src/Sta_Management/currBss.c
+++ /dev/null
@@ -1,1532 +0,0 @@
-/*
- * currBss.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file currBss.c
- *  \brief Current BSS info
- *
- *  \see currBss.h
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Current BSS                                                   *
- *   PURPOSE:                                                               *
- *   Roaming ability of eSTA is implemented by Roaming Manager Component and 
- *   described in "Roaming Manager module LLD" document, and by 
- *   AP Connection module. AP Connection module implemented as two sub-modules.
- *   The major one is AP Connection, that is responsible for: 
- *   - providing Roaming Manager with access to other parts of WLAN Driver, 
- *   - implementing low levels of roaming mechanism.
- *   Current BSS sub-module takes care of:
- *   - maintaining database of current AP info,
- *   - providing access to database of current AP info.
- *   The Current BSS represents the BSS we are currently connected to. 
- *   Among other parameters, it holds the capabilities of the current AP, 
- *   its ID and its quality.
- *   When FW indicates 'Out of Sync' event, Current BSS module is responsible
- *   for awaking the device, sending unicast Probe request, waiting for
- *   response and - in case FW comes to the conclusion that there was 
- *   no response - for triggering "Beacon missed" to AP Connection module. 
- *   In eSTA5.0 FW updates and checks the quality of the connection with
- *   current AP. Current BSS module is responsible to handle event of type
- *   'Low RSSI' from FW. Third type of roaming event reported by FW is
- *   'Consecutive no ack on TX", and it is handled as well by Current
- *   BSS module.Upon reception of any roaming event from FW, Current BSS
- *   module is transferring this event to the AP Connection module in case
- *   of BSS connection, or to SME module in case of IBSS connection.
- *   When WLAN driver is working in IBSS mode, Current BSS module is holding
- *   the parameters of BSS (channel, band, SSID etc.).
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_65
-#include "currBss.h"
-#include "currBssApi.h"
-#include "osApi.h"
-#include "report.h"
-#include "802_11Defs.h"
-#include "DataCtrl_Api.h"
-#include "qosMngr_API.h"
-#include "regulatoryDomainApi.h"
-#include "apConn.h"
-#include "scanMngrApi.h" 
-#include "MacServices_api.h"
-#include "smeApi.h"
-#include "sme.h"
-#include "TWDriver.h"
-#include "EvHandler.h"
-#include "DrvMainModules.h"
-#include "siteMgrApi.h"
-#include "connApi.h"
-#include "roamingMngrTypes.h"
-
-/* Constants */
-#define TRIGGER_LOW_RSSI_PACING 1000
-#define TRIGGER_LOW_SNR_PACING 1000
-#define TRIGGER_BG_SCAN_PACING 10
-#define TRIGGER_BG_SCAN_HYSTERESIS 3
-static const TI_UINT32 KEEP_ALIVE_NULL_DATA_INDEX = 3;
-
-/* Enumerations */
-
-
-/* Typedefs */
-
-typedef TI_UINT8 (*currBSS_beaconRxCallb_t) (TI_HANDLE hModule, TI_UINT64 staTSF, TI_UINT8 dtimCount);
-
-
-/* Structures */
-
- 
-/* Internal functions prototypes */
-
-static void currBSS_lowRssiThrCrossed(currBSS_t *hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-static void currBSS_lowSnrThrCrossed(currBSS_t *hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-static void currBSS_BackgroundScanQuality(TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-static void currBSS_consecTxErrors(currBSS_t *hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-static void currBSS_BssLost (currBSS_t *hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-static void currBSS_reportRoamingEvent(currBSS_t *hCurrBSS, apConn_roamingTrigger_e roamingEventType, roamingEventData_u *pRoamingEventData);
-static void currBSS_updateBSSLoss(currBSS_t *pCurrBSS);
-
-static TI_STATUS currBss_HandleTriggerEvent(TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength, TI_UINT8 eventID);
-static triggerDesc_t* currBss_findEmptyUserTrigger(TI_HANDLE hCurrBSS, TI_UINT16 clientID, TI_UINT8* triggerIdx);
-static void currBSS_RssiSnrTrigger0 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-static void currBSS_RssiSnrTrigger1 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-static void currBSS_RssiSnrTrigger2 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-static void currBSS_RssiSnrTrigger3 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-static void currBSS_RssiSnrTrigger4 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-static void currBSS_RssiSnrTrigger5 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-static void currBSS_RssiSnrTrigger6 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-static void currBSS_RssiSnrTrigger7 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-
-/* Public functions implementation */
-
-
-
-/**
-*
-* currBSS_create
-*
-* \b Description: 
-*
-* Create the Current BSS context: allocate memory for internal variables
-*
-* \b ARGS:
-*
-*  I   - hOS - the handle to the OS object
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_HANDLE currBSS_create(TI_HANDLE hOs)
-{
-    currBSS_t   *pCurrBss;
-
-    if ((pCurrBss = os_memoryAlloc(hOs, sizeof(currBSS_t))) != NULL)
-    {
-        pCurrBss->hOs = hOs;
-    
-        return pCurrBss;
-    }
-    else /* Failed to allocate control block */
-    {
-        WLAN_OS_REPORT(("FATAL ERROR: currBSS_create(): Error allocating cb - aborting\n"));
-        return NULL;
-    }
-}
-
-
-/**
-*
-* currBSS_unload
-*
-* \b Description: 
-*
-* Finish Current BSS module work.
-*
-* \b ARGS:
-*
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS currBSS_unload(TI_HANDLE hCurrBSS)
-{
-    currBSS_t   *pCurrBSS;
-    
-    if (hCurrBSS != NULL)
-    {
-        pCurrBSS = (currBSS_t *)hCurrBSS;
-
-        /* Free pre-allocated control block */
-        os_memoryFree(pCurrBSS->hOs, pCurrBSS, sizeof(currBSS_t));
-    }
-    return TI_OK;
-}
-
-
-/**
-*
-* currBSS_init
-*
-* \b Description: 
-*
-* Get other modules handles.
-*
-* \b ARGS:
-*
-*  I   pStadHandles - The driver modules handles
-*  
-* \b RETURNS:
-*
-*  void
-*
-* \sa 
-*/
-void currBSS_init (TStadHandlesList *pStadHandles)
-{
-    currBSS_t *pCurrBSS = (currBSS_t *)(pStadHandles->hCurrBss);
-    int i=0;
-
-    pCurrBSS->hAPConn       = pStadHandles->hAPConnection;
-    pCurrBSS->hTWD          = pStadHandles->hTWD;
-    pCurrBSS->hMlme         = pStadHandles->hMlmeSm;
-    pCurrBSS->hPowerMngr    = pStadHandles->hPowerMgr;
-    pCurrBSS->hSme          = pStadHandles->hSme;
-    pCurrBSS->hSiteMgr      = pStadHandles->hSiteMgr;
-	pCurrBSS->hConn         = pStadHandles->hConn;
-    pCurrBSS->hReport       = pStadHandles->hReport;
-    pCurrBSS->hScanMngr     = pStadHandles->hScanMngr;
-    pCurrBSS->hEvHandler    = pStadHandles->hEvHandler;
-    pCurrBSS->hTxCtrl       = pStadHandles->hTxCtrl;
-
-    for (i=0; i< MAX_NUM_OF_RSSI_SNR_TRIGGERS ; i++)
-    {
-        pCurrBSS->aTriggersDesc[i].clientID = 0;
-        pCurrBSS->aTriggersDesc[i].fCB = NULL;
-		pCurrBSS->aTriggersDesc[i].hCB = NULL;
-        pCurrBSS->aTriggersDesc[i].WasRegisteredByApp = TI_FALSE;
-
-    }
-}
-
-
-/**
-*
-* currBSS_SetDefaults
-*
-* \b Description: 
-*
-* Prepare Current BSS module to work
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS currBSS_SetDefaults (TI_HANDLE hCurrBSS, TCurrBssInitParams *pInitParams)
-{
-    currBSS_t *pCurrBSS = (currBSS_t *)hCurrBSS;
-    TRroamingTriggerParams params;
-    RssiSnrTriggerCfg_t tTriggerCfg;
-    
-    /* save the roaming operational mode */
-    pCurrBSS->RoamingOperationalMode = pInitParams->RoamingOperationalMode;
-
-    /* Registration succeeded, continue with init procedure */
-    pCurrBSS->band = RADIO_BAND_2_4_GHZ;
-    pCurrBSS->channel = 0;
-    pCurrBSS->isConnected = TI_FALSE;
-    pCurrBSS->type = BSS_ANY;
-    pCurrBSS->currAPInfo.RSSI = 0;
-    pCurrBSS->bUseSGParams = TI_FALSE;
-    pCurrBSS->uDefaultKeepAlivePeriod = pInitParams->uNullDataKeepAlivePeriod; 
-
-
-    /* register the static callbacks */
-    TWD_RegisterEvent(pCurrBSS->hTWD,TWD_OWN_EVENT_RSSI_SNR_TRIGGER_0,(void*) currBSS_RssiSnrTrigger0, pCurrBSS);
-    TWD_RegisterEvent(pCurrBSS->hTWD,TWD_OWN_EVENT_RSSI_SNR_TRIGGER_1,(void*) currBSS_RssiSnrTrigger1, pCurrBSS);
-    TWD_RegisterEvent(pCurrBSS->hTWD,TWD_OWN_EVENT_RSSI_SNR_TRIGGER_2,(void*) currBSS_RssiSnrTrigger2, pCurrBSS);
-    TWD_RegisterEvent(pCurrBSS->hTWD,TWD_OWN_EVENT_RSSI_SNR_TRIGGER_3,(void*) currBSS_RssiSnrTrigger3, pCurrBSS);
-    TWD_RegisterEvent(pCurrBSS->hTWD,TWD_OWN_EVENT_RSSI_SNR_TRIGGER_4,(void*) currBSS_RssiSnrTrigger4, pCurrBSS);
-    TWD_RegisterEvent(pCurrBSS->hTWD,TWD_OWN_EVENT_RSSI_SNR_TRIGGER_5,(void*) currBSS_RssiSnrTrigger5, pCurrBSS);
-    TWD_RegisterEvent(pCurrBSS->hTWD,TWD_OWN_EVENT_RSSI_SNR_TRIGGER_6,(void*) currBSS_RssiSnrTrigger6, pCurrBSS);
-    TWD_RegisterEvent(pCurrBSS->hTWD,TWD_OWN_EVENT_RSSI_SNR_TRIGGER_7,(void*) currBSS_RssiSnrTrigger7, pCurrBSS);
-
-    if (ROAMING_OPERATIONAL_MODE_AUTO == pCurrBSS->RoamingOperationalMode)
-    {
-        /* Configure and enable the Low RSSI, the Low SNR and the Missed beacon events */
-        currBSS_RegisterTriggerEvent(hCurrBSS, TWD_OWN_EVENT_RSSI_SNR_TRIGGER_0, 0, (void*)currBSS_lowRssiThrCrossed, hCurrBSS);
-        currBSS_RegisterTriggerEvent(hCurrBSS, TWD_OWN_EVENT_RSSI_SNR_TRIGGER_1, 0, (void*)currBSS_lowSnrThrCrossed, hCurrBSS);
-        currBSS_RegisterTriggerEvent(hCurrBSS, TWD_OWN_EVENT_RSSI_SNR_TRIGGER_4, 0, (void*)currBSS_BackgroundScanQuality, hCurrBSS);
-
-        pCurrBSS->lowRssiThreshold = RSSI_DEFAULT_THRESHOLD;
-        tTriggerCfg.index     = TRIGGER_EVENT_LOW_RSSI;
-        tTriggerCfg.threshold = pCurrBSS->lowRssiThreshold;
-        tTriggerCfg.pacing    = TRIGGER_LOW_RSSI_PACING;
-        tTriggerCfg.metric    = METRIC_EVENT_RSSI_BEACON;
-        tTriggerCfg.type      = RX_QUALITY_EVENT_LEVEL;
-        tTriggerCfg.direction = RSSI_EVENT_DIR_LOW;
-        tTriggerCfg.hystersis = 0;
-        tTriggerCfg.enable    = TI_TRUE;
-        TWD_CfgRssiSnrTrigger (pCurrBSS->hTWD, &tTriggerCfg);
-    
-        pCurrBSS->lowSnrThreshold = SNR_DEFAULT_THRESHOLD;
-        tTriggerCfg.index     = TRIGGER_EVENT_LOW_SNR;
-        tTriggerCfg.threshold = pCurrBSS->lowSnrThreshold;
-        tTriggerCfg.pacing    = TRIGGER_LOW_SNR_PACING;
-        tTriggerCfg.metric    = METRIC_EVENT_SNR_BEACON;
-        tTriggerCfg.type      = RX_QUALITY_EVENT_LEVEL;
-        tTriggerCfg.direction = RSSI_EVENT_DIR_LOW;
-        tTriggerCfg.hystersis = 0;
-        tTriggerCfg.enable    = TI_TRUE;
-        TWD_CfgRssiSnrTrigger (pCurrBSS->hTWD, &tTriggerCfg);
-
-        pCurrBSS->highQualityForBkgrdScan = RSSI_DEFAULT_THRESHOLD;
-        pCurrBSS->lowQualityForBkgrdScan = RSSI_DEFAULT_THRESHOLD;
-        tTriggerCfg.index     = TRIGGER_EVENT_BG_SCAN;
-        tTriggerCfg.threshold = pCurrBSS->lowQualityForBkgrdScan;
-        tTriggerCfg.pacing    = TRIGGER_BG_SCAN_PACING;
-        tTriggerCfg.metric    = METRIC_EVENT_RSSI_DATA;
-        tTriggerCfg.type      = RX_QUALITY_EVENT_EDGE;
-        tTriggerCfg.direction = RSSI_EVENT_DIR_BIDIR;
-        tTriggerCfg.hystersis = TRIGGER_BG_SCAN_HYSTERESIS;
-        tTriggerCfg.enable    = TI_TRUE;
-        TWD_CfgRssiSnrTrigger (pCurrBSS->hTWD, &tTriggerCfg);
-
-         /* Register for 'BSS-Loss' event */
-        TWD_RegisterEvent (pCurrBSS->hTWD, TWD_OWN_EVENT_BSS_LOSE, (void *)currBSS_BssLost, pCurrBSS);
-        TWD_EnableEvent (pCurrBSS->hTWD, TWD_OWN_EVENT_BSS_LOSE);
-
-        /* save last configured value for handling Soft Gemini changes */ 
-        pCurrBSS->numExpectedTbttForBSSLoss = OUT_OF_SYNC_DEFAULT_THRESHOLD;
-        params.TsfMissThreshold = OUT_OF_SYNC_DEFAULT_THRESHOLD;
-        params.BssLossTimeout = NO_BEACON_DEFAULT_TIMEOUT;
-        TWD_CfgConnMonitParams (pCurrBSS->hTWD, &params);
-
-         /* Register for 'Consec. Tx error' */
-        TWD_RegisterEvent (pCurrBSS->hTWD, TWD_OWN_EVENT_MAX_TX_RETRY, (void *)currBSS_consecTxErrors, pCurrBSS);
-        TWD_EnableEvent (pCurrBSS->hTWD, TWD_OWN_EVENT_MAX_TX_RETRY);
-
-        pCurrBSS->maxTxRetryThreshold = NO_ACK_DEFAULT_THRESHOLD;
-        params.maxTxRetry = NO_ACK_DEFAULT_THRESHOLD;
-        TWD_CfgMaxTxRetry (pCurrBSS->hTWD, &params);
-    }
-
-    return TI_OK;
-}
-
-
-/**
-*
-* currBSS_updateRoamingTriggers
-*
-* \b Description: 
-*
-* Configure parameter of Current BSS
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS - Current BSS handle \n
-*  I   - params - pointer to datablock of roaming threshols \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS currBSS_updateRoamingTriggers (TI_HANDLE hCurrBSS, roamingMngrThresholdsConfig_t *params)
-{
-    currBSS_t   *pCurrBSS = (currBSS_t *)hCurrBSS;
-    TRroamingTriggerParams roamingTriggersParams;
-    RssiSnrTriggerCfg_t tTriggerCfg;
-
-    if (pCurrBSS->lowRssiThreshold != params->lowRssiThreshold) 
-    {
-        pCurrBSS->lowRssiThreshold = params->lowRssiThreshold;
-
-        tTriggerCfg.index     = TRIGGER_EVENT_LOW_RSSI;
-        tTriggerCfg.threshold = pCurrBSS->lowRssiThreshold;
-        tTriggerCfg.pacing    = TRIGGER_LOW_RSSI_PACING;
-        tTriggerCfg.metric    = METRIC_EVENT_RSSI_BEACON;
-        tTriggerCfg.type      = RX_QUALITY_EVENT_LEVEL;
-        tTriggerCfg.direction = RSSI_EVENT_DIR_LOW;
-        tTriggerCfg.hystersis = 0;
-        tTriggerCfg.enable    = TI_TRUE;
-
-        TWD_CfgRssiSnrTrigger (pCurrBSS->hTWD, &tTriggerCfg);
-    }
-
-    if (pCurrBSS->lowSnrThreshold != params->lowSnrThreshold) 
-    {
-        pCurrBSS->lowSnrThreshold = params->lowSnrThreshold;
-
-        tTriggerCfg.index     = TRIGGER_EVENT_LOW_SNR;
-        tTriggerCfg.threshold = pCurrBSS->lowSnrThreshold;
-        tTriggerCfg.pacing    = TRIGGER_LOW_SNR_PACING;
-        tTriggerCfg.metric    = METRIC_EVENT_SNR_BEACON;
-        tTriggerCfg.type      = RX_QUALITY_EVENT_LEVEL;
-        tTriggerCfg.direction = RSSI_EVENT_DIR_LOW;
-        tTriggerCfg.hystersis = 0;
-        tTriggerCfg.enable    = TI_TRUE;
-    
-        TWD_CfgRssiSnrTrigger (pCurrBSS->hTWD, &tTriggerCfg);
-    }
-
-    if (pCurrBSS->lowQualityForBkgrdScan != params->lowQualityForBackgroungScanCondition) 
-    {
-        pCurrBSS->lowQualityForBkgrdScan = params->lowQualityForBackgroungScanCondition;
-        tTriggerCfg.index     = TRIGGER_EVENT_BG_SCAN;
-        tTriggerCfg.threshold = pCurrBSS->lowQualityForBkgrdScan;
-        tTriggerCfg.pacing    = TRIGGER_BG_SCAN_PACING;
-        tTriggerCfg.metric    = METRIC_EVENT_RSSI_DATA;
-        tTriggerCfg.type      = RX_QUALITY_EVENT_EDGE;
-        tTriggerCfg.direction = RSSI_EVENT_DIR_BIDIR;
-        tTriggerCfg.hystersis = TRIGGER_BG_SCAN_HYSTERESIS;
-        tTriggerCfg.enable    = TI_TRUE;
-
-        TWD_CfgRssiSnrTrigger (pCurrBSS->hTWD, &tTriggerCfg);
-    }
-
-    if (pCurrBSS->numExpectedTbttForBSSLoss != params->numExpectedTbttForBSSLoss) 
-    {
-        /* save last configured value for handling Soft Gemini changes */ 
-        pCurrBSS->numExpectedTbttForBSSLoss = params->numExpectedTbttForBSSLoss;
-        /* Configure TWD with 'No BSS' thresholds (Same as the other parameters but in a special
-            function for the Soft Gemini module consideration) */
-        currBSS_updateBSSLoss(pCurrBSS);
-    }
-    
-    /* Configure TWD with 'Consecutive NACK' thresholds */
-    if (pCurrBSS->maxTxRetryThreshold != params->dataRetryThreshold) 
-    {
-        pCurrBSS->maxTxRetryThreshold = params->dataRetryThreshold;
-        roamingTriggersParams.maxTxRetry = pCurrBSS->maxTxRetryThreshold;
-        TWD_CfgMaxTxRetry (pCurrBSS->hTWD, &roamingTriggersParams);
-    }
-
-    pCurrBSS->highQualityForBkgrdScan = params->normalQualityForBackgroungScanCondition;
-    
-    return TI_OK;
-}
-
-/**
-*
-* currBSS_getRoamingParams
-*
-* \b Description: 
-*
-* Retrieves the roaming triggers stored in the CurrBSS module.
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS - Current BSS handle \n
-*  O   - aNumExpectedTbttForBSSLoss - Current BSS handle \n
-*  O   - aLowQualityForBackgroungScanCondition - Current BSS handle \n
-*  O   - aNormalQualityForBackgroungScanCondition - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS currBSS_getRoamingParams(TI_HANDLE hCurrBSS,
-                                   TI_UINT8 * aNumExpectedTbttForBSSLoss,
-                                   TI_INT8 * aLowQualityForBackgroungScanCondition,
-                                   TI_INT8 * aNormalQualityForBackgroungScanCondition)
-{
-    currBSS_t * pCurrBSS = (currBSS_t *) hCurrBSS;
-
-    *aNumExpectedTbttForBSSLoss = pCurrBSS->numExpectedTbttForBSSLoss;
-    *aLowQualityForBackgroungScanCondition = pCurrBSS->lowQualityForBkgrdScan;
-    *aNormalQualityForBackgroungScanCondition = pCurrBSS->highQualityForBkgrdScan;
-    
-    return TI_OK;
-}
-
-/**
-*
-* currBSS_SGconfigureBSSLoss
-*
-* \b Description: 
-*
-*   This function is called by the Soft Gemini module in order to enable/disable the use of
-*   the compensation value for the BSSLoss count , and the percent of increasing that value
-*   It also set the new parameter to the FW (with another generic function)
-*   The compensation is needed since BT activity might over-run recieved beacons
-*    
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS - Current BSS handle \n
-*        SGcompensationPercent - percent of increasing the BSSLoss value to the FW \n
-*        bUseSGParams - whether to use the SG compensation
-*
-* \b RETURNS:
-*
-*  -
-*
-* \sa 
-*/
-
-void currBSS_SGconfigureBSSLoss(TI_HANDLE hCurrBSS,
-                                        TI_UINT32 SGcompensationPercent , TI_BOOL bUseSGParams)
-{
-    currBSS_t   *pCurrBSS = (currBSS_t *)hCurrBSS;
-    
-    pCurrBSS->bUseSGParams = bUseSGParams;
-    pCurrBSS->SGcompensationPercent = SGcompensationPercent;
-
-TRACE1(pCurrBSS->hReport, REPORT_SEVERITY_INFORMATION, "CurrBSS_SGConf: SG =%d\n", pCurrBSS->bUseSGParams);
-
-    /* update the change of BSSLoss in the FW */
-    currBSS_updateBSSLoss(pCurrBSS);
-}
-
-/**
-*
-* currBSS_updateBSSLoss
-*
-* \b Description: 
-*
-*   This function updates only BSS Loss parameter , we need it to be able to consider the
-*   Soft Gemini status , and change the parameter according to it 
-*
-* \b ARGS:
-*
-*  I   - pCurrBSS - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  -
-*
-* \sa 
-*/
-void currBSS_updateBSSLoss(currBSS_t   *pCurrBSS)
-{
-    TRroamingTriggerParams roamingTriggersParams;
-	TI_UINT16 desiredBeaconInterval = 0;
-	TI_UINT32 connSelfTimeout = 0;
-	paramInfo_t *pParam;
-
-	pParam = (paramInfo_t *)os_memoryAlloc(pCurrBSS->hOs, sizeof(paramInfo_t));
-    if (pParam)
-    {
-		pParam->paramType = SITE_MGR_DESIRED_BEACON_INTERVAL_PARAM;
-		siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);
-		desiredBeaconInterval = pParam->content.siteMgrDesiredBeaconInterval;
-
-		pParam->paramType = CONN_SELF_TIMEOUT_PARAM;
-		conn_getParam(pCurrBSS->hConn, pParam);
-		connSelfTimeout = pParam->content.connSelfTimeout;
-
-		os_memoryFree(pCurrBSS->hOs, pParam, sizeof(paramInfo_t));
-	}
-	else
-	{
-		TRACE0(pCurrBSS->hReport, REPORT_SEVERITY_ERROR, "currBSS_updateBSSLoss: Error allocating paramInfo_t\n");
-	}
-
-    if (pCurrBSS->type == BSS_INDEPENDENT)
-    {
-       if (desiredBeaconInterval > 0)
-       {
-		   /* Calculate the number of beacons for miss timeout */
-           roamingTriggersParams.TsfMissThreshold = connSelfTimeout / desiredBeaconInterval;
-       }
-	   else
-	   {
-		   /* Use default parameter */
-		   roamingTriggersParams.TsfMissThreshold = OUT_OF_SYNC_IBSS_THRESHOLD; 
-	   }
-    }
-    else /* In Infra we use the saved parameter */
-    {
-        roamingTriggersParams.TsfMissThreshold = pCurrBSS->numExpectedTbttForBSSLoss;
-    }
-    
-    roamingTriggersParams.BssLossTimeout = NO_BEACON_DEFAULT_TIMEOUT;
-    
-    TRACE2(pCurrBSS->hReport, REPORT_SEVERITY_INFORMATION, ": SG=%d, Band=%d\n", pCurrBSS->bUseSGParams, pCurrBSS->currAPInfo.band);
-
-    /* if Soft Gemini is enabled - increase the BSSLoss value (because BT activity might over-run beacons) */
-    if ((pCurrBSS->bUseSGParams) && (pCurrBSS->currAPInfo.band == RADIO_BAND_2_4_GHZ))
-    {
-        roamingTriggersParams.TsfMissThreshold = (roamingTriggersParams.TsfMissThreshold * 
-            (100 + pCurrBSS->SGcompensationPercent)) / 100;
-
-        TRACE2(pCurrBSS->hReport, REPORT_SEVERITY_INFORMATION, ": old value = %d, new value (for SG compensation) = %d\n", pCurrBSS->numExpectedTbttForBSSLoss,roamingTriggersParams.TsfMissThreshold);
-    }
-
-    TWD_CfgConnMonitParams (pCurrBSS->hTWD, &roamingTriggersParams);
-}
-
-/**
-*
-* currBSS_swChFinished
-*
-* \b Description: 
-*
-* Called when switch channel process is complete in order to reset RSSI calculations
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  -
-*
-* \sa 
-*/
-void currBSS_restartRssiCounting(TI_HANDLE hCurrBSS)
-{
-    currBSS_t   *pCurrBSS = (currBSS_t *)hCurrBSS;
-
-    pCurrBSS->currAPInfo.RSSI = 0;
-}
-
-/**
-*
-* currBSS_getBssInfo
-*
-* \b Description: 
-*
-* Get parameter of Current BSS
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  pointer to current BSS info block.
-*
-* \sa 
-*/
-bssEntry_t *currBSS_getBssInfo(TI_HANDLE hCurrBSS)
-{
-    currBSS_t   *pCurrBSS = (currBSS_t *)hCurrBSS;
-
-    /* Return pointer to current AP info */
-    return &(pCurrBSS->currAPInfo);
-}
-
-
-/**
-*
-* currBSS_probRespReceivedCallb
-*
-* \b Description: 
-*
-* Callback function, provided to MLME module. Called each time Probe response received.
-* This function verifies that the Probe response was sent by current AP, and then
-* updates current AP database.
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS currBSS_probRespReceivedCallb(TI_HANDLE hCurrBSS,
-                                        TRxAttr *pRxAttr,
-                                        TMacAddr *bssid,
-                                        mlmeFrameInfo_t *pFrameInfo,
-										TI_UINT8 *dataBuffer,
-                                        TI_UINT16 bufLength)
-{
-    currBSS_t   *pCurrBSS = (currBSS_t *)hCurrBSS;
-    paramInfo_t *pParam;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pCurrBSS->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-    pParam->paramType = SITE_MGR_CURRENT_BSSID_PARAM;
-    siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);    
-
-    if (pCurrBSS->isConnected && MAC_EQUAL (pParam->content.siteMgrDesiredBSSID, *bssid))
-    {
-        siteMgr_updateSite(pCurrBSS->hSiteMgr, bssid, pFrameInfo, pRxAttr->channel, (ERadioBand)pRxAttr->band, TI_FALSE);
-        /* Save the IE part of the Probe Response buffer in the site table */
-        siteMgr_saveProbeRespBuffer(pCurrBSS->hSiteMgr, bssid, (TI_UINT8 *)dataBuffer, bufLength);
-    }
-    os_memoryFree(pCurrBSS->hOs, pParam, sizeof(paramInfo_t));
-    return TI_OK;
-}
-
-
-
-/**
-*
-* currBSS_beaconReceivedCallb
-*
-* \b Description: 
-*
-* Callback function, provided to MLME module. Called each time Beacon received.
-* This function verifies that the Probe response was sent by current AP, and then
-* updates current AP database.
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS currBSS_beaconReceivedCallb(TI_HANDLE hCurrBSS,
-                                      TRxAttr *pRxAttr,
-                                      TMacAddr *bssid,
-                                      mlmeFrameInfo_t *pFrameInfo,
-                                      TI_UINT8 *dataBuffer,
-                                      TI_UINT16 bufLength)
-{
-    currBSS_t           *pCurrBSS = (currBSS_t *)hCurrBSS;
-    paramInfo_t         *pParam;
-    ScanBssType_e       eFrameBssType, eCurrentBSSType;
-	TMacAddr            desiredBSSID;
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pCurrBSS->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return TI_NOK;
-    }
-
-    eFrameBssType = ((pFrameInfo->content.iePacket.capabilities >> CAP_ESS_SHIFT) & CAP_ESS_MASK) ? BSS_INFRASTRUCTURE : BSS_INDEPENDENT;
-
-    /* Get current BSS type */
-    pParam->paramType = SITE_MGR_CURRENT_BSS_TYPE_PARAM;
-    siteMgr_getParam (pCurrBSS->hSiteMgr, pParam);
-    eCurrentBSSType = pParam->content.siteMgrCurrentBSSType; /* Save parameter because the next line overrides it */
-
-    /* Get current BSSID */
-    pParam->paramType = SITE_MGR_CURRENT_BSSID_PARAM;
-    siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);   
-	TRACE12(pCurrBSS->hReport, REPORT_SEVERITY_INFORMATION,
-			"currBSS_beaconReceivedCallb: bssid = %02x.%02x.%02x.%02x.%02x.%02x, siteMgrDesiredBSSID = %02x.%02x.%02x.%02x.%02x.%02x\n",
-			(*bssid)[0], (*bssid)[1], (*bssid)[2], (*bssid)[3], (*bssid)[4], (*bssid)[5],
-			pParam->content.siteMgrDesiredBSSID[0],
-			pParam->content.siteMgrDesiredBSSID[1],
-			pParam->content.siteMgrDesiredBSSID[2],
-			pParam->content.siteMgrDesiredBSSID[3],
-			pParam->content.siteMgrDesiredBSSID[4],
-			pParam->content.siteMgrDesiredBSSID[5]);
-	MAC_COPY(desiredBSSID, pParam->content.siteMgrDesiredBSSID);
-
-    if (pCurrBSS->isConnected && (eCurrentBSSType == eFrameBssType))
-    {
-		TI_BOOL bFramePrivacy = 0, bCurrentSitePrivacy = 0;
-        /* if the bss type is ibss save set the current site privacy (the beacons transimted by STA)
-		   and set the privacy from the received frame, so that if the privacy is different there will
-		   be no connection */
-		if (eFrameBssType == BSS_INDEPENDENT)
-		{
-			pParam->paramType = SITE_MGR_SITE_CAPABILITY_PARAM;
-			siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);
-
-			bCurrentSitePrivacy = ((pParam->content.siteMgrSiteCapability >> CAP_PRIVACY_SHIFT) & CAP_PRIVACY_MASK) ? TI_TRUE : TI_FALSE;
-			bFramePrivacy       = ((pFrameInfo->content.iePacket.capabilities >> CAP_PRIVACY_SHIFT) & CAP_PRIVACY_MASK) ? TI_TRUE : TI_FALSE;
-		}
-
-        if (MAC_EQUAL(desiredBSSID, *bssid))
-        {
-            if ((eFrameBssType == BSS_INFRASTRUCTURE) || 
-			    ((eFrameBssType == BSS_INDEPENDENT) && (bCurrentSitePrivacy == bFramePrivacy)) )
-			{
-				siteMgr_updateSite(pCurrBSS->hSiteMgr, bssid, pFrameInfo, pRxAttr->channel, (ERadioBand)pRxAttr->band, TI_FALSE);
-				/* Save the IE part of the beacon buffer in the site table */
-				siteMgr_saveBeaconBuffer(pCurrBSS->hSiteMgr, bssid, (TI_UINT8 *)dataBuffer, bufLength);
-			}
-        }
-    	else if (eFrameBssType == BSS_INDEPENDENT)
-        {
-           /* Check if the Station sending the beacon uses privacy for the ibss and
-			   compare it to the self site. If privacy usage mathces, merge ibss
-			   and if not continue using self site */
-			if (bCurrentSitePrivacy == bFramePrivacy) 
-			{
-				siteMgr_IbssMerge(pCurrBSS->hSiteMgr, desiredBSSID, *bssid,
-								  pFrameInfo, pRxAttr->channel, (ERadioBand)pRxAttr->band);
-				siteMgr_updateSite(pCurrBSS->hSiteMgr, bssid, pFrameInfo, pRxAttr->channel, (ERadioBand)pRxAttr->band, TI_FALSE);
-				siteMgr_saveBeaconBuffer(pCurrBSS->hSiteMgr, bssid, (TI_UINT8 *)dataBuffer, bufLength);
-			}
-    	}
-    }
-
-    os_memoryFree(pCurrBSS->hOs, pParam, sizeof(paramInfo_t));
-    return TI_OK;
-}
-
-
-/**
-*
-* currBSS_updateConnectedState
-*
-* \b Description: 
-*
-* This function is called when FW recovery performed.
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS - Current BSS handle \n
-*  I   - isConnected - TI_TRUE or TI_FALSE \n
-*  I   - type - IBSS or EBSS \n
-*  
-* \b RETURNS:
-*
-*  -
-*
-* \sa 
-*/
-void currBSS_updateConnectedState(TI_HANDLE hCurrBSS, TI_BOOL isConnected, ScanBssType_e type)
-{
-    currBSS_t   *pCurrBSS = (currBSS_t *)hCurrBSS;
-
-    pCurrBSS->type = type;
-    pCurrBSS->isConnected = isConnected;
-
-    if (isConnected) 
-    {
-        /*** Store the info of current AP ***/
-        paramInfo_t  *pParam;
-
-        pParam = (paramInfo_t *)os_memoryAlloc(pCurrBSS->hOs, sizeof(paramInfo_t));
-        if (!pParam)
-        {
-            return;
-        }
-
-        /* BSSID */
-        pParam->paramType = SITE_MGR_CURRENT_BSSID_PARAM;
-        siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);    
-        MAC_COPY (pCurrBSS->currAPInfo.BSSID, pParam->content.siteMgrDesiredBSSID);
-
-        /* Rx rate */
-        pParam->paramType = SITE_MGR_LAST_RX_RATE_PARAM;
-        siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);               
-        pCurrBSS->currAPInfo.rxRate = pParam->content.ctrlDataCurrentBasicRate;
-
-        /* Band */
-        pParam->paramType = SITE_MGR_RADIO_BAND_PARAM;
-        siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);               
-        pCurrBSS->currAPInfo.band = pParam->content.siteMgrRadioBand;
-
-        /* Channel */
-        pParam->paramType = SITE_MGR_CURRENT_CHANNEL_PARAM;
-        siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);               
-        pCurrBSS->currAPInfo.channel = pParam->content.siteMgrCurrentChannel;
-
-        /* Last Rx Tsf */
-        pParam->paramType = SITE_MGR_CURRENT_TSF_TIME_STAMP;
-        siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);               
-        os_memoryCopy(pCurrBSS->hOs, &pCurrBSS->currAPInfo.lastRxTSF, 
-                      pParam->content.siteMgrCurrentTsfTimeStamp, sizeof(pCurrBSS->currAPInfo.lastRxTSF));
-
-        /* Beacon interval */
-        pParam->paramType = SITE_MGR_BEACON_INTERVAL_PARAM;
-        siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);               
-        pCurrBSS->currAPInfo.beaconInterval = pParam->content.beaconInterval;
-
-        /* Capability */
-        pParam->paramType = SITE_MGR_SITE_CAPABILITY_PARAM;
-        siteMgr_getParam(pCurrBSS->hSiteMgr,pParam);
-        pCurrBSS->currAPInfo.capabilities = pParam->content.siteMgrSiteCapability;
-        pParam->paramType = SITE_MGR_CURRENT_TSF_TIME_STAMP;
-        siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);    
-
-        /* pCurrBSS->currAPInfo.lastRxHostTimestamp = *((TI_UINT64 *)(pIEs->TimeStamp));*/ /* TBD*/
-        os_memoryCopy(pCurrBSS->hOs, &pCurrBSS->currAPInfo.lastRxHostTimestamp, pParam->content.siteMgrCurrentTsfTimeStamp, sizeof(TI_UINT32));
-
-        pParam->paramType = SITE_MGR_LAST_BEACON_BUF_PARAM;
-        siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);               
-        pCurrBSS->currAPInfo.pBuffer = pParam->content.siteMgrLastBeacon.buffer;
-        pCurrBSS->currAPInfo.bufferLength = pParam->content.siteMgrLastBeacon.bufLength;
-        pCurrBSS->currAPInfo.resultType = (pParam->content.siteMgrLastBeacon.isBeacon) ? SCAN_RFT_BEACON : SCAN_RFT_PROBE_RESPONSE;
-
-        /* Set BSS Loss to Fw - note that it depends on the Connection type - (Infa/IBSS) */
-        currBSS_updateBSSLoss(pCurrBSS);
-
-        if(type == BSS_INFRASTRUCTURE)
-        {
-            TI_UINT32           uKeepAlivePreiod = pCurrBSS->uDefaultKeepAlivePeriod * 1000; /* convert to ms */
-            TSetTemplate        tKeepAliveTemplate;
-            TKeepAliveParams    tKeepAliveParams;
-
-            /*
-             * only configure the null-data keepa-live message if the interval is valid
-             * (either the default interval or the one from teh XCC IE)
-             */
-            if (0 != uKeepAlivePreiod)
-            {
-                TRACE0(pCurrBSS->hReport, REPORT_SEVERITY_INFORMATION , "currBSS_updateConnectedState: Configuring null-data keep-alive");
-    
-                /* build null-data template */
-                tKeepAliveTemplate.ptr = &(pCurrBSS->keepAliveBuffer[ 0 ]);
-                if ( TI_OK != txCtrlServ_buildNullFrame (pCurrBSS->hTxCtrl, 
-                                                         tKeepAliveTemplate.ptr, &(tKeepAliveTemplate.len)))
-                {
-                    TRACE0(pCurrBSS->hReport, REPORT_SEVERITY_ERROR , "currBSS_updateConnectedState: error building null data frame\n");
-    
-                }
-    
-                /* configure null-data template */
-                tKeepAliveTemplate.type = KEEP_ALIVE_TEMPLATE;
-                tKeepAliveTemplate.index = KEEP_ALIVE_NULL_DATA_INDEX;
-                tKeepAliveTemplate.uRateMask = RATE_MASK_UNSPECIFIED;
-                TWD_CmdTemplate (pCurrBSS->hTWD, &tKeepAliveTemplate, NULL, NULL);
-    
-                /* configure paramters */
-                tKeepAliveParams.index = KEEP_ALIVE_NULL_DATA_INDEX;
-                tKeepAliveParams.enaDisFlag = TI_TRUE; /* enabled */
-                tKeepAliveParams.trigType = KEEP_ALIVE_TRIG_TYPE_NO_TX;
-                tKeepAliveParams.interval = uKeepAlivePreiod;
-                TWD_CfgKeepAlive (pCurrBSS->hTWD, &tKeepAliveParams);
-            }
-        }        
-        os_memoryFree(pCurrBSS->hOs, pParam, sizeof(paramInfo_t));
-    }
-    else
-    {
-        if(type == BSS_INFRASTRUCTURE)
-        {
-            TKeepAliveParams    tKeepAliveParams;
-
-            /* disable NULL-data keep-palive template */
-            tKeepAliveParams.index = KEEP_ALIVE_NULL_DATA_INDEX;
-            tKeepAliveParams.enaDisFlag = TI_FALSE; /* disabled */
-            tKeepAliveParams.interval = 1000; /* minimum accepted by the FW */
-            tKeepAliveParams.trigType = KEEP_ALIVE_TRIG_TYPE_NO_TX;
-            TWD_CfgKeepAlive (pCurrBSS->hTWD, &tKeepAliveParams);
-
-        }        
-    }
-}
-
-
-/**
-*
-* currBSS_BssLost
-*
-* \b Description: 
-*
-* Callback function, called upon BSS-Loss event from FW.
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  void
-*
-* \sa 
-*/
-static void currBSS_BssLost (currBSS_t *hCurrBSS,
-                             TI_UINT8  *data,
-                             TI_UINT8   dataLength)
-{
-    currBSS_reportRoamingEvent(hCurrBSS, ROAMING_TRIGGER_BSS_LOSS, NULL);
-}
-
-
-/**
-*
-* currBSS_consecTxErrors
-*
-* \b Description: 
-*
-* Callback function, provided to HAL module.
-*
-* \b ARGS:
-*
-*  I   - pCurrBSS - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-static void currBSS_consecTxErrors(currBSS_t *hCurrBSS,
-                                   TI_UINT8     *data,
-                                   TI_UINT8     dataLength)
-{
-    currBSS_reportRoamingEvent(hCurrBSS, ROAMING_TRIGGER_MAX_TX_RETRIES, NULL);
-}
-
-
-/**
-*
-* currBSS_lowRssiThrCrossed
-*
-* \b Description: 
-*
-* Callback function, provided to HAL module.
-*
-* \b ARGS:
-*
-*  I   - pCurrBSS - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-static void currBSS_lowRssiThrCrossed(currBSS_t *hCurrBSS,
-                                      TI_UINT8     *data,
-                                      TI_UINT8     dataLength)
-{
-    currBSS_reportRoamingEvent(hCurrBSS, ROAMING_TRIGGER_LOW_QUALITY, NULL);
-}
-
-
-/**
-*
-* currBSS_lowSnrThrCrossed
-*
-* \b Description: 
-*
-* Callback function, provided to HAL module.
-*
-* \b ARGS:
-*
-*  I   - pCurrBSS - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-static void currBSS_lowSnrThrCrossed(currBSS_t *hCurrBSS,
-                                      TI_UINT8     *data,
-                                      TI_UINT8     dataLength)
-{
-    currBSS_reportRoamingEvent(hCurrBSS, ROAMING_TRIGGER_LOW_SNR, NULL);
-}
-
-/**
-*
-* currBSS_reportRoamingEvent
-*
-* \b Description: 
-*
-* This function checks the mode of Current BSS module. 
-* If connected to EBSS, it reports roaming event to AP Connection.
-*
-* \b ARGS:
-*
-*  I   - pCurrBSS - Current BSS handle \n
-*  I   - roamingEventType - Roaming trigger to report \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-static void currBSS_reportRoamingEvent(currBSS_t *pCurrBSS, 
-                                       apConn_roamingTrigger_e roamingEventType,
-                                       roamingEventData_u *pRoamingEventData)
-{
-    TRACE1(pCurrBSS->hReport, REPORT_SEVERITY_INFORMATION, "currBSS_reportRoamingEvent: trigger %d\n", roamingEventType);
-
-    if (pCurrBSS->isConnected)
-    {
-        if (pCurrBSS->type == BSS_INFRASTRUCTURE) 
-        {
-            apConn_reportRoamingEvent(pCurrBSS->hAPConn, roamingEventType, pRoamingEventData);
-        }
-        else /* IBSS */
-        { 
-            if( roamingEventType == ROAMING_TRIGGER_BSS_LOSS )
-            {
-                /* If in IBSS call the SME restart function, this logic issues a DISCONNECT 
-                 * event and tries to connect to other STA or establish self connection.
-                 */
-                sme_Restart (pCurrBSS->hSme);
-            }
-        }
-    }
-}
-
-
-/**
-*
-* currBSS_GetDefaultKeepAlivePeriod
-*
-* \b Description: 
-*
-* Get DefaultKeepAlivePeriod parameter value.
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS           - Current BSS handle \n
-*  I   - uDefaultKeepAlivePeriod - The  value \n
-*  
-* \b RETURNS:
-*
-*  None.
-*
-* \sa 
-*/
-void currBSS_GetDefaultKeepAlivePeriod (TI_HANDLE hCurrBSS, TI_UINT8* uKeepAlivePeriod)
-{ 
-    currBSS_t *pCurrBSS = (currBSS_t *)hCurrBSS;
-
-    *uKeepAlivePeriod = pCurrBSS->uDefaultKeepAlivePeriod;
-}
-
-
-/**
-*
-* currBSS_BackgroundScanQuality
-*
-* \b Description: 
-*
-* Called be EventMBox upon Background Scan Quality Trigger.
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  None.
-*
-* \sa 
-*/
-static void currBSS_BackgroundScanQuality(TI_HANDLE hCurrBSS,
-                                      TI_UINT8     *data,
-                                      TI_UINT8     dataLength)
-{
-    currBSS_t *pCurrBSS = (currBSS_t *)hCurrBSS;
-    TI_UINT8 averageRssi = *data;
-    paramInfo_t *pParam;
-
-    TRACE1(pCurrBSS->hReport, REPORT_SEVERITY_INFORMATION, "BackgroundScanQuality Event: RSSI = %d\n", averageRssi );
-
-    /* Report to AP Connection about reaching RSSI low or normal (high) threshold */
-    if (averageRssi < pCurrBSS->lowQualityForBkgrdScan)
-    {
-        apConn_reportRoamingEvent(pCurrBSS->hAPConn, ROAMING_TRIGGER_LOW_QUALITY_FOR_BG_SCAN, NULL);
-    }
-    else
-    {
-        apConn_reportRoamingEvent(pCurrBSS->hAPConn, ROAMING_TRIGGER_NORMAL_QUALITY_FOR_BG_SCAN, NULL); 
-    }
-
-    /* Update RSSI: */
-    pCurrBSS->currAPInfo.RSSI = averageRssi;
-
-    /* Update Site Table in order to represent the RSSI of current AP correctly in the utility */
-    pParam = (paramInfo_t *)os_memoryAlloc(pCurrBSS->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-    {
-        return;
-    }
-    pParam->paramType = SITE_MGR_CURRENT_SIGNAL_PARAM;
-    pParam->content.siteMgrCurrentSignal.rssi = averageRssi;
-    siteMgr_setParam(pCurrBSS->hSiteMgr, pParam);
-    os_memoryFree(pCurrBSS->hOs, pParam, sizeof(paramInfo_t));
-}
-
-
-/**
-*
-* currBss_findEmptyUserTrigger
-*
-* \b Description:
-*
-* Called be EventMBox upon Background Scan Quality Trigger.
-*
-* \b ARGS:
-*
-*  I   - hCurrBSS - Current BSS handle \n
-*
-* \b RETURNS:
-*
-*  None.
-*
-* \sa
-*/
-static triggerDesc_t* currBss_findEmptyUserTrigger(TI_HANDLE hCurrBSS, TI_UINT16 clientID, TI_UINT8* triggerIdx)
-{
-    currBSS_t       *pCurrBSS = (currBSS_t *)hCurrBSS;
-	TI_UINT8        i=0;
-
-    for (i=0; i< MAX_NUM_OF_RSSI_SNR_TRIGGERS ; i++)
-    {
-        if (clientID == pCurrBSS->aTriggersDesc[i].clientID || /* if the same client ID found, overwrite this trigger*/
-            (pCurrBSS->aTriggersDesc[i].WasRegisteredByApp == TI_FALSE && pCurrBSS->aTriggersDesc[i].fCB == NULL))
-        {
-            *triggerIdx = i;
-            return &pCurrBSS->aTriggersDesc[i];
-        }
-    }
-
-    return NULL;
-}
-
-
-/** 
- * \fn     currBSS_RegisterTriggerEvent
- * \brief  register the event in the currBss static table.
- *
- * \Args:
- * \param  hCurrBSS   - Current BSS handle
- * \param  triggerID  - The RSSI/SNR trigger ID as defined in the TWD. this arg is the table index.
- * \param  clientID - The client ID, '0' value means internal driver module client
- * \param  fCB - the trigger event handler. NULL value will be set for external app registration.
- * \return >= 0 if the empty Trigger event ID (index table) has been found and occupied
-    else -1 to signal an error
-* \sa
-*/
-TI_INT8 currBSS_RegisterTriggerEvent (TI_HANDLE hCurrBSS, TI_UINT8 triggerID,TI_UINT16 clientID, void* fCB, TI_HANDLE hCB)
-{
-    currBSS_t       *pCurrBSS = (currBSS_t *)hCurrBSS;
-	triggerDesc_t   *pEmptyTrigger;
-    TI_UINT8        emptyTriggerIdx = 0;
-
-    if (triggerID >= MAX_NUM_OF_RSSI_SNR_TRIGGERS)
-    {
-        TRACE1(pCurrBSS->hReport, REPORT_SEVERITY_ERROR , "currBSS_RegisterTriggerEvent: triggerID=%d is not in legal range \n", triggerID);
-        return -1;
-    }
-
-    TRACE3(pCurrBSS->hReport, REPORT_SEVERITY_INFORMATION, "currBSS_RegisterTriggerEvent: triggerID=%d, clientID=%d , fCB=%d. \n",triggerID, clientID ,fCB);
-
-    if(clientID > 0) /* this event is registered by application */
-    {
-        pEmptyTrigger = currBss_findEmptyUserTrigger(hCurrBSS, clientID, &emptyTriggerIdx);
-        if (pEmptyTrigger != NULL)
-        {
-            pEmptyTrigger->clientID = clientID;
-            pEmptyTrigger->fCB = NULL;
-			pEmptyTrigger->hCB = NULL;
-            pEmptyTrigger->WasRegisteredByApp = TI_TRUE;
-        }
-        else
-        {
-            TRACE0(pCurrBSS->hReport, REPORT_SEVERITY_ERROR , "currBSS_RegisterTriggerEvent: Table is full!. no Empty trigger is available! \n");
-            return -1;
-        }
-    }
-    else
-    {
-        pCurrBSS->aTriggersDesc[triggerID].clientID = 0;
-        pCurrBSS->aTriggersDesc[triggerID].fCB = fCB;
-		pCurrBSS->aTriggersDesc[triggerID].hCB = hCB;
-        pCurrBSS->aTriggersDesc[triggerID].WasRegisteredByApp = TI_FALSE;
-    }
-
-    TWD_EnableEvent (pCurrBSS->hTWD, triggerID);
-    return emptyTriggerIdx;
-}
-
-
-
-
-/**
- * \fn     currBss_HandleTriggerEvent
- * \brief  called by the user trigger event callbcack.
- *
- * \Args:
- * \param  hCurrBSS   - Current BSS handle
- * \param  data       - The event data
- * \param  dataLength - The event data length
- * \param  eventID -    The event ID
- * \return TI_STATUS
-* \sa
-*/
-static TI_STATUS currBss_HandleTriggerEvent(TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength, TI_UINT8 eventID)
-{
-    triggerDesc_t *pTrigger;
-    triggerDataEx_t triggerInfo;
-    currBSS_t *pCurrBSS = (currBSS_t *)hCurrBSS;
-
-    TRACE1(pCurrBSS->hReport ,REPORT_SEVERITY_INFORMATION,  "currBss_HandleTriggerEvent(). eventID =%d \n",eventID);
-
-    if (eventID < MAX_NUM_OF_RSSI_SNR_TRIGGERS)
-    {
-        pTrigger = &pCurrBSS->aTriggersDesc[eventID];
-    }
-    else
-    {
-       return TI_NOK;
-    }
-
-    if (TI_FALSE == pTrigger->WasRegisteredByApp)
-    {
-        ((TCurrBssDataCb)pTrigger->fCB)(pTrigger->hCB, data, dataLength);
-    }
-    else
-    {
-        triggerInfo.data =  *data; /* RSSI_SNR Triggers - holds one byte only */
-        triggerInfo.clientID = pTrigger->clientID;
-        EvHandlerSendEvent(pCurrBSS->hEvHandler, IPC_EVENT_RSSI_SNR_TRIGGER, (TI_UINT8*)&triggerInfo, sizeof(triggerInfo));
-    }
-
-    return TI_OK;
-}
-
-/**
- * \fn     currBSS_RssiSnrTrigger0-7
- * \brief  User Defined Trigger 0-7 callbacks
- * 
- * Called by EventMBox upon User Defined Trigger 0 - 7.
- * 
- * \note    
- * \param  hCurrBSS   - Current BSS handle
- * \param  data       - The event data
- * \param  dataLength - The event data length
- * \return void  
-* \sa 
-*/
-
-static void currBSS_RssiSnrTrigger0 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength)
-{
-	TI_UINT8 eventID = TWD_OWN_EVENT_RSSI_SNR_TRIGGER_0;
-	currBss_HandleTriggerEvent (hCurrBSS, data, dataLength,  eventID);
-}
-static void currBSS_RssiSnrTrigger1 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength)
-{
-	TI_UINT8 eventID = TWD_OWN_EVENT_RSSI_SNR_TRIGGER_1;
-	currBss_HandleTriggerEvent (hCurrBSS, data, dataLength,  eventID);
-}
-static void currBSS_RssiSnrTrigger2 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength)
-{
-	TI_UINT8 eventID = TWD_OWN_EVENT_RSSI_SNR_TRIGGER_2;
-	currBss_HandleTriggerEvent (hCurrBSS, data, dataLength,  eventID);
-}
-static void currBSS_RssiSnrTrigger3 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength)
-{
-	TI_UINT8 eventID = TWD_OWN_EVENT_RSSI_SNR_TRIGGER_3;
-	currBss_HandleTriggerEvent (hCurrBSS, data, dataLength,  eventID);
-}
-static void currBSS_RssiSnrTrigger4 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength)
-{
-	TI_UINT8 eventID = TWD_OWN_EVENT_RSSI_SNR_TRIGGER_4;
-	currBss_HandleTriggerEvent (hCurrBSS, data, dataLength,  eventID);
-}
-static void currBSS_RssiSnrTrigger5 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength)
-{
-	TI_UINT8 eventID = TWD_OWN_EVENT_RSSI_SNR_TRIGGER_5;
-	currBss_HandleTriggerEvent (hCurrBSS, data, dataLength,  eventID);
-}
-static void currBSS_RssiSnrTrigger6 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength)
-{
-	TI_UINT8 eventID = TWD_OWN_EVENT_RSSI_SNR_TRIGGER_6;
-	currBss_HandleTriggerEvent (hCurrBSS, data, dataLength,  eventID);
-}
-static void currBSS_RssiSnrTrigger7 (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength)
-{
-	TI_UINT8 eventID = TWD_OWN_EVENT_RSSI_SNR_TRIGGER_7;
-	currBss_HandleTriggerEvent (hCurrBSS, data, dataLength,  eventID);
-}
-
-
-static TI_STATUS currBSS_BssLossThresholdCrossed(TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength)
-{
-	currBSS_t *pCurrBSS = (currBSS_t *)hCurrBSS;
-
-	EvHandlerSendEvent(pCurrBSS->hEvHandler, IPC_EVENT_BSS_LOSS, data, dataLength);
-
-    currBSS_reportRoamingEvent(hCurrBSS, ROAMING_TRIGGER_BSS_LOSS, NULL);
-    return TI_OK;
-}
-
-static TI_STATUS currBSS_MaxTxRetryThresholdCrossed(TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength)
-{
-	currBSS_t *pCurrBSS = (currBSS_t *)hCurrBSS;
-
-	EvHandlerSendEvent(pCurrBSS->hEvHandler, IPC_EVENT_TX_RETRY_FALIURE, data, dataLength);
-
-    currBSS_reportRoamingEvent(hCurrBSS, ROAMING_TRIGGER_BSS_LOSS, NULL);
-    return TI_OK;
-}
-
-
-
-TI_STATUS currBss_registerBssLossEvent(TI_HANDLE hCurrBSS,TI_UINT32  uNumOfBeacons, TI_UINT16 uClientID)
-{
-    TRroamingTriggerParams params;
-    currBSS_t *pCurrBSS = (currBSS_t *)hCurrBSS;
-
-    TRACE2(pCurrBSS->hReport,REPORT_SEVERITY_INFORMATION , "currBss_registerBssLossEvent() uNumOfBeacons=%d,uClientID =%d \n", uNumOfBeacons,uClientID );
-
-    /* Register for 'BSS-Loss' event */
-    TWD_RegisterEvent (pCurrBSS->hTWD, TWD_OWN_EVENT_BSS_LOSE, (void *)currBSS_BssLossThresholdCrossed, pCurrBSS);
-    TWD_EnableEvent (pCurrBSS->hTWD, TWD_OWN_EVENT_BSS_LOSE);
-
-    pCurrBSS->numExpectedTbttForBSSLoss = uNumOfBeacons;
-    params.TsfMissThreshold = uNumOfBeacons; /* number of missing beacon allowed before out-of-sync event is issued*/
-    params.BssLossTimeout = NO_BEACON_DEFAULT_TIMEOUT;
-    TWD_CfgConnMonitParams (pCurrBSS->hTWD, &params);
-
-    return TI_OK;
-}
-
-TI_STATUS currBss_registerTxRetryEvent(TI_HANDLE hCurrBSS,TI_UINT8 uMaxTxRetryThreshold, TI_UINT16 uClientID)
-{
-    TRroamingTriggerParams params;
-    currBSS_t *pCurrBSS = (currBSS_t *)hCurrBSS;
-
-    TRACE2(pCurrBSS->hReport,REPORT_SEVERITY_INFORMATION , "currBss_registerTxRetryEvent() uMaxTxRetryThreshold=%d,uClientID =%d \n", uMaxTxRetryThreshold,uClientID );
-   /* Register for 'Consec. Tx error' */
-    TWD_RegisterEvent (pCurrBSS->hTWD, TWD_OWN_EVENT_MAX_TX_RETRY, (void *)currBSS_MaxTxRetryThresholdCrossed, pCurrBSS);
-    TWD_EnableEvent (pCurrBSS->hTWD, TWD_OWN_EVENT_MAX_TX_RETRY);
-
-    pCurrBSS->maxTxRetryThreshold = uMaxTxRetryThreshold;
-    params.maxTxRetry = uMaxTxRetryThreshold;
-    TWD_CfgMaxTxRetry (pCurrBSS->hTWD, &params);
-
-    return TI_OK;
-}
-
-
-
-
-
-TI_STATUS currBSS_setParam(TI_HANDLE hCurrBSS, paramInfo_t *pParam)
-{
-    currBSS_t *pCurrBSS = (currBSS_t *)hCurrBSS;
-    TI_STATUS status = TI_OK;
-
-    if (pParam == NULL)
-    {
-        TRACE0(pCurrBSS->hReport, REPORT_SEVERITY_ERROR , " currBSS_setParam(): pParam is NULL!\n");
-        return TI_NOK;
-    }
-
-    TRACE1(pCurrBSS->hReport,REPORT_SEVERITY_INFORMATION , "currBSS_setParam() %X \n", pParam->paramType);
-
-    switch (pParam->paramType)
-    {
-	    case CURR_BSS_REGISTER_LINK_QUALITY_EVENT_PARAM:
-            {
-                TUserDefinedQualityTrigger *pUserTrigger = &pParam->content.rssiSnrTrigger;
-                RssiSnrTriggerCfg_t         tTriggerCfg;
-                TI_INT8                     triggerID = 0;
-
-                TRACE8(pCurrBSS->hReport, REPORT_SEVERITY_INFORMATION , "currBSS_setParam - USER_DEFINED_TRIGGER: \n index = %d, \n	 threshold = %d, \n pacing = %d, \n metric = %d, \n type = %d, \n direction = %d, \n hystersis = %d, \n enable = %d \n",pUserTrigger->uIndex,pUserTrigger->iThreshold,pUserTrigger->uPacing,pUserTrigger->uMetric,pUserTrigger->uType,pUserTrigger->uDirection,pUserTrigger->uHystersis,pUserTrigger->uEnable);
-                /* Copy from user structure to driver structure */
-                tTriggerCfg.index     = pUserTrigger->uIndex;
-                tTriggerCfg.threshold = pUserTrigger->iThreshold;
-                tTriggerCfg.pacing    = pUserTrigger->uPacing;
-                tTriggerCfg.metric    = pUserTrigger->uMetric;
-                tTriggerCfg.type      = pUserTrigger->uType;
-                tTriggerCfg.direction = pUserTrigger->uDirection;
-                tTriggerCfg.hystersis = pUserTrigger->uHystersis;
-                tTriggerCfg.enable    = pUserTrigger->uEnable;
-
-                /* the registration request is not from EMP (clientID must be greater than 0)
-                   so it is probably external user mode application like the CLI that sends always '0' as client ID*/
-                if (pUserTrigger->uClientID == 0) 
-                {
-                    pUserTrigger->uClientID = pUserTrigger->uIndex + 1; /* use the index (starting from '0') as positive client ID*/
-                }
-                /* Register the event and enable it before configuration.  */
-                triggerID = currBSS_RegisterTriggerEvent(hCurrBSS, (TI_UINT8)0, pUserTrigger->uClientID, (void*)0, hCurrBSS);
-
-                if (triggerID < 0)
-                {
-                    TRACE0(pCurrBSS->hReport, REPORT_SEVERITY_ERROR , "currBSS_setParam: RSSI/SNR user trigger registration FAILED!! \n");
-                    return TI_NOK;
-                }
-                else
-                {
-                    tTriggerCfg.index = (uint8)triggerID; /* the index is used for the eventMBox triggerID mapping*/
-                }
-                /* Send user defined trigger to FW (the related FW events are handled by the currBSS) */
-                status = TWD_CfgRssiSnrTrigger (pCurrBSS->hTWD, &tTriggerCfg);
-
-            }
-            break;
-
-        default:
-            TRACE1(pCurrBSS->hReport, REPORT_SEVERITY_ERROR, "currBSS_setParam bad param=  %X\n", pParam->paramType);
-            break;
-    }
-
-    return status;
-}
-
-
-TI_STATUS currBSS_getParam(TI_HANDLE hCurrBSS, paramInfo_t *pParam)
-{
-    return TI_NOK;
-}
-
-void currBss_DbgPrintTriggersTable(TI_HANDLE hCurrBSS)
-{
-#ifdef REPORT_LOG
-    int i=0;
-    currBSS_t *pCurrBSS = (currBSS_t *)hCurrBSS;
-
-    WLAN_OS_REPORT(("\n -------------------  Triggers Table -------------------------- \n"));
-
-    for (i=0; i< MAX_NUM_OF_RSSI_SNR_TRIGGERS ; i++)
-    {
-        WLAN_OS_REPORT(("\n TriggerIdx[%d]: clientID=%d , fCB=%d, WasRegisteredByApp=%d. \n",
-                        i,
-                        pCurrBSS->aTriggersDesc[i].clientID,
-                        pCurrBSS->aTriggersDesc[i].fCB,
-                        pCurrBSS->aTriggersDesc[i].WasRegisteredByApp));
-    }
-    WLAN_OS_REPORT(("\n --------------------------------------------------------------- \n"));
-#endif
-}
diff --git a/wl1271/stad/src/Sta_Management/currBss.h b/wl1271/stad/src/Sta_Management/currBss.h
deleted file mode 100644
index 30829b7..0000000
--- a/wl1271/stad/src/Sta_Management/currBss.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * currBss.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file currBss.h
- *  \brief Current BSS module API
- *
- *  \see currBss.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Current BSS                                               *
- *   PURPOSE: Current BSS Module API                                    *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _CURR_BSS_H_
-#define _CURR_BSS_H_
-
-#include "siteMgrApi.h"
-#include "roamingMngrTypes.h"
-#include "paramOut.h"
-
-/* Constants */
-
-#define MAX_NUM_OF_RSSI_SNR_TRIGGERS 8
-
-/* Enumerations */
-
-/** 
-* Current BSS module configurable parameters type  
-*/
-typedef enum
-{
-    CURR_BSS_TYPE = 0,          /**< BSS or IBSS */
-    CURR_BSS_CONNECTED_STATE,   /**< Connected or not connected, roaming enabled or not */
-    CURR_BSS_LOW_RSSI_SCAN_COND,/**< Set by AP Connection when Roaming Manager configures low RSSI threshold for BG scan */
-    CURR_BSS_HI_RSSI_SCAN_COND, /**< Set by AP Connection when Roaming Manager configures normal RSSI threshold for BG scan */
-    CURR_BSS_QUALITY_THRESHOLD, /**< Set by AP Connection when Roaming Manager configures event of type 'Low RSSI' */
-    CURR_BSS_NO_BSS_THRESHOLDS, /**< Set by AP Connection when Roaming Manager configures event of type 'BSS Loss' */
-    CURR_BSS_NUM_OF_TEST_REPEAT,/**< Set by AP Connection when Roaming Manager configures event of type 'BSS Loss' */
-    CURR_BSS_CONSEC_NACK,       /**< Set by AP Connection when Roaming Manager configures event of type 'Consecutive nack' */
-    CURR_BSS_INFO               /**< Requested by AP Connection: includes quality and last beacon info */
-} currBSS_configParam_e;
-
-
-/* Structures */
-
-typedef struct triggerDataEx
-{
-    TI_UINT8  data;
-    TI_UINT16 clientID;
-} triggerDataEx_t;
-
-
-typedef struct triggerDesc
-{
-	TI_UINT16	clientID;
-	TI_HANDLE	fCB;
-	TI_HANDLE	hCB;
-    TI_BOOL	    WasRegisteredByApp;
-} triggerDesc_t;
-
-
-/**
-* Current BSS control block
-* Following structure defines parameters that can be configured externally,
-* internal variables, and handlers of other modules used by Current BSS module
-*/
-
-typedef struct _currBSS_t
-{
-    /* Internal variables and configurable parameters */
-    ScanBssType_e type;                   /**< Set by SME module; EBSS, IBSS or none */
-    ERadioBand  band;                   /**< Set by SME module */
-    TI_UINT8    channel;                /**< Set by AP Connection, SME and Switch Channel modules */
-    TI_BOOL     isConnected;            /**< Default: not connected */
-    bssEntry_t  currAPInfo;             /**< Set by SME upon request from AP Connection */
-
-    TI_INT8     lowRssiThreshold;       /**< Last configured threshold for Low-RSSI */
-    TI_INT8     lowSnrThreshold;        /**< Last configured threshold Low-SNR */
-    TI_INT8     lowQualityForBkgrdScan; /**< Indicator used to increase the background scan period when quality is low */
-    TI_INT8     highQualityForBkgrdScan;/**< Indicator used to reduce the background scan period when quality is normal */
-    TI_UINT8    numExpectedTbttForBSSLoss;/**< last configured value without Soft Gemini compensation */
-    TI_UINT8    maxTxRetryThreshold;    /**< last configured threshold for max Tx retry */
-
-    TI_BOOL     bUseSGParams;           /**< Whether to use the Soft Gemini compensation on the roaming triggers (currently: BSS Loss) */
-                                        /**< This compensation is needed since BT Activity might over-run beacons                       */
-    TI_UINT32   SGcompensationPercent;  /**< the percentage of increasing the TbttForBSSLoss value when SG is enabled */
-    TI_UINT8    uDefaultKeepAlivePeriod;/**< The default keep-alive period in seconds */
-    TI_UINT8    keepAliveBuffer[ WLAN_WITH_SNAP_QOS_HEADER_MAX_SIZE ];
-                                        /**< Buffer to store null-data keep-alive template */
-
-    triggerDesc_t aTriggersDesc[MAX_NUM_OF_RSSI_SNR_TRIGGERS]; /* static table to be used for trigger event registration*/
-    TI_UINT8	  RoamingOperationalMode;                      /* 0 - manual , 1 - Auto */
-
-    /* Handlers of other modules used by AP Connection */
-    TI_HANDLE   hOs;
-    TI_HANDLE   hPowerMngr;
-    TI_HANDLE   hAPConn;
-    TI_HANDLE   hSme;
-    TI_HANDLE   hTWD;
-    TI_HANDLE   hMlme;
-    TI_HANDLE   hReport;
-    TI_HANDLE   hRegulatoryDomain;
-    TI_HANDLE   hSiteMgr;
-	TI_HANDLE   hConn;
-    TI_HANDLE   hScanMngr;
-    TI_HANDLE   hEvHandler;
-    TI_HANDLE   hTxCtrl;
-} currBSS_t;
-
-
-/* Typedefs */
-
-typedef void (*TCurrBssDataCb) (TI_HANDLE hCurrBSS, TI_UINT8 *data, TI_UINT8 dataLength);
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_HANDLE currBSS_create(TI_HANDLE hOs);
-void      currBSS_init (TStadHandlesList *pStadHandles);
-TI_STATUS currBSS_SetDefaults (TI_HANDLE hCurrBSS, TCurrBssInitParams *pInitParams);
-TI_STATUS currBSS_unload(TI_HANDLE hCurrBSS);
-
-void currBSS_updateConnectedState(TI_HANDLE hCurrBSS, TI_BOOL isConnected, ScanBssType_e type);
-TI_STATUS currBSS_updateRoamingTriggers(TI_HANDLE hCurrBSS,
-                                        roamingMngrThresholdsConfig_t *params);
-void currBSS_SGconfigureBSSLoss(TI_HANDLE hCurrBSS,
-                                        TI_UINT32 SGcompensationPercent , TI_BOOL bUseSGParams);
-bssEntry_t *currBSS_getBssInfo(TI_HANDLE hCurrBSS);
-
-TI_STATUS currBSS_getRoamingParams(TI_HANDLE hCurrBSS,
-                                   TI_UINT8 * aNumExpectedTbttForBSSLoss,
-                                   TI_INT8 * aLowQualityForBackgroungScanCondition,
-                                   TI_INT8 * aNormalQualityForBackgroungScanCondition);
-
-TI_STATUS currBSS_probRespReceivedCallb(TI_HANDLE hCurrBSS,
-                                        TRxAttr *pRxAttr,
-                                        TMacAddr *bssid,
-                                        mlmeFrameInfo_t *pFrameInfo,
-										TI_UINT8 *dataBuffer,
-                                        TI_UINT16 bufLength);
-
-TI_STATUS currBSS_beaconReceivedCallb(TI_HANDLE hCurrBSS,
-                                        TRxAttr *pRxAttr,
-                                        TMacAddr *bssid,
-                                        mlmeFrameInfo_t *pFrameInfo,
-										TI_UINT8 *dataBuffer,
-                                        TI_UINT16 bufLength);
-
-void currBSS_restartRssiCounting(TI_HANDLE hCurrBSS);
-
-void currBSS_GetDefaultKeepAlivePeriod(TI_HANDLE hCurrBSS, TI_UINT8* uDefaultKeepAlivePeriod);
-
-void currBss_DbgPrintTriggersTable(TI_HANDLE hCurrBSS);
-
-#endif /*  _CURR_BSS_H_*/
-
diff --git a/wl1271/stad/src/Sta_Management/currBssApi.h b/wl1271/stad/src/Sta_Management/currBssApi.h
deleted file mode 100644
index 17d3d1a..0000000
--- a/wl1271/stad/src/Sta_Management/currBssApi.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * currBssApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file currBssApi.h
- *  \brief Current BSS module API
- *
- *  \see currBss.c
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Current BSS                                               *
- *   PURPOSE: Current BSS Module API                                    *
- *                                                                          *
- ****************************************************************************/
-
-#ifndef _CURR_BSS_API_H_
-#define _CURR_BSS_API_H_
-
-#include "siteMgrApi.h"
-#include "roamingMngrTypes.h"
-#include "paramOut.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Structures */
-
-/**
-* Current BSS control block 
-* Following structure defines parameters that can be configured externally,
-* internal variables, and handlers of other modules used by Current BSS module
-*/
-
-TI_STATUS currBss_registerBssLossEvent(TI_HANDLE hCurrBSS,TI_UINT32  uNumOfBeacons, TI_UINT16 uClientID);
-TI_STATUS currBss_registerTxRetryEvent(TI_HANDLE hCurrBSS,TI_UINT8   uMaxTxRetryThreshold, TI_UINT16 uClientID);
-TI_INT8 currBSS_RegisterTriggerEvent (TI_HANDLE hCurrBSS, TI_UINT8 triggerID,TI_UINT16 clientID, void* fCB, TI_HANDLE hCB);
-TI_STATUS currBSS_setParam(TI_HANDLE hCurrBSS, paramInfo_t *pParam);
-TI_STATUS currBSS_getParam(TI_HANDLE hCurrBSS, paramInfo_t *pParam);
-
-#endif /*  _CURR_BSS_API_H_*/
-
diff --git a/wl1271/stad/src/Sta_Management/healthMonitor.c b/wl1271/stad/src/Sta_Management/healthMonitor.c
deleted file mode 100644
index ed7d8e4..0000000
--- a/wl1271/stad/src/Sta_Management/healthMonitor.c
+++ /dev/null
@@ -1,487 +0,0 @@
-/*
- * healthMonitor.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file healthMonitor.c
- *  \brief Firmware Recovery Mechanism
- */
-
-/** \file   healthMonitor.c 
- *  \brief  The health monitor module. Gets failures indications and handle them.
- *
- *  For periodic check, use HW watchdog mechanizem instead of local periodic timer check 
- *
- *  \see    healthMonitor.h
- */
-
-#define __FILE_ID__  FILE_ID_66
-#include "healthMonitor.h"
-#include "osApi.h"
-#include "timer.h"
-#include "report.h"
-#include "siteMgrApi.h"
-#include "PowerMgr_API.h"
-#include "currBss.h"
-#include "DataCtrl_Api.h"
-#include "TWDriver.h"
-#include "SoftGeminiApi.h"
-#include "currBss.h"
-#include "rsnApi.h"
-#include "DrvMain.h"
-#include "DrvMainModules.h"
-#include "TWDriverInternal.h"
-
-
-typedef struct
-{
-    /* handles to other modules */
-    TI_HANDLE            hOs;                    /* handle to the OS object */
-    TI_HANDLE            hReport;                /* handle to the report object */
-    TI_HANDLE            hTWD;                   /* handle to the TWD object */
-    TI_HANDLE            hSiteMgr;               /* handle to the site manager object */
-    TI_HANDLE            hScr;                   /* handle to the SCR object */
-    TI_HANDLE            hSoftGemini;            /* handle to the Soft Gemini object */
-	TI_HANDLE            hDrvMain;               /* handle to the Recovery Mgr object */
-    TI_HANDLE            hTxCtrl;                /* handle to the TX Ctrl object */
-    TI_HANDLE            hCurrBss;               /* handle to the currBss object */
-	TI_HANDLE            hRsn;                   /* handle to the RSN */
-	TI_HANDLE            hTimer;                 /* handle to the Timer module object */
-	TI_HANDLE            hContext;               /* handle to the context-engine object */
-
-    /* Timers handles */
-    TI_HANDLE            hFailTimer;             /* failure event timer */
-    
-    /* Management variables */
-    TI_UINT32            numOfHealthTests;       /* number of health tests performed counter */
-    healthMonitorState_e state;                  /* health monitor state */
-    TI_BOOL              bFullRecoveryEnable;    /* full recovery enable flag */
-    TI_BOOL              recoveryTriggerEnabled [MAX_FAILURE_EVENTS];
-                                                 /* recovery enable flags per trigger type */
-    TI_UINT32            failureEvent;           /* current recovery trigger */
-    TI_UINT32            keepAliveIntervals;     /* number of health monitor timer intervals at which keep alive should be sent */
-    TI_UINT32            currentKeepAliveCounter;/* counting how many timer intervals had passed w/o a keep alive */
-
-    /* Recoveries Statistics */
-    TI_UINT32          	 recoveryTriggersNumber [MAX_FAILURE_EVENTS];                                                  
-                                                 /* Number of times each recovery trigger occured */
-    TI_UINT32            numOfRecoveryPerformed; /* number of recoveries performed */
-    
-} THealthMonitor;
-
-
-static void healthMonitor_proccessFailureEvent (TI_HANDLE hHealthMonitor, TI_BOOL bTwdInitOccured);
-
-
-#ifdef REPORT_LOG
-
-static char* sRecoveryTriggersNames [MAX_FAILURE_EVENTS] = 
-{
-    "NO_SCAN_COMPLETE_FAILURE",
-    "MBOX_FAILURE",
-    "HW_AWAKE_FAILURE",
-    "TX_STUCK",
-    "DISCONNECT_TIMEOUT",
-    "POWER_SAVE_FAILURE",
-    "MEASUREMENT_FAILURE",
-    "BUS_FAILURE",
-    "HW_WD_EXPIRE",
-    "RX_XFER_FAILURE"
-};
-#endif
-
-
-/** 
- * \fn     healthMonitor_create 
- * \brief  Create module object
- * 
- * Create module object.
- * 
- * \note    
- * \param  hOs  - The OS adaptation handle
- * \return The created module handle  
- * \sa     
- */ 
-TI_HANDLE healthMonitor_create (TI_HANDLE hOs)
-{
-    THealthMonitor *pHealthMonitor;
- 
-    /* Allocate memory for the health monitor object and nullify it */
-    pHealthMonitor = (THealthMonitor*)os_memoryAlloc (hOs, sizeof(THealthMonitor));
-    if (pHealthMonitor == NULL)
-    {
-        return NULL;
-    }
-    os_memoryZero (hOs, pHealthMonitor, sizeof(THealthMonitor));
-
-    /* Store OS object handle */
-    pHealthMonitor->hOs = hOs;
-
-    return (TI_HANDLE)pHealthMonitor;
-}
-
-
-/** 
- * \fn     healthMonitor_init 
- * \brief  Init module handles and variables
- * 
- * Init module handles and variables.
- * 
- * \note    
- * \param  pStadHandles  - The driver modules handles
- * \return void  
- * \sa     
- */ 
-void healthMonitor_init (TStadHandlesList *pStadHandles)
-{
-    THealthMonitor *pHealthMonitor = (THealthMonitor *)(pStadHandles->hHealthMonitor);
-
-    pHealthMonitor->hReport         = pStadHandles->hReport;
-    pHealthMonitor->hTWD            = pStadHandles->hTWD;
-    pHealthMonitor->hSiteMgr        = pStadHandles->hSiteMgr;
-    pHealthMonitor->hScr            = pStadHandles->hSCR;
-    pHealthMonitor->hSoftGemini     = pStadHandles->hSoftGemini;
-    pHealthMonitor->hDrvMain        = pStadHandles->hDrvMain;
-	pHealthMonitor->hTxCtrl		    = pStadHandles->hTxCtrl;
-    pHealthMonitor->hCurrBss        = pStadHandles->hCurrBss;
-    pHealthMonitor->hRsn            = pStadHandles->hRsn;
-    pHealthMonitor->hTimer          = pStadHandles->hTimer;
-    pHealthMonitor->hContext        = pStadHandles->hContext;
-
-    pHealthMonitor->state           = HEALTH_MONITOR_STATE_DISCONNECTED;
-    pHealthMonitor->failureEvent    = (TI_UINT32)NO_FAILURE;
-
-    /* Register the failure event callback */
-    TWD_RegisterCb (pHealthMonitor->hTWD, 
-                    TWD_EVENT_FAILURE, 
-                    (void *)healthMonitor_sendFailureEvent, 
-                    (void *)pHealthMonitor);
-}
-
-
-/** 
- * \fn     healthMonitor_SetDefaults 
- * \brief  Set module defaults and create timers
- * 
- * Set module defaults from Ini-file and create timers.
- * 
- * \note    
- * \param  hHealthMonitor  - The module's handle
- * \param  healthMonitorInitParams  - The module's parameters default values (from Ini-file).
- * \return void  
- * \sa     
- */ 
-TI_STATUS healthMonitor_SetDefaults (TI_HANDLE    hHealthMonitor, healthMonitorInitParams_t *healthMonitorInitParams)
-{
-    THealthMonitor *pHealthMonitor = hHealthMonitor;
-    int i;
-
-    /* Registry configuration */
-    pHealthMonitor->bFullRecoveryEnable   = healthMonitorInitParams->FullRecoveryEnable;
-
-    for (i = 0; i < MAX_FAILURE_EVENTS; i++)
-    {
-        pHealthMonitor->recoveryTriggerEnabled[i] = healthMonitorInitParams->recoveryTriggerEnabled[i];
-    }
-
-    /* Create recovery request timer */
-    pHealthMonitor->hFailTimer = tmr_CreateTimer (pHealthMonitor->hTimer);
-    if (pHealthMonitor->hFailTimer == NULL)
-    {
-        TRACE0(pHealthMonitor->hReport, REPORT_SEVERITY_ERROR, "healthMonitor_SetDefaults(): Failed to create hFailTimer!\n");
-		return TI_NOK;
-    }
-
-    return TI_OK;
-}
-
-
-/***********************************************************************
- *                        healthMonitor_unload
- ***********************************************************************
-DESCRIPTION: 
-           
-INPUT:      
-
-OUTPUT:
-
-RETURN: 
-
-************************************************************************/
-TI_STATUS healthMonitor_unload (TI_HANDLE hHealthMonitor)
-{
-    THealthMonitor *pHealthMonitor;
-
-    pHealthMonitor = (THealthMonitor*)hHealthMonitor;
-
-    if (pHealthMonitor != NULL)
-    {
-        if (NULL != pHealthMonitor->hFailTimer)
-        {
-            /* Release the timer */
-            tmr_DestroyTimer (pHealthMonitor->hFailTimer);
-        }
-
-        /* Freeing the object should be called last !!!!!!!!!!!! */
-        os_memoryFree (pHealthMonitor->hOs, pHealthMonitor, sizeof(THealthMonitor));
-    }
-
-    return TI_OK;
-}
-
-
-/***********************************************************************
- *                        healthMonitor_setState
- ***********************************************************************
-DESCRIPTION: 
-           
-
-INPUT:      
-
-OUTPUT:
-
-RETURN: 
-
-************************************************************************/
-void healthMonitor_setState (TI_HANDLE hHealthMonitor, healthMonitorState_e state)
-{
-    THealthMonitor *pHealthMonitor = (THealthMonitor*)hHealthMonitor;
-
-    pHealthMonitor->state = state;
-}
-
-
-/***********************************************************************
- *                        healthMonitor_PerformTest
- ***********************************************************************
-DESCRIPTION: Called periodically by timer every few seconds (depends on connection state),
-             or optionally by external application.
-           
-INPUT:      hHealthMonitor	-	Module handle.
-            bTwdInitOccured -   Indicates if TWDriver recovery occured since timer started 
-
-OUTPUT:
-
-RETURN: 
-
-************************************************************************/
-void healthMonitor_PerformTest (TI_HANDLE hHealthMonitor, TI_BOOL bTwdInitOccured)
-{
-    THealthMonitor *pHealthMonitor = (THealthMonitor*)hHealthMonitor;
-
-    pHealthMonitor->numOfHealthTests++;
-
-    /* Send health-check command to FW, just to ensure command complete is accepted */
-    TWD_CmdHealthCheck (pHealthMonitor->hTWD);
-}
-
-
-/***********************************************************************
- *                        healthMonitor_sendFailureEvent
- ***********************************************************************
-DESCRIPTION:    Entry point for all low level modules to send a failure evrnt
-
-INPUT:          handle - health monitor handle
-                failureEvent - the error
-
-OUTPUT:
-
-RETURN:    
-
-************************************************************************/
-void healthMonitor_sendFailureEvent (TI_HANDLE hHealthMonitor, EFailureEvent failureEvent)
-{
-    THealthMonitor *pHealthMonitor = (THealthMonitor*)hHealthMonitor;
-
-    /* Check the recovery process is already running */
-    if (pHealthMonitor->failureEvent < MAX_FAILURE_EVENTS)
-    {
-        TRACE0(pHealthMonitor->hReport, REPORT_SEVERITY_WARNING , ": recovery process is already handling , new trigger is \n");
-    }
-
-    /* Recovery is performed only if this trigger is enabled in the .INI file */
-    else if (pHealthMonitor->recoveryTriggerEnabled[failureEvent])
-    {
-        pHealthMonitor->failureEvent = failureEvent;
-        /* 
-         * NOTE: start timer with minimum expiry (1 msec) for recovery will start
-         *       from the top of the stack 
-         */
-        tmr_StartTimer (pHealthMonitor->hFailTimer,
-                        healthMonitor_proccessFailureEvent,
-                        (TI_HANDLE)pHealthMonitor,
-                        1,
-                        TI_FALSE);
-    }
-    else 
-    {
-        TRACE0(pHealthMonitor->hReport, REPORT_SEVERITY_ERROR , ": Recovery trigger  is disabled!\n");
-    }
-}
-
-
-/***********************************************************************
- *                        healthMonitor_proccessFailureEvent
- ***********************************************************************
-DESCRIPTION:    this is the central error function - will be passed as call back 
-                to the TnetWDriver modules. it will parse the error and dispatch the 
-                relevant action (recovery or not) 
-
-INPUT:      hHealthMonitor - health monitor handle
-            bTwdInitOccured -   Indicates if TWDriver recovery occured since timer started 
-
-OUTPUT:
-
-RETURN:    
-
-************************************************************************/
-void healthMonitor_proccessFailureEvent (TI_HANDLE hHealthMonitor, TI_BOOL bTwdInitOccured)
-{
-    THealthMonitor *pHealthMonitor = (THealthMonitor*)hHealthMonitor;
-
-    /* Check failure event validity */
-    if (pHealthMonitor->failureEvent < MAX_FAILURE_EVENTS)
-    {
-        pHealthMonitor->recoveryTriggersNumber[pHealthMonitor->failureEvent] ++;
-
-        TRACE2(pHealthMonitor->hReport, REPORT_SEVERITY_CONSOLE, "***** recovery trigger: failureEvent =%d *****, ts=%d\n", pHealthMonitor->failureEvent, os_timeStampMs(pHealthMonitor->hOs));
-        WLAN_OS_REPORT (("***** recovery trigger: %s *****, ts=%d\n", sRecoveryTriggersNames[pHealthMonitor->failureEvent], os_timeStampMs(pHealthMonitor->hOs)));
-
-        if (TWD_RecoveryEnabled (pHealthMonitor->hTWD))
-        {
-            pHealthMonitor->numOfRecoveryPerformed ++;
-            drvMain_Recovery (pHealthMonitor->hDrvMain);
-        }
-        else
-        {
-            TRACE0(pHealthMonitor->hReport, REPORT_SEVERITY_CONSOLE, "healthMonitor_proccessFailureEvent: Recovery is disabled in tiwlan.ini, abort recovery process\n");
-            WLAN_OS_REPORT(("healthMonitor_proccessFailureEvent: Recovery is disabled in tiwlan.ini, abort recovery process\n"));
-        }
-
-        pHealthMonitor->failureEvent = (TI_UINT32)NO_FAILURE;
-    }
-    else
-    {
-        TRACE1(pHealthMonitor->hReport, REPORT_SEVERITY_ERROR , "unsupported failure event = %d\n", pHealthMonitor->failureEvent);
-    }    
-}
-
-
-/***********************************************************************
- *                        healthMonitor_printFailureEvents
- ***********************************************************************
-DESCRIPTION:
-
-INPUT:
-
-OUTPUT:
-
-RETURN:
-************************************************************************/
-void healthMonitor_printFailureEvents(TI_HANDLE hHealthMonitor)
-{
-#ifdef TI_DBG
-#ifdef REPORT_LOG
-    THealthMonitor  *pHealthMonitor = (THealthMonitor*)hHealthMonitor;
-    int i;
-
-    WLAN_OS_REPORT(("-------------- STA Health Failure Statistics ---------------\n"));
-    WLAN_OS_REPORT(("FULL RECOVERY PERFORMED    = %d\n", pHealthMonitor->numOfRecoveryPerformed));
-    for (i = 0; i < MAX_FAILURE_EVENTS; i++)
-    {
-        WLAN_OS_REPORT(("%27s= %d\n", sRecoveryTriggersNames[ i ], pHealthMonitor->recoveryTriggersNumber[ i ]));
-    }
-    WLAN_OS_REPORT(("Maximum number of commands in mailbox queue = %u\n", TWD_GetMaxNumberOfCommandsInQueue(pHealthMonitor->hTWD)));
-    WLAN_OS_REPORT(("Health Test Performed       = %d\n", pHealthMonitor->numOfHealthTests));
-    WLAN_OS_REPORT(("\n"));
-#endif
-#endif /* TI_DBG */
-}
-
-
-/***********************************************************************
- *                        healthMonitor_SetParam									
- ***********************************************************************
-DESCRIPTION: Set module parameters from the external command interface	
-                                                                                                   
-INPUT:      hHealthMonitor	-	module handle.
-			pParam	        -	Pointer to the parameter		
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS healthMonitor_SetParam (TI_HANDLE hHealthMonitor, paramInfo_t *pParam)
-{
-    THealthMonitor *pHealthMonitor = (THealthMonitor*)hHealthMonitor;
-	TI_STATUS eStatus = TI_OK;
-
-    TRACE1(pHealthMonitor->hReport, REPORT_SEVERITY_INFORMATION, "healthMonitor_SetParam() - %d\n", pParam->paramType);
-	
-	switch(pParam->paramType)
-	{
-
-	case HEALTH_MONITOR_CHECK_DEVICE:
-        /* Send health check command to FW if we are not disconnceted */
-        if (pHealthMonitor->state != HEALTH_MONITOR_STATE_DISCONNECTED) 
-        {
-            healthMonitor_PerformTest (hHealthMonitor, TI_FALSE);
-        }
-		break;
-
-	default:
-        TRACE1(pHealthMonitor->hReport, REPORT_SEVERITY_ERROR, "healthMonitor_SetParam(): Params is not supported, %d\n", pParam->paramType);
-	}
-
-	return eStatus;
-}
-
-
-/***********************************************************************
- *			      healthMonitor_GetParam									
- ***********************************************************************
-DESCRIPTION: Get module parameters from the external command interface
-                                                                                                   
-INPUT:      hHealthMonitor	-	module handle.
-			pParam	        -	Pointer to the parameter		
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS healthMonitor_GetParam (TI_HANDLE hHealthMonitor, paramInfo_t *pParam)
-{ 
-	return TI_OK;
-}
-
-
-
-
diff --git a/wl1271/stad/src/Sta_Management/healthMonitor.h b/wl1271/stad/src/Sta_Management/healthMonitor.h
deleted file mode 100644
index 54c0992..0000000
--- a/wl1271/stad/src/Sta_Management/healthMonitor.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * healthMonitor.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file healthMonitor.c
- *  \brief Firmware Recovery Mechanizem
- *
- */
-
-/****************************************************************************/
-/*                                                                          */
-/*      MODULE:     healthMonitor.h                                         */
-/*      PURPOSE:    Driver interface to OS abstraction layer                */
-/*                                                                          */
-/****************************************************************************/
-
-#ifndef HEALTHMONITOR_H
-#define HEALTHMONITOR_H
-
-#include "paramOut.h"
-#include "DrvMainModules.h"
-
-
-/* Config manager state machine defintions */
-typedef enum healthMonitorState_e
-{
-    HEALTH_MONITOR_STATE_DISCONNECTED,
-    HEALTH_MONITOR_STATE_SCANNING,
-    HEALTH_MONITOR_STATE_CONNECTED 
-
-} healthMonitorState_e;
-
-
-/* Public Functions Prototypes */
-TI_HANDLE healthMonitor_create         (TI_HANDLE hOs);
-void healthMonitor_init                (TStadHandlesList *pStadHandles);
-TI_STATUS healthMonitor_SetDefaults    (TI_HANDLE hHealthMonitor, healthMonitorInitParams_t *healthMonitorInitParams);
-TI_STATUS healthMonitor_unload         (TI_HANDLE hHealthMonitor);
-void healthMonitor_PerformTest         (TI_HANDLE hHealthMonitor, TI_BOOL bTwdInitOccured);
-void healthMonitor_setState            (TI_HANDLE hHealthMonitor, healthMonitorState_e state);
-void healthMonitor_sendFailureEvent    (TI_HANDLE hHealthMonitor, EFailureEvent failureEvent);
-void healthMonitor_printFailureEvents  (TI_HANDLE hHealthMonitor);
-TI_STATUS healthMonitor_SetParam       (TI_HANDLE hHealthMonitor, paramInfo_t *pParam);
-TI_STATUS healthMonitor_GetParam       (TI_HANDLE hHealthMonitor, paramInfo_t *pParam);
-
-
-#endif
diff --git a/wl1271/stad/src/Sta_Management/mlmeApi.h b/wl1271/stad/src/Sta_Management/mlmeApi.h
deleted file mode 100644
index ee5b25d..0000000
--- a/wl1271/stad/src/Sta_Management/mlmeApi.h
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * mlmeApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file mlmeApi.h
- *  \brief MLME API
- *
- *  \see mlmeSm.c
- */
-
-/***************************************************************************/
-/*                                                                          */
-/*    MODULE:   mlmeApi.h                                                   */
-/*    PURPOSE:  MLME API                                                    */
-/*                                                                          */
-/***************************************************************************/
-#ifndef __MLME_API_H__
-#define __MLME_API_H__
-
-#include "tidef.h"
-#include "paramOut.h"
-#include "802_11Defs.h"
-#include "TWDriver.h"
-#include "DrvMainModules.h"
-
-/* Constants */
-
-/* Enumerations */
-
-typedef enum
-{
-    MLME_LEGACY_TYPE_PARAM   = 0x01,
-    MLME_RE_ASSOC_PARAM      = 0x02,
-    MLME_TNET_WAKE_ON_PARAM  = 0x03,
-    MLME_CAPABILITY_PARAM    = 0x04
-
-} EMlmeParam;
-
-
-typedef enum
-{
-    AUTH_LEGACY_TYPE_PARAM   = 0x01
-
-} EAuthLegacyParam;
-
-
-typedef enum
-{
-    MSG_BROADCAST,
-    MSG_MULTICAST,
-    MSG_UNICAST
-} mlmeMsgDestType_t;
-
-/* Typedefs */
-
-/* Disassociation frame structure */
-typedef struct
-{
-    TI_UINT16                   reason;    
-}  disAssoc_t;
-
-
-/* (Re)Association response frame structure */
-#define ASSOC_RESP_FIXED_DATA_LEN 6
-#define ASSOC_RESP_AID_MASK  0x3FFF  /* The AID is only in 14 LS bits. */
-
-typedef struct
-{
-    TI_UINT16                   capabilities;      
-    TI_UINT16                   status;    
-    TI_UINT16                   aid;       
-    dot11_RATES_t               *pRates;    
-    dot11_RATES_t               *pExtRates;
-    TI_UINT8                    useProtection;
-    TI_BOOL                     ciscoIEPresent;
-    EPreamble                   barkerPreambleMode;
-    TI_UINT8                    NonErpPresent;  
-    dot11_WME_PARAM_t           *WMEParams;
-    dot11_RSN_t                 *pRsnIe;
-    TI_UINT8                    rsnIeLen;
-    dot11_QOS_CAPABILITY_IE_t   *QoSCapParameters;
-	Tdot11HtCapabilitiesUnparse *pHtCapabilities;
-	Tdot11HtInformationUnparse	*pHtInformation;
-    TI_UINT8                    *tspecVoiceParameters;  /* dot11_WME_TSPEC_IE_t is unpacked so need to access as bytes. */
-    TI_UINT8                    *tspecSignalParameters; /* dot11_WME_TSPEC_IE_t is unpacked so need to access as bytes. */
-    XCCv4IEs_t                  XCCIEs[MAX_NUM_OF_AC];
-}  assocRsp_t;
-
-
-/* Probe response frame structure */
-/* Please notice, the order of fields in the beacon must be identical to the order of 
-    field in the probe response. This is because of the parsing that is done by the site manager. */
-typedef struct
-{
-    char                        timestamp[TIME_STAMP_LEN];     
-    TI_UINT16                   beaconInerval;     
-    TI_UINT16                   capabilities;      
-    dot11_SSID_t                *pSsid;    
-    dot11_RATES_t               *pRates;
-    dot11_COUNTRY_t             *country;
-    dot11_POWER_CONSTRAINT_t    *powerConstraint;
-    dot11_CHANNEL_SWITCH_t      *channelSwitch;
-    dot11_QUIET_t               *quiet;
-    dot11_TPC_REPORT_t          *TPCReport;
-
-#ifdef XCC_MODULE_INCLUDED
-    dot11_CELL_TP_t             *cellTP;
-#endif
-
-    dot11_WME_PARAM_t           *WMEParams;
-    dot11_WSC_t                 *WSCParams;
-    dot11_RATES_t               *pExtRates;
-    TI_UINT8                    useProtection;
-    EPreamble                   barkerPreambleMode;
-    TI_UINT8                    NonErpPresent;  
-    dot11_FH_PARAMS_t           *pFHParamsSet;     
-    dot11_DS_PARAMS_t           *pDSParamsSet;     
-    dot11_CF_PARAMS_t           *pCFParamsSet;     
-    dot11_IBSS_PARAMS_t         *pIBSSParamsSet;
-    dot11_RSN_t                 *pRsnIe;
-    TI_UINT8                    rsnIeLen;
-    dot11_QOS_CAPABILITY_IE_t   *QoSCapParameters;
-	Tdot11HtCapabilitiesUnparse *pHtCapabilities;
-	Tdot11HtInformationUnparse	*pHtInformation;
-    dot11_TIM_t                 *pTIM;                  /* for beacons only */
-    TI_UINT8                    *pUnknownIe;
-    TI_UINT16                   unknownIeLen;
-} beacon_probeRsp_t; 
-
-
-/* Authentication message frame structure */
-typedef struct
-{
-    TI_UINT16                   authAlgo;      
-    TI_UINT16                   seqNum;    
-    TI_UINT16                   status;    
-    dot11_CHALLENGE_t           *pChallenge;       
-}  authMsg_t;
-
-/* DeAuthentication message frame structure */
-typedef struct
-{
-    TI_UINT16                   reason;    
-}  deAuth_t;
-
-/* Action message frame structure */
-typedef struct
-{
-    TI_UINT8                    frameType;
-    TI_UINT8                    category;
-    TI_UINT8                    action;
-} action_t;
-
-
-typedef struct 
-{
-    dot11MgmtSubType_e subType;
-
-    union 
-    {
-        beacon_probeRsp_t iePacket;
-        disAssoc_t  disAssoc;
-        assocRsp_t  assocRsp;
-        authMsg_t   auth;
-        deAuth_t    deAuth;
-        action_t    action;
-    } content;
-
-    union
-    {
-        mlmeMsgDestType_t   destType;
-    } extesion;
-
-} mlmeFrameInfo_t;
-
-typedef struct 
-{
-    dot11_SSID_t            ssid;
-    TMacAddr                bssid;
-    dot11_CHALLENGE_t       challenge;
-    dot11_RATES_t           rates;
-    dot11_RATES_t           extRates;
-    dot11_FH_PARAMS_t       fhParams;
-    dot11_CF_PARAMS_t       cfParams;
-    dot11_DS_PARAMS_t       dsParams;
-    dot11_IBSS_PARAMS_t     ibssParams;
-    dot11_COUNTRY_t         country;
-    dot11_WME_PARAM_t       WMEParams;
-    dot11_WSC_t             WSCParams;
-    dot11_POWER_CONSTRAINT_t powerConstraint;
-    dot11_CHANNEL_SWITCH_t  channelSwitch;
-    dot11_QUIET_t           quiet;
-    dot11_TPC_REPORT_t      TPCReport;
-#ifdef XCC_MODULE_INCLUDED
-    dot11_CELL_TP_t         cellTP;
-#endif
-    dot11_RSN_t             rsnIe[3];
-    dot11_TIM_t             tim;
-    dot11_QOS_CAPABILITY_IE_t   QosCapParams;
-	Tdot11HtCapabilitiesUnparse tHtCapabilities;
-	Tdot11HtInformationUnparse	tHtInformation;
-    TI_UINT8                rxChannel;
-    TI_UINT8                band;
-    TI_BOOL                 myBssid;
-    TI_BOOL                 myDst;
-    TI_BOOL                 mySa;
-
-    TI_BOOL                 recvChannelSwitchAnnoncIE;
-
-	TI_UINT8                unknownIe[MAX_BEACON_BODY_LENGTH];
-
-    mlmeFrameInfo_t         frame;
-}mlmeIEParsingParams_t;
-
-typedef void (*mlme_resultCB_t)( TI_HANDLE hObj, TMacAddr* bssid, mlmeFrameInfo_t* pFrameInfo,
-                                 TRxAttr* pRxAttr, TI_UINT8* frame, TI_UINT16 frameLength );
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-/* MLME SM API */
-
-TI_HANDLE mlme_create(TI_HANDLE hOs);
-
-TI_STATUS mlme_unload(TI_HANDLE hMlme);
-
-void      mlme_init (TStadHandlesList *pStadHandles);
-
-void      mlme_SetDefaults (TI_HANDLE hMlmeSm, TMlmeInitParams *pMlmeInitParams);
-
-TI_STATUS mlme_setParam(TI_HANDLE           hMlmeSm,
-                        paramInfo_t         *pParam);
-
-TI_STATUS mlme_getParam(TI_HANDLE           hMlmeSm, 
-                        paramInfo_t         *pParam);
-
-TI_STATUS mlme_start(TI_HANDLE hMlme);
-
-TI_STATUS mlme_stop(TI_HANDLE hMlme, DisconnectType_e disConnType, mgmtStatus_e reason);
-
-TI_STATUS mlme_reportAuthStatus(TI_HANDLE hMlme, TI_UINT16 status);
-
-TI_STATUS mlme_reportAssocStatus(TI_HANDLE hMlme, TI_UINT16 status);
-
-/* MLME parser API */
-
-TI_STATUS mlmeParser_recv(TI_HANDLE hMlme, void *pBuffer, TRxAttr* pRxAttr);
-
-TI_STATUS mlmeParser_parseIEs(TI_HANDLE hMlme, 
-                              TI_UINT8 *pData,
-                              TI_INT32 bodyDataLen,
-                              mlmeIEParsingParams_t *params);
-TI_BOOL mlmeParser_ParseIeBuffer (TI_HANDLE hMlme, TI_UINT8 *pIeBuffer, TI_UINT32 length, TI_UINT8 desiredIeId, TI_UINT8 **pDesiredIe, TI_UINT8 *pMatchBuffer, TI_UINT32 matchBufferLen);
-
-#ifdef XCC_MODULE_INCLUDED
-void mlmeParser_readXCCOui (TI_UINT8 *pData, 
-                            TI_UINT32 dataLen, 
-                            TI_UINT32 *pReadLen, 
-                            XCCv4IEs_t *XCCIEs);
-#endif
-
-mlmeIEParsingParams_t *mlmeParser_getParseIEsBuffer(TI_HANDLE *hMlme);
-
-/* Association SM API */
-
-TI_HANDLE assoc_create(TI_HANDLE pOs);
-
-TI_STATUS assoc_unload(TI_HANDLE pAssoc);
-
-void      assoc_init (TStadHandlesList *pStadHandles);
-
-TI_STATUS assoc_SetDefaults (TI_HANDLE hAssoc, assocInitParams_t *pAssocInitParams);
-
-TI_STATUS assoc_setParam(TI_HANDLE hCtrlData, paramInfo_t   *pParam);
-
-TI_STATUS assoc_getParam(TI_HANDLE hCtrlData, paramInfo_t   *pParam);
-
-/* Authentication SM API */
-
-TI_HANDLE auth_create(TI_HANDLE hOs);
-
-TI_STATUS auth_unload(TI_HANDLE hAuth);
-
-void      auth_init (TStadHandlesList *pStadHandles);
-
-TI_STATUS auth_SetDefaults (TI_HANDLE hAuth, authInitParams_t *pAuthInitParams);
-
-TI_STATUS auth_setParam(TI_HANDLE hCtrlData, paramInfo_t    *pParam);
-
-TI_STATUS auth_getParam(TI_HANDLE hCtrlData, paramInfo_t    *pParam);
-
-#endif /* __MLME_API_H__*/
diff --git a/wl1271/stad/src/Sta_Management/mlmeBuilder.c b/wl1271/stad/src/Sta_Management/mlmeBuilder.c
deleted file mode 100644
index 3200b51..0000000
--- a/wl1271/stad/src/Sta_Management/mlmeBuilder.c
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * mlmeBuilder.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- /** \file mlmeBuilder.c
- *  \brief 802.11 MLME Builder
- *
- *  \see mlmeBuilder.h
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	mlmeBuilder.c											   */
-/*    PURPOSE:	802.11 MLME Builder										   */
-/*																	 	   */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_67
-#include "tidef.h"
-#include "osApi.h"
-#include "paramOut.h"
-#include "report.h"
-#include "802_11Defs.h"
-#include "DataCtrl_Api.h"
-#include "mlmeApi.h"
-#include "mlmeSm.h"
-#include "mlmeBuilder.h"
-#include "TWDriver.h"
-#include "connApi.h"
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Local function prototypes */
-
-/* Functions */
-
-TI_STATUS mlmeBuilder_sendFrame(TI_HANDLE hMlme, 
-							 dot11MgmtSubType_e type, 
-							 TI_UINT8   *pDataBuff, 
-							 TI_UINT32  dataLen,
-							 TI_UINT8	setWepOpt)
-{
-	mlme_t			*pHandle = (mlme_t*)hMlme;
-	TI_STATUS		status;
-    TTxCtrlBlk      *pPktCtrlBlk;
-    TI_UINT8        *pPktBuffer;
-	TMacAddr		daBssid, saBssid;
-	dot11_mgmtHeader_t	*pDot11Header;
-
-	/* Allocate a TxCtrlBlk and data buffer (large enough for the max management packet) */
-    pPktCtrlBlk = TWD_txCtrlBlk_Alloc (pHandle->hTWD);
-    pPktBuffer  = txCtrl_AllocPacketBuffer (pHandle->hTxCtrl, 
-                                            pPktCtrlBlk, 
-                                            MAX_MANAGEMENT_FRAME_BODY_LEN + WLAN_HDR_LEN);
-    if (pPktBuffer == NULL)
-    {
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR , ": No memory\n");
-        TWD_txCtrlBlk_Free (pHandle->hTWD, pPktCtrlBlk);
-        return TI_NOK;
-    }
-	
-	pDot11Header = (dot11_mgmtHeader_t *)(pPktCtrlBlk->aPktHdr);
-
-	status = mlmeBuilder_buildFrameCtrl (pHandle, type, (TI_UINT16 *)&pDot11Header->fc, setWepOpt);
-	if (status != TI_OK)
-	{
-        txCtrl_FreePacket (pHandle->hTxCtrl, pPktCtrlBlk, TI_NOK);
-		return TI_NOK;
-	}
-
-    status = ctrlData_getParamBssid(pHandle->hCtrlData, CTRL_DATA_CURRENT_BSSID_PARAM, daBssid);
-	if (status != TI_OK)
-	{
-        txCtrl_FreePacket (pHandle->hTxCtrl, pPktCtrlBlk, TI_NOK);
-		return TI_NOK;
-	}
-
-	/* copy destination mac address */
-	MAC_COPY (pDot11Header->DA, daBssid);
-
-    status = ctrlData_getParamBssid(pHandle->hCtrlData, CTRL_DATA_MAC_ADDRESS, saBssid);
-	if (status != TI_OK)
-	{
-        txCtrl_FreePacket (pHandle->hTxCtrl, pPktCtrlBlk, TI_NOK);
-		return TI_NOK;
-	}
-
-	/* copy source mac address */
-	MAC_COPY (pDot11Header->SA, saBssid);
-
-	/* copy BSSID (destination mac address) */
-	MAC_COPY (pDot11Header->BSSID, daBssid);
-
-	if (pDataBuff != NULL)
-	{
-		os_memoryCopy (pHandle->hOs, pPktBuffer, pDataBuff, dataLen);
-	}
-
-    /* Update packet parameters (start-time, length, pkt-type) */
-    pPktCtrlBlk->tTxDescriptor.startTime = os_timeStampMs (pHandle->hOs);
-    pPktCtrlBlk->tTxPktParams.uPktType   = TX_PKT_TYPE_MGMT;
-    BUILD_TX_TWO_BUF_PKT_BDL (pPktCtrlBlk, (TI_UINT8 *)pDot11Header, WLAN_HDR_LEN, pPktBuffer, dataLen)
-
-	/* Enqueue packet in the mgmt-queues and run the scheduler. */
-	status = txMgmtQ_Xmit (pHandle->hTxMgmtQ, pPktCtrlBlk, TI_FALSE);
-
-	return status;
-}
-
-
-TI_STATUS mlmeBuilder_buildFrameCtrl(mlme_t* pMlme, dot11MgmtSubType_e type, TI_UINT16* pFctrl, TI_UINT8 setWepOpt)
-{
-	TI_UINT16	fc = 0;
-
-	switch (type)
-	{
-	case ASSOC_REQUEST:
-		fc |= DOT11_FC_ASSOC_REQ;
-		break;
-	case ASSOC_RESPONSE:
-		fc |= DOT11_FC_ASSOC_RESP;
-		break;
-	case RE_ASSOC_REQUEST:
-		fc |= DOT11_FC_REASSOC_REQ;
-		break;
-	case RE_ASSOC_RESPONSE:
-		fc |= DOT11_FC_REASSOC_RESP;
-		break;
-	case DIS_ASSOC:
-		fc |= DOT11_FC_DISASSOC;
-		break;
-	case AUTH:
-		fc |= DOT11_FC_AUTH;
-		break;
-	case DE_AUTH:
-		fc |= DOT11_FC_DEAUTH;
-		break;
-	case ACTION:
-		fc |= DOT11_FC_ACTION;
-		break;
-	default:
-		*pFctrl = 0;
-		return TI_NOK;
-	}
-	
-	if (setWepOpt)
-	{
-		fc |= DOT11_FC_WEP;
-	}
-
-	COPY_WLAN_WORD(pFctrl, &fc); /* copy with endianess handling. */
-
-	return TI_OK;
-}
-
diff --git a/wl1271/stad/src/Sta_Management/mlmeBuilder.h b/wl1271/stad/src/Sta_Management/mlmeBuilder.h
deleted file mode 100644
index 1d6d7f0..0000000
--- a/wl1271/stad/src/Sta_Management/mlmeBuilder.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * mlmeBuilder.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- /** \file mlmeBuilder.h
- *  \brief 802.11 MLME Builder
- *
- *  \see mlmeBuilder.c
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	mlmeBuilder.h											   */
-/*    PURPOSE:	802.11 MLME Builder										   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _MLME_BUILDER_H
-#define _MLME_BUILDER_H
-
-#include "802_11Defs.h"
-
-#include "paramOut.h"
-
-#include "mlmeSm.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* state machine states */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS mlmeBuilder_sendFrame(TI_HANDLE pMlme, 
-							 dot11MgmtSubType_e type, 
-							 TI_UINT8 *pDataBuff, 
-							 TI_UINT32 dataLen, 
-							 TI_UINT8 setWepOpt);
-
-TI_STATUS mlmeBuilder_buildFrameCtrl(mlme_t* pMlme, 
-								  dot11MgmtSubType_e type, 
-								  TI_UINT16* pFctrl, 
-								  TI_UINT8 setWepOpt);
-
-#endif
-
diff --git a/wl1271/stad/src/Sta_Management/mlmeParser.c b/wl1271/stad/src/Sta_Management/mlmeParser.c
deleted file mode 100644
index 70d6596..0000000
--- a/wl1271/stad/src/Sta_Management/mlmeParser.c
+++ /dev/null
@@ -1,1856 +0,0 @@
-/*
- * mlmeParser.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- /** \file mlmeBuilder.c
- *  \brief 802.11 MLME Parser
- *
- *  \see mlmeParser.h
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*      MODULE: mlmeParser.c                                              */
-/*    PURPOSE:  802.11 MLME Parser                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-
-#define __FILE_ID__  FILE_ID_68
-#include "osApi.h"
-#include "paramOut.h"
-#include "report.h"
-#include "DataCtrl_Api.h"
-#include "smeApi.h"
-#include "mlmeApi.h"
-#include "mlmeSm.h"
-#include "AssocSM.h"
-#include "authSm.h"
-#include "mlmeParser.h"
-#include "measurementMgrApi.h"
-#include "ScanCncn.h"
-#include "siteMgrApi.h"
-#include "spectrumMngmntMgr.h"
-#include "currBss.h"
-#include "apConn.h"
-#include "SwitchChannelApi.h"
-#include "regulatoryDomainApi.h"
-#include "qosMngr_API.h"
-#include "scanResultTable.h"
-#include "RxBuf.h"
-
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Local function prototypes */
-
-/* Functions */
-
-#define CHECK_PARSING_ERROR_CONDITION_PRINT 0
-
-extern int WMEQosTagToACTable[MAX_NUM_OF_802_1d_TAGS];
-
-TI_STATUS mlmeParser_recv(TI_HANDLE hMlme, void *pBuffer, TRxAttr* pRxAttr)
-{
-    TI_STATUS              status;
-    mlme_t                 *pHandle = (mlme_t *)hMlme;
-    TI_UINT8               *pData;
-    TI_INT32               bodyDataLen;
-    TI_UINT32              readLen;
-    dot11_eleHdr_t         *pEleHdr;
-    dot11_mgmtFrame_t      *pMgmtFrame;
-    dot11MgmtSubType_e     msgType;
-    paramInfo_t            *pParam;
-    TMacAddr               recvBssid;
-    TMacAddr               recvSa;
-    TI_UINT8               rsnIeIdx = 0;
-    TI_UINT8               wpaIeOuiIe[] = WPA_IE_OUI;
-#ifdef XCC_MODULE_INCLUDED
-	TI_UINT8			   XCC_oui[] = XCC_OUI;
-	XCCv4IEs_t			   *pXCCIeParameter;
-#endif
-    TI_BOOL				   ciscoIEPresent = TI_FALSE;
-
-    if ((hMlme == NULL) || (pBuffer == NULL))
-    {
-        WLAN_OS_REPORT (("mlmeParser_recv: hMlme == %x, buf = %x\n", hMlme, pBuffer));
-		return TI_NOK;
-    }
-
-    /* zero frame content */
-	os_memoryZero (pHandle->hOs, &(pHandle->tempFrameInfo), sizeof(mlmeIEParsingParams_t));
-
-    pMgmtFrame = (dot11_mgmtFrame_t*)RX_BUF_DATA(pBuffer);
-
-    /* get frame type */
-    status = mlmeParser_getFrameType(pHandle, (TI_UINT16 *)&pMgmtFrame->hdr.fc, &msgType);
-    if (status != TI_OK)
-    {
-        RxBufFree(pHandle->hOs, pBuffer);
-        return TI_NOK;
-    }
-
-    pParam = (paramInfo_t *)os_memoryAlloc(pHandle->hOs, sizeof(paramInfo_t));
-    if (!pParam)
-	{
-        RxBufFree(pHandle->hOs, pBuffer);
-        return TI_NOK;
-    }
-
-    pHandle->tempFrameInfo.frame.subType = msgType;
-
-    /* We have to ignore management frames from other BSSIDs (except beacons & probe responses) */
-    pParam->paramType = CTRL_DATA_CURRENT_BSSID_PARAM;
-    ctrlData_getParam(pHandle->hCtrlData, pParam);
-
-    MAC_COPY (recvBssid, pMgmtFrame->hdr.BSSID);
-    MAC_COPY(recvSa, pMgmtFrame->hdr.SA);
-
-    if (MAC_EQUAL (pParam->content.ctrlDataCurrentBSSID, recvBssid))
-        pHandle->tempFrameInfo.myBssid = TI_TRUE;
-    else
-        pHandle->tempFrameInfo.myBssid = TI_FALSE;
-
-
-    if (MAC_EQUAL (pParam->content.ctrlDataCurrentBSSID, recvSa))
-		pHandle->tempFrameInfo.mySa = TI_TRUE;
-	else
-		pHandle->tempFrameInfo.mySa = TI_FALSE;
-
-	/* The Default value of the myDst flag is false, only in case of unicast packet with the STA's destination address, the flag is set to True */
-	pHandle->tempFrameInfo.myDst = TI_FALSE;
-
-
-    /* check destination MAC address for broadcast */
-
-    if (MAC_BROADCAST (pMgmtFrame->hdr.DA))
-    {
-        pHandle->tempFrameInfo.frame.extesion.destType = MSG_BROADCAST;
-    }
-        else
-        {
-        if (MAC_MULTICAST (pMgmtFrame->hdr.DA))
-        {
-            pHandle->tempFrameInfo.frame.extesion.destType = MSG_MULTICAST;
-        }
-        else
-        {
-            pHandle->tempFrameInfo.frame.extesion.destType = MSG_UNICAST;
-			pParam->paramType = CTRL_DATA_MAC_ADDRESS;
-		    ctrlData_getParam(pHandle->hCtrlData, pParam);
-
-			/* Verifying whether the received unicast packet is for the STA, if yes we set the flag to True */
-			if (MAC_EQUAL( (pParam->content.ctrlDataDeviceMacAddress), (pMgmtFrame->hdr.DA) ))
-				pHandle->tempFrameInfo.myDst = TI_TRUE;
-
-        }
-    }
-
-    MAC_COPY (pHandle->tempFrameInfo.bssid, pMgmtFrame->hdr.BSSID);
-
-    pData = (TI_UINT8 *)(pMgmtFrame->body);
-
-    /* length of body (BUF without 802.11 header and FCS) */
-    bodyDataLen = RX_BUF_LEN(pBuffer) - WLAN_HDR_LEN;
-
-    switch (msgType)
-    {
-    case ASSOC_REQUEST:
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "MLME_PARSER: recieved ASSOC_REQ message \n");
-        break;
-    case RE_ASSOC_REQUEST:
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "MLME_PARSER: recieved RE_ASSOC_REQ message \n");
-        break;
-    case RE_ASSOC_RESPONSE:
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "MLME_PARSER: recieved RE_ASSOC_RSP message \n");
-      /*  break;*/
-    case ASSOC_RESPONSE:
-		/* if the assoc response is not directed to our STA or not from the current AP */
-        if ((!pHandle->tempFrameInfo.myBssid) || (!pHandle->tempFrameInfo.mySa) || (pHandle->tempFrameInfo.myDst == TI_FALSE))
-            break;
-
-        /* Save the association response message */
-        assoc_saveAssocRespMessage(pHandle->hAssoc, (TI_UINT8 *)(pMgmtFrame->body), bodyDataLen);
-
-        /* init frame fields */
-        pHandle->tempFrameInfo.frame.content.assocRsp.barkerPreambleMode = PREAMBLE_UNSPECIFIED;
-
-        /* read capabilities */
-	    COPY_WLAN_WORD(&pHandle->tempFrameInfo.frame.content.assocRsp.capabilities , pData);
-        pData += 2;
-        /* read status */
-	    COPY_WLAN_WORD(&pHandle->tempFrameInfo.frame.content.assocRsp.status , pData);
-        pData += 2;
-        /* read AID */
-	    COPY_WLAN_WORD(&pHandle->tempFrameInfo.frame.content.assocRsp.aid , pData);
-        pHandle->tempFrameInfo.frame.content.assocRsp.aid &= ASSOC_RESP_AID_MASK;
-        pData += 2;
-
-        bodyDataLen -= ASSOC_RESP_FIXED_DATA_LEN;
-        /***************************/
-
-        pHandle->tempFrameInfo.frame.content.assocRsp.pRsnIe = NULL;
-        pHandle->tempFrameInfo.frame.content.assocRsp.rsnIeLen = 0;
-        while (bodyDataLen > 2)
-        {
-            pEleHdr = (dot11_eleHdr_t*)pData;
-
-            if ((*pEleHdr)[1] > (bodyDataLen - 2))
-            {
-                TRACE3(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: IE %d with length %d out of bounds %d\n", (*pEleHdr)[0], (*pEleHdr)[1], (bodyDataLen - 2));
-                status = TI_NOK;
-                goto mlme_recv_end;
-            }
-
-            switch ((*pEleHdr)[0])
-            {
-                        /* read rates */
-            case SUPPORTED_RATES_IE_ID:
-                pHandle->tempFrameInfo.frame.content.assocRsp.pRates = &(pHandle->tempFrameInfo.rates);
-                status = mlmeParser_readRates(pHandle, pData, bodyDataLen, &readLen, &(pHandle->tempFrameInfo.rates));
-                if (status != TI_OK)
-                {
-                    TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: error reading RATES\n");
-                    goto mlme_recv_end;
-                }
-                break;
-
-            case EXT_SUPPORTED_RATES_IE_ID:
-                /* read rates */
-                pHandle->tempFrameInfo.frame.content.assocRsp.pExtRates = &(pHandle->tempFrameInfo.extRates);
-                status = mlmeParser_readRates(pHandle, pData, bodyDataLen, &readLen, &(pHandle->tempFrameInfo.extRates));
-                if (status != TI_OK)
-                {
-                    TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: error reading RATES\n");
-                    goto mlme_recv_end;
-                }
-                break;
-
-            case WPA_IE_ID:
-                /* Note : WPA, WME, TSRS and msdu lifetime use the same Element ID */
-                /*  Its assumes that:
-                        TSRS and msdu lifetime use OUI = 0x00,0x40,0x96 (=Cisco) but
-                        use different OUI Type:
-                            TSRS          uses OUI Type 8
-                            msdu lifetime uses OUI Type 9;
-                        WPA and WME use the same OUI = 0x00,0x50,0xf2 but
-                        use different OUI Type:
-                            WPA - uses OUI Type with value  - 1
-                            WME - uses OUI Type with value  - 2.
-                */
-
-                /* check if this is WME IE */
-                if((os_memoryCompare(pHandle->hOs, wpaIeOuiIe, pData+2, DOT11_OUI_LEN - 1) == 0) && 
-						((*(TI_UINT8*)(pData+5)) == dot11_WME_OUI_TYPE))
-                {
-                    pHandle->tempFrameInfo.frame.content.assocRsp.WMEParams = &(pHandle->tempFrameInfo.WMEParams);
-                    status = mlmeParser_readWMEParams(pHandle, pData, bodyDataLen, &readLen, 
-                                                      &(pHandle->tempFrameInfo.WMEParams),
-													  &(pHandle->tempFrameInfo.frame.content.assocRsp));
-                    if (status != TI_OK)
-                    {
-                        TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: error reading WME parameters\n");
-                        goto mlme_recv_end;
-                    }
-                }
-#ifdef XCC_MODULE_INCLUDED
-				/* check if this is XCC vendor specific OUI */
-				else if (os_memoryCompare(pHandle->hOs, XCC_oui, pData+2, DOT11_OUI_LEN - 1) == 0) 
-				{
-					pXCCIeParameter = &(pHandle->tempFrameInfo.frame.content.assocRsp.XCCIEs[WMEQosTagToACTable[*(pData+6)]]);
-					mlmeParser_readXCCOui(pData, bodyDataLen, &readLen, pXCCIeParameter);
-				}
-#endif
-				else
-                {
-                    /* skip this IE */
-                    readLen = (*pEleHdr)[1] + 2;
-                }
-                break;
-
-            case XCC_EXT_1_IE_ID:
-				ciscoIEPresent = TI_TRUE;
-                pHandle->tempFrameInfo.frame.content.assocRsp.pRsnIe = &(pHandle->tempFrameInfo.rsnIe[0]);
-                status = mlmeParser_readRsnIe(pHandle, pData, bodyDataLen, &readLen, 
-                                              &(pHandle->tempFrameInfo.rsnIe[rsnIeIdx]));
-                if (status != TI_OK)
-                {
-                    TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: error reading XCC EXT1 IE\n");
-                    goto mlme_recv_end;
-                }
-    
-                pHandle->tempFrameInfo.frame.content.assocRsp.rsnIeLen += readLen;
-                rsnIeIdx ++;
-                break;
-
-            case XCC_EXT_2_IE_ID:
-				ciscoIEPresent = TI_TRUE;
-                pHandle->tempFrameInfo.frame.content.assocRsp.pRsnIe   = &(pHandle->tempFrameInfo.rsnIe[0]);
-                status = mlmeParser_readRsnIe(pHandle, pData, bodyDataLen, &readLen,
-                                              &(pHandle->tempFrameInfo.rsnIe[rsnIeIdx]));
-                if (status != TI_OK)
-                {
-                    TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: error reading RSN IP ADDR IE\n");
-                    goto mlme_recv_end;
-                }
-    
-                pHandle->tempFrameInfo.frame.content.assocRsp.rsnIeLen += readLen;
-                rsnIeIdx ++;
-                break;
-
-			case DOT11_QOS_CAPABILITY_ELE_ID:
-				pHandle->tempFrameInfo.frame.content.assocRsp.QoSCapParameters = &(pHandle->tempFrameInfo.QosCapParams);
-                status = mlmeParser_readQosCapabilityIE(pHandle, pData, bodyDataLen, &readLen, 
-                                                        &(pHandle->tempFrameInfo.QosCapParams));
-                if (status != TI_OK)
-                {
-                    TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: error reading QOS\n");
-                    goto mlme_recv_end;
-                }
-                break;
-
-			case HT_CAPABILITIES_IE_ID:
-				pHandle->tempFrameInfo.frame.content.assocRsp.pHtCapabilities = &(pHandle->tempFrameInfo.tHtCapabilities);
-                status = mlmeParser_readHtCapabilitiesIE (pHandle, pData, bodyDataLen, &readLen,
-                                                          &(pHandle->tempFrameInfo.tHtCapabilities));
-
-                if (status != TI_OK)
-                {
-                    TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: error reading HT Capabilities IE\n");
-                    goto mlme_recv_end;
-                }
-                break;
-
-			case HT_INFORMATION_IE_ID:
-				pHandle->tempFrameInfo.frame.content.assocRsp.pHtInformation = &(pHandle->tempFrameInfo.tHtInformation);
-                status = mlmeParser_readHtInformationIE (pHandle, pData, bodyDataLen, &readLen, 
-                                                         &(pHandle->tempFrameInfo.tHtInformation));
-                if (status != TI_OK)
-                {
-                    TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: error reading HT Information IE\n");
-                    goto mlme_recv_end;
-                }
-                break;
-
-            default:
-                TRACE1(pHandle->hReport, REPORT_SEVERITY_INFORMATION, "MLME_PARSER: unsupported IE found (%d)\n", (*pEleHdr)[1]);
-                readLen = (*pEleHdr)[1] + 2;
-                status = TI_OK;
-                break;
-            }
-
-            pData += readLen;
-            bodyDataLen -= readLen;
-        }
-        /***************************/
-
-		/* set the appropriate flag in the association response frame */
-		/* to indicate whether or not we encountered a Cisco IE, i.e., */
-		/* if we have any indication as to whether the AP we've associated */
-		/* with is a Cisco AP. */
-		pHandle->tempFrameInfo.frame.content.assocRsp.ciscoIEPresent = ciscoIEPresent;
-
-        TRACE1(pHandle->hReport, REPORT_SEVERITY_INFORMATION, "MLME_PARSER: ciscoIEPresent = %d\n", ciscoIEPresent);
-
-        status = assoc_recv(pHandle->hAssoc, &(pHandle->tempFrameInfo.frame));
-        break;
-
-    case PROBE_REQUEST:
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "MLME_PARSER: recieved PROBE_REQ message \n");
-        break;
-    case PROBE_RESPONSE:
-
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "MLME_PARSER: recieved PROBE_RESPONSE message \n");
-
-        if(RX_BUF_LEN(pBuffer)-WLAN_HDR_LEN-TIME_STAMP_LEN-4 > MAX_BEACON_BODY_LENGTH)
-        {
-            TRACE3(pHandle->hReport, REPORT_SEVERITY_ERROR, "mlmeParser_recv: probe response length out of range. length=%d, band=%d, channel=%d\n", RX_BUF_LEN(pBuffer)-WLAN_HDR_LEN-TIME_STAMP_LEN-4, pRxAttr->band, pRxAttr->channel);
-            if ((pRxAttr->eScanTag > SCAN_RESULT_TAG_CURENT_BSS) && (pRxAttr->eScanTag != SCAN_RESULT_TAG_MEASUREMENT))
-            {
-                /* Notify the result CB of an invalid frame (to update the result counter) */
-                scanCncn_MlmeResultCB( pHandle->hScanCncn, NULL, NULL, pRxAttr, NULL, 0);
-            }
-            status = TI_NOK;
-            goto mlme_recv_end;
-        }
-
-        /* init frame fields */
-        pHandle->tempFrameInfo.frame.content.iePacket.barkerPreambleMode = PREAMBLE_UNSPECIFIED;
-
-        /* read time stamp */
-        os_memoryCopy(pHandle->hOs, (void *)pHandle->tempFrameInfo.frame.content.iePacket.timestamp, pData, TIME_STAMP_LEN);
-        pData += TIME_STAMP_LEN;
-
-        bodyDataLen -= TIME_STAMP_LEN;
-        /* read beacon interval */
-	    COPY_WLAN_WORD(&pHandle->tempFrameInfo.frame.content.iePacket.beaconInerval , pData);
-        pData += 2;
-        /* read capabilities */
-	    COPY_WLAN_WORD(&pHandle->tempFrameInfo.frame.content.iePacket.capabilities , pData);
-        pData += 2;
-
-        bodyDataLen -= 4;
-        pHandle->tempFrameInfo.frame.content.iePacket.pRsnIe = NULL;
-        pHandle->tempFrameInfo.frame.content.iePacket.rsnIeLen = 0;
-
-		pHandle->tempFrameInfo.band = pRxAttr->band;
-		pHandle->tempFrameInfo.rxChannel = pRxAttr->channel;
-
-        if ((pRxAttr->band == RADIO_BAND_2_4_GHZ) && (pRxAttr->channel > NUM_OF_CHANNELS_24))
-        {
-            TRACE2(pHandle->hReport, REPORT_SEVERITY_ERROR, "mlmeParser_recv, band=%d, channel=%d\n", pRxAttr->band, pRxAttr->channel);
-            /* Error in parsing Probe response packet - exit */
-            if ((pRxAttr->eScanTag > SCAN_RESULT_TAG_CURENT_BSS) && (pRxAttr->eScanTag != SCAN_RESULT_TAG_MEASUREMENT))
-            {
-                /* Notify the result CB of an invalid frame (to update the result counter) */
-                scanCncn_MlmeResultCB( pHandle->hScanCncn, NULL, NULL, pRxAttr, NULL, 0);
-            }
-            status = TI_NOK;
-            goto mlme_recv_end;
-        }
-        else if ((pRxAttr->band == RADIO_BAND_5_0_GHZ) && (pRxAttr->channel <= NUM_OF_CHANNELS_24))
-        {
-            TRACE2(pHandle->hReport, REPORT_SEVERITY_ERROR, "mlmeParser_recv, band=%d, channel=%d\n", pRxAttr->band, pRxAttr->channel);
-            /* Error in parsing Probe response packet - exit */
-            if ((pRxAttr->eScanTag > SCAN_RESULT_TAG_CURENT_BSS) && (pRxAttr->eScanTag != SCAN_RESULT_TAG_MEASUREMENT))
-            {
-                /* Notify the result CB of an invalid frame (to update the result counter) */
-                scanCncn_MlmeResultCB( pHandle->hScanCncn, NULL, NULL, pRxAttr, NULL, 0);
-            }
-            status = TI_NOK;
-            goto mlme_recv_end;
-        }
-        if (mlmeParser_parseIEs(hMlme, pData, bodyDataLen, &(pHandle->tempFrameInfo)) != TI_OK)
-        {
-            TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "mlmeParser_recv: Error in parsing Probe response packet\n");
-
-            /* Error in parsing Probe response packet - exit */
-            if ((pRxAttr->eScanTag > SCAN_RESULT_TAG_CURENT_BSS) && (pRxAttr->eScanTag != SCAN_RESULT_TAG_MEASUREMENT))
-            {
-                /* Notify the result CB of an invalid frame (to update the result counter) */
-                scanCncn_MlmeResultCB( pHandle->hScanCncn, NULL, NULL, pRxAttr, NULL, 0);
-            }
-            status = TI_NOK;
-            goto mlme_recv_end;
-        }
-
-        /* updating CountryIE  */
-        if ((pHandle->tempFrameInfo.frame.content.iePacket.country != NULL) && 
-            (pHandle->tempFrameInfo.frame.content.iePacket.country->hdr[1] != 0))
-        {
-            /* set the country info in the regulatory domain - If a different code was detected earlier
-               the regDomain will ignore it */
-            pParam->paramType = REGULATORY_DOMAIN_COUNTRY_PARAM;
-            pParam->content.pCountry = (TCountry *)pHandle->tempFrameInfo.frame.content.iePacket.country;
-            regulatoryDomain_setParam (pHandle->hRegulatoryDomain, pParam);
-        }
-
-        /* if tag = MSR, forward to the MSR module.  */
-        if (SCAN_RESULT_TAG_MEASUREMENT == pRxAttr->eScanTag)
-        {
-            measurementMgr_mlmeResultCB( pHandle->hMeasurementMgr, 
-                                   &(pHandle->tempFrameInfo.bssid), 
-                                   &(pHandle->tempFrameInfo.frame), 
-                                   pRxAttr,
-                                   (TI_UINT8 *)(pMgmtFrame->body+TIME_STAMP_LEN+4),
-                                   RX_BUF_LEN(pBuffer)-WLAN_HDR_LEN-TIME_STAMP_LEN-4 );
-        }
-
-        /* only forward frames from the current BSS (according to the tag) to current BSS */
-        else if (SCAN_RESULT_TAG_CURENT_BSS == pRxAttr->eScanTag)
-        {
-			currBSS_probRespReceivedCallb(pHandle->hCurrBss, 
-                                          pRxAttr, 
-                                          &(pHandle->tempFrameInfo.bssid), 
-                                          &(pHandle->tempFrameInfo.frame), 
-                                          (TI_UINT8 *)(pMgmtFrame->body+TIME_STAMP_LEN+4), 
-                                          RX_BUF_LEN(pBuffer)-WLAN_HDR_LEN-TIME_STAMP_LEN-4);
-        }
-
-		/* Check if there is a scan in progress, and this is a scan or measurement result (according to tag) */
-		else /* (SCAN_RESULT_TAG_CURENT_BSS!= pRxAttr->eScanTag) & (SCAN_RESULT_TAG_MEASUREMENT != pRxAttr->eScanTag) */
-        {
-            /* result CB is registered - results are sent to the registered callback */
-            scanCncn_MlmeResultCB( pHandle->hScanCncn, 
-                                   &(pHandle->tempFrameInfo.bssid), 
-                                   &(pHandle->tempFrameInfo.frame), 
-                                   pRxAttr,
-                                   (TI_UINT8 *)(pMgmtFrame->body+TIME_STAMP_LEN+4),
-                                   RX_BUF_LEN(pBuffer)-WLAN_HDR_LEN-TIME_STAMP_LEN-4 );
-        }
-
-        if(pHandle->tempFrameInfo.recvChannelSwitchAnnoncIE == TI_FALSE)
-		{
-			switchChannel_recvCmd(pHandle->hSwitchChannel, NULL, pRxAttr->channel);
-		}
-
-        break;
-    case BEACON:
-
-        TRACE1(pHandle->hReport, REPORT_SEVERITY_INFORMATION, "MLME_PARSER: recieved BEACON message, TS= %ld\n", os_timeStampMs(pHandle->hOs));
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_INFORMATION, "beacon BUF");
-
-        if(RX_BUF_LEN(pBuffer)-WLAN_HDR_LEN-TIME_STAMP_LEN-4 > MAX_BEACON_BODY_LENGTH)
-        {
-            TRACE3(pHandle->hReport, REPORT_SEVERITY_ERROR, "mlmeParser_recv: beacon length out of range. length=%d, band=%d, channel=%d\n", RX_BUF_LEN(pBuffer)-WLAN_HDR_LEN-TIME_STAMP_LEN-4, pRxAttr->band, pRxAttr->channel);
-            if ((pRxAttr->eScanTag > SCAN_RESULT_TAG_CURENT_BSS) && (pRxAttr->eScanTag != SCAN_RESULT_TAG_MEASUREMENT))
-            {
-			    /* Notify the result CB of an invalid frame (to update the result counter) */
-			    scanCncn_MlmeResultCB( pHandle->hScanCncn, NULL, NULL, pRxAttr, NULL, 0);
-            }
-            status = TI_NOK;
-            goto mlme_recv_end;
-        }
-
-        /* init frame fields */
-        pHandle->tempFrameInfo.frame.content.iePacket.barkerPreambleMode = PREAMBLE_UNSPECIFIED;
-
-        /* read time stamp */
-        os_memoryCopy(pHandle->hOs, (void *)pHandle->tempFrameInfo.frame.content.iePacket.timestamp, pData, TIME_STAMP_LEN);
-        pData += TIME_STAMP_LEN;
-
-        bodyDataLen -= TIME_STAMP_LEN;
-        /* read beacon interval */
-	    COPY_WLAN_WORD(&pHandle->tempFrameInfo.frame.content.iePacket.beaconInerval , pData);
-        pData += 2;
-        /* read capabilities */
-	    COPY_WLAN_WORD(&pHandle->tempFrameInfo.frame.content.iePacket.capabilities , pData);
-        pData += 2;
-
-        bodyDataLen -= 4;
-        pHandle->tempFrameInfo.frame.content.iePacket.pRsnIe = NULL;
-        pHandle->tempFrameInfo.frame.content.iePacket.rsnIeLen = 0;
-
-        if ((pRxAttr->band == RADIO_BAND_2_4_GHZ) && (pRxAttr->channel > NUM_OF_CHANNELS_24))
-        {
-            TRACE2(pHandle->hReport, REPORT_SEVERITY_ERROR, "mlmeParser_recv, band=%d, channel=%d\n", pRxAttr->band, pRxAttr->channel);
-            /* Error in parsing Probe response packet - exit */
-            if ((pRxAttr->eScanTag > SCAN_RESULT_TAG_CURENT_BSS) && (pRxAttr->eScanTag != SCAN_RESULT_TAG_MEASUREMENT))
-            {
-                /* Notify the result CB of an invalid frame (to update the result counter) */
-                scanCncn_MlmeResultCB( pHandle->hScanCncn, NULL, NULL, pRxAttr, NULL, 0);
-            }
-            status = TI_NOK;
-            goto mlme_recv_end;
-        }
-        else if ((pRxAttr->band == RADIO_BAND_5_0_GHZ) && (pRxAttr->channel <= NUM_OF_CHANNELS_24))
-        {
-            TRACE2(pHandle->hReport, REPORT_SEVERITY_ERROR, "mlmeParser_recv, band=%d, channel=%d\n", pRxAttr->band, pRxAttr->channel);
-            /* Error in parsing Probe response packet - exit */
-            if ((pRxAttr->eScanTag > SCAN_RESULT_TAG_CURENT_BSS) && (pRxAttr->eScanTag != SCAN_RESULT_TAG_MEASUREMENT))
-            {
-                /* Notify the result CB of an invalid frame (to update the result counter) */
-                scanCncn_MlmeResultCB( pHandle->hScanCncn, NULL, NULL, pRxAttr, NULL, 0);
-            }
-            status = TI_NOK;
-            goto mlme_recv_end;
-        }
-		pHandle->tempFrameInfo.band = pRxAttr->band;
-		pHandle->tempFrameInfo.rxChannel = pRxAttr->channel;
-
-        if (mlmeParser_parseIEs(hMlme, pData, bodyDataLen, &(pHandle->tempFrameInfo)) != TI_OK)
-        {
-            TRACE0(pHandle->hReport, REPORT_SEVERITY_WARNING, "mlmeParser_parseIEs - Error in parsing Beacon \n");
-            /* Error in parsing Probe response packet - exit */
-            if ((pRxAttr->eScanTag > SCAN_RESULT_TAG_CURENT_BSS) && (pRxAttr->eScanTag != SCAN_RESULT_TAG_MEASUREMENT))
-            {
-                /* Notify the result CB of an invalid frame (to update the result counter) */
-                scanCncn_MlmeResultCB( pHandle->hScanCncn, NULL, NULL, pRxAttr, NULL, 0);
-            }
-            status = TI_NOK;
-            goto mlme_recv_end;
-        }
-
-        /* updating CountryIE  */
-        if ((pHandle->tempFrameInfo.frame.content.iePacket.country != NULL) && 
-            (pHandle->tempFrameInfo.frame.content.iePacket.country->hdr[1] != 0))
-        {
-            /* set the country info in the regulatory domain - If a different code was detected earlier
-               the regDomain will ignore it */
-            pParam->paramType = REGULATORY_DOMAIN_COUNTRY_PARAM;
-            pParam->content.pCountry = (TCountry *)pHandle->tempFrameInfo.frame.content.iePacket.country;
-            regulatoryDomain_setParam (pHandle->hRegulatoryDomain, pParam);
-        }
-
-
-        /* if tag = MSR, forward to the MSR module.  */
-        if (SCAN_RESULT_TAG_MEASUREMENT == pRxAttr->eScanTag)
-        {
-            measurementMgr_mlmeResultCB( pHandle->hMeasurementMgr, 
-                                   &(pHandle->tempFrameInfo.bssid), 
-                                   &(pHandle->tempFrameInfo.frame), 
-                                   pRxAttr,
-                                   (TI_UINT8 *)(pMgmtFrame->body+TIME_STAMP_LEN+4),
-                                   RX_BUF_LEN(pBuffer)-WLAN_HDR_LEN-TIME_STAMP_LEN-4 );
-        }
-
-        /* only forward frames from the current BSS (according to the tag) to current BSS */
-        else if (SCAN_RESULT_TAG_CURENT_BSS == pRxAttr->eScanTag)
-        {
-			currBSS_beaconReceivedCallb(pHandle->hCurrBss, pRxAttr, 
-                                    &(pHandle->tempFrameInfo.bssid), 
-                                    &(pHandle->tempFrameInfo.frame), 
-                                    (TI_UINT8 *)(pMgmtFrame->body+TIME_STAMP_LEN+4), 
-                                    RX_BUF_LEN(pBuffer)-WLAN_HDR_LEN-TIME_STAMP_LEN-4);
-        }
-
-        /* Check if there is a scan in progress, and this is a scan or measurement result (according to tag) */
-		else /* (SCAN_RESULT_TAG_CURENT_BSS!= pRxAttr->eScanTag) & (SCAN_RESULT_TAG_MEASUREMENT != pRxAttr->eScanTag) */
-		{
-			/* result CB is registered - results are sent to the registered callback */
-            scanCncn_MlmeResultCB( pHandle->hScanCncn, 
-                                   &(pHandle->tempFrameInfo.bssid), 
-                                   &(pHandle->tempFrameInfo.frame), 
-                                   pRxAttr,
-                                   (TI_UINT8 *)(pMgmtFrame->body+TIME_STAMP_LEN+4),
-                                   RX_BUF_LEN(pBuffer)-WLAN_HDR_LEN-TIME_STAMP_LEN-4 );
-        }
-
-        /* Counting the number of recieved beacons - used for statistics */
-        pHandle->BeaconsCounterPS++;
-
-        if (pHandle->tempFrameInfo.recvChannelSwitchAnnoncIE == TI_FALSE)
-		{
-			switchChannel_recvCmd(pHandle->hSwitchChannel, NULL, pRxAttr->channel);
-		}
-
-        break;
-    case ATIM:
-        if (!pHandle->tempFrameInfo.myBssid)
-            break;
-
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "MLME_PARSER: recieved ATIM message \n");
-        break;
-    case DIS_ASSOC:
-        if ((!pHandle->tempFrameInfo.myBssid) || (!pHandle->tempFrameInfo.mySa))
-            break;
-
-        /* read Reason interval */
-	    COPY_WLAN_WORD(&pHandle->tempFrameInfo.frame.content.disAssoc.reason , pData);
-
-   		{	/* Send roaming trigger */
-			roamingEventData_u RoamingEventData;
-			RoamingEventData.APDisconnect.uStatusCode = pHandle->tempFrameInfo.frame.content.disAssoc.reason;
-			RoamingEventData.APDisconnect.bDeAuthenticate = TI_FALSE; /* i.e. This is not DeAuth packet */
-			apConn_reportRoamingEvent(pHandle->hApConn, ROAMING_TRIGGER_AP_DISCONNECT, &RoamingEventData);
-		}
-        break;
-
-    case AUTH:
-        /* Auth response frame is should be directed to our STA, and from the current AP */
-		if ( (!pHandle->tempFrameInfo.myBssid) || (!pHandle->tempFrameInfo.mySa) || (pHandle->tempFrameInfo.myDst == TI_FALSE) )
-            break;
-
-        /* read Algorithm interval */
-	    COPY_WLAN_WORD(&pHandle->tempFrameInfo.frame.content.auth.authAlgo , pData);
-        pData += 2;
-        /* read Sequence number */
-	    COPY_WLAN_WORD(&pHandle->tempFrameInfo.frame.content.auth.seqNum , pData);
-        pData += 2;
-        /* read status */
-	    COPY_WLAN_WORD(&pHandle->tempFrameInfo.frame.content.auth.status , pData);
-        pData += 2;
-
-        TRACE3(pHandle->hReport, REPORT_SEVERITY_INFORMATION, "MLME_PARSER: Read Auth: algo=%d, seq=%d, status=%d\n", pHandle->tempFrameInfo.frame.content.auth.authAlgo, pHandle->tempFrameInfo.frame.content.auth.seqNum, pHandle->tempFrameInfo.frame.content.auth.status);
-        bodyDataLen -= 6;
-        /* read Challenge */
-        pHandle->tempFrameInfo.frame.content.auth.pChallenge = &(pHandle->tempFrameInfo.challenge);
-        status = mlmeParser_readChallange(pHandle, pData, bodyDataLen, &readLen, &(pHandle->tempFrameInfo.challenge));
-        if (status != TI_OK)
-        {
-            pHandle->tempFrameInfo.challenge.hdr[1] = 0;
-            readLen = 0;
-        }
-        pData += readLen;
-
-        status = auth_recv(pHandle->hAuth, &(pHandle->tempFrameInfo.frame));
-        break;
-    case DE_AUTH:
-        if ((!pHandle->tempFrameInfo.myBssid) || (!pHandle->tempFrameInfo.mySa))
-            break;
-
-        /* consider the Assoc frame if it is one of the following:
-			1) unicast frame and directed to our STA
-			2) broadcast frame
-		*/
-		if( (pHandle->tempFrameInfo.frame.extesion.destType == MSG_UNICAST) && (pHandle->tempFrameInfo.myDst == TI_FALSE) )
-            break;
-
-        /* read Reason */
-	    COPY_WLAN_WORD(&pHandle->tempFrameInfo.frame.content.deAuth.reason , pData);
-
-		{	/* Send roaming trigger */
-			roamingEventData_u RoamingEventData;
-			RoamingEventData.APDisconnect.uStatusCode = pHandle->tempFrameInfo.frame.content.disAssoc.reason;
-			RoamingEventData.APDisconnect.bDeAuthenticate = TI_TRUE; /* i.e. This is DeAuth packet */
-			apConn_reportRoamingEvent(pHandle->hApConn, ROAMING_TRIGGER_AP_DISCONNECT, &RoamingEventData);
-		}
-        break;
-
-    case ACTION:
-		pParam->paramType = CTRL_DATA_CURRENT_BSS_TYPE_PARAM;
-		ctrlData_getParam(pHandle->hCtrlData, pParam);
-
-        if ((!pHandle->tempFrameInfo.myBssid) || 
-			((!pHandle->tempFrameInfo.mySa) && (pParam->content.ctrlDataCurrentBssType == BSS_INFRASTRUCTURE)))
-            break;
-
-		/* if the action frame is unicast and not directed to our STA, we should ignore it */
-		if( (pHandle->tempFrameInfo.frame.extesion.destType == MSG_UNICAST) && (pHandle->tempFrameInfo.myDst == TI_FALSE) )
-			break;
-
-        /* read Category field */
-        pHandle->tempFrameInfo.frame.content.action.category = *pData;
-        pData ++;
-        bodyDataLen --;
-
-        /* Checking if the category field is valid */
-		if(( pHandle->tempFrameInfo.frame.content.action.category != CATAGORY_SPECTRUM_MANAGEMENT) &&
-			(pHandle->tempFrameInfo.frame.content.action.category != CATAGORY_QOS)  &&
-			(pHandle->tempFrameInfo.frame.content.action.category != WME_CATAGORY_QOS) )   
-        {
-            TRACE1(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: Error category is invalid for action management frame %d \n", pHandle->tempFrameInfo.frame.content.action.category );
-            break;
-        }
-
-		switch(pHandle->tempFrameInfo.frame.content.action.category)
-		{
-			case CATAGORY_QOS:
-			case WME_CATAGORY_QOS:			 
-				/* read action field */
-				pHandle->tempFrameInfo.frame.content.action.action = *pData;
-				pData ++;
-				bodyDataLen --;
-
-				QosMngr_receiveActionFrames(pHandle->hQosMngr, pData, pHandle->tempFrameInfo.frame.content.action.action, bodyDataLen); 
-				break;
-				
-			case CATAGORY_SPECTRUM_MANAGEMENT:
-				/* read action field */
-				pHandle->tempFrameInfo.frame.content.action.action = *pData;
-				pData ++;
-				bodyDataLen --;
-				
-				switch(pHandle->tempFrameInfo.frame.content.action.action)
-				{
-					case MEASUREMENT_REQUEST:
-						/* Checking the frame type  */
-						if(pHandle->tempFrameInfo.frame.extesion.destType == MSG_BROADCAST)
-							pHandle->tempFrameInfo.frame.content.action.frameType = MSR_FRAME_TYPE_BROADCAST;
-						else
-							pHandle->tempFrameInfo.frame.content.action.frameType = MSR_FRAME_TYPE_UNICAST;
-						
-							/*measurementMgr_receiveFrameRequest(pHandle->hMeasurementMgr,
-							pHandle->tempFrameInfo.frame.content.action.frameType,
-							bodyDataLen,pData);*/
-						break;
-
-					case TPC_REQUEST:
-						/*measurementMgr_receiveTPCRequest(pHandle->hMeasurementMgr,(TI_UINT8)bodyDataLen,pData);*/
-						break;
-						
-					case CHANNEL_SWITCH_ANNOUNCEMENT:
-						if (pHandle->tempFrameInfo.myBssid)
-						{   /* Ignore Switch Channel commands from non my BSSID */
-							mlmeParser_readChannelSwitch(pHandle,pData,bodyDataLen,&readLen,&(pHandle->tempFrameInfo.channelSwitch),
-								pRxAttr->channel);
-						}
-						break;
-						
-					default:
-                        TRACE1(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: Error, category is invalid for action management frame %d \n",							pHandle->tempFrameInfo.frame.content.action.category );
-						break;
-				}
-				
-				break;
-				
-			default:
-				status = TI_NOK;
-				break;
-					
-		}
-    }
-
-mlme_recv_end:
-    /* release BUF */
-    os_memoryFree(pHandle->hOs, pParam, sizeof(paramInfo_t));
-	RxBufFree(pHandle->hOs, pBuffer);
-    if (status != TI_OK)
-        return TI_NOK;
-    return status;
-}
-
-TI_STATUS mlmeParser_getFrameType(mlme_t *pMlme, TI_UINT16* pFrameCtrl, dot11MgmtSubType_e *pType)
-{
-    TI_UINT16 fc;
-	
-	COPY_WLAN_WORD(&fc, pFrameCtrl); /* copy with endianess handling. */
-
-	if ((fc & DOT11_FC_PROT_VERSION_MASK) != DOT11_FC_PROT_VERSION)
-    {
-        TRACE1(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: Error Wrong protocol version (not %d) \n", DOT11_FC_PROT_VERSION);
-        return TI_NOK;
-    }
-
-    if ((fc & DOT11_FC_TYPE_MASK) != DOT11_FC_TYPE_MGMT)
-    {
-        TRACE0(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: Error not MANAGEMENT frame\n");
-        return TI_NOK;
-    }
-
-    *pType = (dot11MgmtSubType_e)((fc & DOT11_FC_SUB_MASK) >> 4);
-
-    return TI_OK;
-}
-
-
-#ifdef XCC_MODULE_INCLUDED
-void mlmeParser_readXCCOui (TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, XCCv4IEs_t *XCCIEs)
-{
-    TI_UINT8 ieLen;
-	TI_UINT8 ouiType;
-
-    ieLen = *(pData+1) + 2;
-
-    if (dataLen < ieLen)
-    {
-		/* Wrong length of info-element, skip to the end of the packet */
-		*pReadLen = dataLen;
-		return;
-    }
-
-    *pReadLen = ieLen;
-	ouiType = *(pData+5);
-
-	switch (ouiType) 
-	{
-		case TS_METRIX_OUI_TYPE:
-			XCCIEs->tsMetrixParameter = (dot11_TS_METRICS_IE_t *)pData;
-			break;
-		case TS_RATE_SET_OUI_TYPE:
-			XCCIEs->trafficStreamParameter = (dot11_TSRS_IE_t *)pData;
-			break;
-		case EDCA_LIFETIME_OUI_TYPE:
-			XCCIEs->edcaLifetimeParameter = (dot11_MSDU_LIFE_TIME_IE_t *)pData;
-			break;
-	}
-    return;
-}
-#endif
-
-
-TI_STATUS mlmeParser_readERP(mlme_t *pMlme, TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen,
-                             TI_BOOL *useProtection, EPreamble *barkerPreambleMode)
-{
-
-    TI_UINT32 erpIElen;
-    TI_UINT16 ctrl;
-
-    erpIElen = *(pData+1);
-    *pReadLen = erpIElen + 2;
-
-    if (dataLen < (TI_UINT32)(erpIElen + 2))
-    {
-        return TI_NOK;
-    }
-
-    COPY_WLAN_WORD(&ctrl , pData + 2);
-
-    *useProtection = (ctrl & 0x2) >>1;
-    *barkerPreambleMode = ((ctrl & 0x4) >>2) ? PREAMBLE_LONG : PREAMBLE_SHORT;
-
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readRates(mlme_t *pMlme, TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_RATES_t *pRates)
-{
-    pRates->hdr[0] = *pData;
-    pRates->hdr[1] = *(pData+1);
-
-    *pReadLen = pRates->hdr[1] + 2;
-
-    if (dataLen < (TI_UINT32)(pRates->hdr[1] + 2))
-    {
-        return TI_NOK;
-    }
-
-    if (pRates->hdr[1] > DOT11_MAX_SUPPORTED_RATES)
-    {
-        return TI_NOK;
-    }
-
-    os_memoryCopy(pMlme->hOs, (void *)pRates->rates, pData+2, pRates->hdr[1]);
-
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readSsid(mlme_t *pMlme, TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_SSID_t *pSsid)
-{
-    pSsid->hdr[0] = *pData;
-    pSsid->hdr[1] = *(pData+1);
-
-    *pReadLen = pSsid->hdr[1] + 2;
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(pSsid->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    if (pSsid->hdr[1] > MAX_SSID_LEN)
-    {
-        return TI_NOK;
-    }
-
-    os_memoryCopy(pMlme->hOs, (void *)pSsid->serviceSetId, pData+2, pSsid->hdr[1]);
-
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readFhParams(mlme_t *pMlme, TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_FH_PARAMS_t *pFhParams)
-{
-    pFhParams->hdr[0] = *pData;
-    pFhParams->hdr[1] = *(pData+1);
-    pData += 2;
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(pFhParams->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    COPY_WLAN_WORD(&pFhParams->dwellTime , pData);
-    pData += 2;
-
-    pFhParams->hopSet = *pData;
-    pFhParams->hopPattern = *(pData+1);
-    pFhParams->hopIndex = *(pData+2);
-
-    *pReadLen = pFhParams->hdr[1] + 2;
-
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readDsParams(mlme_t *pMlme, TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_DS_PARAMS_t *pDsParams)
-{
-    pDsParams->hdr[0] = *pData;
-    pDsParams->hdr[1] = *(pData+1);
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(pDsParams->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    pDsParams->currChannel = *(pData+2);
-
-    *pReadLen = pDsParams->hdr[1] + 2;
-
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readCfParams(mlme_t *pMlme, TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_CF_PARAMS_t *pCfParams)
-{
-    pCfParams->hdr[0] = *pData;
-    pCfParams->hdr[1] = *(pData+1);
-    pData += 2;
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(pCfParams->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    pCfParams->cfpCount = *pData;
-    pCfParams->cfpPeriod = *(pData+1);
-    pData += 2;
-
-    COPY_WLAN_WORD(&pCfParams->cfpMaxDuration, pData);
-    pData += 2;
-
-    COPY_WLAN_WORD(&pCfParams->cfpDurRemain, pData);
-
-    *pReadLen = pCfParams->hdr[1] + 2;
-
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readIbssParams(mlme_t *pMlme, TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_IBSS_PARAMS_t *pIbssParams)
-{
-    pIbssParams->hdr[0] = *pData;
-    pIbssParams->hdr[1] = *(pData+1);
-    pData += 2;
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(pIbssParams->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    COPY_WLAN_WORD(&pIbssParams->atimWindow, pData);
-
-    *pReadLen = pIbssParams->hdr[1] + 2;
-
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readTim(mlme_t *pMlme, TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_TIM_t *pTim)
-{
-    pTim->hdr[0] = *pData;
-    pTim->hdr[1] = *(pData+1);
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(pTim->hdr[1] + 2)) || (pTim->hdr[1] < 3))
-    {
-        return TI_NOK;
-    }
-
-    pTim->dtimCount		= *(pData + 2);
-    pTim->dtimPeriod	= *(pData + 3);
-    pTim->bmapControl	= *(pData + 4);
-
-    os_memoryCopy(pMlme->hOs, (void *)pTim->partialVirtualBmap, pData + 5, pTim->hdr[1] - 3);
-
-    *pReadLen = pTim->hdr[1] + 2;
-
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readCountry(mlme_t *pMlme,TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_COUNTRY_t *countryIE)
-{
-	TI_INT32 i, j;
-
-    countryIE->hdr[0] = *pData;
-    countryIE->hdr[1] = *(pData+1);
-
-    *pReadLen = countryIE->hdr[1] + 2;
-
-    if ((dataLen < 8) || (dataLen < (TI_UINT32)(countryIE->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    if (countryIE->hdr[1] > DOT11_COUNTRY_ELE_LEN_MAX)
-    {
-        TRACE2(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: country IE error: eleLen=%d, maxLen=%d\n", countryIE->hdr[1], DOT11_COUNTRY_ELE_LEN_MAX);
-        return TI_NOK;
-    }
-
-    os_memoryCopy(pMlme->hOs,&(countryIE->countryIE.CountryString), pData+2, DOT11_COUNTRY_STRING_LEN);
-
-	/* Loop on all tripletChannels. Each item has three fields ('i' counts rows and 'j' counts bytes). */
-	for (i = 0, j = 0;  j < (countryIE->hdr[1] - DOT11_COUNTRY_STRING_LEN);  i++, j+=3)
-	{
-		countryIE->countryIE.tripletChannels[i].firstChannelNumber	= *(pData + j + 5);
-		countryIE->countryIE.tripletChannels[i].numberOfChannels	= *(pData + j + 6);
-		countryIE->countryIE.tripletChannels[i].maxTxPowerLevel		= *(pData + j + 7);
-	}
-
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readWMEParams(mlme_t *pMlme,TI_UINT8 *pData, TI_UINT32 dataLen, 
-								   TI_UINT32 *pReadLen, dot11_WME_PARAM_t *pWMEParamIE, 
-								   assocRsp_t *assocRsp)
-{
-	TI_UINT8 ieSubtype;
-	TI_UINT8 ac;
-
-	/* Note:  This function actually reads either the WME-Params IE or the WME-Info IE! */
-
-	pWMEParamIE->hdr[0] = *pData;
-	pWMEParamIE->hdr[1] = *(pData+1);
-
-	*pReadLen = pWMEParamIE->hdr[1] + 2;
-
-	if (dataLen < *pReadLen)
-	{
-		TRACE2(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: WME Parameter: eleLen=%d is too long (%d)\n", *pReadLen, dataLen);
-		*pReadLen = dataLen;
-		return TI_NOK;
-	}
-
-	if ((pWMEParamIE->hdr[1]> WME_TSPEC_IE_LEN) || (pWMEParamIE->hdr[1]< DOT11_WME_ELE_LEN))
-	{
-        TRACE1(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: WME Parameter IE error: eleLen=%d\n", pWMEParamIE->hdr[1]);
-		return TI_NOK;
-	}
-
-	ieSubtype = *((TI_UINT8*)(pData+6));
-	switch (ieSubtype)
-	{
-		case dot11_WME_OUI_SUB_TYPE_IE:
-		case dot11_WME_OUI_SUB_TYPE_PARAMS_IE:
-			/* Checking WME Version validity */
-			if (*((TI_UINT8*)(pData+7)) != dot11_WME_VERSION )
-			{
-				TRACE1(pMlme->hReport, REPORT_SEVERITY_INFORMATION, "MLME_PARSER: WME Parameter IE error: Version =%d is unsupported\n",								  *((TI_UINT8*)(pData+7)) );
-				return TI_NOK;
-			}
-
-			/* 
-			 * Copy either the WME-Params IE or the WME-Info IE (Info is a subset of Params)!
-			 * 
-			 * Note that the WME_ACParameteres part is copied separately for two reasons:
-			 *	1) It exists only in the WME-Params IE.
-			 *	2) There is a gap of 2 bytes before the WME_ACParameteres if OS_PACKED is not supported.
-			 */
-			os_memoryCopy(pMlme->hOs,&(pWMEParamIE->OUI), pData+2, 8);
-		
-			if ( *((TI_UINT8*)(pData+6)) == dot11_WME_OUI_SUB_TYPE_PARAMS_IE )
-			{
-				os_memoryCopy(pMlme->hOs,&(pWMEParamIE->WME_ACParameteres), pData+10, pWMEParamIE->hdr[1] - 8);
-			}
-
-			break;
-
-		case WME_TSPEC_IE_OUI_SUB_TYPE:
-			/* Read renegotiated TSPEC parameters */
-			if (assocRsp == NULL) 
-			{
-TRACE0(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: WME Parameter IE error: TSPEC Sub Type in beacon or probe resp\n");
-				return TI_NOK;
-			}
-
-			ac = WMEQosTagToACTable [ GET_USER_PRIORITY_FROM_WME_TSPEC_IE(pData) ];
-
-			if (ac == QOS_AC_VO)
-			{
-				assocRsp->tspecVoiceParameters = pData;
-			}
-			else if (ac == QOS_AC_VI)
-			{
-				assocRsp->tspecSignalParameters = pData;
-			}
-			break;
-
-		default:
-			/* Checking OUI Sub Type validity */
-TRACE1(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: WME Parameter IE error: Sub Type =%d is invalid\n",							  ieSubtype);
-			return TI_NOK;
-	}
-    return TI_OK;
-}
-
-
-static TI_UINT32 mlmeParser_getWSCReadLen(TI_UINT8 *pData)
-{
-    return *(pData+1) + 2;
-}
-
-
-static TI_STATUS mlmeParser_readWSCParams(mlme_t *pMlme,TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_WSC_t *pWSC_IE)
-{
-	pWSC_IE->hdr[0] = *pData;
-	pWSC_IE->hdr[1] = *(pData+1);
-
-    *pReadLen = pWSC_IE->hdr[1] + 2;
-
-    /* Length Sanity check of the WSC IE */
-	if ((dataLen < 8) || (dataLen < (TI_UINT32)(pWSC_IE->hdr[1] + 2)))
-    {
-        TRACE2(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: WSC Parameter IE error: dataLen=%d, pWSC_IE->hdr[1]=%d\n", dataLen, pWSC_IE->hdr[1]);
-		return TI_NOK;
-    }
-
-    /* Length Sanity check of the WSC IE */
-	if (pWSC_IE->hdr[1] > ( sizeof(dot11_WSC_t) - sizeof(dot11_eleHdr_t) ))
-    {
-        TRACE2(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: WSC Parameter IE error: eleLen=%d, maxLen=%d\n", pWSC_IE->hdr[1], ( sizeof(dot11_WSC_t) - sizeof(dot11_eleHdr_t) ));
-        return TI_NOK;
-    }
-    
-	/* Copy the WSC Params IE */
-	os_memoryCopy(pMlme->hOs,&(pWSC_IE->OUI), pData+2, pWSC_IE->hdr[1]);
-
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readQosCapabilityIE(mlme_t *pMlme,TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_QOS_CAPABILITY_IE_t *QosCapParams)
-{
-    QosCapParams->hdr[0] = *pData;
-    QosCapParams->hdr[1] = *(pData+1);
-
-    *pReadLen = QosCapParams->hdr[1] + 2;
-
-    if (dataLen < (TI_UINT32)(QosCapParams->hdr[1] + 2))
-    {
-        return TI_NOK;
-    }
-
-    if (QosCapParams->hdr[1] > DOT11_QOS_CAPABILITY_ELE_LEN)
-    {
-        TRACE2(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: QOS Capability  IE error: eleLen=%d, maxLen=%d\n", QosCapParams->hdr[1], DOT11_QOS_CAPABILITY_ELE_LEN);
-        return TI_NOK;
-    }
-
-   QosCapParams->QosInfoField = (*(pData+1));
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readHtCapabilitiesIE(mlme_t *pMlme,TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, Tdot11HtCapabilitiesUnparse *pHtCapabilities)
-{
-    pHtCapabilities->tHdr[0] = *pData;
-    pHtCapabilities->tHdr[1] = *(pData+1);
-
-    *pReadLen = pHtCapabilities->tHdr[1] + 2;
-
-    if (dataLen < (TI_UINT32)(pHtCapabilities->tHdr[1] + 2))
-    {
-        return TI_NOK;
-    }
-
-    if (pHtCapabilities->tHdr[1] != DOT11_HT_CAPABILITIES_ELE_LEN)
-    {
-        TRACE2(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: HT Capability IE error: eleLen=%d, expectedLen=%d\n", pHtCapabilities->tHdr[1], DOT11_HT_CAPABILITIES_ELE_LEN);
-        return TI_NOK;
-    }
-
-    os_memoryCopy(pMlme->hOs, (void*)pHtCapabilities->aHtCapabilitiesIe, pData + 2, pHtCapabilities->tHdr[1]);
-  
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readHtInformationIE(mlme_t *pMlme,TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, Tdot11HtInformationUnparse *pHtInformation)
-{
-    pHtInformation->tHdr[0] = *pData;
-    pHtInformation->tHdr[1] = *(pData+1);
-
-    *pReadLen = pHtInformation->tHdr[1] + 2;
-
-    if (dataLen < (TI_UINT32)(pHtInformation->tHdr[1] + 2))
-    {
-        return TI_NOK;
-    }
-
-    if (pHtInformation->tHdr[1] < DOT11_HT_INFORMATION_ELE_LEN)
-    {
-        TRACE2(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: HT Information IE error: eleLen=%d, minimum Len=%d\n", pHtInformation->tHdr[1], DOT11_HT_INFORMATION_ELE_LEN);
-        return TI_NOK;
-    }
-
-    os_memoryCopy(pMlme->hOs, (void*)pHtInformation->aHtInformationIe, pData + 2, pHtInformation->tHdr[1]);
-  
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readChallange(mlme_t *pMlme, TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_CHALLENGE_t *pChallange)
-{
-    if (dataLen < 2)
-    {
-        return TI_NOK;
-    }
-
-    pChallange->hdr[0] = *pData;
-    pChallange->hdr[1] = *(pData+1);
-    pData += 2;
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(pChallange->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    if (pChallange->hdr[1] > DOT11_CHALLENGE_TEXT_MAX)
-    {
-        return TI_NOK;
-    }
-
-    os_memoryCopy(pMlme->hOs, (void *)pChallange->text, pData, pChallange->hdr[1]);
-
-    *pReadLen = pChallange->hdr[1] + 2;
-
-    return TI_OK;
-}
-
-TI_STATUS mlmeParser_readRsnIe(mlme_t *pMlme, TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_RSN_t *pRsnIe)
-{
-    pRsnIe->hdr[0] = *pData;
-    pRsnIe->hdr[1] = *(pData+1);
-    pData += 2;
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(pRsnIe->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    os_memoryCopy(pMlme->hOs, (void *)pRsnIe->rsnIeData, pData, pRsnIe->hdr[1]);
-
-    *pReadLen = pRsnIe->hdr[1] + 2;
-
-    return TI_OK;
-}
-
-TI_STATUS mlmeParser_readPowerConstraint(mlme_t *pMlme,TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_POWER_CONSTRAINT_t *powerConstraintIE)
-{
-    powerConstraintIE->hdr[0] = *pData;
-    powerConstraintIE->hdr[1] = *(pData+1);
-
-    *pReadLen = powerConstraintIE->hdr[1] + 2;
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(powerConstraintIE->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    if (powerConstraintIE->hdr[1] > DOT11_POWER_CONSTRAINT_ELE_LEN)
-    {
-        return TI_NOK;
-    }
-
-    os_memoryCopy(pMlme->hOs,(void *)&(powerConstraintIE->powerConstraint), pData+2, powerConstraintIE->hdr[1]);
-
-    return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readChannelSwitch(mlme_t *pMlme,TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_CHANNEL_SWITCH_t *channelSwitch, TI_UINT8 channel)
-{
-    channelSwitch->hdr[0] = *pData++;
-    channelSwitch->hdr[1] = *pData++;
-
-    *pReadLen = channelSwitch->hdr[1] + 2;
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(channelSwitch->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    if (channelSwitch->hdr[1] > DOT11_CHANNEL_SWITCH_ELE_LEN)
-    {
-        return TI_NOK;
-    }
-
-    channelSwitch->channelSwitchMode = *pData++;
-    channelSwitch->channelNumber = *pData++;
-    channelSwitch->channelSwitchCount = *pData;
-
-
-	switchChannel_recvCmd(pMlme->hSwitchChannel, channelSwitch, channel);
-	return TI_OK;
-}
-
-TI_STATUS mlmeParser_readQuiet(mlme_t *pMlme,TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_QUIET_t *quiet)
-{
-    quiet->hdr[0] = *pData++;
-    quiet->hdr[1] = *pData++;
-
-    *pReadLen = quiet->hdr[1] + 2;
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(quiet->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    if (quiet->hdr[1] > DOT11_QUIET_ELE_LEN)
-    {
-        return TI_NOK;
-    }
-
-    quiet->quietCount = *pData++;
-    quiet->quietPeriod = *pData++;
-    quiet->quietDuration = *((TI_UINT16*)pData);
-    pData += sizeof(TI_UINT16);
-    quiet->quietOffset = *((TI_UINT16*)pData);
-
-	return TI_OK;
-}
-
-
-TI_STATUS mlmeParser_readTPCReport(mlme_t *pMlme,TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_TPC_REPORT_t *TPCReport)
-{
-    TPCReport->hdr[0] = *pData;
-    TPCReport->hdr[1] = *(pData+1);
-
-    *pReadLen = TPCReport->hdr[1] + 2;
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(TPCReport->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    if (TPCReport->hdr[1] > DOT11_TPC_REPORT_ELE_LEN)
-    {
-        return TI_NOK;
-    }
-
-    TPCReport->transmitPower = *(pData+2);
-
-    return TI_OK;
-}
-
-
-#ifdef XCC_MODULE_INCLUDED
-TI_STATUS mlmeParser_readCellTP(mlme_t *pMlme, TI_UINT8 *pData, TI_UINT32 dataLen, TI_UINT32 *pReadLen, dot11_CELL_TP_t *cellTP)
-{
-    TI_UINT8 XCC_OUI[] = XCC_OUI;
-
-    cellTP->hdr[0] = *pData++;
-    cellTP->hdr[1] = *pData++;
-
-    *pReadLen = cellTP->hdr[1] + 2;
-
-    if ((dataLen < 2) || (dataLen < (TI_UINT32)(cellTP->hdr[1] + 2)))
-    {
-        return TI_NOK;
-    }
-
-    if (cellTP->hdr[1] > DOT11_CELL_TP_ELE_LEN)
-    {
-        return TI_NOK;
-    }
-
-	os_memoryCopy(pMlme->hOs, (void*)cellTP->oui, pData, cellTP->hdr[1]);
-
-    if (os_memoryCompare(pMlme->hOs, (void*)cellTP->oui, XCC_OUI, 3) != 0)
-    {
-		return TI_NOK;
-    }
-
-    return TI_OK;
-}
-#endif
-
-#if CHECK_PARSING_ERROR_CONDITION_PRINT
-	#define CHECK_PARSING_ERROR_CONDITION(x, msg, bDump)	   \
-			if ((x)) \
-			{ \
-                TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, msg);    \
-                if (bDump) {\
-                    TRACE1(pHandle->hReport, REPORT_SEVERITY_ERROR, "Buff len = %d \n", packetLength);    \
-                    report_PrintDump (pPacketBody, packetLength); }\
-				return TI_NOK; \
-			}
-#else
-	#define CHECK_PARSING_ERROR_CONDITION(x, msg, bDump) \
-         if ((x)) return TI_NOK;
-#endif
-
-TI_STATUS mlmeParser_parseIEs(TI_HANDLE hMlme, 
-							  TI_UINT8 *pData,
-							  TI_INT32 bodyDataLen,
-							  mlmeIEParsingParams_t *params)
-{
-    dot11_eleHdr_t 		*pEleHdr;
-    TI_UINT32 			 readLen;
-	TI_STATUS			 status = TI_NOK;
-    TI_UINT8 			 rsnIeIdx = 0;
-    TI_UINT8 			 wpaIeOuiIe[4] = { 0x00, 0x50, 0xf2, 0x01};
-	beacon_probeRsp_t 	*frame = &(params->frame.content.iePacket);
-	mlme_t 				*pHandle = (mlme_t *)hMlme;
-#ifdef XCC_MODULE_INCLUDED
-	TI_BOOL				allowCellTP = TI_TRUE;
-#endif
-#if CHECK_PARSING_ERROR_CONDITION_PRINT
-	TI_INT32				packetLength = bodyDataLen;
-	TI_UINT8				*pPacketBody = pData;
-#endif
-
-	params->recvChannelSwitchAnnoncIE = TI_FALSE;
-
-	while (bodyDataLen > 1)
-	{
-		pEleHdr = (dot11_eleHdr_t *)pData;
-	
-#if CHECK_PARSING_ERROR_CONDITION_PRINT
-		/* CHECK_PARSING_ERROR_CONDITION(((*pEleHdr)[1] > (bodyDataLen - 2)), ("MLME_PARSER: IE %d with length %d out of bounds %d\n", (*pEleHdr)[0], (*pEleHdr)[1], (bodyDataLen - 2)), TI_TRUE); */
-		if ((*pEleHdr)[1] > (bodyDataLen - 2))
-		{
-			TRACE3(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: IE %d with length %d out of bounds %d\n", (*pEleHdr)[0], (*pEleHdr)[1], (bodyDataLen - 2));
-		
-			TRACE1(pHandle->hReport, REPORT_SEVERITY_ERROR, "Buff len = %d \n", packetLength);
-			report_PrintDump (pPacketBody, packetLength); 
-		}
-#endif
-        switch ((*pEleHdr)[0])
-		{
-		/* read SSID */
-		case SSID_IE_ID:
-			frame->pSsid = &params->ssid;
-			status = mlmeParser_readSsid(pHandle, pData, bodyDataLen, &readLen, frame->pSsid);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading SSID\n"),TI_TRUE);
-			break;
-		/* read rates */
-		case SUPPORTED_RATES_IE_ID:
-			frame->pRates = &params->rates;
-			status = mlmeParser_readRates(pHandle, pData, bodyDataLen, &readLen, frame->pRates);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading RATES\n"),TI_TRUE);
-			break;
-		case EXT_SUPPORTED_RATES_IE_ID:
-			frame->pExtRates = &params->extRates;
-			status = mlmeParser_readRates(pHandle, pData, bodyDataLen, &readLen, frame->pExtRates);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading EXT RATES\n"),TI_TRUE);
-			break;
-
-		case ERP_IE_ID:
-			status = mlmeParser_readERP(pHandle, pData, bodyDataLen, &readLen,
-										(TI_BOOL *)&frame->useProtection,
-										(EPreamble *)&frame->barkerPreambleMode);
-
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading ERP\n"),TI_TRUE);
-			break;
-		/* read FH parameter set */
-		case FH_PARAMETER_SET_IE_ID:
-			frame->pFHParamsSet = &params->fhParams;
-			status = mlmeParser_readFhParams(pHandle, pData, bodyDataLen, &readLen, frame->pFHParamsSet);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading FH parameters\n"),TI_TRUE);
-			break;
-		/* read DS parameter set */
-		case DS_PARAMETER_SET_IE_ID:
-			frame->pDSParamsSet = &params->dsParams;
-			status = mlmeParser_readDsParams(pHandle, pData, bodyDataLen, &readLen, frame->pDSParamsSet);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading DS parameters\n"),TI_TRUE);
-			if (RADIO_BAND_2_4_GHZ == params->band )
-			{
-				if (frame->pDSParamsSet->currChannel != params->rxChannel)
-				{
-					TRACE2(pHandle->hReport, REPORT_SEVERITY_ERROR, "Channel ERROR - incompatible channel source information: Frame=%d Vs Radio=%d.\nparser ABORTED!!!\n",
-						frame->pDSParamsSet->currChannel , params->rxChannel);
-
-					return TI_NOK;
-				}
-			}
-			break;
-		/* read CF parameter set */
-		case CF_PARAMETER_SET_IE_ID:
-			frame->pCFParamsSet = &params->cfParams;
-			status = mlmeParser_readCfParams(pHandle, pData, bodyDataLen, &readLen, frame->pCFParamsSet);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading CF parameters\n"),TI_TRUE);
-			break;
-		/* read IBSS parameter set */
-		case IBSS_PARAMETER_SET_IE_ID:
-			frame->pIBSSParamsSet = &params->ibssParams;
-			status = mlmeParser_readIbssParams(pHandle, pData, bodyDataLen, &readLen, frame->pIBSSParamsSet);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading IBSS parameters\n"),TI_TRUE);
-			break;
-
-		/* read TIM */
-		case TIM_IE_ID:
-			frame->pTIM = &params->tim;
-			status = mlmeParser_readTim(pHandle, pData, bodyDataLen, &readLen, frame->pTIM);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading TIM\n"),TI_TRUE);
-			break;
-
-		/* read Country */
-		case COUNTRY_IE_ID:
-			frame->country = &params->country;
-			status = mlmeParser_readCountry(pHandle, pData, bodyDataLen, &readLen, frame->country);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading country parameters\n"),TI_TRUE);
-			break;
-
-		/* read Power Constraint */
-		case POWER_CONSTRAINT_IE_ID:
-#ifdef XCC_MODULE_INCLUDED
-			allowCellTP = TI_FALSE;
-#endif
-			frame->powerConstraint = &params->powerConstraint;
-			status = mlmeParser_readPowerConstraint(pHandle, pData, bodyDataLen, &readLen, frame->powerConstraint);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading Power Constraint parameters\n"),TI_TRUE);
-			break;
-
-		/* read Channel Switch Mode */
-        case CHANNEL_SWITCH_ANNOUNCEMENT_IE_ID:
-            
-            frame->channelSwitch = &params->channelSwitch;
-
-            if (params->myBssid)
-			{   /* Ignore Switch Channel commands from non my BSSID */
-				params->recvChannelSwitchAnnoncIE = TI_TRUE;
-				status = mlmeParser_readChannelSwitch(pHandle, pData, bodyDataLen, &readLen, frame->channelSwitch, params->rxChannel);
-				if (status != TI_OK)
-				{
-					/*
-					 * PATCH for working with AP-DK 4.0.51 that use IE 37 (with length 20) for RSNE
-					 * Ignore the IE instead of rejecting the whole BUF (beacon or probe response)
-					 */
-                    TRACE0(pHandle->hReport, REPORT_SEVERITY_WARNING, "MLME_PARSER: error reading Channel Switch announcement parameters - ignore IE\n");
-				}
-			}
-			break;
-
-		/* read Quiet IE */
-		case QUIET_IE_ID:
-			frame->quiet = &params->quiet;
-			status = mlmeParser_readQuiet(pHandle, pData, bodyDataLen, &readLen, frame->quiet);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading Quiet parameters\n"),TI_TRUE);
-			break;
-
-		/* read TPC report IE */
-		case TPC_REPORT_IE_ID:
-			frame->TPCReport = &params->TPCReport;
-			status = mlmeParser_readTPCReport(pHandle, pData, bodyDataLen, &readLen, frame->TPCReport);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading TPC report parameters\n"),TI_TRUE);
-			break;
-
-		case XCC_EXT_1_IE_ID:
-			frame->pRsnIe   = &params->rsnIe[0];
-			status = mlmeParser_readRsnIe(pHandle, pData, bodyDataLen, &readLen, &params->rsnIe[rsnIeIdx]);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading RSN IE\n"),TI_TRUE);
-
-			frame->rsnIeLen += readLen;
-			rsnIeIdx ++;
-			break;
-
-		case RSN_IE_ID:
-			frame->pRsnIe = &params->rsnIe[0];
-			status = mlmeParser_readRsnIe(pHandle, pData, bodyDataLen, &readLen, &params->rsnIe[rsnIeIdx]);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading RSN IE\n"),TI_TRUE);
-
-			frame->rsnIeLen += readLen;
-			rsnIeIdx ++;
-			break;
-
-		case DOT11_QOS_CAPABILITY_ELE_ID:
-			frame->QoSCapParameters = &params->QosCapParams;
-			status = mlmeParser_readQosCapabilityIE(pHandle, pData, bodyDataLen, &readLen, &params->QosCapParams);
-			CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading QOS CapabilityIE\n"),TI_TRUE);
-			break;
-
-	case HT_CAPABILITIES_IE_ID:
-		frame->pHtCapabilities = &params->tHtCapabilities;
-		status = mlmeParser_readHtCapabilitiesIE(pHandle, pData, bodyDataLen, &readLen, &params->tHtCapabilities);
-		CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading HT Capabilitys IE\n"),TI_TRUE);
-		break;
-
-	case HT_INFORMATION_IE_ID:
-		frame->pHtInformation = &params->tHtInformation;
-		status = mlmeParser_readHtInformationIE(pHandle, pData, bodyDataLen, &readLen, &params->tHtInformation);
-		CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading HT Information IE\n"),TI_TRUE);
-		break;
-
-		case WPA_IE_ID:
-			if (!os_memoryCompare(pHandle->hOs, pData+2, wpaIeOuiIe, 3))
-			{
-				/* Note : WSC, WPA and WME use the same OUI */
-				/*  Its assumes that:
-						WPA uses OUI Type with value  - 1
-						WME uses OUI Type with value  - 2
-						WSC uses OUI Type with value  - 4
-				*/
-
-				/* Check the OUI sub Type to verify whether this is a WSC IE, WME IE or WPA IE*/
-				if( (*(TI_UINT8*)(pData+5)) == dot11_WPA_OUI_TYPE)
-				{
-					/* If we are here - the following is WPA IE */
-					frame->pRsnIe = &params->rsnIe[0];
-					status = mlmeParser_readRsnIe(pHandle, pData, bodyDataLen,
-												  &readLen, &params->rsnIe[rsnIeIdx]);
-					frame->rsnIeLen += readLen;
-					rsnIeIdx ++;
-
-					CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading RSN IE\n"),TI_TRUE);
-				}
-				if( ( (*(TI_UINT8*)(pData+5)) == dot11_WME_OUI_TYPE ) && 
-					( ( (*(TI_UINT8*)(pData+6)) == dot11_WME_OUI_SUB_TYPE_PARAMS_IE) ||
-					  ( (*(TI_UINT8*)(pData+6)) == dot11_WME_OUI_SUB_TYPE_IE) ) )
-				{
-					/* If we are here - the following is WME-Params IE, WME-Info IE or TSPEC IE. */
-					/* Note that we are using the WMEParams struct also to hold the WME-Info IE
-					     which is a subset of WMEParams, and only one of them is sent in a frame. */
-					frame->WMEParams = &params->WMEParams;
-					status = mlmeParser_readWMEParams(pHandle, pData, bodyDataLen, &readLen, frame->WMEParams, NULL);
-					
-					CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading WME params\n"),TI_TRUE);
-				}
-				if( ( (*(TI_UINT8*)(pData+5)) == dot11_WSC_OUI_TYPE ))
-				{
-					/* If we are here - the following is WSC IE */
-                    readLen = mlmeParser_getWSCReadLen (pData);
-                    /* 
-                     * This IE is not supposed to be found in beacons accroding to the standard
-                     * definition. However, some APs do add it to beacons. It is read from beacons
-                     * accroding to a registry key (which is false by default). Even if it is not
-                     * read, the readLen must be set for the pointer to advance, which is done
-                     * above.
-                     */
-                    if ((BEACON != params->frame.subType) || (TI_TRUE == pHandle->bParseBeaconWSC))
-                    {
-					frame->WSCParams = &params->WSCParams;
-					status = mlmeParser_readWSCParams(pHandle, pData, bodyDataLen, &readLen, frame->WSCParams);
-					CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading WSC params\n"),TI_TRUE);
-				}
-                }
-				else
-				{
-					/* Unrecognized OUI type */
-					readLen = (*pEleHdr)[1] + 2;
-				}
-			}
-			else
-			{
-				readLen = (*pEleHdr)[1] + 2;
-			}
-
-			break;
-
-#ifdef XCC_MODULE_INCLUDED
-		case CELL_POWER_IE:
-			/* We mustn't take the Cell Transmit Power IE into account if */
-			/* there's a Power Constraint IE. Since the IEs must be in increasing */
-			/* order, it's enough to perform the check here, because if the Power */
-			/* Constraint IE is present it must have already been processed. */ 
-			if (allowCellTP)
-			{
-				frame->cellTP = &params->cellTP;
-				status = mlmeParser_readCellTP(pHandle, pData, bodyDataLen, &readLen, frame->cellTP);
-				CHECK_PARSING_ERROR_CONDITION((status != TI_OK), ("MLME_PARSER: error reading Cell Transmit Power params.\n"),TI_TRUE);
-			}
-			break;
-#endif
-
-		default:
-			TRACE1(pHandle->hReport, REPORT_SEVERITY_INFORMATION, "MLME_PARSER: unknown IE found (%d)\n", pData[0]);
-			readLen = pData[1] + 2;
-			status = TI_OK;
-			os_memoryCopy( pHandle->hOs,
-				       &params->unknownIe[params->frame.content.iePacket.unknownIeLen],
-				       pData, readLen );
-			params->frame.content.iePacket.pUnknownIe = params->unknownIe;
-			params->frame.content.iePacket.unknownIeLen += readLen;
-			break;
-		}
-		pData += readLen;
-		bodyDataLen -= readLen;
-#if CHECK_PARSING_ERROR_CONDITION_PRINT
-		/* CHECK_PARSING_ERROR_CONDITION((bodyDataLen < 0), ("MLME_PARSER: negative bodyDataLen %d bytes\n", bodyDataLen),TI_TRUE); */
-		if (bodyDataLen < 0)
-		{
-			TRACE1(pHandle->hReport, REPORT_SEVERITY_ERROR, "MLME_PARSER: negative bodyDataLen %d bytes\n", bodyDataLen);
-			TRACE1(pHandle->hReport, REPORT_SEVERITY_ERROR, "Buff len = %d \n", packetLength);
-			report_PrintDump (pPacketBody, packetLength);
-		}
-#endif
-	}
-	return TI_OK;
-}
-
-mlmeIEParsingParams_t *mlmeParser_getParseIEsBuffer(TI_HANDLE *hMlme)
-{
-	return (&(((mlme_t *)hMlme)->tempFrameInfo));
-}
-
-
-/**
-*
-* parseIeBuffer  - Parse a required information element.
-*
-* \b Description: 
-*
-* Parse an required information element
-* and returns a pointer to the IE.
- * If given a matching buffer as well, returns a pointer to the first IE 
- * that matches the IE ID and the given buffer.
-*
-* \b ARGS:
-*
-*  I   - hOs - pointer to OS context
-*  I   - pIeBuffer - pointer to the IE buffer  \n
-*  I   - length - the length of the whole buffer
-*  I   - desiredIeId - the desired IE ID 
-*  O   - pDesiredIe - a pointer to the desired IE
-*  I   - pMatchBuffer - a matching buffer in the IE buffer. Optional, if not required a NULL can be given. 
-*  I   - matchBufferLen - the matching buffer length. Optional, if not required zero can be given. 
-*  
-*  
-* \b RETURNS:
-*
-* TI_TRUE if IE pointer was found, TI_FALSE on failure. 
-*
-* \sa 
-*/
-TI_BOOL mlmeParser_ParseIeBuffer (TI_HANDLE hMlme, TI_UINT8 *pIeBuffer, TI_UINT32 length, TI_UINT8 desiredIeId, TI_UINT8 **pDesiredIe, TI_UINT8 *pMatchBuffer, TI_UINT32 matchBufferLen)
-{
-    mlme_t  		 *pMlme = (mlme_t *)hMlme;
-    dot11_eleHdr_t   *eleHdr;
-    TI_UINT8         *pCurIe;
-
-
-    if (pDesiredIe!=NULL)
-    {
-        *pDesiredIe = NULL;
-    }
-
-    if ((pIeBuffer == NULL) || (length==0))
-    {
-       return TI_FALSE;    
-    }
-
-    pCurIe = pIeBuffer;
-    
-    while (length>0)
-    {
-        eleHdr = (dot11_eleHdr_t*)pCurIe;
-        
-        if ((TI_UINT8)length < ((*eleHdr)[1] + 2))
-        {
-            return TI_FALSE;
-        }
-        
-        if ((*eleHdr)[0] == desiredIeId)
-        {
-            if ((matchBufferLen==0) || (pMatchBuffer == NULL) ||
-                (!os_memoryCompare(pMlme->hOs, &pCurIe[2], pMatchBuffer, matchBufferLen)))
-            {
-                if (pDesiredIe!=NULL)
-                {
-                    *pDesiredIe = (TI_UINT8*)eleHdr;
-                }
-                return TI_TRUE;
-            }
-
-        }
-        length -= (*eleHdr)[1] + 2;
-        pCurIe += (*eleHdr)[1] + 2;
-    }
-
-    return TI_FALSE;
-}
-
-
diff --git a/wl1271/stad/src/Sta_Management/mlmeParser.h b/wl1271/stad/src/Sta_Management/mlmeParser.h
deleted file mode 100644
index 17145c9..0000000
--- a/wl1271/stad/src/Sta_Management/mlmeParser.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * mlmeParser.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- /** \file mlmeBuilder.h
- *  \brief 802.11 MLME Builder
- *
- *  \see mlmeBuilder.c
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	mlmeBuilder.h											   */
-/*    PURPOSE:	802.11 MLME Builder										   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _MLME_PARSER_H
-#define _MLME_PARSER_H
-
-#include "802_11Defs.h"
-#include "paramOut.h"
-#include "mlmeApi.h"
-#include "mlmeSm.h"
-
-/* Constants */
-
-#define FRAME_CTRL_PROTOCOL_VERSION_MASK	0x03
-#define FRAME_CTRL_TYPE_MASK				0x0C
-#define FRAME_CTRL_SUB_TYPE_MASK			0xF0
-
-/* Enumerations */
-
-/* state machine states */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS mlmeParser_getFrameType(mlme_t *pMlme, 
-							   TI_UINT16* pFrameCtrl, 
-							   dot11MgmtSubType_e *pType);
-
-TI_STATUS mlmeParser_readRates(mlme_t *pMlme, 
-							TI_UINT8 *pData, 
-							TI_UINT32 dataLen, 
-							TI_UINT32 *pReadLen, 
-							dot11_RATES_t *pRates);
-
-TI_STATUS mlmeParser_readERP(mlme_t *pMlme,
-                             TI_UINT8 *pData,
-                             TI_UINT32 dataLen,
-                             TI_UINT32 *pReadLen,
-                             TI_BOOL *useProtection,
-                             EPreamble *barkerPreambleMode);
-
-TI_STATUS mlmeParser_readSsid(mlme_t *pMlme, 
-						   TI_UINT8 *pData, 
-						   TI_UINT32 dataLen, 
-						   TI_UINT32 *pReadLen, 
-						   dot11_SSID_t *pSsid);
-
-TI_STATUS mlmeParser_readFhParams(mlme_t *pMlme, 
-							   TI_UINT8 *pData, 
-							   TI_UINT32 dataLen, 
-							   TI_UINT32 *pReadLen, 
-							   dot11_FH_PARAMS_t *pFhParams);
-
-TI_STATUS mlmeParser_readDsParams(mlme_t *pMlme, 
-							   TI_UINT8 *pData, 
-							   TI_UINT32 dataLen, 
-							   TI_UINT32 *pReadLen, 
-							   dot11_DS_PARAMS_t *pDsParams);
-
-TI_STATUS mlmeParser_readCfParams(mlme_t *pMlme, 
-							   TI_UINT8 *pData, 
-							   TI_UINT32 dataLen, 
-							   TI_UINT32 *pReadLen, 
-							   dot11_CF_PARAMS_t *pCfParams);
-
-TI_STATUS mlmeParser_readIbssParams(mlme_t *pMlme, 
-								 TI_UINT8 *pData, 
-								 TI_UINT32 dataLen, 
-								 TI_UINT32 *pReadLen, 
-								 dot11_IBSS_PARAMS_t *pIbssParams);
-
-TI_STATUS mlmeParser_readTim(mlme_t *pMlme, 
-						  TI_UINT8 *pData, 
-						  TI_UINT32 dataLen, 
-						  TI_UINT32 *pReadLen, 
-						  dot11_TIM_t *pTim);
-
-TI_STATUS mlmeParser_readCountry(mlme_t *pMlme,
-								 TI_UINT8 *pData,
-								 TI_UINT32 dataLen,
-								 TI_UINT32 *pReadLen,
-								 dot11_COUNTRY_t *countryIE);
-
-TI_STATUS mlmeParser_readWMEParams(mlme_t *pMlme,
-								   TI_UINT8 *pData,
-								   TI_UINT32 dataLen,
-								   TI_UINT32 *pReadLen,
-								   dot11_WME_PARAM_t *pWMEParamIE, 
-								   assocRsp_t *assocRsp);
-
-TI_STATUS mlmeParser_readPowerConstraint(mlme_t *pMlme,
-										 TI_UINT8 *pData,
-										 TI_UINT32 dataLen,
-										 TI_UINT32 *pReadLen,
-										 dot11_POWER_CONSTRAINT_t *powerConstraintIE);
-
-TI_STATUS mlmeParser_readChannelSwitch(mlme_t *pMlme,
-									   TI_UINT8 *pData,
-									   TI_UINT32 dataLen,
-									   TI_UINT32 *pReadLen,
-									   dot11_CHANNEL_SWITCH_t *channelSwitch,
-                                       TI_UINT8 channel);
-
-TI_STATUS mlmeParser_readTPCReport(mlme_t *pMlme,
-								   TI_UINT8 *pData,
-								   TI_UINT32 dataLen,
-								   TI_UINT32 *pReadLen,
-								   dot11_TPC_REPORT_t	*TPCReport);
-
-#ifdef XCC_MODULE_INCLUDED
-TI_STATUS mlmeParser_readCellTP(mlme_t *pMlme, 
-								TI_UINT8 *pData, 
-								TI_UINT32 dataLen, 
-								TI_UINT32 *pReadLen, 
-								dot11_CELL_TP_t *cellTP);
-#endif
-
-TI_STATUS mlmeParser_readQuiet(mlme_t *pMlme,
-							   TI_UINT8 *pData,
-							   TI_UINT32 dataLen,
-							   TI_UINT32 *pReadLen,
-							   dot11_QUIET_t *quiet);
-
-TI_STATUS mlmeParser_readChallange(mlme_t *pMlme, 
-								TI_UINT8 *pData, 
-								TI_UINT32 dataLen, 
-								TI_UINT32 *pReadLen, 
-								dot11_CHALLENGE_t *pChallange);
-
-
-TI_STATUS mlmeParser_readRsnIe(mlme_t *pMlme, 
-                               TI_UINT8 *pData, 
-                               TI_UINT32 dataLen, 
-                               TI_UINT32 *pReadLen, 
-                               dot11_RSN_t *pRsnIe);
-
-TI_STATUS mlmeParser_readQosCapabilityIE(mlme_t *pMlme,
-										 TI_UINT8 *pData, 
-										 TI_UINT32 dataLen, 
-										 TI_UINT32 *pReadLen, 
-										 dot11_QOS_CAPABILITY_IE_t *QosCapParams);
-
-TI_STATUS mlmeParser_readHtCapabilitiesIE (mlme_t *pMlme,
-										  TI_UINT8 *pData, 
-										  TI_UINT32 dataLen, 
-										  TI_UINT32 *pReadLen, 
-										  Tdot11HtCapabilitiesUnparse *pHtCapabilities);
-
-TI_STATUS mlmeParser_readHtInformationIE (mlme_t *pMlme,
-                                          TI_UINT8 *pData, 
-                                          TI_UINT32 dataLen, 
-                                          TI_UINT32 *pReadLen, 
-                                          Tdot11HtInformationUnparse *pHtInformation);
-
-
-#endif
-
diff --git a/wl1271/stad/src/Sta_Management/mlmeSm.c b/wl1271/stad/src/Sta_Management/mlmeSm.c
deleted file mode 100644
index 35131fb..0000000
--- a/wl1271/stad/src/Sta_Management/mlmeSm.c
+++ /dev/null
@@ -1,714 +0,0 @@
-/*
- * mlmeSm.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file mlmeSM.c
- *  \brief 802.11 MLME SM source
- *
- *  \see mlmeSM.h
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*      MODULE: mlmeSM.c                                                   */
-/*    PURPOSE:  802.11 MLME SM source                                      */
-/*                                                                         */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_69
-#include "osApi.h"
-#include "paramOut.h"
-#include "fsm.h"
-#include "report.h"
-#include "smeApi.h"
-#include "AssocSM.h"
-#include "authSm.h"
-#include "mlmeBuilder.h"
-#include "mlmeSm.h"
-#include "openAuthSm.h"
-#include "sharedKeyAuthSm.h"
-#include "connApi.h"
-#include "DrvMainModules.h"
-
-
-#ifdef TI_DBG
-#include "siteMgrApi.h"
-#endif
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Global variables */
-
-/* Local function prototypes */
-static void mlme_stopAssocAndAuth(mlme_t *pMlme);
-
-/* functions */
-
-/**
-*
-* mlme_Create - allocate memory for MLME SM
-*
-* \b Description: 
-*
-* Allocate memory for MLME SM. \n
-*       Allocates memory for MLME context. \n
-*       Allocates memory for MLME timer. \n
-*       Allocates memory for MLME SM matrix. \n
-*
-* \b ARGS:
-*
-*  I   - pOs - OS context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_mainSecSmKeysOnlyStop()
-*/
-TI_HANDLE mlme_create(TI_HANDLE hOs)
-{
-    mlme_t  *pHandle;
-    TI_STATUS       status;
-
-    /* allocate MLME context memory */
-    pHandle = (mlme_t*)os_memoryAlloc(hOs, sizeof(mlme_t));
-    if (pHandle == NULL)
-    {
-        return NULL;
-    }
-
-    /* zero all MLME context */
-    os_memoryZero(hOs, pHandle, sizeof(mlme_t));
-
-    pHandle->hOs = hOs;
-
-    /* allocate memory for MLME state machine */
-    status = fsm_Create(hOs, &pHandle->pMlmeSm, MLME_SM_NUM_STATES, MLME_SM_NUM_EVENTS);
-    if (status != TI_OK)
-    {
-        os_memoryFree(hOs, pHandle, sizeof(mlme_t));
-        return NULL;
-    }
-
-    return pHandle;
-}
-
-
-/**
-*
-* mlme_Unload - unload MLME SM from memory
-*
-* \b Description: 
-*
-* Unload MLME SM from memory
-*
-* \b ARGS:
-*
-*  I   - hMlme - MLME SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa rsn_mainSecSmKeysOnlyStop()
-*/
-TI_STATUS mlme_unload(TI_HANDLE hMlme)
-{
-    TI_STATUS       status;
-    mlme_t      *pHandle;
-
-    pHandle = (mlme_t*)hMlme;
-
-    status = fsm_Unload(pHandle->hOs, pHandle->pMlmeSm);
-    if (status != TI_OK)
-    {
-        /* report failure but don't stop... */
-    }
-    
-    os_memoryFree(pHandle->hOs, hMlme, sizeof(mlme_t));
-
-    return TI_OK;
-}
-
-/**
-*
-* mlme_smConfig - configure a new MLME SM
-*
-* \b Description: 
-*
-* Configure a new MLME SM and other modules handles.
-*
-* \b RETURNS:
-*
-*  void
-*
-* \sa mlme_Create, mlme_Unload
-*/
-void mlme_init (TStadHandlesList *pStadHandles)
-{
-    mlme_t *pHandle = (mlme_t *)(pStadHandles->hMlmeSm);
-    
-    /** Main 802.1X State Machine matrix */
-    fsm_actionCell_t    mlme_smMatrix[MLME_SM_NUM_STATES][MLME_SM_NUM_EVENTS] =
-    {
-        /* next state and actions for IDLE state */
-        {{MLME_SM_STATE_AUTH_WAIT, (fsm_Action_t)mlme_smStartIdle},             /* MLME_SM_EVENT_START */
-         {MLME_SM_STATE_IDLE, (fsm_Action_t)mlme_smNOP},                     /* MLME_SM_EVENT_STOP  */
-         {MLME_SM_STATE_IDLE, (fsm_Action_t)mlme_smActionUnexpected},       /* MLME_SM_EVENT_AUTH_SUCCESS */
-         {MLME_SM_STATE_IDLE, (fsm_Action_t)mlme_smActionUnexpected},       /* MLME_SM_EVENT_AUTH_FAIL */
-         {MLME_SM_STATE_IDLE, (fsm_Action_t)mlme_smActionUnexpected},       /* MLME_SM_EVENT_ASSOC_SUCCESS */
-         {MLME_SM_STATE_IDLE, (fsm_Action_t)mlme_smActionUnexpected}        /* MLME_SM_EVENT_ASSOC_FAIL */
-        },
-        /* next state and actions for AUTH_WAIT state */
-        {{MLME_SM_STATE_AUTH_WAIT, (fsm_Action_t)mlme_smActionUnexpected},      /* MLME_SM_EVENT_START */
-         {MLME_SM_STATE_IDLE, (fsm_Action_t)mlme_smNOP},                       /* MLME_SM_EVENT_STOP  */
-         {MLME_SM_STATE_ASSOC_WAIT, (fsm_Action_t)mlme_smAuthSuccessAuthWait},  /* MLME_SM_EVENT_AUTH_SUCCESS */
-         {MLME_SM_STATE_IDLE, (fsm_Action_t)mlme_smAuthFailAuthWait},           /* MLME_SM_EVENT_AUTH_FAIL */
-         {MLME_SM_STATE_AUTH_WAIT, (fsm_Action_t)mlme_smActionUnexpected},      /* MLME_SM_EVENT_ASSOC_SUCCESS */
-         {MLME_SM_STATE_AUTH_WAIT, (fsm_Action_t)mlme_smActionUnexpected}       /* MLME_SM_EVENT_ASSOC_FAIL */
-        },
-        /* next state and actions for ASSOC_WAIT state */
-        {{MLME_SM_STATE_ASSOC_WAIT, (fsm_Action_t)mlme_smActionUnexpected}, /* MLME_SM_EVENT_START */
-         {MLME_SM_STATE_IDLE, (fsm_Action_t)mlme_smStopAssocWait},          /* MLME_SM_EVENT_STOP  */
-         {MLME_SM_STATE_ASSOC_WAIT, (fsm_Action_t)mlme_smActionUnexpected}, /* MLME_SM_EVENT_AUTH_SUCCESS */
-         {MLME_SM_STATE_ASSOC_WAIT, (fsm_Action_t)mlme_smActionUnexpected}, /* MLME_SM_EVENT_AUTH_FAIL */
-         {MLME_SM_STATE_ASSOC, (fsm_Action_t)mlme_smAssocSuccessAssocWait}, /* MLME_SM_EVENT_ASSOC_SUCCESS */
-         {MLME_SM_STATE_IDLE, (fsm_Action_t)mlme_smAssocFailAssocWait}      /* MLME_SM_EVENT_ASSOC_FAIL */
-        },
-        /* next state and actions for ASSOC state */
-        {{MLME_SM_STATE_ASSOC, (fsm_Action_t)mlme_smActionUnexpected},  /* MLME_SM_EVENT_START */
-         {MLME_SM_STATE_IDLE, (fsm_Action_t)mlme_smStopAssoc},          /* MLME_SM_EVENT_STOP  */
-         {MLME_SM_STATE_ASSOC, (fsm_Action_t)mlme_smActionUnexpected},  /* MLME_SM_EVENT_AUTH_SUCCESS */
-         {MLME_SM_STATE_ASSOC, (fsm_Action_t)mlme_smActionUnexpected},  /* MLME_SM_EVENT_AUTH_FAIL */
-         {MLME_SM_STATE_ASSOC, (fsm_Action_t)mlme_smActionUnexpected},  /* MLME_SM_EVENT_ASSOC_SUCCESS */
-         {MLME_SM_STATE_ASSOC, (fsm_Action_t)mlme_smActionUnexpected}   /* MLME_SM_EVENT_ASSOC_FAIL */
-        }
-    };
-    
-    fsm_Config(pHandle->pMlmeSm, &mlme_smMatrix[0][0], MLME_SM_NUM_STATES, MLME_SM_NUM_EVENTS, mlme_smEvent, pStadHandles->hOs);
-    
-    pHandle->currentState = MLME_SM_STATE_IDLE;
-    pHandle->legacyAuthType = AUTH_LEGACY_NONE;
-    pHandle->reAssoc = TI_FALSE;
-    pHandle->disConnType = DISCONNECT_IMMEDIATE;
-    pHandle->disConnReason = STATUS_UNSPECIFIED;
-    
-    pHandle->hAssoc            = pStadHandles->hAssoc;
-    pHandle->hAuth             = pStadHandles->hAuth;
-    pHandle->hSiteMgr          = pStadHandles->hSiteMgr;
-    pHandle->hCtrlData         = pStadHandles->hCtrlData;
-    pHandle->hTxMgmtQ          = pStadHandles->hTxMgmtQ;
-    pHandle->hMeasurementMgr   = pStadHandles->hMeasurementMgr;
-    pHandle->hSwitchChannel    = pStadHandles->hSwitchChannel;
-    pHandle->hRegulatoryDomain = pStadHandles->hRegulatoryDomain;
-    pHandle->hReport           = pStadHandles->hReport;
-    pHandle->hOs               = pStadHandles->hOs;
-    pHandle->hConn             = pStadHandles->hConn;
-    pHandle->hCurrBss          = pStadHandles->hCurrBss;
-    pHandle->hApConn           = pStadHandles->hAPConnection;
-    pHandle->hScanCncn         = pStadHandles->hScanCncn;
-    pHandle->hQosMngr          = pStadHandles->hQosMngr;
-    pHandle->hTWD              = pStadHandles->hTWD;
-    pHandle->hTxCtrl           = pStadHandles->hTxCtrl;
-
-    /*
-    debug info
-    */
-    pHandle->debug_lastProbeRspTSFTime = 0;
-    pHandle->debug_lastDtimBcnTSFTime = 0;
-    pHandle->debug_lastBeaconTSFTime = 0;
-    pHandle->debug_isFunctionFirstTime = TI_TRUE;
-    pHandle->BeaconsCounterPS = 0;
-}
-
-void mlme_SetDefaults (TI_HANDLE hMlmeSm, TMlmeInitParams *pMlmeInitParams)
-{
-    mlme_t *pMlme = (mlme_t *)(hMlmeSm);
-
-    /* set default values */
-    pMlme->bParseBeaconWSC = pMlmeInitParams->parseWSCInBeacons;
-}
-
-TI_STATUS mlme_setParam(TI_HANDLE           hMlmeSm,
-                        paramInfo_t         *pParam)
-{
-    mlme_t *pMlmeSm = (mlme_t *)hMlmeSm;
-
-    switch(pParam->paramType)
-    {
-    case MLME_LEGACY_TYPE_PARAM:
-
-        switch (pParam->content.mlmeLegacyAuthType)
-        {
-        case AUTH_LEGACY_RESERVED1:
-        case AUTH_LEGACY_OPEN_SYSTEM:
-            /* First configure the MLME with the new legacy authentication type */
-            pMlmeSm->legacyAuthType = pParam->content.mlmeLegacyAuthType;
-            /* Now configure the authentication module. */
-            pParam->paramType = AUTH_LEGACY_TYPE_PARAM;
-            return auth_setParam(pMlmeSm->hAuth, pParam);
-
-        case AUTH_LEGACY_SHARED_KEY:
-            /* First configure the MLME with the new legacy authentication type */
-            pMlmeSm->legacyAuthType = AUTH_LEGACY_SHARED_KEY;
-            /* Now configure the authentication module. */
-            pParam->paramType = AUTH_LEGACY_TYPE_PARAM;
-            return auth_setParam(pMlmeSm->hAuth, pParam);
-
-        case AUTH_LEGACY_AUTO_SWITCH:
-            /* First configure the MLME with the new legacy authentication type */
-            pMlmeSm->legacyAuthType = AUTH_LEGACY_AUTO_SWITCH;
-            /* Now configure the authentication module, 
-                Auto switch mode means start always with shared key, if fail move to open system. */
-            pParam->paramType = AUTH_LEGACY_TYPE_PARAM;
-            pParam->content.authLegacyAuthType = AUTH_LEGACY_SHARED_KEY;
-            return auth_setParam(pMlmeSm->hAuth, pParam);
-
-        default:
-            TRACE1(pMlmeSm->hReport, REPORT_SEVERITY_ERROR, "Set param, Params is not supported, 0x%x\n\n", pParam->content.mlmeLegacyAuthType);
-            return PARAM_VALUE_NOT_VALID;
-        }
-/*      break;  - unreachable */
-
-    case MLME_RE_ASSOC_PARAM:
-        pMlmeSm->reAssoc = pParam->content.mlmeReAssoc;
-        break;
-
-    default:
-        TRACE1(pMlmeSm->hReport, REPORT_SEVERITY_ERROR, "Set param, Params is not supported, 0x%x\n\n", pParam->paramType);
-        return PARAM_NOT_SUPPORTED;
-    }
-
-    return TI_OK;
-}
-
-TI_STATUS mlme_getParam(TI_HANDLE           hMlmeSm, 
-                        paramInfo_t         *pParam)
-{
-    mlme_t *pMlmeSm = (mlme_t *)hMlmeSm;
-
-    switch(pParam->paramType)
-    {
-    case MLME_LEGACY_TYPE_PARAM:
-        pParam->content.mlmeLegacyAuthType = pMlmeSm->legacyAuthType;           
-        break;
-
-    case MLME_CAPABILITY_PARAM:
-        pParam->content.mlmeLegacyAuthType = pMlmeSm->legacyAuthType;
-        assoc_smCapBuild(pMlmeSm->hAssoc, &(pParam->content.siteMgrSiteCapability));
-        break;
-
-    case MLME_BEACON_RECV:
-        pParam->content.siteMgrTiWlanCounters.BeaconsRecv = pMlmeSm->BeaconsCounterPS;
-        break;
-
-    default:
-        TRACE1(pMlmeSm->hReport, REPORT_SEVERITY_ERROR, "Get param, Params is not supported, %d\n\n", pParam->content.mlmeLegacyAuthType);
-        return PARAM_NOT_SUPPORTED;
-    }
-
-    return TI_OK;
-}
-
-/**
-*
-* mlme_Start - Start event for the MLME SM
-*
-* \b Description: 
-*
-* Start event for the MLME SM
-*
-* \b ARGS:
-*
-*  I   - hMlme - MLME SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa mlme_Stop, mlme_Recv
-*/
-TI_STATUS mlme_start(TI_HANDLE hMlme)
-{
-    TI_STATUS	status;
-    mlme_t		*pHandle = (mlme_t*)hMlme;
-
-    if (pHandle == NULL)
-    {
-        return TI_NOK;
-    }
-
-    if (pHandle->legacyAuthType == AUTH_LEGACY_NONE)
-    {
-        TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "mlme_start: pHandle->legacyAuthType == AUTH_LEGACY_NONE\n");
-        return TI_NOK;
-    }
-
-    status = mlme_smEvent(&pHandle->currentState, MLME_SM_EVENT_START, pHandle);
-
-    return status;
-}
-
-/**
-*
-* mlme_Stop - Stop event for the MLME SM
-*
-* \b Description: 
-*
-* Stop event for the MLME SM
-*
-* \b ARGS:
-*
-*  I   - hMlme - MLME SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa mlme_Start, mlme_Recv
-*/
-TI_STATUS mlme_stop(TI_HANDLE hMlme, DisconnectType_e disConnType, mgmtStatus_e reason)
-{
-    TI_STATUS       status;
-    mlme_t      *pHandle;
-
-    pHandle = (mlme_t*)hMlme;
-
-    if (pHandle->legacyAuthType == AUTH_LEGACY_NONE)
-        return TI_NOK;
-
-    pHandle->disConnType = disConnType;
-    pHandle->disConnReason = reason;
-
-    status = mlme_smEvent(&pHandle->currentState, MLME_SM_EVENT_STOP, pHandle);
-    
-    return status;
-}
-
-
-/**
-*
-* mlme_reportAuthStatus - Set a specific parameter to the MLME SM
-*
-* \b Description: 
-*
-* Set a specific parameter to the MLME SM.
-*
-* \b ARGS:
-*
-*  I   - hMlme - MLME SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa mlme_Start, mlme_Stop
-*/
-TI_STATUS mlme_reportAuthStatus(TI_HANDLE hMlme, TI_UINT16 status)
-{
-    mlme_t          *pHandle;
-    paramInfo_t     param;
-    TI_STATUS       fStatus;
-
-    pHandle = (mlme_t*)hMlme;
-
-    if (pHandle == NULL)
-        return TI_NOK;
- 
-    if (pHandle->legacyAuthType == AUTH_LEGACY_NONE)
-        return TI_NOK;
-
-    pHandle->mlmeData.uStatusCode = status;
-
-    /* If status is successful */
-    if (status == 0)
-    {
-        /* Mark a successful status - used for conn.c */
-        pHandle->mlmeData.mgmtStatus = STATUS_SUCCESSFUL;
-        fStatus = mlme_smEvent(&pHandle->currentState, MLME_SM_EVENT_AUTH_SUCCESS, pHandle);
-    } 
-    else 
-    {
-        /* Now, if the MLME legacy auth type is AUTO_SWITCH, and the Auth legacy auth type is shared key, 
-            we configure the auth SM to open system, otherwise, this is really an authentication failure. */
-        param.paramType = AUTH_LEGACY_TYPE_PARAM;
-        auth_getParam(pHandle->hAuth, &param);
-
-        if ((pHandle->legacyAuthType == AUTH_LEGACY_AUTO_SWITCH) && (param.content.authLegacyAuthType ==  AUTH_LEGACY_SHARED_KEY))
-        {
-            param.content.authLegacyAuthType = AUTH_LEGACY_OPEN_SYSTEM;
-            fStatus = auth_setParam(pHandle->hAuth, &param);
-            fStatus = auth_start(pHandle->hAuth);
-        }
-
-        else
-        {
-            pHandle->mlmeData.mgmtStatus = STATUS_AUTH_REJECT;
-            fStatus = mlme_smEvent(&pHandle->currentState, MLME_SM_EVENT_AUTH_FAIL, pHandle);
-        }
-
-    }
-
-    return fStatus;
-}
-
-/**
-*
-* mlme_reportAssocStatus - Set a specific parameter to the MLME SM
-*
-* \b Description: 
-*
-* Set a specific parameter to the MLME SM.
-*
-* \b ARGS:
-*
-*  I   - hMlme - MLME SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa mlme_Start, mlme_Stop
-*/
-TI_STATUS mlme_reportAssocStatus(TI_HANDLE hMlme, TI_UINT16 status)
-{
-    mlme_t      *pHandle;
-    TI_STATUS   fStatus;
-
-    pHandle = (mlme_t*)hMlme;
-
-    if (pHandle == NULL)
-        return TI_NOK;
-
-    if (pHandle->legacyAuthType == AUTH_LEGACY_NONE)
-        return TI_NOK;
-
-    pHandle->mlmeData.uStatusCode = status;
-
-    /* If status is successful */
-    if (status == 0)
-    {
-        pHandle->mlmeData.mgmtStatus = STATUS_SUCCESSFUL;
-        fStatus = mlme_smEvent(&pHandle->currentState, MLME_SM_EVENT_ASSOC_SUCCESS, pHandle);
-    } else 
-    {
-        pHandle->mlmeData.mgmtStatus = STATUS_ASSOC_REJECT;
-        fStatus = mlme_smEvent(&pHandle->currentState, MLME_SM_EVENT_ASSOC_FAIL, pHandle);
-    }
-
-    return fStatus;
-}
-
-
-/**
-*
-* mlme_SetParam - Set a specific parameter to the MLME SM
-*
-* \b Description: 
-*
-* Set a specific parameter to the MLME SM.
-*
-* \b ARGS:
-*
-*  I   - hMlme - MLME SM context  \n
-*  I/O - pParam - Parameter \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa mlme_Start, mlme_Stop
-*/
-TI_STATUS mlme_smEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hMlme)
-{
-   mlme_t *pMlme = (mlme_t *)hMlme;
-    TI_STATUS       status;
-    TI_UINT8        nextState;
-
-    status = fsm_GetNextState(pMlme->pMlmeSm, *currentState, event, &nextState);
-    if (status != TI_OK)
-    {
-        TRACE0(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_SM: ERROR - failed getting next state \n");
-
-        return(TI_NOK);
-    }
-
-	TRACE3( pMlme->hReport, REPORT_SEVERITY_INFORMATION, "mlme_smEvent: <currentState = %d, event = %d> --> nextState = %d\n", *currentState, event, nextState);
-
-    status = fsm_Event(pMlme->pMlmeSm, currentState, event, (void *)pMlme);
-
-    return(status);
-}
-
-/* state machine functions */
-
-TI_STATUS mlme_smStartIdle(mlme_t *pMlme)
-{
-    TI_STATUS       status;
-
-    status = auth_start(pMlme->hAuth);
-
-    return status;
-}
-
-TI_STATUS mlme_smClass3Idle(mlme_t *pMlme)
-{
-    return TI_OK;
-}
-
-
-
-TI_STATUS mlme_smAuthSuccessAuthWait(mlme_t *pMlme)
-{
-    TI_STATUS       status;
-
-    if (pMlme->reAssoc)
-    {
-        status = reassoc_start(pMlme->hAssoc);
-    }
-    else
-    {
-        status = assoc_start(pMlme->hAssoc);
-    }
-
-    return status;
-}
-
-TI_STATUS mlme_smAuthFailAuthWait(mlme_t *pMlme)
-{
-    TI_STATUS       status;
-
-    status = mlme_smReportStatus(pMlme);
-
-    return status;
-}
-
-TI_STATUS mlme_smStopAssocWait(mlme_t *pMlme)
-{
-    mlme_stopAssocAndAuth(pMlme);
-    return TI_OK;
-}
-
-TI_STATUS mlme_smAssocSuccessAssocWait(mlme_t *pMlme)
-{
-    TI_STATUS       status;
-
-    status = mlme_smReportStatus(pMlme);
-
-    return status;
-}
-
-TI_STATUS mlme_smAssocFailAssocWait(mlme_t *pMlme)
-{
-    TI_STATUS       status;
- 
-    status = mlme_smReportStatus(pMlme);
-
-    return status;
-}
-
-
-TI_STATUS mlme_smStopAssoc(mlme_t *pMlme)
-{
-    mlme_stopAssocAndAuth(pMlme);
-    return TI_OK;
-}
-
-
-
-TI_STATUS mlme_smNOP(mlme_t *pMlme)
-{
-    return TI_OK;
-}
-
-TI_STATUS mlme_smActionUnexpected(mlme_t *pMlme)
-{
-    return TI_OK;
-}
-
-/* local functions */
-
-TI_STATUS mlme_smReportStatus(mlme_t *pMlme)
-{
-    TI_STATUS       status;
-
-    if (pMlme == NULL)
-    {
-        return TI_NOK;
-    }
-
-    status = conn_reportMlmeStatus(pMlme->hConn, pMlme->mlmeData.mgmtStatus, pMlme->mlmeData.uStatusCode);
-    return status;
-}
-
-
-static void mlme_stopAssocAndAuth(mlme_t *pMlme)
-{
-
-    TI_BOOL         sendDeAuth;
-    TI_BOOL         sendDisAssoc;
-
-    /* Don't send deauth/disassoc, FW will do it on disconnect command */
-    sendDeAuth   = TI_FALSE;
-    sendDisAssoc = TI_FALSE;
-
-	TRACE0(pMlme->hReport, REPORT_SEVERITY_INFORMATION, "mlme_stopAssocAndAuth: Auth/assoc stop without sending deauth/disassoc\n");
-
-    assoc_setDisAssocFlag(pMlme->hAssoc, sendDisAssoc);
-    assoc_stop(pMlme->hAssoc);
-    
-    auth_stop(pMlme->hAuth, sendDeAuth, pMlme->disConnReason );
-}
-/*****************************************************************************
-**
-** MLME messages builder/Parser
-**
-*****************************************************************************/
-
-
-
-
-
-
-
diff --git a/wl1271/stad/src/Sta_Management/mlmeSm.h b/wl1271/stad/src/Sta_Management/mlmeSm.h
deleted file mode 100644
index 260817f..0000000
--- a/wl1271/stad/src/Sta_Management/mlmeSm.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * mlmeSm.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- /** \file mlmeSm.h
- *  \brief 802.11 MLME SM
- *
- *  \see mlmeSm.c
- */
-
-
-/***************************************************************************/
-/*                                                                         */
-/*      MODULE: mlmeSm.h                                                   */
-/*    PURPOSE:  802.11 MLME SM                                     */
-/*                                                                         */
-/***************************************************************************/
-
-#ifndef _MLME_SM_H
-#define _MLME_SM_H
-
-#include "fsm.h"
-#include "mlmeApi.h"
-
-/* Constants */
-
-/* changed to fit double buffer size - S.G */
-/*#define MAX_MANAGEMENT_FRAME_BODY_LEN 2312*/
-#define MAX_MANAGEMENT_FRAME_BODY_LEN   1476
-
-/* Enumerations */
-
-/* state machine states */
-typedef enum 
-{
-    MLME_SM_STATE_IDLE          = 0,
-    MLME_SM_STATE_AUTH_WAIT     = 1,
-    MLME_SM_STATE_ASSOC_WAIT    = 2,
-    MLME_SM_STATE_ASSOC         = 3,
-    MLME_SM_NUM_STATES
-} mlme_smStates_t;
-
-/* State machine inputs */
-typedef enum 
-{
-    MLME_SM_EVENT_START             = 0,
-    MLME_SM_EVENT_STOP              = 1,
-    MLME_SM_EVENT_AUTH_SUCCESS      = 2,
-    MLME_SM_EVENT_AUTH_FAIL         = 3,
-    MLME_SM_EVENT_ASSOC_SUCCESS     = 4,
-    MLME_SM_EVENT_ASSOC_FAIL        = 5,
-    MLME_SM_NUM_EVENTS          
-} mlme_smEvents_t;
-
-
-
-/* Typedefs */
-
-typedef struct
-{
-    mgmtStatus_e mgmtStatus;
-    TI_UINT16        uStatusCode;
-} mlmeData_t;
-
-
-typedef struct
-{
-    fsm_stateMachine_t  *pMlmeSm;
-    TI_UINT8            currentState;
-    mlmeData_t          mlmeData;
-    legacyAuthType_e    legacyAuthType;
-    TI_BOOL             reAssoc;
-    DisconnectType_e    disConnType;
-    mgmtStatus_e        disConnReason;
-    TI_BOOL             bParseBeaconWSC;
-
-    /* temporary frame info */
-    mlmeIEParsingParams_t tempFrameInfo;
-    
-    /* debug info - start */
-    TI_UINT32           debug_lastProbeRspTSFTime;
-    TI_UINT32           debug_lastDtimBcnTSFTime;
-    TI_UINT32           debug_lastBeaconTSFTime;
-    TI_BOOL             debug_isFunctionFirstTime;
-    TI_UINT32           totalMissingBeaconsCounter;
-    TI_UINT32           totalRcvdBeaconsCounter;
-    TI_UINT32           maxMissingBeaconSequence;
-    TI_UINT32           BeaconsCounterPS;
-    /* debug info - end */
-
-    TI_HANDLE           hAuth;
-    TI_HANDLE           hAssoc;
-    TI_HANDLE           hSiteMgr;
-    TI_HANDLE           hCtrlData;
-    TI_HANDLE           hConn;
-    TI_HANDLE           hTxMgmtQ;
-    TI_HANDLE           hMeasurementMgr;
-    TI_HANDLE           hSwitchChannel;
-    TI_HANDLE           hRegulatoryDomain;
-    TI_HANDLE           hReport;
-    TI_HANDLE           hOs;
-    TI_HANDLE           hCurrBss;
-    TI_HANDLE           hApConn;
-    TI_HANDLE           hScanCncn;
-    TI_HANDLE           hQosMngr;
-    TI_HANDLE           hTWD;
-    TI_HANDLE           hTxCtrl;
-} mlme_t;
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-void mlme_smTimeout(TI_HANDLE hMlme);
-
-/* local functions */
-
-TI_STATUS mlme_smEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hMlme);
-
-/* state machine functions */
-TI_STATUS mlme_smStartIdle(mlme_t *pMlme);
-TI_STATUS mlme_smAuthSuccessAuthWait(mlme_t *pMlme);
-TI_STATUS mlme_smAuthFailAuthWait(mlme_t *pMlme);
-TI_STATUS mlme_smStopAssocWait(mlme_t *pMlme);
-TI_STATUS mlme_smAssocSuccessAssocWait(mlme_t *pMlme);
-TI_STATUS mlme_smAssocFailAssocWait(mlme_t *pMlme);
-TI_STATUS mlme_smStopAssoc(mlme_t *pMlme);
-TI_STATUS mlme_smActionUnexpected(mlme_t *pMlme);
-TI_STATUS mlme_smNOP(mlme_t *pMlme);
-
-TI_STATUS mlme_smReportStatus(mlme_t *pMlme);
-
-#endif
-
diff --git a/wl1271/stad/src/Sta_Management/openAuthSm.c b/wl1271/stad/src/Sta_Management/openAuthSm.c
deleted file mode 100644
index b57645b..0000000
--- a/wl1271/stad/src/Sta_Management/openAuthSm.c
+++ /dev/null
@@ -1,443 +0,0 @@
-/*
- * openAuthSm.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file authSM.c
- *  \brief 802.11 authentication SM source
- *
- *  \see authSM.h
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	authSM.c												   */
-/*    PURPOSE:	802.11 authentication SM source							   */
-/*																	 	   */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_70
-#include "osApi.h"
-
-#include "paramOut.h"
-#include "timer.h"
-#include "fsm.h"
-#include "report.h"
-#include "mlmeApi.h"
-#include "authSm.h"
-#include "openAuthSm.h"
-#include "rsnApi.h"
-
-/* Constants */
-
-/** number of states in the state machine */
-#define	OPEN_AUTH_SM_NUM_STATES		3
-
-/** number of events in the state machine */
-#define	OPEN_AUTH_SM_NUM_EVENTS		6
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Global variables */
-
-/* Local function prototypes */
-
-/* functions */
-
-/**
-*
-* openAuth_smConfig - configure a new authentication SM
-*
-* \b Description: 
-*
-* Configure a new authentication SM.
-*
-* \b ARGS:
-*
-*  I   - hAuth - Association SM context  \n
-*  I   - hMlme - MLME SM context  \n
-*  I   - hSiteMgr - Site manager context  \n
-*  I   - hCtrlData - Control data context  \n
-*  I   - hTxData - TX data context  \n
-*  I   - hHalCtrl - Hal control context  \n
-*  I   - hReport - Report context  \n
-*  I   - hOs - OS context  \n
-*  I   - authTimeout - Association SM timeout \n
-*  I   - authMaxCount - Max number of authentication requests to send  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa openAuth_Create, openAuth_Unload
-*/
-TI_STATUS openAuth_Config(TI_HANDLE hAuth, TI_HANDLE hOs)
-{
-	auth_t		*pHandle;
-	TI_STATUS		status;
-	/** Main 802.1X State Machine matrix */
-	fsm_actionCell_t	openAuth_smMatrix[OPEN_AUTH_SM_NUM_STATES][OPEN_AUTH_SM_NUM_EVENTS] =
-	{
-		/* next state and actions for IDLE state */
-		{{OPEN_AUTH_SM_STATE_WAIT, (fsm_Action_t)openAuth_smStartIdle},
-		 {OPEN_AUTH_SM_STATE_IDLE, (fsm_Action_t)openAuth_smActionUnexpected},
-		 {OPEN_AUTH_SM_STATE_IDLE, (fsm_Action_t)openAuth_smActionUnexpected},
-		 {OPEN_AUTH_SM_STATE_IDLE, (fsm_Action_t)openAuth_smActionUnexpected},
-		 {OPEN_AUTH_SM_STATE_IDLE, (fsm_Action_t)openAuth_smActionUnexpected},
-		 {OPEN_AUTH_SM_STATE_IDLE, (fsm_Action_t)openAuth_smActionUnexpected}
-		},
-		/* next state and actions for WAIT state */
-		{{OPEN_AUTH_SM_STATE_WAIT, (fsm_Action_t)openAuth_smActionUnexpected},
-		 {OPEN_AUTH_SM_STATE_IDLE, (fsm_Action_t)openAuth_smStopWait},
-		 {OPEN_AUTH_SM_STATE_AUTH, (fsm_Action_t)openAuth_smSuccessWait},
-		 {OPEN_AUTH_SM_STATE_IDLE, (fsm_Action_t)openAuth_smFailureWait},
-		 {OPEN_AUTH_SM_STATE_WAIT, (fsm_Action_t)openAuth_smTimeoutWait},
-		 {OPEN_AUTH_SM_STATE_IDLE, (fsm_Action_t)openAuth_smMaxRetryWait}
-		},
-		/* next state and actions for AUTH state */
-		{{OPEN_AUTH_SM_STATE_AUTH, (fsm_Action_t)openAuth_smActionUnexpected},
-		 {OPEN_AUTH_SM_STATE_IDLE, (fsm_Action_t)openAuth_smStopAuth},
-		 {OPEN_AUTH_SM_STATE_AUTH, (fsm_Action_t)openAuth_smActionUnexpected},
-		 {OPEN_AUTH_SM_STATE_AUTH, (fsm_Action_t)openAuth_smActionUnexpected},
-		 {OPEN_AUTH_SM_STATE_AUTH, (fsm_Action_t)openAuth_smActionUnexpected},
-		 {OPEN_AUTH_SM_STATE_AUTH, (fsm_Action_t)openAuth_smActionUnexpected}
-		}};
-	
-
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-
-	pHandle = (auth_t*)hAuth;
-	
-	status = fsm_Config(pHandle->pAuthSm, &openAuth_smMatrix[0][0], 
-						OPEN_AUTH_SM_NUM_STATES, OPEN_AUTH_SM_NUM_EVENTS, auth_osSMEvent, hOs);
-	if (status != TI_OK)
-	{ 
-		return TI_NOK;
-	}
-
-	pHandle->currentState = OPEN_AUTH_SM_STATE_IDLE;
-	
-	return TI_OK;
-}
-
-
-TI_STATUS auth_osSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hAuth)
-{
-   auth_t *pAuth = (auth_t *)hAuth;
-	TI_STATUS 		status;
-	TI_UINT8		nextState;
-
-	status = fsm_GetNextState(pAuth->pAuthSm, *currentState, event, &nextState);
-	if (status != TI_OK)
-	{
-		TRACE0(pAuth->hReport, REPORT_SEVERITY_SM, "State machine error, failed getting next state\n");
-		return(TI_NOK);
-	}
-
-	TRACE3( pAuth->hReport, REPORT_SEVERITY_INFORMATION, "auth_osSMEvent: <currentState = %d, event = %d> --> nextState = %d\n", *currentState, event, nextState);
-
-	status = fsm_Event(pAuth->pAuthSm, currentState, event, (void *)pAuth);
-
-	return status;
-}
-
-/**
-*
-* openAuth_Recv - Recive a message from the AP
-*
-* \b Description: 
-*
-* Parse a message form the AP and perform the appropriate event.
-*
-* \b ARGS:
-*
-*  I   - hAuth - Association SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa openAuth_Start, openAuth_Stop
-*/
-TI_STATUS openAuth_Recv(TI_HANDLE hAuth, mlmeFrameInfo_t *pFrame)
-{ 
-	TI_STATUS 			status;
-	auth_t			*pHandle;
-	TI_UINT16			authAlgo;
-
-	pHandle = (auth_t*)hAuth;
-
-	if (pHandle == NULL)
-	{
-		return TI_NOK;
-	}
-	
-	/* check response status */
-	authAlgo = ENDIAN_HANDLE_WORD(pFrame->content.auth.authAlgo);
-	if ((authAlgo != AUTH_LEGACY_OPEN_SYSTEM) &&
-        (authAlgo != AUTH_LEGACY_RESERVED1))
-	{
-TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "OPEN_AUTH_SM: DEBUG recieved authentication message with wrong algorithm \n");
-        rsn_reportAuthFailure(pHandle->hRsn, RSN_AUTH_STATUS_INVALID_TYPE);
-        return TI_NOK;
-	}
-    
-    if ((pHandle->authType==AUTH_LEGACY_RESERVED1) && (authAlgo !=AUTH_LEGACY_RESERVED1))
-    {
-        rsn_reportAuthFailure(pHandle->hRsn, RSN_AUTH_STATUS_INVALID_TYPE);
-    }
-    TRACE1(pHandle->hReport, REPORT_SEVERITY_SM, "OPEN_AUTH_SM: DEBUG Authentication status is %d \n", pFrame->content.auth.status);
-
-	pHandle->authData.status = pFrame->content.auth.status;
-
-    if (pHandle->authData.status == STATUS_SUCCESSFUL)
-    {
-        status = auth_osSMEvent(&pHandle->currentState, OPEN_AUTH_SM_EVENT_SUCCESS, pHandle);
-    } else {
-		rsn_reportAuthFailure(pHandle->hRsn, RSN_AUTH_STATUS_INVALID_TYPE);
-		status = auth_osSMEvent(&pHandle->currentState, OPEN_AUTH_SM_EVENT_FAIL, pHandle);
-    }
-
-	return status;
-}
-
-/* state machine functions */
-
-TI_STATUS openAuth_smStartIdle(auth_t *pAuth)
-{
-	TI_STATUS		status;
-
-	status = openAuth_smResetRetry(pAuth);
-	if (TI_OK != status)
-    {
-        TRACE0(pAuth->hReport, REPORT_SEVERITY_ERROR, "openAuth_smStartIdle: openAuth_smResetRetry return\n");
-        return status;
-    }
-
-    status = openAuth_smSendAuthReq(pAuth);
-    if (TI_OK != status)
-    {
-        TRACE0(pAuth->hReport, REPORT_SEVERITY_ERROR, "openAuth_smStartIdle: openAuth_smSendAuthReq return\n");
-        return status;
-    }
-
-    status = openAuth_smStartTimer(pAuth);
-    if (TI_OK != status)
-    {
-        TRACE0(pAuth->hReport, REPORT_SEVERITY_ERROR, "openAuth_smStartIdle: openAuth_smStartTimer return\n");
-        return status;
-    }
-
-    status = openAuth_smIncRetry(pAuth);
-    if (TI_OK != status)
-    {
-        TRACE0(pAuth->hReport, REPORT_SEVERITY_ERROR, "openAuth_smStartIdle: openAuth_smIncRetry return\n");
-        return status;
-    }
-
-	return status;
-}
-
-TI_STATUS openAuth_smStopWait(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = openAuth_smStopTimer(hAuth);
-
-	return status;
-}
- 
-TI_STATUS openAuth_smSuccessWait(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = openAuth_smStopTimer(hAuth);
-	status = openAuth_smReportSuccess(hAuth);
-
-	return status;
-}
- 
-TI_STATUS openAuth_smFailureWait(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = openAuth_smStopTimer(hAuth);
-	status = openAuth_smReportFailure(hAuth);
-
-	return status;
-}
-
-TI_STATUS openAuth_smTimeoutWait(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = openAuth_smSendAuthReq(hAuth);
-	status = openAuth_smStartTimer(hAuth);
-	status = openAuth_smIncRetry(hAuth);
-
-	return status;
-}
-
-TI_STATUS openAuth_smMaxRetryWait(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-    rsn_reportAuthFailure(hAuth->hRsn, RSN_AUTH_STATUS_TIMEOUT);
-	status = openAuth_smReportFailure(hAuth);
-
-	return status;
-}
-
-TI_STATUS openAuth_smSendAuthReq(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = auth_smMsgBuild(hAuth, 1, 0, NULL, 0);
-
-	return status;
-}
-
-TI_STATUS openAuth_smStopAuth(auth_t *hAuth)
-{
-	return TI_OK;
-}
-
-TI_STATUS openAuth_smActionUnexpected(auth_t *hAuth)
-{
-	return TI_OK;
-}
-
-/* local functions */
-
-
-TI_STATUS openAuth_smResetRetry(auth_t *hAuth)
-{
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-	
-	hAuth->retryCount = 0;
-	
-	return TI_OK;
-}
-
-TI_STATUS openAuth_smIncRetry(auth_t *hAuth)
-{
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-	
-	hAuth->retryCount++;
-	
-	return TI_OK;
-}
-
-TI_STATUS openAuth_smReportSuccess(auth_t *hAuth)
-{
-	TI_STATUS 		status;
-
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-    status = mlme_reportAuthStatus(hAuth->hMlme, hAuth->authData.status);
-
-	return status;
-}
-
-TI_STATUS openAuth_smReportFailure(auth_t *hAuth)
-{
-	TI_STATUS 		status;
-    
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-	
-    status = mlme_reportAuthStatus(hAuth->hMlme, hAuth->authData.status);
-
-	return status;
-}
-
-TI_STATUS openAuth_smStartTimer(auth_t *hAuth)
-{
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-	
-    tmr_StartTimer (hAuth->hAuthSmTimer,
-                    auth_smTimeout,
-                    (TI_HANDLE)hAuth,
-                    hAuth->timeout,
-                    TI_FALSE);
-
-	return TI_OK;
-}                        
-
-TI_STATUS openAuth_smStopTimer(auth_t *hAuth)
-{
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-	
-	tmr_StopTimer (hAuth->hAuthSmTimer);
-
-	return TI_OK;
-}
-
-TI_STATUS openAuth_Timeout(auth_t *pAuth)
-{
-	if (pAuth->retryCount >= pAuth->maxCount)
-	{
-		pAuth->authData.status = STATUS_PACKET_REJ_TIMEOUT;
-		return auth_osSMEvent(&pAuth->currentState, OPEN_AUTH_SM_EVENT_MAX_RETRY, pAuth);
-	}
-
-	return auth_osSMEvent(&pAuth->currentState, OPEN_AUTH_SM_EVENT_TIMEOUT, pAuth);
-}
-
-
diff --git a/wl1271/stad/src/Sta_Management/openAuthSm.h b/wl1271/stad/src/Sta_Management/openAuthSm.h
deleted file mode 100644
index a891eee..0000000
--- a/wl1271/stad/src/Sta_Management/openAuthSm.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * openAuthSm.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file assocSm.h
- *  \brief 802.11 authentication SM
- *
- *  \see assocSm.c
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	assocSm.h												   */
-/*    PURPOSE:	802.11 authentication SM									   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _OPEN_AUTH_SM_H
-#define _OPEN_AUTH_SM_H
-
-#include "fsm.h"
-#include "mlmeApi.h"
-#include "authSm.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* state machine states */
-typedef enum 
-{
-	OPEN_AUTH_SM_STATE_IDLE		= 0,
-	OPEN_AUTH_SM_STATE_WAIT    	= 1,
-	OPEN_AUTH_SM_STATE_AUTH		= 2
-} openAuth_smStates_t;
-
-/* State machine inputs */
-typedef enum 
-{
-	OPEN_AUTH_SM_EVENT_START		= 0,
-	OPEN_AUTH_SM_EVENT_STOP			= 1,
-	OPEN_AUTH_SM_EVENT_SUCCESS    	= 2,
-	OPEN_AUTH_SM_EVENT_FAIL			= 3,
-	OPEN_AUTH_SM_EVENT_TIMEOUT		= 4,
-	OPEN_AUTH_SM_EVENT_MAX_RETRY	= 5
-} openAuth_smEvents_t;
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS openAuth_Config(TI_HANDLE 	hAuth,
-					   TI_HANDLE 	pOs);
-
-TI_STATUS openAuth_Recv(TI_HANDLE pAssoc, mlmeFrameInfo_t *pFrame);
-
-TI_STATUS openAuth_Timeout(auth_t *pAuth);
-
-TI_STATUS auth_osSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hAuth);
-
-/* state machine functions */
-
-TI_STATUS openAuth_smStartIdle(auth_t *pAuth);
-TI_STATUS openAuth_smStopWait(auth_t *hAuth);
-TI_STATUS openAuth_smSuccessWait(auth_t *hAuth);
-TI_STATUS openAuth_smFailureWait(auth_t *hAuth);
-TI_STATUS openAuth_smTimeoutWait(auth_t *hAuth);
-TI_STATUS openAuth_smMaxRetryWait(auth_t *hAuth);
-TI_STATUS openAuth_smStopAuth(auth_t *hAuth);
-TI_STATUS openAuth_smActionUnexpected(auth_t *hAuth);
-
-TI_STATUS openAuth_smResetRetry(auth_t *hAuth);
-TI_STATUS openAuth_smIncRetry(auth_t *hAuth);
-TI_STATUS openAuth_smReportSuccess(auth_t *hAuth);
-TI_STATUS openAuth_smReportFailure(auth_t *hAuth);
-TI_STATUS openAuth_smSendAuthReq(auth_t *hAuth);
-TI_STATUS openAuth_smStartTimer(auth_t *hAuth);
-TI_STATUS openAuth_smStopTimer(auth_t *hAuth);
-
-#endif
-
diff --git a/wl1271/stad/src/Sta_Management/qosMngr.c b/wl1271/stad/src/Sta_Management/qosMngr.c
deleted file mode 100644
index 6c885f8..0000000
--- a/wl1271/stad/src/Sta_Management/qosMngr.c
+++ /dev/null
@@ -1,3004 +0,0 @@
-/*
- * qosMngr.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file qosMngr.c
- *  \brief QOS module interface
- *
- *  \see qosMngr.h
- */
-
-/****************************************************************************************************/
-/*																									*/
-/*		MODULE:		qosMGr.c																	    */
-/*		PURPOSE:	QOS module interface.												            */
-/*                  This module handles the QOS manager configuration.	 							*/
-/*																						 			*/
-/****************************************************************************************************/
-#define __FILE_ID__  FILE_ID_74
-#include "report.h"
-#include "osApi.h"
-#include "paramOut.h"
-#include "siteMgrApi.h"
-#include "qosMngr.h"
-#include "qosMngr_API.h"
-#include "sme.h"
-#include "EvHandler.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#include "XCCTSMngr.h"
-#endif
-#include "TWDriver.h"
-#include "DrvMainModules.h"
-#include "StaCap.h"
-#include "roamingMngrApi.h"
-
-
-extern int WMEQosTagToACTable[MAX_NUM_OF_802_1d_TAGS];
-
-/* Translate input AC to TID */            
-const TI_UINT8 WMEQosAcToTid[MAX_NUM_OF_AC] = { 0, 2, 4, 6 };
-
-/* Translate input TID to the other TID of the same AC */
-const TI_UINT32 WMEQosMateTid[MAX_NUM_OF_802_1d_TAGS] = { 3, 2, 1, 0, 5, 4, 7, 6 };
-
-/* Used to indicate no user priority is assigned for AC */
-#define INACTIVE_USER_PRIORITY 0xFF
-
-/* Used for TSPEC nominal fixed size */
-#define FIXED_NOMINAL_MSDU_SIZE_MASK 0x8000
-
-
-/********************************************************************************/
-/*						Internal functions prototypes.							*/
-/********************************************************************************/
-static void release_module(qosMngr_t *pQosMngr, TI_UINT32 initVec);
-static TI_STATUS verifyAndConfigTrafficParams(qosMngr_t *pQosMngr, TQueueTrafficParams *pQtrafficParams);
-static TI_STATUS verifyAndConfigQosParams(qosMngr_t *pQosMngr,TAcQosParams *pAcQosParams);
-static TI_STATUS getWMEInfoElement(qosMngr_t *pQosMngr,TI_UINT8 *pWMEie,TI_UINT8 *pLen);
-static TI_STATUS verifyWmeIeParams(qosMngr_t *pQosMngr,TI_UINT8 *pQosIeParams);
-static TI_STATUS updateACParams(qosMngr_t *pQosMngr,dot11_ACParameters_t *pAcParams);
-static TI_STATUS setWmeSiteParams(qosMngr_t *pQosMngr, TI_UINT8 *pQosIeParams);
-static void qosMngr_resetAdmCtrlParameters(TI_HANDLE hQosMngr);
-static TI_STATUS qosMngr_getCurrAcStatus(TI_HANDLE hQosMngr, OS_802_11_AC_UPSD_STATUS_PARAMS *pAcStatusParams);
-static void deleteTspecConfiguration(qosMngr_t *pQosMngr, TI_UINT8 acID);
-static void setNonQosAdmissionState(qosMngr_t *pQosMngr, TI_UINT8 acID);
-static void qosMngr_storeTspecCandidateParams (tspecInfo_t *pCandidateParams, OS_802_11_QOS_TSPEC_PARAMS *pTSPECParams, TI_UINT8 ac);
-static TI_STATUS qosMngr_SetPsRxStreaming (qosMngr_t *pQosMngr, TPsRxStreaming *pNewParams);
-
-/********************************************************************************
- *							qosMngr_create										*
- ********************************************************************************
-DESCRIPTION: QOS module creation function, called by the config mgr in creation phase. 
-				performs the following:
-				- Allocate the QOS MNGR handle.				                                                                                                   
-INPUT:      hOs -			Handle to OS		
-
-
-OUTPUT:		
-
-RETURN:     Handle to the QOS MNGR module on success, NULL otherwise
-
-************************************************************************/
-TI_HANDLE qosMngr_create(TI_HANDLE hOs)
-{
-	qosMngr_t		*pQosMngr = NULL;
-	TI_UINT32			initVec = 0;
-
-	if(!hOs)
-		return NULL;
-	
-	/* allocating the WME object */
-	pQosMngr = os_memoryAlloc(hOs,sizeof(qosMngr_t));
-
-	if (pQosMngr == NULL)
-    {
-        return NULL;
-    }
-
-    os_memoryZero (hOs, pQosMngr, sizeof(qosMngr_t));
-
-	initVec |= (1 << QOS_MNGR_INIT_BIT_LOCAL_VECTOR);
-    
-	/* create admission control object */
-	pQosMngr->pTrafficAdmCtrl = trafficAdmCtrl_create(hOs);
-
-	if (pQosMngr->pTrafficAdmCtrl == NULL)
-	{
-		qosMngr_destroy(pQosMngr);
-		return NULL;
-	}
-
-	initVec |= (1 << QOS_MNGR_INIT_BIT_ADM_CTRL);
-
-	return(pQosMngr);
-}
-
-/************************************************************************
- *                        qosMngr_destroy							    *
- ************************************************************************
-DESCRIPTION: QOS MNGR module destroy function, called by the config mgr in
-				 the destroy phase 
-				 performs the following:
-				-	Free all memory alocated by the module
-				
-INPUT:      hQosMngr	-	QOS Manager handle.		
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS qosMngr_destroy(TI_HANDLE hQosMngr)
-{
-	TI_UINT32				   initVec;
-	qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-
-	if (pQosMngr == NULL)
-		return TI_OK;
-
-	initVec = 0xFFFF; 
-    release_module(pQosMngr, initVec);
-
-	return TI_OK;
-}
-
-/***********************************************************************
- *                        release_module									
- ***********************************************************************
-DESCRIPTION:	Called by the destroy function or by the create function (on failure)
-				Go over the vector, for each bit that is set, release the corresponding module.
-                                                                                                   
-INPUT:      pQosMngr  -  QOS Mngr pointer.
-			initVec	  -	 Vector that contains a bit set for each module thah had been initiualized
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-static void release_module(qosMngr_t *pQosMngr, TI_UINT32 initVec)
-{
-	
-	if (initVec & (1 << QOS_MNGR_INIT_BIT_ADM_CTRL))
-		trafficAdmCtrl_unload(pQosMngr->pTrafficAdmCtrl);
-
-	if (initVec & (1 << QOS_MNGR_INIT_BIT_LOCAL_VECTOR))
-		os_memoryFree(pQosMngr->hOs, pQosMngr, sizeof(qosMngr_t));
-		
-	initVec = 0;
-}
-
-/************************************************************************
- *                        qosMngr_init		     						*
- ************************************************************************
-DESCRIPTION: QOS Manager module configuration function, called by the config 
-				mgr in configuration phase
-				performs the following:
-				-	Reset & initiailzes local variables
-				-	Init the handles to be used by the module
-                                                                                                   
-INPUT:      pStadHandles  - The driver modules handles		
-
-
-OUTPUT:		
-
-RETURN:     void
-************************************************************************/
-void qosMngr_init (TStadHandlesList *pStadHandles)
-{
-    qosMngr_t *pQosMngr = (qosMngr_t *)(pStadHandles->hQosMngr);
-
-    /* init handles */
-    pQosMngr->hOs              = pStadHandles->hOs;
-    pQosMngr->hReport          = pStadHandles->hReport;
-    pQosMngr->hSiteMgr         = pStadHandles->hSiteMgr;
-    pQosMngr->hTWD             = pStadHandles->hTWD;
-    pQosMngr->hTxCtrl          = pStadHandles->hTxCtrl;
-    pQosMngr->hTxMgmtQ         = pStadHandles->hTxMgmtQ;
-    pQosMngr->hMeasurementMngr = pStadHandles->hMeasurementMgr;
-    pQosMngr->hSmeSm           = pStadHandles->hSme;
-    pQosMngr->hCtrlData        = pStadHandles->hCtrlData;
-	pQosMngr->hEvHandler       = pStadHandles->hEvHandler;
-	pQosMngr->hXCCMgr          = pStadHandles->hXCCMngr;
-	pQosMngr->hTimer           = pStadHandles->hTimer;
-    pQosMngr->hStaCap          = pStadHandles->hStaCap;
-    pQosMngr->hRoamMng         = pStadHandles->hRoamingMngr;
-
-    pQosMngr->isConnected = TI_FALSE;
-}
-
-
-TI_STATUS qosMngr_SetDefaults (TI_HANDLE hQosMngr, QosMngrInitParams_t *pQosMngrInitParams)
-{
-    qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-    TI_UINT8   acID, uTid;
-    TI_STATUS  status;
-
-    /* init params */
-    pQosMngr->WMEEnable = pQosMngrInitParams->wmeEnable;
-    pQosMngr->trafficAdmCtrlEnable = pQosMngrInitParams->trafficAdmCtrlEnable;
-    pQosMngr->tagZeroConverHeader = pQosMngrInitParams->qosTagZeroConverHeader;
-	pQosMngr->qosPacketBurstEnable = pQosMngrInitParams->PacketBurstEnable;
-	pQosMngr->qosPacketBurstTxOpLimit = pQosMngrInitParams->PacketBurstTxOpLimit;
-	pQosMngr->desiredPsMode = pQosMngrInitParams->desiredPsMode;
-    pQosMngr->bCwFromUserEnable = pQosMngrInitParams->bCwFromUserEnable;
-    pQosMngr->uDesireCwMin = pQosMngrInitParams->uDesireCwMin;
-    pQosMngr->uDesireCwMax = pQosMngrInitParams->uDesireCwMax;
-	pQosMngr->bEnableBurstMode = pQosMngrInitParams->bEnableBurstMode;
-
-
-    pQosMngr->activeProtocol    = QOS_NONE;
-    pQosMngr->WMESiteSupport    = TI_FALSE;
-
-	pQosMngr->desiredMaxSpLen	= pQosMngrInitParams->desiredMaxSpLen;
-
-    pQosMngr->voiceTspecConfigured = TI_FALSE;
-	pQosMngr->videoTspecConfigured = TI_FALSE;
-    pQosMngr->performTSPECRenegotiation = TI_FALSE;
-	pQosMngr->TSPECNegotiationResultCallb = NULL;
-	pQosMngr->TSPECNegotiationResultModule = NULL;
-
-    /* No template has been set for UPSD */
-    pQosMngr->QosNullDataTemplateUserPriority = 0xFF;
-	
-	TWD_CfgBurstMode(pQosMngr->hTWD, pQosMngr->bEnableBurstMode);
-
-	/* configure admission control parameters */
-	qosMngr_resetAdmCtrlParameters(pQosMngr);
-
-	status = trafficAdmCtrl_config (pQosMngr->pTrafficAdmCtrl,
-                                    pQosMngr->hTxMgmtQ,
-                                    pQosMngr->hReport,
-                                    pQosMngr->hOs,
-                                    pQosMngr,
-                                    pQosMngr->hCtrlData,
-                                    pQosMngr->hXCCMgr,
-                                    pQosMngr->hTimer,
-                                    pQosMngr->hTWD,
-                                    pQosMngr->hTxCtrl,
-                                    &pQosMngrInitParams->trafficAdmCtrlInitParams);
-	if(status != TI_OK)
-		return TI_NOK;
-
-	/* 
-	 * configure per AC traffic parameters
-	 */
-    for(acID = FIRST_AC_INDEX;acID < MAX_NUM_OF_AC; acID++)
-	{
-		/*
-		 * setting ac traffic params for TrafficCategoryCfg (TNET configuration 
-		 * The parameters can be changed in run-time, so they are saved in "init params"
-		 * for 'disconnecting' .
-		 * the parameters being set in setSite; "select" phase.
-         */
-		pQosMngr->acParams[acID].QtrafficParams.queueID       = acID;
-		pQosMngr->acParams[acID].QtrafficParams.channelType   = CHANNEL_TYPE_EDCF;
-		pQosMngr->acParams[acID].QtrafficParams.tsid          = acID;
-		pQosMngr->acParams[acID].QtrafficParams.dot11EDCATableMSDULifeTime = 0;
-		pQosMngr->acParams[acID].QtrafficParams.psScheme      = PS_SCHEME_LEGACY;
-		pQosMngr->acParams[acID].QtrafficParams.ackPolicy     = pQosMngrInitParams->acAckPolicy[acID];
-		pQosMngr->acParams[acID].QtrafficParams.APSDConf[0]   = 0;
-		pQosMngr->acParams[acID].QtrafficParams.APSDConf[1]   = 0;
-
-
-		/* 
-		 * Update the qTrafficInitParams as well 
-		 */
-		os_memoryCopy(pQosMngr->hOs,
-                      &pQosMngr->acParams[acID].QTrafficInitParams,
-                      &pQosMngr->acParams[acID].QtrafficParams,
-                      sizeof(TQueueTrafficParams));
-
-		/* will be config only after select */
-		verifyAndConfigTrafficParams(pQosMngr,&(pQosMngr->acParams[acID].QtrafficParams));
-		
-		/*
-		 * setting ac QoS params for acQosParams (TNET configuration) 
-		 * The parameters can be changed in run-time, so they are saved in "init params"
-		 * for 'disconnecting'.
-		 * the parameters being set in setSite; "select" phase.
-         */
-		pQosMngr->acParams[acID].acQosParams.ac        = acID;
-		pQosMngr->acParams[acID].acQosParams.aifsn     = AIFS_DEF;
-		pQosMngr->acParams[acID].acQosParams.cwMax     = pQosMngr->uDesireCwMax;
-		pQosMngr->acParams[acID].acQosParams.cwMin     = pQosMngr->uDesireCwMin;
-		pQosMngr->acParams[acID].acQosParams.txopLimit = QOS_TX_OP_LIMIT_DEF;
-		pQosMngr->acParams[acID].msduLifeTimeParam     = pQosMngrInitParams->MsduLifeTime[acID];
-
-		/* The protocol is QOS_NONE. If Packet Burst is Enable,            */
-		/* then, the BE queue is configured to the TxOP Limit of Packet burst */
-		/* (that is, 3 ms) and the txopContinuation is set to  qosPacketBurstEnable  */
-		/* The protocol is QOS_NONE. If Packet Burst is Enable,            */
-		/* then, the BE queue is configured to the TxOP Limit of Packet burst */
-		/* (that is, 3 ms) and the txopContinuation is set to  qosPacketBurstEnable  */
-
-		if (acID == QOS_AC_BE)	
-		{
-			if (pQosMngr->qosPacketBurstEnable==TI_TRUE)
-			{
-				pQosMngr->acParams[QOS_AC_BE].acQosParams.txopLimit = pQosMngr->qosPacketBurstTxOpLimit;
-			}
-			else 
-			{
-				pQosMngr->acParams[QOS_AC_BE].acQosParams.txopLimit = QOS_TX_OP_LIMIT_DEF;
-			}
-		}
-
-		/* 
-		 * Update the acQosInitParams as well 
-		 */
-		os_memoryCopy(pQosMngr->hOs,
-                      &pQosMngr->acParams[acID].acQosInitParams,
-                      &pQosMngr->acParams[acID].acQosParams,
-                      sizeof(TAcQosParams));
-
-		/* will be config only after select */
-		if(verifyAndConfigQosParams(hQosMngr,&(pQosMngr->acParams[acID].acQosParams)) != TI_OK)
-		{
-			TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_SetDefault: failed on verifyAndConfigQosParams\n");
-		}
-
-        /*
-		 * setting ps mode per ac for protocol specific configuration.
-		 */
-
-        /* validity check - allow to set the desired Ps mode per-AC to UPSD ONLY IF the station supports UPSD */
-        if ((pQosMngrInitParams->desiredPsMode == PS_SCHEME_UPSD_TRIGGER) && (pQosMngrInitParams->desiredWmeAcPsMode[acID] == PS_SCHEME_UPSD_TRIGGER))
-        {
-		        pQosMngr->acParams[acID].desiredWmeAcPsMode = PS_SCHEME_UPSD_TRIGGER;
-        }
-        else
-        {
-               pQosMngr->acParams[acID].desiredWmeAcPsMode = PS_SCHEME_LEGACY;
-        }
-
-		pQosMngr->acParams[acID].currentWmeAcPsMode  = PS_SCHEME_LEGACY; /* default configuration is legacy PS  for all queues */
-
-		/* configure AC params to TxCtrl. */
-		txCtrlParams_setAcMsduLifeTime(pQosMngr->hTxCtrl, acID, pQosMngrInitParams->MsduLifeTime[acID]);
-		txCtrlParams_setAcAckPolicy(pQosMngr->hTxCtrl, acID, ACK_POLICY_LEGACY);
-
-		/* setting wme Ack Policy */
-		pQosMngr->acParams[acID].wmeAcAckPolicy = pQosMngrInitParams->acAckPolicy[acID];
-
-		/* Set admission state per AC for non-QoS and update the Tx module. */
-		setNonQosAdmissionState(pQosMngr, acID);
-	}
-
-    /* Reset all PS-Rx-Streaming configurations */
-    for (uTid = 0; uTid < MAX_NUM_OF_802_1d_TAGS; uTid++) 
-    {
-        pQosMngr->aTidPsRxStreaming[uTid].uTid     = uTid;
-        pQosMngr->aTidPsRxStreaming[uTid].bEnabled = TI_FALSE;
-    }
-    pQosMngr->uNumEnabledPsRxStreams = 0;
-
-	/* update Tx header convert mode */
-	txCtrlParams_setQosHeaderConverMode(pQosMngr->hTxCtrl, HDR_CONVERT_LEGACY);
-
-
-    /* 802.11n BA session setting */
-    for (uTid = 0; uTid < MAX_NUM_OF_802_1d_TAGS; ++uTid)
-    {
-        pQosMngr->aBaPolicy[uTid] = pQosMngrInitParams->aBaPolicy[uTid];
-        pQosMngr->aBaInactivityTimeout[uTid] = pQosMngrInitParams->aBaInactivityTimeout[uTid];
-    }
-
-    
-
-    TRACE0(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_config : QoS configuration complete!");
-
-    return TI_OK;
-}
-
-/************************************************************************
- *                    qosMngr_resetAdmCtrlParameters	                *
- ************************************************************************
-DESCRIPTION: reset the admCtrl parameters
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-
-OUTPUT:		
-
-RETURN:     
-
-************************************************************************/
-
-void qosMngr_resetAdmCtrlParameters(TI_HANDLE hQosMngr)
-{
-	TI_UINT8 acID;
-    qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-
-	/* reset admission control parameters */
-	for(acID = FIRST_AC_INDEX ; acID < MAX_NUM_OF_AC ; acID++)
-	{
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].AC = (EAcTrfcType)acID;
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority = INACTIVE_USER_PRIORITY; /* Setting invalid user Priority to prevent GET_TSPEC or DELETE */
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].nominalMsduSize = 0;
-        pQosMngr->resourceMgmtTable.currentTspecInfo[acID].minimumPHYRate = 0;
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].meanDataRate = 0;
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].surplausBwAllowance = 0;
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].mediumTime = 0;
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].UPSDFlag = 0;
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].uMinimumServiceInterval = 0;
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].uMaximumServiceInterval = 0;
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].streamDirection = BI_DIRECTIONAL;
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].trafficAdmState = AC_NOT_ADMITTED;
-
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].AC = (EAcTrfcType)acID;
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].userPriority = INACTIVE_USER_PRIORITY; /* Setting invalid user Priority to prevent GET_TSPEC or DELETE */
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].nominalMsduSize = 0;
-        pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].minimumPHYRate = 0;
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].meanDataRate = 0;
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].surplausBwAllowance = 0;
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].mediumTime = 0;
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].UPSDFlag = 0;
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].uMinimumServiceInterval = 0;
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].uMaximumServiceInterval = 0;
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].streamDirection = BI_DIRECTIONAL;
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].trafficAdmState = AC_NOT_ADMITTED;
-
-		pQosMngr->resourceMgmtTable.totalAllocatedMediumTime = 0;
-	}
-}
-
-
-/************************************************************************
- *                        qosMngr_disconnect   			                *
- ************************************************************************
-DESCRIPTION: the function is called upon driver disconnecting to reset all
-             QOS parameters to init values.
-                                                                                                   
-INPUT:      hQosMngr	-	Qos Manager handle.
-            bDisconnect - True if full AP disconnection, False if roaming to another AP
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS qosMngr_disconnect (TI_HANDLE hQosMngr, TI_BOOL bDisconnect)
-{
-    qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-	TI_UINT32  acID;
-	TI_STATUS  status;
-
-	if(hQosMngr == NULL)
-		return TI_OK;
-
-	pQosMngr->activeProtocol    = QOS_NONE;
-    pQosMngr->WMESiteSupport    = TI_FALSE;
-
-	/* clear admission control params */
-	qosMngr_resetAdmCtrlParameters(pQosMngr);
-	
-	trafficAdmCtrl_stop(pQosMngr->pTrafficAdmCtrl);
-
-	for(acID = FIRST_AC_INDEX;acID < MAX_NUM_OF_AC; acID++)
-	{
-        /* Disable medium time events in TX */
-		txCtrlParams_setAdmissionCtrlParams(pQosMngr->hTxCtrl, acID, 0 , 0, TI_FALSE);
-
-		/* The protocol after disconnect is QOS_NONE. If Packet Burst is Enabled, the BE queue InitParams 
-		    is configured to the TxOP Limit of Packet burst  (that is, 3 ms) and the 
-		    txopContinuation is set to qosPacketBurstEnable. */
-		
-		if (acID == QOS_AC_BE)
-		{
-			if (pQosMngr->qosPacketBurstEnable==TI_TRUE)
-			{
-				pQosMngr->acParams[QOS_AC_BE].acQosInitParams.txopLimit = pQosMngr->qosPacketBurstTxOpLimit;
-			}
-			else 
-			{
-				pQosMngr->acParams[QOS_AC_BE].acQosInitParams.txopLimit = QOS_TX_OP_LIMIT_DEF;
-			}
-		}
-		
-		/* Copy init traffic params (non-QoS defaults) to current traffic params, and config to HAL and TNET. */
-       os_memoryCopy(pQosMngr->hOs,&(pQosMngr->acParams[acID].acQosParams),&(pQosMngr->acParams[acID].acQosInitParams),sizeof(TAcQosParams));		
-
-		/* 
-		 * Update the qTrafficInitParams as well 
-		 */
-	   os_memoryCopy(pQosMngr->hOs,&(pQosMngr->acParams[acID].QtrafficParams),&(pQosMngr->acParams[acID].QTrafficInitParams),sizeof(TQueueTrafficParams));
-
-
-	   pQosMngr->acParams[acID].currentWmeAcPsMode  = PS_SCHEME_LEGACY; /* default configuration is legacy PS  for all queues */
-
-	   /* configure Ack-Policy to TxCtrl (working in Non-QoS method). */
-	   txCtrlParams_setAcAckPolicy(pQosMngr->hTxCtrl, acID, ACK_POLICY_LEGACY);
-
-	   /* Set admission state per AC for non-QoS and update the Tx module. */
-	   setNonQosAdmissionState(pQosMngr, acID);
-	}
-
-	/* 
-	 * configure only BE AC 
-	 * NOTE : this is done after "disconnect" or Init phase so those are defaults BE params 
-	 */
-
-	/*
-	 * configureQueue
-	 */
-	status = verifyAndConfigTrafficParams(hQosMngr,&(pQosMngr->acParams[QOS_AC_BE].QtrafficParams));
-	if (status != TI_OK)
-	{
-        TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite:failed to init NON_QOS Queue Traffic parameters!!!\n\n");
-		return status;
-	}
-
-	/*
-	 * configureAC
-	 */
-
-	status = verifyAndConfigQosParams(hQosMngr,&(pQosMngr->acParams[QOS_AC_BE].acQosParams));
-	if (status != TI_OK)
-	{
-        TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite:failed to init NON_QOS AC QoS parameters!!!\n\n");
-        return status;
-	}
-
-	/* update Tx header convert mode */
-	txCtrlParams_setQosHeaderConverMode(pQosMngr->hTxCtrl, HDR_CONVERT_LEGACY);
-
-    /* If disconnect (not roaming), reset all PS-Rx-Streaming configurations. */
-    if (bDisconnect) 
-    {
-        TI_UINT32  uTid;
-        for (uTid = 0; uTid < MAX_NUM_OF_802_1d_TAGS; uTid++) 
-        {
-            TPsRxStreaming *pCurrTidParams = &pQosMngr->aTidPsRxStreaming[uTid];
-
-            if (pCurrTidParams->bEnabled) 
-            {
-                pCurrTidParams->bEnabled = TI_FALSE;
-                TWD_CfgPsRxStreaming (pQosMngr->hTWD, pCurrTidParams, NULL, NULL);
-            }
-        }
-        pQosMngr->uNumEnabledPsRxStreams = 0;
-    }
-
-    /* Update our internal state */
-    pQosMngr->isConnected = TI_FALSE;
-
-    /* Mark that no Qos Null template is currently set into firmware */
-    pQosMngr->QosNullDataTemplateUserPriority = 0xFF;
-
-    pQosMngr->voiceTspecConfigured = TI_FALSE;
-    pQosMngr->videoTspecConfigured = TI_FALSE;
-
-    /* Mark that no Qos Null template is currently set into firmware */
-    pQosMngr->QosNullDataTemplateUserPriority = 0xFF;
-
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_disconnect : QoS disconnect complete!");
-
-#ifdef XCC_MODULE_INCLUDED
-	measurementMgr_stopTsMetrics(pQosMngr->hMeasurementMngr);
-#endif
-
-	return TI_OK;
-}
-
-
-/************************************************************************
- *                        qosMngr_connect   			                *
- ************************************************************************
-DESCRIPTION: the function is called upon driver connection to inform all 
-             the other modules about the voice mode
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-TI_STATUS qosMngr_connect(TI_HANDLE hQosMngr)
-{
-    qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-    psPollTemplate_t        psPollTemplate;
-    TSetTemplate            templateStruct;
-    QosNullDataTemplate_t   QosNullDataTemplate;
-    TI_UINT8   acID,UPSDCnt=0;
-
-   if (pQosMngr->isConnected == TI_TRUE)
-   {
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_connect : Already connected !!!\n");
-     return TI_OK;
-   }
-
-    /* Send PsPoll template to HAL */
-    
-    templateStruct.ptr = (TI_UINT8 *)&psPollTemplate;
-    templateStruct.type = PS_POLL_TEMPLATE;
-    templateStruct.uRateMask = RATE_MASK_UNSPECIFIED;
-    buildPsPollTemplate(pQosMngr->hSiteMgr, &templateStruct);
-    TWD_CmdTemplate (pQosMngr->hTWD, &templateStruct, NULL, NULL);
-    	
-    /* Update our internal state */
-    pQosMngr->isConnected = TI_TRUE;
-
-    /* Set Qos-Null Data template into firmware */
-	for(acID = FIRST_AC_INDEX;acID < MAX_NUM_OF_AC; acID++)
-	{
-        /* Set QOS Null data template into the firmware (only if at least one AC is configured as UPSD )*/
-        if (pQosMngr->acParams[acID].currentWmeAcPsMode == PS_SCHEME_UPSD_TRIGGER)
-        {
-           UPSDCnt++;
-           if ( pQosMngr->acParams[acID].apInitAdmissionState != ADMISSION_REQUIRED )
-           {
-            pQosMngr->QosNullDataTemplateUserPriority = WMEQosAcToTid[acID];
-
-            templateStruct.ptr = (TI_UINT8 *)&QosNullDataTemplate;
-            templateStruct.type = QOS_NULL_DATA_TEMPLATE;
-            templateStruct.uRateMask = RATE_MASK_UNSPECIFIED;
-            buildQosNullDataTemplate(pQosMngr->hSiteMgr, &templateStruct,pQosMngr->QosNullDataTemplateUserPriority);
-            TWD_CmdTemplate (pQosMngr->hTWD, &templateStruct, NULL, NULL);
-
-            TRACE2(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "setWmeSiteParams: Setting QOS Null data for UserPriority %d (belongs to AC %d)\n", WMEQosAcToTid[acID], acID);
-
-            break; /* Only need to set ONE template, so after setting it, we can exit the loop */
-           }
-        }
-
-    }
-
-    /* If MAX_NUM_OF_AC (4) ACs were found as UPSD, but we still haven't configured any UP in the Qos Null data template, it must mean all ACs require admission - not valid*/
-    if ((pQosMngr->QosNullDataTemplateUserPriority == 0xFF) && (UPSDCnt == MAX_NUM_OF_AC))
-    {
-      TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_connect : QOS Null Data template not set since all ACs require admission !!!\n");
-	}
-
-    return TI_OK;
-}
-
-/** 
- * \fn     qosMngr_SetBaPolicies
- * \brief  Set the BA session policies to the FW. 
- * 
- * \note   
- * \param  hQosMngr	- Qos Manager handle.
- * \return None 
- * \sa     
- */ 
-void qosMngr_SetBaPolicies(TI_HANDLE hQosMngr)
-{
-    qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-    TI_BOOL     b11nEnable;
-    TI_UINT32   uTidIndex;
-    paramInfo_t param;
-
-    StaCap_IsHtEnable(pQosMngr->hStaCap, &b11nEnable);
-
-    if (b11nEnable)
-    {
-
-        param.paramType = CTRL_DATA_CURRENT_BSSID_PARAM;
-        ctrlData_getParam(pQosMngr->hCtrlData, &param);
- 
-        /* 802.11n BA session setting */
-        for (uTidIndex = 0; uTidIndex < MAX_NUM_OF_802_1d_TAGS; ++uTidIndex)
-        {
-            if ((pQosMngr->aBaPolicy[uTidIndex] == BA_POLICY_INITIATOR) || 
-                (pQosMngr->aBaPolicy[uTidIndex] == BA_POLICY_INITIATOR_AND_RECEIVER))
-            {
-                TWD_CfgSetBaInitiator (pQosMngr->hTWD,
-                                       uTidIndex,
-                                       TI_TRUE,
-                                       param.content.ctrlDataCurrentBSSID,
-                                       RX_QUEUE_WIN_SIZE,
-                                       pQosMngr->aBaInactivityTimeout[uTidIndex]);
-            }
-
-            if ((pQosMngr->aBaPolicy[uTidIndex] == BA_POLICY_RECEIVER) ||
-                (pQosMngr->aBaPolicy[uTidIndex] == BA_POLICY_INITIATOR_AND_RECEIVER))
-            {
-                TWD_CfgSetBaReceiver (pQosMngr->hTWD,
-                                      uTidIndex,
-                                      TI_TRUE,
-                                      param.content.ctrlDataCurrentBSSID,
-                                      RX_QUEUE_WIN_SIZE);
-            }
-        }
-    }
-}
-
-
-/************************************************************************
- *                        qosMngr_evalSite					            *
- ************************************************************************
-DESCRIPTION: Evaluate the site for the selction algorithm
-			 In case the station is configure to work in UPSD mode
-			 prefer a site that support UPSD and return 1.
-			 All other case return 0.
-                                                                                                   
-INPUT:      siteAPSDSupport - the UPSD capabilit of the site
-
-OUTPUT:		 
-
-RETURN:     1 - evaluation is good...
-			0 - evaluation can be better....
-
-************************************************************************/
-TI_UINT8 qosMngr_evalSite(TI_HANDLE hQosMngr, TI_BOOL siteAPSDSupport)
-{
-   qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-
-   if (pQosMngr->desiredPsMode == PS_SCHEME_UPSD_TRIGGER && siteAPSDSupport)
-   {
-		return 1;
-   }
-
-   return 0;
-}
-
-TI_STATUS qosMngr_getParamsActiveProtocol(TI_HANDLE hQosMngr, EQosProtocol *actProt)
-{
-    qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-
-	if (pQosMngr == NULL)
-		return TI_NOK;
-    *actProt = pQosMngr->activeProtocol;
-    return TI_OK;
-}
-
-/************************************************************************
- *                        qosMngr_getACparams           			    *
- ************************************************************************
-DESCRIPTION: The function is an API for external modules to qet qos parameters
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-            pParamInfo           -  qos parameters information.
-
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-TI_STATUS qosMngr_getParams(TI_HANDLE  hQosMngr,paramInfo_t *pParamInfo)
-{
-	EAcTrfcType           acID;
-	qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-
-	if(pQosMngr == NULL)
-		return TI_NOK;
-
-    TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_getParams: %x\n", pParamInfo->paramType);
-
-	switch(pParamInfo->paramType)
-	{
-	case QOS_PACKET_BURST_ENABLE:
-		pParamInfo->content.qosPacketBurstEnb = pQosMngr->qosPacketBurstEnable;
-		break;
-	case QOS_MNGR_CURRENT_PS_MODE:
-		pParamInfo->content.currentPsMode = pQosMngr->currentPsMode;
-		break;
-
-    case QOS_MNGR_ACTIVE_PROTOCOL:
-       pParamInfo->content.qosSiteProtocol = pQosMngr->activeProtocol;
-       break;
-
-    case QOS_MNGR_GET_DESIRED_PS_MODE:
-        pParamInfo->content.qosDesiredPsMode.uDesiredPsMode = pQosMngr->desiredPsMode;
-		for(acID = FIRST_AC_INDEX; acID < MAX_NUM_OF_AC ; acID++ )
-			pParamInfo->content.qosDesiredPsMode.uDesiredWmeAcPsMode[acID] = pQosMngr->acParams[acID].desiredWmeAcPsMode;
-        break;
-	   
-	case QOS_MNGR_VOICE_RE_NEGOTIATE_TSPEC:
-	/* Check if voice call present. If so, store current TSPEC configuration */
-		pParamInfo->content.TspecConfigure.voiceTspecConfigure = (TI_UINT8)pQosMngr->voiceTspecConfigured;
-        pParamInfo->content.TspecConfigure.videoTspecConfigure = (TI_UINT8)pQosMngr->videoTspecConfigured;
-
-        TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_getParams: QOS_MNGR_VOICE_RE_NEGOTIATE_TSPEC=%d\n", pQosMngr->voiceTspecConfigured);
-
-		if (pQosMngr->voiceTspecConfigured == TI_TRUE) 
-		{
-			OS_802_11_QOS_TSPEC_PARAMS *pTspecParams;
-			tspecInfo_t *pConfiguredParams;
-
-			/* Store voice TSPEC params - must be configured */
-			pTspecParams = &pQosMngr->tspecRenegotiationParams[USER_PRIORITY_6];
-			pConfiguredParams = &pQosMngr->resourceMgmtTable.candidateTspecInfo[USER_PRIORITY_6];
-
-			pTspecParams->uUserPriority = pConfiguredParams->userPriority;
-			pTspecParams->uNominalMSDUsize = pConfiguredParams->nominalMsduSize;
-			pTspecParams->uMeanDataRate = pConfiguredParams->meanDataRate;
-			pTspecParams->uMinimumPHYRate = pConfiguredParams->minimumPHYRate;
-			pTspecParams->uSurplusBandwidthAllowance = pConfiguredParams->surplausBwAllowance;
-			pTspecParams->uAPSDFlag = pConfiguredParams->UPSDFlag;
-			pTspecParams->uMinimumServiceInterval = pConfiguredParams->uMinimumServiceInterval;
-			pTspecParams->uMaximumServiceInterval = pConfiguredParams->uMaximumServiceInterval;
-			pTspecParams->uMediumTime = pConfiguredParams->mediumTime;
-		}
-		else
-		{
-			pQosMngr->tspecRenegotiationParams[USER_PRIORITY_6].uUserPriority = MAX_USER_PRIORITY;
-		}
-
-		if (pQosMngr->videoTspecConfigured == TI_TRUE) 
-		{
-			OS_802_11_QOS_TSPEC_PARAMS *pTspecParams;
-			tspecInfo_t *pConfiguredParams;
-
-			/* Store signalling TSPEC params if configured in user priority 4 */
-			pTspecParams = &pQosMngr->tspecRenegotiationParams[USER_PRIORITY_4];
-			pConfiguredParams = &pQosMngr->resourceMgmtTable.candidateTspecInfo[USER_PRIORITY_4];
-
-				pTspecParams->uUserPriority = pConfiguredParams->userPriority;
-				pTspecParams->uNominalMSDUsize = pConfiguredParams->nominalMsduSize;
-				pTspecParams->uMeanDataRate = pConfiguredParams->meanDataRate;
-				pTspecParams->uMinimumPHYRate = pConfiguredParams->minimumPHYRate;
-				pTspecParams->uSurplusBandwidthAllowance = pConfiguredParams->surplausBwAllowance;
-				pTspecParams->uAPSDFlag = pConfiguredParams->UPSDFlag;
-				pTspecParams->uMinimumServiceInterval = pConfiguredParams->uMinimumServiceInterval;
-				pTspecParams->uMaximumServiceInterval = pConfiguredParams->uMaximumServiceInterval;
-				pTspecParams->uMediumTime = pConfiguredParams->mediumTime;
-			}
-			else
-			{
-				pQosMngr->tspecRenegotiationParams[USER_PRIORITY_4].uUserPriority = MAX_USER_PRIORITY;
-		}
-		break;
-		
-	case QOS_MNGR_AC_STATUS:
-		switch (qosMngr_getCurrAcStatus (hQosMngr,&pParamInfo->content.qosCurrentAcStatus))
-		{
-   			case TI_OK:
-      			return TI_OK;
-			case NOT_CONNECTED:
-                TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Not connected to an AP...\n");
-				break;
-   			case NO_QOS_AP:
-                TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "AP does not support QOS...\n");
-      			break;
-   			case TI_NOK:
-                TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Invalid parameter...\n");
-      			break;
-   			default:
-                TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Unknown return value...\n");
-      			break;			
-   		}
-		return TI_NOK;
-		
-	case QOS_MNGR_OS_TSPEC_PARAMS: 
-
-		if( pParamInfo->content.qosTspecParameters.uUserPriority > MAX_USER_PRIORITY )
-		{	
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_getTspecParams: userPriority > 7 -> Ignore !!!\n");
-			return TI_NOK;
-		}
-
-		if(pQosMngr->isConnected == TI_FALSE)
-		{	
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_getTspecParams: Not connected - Ignoring request !!!\n");
-			return NOT_CONNECTED;
-		}
-
-		if(pQosMngr->activeProtocol == QOS_NONE)
-		{	
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_getTspecParams: Not connected to QOS AP - Ignoring reqeust !!!\n");
-			return NO_QOS_AP;
-		}
-		
-		acID = (EAcTrfcType)WMEQosTagToACTable[pParamInfo->content.qosTspecParameters.uUserPriority];
-
-		/* check if signaling is already in process*/
-		if(pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].trafficAdmState == AC_WAIT_ADMISSION)
-		{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_requestAdmission: AC = %d , TSPEC Signaling is in progress -> Ignoring request !!!\n",acID);
-			return TRAFIC_ADM_PENDING;
-		}
-
-	   /* check if UP is admitted or not */
-	   if(pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority != pParamInfo->content.qosTspecParameters.uUserPriority)
-       {	
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_getTspecParams: user priority is not admitted. -> Ignore !!!\n");
-		 return USER_PRIORITY_NOT_ADMITTED;
-		}
-
-		pParamInfo->content.qosTspecParameters.uMeanDataRate = pQosMngr->resourceMgmtTable.currentTspecInfo[acID].meanDataRate;
-		pParamInfo->content.qosTspecParameters.uNominalMSDUsize = pQosMngr->resourceMgmtTable.currentTspecInfo[acID].nominalMsduSize;
-		pParamInfo->content.qosTspecParameters.uAPSDFlag  = pQosMngr->resourceMgmtTable.currentTspecInfo[acID].UPSDFlag;
-		pParamInfo->content.qosTspecParameters.uMinimumServiceInterval  = pQosMngr->resourceMgmtTable.currentTspecInfo[acID].uMinimumServiceInterval;
-		pParamInfo->content.qosTspecParameters.uMaximumServiceInterval  = pQosMngr->resourceMgmtTable.currentTspecInfo[acID].uMaximumServiceInterval;
-		pParamInfo->content.qosTspecParameters.uMinimumPHYRate  = pQosMngr->resourceMgmtTable.currentTspecInfo[acID].minimumPHYRate;
-		pParamInfo->content.qosTspecParameters.uSurplusBandwidthAllowance  = pQosMngr->resourceMgmtTable.currentTspecInfo[acID].surplausBwAllowance;
-		pParamInfo->content.qosTspecParameters.uMediumTime = pQosMngr->resourceMgmtTable.currentTspecInfo[acID].mediumTime;
-		break;
-
-	case QOS_MNGR_AP_QOS_PARAMETERS:  /* API GetAPQosParameters */
-		acID = (EAcTrfcType) pParamInfo->content.qosApQosParams.uAC;
-
-		if(acID > QOS_HIGHEST_AC_INDEX)
-		{
-            TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setParams :Error  trying to set invalid acId: %d param\n",pParamInfo->content.qosApQosParams.uAC);
-			return (PARAM_VALUE_NOT_VALID);
-		}
-		if(pQosMngr->isConnected == TI_FALSE)
-		{
-            TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Not connected to an AP...\n");
-			return NOT_CONNECTED;
-		}
-		if(pQosMngr->activeProtocol == QOS_NONE)
-		{
-            TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "AP does not support QOS...\n");
-			return NO_QOS_AP;
-		}
-		
-		pParamInfo->content.qosApQosParams.uAssocAdmissionCtrlFlag = pQosMngr->acParams[acID].apInitAdmissionState; /* admission flag */
-		pParamInfo->content.qosApQosParams.uAIFS = pQosMngr->acParams[acID].acQosParams.aifsn;
-		pParamInfo->content.qosApQosParams.uCwMin = (1 << pQosMngr->acParams[acID].acQosParams.cwMin)-1;
-		pParamInfo->content.qosApQosParams.uCwMax = (1 << pQosMngr->acParams[acID].acQosParams.cwMax)-1;
-		pParamInfo->content.qosApQosParams.uTXOPLimit = pQosMngr->acParams[acID].acQosParams.txopLimit << 5;
-
-		break;
-
-    case QOS_MNGR_PS_RX_STREAMING:
-        {
-            TPsRxStreaming *pParams    = &pParamInfo->content.tPsRxStreaming;
-            TI_UINT32       uTid       = pParams->uTid;
-            TPsRxStreaming *pTidStream = &pQosMngr->aTidPsRxStreaming[uTid];
-
-            os_memoryCopy (pQosMngr->hOs, (void *)pParams, (void *)pTidStream, sizeof(TPsRxStreaming));
-        }
-		break;
-
-
-	default:
-           TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_getParams Error: unknown paramType 0x%x!\n",pParamInfo->paramType);
-			return (PARAM_NOT_SUPPORTED);
-
-	}
-	return TI_OK;
-}
-
-/************************************************************************
- *                        qosMngr_setParams              			    *
- ************************************************************************
-DESCRIPTION: The function is an API for external modules to set qos parameters
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-            pParamInfo           -  qos parameters information.
-
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-TI_STATUS qosMngr_setParams(TI_HANDLE  hQosMngr,paramInfo_t *pParamInfo)
-{
-    qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-	TTwdParamInfo		   param;		
-	EAcTrfcType           acID;
-	TI_STATUS              status;
-
-	if(pQosMngr == NULL)
-		return TI_NOK;
-
-	if(pParamInfo == NULL)
-	{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setParams :Error trying to set NULL params!\n");
-		return TI_NOK;
-	}
-
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_setParams: %x\n", pParamInfo->paramType);
-
-	switch(pParamInfo->paramType)
-	{
-
-		case QOS_PACKET_BURST_ENABLE:
-
-			if (pParamInfo->content.qosPacketBurstEnb > QOS_PACKET_BURST_ENABLE_MAX)
-				return (PARAM_VALUE_NOT_VALID);
-			
-			/* No change */
-			if (pParamInfo->content.qosPacketBurstEnb == pQosMngr->qosPacketBurstEnable)
-				return TI_OK;
-
-			/* Update the qosPacketBurstEnable parameter */
-			pQosMngr->qosPacketBurstEnable = pParamInfo->content.qosPacketBurstEnb;
-
-			/* Packet burst enable changed from F to T */ 
-			if (pParamInfo->content.qosPacketBurstEnb == TI_TRUE)
-			{
-				/* Update the acTrafficInitParams of BE to the packet burst def*/
-				pQosMngr->acParams[QOS_AC_BE].acQosInitParams.txopLimit = pQosMngr->qosPacketBurstTxOpLimit;
-			
-				/* Update the acTrafficParams of BE and the hal to the packet burst def*/
-				if (pQosMngr->activeProtocol == QOS_NONE)
-				{
-					pQosMngr->acParams[QOS_AC_BE].acQosParams.txopLimit = pQosMngr->qosPacketBurstTxOpLimit;
-					/* verify the parameters and update the hal */
-					status = verifyAndConfigQosParams(hQosMngr,&(pQosMngr->acParams[QOS_AC_BE].acQosParams));
-					if(status != TI_OK)
-						return status;
-				}
-			}
-				
-			/* Packet burst enable changed from T to F*/ 
-			else 
-			{
-				/* Update the acTrafficInitParams of BE to the AC def*/
-				pQosMngr->acParams[QOS_AC_BE].acQosInitParams.txopLimit = QOS_TX_OP_LIMIT_DEF;
-			
-				/* Update the acTrafficParams of BE  and the hal to the AC def*/
-				if (pQosMngr->activeProtocol == QOS_NONE)
-				{
-					pQosMngr->acParams[QOS_AC_BE].acQosParams.txopLimit = QOS_TX_OP_LIMIT_DEF;
-					/* verify the parameters and update the hal */
-					status = verifyAndConfigQosParams(hQosMngr,&(pQosMngr->acParams[QOS_AC_BE].acQosParams));
-					if(status != TI_OK)
-						return status;
-				}
-			}
-			break;
-
-		case QOS_MNGR_SET_SITE_PROTOCOL:
-			if(pParamInfo->content.qosSiteProtocol == QOS_WME)
-				pQosMngr->WMESiteSupport = TI_TRUE;
-			else
-				pQosMngr->WMESiteSupport = TI_FALSE;
-		break;
-
-
-    case QOS_MNGR_PS_RX_STREAMING:
-        return qosMngr_SetPsRxStreaming (pQosMngr, &pParamInfo->content.tPsRxStreaming);
-
-
-	case QOS_MNGR_SET_OS_PARAMS:
-		if((EAcTrfcType)pParamInfo->content.qosOsParams.acID > QOS_HIGHEST_AC_INDEX)
-		{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setParams :Error  trying to set invalid acId: %d param\n",pParamInfo->content.qosOsParams.acID);
-
-			return (PARAM_VALUE_NOT_VALID);
-		}
-
-		if(((PSScheme_e)pParamInfo->content.qosOsParams.PSDeliveryProtocol != PS_SCHEME_LEGACY) && ((PSScheme_e)pParamInfo->content.qosOsParams.PSDeliveryProtocol != PS_SCHEME_UPSD_TRIGGER))
-		{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setParams :Error trying to set invalid PSDeliveryProtocol: %d param\n",pParamInfo->content.qosOsParams.PSDeliveryProtocol);
-
-			return (PARAM_VALUE_NOT_VALID);
-		}
-
-		/* config tidConf */
-		acID = (EAcTrfcType)pParamInfo->content.qosOsParams.acID;
-
-		if( (pParamInfo->content.qosOsParams.PSDeliveryProtocol != pQosMngr->acParams[acID].desiredWmeAcPsMode) && 
-			(pQosMngr->isConnected == TI_TRUE) )
-		{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setParams :Error  trying to set new PS protocol while connected");
-			
-			return (PARAM_VALUE_NOT_VALID);
-		}
-
-
-		/* UPSD_FW open in upsd integration */
-		/* set the current PS mode. In not connected state it is always Legacy since the currentPsMode only 
-		 update after connection */
-		pQosMngr->acParams[acID].QtrafficParams.psScheme = pQosMngr->acParams[acID].currentWmeAcPsMode;
-		pQosMngr->acParams[acID].msduLifeTimeParam = pParamInfo->content.qosOsParams.MaxLifeTime;
-
-		status = verifyAndConfigTrafficParams(pQosMngr,&(pQosMngr->acParams[acID].QtrafficParams));
-		if(status != TI_OK)
-			return status;
-		
-		/* configure MSDU-Lifetime to TxCtrl. */
-		txCtrlParams_setAcMsduLifeTime(pQosMngr->hTxCtrl, acID, pParamInfo->content.qosOsParams.MaxLifeTime);
-
-		/* synch psPoll mode with qosMngr */
-		/* Update the PsMode parameter */
-		pQosMngr->acParams[acID].desiredWmeAcPsMode = (PSScheme_e) pParamInfo->content.qosOsParams.PSDeliveryProtocol;
-		break;
-
-	case QOS_MNGR_CURRENT_PS_MODE:
-		if( (pQosMngr->activeProtocol == QOS_WME) && (pQosMngr->desiredPsMode == PS_SCHEME_UPSD_TRIGGER) && (pParamInfo->content.currentPsMode == PS_SCHEME_UPSD_TRIGGER) )
-			pQosMngr->currentPsMode = PS_SCHEME_UPSD_TRIGGER;
-		else
-			pQosMngr->currentPsMode = PS_SCHEME_LEGACY;
-		break;
-		
-    case QOS_MNGR_ADD_TSPEC_REQUEST:
-		pQosMngr->TSPECNegotiationResultCallb = NULL;
-		pQosMngr->TSPECNegotiationResultModule = NULL;
-		status = qosMngr_requestAdmission(hQosMngr,  &pParamInfo->content.qosAddTspecRequest);
-		switch (status)
-   		{
-   			case TI_OK:
-      			return TI_OK;
-      			
-   			case TRAFIC_ADM_PENDING:
-      TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Driver is still waiting for a response of previous request...\n");
-      			break;
-   			case AC_ALREADY_IN_USE:
-      TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Other user priority from the same AC has already used a TSPEC...\n");
-      			break;
-   			case NOT_CONNECTED:
-      TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Not connected to an AP...\n");
-      			break;
-   			case NO_QOS_AP:
-      TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "AP does not support QOS...\n");
-      			break;
-   			case TI_NOK:
-      TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Invalid parameter...\n");
-      			break;
-   			default:
-      TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Unknown return value...\n");
-      			break;
-   		}
-		return TI_NOK;
-		
-	case QOS_MNGR_RESEND_TSPEC_REQUEST:
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_setParams: QOS_MNGR_RESEND_TSPEC_REQUEST\n");
-		pQosMngr->TSPECNegotiationResultCallb = (qosMngrCallb_t)pParamInfo->content.qosRenegotiateTspecRequest.callback;
-		pQosMngr->TSPECNegotiationResultModule = pParamInfo->content.qosRenegotiateTspecRequest.handler; 
-		status = qosMngr_requestAdmission(hQosMngr,  &pQosMngr->tspecRenegotiationParams[USER_PRIORITY_6]);
-
-		if ((status == TI_OK) && (pQosMngr->tspecRenegotiationParams[USER_PRIORITY_4].uUserPriority != MAX_USER_PRIORITY))
-		{
-			status = qosMngr_requestAdmission(hQosMngr,  &pQosMngr->tspecRenegotiationParams[USER_PRIORITY_4]);
-		}
-		return (status);
-		
-    case QOS_MNGR_DEL_TSPEC_REQUEST:
-		status = qosMngr_deleteAdmission(hQosMngr, &pParamInfo->content.qosDelTspecRequest);
-		switch (status)
-   		{
-   			case TI_OK:
-      			return TI_OK;
-			case NOT_CONNECTED:
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Not connected to an AP...\n");
-				break;
-   			case NO_QOS_AP:
-      TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "AP does not support QOS...\n");
-      			break;
-   			case TI_NOK:
-      TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Invalid parameter...\n");
-      			break;
-   			default:
-      TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Unknown return value...\n");
-      			break;			
-   		}
-		return TI_NOK;
-
-	case QOS_SET_RX_TIME_OUT:
-		if (pParamInfo->content.rxTimeOut.UPSD == 0)
-		{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, " :Error trying to set invalid zero timeout for UPSD \n");
-				return PARAM_VALUE_NOT_VALID;
-				
-		}
-		pQosMngr->rxTimeOut.psPoll = (TI_UINT16)pParamInfo->content.rxTimeOut.psPoll;
-		pQosMngr->rxTimeOut.UPSD = (TI_UINT16)pParamInfo->content.rxTimeOut.UPSD;
-
-
-		/* set RxTimeOut to FW */
-		param.paramType	= TWD_RX_TIME_OUT_PARAM_ID;
-		param.content.halCtrlRxTimeOut = pQosMngr->rxTimeOut;
-		TWD_SetParam (pQosMngr->hTWD, &param); 
-		break;
-
-	case QOS_MNGR_VOICE_RE_NEGOTIATE_TSPEC:
-
-		if( pParamInfo->content.TspecConfigure.voiceTspecConfigure || pParamInfo->content.TspecConfigure.videoTspecConfigure)
-            pQosMngr->performTSPECRenegotiation = TI_TRUE;
-		else
-			pQosMngr->performTSPECRenegotiation = TI_FALSE;
-
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_setParams: QOS_MNGR_VOICE_RE_NEGOTIATE_TSPEC=%d\n", pQosMngr->performTSPECRenegotiation);
-	   break;
-
-	default:
-         TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_getParams Error: unknown paramType 0x%x!\n",pParamInfo->paramType);
-			return (PARAM_NOT_SUPPORTED);
-	}
-
-	return TI_OK;
-
-
-}
-
-/************************************************************************
- *                        verifyAndConfigTrafficParams  			    *
- ************************************************************************
-DESCRIPTION: The function verifies the parameters set by qosMngr to 
-             the queue traffic params in whalCtrl to be configured to TNET. 
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-            pAcTrafficParams     -  pointer to ac parameters.
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-static TI_STATUS verifyAndConfigTrafficParams(qosMngr_t *pQosMngr, TQueueTrafficParams *pQtrafficParams)
-{
-    TTwdParamInfo		   param;    
-    TQueueTrafficParams   queueTrafficParams;
-
-	if(pQtrafficParams->queueID > MAX_NUM_OF_AC - 1)
-    {
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "verifyAndConfigTrafficParams :Error  trying to set invalid queueID: %d param",pQtrafficParams->queueID);
-
-		return (PARAM_VALUE_NOT_VALID);
-	}
-
-
-	if(pQtrafficParams->channelType > MAX_CHANNEL_TYPE)
-	{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "verifyAndConfigTrafficParams :Error  trying to set invalid channelType: %d param",pQtrafficParams->channelType);
-
-		return (PARAM_VALUE_NOT_VALID);
-
-	}
-
-    /* TBD */
-	if(pQtrafficParams->tsid > AC_PARAMS_MAX_TSID)
-	{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "verifyAndConfigTrafficParams :Error  trying to set invalid tsid: %d param",pQtrafficParams->tsid);
-
-		return (PARAM_VALUE_NOT_VALID);
-
-	}
-
-	if(pQtrafficParams->psScheme > MAX_PS_SCHEME)
-	{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "verifyAndConfigTrafficParams :Error  trying to set invalid psScheme: %d param",pQtrafficParams->psScheme);
-
-		return (PARAM_VALUE_NOT_VALID);
-	}
-
-	if(pQtrafficParams->ackPolicy > MAX_ACK_POLICY)
-	{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "verifyAndConfigTrafficParams :Error  trying to set invalid ackPolicy: %d param",pQtrafficParams->ackPolicy);
-
-		return (PARAM_VALUE_NOT_VALID);
-	}
-
-    queueTrafficParams = *pQtrafficParams;
-
-	param.paramType = TWD_QUEUES_PARAM_ID;
-	/* set parameters */
-	param.content.pQueueTrafficParams = &queueTrafficParams;
-
-	return TWD_SetParam (pQosMngr->hTWD, &param);
-}
-
-/************************************************************************
- *                        verifyAndConfigQosParams          		    *
- ************************************************************************
-DESCRIPTION: The function verifies the parameters set by qosMngr to 
-             the AC Qos params in whalCtrl to be configured to TNET. 
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-            pAcTrafficParams     -  pointer to ac parameters.
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-static TI_STATUS  verifyAndConfigQosParams(qosMngr_t *pQosMngr,TAcQosParams *pAcQosParams)
-{
-	TAcQosParams          acQosParams;
-
-	if(pAcQosParams->ac >  MAX_NUM_OF_AC - 1 )
-    {
-        TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "verifyAndConfigQosParams :Error  trying to set invalid ac : %d param",pAcQosParams->ac);
-        return (PARAM_VALUE_NOT_VALID);
-	}
-    /*  verification is unnecessary due to limited range of pAcQosParams->aifsn data type (TI_UINT8)
-	if(pAcQosParams->aifsn >  QOS_AIFS_MAX )
-    {
-        TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "verifyAndConfigQosParams :Error  trying to set invalid aifsn : %d param",pAcQosParams->aifsn);
-
-       return (PARAM_VALUE_NOT_VALID);
-	}
-    */
-	if(pAcQosParams->cwMax >  QOS_CWMAX_MAX )
-    {
-        TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "verifyAndConfigQosParams :Error  trying to set invalid cwMax : %d param",pAcQosParams->cwMax);
-        return (PARAM_VALUE_NOT_VALID);
-	}
-
-	if(pAcQosParams->cwMin >  QOS_CWMIN_MAX )
-    {
-        TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "verifyAndConfigQosParams :Error  trying to set invalid cwMax : %d param",pAcQosParams->cwMax);
-        return (PARAM_VALUE_NOT_VALID);
-	}
-
-	if(pAcQosParams->txopLimit >  QOS_TX_OP_LIMIT_MAX )
-    {
-        TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "verifyAndConfigQosParams :Error  trying to set invalid txopLimit : %d param",pAcQosParams->txopLimit);
-        return (PARAM_VALUE_NOT_VALID);
-	}
-
-	acQosParams.ac = pAcQosParams->ac;
-	acQosParams.aifsn =  pAcQosParams->aifsn;
-
-	/* convert to TNET units */
-	acQosParams.cwMax =  (1 << pAcQosParams->cwMax) - 1; /* CwMax = 2^CwMax - 1*/
-	acQosParams.cwMin =  (1 << pAcQosParams->cwMin) - 1; /* CwMin = 2^CwMin - 1*/
-	acQosParams.txopLimit =  pAcQosParams->txopLimit << 5; /* in us */
-
-	return TWD_CfgAcParams (pQosMngr->hTWD, &acQosParams, NULL, NULL);
-}
-
-/************************************************************************
- *                        qosMngr_GetWmeEnableFlag    			            *
- ************************************************************************
-DESCRIPTION: The function is called in order to get the WME enable flag 
-             of qosMngr according to init file desired mode.
-             called from StaCap_GetHtCapabilitiesIe.
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-            bWmeEnable           -  return flag.   
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS qosMngr_GetWmeEnableFlag(TI_HANDLE hQosMngr, TI_BOOL *bWmeEnable)
-{
-   	qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-
-	*bWmeEnable = pQosMngr->WMEEnable;
-
-    return TI_OK;
-}
-
-/************************************************************************
- *                        qosMngr_selectActiveProtocol    			            *
- ************************************************************************
-DESCRIPTION: The function is called in order to set the active protocol in
-             the qosMngr according to site capabilities and desired mode.
-             called from SystemConfig.
-                                                                                                   
-INPUT:      
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS qosMngr_selectActiveProtocol(TI_HANDLE  hQosMngr)
-{
-   	qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-
-	/* decide qos protocol */
-	/* NOTE: if both XCC qnd wme supported wme is chosen */
-	if(pQosMngr->WMESiteSupport && pQosMngr->WMEEnable)
-	{
-		pQosMngr->activeProtocol = QOS_WME;
-	}
-	else
-    {
-		pQosMngr->activeProtocol = QOS_NONE;
-	}
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, " qosMngr_selectActiveProtocol() : pQosMngr->activeProtocol %d\n",pQosMngr->activeProtocol);
-
-    return TI_OK;
-}
-
-/************************************************************************
- *                        qosMngr_setAcPsDeliveryMode    			            *
- ************************************************************************
-DESCRIPTION: The function is called in order to set the upsd/ps_poll according 
-             to the desired and current upsd mode (per AC as well).
-             called from systemConfig.
-                                                                                                   
-INPUT:      
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS qosMngr_setAcPsDeliveryMode(TI_HANDLE  hQosMngr)
-{
-   TI_UINT8 acID;
-   qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-
-	/* in case the current PS mode is not UPSD  - the IE is empty */
-	if(pQosMngr->currentPsMode == PS_SCHEME_UPSD_TRIGGER)
-	{
-		for(acID = FIRST_AC_INDEX;acID < MAX_NUM_OF_AC; acID++)
-		{
-			if(pQosMngr->acParams[acID].desiredWmeAcPsMode == PS_SCHEME_UPSD_TRIGGER)
-			{
-				pQosMngr->acParams[acID].currentWmeAcPsMode = PS_SCHEME_UPSD_TRIGGER;
-			}
-		}
-    }
-	
-	return TI_OK;
-
-}
-
-
-/************************************************************************
- *                        qosMngr_getQosCapabiltyInfeElement    			            *
- ************************************************************************
-DESCRIPTION: The function is called in order to build the Qos Capability
-			 IE for the associatiomn request.
-                                                                                                   
-INPUT:      
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS qosMngr_getQosCapabiltyInfeElement(TI_HANDLE  hQosMngr, TI_UINT8 *pQosIe, TI_UINT32 *pLen)
-{    
-	qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-	dot11_QOS_CAPABILITY_IE_t *dot11_QOS_CAPABILITY_IE = (dot11_QOS_CAPABILITY_IE_t *)pQosIe;
-	TI_STATUS status = TI_OK;
-	TI_UINT8	extraIeLen = 0;
-	
-	if(pQosMngr->activeProtocol == QOS_WME)
-	{
-		dot11_QOS_CAPABILITY_IE->hdr[0]    = DOT11_QOS_CAPABILITY_ELE_ID;
-		dot11_QOS_CAPABILITY_IE->hdr[1]   = DOT11_QOS_CAPABILITY_ELE_LEN;
-		
-		/* The default configuration of QoS info Field is legacy PS for all ACs */
-		dot11_QOS_CAPABILITY_IE->QosInfoField = 0;
-		
-		/* in case the current PS mode is not UPSD  - the IE is empty */
-		if(pQosMngr->currentPsMode == PS_SCHEME_UPSD_TRIGGER)
-		{
-			if(pQosMngr->acParams[QOS_AC_VO].currentWmeAcPsMode == PS_SCHEME_UPSD_TRIGGER)
-			{
-				dot11_QOS_CAPABILITY_IE->QosInfoField |= (1 << AC_VO_APSD_FLAGS_SHIFT);
-			}
-			if(pQosMngr->acParams[QOS_AC_VI].currentWmeAcPsMode == PS_SCHEME_UPSD_TRIGGER)
-			{
-				dot11_QOS_CAPABILITY_IE->QosInfoField |= (1 << AC_VI_APSD_FLAGS_SHIFT);
-			}
-
-			if(pQosMngr->acParams[QOS_AC_BK].currentWmeAcPsMode == PS_SCHEME_UPSD_TRIGGER)
-			{
-				dot11_QOS_CAPABILITY_IE->QosInfoField |= (1 << AC_BK_APSD_FLAGS_SHIFT);
-			}
-
-			if(pQosMngr->acParams[QOS_AC_BE].currentWmeAcPsMode == PS_SCHEME_UPSD_TRIGGER)
-			{
-				dot11_QOS_CAPABILITY_IE->QosInfoField |= (1 << AC_BE_APSD_FLAGS_SHIFT);
-			}
-
-			dot11_QOS_CAPABILITY_IE->QosInfoField |= (((pQosMngr->desiredMaxSpLen) & MAX_SP_LENGTH_MASK) << MAX_SP_LENGTH_SHIFT);
-
-            TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "dot11_QOS_CAPABILITY_IE->QosInfoField = 0x%x\n",dot11_QOS_CAPABILITY_IE->QosInfoField);
-		}
-
-		*pLen = dot11_QOS_CAPABILITY_IE->hdr[1] + sizeof(dot11_eleHdr_t);
-		
-#ifdef XCC_MODULE_INCLUDED
-		/* If required, add XCC info-elements to the association request packets */
-		if (pQosMngr->performTSPECRenegotiation == TI_TRUE)
-		{
-            TRACE0(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_getQosCapabiltyInfeElement: performing TSPEC renegotiation\n");
-
-			status = XCCMngr_getXCCQosIElements(pQosMngr->hXCCMgr, (pQosIe+(*pLen)), &extraIeLen);
-		}
-#endif
-		*pLen += extraIeLen;
-	}
-	else
-	{
-		*pLen = 0;
-	}
-
-	return status;
-
-}
-/************************************************************************
- *                        qosMngr_assocReqBuild    			            *
- ************************************************************************
-DESCRIPTION: The function is called in order to build the assocReq IE for
-             the current site QOS protocol.
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-TI_STATUS qosMngr_assocReqBuild(TI_HANDLE  hQosMngr, TI_UINT8 *pQosIe, TI_UINT32 *pLen)
-{
-    qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-	TI_STATUS		status;
-	TI_UINT8 temp;
-
-	
-	if(pQosMngr == NULL)
-	{
-		*pLen = 0;
-		return TI_OK;
-	}	
-
-	/* building assocReq frame */
-	switch(pQosMngr->activeProtocol)
-	{
-	case QOS_WME:
-		status = getWMEInfoElement(pQosMngr,pQosIe,&temp);
-		if (status !=TI_OK) 
-		{
-			*pLen = 0;
-		}
-		*pLen = temp;
-		break;
-
-	case QOS_NONE:
-			*pLen = 0;
-			return TI_OK;
-
-	default:
-			*pLen = 0;
-		break;
-	}
-	
-	return TI_OK;
-}
-
-/************************************************************************
- *                        getWMEInfoElement     			            *
- ************************************************************************
-DESCRIPTION: building QOS_WME IE.
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-static TI_STATUS getWMEInfoElement(qosMngr_t *pQosMngr,TI_UINT8 *pWMEie,TI_UINT8 *pLen)
-{
-	dot11_WME_IE_t *pDot11_WME_IE = (dot11_WME_IE_t *)pWMEie;
-
-	pDot11_WME_IE->hdr[0]         = DOT11_WME_ELE_ID;
-	pDot11_WME_IE->hdr[1]        = DOT11_WME_ELE_LEN;
-	pDot11_WME_IE->OUI[0]            = 0x00;
-	pDot11_WME_IE->OUI[1]            = 0x50;
-	pDot11_WME_IE->OUI[2]            = 0xf2;
-	pDot11_WME_IE->OUIType           = dot11_WME_OUI_TYPE;
-	pDot11_WME_IE->OUISubType        = dot11_WME_OUI_SUB_TYPE_IE;
-	pDot11_WME_IE->version           = dot11_WME_VERSION;
-	pDot11_WME_IE->ACInfoField       = 0;
-
-	if(pQosMngr->currentPsMode == PS_SCHEME_UPSD_TRIGGER)
-	{
-		if(pQosMngr->acParams[QOS_AC_VO].currentWmeAcPsMode == PS_SCHEME_UPSD_TRIGGER)
-		{
-			pDot11_WME_IE->ACInfoField |= (1 << AC_VO_APSD_FLAGS_SHIFT);
-		}
-		if(pQosMngr->acParams[QOS_AC_VI].currentWmeAcPsMode == PS_SCHEME_UPSD_TRIGGER)
-		{
-			pDot11_WME_IE->ACInfoField |= (1 << AC_VI_APSD_FLAGS_SHIFT);
-		}
-
-		if(pQosMngr->acParams[QOS_AC_BK].currentWmeAcPsMode == PS_SCHEME_UPSD_TRIGGER)
-		{
-			pDot11_WME_IE->ACInfoField |= (1 << AC_BK_APSD_FLAGS_SHIFT);
-		}
-
-		if(pQosMngr->acParams[QOS_AC_BE].currentWmeAcPsMode == PS_SCHEME_UPSD_TRIGGER)
-		{
-			pDot11_WME_IE->ACInfoField |= (1 << AC_BE_APSD_FLAGS_SHIFT);
-		}
-
-		pDot11_WME_IE->ACInfoField |= (((pQosMngr->desiredMaxSpLen) & MAX_SP_LENGTH_MASK) << MAX_SP_LENGTH_SHIFT);
-	}
-
-	*pLen = pDot11_WME_IE->hdr[1] + sizeof(dot11_eleHdr_t);
-
-	return TI_OK;
-
-}
-
-/************************************************************************
- *                        qosMngr_checkTspecRenegResults		        *
- ************************************************************************
-DESCRIPTION: The function is called upon association response to check 
-            Tspec renegotiation results
-                                                                                                   
-INPUT:      hQosMngr	  -	Qos Manager handle.
-            assocRsp      -  pointer to received IE parameters received 
-			                 in association response. 
-OUTPUT:		
-
-RETURN:     -
-
-************************************************************************/
-void qosMngr_checkTspecRenegResults(TI_HANDLE hQosMngr, assocRsp_t *assocRsp)
-{
-	tspecInfo_t	tspecInfo;
-	qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-#ifdef XCC_MODULE_INCLUDED
-	TI_UINT32 acCount;
-#endif
-
-TRACE2(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_checkTspecRenegResults: performTSPECRenegotiation = %d, tspecParams received= %x\n",		pQosMngr->performTSPECRenegotiation, assocRsp->tspecVoiceParameters);
-
-	if (pQosMngr->performTSPECRenegotiation != TI_TRUE)
-	{
-		/* If no re-negotiation was requested, no parsing shall be done */
-#ifdef XCC_MODULE_INCLUDED
-		measurementMgr_disableTsMetrics(pQosMngr->hMeasurementMngr, MAX_NUM_OF_AC);
-#endif
-		return;
-	}
-
-	if ( (assocRsp->tspecVoiceParameters == NULL) && (assocRsp->tspecSignalParameters == NULL) )
-	{
-		/* The renegotiation request was ignored - update QoS Manager database */
-		qosMngr_setAdmissionInfo(pQosMngr, USER_PRIORITY_6, 
-								 &pQosMngr->resourceMgmtTable.candidateTspecInfo[USER_PRIORITY_6], 
-								 STATUS_TRAFFIC_ADM_REQUEST_REJECT);
-
-		if (pQosMngr->tspecRenegotiationParams[USER_PRIORITY_4].uUserPriority != MAX_USER_PRIORITY)
-		{
-			qosMngr_setAdmissionInfo(pQosMngr, USER_PRIORITY_4, 
-									 &pQosMngr->resourceMgmtTable.candidateTspecInfo[USER_PRIORITY_4], 
-									 STATUS_TRAFFIC_ADM_REQUEST_REJECT);
-		}
-#ifdef XCC_MODULE_INCLUDED
-        measurementMgr_disableTsMetrics(pQosMngr->hMeasurementMngr, MAX_NUM_OF_AC);
-#endif
-		return;
-	}
-
-
-	if (assocRsp->tspecVoiceParameters != NULL)
-	{
-	/* The renogitaion was performed - update QoS Manager database */
-	pQosMngr->voiceTspecConfigured = TI_TRUE;
-	trafficAdmCtrl_parseTspecIE(&tspecInfo, assocRsp->tspecVoiceParameters);
-
-	qosMngr_setAdmissionInfo(pQosMngr, tspecInfo.AC, &tspecInfo, STATUS_TRAFFIC_ADM_REQUEST_ACCEPT);
-	}
-
-	if (assocRsp->tspecSignalParameters != NULL)
-	{
-		/* Signal TSPEC was re-negotiated as well */
-		pQosMngr->videoTspecConfigured = TI_TRUE;
-		trafficAdmCtrl_parseTspecIE(&tspecInfo, assocRsp->tspecSignalParameters);
-		qosMngr_setAdmissionInfo(pQosMngr, tspecInfo.AC, &tspecInfo, STATUS_TRAFFIC_ADM_REQUEST_ACCEPT);
-	}
-	else if (pQosMngr->tspecRenegotiationParams[USER_PRIORITY_4].uUserPriority != MAX_USER_PRIORITY) 
-	{
-		/* Signal TSPEC was not re-negotiated although requested to - ERROR */
-        TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite: Signal TSPEC was not re-negotiated while voice was \n");
-		qosMngr_setAdmissionInfo(pQosMngr, USER_PRIORITY_4, 
-								 &pQosMngr->resourceMgmtTable.candidateTspecInfo[USER_PRIORITY_4], 
-								 STATUS_TRAFFIC_ADM_REQUEST_REJECT);
-	}
-
-#ifdef XCC_MODULE_INCLUDED
-	/* If XCC IEs are present for one or more ACs, update other modules with received parameters */
-	for (acCount = 0; acCount < MAX_NUM_OF_AC; acCount++)
-	{
-		XCCMngr_setXCCQoSParams(pQosMngr->hXCCMgr, &assocRsp->XCCIEs[acCount], acCount);
-	}
-#endif
-}
-
-
-/************************************************************************
- *                        qosMngr_setSite        			            *
- ************************************************************************
-DESCRIPTION: The function is called upon association response to set site 
-             parameters.
-                                                                                                   
-INPUT:      hQosMngr	  -	Qos Manager handle.
-            assocRsp      -  pointer to received IE parameters received 
-			                 in association response. 
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS qosMngr_setSite(TI_HANDLE hQosMngr, assocRsp_t *assocRsp)
-{
-	qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-	TI_STATUS  status;
-
-	if(hQosMngr == NULL)
-        return TI_NOK;
-
-	/* checking active protocol */
-	switch(pQosMngr->activeProtocol)
-	{
-		case QOS_WME:
-			/* verify QOS protocol received in association response */
-			status = verifyWmeIeParams(pQosMngr, (TI_UINT8 *)assocRsp->WMEParams);
-			if(status != TI_OK)
-			{
-                pQosMngr->activeProtocol = QOS_NONE;
-                TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite: setting active protocol QOS_WME params with non QOS_WME IE params frame, setting active protocol back to NONE \n");
-                status = qosMngr_setSite(hQosMngr, assocRsp);
-                return status;
-			}
-
-            status = setWmeSiteParams(pQosMngr, (TI_UINT8 *)assocRsp->WMEParams);
-			if (status != TI_OK)
-			{
-                pQosMngr->activeProtocol = QOS_NONE;
-                TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "Warning: qosMngr_setSite-> failed to set AC QOS_WME parameters!!! , setting active protocol back to NONE\n");
-                return TI_NOK;
-			}
-			/* update siteMgr with recevied params */
-			status = siteMgr_setWMEParamsSite(pQosMngr->hSiteMgr, assocRsp->WMEParams);
-			if (status != TI_OK)
-			{
-                pQosMngr->activeProtocol = QOS_NONE;
-                TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite:failed to init QOS_WME parameters!!! , setting active protocol back to NONE\n\n");
-                return TI_NOK;
-			}
-
-			break;
-
-	case QOS_NONE:
-
-			/* Check if the packet burst is enable, if it is, 
-			should update the BE parames and the hal to the packet burst def */
-			if (pQosMngr->qosPacketBurstEnable == TI_TRUE)
-			{
-				/* Update the acTrafficInitParams of BE to the packet burst def*/
-				pQosMngr->acParams[QOS_AC_BE].acQosInitParams.txopLimit = pQosMngr->qosPacketBurstTxOpLimit;
-				/* Update the acTrafficParams of BE to the packet burst def*/
-				pQosMngr->acParams[QOS_AC_BE].acQosInitParams.txopLimit = pQosMngr->qosPacketBurstTxOpLimit;
-				/* verify the parameters and update the hal */
-				status = verifyAndConfigQosParams(hQosMngr,&(pQosMngr->acParams[QOS_AC_BE].acQosParams));
-				if (status != TI_OK)
-				{
-                    TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "qosMngr_setSite:failed to init NON_QOS parameters!!!\n\n");
-					return TI_NOK;
-				}
-			}
-
-		break;
-
-	default:
-        TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "Warning: qosMngr_setSite NO active protocls To set \n");
-		break;
-	}
-
-	/* Check if TSPEC re-negotiation was performed, if so - look for results */
-	qosMngr_checkTspecRenegResults(pQosMngr, assocRsp);
- 
-    return TI_OK;
-
-}
-
-/************************************************************************
- *                        qosMngr_updateIEinfo     			            *
- ************************************************************************
-DESCRIPTION: The function is called upon run-time update of AC parameters
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-            pQosIeParams         -  pointer to received IE parameters received 
-			                        in beacon or probe response. 
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-void qosMngr_updateIEinfo(TI_HANDLE hQosMngr, TI_UINT8 *pQosIeParams, EQosProtocol qosSetProtocol)
-{
-	qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-	TI_STATUS  status;
-	dot11_WME_PARAM_t		*pWMEparams;
-
-
-
-	if(pQosMngr == NULL)
-		return;
-
-	/* checking active protocol */
-	switch(pQosMngr->activeProtocol)
-	{
-	case QOS_WME:
-		if(qosSetProtocol != QOS_WME)
-			return;
-
-		if(pQosIeParams == NULL)
-		{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "Warning: updateIEinfo -> trying to update QOS_WME parameters with NULL site parameters!!!\n");
-			return ;
-		}
-
-		/* verify QOS protocol received in update IE */
-		status = verifyWmeIeParams(pQosMngr,pQosIeParams);
-		if(status != TI_OK)
-		{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "Warning: updateIEinfo ->upadting active protocl QOS_WME params with non QOS_WME IE params frame !!!\n");
-			return ;
-		}
-		pWMEparams = (dot11_WME_PARAM_t *)pQosIeParams;
-
-		/* update AC params */
-		status = updateACParams(pQosMngr,&(pWMEparams->WME_ACParameteres));
-		if(status != TI_OK)
-		{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "updateIEinfo-> failed to update AC QOS_WME parameters!!!\n\n");
-			return ;
-		}
-		break;
-
-
-	default:
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "updateIEinfo-> trying to update qos paramters without active protocol !!!");
-		break;
-	}
-}
-
-/************************************************************************
- *                        qosMngr_buildTSPec       			            *
- ************************************************************************/
-TI_UINT32 qosMngr_buildTSPec(TI_HANDLE hQosMngr, TI_UINT32 user_priority, TI_UINT8 *pQosIe)
-{
-	qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-	OS_802_11_QOS_TSPEC_PARAMS *pPreservedParams;
-	tspecInfo_t *pCandidateParams;
-	TI_UINT32 ieLen;
-
-	pPreservedParams = &pQosMngr->tspecRenegotiationParams[user_priority];
-	pCandidateParams = &pQosMngr->resourceMgmtTable.candidateTspecInfo[user_priority];
-
-	if (pPreservedParams->uUserPriority != MAX_USER_PRIORITY)
-	{
-		qosMngr_storeTspecCandidateParams (pCandidateParams, pPreservedParams, user_priority);
-		pCandidateParams->trafficAdmState = AC_WAIT_ADMISSION;
-
-		trafficAdmCtrl_buildTSPec(pQosMngr->pTrafficAdmCtrl, pCandidateParams, pQosIe, &ieLen);
-		return ieLen;
-	}
-	else
-	{
-		return 0;
-	}
-}
-
-/************************************************************************
- *                        setWmeSiteParams        			            *
- ************************************************************************
-DESCRIPTION: The function is called upon association response to set QOS_WME site 
-             parameters.
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-            pQosIeParams         -  pointer to received IE parameters received 
-			                        in association response. 
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-static TI_STATUS setWmeSiteParams(qosMngr_t *pQosMngr, TI_UINT8 *pQosIeParams)
-{
-	dot11_WME_PARAM_t  *pWMEparams = (dot11_WME_PARAM_t *)pQosIeParams;
-	TI_STATUS           status;         
-	TI_UINT8               acID;
-
-	if (pQosIeParams == NULL)
-	{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "setWmeSiteParams: pQosIeParams is NULL !");
-		return TI_NOK;
-	}
-	
-	for(acID = FIRST_AC_INDEX;acID < MAX_NUM_OF_AC; acID++)
-	{
-	   /* configure Ack-Policy to TxCtrl. */
-		txCtrlParams_setAcAckPolicy(pQosMngr->hTxCtrl, acID, pQosMngr->acParams[acID].wmeAcAckPolicy);
-	}
-
-	/* update AC params */
-	pWMEparams->WME_ACParameteres.ACBEParametersRecord.TXOPLimit = 
-		ENDIAN_HANDLE_WORD(pWMEparams->WME_ACParameteres.ACBEParametersRecord.TXOPLimit);
-	pWMEparams->WME_ACParameteres.ACBKParametersRecord.TXOPLimit = 
-		ENDIAN_HANDLE_WORD(pWMEparams->WME_ACParameteres.ACBKParametersRecord.TXOPLimit);
-	pWMEparams->WME_ACParameteres.ACVIParametersRecord.TXOPLimit = 
-		ENDIAN_HANDLE_WORD(pWMEparams->WME_ACParameteres.ACVIParametersRecord.TXOPLimit);
-	pWMEparams->WME_ACParameteres.ACVOParametersRecord.TXOPLimit = 
-		ENDIAN_HANDLE_WORD(pWMEparams->WME_ACParameteres.ACVOParametersRecord.TXOPLimit);
-
-	status = updateACParams(pQosMngr,&(pWMEparams->WME_ACParameteres));
-	if(status != TI_OK)
-		return status;
-
-	/* update Tx header convert mode */
-	txCtrlParams_setQosHeaderConverMode(pQosMngr->hTxCtrl, HDR_CONVERT_QOS);
-
-	return TI_OK;
-}
-
-
-/************************************************************************
- *                        updateACParams     			                *
- ************************************************************************
-DESCRIPTION: the function is called upon QOS protocol updates paramters 
-             to TNET and TxCtrl object 
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-static TI_STATUS updateACParams(qosMngr_t *pQosMngr,dot11_ACParameters_t *pAcParams)
-{
-	TI_UINT8    acID,i;
-	TI_STATUS   status;
-    dot11_QOS_AC_IE_ParametersRecord_t *pACParameteresRecord;
-    ETrafficAdmState *pAcTrafficAdmState;
-
-
-	/*
-	 * For QOS_WME: setting ac traffic params (edcf etc')  
-	 * in this order BE, BK , VI, VO .
-	 */
-
-    pACParameteresRecord = (dot11_QOS_AC_IE_ParametersRecord_t *)pAcParams;
-
-	for(i = FIRST_AC_INDEX; i < MAX_NUM_OF_AC; i++, pACParameteresRecord++)
-	{
-        acID = (pACParameteresRecord->ACI_AIFSN & AC_PARAMS_ACI_MASK) >> 5;
-
-        pAcTrafficAdmState = &(pQosMngr->resourceMgmtTable.currentTspecInfo[acID].trafficAdmState);		
-
-		/* edcf params */
-
-		pQosMngr->acParams[acID].acQosParams.ac        				   = acID;
-		pQosMngr->acParams[acID].acQosParams.aifsn                     = pACParameteresRecord->ACI_AIFSN & AC_PARAMS_AIFSN_MASK;
-		pQosMngr->acParams[acID].acQosParams.txopLimit                 = pACParameteresRecord->TXOPLimit;
-
-        /* to use user setting ? */
-        if(TI_TRUE ==pQosMngr->bCwFromUserEnable)
-        {
-            pQosMngr->acParams[acID].acQosParams.cwMin                 = pQosMngr->uDesireCwMin;
-            pQosMngr->acParams[acID].acQosParams.cwMax                 = pQosMngr->uDesireCwMax;
-        }
-        else
-        {
-            pQosMngr->acParams[acID].acQosParams.cwMin                 = pACParameteresRecord->ECWmin_ECWmax & AC_PARAMS_CWMIN_MASK;
-            pQosMngr->acParams[acID].acQosParams.cwMax                 = (pACParameteresRecord->ECWmin_ECWmax & AC_PARAMS_CWMAX_MASK) >> 4;
-        }
-
-		status = verifyAndConfigQosParams(pQosMngr,&(pQosMngr->acParams[acID].acQosParams));
-		if(status != TI_OK)
-			return status;
-
-
-		/* UPSD configuration */
-		pQosMngr->acParams[acID].QtrafficParams.psScheme = pQosMngr->acParams[acID].currentWmeAcPsMode;
-		status = verifyAndConfigTrafficParams(pQosMngr,&(pQosMngr->acParams[acID].QtrafficParams));
-		if(status != TI_OK)
-			return status;
-
-
-		/* update admission state */
-		if(pACParameteresRecord->ACI_AIFSN & AC_PARAMS_ACM_MASK)
-		{
-			pQosMngr->acParams[acID].apInitAdmissionState = ADMISSION_REQUIRED;
-			*pAcTrafficAdmState = AC_NOT_ADMITTED;
-
-			txCtrlParams_setAcAdmissionStatus(pQosMngr->hTxCtrl, acID, ADMISSION_REQUIRED, AC_NOT_ADMITTED);
-		}
-		else
-		{
-			pQosMngr->acParams[acID].apInitAdmissionState = ADMISSION_NOT_REQUIRED;
-			*pAcTrafficAdmState = AC_ADMITTED;
-
-			txCtrlParams_setAcAdmissionStatus(pQosMngr->hTxCtrl, acID, ADMISSION_NOT_REQUIRED, AC_ADMITTED);
-		}
-
-        /* If AC is admidtted and has enabled PS-Rx-Streamings, configure it to FW */
-        /* Note: this may occur after roaming */
-        if (*pAcTrafficAdmState == AC_ADMITTED) 
-        {
-            TI_UINT32       uTid1       = WMEQosAcToTid[acID];
-            TI_UINT32       uTid2       = WMEQosMateTid[uTid1];
-            TPsRxStreaming *pTid1Params = &pQosMngr->aTidPsRxStreaming[uTid1];
-            TPsRxStreaming *pTid2Params = &pQosMngr->aTidPsRxStreaming[uTid2];
-
-            if (pTid1Params->bEnabled) 
-            {
-                TWD_CfgPsRxStreaming (pQosMngr->hTWD, pTid1Params, NULL, NULL);
-            }
-            if (pTid2Params->bEnabled) 
-            {
-                TWD_CfgPsRxStreaming (pQosMngr->hTWD, pTid2Params, NULL, NULL);
-            }
-        }
-	}
-
-	return TI_OK;
-}
-
-
-
-/************************************************************************
- *                        verifyWmeIeParams     			            *
- ************************************************************************
-DESCRIPTION: verify QOS_WME IE.
-                                                                                                   
-INPUT:      hQosMngr	         -	Qos Manager handle.
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-static TI_STATUS verifyWmeIeParams(qosMngr_t *pQosMngr,TI_UINT8 *pQosIeParams)
-{
-	dot11_WME_IE_t  WMEie;
-	TI_UINT8           Len;
-	dot11_WME_IE_t  *pWMERecvIe = (dot11_WME_IE_t  *)pQosIeParams;
-
-	if(pQosIeParams == NULL)
-	{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, ": pQosIeParams is NULL!! \n");
-		return TI_NOK;
-	}
-
-	/* get QOS_WME IE */
-	getWMEInfoElement(pQosMngr,(TI_UINT8 *)&WMEie,(TI_UINT8 *)&Len);
-
-	if((WMEie.hdr[0] != pWMERecvIe->hdr[0] ) ||
-	   (WMEie.OUI[0] != pWMERecvIe->OUI[0]) ||
-	   (WMEie.OUI[1] != pWMERecvIe->OUI[1]) ||
-	   (WMEie.OUI[2] != pWMERecvIe->OUI[2]) ||
-	   (WMEie.OUIType != pWMERecvIe->OUIType))
-	{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, ": QosIeParams mismatch (ID or OUI)!! \n");
-		return TI_NOK;
-	}
-
-
-    if(WMEie.version != pWMERecvIe->version)
-TRACE2(pQosMngr->hReport, REPORT_SEVERITY_WARNING, ": Driver QOS_WME version: %d, Site QOS_WME version: %d\n", WMEie.version, pWMERecvIe->version);
-
-	return TI_OK;
-}
-
-
-/************************************************************************
- *                        qosMngr_SetPsRxStreaming                      *
- ************************************************************************
-DESCRIPTION: Verify and configure a TID PS-Rx-Streaming setting
-                                                                                                   
-INPUT:      pQosMngr	- Qos Manager handle.
-            pNewParams  - The new TID streaming parameters to configure
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, relevant failures otherwise
-
-************************************************************************/
-static TI_STATUS qosMngr_SetPsRxStreaming (qosMngr_t *pQosMngr, TPsRxStreaming *pNewParams)
-{
-    TI_UINT32       uCurrTid            = pNewParams->uTid;
-    TI_UINT32       uAcId               = WMEQosTagToACTable[uCurrTid];
-    TPsRxStreaming  *pCurrTidParams     = &pQosMngr->aTidPsRxStreaming[uCurrTid];
-    TI_BOOL         bTidPrevEnabled     = pCurrTidParams->bEnabled;
-
-	/* Verify STA is connected to AP */
-	if (pQosMngr->isConnected == TI_FALSE)
-	{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_SetPsRxStreaming: Not connected - Ignoring request !!!\n");
-		return NOT_CONNECTED;
-	}
-
-	/* Check TID validity */
-	if (uCurrTid > MAX_USER_PRIORITY)
-	{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "TID = %d > 7 !!!\n", uCurrTid);
-		return PARAM_VALUE_NOT_VALID;
-	}
-
-	/* Verify that the AC is admitted */
-	if (pQosMngr->resourceMgmtTable.currentTspecInfo[uAcId].trafficAdmState != AC_ADMITTED)
-	{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_SetPsRxStreaming: AC = %d is not admitted -> Ignoring request !!!\n", uAcId);
-		return USER_PRIORITY_NOT_ADMITTED;
-	}
-
-	/* Verify that a disabled TID is not beeing disabled again */
-	if (!pNewParams->bEnabled && !pCurrTidParams->bEnabled)
-	{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_SetPsRxStreaming: TID %d is already disabled -> Ignoring request !!!\n", uCurrTid);
-		return PARAM_VALUE_NOT_VALID;
-	}
-
-	/* Verify that the max number of enabled TIDs is not exeeded */
-	if (pNewParams->bEnabled  &&  
-        !pCurrTidParams->bEnabled  &&
-        pQosMngr->uNumEnabledPsRxStreams == MAX_ENABLED_PS_RX_STREAMS)
-	{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_SetPsRxStreaming: Can't have more than %d TIDs enabled -> Ignoring request !!!\n", MAX_ENABLED_PS_RX_STREAMS);
-		return PARAM_VALUE_NOT_VALID;
-	}
-
-    /* Save the new streaming configuration of the TID */
-    os_memoryCopy (pQosMngr->hOs, (void *)pCurrTidParams, (void *)pNewParams, sizeof(TPsRxStreaming));
-
-    /* Update the relevant AC which of its TIDs parameters to use (save pointer of desired TID) */
-	if (pCurrTidParams->bEnabled)
-    {
-        if (!bTidPrevEnabled) 
-        {
-            pQosMngr->uNumEnabledPsRxStreams++;
-        }
-    }
-	else 
-    {
-        pQosMngr->uNumEnabledPsRxStreams--;
-    }
-
-    /* Send configuration update to the FW */
-    return TWD_CfgPsRxStreaming (pQosMngr->hTWD, pCurrTidParams, NULL, NULL);
-}
-
-
-/************************************************************************
- *                    Admission Control Functions     		            *
- ************************************************************************/
-/************************************************************************
- *                        qosMngr_requestAdmission     			        *
- ************************************************************************
-DESCRIPTION: This function is API function for TSPEC request.
-
-INPUT:      hQosMngr	         -	Qos Manager handle.
-			addTspecParams		 -  The Tspec Parameters
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-TI_STATUS qosMngr_requestAdmission(TI_HANDLE			hQosMngr, 
-                                   OS_802_11_QOS_TSPEC_PARAMS *addTspecParams)
-{
-
-    qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-	TI_STATUS	status;
-	TI_UINT8		acID;
-		
-
-	/* check if STA is already connected to AP */
-	if(pQosMngr->isConnected == TI_FALSE)
-	{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_requestAdmission: Not connected - Ignoring request !!!\n");
-		return NOT_CONNECTED;
-	}
-
-	/* check if AP support QOS_WME */
-	if(pQosMngr->activeProtocol != QOS_WME)
-	{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_requestAdmission: Not connected to a QOS AP - Ignoring request !!!\n");
-		return NO_QOS_AP;
-	}
-
-	/* check if Traffic Admission Control is enable */
-	if(pQosMngr->trafficAdmCtrlEnable == TI_FALSE)
-	{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_requestAdmission: Admission-Control is disabled - Ignoring request !!!\n");
-		return ADM_CTRL_DISABLE;
-	}
-
-	/* check UP validity */
-	if( addTspecParams->uUserPriority > MAX_USER_PRIORITY)
-	{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "uUserPriority = %d > 7 !!!\n",addTspecParams->uUserPriority);
-		return TI_NOK;
-	}
-
-	/* find acID from the user priority */
-	acID = WMEQosTagToACTable[addTspecParams->uUserPriority];
-
-	/* check if signaling is already in process for this AC */
-	if(pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].trafficAdmState == AC_WAIT_ADMISSION)
-	{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_requestAdmission: AC = %d , signaling is in process -> Ignore Request !!!\n",acID);
-		return TRAFIC_ADM_PENDING;
-	}
-	
-	/* check if AC is already admitted with other UP */
-	if( (pQosMngr->resourceMgmtTable.currentTspecInfo[acID].trafficAdmState == AC_ADMITTED) &&
-		(pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority <= MAX_USER_PRIORITY) &&
-		(pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority != addTspecParams->uUserPriority) )
-	{
-TRACE2(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_requestAdmission: AC = %d , another UP (%d) on same AC is already admited -> Ignoring request !!!\n",			acID, pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority);
-		return AC_ALREADY_IN_USE;
-	}
-
-	/* check msdu size validity */
-	if( (addTspecParams->uNominalMSDUsize & (~FIXED_NOMINAL_MSDU_SIZE_MASK)) > MAX_DATA_BODY_LENGTH)
-	{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "uNominalMSDUsize = %d > 2312, !!!\n",addTspecParams->uNominalMSDUsize);
-		return TI_NOK;
-	}
-	
-	/* check PS mode validity */
-	if( (addTspecParams->uAPSDFlag == PS_SCHEME_UPSD_TRIGGER) && (pQosMngr->currentPsMode != PS_SCHEME_UPSD_TRIGGER) )
-	{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "The STA's current status does not support UPSD -> Ignoring TSPEC request that has UPSD on !!!\n");
-		return TI_NOK;
-	}
-
-TRACE2(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_requestAdmission: UP = %d , acID = %d\n",addTspecParams->uUserPriority, acID);
-
-	/* set tspec parameters in candidateTspecInfo table */
-	qosMngr_storeTspecCandidateParams (&(pQosMngr->resourceMgmtTable.candidateTspecInfo[acID]), 
-										addTspecParams, (TI_UINT8)acID);
-
-	/* Perhaps this should be done only if the request was successfully sent */
-	if (acID == QOS_AC_VO) 
-	{
-		pQosMngr->voiceTspecConfigured = TI_TRUE;
-	}
-	
-	if (acID == QOS_AC_VI) 
-	{
-		pQosMngr->videoTspecConfigured = TI_TRUE;
-	}
-	
-	/* call TrafficAdmCtrl API function for the signaling proccess */
-	status = trafficAdmCtrl_startAdmRequest(pQosMngr->pTrafficAdmCtrl, &(pQosMngr->resourceMgmtTable.candidateTspecInfo[acID]));
-
-	if(status == TI_OK)
-	{
-		/* request transmitted TI_OK */
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].trafficAdmState = AC_WAIT_ADMISSION;
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_requestAdmission: UP = %d , request TI_OK !!!\n",addTspecParams->uUserPriority);
-	}
-	else
-	{
-		/* reaquest not transmitted TI_OK */
-		pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].trafficAdmState = AC_NOT_ADMITTED;
-TRACE2(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "qosMngr_requestAdmission: UP = %d , request  NOT TI_OK status=%d!!!\n",addTspecParams->uUserPriority, status);
-		return TI_NOK;
-	}
-
-	return status;
-}
-
-/************************************************************************
- *                        qosMngr_deleteAdmission     		            *
- ************************************************************************
-DESCRIPTION: This function is API fuunction for tspec delete.
-
-INPUT:      hQosMngr	         -	Qos Manager handle.
-			delAdmissionParams	 -  
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-TI_STATUS qosMngr_deleteAdmission(TI_HANDLE hQosMngr, OS_802_11_QOS_DELETE_TSPEC_PARAMS *delAdmissionParams)
-{
-
-    qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-	TI_UINT8		acID;
-	
-	/* check UP validity */
-	if( delAdmissionParams->uUserPriority > MAX_USER_PRIORITY )
-	{	
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_deleteAdmission: userPriority > 7 -> Ignore !!!");
-		return TI_NOK;
-	}
-
-	/* check if STA is already connected to AP */
-	if(pQosMngr->isConnected == TI_FALSE)
-	{	
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_deleteAdmission: pQosMngr->connected == TI_FALSE -> Ignore !!!");
-		return NOT_CONNECTED;
-	}
-
-	/* check if AP support QOS_WME */
-	if(pQosMngr->activeProtocol != QOS_WME)
-	{	
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_deleteAdmission: activeProtocol != QOS_WME -> Ignore !!!");
-		return NO_QOS_AP;
-	}
-
-	/* find acID from the user priority */
-	acID = WMEQosTagToACTable[delAdmissionParams->uUserPriority];
-
-	/* check if tspec is already addmited for this AC */
-	if(pQosMngr->resourceMgmtTable.currentTspecInfo[acID].trafficAdmState != AC_ADMITTED)
-	{	
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_deleteAdmission: AC is not ADMITED -> Ignore !!!");
-		return TI_NOK;
-	}
-
-	/* check if AC is already admited with the same UP */
-	if(pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority != delAdmissionParams->uUserPriority)
-	{	
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_deleteAdmission: user priority is invalid. -> Ignore !!!\n");
-		return USER_PRIORITY_NOT_ADMITTED;
-	}
-
-	/* check if signaling is already in procces for this AC */
-	if(pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].trafficAdmState == AC_WAIT_ADMISSION)
-	{	
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_deleteAdmission: AC is under negotiation -> Ignore !!!");
-		return TRAFIC_ADM_PENDING;
-	}
-
-
-	
-	/* call TrafficAdmCtrl API function for the delete tspec */
-	trafficAdmCtrl_sendDeltsFrame(pQosMngr->pTrafficAdmCtrl, &(pQosMngr->resourceMgmtTable.currentTspecInfo[acID]), 
-										(TI_UINT8)delAdmissionParams->uReasonCode );
-
-	
-	deleteTspecConfiguration(pQosMngr, acID);
-	
-	return TI_OK;
-
-}
-/************************************************************************
- *                        deleteTspecConfiguration     		            *
- ************************************************************************
-DESCRIPTION: configure the driver and FW to default configuration after
-			 tspec deletion.
-
-INPUT:      hQosMngr	             - Qos Manager handle.
-			acID					 - the AC of the Tspec to delete
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-static void deleteTspecConfiguration(qosMngr_t *pQosMngr, TI_UINT8 acID)
-{
-	paramInfo_t param;
-
-    /* Zero Tspec parameters */
-    pQosMngr->resourceMgmtTable.currentTspecInfo[acID].nominalMsduSize = 0;
-    pQosMngr->resourceMgmtTable.currentTspecInfo[acID].minimumPHYRate = 0;
-    pQosMngr->resourceMgmtTable.currentTspecInfo[acID].meanDataRate = 0;
-    pQosMngr->resourceMgmtTable.currentTspecInfo[acID].surplausBwAllowance = 0;
-    pQosMngr->resourceMgmtTable.currentTspecInfo[acID].mediumTime = 0;
-    pQosMngr->resourceMgmtTable.currentTspecInfo[acID].UPSDFlag = 0;
-    pQosMngr->resourceMgmtTable.currentTspecInfo[acID].uMinimumServiceInterval = 0;
-    pQosMngr->resourceMgmtTable.currentTspecInfo[acID].uMaximumServiceInterval = 0;
-    pQosMngr->resourceMgmtTable.currentTspecInfo[acID].streamDirection = BI_DIRECTIONAL;
-	
-	/* update total medium time */
-	pQosMngr->resourceMgmtTable.totalAllocatedMediumTime -= pQosMngr->resourceMgmtTable.currentTspecInfo[acID].mediumTime;
-	
-	/* disable TSRS for this ac */
-	param.content.txDataQosParams.acID = acID;
-	param.content.txDataQosParams.tsrsArrLen = 0;
-	param.paramType = CTRL_DATA_TSRS_PARAM;
-	ctrlData_setParam(pQosMngr->hCtrlData, &param);
-
-	/* stop TS metrix for this ac */
-#ifdef XCC_MODULE_INCLUDED
-	measurementMgr_disableTsMetrics(pQosMngr->hMeasurementMngr, acID);
-#endif
-
-	/* update medium time and rate adaptation event only when init admission bit was 0 */
-	if( pQosMngr->acParams[acID].apInitAdmissionState == ADMISSION_REQUIRED )
-	{
-		/* update currentTspecInfo parameters */
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].trafficAdmState = AC_NOT_ADMITTED;
-		
-		/* set params to TX */
-		txCtrlParams_setAdmissionCtrlParams(pQosMngr->hTxCtrl,
-									acID,
-									pQosMngr->resourceMgmtTable.currentTspecInfo[acID].mediumTime , 
-									pQosMngr->resourceMgmtTable.currentTspecInfo[acID].minimumPHYRate, TI_FALSE);
-	}
-	else
-	{
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].trafficAdmState = AC_ADMITTED;
-	}
-
-    /* After we have updated the TxCtrl with the new status of the UP, we can zero the userPriority field */
-    pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority = INACTIVE_USER_PRIORITY;
-
-	/* set PS mode according to the PS mode from the association */
-    /* restore the current Ps mode per AC to UPSD ONLY IF both the station and AP support UPSD */
-    if ((pQosMngr->currentPsMode == PS_SCHEME_UPSD_TRIGGER) && (pQosMngr->acParams[acID].desiredWmeAcPsMode == PS_SCHEME_UPSD_TRIGGER))
-    {
-	  pQosMngr->acParams[acID].currentWmeAcPsMode = PS_SCHEME_UPSD_TRIGGER;
-    }
-    else
-    {
-	  pQosMngr->acParams[acID].currentWmeAcPsMode = PS_SCHEME_LEGACY;
-    }
-
-	if(acID == QOS_AC_VO)
-	{
-		pQosMngr->voiceTspecConfigured = TI_FALSE;
-	}
-	
-	if (acID == QOS_AC_VI) 
-	{
-		pQosMngr->videoTspecConfigured = TI_FALSE;
-    }
-
-	/* UPSD_FW - open comment in UPSD FW integration */
-	 
-	/* UPSD configuration */
-	pQosMngr->acParams[acID].QtrafficParams.psScheme = pQosMngr->acParams[acID].currentWmeAcPsMode;
-	verifyAndConfigTrafficParams(pQosMngr,&(pQosMngr->acParams[acID].QtrafficParams));
-
-    /* If the AC is not admitted, disable its TIDs' PS-Streamings if enabled */
-    if (pQosMngr->resourceMgmtTable.currentTspecInfo[acID].trafficAdmState == AC_NOT_ADMITTED)
-    {
-        TI_UINT32       uTid1       = WMEQosAcToTid[acID];
-        TI_UINT32       uTid2       = WMEQosMateTid[uTid1];
-        TPsRxStreaming *pTid1Params = &pQosMngr->aTidPsRxStreaming[uTid1];
-        TPsRxStreaming *pTid2Params = &pQosMngr->aTidPsRxStreaming[uTid2];
-
-        if (pTid1Params->bEnabled) 
-        {
-            pTid1Params->bEnabled = TI_FALSE;
-            TWD_CfgPsRxStreaming (pQosMngr->hTWD, pTid1Params, NULL, NULL);
-            pQosMngr->uNumEnabledPsRxStreams--;
-        }
-        if (pTid2Params->bEnabled) 
-        {
-            pTid2Params->bEnabled = TI_FALSE;
-            TWD_CfgPsRxStreaming (pQosMngr->hTWD, pTid2Params, NULL, NULL);
-            pQosMngr->uNumEnabledPsRxStreams--;
-        }
-    }
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name: qosMngr_sendUnexpectedTSPECResponse
-Routine Description: send event to user application, informing of unexpected TSPEC response
-					 which might imply loss of UPSD mode synch between AP and STA
-Arguments: pTspecInfo - contains unexpected TSPEC response information 
-Return Value:
------------------------------------------------------------------------------*/
-TI_STATUS qosMngr_sendUnexpectedTSPECResponseEvent(TI_HANDLE	hQosMngr,
-								   tspecInfo_t	*pTspecInfo)
-{
-	OS_802_11_QOS_TSPEC_PARAMS addtsReasonCode;
-    qosMngr_t *pQosMngr =	(qosMngr_t *)hQosMngr;
-
-	/* set the event params */
-	addtsReasonCode.uAPSDFlag = pTspecInfo->UPSDFlag;
-	addtsReasonCode.uMinimumServiceInterval = pTspecInfo->uMinimumServiceInterval;
-	addtsReasonCode.uMaximumServiceInterval = pTspecInfo->uMaximumServiceInterval;
-	addtsReasonCode.uUserPriority = pTspecInfo->userPriority;
-	addtsReasonCode.uNominalMSDUsize = pTspecInfo->nominalMsduSize;
-	addtsReasonCode.uMeanDataRate = pTspecInfo->meanDataRate;	
-	addtsReasonCode.uMinimumPHYRate = pTspecInfo->minimumPHYRate;
-	addtsReasonCode.uSurplusBandwidthAllowance = pTspecInfo->surplausBwAllowance;
-	addtsReasonCode.uMediumTime = pTspecInfo->mediumTime;
-
-    addtsReasonCode.uReasonCode = pTspecInfo->statusCode + TSPEC_RESPONSE_UNEXPECTED;
-		
-	/* send event */
-	EvHandlerSendEvent(pQosMngr->hEvHandler, IPC_EVENT_TSPEC_STATUS, (TI_UINT8*)(&addtsReasonCode), sizeof(OS_802_11_QOS_TSPEC_PARAMS));
-
-	return TI_OK;
-}
-
-/************************************************************************
- *                        qosMngr_setAdmissionInfo                      *
- ************************************************************************
-DESCRIPTION: This function is API function.
-            the trafficAdmCtrl object calls this function in
-            order to update the QOSMngr on TSPEC request status
-
-INPUT:      hQosMngr                 - Qos Manager handle.
-            pTspecInfo               - The TSPEC Parameters
-            trafficAdmRequestStatus  - the status of the request
-OUTPUT:     
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS qosMngr_setAdmissionInfo(TI_HANDLE    hQosMngr, 
-                                   TI_UINT8        acID,
-                                   tspecInfo_t  *pTspecInfo,
-                                   trafficAdmRequestStatus_e trafficAdmRequestStatus)
-{
-    TI_UINT32                 actualMediumTime;
-    OS_802_11_QOS_TSPEC_PARAMS addtsReasonCode;
-    qosMngr_t *pQosMngr =  (qosMngr_t *)hQosMngr;
-    TSetTemplate           templateStruct;
-    QosNullDataTemplate_t  QosNullDataTemplate;
-
-    /* Check if the updated AC is in WAIT state */
-    if(pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].trafficAdmState != AC_WAIT_ADMISSION)
-    {
-        TRACE1(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setAdmissionInfo: acID = %d, trafficAdmState != WAIT. IGNORE !!!\n", acID);
-        
-        return TI_NOK;
-    }
-
-    if (pQosMngr->TSPECNegotiationResultCallb != NULL)
-    {
-        pQosMngr->TSPECNegotiationResultCallb (pQosMngr->TSPECNegotiationResultModule, trafficAdmRequestStatus);
-        pQosMngr->TSPECNegotiationResultCallb = NULL;
-        pQosMngr->TSPECNegotiationResultModule = NULL;
-    }
-
-    switch(trafficAdmRequestStatus)
-    {
-    case STATUS_TRAFFIC_ADM_REQUEST_ACCEPT:
-        /* Received admission response with status accept */
-
-        TRACE3(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_setAdmissionInfo: admCtrl status =  REQUEST_ACCEPT [ acID = %d, mediumTime = %d, minimumPHYRate = %d ]\n", acID, pTspecInfo->mediumTime, pTspecInfo->minimumPHYRate);
-        
-        /* Set the event params */
-        addtsReasonCode.uAPSDFlag = pTspecInfo->UPSDFlag;
-        addtsReasonCode.uMinimumServiceInterval = pTspecInfo->uMinimumServiceInterval;
-        addtsReasonCode.uMaximumServiceInterval = pTspecInfo->uMaximumServiceInterval;
-        addtsReasonCode.uUserPriority = pTspecInfo->userPriority;
-        addtsReasonCode.uNominalMSDUsize = pTspecInfo->nominalMsduSize & ~FIXED_NOMINAL_MSDU_SIZE_MASK;
-        addtsReasonCode.uMeanDataRate = pTspecInfo->meanDataRate;   
-        addtsReasonCode.uMinimumPHYRate = pTspecInfo->minimumPHYRate;
-        addtsReasonCode.uSurplusBandwidthAllowance = pTspecInfo->surplausBwAllowance;
-        addtsReasonCode.uMediumTime = pTspecInfo->mediumTime;
-
-        /* Free the candidate parameters */
-        pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].trafficAdmState = AC_NOT_ADMITTED;
-
-        /* Validate tid matching */
-        if (pTspecInfo->tid == pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].tid)
-        {
-            addtsReasonCode.uReasonCode = ADDTS_RESPONSE_ACCEPT;
-            
-            /* Send event */
-            EvHandlerSendEvent (pQosMngr->hEvHandler, 
-                                IPC_EVENT_TSPEC_STATUS, 
-                                (TI_UINT8*)&addtsReasonCode, 
-                                sizeof(OS_802_11_QOS_TSPEC_PARAMS));
-        }
-        else
-        {
-            addtsReasonCode.uReasonCode = ADDTS_RESPONSE_AP_PARAM_INVALID;
-            
-            /* Send event */
-            EvHandlerSendEvent (pQosMngr->hEvHandler, 
-                                IPC_EVENT_TSPEC_STATUS, 
-                                (TI_UINT8*)&addtsReasonCode, 
-                                sizeof(OS_802_11_QOS_TSPEC_PARAMS));
-            return TI_OK;
-        }
-
-        /* Update the current TSPEC parameters from the received TSPEC */
-        os_memoryCopy (pQosMngr->hOs, 
-                       &pQosMngr->resourceMgmtTable.currentTspecInfo[acID], 
-                       pTspecInfo, 
-                       sizeof(tspecInfo_t));
-
-        /* Set the TSPEC to admitted */
-        pQosMngr->resourceMgmtTable.currentTspecInfo[acID].trafficAdmState = AC_ADMITTED;
-        
-        /* Update total medium time */
-        pQosMngr->resourceMgmtTable.totalAllocatedMediumTime += pTspecInfo->mediumTime;
-
-        /*
-         * Set QOS Null-data template into the firmware. 
-         * When a new TSPEC with UPSD is "accepted" by the AP, 
-         * we set the user priority of it into the firmware. 
-         * Since this AC is already ADMITTED (we are processing the successful response), 
-         * it is TI_OK to set the qos null data template with this UP 
-         */
-        if (addtsReasonCode.uAPSDFlag == PS_SCHEME_UPSD_TRIGGER && 
-            pQosMngr->QosNullDataTemplateUserPriority == 0xFF)
-        {
-            /* Remember the user priority which we have set */
-            pQosMngr->QosNullDataTemplateUserPriority = (TI_UINT8)addtsReasonCode.uUserPriority;
-
-            templateStruct.ptr = (TI_UINT8 *)&QosNullDataTemplate;
-            templateStruct.type = QOS_NULL_DATA_TEMPLATE;
-            templateStruct.uRateMask = RATE_MASK_UNSPECIFIED;
-            buildQosNullDataTemplate (pQosMngr->hSiteMgr, &templateStruct, pQosMngr->QosNullDataTemplateUserPriority);
-            TWD_CmdTemplate (pQosMngr->hTWD, &templateStruct, NULL, NULL);
-
-            TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_setAdmissionInfo: Setting QOS null data for UserPriority=%d (due to TSPEC ACCEPT response)\n", addtsReasonCode.uUserPriority);
-        }
-
-        /* Set params to TX */
-        /*------------------*/
-
-        /* Update medium time and rate adaptation event only when init admission bit was 0 */
-        if (pQosMngr->acParams[acID].apInitAdmissionState == ADMISSION_REQUIRED)
-        {
-            /* mediumTime is in units of 32uSec and we work in mSec */
-            actualMediumTime = (pTspecInfo->mediumTime * 32) / 1000;
-
-            /* Set TX params */
-			txCtrlParams_setAdmissionCtrlParams(pQosMngr->hTxCtrl,
-                                          acID,
-                                          actualMediumTime, 
-                                          pTspecInfo->minimumPHYRate, 
-                                          TI_TRUE);
-        }
-        
-        {
-            PSScheme_e psMode = pTspecInfo->UPSDFlag ? PS_SCHEME_UPSD_TRIGGER 
-                                                     : PS_SCHEME_LEGACY; 
-       
-            if (pQosMngr->acParams[acID].currentWmeAcPsMode != psMode)
-            {
-                TI_STATUS status;
-
-                pQosMngr->acParams[acID].currentWmeAcPsMode = psMode;
-
-                /* UPSD_FW - open comment in UPSD FW integration */
-                pQosMngr->acParams[acID].QtrafficParams.psScheme = pQosMngr->acParams[acID].currentWmeAcPsMode;
-                status = verifyAndConfigTrafficParams (pQosMngr, &pQosMngr->acParams[acID].QtrafficParams);
-                if (status != TI_OK)
-                    return status;
-            }
-        }   
-        break;
-
-    case STATUS_TRAFFIC_ADM_REQUEST_REJECT:
-        /* Received admission response with status reject */
-
-        TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_setAdmissionInfo: admCtrl status = REQUEST_REJECT [ acID = %d ]\n", acID);
-        
-        /* Validate tid matching */
-        if (pTspecInfo->tid == pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].tid)
-        {
-            addtsReasonCode.uReasonCode = pTspecInfo->statusCode;
-        }
-        else
-        {
-            addtsReasonCode.uReasonCode = ADDTS_RESPONSE_AP_PARAM_INVALID;
-        }
-
-        /* Free the candidate parameters */
-        pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].trafficAdmState = AC_NOT_ADMITTED;
-
-        /* Send event to application */
-        addtsReasonCode.uAPSDFlag = pTspecInfo->UPSDFlag;
-        addtsReasonCode.uMinimumServiceInterval = pTspecInfo->uMinimumServiceInterval;
-        addtsReasonCode.uMaximumServiceInterval = pTspecInfo->uMaximumServiceInterval;
-        addtsReasonCode.uUserPriority = pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].userPriority;
-        addtsReasonCode.uNominalMSDUsize = pTspecInfo->nominalMsduSize & ~FIXED_NOMINAL_MSDU_SIZE_MASK;
-        addtsReasonCode.uMeanDataRate = pTspecInfo->meanDataRate;   
-        addtsReasonCode.uMinimumPHYRate = pTspecInfo->minimumPHYRate;
-        addtsReasonCode.uSurplusBandwidthAllowance = pTspecInfo->surplausBwAllowance;
-        addtsReasonCode.uMediumTime = pTspecInfo->mediumTime;
-    
-        EvHandlerSendEvent (pQosMngr->hEvHandler, 
-                            IPC_EVENT_TSPEC_STATUS, 
-                            (TI_UINT8*)&addtsReasonCode, 
-                            sizeof(OS_802_11_QOS_TSPEC_PARAMS));       
-        break;
-
-    case STATUS_TRAFFIC_ADM_REQUEST_TIMEOUT:
-        TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_setAdmissionInfo: admCtrl status = REQUEST_TIMEOUT [ acID = %d ]\n", acID);
-        
-        /* Free the candidate parameters */
-        pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].trafficAdmState = AC_NOT_ADMITTED;
-
-        /* Send event to application */
-        addtsReasonCode.uUserPriority = pQosMngr->resourceMgmtTable.candidateTspecInfo[acID].userPriority;
-        addtsReasonCode.uReasonCode = ADDTS_RESPONSE_TIMEOUT;
-        addtsReasonCode.uAPSDFlag = 0;
-        addtsReasonCode.uMinimumServiceInterval = 0;
-        addtsReasonCode.uMaximumServiceInterval = 0;
-        addtsReasonCode.uNominalMSDUsize = 0;
-        addtsReasonCode.uMeanDataRate = 0;  
-        addtsReasonCode.uMinimumPHYRate = 0;
-        addtsReasonCode.uSurplusBandwidthAllowance = 0;
-        addtsReasonCode.uMediumTime = 0;
-
-        EvHandlerSendEvent (pQosMngr->hEvHandler, 
-                            IPC_EVENT_TSPEC_STATUS, 
-                            (TI_UINT8*)&addtsReasonCode, 
-                            sizeof(OS_802_11_QOS_TSPEC_PARAMS));       
-        break;
-       
-    default:
-        TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setAdmissionInfo: receive state from admCtrl = unknown !!! \n");
-        break;
-    }
-
-    return TI_OK;  
-}
-
-/************************************************************************
- *                    QosMngr_receiveActionFrames                       *
- ************************************************************************
-DESCRIPTION: 
-                                                                                                 
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS QosMngr_receiveActionFrames(TI_HANDLE hQosMngr, TI_UINT8* pData, TI_UINT8 action, TI_UINT32 bodyLen)
-{
-	TI_UINT8					    acID;
-	tsInfo_t				        tsInfo;
-	TI_UINT8					    userPriority;
-    OS_802_11_QOS_TSPEC_PARAMS      addtsReasonCode;
-    TI_UINT8                        statusCode = 0;
-#ifdef XCC_MODULE_INCLUDED
-	paramInfo_t                     param;
-#endif
-    qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-
-	/* check if STA is already connected to AP */
-	if( (pQosMngr->isConnected == TI_FALSE) || 
-		(pQosMngr->activeProtocol != QOS_WME) || 
-		(pQosMngr->trafficAdmCtrlEnable == TI_FALSE) )
-	{
-        TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames:  Ignore  !!!");
-		return TI_NOK;
-	}
-
-	/* check DELTS action code */
-	if (action == DELTS_ACTION) 
-	{
-		/* 
-		 *  parse the frame 
-		 */
-
-		/* skip dialog-token (1 byte), status-code (1 byte) and dot11_WME_TSPEC_IE header (8 bytes). */
-		pData += 10;	  
-
-		/*  Get TS-Info from TSpec IE in DELTS, and get from it the user-priority. */
-		tsInfo.tsInfoArr[0] = *pData;
-		pData++;
-        tsInfo.tsInfoArr[1] = *pData;
-		pData++;
-		tsInfo.tsInfoArr[2] = *pData;
-		
-        userPriority = (((tsInfo.tsInfoArr[1]) & TS_INFO_1_USER_PRIORITY_MASK) >> USER_PRIORITY_SHIFT);
-		
-		acID = WMEQosTagToACTable[userPriority];
-		
-
-        TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "QosMngr_receiveActionFrames: DELTS [ acID = %d ] \n", acID);
-
-
-		/* check if this AC is admitted with the correct userPriority */
-		if( (pQosMngr->resourceMgmtTable.currentTspecInfo[acID].trafficAdmState == AC_ADMITTED) &&
-			( pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority == userPriority) )
-		{
-			deleteTspecConfiguration(pQosMngr, acID);
-
-            /* Send event to notify DEL_TS */
-            addtsReasonCode.uAPSDFlag = 0;
-            addtsReasonCode.uMinimumServiceInterval = 0;
-            addtsReasonCode.uMaximumServiceInterval = 0;
-		    addtsReasonCode.uUserPriority = userPriority;
-            addtsReasonCode.uReasonCode = TSPEC_DELETED_BY_AP;
-		    addtsReasonCode.uNominalMSDUsize = 0;
-		    addtsReasonCode.uMeanDataRate = 0;	
-		    addtsReasonCode.uMinimumPHYRate = 0;
-		    addtsReasonCode.uSurplusBandwidthAllowance = 0;
-		    addtsReasonCode.uMediumTime = 0;
-
-            EvHandlerSendEvent(pQosMngr->hEvHandler, IPC_EVENT_TSPEC_STATUS, (TI_UINT8*)(&addtsReasonCode), sizeof(OS_802_11_QOS_TSPEC_PARAMS));
-		}
-		else
-		{
-            TRACE3(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames: DELTS [ acID = %d userPriority = %d  currentUserPriority = %d] Current State in not ADMITED !! \n", acID, userPriority,pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority);
-			
-		}
-	}
-	/* if action code is ADDTS call trafficAdmCtrl object API function */
-	else if (action == ADDTS_RESPONSE_ACTION) 
-	{
-        statusCode = *(pData+1);
-
-#ifdef XCC_MODULE_INCLUDED
-
-        if (ADDTS_STATUS_CODE_SUCCESS != statusCode)
-        {
-            tspecInfo_t tspecInfo;
-            param.paramType = ROAMING_MNGR_TRIGGER_EVENT;
-            param.content.roamingTriggerType =  ROAMING_TRIGGER_TSPEC_REJECTED;
-            roamingMngr_setParam(pQosMngr->hRoamMng, &param);
-
-                       
-            trafficAdmCtrl_parseTspecIE(&tspecInfo, pData+2);
-            
-            addtsReasonCode.uAPSDFlag = tspecInfo.UPSDFlag;
-            addtsReasonCode.uMinimumServiceInterval = tspecInfo.uMinimumServiceInterval;
-            addtsReasonCode.uMaximumServiceInterval = tspecInfo.uMaximumServiceInterval;
-            addtsReasonCode.uUserPriority = (TI_UINT32)tspecInfo.userPriority;
-            addtsReasonCode.uReasonCode = ADDTS_RESPONSE_REJECT;
-            addtsReasonCode.uNominalMSDUsize = (TI_UINT32)tspecInfo.nominalMsduSize & ~FIXED_NOMINAL_MSDU_SIZE_MASK;
-            addtsReasonCode.uMeanDataRate = tspecInfo.meanDataRate;	
-            addtsReasonCode.uMinimumPHYRate = tspecInfo.minimumPHYRate;
-            addtsReasonCode.uSurplusBandwidthAllowance = (TI_UINT32)tspecInfo.surplausBwAllowance;
-            addtsReasonCode.uMediumTime = (TI_UINT32)tspecInfo.mediumTime;
-            
-            EvHandlerSendEvent(pQosMngr->hEvHandler, IPC_EVENT_TSPEC_STATUS, (TI_UINT8*)(&addtsReasonCode), sizeof(OS_802_11_QOS_TSPEC_PARAMS));
-        }
-#endif
-        
-		if (trafficAdmCtrl_recv(pQosMngr->pTrafficAdmCtrl, pData, action) == TI_OK)
-		{
-#ifdef XCC_MODULE_INCLUDED
-			/* Check if XCC IEs present, if so, parse them and update relevant modules; 
-               skip the TSPEC IE;
-               do not forget 2 bytes of status and dialog code that must be skipped as well */
-			XCCv4IEs_t			XCCIE;
-			TI_UINT32 				readLen;
-
-			XCCIE.edcaLifetimeParameter = NULL;
-			XCCIE.trafficStreamParameter = NULL;
-			XCCIE.tsMetrixParameter = NULL;
-
-			userPriority = GET_USER_PRIORITY_FROM_WME_TSPEC_IE(pData+2);
-			acID = WMEQosTagToACTable[userPriority];
-
-			/* The length is in the second byte of the IE header, after the token and status. */
-			readLen = (TI_UINT32)(*(pData + 3)); 
-
-			/* 4 stands for 1 byte of token + 1 byte of status + 1 byte of EID + 1 byte of len */
-			bodyLen = bodyLen - 4 - readLen; 
-			pData = pData + 4 + readLen;
-
-			while (bodyLen) 
-			{
-				mlmeParser_readXCCOui(pData, bodyLen, &readLen, &XCCIE);
-				bodyLen -= readLen;
-				pData += readLen;
-			}
-
-			XCCMngr_setXCCQoSParams(pQosMngr->hXCCMgr, &XCCIE, acID);
-#endif
-		}
-	}
-	else
-	{
-        TRACE1(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "QosMngr_receiveActionFrames: Receive unknown action code = %d  -> Ignore !! \n",action);
-	}
-	
-	return TI_OK;
-}
-
-/************************************************************************
- *                        qosMngr_getCurrAcStatus     		            *
- ************************************************************************
-DESCRIPTION: This function is API fuunction for getting tha AC status .
-
-INPUT:      hQosMngr	             - Qos Manager handle.
-			pAcStatusParams
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static TI_STATUS qosMngr_getCurrAcStatus(TI_HANDLE hQosMngr, OS_802_11_AC_UPSD_STATUS_PARAMS *pAcStatusParams)
-{
-    qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
-
-	/* check AC validity */
-	if( pAcStatusParams->uAC > MAX_NUM_OF_AC - 1 )
-	{	
-		TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_getCurrAcStatus: acID > 3 -> Ignore !!!");
-		return TI_NOK;
-	}
-
-	/* check if sta is connected to AP */
-	if(pQosMngr->isConnected == TI_FALSE)
-	{	
-		TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_getCurrAcStatus: pQosMngr->connected == TI_FALSE -> Ignore !!!");
-		return NOT_CONNECTED;
-	}
-	
-	 /* check if AP support QOS_WME */
-	if(pQosMngr->activeProtocol != QOS_WME)
-	{	
-		TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_getCurrAcStatus: activeProtocol != QOS_WME -> Ignore !!!");
-		return NO_QOS_AP;
-	}
-
-	pAcStatusParams->uCurrentUAPSDStatus = pQosMngr->acParams[pAcStatusParams->uAC].currentWmeAcPsMode;
-	pAcStatusParams->pCurrentAdmissionStatus = pQosMngr->resourceMgmtTable.currentTspecInfo[pAcStatusParams->uAC].trafficAdmState;
-
-	return TI_OK;
-}
-
-
-
-/************************************************************************
- *                        setNonQosAdmissionState  		                *
- ************************************************************************
-DESCRIPTION: This function resets the admission state variables as required
-				for non-QoS mode and configures the Tx module.
-
-INPUT:      pQosMngr	- Qos Manager pointer.
-			acId		- the AC to update.
-
-OUTPUT:		
-
-RETURN:     
-
-************************************************************************/
-
-static void setNonQosAdmissionState(qosMngr_t *pQosMngr, TI_UINT8 acID)
-{
-	if(acID == QOS_AC_BE)
-	{
-		pQosMngr->acParams[acID].apInitAdmissionState = ADMISSION_NOT_REQUIRED;
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].trafficAdmState = AC_ADMITTED;
-		
-		txCtrlParams_setAcAdmissionStatus(pQosMngr->hTxCtrl, acID, ADMISSION_NOT_REQUIRED, AC_ADMITTED);
-	}
-	else
-	{
-		pQosMngr->acParams[acID].apInitAdmissionState = ADMISSION_REQUIRED;
-		pQosMngr->resourceMgmtTable.currentTspecInfo[acID].trafficAdmState = AC_NOT_ADMITTED;
-
-		txCtrlParams_setAcAdmissionStatus(pQosMngr->hTxCtrl, acID, ADMISSION_REQUIRED, AC_NOT_ADMITTED);
-	}
-}
-
-static void qosMngr_storeTspecCandidateParams (tspecInfo_t *pCandidateParams, OS_802_11_QOS_TSPEC_PARAMS *pTSPECParams, TI_UINT8 ac)
-{
-	pCandidateParams->AC = (EAcTrfcType)ac;
-	pCandidateParams->tid = (TI_UINT8)pTSPECParams->uUserPriority;
-	pCandidateParams->userPriority = (TI_UINT8)pTSPECParams->uUserPriority;
-	pCandidateParams->meanDataRate = pTSPECParams->uMeanDataRate;
-	pCandidateParams->nominalMsduSize = ((TI_UINT16)pTSPECParams->uNominalMSDUsize) | FIXED_NOMINAL_MSDU_SIZE_MASK;
-	pCandidateParams->UPSDFlag = (TI_BOOL)pTSPECParams->uAPSDFlag;
-	pCandidateParams->uMinimumServiceInterval = pTSPECParams->uMinimumServiceInterval;
-	pCandidateParams->uMaximumServiceInterval = pTSPECParams->uMaximumServiceInterval;
-	pCandidateParams->surplausBwAllowance = (TI_UINT16)pTSPECParams->uSurplusBandwidthAllowance;
-	pCandidateParams->minimumPHYRate = pTSPECParams->uMinimumPHYRate;
-	pCandidateParams->streamDirection = BI_DIRECTIONAL;
-	pCandidateParams->mediumTime = 0;
-}
-
diff --git a/wl1271/stad/src/Sta_Management/qosMngr.h b/wl1271/stad/src/Sta_Management/qosMngr.h
deleted file mode 100644
index 5b2c699..0000000
--- a/wl1271/stad/src/Sta_Management/qosMngr.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * qosMngr.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file qosMngr.h
- *  \brief QOS manager module internal header file
- *
- *  \see qosMngr.c
- */
-
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   qosMgr.h                                                   */
-/*    PURPOSE:  QOS manager module internal header file                    */
-/*                                                                         */
-/***************************************************************************/
-#ifndef __QOS_MNGR_H__
-#define __QOS_MNGR_H__
-
-#include "paramOut.h"
-#include "trafficAdmControl.h"
-
-/*
- *          Defines
- */
-
-#define QOS_MNGR_INIT_BIT_LOCAL_VECTOR     (0x01)
-#define QOS_MNGR_INIT_BIT_ADM_CTRL     (0x02)
-
-#define AC_PARAMS_AIFSN_MASK               (0x0f)
-#define AC_PARAMS_ACI_MASK                 (0x60)
-#define AC_PARAMS_CWMIN_MASK               (0x0f)
-#define AC_PARAMS_CWMAX_MASK               (0xf0)
-#define AC_PARAMS_ACM_MASK                 (0x10)
-
-#define MAX_ENABLED_PS_RX_STREAMS          4
-
-#if 0
-#define PS_PARAMETERS_LEGACY                    (0)
-#define PS_PARAMETERS_UPSD_TRIGGER_ENABLE_MASK  (0x01)
-#define PS_PARAMETERS_UPSD_DELIVERY_ENABLE_MASK (0x02)
-#define PS_UPSD_TRIGER_AND_DELIVERY (PS_PARAMETERS_UPSD_TRIGGER_ENABLE_MASK | PS_PARAMETERS_UPSD_DELIVERY_ENABLE_MASK)
-
-#define CONVERT_DRIVER_PS_MODE_TO_FW(PsMode_e)  ((PsMode_e == UPSD) ? PS_UPSD_TRIGER_AND_DELIVERY : PS_PARAMETERS_LEGACY)
-#endif
-
-
-/*
- *          Enumerations                                                    
- */
-#define RX_QUEUE_WIN_SIZE       8
-
-typedef enum
-{   
-    BA_POLICY_DISABLE                                   =   0,
-    BA_POLICY_INITIATOR                                 =   1, 
-    BA_POLICY_RECEIVER                                  =   2,
-    BA_POLICY_INITIATOR_AND_RECEIVER                    =   3
-} EqosMngrBaPolicy;
-
-
-/*
- *          Structures                                                      
- */
-
-typedef struct 
-{
-    tspecInfo_t     currentTspecInfo[MAX_NUM_OF_AC];
-    tspecInfo_t     candidateTspecInfo[MAX_NUM_OF_AC];
-    TI_UINT16       totalAllocatedMediumTime;
-}resourceMgmt_t;
-
-/*
- * per AC parameters
- */
-typedef struct
-{
-    TQueueTrafficParams   QtrafficParams;    /* AC traffic confogiration params */
-    TQueueTrafficParams   QTrafficInitParams;/* for disconnect - defaults traffic params */
-    TAcQosParams          acQosParams;              
-    TAcQosParams          acQosInitParams;
-    AckPolicy_e           wmeAcAckPolicy;     /* ack policy per AC               */
-    PSScheme_e            currentWmeAcPsMode; /* current wme per ac power save mode */
-    PSScheme_e            desiredWmeAcPsMode; /* desired wme per ac power save mode */
-    EAdmissionState       apInitAdmissionState; /* AC admission state              */
-    TI_UINT32             msduLifeTimeParam;    
-}acParams_t;
-
-
-typedef TI_STATUS (*qosMngrCallb_t) (TI_HANDLE hApConn, trafficAdmRequestStatus_e result);
-
-/*
- *  qosMngr handle 
- */
-
-typedef struct
-{
-    TI_HANDLE           hSiteMgr;
-    TI_HANDLE           hTWD;
-    TI_HANDLE           hTxCtrl;
-    TI_HANDLE           hTxMgmtQ;
-    TI_HANDLE           hEvHandler;
-    TI_HANDLE           hRoamMng;
-
-    TI_HANDLE           hMeasurementMngr;
-    TI_HANDLE           hSmeSm;
-    TI_HANDLE           hCtrlData;
-    TI_HANDLE           hXCCMgr;
-
-    TI_HANDLE           hReport;
-    TI_HANDLE           hOs;
-    TI_HANDLE           hTimer;
-    TI_HANDLE           hStaCap;
-
-    TI_BOOL             WMEEnable;                           /* driver supports WME protocol       */
-    TI_BOOL             WMESiteSupport;                      /* site support WME protocol          */
-    EQosProtocol        activeProtocol;                      /* active protocol: XCC,WME or none.  */
-    TI_BOOL             tagZeroConverHeader;                 /* converting tag zero headers        */
-        
-    TI_UINT8            qosPacketBurstEnable;                /* Packet Burst is Enable or NOT      */
-    TI_UINT32           qosPacketBurstTxOpLimit;             /* TxOp limit in case of NON_QOS */
-                                                             /* protocol and Packet Burst is Enable */
-
-    acParams_t          acParams[MAX_NUM_OF_AC];             /* per ac parameters                  */
-
-    TI_BOOL             isConnected;                         /* Connected or not ?                       */
-    PSScheme_e          desiredPsMode;                       /* The desired PS mode of the station */
-    PSScheme_e          currentPsMode;                       /* The current PS mode of the station */
-    TI_UINT8            ApQosCapabilityParameters;
-    TI_UINT8            desiredMaxSpLen;
-
-    EHeaderConvertMode  headerConvetMode;
-    TRxTimeOut          rxTimeOut;
-
-    /* PS Rx streaming parameters */
-    TPsRxStreaming      aTidPsRxStreaming[MAX_NUM_OF_802_1d_TAGS];/* Per TID PS-Rx-Streaming configured parameters */
-    TI_UINT32           uNumEnabledPsRxStreams;             /* the number of enabled TID-PS-Rx-Streams */
-
-    /* traffic admission control parameters */
-    TI_BOOL             trafficAdmCtrlEnable;                /* driver supports Admission control  */   
-    trafficAdmCtrl_t    *pTrafficAdmCtrl;                    /* adm ctrl object */
-    resourceMgmt_t      resourceMgmtTable;
-    TI_UINT8            QosNullDataTemplateUserPriority;     /* Holds the last User Priority set into the firmware in the QOS Null data template */
-
-    TI_BOOL             performTSPECRenegotiation;
-    TI_BOOL             voiceTspecConfigured;
-    TI_BOOL		        videoTspecConfigured;
-    TI_HANDLE           TSPECNegotiationResultModule;
-    qosMngrCallb_t      TSPECNegotiationResultCallb;
-    OS_802_11_QOS_TSPEC_PARAMS  tspecRenegotiationParams[MAX_NUM_OF_AC];
-
-    TI_BOOL             bCwFromUserEnable;
-    TI_UINT8            uDesireCwMin;		/**< The contention window minimum size (in slots) from ini file */
-    TI_UINT16           uDesireCwMax;		/**< The contention window maximum size (in slots) from ini file */
-
-    /* 802.11n BA session */
-    TI_UINT8               aBaPolicy[MAX_NUM_OF_802_1d_TAGS];
-    TI_UINT16              aBaInactivityTimeout[MAX_NUM_OF_802_1d_TAGS];
-	TI_BOOL				bEnableBurstMode;
-} qosMngr_t;
-
-
-#endif /* QOS_MNGR_H */
diff --git a/wl1271/stad/src/Sta_Management/qosMngr_API.h b/wl1271/stad/src/Sta_Management/qosMngr_API.h
deleted file mode 100644
index 867da73..0000000
--- a/wl1271/stad/src/Sta_Management/qosMngr_API.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * qosMngr_API.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file qosMngr_API.h
- *  \brief QOS manager module external header file
- *
- *  \see qosMngr.c
- */
-
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   qosMgr_API.h                                               */
-/*    PURPOSE:  QOS manager module external header file                    */
-/*                                                                         */
-/***************************************************************************/
-#ifndef __QOS_MNGR_API_H__
-#define __QOS_MNGR_API_H__
-
-#include "mlmeApi.h"
-#include "tiQosTypes.h"
-#include "DrvMainModules.h"
-
-#define USER_PRIORITY_4 (WMEQosTagToACTable[4])
-#define USER_PRIORITY_6 (WMEQosTagToACTable[6])
-
-/* User priority is in second byte of tsInfoField (that follows 8 bytes from beginning of the TSPEC IE) */ 
-#define GET_USER_PRIORITY_FROM_WME_TSPEC_IE(pTspecIe)   \
-    (( *(((TI_UINT8 *)pData) + 9) & TS_INFO_1_USER_PRIORITY_MASK) >> USER_PRIORITY_SHIFT)
-
-
-
-typedef struct 
-{
-    EAcTrfcType         AC;
-    TI_UINT8            tid;
-    TI_UINT8            userPriority;
-    TI_UINT16           nominalMsduSize; /* in bytes */
-    TI_UINT32           meanDataRate;    /* bits per second */
-    TI_UINT16           surplausBwAllowance;
-    TI_INT32            minimumPHYRate;
-    TI_UINT16           mediumTime;
-    TI_BOOL             UPSDFlag;
-    TI_UINT32           uMinimumServiceInterval;
-    TI_UINT32           uMaximumServiceInterval;
-    EStreamDirection    streamDirection;
-    ETrafficAdmState    trafficAdmState;
-    TI_UINT8            statusCode;
-}tspecInfo_t;
-
-typedef enum 
-{
-    STATUS_TRAFFIC_ADM_REQUEST_ACCEPT       = 0,
-    STATUS_TRAFFIC_ADM_REQUEST_REJECT       = 1,
-    STATUS_TRAFFIC_ADM_REQUEST_TIMEOUT      = 2
-} trafficAdmRequestStatus_e;
-
-
-TI_HANDLE qosMngr_create(TI_HANDLE hOs);
-
-TI_STATUS qosMngr_destroy(TI_HANDLE hQosMngr);
-
-void      qosMngr_init (TStadHandlesList *pStadHandles);
-
-TI_STATUS qosMngr_SetDefaults (TI_HANDLE hQosMngr, QosMngrInitParams_t *pQosMngrInitParams);
-
-TI_STATUS qosMngr_disconnect (TI_HANDLE hQosMngr, TI_BOOL bDisconnect);
-
-TI_STATUS qosMngr_connect(TI_HANDLE hQosMngr);
-
-void qosMngr_SetBaPolicies(TI_HANDLE hQosMngr);
-
-TI_STATUS qosMngr_setParams(TI_HANDLE  hQosMngr,paramInfo_t *pParamInfo);
-
-TI_STATUS qosMngr_getParamsActiveProtocol(TI_HANDLE hQosMngr, EQosProtocol *actProt);
-TI_STATUS qosMngr_getParams(TI_HANDLE  hQosMngr,paramInfo_t *pParamInfo);
-
-TI_STATUS qosMngr_assocReqBuild(TI_HANDLE  hQosMngr, TI_UINT8 *pQosIe, TI_UINT32 *pLen);
-
-TI_STATUS qosMngr_setSite(TI_HANDLE hQosMngr, assocRsp_t *assocRsp);
-
-void      qosMngr_updateIEinfo(TI_HANDLE hQosMngr, TI_UINT8 *pQosIeParams, EQosProtocol qosSetProtocol);
-
-TI_UINT8 qosMngr_evalSite(TI_HANDLE hQosMngr, TI_BOOL siteAPSDSupport);
-
-TI_STATUS qosMngr_getQosCapabiltyInfeElement(TI_HANDLE  hQosMngr, TI_UINT8 *pQosIe, TI_UINT32 *pLen);
-
-TI_STATUS qosMngr_requestAdmission(TI_HANDLE            hQosMngr, 
-                                   OS_802_11_QOS_TSPEC_PARAMS *addTspecParams);
-
-TI_STATUS qosMngr_deleteAdmission(TI_HANDLE hQosMngr, OS_802_11_QOS_DELETE_TSPEC_PARAMS *delAdmissionParams);
-
-TI_STATUS qosMngr_selectActiveProtocol(TI_HANDLE  hQosMngr);
-
-TI_STATUS qosMngr_setAcPsDeliveryMode(TI_HANDLE  hQosMngr);
-
-TI_STATUS qosMngr_sendUnexpectedTSPECResponseEvent(TI_HANDLE    hQosMngr,
-                                   tspecInfo_t  *pTspecInfo);
-
-TI_STATUS qosMngr_setAdmissionInfo(TI_HANDLE    hQosMngr, 
-                                   TI_UINT8     acID,
-                                   tspecInfo_t  *pTspecInfo,
-                                   trafficAdmRequestStatus_e trafficAdmRequestStatus);
-
-
-
-TI_STATUS QosMngr_receiveActionFrames(TI_HANDLE hQosMngr, TI_UINT8* pData, TI_UINT8 action, TI_UINT32 bodyLen);
-
-void qosMngr_checkTspecRenegResults(TI_HANDLE hQosMngr, assocRsp_t *assocRsp);
-
-TI_UINT32 qosMngr_buildTSPec(TI_HANDLE hQosMngr, TI_UINT32 user_priority, TI_UINT8 *pQosIe);
-
-TI_STATUS qosMngr_GetWmeEnableFlag(TI_HANDLE hQosMngr, TI_BOOL *bWmeEnable);
-
-#endif /* __QOS_MNGR_API_H__ */
-
diff --git a/wl1271/stad/src/Sta_Management/roamingInt.c b/wl1271/stad/src/Sta_Management/roamingInt.c
deleted file mode 100644
index 1f95a0e..0000000
--- a/wl1271/stad/src/Sta_Management/roamingInt.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * roamingInt.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file roamingMngr.c
- *  \brief Roaming (Cisco Compatible Extensions for WLAN Devices) Manager
- *
- *  \see roamingMngrApi.h
- */
-
-/****************************************************************************
- *                                                                          *
- *   MODULE:  Roaming Manager	    		                                *
- *   PURPOSE: Roaming Manager API                              	*
- *                                                                          *
- ****************************************************************************/
-
-#define __FILE_ID__  FILE_ID_75
-#include "osApi.h"
-
-#include "siteMgrApi.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#endif
-#include "roamingMngrApi.h"
-
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* Local functions definitions */
-
-/* Global variables */
-
-/* Function prototypes */
-
-
-
diff --git a/wl1271/stad/src/Sta_Management/scanResultTable.c b/wl1271/stad/src/Sta_Management/scanResultTable.c
deleted file mode 100644
index 370e763..0000000
--- a/wl1271/stad/src/Sta_Management/scanResultTable.c
+++ /dev/null
@@ -1,1368 +0,0 @@
-/*
- * scanResultTable.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  scanResultTable.c 
- *  \brief implements a table holding scan results, by BSSID
- *
- *  \see   scanResultTable.h
- */
-
-
-#define __FILE_ID__  FILE_ID_81
-#include "osApi.h"
-#include "report.h"
-#include "scanResultTable.h"
-#include "siteMgrApi.h"
-#include "freq.h"
-
-
-//#define TABLE_ENTRIES_NUMBER    32
-
-#define MILISECONDS(seconds)                            (seconds * 1000)
-#define UPDATE_LOCAL_TIMESTAMP(pSite, hOs)              pSite->localTimeStamp = os_timeStampMs(hOs);
-
-#define UPDATE_BSSID(pSite, pFrame)                     MAC_COPY((pSite)->bssid, *((pFrame)->bssId))
-#define UPDATE_BAND(pSite, pFrame)                      (pSite)->eBand = (pFrame)->band
-#define UPDATE_BEACON_INTERVAL(pSite, pFrame)           pSite->beaconInterval = (pFrame)->parsedIEs->content.iePacket.beaconInerval
-#define UPDATE_CAPABILITIES(pSite, pFrame)              pSite->capabilities = (pFrame)->parsedIEs->content.iePacket.capabilities
-#define UPDATE_PRIVACY(pSite, pFrame)                   pSite->privacy = (((pFrame)->parsedIEs->content.iePacket.capabilities >> CAP_PRIVACY_SHIFT) & CAP_PRIVACY_MASK) ? TI_TRUE : TI_FALSE
-#define UPDATE_AGILITY(pSite, pFrame)                   pSite->agility = (((pFrame)->parsedIEs->content.iePacket.capabilities >> CAP_AGILE_SHIFT) & CAP_AGILE_MASK) ? TI_TRUE : TI_FALSE
-#define UPDATE_SLOT_TIME(pSite, pFrame)                 pSite->newSlotTime = (((pFrame)->parsedIEs->content.iePacket.capabilities >> CAP_SLOT_TIME_SHIFT) & CAP_SLOT_TIME_MASK) ? PHY_SLOT_TIME_SHORT : PHY_SLOT_TIME_LONG
-#define UPDATE_PROTECTION(pSite, pFrame)                pSite->useProtection = ((pFrame)->parsedIEs->content.iePacket.useProtection)
-#define UPDATE_CHANNEL(pSite, pFrame, rxChannel)        if ((pFrame)->parsedIEs->content.iePacket.pDSParamsSet == NULL) \
-                                                            pSite->channel = rxChannel; \
-                                                        else \
-                                                            pSite->channel = (pFrame)->parsedIEs->content.iePacket.pDSParamsSet->currChannel;
-#define UPDATE_DTIM_PERIOD(pSite, pFrame)               if ((pFrame)->parsedIEs->content.iePacket.pTIM != NULL) \
-                                                            pSite->dtimPeriod = (pFrame)->parsedIEs->content.iePacket.pTIM->dtimPeriod
-#define UPDATE_ATIM_WINDOW(pSite, pFrame)               if ((pFrame)->parsedIEs->content.iePacket.pIBSSParamsSet != NULL) \
-                                                            pSite->atimWindow = (pFrame)->parsedIEs->content.iePacket.pIBSSParamsSet->atimWindow
-#define UPDATE_AP_TX_POWER(pSite, pFrame)               if ((pFrame)->parsedIEs->content.iePacket.TPCReport != NULL) \
-                                                            pSite->APTxPower = (pFrame)->parsedIEs->content.iePacket.TPCReport->transmitPower
-#define UPDATE_BSS_TYPE(pSite, pFrame)                  pSite->bssType = (((pFrame)->parsedIEs->content.iePacket.capabilities >> CAP_ESS_SHIFT) & CAP_ESS_MASK) ? BSS_INFRASTRUCTURE : BSS_INDEPENDENT
-#define UPDATE_RSN_IE(pScanResultTable, pSite, pNewRsnIe, newRsnIeLen) if ((pNewRsnIe) != NULL) { \
-                                                            TI_UINT8 length=0, index=0;\
-                                                            dot11_RSN_t *pTempRsnIe = (pNewRsnIe); \
-                                                            (pSite)->rsnIeLen = (newRsnIeLen);\
-                                                            while ((length < (pSite)->rsnIeLen) && (index < MAX_RSN_IE)) {\
-                                                                (pSite)->pRsnIe[index].hdr[0] = pTempRsnIe->hdr[0];\
-                                                                (pSite)->pRsnIe[index].hdr[1] = pTempRsnIe->hdr[1];\
-                                                                os_memoryCopy(pScanResultTable->hOS, (void *)(pSite)->pRsnIe[index].rsnIeData, (void *)pTempRsnIe->rsnIeData, pTempRsnIe->hdr[1]);\
-                                                                length += (pTempRsnIe->hdr[1]+2); \
-                                                                pTempRsnIe += 1; \
-                                                                index++;}\
-                                                        } \
-                                                        else {pSite->rsnIeLen = 0;}
-#define UPDATE_BEACON_TIMESTAMP(pScanResultTable, pSite, pFrame)    os_memoryCopy(pScanResultTable->hOS, pSite->tsfTimeStamp, (void *)(pFrame)->parsedIEs->content.iePacket.timestamp, TIME_STAMP_LEN)
-
-/* Updated from beacons */
-#define UPDATE_BEACON_MODULATION(pSite, pFrame)         pSite->beaconModulation = (((pFrame)->parsedIEs->content.iePacket.capabilities >> CAP_PBCC_SHIFT) & CAP_PBCC_MASK) ? DRV_MODULATION_PBCC : DRV_MODULATION_CCK
-#define UPDATE_BEACON_RECV(pSite)                       pSite->beaconRecv = TI_TRUE
-
-/* Updated from probes */
-#define UPDATE_PROBE_MODULATION(pSite, pFrame)          pSite->probeModulation = (((pFrame)->parsedIEs->content.iePacket.capabilities >> CAP_PBCC_SHIFT) & CAP_PBCC_MASK) ? DRV_MODULATION_PBCC : DRV_MODULATION_CCK
-#define UPDATE_PROBE_RECV(pSite)                        pSite->probeRecv = TI_TRUE
-#define UPDATE_APSD(pSite, pFrame)                      if ((pFrame)->parsedIEs->content.iePacket.WMEParams == NULL) \
-                                                                (pSite)->APSDSupport = ((((pFrame)->parsedIEs->content.iePacket.capabilities >> CAP_APSD_SHIFT) & CAP_APSD_MASK) ? TI_TRUE : TI_FALSE); \
-                                                        else \
-                                                            pSite->APSDSupport = (((((pFrame)->parsedIEs->content.iePacket.capabilities >> CAP_APSD_SHIFT) & CAP_APSD_MASK) ? TI_TRUE : TI_FALSE) || \
-                                                                                  ((((pFrame)->parsedIEs->content.iePacket.WMEParams->ACInfoField >> AP_QOS_INFO_UAPSD_SHIFT) & AP_QOS_INFO_UAPSD_MASK) ? TI_TRUE : TI_FALSE));
-#define UPDATE_PREAMBLE(pSite, pFrame)                  { (pSite)->currentPreambleType = (((pFrame)->parsedIEs->content.iePacket.capabilities >> CAP_PREAMBLE_SHIFT) & CAP_PREAMBLE_MASK) ? PREAMBLE_SHORT : PREAMBLE_LONG; \
-                                                          (pSite)->barkerPreambleType = (pFrame)->parsedIEs->content.iePacket.barkerPreambleMode; }
-#define UPDATE_QOS(pSite, pFrame)                       if ( ((pFrame)->parsedIEs->content.iePacket.WMEParams  != NULL) && \
-                                                             (((((pFrame)->parsedIEs->content.iePacket.WMEParams->ACInfoField) & dot11_WME_ACINFO_MASK) != pSite->lastWMEParameterCnt) || (!pSite->WMESupported)) ) \
-                                                            pSite->WMESupported = TI_TRUE; \
-                                                        else \
-                                                            pSite->WMESupported = TI_FALSE;
-#define UPDATE_FRAME_BUFFER(pScanResultTable, pBuffer, uLength, pFrame)  if (pFrame->bufferLength < MAX_BEACON_BODY_LENGTH) \
-                                                        { \
-                                                           os_memoryCopy (pScanResultTable->hOS, pBuffer, pFrame->buffer, pFrame->bufferLength); \
-                                                           uLength = pFrame->bufferLength; \
-                                                        }
-#define UPDATE_RSSI(pSite, pFrame)                      (pSite)->rssi = (pFrame)->rssi;
-#define UPDATE_SNR(pSite, pFrame)                       (pSite)->snr = (pFrame)->snr;
-#define UPDATE_RATE(pSite, pFrame)                      if ((DRV_RATE_1M <= (pFrame)->rate) && (DRV_RATE_54M <= (pFrame)->rate)) \
-                                                            (pSite)->rxRate = (pFrame)->rate;
-#define UPDATE_UNKOWN_IE(pScanResultTable, pSite, pNewUnknwonIe, newUnknwonIeLen) if ((pNewUnknwonIe) != NULL) { \
-                                                                                    pSite->unknownIeLen = newUnknwonIeLen; \
-                                                                                    os_memoryCopy(pScanResultTable->hOS, \
-                                                                                                  (void *)(pSite->pUnknownIe), \
-                                                                                                  pNewUnknwonIe, \
-                                                                                                  newUnknwonIeLen);	\
-                                                                                  } else { \
-                                                                                 	pSite->unknownIeLen = 0; \
-                                                                                  }
-
-
-typedef struct
-{
-    TI_HANDLE       hOS;                    /**< Handle to the OS object */
-    TI_HANDLE       hReport;                /**< handle to the report object */
-    TI_HANDLE       hSiteMgr;               /**< Handle to the site manager object */
-    TSiteEntry      *pTable;                /**< site table */
-    TI_UINT32       uCurrentSiteNumber;     /**< number of sites currently in the table */
-    TI_UINT32       uEntriesNumber;         /**< max size of the table */
-    TI_UINT32       uIterator;              /**< table iterator used for getFirst / getNext */
-    TI_UINT32       uSraThreshold;          /**< Rssi threshold for frame filtering */
-    TI_BOOL         bStable;                /**< table status (updating / stable) */
-    EScanResultTableClear  eClearTable;     /** inicates if table should be cleared at scan */
-} TScanResultTable;
-
-static TSiteEntry  *scanResultTbale_AllocateNewEntry (TI_HANDLE hScanResultTable);
-static void         scanResultTable_UpdateSiteData (TI_HANDLE hScanResultTable, TSiteEntry *pSite, TScanFrameInfo *pFrame);
-static void         scanResultTable_updateRates(TI_HANDLE hScanResultTable, TSiteEntry *pSite, TScanFrameInfo *pFrame);
-static void         scanResultTable_UpdateWSCParams (TSiteEntry *pSite, TScanFrameInfo *pFrame);
-static TI_STATUS    scanResultTable_CheckRxSignalValidity(TScanResultTable *pScanResultTable, siteEntry_t *pSite, TI_INT8 rxLevel, TI_UINT8 channel);
-static void         scanResultTable_RemoveEntry(TI_HANDLE hScanResultTable, TI_UINT32 uIndex);
-
-
-/** 
- * \fn     scanResultTable_Create 
- * \brief  Create a scan result table object.
- * 
- * Create a scan result table object. Allocate system resources.
- * 
- * \note   
- * \param  hOS - handle to the OS object
- * \return Handle to the newly created scan result table object, NULL if an error occured.
- * \sa     scanResultTable_Init, scanResultTable_Destroy
- */ 
-TI_HANDLE scanResultTable_Create (TI_HANDLE hOS, TI_UINT32 uEntriesNumber)
-{
-    TScanResultTable    *pScanResultTable = NULL;
-
-    /* Allocate object storage */
-    pScanResultTable = (TScanResultTable*)os_memoryAlloc (hOS, sizeof(TScanResultTable));
-    if (NULL == pScanResultTable)
-    {
-        /* because the malloc failure here the TRACEx can not be used (no pointer for the 1st parameter to TRACEx) */
-        WLAN_OS_REPORT(("scanResultTable_Create: Unable to allocate memory for pScanResultTable of %d bytes\n", 
-			  sizeof (TScanResultTable)));
-        return NULL;  /* this is done similarly to the next error case */
-    }
-
-    pScanResultTable->hOS = hOS;
-    /* allocate memory for sites' data */
-    pScanResultTable->pTable = 
-        (TSiteEntry *)os_memoryAlloc (pScanResultTable->hOS, sizeof (TSiteEntry) * uEntriesNumber);
-    if (NULL == pScanResultTable->pTable)
-    {
-        TRACE2(pScanResultTable->hReport, REPORT_SEVERITY_ERROR , 
-			   "scanResultTable_Create: Unable to allocate memory for %d entries of %d bytes\n", 
-			   uEntriesNumber , sizeof (TSiteEntry));
-        os_memoryFree(pScanResultTable->hOS, pScanResultTable, sizeof(TScanResultTable));
-        return NULL;
-    }
-    pScanResultTable->uEntriesNumber = uEntriesNumber;
-    os_memoryZero(pScanResultTable->hOS, pScanResultTable->pTable, sizeof(TSiteEntry) * uEntriesNumber);
-    return (TI_HANDLE)pScanResultTable;
-}
-
-/** 
- * \fn     scanResultTable_Init 
- * \brief  Initializes the scan result table object 
- * 
- * Initializes the scan result table object. Set handles to other objects.
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \param  pStadHandles - modules handles table
- * \param  eClearTable - indicates if the table should be cleared, used when a frame arrives 
- *                       or setStable is called and the table is in stable state
- * \return None
- * \sa     scanResultTable_Create
- */ 
-void        scanResultTable_Init (TI_HANDLE hScanResultTable, TStadHandlesList *pStadHandles, EScanResultTableClear eClearTable)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-
-    /* set handles to other modules */
-    pScanResultTable->hReport = pStadHandles->hReport;
-    pScanResultTable->hSiteMgr = pStadHandles->hSiteMgr;
-
-    /* initialize other parameters */
-    pScanResultTable->uCurrentSiteNumber = 0;
-    pScanResultTable->bStable = TI_TRUE;
-    pScanResultTable->uIterator = 0;
-    pScanResultTable->eClearTable = eClearTable;
-    /* default Scan Result Aging threshold is 60 second */
-    pScanResultTable->uSraThreshold = 60;
-}
-
-
-/** 
- * \fn     scanResultTable_Destroy 
- * \brief  Destroys the scan result table object
- * 
- * Destroys the scan result table object. Release system resources
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \return None
- * \sa     scanResultTable_Create 
- */ 
-void        scanResultTable_Destroy (TI_HANDLE hScanResultTable)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-
-    /* if the table memory has already been allocated */
-    if (NULL != pScanResultTable->pTable)
-    {
-        /* free table memory */
-        os_memoryFree (pScanResultTable->hOS, (void*)pScanResultTable->pTable, 
-                       sizeof (TSiteEntry) * pScanResultTable->uEntriesNumber);
-    }
-
-    /* free scan result table object memeory */
-    os_memoryFree (pScanResultTable->hOS, (void*)hScanResultTable, sizeof (TScanResultTable));
-}
-
-/** 
- * \fn     scanResultTable_SetSraThreshold
- * \brief  set Scan Result Aging threshold 
- *  
- * \param  hScanResultTable - handle to the scan result table object
- * \param  uSraThreshold - Scan Result Aging threshold
- * \return None
- * \sa     scanResultTable_performAging
- */ 
-void scanResultTable_SetSraThreshold(TI_HANDLE hScanResultTable, TI_UINT32 uSraThreshold)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-    pScanResultTable->uSraThreshold = uSraThreshold;
-}
-
-/** 
- * \fn     scanResultTable_UpdateEntry
- * \brief  Update or insert a site data. 
- * 
- * Update a site's data in the table if it already exists, or create an entry if the site doesn't exist.
- * If the table is in stable state, will move it to updating state and clear its contents if bClearTable
- * is eClearTable.
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \param  pBssid - a pointer to the site BSSID
- * \param  pframe - a pointer to the received frame data
- * \return TI_OK if entry was inseretd or updated successfuly, TI_NOK if table is full
- * \sa     scanResultTable_SetStableState
- */ 
-TI_STATUS scanResultTable_UpdateEntry (TI_HANDLE hScanResultTable, TMacAddr *pBssid, TScanFrameInfo* pFrame)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-    TSiteEntry          *pSite;
-    TSsid               tTempSsid;
-
-    TRACE6(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_UpdateEntry: Adding or updating BBSID: %02x:%02x:%02x:%02x:%02x:%02x\n", (*pBssid)[ 0 ], (*pBssid)[ 1 ], (*pBssid)[ 2 ], (*pBssid)[ 3 ], (*pBssid)[ 4 ], (*pBssid)[ 5 ]);
-
-    /* check if the table is in stable state */
-    if (TI_TRUE == pScanResultTable->bStable)
-    {
-        TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_UpdateEntry: table is stable, clearing table and moving to updating state\n");
-        /* move the table to updating state */
-        pScanResultTable->bStable = TI_FALSE;
-
-        if (SCAN_RESULT_TABLE_CLEAR == pScanResultTable->eClearTable) 
-        {
-            /* clear table contents */
-            pScanResultTable->uCurrentSiteNumber = 0;
-        }
-    }
-
-    /* Verify that the SSID IE is available (if not return NOK) */
-    if (NULL == pFrame->parsedIEs->content.iePacket.pSsid) 
-    {
-        TRACE6(pScanResultTable->hReport, REPORT_SEVERITY_WARNING, "scanResultTable_UpdateEntry: can't add site %02d:%02d:%02d:%02d:%02d:%02d"                                  " because SSID IE is NULL\n", pBssid[ 0 ], pBssid[ 1 ], pBssid[ 2 ], pBssid[ 3 ], pBssid[ 4 ], pBssid[ 5 ]);
-        return TI_NOK;
-    }
-
-    /* use temporary SSID structure, and verify SSID length */
-    tTempSsid.len = pFrame->parsedIEs->content.iePacket.pSsid->hdr[1];
-    if (tTempSsid.len > MAX_SSID_LEN)
-    {
-        TRACE2(pScanResultTable->hReport, REPORT_SEVERITY_WARNING, "scanResultTable_UpdateEntry: SSID len=%d out of range. replaced by %d\n", tTempSsid.len, MAX_SSID_LEN);
-        return TI_NOK;
-    }
-    os_memoryCopy(pScanResultTable->hOS, 
-                  (void *)&(tTempSsid.str[ 0 ]), 
-                  (void *)&(pFrame->parsedIEs->content.iePacket.pSsid->serviceSetId[ 0 ]),
-                  tTempSsid.len);
-    if (MAX_SSID_LEN > tTempSsid.len)
-        tTempSsid.str[ tTempSsid.len ] ='\0';
-
-    /* check if the SSID:BSSID pair already exists in the table */
-    pSite = scanResultTable_GetBySsidBssidPair (hScanResultTable, &tTempSsid ,pBssid);
-    if (NULL != pSite)
-    {
-        if (TI_NOK != scanResultTable_CheckRxSignalValidity(pScanResultTable, pSite, pFrame->rssi, pFrame->channel))
-        {
-            TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_UpdateEntry: entry already exists, updating\n");
-            /* BSSID exists: update its data */
-            scanResultTable_UpdateSiteData (hScanResultTable, pSite, pFrame);
-        }
-    }
-    else
-    {
-        TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_UpdateEntry: entry doesn't exist, allocating a new entry\n");
-        /* BSSID doesn't exist: allocate a new entry for it */
-        pSite = scanResultTbale_AllocateNewEntry (hScanResultTable);
-        if (NULL == pSite)
-        {
-            TRACE6(pScanResultTable->hReport, REPORT_SEVERITY_WARNING , "scanResultTable_UpdateEntry: can't add site %02d:%02d:%02d:%02d:%02d:%02d"                                  " because table is full\n", pBssid[ 0 ], pBssid[ 1 ], pBssid[ 2 ], pBssid[ 3 ], pBssid[ 4 ], pBssid[ 5 ]);
-            return TI_NOK;
-        }
-
-        /* and update its data */
-        scanResultTable_UpdateSiteData (hScanResultTable, 
-                                        pSite,
-                                        pFrame);
-    }
-
-    return TI_OK;
-}
-
-/** 
- * \fn     scanResultTable_SetStableState 
- * \brief  Moves the table to stable state 
- * 
- * Moves the table to stable state. Also clears the tabel contents if required.
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \param  eClearTable - indicates if the table should be cleared in case the table
- *                       is in stable state (no result where received in last scan).
- * \return None
- * \sa     scanResultTable_UpdateEntry 
- */ 
-void    scanResultTable_SetStableState (TI_HANDLE hScanResultTable)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-
-    TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_SetStableState: setting stable state\n");
-
-    /* if also asked to clear the table, if it is at Stable mode means that no results were received, clear it! */
-    if ((TI_TRUE == pScanResultTable->bStable) && (SCAN_RESULT_TABLE_CLEAR == pScanResultTable->eClearTable))
-    {
-        TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_SetStableState: also clearing table contents\n");
-
-        pScanResultTable->uCurrentSiteNumber = 0;
-    }
-
-    /* set stable state */
-    pScanResultTable->bStable = TI_TRUE;
-
-}
-
-/** 
- * \fn     scanResultTable_GetFirst 
- * \brief  Retrieves the first entry in the table 
- * 
- * Retrieves the first entry in the table
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \return A pointer to the first entry in the table, NULL if the table is empty
- * \sa     scanResultTable_GetNext
- */ 
-TSiteEntry  *scanResultTable_GetFirst (TI_HANDLE hScanResultTable)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-
-    /* initialize the iterator to point at the first site */
-    pScanResultTable->uIterator = 0;
-
-    /* and return the next entry... */
-    return scanResultTable_GetNext (hScanResultTable);
-}
-
-/** 
- * \fn     scanResultTable_GetNext
- * \brief  Retreives the next entry in the table
- * 
- * Retreives the next entry in the table, until table is exhusted. A call to scanResultTable_GetFirst
- * must preceed a sequence of calls to this function.
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \return A pointer to the next entry in the table, NULL if the table is exhsuted
- * \sa     scanResultTable_GetFirst
- */ 
-TSiteEntry  *scanResultTable_GetNext (TI_HANDLE hScanResultTable)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-
-    /* if the iterator points to a site behind current table storage, return error */
-    if (pScanResultTable->uCurrentSiteNumber <= pScanResultTable->uIterator)
-    {
-        return NULL;
-    }
-
-    return &(pScanResultTable->pTable[ pScanResultTable->uIterator++ ]);
-}
-
-/** 
- * \fn     scanResultTable_GetByBssid
- * \brief  retreives an entry according to its SSID and BSSID
- * 
- * retreives an entry according to its BSSID
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \param  pSsid - SSID to search for
- * \param  pBssid - BSSID to search for
- * \return A pointer to the entry with macthing BSSID, NULL if no such entry was found. 
- */ 
-TSiteEntry  *scanResultTable_GetBySsidBssidPair (TI_HANDLE hScanResultTable, TSsid *pSsid, TMacAddr *pBssid)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-    TI_UINT32           uIndex;
-
-    TRACE6(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_GetBySsidBssidPair: Searching for SSID  BSSID %02x:%02x:%02x:%02x:%02x:%02x\n", (*pBssid)[ 0 ], (*pBssid)[ 1 ], (*pBssid)[ 2 ], (*pBssid)[ 3 ], (*pBssid)[ 4 ], (*pBssid)[ 5 ]);
-    
-    /* check all entries in the table */
-    for (uIndex = 0; uIndex < pScanResultTable->uCurrentSiteNumber; uIndex++)
-    {
-        /* if the BSSID and SSID match */
-        if (MAC_EQUAL (*pBssid, pScanResultTable->pTable[ uIndex ].bssid) &&
-            ((pSsid->len == pScanResultTable->pTable[ uIndex ].ssid.len) &&
-             (0 == os_memoryCompare (pScanResultTable->hOS, (TI_UINT8 *)(&(pSsid->str[ 0 ])),
-                                     (TI_UINT8 *)(&(pScanResultTable->pTable[ uIndex ].ssid.str[ 0 ])),
-                                     pSsid->len))))
-        {
-            TRACE1(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "Entry found at index %d\n", uIndex);
-            return &(pScanResultTable->pTable[ uIndex ]);
-        }
-    }
-
-    /* site wasn't found: return NULL */
-    TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_GetBySsidBssidPair: Entry was not found\n");
-    return NULL;
-}
-
-/** 
- * \fn     scanResultTable_FindHidden
- * \brief  find entry with hidden SSID anfd return it's index
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \param  uHiddenSsidIndex - entry index to return
- * \return TI_OK if found, TI_NOT if not. 
- */ 
-static TI_STATUS scanResultTable_FindHidden (TScanResultTable *pScanResultTable, TI_UINT32 *uHiddenSsidIndex)
-{
-    TI_UINT32 uIndex;
-
-    TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_FindHidden: Searching for hidden SSID\n");
-    
-    /* check all entries in the table */
-    for (uIndex = 0; uIndex < pScanResultTable->uCurrentSiteNumber; uIndex++)
-    {
-        /* check if entry is with hidden SSID */
-        if ( (pScanResultTable->pTable[ uIndex ].ssid.len == 0) ||
-            ((pScanResultTable->pTable[ uIndex ].ssid.len == 1) && (pScanResultTable->pTable[ uIndex ].ssid.str[0] == 0)))
-        {
-            TRACE1(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_FindHidden: Entry found at index %d\n", uIndex);
-            *uHiddenSsidIndex = uIndex;
-            return TI_OK;
-        }
-    }
-
-    /* site wasn't found: return NULL */
-    TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_FindHidden: Entry was not found\n");
-    return TI_NOK;
-}
-
-/** 
- * \fn     scanResultTable_performAging 
- * \brief  Deletes from table all entries which are older than the Sra threshold
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \return None
- * \sa     scanResultTable_SetSraThreshold
- */ 
-void   scanResultTable_PerformAging(TI_HANDLE hScanResultTable)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-    TI_UINT32           uIndex = 0;
-
-    /* check all entries in the table */
-    while (uIndex < pScanResultTable->uCurrentSiteNumber)
-    {
-        /* check if the entry's age is old if it remove it */
-        if (pScanResultTable->pTable[uIndex].localTimeStamp < 
-            os_timeStampMs(pScanResultTable->hOS) - MILISECONDS(pScanResultTable->uSraThreshold))
-        {
-            /* The removeEntry places the last entry instead of the deleted entry
-             * in order to preserve the table's continuity. For this reason the
-             * uIndex is not incremented because we want to check the entry that 
-             * was placed instead of the entry deleted */
-            scanResultTable_RemoveEntry(hScanResultTable, uIndex);
-        }
-        else
-        {
-            /* If the entry was not deleted check the next entry */
-            uIndex++;
-        }
-    }
-}
-
-/** 
- * \fn     scanResultTable_removeEntry 
- * \brief  Deletes entry from table
- *         the function keeps a continuty in the table by copying the last
- *         entry in the table to the place the entry was deleted from
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \param  uIndex           - index of the entry to be deleted
- * \return TI_OK if entry deleted successfully TI_NOK otherwise
- */ 
-void   scanResultTable_RemoveEntry(TI_HANDLE hScanResultTable, TI_UINT32 uIndex)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-
-    if (uIndex >= pScanResultTable->uCurrentSiteNumber) 
-    {
-        TRACE1(pScanResultTable->hReport, REPORT_SEVERITY_ERROR , "scanResultTable_removeEntry: %d out of bound entry index\n", uIndex);
-        return;
-    }
-
-    /* if uIndex is not the last entry, then copy the last entry in the table to the uIndex entry */
-    if (uIndex < (pScanResultTable->uCurrentSiteNumber - 1))
-    {
-        os_memoryCopy(pScanResultTable->hOS, 
-                      &(pScanResultTable->pTable[uIndex]), 
-                      &(pScanResultTable->pTable[pScanResultTable->uCurrentSiteNumber - 1]),
-                      sizeof(TSiteEntry));
-    }
-
-    /* clear the last entry */
-    os_memoryZero(pScanResultTable->hOS, &(pScanResultTable->pTable[pScanResultTable->uCurrentSiteNumber - 1]), sizeof(TSiteEntry));
-    /* decrease the current table size */
-    pScanResultTable->uCurrentSiteNumber--;
-}
-
-/** 
- * \fn     scanresultTbale_AllocateNewEntry 
- * \brief  Allocates an empty entry for a new site
- * 
- * Function Allocates an empty entry for a new site (and nullfiies required entry fields)
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \return Pointer to the site entry (NULL if the table is full)
- */ 
-TSiteEntry *scanResultTbale_AllocateNewEntry (TI_HANDLE hScanResultTable)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-    TI_UINT32 uHiddenSsidIndex;
-
-    /* if the table is full */
-    if (pScanResultTable->uCurrentSiteNumber >= pScanResultTable->uEntriesNumber)
-    {
-        /* replace hidden SSID entry with the new result */
-        if (scanResultTable_FindHidden(pScanResultTable, &uHiddenSsidIndex) == TI_OK)
-        {
-            TRACE1(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTbale_AllocateNewEntry: Table is full, found hidden SSID at index %d to replace with\n", uHiddenSsidIndex);
-            
-            /* Nullify new site data */
-            os_memoryZero(pScanResultTable->hOS, &(pScanResultTable->pTable[ uHiddenSsidIndex ]), sizeof (TSiteEntry));
-
-            /* return the site */
-            return &(pScanResultTable->pTable[ uHiddenSsidIndex ]);
-        }
-
-        TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTbale_AllocateNewEntry: Table is full, no Hidden SSDI to replace, can't allocate new entry\n");
-        return NULL;
-    }
-
-    TRACE1(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTbale_AllocateNewEntry: New entry allocated at index %d\n", pScanResultTable->uCurrentSiteNumber);
-
-    /* Nullify new site data */
-    os_memoryZero(pScanResultTable->hOS, &(pScanResultTable->pTable[ pScanResultTable->uCurrentSiteNumber ]), sizeof (TSiteEntry));
-
-    /* return the site (and update site count) */
-    pScanResultTable->uCurrentSiteNumber++;
-    return &(pScanResultTable->pTable[ pScanResultTable->uCurrentSiteNumber - 1 ]);
-}
-
-/** 
- * \fn     scanResultTable_UpdateSiteData 
- * \brief  Update a site entry data from a received frame (beacon or probe response)
- * 
- * Update a site entry data from a received frame (beacon or probe response)
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \param  pSite - the site entry to update
- * \param  pFrame - the received frame information
- * \return None
- */ 
-void scanResultTable_UpdateSiteData (TI_HANDLE hScanResultTable, TSiteEntry *pSite, TScanFrameInfo *pFrame)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-    paramInfo_t         param;
-
-    /* Update SSID */
-    if (pFrame->parsedIEs->content.iePacket.pSsid != NULL) 
-    {
-        pSite->ssid.len = pFrame->parsedIEs->content.iePacket.pSsid->hdr[1];
-        if (pSite->ssid.len > MAX_SSID_LEN) 
-        {
-           TRACE2( pScanResultTable->hReport, REPORT_SEVERITY_ERROR, "scanResultTable_UpdateSiteData: pSite->ssid.len=%d exceeds the limit. Set to limit value %d\n", pSite->ssid.len, MAX_SSID_LEN);
-           pSite->ssid.len = MAX_SSID_LEN;
-        }
-        os_memoryCopy(pScanResultTable->hOS,
-            (void *)pSite->ssid.str,
-            (void *)pFrame->parsedIEs->content.iePacket.pSsid->serviceSetId,
-            pSite->ssid.len);
-        if (pSite->ssid.len < MAX_SSID_LEN) 
-        {
-            pSite->ssid.str[pSite->ssid.len] = '\0';
-        }
-    }
-
-	/* Since a new scan was initiated the entry can be selected again */
-	pSite->bConsideredForSelect = TI_FALSE;
-    UPDATE_LOCAL_TIMESTAMP(pSite, pScanResultTable->hOS);
-
-    UPDATE_BSSID (pSite, pFrame);
-    UPDATE_BAND (pSite, pFrame);
-    UPDATE_BEACON_INTERVAL (pSite, pFrame);
-    UPDATE_CAPABILITIES (pSite, pFrame);
-    UPDATE_PRIVACY (pSite, pFrame);
-    UPDATE_RSN_IE (pScanResultTable, pSite, pFrame->parsedIEs->content.iePacket.pRsnIe, pFrame->parsedIEs->content.iePacket.rsnIeLen);
-    UPDATE_APSD (pSite, pFrame);
-    UPDATE_PREAMBLE (pSite, pFrame);
-    UPDATE_AGILITY (pSite, pFrame);
-    UPDATE_RSSI (pSite, pFrame);
-    UPDATE_SNR (pSite, pFrame);
-    UPDATE_RATE (pSite, pFrame);
-	UPDATE_UNKOWN_IE(pScanResultTable, pSite, pFrame->parsedIEs->content.iePacket.pUnknownIe, pFrame->parsedIEs->content.iePacket.unknownIeLen );
-
-    param.paramType = SITE_MGR_OPERATIONAL_MODE_PARAM;
-    siteMgr_getParam (pScanResultTable->hSiteMgr, &param);
-    if (param.content.siteMgrDot11OperationalMode == DOT11_G_MODE)
-    {
-        UPDATE_SLOT_TIME (pSite, pFrame);
-        UPDATE_PROTECTION (pSite, pFrame);
-    }
-
-    scanResultTable_updateRates (hScanResultTable, pSite, pFrame);
-
-    if ((pFrame->parsedIEs->content.iePacket.pDSParamsSet != NULL)  &&
-        (pFrame->parsedIEs->content.iePacket.pDSParamsSet->currChannel != pFrame->channel))
-    {
-        TRACE2(pScanResultTable->hReport, REPORT_SEVERITY_ERROR , "scanResultTable_UpdateSiteData: wrong channels, radio channel=%d, frame channel=%d\n", pFrame->channel, pFrame->parsedIEs->content.iePacket.pDSParamsSet->currChannel);
-    }
-    else
-        UPDATE_CHANNEL (pSite, pFrame , pFrame->channel);
-
-    UPDATE_BSS_TYPE (pSite, pFrame);
-    UPDATE_ATIM_WINDOW (pSite, pFrame);
-    UPDATE_AP_TX_POWER (pSite, pFrame);
-    UPDATE_QOS (pSite, pFrame);
-    UPDATE_BEACON_TIMESTAMP (pScanResultTable, pSite, pFrame);
-    scanResultTable_UpdateWSCParams (pSite, pFrame);
-    siteMgr_UpdatHtParams (pScanResultTable->hSiteMgr, pSite, pFrame->parsedIEs);
-
-    if (BEACON == pFrame->parsedIEs->subType)
-    {
-        /* DTIM is only available in beacons */
-        if (pSite->bssType == BSS_INFRASTRUCTURE)
-        {
-            UPDATE_DTIM_PERIOD (pSite, pFrame);
-        }
-
-        UPDATE_BEACON_MODULATION (pSite, pFrame);
-
-        /* If the BSS type is independent, the beacon & probe modulation are equal,
-            It is important to update this field here for dynamic PBCC algorithm compatibility */
-        if (pSite->bssType == BSS_INDEPENDENT)
-        {
-            UPDATE_PROBE_MODULATION (pSite, pFrame);
-        }
-
-        pSite->bChannelSwitchAnnoncIEFound = (pFrame->parsedIEs->content.iePacket.channelSwitch != NULL)?TI_TRUE:TI_FALSE;
-
-        UPDATE_BEACON_RECV (pSite);
-        UPDATE_FRAME_BUFFER (pScanResultTable, (pSite->beaconBuffer), (pSite->beaconLength), pFrame); 
-    }
-    else if (PROBE_RESPONSE == pFrame->parsedIEs->subType)
-    {
-        UPDATE_PROBE_MODULATION (pSite, pFrame);
-
-        /* If the BSS type is independent, the beacon & probe modulation are equal,
-            It is important to update this field here for dynamic PBCC algorithm compatibility */
-        if (pSite->bssType == BSS_INDEPENDENT)
-            UPDATE_BEACON_MODULATION (pSite, pFrame);
-
-        UPDATE_PROBE_RECV (pSite);
-        UPDATE_FRAME_BUFFER (pScanResultTable, (pSite->probeRespBuffer), (pSite->probeRespLength), pFrame);
-
-        pSite->bChannelSwitchAnnoncIEFound = TI_FALSE;
-    }
-    else
-    {
-        TRACE1(pScanResultTable->hReport, REPORT_SEVERITY_ERROR , "scanResultTable_UpdateSiteData: unknown frame sub type %d\n", pFrame->parsedIEs->subType);
-    }
-}
-
-/** 
- * \fn     scanResultTable_updateRates 
- * \brief  Update a scan result table entry with rates information 
- * 
- * Called by the function 'updateSiteInfo()' in order to translate the rates received
- * in the beacon or probe response to rate used by the driver. Perfoms the following:
- *    -   Check the rates. validity. If rates are invalid, return
- *    -   Get the max active rate & max basic rate, if invalid, return
- *    -   Translate the max active rate and max basic rate from network rates to host rates.
- *        The max active & max basic rate are used by the driver from now on in all the processes:
- *        (selection, join, transmission, etc....)
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \param  pSite - a pointer to the site entry to update 
- * \param  pFrame - a pointer to the received frame
- * \return None
- * \sa     scanResultTable_UpdateSiteData 
- */ 
-void scanResultTable_updateRates(TI_HANDLE hScanResultTable, TSiteEntry *pSite, TScanFrameInfo *pFrame)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-    TI_UINT8            maxBasicRate = 0, maxActiveRate = 0;
-    TI_UINT32           bitMapExtSupp = 0;
-	TI_UINT32           uMcsSupportedRateMask = 0, uMcsbasicRateMask = 0;
-
-    if (pFrame->parsedIEs->content.iePacket.pRates == NULL)
-    {
-        TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_ERROR, "scanResultTable_updateRates, pRates=NULL, beacon & probeResp are:\n");
-        TRACE_INFO_HEX(pScanResultTable->hReport, (TI_UINT8*)pFrame->parsedIEs->content.iePacket.pRates, pFrame->parsedIEs->content.iePacket.pRates->hdr[1]+2);
-        TRACE_INFO_HEX(pScanResultTable->hReport, (TI_UINT8*)pFrame->parsedIEs->content.iePacket.pRates, pFrame->parsedIEs->content.iePacket.pRates->hdr[1]+2);
-        return;
-    }
-
-    /* Update the rate elements */
-    maxBasicRate = (TI_UINT8)rate_GetMaxBasicFromStr ((TI_UINT8 *)pFrame->parsedIEs->content.iePacket.pRates->rates, 
-                                            pFrame->parsedIEs->content.iePacket.pRates->hdr[1], (ENetRate)maxBasicRate);
-    maxActiveRate = (TI_UINT8)rate_GetMaxActiveFromStr ((TI_UINT8 *)pFrame->parsedIEs->content.iePacket.pRates->rates,
-                                              pFrame->parsedIEs->content.iePacket.pRates->hdr[1], (ENetRate)maxActiveRate);
-
-    if (pFrame->parsedIEs->content.iePacket.pExtRates)
-    {
-        maxBasicRate = (TI_UINT8)rate_GetMaxBasicFromStr ((TI_UINT8 *)pFrame->parsedIEs->content.iePacket.pExtRates->rates,
-                                                pFrame->parsedIEs->content.iePacket.pExtRates->hdr[1], (ENetRate)maxBasicRate);
-        maxActiveRate = (TI_UINT8)rate_GetMaxActiveFromStr ((TI_UINT8 *)pFrame->parsedIEs->content.iePacket.pExtRates->rates,
-                                                  pFrame->parsedIEs->content.iePacket.pExtRates->hdr[1], (ENetRate)maxActiveRate);
-    }
-
-    if (maxActiveRate == 0)
-    {
-        maxActiveRate = maxBasicRate;
-    }
-
-    /* Now update it from network to host rates */
-    pSite->maxBasicRate = rate_NetToDrv (maxBasicRate);
-    pSite->maxActiveRate = rate_NetToDrv (maxActiveRate);
-    if (pSite->maxActiveRate == DRV_RATE_INVALID)
-            TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_ERROR, "scanResultTable_updateRates: Network To Host Rate failure, no active network rate\n");
-
-    if (pSite->maxBasicRate != DRV_RATE_INVALID)
-    {
-        if (pSite->maxActiveRate != DRV_RATE_INVALID)
-        {
-            pSite->maxActiveRate = TI_MAX (pSite->maxActiveRate, pSite->maxBasicRate);
-        }
-    } else { /* in case some vendors don't specify basic rates */
-        TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_WARNING, "scanResultTable_updateRates: Network To Host Rate failure, no basic network rate");
-        pSite->maxBasicRate = pSite->maxActiveRate;
-    }
-
-    /* build rates bit map */
-    rate_NetStrToDrvBitmap (&pSite->rateMask.supportedRateMask,
-                            pFrame->parsedIEs->content.iePacket.pRates->rates,
-                            pFrame->parsedIEs->content.iePacket.pRates->hdr[1]);
-    rate_NetBasicStrToDrvBitmap (&pSite->rateMask.basicRateMask,
-                                 pFrame->parsedIEs->content.iePacket.pRates->rates,
-                                 pFrame->parsedIEs->content.iePacket.pRates->hdr[1]);
-
-    if (pFrame->parsedIEs->content.iePacket.pExtRates)
-    {
-        rate_NetStrToDrvBitmap (&bitMapExtSupp, 
-                                pFrame->parsedIEs->content.iePacket.pExtRates->rates,
-                                pFrame->parsedIEs->content.iePacket.pExtRates->hdr[1]);
-
-        pSite->rateMask.supportedRateMask |= bitMapExtSupp;
-
-        rate_NetBasicStrToDrvBitmap (&bitMapExtSupp, 
-                                     pFrame->parsedIEs->content.iePacket.pExtRates->rates,
-                                     pFrame->parsedIEs->content.iePacket.pExtRates->hdr[1]);
-
-        pSite->rateMask.basicRateMask |= bitMapExtSupp;
-    }
-
-	if (pFrame->parsedIEs->content.iePacket.pHtCapabilities != NULL)
-    {
-        /* MCS build rates bit map */
-        rate_McsNetStrToDrvBitmap (&uMcsSupportedRateMask,
-                                   (pFrame->parsedIEs->content.iePacket.pHtCapabilities->aHtCapabilitiesIe + DOT11_HT_CAPABILITIES_MCS_RATE_OFFSET));
-
-        pSite->rateMask.supportedRateMask |= uMcsSupportedRateMask;
-    }
-
-    if (pFrame->parsedIEs->content.iePacket.pHtInformation != NULL)
-    {
-        /* MCS build rates bit map */
-        rate_McsNetStrToDrvBitmap (&uMcsbasicRateMask,
-                                   (pFrame->parsedIEs->content.iePacket.pHtInformation->aHtInformationIe + DOT11_HT_INFORMATION_MCS_RATE_OFFSET));
-
-        pSite->rateMask.basicRateMask |= uMcsbasicRateMask;
-    }
-}
-
-/** 
- * \fn     scanResultTable_UpdateWSCParams 
- * \brief  Update a scan result table entry with WSC information 
- * 
- * Update a scan result table entry with WSC information
- * 
- * \param  pSite - a pointer to the site entry to update 
- * \param  pFrame - a pointer to the received frame
- * \return None
- * \sa     scanResultTable_UpdateSiteData 
- */ 
-void scanResultTable_UpdateWSCParams (TSiteEntry *pSite, TScanFrameInfo *pFrame)
-{
-    /* if the IE is not null => the WSC is on - check which method is supported */
-    if (pFrame->parsedIEs->content.iePacket.WSCParams != NULL)
-    {
-        TI_UINT8    *tlvPtr,*endPtr;
-        TI_UINT16   tlvPtrType,tlvPtrLen,selectedMethod=0;
-    
-        tlvPtr = (TI_UINT8*)pFrame->parsedIEs->content.iePacket.WSCParams->WSCBeaconOrProbIE;
-        endPtr = tlvPtr + pFrame->parsedIEs->content.iePacket.WSCParams->hdr[1] - DOT11_OUI_LEN;
-    
-        do
-        {
-            tlvPtrType = WLANTOHS (WLAN_WORD(tlvPtr));
-    
-            if (tlvPtrType == DOT11_WSC_DEVICE_PASSWORD_ID)
-            {
-                tlvPtr+=2;
-                tlvPtr+=2;
-                selectedMethod = WLANTOHS (WLAN_WORD(tlvPtr));
-                break;
-            }
-            else
-            {
-                tlvPtr+=2;
-                tlvPtrLen = WLANTOHS (WLAN_WORD(tlvPtr));
-                tlvPtr+=tlvPtrLen+2;
-            }
-        } while ((tlvPtr < endPtr) && (selectedMethod == 0));
-       
-        if (tlvPtr > endPtr)
-        {
-            pSite->WSCSiteMode = TIWLN_SIMPLE_CONFIG_OFF;
-            return;
-        }
-    
-        if (selectedMethod == DOT11_WSC_DEVICE_PASSWORD_ID_PIN)
-            pSite->WSCSiteMode = TIWLN_SIMPLE_CONFIG_PIN_METHOD;
-        else if (selectedMethod == DOT11_WSC_DEVICE_PASSWORD_ID_PBC)
-            pSite->WSCSiteMode = TIWLN_SIMPLE_CONFIG_PBC_METHOD;
-        else 
-            pSite->WSCSiteMode = TIWLN_SIMPLE_CONFIG_OFF;
-    }
-    else
-    {
-        pSite->WSCSiteMode = TIWLN_SIMPLE_CONFIG_OFF;
-    }
-}
-
-/** 
- * \fn     scanResultTable_GetNumOfBSSIDInTheList
- * \brief  Returns the number of BSSID's in the scan result list
- * 
- * \param  hScanResultTable - handle to the scan result table
- * \return The number of BSSID's in the list
- * \sa scanResultTable_GetBssidSupportedRatesList
- */ 
-TI_UINT32 scanResultTable_GetNumOfBSSIDInTheList (TI_HANDLE hScanResultTable)
-{
-	return ((TScanResultTable*)hScanResultTable)->uCurrentSiteNumber;
-}
-
-/** 
- * \fn     scanResultTable_CalculateBssidListSize
- * \brief  Calculates the size required for BSSID list storage
- * 
- * Calculates the size required for BSSID list storage
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \param  bAllVarIes - whether to include all variable size IEs
- * \return The total length required
- * \sa     scanResultTable_GetBssidList
- */ 
-TI_UINT32 scanResultTable_CalculateBssidListSize (TI_HANDLE hScanResultTable, TI_BOOL bAllVarIes)
-{
-    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;
-    TI_UINT32           uSiteIndex, uSiteLength, uLength = 0;
-    TSiteEntry          *pSiteEntry;
-
-    /* set the length of the list header (sites count) */
-    uLength = sizeof(OS_802_11_BSSID_LIST_EX) - sizeof(OS_802_11_BSSID_EX);
-
-    /* check lengthes of all sites in the table */
-    for (uSiteIndex = 0; uSiteIndex < pScanResultTable->uCurrentSiteNumber; uSiteIndex++)
-    {
-        pSiteEntry = &(pScanResultTable->pTable[ uSiteIndex ]);
-        /* if full list is requested */
-        if (bAllVarIes)
-        {
-            /* set length of all IEs for this site */
-            uSiteLength = sizeof(OS_802_11_BSSID_EX) + sizeof(OS_802_11_FIXED_IEs);
-            /* and add beacon or probe response length */
-            if (TI_TRUE == pSiteEntry->probeRecv)
-            {
-                uSiteLength += pSiteEntry->probeRespLength;
-            }
-            else
-            {
-                uSiteLength += pSiteEntry->beaconLength;
-            }
-                     
-        }
-        /* partial list is requested */
-        else
-        {
-            uSiteLength = (sizeof(OS_802_11_BSSID_EX) + sizeof(OS_802_11_FIXED_IEs) +
-                           (pSiteEntry->ssid.len + 2) + (DOT11_MAX_SUPPORTED_RATES + 2) +
-                           + (DOT11_DS_PARAMS_ELE_LEN +2) + pSiteEntry->rsnIeLen + pSiteEntry->unknownIeLen);
-
-            /* QOS_WME information element */
-            if (pSiteEntry->WMESupported)
-            {
-                /* length of element + header */
-                uSiteLength += (DOT11_WME_PARAM_ELE_LEN + 2);
-            }
-        }
-
-        /* make sure length is 4 bytes aligned */
-        if (uSiteLength % 4)
-        {
-            uSiteLength += (4 - (uSiteLength % 4));
-        }
-
-        /* add this site length to the total length */
-        uLength += uSiteLength;
-
-        TRACE2(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_calculateBssidListSize: BSSID length=%d on site index %d\n", uSiteLength, uSiteIndex);
-    }
-
-    TRACE1(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_calculateBssidListSize: total length=%d \n", uLength);
-
-    return uLength;
-}
-
-/** 
- * \fn     scanResultTable_GetBssidList
- * \brief  Retrieves the site table content
- * 
- * Retrieves the site table content
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \param  pBssidList - pointer to a buffer large enough to hols the BSSID list
- * \param  plength - length of the supplied buffer, will be overwritten with the actual list length
- * \param  bAllVarIes - whether to include all variable size IEs
- * \return None
- * \sa     scanResultTable_CalculateBssidListSize
- */ 
-TI_STATUS scanResultTable_GetBssidList (TI_HANDLE hScanResultTable, 
-                                        OS_802_11_BSSID_LIST_EX *pBssidList, 
-                                        TI_UINT32 *pLength, 
-                                        TI_BOOL bAllVarIes)
-{
-    TScanResultTable        *pScanResultTable = (TScanResultTable*)hScanResultTable;
-    TI_UINT32                uLength, uSiteIndex, rsnIndex, rsnIeLength, len, firstOFDMloc = 0;
-    TSiteEntry              *pSiteEntry;
-    OS_802_11_BSSID_EX      *pBssid;
-    OS_802_11_FIXED_IEs     *pFixedIes;
-    OS_802_11_VARIABLE_IEs  *pVarIes;
-    TI_UINT8                *pData;
-
-    TRACE2(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_GetBssidList called, pBssidList= 0x%p, pLength=%d\n", pBssidList, *pLength);
-
-    /* verify the supplied length is enough */
-    uLength = scanResultTable_CalculateBssidListSize (hScanResultTable, bAllVarIes);
-    if (uLength > *pLength)
-    {
-        TRACE2(pScanResultTable->hReport, REPORT_SEVERITY_ERROR , "scanResultTable_GetBssidList: received length %d, insufficient to hold list of size %d\n", *pLength, uLength);
-        *pLength = uLength;
-        return TI_NOK;
-    }
-#ifdef TI_DBG
-    else
-    {
-        TRACE2(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_GetBssidList: supplied length: %d, required length: %d\n", *pLength, uLength);
-    }
-#endif
-
-    /* Nullify number of items in the BSSID list */
-    pBssidList->NumberOfItems = 0;
-
-    /* set length to list header size (only list count) */
-    uLength = sizeof(OS_802_11_BSSID_LIST_EX) - sizeof(OS_802_11_BSSID_EX);
-
-    /* set data pointer to first item in list */
-    pData = (TI_UINT8*)&(pBssidList->Bssid[0]);
-
-    for (uSiteIndex = 0; uSiteIndex < pScanResultTable->uCurrentSiteNumber; uSiteIndex++)
-    {
-        /* set BSSID entry pointer to current location in buffer */
-        pBssid = (OS_802_11_BSSID_EX*)pData;
-
-        /* set pointer to site entry */
-        pSiteEntry = &(pScanResultTable->pTable[ uSiteIndex ]);
-
-        TRACE7(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_GetBssidList: copying entry at index %d, BSSID %02x:%02x:%02x:%02x:%02x:%02x\n", uSiteIndex, pSiteEntry->bssid[ 0 ], pSiteEntry->bssid[ 1 ], pSiteEntry->bssid[ 2 ], pSiteEntry->bssid[ 3 ], pSiteEntry->bssid[ 4 ], pSiteEntry->bssid[ 5 ]);
-
-        /* start copy stuff: */
-        /* MacAddress */
-        MAC_COPY (pBssid->MacAddress, pSiteEntry->bssid);
-        
-        /* Capabilities */
-        pBssid->Capabilities = pSiteEntry->capabilities;
-
-        /* SSID */
-        os_memoryZero (pScanResultTable->hOS, &(pBssid->Ssid.Ssid), MAX_SSID_LEN);
-        if (pSiteEntry->ssid.len > MAX_SSID_LEN)
-        {
-            pSiteEntry->ssid.len = MAX_SSID_LEN;
-        }
-        os_memoryCopy (pScanResultTable->hOS, 
-                       (void *)pBssid->Ssid.Ssid, 
-                       (void *)pSiteEntry->ssid.str, 
-                       pSiteEntry->ssid.len);
-        pBssid->Ssid.SsidLength = pSiteEntry->ssid.len;
-
-        /* privacy */
-        pBssid->Privacy = pSiteEntry->privacy;
-
-        /* RSSI */
-        pBssid->Rssi = pSiteEntry->rssi;
-
-        pBssid->Configuration.Length = sizeof(OS_802_11_CONFIGURATION);
-        pBssid->Configuration.BeaconPeriod = pSiteEntry->beaconInterval;
-        pBssid->Configuration.ATIMWindow = pSiteEntry->atimWindow;
-        pBssid->Configuration.Union.channel = Chan2Freq(pSiteEntry->channel);
-
-        if  (pSiteEntry->bssType == BSS_INDEPENDENT)
-            pBssid->InfrastructureMode = os802_11IBSS;
-        else
-            pBssid->InfrastructureMode = os802_11Infrastructure;
-        /* Supported Rates */
-        os_memoryZero (pScanResultTable->hOS, (void *)pBssid->SupportedRates, sizeof(OS_802_11_RATES_EX));
-        rate_DrvBitmapToNetStr (pSiteEntry->rateMask.supportedRateMask,
-                                pSiteEntry->rateMask.basicRateMask,
-                                (TI_UINT8*)pBssid->SupportedRates,
-                                &len, 
-                                &firstOFDMloc);
-
-        /* set network type acording to band and rates */
-        if (RADIO_BAND_2_4_GHZ == pSiteEntry->eBand)
-        {
-            if (firstOFDMloc == len)
-            {
-                pBssid->NetworkTypeInUse = os802_11DS;
-            } else {
-                pBssid->NetworkTypeInUse = os802_11OFDM24;
-            }
-        }
-        else
-        {
-            pBssid->NetworkTypeInUse = os802_11OFDM5;
-        }
-
-        /* start copy IE's: first nullify length */
-        pBssid->IELength = 0;
-
-        /* copy fixed IEs from site entry */
-        pFixedIes = (OS_802_11_FIXED_IEs*)&(pBssid->IEs[ pBssid->IELength ]);
-        os_memoryCopy (pScanResultTable->hOS, (void*)pFixedIes->TimeStamp, 
-                       &(pSiteEntry->tsfTimeStamp[ 0 ]), TIME_STAMP_LEN);
-        pFixedIes->BeaconInterval = pSiteEntry->beaconInterval;
-        pFixedIes->Capabilities = pSiteEntry->capabilities;
-        pBssid->IELength += sizeof(OS_802_11_FIXED_IEs);
-
-        /* set pointer for variable length IE's */
-        pVarIes = (OS_802_11_VARIABLE_IEs*)&(pBssid->IEs[ pBssid->IELength ]);
-
-        if (!bAllVarIes)
-        {   /* copy only some variable IEs */
-
-            /* copy SSID */
-            pVarIes->ElementID = SSID_IE_ID;
-            pVarIes->Length = pSiteEntry->ssid.len;
-            os_memoryCopy (pScanResultTable->hOS, 
-                           (void *)pVarIes->data, 
-                           (void *)pSiteEntry->ssid.str, 
-                           pSiteEntry->ssid.len);
-            pBssid->IELength += (pVarIes->Length + 2);
-
-            /* copy RATES */
-            pVarIes = (OS_802_11_VARIABLE_IEs*)&(pBssid->IEs[ pBssid->IELength ]);
-            pVarIes->ElementID = SUPPORTED_RATES_IE_ID;
-            rate_DrvBitmapToNetStr (pSiteEntry->rateMask.supportedRateMask, 
-                                    pSiteEntry->rateMask.basicRateMask,
-                                    (TI_UINT8 *)pVarIes->data, 
-                                    &len, 
-                                    &firstOFDMloc);
-            pVarIes->Length = len;
-            pBssid->IELength += (pVarIes->Length + 2);
-
-            /* copy DS */
-            pVarIes = (OS_802_11_VARIABLE_IEs*)&(pBssid->IEs[ pBssid->IELength ]);
-            pVarIes->ElementID = DS_PARAMETER_SET_IE_ID;
-            pVarIes->Length = DOT11_DS_PARAMS_ELE_LEN;
-            os_memoryCopy (pScanResultTable->hOS, (void *)pVarIes->data, 
-                           &(pSiteEntry->channel), DOT11_DS_PARAMS_ELE_LEN);
-            pBssid->IELength += (pVarIes->Length + 2);
-
-            /* copy RSN information elements */
-            if (0 < pSiteEntry->rsnIeLen)
-            {
-                rsnIeLength = 0;
-                for (rsnIndex=0; rsnIndex < MAX_RSN_IE && pSiteEntry->pRsnIe[ rsnIndex ].hdr[1] > 0; rsnIndex++)
-                {
-                    pVarIes = (OS_802_11_VARIABLE_IEs*)&(pBssid->IEs[ pBssid->IELength + rsnIeLength ]);
-                    pVarIes->ElementID = pSiteEntry->pRsnIe[ rsnIndex ].hdr[0];
-                    pVarIes->Length = pSiteEntry->pRsnIe[ rsnIndex ].hdr[1];
-                    os_memoryCopy (pScanResultTable->hOS, (void *)pVarIes->data, 
-                                   (void *)pSiteEntry->pRsnIe[ rsnIndex ].rsnIeData, 
-                                   pSiteEntry->pRsnIe[ rsnIndex ].hdr[1]);
-                    rsnIeLength += pSiteEntry->pRsnIe[ rsnIndex ].hdr[1] + 2;
-                }
-                pBssid->IELength += pSiteEntry->rsnIeLen;
-            }
-
-            /* QOS_WME/XCC */
-            if (TI_TRUE == pSiteEntry->WMESupported)
-            {
-                /* oui */
-                TI_UINT8            ouiWME[3] = {0x50, 0xf2, 0x01};
-                dot11_WME_PARAM_t   *pWMEParams; 
-
-                /* fill in the general element  parameters */
-                pVarIes =  (OS_802_11_VARIABLE_IEs*)&(pBssid->IEs[ pBssid->IELength ]);
-                pVarIes->ElementID = DOT11_WME_ELE_ID;
-                pVarIes->Length = DOT11_WME_PARAM_ELE_LEN;
-
-                /* fill in the specific element  parameters */
-                pWMEParams = (dot11_WME_PARAM_t*)pVarIes;
-                os_memoryCopy (pScanResultTable->hOS, (void *)pWMEParams->OUI, ouiWME, 3);
-                pWMEParams->OUIType = dot11_WME_OUI_TYPE;
-                pWMEParams->OUISubType = dot11_WME_OUI_SUB_TYPE_PARAMS_IE;
-                pWMEParams->version = dot11_WME_VERSION;
-                pWMEParams->ACInfoField = dot11_WME_ACINFO_MASK & pSiteEntry->lastWMEParameterCnt;
-
-                /* fill in the data  */
-                os_memoryCopy (pScanResultTable->hOS, &(pWMEParams->WME_ACParameteres),
-                               &(pSiteEntry->WMEParameters), sizeof(dot11_ACParameters_t));
-
-
-                /* update the general length */
-                pBssid->IELength += (pVarIes->Length + 2);
-            }
-
-			/* Copy the unknown IEs */
-			if ( 0 < pSiteEntry->unknownIeLen  ) {
-					os_memoryCopy (pScanResultTable->hOS, (void *)(&pBssid->IEs[ pBssid->IELength ]),
-								   (void *)pSiteEntry->pUnknownIe,
-								   pSiteEntry->unknownIeLen );
-					pBssid->IELength += pSiteEntry->unknownIeLen;
-			}
-
-        }
-        else
-        {   /* Copy all variable IEs */
-            if (pSiteEntry->probeRecv)
-            {
-                /* It looks like it never happens. Anyway decided to check */
-                if ( pSiteEntry->probeRespLength > MAX_BEACON_BODY_LENGTH )
-                   /* it may have sense to check the Len here for 0 or MIN_BEACON_BODY_LENGTH also */
-                {
-                    TRACE2( pScanResultTable->hReport, REPORT_SEVERITY_ERROR,
-                         "scanResultTable_GetBssidList. pSiteEntry->probeRespLength=%d exceeds the limit %d\n",
-                         pSiteEntry->probeRespLength, MAX_BEACON_BODY_LENGTH);
-                    handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-                    return TI_NOK;
-                }
-                os_memoryCopy (pScanResultTable->hOS, pVarIes, 
-                               pSiteEntry->probeRespBuffer, pSiteEntry->probeRespLength);
-                pBssid->IELength += pSiteEntry->probeRespLength;
-            }
-            else
-            {
-                /* It looks like it never happens. Anyway decided to check */
-                if ( pSiteEntry->beaconLength > MAX_BEACON_BODY_LENGTH )
-                   /* it may have sense to check the Len here for 0 or MIN_BEACON_BODY_LENGTH also */
-                {
-                    TRACE2( pScanResultTable->hReport, REPORT_SEVERITY_ERROR,
-                         "scanResultTable_GetBssidList. pSiteEntry->beaconLength=%d exceeds the limit %d\n",
-                         pSiteEntry->beaconLength, MAX_BEACON_BODY_LENGTH);
-                    handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-                    return TI_NOK;
-                }
-                os_memoryCopy (pScanResultTable->hOS, pVarIes, 
-                               pSiteEntry->beaconBuffer, pSiteEntry->beaconLength);
-                pBssid->IELength += pSiteEntry->beaconLength;
-            }
-        }
-
-        /* -1 to remove the IEs[1] placeholder in OS_802_11_BSSID_EX which is taken into account in pBssid->IELength */
-        pBssid->Length = sizeof(OS_802_11_BSSID_EX) + pBssid->IELength - 1;
-
-        TRACE2(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_GetBssidList: before alignment fix, IEs length: %d, BSSID length %d\n", pBssid->IELength, pBssid->Length);
-
-        /* make sure length is 4 bytes aligned */
-        if (pBssid->Length % 4)
-        {
-            pBssid->Length += (4 - (pBssid->Length % 4));
-        }
-
-        TRACE2(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_GetBssidList: after alignment fix, IEs length: %d, BSSID length %d\n", pBssid->IELength, pBssid->Length);
-
-        pData += pBssid->Length;
-        uLength += pBssid->Length;
-
-        TRACE1(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_GetBssidList: current length: %d\n", uLength);
-    }
-
-    pBssidList->NumberOfItems = pScanResultTable->uCurrentSiteNumber;
-    *pLength = uLength;
-
-    TRACE2(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_GetBssidList: total length: %d, number of items: %d\n", uLength, pBssidList->NumberOfItems);
-
-    return TI_OK;
-}
-
-
-/** 
- * \fn     scanResultTable_GetBssidSupportedRatesList
- * \brief  Retrieves the Rate table corresponding with the site
- * table
- * 
- * 
- * \param  hScanResultTable - handle to the scan result table object
- * \param  pRateList - pointer to a buffer large enough to hols
- * the rate list
- * \param  pLength - length of the supplied buffer,
- * \return TI_STATUS
- * \sa scanResultTable_GetBssidSupportedRatesList
- */ 
-TI_STATUS scanResultTable_GetBssidSupportedRatesList (TI_HANDLE hScanResultTable,
-													  OS_802_11_N_RATES *pRateList,
-													  TI_UINT32 *pLength)
-{
-    TScanResultTable        *pScanResultTable = (TScanResultTable*)hScanResultTable;
-	TSiteEntry              *pSiteEntry;
-    TI_UINT32                uSiteIndex, firstOFDMloc = 0;
-	TI_UINT32                requiredLength;
-	OS_802_11_N_RATES	 	*pCurrRateString;
-
-    TRACE0(pScanResultTable->hReport, REPORT_SEVERITY_INFORMATION , "scanResultTable_GetBssidSupportedRatesList called");
-
-    /* Verify the supplied length is enough*/
-	requiredLength = pScanResultTable->uCurrentSiteNumber*sizeof(OS_802_11_N_RATES);
-	if (requiredLength > *pLength)
-    {
-        TRACE2(pScanResultTable->hReport, REPORT_SEVERITY_ERROR , "scanResultTable_GetBssidSupportedRatesList: received length %d, insufficient to hold list of size %d\n", *pLength, requiredLength);
-        *pLength = requiredLength;
-        return TI_NOK;
-    }
-
-    /* Create the rate list*/
-    for (uSiteIndex = 0; uSiteIndex < pScanResultTable->uCurrentSiteNumber; uSiteIndex++)
-    {
-		pCurrRateString = &(pRateList[uSiteIndex]);
-        pSiteEntry = &(pScanResultTable->pTable[ uSiteIndex ]);
-
-        /* Supported Rates */
-        os_memoryZero (pScanResultTable->hOS, (void *)pCurrRateString, sizeof(OS_802_11_N_RATES));
-        rate_DrvBitmapToNetStrIncluding11n (pSiteEntry->rateMask.supportedRateMask,
-												  pSiteEntry->rateMask.basicRateMask,
-												  (TI_UINT8*)pCurrRateString,
-												  &firstOFDMloc);
-	}
-
-    return TI_OK;
-}
-
-
-/***********************************************************************
- *                        siteMgr_CheckRxSignalValidity
- ***********************************************************************
-DESCRIPTION: Called by the scanResultTable_UpdateEntry when receiving managment frame 
-                Find the ste in the site table and validate that the 
-                RSSI of that site signal is not lower then -80DB + not lower
-                then the exising site RSSI
-
-
-INPUT:      hSiteMgr    -   site mgr handle.
-            rxLevel     -   Rx level the frame received in
-            bssid       -   BSSID of the frame
-
-OUTPUT:
-
-RETURN:     TI_OK / TI_NOK
-
-************************************************************************/
-/** 
- * \fn     scanResultTable_CheckRxSignalValidity
- * \brief  return the state of the table to its state after scan
- * 
- * Called by the scanResultTable_UpdateEntry when receiving managment frame   
- * validate that the RSSI of that site signal is not lower then then the exising site RSSI.
- * validate that the channel in correct.                                             
- * 
- * \param  pScanResultTable - scan result table object
- * \param  pSite - entry from the table
- * \param  rssi - RSSI level at which frame was received 
- * \param  channel - channel on which the frame was received 
- * \return None
- * \sa
- */ 
-static TI_STATUS scanResultTable_CheckRxSignalValidity(TScanResultTable *pScanResultTable, TSiteEntry *pSite, TI_INT8 rxLevel, TI_UINT8 channel)
-{
-     if ((channel != pSite->channel) &&
-         (rxLevel < pSite->rssi))
-     {   /* Ignore wrong packets with lower RSSI that were detect as
-         ripples from different channels */
-         TRACE4(pScanResultTable->hReport, REPORT_SEVERITY_WARNING, "scanResultTable_CheckRxSignalValidity:Rx RSSI =%d, on channel=%d, is lower then given RSSI =%d on channel=%d, dropping it.\n", rxLevel, channel, pSite->rssi, pSite->channel);
-         return TI_NOK;
-     }
-
-     return TI_OK;
-}
-
-
-
diff --git a/wl1271/stad/src/Sta_Management/scanResultTable.h b/wl1271/stad/src/Sta_Management/scanResultTable.h
deleted file mode 100644
index 846ad9e..0000000
--- a/wl1271/stad/src/Sta_Management/scanResultTable.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * scanResultTable.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  scanResultTable.h
- *  \brief declarations for a table holding scan results, by BSSID
- *
- *  \see   scanResultTable.c
- */
-
-
-#ifndef __SCAN_RESULT_TABLE_H__
-#define __SCAN_RESULT_TABLE_H__
-
-#include "osTIType.h"
-#include "tidef.h"
-#include "ScanCncn.h"
-#include "DrvMainModules.h"
-
-/* site types */
-typedef enum
-{
-    SITE_PRIMARY        = 0,
-    SITE_SELF           = 1,
-    SITE_REGULAR        = 2,
-    SITE_NULL           = 3
-} siteType_e;
-
-typedef struct
-{
-    /* The following fields are used for entry management at the SiteMng */
-    TI_UINT8                   index;
-    siteType_e                 siteType;
-    TI_UINT32                  localTimeStamp;
-    /* end of fields  are used for entry management at the SiteMng */
-
-    TI_BOOL                    bConsideredForSelect;
-    ERadioBand                 eBand;   
-    TI_UINT8                   tsfTimeStamp[ TIME_STAMP_LEN ];
-
-    /* The following fields are used for the selection */
-    TI_BOOL                    probeRecv;
-    TI_BOOL                    beaconRecv;
-    TMacAddr                   bssid;
-    TSsid                      ssid;
-    ScanBssType_e              bssType;
-    rateMask_t                 rateMask;
-    ERate                      maxBasicRate;
-    ERate                      maxActiveRate;
-    EModulationType            beaconModulation;
-    EModulationType            probeModulation;
-    EPreamble                  currentPreambleType;
-    EPreamble                  preambleAssRspCap;
-    EPreamble                  barkerPreambleType;
-    ESlotTime                  currentSlotTime;
-    ESlotTime                  newSlotTime;
-    TI_BOOL                    useProtection;
-    TI_BOOL                    NonErpPresent;
-    TI_UINT8                   channel;
-    TI_BOOL                    privacy;
-    TI_BOOL                    agility;
-    TI_UINT16                  capabilities;
-    TI_UINT16                  beaconInterval;
-    TI_UINT8                   dtimPeriod;
-    TI_INT8                    snr;
-    ERate                      rxRate;
-    TI_INT32                   rssi;
-
-    /* HT capabilites */
-	Tdot11HtCapabilitiesUnparse tHtCapabilities;
-	/* HT information */
-    TI_BOOL                     bHtInfoUpdate;
-	Tdot11HtInformationUnparse  tHtInformation;
-
-    /* QOS */
-    TI_BOOL                    WMESupported;
-    dot11_ACParameters_t       WMEParameters;
-    TI_UINT8                   lastWMEParameterCnt;
-
-    /* Power Constraint */
-    TI_UINT8                   powerConstraint;
-
-    /* AP Tx Power obtained from TPC Report */
-    TI_UINT8                   APTxPower;
-
-    /* UPSD */
-    TI_BOOL                    APSDSupport;
-
-    /* WiFi Simple Config */
-    TIWLN_SIMPLE_CONFIG_MODE   WSCSiteMode; /* indicates the current WiFi Simple Config mode of the specific site*/
-
-    TI_UINT16                  atimWindow;
-    dot11_RSN_t                pRsnIe[MAX_RSN_IE];
-    TI_UINT8                   rsnIeLen;
-
-    /* 80211h beacon  - Switch Channel IE included */
-    TI_BOOL                    bChannelSwitchAnnoncIEFound;
-
-	TI_UINT8                   pUnknownIe[MAX_BEACON_BODY_LENGTH];
-    TI_UINT16                  unknownIeLen;
-
-    mgmtStatus_e               failStatus;
-    TI_BOOL                    prioritySite;
-    TI_UINT8                   probeRespBuffer[ MAX_BEACON_BODY_LENGTH ];
-    TI_UINT16                  probeRespLength;
-    TI_UINT8                   beaconBuffer[ MAX_BEACON_BODY_LENGTH ];
-    TI_UINT16                  beaconLength;
-
-} TSiteEntry;
-
-
-typedef enum 
-{
-    SCAN_RESULT_TABLE_DONT_CLEAR,
-    SCAN_RESULT_TABLE_CLEAR
-
-} EScanResultTableClear;
-
-TI_HANDLE   scanResultTable_Create (TI_HANDLE hOS, TI_UINT32 uEntriesNumber);
-void        scanResultTable_Init (TI_HANDLE hScanResultTable, TStadHandlesList *pStadHandles, EScanResultTableClear eClearTable);
-void        scanResultTable_Destroy (TI_HANDLE hScanResultTable);
-TI_STATUS   scanResultTable_UpdateEntry (TI_HANDLE hScanResultTable, TMacAddr *pBssid, TScanFrameInfo* pFrame);
-void        scanResultTable_SetStableState (TI_HANDLE hScanResultTable);
-TSiteEntry  *scanResultTable_GetFirst (TI_HANDLE hScanResultTable);
-TSiteEntry  *scanResultTable_GetNext (TI_HANDLE hScanResultTable);
-TSiteEntry  *scanResultTable_GetBySsidBssidPair (TI_HANDLE hScanResultTable, TSsid *pSsid, TMacAddr *pBssid);
-TI_UINT32   scanResultTable_CalculateBssidListSize (TI_HANDLE hScanResultTable, TI_BOOL bAllVarIes);
-TI_UINT32 scanResultTable_GetNumOfBSSIDInTheList (TI_HANDLE hScanResultTable);
-TI_STATUS   scanResultTable_GetBssidList (TI_HANDLE hScanResultTable, OS_802_11_BSSID_LIST_EX *pBssidList, 
-                                          TI_UINT32 *pLength, TI_BOOL bAllVarIes);
-TI_STATUS scanResultTable_GetBssidSupportedRatesList (TI_HANDLE hScanResultTable, OS_802_11_N_RATES *pRateList, TI_UINT32 *pLength);
-
-void        scanResultTable_PerformAging(TI_HANDLE hScanResultTable);
-void        scanResultTable_SetSraThreshold(TI_HANDLE hScanResultTable, TI_UINT32 uSraThreshold);
-#endif /* __SCAN_RESULT_TABLE_H__ */
-
diff --git a/wl1271/stad/src/Sta_Management/scr.c b/wl1271/stad/src/Sta_Management/scr.c
deleted file mode 100644
index 4d164fe..0000000
--- a/wl1271/stad/src/Sta_Management/scr.c
+++ /dev/null
@@ -1,933 +0,0 @@
-/*
- * scr.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  scr.c
- *  \brief This file include the SCR module implementation
- *
- *  \see   scr.h, scrApi.h
- */
-
-#define __FILE_ID__  FILE_ID_82
-#include "tidef.h"
-#include "report.h"
-#include "osApi.h"
-#include "scr.h"
-#include "DrvMainModules.h"
-
-
-/*
- ***********************************************************************
- *  External data definitions.
- ***********************************************************************
- */
-
-/**
- * \brief This array holds configuration values for abort others field for different clients.\n
- */
-static EScrClientId abortOthers[ SCR_RESOURCE_NUM_OF_RESOURCES ][ SCR_CID_NUM_OF_CLIENTS ] = 
-/* APP_SCAN           DRV_FG             CONT_SCAN          XCC_MSR            BASIC_MSR          CONNECT                IMMED_SCN              SWITCH_CHNL*/
-{/* Serving channel resource */
- { SCR_CID_NO_CLIENT, SCR_CID_NO_CLIENT, SCR_CID_NO_CLIENT, SCR_CID_NO_CLIENT, SCR_CID_NO_CLIENT, SCR_CID_BASIC_MEASURE, SCR_CID_BASIC_MEASURE, SCR_CID_BASIC_MEASURE },
- /* periodic scan resource */
- { SCR_CID_NO_CLIENT, SCR_CID_APP_SCAN,  SCR_CID_NO_CLIENT, SCR_CID_NO_CLIENT, SCR_CID_NO_CLIENT, SCR_CID_DRIVER_FG_SCAN,SCR_CID_NO_CLIENT,     SCR_CID_NO_CLIENT }
-};
-
-/**
- * \brief This array holds configuration values for the client status field for different clients and groups. \n
- */
-static TI_BOOL clientStatus[ SCR_RESOURCE_NUM_OF_RESOURCES ][ SCR_MID_NUM_OF_MODES ][ SCR_GID_NUM_OF_GROUPS ][ SCR_CID_NUM_OF_CLIENTS ] = 
-            { 
-                {/* serving channel resource */
-                    {/* This is the table for Normal mode  */
-                        /* client status for idle group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for DRV scan group */
-                        { TI_TRUE,     /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,     /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for APP scan group */
-                        { TI_TRUE,     /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for connect group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_TRUE,     /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_TRUE,     /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },                       
-                       /* client status for connected group */
-                        { TI_TRUE,     /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_TRUE,     /**< client status for SCR_CID_CONT_SCAN */
-                          TI_TRUE,     /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_TRUE,     /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_TRUE,     /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for roaming group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_TRUE,     /**< client status for SCR_CID_CONNECT */
-                          TI_TRUE,     /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ }
-                    },
-
-                    /* This is the table for the Soft gemini mode   */
-
-                    { /* client status for idle group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for DRV scan group */
-                        { TI_TRUE,     /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for APP scan group */
-                        { TI_TRUE,     /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for connect group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_TRUE,     /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_TRUE,     /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },                       
-                       /* client status for connected group */
-                        { TI_TRUE,     /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_TRUE,     /**< client status for SCR_CID_CONT_SCAN */
-                          TI_TRUE,     /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_TRUE,     /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_TRUE,     /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for roaming group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_TRUE,     /**< client status for SCR_CID_CONNECT */
-                          TI_TRUE,     /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ }
-                    }
-                },
-                {/* periodic-scan resource */
-                    {/* This is the table for Normal mode */
-                        /* client status for idle group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for DRV scan gorup */
-                        { TI_FALSE,     /**< client status for SCR_CID_APP_SCAN */
-                          TI_TRUE,     /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for APP scan gorup */
-                        { TI_TRUE,     /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for connect group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_TRUE,     /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },                       
-                       /* client status for connected group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for roaming group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_TRUE,     /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ }
-                    },
-
-                    /* This is the table for the Soft gemini mode   */
-
-                    { /* client status for idle group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for DRV scan gorup */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_TRUE,     /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for APP scan gorup */
-                        { TI_TRUE,     /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for connect group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,     /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_TRUE,     /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },                       
-                       /* client status for connected group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ },
-                       /* client status for roaming group */
-                        { TI_FALSE,    /**< client status for SCR_CID_APP_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_DRIVER_FG_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_CONT_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_XCC_MEASURE */
-                          TI_FALSE,    /**< client status for SCR_CID_BASIC_MEASURE */
-                          TI_TRUE,     /**< client status for SCR_CID_CONNECT */
-                          TI_FALSE,    /**< client status for SCR_CID_IMMED_SCAN */
-                          TI_FALSE,    /**< client status for SCR_CID_SWITCH_CHANNEL */ }
-                    }
-                }                
-            };
-
-                
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Creates the SCR object
- *
- * Function Scope \e Public.\n
- * \param hOS - handle to the OS object.\n
- * \return a handle to the SCR object.\n
- */
-TI_HANDLE scr_create( TI_HANDLE hOS )
-{
-    /* allocate the SCR object */
-    TScr    *pScr = os_memoryAlloc( hOS, sizeof(TScr));
-
-    if ( NULL == pScr )
-    {
-        WLAN_OS_REPORT( ("ERROR: Failed to create SCR module"));
-        return NULL;
-    }
-
-    /* store the OS handle */
-    pScr->hOS = hOS;
-
-    return pScr;
-}
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Finalizes the SCR object (freeing memory)
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- */
-void scr_release( TI_HANDLE hScr )
-{
-    TScr    *pScr = (TScr*)hScr;
-
-    os_memoryFree( pScr->hOS, hScr, sizeof(TScr));
-}
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Initializes the SCR object
- *
- * \param  pStadHandles  - The driver modules handles
- * \return void  
- */
-void scr_init (TStadHandlesList *pStadHandles)
-{
-    TScr        *pScr = (TScr*)(pStadHandles->hSCR);
-    TI_UINT32   i, j;
-
-    /* store the report object */
-    pScr->hReport = pStadHandles->hReport;
-
-    /* mark current group as idle */
-    pScr->currentGroup = SCR_GID_IDLE;
-
-    /* mark current mode as normal */
-    pScr->currentMode = SCR_MID_NORMAL;
-
-    /* signal not within request process */
-    pScr->statusNotficationPending = TI_FALSE;
-
-    /* mark that no client is currently running */
-    for (i = 0; i < SCR_RESOURCE_NUM_OF_RESOURCES; i++)
-    {
-        pScr->runningClient[ i ] = SCR_CID_NO_CLIENT;
-    }
-
-    /* initialize client array */
-    for (i = 0; i < SCR_CID_NUM_OF_CLIENTS; i++ )
-    {
-        for (j = 0; j < SCR_RESOURCE_NUM_OF_RESOURCES; j++)
-        {
-            pScr->clientArray[ i ].state[ j ] = SCR_CS_IDLE;
-            pScr->clientArray[ i ].currentPendingReason[ j ] = SCR_PR_NONE;
-        }
-        pScr->clientArray[ i ].clientRequestCB = NULL;
-        pScr->clientArray[ i ].ClientRequestCBObj = NULL;
-    }
-    
-    TRACE0(pScr->hReport, REPORT_SEVERITY_INIT , ".....SCR configured successfully\n");
-}
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Registers the callback function to be used per client.
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param client - the client ID.\n
- * \param callbackFunc - the address of the callback function to use.\n
- * \param callbackObj - the handle of the object to pass to the callback function (the client object).\n
- */
-void scr_registerClientCB( TI_HANDLE hScr, 
-                           EScrClientId client,
-                           TScrCB callbackFunc, 
-                           TI_HANDLE callbackObj )
-{
-    TScr    *pScr = (TScr*)hScr;
-
-#ifdef TI_DBG
-    if (client >= SCR_CID_NUM_OF_CLIENTS)
-    {
-        TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Attempting to register callback for invalid client %d\n", client);
-        return;
-    }
-#endif
-    pScr->clientArray[ client ].clientRequestCB = callbackFunc;
-    pScr->clientArray[ client ].ClientRequestCBObj = callbackObj;
-}
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Notifies the running process upon a firmware reset.
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- */
-void scr_notifyFWReset( TI_HANDLE hScr )
-{
-    TScr        *pScr = (TScr*)hScr;
-    TI_UINT32   uResourceIndex;
-
-    /* check both resources */
-    for (uResourceIndex = 0; uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES; uResourceIndex++)
-    {
-        /* if a client is currently running, notify it of the recovery event */
-        if ( SCR_CID_NO_CLIENT != pScr->runningClient[ uResourceIndex ] )
-        {
-            TRACE1( pScr->hReport, REPORT_SEVERITY_INFORMATION, "FW reset occured. Client %d Notified.\n", pScr->runningClient[ uResourceIndex ]);
-            if ( NULL != pScr->clientArray[ pScr->runningClient[ uResourceIndex ] ].clientRequestCB )
-            {
-                pScr->clientArray[ pScr->runningClient[ uResourceIndex ] ].clientRequestCB( pScr->clientArray[ pScr->runningClient[ uResourceIndex ] ].ClientRequestCBObj,
-                                                                                          SCR_CRS_FW_RESET, (EScrResourceId)uResourceIndex, SCR_PR_NONE );
-            }
-            else
-            {
-                TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Trying to call client %d callback, which is NULL\n", pScr->runningClient[ uResourceIndex ]);
-            }
-        }
-    #ifdef TI_DBG
-        else
-        {
-            TRACE0( pScr->hReport, REPORT_SEVERITY_INFORMATION, "FW reset occured. No client was running.\n");
-        }
-    #endif
-    }
-}
-
-/**
- * \\n
- * \date 27-April-2005\n
- * \brief Changes the current SCR group.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param newGroup - the new group to use.\n
- */
-void scr_setGroup( TI_HANDLE hScr, EScrGroupId newGroup )
-{
-    TScr            *pScr = (TScr*)hScr;
-    TI_UINT32       i, uResourceIndex;
-    EScrClientId    highestPending;
-
-    TRACE1( pScr->hReport, REPORT_SEVERITY_INFORMATION, "Setting group %d.\n", newGroup);
-
-#ifdef TI_DBG
-    if (newGroup >= SCR_GID_NUM_OF_GROUPS)
-    {
-        TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Attempting to set invalid group to %d\n", newGroup);
-        return;
-    }
-#endif
-
-    /* keep the new group */
-    pScr->currentGroup = newGroup;
-
-    /* check both resources */
-    for (uResourceIndex = 0; uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES; uResourceIndex++)
-    {
-        /* for all pending clients */
-        for ( i = 0; i < SCR_CID_NUM_OF_CLIENTS; i++ )
-        {
-            /* if the pending reason has escalated */
-            if ( (pScr->clientArray[ i ].state[ uResourceIndex ] == SCR_CS_PENDING) && /* the client is pending */
-                 (pScr->clientArray[ i ].currentPendingReason[ uResourceIndex ] < SCR_PR_DIFFERENT_GROUP_RUNNING) && /* the client was enabled in the previous group */
-                 (TI_FALSE == clientStatus[ uResourceIndex ][ pScr->currentMode ][ newGroup ][ i ])) /* the client is not enabled in the new group */
-            {
-                /* mark the new pending reason */
-                pScr->clientArray[ i ].currentPendingReason[ uResourceIndex ] = SCR_PR_DIFFERENT_GROUP_RUNNING;
-
-                /* notify the client of the change, using its callback */
-                if ( NULL != pScr->clientArray[ i ].clientRequestCB )
-                {
-                    pScr->clientArray[ i ].clientRequestCB( pScr->clientArray[ i ].ClientRequestCBObj, 
-                                                            SCR_CRS_PEND, (EScrResourceId)uResourceIndex, SCR_PR_DIFFERENT_GROUP_RUNNING );
-                }
-                else
-                {
-                    TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Trying to call client %d callback, which is NULL\n", i);
-                }
-            }
-        }
-    
-
-        /*
-         * if no client is running call the highest pending client 
-         * (after group change, previously pending clients may be enabled)
-         */
-        if ( SCR_CID_NO_CLIENT == pScr->runningClient[ uResourceIndex ] )
-        {
-            highestPending = scrFindHighest( hScr, SCR_CS_PENDING, uResourceIndex, 
-                                             (SCR_CID_NUM_OF_CLIENTS - 1), 0 );
-            if (( SCR_CID_NO_CLIENT != highestPending ) && (highestPending < SCR_CID_NUM_OF_CLIENTS))
-            {
-                pScr->clientArray[ highestPending ].state[ uResourceIndex ] = SCR_CS_RUNNING;
-                pScr->clientArray[ highestPending ].currentPendingReason[ uResourceIndex ] = SCR_PR_NONE;
-                pScr->runningClient[ uResourceIndex ] = (EScrClientId)highestPending;
-                if ( NULL != pScr->clientArray[ highestPending ].clientRequestCB )
-                {
-                    pScr->clientArray[ highestPending ].clientRequestCB( pScr->clientArray[ highestPending ].ClientRequestCBObj, 
-                                                                         SCR_CRS_RUN, (EScrResourceId)uResourceIndex, SCR_PR_NONE );
-                }
-                else
-                {
-                    TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Trying to call client %d callback, which is NULL\n", highestPending);
-                }
-            }
-        }
-    }
-}
-
-/**
- * \\n
- * \date 23-Nov-2005\n
- * \brief Changes the current SCR mode.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param newMode - the new mode to use.\n
- */
-void scr_setMode( TI_HANDLE hScr, EScrModeId newMode )
-{
-	TScr            *pScr = (TScr*)hScr;
-#ifdef SCR_ABORT_NOTIFY_ENABLED
-    TI_UINT32       i, uResourceIndex;
-    EScrClientId    highestPending;
-#endif
-
-    TRACE1( pScr->hReport, REPORT_SEVERITY_INFORMATION, "Setting mode %d.\n", newMode);
-
-#ifdef TI_DBG
-    if (newMode >= SCR_MID_NUM_OF_MODES)
-    {
-        TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Attempting to set invalid mode to %d\n", newMode);
-        return;
-    }
-#endif
-
-    /* keep the new mode */
-    pScr->currentMode = newMode;
-
-#ifdef SCR_ABORT_NOTIFY_ENABLED
-
-    for (uResourceIndex = 0; uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES; uResourceIndex++)
-    {
-        /* Stage I : if someone is running and shouldn't be running in the new mode - Abort it */
-        if ( (SCR_CID_NO_CLIENT != pScr->runningClient[ uResourceIndex ]) && 
-             (TI_FALSE == clientStatus[ uResourceIndex ][ pScr->currentMode ][ pScr->currentGroup ][ pScr->runningClient[ uResourceIndex ] ]))
-        {
-            /* abort the running client */
-            pScr->clientArray[ pScr->runningClient[ uResourceIndex ] ].state[ uResourceIndex ] = SCR_CS_ABORTING;
-            if ( NULL != pScr->clientArray[ pScr->runningClient[ uResourceIndex ] ].clientRequestCB )
-            {
-                TRACE2( pScr->hReport, REPORT_SEVERITY_INFORMATION, "Sending abort request to client %d for resource %d\n", pScr->runningClient[ uResourceIndex ], uResourceIndex);
-                pScr->clientArray[ pScr->runningClient[ uResourceIndex ] ].clientRequestCB( pScr->clientArray[ pScr->runningClient[ uResourceIndex ] ].ClientRequestCBObj,
-                                                                                            SCR_CRS_ABORT,
-                                                                                            (EScrResourceId)uResourceIndex,
-                                                                                            SCR_PR_NONE );
-            }
-            else
-            {
-                TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Trying to call client %d callback, which is NULL\n", pScr->runningClient[ uResourceIndex ]);
-            }
-        }
-    
-        /* Stage II : notify escalated pending reason */
-        /* for all pending clients */
-        for ( i = 0; i < SCR_CID_NUM_OF_CLIENTS; i++ )
-        {
-            /* if the pending reason has escalated */
-            if ( (pScr->clientArray[ i ].state[ uResourceIndex ] == SCR_CS_PENDING) && /* the client is pending */
-                 (pScr->clientArray[ i ].currentPendingReason[ uResourceIndex ] < SCR_PR_DIFFERENT_GROUP_RUNNING) && /* the client was enabled in the previous group */
-                 (TI_FALSE == clientStatus[ uResourceIndex ][ pScr->currentMode ][ pScr->currentGroup ][ i ])) /* the client is not enabled in the new group/mode */
-            {
-                /* mark the new pending reason */
-                pScr->clientArray[ i ].currentPendingReason[ uResourceIndex ] = SCR_PR_DIFFERENT_GROUP_RUNNING;
-                
-                /* notify the client of the change, using its callback */
-                if ( NULL != pScr->clientArray[ i ].clientRequestCB )
-                {
-                    pScr->clientArray[ i ].clientRequestCB( pScr->clientArray[ i ].ClientRequestCBObj, 
-                                                            SCR_CRS_PEND, (EScrResourceId)uResourceIndex, 
-                                                            SCR_PR_DIFFERENT_GROUP_RUNNING );
-                }
-                else
-                {
-                    TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Trying to call client %d callback, which is NULL\n", i);
-                }
-            }
-        }
-    
-       
-        /* Stage III : call Highest Pending Client who is enabled in the new mode   */
-        if ( SCR_CID_NO_CLIENT == pScr->runningClient[ uResourceIndex ] )
-        {
-            highestPending = scrFindHighest( hScr, SCR_CS_PENDING, uResourceIndex, 
-                                             (SCR_CID_NUM_OF_CLIENTS - 1), 0 );
-            if (SCR_CID_NO_CLIENT != highestPending)
-            {
-                pScr->clientArray[ highestPending ].state[ uResourceIndex ] = SCR_CS_RUNNING;
-                pScr->clientArray[ highestPending ].currentPendingReason[ uResourceIndex ] = SCR_PR_NONE;
-                pScr->runningClient[ uResourceIndex ] = (EScrClientId)highestPending;
-                if ( NULL != pScr->clientArray[ highestPending ].clientRequestCB )
-                {
-                    pScr->clientArray[ highestPending ].clientRequestCB( pScr->clientArray[ highestPending ].ClientRequestCBObj, 
-                                                                         SCR_CRS_RUN, (EScrResourceId)uResourceIndex,
-                                                                         SCR_PR_NONE );
-                }
-                else
-                {
-                    TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Trying to call client %d callback, which is NULL\n", highestPending);
-                }
-            }
-        }
-    }
-#endif	/* SCR_ABORT_NOTIFY_ENABLED */ 
-}
-
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Request the channel use by a client
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param client - the client ID requesting the channel.\n
- * \param resource - the requested resource.\n
- * \param pPendReason - the reason for a pend reply.\n
- * \return The request status.\n
- * \retval SCR_CRS_REJECT the channel cannot be allocated to this client.
- * \retval SCR_CRS_PEND the channel is currently busy, and this client had been placed on the waiting list.
- * \retval SCR_CRS_RUN the channel is allocated to this client.
- */
-EScrClientRequestStatus scr_clientRequest( TI_HANDLE hScr, EScrClientId client,
-                                           EScrResourceId eResource, EScePendReason* pPendReason )
-{
-    TScr    *pScr = (TScr*)hScr;
-
-    TRACE2( pScr->hReport, REPORT_SEVERITY_INFORMATION, "scr_clientRequest: Client %d requesting the channel for resource %d.\n", client, eResource);
-
-#ifdef TI_DBG
-    if (client >= SCR_CID_NUM_OF_CLIENTS)
-    {
-        TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Attempting to request SCR for invalid client %d\n", client);
-        return SCR_CRS_PEND;
-    }
-    if (SCR_RESOURCE_NUM_OF_RESOURCES <= eResource)
-    {
-        TRACE2( pScr->hReport, REPORT_SEVERITY_ERROR, "Attempting to request SCR by client %d for invalid resource %d\n", client, eResource);
-        return SCR_CRS_PEND;
-    }
-#endif
-    
-    *pPendReason = SCR_PR_NONE;
-
-    /* check if already inside a request - shouldn't happen!!! */
-    if ( TI_TRUE == pScr->statusNotficationPending )
-    {
-        TRACE0( pScr->hReport, REPORT_SEVERITY_ERROR, "request call while already in request!\n");
-        return SCR_CRS_PEND;
-    }
-
-    /* check if current running client is requesting */
-    if ( client == pScr->runningClient[ eResource ] )
-    {
-        TRACE2( pScr->hReport, REPORT_SEVERITY_WARNING, "Client %d re-requesting SCR for resource %d\n", client, eResource);
-        return SCR_CRS_RUN;
-    }
-
-    TRACE5( pScr->hReport, REPORT_SEVERITY_INFORMATION, "scr_clientRequest: is client enabled = %d. eResource=%d,currentMode=%d,currentGroup=%d,client=%d,\n", clientStatus[ eResource ][ pScr->currentMode ][ pScr->currentGroup ][ client ], eResource, pScr->currentMode, pScr->currentGroup, client);
-
-    /* check if the client is enabled in the current group */
-    if ( TI_TRUE != clientStatus[ eResource ][ pScr->currentMode ][ pScr->currentGroup ][ client ])
-    {
-        pScr->clientArray[ client ].state[ eResource ] = SCR_CS_PENDING;
-        pScr->clientArray[ client ].currentPendingReason[ eResource ]
-                                                = *pPendReason = SCR_PR_DIFFERENT_GROUP_RUNNING;
-        return SCR_CRS_PEND;
-    }
-        
-    /* check if a there's no running client at the moment */
-    if ( SCR_CID_NO_CLIENT == pScr->runningClient[ eResource ] )
-    {
-        /* no running or aborted client - allow access */
-        TRACE2( pScr->hReport, REPORT_SEVERITY_INFORMATION, "Resource %d allocated to client: %d\n", eResource, client);
-        pScr->clientArray[ client ].state[ eResource ] = SCR_CS_RUNNING;
-        pScr->runningClient[ eResource ] = client;
-        return SCR_CRS_RUN;
-    }
-    
-    /* check if any client is aborting at the moment */
-    if ( SCR_CS_ABORTING == pScr->clientArray[ pScr->runningClient[ eResource ] ].state[ eResource ] )
-    {
-        /* a client is currently aborting, but there still might be a pending client with higher priority
-           than the client currently requesting the SCR. If such client exists, the requesting client is
-           notified that it is pending because of this pending client, rather than the one currently aborting.
-        */
-        EScrClientId highestPending;
-        highestPending = scrFindHighest( hScr, SCR_CS_PENDING, eResource, 
-                                         (SCR_CID_NUM_OF_CLIENTS - 1), client );
-        if ( (SCR_CID_NO_CLIENT == highestPending) ||
-             (highestPending < client))
-        {
-            /* if the requesting client has higher priority than the current highest priority pending client,
-               the current highest priority pending client should be notified that its pending reason has 
-               changed (it is no longer waiting for current running client to abort, but for the requesting
-               client to finish, once the current has aborted */
-            if ( (highestPending != SCR_CID_NO_CLIENT) &&
-                 (SCR_PR_OTHER_CLIENT_ABORTING == pScr->clientArray[ highestPending ].currentPendingReason[ eResource ]))
-            {
-
-                if ( NULL != pScr->clientArray[ highestPending ].clientRequestCB )
-                {
-                    pScr->clientArray[ highestPending ].clientRequestCB( pScr->clientArray[ highestPending ].ClientRequestCBObj,
-                                                                         SCR_CRS_PEND, eResource, SCR_PR_OTHER_CLIENT_RUNNING );
-                }
-                else
-                {
-                    TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Trying to call client %d callback, which is NULL\n", highestPending);
-                }
-            }
-            pScr->clientArray[ client ].currentPendingReason[ eResource ] = *pPendReason = SCR_PR_OTHER_CLIENT_ABORTING;
-        }
-        else
-        {
-            pScr->clientArray[ client ].currentPendingReason[ eResource ] = *pPendReason = SCR_PR_OTHER_CLIENT_RUNNING;
-        }
-        pScr->clientArray[ client ].state[ eResource ] = SCR_CS_PENDING;
-        return SCR_CRS_PEND;
-    }
- 
-    /* check if a client with higher priority is running */
-    if (pScr->runningClient[ eResource ] > client)
-    {
-        pScr->clientArray[ client ].state[ eResource ] = SCR_CS_PENDING;
-        pScr->clientArray[ client ].currentPendingReason[ eResource ] = *pPendReason = SCR_PR_OTHER_CLIENT_RUNNING;
-        return SCR_CRS_PEND;
-    }
-
-    /* if the client is not supposed to abort lower priority clients */
-    if ( (SCR_CID_NO_CLIENT == abortOthers[ eResource ][ client ]) || /* client is not supposed to abort any other client */
-         (pScr->runningClient[ eResource ] > abortOthers[ eResource ][ client ])) /* client is not supposed to abort running client */
-    {
-        /* wait for the lower priority client */
-        pScr->clientArray[ client ].state[ eResource ] = SCR_CS_PENDING;
-        pScr->clientArray[ client ].currentPendingReason[ eResource ] = *pPendReason = SCR_PR_OTHER_CLIENT_RUNNING;
-        return SCR_CRS_PEND;
-    }
-
-    /* at this point, there is a lower priority client running, that should be aborted: */
-    /* mark the requesting client as pending (until the abort process will be completed) */
-    pScr->clientArray[ client ].state[ eResource ] = SCR_CS_PENDING;
-
-    /* mark that we are in the middle of a request (if a re-entrance will occur in the complete) */
-    pScr->statusNotficationPending = TI_TRUE;
-
-    /* abort the running client */
-    pScr->clientArray[ pScr->runningClient[ eResource ] ].state[ eResource ] = SCR_CS_ABORTING;
-    if ( NULL != pScr->clientArray[ pScr->runningClient[ eResource ] ].clientRequestCB )
-    {
-        TRACE2( pScr->hReport, REPORT_SEVERITY_INFORMATION, "Sending abort request to client %d for resource %d\n", pScr->runningClient[ eResource ], eResource);
-        pScr->clientArray[ pScr->runningClient[ eResource ] ].clientRequestCB( pScr->clientArray[ pScr->runningClient[ eResource ] ].ClientRequestCBObj,
-                                                                               SCR_CRS_ABORT, eResource,
-                                                                               SCR_PR_NONE );
-    }
-    else
-    {
-        TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Trying to call client %d callback, which is NULL\n", pScr->runningClient[ eResource ]);
-    }
-
-    /* mark that we have finished the request process */
-    pScr->statusNotficationPending = TI_FALSE;
-
-    /* return the current status (in case the completion changed the client status to run) */
-    if ( SCR_CS_RUNNING == pScr->clientArray[ client ].state[ eResource ] )
-    {
-        TRACE1( pScr->hReport, REPORT_SEVERITY_INFORMATION, "channel allocated to client: %d\n", client);
-        return SCR_CRS_RUN;
-    }
-    else
-    {
-        pScr->clientArray[ client ].currentPendingReason[ eResource ] = *pPendReason = SCR_PR_OTHER_CLIENT_ABORTING;
-        return SCR_CRS_PEND;
-    }
-}
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Notifies the SCR that the client doe not require the channel any longer
- *
- * This function can be called both by clients that are in possession of the channel, and by
- * clients that are pending to use the channel.\n
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param client - the client releasing the channel.\n
- * \param eResource - the resource being released.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-void scr_clientComplete( TI_HANDLE hScr, EScrClientId client, EScrResourceId eResource )
-{
-    TScr            *pScr = (TScr*)hScr;
-    EScrClientId    highestPending;
-
-    TRACE2( pScr->hReport, REPORT_SEVERITY_INFORMATION, "Client %d releasing resource %d.\n", client, eResource);
-
-#ifdef TI_DBG
-    if (client >= SCR_CID_NUM_OF_CLIENTS)
-    {
-        TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Attempting to release SCR for invalid client %d\n", client);
-        return;
-    }
-    if (SCR_RESOURCE_NUM_OF_RESOURCES <= eResource)
-    {
-        TRACE2( pScr->hReport, REPORT_SEVERITY_ERROR, "Attempting to release invalid resource %d by client %d\n", eResource, client);
-        return;
-    }
-#endif
-
-    /* mark client state as idle */
-    pScr->clientArray[ client ].state[ eResource ] = SCR_CS_IDLE;
-    pScr->clientArray[ client ].currentPendingReason[ eResource ] = SCR_PR_NONE;
-
-    /* if completing client is running (or aborting) */
-    if ( pScr->runningClient[ eResource ] == client )   
-    {
-        /* mark no running client */
-        pScr->runningClient[ eResource ] = SCR_CID_NO_CLIENT;
-
-        /* find the pending client with highest priority */
-        highestPending = scrFindHighest( hScr, SCR_CS_PENDING, eResource, (SCR_CID_NUM_OF_CLIENTS-1), 0 );
-    
-        /* if a pending client exists */
-        if (( SCR_CID_NO_CLIENT != highestPending ) && (highestPending < SCR_CID_NUM_OF_CLIENTS))
-        {
-            /* mark the client with highest priority as running */
-            pScr->clientArray[ highestPending ].state[ eResource ] = SCR_CS_RUNNING;
-            pScr->clientArray[ highestPending ].currentPendingReason[ eResource ] = SCR_PR_NONE;
-            pScr->runningClient[ eResource ] = highestPending;
-        
-            /* if the SCR is not called from within a client request (re-entrance) */
-            if ( TI_FALSE == pScr->statusNotficationPending )
-            {
-                if ( NULL != pScr->clientArray[ highestPending ].clientRequestCB )
-                {
-                    pScr->clientArray[ highestPending ].clientRequestCB( pScr->clientArray[ highestPending ].ClientRequestCBObj,
-                                                                         SCR_CRS_RUN, eResource, SCR_PR_NONE );
-                }
-                else
-                {
-                    TRACE1( pScr->hReport, REPORT_SEVERITY_ERROR, "Trying to call client %d callback, which is NULL\n", highestPending);
-                }
-            }
-        }
-    }
-}
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Searches the client database for a client with matching state, from startFrom to endAt (inclusive).
- * \brief Only searches for clients that are enabled at the current group!!!!\n
- *
- * Function Scope \e Private.\n
- * \param hScr - handle to the SCR object.\n
- * \param requiredState - the state to match.\n
- * \param eResource - the resource to macth.\n
- * \param startFrom - the highest priority to begin searching from.\n
- * \param endAt - the lowest priority to include in the search 
- * \return the client ID if found, SCR_CID_NO_CLIENT if not found.\n
- */
-EScrClientId scrFindHighest( TI_HANDLE hScr,
-                             EScrClientState requiredState,
-                             EScrResourceId  eResource,
-                             TI_UINT32 startFrom,
-                             TI_UINT32 endAt )
-{
-    TScr        *pScr = (TScr*)hScr;
-    TI_INT32    i, iStartFrom, iEndAt;
-
-    /* 
-     * signed indexes are used to avoid an overflow in the for loop when endAt equals zero
-     * and the unsigned i is "reduced" to overflow to 4 Billion
-     */
-    iStartFrom = (TI_INT32)startFrom;
-    iEndAt = (TI_INT32)endAt;
-
-    /* loop on all clients, from start to end */
-    for ( i = iStartFrom; i >= iEndAt; i-- )
-    {
-        /* check if the client state matches the required state */
-        if ( (TI_TRUE == clientStatus[ eResource ][ pScr->currentMode ][ pScr->currentGroup ][ i ]) && /* client is enabled in current group */
-             (requiredState == pScr->clientArray[ i ].state[ eResource ])) /* client is in required state */
-        {
-            /* and if so, return the client index */
-            return (EScrClientId)i;
-        }
-    }
-
-    return SCR_CID_NO_CLIENT;
-}
diff --git a/wl1271/stad/src/Sta_Management/scr.h b/wl1271/stad/src/Sta_Management/scr.h
deleted file mode 100644
index c3d6ab2..0000000
--- a/wl1271/stad/src/Sta_Management/scr.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * scr.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  scr.h
- *  \brief This file includes internal (private) definitions to the SCR module
- *
- *  \see   scrApi.h, scr.c
- */
-
-
-#ifndef __SCR_H__
-#define __SCR_H__
-
-#include "scrApi.h"
-
-/*
- ***********************************************************************
- *  Constant definitions.
- ***********************************************************************
- */
-
- /*
- ***********************************************************************
- *  Enums.
- ***********************************************************************
- */
-
-/** \enum EScrClientState 
- * \brief enumerates the different states a client may be in .\n
- */
-typedef enum
-{
-    SCR_CS_IDLE = 0,    /**< client is idle */
-    SCR_CS_PENDING,     /**< client is pending to use the channel */
-    SCR_CS_RUNNING,     /**< client is using the channel */
-    SCR_CS_ABORTING     /**< 
-                         * client was using the channel, but was aborted, 
-                         * and complete notification is expected.
-                         */
-} EScrClientState;
-
-
-/*
- ***********************************************************************
- *  Typedefs.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  Structure definitions.
- ***********************************************************************
- */
-
-/** \struct TScrClient
- * \brief This structure contains information for a specific client
- */
-typedef struct
-{
-    EScrClientState     state[ SCR_RESOURCE_NUM_OF_RESOURCES ];     /**< the client current state, per resource */
-    TScrCB              clientRequestCB;                            /**< the client's callback function */
-    TI_HANDLE           ClientRequestCBObj;                         /**< the client's object */
-    EScePendReason      currentPendingReason[ SCR_RESOURCE_NUM_OF_RESOURCES ];
-                                                                    /**< 
-                                                                     * the reason why this client is pending
-                                                                     * (if at all)
-                                                                     */
-} TScrClient;
-
-/** \struct TScr
- * \brief This structure contains the SCR object data
- */
-typedef struct
-{
-    TI_HANDLE               hOS;                                    /**< a handle to the OS object */
-    TI_HANDLE               hReport;                                /**< a handle to the report object */
-    TI_BOOL                 statusNotficationPending;               /**< 
-                                                                     * whether the SCR is in the process of  
-                                                                     * notifying a status change to a client
-                                                                     * (used to solve re-entrance problem)
-                                                                     */
-    EScrClientId            runningClient[ SCR_RESOURCE_NUM_OF_RESOURCES ];
-                                                                    /**< 
-                                                                     * The index of the current running client 
-                                                                     * (SCR_CID_NO_CLIENT if none), per resource
-                                                                     */
-    EScrGroupId             currentGroup;                           /**< the current group */
-    EScrModeId              currentMode;                            /**< the current mode */
-    TScrClient              clientArray[ SCR_CID_NUM_OF_CLIENTS ];  /**< array holding all clients' info */
-} TScr;
-
-
-/*
- ***********************************************************************
- *  External functions definitions
- ***********************************************************************
- */
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Searches the client database for a client with matching state, from startFrom to endAt\n
- *
- * Function Scope \e Private.\n
- * \param hScr - handle to the SCR object.\n
- * \param requiredState - the state to match.\n
- * \param eResource - the resource to macth.\n
- * \param startFrom - the highest priority to begin searching from.\n
- * \param endAt - the lowest priority to include in the search.\n
- * \return the client ID if found, SCR_CID_NO_CLIENT if not found.\n
- */
-EScrClientId scrFindHighest( TI_HANDLE hScr,
-                             EScrClientState requiredState,
-                             EScrResourceId eResource,
-                             TI_UINT32 startFrom,
-                             TI_UINT32 endAt );
-
-#endif /* __SCR_H__ */
diff --git a/wl1271/stad/src/Sta_Management/scrApi.h b/wl1271/stad/src/Sta_Management/scrApi.h
deleted file mode 100644
index 77565df..0000000
--- a/wl1271/stad/src/Sta_Management/scrApi.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * scrApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file ScrApi.h
- *  \brief This file include public definitions for the SCR module, comprising its API.
- *  \
- *  \date 01-Dec-2004
- */
-
-#ifndef __SCRAPI_H__
-#define __SCRAPI_H__
-
-#include "DrvMainModules.h"
-
-/*
- ***********************************************************************
- *  Constant definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  Enums.
- ***********************************************************************
- */
-/** \enum EScrModeId 
- * \brief enumerates the different modes available in the system    
- */
-typedef enum
-{
-    SCR_MID_NORMAL = 0,         /**< Normal mode      */
-    SCR_MID_SG,                 /**< Soft Gemini mode */
-    SCR_MID_NUM_OF_MODES
-} EScrModeId;
-
-/** \enum EScrGroupId 
- * \brief enumerates the different groups available in the system
- */
-typedef enum
-{
-    SCR_GID_IDLE = 0,           /**< STA is idle */
-    SCR_GID_DRV_SCAN,           /**< STA is disconnected, SME scans */
-    SCR_GID_APP_SCAN,           /**< STA is disconnected, application scans */
-    SCR_GID_CONNECT,            /**< STA is trying to conenct */
-    SCR_GID_CONNECTED,          /**< STA is connected */
-    SCR_GID_ROAMING,            /**< STA is performing roaming to another AP */
-    SCR_GID_NUM_OF_GROUPS
-} EScrGroupId;
-
-/** \enum EScrResourceId 
- * \brief enumerates the different resources controlled by the SCR
- */
-typedef enum
-{
-    SCR_RESOURCE_SERVING_CHANNEL = 0,
-    SCR_RESOURCE_PERIODIC_SCAN,
-    SCR_RESOURCE_NUM_OF_RESOURCES
-} EScrResourceId;
-
-/** \enum EScrClientId 
- * \brief enumerates the different clients available in the system
- */
-typedef enum
-{
-    SCR_CID_APP_SCAN = 0,    /* lowest priority */
-    SCR_CID_DRIVER_FG_SCAN,
-    SCR_CID_CONT_SCAN,
-    SCR_CID_XCC_MEASURE,
-    SCR_CID_BASIC_MEASURE,
-    SCR_CID_CONNECT,
-    SCR_CID_IMMED_SCAN,
-    SCR_CID_SWITCH_CHANNEL,     /* highest priority */
-    SCR_CID_NUM_OF_CLIENTS,
-    SCR_CID_NO_CLIENT
-} EScrClientId;
-
-/** \enum EScrClientRequestStatus 
- * \brief enumerates the status reports the client may receive
- */
-typedef enum 
-{
-    SCR_CRS_RUN = 0,            /**< the client can use the channel */
-    SCR_CRS_PEND,               /**< the channel is in use, The client may wait for it. */
-    SCR_CRS_ABORT,              /**< client should abort it's use of the channel */
-    SCR_CRS_FW_RESET            /**< Notification of recovery (client should elect what to do) */
-} EScrClientRequestStatus;
-
-/** \enum EScePendReason 
- * \brief enumerates the different reasons which can cause a client request to return with pend status.
- */
-typedef enum
-{
-    SCR_PR_OTHER_CLIENT_ABORTING = 0,       /**< 
-                                             * The requesting client is waiting for a client with lower priority  
-                                             * to abort operation
-                                             */
-    SCR_PR_OTHER_CLIENT_RUNNING,            /**<
-                                             * The requesting client is waiting for a client that cannot be aborted
-                                             * to finish using the channel.
-                                             */
-    SCR_PR_DIFFERENT_GROUP_RUNNING,         /**< The current SCR group is different than the client's group */
-    SCR_PR_NONE                             /**< The client is not pending */
-} EScePendReason;
-
-/*
- ***********************************************************************
- *  Typedefs.
- ***********************************************************************
- */
-
- /** \typedef scr_abortReason_e
-  * \brief Defines the function prototype a client should register as callback.
-  */
-typedef void (*TScrCB)( TI_HANDLE hClient, 
-                        EScrClientRequestStatus requestStatus,
-                        EScrResourceId eResource,
-                        EScePendReason pendReason );
-
-/*
- ***********************************************************************
- *  Structure definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  External data definitions.
- ***********************************************************************
- */
-
-/*
- ***********************************************************************
- *  External functions definitions
- ***********************************************************************
- */
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Creates the SCR object
- *
- * Function Scope \e Public.\n
- * \param hOS - handle to the OS object.\n
- * \return a handle to the SCR object.\n
- */
-TI_HANDLE scr_create( TI_HANDLE hOS );
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Finalizes the SCR object (freeing memory)
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- */
-void scr_release( TI_HANDLE hScr );
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Initializes the SCR object
- *
- * \param  pStadHandles  - The driver modules handles
- * \return void  
- */
-void scr_init (TStadHandlesList *pStadHandles);
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Registers the callback function to be used per client.
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param client - the client ID.\n
- * \param callbackFunc - the address of the callback function to use.\n
- * \param callbackObj - the handle of the object to pass to the callback function (the client object).\n
- */
-void scr_registerClientCB( TI_HANDLE hScr, 
-                           EScrClientId client,
-                           TScrCB callbackFunc, 
-                           TI_HANDLE callbackObj );
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Notifies the running process upon a firmware reset.
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- */
-void scr_notifyFWReset( TI_HANDLE hScr );
-
-/**
- * \\n
- * \date 27-April-2005\n
- * \brief Changes the current SCR group.\n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param newGroup - the new group to use.\n
- */
-void scr_setGroup( TI_HANDLE hScr, EScrGroupId newGroup );
-
-/**
- * \\n
- * \date 23-1l-2005\n
- * \brief Changes the current SCR mode. This function is called from Soft Gemini module only \n
- *        when changing mode - clients that are not valid in the new group/mode are aborted  \n
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param newMode - the new mode to use.\n
- */
-void scr_setMode( TI_HANDLE hScr, EScrModeId newMode );
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Request the channel use by a client
- *
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param client - the client ID requesting the channel.\n
- * \param eResource - the requested resource.\n
- * \param pPendReason - the reason for a pend reply.\n
- * \return The request status.\n
- * \retval SCR_CRS_REJECT the channel cannot be allocated to this client.
- * \retval SCR_CRS_PEND the channel is currently busy, and this client had been placed on the waiting list.
- * \retval SCR_CRS_RUN the channel is allocated to this client.
- */
-EScrClientRequestStatus scr_clientRequest( TI_HANDLE hScr, EScrClientId client,
-                                           EScrResourceId eResource,
-                                           EScePendReason* pPendReason );
-
-/**
- * \\n
- * \date 01-Dec-2004\n
- * \brief Notifies the SCR that the client doe not require the channel any longer
- *
- * This function can be called both by clients that are in possession of the channel, and by
- * clients that are pending to use the channel.\n
- * Function Scope \e Public.\n
- * \param hScr - handle to the SCR object.\n
- * \param client - the client releasing the channel.\n
- * \param eResource - the resource being released.\n
- * \return TI_OK if successful, TI_NOK otherwise.\n
- */
-void scr_clientComplete( TI_HANDLE hScr, EScrClientId client, EScrResourceId eResource );
-
-#endif /* __SCRAPI_H__ */
diff --git a/wl1271/stad/src/Sta_Management/sharedKeyAuthSm.c b/wl1271/stad/src/Sta_Management/sharedKeyAuthSm.c
deleted file mode 100644
index 6f98628..0000000
--- a/wl1271/stad/src/Sta_Management/sharedKeyAuthSm.c
+++ /dev/null
@@ -1,530 +0,0 @@
-/*
- * sharedKeyAuthSm.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file sharedKeyAuthSm.c
- *  \brief shared key 802.11 authentication SM source
- *
- *  \see sharedKeyAuthSm.h 
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	sharedKeyAuthSm.c										   */
-/*    PURPOSE:	shared key 802.11 authentication SM source				   */
-/*																	 	   */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_83
-#include "osApi.h"
-#include "paramOut.h"
-#include "timer.h"
-#include "fsm.h"
-#include "report.h"
-#include "mlmeApi.h"
-#include "authSm.h"
-#include "sharedKeyAuthSm.h"
-
-/* Constants */
-
-/** number of states in the state machine */
-#define	SHARED_KEY_AUTH_SM_NUM_STATES		4
-
-/** number of events in the state machine */
-#define	SHARED_KEY_AUTH_SM_NUM_EVENTS		8
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Global variables */
-
-/* Local function prototypes */
-
-/* functions */
-
-/**
-*
-* sharedKeyAuth_smConfig - configure a new authentication SM
-*
-* \b Description: 
-*
-* Configure a new authentication SM.
-*
-* \b ARGS:
-*
-*  I   - hAuth - Association SM context  \n
-*  I   - hMlme - MLME SM context  \n
-*  I   - hSiteMgr - Site manager context  \n
-*  I   - hCtrlData - Control data context  \n
-*  I   - hTxData - TX data context  \n
-*  I   - hHalCtrl - Hal control context  \n
-*  I   - hReport - Report context  \n
-*  I   - hOs - OS context  \n
-*  I   - authTimeout - Association SM timeout \n
-*  I   - authMaxCount - Max number of authentication requests to send  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa sharedKeyAuth_Create, sharedKeyAuth_Unload
-*/
-TI_STATUS sharedKeyAuth_Config(TI_HANDLE hAuth, TI_HANDLE hOs)
-{
-	auth_t		*pHandle;
-	TI_STATUS		status;
-	/** Main 802.1X State Machine matrix */
-	fsm_actionCell_t	sharedKeyAuth_smMatrix[SHARED_KEY_AUTH_SM_NUM_STATES][SHARED_KEY_AUTH_SM_NUM_EVENTS] =
-	{
-		/* next state and actions for IDLE state */
-		{{SHARED_KEY_AUTH_SM_STATE_WAIT_1, (fsm_Action_t)sharedKeyAuth_smStartIdle},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smActionUnexpected}
-		},
-		/* next state and actions for WAIT_1 state */
-		{{SHARED_KEY_AUTH_SM_STATE_WAIT_1, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smStopWait},
-		 {SHARED_KEY_AUTH_SM_STATE_WAIT_2, (fsm_Action_t)sharedKeyAuth_smSuccess1Wait1},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smFailure1Wait1},
-		 {SHARED_KEY_AUTH_SM_STATE_WAIT_1, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_WAIT_1, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_WAIT_1, (fsm_Action_t)sharedKeyAuth_smTimeoutWait1},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smMaxRetryWait}
-		},
-		/* next state and actions for WAIT_2 state */
-		{{SHARED_KEY_AUTH_SM_STATE_WAIT_2, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smStopWait},
-		 {SHARED_KEY_AUTH_SM_STATE_WAIT_2, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_WAIT_2, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_AUTH, (fsm_Action_t)sharedKeyAuth_smSuccess2Wait2},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smFailure2Wait2},
-		 {SHARED_KEY_AUTH_SM_STATE_WAIT_2, (fsm_Action_t)sharedKeyAuth_smTimeoutWait2},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smMaxRetryWait}
-		},
-		/* next state and actions for AUTH state */
-		{{SHARED_KEY_AUTH_SM_STATE_AUTH, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_IDLE, (fsm_Action_t)sharedKeyAuth_smStopAuth},
-		 {SHARED_KEY_AUTH_SM_STATE_AUTH, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_AUTH, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_AUTH, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_AUTH, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_AUTH, (fsm_Action_t)sharedKeyAuth_smActionUnexpected},
-		 {SHARED_KEY_AUTH_SM_STATE_AUTH, (fsm_Action_t)sharedKeyAuth_smActionUnexpected}
-		}};
-	
-
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-
-	pHandle = (auth_t*)hAuth;
-	
-	status = fsm_Config(pHandle->pAuthSm, &sharedKeyAuth_smMatrix[0][0], 
-						SHARED_KEY_AUTH_SM_NUM_STATES, SHARED_KEY_AUTH_SM_NUM_EVENTS, auth_skSMEvent, hOs);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	pHandle->currentState = SHARED_KEY_AUTH_SM_STATE_IDLE;
-	
-	return TI_OK;
-}
-
-
-TI_STATUS auth_skSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hAuth)
-{
-   auth_t *pAuth = (auth_t *)hAuth;
-	TI_STATUS 		status;
-	TI_UINT8		nextState;
-
-	status = fsm_GetNextState(pAuth->pAuthSm, *currentState, event, &nextState);
-	if (status != TI_OK)
-	{
-		TRACE0(pAuth->hReport, REPORT_SEVERITY_SM, "State machine error, failed getting next state\n");
-		return(TI_NOK);
-	}
-
-	TRACE3(pAuth->hReport, REPORT_SEVERITY_INFORMATION, "auth_skSMEvent: <currentState = %d, event = %d> --> nextState = %d\n", *currentState, event, nextState);
-
-	status = fsm_Event(pAuth->pAuthSm, currentState, event, (void *)pAuth);
-
-	return status;
-}
-
-
-/**
-*
-* sharedKeyAuth_Recv - Recive a message from the AP
-*
-* \b Description: 
-*
-* Parse a message form the AP and perform the appropriate event.
-*
-* \b ARGS:
-*
-*  I   - hAuth - Association SM context  \n
-*
-* \b RETURNS:
-*
-*  TI_OK if successful, TI_NOK otherwise.
-*
-* \sa sharedKeyAuth_Start, sharedKeyAuth_Stop
-*/
-TI_STATUS sharedKeyAuth_Recv(TI_HANDLE hAuth, mlmeFrameInfo_t *pFrame)
-{
-	TI_STATUS 			status = TI_NOK;
-	auth_t			*pHandle;
-	TI_UINT16			authAlgo;
-	TI_UINT16			rspSeq;
-
-	pHandle = (auth_t*)hAuth;
-
-	if (pHandle == NULL)
-	{
-		return TI_NOK;
-	}
-	
-	/* check response status */
-	authAlgo = ENDIAN_HANDLE_WORD(pFrame->content.auth.authAlgo);
-	if (authAlgo != AUTH_LEGACY_SHARED_KEY)
-	{
-TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "SHARED_KEY_AUTH_SM: DEBUG recieved authentication message with wrong algorithm \n");
-		return TI_NOK;
-	}
-    
-	/* check response status */
-	rspSeq  = pFrame->content.auth.seqNum;
-	
-    pHandle->authData.status = pFrame->content.auth.status;
-    pHandle->authData.pChalange = (char *)(pFrame->content.auth.pChallenge->text);
-    pHandle->authData.challangeLen = pFrame->content.auth.pChallenge->hdr[1];
-
-	if (pHandle->authData.status == STATUS_SUCCESSFUL)
-	{
-		switch (rspSeq)
-		{
-		case 2:
-TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "SHARED_KEY_AUTH_SM: DEBUG Success authenticating to AP stage 1\n");
-
-			if (pFrame->content.auth.pChallenge->hdr[0] != CHALLANGE_TEXT_IE_ID)
-			{
-TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "SHARED_KEY_AUTH_SM: Wrong element ID for challange \n");
-				status = TI_NOK;
-				break;
-			}
-
-			status = auth_skSMEvent(&pHandle->currentState, SHARED_KEY_AUTH_SM_EVENT_SUCCESS_1, hAuth);
-			break;
-
-		case 4:
-TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "SHARED_KEY_AUTH_SM: DEBUG Success authenticating to AP stage 2\n");
-			
-			status = auth_skSMEvent(&pHandle->currentState, SHARED_KEY_AUTH_SM_EVENT_SUCCESS_2, hAuth);
-			break;
-
-		default:
-TRACE0(pHandle->hReport, REPORT_SEVERITY_ERROR, "SHARED_KEY_AUTH_SM: Wrong sequence number \n");
-			status = TI_NOK;
-			break;
-		}
-	} 
-	
-	else 
-	{
-		switch (rspSeq)
-		{
-		case 2:
-			status = auth_skSMEvent(&pHandle->currentState, SHARED_KEY_AUTH_SM_EVENT_FAIL_1, hAuth);
-			break;
-
-		case 4:
-			status = auth_skSMEvent(&pHandle->currentState, SHARED_KEY_AUTH_SM_EVENT_FAIL_2, hAuth);
-			break;
-	
-		default:
-			status = TI_NOK;
-			break;
-		}
-	}
-
-	return status;
-}
-
-/* state machine functions */
-
-TI_STATUS sharedKeyAuth_smStartIdle(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = sharedKeyAuth_smResetRetry(hAuth);
-	status = sharedKeyAuth_smSendAuth1(hAuth);
-	status = sharedKeyAuth_smStartTimer(hAuth);
-	status = sharedKeyAuth_smIncRetry(hAuth);
-
-	return status;
-}
-
-TI_STATUS sharedKeyAuth_smStopWait(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = sharedKeyAuth_smStopTimer(hAuth);
-
-	return status;
-}
-
-TI_STATUS sharedKeyAuth_smSuccess1Wait1(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = sharedKeyAuth_smResetRetry(hAuth);
-	if (status != TI_OK)
-		return status;
-	status = sharedKeyAuth_smStopTimer(hAuth);
-	if (status != TI_OK)
-		return status;
-	status = sharedKeyAuth_smSendAuth2(hAuth);
-	if (status != TI_OK)
-		return status;
-	status = sharedKeyAuth_smStartTimer(hAuth);
-	if (status != TI_OK)
-		return status;
-	status = sharedKeyAuth_smIncRetry(hAuth);
-
-	return status;
-}
-
-TI_STATUS sharedKeyAuth_smFailure1Wait1(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = sharedKeyAuth_smStopTimer(hAuth);
-	status = sharedKeyAuth_smReportFailure(hAuth);
-
-	return status;
-}
-
-TI_STATUS sharedKeyAuth_smTimeoutWait1(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = sharedKeyAuth_smSendAuth1(hAuth);
-	status = sharedKeyAuth_smStartTimer(hAuth);
-	status = sharedKeyAuth_smIncRetry(hAuth);
-
-	return status;
-}
-
-TI_STATUS sharedKeyAuth_smMaxRetryWait(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = sharedKeyAuth_smReportFailure(hAuth);
-
-	return status;
-}
-
-TI_STATUS sharedKeyAuth_smSuccess2Wait2(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = sharedKeyAuth_smStopTimer(hAuth);
-	status = sharedKeyAuth_smReportSuccess(hAuth);
-
-	return status;
-}
-
-TI_STATUS sharedKeyAuth_smFailure2Wait2(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = sharedKeyAuth_smStopTimer(hAuth);
-	status = sharedKeyAuth_smReportFailure(hAuth);
-
-	return status;
-}
-
-TI_STATUS sharedKeyAuth_smTimeoutWait2(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = sharedKeyAuth_smSendAuth2(hAuth);
-	status = sharedKeyAuth_smStartTimer(hAuth);
-	status = sharedKeyAuth_smIncRetry(hAuth);
-
-	return status;
-}
-
-/* action routines for authentication SM */
-
-TI_STATUS sharedKeyAuth_smSendAuth1(auth_t *hAuth)
-{
-	TI_STATUS		status;
-
-	status = auth_smMsgBuild(hAuth, 1, 0, NULL, 0);
-
-	return status;
-}
-
-TI_STATUS sharedKeyAuth_smSendAuth2(auth_t *hAuth)
-{
-	TI_STATUS		status;
-	
-	/* GET SECRET  */
-
-	/* ENCRYPT CHALLANGE WITH SECRET */
-
-	status = auth_smMsgBuild(hAuth, 3, 0, (TI_UINT8 *)(hAuth->authData.pChalange), hAuth->authData.challangeLen);
-
-	return status;
-}
-
-TI_STATUS sharedKeyAuth_smStopAuth(auth_t *hAuth)
-{
-	return TI_OK;
-}
-
-TI_STATUS sharedKeyAuth_smActionUnexpected(auth_t *hAuth)
-{
-	return TI_OK;
-}
-
-/* local functions */
-
-
-TI_STATUS sharedKeyAuth_smResetRetry(auth_t *hAuth)
-{
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-	
-	hAuth->retryCount = 0;
-	
-	return TI_OK;
-}
-
-TI_STATUS sharedKeyAuth_smIncRetry(auth_t *hAuth)
-{
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-	
-	hAuth->retryCount++;
-	
-	return TI_OK;
-} 
-
-TI_STATUS sharedKeyAuth_smReportSuccess(auth_t *hAuth)
-{
-	TI_STATUS 		status;
-
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-	
-	status = mlme_reportAuthStatus(hAuth->hMlme, hAuth->authData.status);
-
-	return status;
-}
-
-TI_STATUS sharedKeyAuth_smReportFailure(auth_t *hAuth)
-{
-	TI_STATUS 		status;
-
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-	
-	status = mlme_reportAuthStatus(hAuth->hMlme, hAuth->authData.status);
-
-	return status;
-}
-
-TI_STATUS sharedKeyAuth_smStartTimer(auth_t *hAuth)
-{
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-	
-    tmr_StartTimer (hAuth->hAuthSmTimer,
-                    auth_smTimeout,
-                    (TI_HANDLE)hAuth,
-                    hAuth->timeout,
-                    TI_FALSE);
-
-	return TI_OK;
-}
-
-TI_STATUS sharedKeyAuth_smStopTimer(auth_t *hAuth)
-{
-	if (hAuth == NULL)
-	{
-		return TI_NOK;
-	}
-	
-	tmr_StopTimer (hAuth->hAuthSmTimer);
-
-	return TI_OK;
-}
-
-TI_STATUS sharedKey_Timeout(auth_t *pAuth)
-{
-	if (pAuth->retryCount >= pAuth->maxCount)
-	{
-		pAuth->authData.status = STATUS_PACKET_REJ_TIMEOUT;
-		return auth_skSMEvent(&pAuth->currentState, SHARED_KEY_AUTH_SM_EVENT_MAX_RETRY, pAuth);
-	}
-
-	return auth_skSMEvent(&pAuth->currentState, SHARED_KEY_AUTH_SM_EVENT_TIMEOUT, pAuth);
-}
-
-
diff --git a/wl1271/stad/src/Sta_Management/sharedKeyAuthSm.h b/wl1271/stad/src/Sta_Management/sharedKeyAuthSm.h
deleted file mode 100644
index de0ee14..0000000
--- a/wl1271/stad/src/Sta_Management/sharedKeyAuthSm.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * sharedKeyAuthSm.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file sharedKeyAuthSm.h
- *  \brief shared key 802.11 authentication SM
- *
- *  \see sharedKeyAuthSm.c
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	sharedKeyAuthSm.h										   */
-/*    PURPOSE:	shared key 802.11 authentication SM						   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _SHARED_KEY_AUTH_SM_H
-#define _SHARED_KEY_AUTH_SM_H
-
-#include "fsm.h"
-#include "mlmeApi.h"
-#include "authSm.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* state machine states */
-typedef enum 
-{
-	SHARED_KEY_AUTH_SM_STATE_IDLE		= 0,
-	SHARED_KEY_AUTH_SM_STATE_WAIT_1    	= 1,
-	SHARED_KEY_AUTH_SM_STATE_WAIT_2    	= 2,
-	SHARED_KEY_AUTH_SM_STATE_AUTH		= 3
-} sharedKeyAuth_smStates_t;
-
-/* State machine inputs */
-typedef enum 
-{
-	SHARED_KEY_AUTH_SM_EVENT_START			= 0,
-	SHARED_KEY_AUTH_SM_EVENT_STOP			= 1,
-	SHARED_KEY_AUTH_SM_EVENT_SUCCESS_1  	= 2,
-	SHARED_KEY_AUTH_SM_EVENT_FAIL_1			= 3,
-	SHARED_KEY_AUTH_SM_EVENT_SUCCESS_2  	= 4,
-	SHARED_KEY_AUTH_SM_EVENT_FAIL_2			= 5,
-	SHARED_KEY_AUTH_SM_EVENT_TIMEOUT		= 6,
-	SHARED_KEY_AUTH_SM_EVENT_MAX_RETRY		= 7
-} sharedKeyAuth_smEvents_t;
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS sharedKeyAuth_Config(TI_HANDLE 	hAuth,
-							TI_HANDLE 	pOs);
-
-TI_STATUS sharedKeyAuth_Recv(TI_HANDLE pAssoc, mlmeFrameInfo_t *pFrame);
-
-TI_STATUS sharedKey_Timeout(auth_t *pAuth);
-
-TI_STATUS auth_skSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hAuth);
-
-/* state machine functions */
-
-TI_STATUS sharedKeyAuth_smStartIdle(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smStopWait(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smSuccess1Wait1(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smFailure1Wait1(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smSuccess2Wait2(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smFailure2Wait2(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smTimeoutWait1(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smTimeoutWait2(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smMaxRetryWait(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smStopAuth(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smActionUnexpected(auth_t *hAuth);
-
-TI_STATUS sharedKeyAuth_smResetRetry(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smIncRetry(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smReportSuccess(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smReportFailure(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smSendAuth1(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smSendAuth2(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smStartTimer(auth_t *hAuth);
-TI_STATUS sharedKeyAuth_smStopTimer(auth_t *hAuth);
-
-#endif
-
diff --git a/wl1271/stad/src/Sta_Management/siteHash.c b/wl1271/stad/src/Sta_Management/siteHash.c
deleted file mode 100644
index 26301ca..0000000
--- a/wl1271/stad/src/Sta_Management/siteHash.c
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * siteHash.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file siteHash.c
- *  \brief Site Hash implementation
- *
- *  \see siteHash.h
- */
-
-/****************************************************************************/
-/*																			*/
-/*		MODULE:	siteHash.c													*/
-/*    PURPOSE:	Site Hash implementation 									*/
-/*																			*/
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_84
-#include "tidef.h"
-#include "report.h"
-#include "osApi.h"
-#include "siteMgrApi.h"
-#include "siteHash.h"
-#include "smeApi.h"
-
-
-/****************************************************************************************************************
-	
-	This file implements the site hash mechanism. This mechanism is used for faster access to the sites information.
-	It is compound of the following:
-		1.	hash function	-	which maps the 4 last bits of the BSSID to an entry in the hash table.
-		2.	hash table		-	each entry in the table points to a linked list of site entries
-		3.	site table		-	each entry holds a site information
-															
-	In order to find a site in the site table, we operate the hash function on the site's BSSID.
-	We receive a hash entry. We go over the linked list pointed by this hash entry until we find the site entry.
-*****************************************************************************************************************/
-
-#define WLAN_NUM_OF_MISSED_SACNS_BEFORE_AGING 2
-
-
-/********************************************/
-/*		Functions Implementations			*/
-/********************************************/
-/************************************************************************
- *                        siteMgr_resetSiteTable						*
- ************************************************************************
-DESCRIPTION: reset the following things: 
-				-	Mgmt parameters structure
-				-	Site table
-				-	Hash table
-				-	Primary site pointer
-				-	Number of sites
-                                                                                                   
-INPUT:      hSiteMgr				-	Handle to site mgr	
-
-
-OUTPUT:		
-
-RETURN:     TI_OK
-
-************************************************************************/
-TI_STATUS siteMgr_resetSiteTable(TI_HANDLE	hSiteMgr, siteTablesParams_t	*pSiteTableParams)
-{
-	int i;
-	siteMgr_t		*pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pSiteTableParams->maxNumOfSites > MAX_SITES_BG_BAND )
-    {
-        TRACE2( pSiteMgr->hReport, REPORT_SEVERITY_ERROR,
-               "siteMgr_resetSiteTable. pScanMngr->currentBSSBand=%d exceeds the limit %d\n",
-                   pSiteTableParams->maxNumOfSites, MAX_SITES_BG_BAND);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return TI_NOK;
-    }
-	os_memoryZero(pSiteMgr->hOs, &pSiteTableParams->siteTable[0], sizeof(siteEntry_t)*pSiteTableParams->maxNumOfSites); 
-
-	for (i = 0; i < pSiteTableParams->maxNumOfSites; i++)
-	{
-		pSiteTableParams->siteTable[i].index = i;
-		pSiteTableParams->siteTable[i].siteType = SITE_NULL;
-        pSiteTableParams->siteTable[i].beaconRecv = TI_FALSE;
-        pSiteTableParams->siteTable[i].dtimPeriod = 1;
-	}
-
-	pSiteTableParams->numOfSites = 0;
-
-	pSiteMgr->pSitesMgmtParams->pPrimarySite = NULL;
-
-	return TI_OK;
-}
-
-/************************************************************************
- *                        findSiteEntry									*
- ************************************************************************
-DESCRIPTION: Perform the following things: 
-			-	Compute the site's hash entry based on the site BSSID and hash function
-			-	Look fotr the site entry in the linked list pointed by the hash entry
-			-	If the site is found in the site table, returns a pointer to the site entry
-			-	If the site is not found, return NULL.
-                                                                                                   
-INPUT:      pSiteMgr	-	Handle to site mgr	
-			mac			-	The site BSSID		
-
-
-OUTPUT:		
-
-RETURN:     Pointer to the site entry if site found, NULL otherwise
-
-************************************************************************/
-siteEntry_t	*findSiteEntry(siteMgr_t		*pSiteMgr, 
-				           TMacAddr 		*mac)
-{
-    siteTablesParams_t      *pCurrentSiteTable = pSiteMgr->pSitesMgmtParams->pCurrentSiteTable;
-	siteEntry_t             *pSiteEntry;	
-    TI_UINT8                 tableIndex=2, i;
-
-   /* It looks like it never happens. Anyway decided to check */
-    if ( pCurrentSiteTable->maxNumOfSites > MAX_SITES_BG_BAND )
-    {
-        TRACE2( pSiteMgr->hReport, REPORT_SEVERITY_ERROR,
-               "findSiteEntry. pCurrentSiteTable->maxNumOfSites=%d exceeds the limit %d\n",
-                   pCurrentSiteTable->maxNumOfSites, MAX_SITES_BG_BAND);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return NULL;
-    }
-
-    do
-	{
-        tableIndex--;
-		for (i = 0; i < pCurrentSiteTable->maxNumOfSites; i++)
-	    {
-			pSiteEntry = &(pCurrentSiteTable->siteTable[i]);
-        
-	    	if (MAC_EQUAL (pSiteEntry->bssid, *mac))
-	    	{
-                TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION,
-                     "FIND success, bssid: %X-%X-%X-%X-%X-%X\n\n", (*mac)[0], (*mac)[1], (*mac)[2], (*mac)[3], (*mac)[4], (*mac)[5]);
-	    		return pSiteEntry;
-	    	}
-
-	    }
-	   if ((pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE) &&
-           (tableIndex==1))
-	   {   /* change site table */
-	       if (pCurrentSiteTable == &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables)
-              {
-                  pCurrentSiteTable = (siteTablesParams_t *)&pSiteMgr->pSitesMgmtParams->dot11A_sitesTables;
-              }
-	       else
-              {
-                  pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables;
-              }
-	   }
-
-    } while (tableIndex>0);
-
-
-
-TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "FIND failure, bssid: %X-%X-%X-%X-%X-%X\n\n", (*mac)[0], (*mac)[1], (*mac)[2], (*mac)[3], (*mac)[4], (*mac)[5]);
-
-
-	return NULL;
-}
-
-/************************************************************************
- *                        findAndInsertSiteEntry									*
- ************************************************************************
-DESCRIPTION: Perform the following things: 
-			-	Compute the site's hash entry based on the site BSSID and hash function
-			-	Look for the site entry in the linked list pointed by the hash entry
-			-	If the site is found in the site table, returns a pointer to the site entry
-			-	If the site is not found in the site table, tries to add the site 
-				-	If succeeds, returns a pointer to the site entry
-				-	Otherwise, returns NULL
-                                                                                                   
-INPUT:      pSiteMgr	-	Handle to site mgr	
-			mac			-	The site BSSID		
-            band        -   The site band
-
-
-OUTPUT:		
-
-RETURN:     Pointer to the site entry if site found/inserted, NULL otherwise
-
-************************************************************************/
-siteEntry_t	*findAndInsertSiteEntry(siteMgr_t		*pSiteMgr, 
-									TMacAddr    	*mac,
-                                    ERadioBand      band)
-{
-	TI_UINT8             i, emptySiteIndex=0, nextSite2Remove=0;
-	siteEntry_t         *pSiteEntry, *pPrimarySite=pSiteMgr->pSitesMgmtParams->pPrimarySite;
-	sitesMgmtParams_t   *pSitesMgmtParams  = pSiteMgr->pSitesMgmtParams;
-	siteTablesParams_t  *pCurrentSiteTable;
-    TI_BOOL              firstEmptySiteFound = TI_FALSE;
-    TI_UINT32            oldestTS;
-
-
-    /* choose site table according to AP's band */
-    if ( RADIO_BAND_2_4_GHZ == band )
-    {
-        pCurrentSiteTable = &(pSitesMgmtParams->dot11BG_sitesTables);
-    }
-    else if (RADIO_BAND_5_0_GHZ == band)
-    {
-        pCurrentSiteTable = (siteTablesParams_t*) &(pSitesMgmtParams->dot11A_sitesTables);
-    }
-    else
-    {
-        TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Bad band: %d\n\n", band);
-        pCurrentSiteTable = &(pSitesMgmtParams->dot11BG_sitesTables);
-    }
-        
-    /* Set the first TS to a site which is not the Primary site */
-    if (pPrimarySite != &(pCurrentSiteTable->siteTable[0]))
-	{
-        oldestTS = pCurrentSiteTable->siteTable[0].localTimeStamp;
-    }
-    else
-	{
-        oldestTS = pCurrentSiteTable->siteTable[1].localTimeStamp;
-    }
-   /* It looks like it never happens. Anyway decided to check */
-    if ( pCurrentSiteTable->maxNumOfSites > MAX_SITES_BG_BAND )
-    {
-        TRACE2( pSiteMgr->hReport, REPORT_SEVERITY_ERROR,
-               "findAndInsertSiteEntry. pCurrentSiteTable->maxNumOfSites=%d exceeds the limit %d\n",
-                   pCurrentSiteTable->maxNumOfSites, MAX_SITES_BG_BAND);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return NULL;
-    }
-    /* Loop all the sites till the desired MAC is found */
-    for (i = 0; i < pCurrentSiteTable->maxNumOfSites; i++)
-    {
-        pSiteEntry = &(pCurrentSiteTable->siteTable[i]);
-		
-        if (MAC_EQUAL (pSiteEntry->bssid, *mac))
-		{
-
-            TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "FIND success, bssid: %X-%X-%X-%X-%X-%X\n\n", (*mac)[0], (*mac)[1], (*mac)[2], (*mac)[3], (*mac)[4], (*mac)[5]);
-
-            return pSiteEntry;
-        }
-        else if (pSiteEntry->siteType == SITE_NULL)
-        {   /* Save the first empty site, in case the
-            desired MAC is not found */
-            if (!firstEmptySiteFound)
-            {
-                emptySiteIndex = i;
-                firstEmptySiteFound=TI_TRUE;
-            }
-		
-        }
-        else if (oldestTS == pSiteEntry->localTimeStamp)
-        {   /* Save the oldest site's index, according to TS */
-            nextSite2Remove = i;
-        }
-	}
-
-    TRACE4(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "INSERT failure, no free entry!, oldestTS=%d, nextSite2Remove=%d, "
-           "[0].localTimeStamp=%d, [1]localTimeStamp%d \n", 
-           oldestTS, nextSite2Remove, 
-           pCurrentSiteTable->siteTable[0].localTimeStamp,
-           pCurrentSiteTable->siteTable[1].localTimeStamp);
-
-    if ((!firstEmptySiteFound) || (pCurrentSiteTable->numOfSites>=pCurrentSiteTable->maxNumOfSites))
-	{
-		/* No NULL entry has been found. Remove the oldest site */
-        pSiteEntry =  &(pCurrentSiteTable->siteTable[nextSite2Remove]);
-        TRACE9(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "INSERT failure, no free entry!, numOfSites=%d, removing site index=%d,\n                                bssid: %X-%X-%X-%X-%X-%X, ts=%d \n", pCurrentSiteTable->numOfSites, nextSite2Remove, pSiteEntry->bssid[0], pSiteEntry->bssid[1], pSiteEntry->bssid[2], pSiteEntry->bssid[3], pSiteEntry->bssid[4], pSiteEntry->bssid[5], pSiteEntry->localTimeStamp);
-        removeSiteEntry(pSiteMgr, pCurrentSiteTable, pSiteEntry);
-        emptySiteIndex = nextSite2Remove;
-
-	}
-
-
-	pCurrentSiteTable->numOfSites++; 
-
-	pSiteEntry = &(pCurrentSiteTable->siteTable[emptySiteIndex]);
-
-	/* fill the entry with the station mac */
-	MAC_COPY (pSiteEntry->bssid, *mac);
-
-    /* Some parameters have to be initialized immediately after entry allocation */
-
-    if(pSiteMgr->siteMgrOperationalMode == DOT11_G_MODE)
-        pSiteEntry->currentSlotTime = pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime;
-
-    TRACE8(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "INSERT success, bssid: %X-%X-%X-%X-%X-%X, band=%d, index=%d\n\n", (*mac)[0], (*mac)[1], (*mac)[2], (*mac)[3], (*mac)[4], (*mac)[5], band, emptySiteIndex);
-
-
-	return pSiteEntry;
-}
-
-/************************************************************************
- *                        removeSiteEntry								*
- ************************************************************************
-DESCRIPTION: Removes the site entry from the site table
-                                                                                                   
-INPUT:      pSiteMgr		   - Handle to site mgr
-            pCurrSiteTblParams - Pointer to current site table parameters   
-            hashPtr			   - Pointer to the site entry      
-
-
-OUTPUT:		
-
-RETURN:     
-
-************************************************************************/
-void removeSiteEntry(siteMgr_t  *pSiteMgr, 
-                     siteTablesParams_t  *pCurrSiteTblParams,
-                     siteEntry_t         *pSiteEntry)
-{
-	TI_UINT8			index; 
-
-	if (pSiteEntry == NULL)
-	{
-TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "REMOVAL failure, site is NULL\n\n");
-		return;
-	}
-
-	if (pCurrSiteTblParams->numOfSites == 0)
-	{
-TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "REMOVAL failure, site table is empty\n\n");
-		return;
-	}
-
-TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "removeSiteEntry REMOVE ssid=, bssid= 0x%x-0x%x-0x%x-0x%x-0x%x-0x%x\n\n",			   pSiteEntry->bssid[0], pSiteEntry->bssid[1], pSiteEntry->bssid[2],			   pSiteEntry->bssid[3], pSiteEntry->bssid[4], pSiteEntry->bssid[5] );
-
-	pCurrSiteTblParams->numOfSites--;
-		
-	/* Now remove (exclude) hashPtr entry from the linked list */
-
-TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "REMOVAL success, bssid: %X-%X-%X-%X-%X-%X\n\n", pSiteEntry->bssid[0], pSiteEntry->bssid[1], pSiteEntry->bssid[2], pSiteEntry->bssid[3], pSiteEntry->bssid[4], pSiteEntry->bssid[5]);
-TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, " SITE TABLE remaining entries number  %d \n", pCurrSiteTblParams->numOfSites);
-	
-	/* Clean the rest of the entry structure */
-	index = pSiteEntry->index;     /* keep the index of the siteTable entry */
-	os_memoryZero(pSiteMgr->hOs, pSiteEntry, sizeof(siteEntry_t));
-
-    /* This is not required!!!! - Remove!!*/
-	pSiteEntry->dtimPeriod = 1;
-	pSiteEntry->siteType = SITE_NULL;
-	pSiteEntry->index = index;   /* restore the index of the siteTable */
-
-	/* if removing previous primary site - update the link */
-	if (pSiteEntry == pSiteMgr->pSitesMgmtParams->pPrevPrimarySite)
-	{
-		pSiteMgr->pSitesMgmtParams->pPrevPrimarySite = NULL;
-	}
-
-	return;
-}
-
diff --git a/wl1271/stad/src/Sta_Management/siteHash.h b/wl1271/stad/src/Sta_Management/siteHash.h
deleted file mode 100644
index 0df8cf0..0000000
--- a/wl1271/stad/src/Sta_Management/siteHash.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * siteHash.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file siteHash.h
- *  \brief Hash & site table internal header file
- *
- *  \see siteHash.c
- */
-
-/***************************************************************************/
-/*                                                                          */
-/*    MODULE:   siteHash.h                                                  */
-/*    PURPOSE:  Hash & site table internal header file                      */
-/*                                                                          */
-/***************************************************************************/
-#ifndef __SITE_MGR_H__
-#define __SITE_MGR_H__
-
-#include "tidef.h"
-#include "paramOut.h"
-#include "802_11Defs.h"
-#include "DataCtrl_Api.h"
-#include "scanResultTable.h"
-
-#define MIN_TX_SESSION_COUNT    1
-#define MAX_TX_SESSION_COUNT    7
-
-/* A site entry contains all the site attribute received in beacon and probes
-    and data used to manage the site table and hash table */
-typedef TSiteEntry siteEntry_t;
-
-typedef struct
-{
-    TI_UINT8           numOfSites;
-    TI_UINT8           maxNumOfSites;
-    siteEntry_t        siteTable[MAX_SITES_BG_BAND];
-}siteTablesParams_t;
-
-/* This struct is seperated from the above struct (siteTablesParams_t) for memory optimizations */
-typedef struct
-{
-    TI_UINT8           numOfSites;
-    TI_UINT8           maxNumOfSites;
-    siteEntry_t        siteTable[MAX_SITES_A_BAND];
-}siteTablesParamsBandA_t;
-
-/* Ths following structure is used to manage the sites */
-typedef struct
-{
-    siteTablesParamsBandA_t   dot11A_sitesTables;
-    siteTablesParams_t        dot11BG_sitesTables;
-    siteTablesParams_t        *pCurrentSiteTable;
-    siteEntry_t               *pPrimarySite;
-    siteEntry_t               *pPrevPrimarySite;
-} sitesMgmtParams_t;
-
-
-/* Site manager handle */
-typedef struct
-{
-    siteMgrInitParams_t *pDesiredParams;
-    sitesMgmtParams_t   *pSitesMgmtParams;
-
-    TI_HANDLE           hConn;
-    TI_HANDLE           hSmeSm;
-    TI_HANDLE           hCtrlData;
-    TI_HANDLE           hRxData;
-    TI_HANDLE           hTxCtrl;
-    TI_HANDLE           hRsn;
-    TI_HANDLE           hAuth;
-    TI_HANDLE           hAssoc;
-    TI_HANDLE           hRegulatoryDomain;
-    TI_HANDLE           hMeasurementMgr;
-    TI_HANDLE           hTWD;
-    TI_HANDLE           hMlmeSm;
-    TI_HANDLE           hReport;
-    TI_HANDLE           hOs;
-    TI_HANDLE           hXCCMngr;
-    TI_HANDLE           hApConn;
-    TI_HANDLE           hCurrBss;
-    TI_HANDLE           hQosMngr;
-    TI_HANDLE           hPowerMgr;
-    TI_HANDLE           hEvHandler;
-    TI_HANDLE           hScr;
-    TI_HANDLE           hStaCap;
-
-    TI_UINT32           beaconSentCount;
-    TI_UINT32           rxPacketsCount;
-    TI_UINT32           txPacketsCount;
-    TI_UINT16           txSessionCount;     /* Current Tx-Session index as configured to FW in last Join command. */
-
-    EModulationType     chosenModulation;
-    EModulationType     currentDataModulation;
-    EDot11Mode          siteMgrOperationalMode;
-    ERadioBand          radioBand;
-    ERadioBand          prevRadioBand;
-    
-    TMacAddr            ibssBssid;
-    TI_BOOL             bPostponedDisconnectInProgress;
-    TI_BOOL             isAgingEnable;
-
-    /* TX Power Adjust */
-    TI_UINT32           siteMgrTxPowerCheckTime;
-    TI_BOOL             siteMgrTxPowerEnabled;
-
-    TBeaconFilterInitParams    beaconFilterParams; /*contains the desired state*/
-
-
-    /*HW Request from Power Ctrl */
-    TI_UINT32           DriverTestId;
-
-    /* Wifi Simple Config */
-    TIWLN_SIMPLE_CONFIG_MODE  siteMgrWSCCurrMode; /* indicates the current WiFi Simple Config mode */
-    TI_UINT32           uWscIeSize; 			  /* Simple Config IE actual size (the part after the OUI) */
-    char                siteMgrWSCProbeReqParams[DOT11_WSC_PROBE_REQ_MAX_LENGTH]; /* Contains the params to be used in the ProbeReq - WSC IE */ 
-
-    TI_UINT8            includeWSCinProbeReq;
-} siteMgr_t;
-
-
-
-siteEntry_t *findAndInsertSiteEntry(siteMgr_t       *pSiteMgr,
-                                    TMacAddr    *bssid,
-                                    ERadioBand     band);
-
-siteEntry_t *findSiteEntry(siteMgr_t        *pSiteMgr,
-                           TMacAddr     *bssid);
-
-void removeSiteEntry(siteMgr_t *pSiteMgr, siteTablesParams_t *pCurrSiteTblParams,
-                     siteEntry_t  *hashPtr);
-
-TI_STATUS removeEldestSite(siteMgr_t *pSiteMgr);
-
-TI_STATUS buildProbeReqTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate, TSsid *pSsid, ERadioBand radioBand);
-
-TI_STATUS buildProbeRspTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate);
-
-TI_STATUS buildNullTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate);
-
-TI_STATUS buildArpRspTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate, TIpAddr staIp);
-
-TI_STATUS buildDisconnTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate);
-
-TI_STATUS buildPsPollTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate);
-
-TI_STATUS buildQosNullDataTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate, TI_UINT8 userPriority);
-
-void setDefaultProbeReqTemplate (TI_HANDLE	hSiteMgr);
-
-#endif /* __SITE_MGR_H__ */
diff --git a/wl1271/stad/src/Sta_Management/siteMgr.c b/wl1271/stad/src/Sta_Management/siteMgr.c
deleted file mode 100644
index ed54b80..0000000
--- a/wl1271/stad/src/Sta_Management/siteMgr.c
+++ /dev/null
@@ -1,4266 +0,0 @@
-/*
- * siteMgr.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file siteMgr.c
- *  \brief Site Manager implementation
- *
- *  \see siteMgr.h
- */
-
-/****************************************************************************/
-/*                                                                          */
-/*      MODULE: siteMgr.c                                                   */
-/*    PURPOSE:  Site Manager implementation                                 */
-/*                                                                          */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_85
-#include "tidef.h"
-#include "report.h"
-#include "osApi.h"
-#include "siteMgrApi.h"
-#include "siteHash.h"
-#include "smeApi.h"
-#include "rate.h"
-#include "connApi.h"
-#include "mlmeSm.h"
-#include "sme.h"
-#include "DataCtrl_Api.h"
-#include "regulatoryDomainApi.h"
-#include "rsnApi.h"
-#include "measurementMgrApi.h"
-#include "qosMngr_API.h"
-#include "PowerMgr_API.h"
-#include "EvHandler.h"
-#include "TI_IPC_Api.h"
-#include "MacServices_api.h" 
-#include "apConn.h"
-#include "currBss.h"
-#include "PowerMgr.h"
-#include "TWDriver.h"
-#include "admCtrl.h"
-#include "DrvMainModules.h"
-#include "StaCap.h"
-#include "freq.h"
-#include "currBssApi.h"
-#include "CmdBld.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#endif
-
-/* External function prototypes */
-extern TI_STATUS wlanDrvIf_getNetwIpByDevName(TIpAddr devIp, char *devName);
-
-/* definitions */
-#define JOIN_RATE_MASK_1M   0x01
-#define JOIN_RATE_MASK_2M   0x02
-#define JOIN_RATE_MASK_5_5M 0x04
-#define JOIN_RATE_MASK_11M  0x08
-#define JOIN_RATE_MASK_22M  0x10
-
-
-#define SITE_MGR_INIT_BIT           1
-#define TIMER_INIT_BIT              2
-#define DESIRED_PARAMS_INIT_BIT     3
-#define MGMT_PARAMS_INIT_BIT        4
-
-#define BUILT_IN_TEST_PERIOD 500
-
-#define KEEP_ALIVE_SEND_NULL_DATA_PERIOD  10000
-
-/* Reconfig constants */
-#define SCAN_FAIL_THRESHOLD_FOR_RECONFIG        4  /* After 4 times we reset the 580 register and still no AP found - make recovery */
-#define SCAN_FAIL_THRESHOLD_FOR_RESET_REG_580   90  /* After 90 times (45 seconds) and  no AP found - reset the 580 register */
-#define SCAN_FAIL_RECONFIG_ENABLED              TI_TRUE
-#define SCAN_FAIL_RECONFIG_DISABLED             TI_FALSE
-
-#define TRIGGER_HIGH_TX_PW_PACING 10
-#define TRIGGER_LOW_TX_PW_PACING 10
-#define TRIGGER_HIGH_TX_PW_HYSTERESIS 3
-#define TRIGGER_LOW_TX_PW_HYSTERESIS 3
-
-/* Local Macros */
-
-#define UPDATE_BEACON_INTERVAL(pSite, pFrameInfo)       pSite->beaconInterval = pFrameInfo->content.iePacket.beaconInerval
-
-#define UPDATE_CAPABILITIES(pSite, pFrameInfo)          pSite->capabilities = pFrameInfo->content.iePacket.capabilities
-
-#define UPDATE_PRIVACY(pSite, pFrameInfo)               pSite->privacy = ((pFrameInfo->content.iePacket.capabilities >> CAP_PRIVACY_SHIFT) & CAP_PRIVACY_MASK) ? TI_TRUE : TI_FALSE
-
-#define UPDATE_AGILITY(pSite, pFrameInfo)               pSite->agility = ((pFrameInfo->content.iePacket.capabilities >> CAP_AGILE_SHIFT) & CAP_AGILE_MASK) ? TI_TRUE : TI_FALSE
-
-#define UPDATE_SLOT_TIME(pSite, pFrameInfo)             pSite->newSlotTime = ((pFrameInfo->content.iePacket.capabilities >> CAP_SLOT_TIME_SHIFT) & CAP_SLOT_TIME_MASK) ? PHY_SLOT_TIME_SHORT : PHY_SLOT_TIME_LONG
-#define UPDATE_PROTECTION(pSite, pFrameInfo)            pSite->useProtection = (pFrameInfo->content.iePacket.useProtection)
-
-/* 1. no checking Ptrs for NULL; no checking ssid.len for limit & for zero */
-/* 2. a similar MACRO is defined in scanResultTable.c
-   3. ... but there it contains pSite->ssid.str[pSite->ssid.len] = '\0'; Which of the DEFINEs is correct?*/
-#define UPDATE_SSID(pSite, pFrameInfo)                  if (pFrameInfo->content.iePacket.pSsid != NULL) { \
-                                                        pSite->ssid.len = pFrameInfo->content.iePacket.pSsid->hdr[1]; \
-                                                        if (pSite->ssid.len > MAX_SSID_LEN) { \
-                                                            TRACE2( pSiteMgr->hReport, REPORT_SEVERITY_ERROR, \
-                                                                  "UPDATE_SSID. pSite->ssid.len=%d exceeds the limit. Set to limit value %d\n", \
-                                                                  pSite->ssid.len, MAX_SSID_LEN); \
-                                                                  handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION); \
-                                                            pSite->ssid.len = MAX_SSID_LEN; \
-                                                        } \
-                                                        os_memoryCopy(pSiteMgr->hOs, \
-                                                        (void *)pSite->ssid.str, \
-                                                        (void *)pFrameInfo->content.iePacket.pSsid->serviceSetId, \
-                                                        pSite->ssid.len);}
-
-#define UPDATE_CHANNEL(pSite, pFrameInfo, rxChannel)    if (pFrameInfo->content.iePacket.pDSParamsSet == NULL) \
-                                                            pSite->channel = rxChannel; \
-                                                        else \
-                                                            pSite->channel = pFrameInfo->content.iePacket.pDSParamsSet->currChannel;
-
-
-
-#define UPDATE_DTIM_PERIOD(pSite, pFrameInfo)           if (pFrameInfo->content.iePacket.pTIM != NULL) \
-                                                        pSite->dtimPeriod = pFrameInfo->content.iePacket.pTIM->dtimPeriod
-
-#define UPDATE_ATIM_WINDOW(pSite, pFrameInfo)           if (pFrameInfo->content.iePacket.pIBSSParamsSet != NULL) \
-                                                        pSite->atimWindow = pFrameInfo->content.iePacket.pIBSSParamsSet->atimWindow
-
-#define UPDATE_BEACON_AP_TX_POWER(pSite, pFrameInfo)    if (pFrameInfo->content.iePacket.TPCReport != NULL) \
-                                                        pSite->APTxPower = pFrameInfo->content.iePacket.TPCReport->transmitPower
-
-#define UPDATE_PROBE_AP_TX_POWER(pSite, pFrameInfo)     if (pFrameInfo->content.iePacket.TPCReport != NULL) \
-                                                        pSite->APTxPower = pFrameInfo->content.iePacket.TPCReport->transmitPower
-
-#define UPDATE_BSS_TYPE(pSite, pFrameInfo)              pSite->bssType = ((pFrameInfo->content.iePacket.capabilities >> CAP_ESS_SHIFT) & CAP_ESS_MASK) ? BSS_INFRASTRUCTURE : BSS_INDEPENDENT
-
-#define UPDATE_LOCAL_TIME_STAMP(pSiteMgr, pSite, pFrameInfo)        pSite->localTimeStamp = os_timeStampMs(pSiteMgr->hOs)
-
-/* Updated from beacons */
-#define UPDATE_BEACON_MODULATION(pSite, pFrameInfo)     pSite->beaconModulation = ((pFrameInfo->content.iePacket.capabilities >> CAP_PBCC_SHIFT) & CAP_PBCC_MASK) ? DRV_MODULATION_PBCC : DRV_MODULATION_CCK
-
-/* Updated from probes */
-#define UPDATE_PROBE_MODULATION(pSite, pFrameInfo)          pSite->probeModulation = ((pFrameInfo->content.iePacket.capabilities >> CAP_PBCC_SHIFT) & CAP_PBCC_MASK) ? DRV_MODULATION_PBCC : DRV_MODULATION_CCK
-
-#define UPDATE_BEACON_RECV(pSite)                       pSite->beaconRecv = TI_TRUE
-
-#define UPDATE_PROBE_RECV(pSite)                        pSite->probeRecv = TI_TRUE
-
-
-#define UPDATE_RSN_IE(pSite, pRsnIe, rsnIeLen)              if (pRsnIe != NULL) { \
-                                                            TI_UINT8 length=0, index=0;\
-                                                            pSite->rsnIeLen = rsnIeLen;\
-                                                            while ((length < pSite->rsnIeLen) && (index<MAX_RSN_IE)){\
-                                                                pSite->pRsnIe[index].hdr[0] = pRsnIe->hdr[0];\
-                                                                pSite->pRsnIe[index].hdr[1] = pRsnIe->hdr[1];\
-                                                                os_memoryCopy(pSiteMgr->hOs, (void *)pSite->pRsnIe[index].rsnIeData, (void *)pRsnIe->rsnIeData, pRsnIe->hdr[1]);\
-                                                                length += (pRsnIe->hdr[1]+2); \
-                                                                pRsnIe += 1; \
-                                                                index++;}\
-                                                        } \
-                                                        else {pSite->rsnIeLen = 0;}
-
-#define UPDATE_BEACON_TIMESTAMP(pSiteMgr, pSite, pFrameInfo)    os_memoryCopy(pSiteMgr->hOs, pSite->tsfTimeStamp, (void *)pFrameInfo->content.iePacket.timestamp, TIME_STAMP_LEN)
-
-
-
-
-/* Local  functions definitions*/
-
-static void update_apsd(siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo);
-
-static void release_module(siteMgr_t *pSiteMgr, TI_UINT32 initVec);
-
-static void updateSiteInfo(siteMgr_t *pSiteMgr, mlmeFrameInfo_t *pFrameInfo, siteEntry_t    *pSite, TI_UINT8 rxChannel);
-
-static void updateRates(siteMgr_t *pSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo);
-
-static void updateBeaconQosParams(siteMgr_t *pSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo);
-
-static void updateProbeQosParams(siteMgr_t *pSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo);
-
-static void updateWSCParams(siteMgr_t *pSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo);
-
-static void updatePreamble(siteMgr_t *pSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo);
-
-static void getPrimarySiteDesc(siteMgr_t *pSiteMgr, OS_802_11_BSSID *pPrimarySiteDesc, TI_BOOL supplyExtendedInfo);
-
-static TI_STATUS getPrimaryBssid(siteMgr_t *pSiteMgr, OS_802_11_BSSID_EX *primaryBssid, TI_UINT32 *pLength);
-
-static ERate translateRateMaskToValue(siteMgr_t *pSiteMgr, TI_UINT32 rateMask);
-
-static void getSupportedRateSet(siteMgr_t *pSiteMgr, TRates *pRatesSet);
-
-static TI_STATUS setSupportedRateSet(siteMgr_t *pSiteMgr, TRates *pRatesSet);
-
-static void siteMgr_externalConfigurationParametersSet(TI_HANDLE hSiteMgr);
-
-static int parseWscMethodFromIE (siteMgr_t *pSiteMgr, dot11_WSC_t *WSCParams, TIWLN_SIMPLE_CONFIG_MODE *pSelectedMethod);
-
-static TI_UINT16 incrementTxSessionCount(siteMgr_t *pSiteMgr);
-static void siteMgr_TxPowerAdaptation(TI_HANDLE hSiteMgr, RssiEventDir_e highLowEdge);
-static void siteMgr_TxPowerLowThreshold(TI_HANDLE hSiteMgr, TI_UINT8 *data, TI_UINT8 dataLength);
-static void siteMgr_TxPowerHighThreshold(TI_HANDLE hSiteMgr, TI_UINT8 *data, TI_UINT8 dataLength);
-
-/************************************************************************
-*                        siteMgr_setTemporaryTxPower                    *
-*************************************************************************
-DESCRIPTION:	This function is used to start the Tx Power Control adjust mechanism
-				in regulatoryDomain.
-
-INPUT:      bActivateTempFix             -   Whether the power should be adjusted 
-************************************************************************/
-void siteMgr_setTemporaryTxPower(siteMgr_t* pSiteMgr, TI_BOOL bActivateTempFix)
-{
-	paramInfo_t         param;
-
-TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "siteMgr_setTemporaryTxPower is =  \n");
-
-	/* Set the temporary Power Level via the Regulatory Domain*/
-	param.paramType = REGULATORY_DOMAIN_TEMPORARY_TX_ATTENUATION_PARAM;
-	param.content.bActivateTempPowerFix = bActivateTempFix;
-	regulatoryDomain_setParam(pSiteMgr->hRegulatoryDomain,&param);
-}
-
-/* Interface functions Implementation */
-
-
-/*static void UPDATE_RSN_IE (siteMgr_t* pSiteMgr, siteEntry_t   *pSite, dot11_RSN_t *pRsnIe, TI_UINT8 rsnIeLen)
-{
-
-    if (pRsnIe != NULL) {
-            TI_UINT8 length=0, index=0;
-            pSite->rsnIeLen = rsnIeLen;
-            while ((length < pSite->rsnIeLen) && (index<MAX_RSN_IE)){
-                pSite->pRsnIe[index].hdr = pRsnIe->hdr;
-                os_memoryCopy(pSiteMgr->hOs, pSite->pRsnIe[index].rsnIeData, pRsnIe->rsnIeData, pRsnIe->hdr[1]);
-                length += (pRsnIe->hdr[1] + 2);
-                pRsnIe += 1;
-                index++;}
-        }
-        else {pSite->rsnIeLen = 0;}
-}*/
-/************************************************************************
- *                        siteMgr_create                                *
- ************************************************************************
-DESCRIPTION: Site manager module creation function, called by the config mgr in creation phase
-                performs the following:
-                -   Allocate the site manager handle
-                -   Allocate the desired & mgmt params structure
-
-INPUT:      hOs             -   Handle to OS
-
-
-OUTPUT:
-
-
-RETURN:     Handle to the site manager module on success, NULL otherwise
-************************************************************************/
-TI_HANDLE siteMgr_create(TI_HANDLE hOs)
-{
-    siteMgr_t       *pSiteMgr;
-    TI_UINT32          initVec;
-
-    initVec = 0;
-
-    pSiteMgr = os_memoryAlloc(hOs, sizeof(siteMgr_t));
-    if (pSiteMgr == NULL)
-    {
-        return NULL;
-    }
-
-    os_memoryZero(hOs, pSiteMgr, sizeof(siteMgr_t));
-
-    initVec |= (1 << SITE_MGR_INIT_BIT);
-
-    pSiteMgr->pDesiredParams = os_memoryAlloc(hOs, sizeof(siteMgrInitParams_t));
-    if (pSiteMgr->pDesiredParams == NULL)
-    {
-        release_module(pSiteMgr, initVec);
-        return NULL;
-    }
-
-    initVec |= (1 << DESIRED_PARAMS_INIT_BIT);
-
-    pSiteMgr->pSitesMgmtParams = os_memoryAlloc(hOs, sizeof(sitesMgmtParams_t));
-    if (pSiteMgr->pSitesMgmtParams == NULL)
-    {
-        release_module(pSiteMgr, initVec);
-        return NULL;
-    }
-
-    initVec |= (1 << MGMT_PARAMS_INIT_BIT);
-
-    pSiteMgr->hOs = hOs;
-
-    return(pSiteMgr);
-}
-
-
-
-/************************************************************************
- *                        siteMgr_init                                  *
- ************************************************************************
-DESCRIPTION: Module init function, called by the DrvMain in init phase
-                performs the following:
-                -   Reset & initiailzes local variables
-                -   Init the handles to be used by the module
-
-INPUT:      pStadHandles -  List of handles to be used by the module
-
-OUTPUT:
-
-RETURN:     void
-************************************************************************/
-void siteMgr_init (TStadHandlesList *pStadHandles)
-{ 
-    siteMgr_t *pSiteMgr = (siteMgr_t *)(pStadHandles->hSiteMgr);
-
-    /* Init handles */
-    pSiteMgr->hConn                 = pStadHandles->hConn;
-    pSiteMgr->hSmeSm                = pStadHandles->hSme;
-    pSiteMgr->hTWD                  = pStadHandles->hTWD;
-    pSiteMgr->hCtrlData             = pStadHandles->hCtrlData;
-    pSiteMgr->hRxData               = pStadHandles->hRxData;
-    pSiteMgr->hTxCtrl               = pStadHandles->hTxCtrl;
-    pSiteMgr->hRsn                  = pStadHandles->hRsn;
-    pSiteMgr->hAuth                 = pStadHandles->hAuth;
-    pSiteMgr->hAssoc                = pStadHandles->hAssoc;
-    pSiteMgr->hRegulatoryDomain     = pStadHandles->hRegulatoryDomain;
-    pSiteMgr->hMeasurementMgr       = pStadHandles->hMeasurementMgr;
-    pSiteMgr->hReport               = pStadHandles->hReport;
-    pSiteMgr->hOs                   = pStadHandles->hOs;
-    pSiteMgr->hMlmeSm               = pStadHandles->hMlmeSm;
-    pSiteMgr->hAssoc                = pStadHandles->hAssoc;
-    pSiteMgr->hReport               = pStadHandles->hReport;
-    pSiteMgr->hXCCMngr              = pStadHandles->hXCCMngr;
-    pSiteMgr->hApConn               = pStadHandles->hAPConnection;
-    pSiteMgr->hCurrBss              = pStadHandles->hCurrBss;
-    pSiteMgr->hQosMngr              = pStadHandles->hQosMngr;
-    pSiteMgr->hPowerMgr             = pStadHandles->hPowerMgr;
-    pSiteMgr->hScr                  = pStadHandles->hSCR;
-    pSiteMgr->hEvHandler            = pStadHandles->hEvHandler;
-    pSiteMgr->hStaCap               = pStadHandles->hStaCap;
-}
-
-
-TI_STATUS siteMgr_SetDefaults (TI_HANDLE                hSiteMgr,
-                               siteMgrInitParams_t     *pSiteMgrInitParams)
-{    
-    siteMgr_t       *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    TI_UINT32       timestamp;
-    ESlotTime       slotTime;
-    TMacAddr        saBssid;
-    TI_STATUS       status;
-    RssiSnrTriggerCfg_t tTriggerCfg;
-
-    pSiteMgr->siteMgrTxPowerCheckTime   = 0;
-    pSiteMgr->siteMgrWSCCurrMode        = TIWLN_SIMPLE_CONFIG_OFF;
-    pSiteMgr->includeWSCinProbeReq      = pSiteMgrInitParams->includeWSCinProbeReq;
-
-    /* Init desired parameters */
-    os_memoryCopy(pSiteMgr->hOs, pSiteMgr->pDesiredParams, pSiteMgrInitParams, sizeof(siteMgrInitParams_t));
-
-    /* Init Beacon Filter Desired State */
-    pSiteMgr->beaconFilterParams.desiredState = pSiteMgrInitParams->beaconFilterParams.desiredState;
-    /* Init Beacon Filter numOfStored parameter */
-    pSiteMgr->beaconFilterParams.numOfStored = pSiteMgrInitParams->beaconFilterParams.numOfStored;
-
-    /* Init management params */
-    pSiteMgr->pSitesMgmtParams->dot11A_sitesTables.maxNumOfSites = MAX_SITES_A_BAND;
-    siteMgr_resetSiteTable(pSiteMgr,(siteTablesParams_t *)&pSiteMgr->pSitesMgmtParams->dot11A_sitesTables);
-    pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables.maxNumOfSites = MAX_SITES_BG_BAND;
-    siteMgr_resetSiteTable(pSiteMgr,&pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables);
-
-    /* calculate random BSSID for usage in IBSS */
-    timestamp = os_timeStampMs(pSiteMgr->hOs);
-    os_memoryCopy(pSiteMgr->hOs, (void *)&(pSiteMgr->ibssBssid[0]), &timestamp, sizeof(TI_UINT32));
-
-    timestamp = os_timeStampMs(pSiteMgr->hOs);
-    os_memoryCopy(pSiteMgr->hOs, (void *)&(pSiteMgr->ibssBssid[2]), &timestamp, sizeof(TI_UINT32));
-
-    /* Get the Source MAC address in order to use it for AD-Hoc BSSID, solving Conexant ST issue for WiFi test */
-    status = ctrlData_getParamBssid(pSiteMgr->hCtrlData, CTRL_DATA_MAC_ADDRESS, saBssid);
-    if (status != TI_OK)
-    {
-        TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_CONSOLE ,"\n ERROR !!! : siteMgr_config - Error in getting MAC address\n" );
-        WLAN_OS_REPORT(("\n ERROR !!! : siteMgr_config - Error in getting MAC address\n" ));
-        return TI_NOK;
-    }
-    pSiteMgr->ibssBssid[0] = 0x02;
-    pSiteMgr->ibssBssid[1] = saBssid[1];
-    pSiteMgr->ibssBssid[2] = saBssid[2];
-
-    pSiteMgr->pDesiredParams->siteMgrSupportedBand = RADIO_BAND_DUAL;
-
-    pSiteMgr->beaconSentCount = 0;
-    pSiteMgr->pDesiredParams->siteMgrDesiredAtimWindow = 0;
-	pSiteMgr->txSessionCount = MIN_TX_SESSION_COUNT;
-
-    if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE)
-    {
-       if(pSiteMgr->pDesiredParams->siteMgrSupportedBand == RADIO_BAND_DUAL)
-       {
-           pSiteMgr->siteMgrOperationalMode = DOT11_G_MODE;
-           pSiteMgr->radioBand = RADIO_BAND_2_4_GHZ;
-           slotTime = pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime;
-           pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables;
-       }
-       else if(pSiteMgr->pDesiredParams->siteMgrSupportedBand == RADIO_BAND_2_4_GHZ)
-       {
-           pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode = DOT11_G_MODE;
-           pSiteMgr->siteMgrOperationalMode = DOT11_G_MODE;
-           pSiteMgr->radioBand = RADIO_BAND_2_4_GHZ;
-           slotTime = pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime;
-           pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables;
-       }
-       else
-       {
-           pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode = DOT11_A_MODE;
-           pSiteMgr->siteMgrOperationalMode = DOT11_A_MODE;
-           pSiteMgr->radioBand = RADIO_BAND_5_0_GHZ;
-           slotTime = PHY_SLOT_TIME_SHORT;
-           pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = (siteTablesParams_t *)&pSiteMgr->pSitesMgmtParams->dot11A_sitesTables;
-       }
-    }
-    else if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_G_MODE)
-    {
-        slotTime = pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime;
-        pSiteMgr->radioBand = RADIO_BAND_2_4_GHZ;
-        if((pSiteMgr->pDesiredParams->siteMgrSupportedBand == RADIO_BAND_DUAL) ||
-           (pSiteMgr->pDesiredParams->siteMgrSupportedBand == RADIO_BAND_2_4_GHZ))
-        {
-            pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables;
-            pSiteMgr->siteMgrOperationalMode = pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode;
-
-        }
-        else
-        {   TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_CONSOLE ,"\nERROR !!!.....The radio doesn't support the desired dot11 mode !!! \n");
-            WLAN_OS_REPORT(("\nERROR !!!.....The radio doesn't support the desired dot11 mode !!! \n"));
-            return TI_NOK;
-        }
-    }
-    else if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_B_MODE)
-    {
-        slotTime = PHY_SLOT_TIME_LONG;
-        pSiteMgr->radioBand = RADIO_BAND_2_4_GHZ;
-        if((pSiteMgr->pDesiredParams->siteMgrSupportedBand == RADIO_BAND_DUAL) ||
-           (pSiteMgr->pDesiredParams->siteMgrSupportedBand == RADIO_BAND_2_4_GHZ))
-        {
-            pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables;
-            pSiteMgr->siteMgrOperationalMode = pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode;
-        }
-        else
-        {
-            TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_CONSOLE ,"\nERROR !!!.....The radio doesn't support the desired dot11 mode !!! \n");
-            WLAN_OS_REPORT(("\nERROR !!!.....The radio doesn't support the desired dot11 mode !!! \n"));
-            return TI_NOK;
-        }
-    }
-    else
-    {
-        slotTime = PHY_SLOT_TIME_SHORT;
-        pSiteMgr->radioBand = RADIO_BAND_5_0_GHZ;
-        if((pSiteMgr->pDesiredParams->siteMgrSupportedBand == RADIO_BAND_DUAL) ||
-           (pSiteMgr->pDesiredParams->siteMgrSupportedBand == RADIO_BAND_5_0_GHZ))
-        {
-            pSiteMgr->siteMgrOperationalMode = pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode;
-            pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = (siteTablesParams_t *)&pSiteMgr->pSitesMgmtParams->dot11A_sitesTables;
-        }
-        else
-        {
-            TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_CONSOLE ,"\nERROR !!!.....The radio doesn't support the desired dot11 mode !!! \n");
-            WLAN_OS_REPORT(("\nERROR !!!.....The radio doesn't support the desired dot11 mode !!! \n"));
-            return TI_NOK;
-        }
-    }
-
-    /* Configure hal with common core-hal parameters */
-    TWD_SetRadioBand(pSiteMgr->hTWD, pSiteMgr->radioBand);
-    TWD_CfgSlotTime (pSiteMgr->hTWD, slotTime);
-    siteMgr_ConfigRate(hSiteMgr);
-
-    TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_INIT, " SiteMgr - numOfElements = %d IETableSize = %d\n" , pSiteMgrInitParams->beaconFilterParams.numOfElements, pSiteMgrInitParams->beaconFilterParams.IETableSize);
-    /* Send the table regardless to the state */
-    TWD_CfgBeaconFilterTable (pSiteMgr->hTWD,
-                              pSiteMgrInitParams->beaconFilterParams.numOfElements, 
-                              pSiteMgrInitParams->beaconFilterParams.IETable, 
-                              pSiteMgrInitParams->beaconFilterParams.IETableSize);
-
-    /*  At start-up Set the Beacon Filter state as the User required */
-    TWD_CfgBeaconFilterOpt (pSiteMgr->hTWD, pSiteMgrInitParams->beaconFilterParams.desiredState, pSiteMgr->beaconFilterParams.numOfStored);
-    
-    pSiteMgr->pSitesMgmtParams->pPrevPrimarySite = NULL;
-
-    /* Clears the ProbeReqWSC IE */
-    os_memoryZero(pSiteMgr->hOs,&pSiteMgr->siteMgrWSCProbeReqParams,sizeof(DOT11_WSC_PROBE_REQ_MAX_LENGTH));
-
-    /* Register the RSSI Trigger events at the currBss RSSI/SNR static table*/
-    currBSS_RegisterTriggerEvent(pSiteMgr->hCurrBss, TWD_OWN_EVENT_RSSI_SNR_TRIGGER_2, (TI_UINT8)0,(void*)siteMgr_TxPowerHighThreshold,hSiteMgr);
-    currBSS_RegisterTriggerEvent(pSiteMgr->hCurrBss, TWD_OWN_EVENT_RSSI_SNR_TRIGGER_3, (TI_UINT8)0,(void*)siteMgr_TxPowerLowThreshold, hSiteMgr);
-
-    tTriggerCfg.index     = TRIGGER_EVENT_HIGH_TX_PW;
-    tTriggerCfg.threshold = (0 - pSiteMgr->pDesiredParams->TxPowerRssiThresh);
-    tTriggerCfg.pacing    = TRIGGER_HIGH_TX_PW_PACING;
-    tTriggerCfg.metric    = METRIC_EVENT_RSSI_DATA;
-    tTriggerCfg.type      = RX_QUALITY_EVENT_EDGE;
-    tTriggerCfg.direction = RSSI_EVENT_DIR_HIGH;
-    tTriggerCfg.hystersis = TRIGGER_HIGH_TX_PW_HYSTERESIS;
-    tTriggerCfg.enable     = TI_TRUE;
-    TWD_CfgRssiSnrTrigger (pSiteMgr->hTWD, &tTriggerCfg);
-
-    tTriggerCfg.index     = TRIGGER_EVENT_LOW_TX_PW;
-    tTriggerCfg.threshold = (0 - pSiteMgr->pDesiredParams->TxPowerRssiRestoreThresh);
-    tTriggerCfg.pacing    = TRIGGER_LOW_TX_PW_PACING;
-    tTriggerCfg.metric    = METRIC_EVENT_RSSI_DATA;
-    tTriggerCfg.type      = RX_QUALITY_EVENT_EDGE;
-    tTriggerCfg.direction = RSSI_EVENT_DIR_LOW;
-    tTriggerCfg.hystersis = TRIGGER_LOW_TX_PW_HYSTERESIS;
-    tTriggerCfg.enable    = TI_TRUE;
-    TWD_CfgRssiSnrTrigger (pSiteMgr->hTWD, &tTriggerCfg);
-
-    TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INIT, ".....Site manager configured successfully\n");
-
-    return TI_OK;
-}
-
-
-/************************************************************************
- *                        siteMgr_unLoad                                    *
- ************************************************************************
-DESCRIPTION: site manager module unload function, called by the config mgr in the unlod phase
-                performs the following:
-                -   Free all memory aloocated by the module
-
-INPUT:      hSiteMgr    -   site mgr handle.
-
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS siteMgr_unLoad(TI_HANDLE hSiteMgr)
-{
-    TI_UINT32          initVec;
-    siteMgr_t       *pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-    if (!pSiteMgr)
-        return TI_OK;
-
-    initVec = 0xFFFF;
-    release_module(pSiteMgr, initVec);
-
-    return TI_OK;
-}
-
-/***********************************************************************
- *                        siteMgr_setParam
- ***********************************************************************
-DESCRIPTION: site mgr set param function, called by the following:
-                -   config mgr in order to set a parameter from the OS abstraction layer.
-                In this fuction, the site manager OS abstraction layer configures the site manager to the desired params.
-                Sometimes it requires a re scan, depending in the parameter type
-
-INPUT:      hSiteMgr    -   Connection handle.
-            pParam  -   Pointer to the parameter
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK on failure
-
-************************************************************************/
-
-TI_STATUS siteMgr_setParam(TI_HANDLE        hSiteMgr,
-                        paramInfo_t     *pParam)
-{
-    siteMgr_t *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    siteEntry_t *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-    OS_802_11_CONFIGURATION *pConfig;
-    TI_UINT32      channel;
-    ESlotTime  slotTime;
-    paramInfo_t	param;
-    PowerMgr_t *pPowerMgr = (PowerMgr_t*)pSiteMgr->hPowerMgr;
-    static PowerMgr_PowerMode_e desiredPowerModeProfile;
-
-    switch(pParam->paramType)
-    {
-    case SITE_MGR_CONFIGURATION_PARAM:
-        pConfig = pParam->content.pSiteMgrConfiguration;
-
-/*      for(channel = 0; channel < SITE_MGR_CHANNEL_MAX+1; channel++)
-        {
-            if(pConfig->channel == pSiteMgr->pDesiredParams->siteMgrFreq2ChannelTable[channel])
-                break;
-        }*/
-
-        channel = Freq2Chan(pConfig->Union.channel);
-
-        if(channel == 0 || channel > SITE_MGR_CHANNEL_MAX)
-            return PARAM_VALUE_NOT_VALID;
-        else
-            pConfig->Union.channel = channel;
-
-        if((pSiteMgr->pDesiredParams->siteMgrDesiredChannel != pConfig->Union.channel) ||
-           (pSiteMgr->pDesiredParams->siteMgrDesiredAtimWindow != pConfig->ATIMWindow))
-        {
-            pSiteMgr->pDesiredParams->siteMgrDesiredChannel = (TI_UINT8)pConfig->Union.channel;
-            pSiteMgr->pDesiredParams->siteMgrDesiredBeaconInterval = (TI_UINT16)pConfig->BeaconPeriod;
-            pSiteMgr->pDesiredParams->siteMgrDesiredAtimWindow = pConfig->ATIMWindow;
-        }
-
-        return TI_OK;
-
-    case SITE_MGR_DESIRED_CHANNEL_PARAM:
-        if (pParam->content.siteMgrDesiredChannel > SITE_MGR_CHANNEL_MAX)
-            return PARAM_VALUE_NOT_VALID;
-
-        if (pSiteMgr->pDesiredParams->siteMgrDesiredChannel != pParam->content.siteMgrDesiredChannel)
-            pSiteMgr->pDesiredParams->siteMgrDesiredChannel = (TI_UINT8)pParam->content.siteMgrDesiredChannel;
-        return TI_OK;
-
-    case SITE_MGR_DESIRED_BSSID_PARAM:
-            MAC_COPY (pSiteMgr->pDesiredParams->siteMgrDesiredBSSID, pParam->content.siteMgrDesiredBSSID);
-           return TI_OK;
-
-    case SITE_MGR_DESIRED_SSID_PARAM: 
-
-        TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "\nSet new SSID= (len=%d)  \n", pParam->content.siteMgrDesiredSSID.len);
-
-        if (pParam->content.siteMgrDesiredSSID.len > MAX_SSID_LEN)
-            return PARAM_VALUE_NOT_VALID;
-
-        os_memoryCopy(pSiteMgr->hOs, &pSiteMgr->pDesiredParams->siteMgrDesiredSSID, &pParam->content.siteMgrDesiredSSID, sizeof(TSsid));
-        /* only add null at the end of the string if the string length is less than 32 bytes and so we have one char left
-        */
-        if ( MAX_SSID_LEN > pSiteMgr->pDesiredParams->siteMgrDesiredSSID.len )
-        {
-            pSiteMgr->pDesiredParams->siteMgrDesiredSSID.str[pSiteMgr->pDesiredParams->siteMgrDesiredSSID.len] = '\0';
-        }
-
-        /* increase the random IBSS BSSID calculated during init */
-		pSiteMgr->ibssBssid[MAC_ADDR_LEN - 1] ++;
-
-        if (OS_802_11_SSID_JUNK (pSiteMgr->pDesiredParams->siteMgrDesiredSSID.str, pSiteMgr->pDesiredParams->siteMgrDesiredSSID.len))
-        {
-            rsn_removedDefKeys(pSiteMgr->hRsn);
-        }
-
-        /* due to the fact we call to SME_DESIRED_SSID_ACT_PARAM also we not need to call sme_Restart */
-        return TI_OK;
-
-    case SITE_MGR_DESIRED_BSS_TYPE_PARAM:
-
-         TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "\nSet BssType = %d\n", pParam->content.siteMgrDesiredBSSType);
-        if (pParam->content.siteMgrDesiredBSSType > BSS_ANY)
-            return PARAM_VALUE_NOT_VALID;
-
-        if (pSiteMgr->pDesiredParams->siteMgrDesiredBSSType != pParam->content.siteMgrDesiredBSSType)
-        {
-            pSiteMgr->pDesiredParams->siteMgrDesiredBSSType = pParam->content.siteMgrDesiredBSSType;
-
-			/* If the new BSS type is NOT Ad_Hoc, We make sure that the rate masks are set to G */
-			 if(pSiteMgr->pDesiredParams->siteMgrDesiredBSSType != BSS_INDEPENDENT)
-
-            {
-				 pSiteMgr->siteMgrOperationalMode = DOT11_G_MODE;
-                 siteMgr_ConfigRate(pSiteMgr);
-            }
-
-            /* If the new BSS type is Ad_Hoc, increase the random BSSID calculated during init */
-            if(pSiteMgr->pDesiredParams->siteMgrDesiredBSSType == BSS_INDEPENDENT)
-            {
-                pSiteMgr->ibssBssid[MAC_ADDR_LEN - 1] ++;
-            }
-
-            /* go to B_ONLY Mode only if WiFI bit is Set*/
-            if (pSiteMgr->pDesiredParams->siteMgrWiFiAdhoc == TI_TRUE)
-            {   /* Configuration For AdHoc when using external configuration */
-                if(pSiteMgr->pDesiredParams->siteMgrExternalConfiguration == TI_FALSE)
-                {
-                    siteMgr_externalConfigurationParametersSet(hSiteMgr);
-                }
-            }
-        }
-
-        return TI_OK;
-
-    case SITE_MGR_SIMPLE_CONFIG_MODE: /* Setting the WiFiSimpleConfig mode */
-		
-        /* Modify the current mode and IE size */
-		pSiteMgr->siteMgrWSCCurrMode = pParam->content.siteMgrWSCMode.WSCMode;
-		pSiteMgr->uWscIeSize = pParam->content.siteMgrWSCMode.uWscIeSize;
-
-        TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "Setting SimpleConfig Mode to %d, IE Size = %d\n", pSiteMgr->siteMgrWSCCurrMode, pSiteMgr->uWscIeSize);
-
-		/* In case the WSC is on ,the ProbeReq WSC IE need to be updated */
-        if(pSiteMgr->siteMgrWSCCurrMode != TIWLN_SIMPLE_CONFIG_OFF)
-		{
-			os_memoryCopy(pSiteMgr->hOs, &pSiteMgr->siteMgrWSCProbeReqParams, &pParam->content.siteMgrWSCMode.probeReqWSCIE, pSiteMgr->uWscIeSize);
-
-			param.paramType = RSN_WPA_PROMOTE_OPTIONS;	
-           	param.content.rsnWPAPromoteFlags = ADMCTRL_WPA_OPTION_ENABLE_PROMOTE_AUTH_MODE;
-           	rsn_setParam(pSiteMgr->hRsn, &param);
-
-            /*
-		     * Set the system to Active power save
-             */
-            desiredPowerModeProfile = pPowerMgr->desiredPowerModeProfile;
-            param.paramType = POWER_MGR_POWER_MODE;
-            param.content.powerMngPowerMode.PowerMode = POWER_MODE_ACTIVE;
-            param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_USER_PRIORITY;
-            powerMgr_setParam(pSiteMgr->hPowerMgr,&param);
-        }
-		else
-		{
-			param.paramType = RSN_WPA_PROMOTE_OPTIONS;	
-           	param.content.rsnWPAPromoteFlags = ADMCTRL_WPA_OPTION_NONE;
-           	rsn_setParam(pSiteMgr->hRsn, &param);
-
-            /* 
-             * Set the system to last power mode
-             */
-            param.paramType = POWER_MGR_POWER_MODE;
-            param.content.powerMngPowerMode.PowerMode = desiredPowerModeProfile;
-            param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_USER_PRIORITY;
-            powerMgr_setParam(pSiteMgr->hPowerMgr,&param);
-		}
-
-        /* Update the FW prob request templates to reflect the new WSC state */
-        setDefaultProbeReqTemplate (hSiteMgr);
-
-        /* update the SME on the WPS mode */
-        param.paramType = SME_WSC_PB_MODE_PARAM;
-        sme_SetParam (pSiteMgr->hSmeSm, &param);
-
-        return TI_OK;
-
-    case SITE_MGR_DESIRED_MODULATION_TYPE_PARAM:
-        if ((pParam->content.siteMgrDesiredModulationType < DRV_MODULATION_CCK) ||
-            (pParam->content.siteMgrDesiredModulationType > DRV_MODULATION_OFDM))
-            return PARAM_VALUE_NOT_VALID;
-
-        if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType != pParam->content.siteMgrDesiredModulationType)
-        {
-            pSiteMgr->pDesiredParams->siteMgrDesiredModulationType = pParam->content.siteMgrDesiredModulationType;
-            /* means that we are moving from non-pbcc network to pbcc */
-            if (pParam->content.siteMgrDesiredModulationType == DRV_MODULATION_PBCC)
-                sme_Restart (pSiteMgr->hSmeSm);
-            return TI_OK;
-        }
-        return TI_OK;
-
-    case SITE_MGR_BEACON_RECV:
-        if (!pPrimarySite)
-        {
-            return NO_SITE_SELECTED_YET;
-        }
-        pPrimarySite->beaconRecv = pParam->content.siteMgrBeaconRecv;
-        return TI_OK;
-
-
-    case SITE_MGR_DESIRED_BEACON_INTERVAL_PARAM:
-        if (pParam->content.siteMgrDesiredBeaconInterval < SITE_MGR_BEACON_INTERVAL_MIN)
-            return PARAM_VALUE_NOT_VALID;
-
-        if (pSiteMgr->pDesiredParams->siteMgrDesiredBeaconInterval != pParam->content.siteMgrDesiredBeaconInterval)
-            pSiteMgr->pDesiredParams->siteMgrDesiredBeaconInterval = pParam->content.siteMgrDesiredBeaconInterval;
-        return TI_OK;
-
-    case SITE_MGR_DESIRED_PREAMBLE_TYPE_PARAM:
-        if ((pParam->content.siteMgrDesiredPreambleType != PREAMBLE_LONG) &&
-            (pParam->content.siteMgrDesiredPreambleType != PREAMBLE_SHORT))
-            return PARAM_VALUE_NOT_VALID;
-
-        if (pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType != pParam->content.siteMgrDesiredPreambleType)
-        {
-            pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType = pParam->content.siteMgrDesiredPreambleType;
-        }
-        return TI_OK;
-
-    case SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM:
-        return setSupportedRateSet(pSiteMgr, &(pParam->content.siteMgrDesiredSupportedRateSet));
-
-    case SITE_MGR_DESIRED_DOT11_MODE_PARAM:
-        if(pParam->content.siteMgrDot11Mode > DOT11_MAX_MODE)
-            return PARAM_VALUE_NOT_VALID;
-
-        if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode != pParam->content.siteMgrDot11Mode)
-        {
-            pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode = pParam->content.siteMgrDot11Mode;
-
-            /* since the dot11ABAmode changed, the STA operational mode should be changed */
-            if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE)
-            {
-                if(pSiteMgr->pDesiredParams->siteMgrSupportedBand == RADIO_BAND_DUAL)
-                {
-                    pSiteMgr->siteMgrOperationalMode = DOT11_G_MODE;
-                }
-                else if(pSiteMgr->pDesiredParams->siteMgrSupportedBand == RADIO_BAND_2_4_GHZ)
-                {
-                    pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode = DOT11_G_MODE;
-                    pSiteMgr->siteMgrOperationalMode = DOT11_G_MODE;
-                }
-                else
-                {
-                    pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode = DOT11_G_MODE;
-                    pSiteMgr->siteMgrOperationalMode = DOT11_A_MODE;
-                }
-
-            }
-            else
-                pSiteMgr->siteMgrOperationalMode = pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode;
-
-            /* configure HAL with new parameters update rates and select site table */
-            pSiteMgr->prevRadioBand = pSiteMgr->radioBand;
-            if(pSiteMgr->siteMgrOperationalMode == DOT11_A_MODE)
-            {
-                pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = (siteTablesParams_t *)&pSiteMgr->pSitesMgmtParams->dot11A_sitesTables;
-                pSiteMgr->radioBand = RADIO_BAND_5_0_GHZ;
-                slotTime = PHY_SLOT_TIME_SHORT;
-            }
-            else if(pSiteMgr->siteMgrOperationalMode == DOT11_G_MODE)
-            {
-                pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables;
-                pSiteMgr->radioBand = RADIO_BAND_2_4_GHZ;
-                slotTime = pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime;
-            }
-            else
-            {
-                pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables;
-                pSiteMgr->radioBand = RADIO_BAND_2_4_GHZ;
-                slotTime = PHY_SLOT_TIME_LONG;
-            }
-
-            if(pSiteMgr->prevRadioBand != pSiteMgr->radioBand)
-                siteMgr_bandParamsConfig(pSiteMgr, TI_TRUE);
-
-            /* Configure TWD */
-            TWD_SetRadioBand(pSiteMgr->hTWD, pSiteMgr->radioBand);
-            TWD_CfgSlotTime (pSiteMgr->hTWD, slotTime);
-
-            /* If the BSS type is Ad_Hoc, increase the random BSSID calculated during init */
-            if(pSiteMgr->pDesiredParams->siteMgrDesiredBSSType == BSS_INDEPENDENT)
-            {
-                pSiteMgr->ibssBssid[MAC_ADDR_LEN - 1] ++;
-            }
-
-            /*siteMgr_resetAllSiteTables(pSiteMgr); */
-            sme_Restart (pSiteMgr->hSmeSm);
-        }
-        return TI_OK;
-
-    case SITE_MGR_OPERATIONAL_MODE_PARAM:
-
-        if(pParam->content.siteMgrDot11OperationalMode < DOT11_B_MODE ||
-            pParam->content.siteMgrDot11OperationalMode > DOT11_G_MODE )
-            return PARAM_VALUE_NOT_VALID;
-
-        pSiteMgr->siteMgrOperationalMode = pParam->content.siteMgrDot11OperationalMode;
-        break;
-
-
-    case SITE_MGR_RADIO_BAND_PARAM:
-        if((TI_INT8)pParam->content.siteMgrRadioBand < RADIO_BAND_2_4_GHZ ||
-           (TI_INT8)pParam->content.siteMgrRadioBand > RADIO_BAND_DUAL )
-            return PARAM_VALUE_NOT_VALID;
-
-        pSiteMgr->prevRadioBand = pSiteMgr->radioBand;
-        pSiteMgr->radioBand = pParam->content.siteMgrRadioBand;
-        if(pSiteMgr->prevRadioBand != pSiteMgr->radioBand)
-            siteMgr_bandParamsConfig(pSiteMgr, TI_FALSE);
-
-        break;
-
-    case SITE_MGR_DESIRED_SLOT_TIME_PARAM:
-        if(pParam->content.siteMgrSlotTime != PHY_SLOT_TIME_LONG &&
-           pParam->content.siteMgrSlotTime != PHY_SLOT_TIME_SHORT)
-            return PARAM_VALUE_NOT_VALID;
-
-        if (pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime != pParam->content.siteMgrSlotTime)
-        {
-            if (pSiteMgr->siteMgrOperationalMode == DOT11_G_MODE)
-            {
-                pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime = pParam->content.siteMgrSlotTime;
-                if (!pPrimarySite)
-                    TWD_CfgSlotTime (pSiteMgr->hTWD, pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime);
-                else if (pPrimarySite->bssType != BSS_INFRASTRUCTURE)
-                    TWD_CfgSlotTime (pSiteMgr->hTWD, pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime);
-            }
-
-        }
-        return TI_OK;
-
-    case SITE_MGR_BEACON_FILTER_DESIRED_STATE_PARAM:
-        {
-            /* Check if the Desired  mode has changed - If not no need to send the MIB to the FW */
-            if (pSiteMgr->beaconFilterParams.desiredState == pParam->content.siteMgrDesiredBeaconFilterState)
-            {
-                TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "Beacon Filter already \n");
-                break;
-            }
-
-            /* Set the New Desired User request of Beacon Filter */
-            pSiteMgr->beaconFilterParams.desiredState = pParam->content.siteMgrDesiredBeaconFilterState;
-                
-            TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "New Beacon Filter State is: \n");
-
-            /* Send the User required Beacon Filter Configuration to the FW */
-            TWD_CfgBeaconFilterOpt (pSiteMgr->hTWD, pSiteMgr->beaconFilterParams.desiredState, pSiteMgr->beaconFilterParams.numOfStored);
-        }
-
-        break;
-
-    case SITE_MGR_LAST_RX_RATE_PARAM:
-        if (pPrimarySite != NULL)
-        {
-            pPrimarySite->rxRate = pParam->content.ctrlDataCurrentBasicRate;
-        }
-        break;
-
-    case SITE_MGR_CURRENT_CHANNEL_PARAM:
-        if (!pPrimarySite)
-        {
-            return NO_SITE_SELECTED_YET;
-        }
-        pPrimarySite->channel = pParam->content.siteMgrCurrentChannel;
-        break;
-
-    case SITE_MGR_CURRENT_SIGNAL_PARAM:
-        if (!pPrimarySite)
-        {
-            return NO_SITE_SELECTED_YET;
-        }
-
-        pPrimarySite->rssi = pParam->content.siteMgrCurrentSignal.rssi;
-        break;
-
-    case SITE_MGRT_SET_RATE_MANAGMENT:
-        TWD_SetRateMngDebug(pSiteMgr->hTWD,&pParam ->content.RateMng);
-        break;
-    case SITE_MGR_SET_WLAN_IP_PARAM:
-        {
-            ArpRspTemplate_t      ArpRspTemplate;
-            TSetTemplate          templateStruct;
-            TIpAddr staIp;
-            EArpFilterType        filterType = ArpFilterEnabledAutoMode;
-
-            staIp[0] = pParam->content.StationIP[0];
-            staIp[1] = pParam->content.StationIP[1];
-            staIp[2] = pParam->content.StationIP[2];
-            staIp[3] = pParam->content.StationIP[3];
-
-            templateStruct.type = ARP_RSP_TEMPLATE;
-            templateStruct.ptr  = (TI_UINT8 *)&ArpRspTemplate;
-
-            buildArpRspTemplate(pSiteMgr, &templateStruct, staIp);
-            TWD_CmdTemplate (pSiteMgr->hTWD, &templateStruct, NULL, NULL);
-
-            /* configuring the IP to 0.0.0.0 by app means disable filtering */
-            if ((staIp[0] | staIp[1] | staIp[2] | staIp[3]) == 0) 
-            {
-                filterType = ArpFilterDisabled;
-            }
-
-            TWD_CfgArpIpAddrTable(pSiteMgr->hTWD, staIp , filterType, IP_VER_4);
-        }
-        
-        break;
-
-    default:
-        TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Set param, Params is not supported, %d\n", pParam->paramType);
-        return PARAM_NOT_SUPPORTED;
-    }
-
-    return TI_OK;
-}
-
-TI_STATUS siteMgr_getParamWSC(TI_HANDLE hSiteMgr, TIWLN_SIMPLE_CONFIG_MODE *wscParam)
-{ /* SITE_MGR_SIMPLE_CONFIG_MODE: - Retrieving the WiFiSimpleConfig mode */
-    siteMgr_t       *pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-	if (pSiteMgr == NULL)
-	{
-		return TI_NOK;
-	}
-
-    *wscParam = pSiteMgr->siteMgrWSCCurrMode;
-    return TI_OK;
-}
-
-/***********************************************************************
- *                        siteMgr_getParam
- ***********************************************************************
-DESCRIPTION: Site mgr get param function, called by the following:
-            -   config mgr in order to get a parameter from the OS abstraction layer.
-            -   From inside the dirver
-
-INPUT:      hSiteMgr    -   site mgr handle.
-            pParam  -   Pointer to the parameter
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS siteMgr_getParam(TI_HANDLE        hSiteMgr,
-                            paramInfo_t     *pParam)
-{
-    siteMgr_t       *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    siteEntry_t     *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-    TI_STATUS       status = TI_OK;
-    TI_UINT8           siteEntryIndex;
-    TTwdParamInfo   tTwdParam;
-
-	if(pSiteMgr == NULL)
-	{
-		return TI_NOK;
-	}
-
-    switch(pParam->paramType)
-    {
-
-    case SITE_MGR_CONFIGURATION_PARAM:
-        pParam->content.pSiteMgrConfiguration->Length = sizeof(OS_802_11_CONFIGURATION);
-        pParam->content.pSiteMgrConfiguration->ATIMWindow = pSiteMgr->pDesiredParams->siteMgrDesiredAtimWindow;
-        pParam->content.pSiteMgrConfiguration->BeaconPeriod = pSiteMgr->pDesiredParams->siteMgrDesiredBeaconInterval;
-        pParam->content.pSiteMgrConfiguration->Union.channel =
-            Chan2Freq(pSiteMgr->pDesiredParams->siteMgrDesiredChannel);
-            /*pSiteMgr->pDesiredParams->siteMgrFreq2ChannelTable[pSiteMgr->pDesiredParams->siteMgrDesiredChannel];*/
-        break;
-
-    case SITE_MGR_DESIRED_CHANNEL_PARAM:
-        pParam->content.siteMgrDesiredChannel = pSiteMgr->pDesiredParams->siteMgrDesiredChannel;
-        break;
-
-	case SITE_MGR_SIMPLE_CONFIG_MODE: /* Retrieving the WiFiSimpleConfig mode */
-		pParam->content.siteMgrWSCMode.WSCMode = pSiteMgr->siteMgrWSCCurrMode;
-		
-        TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "Retrieving the SimpleConfig Mode (%d) \n", pSiteMgr->siteMgrWSCCurrMode);
-		break;
-
-    case SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM:
-        getSupportedRateSet(pSiteMgr, &(pParam->content.siteMgrDesiredSupportedRateSet));
-        break;
-
-    case SITE_MGR_DESIRED_MODULATION_TYPE_PARAM:
-        pParam->content.siteMgrDesiredModulationType = pSiteMgr->pDesiredParams->siteMgrDesiredModulationType;
-        break;
-
-    case SITE_MGR_DESIRED_BEACON_INTERVAL_PARAM:
-        pParam->content.siteMgrDesiredBeaconInterval = pSiteMgr->pDesiredParams->siteMgrDesiredBeaconInterval;
-        break;
-
-    case SITE_MGR_DESIRED_PREAMBLE_TYPE_PARAM:
-        pParam->content.siteMgrDesiredPreambleType = pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType;
-        break;
-
-    case SITE_MGR_CURRENT_SIGNAL_PARAM:
-        if (!pPrimarySite)
-        {
-            pParam->content.siteMgrCurrentSignal.rssi = 0;
-            pParam->content.siteMgrCurrentSignal.snr = 0;
-            return NO_SITE_SELECTED_YET;
-        }
-
-        pParam->content.siteMgrCurrentSignal.rssi = pPrimarySite->rssi;
-        pParam->content.siteMgrCurrentSignal.snr = pPrimarySite->snr;
-        break;
-
-    case SITE_MGR_POWER_CONSTRAINT_PARAM:
-        if (!pPrimarySite)
-        {
-            pParam->content.powerConstraint = 0;
-            return NO_SITE_SELECTED_YET;
-        }
-        pParam->content.powerConstraint = pPrimarySite->powerConstraint;
-        break;
-
-
-    case SITE_MGR_DTIM_PERIOD_PARAM:
-        if (!pPrimarySite)
-        {
-            pParam->content.siteMgrDtimPeriod = 0;
-            return NO_SITE_SELECTED_YET;
-        }
-        pParam->content.siteMgrDtimPeriod = pPrimarySite->dtimPeriod;
-        break;
-
-    case SITE_MGR_BEACON_RECV:
-        if (!pPrimarySite)
-        {
-            pParam->content.siteMgrBeaconRecv = TI_FALSE;
-            return NO_SITE_SELECTED_YET;
-        }
-        pParam->content.siteMgrBeaconRecv = pPrimarySite->beaconRecv;
-        break;
-
-
-    case SITE_MGR_BEACON_INTERVAL_PARAM:
-        if (!pPrimarySite)
-        {
-            pParam->content.beaconInterval = 0;
-            return NO_SITE_SELECTED_YET;
-        }
-        pParam->content.beaconInterval = pPrimarySite->beaconInterval;
-        break;
-
-    case SITE_MGR_AP_TX_POWER_PARAM:
-        if (!pPrimarySite)
-        {
-            pParam->content.APTxPower = 0;
-            return NO_SITE_SELECTED_YET;
-        }
-        pParam->content.APTxPower = pPrimarySite->APTxPower;
-        break;
-
-    case SITE_MGR_SITE_CAPABILITY_PARAM:
-        if (!pPrimarySite)
-        {
-            pParam->content.siteMgrSiteCapability = 0;
-            return NO_SITE_SELECTED_YET;
-        }
-        pParam->content.siteMgrSiteCapability = pPrimarySite->capabilities;
-        break;
-
-    case SITE_MGR_CURRENT_CHANNEL_PARAM:
-        if (!pPrimarySite)
-        {
-            pParam->content.siteMgrCurrentChannel = 0;
-            return NO_SITE_SELECTED_YET;
-        }
-        pParam->content.siteMgrCurrentChannel = pPrimarySite->channel;
-        break;
-
-    case SITE_MGR_CURRENT_SSID_PARAM:
-        if (!pPrimarySite)
-        {
-            os_memoryZero(pSiteMgr->hOs, (void *)pParam->content.siteMgrCurrentSSID.str, MAX_SSID_LEN);
-            pParam->content.siteMgrCurrentSSID.len = 0;
-            return NO_SITE_SELECTED_YET;
-        }
-        if(pPrimarySite->ssid.len == 0)
-            TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "siteMgr_getParam: ssid length is zero, while primarySite is selected \n");
-        os_memoryCopy(pSiteMgr->hOs, &pParam->content.siteMgrCurrentSSID, &pPrimarySite->ssid, sizeof(TSsid));
-        break;
-
-
-    case SITE_MGR_CURRENT_BSS_TYPE_PARAM:
-        if (!pPrimarySite)
-        {
-            pParam->content.siteMgrCurrentBSSType = pSiteMgr->pDesiredParams->siteMgrDesiredBSSType;
-            TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Trying to get current BSS Type while no site is selected\n");
-            
-        }
-        else{
-            pParam->content.siteMgrCurrentBSSType = pPrimarySite->bssType;
-        }
-
-        break;
-
-
-    case SITE_MGR_CURRENT_RATE_PAIR_PARAM:
-        if (!pPrimarySite)
-        {
-            pParam->content.siteMgrCurrentRateMask.basicRateMask = 0;
-            pParam->content.siteMgrCurrentRateMask.supportedRateMask = 0;
-            return NO_SITE_SELECTED_YET;
-        }
-        pParam->content.siteMgrCurrentRateMask.basicRateMask = pSiteMgr->pDesiredParams->siteMgrMatchedBasicRateMask;
-        pParam->content.siteMgrCurrentRateMask.supportedRateMask = pSiteMgr->pDesiredParams->siteMgrMatchedSuppRateMask;
-        TRACE4(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "SITE_MGR: bitmapBasicPrimary= 0x%X,bitMapBasicDesired = 0x%X,bitMapSuppPrimary = 0x%X, bitMapSuppDesired = 0x%X\n", pPrimarySite->rateMask.basicRateMask,pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask, pPrimarySite->rateMask.supportedRateMask,pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask);
-        break;
-
-    case SITE_MGR_CURRENT_MODULATION_TYPE_PARAM:
-        if (!pPrimarySite)
-        {
-            pParam->content.siteMgrCurrentModulationType = DRV_MODULATION_NONE;
-            return NO_SITE_SELECTED_YET;
-        }
-        pParam->content.siteMgrCurrentModulationType = pSiteMgr->chosenModulation;
-        break;
-
-    case SITE_MGR_DESIRED_SLOT_TIME_PARAM:
-        pParam->content.siteMgrSlotTime = pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime;
-        break;
-
-    case SITE_MGR_CURRENT_SLOT_TIME_PARAM:
-
-        if(pSiteMgr->siteMgrOperationalMode == DOT11_G_MODE)
-        {
-            if(!pPrimarySite)
-                pParam->content.siteMgrSlotTime = pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime;
-            else
-                pParam->content.siteMgrSlotTime = pPrimarySite->currentSlotTime;
-        }
-        else if(pSiteMgr->siteMgrOperationalMode == DOT11_A_MODE)
-            pParam->content.siteMgrSlotTime = PHY_SLOT_TIME_SHORT;
-        else
-            pParam->content.siteMgrSlotTime = PHY_SLOT_TIME_LONG;
-
-        break;
-
-    case SITE_MGR_LAST_BEACON_BUF_PARAM:
-        if (pPrimarySite != NULL)
-        {
-            if (pPrimarySite->probeRecv)
-            {
-                pParam->content.siteMgrLastBeacon.isBeacon = TI_FALSE;
-                pParam->content.siteMgrLastBeacon.bufLength = pPrimarySite->probeRespLength;
-                pParam->content.siteMgrLastBeacon.buffer = pPrimarySite->probeRespBuffer;
-            }
-            else
-            {
-                pParam->content.siteMgrLastBeacon.isBeacon = TI_TRUE;
-                pParam->content.siteMgrLastBeacon.bufLength = pPrimarySite->beaconLength;
-                pParam->content.siteMgrLastBeacon.buffer = pPrimarySite->beaconBuffer;
-            }
-        }
-        break;
-
-    case SITE_MGR_BEACON_FILTER_DESIRED_STATE_PARAM:
-        {
-            if ( NULL != pSiteMgr )
-            {
-                pParam->content.siteMgrDesiredBeaconFilterState = pSiteMgr->beaconFilterParams.desiredState;
-            }
-            else
-            {
-                TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "pSite = NULL ! No info available");
-            }
-        }
-        break;
-
-    case SITE_MGR_GET_SELECTED_BSSID_INFO:
-        getPrimarySiteDesc(pSiteMgr, pParam->content.pSiteMgrPrimarySiteDesc, TI_FALSE);
-        break;
-
-	case SITE_MGR_GET_SELECTED_BSSID_INFO_EX:
-       getPrimarySiteDesc(pSiteMgr, (OS_802_11_BSSID *)pParam->content.pSiteMgrSelectedSiteInfo,TI_TRUE);
-       break;
-
-    case SITE_MGR_PRIMARY_SITE_PARAM:
-       status = getPrimaryBssid(pSiteMgr, (OS_802_11_BSSID_EX *)pParam->content.pSiteMgrSelectedSiteInfo, &pParam->paramLength);
-       break;
-
-
-    case SITE_MGR_TI_WLAN_COUNTERS_PARAM:
-        pParam->paramType = RX_DATA_COUNTERS_PARAM;
-        rxData_getParam(pSiteMgr->hRxData, pParam);
-
-        tTwdParam.paramType = TWD_COUNTERS_PARAM_ID;
-        TWD_GetParam (pSiteMgr->hTWD, &tTwdParam);
-        pParam->content.siteMgrTiWlanCounters.RecvNoBuffer = tTwdParam.content.halCtrlCounters.RecvNoBuffer;
-        pParam->content.siteMgrTiWlanCounters.FragmentsRecv = tTwdParam.content.halCtrlCounters.FragmentsRecv;
-        pParam->content.siteMgrTiWlanCounters.FrameDuplicates = tTwdParam.content.halCtrlCounters.FrameDuplicates;
-        pParam->content.siteMgrTiWlanCounters.FcsErrors = tTwdParam.content.halCtrlCounters.FcsErrors;
-        pParam->content.siteMgrTiWlanCounters.RecvError = tTwdParam.content.halCtrlCounters.RecvError;
-
-        pParam->paramType = AUTH_COUNTERS_PARAM;
-        auth_getParam(pSiteMgr->hAuth, pParam);
-        
-		pParam->paramType = MLME_BEACON_RECV;
-        mlme_getParam(pSiteMgr->hMlmeSm, pParam);
-        
-        pParam->paramType = ASSOC_COUNTERS_PARAM;
-        assoc_getParam(pSiteMgr->hAssoc, pParam);
-        pParam->content.siteMgrTiWlanCounters.BeaconsXmit = pSiteMgr->beaconSentCount;
-        break;
-    
-    case SITE_MGR_FIRMWARE_VERSION_PARAM:
-        {
-            TFwInfo *pFwInfo = TWD_GetFWInfo (pSiteMgr->hTWD);
-            os_memoryCopy(pSiteMgr->hOs, 
-                          pParam->content.siteMgrFwVersion,
-                          pFwInfo->fwVer,
-                          sizeof(pFwInfo->fwVer));
-        }
-        break;
-
-    case SITE_MGR_CURRENT_TX_RATE_PARAM:
-        {   
-            ERate rate = txCtrlParams_GetTxRate (pSiteMgr->hTxCtrl);
-            pParam->content.siteMgrCurrentTxRate = rate_DrvToNet (rate);
-        }
-        break;
-
-    case SITE_MGR_CURRENT_RX_RATE_PARAM:
-        {
-            pParam->paramType = RX_DATA_RATE_PARAM;
-            rxData_getParam (pSiteMgr->hRxData, pParam);
-            pParam->content.siteMgrCurrentRxRate =
-                (TI_UINT8)rate_DrvToNet ((ERate)pParam->content.siteMgrCurrentRxRate);
-        }
-        break;
-
-    case SITE_MGR_DESIRED_DOT11_MODE_PARAM:
-        pParam->content.siteMgrDot11Mode = pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode;
-        break;
-
-	case SITE_MGR_NETWORK_TYPE_IN_USE:
-		if (pPrimarySite)
-		{ /* Connected - return the current mode */
-			pParam->content.siteMgrDot11Mode = pSiteMgr->siteMgrOperationalMode;
-		}
-		else
-		{ /* Disconnected - return the desired mode */
-			pParam->content.siteMgrDot11Mode = pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode;
-		}
-        break;
-
-
-    case SITE_MGR_OPERATIONAL_MODE_PARAM:
-        pParam->content.siteMgrDot11OperationalMode = pSiteMgr->siteMgrOperationalMode;
-        break;
-
-    case SITE_MGR_RADIO_BAND_PARAM:
-        pParam->content.siteMgrRadioBand = pSiteMgr->radioBand;
-        break;
-
-    case SITE_MGR_CURRENT_PREAMBLE_TYPE_PARAM:
-        if (!pPrimarySite)
-            return NO_SITE_SELECTED_YET;
-
-        pParam->content.siteMgrCurrentPreambleType = pPrimarySite->currentPreambleType;
-        break;
-
-    case SITE_MGR_CURRENT_BSSID_PARAM:
-        if (pPrimarySite != NULL)
-        {
-            MAC_COPY (pParam->content.siteMgrDesiredBSSID, pPrimarySite->bssid);
-        }
-		else
-			return NO_SITE_SELECTED_YET;
-        break;
-
-    case SITE_MGR_LAST_RX_RATE_PARAM:
-        if (pPrimarySite != NULL)
-        {
-            pParam->content.ctrlDataCurrentBasicRate = pPrimarySite->rxRate;
-        }
-        break;
-
-	case SITE_MGR_GET_STATS:
-        if (pPrimarySite != NULL)
-        {
-			pParam->content.siteMgrCurrentRssi = pPrimarySite->rssi;
-        }
-        break;
-
-    case SITE_MGR_PREV_SITE_BSSID_PARAM:
-        if (pSiteMgr->pSitesMgmtParams->pPrevPrimarySite==NULL)
-        {
-            return TI_NOK;
-        }
-        MAC_COPY (pParam->content.siteMgrDesiredBSSID, pSiteMgr->pSitesMgmtParams->pPrevPrimarySite->bssid);
-        break;
-
-    case SITE_MGR_PREV_SITE_SSID_PARAM:
-        if (pSiteMgr->pSitesMgmtParams->pPrevPrimarySite==NULL)
-        {
-            return TI_NOK;
-        }
-        /* It looks like it never happens. Anyway decided to check */
-        if ( pSiteMgr->pSitesMgmtParams->pPrevPrimarySite->ssid.len > MAX_SSID_LEN )
-        {
-            TRACE2( pSiteMgr->hReport, REPORT_SEVERITY_ERROR,
-                   "siteMgr_getParam. pSiteMgr->pSitesMgmtParams->pPrevPrimarySite->ssid.len=%d exceeds the limit %d\n",
-                   pSiteMgr->pSitesMgmtParams->pPrevPrimarySite->ssid.len, MAX_SSID_LEN);
-            handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-            return TI_NOK;
-        }
-        pParam->content.siteMgrDesiredSSID.len = pSiteMgr->pSitesMgmtParams->pPrevPrimarySite->ssid.len;
-        os_memoryCopy(pSiteMgr->hOs, 
-                      (void *)pParam->content.siteMgrDesiredSSID.str, 
-                      (void *)pSiteMgr->pSitesMgmtParams->pPrevPrimarySite->ssid.str, 
-                      pSiteMgr->pSitesMgmtParams->pPrevPrimarySite->ssid.len);
-        break;
-
-    case SITE_MGR_PREV_SITE_CHANNEL_PARAM:
-        if (pSiteMgr->pSitesMgmtParams->pPrevPrimarySite==NULL)
-        {
-            return TI_NOK;
-        }
-        pParam->content.siteMgrDesiredChannel = pSiteMgr->pSitesMgmtParams->pPrevPrimarySite->channel;
-        break;
-
-    case SITE_MGR_SITE_ENTRY_BY_INDEX:
-        siteEntryIndex = pParam->content.siteMgrIndexOfDesiredSiteEntry;
-        if(siteEntryIndex >= MAX_SITES_BG_BAND)
-        {
-            return TI_NOK;
-        }
-        pParam->content.pSiteMgrDesiredSiteEntry =
-            (TI_UINT8*)(&(pSiteMgr->pSitesMgmtParams->pCurrentSiteTable->siteTable[siteEntryIndex]));
-        break;
-
-    case SITE_MGR_CUR_NUM_OF_SITES:
-        pParam->content.siteMgrNumberOfSites = pSiteMgr->pSitesMgmtParams->pCurrentSiteTable->numOfSites;
-        break;
-
-    case SITE_MGR_CURRENT_TSF_TIME_STAMP:
-        os_memoryCopy(pSiteMgr->hOs, pParam->content.siteMgrCurrentTsfTimeStamp,
-                      pSiteMgr->pSitesMgmtParams->pPrimarySite->tsfTimeStamp,
-                      TIME_STAMP_LEN);
-        break;
-
-    case SITE_MGR_GET_AP_QOS_CAPABILITIES:
-       if (!pPrimarySite)
-       {
-           pParam->content.qosApCapabilities.uQOSFlag = 0;
-           pParam->content.qosApCapabilities.uAPSDFlag = 0;
-           TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Not connected to an AP...\n");
-           return NOT_CONNECTED;
-       }
-       pParam->content.qosApCapabilities.uQOSFlag = pPrimarySite->WMESupported;
-       pParam->content.qosApCapabilities.uAPSDFlag = pPrimarySite->APSDSupport;
-       break;
-
-    case SITE_MGR_GET_PRIMARY_SITE:
-       if (!pPrimarySite)
-       {
-           pParam->content.pPrimarySite = (void *)NULL;
-           return NOT_CONNECTED;
-       }
-       else
-       {
-           pParam->content.pPrimarySite = (void *)pPrimarySite;
-       }
-       break;
-
-    case SITE_MGR_PRIMARY_SITE_HT_SUPPORT:
-       if (!pPrimarySite)
-       {
-           pParam->content.bPrimarySiteHtSupport = TI_FALSE;
-           return NOT_CONNECTED;
-       }
-       else
-       {
-           if((pPrimarySite->tHtCapabilities.tHdr[0] != TI_FALSE) && (pPrimarySite->tHtInformation.tHdr[0] != TI_FALSE))
-           {
-               pParam->content.bPrimarySiteHtSupport = TI_TRUE;
-           }
-           else
-           {
-               pParam->content.bPrimarySiteHtSupport = TI_FALSE;
-           }
-       }
-       break;
-    case SITE_MGRT_GET_RATE_MANAGMENT:
-         return cmdBld_ItrRateParams (pSiteMgr->hTWD,
-                                      pParam->content.interogateCmdCBParams.fCb,
-                                      pParam->content.interogateCmdCBParams.hCb,
-                                      (void*)pParam->content.interogateCmdCBParams.pCb);
-
-    default:
-        {
-            TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Get param, Params is not supported, 0x%x\n", pParam->paramType);
-        }
-
-        return PARAM_NOT_SUPPORTED;
-    }
-
-    return status;
-}
-
-
-/***********************************************************************
- *                        siteMgr_join
- ***********************************************************************
-DESCRIPTION: Called by the connection state machine in order to join a BSS.
-                -   If the BSS is infrastructure, sets a NULL data template to the HAL
-                -   If the BSS is IBSS, sets a probe response & beacon template to the HAL
-            Call the HAL with the join parameters
-
-
-INPUT:      hSiteMgr    -   site mgr handle.
-            JoinCompleteCB - join command complete callback function ptr
-            CB_handle - handle to pass to callback function
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS siteMgr_join(TI_HANDLE    hSiteMgr)
-{
-    siteMgr_t               *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    TJoinBss                joinParams;
-    TSetTemplate            templateStruct;
-    probeRspTemplate_t      probeRspTemplate;
-    nullDataTemplate_t      nullDataTemplate;
-    disconnTemplate_t       disconnTemplate;
-    psPollTemplate_t        psPollTemplate;
-    QosNullDataTemplate_t   QosNullDataTemplate;
-    siteEntry_t             *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-    EPreamble               curPreamble;
-
-    if (pPrimarySite == NULL)
-    {
-        TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Join BSS, Primary Site is NULL\n");
-        return TI_OK;
-    }
-
-    /* Configure the system according to parameters of Primary Site */
-    systemConfig(pSiteMgr);
-
-    joinParams.bssType = pPrimarySite->bssType;
-    joinParams.beaconInterval = pPrimarySite->beaconInterval;
-    joinParams.dtimInterval = pPrimarySite->dtimPeriod;
-    joinParams.pBSSID = (TI_UINT8 *)&pPrimarySite->bssid;
-    joinParams.pSSID = (TI_UINT8 *)&pPrimarySite->ssid.str;
-    joinParams.ssidLength = pPrimarySite->ssid.len;
-
-    /*  
-     * Set the radio band and the HW management Tx rate according to operational mode.
-     * The HW management frames includes Beacon and Probe-Response (in IBSS). 
-     */
-    if(pSiteMgr->siteMgrOperationalMode == DOT11_A_MODE)
-    {
-        joinParams.radioBand = RADIO_BAND_5_0_GHZ;
-    }
-    else
-    {
-        joinParams.radioBand = RADIO_BAND_2_4_GHZ;
-    }
-
-    joinParams.channel = pPrimarySite->channel;
-    if (joinParams.channel == SPECIAL_BG_CHANNEL)
-    {
-         joinParams.basicRateSet     = (TI_UINT16)rate_GetDrvBitmapForDefaultBasicSet ();
-    }
-    else /* != SPECIAL_BG_CHANNEL */
-    {
-        joinParams.basicRateSet = (TI_UINT16)pSiteMgr->pDesiredParams->siteMgrMatchedBasicRateMask;
-    }
-
-    ctrlData_getParamPreamble(pSiteMgr->hCtrlData, &curPreamble); /* CTRL_DATA_CURRENT_PREAMBLE_TYPE_PARAM */
-    /* Set the preamble before the join */
-    TWD_CfgPreamble (pSiteMgr->hTWD, curPreamble);
-
-    /* Now, Set templates to the HAL */
-    templateStruct.uRateMask = RATE_MASK_UNSPECIFIED;
-    if (pPrimarySite->bssType == BSS_INDEPENDENT)
-    {
-        templateStruct.ptr = (TI_UINT8 *)&probeRspTemplate;
-        templateStruct.type = PROBE_RESPONSE_TEMPLATE;
-        buildProbeRspTemplate(pSiteMgr, &templateStruct);
-        TWD_CmdTemplate (pSiteMgr->hTWD, &templateStruct, NULL, NULL);
-
-        /* We don't have to build a beacon template, because it is equal to probe response,
-        we only have to change the frame sup type */
-        probeRspTemplate.hdr.fc = ENDIAN_HANDLE_WORD(DOT11_FC_BEACON);
-        templateStruct.type = BEACON_TEMPLATE;
-        TWD_CmdTemplate (pSiteMgr->hTWD, &templateStruct, NULL, NULL);
-    }
-    else
-    {
-        templateStruct.ptr = (TI_UINT8 *)&nullDataTemplate;
-        templateStruct.type = NULL_DATA_TEMPLATE;
-        buildNullTemplate(pSiteMgr, &templateStruct);
-        TWD_CmdTemplate (pSiteMgr->hTWD, &templateStruct, NULL, NULL);
-
-        /* Send PsPoll template to HAL */
-        templateStruct.ptr = (TI_UINT8 *)&psPollTemplate;
-        templateStruct.type = PS_POLL_TEMPLATE;
-        buildPsPollTemplate(pSiteMgr, &templateStruct);
-        TWD_CmdTemplate (pSiteMgr->hTWD, &templateStruct, NULL, NULL);
-            
-        /* Set QOS Null data template to the firmware.
-            Note:  the AC to use with this template may change in QoS-manager. */
-        templateStruct.ptr = (TI_UINT8 *)&QosNullDataTemplate;
-        templateStruct.type = QOS_NULL_DATA_TEMPLATE;
-        buildQosNullDataTemplate(pSiteMgr, &templateStruct, 0);
-        TWD_CmdTemplate (pSiteMgr->hTWD, &templateStruct, NULL, NULL);
-
-        /* Send disconnect (Deauth/Disassoc) template to HAL */
-        templateStruct.ptr = (TI_UINT8 *)&disconnTemplate;
-        templateStruct.type = DISCONN_TEMPLATE;
-        buildDisconnTemplate(pSiteMgr, &templateStruct);
-        TWD_CmdTemplate (pSiteMgr->hTWD, &templateStruct, NULL, NULL);
-    }
-
-    /* Reset the Tx Power Control adjustment in RegulatoryDomain */
-    siteMgr_setTemporaryTxPower(pSiteMgr, TI_FALSE);     
-    
-	/* Get a new Tx-Session-Count (also updates the TxCtrl module). */
-	joinParams.txSessionCount = incrementTxSessionCount(pSiteMgr);
-
-    return TWD_CmdJoinBss (((siteMgr_t *)hSiteMgr)->hTWD, &joinParams);
-}
-
-
-/***********************************************************************
- *                        siteMgr_removeSelfSite
- ***********************************************************************
-DESCRIPTION: Called by the Self connection state machine in order to remove the self site from the site table.
-                Remove the site entry form the table and reset the primary site pointer
-
-
-INPUT:      hSiteMgr    -   site mgr handle.
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS siteMgr_removeSelfSite(TI_HANDLE  hSiteMgr)
-{
-    siteMgr_t           *pSiteMgr  = (siteMgr_t *)hSiteMgr;
-    siteTablesParams_t  *currTable = pSiteMgr->pSitesMgmtParams->pCurrentSiteTable;
-
-    if(pSiteMgr->pSitesMgmtParams->pPrimarySite == NULL)
-    {
-        TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_WARNING, "Remove self site Failure, pointer is NULL\n\n");
-        return TI_OK;
-    }
-
-    if(pSiteMgr->pSitesMgmtParams->pPrimarySite->siteType != SITE_SELF)
-    {
-        TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Remove self site Failure, site is not self\n\n");
-        return TI_OK;
-    }
-
-    removeSiteEntry(pSiteMgr, currTable, pSiteMgr->pSitesMgmtParams->pPrimarySite);
-    pSiteMgr->pSitesMgmtParams->pPrimarySite = NULL;
-
-    return TI_OK;
-}
-
-/***********************************************************************
- *                        siteMgr_IbssMerge
- ***********************************************************************/
-TI_STATUS siteMgr_IbssMerge(TI_HANDLE       hSiteMgr,
-                          TMacAddr      	our_bssid,
-						  TMacAddr      	new_bssid,
-                          mlmeFrameInfo_t   *pFrameInfo,
-                          TI_UINT8          rxChannel,
-                          ERadioBand        band)
-{
-	siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    siteEntry_t *pSite;
-	paramInfo_t Param;
-     
-	pSite = findAndInsertSiteEntry(pSiteMgr, (TMacAddr*)&our_bssid, band);
-
-	if(!pSite) {
-TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "siteMgr_IbssMerge, cannot find our site table entry, our_bssid: %X-%X-%X-%X-%X-%X\n", 						   (our_bssid)[0], (our_bssid)[1], (our_bssid)[2], (our_bssid)[3], 						   (our_bssid)[4], (our_bssid)[5]);
-		return TI_NOK;
-	}
-
-	updateSiteInfo(pSiteMgr, pFrameInfo, pSite, rxChannel);
-    
-	pSite->siteType = SITE_PRIMARY;
-	pSiteMgr->pSitesMgmtParams->pPrimarySite = pSite;
-    
-	MAC_COPY(pSite->bssid, new_bssid);
-    
-	Param.paramType   = SITE_MGR_DESIRED_BSSID_PARAM;
-    Param.paramLength = sizeof(TMacAddr);
-	MAC_COPY(Param.content.siteMgrDesiredBSSID, new_bssid);
-
-	siteMgr_setParam ( hSiteMgr, &Param );
-
-	conn_ibssMerge(pSiteMgr->hConn);
-
-	return TI_OK;
-}
-
-
-
-/***********************************************************************
- *                        siteMgr_updateSite
- ***********************************************************************
-DESCRIPTION: Called by the MLME parser upon receiving a beacon or probe response.
-            Performs the following:
-                -   Insert the site entry into the site hash table
-                -   Update the site information in the site table
-                -   If the site is the primary site, it handles the PBCC algorithm if needed
-                -   If the site is NULL (means it is the first frame received from this site)
-                    we update the site type to be regular
-                -   If the site type is self, we inform the self connection SM
-                    that another station joined the network we created
-
-
-INPUT:      hSiteMgr    -   site mgr handle.
-            bssid       -   BSSID received
-            pFrameInfo  -   Frame content after the parsing
-            rxChannel   -   The channel on which frame was received
-            band        -   Band on which frame was received
-            measuring   -   Determines whether the beacon or probe response
-                            has been received while a beacon measurement
-                            took place
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS siteMgr_updateSite(TI_HANDLE          hSiteMgr,
-                          TMacAddr      *bssid,
-                          mlmeFrameInfo_t   *pFrameInfo,
-                          TI_UINT8             rxChannel,
-                          ERadioBand       band,
-                          TI_BOOL              measuring)
-{
-    siteEntry_t *pSite;
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    paramInfo_t param;
-
-
-    /* The following is not required, since the scanCncn is responsible to check
-        the channels validity before scanning.
-        The problem it caused was that when 802.11d is enabled, 
-        channels that are valid for Passive only, will not be updated.*/
-    /*if (isChannelSupprted(pSiteMgr->hRegulatoryDomain , rxChannel) == TI_FALSE)
-    {
-        TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_WARNING, "Channel ERROR - try to register a site that its channel (=%d) isn't in the regulatory domain.\n\            registration ABORTED!!!", rxChannel);
-        return TI_NOK;
-    }*/
-
-
-    pSite = findAndInsertSiteEntry(pSiteMgr, bssid, band);
-
-
-
-    if (pSite == NULL)
-    {
-        TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "Site Update failure, table is full, bssid: %X-%X-%X-%X-%X-%X\n", (*bssid)[0], (*bssid)[1], (*bssid)[2], (*bssid)[3], (*bssid)[4], (*bssid)[5]);
-        return TI_OK;
-    }
-
-    updateSiteInfo(pSiteMgr, pFrameInfo, pSite, rxChannel);
-
-    switch(pSite->siteType)
-    {
-    case SITE_PRIMARY:
-        TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "PRIMARY site updated, bssid: %X-%X-%X-%X-%X-%X\n\n", (*bssid)[0], (*bssid)[1], (*bssid)[2], (*bssid)[3], (*bssid)[4], (*bssid)[5]);
-        if (pSiteMgr->pSitesMgmtParams->pPrimarySite == NULL)
-        {
-            TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "siteMgr_updateSite: Primary Site Is NULL\n");
-            pSite->siteType = SITE_REGULAR;
-            break;
-        }
-        /* Now, if the following is TI_TRUE we perform the PBCC algorithm: */
-        /* If the BSS type is infrastructure, &&
-            The chosen modulation is PBCC &&
-            The beacon modulation is not NONE &&
-            The current data modulation is different than the beacon modulation. */
-        if ((pSite->bssType == BSS_INFRASTRUCTURE) &&
-            (pSiteMgr->chosenModulation == DRV_MODULATION_PBCC) &&
-            (pSite->beaconModulation != DRV_MODULATION_NONE) &&
-            (pSiteMgr->currentDataModulation != pSite->beaconModulation))
-        {
-            pSiteMgr->currentDataModulation = pSite->beaconModulation;
-            pbccAlgorithm(pSiteMgr);
-        }
-
-        /* Now handle the slot time, first check if the slot time changed since the last
-           setting to the HAL ,and if yes set the new value */
-        if((pSiteMgr->siteMgrOperationalMode == DOT11_G_MODE) &&
-           (pSite->bssType == BSS_INFRASTRUCTURE))
-        {
-            if (pSite->currentSlotTime != pSite->newSlotTime)
-            {
-                pSite->currentSlotTime = pSite->newSlotTime;
-                TWD_CfgSlotTime (pSiteMgr->hTWD, pSite->currentSlotTime);
-            }
-        }
-
-        /* Now handle the current protection status */
-        if((pSiteMgr->siteMgrOperationalMode == DOT11_G_MODE) && (pSite->bssType == BSS_INFRASTRUCTURE))
-        {
-            param.paramType = CTRL_DATA_CURRENT_PROTECTION_STATUS_PARAM;
-            param.content.ctrlDataProtectionEnabled = pSite->useProtection;
-            ctrlData_setParam(pSiteMgr->hCtrlData, &param);
-        }
-
-        /* Now handle the current preamble type,
-           if desired preamble type is long, the ctrl data param should not be changed */
-        if((pSiteMgr->siteMgrOperationalMode == DOT11_G_MODE) &&
-           (pSite->bssType == BSS_INFRASTRUCTURE) &&
-           (pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType != PREAMBLE_LONG))
-        {
-            param.paramType = CTRL_DATA_CURRENT_PREAMBLE_TYPE_PARAM;
-            if((pSite->preambleAssRspCap == PREAMBLE_LONG) ||
-               (pSite->barkerPreambleType == PREAMBLE_LONG))
-                  {
-                param.content.ctrlDataCurrentPreambleType = PREAMBLE_LONG;
-            }
-            else
-                param.content.ctrlDataCurrentPreambleType = PREAMBLE_SHORT;
-
-            ctrlData_setParam(pSiteMgr->hCtrlData, &param);
-        }
-
-        param.paramType = CTRL_DATA_RATE_CONTROL_ENABLE_PARAM;
-        ctrlData_setParam(pSiteMgr->hCtrlData, &param);
-        break;
-
-    case SITE_NULL:
-        pSite->siteType = SITE_REGULAR;
-        TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "REGULAR site added, bssid: %X-%X-%X-%X-%X-%X\n\n", (*bssid)[0], (*bssid)[1], (*bssid)[2], (*bssid)[3], (*bssid)[4], (*bssid)[5]);
-        break;
-
-    case SITE_SELF:
-        pSite->siteType = SITE_PRIMARY;
-        TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "SELF ----> PRIMARY site , bssid: %X-%X-%X-%X-%X-%X\n\n", (*bssid)[0], (*bssid)[1], (*bssid)[2], (*bssid)[3], (*bssid)[4], (*bssid)[5]);
-        conn_ibssStaJoined(pSiteMgr->hConn);
-        break;
-
-    case SITE_REGULAR:
-        TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "REGULAR site updated, bssid: %X-%X-%X-%X-%X-%X\n\n", (*bssid)[0], (*bssid)[1], (*bssid)[2], (*bssid)[3], (*bssid)[4], (*bssid)[5]);
-        break;
-
-    default:
-        TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "Setting site type failure, bssid: %X-%X-%X-%X-%X-%X\n\n", (*bssid)[0], (*bssid)[1], (*bssid)[2], (*bssid)[3], (*bssid)[4], (*bssid)[5]);
-        break;
-    }
-
-    return TI_OK;
-}
-
-/***********************************************************************
- *                        siteMgr_start
- ***********************************************************************
-DESCRIPTION: Called by the SME SM in order to start the aging timer
-
-
-INPUT:      hSiteMgr    -   site mgr handle.
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS siteMgr_start(TI_HANDLE   hSiteMgr)
-{
-    siteMgr_t       *pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-    /* update timestamp each time aging started (needed for quiet scan) */
-    if(pSiteMgr->pSitesMgmtParams->pPrimarySite)
-        pSiteMgr->pSitesMgmtParams->pPrimarySite->localTimeStamp = os_timeStampMs(pSiteMgr->hOs);
-
-    return TI_OK;
-}
-
-
-/***********************************************************************
- *                        siteMgr_stop
- ***********************************************************************
-DESCRIPTION: Called by the SME SM in order to stop site mgr timers
-
-
-INPUT:      hSiteMgr    -   site mgr handle.
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS siteMgr_stop(TI_HANDLE    hSiteMgr)
-{
-
-    return TI_OK;
-}
-
-
-/***********************************************************************
- *                        siteMgr_updatePrimarySiteFailStatus
- ***********************************************************************
-DESCRIPTION: Called by the SME SM when the connection with the primary site fails
-                If the primary site is NULL, return.
-
-
-INPUT:      hSiteMgr    -   site mgr handle.
-            bRemoveSite -   Whether to remove the site
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-TI_STATUS siteMgr_updatePrimarySiteFailStatus(TI_HANDLE hSiteMgr,
-                                           TI_BOOL bRemoveSite)
-{
-    siteMgr_t           *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    siteTablesParams_t  *currTable = pSiteMgr->pSitesMgmtParams->pCurrentSiteTable;
-
-    if (pSiteMgr->pSitesMgmtParams->pPrimarySite == NULL)
-        return TI_OK;
-
-    TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, " SITE MGR: bRemoveSite = %d \n", bRemoveSite);
-
-    if (bRemoveSite) 
-    {
-        removeSiteEntry(pSiteMgr, currTable, pSiteMgr->pSitesMgmtParams->pPrimarySite);
-        pSiteMgr->pSitesMgmtParams->pPrimarySite = NULL;
-    }
-    else	/* Currently never used */
-    {
-        pSiteMgr->pSitesMgmtParams->pPrimarySite->failStatus = STATUS_UNSPECIFIED;
-    }
-
-    return TI_OK;
-}
-
-
-/***********************************************************************
- *                        siteMgr_isCurrentBand24
- ***********************************************************************
-DESCRIPTION: The function checks the current operational mode and
-                returns if the current band is 2.4Ghz or 5Ghz.
-
-INPUT:      hSiteMgr    -   site mgr handle.
-
-OUTPUT:
-
-RETURN:     TI_TRUE if current band is 2.4Ghz, TI_FALSE otherwise.
-
-************************************************************************/
-TI_BOOL siteMgr_isCurrentBand24(TI_HANDLE  hSiteMgr)
-{
-    siteMgr_t   *pSiteMgr =     (siteMgr_t *)hSiteMgr;
-
-    if(pSiteMgr->siteMgrOperationalMode == DOT11_A_MODE)
-        return TI_FALSE;
-
-    return TI_TRUE; /* 802.11b supports onlty 2.4G band */
-
-}
-
-/***********************************************************************
- *                        removeEldestSite
- ***********************************************************************
-DESCRIPTION: Called by the select when trying to create an IBSS and site table is full
-                Remove the eldest site from the table
-
-INPUT:      hSiteMgr    -   site mgr handle.
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS removeEldestSite(siteMgr_t *pSiteMgr)
-{
-    int             i;
-    siteEntry_t     *pEldestSite = NULL, *pSiteTable = pSiteMgr->pSitesMgmtParams->pCurrentSiteTable->siteTable;
-    siteTablesParams_t  *currTable = pSiteMgr->pSitesMgmtParams->pCurrentSiteTable;
-    TI_UINT32          currentTimsStamp = os_timeStampMs(pSiteMgr->hOs);
-    TI_UINT32          biggestGap = 0;
-
-    for (i = 0; i < currTable->maxNumOfSites; i++)
-    {
-        if (biggestGap < ((TI_UINT32)(currentTimsStamp - pSiteTable[i].localTimeStamp)))
-        {
-            biggestGap = ((TI_UINT32)(currentTimsStamp - pSiteTable[i].localTimeStamp));
-            pEldestSite = &(pSiteTable[i]);
-        }
-    }
-
-    removeSiteEntry(pSiteMgr, currTable, pEldestSite);
-
-    return TI_OK;
-}
-
-
-/***********************************************************************
- *                        update_apsd
- ***********************************************************************
-DESCRIPTION:    Sets the site APSD support flag according to the
-                beacon's capabilities vector and the WME-params IE if exists.
-
-INPUT:      pSite       -   Pointer to the site entry in the site table
-            pFrameInfo  -   Frame information after the parsing
-            
-OUTPUT:     pSite->APSDSupport flag
-
-RETURN:     
-
-************************************************************************/
-static void update_apsd(siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo)
-{
-    /* If WME-Params IE is not included in the beacon, set the APSD-Support flag
-         only by the beacons capabilities bit map. */
-    if (pFrameInfo->content.iePacket.WMEParams == NULL)
-        pSite->APSDSupport = (((pFrameInfo->content.iePacket.capabilities >> CAP_APSD_SHIFT) & CAP_APSD_MASK) ? TI_TRUE : TI_FALSE);
-
-    /* Else, set the APSD-Support flag if either the capabilities APSD bit or the 
-         WME-Params APSD bit indicate so. */
-    else
-        pSite->APSDSupport = ((((pFrameInfo->content.iePacket.capabilities >> CAP_APSD_SHIFT) & CAP_APSD_MASK) ? TI_TRUE : TI_FALSE) ||
-        (((pFrameInfo->content.iePacket.WMEParams->ACInfoField >> AP_QOS_INFO_UAPSD_SHIFT) & AP_QOS_INFO_UAPSD_MASK) ? TI_TRUE : TI_FALSE));
-}
-
-
-/***********************************************************************
- *                        release_module
- ***********************************************************************
-DESCRIPTION:    Called by the un load function
-                Go over the vector, for each bit that is set, release the corresponding module.
-
-INPUT:      pSiteMgr    -   site mgr handle.
-            initVec -   Vector that contains a bit set for each module thah had been initiualized
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static void release_module(siteMgr_t *pSiteMgr, TI_UINT32 initVec)
-{
-    if ( (initVec & (1 << MGMT_PARAMS_INIT_BIT)) && pSiteMgr->pSitesMgmtParams)
-        os_memoryFree(pSiteMgr->hOs, pSiteMgr->pSitesMgmtParams, sizeof(sitesMgmtParams_t));
-
-    if ( (initVec & (1 << DESIRED_PARAMS_INIT_BIT)) && pSiteMgr->pDesiredParams)
-        os_memoryFree(pSiteMgr->hOs, pSiteMgr->pDesiredParams, sizeof(siteMgrInitParams_t));
-
-    if (initVec & (1 << SITE_MGR_INIT_BIT))
-        os_memoryFree(pSiteMgr->hOs, pSiteMgr, sizeof(siteMgr_t));
-
-    initVec = 0;
-}
-
-
-static TI_BOOL isIeSsidBroadcast (dot11_SSID_t *pIESsid)
-{
-    if ((pIESsid == NULL) || (pIESsid->hdr[1] == 0))
-    {
-        return TI_TRUE;
-    }
-
-    /* According to 802.11, Broadcast SSID should be with length 0,
-        however, different vendors use invalid chanrs for Broadcast SSID. */
-    if (pIESsid->serviceSetId[0] < OS_802_11_SSID_FIRST_VALID_CHAR)
-    {
-        return TI_TRUE;
-    }
-
-    return TI_FALSE;
-}
-
-
-/***********************************************************************
- *                        updateSiteInfo
- ***********************************************************************
-DESCRIPTION:    Called upon receiving a beacon or probe response
-                Go over the vector, for each bit that is set, release the corresponding module.
-                Update theaite entry in the site table with the information received in the frame
-
-INPUT:      pSiteMgr    -   site mgr handle.
-            pFrameInfo  -   Frame information after the parsing
-            pSite       -   Pointer to the site entry in the site table
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static void updateSiteInfo(siteMgr_t *pSiteMgr, mlmeFrameInfo_t *pFrameInfo, siteEntry_t    *pSite, TI_UINT8 rxChannel)
-{
-    paramInfo_t param;
-    TI_BOOL        ssidUpdated = TI_FALSE;
-
-    switch (pFrameInfo->subType)
-    {
-    case BEACON:
-
-        UPDATE_BEACON_INTERVAL(pSite, pFrameInfo);
-        
-        UPDATE_CAPABILITIES(pSite, pFrameInfo);
-        
-
-        /***********************************/
-        /* Must be before UPDATE_PRIVACY and UPDATE_RSN_IE */
-        if (pSite->ssid.len==0)
-        {   /* Update the SSID only if the site's SSID is NULL */
-            if (isIeSsidBroadcast(pFrameInfo->content.iePacket.pSsid) == TI_FALSE)
-            {   /* And the SSID is not Broadcast */
-                ssidUpdated = TI_TRUE;
-                UPDATE_SSID(pSite, pFrameInfo);
-            }
-        }
-        else if (pSiteMgr->pDesiredParams->siteMgrDesiredSSID.len > 0)
-        {   /* There is a desired SSID */
-            if (pFrameInfo->content.iePacket.pSsid != NULL) 
-            {
-                if (os_memoryCompare (pSiteMgr->hOs, 
-                                      (TI_UINT8 *)pSiteMgr->pDesiredParams->siteMgrDesiredSSID.str,
-                                      (TI_UINT8 *)pFrameInfo->content.iePacket.pSsid->serviceSetId, 
-                                      pSiteMgr->pDesiredParams->siteMgrDesiredSSID.len)==0)
-                {   /* update only SSID that equals the desired SSID */
-                    ssidUpdated = TI_TRUE;
-                    UPDATE_SSID(pSite, pFrameInfo);
-                }
-            }
-            else
-            {
-                TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "updateSiteInfo BEACON, pSsid=NULL\n");
-            }
-        }
-        /***********************************/
- 
-        if (ssidUpdated)
-        {
-
-            UPDATE_PRIVACY(pSite, pFrameInfo);
-        }
-
-        update_apsd(pSite, pFrameInfo);
-
-        updatePreamble(pSiteMgr, pSite, pFrameInfo);
-
-        UPDATE_AGILITY(pSite, pFrameInfo);
-
-
-        if(pSiteMgr->siteMgrOperationalMode == DOT11_G_MODE)
-        {
-            UPDATE_SLOT_TIME(pSite, pFrameInfo);
-            UPDATE_PROTECTION(pSite, pFrameInfo);
-        }
-
-        /* Updating HT params */
-        siteMgr_UpdatHtParams ((TI_HANDLE)pSiteMgr, pSite, pFrameInfo);
-
-        updateRates(pSiteMgr, pSite, pFrameInfo);
-
-        if ((pFrameInfo->content.iePacket.pDSParamsSet != NULL)  &&
-            (pFrameInfo->content.iePacket.pDSParamsSet->currChannel!=rxChannel))
-        {
-            TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "updateSiteInfo, wrong CHANNELS:rxChannel=%d,currChannel=%d\n", rxChannel, pFrameInfo->content.iePacket.pDSParamsSet->currChannel);
-        }
-        else
-            UPDATE_CHANNEL(pSite, pFrameInfo , rxChannel);
-
-
-        UPDATE_BSS_TYPE(pSite, pFrameInfo);
-
-        if (pSite->bssType == BSS_INFRASTRUCTURE)
-            UPDATE_DTIM_PERIOD(pSite, pFrameInfo);
-
-        UPDATE_ATIM_WINDOW(pSite, pFrameInfo);
-
-        UPDATE_BEACON_AP_TX_POWER(pSite, pFrameInfo);
-
-        /* Updating QoS params */
-        updateBeaconQosParams(pSiteMgr, pSite, pFrameInfo);
-
-
-        /* updating CountryIE  */
-        if ((pFrameInfo->content.iePacket.country  != NULL) && 
-			(pFrameInfo->content.iePacket.country->hdr[1] != 0))
-        {
-            /* set the country info in the regulatory domain - If a different code was detected earlier
-               the regDomain will ignore it */
-            param.paramType = REGULATORY_DOMAIN_COUNTRY_PARAM;
-            param.content.pCountry = (TCountry *)pFrameInfo->content.iePacket.country;
-            regulatoryDomain_setParam(pSiteMgr->hRegulatoryDomain,&param);
-        }
-
-        /* Updating WSC params */
-        updateWSCParams(pSiteMgr, pSite, pFrameInfo); 
-  
-        UPDATE_LOCAL_TIME_STAMP(pSiteMgr, pSite, pFrameInfo);
-        
-        UPDATE_BEACON_MODULATION(pSite, pFrameInfo);
-
-        /* If the BSS type is independent, the beacon & probe modulation are equal,
-            It is important to update this field here for dynamic PBCC algorithm compatibility */
-        if (pSite->bssType == BSS_INDEPENDENT)
-            UPDATE_PROBE_MODULATION(pSite, pFrameInfo);
-
-
-        if (pSite->siteType == SITE_PRIMARY)
-        {
-           
-            if (pSiteMgr->pSitesMgmtParams->pPrimarySite == NULL)
-            {
-                TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "updateSiteInfo: Primary Site Is NULL\n");
-                pSite->siteType = SITE_REGULAR;
-            }
-            else
-            {
-                /*  If the site that we got the beacon on is the primary site - which means we are either trying */
-                /*  to connect to it or we are already connected - send the EVENT_GOT_BEACON to the conn module (through the SME module) */
-                /*  so the conn module will be aware of the beacon status of the site it's trying to connect to */
-                
-#ifdef XCC_MODULE_INCLUDED
-                TI_INT8 ExternTxPower;
-
-                if (pFrameInfo->content.iePacket.cellTP != NULL)
-                {
-                    ExternTxPower = pFrameInfo->content.iePacket.cellTP->power;
-                }
-                else	/* Set to maximum possible. Note that we add +1 so that Dbm = 26 and not 25 */
-                {
-                    ExternTxPower = MAX_TX_POWER / DBM_TO_TX_POWER_FACTOR + 1;
-                }
-
-                param.paramType = REGULATORY_DOMAIN_EXTERN_TX_POWER_PREFERRED;
-                param.content.ExternTxPowerPreferred = ExternTxPower;
-                regulatoryDomain_setParam(pSiteMgr->hRegulatoryDomain, &param);
-#endif
-
-                /* Updating the Tx Power according to the received Power Constraint  */
-                if(pFrameInfo->content.iePacket.powerConstraint  != NULL)
-                {   /* Checking if the recieved constraint is different from the one that is already known  */
-                    if( pFrameInfo->content.iePacket.powerConstraint->powerConstraint != pSite->powerConstraint)
-                    {   /* check if Spectrum Management is enabled */
-                        param.paramType = REGULATORY_DOMAIN_MANAGEMENT_CAPABILITY_ENABLED_PARAM;
-                        regulatoryDomain_getParam(pSiteMgr->hRegulatoryDomain,&param);
-                        if(param.content.spectrumManagementEnabled)
-                        {   /* setting power constraint */
-                            pSite->powerConstraint = pFrameInfo->content.iePacket.powerConstraint->powerConstraint;
-                            param.paramType = REGULATORY_DOMAIN_SET_POWER_CONSTRAINT_PARAM;
-                            param.content.powerConstraint = pSite->powerConstraint;
-                            regulatoryDomain_setParam(pSiteMgr->hRegulatoryDomain,&param);
-                
-                        }
-                    }
-                }
-                /* update HT Information IE at the FW whenever any of its relevant fields is changed. */
-                if (pSite->bHtInfoUpdate == TI_TRUE)
-                {
-                    TI_BOOL b11nEnable, bWmeEnable;
-
-                    /* verify 11n_Enable and Chip type */
-                    StaCap_IsHtEnable (pSiteMgr->hStaCap, &b11nEnable);
-
-                    /* verify that WME flag enable */
-                    qosMngr_GetWmeEnableFlag (pSiteMgr->hQosMngr, &bWmeEnable); 
-
-                    if ((b11nEnable != TI_FALSE) && (bWmeEnable != TI_FALSE))
-                    {
-                        TWD_CfgSetFwHtInformation (pSiteMgr->hTWD, &pSite->tHtInformation);
-                    }
-                }
-            }
-        }
-
-        UPDATE_BEACON_RECV(pSite);
-
-        if (ssidUpdated)
-        {
-            dot11_RSN_t *pRsnIe = pFrameInfo->content.iePacket.pRsnIe;
-            TI_UINT8       rsnIeLen = pFrameInfo->content.iePacket.rsnIeLen;
-            UPDATE_RSN_IE(pSite, pRsnIe, rsnIeLen);
-        }
-        
-        UPDATE_BEACON_TIMESTAMP(pSiteMgr, pSite, pFrameInfo);
-
-        
-        
-        TWD_UpdateDtimTbtt (pSiteMgr->hTWD, pSite->dtimPeriod, pSite->beaconInterval);
-       
-        break;
-
-
-    case PROBE_RESPONSE:
-
-        UPDATE_BEACON_INTERVAL(pSite, pFrameInfo);
-
-        UPDATE_CAPABILITIES(pSite, pFrameInfo);
-
-                ssidUpdated = TI_TRUE;
-        if (pSite->siteType == SITE_PRIMARY)
-        {   /* Primary SITE */
-            if (pFrameInfo->content.iePacket.pSsid != NULL && 
-                pSiteMgr->pDesiredParams->siteMgrDesiredSSID.len > 0)
-            {   /* There's a desired SSID*/
-                if (os_memoryCompare (pSiteMgr->hOs, 
-                                      (TI_UINT8*)pSiteMgr->pDesiredParams->siteMgrDesiredSSID.str, 
-                                      (TI_UINT8*)pFrameInfo->content.iePacket.pSsid->serviceSetId, 
-                                      pFrameInfo->content.iePacket.pSsid->hdr[1])!=0)
-                {   /* Do not overwrite the primary site's SSID with a different than the desired SSID*/
-                    ssidUpdated = TI_FALSE;
-                }
-                
-            }
-            else if (pFrameInfo->content.iePacket.pSsid == NULL)
-            {
-                TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "updateSiteInfo PROBE_RESP, pSsid=NULL\n");
-            }
-        }
-
-        if (ssidUpdated)
-        {
-            UPDATE_SSID(pSite, pFrameInfo);
-            UPDATE_PRIVACY(pSite, pFrameInfo);
-        }
-
-        update_apsd(pSite, pFrameInfo);
-
-
-        if(pSiteMgr->siteMgrOperationalMode == DOT11_G_MODE)
-        {
-            UPDATE_PROTECTION(pSite, pFrameInfo);
-        }
-
-        updatePreamble(pSiteMgr, pSite, pFrameInfo);
-
-        UPDATE_AGILITY(pSite, pFrameInfo);
-
-        /* Updating HT params */
-        siteMgr_UpdatHtParams ((TI_HANDLE)pSiteMgr, pSite, pFrameInfo);
-
-        updateRates(pSiteMgr, pSite, pFrameInfo);
-
-        if ((pFrameInfo->content.iePacket.pDSParamsSet != NULL)  &&
-            (pFrameInfo->content.iePacket.pDSParamsSet->currChannel!=rxChannel))
-        {
-            TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "updateSiteInfo, wrong CHANNELS:rxChannel=%d,currChannel=%d\n", rxChannel, pFrameInfo->content.iePacket.pDSParamsSet->currChannel);
-        }
-        else
-            UPDATE_CHANNEL(pSite, pFrameInfo, rxChannel);
-
-
-        UPDATE_BSS_TYPE(pSite, pFrameInfo);
-
-        UPDATE_ATIM_WINDOW(pSite, pFrameInfo);
-
-        UPDATE_PROBE_AP_TX_POWER(pSite, pFrameInfo);
-
-        /* Updating WME params */
-        updateProbeQosParams(pSiteMgr, pSite, pFrameInfo);
-
-
-        /* updating CountryIE  */
-        if ((pFrameInfo->content.iePacket.country  != NULL) && 
-			(pFrameInfo->content.iePacket.country->hdr[1] != 0))
-        {
-            /* set the country info in the regulatory domain - If a different code was detected earlier
-               the regDomain will ignore it */
-            param.paramType = REGULATORY_DOMAIN_COUNTRY_PARAM;
-            param.content.pCountry = (TCountry *)pFrameInfo->content.iePacket.country;
-            regulatoryDomain_setParam(pSiteMgr->hRegulatoryDomain,&param);
-        }
-
-        /* Updating WSC params */
-        updateWSCParams(pSiteMgr, pSite, pFrameInfo); 
-        
-        UPDATE_LOCAL_TIME_STAMP(pSiteMgr, pSite, pFrameInfo);
-
-        UPDATE_PROBE_MODULATION(pSite, pFrameInfo);
-
-        /* If the BSS type is independent, the beacon & probe modulation are equal,
-            It is important to update this field here for dynamic PBCC algorithm compatibility */
-        if (pSite->bssType == BSS_INDEPENDENT)
-            UPDATE_BEACON_MODULATION(pSite, pFrameInfo);
-
-        UPDATE_PROBE_RECV(pSite);
-
-        if (ssidUpdated)
-        {
-            dot11_RSN_t *pRsnIe = pFrameInfo->content.iePacket.pRsnIe;
-            TI_UINT8       rsnIeLen = pFrameInfo->content.iePacket.rsnIeLen;
-            UPDATE_RSN_IE(pSite, pRsnIe, rsnIeLen);
-
-        }
-
-        UPDATE_BEACON_TIMESTAMP(pSiteMgr, pSite, pFrameInfo);
-
-        break;
-
-    default:
-        TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Site Update failure, un known frame sub type %d\n\n", pFrameInfo->subType);
-        break;
-    }
-}
-
-/***********************************************************************
- *                        updatePreamble
- ***********************************************************************
-DESCRIPTION:    Called by the function 'updateSiteInfo()'
-
-INPUT:      pSiteMgr    -   site mgr handle.
-            pFrameInfo  -   Frame information after the parsing
-            pSite       -   Pointer to the site entry in the site table
-
-OUTPUT:
-
-RETURN:
-
-************************************************************************/
-static void updatePreamble(siteMgr_t *pSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo)
-{
-    pSite->currentPreambleType = ((pFrameInfo->content.iePacket.capabilities >> CAP_PREAMBLE_SHIFT) & CAP_PREAMBLE_MASK) ? PREAMBLE_SHORT : PREAMBLE_LONG;
-
-    pSite->barkerPreambleType = pFrameInfo->content.iePacket.barkerPreambleMode;
-}
-
-/***********************************************************************
- *                        updateBeaconQosParams
- ***********************************************************************
-DESCRIPTION:    Called by the function 'updateSiteInfo()'
-
-INPUT:      pSiteMgr    -   site mgr handle.
-            pFrameInfo  -   Frame information after the parsing
-            pSite       -   Pointer to the site entry in the site table
-
-OUTPUT:
-
-RETURN:
-
-************************************************************************/
-
-static void updateBeaconQosParams(siteMgr_t *pSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo)
-{
-    /* Updating WME params */
-    if (pFrameInfo->content.iePacket.WMEParams  != NULL)
-    {
-        /* Checking if this is IE includes new WME Parameters */
-        if(( ((pFrameInfo->content.iePacket.WMEParams->ACInfoField) & dot11_WME_ACINFO_MASK ) != pSite->lastWMEParameterCnt) ||
-            (!pSite->WMESupported) )
-        {
-            pSite->WMESupported = TI_TRUE;
-
-            /* Checking if this IE is information only or is a paremeters IE */
-            if(pFrameInfo->content.iePacket.WMEParams->OUISubType == dot11_WME_OUI_SUB_TYPE_PARAMS_IE)
-            {
-                if(pSite->siteType == SITE_PRIMARY)
-                {
-                    qosMngr_updateIEinfo(pSiteMgr->hQosMngr,(TI_UINT8 *)(pFrameInfo->content.iePacket.WMEParams), QOS_WME);
-                }
-                /* updating the QOS_WME paraeters into the site table. */
-                os_memoryCopy(pSiteMgr->hOs, &pSite->WMEParameters, &(pFrameInfo->content.iePacket.WMEParams->WME_ACParameteres), sizeof( dot11_ACParameters_t));
-                pSite->lastWMEParameterCnt = (pFrameInfo->content.iePacket.WMEParams->ACInfoField) & dot11_WME_ACINFO_MASK;
-                TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "$$$$$$ QOS_WME parameters were updates according to beacon, cntSeq = %d\n",pSite->lastWMEParameterCnt);
-            }
-        }
-    }else
-    {
-        pSite->WMESupported = TI_FALSE;
-        }
-
-}
-
-/***********************************************************************
- *                        updateProbeQosParams
- ***********************************************************************
-DESCRIPTION:    Called by the function 'updateSiteInfo()'
-
-INPUT:      pSiteMgr    -   site mgr handle.
-            pFrameInfo  -   Frame information after the parsing
-            pSite       -   Pointer to the site entry in the site table
-
-OUTPUT:
-
-RETURN:
-
-************************************************************************/
-static void updateProbeQosParams(siteMgr_t *pSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo)
-{
-    /* Updating QOS_WME params */
-    if (pFrameInfo->content.iePacket.WMEParams  != NULL)
-    {
-        /* Checking if this is IE includes new QOS_WME Parameters */
-        if(( ((pFrameInfo->content.iePacket.WMEParams->ACInfoField) & dot11_WME_ACINFO_MASK ) != pSite->lastWMEParameterCnt) ||
-            (!pSite->WMESupported) )
-        {
-            pSite->WMESupported = TI_TRUE;
-
-            /* Checking if this IE is information only or is a paremeters IE */
-            if(pFrameInfo->content.iePacket.WMEParams->OUISubType == dot11_WME_OUI_SUB_TYPE_PARAMS_IE)
-            {
-                if(pSite->siteType == SITE_PRIMARY)
-                {
-                    qosMngr_updateIEinfo(pSiteMgr->hQosMngr,(TI_UINT8 *)(pFrameInfo->content.iePacket.WMEParams),QOS_WME);
-                }
-                /* updating the QOS_WME paraeters into the site table. */
-                os_memoryCopy(pSiteMgr->hOs, &pSite->WMEParameters, &(pFrameInfo->content.iePacket.WMEParams->WME_ACParameteres), sizeof( dot11_ACParameters_t));
-                pSite->lastWMEParameterCnt = (pFrameInfo->content.iePacket.WMEParams->ACInfoField) & dot11_WME_ACINFO_MASK;
-                TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "$$$$$$ QOS_WME parameters were updates according to  probe response, cntSeq = %d\n",pSite->lastWMEParameterCnt);
-            }
-        }
-    }else
-    {
-        pSite->WMESupported = TI_FALSE;
-        }
-
-}
-
-/***********************************************************************
- *                        siteMgr_UpdatHtParams
- ***********************************************************************
-DESCRIPTION:    Called by the function 'updateSiteInfo()' and also from scanResultTable module!
-
-INPUT:      hSiteMgr    -   site mgr handle.
-            pSite       -   Pointer to the site entry in the site table
-            pFrameInfo  -   Frame information after the parsing
-
-OUTPUT:
-
-RETURN:
-
-************************************************************************/
-void siteMgr_UpdatHtParams (TI_HANDLE hSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo)
-{                    
-    siteMgr_t *pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-    /* Updating HT capabilites IE params */
-    if (pFrameInfo->content.iePacket.pHtCapabilities != NULL)
-    {
-	   /* updating the HT capabilities unparse format into the site table. */
-       os_memoryCopy (pSiteMgr->hOs, &pSite->tHtCapabilities, 
-                      (TI_UINT8 *)(pFrameInfo->content.iePacket.pHtCapabilities), 
-                      sizeof(Tdot11HtCapabilitiesUnparse));
-
-       TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION , "$$$$$$ HT capabilites parameters were updates.\n");
-    }
-    else
-    {
-        pSite->tHtCapabilities.tHdr[0] = TI_FALSE;
-    }
-
-    /* Updating HT Information IE params */
-	if (pFrameInfo->content.iePacket.pHtInformation != NULL)
-	{
-	   /* update in case different setting vlaue from the last one */
-       if (os_memoryCompare (pSiteMgr->hOs, 
-                             (TI_UINT8 *)&pSite->tHtInformation,
-                             (TI_UINT8 *)pFrameInfo->content.iePacket.pHtInformation, 
-                             sizeof(Tdot11HtInformationUnparse)) != 0)
-       {
-           pSite->bHtInfoUpdate = TI_TRUE;
-           /* updating the HT Information unparse pormat into the site table. */
-           os_memoryCopy (pSiteMgr->hOs, &pSite->tHtInformation, pFrameInfo->content.iePacket.pHtInformation, sizeof(Tdot11HtInformationUnparse));
-           TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION , "$$$$$$ HT Information parameters were updates.\n");
-       }
-       else
-       {
-           pSite->bHtInfoUpdate = TI_FALSE;
-       }
-    }
-	else
-    {
-		pSite->tHtInformation.tHdr[0] = TI_FALSE;
-    }
-}
-
-
-/***********************************************************************
- *                        updateWSCParams
- ***********************************************************************
-DESCRIPTION:    Called by the function 'updateSiteInfo()'
-
-INPUT:      pSiteMgr    -   site mgr handle.
-            pFrameInfo  -   Frame information after the parsing
-            pSite       -   Pointer to the site entry in the site table
-
-OUTPUT:
-
-RETURN:
-
-************************************************************************/
-static void updateWSCParams(siteMgr_t *pSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo)
-{
-   TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "updateWSCParams called (BSSID: %X-%X-%X-%X-%X-%X)\n",pSite->bssid[0], pSite->bssid[1], pSite->bssid[2], pSite->bssid[3], pSite->bssid[4], pSite->bssid[5]);
-
-	/* if the IE is not null => the WSC is on - check which method is supported */
-	if (pFrameInfo->content.iePacket.WSCParams  != NULL)
-	{
-         parseWscMethodFromIE (pSiteMgr, pFrameInfo->content.iePacket.WSCParams, &pSite->WSCSiteMode);
-
-         TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "pSite->WSCSiteMode = %d\n",pSite->WSCSiteMode);
-	}
-	else
-	{
-			pSite->WSCSiteMode = TIWLN_SIMPLE_CONFIG_OFF;
-	}
-
-}
-
-static int parseWscMethodFromIE (siteMgr_t *pSiteMgr, dot11_WSC_t *WSCParams, TIWLN_SIMPLE_CONFIG_MODE *pSelectedMethod)
-{
-   TI_UINT8 *tlvPtr,*endPtr;
-   TI_UINT16   tlvPtrType,tlvPtrLen,selectedMethod=0;
-
-   tlvPtr = (TI_UINT8*)WSCParams->WSCBeaconOrProbIE;
-   endPtr = tlvPtr + WSCParams->hdr[1] - DOT11_OUI_LEN;
-
-   do
-   {
-      os_memoryCopy (pSiteMgr->hOs, (void *)&tlvPtrType, (void *)tlvPtr, 2);
-      tlvPtrType = WLANTOHS(tlvPtrType);
-
-      /*if (tlvPtrType == DOT11_WSC_SELECTED_REGISTRAR_CONFIG_METHODS)*/
-      if (tlvPtrType == DOT11_WSC_DEVICE_PASSWORD_ID)
-      {
-         tlvPtr+=2;
-         tlvPtr+=2;
-         os_memoryCopy (pSiteMgr->hOs, (void *)&selectedMethod, (void *)tlvPtr, 2);
-         selectedMethod = WLANTOHS (selectedMethod);
-         break;
-      }
-      else
-      {
-         tlvPtr+=2;
-         os_memoryCopy (pSiteMgr->hOs, (void *)&tlvPtrLen, (void *)tlvPtr, 2);
-         tlvPtrLen = WLANTOHS (tlvPtrLen);
-         tlvPtr+=tlvPtrLen+2;
-      }
-   } while ((tlvPtr < endPtr) && (selectedMethod == 0));
-   
-   if (tlvPtr >= endPtr)
-   {
-      return TI_NOK;
-   }
-
-   if (selectedMethod == DOT11_WSC_DEVICE_PASSWORD_ID_PIN)
-      *pSelectedMethod = TIWLN_SIMPLE_CONFIG_PIN_METHOD;
-   else if (selectedMethod == DOT11_WSC_DEVICE_PASSWORD_ID_PBC)
-      *pSelectedMethod = TIWLN_SIMPLE_CONFIG_PBC_METHOD;
-   else return TI_NOK;
-
-   return TI_OK;
-}
-
-
-/***********************************************************************
- *                        updateRates
- ***********************************************************************
-DESCRIPTION:    Called by the function 'updateSiteInfo()' in order to translate the rates received
-                in the beacon or probe response to rate used by the driver. Perfoms the following:
-                    -   Check the rates validity. If rates are invalid, return
-                    -   Get the max active rate & max basic rate, if invalid, return
-                    -   Translate the max active rate and max basic rate from network rates to host rates.
-                        The max active & max basic rate are used by the driver from now on in all the processes:
-                        (selection, join, transmission, etc....)
-
-INPUT:      pSiteMgr    -   site mgr handle.
-            pFrameInfo  -   Frame information after the parsing
-            pSite       -   Pointer to the site entry in the site table
-
-OUTPUT:
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-static void updateRates(siteMgr_t *pSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo)
-{
-    TI_UINT8   maxBasicRate = 0, maxActiveRate = 0;
-    TI_UINT32  bitMapExtSupp = 0;
-    paramInfo_t param;
-    TI_UINT32   uMcsbasicRateMask, uMcsSupportedRateMask;
-
-    if (pFrameInfo->content.iePacket.pRates == NULL)
-    {
-        TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "updateRates, pRates=NULL, beacon & probeResp are: \n");
-        return;
-    }
-
-    /* Update the rate elements */
-    maxBasicRate = rate_GetMaxBasicFromStr ((TI_UINT8 *)pFrameInfo->content.iePacket.pRates->rates,pFrameInfo->content.iePacket.pRates->hdr[1], maxBasicRate);
-    maxActiveRate = rate_GetMaxActiveFromStr ((TI_UINT8 *)pFrameInfo->content.iePacket.pRates->rates,pFrameInfo->content.iePacket.pRates->hdr[1], maxActiveRate);
-
-    if(pFrameInfo->content.iePacket.pExtRates)
-    {
-        maxBasicRate = rate_GetMaxBasicFromStr ((TI_UINT8 *)pFrameInfo->content.iePacket.pExtRates->rates,pFrameInfo->content.iePacket.pExtRates->hdr[1], maxBasicRate);
-        maxActiveRate = rate_GetMaxActiveFromStr ((TI_UINT8 *)pFrameInfo->content.iePacket.pExtRates->rates,pFrameInfo->content.iePacket.pExtRates->hdr[1], maxActiveRate);
-    }
-
-
-    /*
-TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "1- maxBasicRate = 0x%X, maxActiveRate = 0x%X \n", maxBasicRate,maxActiveRate);
-	*/
-
-    if (maxActiveRate == 0)
-        maxActiveRate = maxBasicRate;
-
-    /* Now update it from network to host rates */
-    pSite->maxBasicRate = rate_NetToDrv (maxBasicRate);
-    pSite->maxActiveRate = rate_NetToDrv (maxActiveRate);
-
-    /* for now we use constat MCS rate */
-    if (pFrameInfo->content.iePacket.pHtInformation != NULL)
-    {
-        pSite->maxBasicRate = DRV_RATE_MCS_7;
-        pSite->maxActiveRate = DRV_RATE_MCS_7;
-    }
-
-    if (pSite->maxActiveRate == DRV_RATE_INVALID)
-            TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Network To Host Rate failure, no active network rate\n");
-
-    if (pSite->maxBasicRate != DRV_RATE_INVALID)
-    {
-        if (pSite->maxActiveRate != DRV_RATE_INVALID)
-        {
-            pSite->maxActiveRate = TI_MAX (pSite->maxActiveRate, pSite->maxBasicRate);
-        }
-    } else { /* in case some vendors don't specify basic rates */
-        TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_WARNING, "Network To Host Rate failure, no basic network rate");
-        pSite->maxBasicRate = pSite->maxActiveRate;
-    }
-
-    /* build rates bit map */
-    rate_NetStrToDrvBitmap (&pSite->rateMask.supportedRateMask,
-                            pFrameInfo->content.iePacket.pRates->rates,
-                            pFrameInfo->content.iePacket.pRates->hdr[1]);
-    rate_NetBasicStrToDrvBitmap (&pSite->rateMask.basicRateMask,
-                                 pFrameInfo->content.iePacket.pRates->rates,
-                                 pFrameInfo->content.iePacket.pRates->hdr[1]);
-
-    if(pFrameInfo->content.iePacket.pExtRates)
-    {
-        rate_NetStrToDrvBitmap (&bitMapExtSupp, 
-                                pFrameInfo->content.iePacket.pExtRates->rates,
-                                       pFrameInfo->content.iePacket.pExtRates->hdr[1]);
-
-        pSite->rateMask.supportedRateMask |= bitMapExtSupp;
-
-        rate_NetBasicStrToDrvBitmap (&bitMapExtSupp, 
-                                     pFrameInfo->content.iePacket.pExtRates->rates,
-                                        pFrameInfo->content.iePacket.pExtRates->hdr[1]);
-
-        pSite->rateMask.basicRateMask |= bitMapExtSupp;
-    }
-
-    
-    if (pFrameInfo->content.iePacket.pHtCapabilities != NULL)
-    {
-        /* MCS build rates bit map */
-        rate_McsNetStrToDrvBitmap (&uMcsSupportedRateMask,
-                                   (pFrameInfo->content.iePacket.pHtCapabilities->aHtCapabilitiesIe + DOT11_HT_CAPABILITIES_MCS_RATE_OFFSET));
-
-        pSite->rateMask.supportedRateMask |= uMcsSupportedRateMask;
-    }
-
-    if (pFrameInfo->content.iePacket.pHtInformation != NULL)
-    {
-        /* MCS build rates bit map */
-        rate_McsNetStrToDrvBitmap (&uMcsbasicRateMask,
-                                   (pFrameInfo->content.iePacket.pHtInformation->aHtInformationIe + DOT11_HT_INFORMATION_MCS_RATE_OFFSET));
-
-        pSite->rateMask.basicRateMask |= uMcsbasicRateMask;
-    }
-
-
-    param.paramType = CTRL_DATA_CURRENT_SUPPORTED_RATE_MASK_PARAM;
-    param.content.ctrlDataCurrentRateMask = pSite->rateMask.supportedRateMask;
-    /* clear the 22Mbps bit in case the PBCC is not allowed */
-    if(pSiteMgr->currentDataModulation != DRV_MODULATION_PBCC && pSiteMgr->currentDataModulation != DRV_MODULATION_OFDM)
-    {
-      param.content.ctrlDataCurrentRateMask &= ~DRV_RATE_MASK_22_PBCC;
-    }
-    ctrlData_setParam(pSiteMgr->hCtrlData, &param);
-}
-
-/***********************************************************************
- *                        getPrimaryBssid
- ***********************************************************************
-DESCRIPTION:    Called by the OS abstraction layer in order to get the BSSID list from the site table
-
-INPUT:      pSiteMgr    -   site mgr handle.
-
-OUTPUT:     bssidList   -   BSSID list pointer
-
-RETURN:
-
-************************************************************************/
-static TI_STATUS getPrimaryBssid(siteMgr_t *pSiteMgr, OS_802_11_BSSID_EX *primaryBssid, TI_UINT32 *pLength)
-{
-    siteEntry_t *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-    TI_UINT32                  len, firstOFDMloc = 0;
-    OS_802_11_FIXED_IEs     *pFixedIes;
-    OS_802_11_VARIABLE_IEs  *pVarIes;
-    TI_UINT32                  length;
-
-
-    if (primaryBssid==NULL)
-    {
-        /* we do not expect to get NULL value for pLength here */
-        *pLength = 0;
-        TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "getPrimaryBssid. primaryBssid ptr is NULL\n");
-        return TI_NOK;
-
-    }
-
-    if (pPrimarySite==NULL)
-    {
-        *pLength = 0;
-        TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "getPrimaryBssid, pPrimarySite is NULL \n");
-        return TI_NOK;
-
-    }
-    length = pPrimarySite->beaconLength + sizeof(OS_802_11_BSSID_EX) + sizeof(OS_802_11_FIXED_IEs);
-    if (length > *pLength)
-    {
-        TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "getPrimaryBssid, insufficient length,  required length=%d, pLength=%d \n", length, *pLength);
-        *pLength = length;
-
-        return TI_NOK;
-    }
-
-    TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "Entering getPrimaryBssid, length = %d\n", *pLength);
-
-    primaryBssid->Length = length; 
-    /* MacAddress */
-    MAC_COPY (primaryBssid->MacAddress, pPrimarySite->bssid);
-        
-    /* Capabilities */
-    primaryBssid->Capabilities = pPrimarySite->capabilities;
-
-    /* SSID */
-    os_memoryZero(pSiteMgr->hOs, primaryBssid->Ssid.Ssid, MAX_SSID_LEN);
-    if (pPrimarySite->ssid.len > MAX_SSID_LEN)
-    {
-        pPrimarySite->ssid.len = MAX_SSID_LEN;
-    }
-    os_memoryCopy (pSiteMgr->hOs, 
-                   (void *)primaryBssid->Ssid.Ssid, 
-                   (void *)pPrimarySite->ssid.str, 
-                   pPrimarySite->ssid.len);
-    primaryBssid->Ssid.SsidLength = pPrimarySite->ssid.len;
-
-    /* privacy */
-    primaryBssid->Privacy = pPrimarySite->privacy;
-
-    /* RSSI */
-    primaryBssid->Rssi = pPrimarySite->rssi;
-
-    /* NetworkTypeInUse & SupportedRates */
-    /* SupportedRates */
-    os_memoryZero(pSiteMgr->hOs, (void *)primaryBssid->SupportedRates, sizeof(OS_802_11_RATES_EX));
-
-    rate_DrvBitmapToNetStr (pPrimarySite->rateMask.supportedRateMask,
-                            pPrimarySite->rateMask.basicRateMask,
-                            (TI_UINT8 *)primaryBssid->SupportedRates,
-                            &len, 
-                            &firstOFDMloc);
-
-    /* set network type acording to band and rates */
-    if (pPrimarySite->channel <= SITE_MGR_CHANNEL_B_G_MAX)
-    {
-        if (firstOFDMloc == len)
-        {
-            primaryBssid->NetworkTypeInUse = os802_11DS;
-        } else {
-            primaryBssid->NetworkTypeInUse = os802_11OFDM24;
-        }
-    } else {
-        primaryBssid->NetworkTypeInUse = os802_11OFDM5;
-    }
-
-    /* Configuration */
-    primaryBssid->Configuration.Length = sizeof(OS_802_11_CONFIGURATION);
-    primaryBssid->Configuration.BeaconPeriod = pPrimarySite->beaconInterval;
-    primaryBssid->Configuration.ATIMWindow = pPrimarySite->atimWindow;
-    primaryBssid->Configuration.Union.channel = Chan2Freq(pPrimarySite->channel);
-
-    /* InfrastructureMode */
-    if  (pPrimarySite->bssType == BSS_INDEPENDENT)
-        primaryBssid->InfrastructureMode = os802_11IBSS;
-    else
-        primaryBssid->InfrastructureMode = os802_11Infrastructure;
-    primaryBssid->IELength = 0;
-
-    /* copy fixed IEs from site entry */
-    pFixedIes = (OS_802_11_FIXED_IEs*)&primaryBssid->IEs[primaryBssid->IELength];
-    os_memoryCopy(pSiteMgr->hOs, (void *)pFixedIes->TimeStamp, (void *)&pPrimarySite->tsfTimeStamp, TIME_STAMP_LEN);
-    pFixedIes->BeaconInterval = pPrimarySite->beaconInterval;
-    pFixedIes->Capabilities = pPrimarySite->capabilities;
-    primaryBssid->IELength += sizeof(OS_802_11_FIXED_IEs);
-    pVarIes = (OS_802_11_VARIABLE_IEs*)&primaryBssid->IEs[primaryBssid->IELength];
-
-    /* Copy all variable IEs */
-    TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "Copy all variable beaconLength=%d, IELength=%d\n", pPrimarySite->beaconLength, primaryBssid->IELength);
-    TRACE_INFO_HEX(pSiteMgr->hReport, pPrimarySite->beaconBuffer, pPrimarySite->beaconLength);
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pPrimarySite->beaconLength > MAX_BEACON_BODY_LENGTH )
-    {
-        TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_ERROR,
-              "getPrimaryBssid. pPrimarySite->beaconLength=%d exceeds the limit %d\n",
-              pPrimarySite->beaconLength, MAX_BEACON_BODY_LENGTH);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return TI_NOK;
-    }
-    os_memoryCopy(pSiteMgr->hOs, pVarIes, pPrimarySite->beaconBuffer, pPrimarySite->beaconLength);
-
-    primaryBssid->IELength += pPrimarySite->beaconLength;
-
-
-    primaryBssid->Length = sizeof(OS_802_11_BSSID_EX) + primaryBssid->IELength - 1;
-
-    TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "BSSID MAC = %x-%x-%x-%x-%x-%x\n", primaryBssid->MacAddress[0], primaryBssid->MacAddress[1], primaryBssid->MacAddress[2], primaryBssid->MacAddress[3], primaryBssid->MacAddress[4], primaryBssid->MacAddress[5]);
-
-
-    TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "primaryBssid is\n");
-    TRACE_INFO_HEX(pSiteMgr->hReport, (TI_UINT8*)primaryBssid, primaryBssid->Length);
-
-
-    TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "Exiting getBssidList, length =%d, IELength=%d \n", primaryBssid->Length, primaryBssid->IELength);
-
-    *pLength = primaryBssid->Length;
-
-    return TI_OK;
-}
-
-#ifdef REPORT_LOG
-/***********************************************************************
- *                        siteMgr_printPrimarySiteDesc
- ***********************************************************************
-DESCRIPTION:    Called by the OS abstraction layer in order to get the primary site description
-
-INPUT:      pSiteMgr            -   site mgr handle.
-            supplyExtendedInfo  - If OS_802_11_BSSID_EX structure should be used (extended info)
-                                  (Assuming that if this function is called with TI_TRUE, enough memory was allocated to hold the extended info)
-
-OUTPUT:     pPrimarySiteDesc    -   Primary site description pointer
-
-RETURN:
-
-************************************************************************/
-void siteMgr_printPrimarySiteDesc(TI_HANDLE hSiteMgr )
-{
-    siteMgr_t *pSiteMgr = (siteMgr_t*) hSiteMgr;
-
-    siteEntry_t *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-
-    /* the driver logger can't print %s
-     * TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_CONSOLE, "-- SSID  = %s \n",pPrimarySite->ssid.str); 
-     */
-    TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_CONSOLE,"-- BSSID = %02x-%02x-%02x-%02x-%02x-%02x\n",
-                    pPrimarySite->bssid[0], pPrimarySite->bssid[1], pPrimarySite->bssid[2], pPrimarySite->bssid[3], 
-                    pPrimarySite->bssid[4], pPrimarySite->bssid[5]);
-
-
-	WLAN_OS_REPORT(("-- SSID  = %s \n",pPrimarySite->ssid.str));
-	WLAN_OS_REPORT(("-- BSSID = %02x-%02x-%02x-%02x-%02x-%02x\n",
-					pPrimarySite->bssid[0], pPrimarySite->bssid[1], pPrimarySite->bssid[2], pPrimarySite->bssid[3], 
-					pPrimarySite->bssid[4], pPrimarySite->bssid[5]));
-}
-#endif
-
-/***********************************************************************
- *                        getPrimarySiteDesc
- ***********************************************************************
-DESCRIPTION:    Called by the OS abstraction layer in order to get the primary site description
-
-INPUT:      pSiteMgr            - site mgr handle.
-            supplyExtendedInfo  - If OS_802_11_BSSID_EX structure should be used (extended info)
-                                  (Assuming that if this function is called with TI_TRUE, enough memory was allocated to hold the extended info)
-
-OUTPUT:     pPrimarySiteDesc    - Primary site description pointer
-
-RETURN:
-
-************************************************************************/
-static void getPrimarySiteDesc(siteMgr_t *pSiteMgr, OS_802_11_BSSID *pPrimarySiteDesc, TI_BOOL supplyExtendedInfo)
-{
-    siteEntry_t *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-    OS_802_11_BSSID_EX *pExPrimarySiteDesc = (OS_802_11_BSSID_EX *) pPrimarySiteDesc;
-    TI_UINT32  len, firstOFDMloc = 0;
-    OS_802_11_FIXED_IEs     *pFixedIes;
-    OS_802_11_VARIABLE_IEs  *pVarIes;
-    TI_UINT8 rsnIeLength,index;
-    OS_802_11_RATES_EX  SupportedRates;
-
-
-    if (pPrimarySiteDesc == NULL)
-    {
-        return;
-    }
-    if (pPrimarySite == NULL)
-    {
-        os_memoryZero(pSiteMgr->hOs, pPrimarySiteDesc, sizeof(OS_802_11_BSSID));
-        return;
-    }
-
-    TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "getPrimarySiteDesc - enter\n");
-
-    
-    /* If an "extended" request has been made - update the length accordingly */
-   if (supplyExtendedInfo == TI_FALSE)
-    pPrimarySiteDesc->Length = sizeof(OS_802_11_BSSID);
-   else
-    pPrimarySiteDesc->Length = sizeof(OS_802_11_BSSID_EX);
-
-    /* MacAddress */
-    MAC_COPY (pPrimarySiteDesc->MacAddress, pPrimarySite->bssid);
-
-    /* Capabilities */
-    pPrimarySiteDesc->Capabilities = pPrimarySite->capabilities;
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pPrimarySite->ssid.len > MAX_SSID_LEN )
-    {
-        TRACE2( pSiteMgr->hReport, REPORT_SEVERITY_ERROR,
-               "getPrimarySiteDesc. pPrimarySite=%d exceeds the limit %d\n",
-                   pPrimarySite->ssid.len, MAX_SSID_LEN);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    /* SSID */
-    os_memoryCopy (pSiteMgr->hOs, 
-                   (void *)pPrimarySiteDesc->Ssid.Ssid, 
-                   (void *)pPrimarySite->ssid.str, 
-                   pPrimarySite->ssid.len);
-    pPrimarySiteDesc->Ssid.SsidLength = pPrimarySite->ssid.len;
-
-    /* privacy */
-    pPrimarySiteDesc->Privacy = pPrimarySite->privacy;
-
-    /* RSSI */
-
-    pPrimarySiteDesc->Rssi = pPrimarySite->rssi;
-
-    pPrimarySiteDesc->NetworkTypeInUse = os802_11DS;
-
-    pPrimarySiteDesc->Configuration.Length = sizeof(OS_802_11_CONFIGURATION);
-    pPrimarySiteDesc->Configuration.BeaconPeriod = pPrimarySite->beaconInterval;
-    pPrimarySiteDesc->Configuration.ATIMWindow = pPrimarySite->atimWindow;
-    pPrimarySiteDesc->Configuration.Union.channel = pPrimarySite->channel;
-
-    if  (pPrimarySite->bssType == BSS_INDEPENDENT)
-        pPrimarySiteDesc->InfrastructureMode = os802_11IBSS;
-    else
-        pPrimarySiteDesc->InfrastructureMode = os802_11Infrastructure;
-
-   /* SupportedRates */
-   if (supplyExtendedInfo == TI_FALSE)
-      os_memoryZero(pSiteMgr->hOs, (void *)pPrimarySiteDesc->SupportedRates, sizeof(OS_802_11_RATES));
-   else
-      os_memoryZero(pSiteMgr->hOs, (void *)pExPrimarySiteDesc->SupportedRates, sizeof(OS_802_11_RATES_EX));
-
-   rate_DrvBitmapToNetStr (pPrimarySite->rateMask.supportedRateMask,
-                           pPrimarySite->rateMask.basicRateMask,
-                           &SupportedRates[0],
-                           &len, 
-                           &firstOFDMloc);
-
-   if (supplyExtendedInfo == TI_FALSE)
-       os_memoryCopy(pSiteMgr->hOs, (void *)pPrimarySiteDesc->SupportedRates, (void *)SupportedRates, sizeof(OS_802_11_RATES));
-   else
-       os_memoryCopy(pSiteMgr->hOs, (void *)pExPrimarySiteDesc->SupportedRates, (void *)SupportedRates, sizeof(OS_802_11_RATES_EX));
-
-
-   if (supplyExtendedInfo == TI_TRUE)
-   {
-      pExPrimarySiteDesc->IELength = 0;
-
-     /* copy fixed IEs from site entry */
-     pFixedIes = (OS_802_11_FIXED_IEs*)&pExPrimarySiteDesc->IEs[pExPrimarySiteDesc->IELength];
-     os_memoryCopy(pSiteMgr->hOs, (void *)pFixedIes->TimeStamp, (void *)&pPrimarySite->tsfTimeStamp, TIME_STAMP_LEN);
-     pFixedIes->BeaconInterval = pPrimarySite->beaconInterval;
-     pFixedIes->Capabilities = pPrimarySite->capabilities;
-     pExPrimarySiteDesc->IELength += sizeof(OS_802_11_FIXED_IEs);
-
-     /* copy variable IEs */
-     /* copy SSID */
-     pVarIes = (OS_802_11_VARIABLE_IEs*)&pExPrimarySiteDesc->IEs[pExPrimarySiteDesc->IELength];
-     pVarIes->ElementID = SSID_IE_ID;
-     pVarIes->Length = pPrimarySite->ssid.len;
-     os_memoryCopy (pSiteMgr->hOs, 
-                    (void *)pVarIes->data, 
-                    (void *)pPrimarySite->ssid.str, 
-                    pPrimarySite->ssid.len);
-     pExPrimarySiteDesc->IELength += (pVarIes->Length + 2);
-
-     
-     /* copy RSN information elements */
-     rsnIeLength = 0;
-     for (index=0; index<MAX_RSN_IE && pPrimarySite->pRsnIe[index].hdr[1] > 0; index++)
-       {
-            pVarIes =  (OS_802_11_VARIABLE_IEs*)&pExPrimarySiteDesc->IEs[pExPrimarySiteDesc->IELength+rsnIeLength];
-         pVarIes->ElementID = pPrimarySite->pRsnIe[index].hdr[0];
-             pVarIes->Length = pPrimarySite->pRsnIe[index].hdr[1];
-             os_memoryCopy(pSiteMgr->hOs, (void *)pVarIes->data, (void *)pPrimarySite->pRsnIe[index].rsnIeData, pPrimarySite->pRsnIe[index].hdr[1]);
-             rsnIeLength += pPrimarySite->pRsnIe[index].hdr[1] + 2;
-            TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "RSN IE ID=%d, Length=%x\n", pVarIes->ElementID, pVarIes->Length);
-
-            TRACE_INFO_HEX(pSiteMgr->hReport, (TI_UINT8 *)pVarIes->data,pVarIes->Length);
-         }
-
-         pExPrimarySiteDesc->IELength += pPrimarySite->rsnIeLen;
-
-         pExPrimarySiteDesc->Length = sizeof(OS_802_11_BSSID_EX) + pExPrimarySiteDesc->IELength - 1;
-
-         TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "BSSID MAC = %x-%x-%x-%x-%x-%x\n", pExPrimarySiteDesc->MacAddress[0], pExPrimarySiteDesc->MacAddress[1], pExPrimarySiteDesc->MacAddress[2], pExPrimarySiteDesc->MacAddress[3], pExPrimarySiteDesc->MacAddress[4], pExPrimarySiteDesc->MacAddress[5]);
-
-         TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "pExPrimarySiteDesc length before alignment = %d\n", pExPrimarySiteDesc->Length);
-
-         /* make sure length is 4 bytes aligned */
-         if (pExPrimarySiteDesc->Length % 4)
-         {
-            pExPrimarySiteDesc->Length += (4 - (pExPrimarySiteDesc->Length % 4));
-         }
-
-         TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "pExPrimarySiteDesc length after alignment = %d\n", pExPrimarySiteDesc->Length);
-
-        }
-
-}
-
-
-/***********************************************************************
- *                        translateRateMaskToValue
- ***********************************************************************
-DESCRIPTION:    Called by the function 'siteMgr_config()' in order to translate the rate mask read
-                from registry to rate value
-
-INPUT:      pSiteMgr            -   site mgr handle.
-            rateMask            -   Rate mask
-
-OUTPUT:     The rate after the translation
-
-RETURN:
-
-************************************************************************/
-static ERate translateRateMaskToValue(siteMgr_t *pSiteMgr, TI_UINT32 rateMask)
-{
-	if (rateMask & DRV_RATE_MASK_MCS_7_OFDM)
-        return DRV_RATE_MCS_7;
-    if (rateMask & DRV_RATE_MASK_MCS_6_OFDM)
-        return DRV_RATE_MCS_6;
-    if (rateMask & DRV_RATE_MASK_MCS_5_OFDM)
-        return DRV_RATE_MCS_5;
-    if (rateMask & DRV_RATE_MASK_MCS_4_OFDM)
-        return DRV_RATE_MCS_4;
-    if (rateMask & DRV_RATE_MASK_MCS_3_OFDM)
-        return DRV_RATE_MCS_3;
-    if (rateMask & DRV_RATE_MASK_MCS_2_OFDM)
-        return DRV_RATE_MCS_2;
-    if (rateMask & DRV_RATE_MASK_MCS_1_OFDM)
-        return DRV_RATE_MCS_1;
-    if (rateMask & DRV_RATE_MASK_MCS_0_OFDM)
-        return DRV_RATE_MCS_0;
-    if (rateMask & DRV_RATE_MASK_54_OFDM)
-        return DRV_RATE_54M;
-    if (rateMask & DRV_RATE_MASK_48_OFDM)
-        return DRV_RATE_48M;
-    if (rateMask & DRV_RATE_MASK_36_OFDM)
-        return DRV_RATE_36M;
-    if (rateMask & DRV_RATE_MASK_24_OFDM)
-        return DRV_RATE_24M;
-    if (rateMask & DRV_RATE_MASK_22_PBCC)
-        return DRV_RATE_22M;
-    if (rateMask & DRV_RATE_MASK_18_OFDM)
-        return DRV_RATE_18M;
-    if (rateMask & DRV_RATE_MASK_12_OFDM)
-        return DRV_RATE_12M;
-    if (rateMask & DRV_RATE_MASK_11_CCK)
-        return DRV_RATE_11M;
-    if (rateMask & DRV_RATE_MASK_9_OFDM)
-        return DRV_RATE_9M;
-    if (rateMask & DRV_RATE_MASK_6_OFDM)
-        return DRV_RATE_6M;
-    if (rateMask & DRV_RATE_MASK_5_5_CCK)
-        return DRV_RATE_5_5M;
-    if (rateMask & DRV_RATE_MASK_2_BARKER)
-        return DRV_RATE_2M;
-    if (rateMask & DRV_RATE_MASK_1_BARKER)
-        return DRV_RATE_1M;
-
-    TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_WARNING, "Translate rate mask to value, mask is 0x%X\n", rateMask);
-    if(pSiteMgr->siteMgrOperationalMode != DOT11_A_MODE)
-        return DRV_RATE_1M;
-    else
-        return DRV_RATE_6M;
-}
-
-
-/***********************************************************************
- *                        getSupportedRateSet
- ***********************************************************************
-DESCRIPTION:    Called by the function 'siteMgr_getParam()' in order to get the supported rate set
-                Build an array of network rates based on the max active & max basic rates
-
-INPUT:      pSiteMgr            -   site mgr handle.
-
-OUTPUT:     pRatesSet           -   The array built
-
-RETURN:
-
-************************************************************************/
-static void getSupportedRateSet(siteMgr_t *pSiteMgr, TRates *pRatesSet)
-{
-    TI_UINT32 dontCareParam;
-    TI_UINT32 len = 0;
-
-    rate_DrvBitmapToNetStr (pSiteMgr->pDesiredParams->siteMgrRegstrySuppRateMask,
-                               pSiteMgr->pDesiredParams->siteMgrRegstryBasicRateMask,
-                            (TI_UINT8 *)pRatesSet->ratesString, 
-                            &len, 
-                            &dontCareParam);
-
-    pRatesSet->len = (TI_UINT8) len;
-}
-
-/***********************************************************************
- *                        setSupportedRateSet
- ***********************************************************************
-DESCRIPTION:    Called by the function 'siteMgr_setParam()' in order to set the supported rate set
-                Go over the input array and set the max active & max basic rates. (after translation from network
-                rates to host rates ofcourse)
-                If max basic rate is bigger than the mac active one, print an error.
-                If the basic or active rate are different than the ones already stored by the site manager,
-                it initiates a reconnection by calling sme_Restart
-
-INPUT:      pSiteMgr            -   site mgr handle.
-            pRatesSet           -   The rates array received
-
-OUTPUT:
-
-RETURN:     TI_OK on success
-
-************************************************************************/
-static TI_STATUS setSupportedRateSet(siteMgr_t *pSiteMgr, TRates *pRatesSet)
-{
-    TI_UINT8  i,j, drvRate;
-    ERate maxActiveRate = (ERate)0, maxBasicRate = (ERate)0;
-    TI_UINT32 suppBitMap, basicBitMap;
-    static  ERate basicRates_G[]  = {DRV_RATE_1M,DRV_RATE_2M,DRV_RATE_5_5M,DRV_RATE_11M};
-    static ERate basicRates_A[]  = {DRV_RATE_6M,DRV_RATE_12M,DRV_RATE_24M};
-    ERate* currentBasicRates;
-    TI_UINT32 currentBasicRatesLength;
-
-#ifndef NET_BASIC_MASK
-#define NET_BASIC_MASK      0x80    /* defined in common/src/utils/utils.c */
-#endif
-
-    if(pSiteMgr->siteMgrOperationalMode == DOT11_A_MODE)
-    {
-        currentBasicRates = &basicRates_A[0];
-        currentBasicRatesLength = sizeof(basicRates_A) / sizeof(basicRates_A[0]);
-    }
-    else
-    {
-        currentBasicRates = &basicRates_G[0];
-        currentBasicRatesLength = sizeof(basicRates_G) / sizeof(basicRates_G[0]);
-    }
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pRatesSet->len > DOT11_MAX_SUPPORTED_RATES )
-    {
-        TRACE2( pSiteMgr->hReport, REPORT_SEVERITY_ERROR,
-                "setSupportedRateSet. pRatesSet->len=%d exceeds the limit %d\n",
-                pRatesSet->len, DOT11_MAX_SUPPORTED_RATES);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        pRatesSet->len = DOT11_MAX_SUPPORTED_RATES;
-    }
-
-    /* Basic rates must be supported. If one of 1M,2M,5.5M,11M is not supported fail.*/
-    for (j = 0; j < currentBasicRatesLength; j++) 
-    {
-        for (i = 0; i < pRatesSet->len; i++)
-        {
-            drvRate = rate_NetToDrv (pRatesSet->ratesString[i]);
-            if ((drvRate & ( NET_BASIC_MASK-1)) == currentBasicRates[j])
-                break;
-        }
-        /* not all the basic rates are supported! Failure*/
-        if (i == pRatesSet->len) 
-        {
-            TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Rates set must contain the basic set! Failing\n");
-            return PARAM_VALUE_NOT_VALID;
-        }
-    }
-    
-    for (i = 0; i < pRatesSet->len; i++)
-    {
-        drvRate = rate_NetToDrv (pRatesSet->ratesString[i]);
-        if(pSiteMgr->siteMgrOperationalMode == DOT11_A_MODE)
-        {
-            if(drvRate < DRV_RATE_6M)
-            {
-                TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Notice, the driver configured in 11a mode, but CCK rate appears\n");
-                return PARAM_VALUE_NOT_VALID;
-            }
-        }
-        else if(pSiteMgr->siteMgrOperationalMode == DOT11_B_MODE)
-        {
-            if(drvRate >= DRV_RATE_6M)
-            {
-                TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Notice, the driver configured in 11b mode, but OFDM rate appears\n");
-                return PARAM_VALUE_NOT_VALID;
-            }
-        }
-        maxActiveRate = TI_MAX ((ERate)drvRate, maxActiveRate);
-    }
-
-    for (i = 0; i < pRatesSet->len; i++)
-    {
-        if (NET_BASIC_RATE(pRatesSet->ratesString[i]))
-            maxBasicRate = TI_MAX (rate_NetToDrv (pRatesSet->ratesString[i]), maxBasicRate);
-    }
-
-    /* If the basic rate is bigger than the supported one, we print an error */
-    if (pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxBasic > pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxActive)
-    {
-        TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "Notice, the rates configuration is invalid, basic rate is bigger than supported, Max Basic: %d Max Supported: %d\n", pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxBasic, pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxActive);
-        return PARAM_VALUE_NOT_VALID;
-    }
-
-    pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxActive = maxActiveRate;
-    pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxBasic = maxBasicRate;
-
-    /* configure desired modulation */
-    if(maxActiveRate == DRV_RATE_22M)
-        pSiteMgr->pDesiredParams->siteMgrDesiredModulationType = DRV_MODULATION_PBCC;
-    else if(maxActiveRate < DRV_RATE_22M)
-        pSiteMgr->pDesiredParams->siteMgrDesiredModulationType = DRV_MODULATION_CCK;
-    else
-        pSiteMgr->pDesiredParams->siteMgrDesiredModulationType = DRV_MODULATION_OFDM;
-
-
-    rate_NetStrToDrvBitmap (&suppBitMap, pRatesSet->ratesString, pRatesSet->len);
-    rate_NetBasicStrToDrvBitmap (&basicBitMap, pRatesSet->ratesString, pRatesSet->len);
-
-    if((pSiteMgr->pDesiredParams->siteMgrRegstryBasicRateMask != basicBitMap) ||
-       (pSiteMgr->pDesiredParams->siteMgrRegstrySuppRateMask != suppBitMap))
-    {
-        pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask = suppBitMap;
-        pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask = basicBitMap;
-        pSiteMgr->pDesiredParams->siteMgrRegstryBasicRateMask = basicBitMap;
-        pSiteMgr->pDesiredParams->siteMgrRegstrySuppRateMask = suppBitMap;
-        /* Initialize Mutual Rates Matching */
-        pSiteMgr->pDesiredParams->siteMgrMatchedBasicRateMask = pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask;
-        pSiteMgr->pDesiredParams->siteMgrMatchedSuppRateMask = pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask;
-
-        sme_Restart (pSiteMgr->hSmeSm);
-    }
-
-    return TI_OK;
-}
-
-/***********************************************************************
- *                        pbccAlgorithm
- ***********************************************************************
-DESCRIPTION:    Called by the following functions:
-                -   systemConfig(), in the system configuration phase after the selection
-                -   siteMgr_updateSite(), in a case of a primary site update & if a PBCC algorithm
-                    is needed to be performed
-                Performs the PBCC algorithm
-
-
-INPUT:      hSiteMgr            -   site mgr handle.
-
-OUTPUT:
-
-RETURN:     TI_OK on always
-
-************************************************************************/
-TI_STATUS pbccAlgorithm(TI_HANDLE hSiteMgr)
-{
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    paramInfo_t param;
-    siteEntry_t *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-    TI_UINT32   supportedRateMask ;
-
-
-    if (pPrimarySite->channel == SPECIAL_BG_CHANNEL)
-        supportedRateMask = (rate_GetDrvBitmapForDefaultSupporteSet() & pSiteMgr->pDesiredParams->siteMgrMatchedSuppRateMask) ;
-    else
-        supportedRateMask = pSiteMgr->pDesiredParams->siteMgrMatchedSuppRateMask ;
-
-    param.paramType = CTRL_DATA_CURRENT_SUPPORTED_RATE_MASK_PARAM;
-    param.content.ctrlDataCurrentRateMask = supportedRateMask;
-    /* clear the 22Mbps bit in case the PBCC is not allowed */
-    if(pSiteMgr->currentDataModulation != DRV_MODULATION_PBCC &&
-       pSiteMgr->currentDataModulation != DRV_MODULATION_OFDM)
-            param.content.ctrlDataCurrentRateMask &= ~DRV_RATE_MASK_22_PBCC;
-    ctrlData_setParam(pSiteMgr->hCtrlData, &param);
-
-    param.paramType = CTRL_DATA_RATE_CONTROL_ENABLE_PARAM;
-    ctrlData_setParam(pSiteMgr->hCtrlData, &param);
-
-    return TI_OK;
-}
-
-
-/***********************************************************************
- *                        siteMgr_assocReport
- ***********************************************************************
-DESCRIPTION:    Called by the following functions:
-                -   assoc_recv()
-
-
-INPUT:      hSiteMgr            -   siteMgr handle.
-            capabilities        -   assoc rsp capabilities field.
-			bCiscoAP			-   whether we are connected to a Cisco AP. Used for Tx Power Control adjustment
-OUTPUT:
-
-RETURN:     TI_OK on always
-
-************************************************************************/
-TI_STATUS siteMgr_assocReport(TI_HANDLE hSiteMgr, TI_UINT16 capabilities, TI_BOOL bCiscoAP)
-{
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    siteEntry_t *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-
-    /* handle AP's preamble capability */
-    pPrimarySite->preambleAssRspCap = ((capabilities >> CAP_PREAMBLE_SHIFT) & CAP_PREAMBLE_MASK)  ? PREAMBLE_SHORT : PREAMBLE_LONG;
-
-	/*
-	 * Enable/Disable the Tx Power Control adjustment.
-	 * When we are connected to Cisco AP - TX Power Control adjustment is disabled.
-	 */
-	pSiteMgr->siteMgrTxPowerEnabled = ( !bCiscoAP ) && ( pSiteMgr->pDesiredParams->TxPowerControlOn );
-
-TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Tx Power Control adjustment is %d\n", pSiteMgr->siteMgrTxPowerEnabled);
-
-    return TI_OK;
-}
-
-/***********************************************************************
- *                        siteMgr_setWMEParamsSite
- ***********************************************************************
-DESCRIPTION:    Set the QOS_WME params as received from the associated
-                AP. The function is called by the QoS Mgr
-                after receving association response succefully.
-
-INPUT:      hSiteMgr    -   SiteMgr handle.
-
-OUTPUT:     pDot11_WME_PARAM_t - pointer to the QOS_WME Param IE.
-
-RETURN:     TI_OK on always
-
-************************************************************************/
-TI_STATUS siteMgr_setWMEParamsSite(TI_HANDLE hSiteMgr,dot11_WME_PARAM_t *pDot11_WME_PARAM)
-{
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    siteEntry_t *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-
-    if( pPrimarySite == NULL )
-    {
-        return TI_OK;
-    }
-
-    if( pDot11_WME_PARAM == NULL )
-    {
-        pPrimarySite->WMESupported = TI_FALSE;
-        return TI_OK;
-    }
-
-    /* Update the QOS_WME params */
-    os_memoryCopy(pSiteMgr->hOs,&pPrimarySite->WMEParameters,&pDot11_WME_PARAM->WME_ACParameteres,sizeof(dot11_ACParameters_t));
-    pPrimarySite->lastWMEParameterCnt = (pDot11_WME_PARAM->ACInfoField & dot11_WME_ACINFO_MASK);
-    TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "$$$$$$ QOS_WME parameters were updates according to association response, cntSeq = %d\n",pPrimarySite->lastWMEParameterCnt);
-
-    return TI_OK;
-}
-
-
-/***********************************************************************
- *                        siteMgr_getWMEParamsSite
- ***********************************************************************
-DESCRIPTION:    Get the QOS_WME params as recieved from the associated
-                AP. The function is called by the Qos Mgr in order
-                to set all QOS_WME parameters to the core and Hal
-
-INPUT:      hSiteMgr    -   SiteMgr handle.
-
-OUTPUT:     pWME_ACParameters_t - pointer to the QOS_WME Param.
-
-RETURN:     TI_OK if there are valid QOS_WME parameters , TI_NOK otherwise.
-
-************************************************************************/
-TI_STATUS siteMgr_getWMEParamsSite(TI_HANDLE hSiteMgr,dot11_ACParameters_t **pWME_ACParameters_t)
-{
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    siteEntry_t *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-
-    if(pPrimarySite->WMESupported == TI_TRUE)
-    {
-        *pWME_ACParameters_t = &pPrimarySite->WMEParameters;
-        return TI_OK;
-    }
-    else
-    {
-        *pWME_ACParameters_t = NULL;
-        return TI_NOK;
-    }
-
-}
-
-/***********************************************************************
- *                        siteMgr_setCurrentTable
- ***********************************************************************
-DESCRIPTION:
-
-INPUT:      hSiteMgr    -   SiteMgr handle.
-
-OUTPUT:
-
-RETURN:
-
-************************************************************************/
-void siteMgr_setCurrentTable(TI_HANDLE hSiteMgr, ERadioBand radioBand)
-{
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-    if(radioBand == RADIO_BAND_2_4_GHZ)
-        pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables;
-    else
-        pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = (siteTablesParams_t *)&pSiteMgr->pSitesMgmtParams->dot11A_sitesTables;
-}
-
-/***********************************************************************
- *                        siteMgr_updateRates
- ***********************************************************************
-DESCRIPTION:
-
-INPUT:      hSiteMgr    -   SiteMgr handle.
-
-OUTPUT:
-
-RETURN:
-
-************************************************************************/
-
-void siteMgr_updateRates(TI_HANDLE hSiteMgr, TI_BOOL dot11a, TI_BOOL updateToOS)
-{
-    TI_UINT32  statusData;
-    TI_UINT32  localSuppRateMask, localBasicRateMask;
-
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-    localSuppRateMask = pSiteMgr->pDesiredParams->siteMgrRegstrySuppRateMask;
-    localBasicRateMask = pSiteMgr->pDesiredParams->siteMgrRegstryBasicRateMask;
-
-
-    rate_ValidateVsBand (&localSuppRateMask, &localBasicRateMask, dot11a);
-
-    pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask = localBasicRateMask;
-    pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask = localSuppRateMask;
-
-     /* Initialize Mutual Rates Matching */
-    pSiteMgr->pDesiredParams->siteMgrMatchedBasicRateMask = pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask;
-    pSiteMgr->pDesiredParams->siteMgrMatchedSuppRateMask = pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask;
-
-    /*If we are in dual mode and we are only scanning A band we don't have to set the siteMgrCurrentDesiredTxRate.*/
-    if (updateToOS == TI_TRUE)
-    {
-        TI_UINT32 uSupportedRates = pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask;
-        ERate eMaxRate = rate_GetMaxFromDrvBitmap (uSupportedRates);
-
-        /* Make sure that the basic rate set is included in the supported rate set */
-        pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask &= uSupportedRates;
-
-        /* Set desired modulation */
-        pSiteMgr->pDesiredParams->siteMgrDesiredModulationType = 
-            (eMaxRate < DRV_RATE_22M) ? DRV_MODULATION_CCK : DRV_MODULATION_OFDM;
-    }
-    pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxBasic = translateRateMaskToValue(pSiteMgr, pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask);
-    pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxActive = translateRateMaskToValue(pSiteMgr, pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask);
-
-    if (updateToOS == TI_TRUE) 
-	{
-        siteEntry_t  *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-        TI_UINT32 commonSupportedRateMask;
-        ERate maxRate;
-
-        commonSupportedRateMask = pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask;
-        if (pPrimarySite)
-        {
-            commonSupportedRateMask &= pPrimarySite->rateMask.supportedRateMask;
-        }
-
-        maxRate = translateRateMaskToValue(pSiteMgr, commonSupportedRateMask);
-
-        /* report the desired rate to OS */
-        statusData = rate_DrvToNet(maxRate);
-        EvHandlerSendEvent(pSiteMgr->hEvHandler, IPC_EVENT_LINK_SPEED, (TI_UINT8 *)&statusData,sizeof(TI_UINT32));
-    }
-}
-
-
-/** 
- * \fn     siteMgr_SelectRateMatch
- * \brief  Checks if the rates settings match those of a site
- * 
- * Checks if the rates settings match those of a site
- * 
- * \param  hSiteMgr - handle to the siteMgr object
- * \param  pCurrentSite - the site to check
- * \return TI_TRUE if site matches rates settings, TI FALSE if it doesn't
- * \sa     sme_Select
- */ 
-TI_BOOL siteMgr_SelectRateMatch (TI_HANDLE hSiteMgr, TSiteEntry *pCurrentSite)
-{
-    siteMgr_t *pSiteMgr = (siteMgr_t *)hSiteMgr;
-	TI_UINT32 StaTotalRates;
-	TI_UINT32 SiteTotalRates;
-
-	/* If the basic or active rate are invalid (0), return NO_MATCH. */
-	if ((pCurrentSite->maxBasicRate == DRV_RATE_INVALID) || (pCurrentSite->maxActiveRate == DRV_RATE_INVALID)) 
-	{
-        TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "siteMgr_SelectRateMatch: basic or active rate are invalid. maxBasic=%d,maxActive=%d \n", pCurrentSite->maxBasicRate ,pCurrentSite->maxActiveRate);
-		return TI_FALSE;
-	}
-	
-	if (DRV_RATE_MAX < pCurrentSite->maxBasicRate)
-	{
-        TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "siteMgr_SelectRateMatch: basic rate is too high. maxBasic=%d\n", pCurrentSite->maxBasicRate);
-		return TI_FALSE;
-	}
-
-	if(pCurrentSite->channel <= SITE_MGR_CHANNEL_B_G_MAX)
-		siteMgr_updateRates(pSiteMgr, TI_FALSE, TI_TRUE);
-	else
-		siteMgr_updateRates(pSiteMgr, TI_TRUE, TI_TRUE);
-
-	StaTotalRates = pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask |
-				    pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask;
-
-	SiteTotalRates = pCurrentSite->rateMask.basicRateMask | pCurrentSite->rateMask.supportedRateMask;
-    
-    if ((StaTotalRates & pCurrentSite->rateMask.basicRateMask) != pCurrentSite->rateMask.basicRateMask)
-    {
-        TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "siteMgr_SelectRateMatch: Basic or Supported Rates Doesn't Match \n");
-        return TI_FALSE;
-
-    }
-
-    return TI_TRUE;
-}
-
-/***********************************************************************
- *                        siteMgr_bandParamsConfig
- ***********************************************************************
-DESCRIPTION:
-
-INPUT:      hSiteMgr    -   SiteMgr handle.
-
-OUTPUT:
-
-RETURN:
-
-************************************************************************/
-void siteMgr_bandParamsConfig(TI_HANDLE hSiteMgr,  TI_BOOL updateToOS)
-{
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-    /* reconfig rates */
-    if(pSiteMgr->siteMgrOperationalMode == DOT11_A_MODE)
-        siteMgr_updateRates(hSiteMgr, TI_TRUE, updateToOS);
-    else
-        siteMgr_updateRates(hSiteMgr, TI_FALSE, updateToOS);
-
-    /* go to B_ONLY Mode only if WiFI bit is Set*/
-    if (pSiteMgr->pDesiredParams->siteMgrWiFiAdhoc == TI_TRUE)
-    {   /* Configuration For AdHoc when using external configuration */
-        if (pSiteMgr->pDesiredParams->siteMgrExternalConfiguration == TI_FALSE)
-        {
-            siteMgr_externalConfigurationParametersSet(hSiteMgr);
-        }
-    }
-
-}
-
-void siteMgr_ConfigRate(TI_HANDLE hSiteMgr)
-{
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    TI_BOOL      dot11a, b11nEnable;
-    EDot11Mode   OperationMode;
-
-    OperationMode = pSiteMgr->siteMgrOperationalMode;
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( OperationMode > DOT11_MAX_MODE -1 )
-    {
-        TRACE2( pSiteMgr->hReport, REPORT_SEVERITY_ERROR,
-                "siteMgr_ConfigRate. OperationMode=%d exceeds the limit %d\n",
-                OperationMode, DOT11_MAX_MODE -1);
-                handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return;
-    }
-    /* reconfig rates */
-    if (OperationMode == DOT11_A_MODE)
-        dot11a = TI_TRUE;
-    else
-        dot11a = TI_FALSE;
-
-    /*
-    ** Specific change to ch 14, that channel is only used in Japan, and is limited
-    ** to rates 1,2,5.5,11
-    */
-    if(pSiteMgr->pDesiredParams->siteMgrDesiredChannel == SPECIAL_BG_CHANNEL)
-    {
-        if(pSiteMgr->pDesiredParams->siteMgrRegstryBasicRate[OperationMode] > BASIC_RATE_SET_1_2_5_5_11)
-            pSiteMgr->pDesiredParams->siteMgrRegstryBasicRate[OperationMode] = BASIC_RATE_SET_1_2_5_5_11;
-
-
-        if(pSiteMgr->pDesiredParams->siteMgrRegstrySuppRate[OperationMode] > SUPPORTED_RATE_SET_1_2_5_5_11)
-            pSiteMgr->pDesiredParams->siteMgrRegstrySuppRate[OperationMode] = SUPPORTED_RATE_SET_1_2_5_5_11;
-    }
-
-    /* use HT MCS rates */
-    if (pSiteMgr->pDesiredParams->siteMgrDesiredBSSType == BSS_INFRASTRUCTURE)
-	{
-		b11nEnable = TI_TRUE;
-		OperationMode = DOT11_N_MODE;
-	}
-	else
-	{
-		b11nEnable = TI_FALSE;
-	}
-    
-
-    pSiteMgr->pDesiredParams->siteMgrRegstryBasicRateMask =
-        rate_BasicToDrvBitmap ((EBasicRateSet)(pSiteMgr->pDesiredParams->siteMgrRegstryBasicRate[OperationMode]), dot11a);
-
-    pSiteMgr->pDesiredParams->siteMgrRegstrySuppRateMask =
-        rate_SupportedToDrvBitmap ((EBasicRateSet)(pSiteMgr->pDesiredParams->siteMgrRegstrySuppRate[OperationMode]), dot11a);
-
-    siteMgr_updateRates(pSiteMgr, dot11a, TI_TRUE);
-
-        /* go to B_ONLY Mode only if WiFI bit is Set*/
-    if (pSiteMgr->pDesiredParams->siteMgrWiFiAdhoc == TI_TRUE)
-    {   /* Configuration For AdHoc when using external configuration */
-        if (pSiteMgr->pDesiredParams->siteMgrExternalConfiguration == TI_FALSE)
-        {
-            siteMgr_externalConfigurationParametersSet(hSiteMgr);
-        }
-    }
-}
-
-static void siteMgr_externalConfigurationParametersSet(TI_HANDLE hSiteMgr)
-{
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-    /* Overwrite the parameters for AdHoc with External Configuration */
-
-    if( ((pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_A_MODE) ||
-        (pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE)) &&
-        !pSiteMgr->pDesiredParams->siteMgrWiFiAdhoc && pSiteMgr->pDesiredParams->siteMgrDesiredBSSType == BSS_INDEPENDENT)
-        return;
-
-
-    if(pSiteMgr->pDesiredParams->siteMgrDesiredBSSType == BSS_INDEPENDENT)
-    {
-        pSiteMgr->siteMgrOperationalMode = DOT11_B_MODE;
-        pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask = rate_BasicToDrvBitmap (BASIC_RATE_SET_1_2_5_5_11, TI_FALSE);
-        pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask = rate_SupportedToDrvBitmap (SUPPORTED_RATE_SET_1_2_5_5_11, TI_FALSE);
-        pSiteMgr->pDesiredParams->siteMgrRegstryBasicRateMask = rate_BasicToDrvBitmap (BASIC_RATE_SET_1_2_5_5_11, TI_FALSE);
-        pSiteMgr->pDesiredParams->siteMgrRegstrySuppRateMask = rate_SupportedToDrvBitmap (SUPPORTED_RATE_SET_1_2_5_5_11, TI_FALSE);
-        pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime = PHY_SLOT_TIME_LONG;
-
-        TWD_SetRadioBand(pSiteMgr->hTWD, RADIO_BAND_2_4_GHZ);
-        TWD_CfgSlotTime (pSiteMgr->hTWD, PHY_SLOT_TIME_LONG);
-
-    }
-    else
-    {
-        if(pSiteMgr->radioBand == RADIO_BAND_2_4_GHZ)
-            pSiteMgr->siteMgrOperationalMode = DOT11_G_MODE;
-        else
-            pSiteMgr->siteMgrOperationalMode = DOT11_A_MODE;
-        pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask = rate_BasicToDrvBitmap (BASIC_RATE_SET_1_2_5_5_11, TI_FALSE);
-        pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask = rate_SupportedToDrvBitmap (SUPPORTED_RATE_SET_ALL, TI_FALSE);
-        pSiteMgr->pDesiredParams->siteMgrRegstryBasicRateMask = rate_BasicToDrvBitmap (BASIC_RATE_SET_1_2_5_5_11, TI_FALSE);
-        pSiteMgr->pDesiredParams->siteMgrRegstrySuppRateMask = rate_SupportedToDrvBitmap (SUPPORTED_RATE_SET_ALL, TI_FALSE);
-
-        pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime = PHY_SLOT_TIME_LONG;
-
-        TWD_CfgSlotTime (pSiteMgr->hTWD, PHY_SLOT_TIME_LONG);
-    }
-}
-
-
-TI_STATUS siteMgr_saveProbeRespBuffer(TI_HANDLE hSiteMgr, TMacAddr  *bssid, TI_UINT8 *pProbeRespBuffer, TI_UINT32 length)
-{
-    siteEntry_t *pSite;
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-    if (pSiteMgr == NULL)
-    {
-        return TI_NOK;
-    }
-
-    TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION , "siteMgr_saveProbeRespBuffer called\n");
-
-    if (pProbeRespBuffer==NULL || length>=MAX_BEACON_BODY_LENGTH)
-    {
-        return TI_NOK;
-    }
-
-    pSite = findSiteEntry(pSiteMgr, bssid);
-    if (pSite==NULL)
-    {
-        return TI_NOK;
-    }
-
-    os_memoryCopy(pSiteMgr->hOs, pSite->probeRespBuffer, pProbeRespBuffer, length);
-    pSite->probeRespLength = length;
-
-    TRACE17(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "siteMgr_saveProbeRespBuffer: BSSID=%x-%x-%x-%x-%x-%x, TSF=%x-%x-%x-%x-%x-%x-%x-%x, \n ts=%d, rssi=%d\n channel = %d \n", pSite->bssid[0], pSite->bssid[1], pSite->bssid[2], pSite->bssid[3], pSite->bssid[4], pSite->bssid[5], pSite->tsfTimeStamp[0], pSite->tsfTimeStamp[1], pSite->tsfTimeStamp[2], pSite->tsfTimeStamp[3], pSite->tsfTimeStamp[4], pSite->tsfTimeStamp[5], pSite->tsfTimeStamp[6], pSite->tsfTimeStamp[7], os_timeStampMs(pSiteMgr->hOs), pSite->rssi, pSite->channel);
-
-    return TI_OK;
-}
-
-TI_STATUS siteMgr_saveBeaconBuffer(TI_HANDLE hSiteMgr, TMacAddr *bssid, TI_UINT8 *pBeaconBuffer, TI_UINT32 length)
-{
-    siteEntry_t *pSite;
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-    if (pSiteMgr==NULL)
-    {
-        return TI_NOK;
-    }
-
-	TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION , "siteMgr_saveBeaconBuffer called\n");
-
-    if (pBeaconBuffer==NULL || length>=MAX_BEACON_BODY_LENGTH)
-    {
-        return TI_NOK;
-    }
-
-    pSite = findSiteEntry(pSiteMgr, bssid);
-    if (pSite==NULL)
-    {
-        return TI_NOK;
-    }
-
-    os_memoryCopy(pSiteMgr->hOs, pSite->beaconBuffer, pBeaconBuffer, length);
-    pSite->beaconLength = length;
-
-    /*if (pSiteMgr->pSitesMgmtParams->pPrimarySite!=NULL)
-    {
-        if (!os_memoryCompare(pSiteMgr->hOs, pSiteMgr->pSitesMgmtParams->pPrimarySite->ssid.ssidString, pSite->ssid.ssidString, pSiteMgr->pSitesMgmtParams->pPrimarySite->ssid.len))
-        {
-            TRACE16(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "siteMgr_saveBeaconBuffer: BSSID=%x-%x-%x-%x-%x-%x, TSF=%x-%x-%x-%x-%x-%x-%x-%x, \n ts=%d, rssi=%d \n", pSite->bssid[0], pSite->bssid[1], pSite->bssid[2], pSite->bssid[3], pSite->bssid[4], pSite->bssid[5], pSite->tsfTimeStamp[0], pSite->tsfTimeStamp[1], pSite->tsfTimeStamp[2], pSite->tsfTimeStamp[3], pSite->tsfTimeStamp[4], pSite->tsfTimeStamp[5], pSite->tsfTimeStamp[6], pSite->tsfTimeStamp[7], pSite->osTimeStamp, pSite->rssi);
-        }
-    }*/
-    if ( MAX_SSID_LEN > pSite->ssid.len )
-    {
-        pSite->ssid.str[pSite->ssid.len] = '\0';
-    }
-
-    /*
-TRACE9(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "siteMgr_saveBeaconBuffer: BSSID=%x-%x-%x-%x-%x-%x, SSID=, \n ts=%d, rssi=%d\n channel = %d \n", pSite->bssid[0], pSite->bssid[1], pSite->bssid[2], pSite->bssid[3], pSite->bssid[4], pSite->bssid[5], pSite->osTimeStamp, pSite->rssi, pSite->channel);
-
-    */
-    return TI_OK;
-}
-
-void siteMgr_IsERP_Needed(TI_HANDLE hSiteMgr,TI_BOOL *useProtection,TI_BOOL *NonErpPresent,TI_BOOL *barkerPreambleType)
-{
-    siteMgr_t       *pSiteMgr = (siteMgr_t*)hSiteMgr;
-    paramInfo_t     param;
-    siteEntry_t     *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-
-    *useProtection = TI_FALSE;
-    *NonErpPresent = TI_FALSE;
-    *barkerPreambleType = TI_FALSE;
-
-    param.paramType = CTRL_DATA_CURRENT_IBSS_PROTECTION_PARAM;
-    ctrlData_getParam(pSiteMgr->hCtrlData, &param);
-
-    /* On WifiAdhoc (for band B) The STa should not include in the beacon an ERP IE (see WiFi B  clause 2.2, 5.8.2) */
-    if (pSiteMgr->pDesiredParams->siteMgrWiFiAdhoc == TI_TRUE)
-    {
-        /* Return the default => ERP is not needed */
-        return;
-    }
-
-    /* check if STA is connected */
-    if (pPrimarySite)
-    {
-        if(pSiteMgr->siteMgrOperationalMode == DOT11_G_MODE || pSiteMgr->siteMgrOperationalMode == DOT11_DUAL_MODE)
-        {
-            if(param.content.ctrlDataIbssProtecionType == ERP_PROTECTION_STANDARD)
-            {
-                if(pPrimarySite->siteType == SITE_SELF)
-                {
-                    if(pPrimarySite->channel <= SITE_MGR_CHANNEL_B_G_MAX) /* if channel B&G*/
-                    {
-                            *useProtection = TI_TRUE;
-                            *NonErpPresent = TI_TRUE;
-                            *barkerPreambleType = TI_TRUE;
-                    }
-                }
-                else if(pPrimarySite->bssType == BSS_INDEPENDENT)
-                {
-                    if(pPrimarySite->useProtection == TI_TRUE)
-                        *useProtection = TI_TRUE;
-                    if(pPrimarySite->NonErpPresent == TI_TRUE)
-                        *NonErpPresent = TI_TRUE;
-                    if(pPrimarySite->barkerPreambleType == PREAMBLE_SHORT)
-                        *barkerPreambleType = TI_TRUE;
-                }
-            }
-        }
-    }
-}
-
-/** 
- * \fn     siteMgr_CopyToPrimarySite()
- * \brief  Responsible to copy candidate AP from SME table to site Mgr table 
- *
- * \note   
- * \param  hSiteMgr - SiteMgr handle.
- * \param  pCandidate - candidate AP from SME table.
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     
- */ 
-TI_STATUS siteMgr_CopyToPrimarySite (TI_HANDLE hSiteMgr, TSiteEntry *pCandidate)
-{
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    bssEntry_t  newAP;
-
-    MAC_COPY (newAP.BSSID, pCandidate->bssid);
-    newAP.band = pCandidate->eBand;
-    newAP.RSSI = pCandidate->rssi;
-    newAP.rxRate = pCandidate->rxRate;
-    newAP.channel = pCandidate->channel;
-    os_memoryCopy(pSiteMgr->hOs, (void *)&newAP.lastRxTSF, (void *)pCandidate->tsfTimeStamp , TIME_STAMP_LEN);
-    newAP.beaconInterval = pCandidate->beaconInterval;
-    newAP.capabilities = pCandidate->capabilities;
-    newAP.pBuffer = NULL;
-    /* get frame type */
-    if (TI_TRUE == pCandidate->probeRecv)
-    {
-        newAP.resultType = SCAN_RFT_PROBE_RESPONSE;
-        newAP.pBuffer = (TI_UINT8 *)(pCandidate->probeRespBuffer);
-        /* length of all IEs of beacon (or probe response) buffer */
-        newAP.bufferLength = pCandidate->probeRespLength;
-    }
-    else
-    {
-        if (TI_TRUE == pCandidate->beaconRecv)
-        {
-            newAP.resultType = SCAN_RFT_BEACON;
-            newAP.pBuffer = (TI_UINT8 *)(pCandidate->beaconBuffer);
-            /* length of all IEs of beacon (or probe response) buffer */
-            newAP.bufferLength = pCandidate->beaconLength;
-
-        }
-        else
-        {
-            TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "siteMgr_CopyToPrimarySite: try to update primary site without updated prob_res\beacon\n\n");
-            return TI_NOK;
-        }
-    }
-
-    if (newAP.pBuffer == NULL)
-    {
-        TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "siteMgr_CopyToPrimarySite: pBufferBody is NULL !\n");
-        return TI_NOK;
-    }
-
-    return siteMgr_overwritePrimarySite (hSiteMgr, &newAP, TI_FALSE);
-}
-
-
-/***********************************************************************
- *                        siteMgr_disSelectSite									
- ***********************************************************************
-DESCRIPTION: Called by the SME SM in order to dis select the primary site.
-			The function set the primary site pointer to NULL and set its type to type regular	
-                                                                                                   
-INPUT:      hSiteMgr	-	site mgr handle.
-
-OUTPUT:		
-
-RETURN:     TI_OK 
-
-************************************************************************/
-TI_STATUS siteMgr_disSelectSite(TI_HANDLE	hSiteMgr)
-{
-	siteMgr_t	*pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-	/* This protection is because in the case that the BSS was LOST the primary site was removed already. */
-	if (pSiteMgr->pSitesMgmtParams->pPrimarySite != NULL)
-	{
-        TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "siteMgr_disSelectSite REMOVE Primary ssid=, bssid= 0x%x-0x%x-0x%x-0x%x-0x%x-0x%x\n\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->bssid[0], pSiteMgr->pSitesMgmtParams->pPrimarySite->bssid[1], pSiteMgr->pSitesMgmtParams->pPrimarySite->bssid[2], pSiteMgr->pSitesMgmtParams->pPrimarySite->bssid[3], pSiteMgr->pSitesMgmtParams->pPrimarySite->bssid[4], pSiteMgr->pSitesMgmtParams->pPrimarySite->bssid[5] );
-		
-        pSiteMgr->pSitesMgmtParams->pPrimarySite->siteType = SITE_REGULAR;
-		pSiteMgr->pSitesMgmtParams->pPrevPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-		pSiteMgr->pSitesMgmtParams->pPrimarySite = NULL;
-	}
-
-	return TI_OK;
-}
-
-
-/**
-*
-* siteMgr_overwritePrimarySite
-*
-* \b Description: 
-*
-* This function sets new AP as a primary site and, if requested, stores previous
-* AP's info; called during roaming
-*
-* \b ARGS:
-*
-*  I   - pCurrBSS - Current BSS handle \n
-*  
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure.
-*
-* \sa 
-*/
-TI_STATUS siteMgr_overwritePrimarySite(TI_HANDLE hSiteMgr, bssEntry_t *newAP, TI_BOOL requiredToStorePrevSite)
-{
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    siteEntry_t *newApEntry;
-    mlmeIEParsingParams_t *ieListParseParams = mlmeParser_getParseIEsBuffer(pSiteMgr->hMlmeSm);
-
-    TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "siteMgr_overwritePrimarySite: new site bssid= 0x%x-0x%x-0x%x-0x%x-0x%x-0x%x\n\n", newAP->BSSID[0], newAP->BSSID[1], newAP->BSSID[2], newAP->BSSID[3], newAP->BSSID[4], newAP->BSSID[5]);
-
-    /* If previous primary site present, and requested to save it - store it */
-    if (requiredToStorePrevSite)
-    {
-        TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "siteMgr_overwritePrimarySite: required to store prev prim site \n");
-        /* Store latest primary site, make ite a regular site */
-        pSiteMgr->pSitesMgmtParams->pPrevPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-        pSiteMgr->pSitesMgmtParams->pPrevPrimarySite->siteType = SITE_REGULAR;
-    }
-    else
-    {
-        TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "siteMgr_overwritePrimarySite: not required to store prev prim site \n");
-        if (pSiteMgr->pSitesMgmtParams->pPrimarySite != NULL)
-        {
-            TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "Removing Primary ssid=, bssid= 0x%x-0x%x-0x%x-0x%x-0x%x-0x%x\n\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->bssid[0], pSiteMgr->pSitesMgmtParams->pPrimarySite->bssid[1], pSiteMgr->pSitesMgmtParams->pPrimarySite->bssid[2], pSiteMgr->pSitesMgmtParams->pPrimarySite->bssid[3], pSiteMgr->pSitesMgmtParams->pPrimarySite->bssid[4], pSiteMgr->pSitesMgmtParams->pPrimarySite->bssid[5] );
-
-            pSiteMgr->pSitesMgmtParams->pPrimarySite->siteType  = SITE_REGULAR;
-            pSiteMgr->pSitesMgmtParams->pPrimarySite->beaconRecv = TI_FALSE;
-
-            pSiteMgr->pSitesMgmtParams->pPrimarySite = NULL;
-        }
-        else
-        {
-            TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "siteMgr_overwritePrimarySite: primary site is NULL \n");
-        }
-
-    }
-
-    /* Find not occupied entry in site table, and store new AP BSSID in */
-    /* If pPrimarySite is not set to NULL, store it in pPrevSite before updating */
-    newApEntry = findAndInsertSiteEntry(pSiteMgr, &(newAP->BSSID), newAP->band);
-
-    if (newApEntry != NULL)
-    {
-        /* Zero frame content */
-        os_memoryZero(pSiteMgr->hOs, ieListParseParams, sizeof(mlmeIEParsingParams_t));
-
-        /* Update parameters of new AP */
-        newApEntry->rssi            = newAP->RSSI;
-        newApEntry->bssType         = BSS_INFRASTRUCTURE;
-        newApEntry->dtimPeriod      = 1;
-        newApEntry->rxRate          = (ERate)newAP->rxRate;
-        /* Mark the site as regular in order to prevent from calling Power manager during beacon parsing */
-        newApEntry->siteType        = SITE_REGULAR; 
-
-        os_memoryCopy(pSiteMgr->hOs, &newApEntry->ssid, &pSiteMgr->pDesiredParams->siteMgrDesiredSSID, sizeof(TSsid));
-
-        if (newAP->resultType == SCAN_RFT_PROBE_RESPONSE)
-        {
-            ieListParseParams->frame.subType = PROBE_RESPONSE;
-            siteMgr_saveProbeRespBuffer(hSiteMgr, &(newAP->BSSID), newAP->pBuffer, newAP->bufferLength);
-        }
-        else
-        {
-            ieListParseParams->frame.subType = BEACON;
-            siteMgr_saveBeaconBuffer(hSiteMgr, &(newAP->BSSID), newAP->pBuffer, newAP->bufferLength);
-        }
-        ieListParseParams->band = newAP->band;
-        ieListParseParams->rxChannel = newAP->channel;
-        ieListParseParams->myBssid = TI_FALSE;
-
-        ieListParseParams->frame.content.iePacket.pRsnIe = NULL;
-        ieListParseParams->frame.content.iePacket.rsnIeLen = 0;
-        ieListParseParams->frame.content.iePacket.barkerPreambleMode = PREAMBLE_UNSPECIFIED;
-        os_memoryCopy(pSiteMgr->hOs, (void *)ieListParseParams->frame.content.iePacket.timestamp, (void *)&newAP->lastRxTSF, TIME_STAMP_LEN);
-        ieListParseParams->frame.content.iePacket.beaconInerval     = newAP->beaconInterval;
-        ieListParseParams->frame.content.iePacket.capabilities  = newAP->capabilities;
-
-        if (mlmeParser_parseIEs(pSiteMgr->hMlmeSm, newAP->pBuffer, newAP->bufferLength, ieListParseParams) != TI_OK)
-        {
-            /* Error in parsing Probe response packet - exit */
-            return TI_NOK;
-        }
-
-        siteMgr_updateSite(hSiteMgr, &(newAP->BSSID), &ieListParseParams->frame, newAP->channel, newAP->band, TI_FALSE);
-
-        /* Select the entry as primary site */
-        newApEntry->siteType = SITE_PRIMARY;
-        pSiteMgr->pSitesMgmtParams->pPrimarySite = newApEntry;
-        return TI_OK;
-    }
-    else
-    {
-        return TI_NOK;
-    }
-}
-
-
-/** 
- * \fn     siteMgr_changeBandParams
- * \brief  change band params at the SithMgr and the TWD
-
- * \param  hSiteMgr - handle to the siteMgr object.
- * \param  radioBand - the set radio band.
- * \return TI_TRUE if site matches RSN settings, TI FALSE if it doesn't
- * \sa     sme_Select
- */ 
-void siteMgr_changeBandParams (TI_HANDLE hSiteMgr, ERadioBand radioBand)
-{
-	paramInfo_t	param;
-    siteMgr_t   *pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-	/* change dot11 mode */
-	param.paramType = SITE_MGR_OPERATIONAL_MODE_PARAM;
-	if(radioBand == RADIO_BAND_2_4_GHZ)
-		param.content.siteMgrDot11OperationalMode = DOT11_G_MODE;
-	else
-		param.content.siteMgrDot11OperationalMode = DOT11_A_MODE;
-
-	siteMgr_setParam(hSiteMgr, &param);
-	
-	param.paramType = SITE_MGR_RADIO_BAND_PARAM;
-	param.content.siteMgrRadioBand = radioBand;
-	siteMgr_setParam(hSiteMgr, &param);
-	
-	siteMgr_setCurrentTable(hSiteMgr, radioBand);
-	
-	/* configure hal with common core-hal parameters */
-	TWD_SetRadioBand (pSiteMgr->hTWD, radioBand);   
-}
-
-
-/***********************************************************************
-                incrementTxSessionCount
- ***********************************************************************
-DESCRIPTION: Increment the Tx-Session-Counter (cyclic in range 1-7), which
-               is configured to the FW in the Join command to distinguish
-			   between Tx packets of different AP-connections.
-			 Update also the TxCtrl module.
-
-INPUT:      pSiteMgr    -   site mgr handle.
-
-OUTPUT:
-
-RETURN:     TI_UINT16 - the new Tx-Session-Count (range is 1-7).
-
-************************************************************************/
-static TI_UINT16 incrementTxSessionCount(siteMgr_t *pSiteMgr)
-{
-	pSiteMgr->txSessionCount++;
-	if(pSiteMgr->txSessionCount > MAX_TX_SESSION_COUNT)
-		pSiteMgr->txSessionCount = MIN_TX_SESSION_COUNT;
-
-	txCtrlParams_updateTxSessionCount(pSiteMgr->hTxCtrl, pSiteMgr->txSessionCount);
-
-	return pSiteMgr->txSessionCount;
-}
-
-
-/**
-*
-* siteMgr_TxPowerHighThreshold
-*
-* \b Description: 
-*
-* Called by EventMBox upon TX Power Adaptation High Threshold Trigger.
-*
-* \b ARGS:
-*
-*  I   - hSiteMgr - Site Mgr handle \n
-*  
-* \b RETURNS:
-*
-*  None
-*
-* \sa 
-*/
-void siteMgr_TxPowerHighThreshold(TI_HANDLE hSiteMgr,
-                                      TI_UINT8     *data,
-                                      TI_UINT8     dataLength)
-{
-    siteMgr_TxPowerAdaptation(hSiteMgr, RSSI_EVENT_DIR_HIGH);
-}
-
-/**
-*
-* siteMgr_TxPowerLowThreshold
-*
-* \b Description: 
-*
-* Called by EventMBox upon TX Power Adaptation Low Threshold Trigger.
-*
-* \b ARGS:
-*
-*  I   - hSiteMgr - Site Mgr handle \n
-*  
-* \b RETURNS:
-*
-*  None
-*
-* \sa 
-*/
-void siteMgr_TxPowerLowThreshold(TI_HANDLE hSiteMgr,
-                                      TI_UINT8     *data,
-                                      TI_UINT8     dataLength)
-{
-    siteMgr_TxPowerAdaptation(hSiteMgr, RSSI_EVENT_DIR_LOW);
-}
-
-/**
-*
-* siteMgr_TxPowerAdaptation
-*
-* \b Description: 
-*
-* TX Power Adaptation - Used for TX power adjust .
-*
-* \b ARGS:
-*
-*  I   - hSiteMgr - Site Mgr handle \n
-*      - highLowEdge - Direction of Edge event
-*  
-* \b RETURNS:
-*
-*  None
-*
-* \sa 
-*/
-static void siteMgr_TxPowerAdaptation(TI_HANDLE hSiteMgr, RssiEventDir_e highLowEdge)
-{
-    siteMgr_t    *pSiteMgr = (siteMgr_t *)hSiteMgr;
-
-    if (pSiteMgr->siteMgrTxPowerEnabled)
-    {
-        if (highLowEdge == RSSI_EVENT_DIR_HIGH)
-        {
-            /* enable the "Temporary TX power" when close to AP */
-            siteMgr_setTemporaryTxPower (pSiteMgr, TI_TRUE) ;  
-        }
-        else
-        {
-            /* disable the "Temporary TX power" when we are again far from the AP */
-            siteMgr_setTemporaryTxPower (pSiteMgr, TI_FALSE);  
-        }
-    }
-}
-
diff --git a/wl1271/stad/src/Sta_Management/siteMgrApi.h b/wl1271/stad/src/Sta_Management/siteMgrApi.h
deleted file mode 100644
index 03d2492..0000000
--- a/wl1271/stad/src/Sta_Management/siteMgrApi.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * siteMgrApi.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file siteMgrApi.h
- *  \brief site manager module API
- *
- *  \see siteMgr.c
- */
-
-/***************************************************************************/
-/*                                                                                                  */
-/*    MODULE:   siteMgrApi.h                                                                */
-/*    PURPOSE:  site manager module API                                         */
-/*                                                                                                  */
-/***************************************************************************/
-#ifndef __SITE_MGR_API_H__
-#define __SITE_MGR_API_H__
-
-#include "tidef.h"
-#include "paramOut.h"
-#include "802_11Defs.h"
-#include "mlmeApi.h"
-#include "siteHash.h"
-#include "ScanCncn.h"
-#include "bssTypes.h"
-#include "DrvMainModules.h"
-#include "scanResultTable.h"
-
-
-#define SPECIAL_BG_CHANNEL              14
-
-/* Rx quality triggers indexes */
-typedef enum
-{
-    TRIGGER_EVENT_LOW_RSSI   = 0,
-    TRIGGER_EVENT_LOW_SNR    = 1,
-    TRIGGER_EVENT_HIGH_TX_PW = 2,
-    TRIGGER_EVENT_LOW_TX_PW  = 3,
-    TRIGGER_EVENT_BG_SCAN    = 4,
-    TRIGGER_EVENT_USER_0     = 5,
-    TRIGGER_EVENT_USER_1     = 6,
-    TRIGGER_EVENT_MAX        = 7
-
-}ETriggerEventIndex;
-
-
-typedef enum
-{
-    /* SiteMgr section */   
-    SITE_MGR_POWER_CONSTRAINT_PARAM     = 0x01,
-    SITE_MGR_BEACON_INTERVAL_PARAM      = 0x02,
-    SITE_MGR_SITE_CAPABILITY_PARAM      = 0x05,
-    SITE_MGR_RGSTRY_BASIC_RATE_SET_MASK = 0x08,
-    SITE_MGR_BEACON_RECV                = 0x09,
-    SITE_MGR_DTIM_PERIOD_PARAM          = 0x0A,
-
-    /* Previous Primary Site */
-    SITE_MGR_PREV_SITE_BSSID_PARAM      = 0x0B,
-    SITE_MGR_PREV_SITE_SSID_PARAM       = 0x0C,
-    SITE_MGR_PREV_SITE_CHANNEL_PARAM    = 0x0D,
-    SITE_MGR_DESIRED_RSSI_GAP_THR_PARAM = 0x0E,
-    SITE_MGR_PRIORITY_PARAM             = 0x0F
-
-} ESiteMgrParam;
-
-
-/* Site manager interface functions prototypes */
-
-TI_HANDLE siteMgr_create(TI_HANDLE hOs);
-
-void      siteMgr_init (TStadHandlesList *pStadHandles);
-
-TI_STATUS siteMgr_SetDefaults (TI_HANDLE       hSiteMgr,
-                               siteMgrInitParams_t     *pSiteMgrInitParams);
-
-TI_STATUS siteMgr_unLoad(TI_HANDLE hSiteMgr);
-
-TI_STATUS siteMgr_setParam(TI_HANDLE        hSiteMgr,
-                        paramInfo_t     *pParam);
-
-TI_STATUS siteMgr_getParamWSC(TI_HANDLE hSiteMgr, TIWLN_SIMPLE_CONFIG_MODE *wscParam);
-TI_STATUS siteMgr_getParam(TI_HANDLE        hSiteMgr, 
-                        paramInfo_t     *pParam);
-
-TI_STATUS siteMgr_join(TI_HANDLE    hSiteMgr);
-
-TI_STATUS siteMgr_removeSelfSite(TI_HANDLE  hSiteMgr);
-
-TI_STATUS siteMgr_disSelectSite(TI_HANDLE   hSiteMgr);
-
-TI_STATUS systemConfig(siteMgr_t *pSiteMgr);
-
-TI_STATUS siteMgr_start(TI_HANDLE   hSiteMgr);
-
-TI_STATUS siteMgr_stop(TI_HANDLE    hSiteMgr);
-
-TI_STATUS siteMgr_resetSiteTable(TI_HANDLE  hSiteMgr, siteTablesParams_t*   pSiteTableParams);
-
-TI_STATUS siteMgr_updatePrimarySiteFailStatus(TI_HANDLE hSiteMgr, 
-                                           TI_BOOL bRemoveSite);
-
-TI_BOOL siteMgr_isCurrentBand24(TI_HANDLE  hSiteMgr);
-
-TI_STATUS pbccAlgorithm(TI_HANDLE hSiteMgr);
-
-TI_STATUS siteMgr_assocReport(TI_HANDLE hSiteMgr, TI_UINT16 capabilities, TI_BOOL bCiscoAP);
-
-void siteMgr_setCurrentTable(TI_HANDLE hSiteMgr, ERadioBand radioBand);
-
-void siteMgr_updateRates(TI_HANDLE hSiteMgr, TI_BOOL dot11a, TI_BOOL updateToOS);
-
-void siteMgr_bandParamsConfig(TI_HANDLE hSiteMgr, TI_BOOL updateToOS);
-
-void siteMgr_ConfigRate(TI_HANDLE hSiteMgr);
-
-TI_STATUS siteMgr_getWMEParamsSite(TI_HANDLE hSiteMgr, dot11_ACParameters_t **pWME_ACParameters_t);
-
-TI_STATUS siteMgr_setWMEParamsSite(TI_HANDLE hSiteMgr,dot11_WME_PARAM_t *pDot11_WME_PARAM);
-
-void siteMgr_IsERP_Needed(TI_HANDLE hSiteMgr,TI_BOOL *useProtection,TI_BOOL *NonErpPresent,TI_BOOL *barkerPreambleType);
-
-TI_STATUS siteMgr_CopyToPrimarySite (TI_HANDLE hSiteMgr, TSiteEntry *pCandidate);
-
-TI_STATUS siteMgr_overwritePrimarySite(TI_HANDLE hSiteMgr, bssEntry_t *newAP, TI_BOOL requiredToStorePrevSite);
-
-void siteMgr_changeBandParams (TI_HANDLE hSiteMgr, ERadioBand radioBand);
-
-TI_BOOL siteMgr_SelectRateMatch (TI_HANDLE hSiteMgr, TSiteEntry *pCurrentSite);
-
-siteEntry_t *addSelfSite(TI_HANDLE hSiteMgr);
-
-TI_STATUS siteMgr_updateSite(TI_HANDLE			hSiteMgr,
-						  TMacAddr		*bssid,
-						  mlmeFrameInfo_t	*pFrameInfo,
-						  TI_UINT8				rxChannel,
-                          ERadioBand       band,
-						  TI_BOOL				measuring);
-
-TI_STATUS siteMgr_IbssMerge(TI_HANDLE       hSiteMgr,
-                          TMacAddr      	our_bssid,
-						  TMacAddr      	new_bssid,
-                          mlmeFrameInfo_t   *pFrameInfo,
-                          TI_UINT8          rxChannel,
-                          ERadioBand        band);
-
-TI_STATUS siteMgr_saveProbeRespBuffer(TI_HANDLE hSiteMgr, TMacAddr	*bssid, TI_UINT8 *pProbeRespBuffer, TI_UINT32 length);
-
-TI_STATUS siteMgr_saveBeaconBuffer(TI_HANDLE hSiteMgr, TMacAddr *bssid, TI_UINT8 *pBeaconBuffer, TI_UINT32 length);
-
-void siteMgr_UpdatHtParams (TI_HANDLE hSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo);
-
-#ifdef REPORT_LOG
-void siteMgr_printPrimarySiteDesc(TI_HANDLE hSiteMgr );
-#endif
-
-#endif /* __SITE_MGR_API_H__ */
diff --git a/wl1271/stad/src/Sta_Management/systemConfig.c b/wl1271/stad/src/Sta_Management/systemConfig.c
deleted file mode 100644
index 37c3e42..0000000
--- a/wl1271/stad/src/Sta_Management/systemConfig.c
+++ /dev/null
@@ -1,697 +0,0 @@
-/*
- * systemConfig.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file reportReplvl.c
- *  \brief Report level implementation
- *
- *  \see reportReplvl.h 
- */
-
-/***************************************************************************/
-/*																			*/
-/*		MODULE:	reportReplvl.c												*/
-/*    PURPOSE:	Report level implementation	 								*/
-/*																			*/
-/***************************************************************************/
-#define __FILE_ID__  FILE_ID_87
-#include "tidef.h"
-#include "osApi.h"
-#include "siteHash.h"
-#include "sme.h"
-#include "rate.h"
-#include "smeApi.h"
-#include "rsnApi.h"
-#include "report.h"
-#include "TWDriver.h"
-#include "connApi.h"
-#include "DataCtrl_Api.h"  
-#include "siteMgrApi.h"  
-#include "EvHandler.h"
-#include "TI_IPC_Api.h"
-#include "regulatoryDomainApi.h"
-#include "measurementMgrApi.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#include "TransmitPowerXCC.h"
-#include "XCCRMMngr.h"
-#endif
-
-#include "qosMngr_API.h"
-#include "StaCap.h"
-
-
-/****************************************************************************
-								MATRIC ISSUE							
-	Each function in the select process returns a MATCH, NO_MATCH value in order to 	
-	skip non relevant sites. In addition, some of the functions also measures a matching level of a site.
-	The matching level is returned as a bit map. The select function 'OR's those bit maps in order to 
-	select the site that has the biggest matching level. If a function returns a NO_MATCH value, the matching level of the
-	site is reset.
-	Following is the site matching level bit map structure.
-	Please notice, that if all the match functions returned MATCH for a site, its matric must be different than 0, 
-	because of the rates bits.
-	
-
-	    31 - 24           23 - 20           20 - 16             15 - 10       9 - 8         7         6           5         4 - 0
-	+---------------+---------------+-----------------------+-------------+------------+----------+---------+-----------+-----------+
-	| Rx Level      | Privacy       | Attempts              |Rates        | Modulation |Preamble  | Channel | Spectrum  | Reserved  |
-	|		        |	    		|		                | 		      |			   |		  |		    | management|		    |	
-	+---------------+---------------+-----------------------+-------------+------------+----------+---------+-----------+-----------+
-****************************************************************************/
-
-/* Matric bit map definition */
-typedef enum 
-{
-	/* Rx level */
-	METRIC_RX_LEVEL_MASK			= 0xFF,
-	METRIC_RX_LEVEL_SHIFT			= 24,
-
-	/* Privacy */
-	METRIC_PRIVACY_MASK				= 0x0F,
-	METRIC_PRIVACY_SHIFT			= 20,
-
-	/* Number of attempts */
-	METRIC_ATTEMPTS_NUMBER_MASK		= 0x0F,
-	METRIC_ATTEMPTS_NUMBER_SHIFT	= 16,
-	
-	
-	/* Rates */
-	METRIC_RATES_MASK				= 0x3F,
-	METRIC_RATES_SHIFT				= 10,
-
-	/* PBCC */
-	METRIC_MODULATION_MASK			= 0x03,
-	METRIC_MODULATION_SHIFT			= 8,
-	
-	/* Preamble*/
-	METRIC_PREAMBLE_MASK			= 0x01,
-	METRIC_PREAMBLE_SHIFT			= 7,
-
-	/* Channel */
-	METRIC_CHANNEL_MASK				= 0x01,
-	METRIC_CHANNEL_SHIFT			= 6,
-
-	/* Spectrum management Capability */
-	METRIC_SPECTRUM_MANAGEMENT_MASK	= 0x01,
-	METRIC_SPECTRUM_MANAGEMENT_SHIFT= 5,
-
-	/* Priority Site */
-	METRIC_PRIORITY_SITE_MASK		= 0x01,
-	METRIC_PRIORITY_SITE_SHIFT		= 4
-
-} matric_e;
-
-#define MAX_GB_MODE_CHANEL		14
-
-#define MAX_RSN_DATA_SIZE       256
-
-/* RSSI values boundaries and metric values for best, good, etc  signals */
-#define SELECT_RSSI_BEST_LEVEL      (-22)
-#define SELECT_RSSI_GOOD_LEVEL      (-38)
-#define SELECT_RSSI_NORMAL_LEVEL    (-56)
-#define SELECT_RSSI_POOR_LEVEL      (-72)
-#define SELECT_RSSI_BAD_LEVEL       (-82)
-
-
-#define  RSSI_METRIC_BEST      6
-#define  RSSI_METRIC_GOOD      5
-#define  RSSI_METRIC_NORMAL    4
-#define  RSSI_METRIC_POOR      3
-#define  RSSI_METRIC_BAD       2
-#define  RSSI_METRIC_NOSIGNAL  1
-
-/* Local functions prototypes */
-
-static TI_STATUS sendProbeResponse(siteMgr_t *pSiteMgr, TMacAddr *pBssid);
-
-/* Interface functions Implementation */
-
-/***********************************************************************
- *                        addSelfSite									
- ***********************************************************************
-DESCRIPTION: This function is called if the selection fails and desired BSS type is IBSS
-			That means we creating our own network and wait for other stations to join us.
-			the best site for teh station. 
-			Performs the following:
-				-	If the desired BSSID is broadcast, we generate a random BSSId, otherwise we use the desired one.
-				-	If the site table is full we remove the most old site
-				-	We send a probe response with our oiwn desired attributes in order to add the site to the site table
-                                                                                                   
-INPUT:      pSiteMgr	-	site mgr handle.
-
-OUTPUT:		
-
-RETURN:     Pointer to rthe self site entry in the site table
-
-************************************************************************/
-siteEntry_t *addSelfSite(TI_HANDLE hSiteMgr)
-{
-	siteMgr_t       *pSiteMgr = (siteMgr_t *)hSiteMgr;
-    siteEntry_t		*pSite;
-	TMacAddr		bssid; 
-    TSsid           *pSsid    = &pSiteMgr->pDesiredParams->siteMgrDesiredSSID;
-
-	if (OS_802_11_SSID_JUNK (pSsid->str, pSsid->len))
-		return NULL;
-
-	if ((MAC_BROADCAST (pSiteMgr->pDesiredParams->siteMgrDesiredBSSID)) ||
-		(BSS_INDEPENDENT == pSiteMgr->pDesiredParams->siteMgrDesiredBSSType))
-	{
-		MAC_COPY (bssid, pSiteMgr->ibssBssid);
-	}
-	else
-	{
-		MAC_COPY (bssid, pSiteMgr->pDesiredParams->siteMgrDesiredBSSID);  
-	}
-
-	if(pSiteMgr->pDesiredParams->siteMgrDesiredChannel <= 14)
-	{
-		pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables;
-        pSiteMgr->siteMgrOperationalMode = DOT11_G_MODE;
-	}
-	else
-	{
-		pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = (siteTablesParams_t *)&pSiteMgr->pSitesMgmtParams->dot11A_sitesTables;
-		pSiteMgr->siteMgrOperationalMode = DOT11_A_MODE;
-	}
-
-    siteMgr_ConfigRate(pSiteMgr);
-
-	/* First make sure that there is a place in the site table, if not, reomve the eldest site. */
-	if (pSiteMgr->pSitesMgmtParams->pCurrentSiteTable->numOfSites == pSiteMgr->pSitesMgmtParams->pCurrentSiteTable->maxNumOfSites)
-		removeEldestSite(pSiteMgr);
-
-	sendProbeResponse(pSiteMgr, &bssid);
-
-	/* Now find the site in the site table. */
-	pSite = findSiteEntry(pSiteMgr, &bssid);
-	if (pSite == NULL)
-	{
-		return NULL;
-	}
-	pSite->beaconModulation = pSite->probeModulation;
-	pSite->barkerPreambleType = PREAMBLE_UNSPECIFIED;
-
-   	pSiteMgr->pSitesMgmtParams->pPrimarySite = pSite;
-	pSite->siteType = SITE_SELF;
-    pSite->bssType = BSS_INDEPENDENT;
-
-	return pSite;
-}
-
-/***********************************************************************
- *                        sendProbeResponse									
- ***********************************************************************
-DESCRIPTION: This function is called by the function 'addSelfSite()' in order to send a probe response
-			to the site mgr. This will cause the site manager to add a new entry to the site table, the self site entry.
-
-INPUT:      pSiteMgr	-	site mgr handle.
-			pBssid		-	Received BSSID
-
-OUTPUT:		
-
-RETURN:     TI_OK
-
-************************************************************************/
-static TI_STATUS sendProbeResponse(siteMgr_t *pSiteMgr, TMacAddr *pBssid)
-{
-	mlmeFrameInfo_t		frame;
-    ECipherSuite        rsnStatus;
-	dot11_SSID_t 		ssid;	   
-	dot11_RATES_t 		rates;	   
-	dot11_FH_PARAMS_t 	FHParamsSet;	   
-	dot11_DS_PARAMS_t 	DSParamsSet;	   
-	dot11_CF_PARAMS_t 	CFParamsSet;	   
-	dot11_IBSS_PARAMS_t IBSSParamsSet;
-	TI_UINT32			len = 0, ofdmIndex = 0;
-    ERadioBand          band;
-	dot11_RATES_t 		extRates;
-	TI_UINT8			ratesBuf[DOT11_MAX_SUPPORTED_RATES];	
-	TI_BOOL				extRatesInd = TI_FALSE;
-	
-	/* The easiest way to add a site to the site table is to simulate a probe frame. */
-	frame.subType = PROBE_RESPONSE;
-	os_memoryZero(pSiteMgr->hOs, &frame, sizeof(mlmeFrameInfo_t));
-		/* Initialize the frame fields */
-	frame.subType = PROBE_RESPONSE;
-	os_memoryZero(pSiteMgr->hOs, (void *)frame.content.iePacket.timestamp, TIME_STAMP_LEN);
-
-	/* Build  Beacon interval  */
-	frame.content.iePacket.beaconInerval = pSiteMgr->pDesiredParams->siteMgrDesiredBeaconInterval;
-
-	/* Build  capability field */
-	frame.content.iePacket.capabilities = 0;
-	frame.content.iePacket.capabilities |= (TI_TRUE << CAP_IBSS_SHIFT); /* Bss type must be independent */
-
-	if ((pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType == PREAMBLE_SHORT))
-		frame.content.iePacket.capabilities |= (TI_TRUE << CAP_PREAMBLE_SHIFT);
-
-	/* call RSN to get the privacy desired */
-    rsn_getParamEncryptionStatus(pSiteMgr->hRsn, &rsnStatus); /* RSN_ENCRYPTION_STATUS_PARAM */
-	if (rsnStatus == TWD_CIPHER_NONE)
-	{
-		frame.content.iePacket.capabilities |= (TI_FALSE << CAP_PRIVACY_SHIFT);
-	} 
-    else 
-    {
-		frame.content.iePacket.capabilities |= (TI_TRUE << CAP_PRIVACY_SHIFT);
-	}
-	
-	if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_PBCC)
-		frame.content.iePacket.capabilities |= (TI_TRUE << CAP_PBCC_SHIFT);
-	
-    if (pSiteMgr->siteMgrOperationalMode == DOT11_G_MODE)
-    {
-        if(pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime == PHY_SLOT_TIME_SHORT)
-            frame.content.iePacket.capabilities |= (TI_TRUE << CAP_SLOT_TIME_SHIFT);
-    }
-	
-	/* Build ssid */
-	os_memoryZero(pSiteMgr->hOs, (void *)ssid.serviceSetId, MAX_SSID_LEN);
-
-    ssid.hdr[1] = pSiteMgr->pDesiredParams->siteMgrDesiredSSID.len;   
-    if (ssid.hdr[1] > MAX_SSID_LEN)
-    {
-        TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_ERROR,
-               "sendProbeResponse. siteMgrDesiredSSID.len=%d exceeds the limit %d\n",
-               pSiteMgr->pDesiredParams->siteMgrDesiredSSID.len, MAX_SSID_LEN);
-        ssid.hdr[1] = MAX_SSID_LEN;
-    }
-    os_memoryCopy(pSiteMgr->hOs, (void *)ssid.serviceSetId, (void *)pSiteMgr->pDesiredParams->siteMgrDesiredSSID.str, ssid.hdr[1]);
-	
-	if(pSiteMgr->pDesiredParams->siteMgrDesiredChannel <= MAX_GB_MODE_CHANEL)
-		siteMgr_updateRates(pSiteMgr, TI_FALSE, TI_TRUE);
-	else
-		siteMgr_updateRates(pSiteMgr, TI_TRUE, TI_TRUE);
-
-	/* Build Rates */
-	rate_DrvBitmapToNetStr (pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask,
-						    pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask,
-                            ratesBuf, 
-                            &len, 
-                            &ofdmIndex);
-
-	if(pSiteMgr->siteMgrOperationalMode != DOT11_G_MODE ||
-       pSiteMgr->pDesiredParams->siteMgrUseDraftNum == DRAFT_5_AND_EARLIER ||
-	   ofdmIndex == len)
-	{
-		rates.hdr[0] = DOT11_SUPPORTED_RATES_ELE_ID;
-		rates.hdr[1] = len;
-		os_memoryCopy(pSiteMgr->hOs, (void *)rates.rates, ratesBuf, rates.hdr[1]);
-	}
-	else
-	{
-		rates.hdr[0] = DOT11_SUPPORTED_RATES_ELE_ID;
-		rates.hdr[1] = ofdmIndex;
-		os_memoryCopy(pSiteMgr->hOs, (void *)rates.rates, ratesBuf, rates.hdr[1]);
-
-		extRates.hdr[0] = DOT11_EXT_SUPPORTED_RATES_ELE_ID;
-		extRates.hdr[1] = len - ofdmIndex;
-		os_memoryCopy(pSiteMgr->hOs, (void *)extRates.rates, &ratesBuf[ofdmIndex], extRates.hdr[1]);
-		extRatesInd = TI_TRUE;
-	}
-
-    if((pSiteMgr->siteMgrOperationalMode == DOT11_G_MODE) || (pSiteMgr->siteMgrOperationalMode == DOT11_DUAL_MODE)) 
-    {
-        erpProtectionType_e protType;
-        ctrlData_getParamProtType(pSiteMgr->hCtrlData, &protType); /* CTRL_DATA_CURRENT_IBSS_PROTECTION_PARAM */
-        frame.content.iePacket.useProtection = protType;
-    }
-    else
-    {
-        frame.content.iePacket.useProtection = ERP_PROTECTION_NONE;
-    }
-
-	/* Build FH */
-	os_memoryZero(pSiteMgr->hOs, &FHParamsSet, sizeof(dot11_FH_PARAMS_t));
-
-	/* Build DS */
-	DSParamsSet.hdr[1] = 1;
-	DSParamsSet.currChannel = pSiteMgr->pDesiredParams->siteMgrDesiredChannel;
-
-	/* Build CF */
-	os_memoryZero(pSiteMgr->hOs, &CFParamsSet, sizeof(dot11_CF_PARAMS_t));
-
-	/* Build IBSS */
-	os_memoryZero(pSiteMgr->hOs, &IBSSParamsSet, sizeof(dot11_IBSS_PARAMS_t));
-	IBSSParamsSet.hdr[1] = 2;
-	IBSSParamsSet.atimWindow = pSiteMgr->pDesiredParams->siteMgrDesiredAtimWindow;
-
-	frame.content.iePacket.pSsid = &ssid;
-	frame.content.iePacket.pRates = &rates;
-
-	if(extRatesInd)
-		frame.content.iePacket.pExtRates = &extRates;
-	else
-		frame.content.iePacket.pExtRates = NULL;
-
-	frame.content.iePacket.pFHParamsSet = &FHParamsSet;
-	frame.content.iePacket.pDSParamsSet = &DSParamsSet;
-	frame.content.iePacket.pCFParamsSet = &CFParamsSet;
-	frame.content.iePacket.pIBSSParamsSet = &IBSSParamsSet;
-
-    band = ( MAX_GB_MODE_CHANEL >= pSiteMgr->pDesiredParams->siteMgrDesiredChannel ? RADIO_BAND_2_4_GHZ : RADIO_BAND_5_0_GHZ );
-	/* Update site */
-	siteMgr_updateSite(pSiteMgr, pBssid, &frame ,pSiteMgr->pDesiredParams->siteMgrDesiredChannel, band, TI_FALSE);
-	
-	return TI_OK;
-}
-
-/***********************************************************************
- *                        systemConfig									
- ***********************************************************************
-DESCRIPTION: This function is called by the function 'siteMgr_selectSite()' in order to configure
-			the system with the chosen site attribute.
-
-INPUT:      pSiteMgr	-	site mgr handle.
-
-OUTPUT:		
-
-RETURN:     TI_OK
-
-************************************************************************/
-TI_STATUS systemConfig(siteMgr_t *pSiteMgr)
-{ 
-	paramInfo_t *pParam;
-	siteEntry_t *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-	TRsnData	rsnData;
-	TI_UINT8	rsnAssocIeLen;
-    dot11_RSN_t *pRsnIe;
-    TI_UINT8    rsnIECount=0;
-    TI_UINT8    *curRsnData;
-    TI_UINT16   length;
-    TI_UINT16   capabilities;
-    TI_UINT16   PktLength=0;
-    TI_UINT8	*pIeBuffer=NULL;
-    TI_BOOL     b11nEnable;
-    TI_BOOL     bWmeEnable;
-
-#ifdef XCC_MODULE_INCLUDED
-    TI_UINT8     ExternTxPower;
-#endif
-	TI_STATUS	status;
-	ESlotTime	slotTime;
-	TI_UINT32	StaTotalRates;
-	dot11_ACParameters_t *p_ACParametersDummy = NULL;
-    TtxCtrlHtControl tHtControl;
-
-    curRsnData = os_memoryAlloc(pSiteMgr->hOs, MAX_RSN_DATA_SIZE);
-    if (!curRsnData)
-        return TI_NOK;
-    pParam = (paramInfo_t *)os_memoryAlloc(pSiteMgr->hOs, sizeof(paramInfo_t));
-    if (!pParam) {
-        os_memoryFree(pSiteMgr->hOs, curRsnData, MAX_RSN_DATA_SIZE);
-        return TI_NOK;
-    }
-
-	if (pPrimarySite->probeRecv)
-	{
-		pIeBuffer = pPrimarySite->probeRespBuffer;
-		PktLength = pPrimarySite->probeRespLength;
-	}
-    else if (pPrimarySite->beaconRecv)
-	{
-		pIeBuffer = pPrimarySite->beaconBuffer;
-		PktLength = pPrimarySite->beaconLength;
-	}
-		
-	pSiteMgr->prevRadioBand = pSiteMgr->radioBand;
-	
-    TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Capabilities, Slot Time Bit = %d (capabilities = %d)\n", (pPrimarySite->capabilities >> CAP_SLOT_TIME_SHIFT) & 1, pPrimarySite->capabilities);
-	
-	if(pPrimarySite->channel <= MAX_GB_MODE_CHANEL)
-	{
-		if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_B_MODE)
-		{
-			pSiteMgr->siteMgrOperationalMode = DOT11_B_MODE;
-			slotTime = PHY_SLOT_TIME_LONG;
-
-            TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, ": 11b Mode, Slot Time = %d\n", (TI_UINT8)slotTime);
-		}
-		else
-		{
-			pSiteMgr->siteMgrOperationalMode = DOT11_G_MODE;
-
-			if (((pPrimarySite->capabilities >> CAP_SLOT_TIME_SHIFT) & CAP_SLOT_TIME_MASK) == PHY_SLOT_TIME_SHORT)
-			{
-			slotTime = pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime;
-
-            TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, ": 11g Mode, Slot Time = %d (desired)\n", (TI_UINT8)slotTime);
-			}
-			else
-			{
-				slotTime = PHY_SLOT_TIME_LONG;
-
-                TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, ": 11g Mode, Slot Time = %d\n", (TI_UINT8) slotTime);
-			}
-		}
-
-		pSiteMgr->radioBand = RADIO_BAND_2_4_GHZ;
-		pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables;
-	}
-	else
-	{
-		pSiteMgr->siteMgrOperationalMode = DOT11_A_MODE;
-		pSiteMgr->radioBand = RADIO_BAND_5_0_GHZ;
-		slotTime = PHY_SLOT_TIME_SHORT;
-
-        TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, ": 11a Mode, Slot Time = %d\n", (TI_UINT8)slotTime);
-
-		pSiteMgr->pSitesMgmtParams->pCurrentSiteTable = (siteTablesParams_t *)&pSiteMgr->pSitesMgmtParams->dot11A_sitesTables;
-	}
-
-	/* since we are moving to the different band, the siteMgr should be reconfigured */
-	if(pSiteMgr->prevRadioBand != pSiteMgr->radioBand)
-		siteMgr_bandParamsConfig(pSiteMgr, TI_TRUE);
-
-	if(pPrimarySite->channel <= MAX_GB_MODE_CHANEL)
-		siteMgr_updateRates(pSiteMgr, TI_FALSE, TI_TRUE);
-	else
-		siteMgr_updateRates(pSiteMgr, TI_TRUE, TI_TRUE);
-
-	/* configure hal with common core-hal parameters */
-	TWD_SetRadioBand (pSiteMgr->hTWD, pSiteMgr->radioBand);
-
-	pPrimarySite->currentSlotTime = slotTime;
-	TWD_CfgSlotTime (pSiteMgr->hTWD, slotTime);
-
-	/***************** Config Site Manager *************************/
-	/* L.M. Should be fixed, should take into account the AP's rates */ 
-	if(pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_CCK)
-		pSiteMgr->chosenModulation = DRV_MODULATION_CCK;
-	else if(pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_PBCC)
-	{
-		if(pPrimarySite->probeModulation != DRV_MODULATION_NONE)
-			pSiteMgr->chosenModulation = pPrimarySite->probeModulation;
-		else
-			pSiteMgr->chosenModulation = pPrimarySite->beaconModulation;
-	}
-	else
-		pSiteMgr->chosenModulation = DRV_MODULATION_OFDM;
-	
-	/* We use this variable in order tp perform the PBCC algorithm. */
-	pSiteMgr->currentDataModulation = pSiteMgr->chosenModulation;
-	/***************** Config Data CTRL *************************/
-	
-	pParam->paramType = CTRL_DATA_CURRENT_BSSID_PARAM;							/* Current BSSID */
-	MAC_COPY (pParam->content.ctrlDataCurrentBSSID, pPrimarySite->bssid);
-	ctrlData_setParam(pSiteMgr->hCtrlData, pParam);
-
-	pParam->paramType = CTRL_DATA_CURRENT_BSS_TYPE_PARAM;							/* Current BSS Type */
-	pParam->content.ctrlDataCurrentBssType = pPrimarySite->bssType;
-	ctrlData_setParam(pSiteMgr->hCtrlData, pParam);
-
-	pParam->paramType = CTRL_DATA_CURRENT_PREAMBLE_TYPE_PARAM;					/* Current Preamble Type */
-	if ((pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType == PREAMBLE_SHORT) &&
-		(pPrimarySite->currentPreambleType == PREAMBLE_SHORT))
-		pParam->content.ctrlDataCurrentPreambleType = PREAMBLE_SHORT;
-	else
-		pParam->content.ctrlDataCurrentPreambleType = PREAMBLE_LONG;
-	ctrlData_setParam(pSiteMgr->hCtrlData, pParam);
-
-    /* Mutual Rates Matching */
-	StaTotalRates = pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask |
-					pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.supportedRateMask;
-
-
-    pSiteMgr->pDesiredParams->siteMgrMatchedSuppRateMask = StaTotalRates & 
-														   pPrimarySite->rateMask.supportedRateMask;
-	
-	pSiteMgr->pDesiredParams->siteMgrMatchedBasicRateMask = StaTotalRates &
-															pPrimarySite->rateMask.basicRateMask;
-	if (pSiteMgr->pDesiredParams->siteMgrMatchedBasicRateMask == 0)
-	{
-		pSiteMgr->pDesiredParams->siteMgrMatchedBasicRateMask = 
-			pSiteMgr->pDesiredParams->siteMgrCurrentDesiredRateMask.basicRateMask;
-	}
-
-    /* set protection */
-    if(BSS_INDEPENDENT == pPrimarySite->bssType)
-    {
-        pParam->paramType = CTRL_DATA_CURRENT_IBSS_PROTECTION_PARAM;
-    }
-    else
-    {   
-        pParam->paramType = CTRL_DATA_CURRENT_PROTECTION_STATUS_PARAM;
-    }
-    pParam->content.ctrlDataProtectionEnabled = pPrimarySite->useProtection;
-    ctrlData_setParam(pSiteMgr->hCtrlData, pParam);
-
-	pbccAlgorithm(pSiteMgr);
-
-	/********** Set Site QOS protocol support *************/
-
-	/* Set WME Params */
-	 status = siteMgr_getWMEParamsSite(pSiteMgr,&p_ACParametersDummy);
-	 if(status == TI_OK)
-	 {
-		 pParam->content.qosSiteProtocol = QOS_WME;
-	 }
-	 else
-	 {
-		 pParam->content.qosSiteProtocol = QOS_NONE;
-	 }
-
-     TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, " systemConfigt() : pParam->content.qosSiteProtoco %d\n", pParam->content.qosSiteProtocol);
-
-	 pParam->paramType = QOS_MNGR_SET_SITE_PROTOCOL;
-	 qosMngr_setParams(pSiteMgr->hQosMngr, pParam);
-	 
-     /* Set active protocol in qosMngr according to station desired mode and site capabilities 
-	    Must be called BEFORE setting the "CURRENT_PS_MODE" into the QosMngr */
-     qosMngr_selectActiveProtocol(pSiteMgr->hQosMngr);
-
-	 /* set PS capability parameter */
-	 pParam->paramType = QOS_MNGR_CURRENT_PS_MODE;
-	 if(pPrimarySite->APSDSupport == TI_TRUE)
-		 pParam->content.currentPsMode = PS_SCHEME_UPSD_TRIGGER;
-	 else
-		 pParam->content.currentPsMode = PS_SCHEME_LEGACY;
-      qosMngr_setParams(pSiteMgr->hQosMngr, pParam);
-
-     /* Set upsd/ps_poll configuration */
-     /* Must be done AFTER setting the active Protocol */
-     qosMngr_setAcPsDeliveryMode (pSiteMgr->hQosMngr);
-	
-
-     /********** Set Site HT setting support *************/
-     /* set HT setting to the FW */
-     /* verify 11n_Enable and Chip type */
-     StaCap_IsHtEnable (pSiteMgr->hStaCap, &b11nEnable);
-
-     /* verify that WME flag enable */
-     qosMngr_GetWmeEnableFlag (pSiteMgr->hQosMngr, &bWmeEnable); 
-
-     if ((b11nEnable != TI_FALSE) &&
-         (bWmeEnable != TI_FALSE) &&
-         (pPrimarySite->tHtCapabilities.tHdr[0] != TI_FALSE) && 
-         (pPrimarySite->tHtInformation.tHdr[0] != TI_FALSE))
-     {
-         TWD_CfgSetFwHtCapabilities (pSiteMgr->hTWD, &pPrimarySite->tHtCapabilities, TI_TRUE);
-         TWD_CfgSetFwHtInformation (pSiteMgr->hTWD, &pPrimarySite->tHtInformation);
-
-         /* the FW not supported in HT control field in TX */
-
-        tHtControl.bHtEnable = TI_FALSE;
-         txCtrlParams_SetHtControl (pSiteMgr->hTxCtrl, &tHtControl);
-     }
-     else
-     {
-         TWD_CfgSetFwHtCapabilities (pSiteMgr->hTWD, &pPrimarySite->tHtCapabilities, TI_FALSE);
-
-         tHtControl.bHtEnable = TI_FALSE;
-         txCtrlParams_SetHtControl (pSiteMgr->hTxCtrl, &tHtControl);
-     }
-
-	/***************** Config RSN *************************/
-    /* Get the RSN IE data */
-    pRsnIe = pPrimarySite->pRsnIe;
-	length = 0;
-    rsnIECount = 0;
-    while ((length < pPrimarySite->rsnIeLen) && (pPrimarySite->rsnIeLen < 255) 
-           && (rsnIECount < MAX_RSN_IE))
-    {
-        curRsnData[0+length] = pRsnIe->hdr[0];
-        curRsnData[1+length] = pRsnIe->hdr[1];
-        os_memoryCopy(pSiteMgr->hOs, &curRsnData[2+length], (void *)pRsnIe->rsnIeData, pRsnIe->hdr[1]); 
-        length += pRsnIe->hdr[1]+2;
-        pRsnIe += 1;
-        rsnIECount++;
-    }
-    if (length<pPrimarySite->rsnIeLen) 
-    {
-        TRACE2(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "siteMgr_selectSiteFromTable, RSN IE is too long: rsnIeLen=%d, MAX_RSN_IE=%d\n", pPrimarySite->rsnIeLen, MAX_RSN_IE);
-    }
-
-	rsnData.pIe = (pPrimarySite->rsnIeLen==0) ? NULL : curRsnData;
-	rsnData.ieLen = pPrimarySite->rsnIeLen;
-    rsnData.privacy = pPrimarySite->privacy; 
-    
-    rsn_setSite(pSiteMgr->hRsn, &rsnData, NULL, &rsnAssocIeLen);
-
-	/***************** Config RegulatoryDomain **************************/
-	
-#ifdef XCC_MODULE_INCLUDED
-	/* set XCC TPC if present */
-	if(XCC_ParseClientTP(pSiteMgr->hOs,pPrimarySite,(TI_INT8 *)&ExternTxPower,pIeBuffer,PktLength) == TI_OK)
-    {
-        TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "Select XCC_ParseClientTP == OK: Dbm = %d\n",ExternTxPower);
-        pParam->paramType = REGULATORY_DOMAIN_EXTERN_TX_POWER_PREFERRED;
-        pParam->content.ExternTxPowerPreferred = ExternTxPower;
-        regulatoryDomain_setParam(pSiteMgr->hRegulatoryDomain, pParam);
-    }
-	/* Parse and save the XCC Version Number if exists */
-	XCCMngr_parseXCCVer(pSiteMgr->hXCCMngr, pIeBuffer, PktLength);
-
-#endif
-
-	/* Note: TX Power Control adjustment is now done through siteMgr_assocReport() */
-	if (pPrimarySite->powerConstraint>0)
-	{	/* setting power constraint */
-		pParam->paramType = REGULATORY_DOMAIN_SET_POWER_CONSTRAINT_PARAM;
-		pParam->content.powerConstraint = pPrimarySite->powerConstraint;
-		regulatoryDomain_setParam(pSiteMgr->hRegulatoryDomain, pParam);
-	}
-
-
-	/***************** Config MeasurementMgr object **************************/
-    capabilities = pPrimarySite->capabilities;
-
-    /* Updating the Measurement Module Mode */
-    measurementMgr_setMeasurementMode(pSiteMgr->hMeasurementMgr, capabilities, 
-									pIeBuffer, PktLength);
-    os_memoryFree(pSiteMgr->hOs, curRsnData, MAX_RSN_DATA_SIZE);
-    os_memoryFree(pSiteMgr->hOs, pParam, sizeof(paramInfo_t));
-	return TI_OK;
-}
-
diff --git a/wl1271/stad/src/Sta_Management/templates.c b/wl1271/stad/src/Sta_Management/templates.c
deleted file mode 100644
index ec86c61..0000000
--- a/wl1271/stad/src/Sta_Management/templates.c
+++ /dev/null
@@ -1,875 +0,0 @@
-/*
- * templates.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file reportReplvl.c
- *  \brief Report level implementation
- *
- *  \see reportReplvl.h
- */
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	reportReplvl.c											   */
-/*    PURPOSE:	Report level implementation	 							   */
-/*																		   */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_88
-#include "tidef.h"
-#include "report.h"
-#include "osApi.h"
-#include "siteHash.h"
-#include "rate.h"
-#include "rsnApi.h"
-#include "regulatoryDomainApi.h"
-#include "siteMgrApi.h"
-#include "TWDriver.h"
-#include "StaCap.h"
-#include "qosMngr_API.h"
-
-/********************************************/
-/*		Functions Implementation 			*/
-/********************************************/
-
-/************************************************************************
- *                        buildNullTemplate								*
- ************************************************************************
-DESCRIPTION: This function build a NULL data template to set to the HAL 
-				when joining an infrastructure network
-				performs the following:
-				-	Build a template & set the template len, the template type is set in the site mgr
-                                                                                                   
-INPUT:      pSiteMgr	-	Handle to site manager	
-			pTemplate	-	Pointer to the template structure		
-
-
-OUTPUT:		
-
-
-RETURN:     TI_OK
-
-************************************************************************/
-TI_STATUS buildNullTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate)
-{
-	paramInfo_t			param;
-	nullDataTemplate_t	*pBuffer = (nullDataTemplate_t	*)pTemplate->ptr;
-	siteEntry_t			*pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-	TI_UINT16				fc;
-
-	os_memoryZero(pSiteMgr->hOs, pBuffer, sizeof(nullDataTemplate_t));
-
-	/*
-	 * Header First
-	 */
-	/* Set destination address */
-	MAC_COPY (pBuffer->hdr.DA, pPrimarySite->bssid);  
-
-	/* Set BSSID address */
-	MAC_COPY (pBuffer->hdr.BSSID, pPrimarySite->bssid);  
-
-	/* Build Source address */
-	param.paramType = CTRL_DATA_MAC_ADDRESS;
-	ctrlData_getParam(pSiteMgr->hCtrlData, &param);
-	MAC_COPY (pBuffer->hdr.SA, param.content.ctrlDataDeviceMacAddress);  
-	
-	fc = DOT11_FC_DATA_NULL_FUNCTION;
-	fc |= (TI_TRUE << DOT11_FC_TO_DS_SHIFT);
-
-	COPY_WLAN_WORD(&pBuffer->hdr.fc, &fc); /* copy with endianess handling. */
-
-	pTemplate->len = sizeof(dot11_mgmtHeader_t);	
-	return TI_OK;
-}
-
-/************************************************************************
- *                        buildDisconnTemplate								*
- ************************************************************************
-DESCRIPTION: This function build a Death/Disassoc template to set to the HAL 
-				when joining an infrastructure network
-				performs the following:
-				-	Build a template & set the template len, the template type is set in the site mgr
-                                                                                                   
-INPUT:      pSiteMgr	-	Handle to site manager	
-			pTemplate	-	Pointer to the template structure		
-
-
-OUTPUT:		
-
-
-RETURN:     TI_OK
-
-************************************************************************/
-TI_STATUS buildDisconnTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate)
-{
-	paramInfo_t			param;
-	TI_UINT32				size;
-	disconnTemplate_t	*pBuffer = (disconnTemplate_t	*)pTemplate->ptr;
-	siteEntry_t			*pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-	TI_UINT16				fc;
-
-	os_memoryZero(pSiteMgr->hOs, pBuffer, sizeof(disconnTemplate_t));
-
-	/*
-	 * Header First
-	 */
-	/* Set destination address */
-	MAC_COPY (pBuffer->hdr.DA, pPrimarySite->bssid);  
-
-	/* Set BSSID address */
-	MAC_COPY (pBuffer->hdr.BSSID, pPrimarySite->bssid);  
-
-	/* Build Source address */
-	param.paramType = CTRL_DATA_MAC_ADDRESS;
-	ctrlData_getParam(pSiteMgr->hCtrlData, &param);
-	MAC_COPY (pBuffer->hdr.SA, param.content.ctrlDataDeviceMacAddress);  
-	
-	fc = DOT11_FC_DISASSOC; /* will be change by firmware to DOT11_FC_DEAUTH if needed */
-
-	COPY_WLAN_WORD(&pBuffer->hdr.fc, &fc); /* copy with endianess handling. */
-
-	pBuffer->disconnReason = 0; /* filled by firmware */
-	
-	size = sizeof(disconnTemplate_t);
-
-	pTemplate->len = size;
-	
-	return TI_OK;
-}
-
-/** 
- * \fn     setDefaultProbeReqTemplate 
- * \brief  set Default Probe Req Template tp the FW.
- * 
- * set Default Probe Req Template tp the FW.
- * 
- * \param  hSiteMgr	-	Handle to site manager 
- * \return None
- * \sa     
- */ 
-void setDefaultProbeReqTemplate (TI_HANDLE	hSiteMgr)
-{
-    siteMgr_t	*pSiteMgr = (siteMgr_t *)hSiteMgr;
-    TSetTemplate        tTemplateStruct;
-    probeReqTemplate_t  tProbeReqTemplate;
-    TSsid               tBroadcastSSID;
-
-    /* 
-     * Setting probe request temapltes for both bands.
-     * allocating EMPTY 32 bytes for the SSID IE, to reserve space for different SSIDs the FW will set
-     */
-    tBroadcastSSID.len = MAX_SSID_LEN;
-    os_memorySet (pSiteMgr->hOs, &(tBroadcastSSID.str[ 0 ]), 0, MAX_SSID_LEN);
-    tTemplateStruct.ptr = (TI_UINT8 *)&tProbeReqTemplate;
-    tTemplateStruct.type = PROBE_REQUEST_TEMPLATE;
-    tTemplateStruct.eBand = RADIO_BAND_2_4_GHZ;
-    tTemplateStruct.uRateMask = RATE_MASK_UNSPECIFIED;
-    buildProbeReqTemplate (hSiteMgr, &tTemplateStruct, &tBroadcastSSID, RADIO_BAND_2_4_GHZ);
-    TWD_CmdTemplate (pSiteMgr->hTWD, &tTemplateStruct, NULL, NULL);
-    tTemplateStruct.eBand = RADIO_BAND_5_0_GHZ;
-    buildProbeReqTemplate (hSiteMgr, &tTemplateStruct, &tBroadcastSSID, RADIO_BAND_5_0_GHZ);
-    TWD_CmdTemplate (pSiteMgr->hTWD, &tTemplateStruct, NULL, NULL);
-}
-
-/************************************************************************
- *                        buildProbeReqTemplate							*
- ************************************************************************
-DESCRIPTION: This function build a probe request template to set to the HAL in the scan process.
-				performs the following:
-				-	Build a template & set the template len, the template type is set in the site mgr
-                                                                                                   
-INPUT:      pSiteMgr	-	Handle to site manager	
-			pTemplate	-	Pointer to the template structure		
-			pSsid		-	Desired SSID
-
-
-OUTPUT:		
-
-
-RETURN:     TI_OK
-
-************************************************************************/
-TI_STATUS buildProbeReqTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate, TSsid *pSsid, ERadioBand radioBand)
-{
-	paramInfo_t			param;
-	char				*pBuf;
-	int i;
-	probeReqTemplate_t	*pBuffer = (probeReqTemplate_t	*)pTemplate->ptr;
-	TI_UINT32			 size;
-	dot11_RATES_t		*pDot11Rates;	
-	TI_UINT32			 len = 0, ofdmIndex = 0;
-	TI_UINT32			 suppRatesLen, extSuppRatesLen;
-	TI_UINT8			 ratesBuf[DOT11_MAX_SUPPORTED_RATES];
-#ifndef SUPPL_WPS_SUPPORT
-	TI_UINT8             WSCOuiIe[DOT11_OUI_LEN] = { 0x00, 0x50, 0xf2, 0x04};
-#endif
-	TI_UINT32			 supportedRateMask,basicRateMask;	
-	TI_UINT16			 fc = DOT11_FC_PROBE_REQ;
-
-	os_memoryZero(pSiteMgr->hOs, pBuffer, sizeof(probeReqTemplate_t));
-
-	/*
-	 * Header First
-	 */
-	/* Set destination address */
-	for (i = 0; i < MAC_ADDR_LEN; i++)
-		pBuffer->hdr.DA[i] = 0xFF;
-
-	/* Set BSSID address */
-
-	for (i = 0; i < MAC_ADDR_LEN; i++)
-		pBuffer->hdr.BSSID[i] = 0xFF;
- 
-
-	/* Build Source address */
-	param.paramType = CTRL_DATA_MAC_ADDRESS;
-	ctrlData_getParam(pSiteMgr->hCtrlData, &param);
-	MAC_COPY (pBuffer->hdr.SA, param.content.ctrlDataDeviceMacAddress);  
-	
-	COPY_WLAN_WORD(&pBuffer->hdr.fc, &fc); /* copy with endianess handling. */
-
-	size = sizeof(dot11_mgmtHeader_t);
-	pBuf = (char *)&(pBuffer->infoElements);
-	
-   /*
-	* Informataion elements
-	*/
-	/* SSID */
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pSsid->len > MAX_SSID_LEN )
-    {
-        TRACE2( pSiteMgr->hReport, REPORT_SEVERITY_ERROR,
-               "buildProbeReqTemplate. pSsid->len=%d exceeds the limit %d\n",
-               pSsid->len, MAX_SSID_LEN);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return TI_NOK;
-    }
-	((dot11_SSID_t *)(pBuf))->hdr[0] = DOT11_SSID_ELE_ID;
-	((dot11_SSID_t *)(pBuf))->hdr[1] = pSsid->len;
-	os_memoryCopy(pSiteMgr->hOs, pBuf + sizeof(dot11_eleHdr_t), (void *)pSsid->str, pSsid->len);
-	size += sizeof(dot11_eleHdr_t) + pSsid->len;
-	pBuf += sizeof(dot11_eleHdr_t) + pSsid->len;
-
-	/* Rates */
-	pDot11Rates = (dot11_RATES_t *) pBuf;
-
-    /* 
-     * Supported rates in probe request will always use the default rates for BG or A bands,
-     * regardless of the STA desired rates.
-     */
-    if (radioBand == RADIO_BAND_2_4_GHZ)
-	{
-        /* Basic rates: 1,2,5.5,11 */  
-		basicRateMask = rate_BasicToDrvBitmap((EBasicRateSet)(pSiteMgr->pDesiredParams->siteMgrRegstryBasicRate[DOT11_G_MODE]), TI_FALSE);
-        /* Extended: 6,9,12,18,24,36,48,54 */
-        supportedRateMask = rate_SupportedToDrvBitmap((ESupportedRateSet)(pSiteMgr->pDesiredParams->siteMgrRegstrySuppRate[DOT11_G_MODE]), TI_FALSE);
-    }
-    else if (radioBand == RADIO_BAND_5_0_GHZ)
-    {   /* Basic rates: 6,12,24 */
-        basicRateMask = rate_BasicToDrvBitmap((EBasicRateSet)(pSiteMgr->pDesiredParams->siteMgrRegstryBasicRate[DOT11_A_MODE]), TI_TRUE);
-         /* Extended: 9,18,24,36,48,54 */
-        supportedRateMask = rate_SupportedToDrvBitmap((ESupportedRateSet)(pSiteMgr->pDesiredParams->siteMgrRegstrySuppRate[DOT11_A_MODE]), TI_TRUE);
-	}
-	else
-	{
-        TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "buildProbeReqTemplate, radioBand =%d ???\n",radioBand);
-        /* Use default and pray for the best */
-        /* Basic rates: 1,2,5.5,11 */  
-        basicRateMask = rate_BasicToDrvBitmap(BASIC_RATE_SET_1_2_5_5_11, TI_FALSE);
-        /* Extended: 6,9,12,18,24,36,48,54 */
-        supportedRateMask = rate_SupportedToDrvBitmap(SUPPORTED_RATE_SET_UP_TO_54, TI_FALSE);
-	}
-	
-	rate_DrvBitmapToNetStr (supportedRateMask, basicRateMask, ratesBuf, &len, &ofdmIndex);
-
-    TRACE5(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "buildProbeReqTemplate, supportedRateMask=0x%x, basicRateMask=0x%x, len=%d, ofdmIndex=%d, radioBand =%d\n",							 supportedRateMask,basicRateMask,len, ofdmIndex, radioBand);
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( len > DOT11_MAX_SUPPORTED_RATES )
-    {
-        TRACE2( pSiteMgr->hReport, REPORT_SEVERITY_ERROR,
-           "buildProbeReqTemplate. len=%d exceeds the limit %d\n",
-               len, DOT11_MAX_SUPPORTED_RATES);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return TI_NOK;
-    }
-    if(radioBand == RADIO_BAND_5_0_GHZ ||
-       pSiteMgr->pDesiredParams->siteMgrUseDraftNum == DRAFT_5_AND_EARLIER ||
-	   ofdmIndex == len)
-	{
-		pDot11Rates->hdr[0] = DOT11_SUPPORTED_RATES_ELE_ID;
-		pDot11Rates->hdr[1] = len;
-		os_memoryCopy(pSiteMgr->hOs, (void *)pDot11Rates->rates, ratesBuf, pDot11Rates->hdr[1]);
-		size += pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);
-		pBuf += pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);		
-	}
-	else
-	{
-		pDot11Rates->hdr[0] = DOT11_SUPPORTED_RATES_ELE_ID;
-		pDot11Rates->hdr[1] = ofdmIndex;
-		os_memoryCopy(pSiteMgr->hOs, (void *)pDot11Rates->rates, ratesBuf, pDot11Rates->hdr[1]);
-		suppRatesLen = pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);
-		pDot11Rates = (dot11_RATES_t *) (pBuf + suppRatesLen); 
-		pDot11Rates->hdr[0] = DOT11_EXT_SUPPORTED_RATES_ELE_ID;
-		pDot11Rates->hdr[1] = len - ofdmIndex;
-		os_memoryCopy(pSiteMgr->hOs, (void *)pDot11Rates->rates, &ratesBuf[ofdmIndex], pDot11Rates->hdr[1]);
-		extSuppRatesLen = pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);
-		size += suppRatesLen + extSuppRatesLen;
-		pBuf += suppRatesLen + extSuppRatesLen;		
-	}
-
-
-    /* add HT capabilities IE */
-    StaCap_GetHtCapabilitiesIe (pSiteMgr->hStaCap, (TI_UINT8 *)pBuf, &len);
-    size += len;
-    pBuf += len;
-
-#ifndef SUPPL_WPS_SUPPORT
-    /* WiFi Simple Config */
-    if (pSiteMgr->includeWSCinProbeReq && (pSiteMgr->siteMgrWSCCurrMode != TIWLN_SIMPLE_CONFIG_OFF))
-    {
-        ((dot11_WSC_t *)pBuf)->hdr[0] = DOT11_WSC_PARAM_ELE_ID;
-        ((dot11_WSC_t *)pBuf)->hdr[1] = pSiteMgr->uWscIeSize + DOT11_OUI_LEN;
-        pBuf += sizeof(dot11_eleHdr_t);
-        os_memoryCopy(pSiteMgr->hOs, pBuf, &WSCOuiIe, DOT11_OUI_LEN);
-        os_memoryCopy(pSiteMgr->hOs, 
-                      pBuf + DOT11_OUI_LEN, 
-                      &pSiteMgr->siteMgrWSCProbeReqParams, 
-                      pSiteMgr->uWscIeSize);
-        size += sizeof(dot11_eleHdr_t) + pSiteMgr->uWscIeSize + DOT11_OUI_LEN;
-        pBuf += sizeof(dot11_eleHdr_t) + pSiteMgr->uWscIeSize + DOT11_OUI_LEN;	
-    }
-#endif /* SUPPL_WPS_SUPPORT */
-
-	pTemplate->len = size;
-	
-	return TI_OK;
-}
-
-/************************************************************************
- *                        buildProbeRspTemplate							*
- ************************************************************************
-DESCRIPTION: This function build a probe response template to set to the HAL 
-				when joining an IBSS network.
-				performs the following:
-				-	Build a template & set the template len, the template type is set in the site mgr
-				-	The template is built based on the chosen site attributes
-
-			NOTE: This function is used to build beacon template too.
-			The site manager set the template type (after thos function returns) to beacon or probe response accordingly.
-                                                                                                   
-INPUT:      pSiteMgr	-	Handle to site manager	
-			pTemplate	-	Pointer to the template structure		
-
-
-OUTPUT:		
-
-
-RETURN:     TI_OK
-
-************************************************************************/
-TI_STATUS buildProbeRspTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate)
-{
-	paramInfo_t			param;
-	TI_UINT8			*pBuf;
-	probeRspTemplate_t	*pBuffer = (probeRspTemplate_t	*)pTemplate->ptr;
-	siteEntry_t			*pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-	TI_INT32			i, j;
-	TI_UINT32			size;
-	dot11_RATES_t		*pDot11Rates;
-	dot11_ERP_t         *pdot11Erp;
-	TI_UINT32			len = 0, ofdmIndex = 0;
-	TI_BOOL				extRates = TI_FALSE;
-	TI_BOOL             useProtection,NonErpPresent,barkerPreambleType;
-	TCountry			*pCountry = NULL;
-	TI_UINT8			ratesBuf[DOT11_MAX_SUPPORTED_RATES];
-	TI_UINT32			supportedRateMask,basicRateMask;
-	TI_UINT16			headerFC = DOT11_FC_PROBE_RESP;
-
-	os_memoryZero(pSiteMgr->hOs, pBuffer, sizeof(probeRspTemplate_t));
-
-
-	/*
-	 * Build WLAN Header:
-	 * ==================
-	 */
-
-	/* Set destination address */
-	for (i = 0; i < MAC_ADDR_LEN; i++)
-		pBuffer->hdr.DA[i] = 0xFF;
-
-	/* Set BSSID address */
-	MAC_COPY (pBuffer->hdr.BSSID, pPrimarySite->bssid);  
-
-	/* Build Source address */
-	param.paramType = CTRL_DATA_MAC_ADDRESS;
-	ctrlData_getParam(pSiteMgr->hCtrlData, &param);
-	MAC_COPY (pBuffer->hdr.SA, param.content.ctrlDataDeviceMacAddress);  
-	
-    COPY_WLAN_WORD(&pBuffer->hdr.fc, &headerFC);
-
-	size = sizeof(dot11_mgmtHeader_t);
-	pBuf = (TI_UINT8 *)pBuffer->timeStamp;
-   /*
-	* Fixed Fields
-	*/
-	/* we skip the timestamp field */
-	size += TIME_STAMP_LEN;
-	pBuf += TIME_STAMP_LEN;
-
-	/* Beacon interval */
-    COPY_WLAN_WORD(pBuf, &pPrimarySite->beaconInterval);
-	size += FIX_FIELD_LEN;
-	pBuf += FIX_FIELD_LEN;
-
-	/* capabilities */
-    COPY_WLAN_WORD(pBuf, &pPrimarySite->capabilities);
-	size += FIX_FIELD_LEN;
-	pBuf += FIX_FIELD_LEN;
-
-	/*
-	 * Build Informataion Elements:
-	 * ============================
-	 */
-
-	/* SSID IE */
-    /* It looks like it never happens. Anyway decided to check */
-    if ( pPrimarySite->ssid.len > MAX_SSID_LEN )
-    {
-        TRACE2( pSiteMgr->hReport, REPORT_SEVERITY_ERROR,
-               "buildProbeRspTemplate. pPrimarySite->ssid.len=%d exceeds the limit %d\n",
-               pPrimarySite->ssid.len, MAX_SSID_LEN);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return TI_NOK;
-    }
-	((dot11_SSID_t *)(pBuf))->hdr[0] = DOT11_SSID_ELE_ID;
-	((dot11_SSID_t *)(pBuf))->hdr[1] = pPrimarySite->ssid.len;
-	os_memoryCopy(pSiteMgr->hOs, pBuf + sizeof(dot11_eleHdr_t), (void *)pPrimarySite->ssid.str, pPrimarySite->ssid.len);
-	size += sizeof(dot11_eleHdr_t) + pPrimarySite->ssid.len;
-	pBuf += sizeof(dot11_eleHdr_t) + pPrimarySite->ssid.len;
-
-
-	/* Rates IE */
-
-	pDot11Rates = (dot11_RATES_t *) pBuf;
-
-	if (pPrimarySite->channel == SPECIAL_BG_CHANNEL) 
-	{
-		supportedRateMask = rate_GetDrvBitmapForDefaultSupporteSet ();
-		basicRateMask	  = rate_GetDrvBitmapForDefaultBasicSet ();
-	}
-	else
-	{
-		supportedRateMask = pSiteMgr->pDesiredParams->siteMgrMatchedSuppRateMask;
-		basicRateMask     = pSiteMgr->pDesiredParams->siteMgrMatchedBasicRateMask;
-	}
-	
-	rate_DrvBitmapToNetStr (supportedRateMask, basicRateMask, ratesBuf, &len, &ofdmIndex);
-
-    if(pSiteMgr->siteMgrOperationalMode != DOT11_G_MODE ||
-       pSiteMgr->pDesiredParams->siteMgrUseDraftNum == DRAFT_5_AND_EARLIER ||
-	   ofdmIndex == len)
-	{
-		pDot11Rates->hdr[0] = DOT11_SUPPORTED_RATES_ELE_ID;
-		pDot11Rates->hdr[1] = len;
-		os_memoryCopy(pSiteMgr->hOs, (void *)pDot11Rates->rates, ratesBuf, pDot11Rates->hdr[1]);
-		size += pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);
-		pBuf += pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);		
-	}
-	else
-	{
-		pDot11Rates->hdr[0] = DOT11_SUPPORTED_RATES_ELE_ID;
-		pDot11Rates->hdr[1] = ofdmIndex;
-		os_memoryCopy(pSiteMgr->hOs, (void *)pDot11Rates->rates, ratesBuf, pDot11Rates->hdr[1]);
-		size += pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);
-		pBuf += pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);
-		extRates = TI_TRUE;
-	}
-
-	/* DS IE */
-	((dot11_DS_PARAMS_t *)(pBuf))->hdr[0] = DOT11_DS_PARAMS_ELE_ID;
-	((dot11_DS_PARAMS_t *)(pBuf))->hdr[1] = DOT11_DS_PARAMS_ELE_LEN;
-	((dot11_DS_PARAMS_t *)(pBuf))->currChannel = pPrimarySite->channel;
-	size += sizeof(dot11_eleHdr_t) + DOT11_DS_PARAMS_ELE_LEN;
-	pBuf += sizeof(dot11_eleHdr_t) + DOT11_DS_PARAMS_ELE_LEN;
-
-	/* IBSS IE */
-	((dot11_IBSS_PARAMS_t *)(pBuf))->hdr[0] = DOT11_IBSS_PARAMS_ELE_ID;
-	((dot11_IBSS_PARAMS_t *)(pBuf))->hdr[1] = DOT11_IBSS_PARAMS_ELE_LEN;
-	COPY_WLAN_WORD(&((dot11_IBSS_PARAMS_t *)(pBuf))->atimWindow, &pPrimarySite->atimWindow);
-	size += sizeof(dot11_eleHdr_t) + DOT11_IBSS_PARAMS_ELE_LEN;
-	pBuf += sizeof(dot11_eleHdr_t) + DOT11_IBSS_PARAMS_ELE_LEN;
-
-	/* Country IE */
-	param.paramType = REGULATORY_DOMAIN_ENABLED_PARAM;
-	regulatoryDomain_getParam(pSiteMgr->hRegulatoryDomain,&param);
-
-	if(	param.content.regulatoryDomainEnabled == TI_TRUE )
-	{
-        /* get country IE */
-        param.paramType = REGULATORY_DOMAIN_COUNTRY_PARAM;
-		regulatoryDomain_getParam(pSiteMgr->hRegulatoryDomain, &param);
-		pCountry = param.content.pCountry;
-
-        /* Check if a country IE was found */
-		if(pCountry != NULL)
-		{
-			*pBuf = DOT11_COUNTRY_ELE_ID;
-			pBuf++;
-			size++;
-			*pBuf = (TI_UINT8)(pCountry->len);
-			pBuf++;
-			size++;
-			
-			/* Note: The country structure is not byte-aligned so it is copied as follows to ensure
-			           that there are no gaps in the output structure (pBuf). */
-
-			os_memoryCopy(pSiteMgr->hOs, pBuf , &pCountry->countryIE.CountryString, DOT11_COUNTRY_STRING_LEN);
-			pBuf += DOT11_COUNTRY_STRING_LEN;
-			size += DOT11_COUNTRY_STRING_LEN;
-
-			/* Loop on all tripletChannels. Each item has three fields ('i' counts rows and 'j' counts bytes). */
-			for (i = 0, j = 0;  j < (pCountry->len - DOT11_COUNTRY_STRING_LEN);  i++, j+=3)
-			{
-				*(pBuf + j    ) = pCountry->countryIE.tripletChannels[i].firstChannelNumber;
-				*(pBuf + j + 1) = pCountry->countryIE.tripletChannels[i].maxTxPowerLevel;
-				*(pBuf + j + 2) = pCountry->countryIE.tripletChannels[i].numberOfChannels;
-			}
-
-			pBuf += (pCountry->len - DOT11_COUNTRY_STRING_LEN);
-			size += (pCountry->len - DOT11_COUNTRY_STRING_LEN);
-		}
-	}
-	 
-	/*ERP IE*/
-	siteMgr_IsERP_Needed(pSiteMgr,&useProtection,&NonErpPresent,&barkerPreambleType);
-	if (useProtection || NonErpPresent || barkerPreambleType)
-	{
-		pdot11Erp = (dot11_ERP_t *) pBuf;
-		pdot11Erp->hdr[0] = DOT11_ERP_IE_ID;
-		pdot11Erp->hdr[1] = 1;
-		pdot11Erp->ctrl = 0;
-		if (NonErpPresent)
-			pdot11Erp->ctrl |= ERP_IE_NON_ERP_PRESENT_MASK;
-		if (useProtection)
-			pdot11Erp->ctrl |= ERP_IE_USE_PROTECTION_MASK;
-		if (barkerPreambleType)
-			pdot11Erp->ctrl |= ERP_IE_BARKER_PREAMBLE_MODE_MASK;
-		size += pdot11Erp->hdr[1] + sizeof(dot11_eleHdr_t);
-		pBuf += pdot11Erp->hdr[1] + sizeof(dot11_eleHdr_t);
-		
-	}
-
-
-	/* Extended supported rates IE */
-	if(extRates)
-	{
-		pDot11Rates = (dot11_RATES_t *) pBuf;
-		pDot11Rates->hdr[0] = DOT11_EXT_SUPPORTED_RATES_ELE_ID;
-		pDot11Rates->hdr[1] = len - ofdmIndex;
-		os_memoryCopy(pSiteMgr->hOs, (void *)pDot11Rates->rates, &ratesBuf[ofdmIndex], pDot11Rates->hdr[1]);
-		size += pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);
-		pBuf += pDot11Rates->hdr[1] + sizeof(dot11_eleHdr_t);	
-	}
-
-    /* no need to insert RSN information elements */
-		 
-	pTemplate->len = size;
-TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "Probe response template len = %d\n",size);
-	
-	return TI_OK;
-}
-
-/************************************************************************
- *                        buildPsPollTemplate							*
- ************************************************************************
-DESCRIPTION: This function build a ps poll template
-				performs the following:
-				-	Build a template & set the template len, the template type is set in the site mgr
-                                                                                                   
-INPUT:      pSiteMgr	-	Handle to site manager	
-			pTemplate	-	Pointer to the template structure		
-			pSsid		-	Desired SSID
-
-OUTPUT:		
-
-RETURN:     TI_OK
-************************************************************************/
-TI_STATUS buildPsPollTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate)
-{
-    paramInfo_t			param;
-    TTwdParamInfo       tTwdParam;
-	TI_UINT32				size;
-	psPollTemplate_t	*pBuffer = (psPollTemplate_t *)pTemplate->ptr;
-	siteEntry_t			*pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-	TI_UINT16				fc;
-
-	os_memoryZero(pSiteMgr->hOs, pBuffer, sizeof(psPollTemplate_t));
-
-	/*
-	 * Header First
-	 */
-	
-	/* Set BSSID address */
-	MAC_COPY (pBuffer->hdr.BSSID, pPrimarySite->bssid);  
-
-	/* Build Source address */
-	param.paramType = CTRL_DATA_MAC_ADDRESS;
-	ctrlData_getParam(pSiteMgr->hCtrlData, &param);
-	MAC_COPY (pBuffer->hdr.TA, param.content.ctrlDataDeviceMacAddress);  
-	
-    /*
-    **   Building the Frame Control word (16 bits)
-    ** ---------------------------------------------
-    ** Type = Control
-    ** SubType = Power Save (PS) POLL,  */
-    fc = DOT11_FC_PS_POLL;
-    /*
-    ** setting the Power Management bit in the Frame control field
-    ** to be "Power Save mode"
-    */
-    fc |= (0x1 << DOT11_FC_PWR_MGMT_SHIFT);
-
-	COPY_WLAN_WORD(&pBuffer->hdr.fc, &fc); /* copy with endianess handling. */
-
-    /*
-    **   Association ID
-    ** -----------------
-    */
-    tTwdParam.paramType = TWD_AID_PARAM_ID;
-    TWD_GetParam (pSiteMgr->hTWD, &tTwdParam);
-
-    /* AID should have its two MSB bit Set to "1"*/
-    pBuffer->hdr.AID = tTwdParam.content.halCtrlAid | 0xC000;
-
-	size = sizeof(dot11_PsPollFrameHeader_t);
-
-	pTemplate->len = size;
-
-	return TI_OK;
-}
-
-
-/************************************************************************
- *                        buildQosNullDataTemplate							*
- ************************************************************************
-DESCRIPTION: This function build a qos null data template
-				performs the following:
-				-	Build a template & set the template len, the template type is set in the site mgr
-                                                                                                   
-INPUT:      pSiteMgr	-	Handle to site manager	
-			pTemplate	-	Pointer to the template structure		
-			pSsid		-	Desired SSID
-
-OUTPUT:		
-
-RETURN:     TI_OK
-************************************************************************/
-TI_STATUS buildQosNullDataTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate, TI_UINT8 userPriority)
-{
-	paramInfo_t			param;
-	TI_UINT32				size;
-	QosNullDataTemplate_t	*pBuffer = (QosNullDataTemplate_t	*)pTemplate->ptr;
-	siteEntry_t			*pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-	TI_UINT16				fc;
-	TI_UINT16				qosControl;
-
-	os_memoryZero(pSiteMgr->hOs, pBuffer, sizeof(QosNullDataTemplate_t));
-
-	/*
-	 * Header First
-	 */
-	/* Set destination address */
-    if (pPrimarySite)
-    {
-	  MAC_COPY (pBuffer->hdr.address1, pPrimarySite->bssid);  
-
-	  /* Set BSSID address */
-	  MAC_COPY (pBuffer->hdr.address3, pPrimarySite->bssid);  
-    }
-    else
-    {
-TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "No Primary site so cannot fill QosNullData template\n");
-    }
-
-	/* Build Source address */
-	param.paramType = CTRL_DATA_MAC_ADDRESS;
-	ctrlData_getParam(pSiteMgr->hCtrlData, &param);
-	MAC_COPY (pBuffer->hdr.address2, param.content.ctrlDataDeviceMacAddress);  
-
-	fc = DOT11_FC_DATA_NULL_QOS | (1 << DOT11_FC_TO_DS_SHIFT);
-	COPY_WLAN_WORD(&pBuffer->hdr.fc, &fc); /* copy with endianess handling. */
-
-    qosControl = (TI_UINT16)userPriority;
-	qosControl <<= QOS_CONTROL_UP_SHIFT;
-	COPY_WLAN_WORD(&pBuffer->hdr.qosControl, &qosControl); /* copy with endianess handling. */
-
-	size = WLAN_QOS_HDR_LEN;
-
-	pTemplate->len = size;
-	
-	return TI_OK;    
-}
-
-
-/************************************************************************
- *                        buildArpRspTemplate							*
- ************************************************************************
-DESCRIPTION: This function builds an ARP Response template to set to 
-			 the HAL when joining an infrastructure network.
-
-             The function's steps:
-             - It builds the template & set the template len. 
-             - If QoS is inactive, it discards the QoS Control Field.
-             ** The template type is set in the site mgr.
-                                           
-INPUT:       pSiteMgr  - Handle to site manager.
-			 pTemplate - Pointer to the template structure.
-
-
-OUTPUT:		
-
-
-RETURN:     TI_OK
-
-************************************************************************/
-TI_STATUS buildArpRspTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate, TIpAddr staIp)
-{
-	siteEntry_t		   *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
-	ArpRspTemplate_t   *pBuffer      = (ArpRspTemplate_t *)pTemplate->ptr;
-	TI_UINT8           *ptr          = (TI_UINT8 *)pBuffer;
-
-	paramInfo_t         param;          /* To get Site and QoS params */
-	TI_UINT16           fc;             /* Frame Control field in MAC header */
-	TI_UINT16           macAddrItr;
-	TI_BOOL   			privacyInvoked;
-	TI_UINT8  			encryptionFieldSize, copyPayloadOffset, lenToCopy;
-
-
-
-	/* Reset the buffer */
-	os_memoryZero(pSiteMgr->hOs, pBuffer, sizeof(ArpRspTemplate_t));
-
-
-	/* Turn on the To_DS bit in the Frame Control field */
-	fc = (1 << DOT11_FC_TO_DS_SHIFT);
-
-    /* Set MAC header address fields:
-		-----------------------------
-		Since To_DS is on and From_DS is off the address meaning is as follows:
-		Address1 - BSSID
-		Address2 - Source Address
-		Address3 - Destination Address
-		Address4 - Not present */
-
-	/* - Set BSSID */
-    if (pPrimarySite)
-	{
-		MAC_COPY (pBuffer->hdr.address1, pPrimarySite->bssid);
-	}
-	else
-	{
-		TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "No Primary site so cannot fill QosNullData template.\n");
-	}
-    /* - Set Source Address */
-    param.paramType = CTRL_DATA_MAC_ADDRESS;
-    ctrlData_getParam(pSiteMgr->hCtrlData, &param);
-	MAC_COPY (pBuffer->hdr.address2, param.content.ctrlDataDeviceMacAddress);
-	/* - Set Destination Address: ARP response should be sent with broadcast DA - Set accordingly */
-	for (macAddrItr = 0; macAddrItr < MAC_ADDR_LEN; macAddrItr++)
-    {
-        pBuffer->hdr.address3[macAddrItr] = 0xFF;
-    }
-
-    pBuffer->LLC.DSAP    = 0xaa;
-    pBuffer->LLC.SSAP    = 0xaa;
-    pBuffer->LLC.Control = 0x03;
-
-	/* pBuffer->LLC.Control.OUI these 3 bytes are zeroed already */
-    pBuffer->LLC.Type = WLANTOHS((TI_UINT16)0x806);
-    pBuffer->hardType = WLANTOHS((TI_UINT16)1);
-    pBuffer->protType = WLANTOHS((TI_UINT16)0x800);
-    pBuffer->hardSize = 6;
-    pBuffer->protSize = 4;
-    pBuffer->op       = WLANTOHS((TI_UINT16)2); /*filled as for ARP-RSP, not for RARP_RSP */
-
-	MAC_COPY(pBuffer->StaMac, pBuffer->hdr.address2);
-    IP_COPY(pBuffer->StaIp, staIp);
-    
-    pTemplate->len = sizeof(ArpRspTemplate_t);
-
-
-	/* Get encryption status */
-    txCtrlParams_getCurrentEncryptionInfo (pSiteMgr->hTxCtrl,  &privacyInvoked, &encryptionFieldSize);
-
-    /* If no encryption is used, encryptionFieldSize has garbage value */
-    encryptionFieldSize = privacyInvoked ? encryptionFieldSize : 0;
-
-	/* Set the subtype field of fc with WEP_BIT */
-	fc |= (privacyInvoked << DOT11_FC_WEP_SHIFT);
-	
-
-    /* Get QoS type to check if QoS is active */
-    param.paramType = QOS_MNGR_ACTIVE_PROTOCOL;
-    qosMngr_getParams(pSiteMgr->hQosMngr, &param);
-
-
-    if(param.content.qosSiteProtocol == QOS_NONE)   /* QoS is not active */
-    {
-		copyPayloadOffset = sizeof(pBuffer->hdr.qosControl) + AES_AFTER_HEADER_FIELD_SIZE - encryptionFieldSize;
-        /* Set the subtype field of fc with DATA value (non Qos) */
-        fc |= DOT11_FC_DATA;
-    }
-    else    /* QoS is active */
-    {
-		copyPayloadOffset = AES_AFTER_HEADER_FIELD_SIZE - encryptionFieldSize;
-        /* Set the subtype field of fc with DATA_QOS */
-        fc |= DOT11_FC_DATA_QOS;
-    }
-
-        
-    /* Need to copy backward to overwrite security or QoS offset */
-    if (copyPayloadOffset > 0)   
-    {  
-		ptr = (TI_UINT8 *)&pBuffer->LLC.DSAP;
-        /* Copy back the actual payload without header & security */
-        lenToCopy = sizeof(ArpRspTemplate_t) - sizeof(dot11_header_t) - AES_AFTER_HEADER_FIELD_SIZE;
-
-        os_memoryCopy(pSiteMgr->hOs, ptr - copyPayloadOffset, ptr, lenToCopy);  
-        pTemplate->len -= copyPayloadOffset;   
-    }
-
-
-    COPY_WLAN_WORD(&pBuffer->hdr.fc, &fc); /* copy with endianess handling. */
-
-	return TI_OK;
-}
diff --git a/wl1271/stad/src/Sta_Management/trafficAdmControl.c b/wl1271/stad/src/Sta_Management/trafficAdmControl.c
deleted file mode 100644
index 180117f..0000000
--- a/wl1271/stad/src/Sta_Management/trafficAdmControl.c
+++ /dev/null
@@ -1,1318 +0,0 @@
-/*
- * trafficAdmControl.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*	  MODULE:	admCtrlQos.c											   */
-/*    PURPOSE:	WSM/WME admission Control							       */
-/*																	 	   */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_89
-#include "osApi.h"
-
-#include "paramOut.h"
-
-#include "timer.h"
-#include "fsm.h"
-#include "report.h"
-
-#include "DataCtrl_Api.h"
-
-#include "trafficAdmControl.h"
-#include "qosMngr_API.h"
-#include "TWDriver.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "XCCMngr.h"
-#endif
-/* Constants */
-
-/** number of states in the state machine */
-#define	TRAFFIC_ADM_CTRL_SM_NUM_STATES		2
-
-/** number of events in the state machine */
-#define	TRAFFIC_ADM_CTRL_SM_NUM_EVENTS			5
-
-extern int WMEQosTagToACTable[MAX_NUM_OF_802_1d_TAGS];
-
-typedef struct 
-{
-	TI_HANDLE hTrafficAdmCtrl;
-	tspecInfo_t *pTSpecInfo;
-	TI_UINT8		acID;
-
-}fsmTSpecInfo_t;
-
-
-/* Timer functions */
-void trafficAdmCtrl_timeoutAcBE(TI_HANDLE hTrafficAdmCtrl, TI_BOOL bTwdInitOccured);
-void trafficAdmCtrl_timeoutAcBK(TI_HANDLE hTrafficAdmCtrl, TI_BOOL bTwdInitOccured);
-void trafficAdmCtrl_timeoutAcVI(TI_HANDLE hTrafficAdmCtrl, TI_BOOL bTwdInitOccured);
-void trafficAdmCtrl_timeoutAcVO(TI_HANDLE hTrafficAdmCtrl, TI_BOOL bTwdInitOccured);
-
-
-/* SM Functions */
-TI_STATUS trafficAdmCtrl_smEvent(trafficAdmCtrl_t *pAdmCtrlQos, TI_UINT8 event, void *pData);
-
-TI_STATUS trafficAdmCtrl_smActionUnexpectedTspecResponse(fsmTSpecInfo_t *fsmTSpecInfo);	/*unxcepted*/
-TI_STATUS trafficAdmCtrl_smActionUnexpected(fsmTSpecInfo_t *fsmTSpecInfo);	/*unxcepted*/
-TI_STATUS trafficAdmCtrl_smActionNop(fsmTSpecInfo_t *fsmTSpecInfo);			/*NOP*/
-TI_STATUS trafficAdmCtrl_smStart(fsmTSpecInfo_t *fsmTSpecInfo);				/*EVENT_START*/
-TI_STATUS trafficAdmCtrl_smWaitStop(fsmTSpecInfo_t *fsmTSpecInfo);			/*EVENT_STOP*/
-TI_STATUS trafficAdmCtrl_smWaitAccept(fsmTSpecInfo_t *fsmTSpecInfo);		/*EVENT_ACCEPT*/
-TI_STATUS trafficAdmCtrl_smWaitReject(fsmTSpecInfo_t *fsmTSpecInfo);		/*EVENT_REJECT*/
-TI_STATUS trafficAdmCtrl_smWaitTimeout(fsmTSpecInfo_t *fsmTSpecInfo);		/*EVENT_TIMEOUT*/
-
-
-
-TI_STATUS trafficAdmCtrl_sendAdmissionReq(TI_HANDLE hTrafficAdmCtrl, tspecInfo_t *pTSpecInfo);
-TI_STATUS trafficAdmCtrl_startTimer(trafficAdmCtrl_t* pTrafficAdmCtrl, TI_UINT8 acID);
-TI_STATUS trafficAdmCtrl_stopTimer(trafficAdmCtrl_t* pTrafficAdmCtrl, TI_UINT8 acID);
-
-
-TI_STATUS trafficAdmCtrl_buildFrameHeader(trafficAdmCtrl_t *pTrafficAdmCtrl, TTxCtrlBlk *pPktCtrlBlk);
-
-static TI_STATUS trafficAdmCtrl_tokenToAc (TI_HANDLE hTrafficAdmCtrl, TI_UINT8 token, TI_UINT8 *acID);
-
-/********************************************************************************
- *							trafficAdmCtrl_create								*
- ********************************************************************************
-DESCRIPTION: trafficAdmCtrl module creation function
-
-  INPUT:      hOs -			Handle to OS		
-
-
-OUTPUT:		
-
-RETURN:     Handle to the trafficAdmCtrl module on success, NULL otherwise
-
-************************************************************************/
-
-TI_HANDLE trafficAdmCtrl_create(TI_HANDLE hOs)
-{
-	trafficAdmCtrl_t 		*pTrafficAdmCtrl;
-	TI_STATUS			status;
-
-	/* allocate admission control context memory */
-	pTrafficAdmCtrl = (trafficAdmCtrl_t*)os_memoryAlloc(hOs, sizeof(trafficAdmCtrl_t));
-	if (pTrafficAdmCtrl == NULL)
-	{
-		return NULL;
-	}
-
-	os_memoryZero(hOs, pTrafficAdmCtrl, sizeof(trafficAdmCtrl_t));
-
-	pTrafficAdmCtrl->hOs = hOs;
-
-	/* allocate memory for admCtrlQos state machine */
-	status = fsm_Create(hOs, &pTrafficAdmCtrl->pTrafficAdmCtrlSm, TRAFFIC_ADM_CTRL_SM_NUM_STATES, TRAFFIC_ADM_CTRL_SM_NUM_EVENTS);
-	if (status != TI_OK)
-	{
-		os_memoryFree(hOs, pTrafficAdmCtrl, sizeof(trafficAdmCtrl_t));
-		return NULL;
-	}
-
-	return pTrafficAdmCtrl;
-}
-/************************************************************************
- *                        trafficAdmCtrl_unload						    *
- ************************************************************************
-DESCRIPTION: trafficAdmCtrl module destroy function, 
-				-	Free all memory alocated by the module
-				
-INPUT:      hTrafficAdmCtrl	-	trafficAdmCtrl handle.		
-
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS trafficAdmCtrl_unload(TI_HANDLE hTrafficAdmCtrl)
-{
-	trafficAdmCtrl_t *pTrafficAdmCtrl = (trafficAdmCtrl_t*)hTrafficAdmCtrl;
-	TI_UINT32         uAcId;
-
-    if (pTrafficAdmCtrl->pTrafficAdmCtrlSm)
-	{
-        fsm_Unload (pTrafficAdmCtrl->hOs, pTrafficAdmCtrl->pTrafficAdmCtrlSm);
-	}
-	
-	/* free timers */
-	for (uAcId = 0; uAcId < MAX_NUM_OF_AC; uAcId++)
-    {
-        if (pTrafficAdmCtrl->hAdmCtrlTimer[uAcId]) 
-        {
-            tmr_DestroyTimer (pTrafficAdmCtrl->hAdmCtrlTimer[uAcId]);
-        }
-    }
-
-	os_memoryFree(pTrafficAdmCtrl->hOs, pTrafficAdmCtrl, sizeof(trafficAdmCtrl_t));
-
-	return TI_OK;
-}
-
-/************************************************************************
- *                        trafficAdmCtrl_config							*
- ************************************************************************
-DESCRIPTION: trafficAdmCtrl module configuration function, 
-				performs the following:
-				-	Reset & initiailzes local variables
-				-	Init the handles to be used by the module
-                                                                                                   
-INPUT:      hTrafficAdmCtrl	         -	trafficAdmCtrl handle.
-		    List of handles to be used by the module
-			pTrafficAdmCtrlInitParams	-	init parameters.		
-			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS trafficAdmCtrl_config (TI_HANDLE hTrafficAdmCtrl,
-    						     TI_HANDLE hTxMgmtQ,
-    						     TI_HANDLE hReport,
-    						     TI_HANDLE hOs,
-    						     TI_HANDLE hQosMngr,
-    						     TI_HANDLE hCtrlData,
-    						     TI_HANDLE hXCCMgr,
-    						     TI_HANDLE hTimer,
-    						     TI_HANDLE hTWD,
-                                 TI_HANDLE hTxCtrl,
-    						     trafficAdmCtrlInitParams_t *pTrafficAdmCtrlInitParams)
-{
-	trafficAdmCtrl_t	*pTrafficAdmCtrl;
-	TI_STATUS			status;
-	TI_UINT32      		uAcId;
-
-	fsm_actionCell_t	trafficAdmCtrl_smMatrix[TRAFFIC_ADM_CTRL_SM_NUM_STATES][TRAFFIC_ADM_CTRL_SM_NUM_EVENTS] =
-	{
-		/* next state and actions for IDLE state */
-		{{TRAFFIC_ADM_CTRL_SM_STATE_WAIT, (fsm_Action_t)trafficAdmCtrl_smStart},			/*EVENT_START*/
-		 {TRAFFIC_ADM_CTRL_SM_STATE_IDLE, (fsm_Action_t)trafficAdmCtrl_smActionNop},		/*EVENT_STOP*/
-		 {TRAFFIC_ADM_CTRL_SM_STATE_IDLE, (fsm_Action_t)trafficAdmCtrl_smActionUnexpectedTspecResponse}, /*EVENT_ACCEPT*/
-		 {TRAFFIC_ADM_CTRL_SM_STATE_IDLE, (fsm_Action_t)trafficAdmCtrl_smActionUnexpectedTspecResponse}, /*EVENT_REJECT*/
-		 {TRAFFIC_ADM_CTRL_SM_STATE_IDLE, (fsm_Action_t)trafficAdmCtrl_smActionUnexpected}, /*EVENT_TIMEOUT*/
-		},
-		/* next state and actions for WAIT state */
-		{{TRAFFIC_ADM_CTRL_SM_STATE_WAIT, (fsm_Action_t)trafficAdmCtrl_smActionUnexpected},	/*EVENT_START*/
-		 {TRAFFIC_ADM_CTRL_SM_STATE_IDLE, (fsm_Action_t)trafficAdmCtrl_smWaitStop},			/*EVENT_STOP*/
-		 {TRAFFIC_ADM_CTRL_SM_STATE_IDLE, (fsm_Action_t)trafficAdmCtrl_smWaitAccept},		/*EVENT_ACCEPT*/
-		 {TRAFFIC_ADM_CTRL_SM_STATE_IDLE, (fsm_Action_t)trafficAdmCtrl_smWaitReject},		/*EVENT_REJECT*/
-		 {TRAFFIC_ADM_CTRL_SM_STATE_IDLE, (fsm_Action_t)trafficAdmCtrl_smWaitTimeout},		/*EVENT_TIMEOUT*/
-		},
-	};
-	
-	pTrafficAdmCtrl = (trafficAdmCtrl_t*)hTrafficAdmCtrl;
-
-	pTrafficAdmCtrl->hTxMgmtQ = hTxMgmtQ;
-	pTrafficAdmCtrl->hReport	= hReport;
-	pTrafficAdmCtrl->hOs		= hOs;
-	pTrafficAdmCtrl->hQosMngr	= hQosMngr;
-	pTrafficAdmCtrl->hCtrlData	= hCtrlData;
-	pTrafficAdmCtrl->hXCCMgr	= hXCCMgr;
-	pTrafficAdmCtrl->hTimer	    = hTimer;
-	pTrafficAdmCtrl->hTWD	    = hTWD;
-	pTrafficAdmCtrl->hTxCtrl	= hTxCtrl;
-
-	for (uAcId = 0; uAcId < MAX_NUM_OF_AC; uAcId++)
-    {
-		pTrafficAdmCtrl->dialogToken[uAcId] = 0;
-
-        /* Create per AC timers */
-        pTrafficAdmCtrl->hAdmCtrlTimer[uAcId] = tmr_CreateTimer (pTrafficAdmCtrl->hTimer);
-        if (pTrafficAdmCtrl->hAdmCtrlTimer[uAcId] == NULL)
-        {
-            TRACE0(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_ERROR, "trafficAdmCtrl_config(): Failed to create hAssocSmTimer!\n");
-            return TI_NOK;
-        }
-    }
-
-    /* configure state machine */
-	status = fsm_Config(pTrafficAdmCtrl->pTrafficAdmCtrlSm, &trafficAdmCtrl_smMatrix[0][0], 
-						TRAFFIC_ADM_CTRL_SM_NUM_STATES, TRAFFIC_ADM_CTRL_SM_NUM_EVENTS, NULL, hOs);
-	if (status != TI_OK)
-	{
-TRACE0(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_ERROR, "TRAFFIC_ADM_CTRL_SM: fsm_Config - Error  \n");
-
-		return TI_NOK;
-	}
-
-	pTrafficAdmCtrl->timeout =  pTrafficAdmCtrlInitParams->trafficAdmCtrlResponseTimeout;
-    pTrafficAdmCtrl->useFixedMsduSize = pTrafficAdmCtrlInitParams->trafficAdmCtrlUseFixedMsduSize;
-
-	pTrafficAdmCtrl->dialogTokenCounter = INITIAL_DIALOG_TOKEN;
-	
-
-TRACE0(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "TRAFFIC ADM CTRL -  configuration completed ..... \n");
-
-	return TI_OK;
-}
-
-
-/************************************************************************
- *                        trafficAdmCtrl_smEvent						*
- ************************************************************************
-DESCRIPTION: trafficAdmCtrl SM general function
-                                                                                                   
-INPUT:      pTrafficAdmCtrl	    -	trafficAdmCtr handle.
-			event				-	the event to the SM.
-			pData				-	handle to passing parameter			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_smEvent(trafficAdmCtrl_t *pTrafficAdmCtrl, TI_UINT8 event, void *pData)
-{
-	TI_STATUS 		status;
-	TI_UINT8			nextState;
-	fsmTSpecInfo_t	*fsmTSpecInfo = (fsmTSpecInfo_t*)pData;
-	TI_UINT8			acID = fsmTSpecInfo->acID;
-
-    /* It looks like it never happens. Anyway decided to check */
-    if ( acID >= MAX_NUM_OF_AC )
-    {
-        TRACE2( pTrafficAdmCtrl->hReport, REPORT_SEVERITY_ERROR,
-               "trafficAdmCtrl_smEvent. fsmTSpecInfo->acID=%d exceeds the limit %d\n",
-                   acID, MAX_NUM_OF_AC-1);
-        handleRunProblem(PROBLEM_BUF_SIZE_VIOLATION);
-        return TI_NOK;
-    }
-
-	status = fsm_GetNextState(pTrafficAdmCtrl->pTrafficAdmCtrlSm, pTrafficAdmCtrl->currentState[acID], event, &nextState);
-	if (status != TI_OK)
-	{
-TRACE0(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_ERROR, "ADM_CTRL: ERROR - failed getting next state \n");
-
-		return(TI_NOK);
-	}
-
-	TRACE3(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "trafficAdmCtrl_smEvent: <currentState = %d, event = %d> --> nextState = %d\n", pTrafficAdmCtrl->currentState[acID], event, nextState);
-
-	status = fsm_Event(pTrafficAdmCtrl->pTrafficAdmCtrlSm, &pTrafficAdmCtrl->currentState[acID], event, pData);
-
-	return(status);
-}
-
-
-/************************************************************************
-*							state machine functions						*
-************************************************************************/
-/************************************************************************
- *                        trafficAdmCtrl_smStart						*
- ************************************************************************
-DESCRIPTION: the action function when event start ocuured on idle state 
-				performs the following:
-				-	send admision requestReset 
-				-	start timer for the response.
-                                                                                                   
-INPUT:      fsmTSpecInfo - parameters for the request		
-			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_smStart(fsmTSpecInfo_t *fsmTSpecInfo)		
-{
-	TI_STATUS				status;
-	trafficAdmCtrl_t		*pTrafficAdmCtrl;
-	tspecInfo_t				*pTSpecInfo;
-
-	pTrafficAdmCtrl = (trafficAdmCtrl_t*)(fsmTSpecInfo->hTrafficAdmCtrl);
-	pTSpecInfo = fsmTSpecInfo->pTSpecInfo;
-
-	/* send adm request frame */
-	status = trafficAdmCtrl_sendAdmissionReq(pTrafficAdmCtrl, pTSpecInfo);
-	if(status != TI_OK)
-		return status;
-
-	/* init timer */
-	trafficAdmCtrl_startTimer(pTrafficAdmCtrl, pTSpecInfo->AC);
-
-	return TI_OK;
-}
-/************************************************************************
- *                        trafficAdmCtrl_smWaitStop						*
- ************************************************************************
-DESCRIPTION: the action function when event stop ocuured on wait state 
-				performs the following:
-				-	stop timer.
-                                                                                                   
-INPUT:      fsmTSpecInfo - parameters of the request		
-			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_smWaitStop(fsmTSpecInfo_t *fsmTSpecInfo)
-{
-	trafficAdmCtrl_t		*pTrafficAdmCtrl;
-	tspecInfo_t				*pTSpecInfo;
-
-	pTrafficAdmCtrl = (trafficAdmCtrl_t*)(fsmTSpecInfo->hTrafficAdmCtrl);
-	pTSpecInfo = fsmTSpecInfo->pTSpecInfo;
-
-	/* stop timer */
-	trafficAdmCtrl_stopTimer(pTrafficAdmCtrl,fsmTSpecInfo->pTSpecInfo->AC);
-
-TRACE1(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "TRAFFIC ADM CTRL -  AC = %d,    Stoped ..... \n", pTSpecInfo->AC);
-
-	
-	return TI_OK;
-}
-/************************************************************************
- *                        trafficAdmCtrl_smWaitAccept					*
- ************************************************************************
-DESCRIPTION: the action function when event accept ocuured on wait state 
-				performs the following:
-				-	update the Qos Mngr of the status and the parameters
-                                                                                                   
-INPUT:      fsmTSpecInfo - parameters of the response		
-			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_smWaitAccept(fsmTSpecInfo_t *fsmTSpecInfo)
-{
-	trafficAdmCtrl_t		*pTrafficAdmCtrl;
-	tspecInfo_t				*pTSpecInfo;
-
-	pTrafficAdmCtrl = (trafficAdmCtrl_t*)(fsmTSpecInfo->hTrafficAdmCtrl);
-	pTSpecInfo = fsmTSpecInfo->pTSpecInfo;
-
-	/* update the QosMngr */
-	qosMngr_setAdmissionInfo(pTrafficAdmCtrl->hQosMngr, pTSpecInfo->AC, pTSpecInfo, STATUS_TRAFFIC_ADM_REQUEST_ACCEPT);
-
-	return TI_OK;
-}
-/************************************************************************
- *                        trafficAdmCtrl_smWaitReject					*
- ************************************************************************
-DESCRIPTION: the action function when event reject ocuured on wait state 
-				performs the following:
-				-	update the Qos Mngr of the status and the parameters
-                                                                                                   
-INPUT:      fsmTSpecInfo - parameters of the response		
-			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS trafficAdmCtrl_smWaitReject(fsmTSpecInfo_t *fsmTSpecInfo)
-{
-	trafficAdmCtrl_t		*pTrafficAdmCtrl;
-	tspecInfo_t				*pTSpecInfo;
-
-	pTrafficAdmCtrl = (trafficAdmCtrl_t*)(fsmTSpecInfo->hTrafficAdmCtrl);
-	pTSpecInfo = fsmTSpecInfo->pTSpecInfo;
-
-	/* update the QosMngr */
-	qosMngr_setAdmissionInfo(pTrafficAdmCtrl->hQosMngr, pTSpecInfo->AC, pTSpecInfo,	STATUS_TRAFFIC_ADM_REQUEST_REJECT);
-
-	return TI_OK;
-}
-/************************************************************************
- *                        trafficAdmCtrl_smWaitTimeout					*
- ************************************************************************
-DESCRIPTION: the action function when event timeout ocuured on wait state 
-				performs the following:
-				-	update the Qos Mngr of the status and the parameters
-                                                                                                   
-INPUT:      fsmTSpecInfo - parameters of the request		
-			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_smWaitTimeout(fsmTSpecInfo_t *fsmTSpecInfo)
-{
-	trafficAdmCtrl_t		*pTrafficAdmCtrl;
-
-	pTrafficAdmCtrl = (trafficAdmCtrl_t*)(fsmTSpecInfo->hTrafficAdmCtrl);
-
-	/* update the QosMngr */
-	qosMngr_setAdmissionInfo(pTrafficAdmCtrl->hQosMngr, fsmTSpecInfo->acID, NULL, STATUS_TRAFFIC_ADM_REQUEST_TIMEOUT);
-
-	return TI_OK;
-}
-/************************************************************************
- *               trafficAdmCtrl_smActionUnexpected						*
- ************************************************************************
-DESCRIPTION:                                                 
-INPUT:      fsmTSpecInfo - tspec parameters 	
-			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_smActionUnexpected(fsmTSpecInfo_t *fsmTSpecInfo)
-{
-	trafficAdmCtrl_t		*pTrafficAdmCtrl;
-
-	pTrafficAdmCtrl = (trafficAdmCtrl_t*)(fsmTSpecInfo->hTrafficAdmCtrl);
-
-TRACE1(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_ERROR, "TRAFFIC ADM CTRL -  AC = %d,    ActionUnexpected ..... \n", fsmTSpecInfo->acID);
-
-	return TI_OK;
-}
-
-/************************************************************************
- *               trafficAdmCtrl_smActionUnexpectedTspecResponse			*
- ************************************************************************
-DESCRIPTION:                                                 
-INPUT:      fsmTSpecInfo - tspec parameters 	
-OUTPUT:		
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_smActionUnexpectedTspecResponse(fsmTSpecInfo_t *fsmTSpecInfo)
-{
-	trafficAdmCtrl_t		*pTrafficAdmCtrl;
-	tspecInfo_t				*pTSpecInfo;
-
-	pTrafficAdmCtrl = (trafficAdmCtrl_t*)(fsmTSpecInfo->hTrafficAdmCtrl);
-	pTSpecInfo = fsmTSpecInfo->pTSpecInfo;
-
-	/* Send event to user application - how come TSPEC response arrives without request ? */
-	qosMngr_sendUnexpectedTSPECResponseEvent (pTrafficAdmCtrl->hQosMngr,pTSpecInfo);
-
-TRACE1(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_WARNING, "TRAFFIC ADM CTRL -  AC = %d,    ActionUnexpected ..... \n", fsmTSpecInfo->acID);
-
-	return TI_OK;
-}
-
-
-/************************************************************************
- *                        trafficAdmCtrl_smActionNop					*
- ************************************************************************
-DESCRIPTION:                                                 
-INPUT:      fsmTSpecInfo - tspec parameters 	
-			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_smActionNop(fsmTSpecInfo_t *fsmTSpecInfo)
-{
-	trafficAdmCtrl_t		*pTrafficAdmCtrl;
-	tspecInfo_t				*pTSpecInfo;
-
-	pTrafficAdmCtrl = (trafficAdmCtrl_t*)(fsmTSpecInfo->hTrafficAdmCtrl);
-	pTSpecInfo = fsmTSpecInfo->pTSpecInfo;
-
-TRACE1(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "TRAFFIC ADM CTRL -  AC = %d,    Action NOP..... \n", pTSpecInfo->AC);
-
-	return TI_OK;
-}
-/************************************************************************
- *							API FUNCTIONS						        *
- ************************************************************************
- ************************************************************************/
-
-/************************************************************************
- *                    trafficAdmCtrl_startAdmRequest                    *
- ************************************************************************
-DESCRIPTION: start TSPEC signaling
-                                                                                                   
-INPUT:      pTrafficAdmCtrl	    -	trafficAdmCtr handle.
-			pTSpecInfo			-	the TSPEC parameters
-	
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_startAdmRequest(TI_HANDLE	hTrafficAdmCtrl, tspecInfo_t *pTSpecInfo)
-{
-	TI_STATUS			status;
-	fsmTSpecInfo_t		fsmTSpecInfo;
-
-	trafficAdmCtrl_t *pTrafficAdmCtrl = (trafficAdmCtrl_t*)hTrafficAdmCtrl;
-
-	if (pTrafficAdmCtrl == NULL)
-		return TI_NOK;
-
-	fsmTSpecInfo.hTrafficAdmCtrl = hTrafficAdmCtrl;
-	fsmTSpecInfo.pTSpecInfo = pTSpecInfo;
-	fsmTSpecInfo.acID = pTSpecInfo->AC;
-
-	/* send event START to SM */
-	status = trafficAdmCtrl_smEvent(pTrafficAdmCtrl, TRAFFIC_ADM_CTRL_SM_EVENT_START, &fsmTSpecInfo);
-
-	return status;
-
-}
-/************************************************************************
- *                    trafficAdmCtrl_stopAdmRequest                     *
- ************************************************************************
-DESCRIPTION: stop specific tspec signaling
-                                                                                                   
-INPUT:      pTrafficAdmCtrl	    -	trafficAdmCtr handle.
-			acID				-	the AC of the tspec to stop
-	
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_stopAdmRequest(TI_HANDLE hTrafficAdmCtrl, TI_UINT8 acID)
-{
-	TI_STATUS			status;
-	trafficAdmCtrl_t	*pTrafficAdmCtrl = (trafficAdmCtrl_t*)hTrafficAdmCtrl;
-	
-	tspecInfo_t			pTSpecInfo;
-	fsmTSpecInfo_t		fsmTSpecInfo;
-
-	fsmTSpecInfo.hTrafficAdmCtrl = hTrafficAdmCtrl;
-	fsmTSpecInfo.pTSpecInfo = &pTSpecInfo;
-
-	fsmTSpecInfo.pTSpecInfo->AC = (EAcTrfcType)acID;
-	fsmTSpecInfo.acID = acID;
-
-	/* send event STOP to SM */
-	status = trafficAdmCtrl_smEvent(pTrafficAdmCtrl, TRAFFIC_ADM_CTRL_SM_EVENT_STOP, &fsmTSpecInfo);
-	
-	return status;
-
-}
-/************************************************************************
- *                    trafficAdmCtrl_stop			                     *
- ************************************************************************
-DESCRIPTION: stop all tspecs and reset SM  
-			called on disconnect
-                                                                                                 
-INPUT:      pTrafficAdmCtrl	    -	trafficAdmCtr handle.
-	
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS trafficAdmCtrl_stop(TI_HANDLE	hTrafficAdmCtrl)
-{
-	TI_UINT32  uAcId;
-
-	trafficAdmCtrl_t	*pTrafficAdmCtrl = (trafficAdmCtrl_t*)hTrafficAdmCtrl;
-	
-	tspecInfo_t			pTSpecInfo;
-	fsmTSpecInfo_t		fsmTSpecInfo;
-
-	fsmTSpecInfo.hTrafficAdmCtrl = hTrafficAdmCtrl;
-	fsmTSpecInfo.pTSpecInfo = &pTSpecInfo;
-
-	/* clean all AC SM  */
-	for (uAcId = 0; uAcId < MAX_NUM_OF_AC; uAcId++)
-	{
-		fsmTSpecInfo.pTSpecInfo->AC = (EAcTrfcType)uAcId;
-		fsmTSpecInfo.acID = uAcId;
-		trafficAdmCtrl_smEvent(pTrafficAdmCtrl, TRAFFIC_ADM_CTRL_SM_EVENT_STOP, &fsmTSpecInfo);
-
-        pTrafficAdmCtrl->dialogToken[uAcId] = 0;
-	}
-
-	pTrafficAdmCtrl->dialogTokenCounter = INITIAL_DIALOG_TOKEN;
-	
-	return TI_OK;
-}
-
-/************************************************************************
- *                    trafficAdmCtrl_recv			                     *
- ************************************************************************
-DESCRIPTION: 
-                                                                                                 
-INPUT:      pTrafficAdmCtrl	    -	trafficAdmCtr handle.
-	
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_recv(TI_HANDLE hTrafficAdmCtrl, TI_UINT8* pData, TI_UINT8 action)
-{
-	TI_STATUS 			status = TI_OK;
-	TI_UINT8				statusCode;
-	TI_UINT8				dialogToken;
-	TI_UINT8				tacID;
-	tspecInfo_t			tspecInfo;
-	fsmTSpecInfo_t		fsmTSpecInfo;
-
-	trafficAdmCtrl_t *pTrafficAdmCtrl = (trafficAdmCtrl_t*)hTrafficAdmCtrl;
-
-	if (action == ADDTS_RESPONSE_ACTION) 
-	{
-TRACE0(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "action = 1 - ADDTS RESPONSE ACTION........!! \n");
-
-		/* parsing the dialog token */
-		dialogToken = *pData;
-		pData++;
-		
-		/* in WME status code is 1 byte, in WSM is 2 bytes */
-		statusCode = *pData;
-		pData++;
-
-		tspecInfo.statusCode = statusCode;
-
-TRACE2(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "dialogToken = %d ,  statusCode = %d \n",dialogToken, statusCode);
-
-		trafficAdmCtrl_parseTspecIE(&tspecInfo, pData);
-
-		if (trafficAdmCtrl_tokenToAc (pTrafficAdmCtrl, dialogToken, &tacID) == TI_NOK)
-		{
-TRACE1(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_WARNING, "dialog token Not found,  dialogToken = %d , \n",dialogToken);
-			
-			qosMngr_sendUnexpectedTSPECResponseEvent(pTrafficAdmCtrl->hQosMngr, &tspecInfo);
-		
-			return TI_NOK;
-		}
-		
-		/* validate dialog token matching */
-		if(pTrafficAdmCtrl->dialogToken[tspecInfo.AC] != dialogToken)
-		{
-TRACE2(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_WARNING, "dialog token mismatch,  dialogToken = %d ,  acID = %d \n",dialogToken, tspecInfo.AC);
-			
-			qosMngr_sendUnexpectedTSPECResponseEvent(pTrafficAdmCtrl->hQosMngr, &tspecInfo);
-		
-			return TI_NOK;
-		}
-
-		/* Stop the relevant Timer */
-		trafficAdmCtrl_stopTimer(pTrafficAdmCtrl, tspecInfo.AC);
-
-		fsmTSpecInfo.hTrafficAdmCtrl = hTrafficAdmCtrl;
-		fsmTSpecInfo.pTSpecInfo = &tspecInfo;
-
-		fsmTSpecInfo.acID = tspecInfo.AC;
-		
-		if(statusCode != ADDTS_STATUS_CODE_SUCCESS)
-		{
-			/* admission reject */
-			/********************/
-TRACE1(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "***** admCtrlQos_recv: admission reject [ statusCode = %d ]\n",statusCode);
-			
-			
-TRACE1(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "ADDTS Response (reject) userPriority = %d , \n", tspecInfo.userPriority);
-			
-			trafficAdmCtrl_smEvent(pTrafficAdmCtrl, TRAFFIC_ADM_CTRL_SM_EVENT_REJECT, &fsmTSpecInfo);
-			
-		}
-		else
-		{
-			/* admission accept */
-			/********************/
-			
-TRACE1(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "***** admCtrlQos_recv: admission accept [ statusCode = %d ]\n",statusCode);
-			
-			
-TRACE1(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "ADDTS Response (accepted) userPriority = %d ,  \n", tspecInfo.userPriority);
-	
-TRACE2(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "mediumTime = %d ,  surplusBandwidthAllowance = %d \n", tspecInfo.mediumTime, tspecInfo.surplausBwAllowance);
-			
-			trafficAdmCtrl_smEvent(pTrafficAdmCtrl, TRAFFIC_ADM_CTRL_SM_EVENT_ACCEPT, &fsmTSpecInfo);
-		}
-	}
-	else
-	{
-		status = TI_NOK;
-TRACE1(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "trafficAdmCtrl_recv: unknown action code = %d ,  \n",action);
-
-	}
-	return status;
-}
-
-
-/************************************************************************
- *                    trafficAdmCtrl_sendDeltsFrame                     *
- ************************************************************************
-DESCRIPTION: 
-                                                                                                 
-INPUT:      pTrafficAdmCtrl	    -	trafficAdmCtr handle.
-	
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-TI_STATUS trafficAdmCtrl_sendDeltsFrame(TI_HANDLE hTrafficAdmCtrl, tspecInfo_t *pTSpecInfo, TI_UINT8 reasonCode)
-{
-	TI_STATUS           status = TI_OK;
-    TTxCtrlBlk          *pPktCtrlBlk;
-    TI_UINT8            *pPktBuffer;
-	TI_UINT32           totalLen = 0;
-	tsInfo_t            tsInfo;
-	trafficAdmCtrl_t    *pTrafficAdmCtrl = (trafficAdmCtrl_t *)hTrafficAdmCtrl;
-
-
-    TRACE0(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlQos_sendDeltsFrame: Enter....!! \n");
-
-	/* Allocate a TxCtrlBlk and data buffer (large enough for the max packet) */
-    pPktCtrlBlk = TWD_txCtrlBlk_Alloc (pTrafficAdmCtrl->hTWD);
-    pPktBuffer  = txCtrl_AllocPacketBuffer (pTrafficAdmCtrl->hTxCtrl, pPktCtrlBlk, 2000);
-    if (pPktBuffer == NULL)
-    {
-        TRACE0(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_ERROR , ": No memory\n");
-        TWD_txCtrlBlk_Free (pTrafficAdmCtrl->hTWD, pPktCtrlBlk);
-        return TI_NOK;
-    }
-	
-	status = trafficAdmCtrl_buildFrameHeader (pTrafficAdmCtrl, pPktCtrlBlk);
-	if (status != TI_OK)
-	{
-        TWD_txCtrlBlk_Free (pTrafficAdmCtrl->hTWD, pPktCtrlBlk);
-		return TI_NOK;
-	}
-
-	*(pPktBuffer + totalLen) = WME_CATAGORY_QOS;    /* CATEGORY_QOS in WME = 17*/
-	totalLen++;
-	*(pPktBuffer + totalLen) = DELTS_ACTION;        /* DELTS ACTION */
-	totalLen++;
-	*(pPktBuffer + totalLen) = 0;		/* DIALOG_TOKEN is 0 in DELTS */
-	totalLen++;
-	*(pPktBuffer + totalLen) = 0;		/* STATUS CODE is 0 in DELTS */
-	totalLen++;
-	
-	/* 
-	 * Build tsInfo fields 
-	 */
-
-	tsInfo.tsInfoArr[0] = 0;
-	tsInfo.tsInfoArr[1] = 0;
-	tsInfo.tsInfoArr[2] = 0;
-
-    tsInfo.tsInfoArr[0] |= ( (pTSpecInfo->userPriority) << TSID_SHIFT);
-
-	tsInfo.tsInfoArr[0] |= (BI_DIRECTIONAL << DIRECTION_SHIFT);		/* bidirectional */
-	tsInfo.tsInfoArr[0] |= (TS_INFO_0_ACCESS_POLICY_EDCA << ACCESS_POLICY_SHIFT);	/* EDCA */
-	
-	tsInfo.tsInfoArr[1] |= (0 << AGGREGATION_SHIFT);
-	
-	tsInfo.tsInfoArr[1] |= (pTSpecInfo->UPSDFlag << APSD_SHIFT);
-	
-	tsInfo.tsInfoArr[1] |= (pTSpecInfo->userPriority << USER_PRIORITY_SHIFT);
-	tsInfo.tsInfoArr[1] |= (NORMAL_ACKNOWLEDGEMENT << TSINFO_ACK_POLICY_SHIFT);
-	
-	tsInfo.tsInfoArr[2] |= (NO_SCHEDULE << SCHEDULE_SHIFT);
-
-	/*  
-	 * Build TSpec IE for DELTS
-	 */
-
-    *(pPktBuffer + totalLen    ) = WME_TSPEC_IE_ID;
-	*(pPktBuffer + totalLen + 1) = WME_TSPEC_IE_TSINFO_LEN;
-
-	*(pPktBuffer + totalLen + 2) = 0x00;
-	*(pPktBuffer + totalLen + 3) = 0x50;
-	*(pPktBuffer + totalLen + 4) = 0xf2;
-	*(pPktBuffer + totalLen + 5) = WME_TSPEC_IE_OUI_TYPE;
-	*(pPktBuffer + totalLen + 6) = WME_TSPEC_IE_OUI_SUB_TYPE;
-	*(pPktBuffer + totalLen + 7) = WME_TSPEC_IE_VERSION;
-
-	*(pPktBuffer + totalLen + 8) = tsInfo.tsInfoArr[0];
-	*(pPktBuffer + totalLen + 9) = tsInfo.tsInfoArr[1];
-	*(pPktBuffer + totalLen +10) = tsInfo.tsInfoArr[2];
-	
-	totalLen += WME_TSPEC_IE_TSINFO_LEN + 2;
-
-    /* Update packet parameters (start-time, pkt-type and BDL) */
-    pPktCtrlBlk->tTxDescriptor.startTime = os_timeStampMs (pTrafficAdmCtrl->hOs);
-    pPktCtrlBlk->tTxPktParams.uPktType   = TX_PKT_TYPE_MGMT;
-    BUILD_TX_TWO_BUF_PKT_BDL (pPktCtrlBlk, pPktCtrlBlk->aPktHdr, WLAN_HDR_LEN, pPktBuffer, totalLen)
-
-	/* Enqueue packet in the mgmt-queues and run the scheduler. */
-	status = txMgmtQ_Xmit (pTrafficAdmCtrl->hTxMgmtQ, pPktCtrlBlk, TI_FALSE);
-
-	return TI_OK;
-}
-
-
-/************************************************************************
- *							INTERNAL FUNCTIONS					        *
- ************************************************************************/
-/************************************************************************
- *                    trafficAdmCtrl_startTimer		                    *
- ************************************************************************
-DESCRIPTION: start a specific ac timer
-                                                                                                   
-INPUT:      pTrafficAdmCtrl	    -	trafficAdmCtr handle.
-			acID				-	the AC of the timer
-	
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_startTimer(trafficAdmCtrl_t* pTrafficAdmCtrl, TI_UINT8 acID)
-{
-    TTimerCbFunc fTimerExpiryFunc = NULL;
-
-    if (pTrafficAdmCtrl == NULL)
-    {
-		return TI_NOK;
-    }
-
-    switch (acID) 
-    {
-        case QOS_AC_BE:  fTimerExpiryFunc = trafficAdmCtrl_timeoutAcBE;   break;
-        case QOS_AC_BK:  fTimerExpiryFunc = trafficAdmCtrl_timeoutAcBK;   break;
-        case QOS_AC_VI:  fTimerExpiryFunc = trafficAdmCtrl_timeoutAcVI;   break;
-        case QOS_AC_VO:  fTimerExpiryFunc = trafficAdmCtrl_timeoutAcVO;   break;
-    }
-
-    tmr_StartTimer (pTrafficAdmCtrl->hAdmCtrlTimer[acID],
-                    fTimerExpiryFunc,
-                    (TI_HANDLE)pTrafficAdmCtrl,
-                    pTrafficAdmCtrl->timeout,
-                    TI_FALSE);
-
-	return TI_OK;
-}
-/************************************************************************
- *                    trafficAdmCtrl_stopTimer		                    *
- ************************************************************************
-DESCRIPTION: stop a specific ac timer
-                                                                                                   
-INPUT:      pTrafficAdmCtrl	    -	trafficAdmCtr handle.
-			acID				-	the AC of the timer
-	
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_stopTimer(trafficAdmCtrl_t* pTrafficAdmCtrl, TI_UINT8 acID)
-{
-	if (pTrafficAdmCtrl == NULL)
-		return TI_NOK;
-	
-	tmr_StopTimer (pTrafficAdmCtrl->hAdmCtrlTimer[acID]);
-
-	return TI_OK;
-}
-
-/************************************************************************
- *						  AC timers functionc		                    *
- ************************************************************************/
-
-/* QOS_AC_BE */
-/*********/
-void trafficAdmCtrl_timeoutAcBE (TI_HANDLE hTrafficAdmCtrl, TI_BOOL bTwdInitOccured)
-{
-	fsmTSpecInfo_t	fsmTSpecInfo;
-	trafficAdmCtrl_t *pTrafficAdmCtrl = (trafficAdmCtrl_t*)hTrafficAdmCtrl;
-
-	
-	/* FSM Tspec Info Structure */
-	fsmTSpecInfo.acID = QOS_AC_BE;
-	fsmTSpecInfo.hTrafficAdmCtrl = hTrafficAdmCtrl;
-	fsmTSpecInfo.pTSpecInfo = NULL;
-
-	trafficAdmCtrl_smEvent(pTrafficAdmCtrl, TRAFFIC_ADM_CTRL_SM_EVENT_TIMEOUT, &fsmTSpecInfo);
-}
-
-/* QOS_AC_BK */
-/*********/
-void trafficAdmCtrl_timeoutAcBK(TI_HANDLE hTrafficAdmCtrl, TI_BOOL bTwdInitOccured)
-{
-	fsmTSpecInfo_t	fsmTSpecInfo;
-	trafficAdmCtrl_t *pTrafficAdmCtrl = (trafficAdmCtrl_t*)hTrafficAdmCtrl;
-
-	
-	/* FSM Tspec Info Structure */
-	fsmTSpecInfo.acID = QOS_AC_BK;
-	fsmTSpecInfo.hTrafficAdmCtrl = hTrafficAdmCtrl;
-	fsmTSpecInfo.pTSpecInfo = NULL;
-
-	trafficAdmCtrl_smEvent(pTrafficAdmCtrl, TRAFFIC_ADM_CTRL_SM_EVENT_TIMEOUT, &fsmTSpecInfo);
-
-}
-/* QOS_AC_VI */
-/*********/
-void trafficAdmCtrl_timeoutAcVI(TI_HANDLE hTrafficAdmCtrl, TI_BOOL bTwdInitOccured)
-{
-	fsmTSpecInfo_t	fsmTSpecInfo;
-	trafficAdmCtrl_t *pTrafficAdmCtrl = (trafficAdmCtrl_t*)hTrafficAdmCtrl;
-
-	
-	/* FSM Tspec Info Structure */
-	fsmTSpecInfo.acID = QOS_AC_VI;
-	fsmTSpecInfo.hTrafficAdmCtrl = hTrafficAdmCtrl;
-	fsmTSpecInfo.pTSpecInfo = NULL;
-
-	trafficAdmCtrl_smEvent(pTrafficAdmCtrl, TRAFFIC_ADM_CTRL_SM_EVENT_TIMEOUT, &fsmTSpecInfo);
-
-}
-/* QOS_AC_VO */
-/*********/
-void trafficAdmCtrl_timeoutAcVO(TI_HANDLE hTrafficAdmCtrl, TI_BOOL bTwdInitOccured)
-{
-	fsmTSpecInfo_t	fsmTSpecInfo;
-	trafficAdmCtrl_t *pTrafficAdmCtrl = (trafficAdmCtrl_t*)hTrafficAdmCtrl;
-
-	
-	/* FSM Tspec Info Structure */
-	fsmTSpecInfo.acID = QOS_AC_VO;
-	fsmTSpecInfo.hTrafficAdmCtrl = hTrafficAdmCtrl;
-	fsmTSpecInfo.pTSpecInfo = NULL;
-
-	trafficAdmCtrl_smEvent(pTrafficAdmCtrl, TRAFFIC_ADM_CTRL_SM_EVENT_TIMEOUT, &fsmTSpecInfo);
-
-}
-
-
-static TI_STATUS trafficAdmCtrl_tokenToAc (TI_HANDLE hTrafficAdmCtrl, TI_UINT8 token, TI_UINT8 *acID)
-{
-	TI_UINT8 idx;
-	trafficAdmCtrl_t *pTrafficAdmCtrl = (trafficAdmCtrl_t*)hTrafficAdmCtrl;
-
-	for (idx=0; idx<MAX_NUM_OF_AC; idx++)
-	{
-		if (pTrafficAdmCtrl->dialogToken[idx] == token)
-		{
-			*acID = idx;
-			return (TI_OK);
-		}
-	}
-
-	return (TI_NOK);
-
-}
-
-
-
-/************************************************************************
- *              trafficAdmCtrl_buildFrameHeader							*
- ************************************************************************
-DESCRIPTION: build frame header 
-                                                                                                   
-INPUT:    	
-			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-TI_STATUS trafficAdmCtrl_buildFrameHeader(trafficAdmCtrl_t *pTrafficAdmCtrl, TTxCtrlBlk *pPktCtrlBlk)
-{
-   	TI_STATUS			status;
-	TMacAddr		    daBssid, saBssid;
-	dot11_mgmtHeader_t *pdot11Header;
-	ScanBssType_e		currBssType;
-	TMacAddr    		currBssId;
-
-	pdot11Header = (dot11_mgmtHeader_t *)(pPktCtrlBlk->aPktHdr);
-	
-    /* Get the Destination MAC address */
-	status = ctrlData_getParamBssid(pTrafficAdmCtrl->hCtrlData, CTRL_DATA_CURRENT_BSSID_PARAM, daBssid);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-    /* Get the Source MAC address */
-	status = ctrlData_getParamBssid(pTrafficAdmCtrl->hCtrlData, CTRL_DATA_MAC_ADDRESS, saBssid);
-	if (status != TI_OK)
-	{
-		return TI_NOK;
-	}
-
-	/* receive BssId and Bss Type from control module */
-	ctrlData_getCurrBssTypeAndCurrBssId(pTrafficAdmCtrl->hCtrlData, &currBssId, &currBssType);
-	if (currBssType != BSS_INFRASTRUCTURE)
-    {
- 		/* report failure but don't stop... */
-TRACE0(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_ERROR, "trafficAdmCtrl_buildFrameHeader: Error !! currBssType = BSS_INFRASTRUCTURE \n");
-
-		return TI_NOK;
-    }
-	/* infrastructure BSS */
-
-	/* copy BSSID */
-	MAC_COPY (pdot11Header->BSSID, currBssId);
-	/* copy source mac address */
-	MAC_COPY (pdot11Header->SA, saBssid);
-	/* copy destination mac address */
-	MAC_COPY (pdot11Header->DA, daBssid);
-
-	/* set frame ctrl to mgmt action frame an to DS */
-	pdot11Header->fc = ENDIAN_HANDLE_WORD(DOT11_FC_ACTION | DOT11_FC_TO_DS);
-
-	return TI_OK;
-}
-
-/************************************************************************
- *                  trafficAdmCtrl_sendAdmissionReq						*
- ************************************************************************
-DESCRIPTION: send admision request frame
-                                                                                                   
-INPUT:      hTrafficAdmCtrl	         -	Qos Manager handle.
-		    pTSpecInfo				 -  tspec parameters
-			
-OUTPUT:		
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-
-TI_STATUS trafficAdmCtrl_sendAdmissionReq(TI_HANDLE hTrafficAdmCtrl, tspecInfo_t *pTSpecInfo)
-{
-	TI_STATUS			status = TI_OK;
-    TTxCtrlBlk          *pPktCtrlBlk;
-    TI_UINT8            *pPktBuffer;
-	TI_UINT32			len;
-	TI_UINT32			totalLen = 0;
-	trafficAdmCtrl_t	*pTrafficAdmCtrl = (trafficAdmCtrl_t*)hTrafficAdmCtrl;
-
-
-TRACE0(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION, "admCtrlQos_smAdmissionReq: Enter....!! \n");
-
-	/* Allocate a TxCtrlBlk and data buffer (large enough for the max packet) */
-    pPktCtrlBlk = TWD_txCtrlBlk_Alloc (pTrafficAdmCtrl->hTWD);
-    pPktBuffer  = txCtrl_AllocPacketBuffer (pTrafficAdmCtrl->hTxCtrl, pPktCtrlBlk, 2000);
-    if (pPktBuffer == NULL)
-    {
-        TRACE0(pTrafficAdmCtrl->hReport, REPORT_SEVERITY_ERROR , ": No memory\n");
-        TWD_txCtrlBlk_Free (pTrafficAdmCtrl->hTWD, pPktCtrlBlk);
-        return TI_NOK;
-    }
-	
-	status = trafficAdmCtrl_buildFrameHeader (pTrafficAdmCtrl, pPktCtrlBlk);
-	if (status != TI_OK)
-	{
-        TWD_txCtrlBlk_Free (pTrafficAdmCtrl->hTWD, pPktCtrlBlk);
-		return TI_NOK;
-	}
-
-	*(pPktBuffer + totalLen) = WME_CATAGORY_QOS;			/* CATEGORY_QOS WME = 17*/
-	totalLen++;
-	*(pPktBuffer + totalLen) = ADDTS_REQUEST_ACTION;		/* ADDTS request ACTION */
-	totalLen++;
-
-	/* storing the dialog token for response validation */
-	pTrafficAdmCtrl->dialogToken[pTSpecInfo->AC] = pTrafficAdmCtrl->dialogTokenCounter++;	/* DIALOG_TOKEN */
-	*(pPktBuffer + totalLen) = pTrafficAdmCtrl->dialogToken[pTSpecInfo->AC];
-	totalLen++;
-
-	*(pPktBuffer + totalLen) = 0;	 /* STATUS CODE is 0 for ADDTS */
-	totalLen++;
-
-	trafficAdmCtrl_buildTSPec (pTrafficAdmCtrl, pTSpecInfo, pPktBuffer + totalLen, (TI_UINT32*)&len);
-	totalLen += len;
-
-    /* Update packet parameters (start-time, length, pkt-type) */
-    pPktCtrlBlk->tTxDescriptor.startTime = os_timeStampMs (pTrafficAdmCtrl->hOs);
-    pPktCtrlBlk->tTxPktParams.uPktType   = TX_PKT_TYPE_MGMT;
-    BUILD_TX_TWO_BUF_PKT_BDL (pPktCtrlBlk, pPktCtrlBlk->aPktHdr, WLAN_HDR_LEN, pPktBuffer, totalLen)
-
-	/* Enqueue packet in the mgmt-queues and run the scheduler. */
-	status = txMgmtQ_Xmit (pTrafficAdmCtrl->hTxMgmtQ, pPktCtrlBlk, TI_FALSE);
-
-	return TI_OK;
-}
-/************************************************************************
- *                        trafficAdmCtrl_buildTSPec							*
- ************************************************************************
-DESCRIPTION: build a tspec according to the tspec parameters
-                                                                                                   
-INPUT:      hTrafficAdmCtrl	     -	Qos Manager handle.
-		    pTSpecInfo			 -  tspec parameters
-
-OUTPUT:		pPktBuffer             - the Tspec IE to send
-			len					 - the tspec frame len				
-
-RETURN:     TI_OK on success, TI_NOK otherwise
-************************************************************************/
-
-void trafficAdmCtrl_buildTSPec(trafficAdmCtrl_t	*pTrafficAdmCtrl, 
-							   tspecInfo_t		*pTSpecInfo, 
-							   TI_UINT8			*pDataBuf,
-							   TI_UINT32		*len)
-{
-	tsInfo_t			tsInfo;
-	TI_UINT16		nominalMSDUSize, maxMSDUSize;
-	TI_UINT32		suspensionInterval = 0;   /* disable */
-
-
-	os_memoryZero(pTrafficAdmCtrl->hOs, (void *)pDataBuf, WME_TSPEC_IE_LEN + 2);
-
-	*pDataBuf =			WME_TSPEC_IE_ID;
-	*(pDataBuf + 1) =	WME_TSPEC_IE_LEN;
-
-	*(pDataBuf + 2) =	0x00;
-	*(pDataBuf + 3) =	0x50;
-	*(pDataBuf + 4) =	0xf2;
-	*(pDataBuf + 5) =	WME_TSPEC_IE_OUI_TYPE;
-	*(pDataBuf + 6) =	WME_TSPEC_IE_OUI_SUB_TYPE;
-	*(pDataBuf + 7) =	WME_TSPEC_IE_VERSION;
-
-	/* 
-	 * Build tsInfo fields 
-	 */
-
-	tsInfo.tsInfoArr[0] = 0;
-	tsInfo.tsInfoArr[1] = 0;
-	tsInfo.tsInfoArr[2] = 0;
-
-	tsInfo.tsInfoArr[0] |=		( (pTSpecInfo->userPriority) << TSID_SHIFT);
-	tsInfo.tsInfoArr[0] |=		(pTSpecInfo->streamDirection << DIRECTION_SHIFT);		/* bidirectional */
-
-	tsInfo.tsInfoArr[0] |=		(TS_INFO_0_ACCESS_POLICY_EDCA << ACCESS_POLICY_SHIFT);	/* EDCA */
-
-	tsInfo.tsInfoArr[1] |=		(0 << AGGREGATION_SHIFT);
-
-	tsInfo.tsInfoArr[1] |=		(pTSpecInfo->UPSDFlag << APSD_SHIFT);
-
-	tsInfo.tsInfoArr[1] |=		(pTSpecInfo->userPriority << USER_PRIORITY_SHIFT);
-	tsInfo.tsInfoArr[1] |=		(NORMAL_ACKNOWLEDGEMENT << TSINFO_ACK_POLICY_SHIFT);
-	
-	tsInfo.tsInfoArr[2] |=		(NO_SCHEDULE << SCHEDULE_SHIFT);
-
-	*(pDataBuf + 8) =	tsInfo.tsInfoArr[0];
-	*(pDataBuf + 9) =	tsInfo.tsInfoArr[1];
-	*(pDataBuf +10) =	tsInfo.tsInfoArr[2];
-    
-	pDataBuf += 11;  /* Progress the data pointer to the next IE parameters. */
-    
-	/*
-	 * Set all remained parameters 
-	 */
-
-    nominalMSDUSize = pTSpecInfo->nominalMsduSize;
-    if (pTrafficAdmCtrl->useFixedMsduSize)
-		nominalMSDUSize |= FIX_MSDU_SIZE;
-
-    maxMSDUSize = (nominalMSDUSize & (~FIX_MSDU_SIZE));
-    
-	COPY_WLAN_WORD(pDataBuf,      &nominalMSDUSize);			/* Nominal-MSDU-size. */
-	COPY_WLAN_WORD(pDataBuf +  2, &maxMSDUSize);			    /* Maximum-MSDU-size. */
-	COPY_WLAN_LONG(pDataBuf +  4, &pTSpecInfo->uMinimumServiceInterval); /* Minimum service interval */
-	COPY_WLAN_LONG(pDataBuf +  8, &pTSpecInfo->uMaximumServiceInterval); /* Maximum service interval */
-	COPY_WLAN_LONG(pDataBuf + 16, &suspensionInterval);
-	COPY_WLAN_LONG(pDataBuf + 24, &pTSpecInfo->meanDataRate);	/* Minimum-data-rate. */
-	COPY_WLAN_LONG(pDataBuf + 28, &pTSpecInfo->meanDataRate);	/* Mean-data-rate. */
-	COPY_WLAN_LONG(pDataBuf + 32, &pTSpecInfo->meanDataRate);	/* Peak-data-rate. */
-	COPY_WLAN_LONG(pDataBuf + 44, &pTSpecInfo->minimumPHYRate);
-	COPY_WLAN_WORD(pDataBuf + 48, &pTSpecInfo->surplausBwAllowance);
-
-	*len = WME_TSPEC_IE_LEN + 2;
-}
-
-
-
-/************************************************************************
- *                        trafficAdmCtrl_parseTspecIE					*
- ************************************************************************
-DESCRIPTION: parses a tspec IE according to the tspec parameters
-                                                                                                   
-INPUT:      pData			-  tspec IE from received frame
-
-OUTPUT:		pTSpecInfo		-  parsed tspec parameters
-
-RETURN:     None
-************************************************************************/
-void trafficAdmCtrl_parseTspecIE(tspecInfo_t *pTSpecInfo, TI_UINT8 *pData)
-{
-	tsInfo_t			tsInfo;
-	TI_UINT8				userPriority;
-	TI_UINT8				acID;
-	TI_UINT8				tid;
-	TI_UINT8				direction;
-	TI_UINT8				APSDbit;
-
-	pData += 8;  /* Skip the WME_TSPEC_IE header */
-
-	/* Get the TS-Info (3 bytes) and parse its fields */
-	tsInfo.tsInfoArr[0] = *pData;
-	tsInfo.tsInfoArr[1] = *(pData + 1);
-	tsInfo.tsInfoArr[2] = *(pData + 2);
-	pData += 3;
-
-	userPriority = (((tsInfo.tsInfoArr[1]) & TS_INFO_1_USER_PRIORITY_MASK) >> USER_PRIORITY_SHIFT);
-	
-	acID = WMEQosTagToACTable[userPriority];
-
-	tid = 	(((tsInfo.tsInfoArr[0]) & TS_INFO_0_TSID_MASK) >> TSID_SHIFT);
-	APSDbit = (((tsInfo.tsInfoArr[1]) & TS_INFO_1_APSD_MASK) >> APSD_SHIFT);
-	direction = (((tsInfo.tsInfoArr[0]) & TS_INFO_0_DIRECTION_MASK) >> DIRECTION_SHIFT);
-
-
-	pTSpecInfo->AC = (EAcTrfcType)acID;
-	pTSpecInfo->userPriority = userPriority;
-	pTSpecInfo->UPSDFlag = APSDbit;
-	pTSpecInfo->streamDirection = (EStreamDirection)direction;
-	pTSpecInfo->tid = tid;
-
-	/* Get the other Tspec IE parameters (handle WLAN fram endianess if required) */
-	COPY_WLAN_WORD(&pTSpecInfo->nominalMsduSize, pData);
-	COPY_WLAN_LONG(&pTSpecInfo->uMinimumServiceInterval, pData + 4);
-	COPY_WLAN_LONG(&pTSpecInfo->uMaximumServiceInterval, pData + 8);
-	COPY_WLAN_LONG(&pTSpecInfo->meanDataRate, pData + 28);
-	COPY_WLAN_LONG(&pTSpecInfo->minimumPHYRate, pData + 44);
-	COPY_WLAN_WORD(&pTSpecInfo->surplausBwAllowance, pData + 48);
-	pTSpecInfo->surplausBwAllowance >>= SURPLUS_BANDWIDTH_ALLOW;  /* Surplus is in 3 MSBits of TI_UINT16 */
-	COPY_WLAN_WORD(&pTSpecInfo->mediumTime, pData + 50);
-}
-
-
-
-/*************************************************************************
- *																		 *
- *							DEBUG FUNCTIONS								 *
- *																		 *
- *************************************************************************/
-void trafficAdmCtrl_print(trafficAdmCtrl_t *pTrafficAdmCtr)
-{
-	TI_UINT32 acID;
-
-	WLAN_OS_REPORT(("     traffic Adm Ctrl  \n"));
-	WLAN_OS_REPORT(("-----------------------------------\n\n"));
-	WLAN_OS_REPORT(("timeout                   = %d\n",pTrafficAdmCtr->timeout));
-	WLAN_OS_REPORT(("dialogTokenCounter        = %d\n",pTrafficAdmCtr->dialogTokenCounter));
-
-	for (acID = 0 ; acID < MAX_NUM_OF_AC ; acID++)
-	{
-			WLAN_OS_REPORT(("     AC = %d  \n",acID));
-			WLAN_OS_REPORT(("----------------------\n"));
-			WLAN_OS_REPORT(("currentState   = %d \n",pTrafficAdmCtr->currentState[acID]));
-			WLAN_OS_REPORT(("dialogToken    = %d \n",pTrafficAdmCtr->dialogToken[acID]));
-	}
-}
-	
diff --git a/wl1271/stad/src/Sta_Management/trafficAdmControl.h b/wl1271/stad/src/Sta_Management/trafficAdmControl.h
deleted file mode 100644
index 2e9ced4..0000000
--- a/wl1271/stad/src/Sta_Management/trafficAdmControl.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * trafficAdmControl.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	admCtrl.c												   */
-/*    PURPOSE:	WSM/WME admission Control							   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef _ADM_CTRL_SM_H
-#define _ADM_CTRL_SM_H
-
-#include "fsm.h"
-#include "qosMngr_API.h"
-#include "mlmeApi.h"
-
-#define INITIAL_DIALOG_TOKEN	1
-
-/* state machine states */
-typedef enum 
-{
-	TRAFFIC_ADM_CTRL_SM_STATE_IDLE			= 0,
-	TRAFFIC_ADM_CTRL_SM_STATE_WAIT   		= 1
-} trafficAdmCtrl_smState_t;
-
-/* State machine inputs */
-typedef enum 
-{
-	TRAFFIC_ADM_CTRL_SM_EVENT_START			= 0,
-	TRAFFIC_ADM_CTRL_SM_EVENT_STOP			= 1,
-	TRAFFIC_ADM_CTRL_SM_EVENT_ACCEPT    	= 2,
-    TRAFFIC_ADM_CTRL_SM_EVENT_REJECT		= 3,
-   	TRAFFIC_ADM_CTRL_SM_EVENT_TIMEOUT		= 4
-} trafficAdmCtrl_smEvents_t;
-
-
-typedef struct
-{
-	TI_UINT8					tsInfo[3];
-	trafficAdmCtrl_smState_t	rafficAdmCtrlSmCurrState;
-}tidInfo_t;
-
-
-typedef struct
-{
-	TI_HANDLE			        hTxMgmtQ;
-	TI_HANDLE			        hReport;
-	TI_HANDLE			        hOs;
-	TI_HANDLE			        hQosMngr;
-	TI_HANDLE					hCtrlData;
-	TI_HANDLE					hXCCMgr;
-	TI_HANDLE					hTimer;
-	TI_HANDLE					hTWD;
-	TI_HANDLE					hTxCtrl;
-
-	TI_HANDLE			        hAdmCtrlTimer[MAX_NUM_OF_AC];
-	TI_UINT8				    currentState[MAX_NUM_OF_AC];
-	TI_UINT8				    dialogToken[MAX_NUM_OF_AC];
-
-	TI_UINT8				    dialogTokenCounter;
-
-
-	fsm_stateMachine_t	        *pTrafficAdmCtrlSm;
-
-	TI_UINT32				     timeout;
-    TI_BOOL                      useFixedMsduSize;
-
-
-} trafficAdmCtrl_t;
-
-
-
-
-TI_HANDLE trafficAdmCtrl_create(TI_HANDLE pOs);
-
-TI_STATUS trafficAdmCtrl_unload(TI_HANDLE hTrafficAdmCtrl);
-
-TI_STATUS trafficAdmCtrl_config (TI_HANDLE hTrafficAdmCtrl,
-    						     TI_HANDLE hTxMgmtQ,
-    						     TI_HANDLE hReport,
-    						     TI_HANDLE hOs,
-    						     TI_HANDLE hQosMngr,
-    						     TI_HANDLE hCtrlData,
-    						     TI_HANDLE hXCCMgr,
-    						     TI_HANDLE hTimer,
-    						     TI_HANDLE hTWD,
-                                 TI_HANDLE hTxCtrl,
-    						     trafficAdmCtrlInitParams_t	*pTrafficAdmCtrlInitParams);
-
-TI_STATUS trafficAdmCtrl_setParam(TI_HANDLE hTrafficAdmCtrl, paramInfo_t	*pParam);
-
-TI_STATUS trafficAdmCtrl_getParam(TI_HANDLE hTrafficAdmCtrl, paramInfo_t	*pParam);
-
-TI_STATUS trafficAdmCtrl_startAdmRequest(TI_HANDLE	hTrafficAdmCtrl, tspecInfo_t *pTSpecInfo);
-
-TI_STATUS trafficAdmCtrl_stopAdmRequest(TI_HANDLE hTrafficAdmCtrl, TI_UINT8 tid);
-
-TI_STATUS trafficAdmCtrl_stop(TI_HANDLE hTrafficAdmCtrl);
-
-TI_STATUS trafficAdmCtrl_recv(TI_HANDLE hTrafficAdmCtrl, TI_UINT8* pData, TI_UINT8 action);
-
-TI_STATUS trafficAdmCtrl_sendDeltsFrame(TI_HANDLE hTrafficAdmCtrl, tspecInfo_t *pTSpecInfo, TI_UINT8 reasonCode);
-
-void trafficAdmCtrl_print(trafficAdmCtrl_t *pTrafficAdmCtr);
-
-void trafficAdmCtrl_buildTSPec(trafficAdmCtrl_t	*pTrafficAdmCtrl, 
-							   tspecInfo_t		*pTSpecInfo, 
-							   TI_UINT8				*pDataBuff,
-							   TI_UINT32			*len);
-void trafficAdmCtrl_parseTspecIE(tspecInfo_t *pTSpecInfo, TI_UINT8 *pData);
-#endif
-
diff --git a/wl1271/utils/802_11Defs.h b/wl1271/utils/802_11Defs.h
deleted file mode 100644
index d8109c3..0000000
--- a/wl1271/utils/802_11Defs.h
+++ /dev/null
@@ -1,1226 +0,0 @@
-/*
- * 802_11Defs.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************
- *
- *   MODULE:  802_11Defs.h
- *   PURPOSE: Contains 802.11 defines/structures
- *
- ****************************************************************************/
-
-#ifndef _802_11_INFO_DEFS_H
-#define _802_11_INFO_DEFS_H
-
-#include "tidef.h"
-#include "osDot11.h"
-#ifdef XCC_MODULE_INCLUDED
-#include "osDot11XCC.h"
-#endif
-
-#define DOT11_OUI_LEN                       4
-#define DOT11_COUNTRY_STRING_LEN            3
-#define DOT11_MAX_SUPPORTED_RATES           32
-
-/* Maximum size of beacon or probe-request information element */
-#define DOT11_WSC_PROBE_REQ_MAX_LENGTH 80
-
-
-typedef enum
-{
-    DOT11_B_MODE    = 1,
-    DOT11_A_MODE    = 2,
-    DOT11_G_MODE    = 3,
-    DOT11_DUAL_MODE = 4,
-    DOT11_N_MODE    = 5,
-
-    DOT11_MAX_MODE
-
-} EDot11Mode;
-
-
-/* FrameControl field of the 802.11 header  */
-
-/**/
-/* bit 15    14     13     12     11     10      9     8     7-4     3-2      1-0*/
-/* +-------+-----+------+-----+-------+------+------+----+---------+------+----------+*/
-/* | Order | WEP | More | Pwr | Retry | More | From | To | Subtype | Type | Protocol |*/
-/* |       |     | Data | Mgmt|       | Frag | DS   | DS |         |      | Version  |*/
-/* +-------+-----+------+-----+-------+------+------+----+---------+------+----------+*/
-/*     1      1      1     1      1       1      1     1       4       2        2*/
-
-
-#define DOT11_FC_PROT_VERSION_MASK   ( 3 << 0 )
-#define DOT11_FC_PROT_VERSION        ( 0 << 0 )
-
-#define DOT11_FC_TYPE_MASK           ( 3 << 2 )
-typedef enum
-{
-  DOT11_FC_TYPE_MGMT         = ( 0 << 2 ),
-  DOT11_FC_TYPE_CTRL         = ( 1 << 2 ),
-  DOT11_FC_TYPE_DATA         = ( 2 << 2 )
-} dot11_Fc_Type_e;
-
-#define DOT11_FC_SUB_MASK           ( 0x0f << 4 )
-typedef enum
-{
-  /* Management subtypes */
-  DOT11_FC_SUB_ASSOC_REQ     = (    0 << 4 ),
-  DOT11_FC_SUB_ASSOC_RESP    = (    1 << 4 ),
-  DOT11_FC_SUB_REASSOC_REQ   = (    2 << 4 ),
-  DOT11_FC_SUB_REASSOC_RESP  = (    3 << 4 ),
-  DOT11_FC_SUB_PROBE_REQ     = (    4 << 4 ),
-  DOT11_FC_SUB_PROBE_RESP    = (    5 << 4 ),
-  DOT11_FC_SUB_BEACON        = (    8 << 4 ),
-  DOT11_FC_SUB_ATIM          = (    9 << 4 ),
-  DOT11_FC_SUB_DISASSOC      = (   10 << 4 ),
-  DOT11_FC_SUB_AUTH          = (   11 << 4 ),
-  DOT11_FC_SUB_DEAUTH        = (   12 << 4 ),
-  DOT11_FC_SUB_ACTION        = (   13 << 4 ),
-
-  /* Control subtypes */
-  DOT11_FC_SUB_BAR                    = (    8 << 4 ),
-  DOT11_FC_SUB_BA                     = (    9 << 4 ),
-  DOT11_FC_SUB_PS_POLL                = (   10 << 4 ),
-  DOT11_FC_SUB_RTS                    = (   11 << 4 ),
-  DOT11_FC_SUB_CTS                    = (   12 << 4 ),
-  DOT11_FC_SUB_ACK                    = (   13 << 4 ),
-  DOT11_FC_SUB_CF_END                 = (   14 << 4 ),
-  DOT11_FC_SUB_CF_END_CF_ACK          = (   15 << 4 ),
-
-  /* Data subtypes */
-  DOT11_FC_SUB_DATA                   = (    0 << 4 ),
-  DOT11_FC_SUB_DATA_CF_ACK            = (    1 << 4 ),
-  DOT11_FC_SUB_DATA_CF_POLL           = (    2 << 4 ),
-  DOT11_FC_SUB_DATA_CF_ACK_CF_POLL    = (    3 << 4 ),
-  DOT11_FC_SUB_NULL_FUNCTION          = (    4 << 4 ),
-  DOT11_FC_SUB_CF_ACK                 = (    5 << 4 ),
-  DOT11_FC_SUB_CF_POLL                = (    6 << 4 ),
-  DOT11_FC_SUB_CF_ACK_CF_POLL         = (    7 << 4 ),
-  DOT11_FC_SUB_DATA_QOS               = (    8 << 4 ),
-  DOT11_FC_SUB_DATA_NULL_QOS          = (   12 << 4 )
-} dot11_Fc_Sub_Type_e;
-
-#define  DOT11_FC_TYPESUBTYPE_MASK    ( DOT11_FC_TYPE_MASK | DOT11_FC_SUB_MASK )
-typedef enum
-{
-  DOT11_FC_ASSOC_REQ           = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_ASSOC_REQ           ),
-  DOT11_FC_ASSOC_RESP          = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_ASSOC_RESP          ),
-  DOT11_FC_REASSOC_REQ         = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_REASSOC_REQ         ),
-  DOT11_FC_REASSOC_RESP        = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_REASSOC_RESP        ),
-  DOT11_FC_PROBE_REQ           = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_PROBE_REQ           ),
-  DOT11_FC_PROBE_RESP          = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_PROBE_RESP          ),
-  DOT11_FC_BEACON              = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_BEACON              ),
-  DOT11_FC_ATIM                = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_ATIM                ),
-  DOT11_FC_DISASSOC            = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_DISASSOC            ),
-  DOT11_FC_AUTH                = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_AUTH                ),
-  DOT11_FC_DEAUTH              = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_DEAUTH              ),
-  DOT11_FC_ACTION              = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_ACTION              ),
-  DOT11_FC_PS_POLL             = ( DOT11_FC_TYPE_CTRL | DOT11_FC_SUB_PS_POLL             ),
-  DOT11_FC_RTS                 = ( DOT11_FC_TYPE_CTRL | DOT11_FC_SUB_RTS                 ),
-  DOT11_FC_CTS                 = ( DOT11_FC_TYPE_CTRL | DOT11_FC_SUB_CTS                 ),
-  DOT11_FC_ACK                 = ( DOT11_FC_TYPE_CTRL | DOT11_FC_SUB_ACK                 ),
-  DOT11_FC_CF_END              = ( DOT11_FC_TYPE_CTRL | DOT11_FC_SUB_CF_END              ),
-  DOT11_FC_CF_END_CF_ACK       = ( DOT11_FC_TYPE_CTRL | DOT11_FC_SUB_CF_END_CF_ACK       ),
-  DOT11_FC_DATA                = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_DATA                ),
-  DOT11_FC_DATA_CF_ACK         = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_DATA_CF_ACK         ),
-  DOT11_FC_DATA_CF_POLL        = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_DATA_CF_POLL        ),
-  DOT11_FC_DATA_CF_ACK_CF_POLL = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_DATA_CF_ACK_CF_POLL ),
-  DOT11_FC_DATA_NULL_FUNCTION  = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_NULL_FUNCTION       ),
-  DOT11_FC_CF_ACK              = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_CF_ACK              ),
-  DOT11_FC_CF_POLL             = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_CF_POLL             ),
-  DOT11_FC_CF_ACK_CF_POLL      = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_CF_ACK_CF_POLL      ),
-  DOT11_FC_DATA_QOS            = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_DATA_QOS            ),
-  DOT11_FC_DATA_NULL_QOS       = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_DATA_NULL_QOS       )
-} dot11_Fc_Type_Sub_Type_e;
-
-typedef enum
-{
-  DOT11_FC_TO_DS               = ( 1 << 8  ),
-  DOT11_FC_FROM_DS             = ( 1 << 9  ),
-  DOT11_FC_MORE_FRAG           = ( 1 << 10 ),
-  DOT11_FC_RETRY               = ( 1 << 11 ),
-  DOT11_FC_PWR_MGMT            = ( 1 << 12 ),
-  DOT11_FC_MORE_DATA           = ( 1 << 13 ),
-  DOT11_FC_WEP                 = ( 1 << 14 ),
-  DOT11_FC_ORDER               = ( 1 << 15 )
-} dot11_Fc_Other_e;
-
-typedef enum
-{
-  DOT11_CAPABILITY_ESS               = ( 1 ),
-  DOT11_CAPABILITY_IESS              = ( 1 << 1 ),
-  DOT11_CAPABILITY_CF_POLLABE        = ( 1 << 2 ),
-  DOT11_CAPABILITY_CF_POLL_REQ       = ( 1 << 3 ),
-  DOT11_CAPABILITY_PRIVACY           = ( 1 << 4 ),
-  DOT11_CAPABILITY_PREAMBLE          = ( 1 << 5 ),
-  DOT11_CAPABILITY_PBCC              = ( 1 << 6 ),
-  DOT11_CAPABILITY_AGILE             = ( 1 << 7 )
-} dot11_Capability_e;
-
-#define  DOT11_FC_TO_DS_SHIFT        8
-#define  DOT11_FC_FROM_DS_SHIFT      9
-#define  DOT11_FC_MORE_FRAG_SHIFT   10
-#define  DOT11_FC_RETRY_SHIFT       11
-#define  DOT11_FC_PWR_MGMT_SHIFT    12
-#define  DOT11_FC_MORE_DATA_SHIFT   13
-#define  DOT11_FC_WEP_SHIFT         14
-#define  DOT11_FC_ORDER_SHIFT       15
-
-#define IS_WEP_ON(fc)       ((1 << DOT11_FC_WEP_SHIFT) & (fc))
-#define IS_DATA(fc)         (((DOT11_FC_TYPE_MASK) & (fc)) == DOT11_FC_TYPE_DATA)
-#define IS_CTRL(fc)         (((DOT11_FC_TYPE_MASK) & (fc)) == DOT11_FC_TYPE_CTRL)
-#define IS_MGMT(fc)         (((DOT11_FC_TYPE_MASK) & (fc)) == DOT11_FC_TYPE_MGMT)
-#define IS_LEGACY_DATA(fc)  (((DOT11_FC_TYPESUBTYPE_MASK) & (fc)) == DOT11_FC_DATA)
-#define IS_AUTH(fc)         (((DOT11_FC_AUTH) & (fc)) == DOT11_FC_AUTH)
-#define IS_QOS_FRAME(fc)    ((((fc) & (DOT11_FC_TYPESUBTYPE_MASK)) == DOT11_FC_DATA_QOS)   ||   \
-                             (((fc) & (DOT11_FC_TYPESUBTYPE_MASK)) == DOT11_FC_DATA_NULL_QOS) )
-#define IS_HT_FRAME(fc)     ((fc) & (DOT11_FC_ORDER))
-
-
-
-#define TUs_TO_MSECs(x)     (((x) << 10) / 1000)
-
-#define TIME_STAMP_LEN  8
-
-/* SequenceControl field of the 802.11 header */
-/**/
-/* bit    15 - 4           3 - 0*/
-/* +-------------------+-----------+*/
-/* |  Sequence Number  | Fragment  |*/
-/* |                   |  Number   |*/
-/* +-------------------+-----------+*/
-/*         12                4*/
-
-typedef enum
-{
-  DOT11_SC_FRAG_NUM_MASK = ( 0xf   << 0 ),
-  DOT11_SC_SEQ_NUM_MASK  = ( 0xfff << 4 )
-} dot11_Sc_t;
-
-/* QoS Control field of the 802.11 header */
-#define DOT11_QOS_CONTROL_FIELD_TID_BITS    0x000f
-#define DOT11_QOS_CONTROL_FIELD_A_MSDU_BITS 0x0080
-
-#define DOT11_QOS_CONTROL_ACK        0x0000
-#define DOT11_QOS_CONTROL_DONT_ACK   0x0020
-
-typedef struct
-{
-  TI_UINT16        fc;
-  TI_UINT16        duration;
-  TMacAddr         address1;
-  TMacAddr         address2;
-  TMacAddr         address3;
-  TI_UINT16        seqCtrl;
-  TI_UINT16        qosControl;
-/*  TMacAddr    address4;*/
-}  dot11_header_t;
-
-typedef struct
-{
-  TI_UINT16        fc;
-  TI_UINT16        duration;
-  TMacAddr         address1;
-  TMacAddr         address2;
-  TMacAddr         address3;
-  TI_UINT16        seqCtrl;
-} legacy_dot11_header_t;
-
-
-
-typedef struct
-{
-  TI_UINT16        fc;
-  TI_UINT16        duration;
-  TMacAddr         DA;
-  TMacAddr         SA;
-  TMacAddr         BSSID;
-  TI_UINT16        seqCtrl;
-} dot11_mgmtHeader_t;
-
-typedef struct
-{
-  TI_UINT8     DSAP;
-  TI_UINT8     SSAP;
-  TI_UINT8     Control;
-  TI_UINT8     OUI[3];
-  TI_UINT16    Type;
-} Wlan_LlcHeader_T;
-
-typedef struct
-{
-  TI_UINT16        fc;
-  TI_UINT16        AID;
-  TMacAddr         BSSID;
-  TMacAddr         TA;
-} dot11_PsPollFrameHeader_t;
-
-typedef struct
-{
-  TI_UINT16        fc;
-  TI_UINT16        duration;
-  TMacAddr         RA;
-  TMacAddr         TA;
-} dot11_BarFrameHeader_t;
-
-
-#define FCS_SIZE    4
-
-#define WLAN_HDR_LEN                            24
-#define WLAN_HT_HDR_LEN                         28
-#define WLAN_QOS_HDR_LEN                        26
-#define WLAN_QOS_HT_HDR_LEN                     30
-#define WLAN_QOS_HT_CONTROL_FIELD_LEN           4
-#define WLAN_SNAP_HDR_LEN                       8
-#define WLAN_WITH_SNAP_HEADER_MAX_SIZE          (WLAN_HDR_LEN + WLAN_SNAP_HDR_LEN)
-#define WLAN_WITH_SNAP_QOS_HEADER_MAX_SIZE      (WLAN_QOS_HDR_LEN + WLAN_SNAP_HDR_LEN)
-
-#define GET_MAX_HEADER_SIZE(macHeaderPointer,headerSize)    \
-    if (IS_QOS_FRAME(*(TI_UINT16*)(macHeaderPointer)))      \
-    {\
-       if (IS_HT_FRAME(*(TI_UINT16*)(macHeaderPointer)))    \
-           *headerSize = WLAN_QOS_HT_HDR_LEN;               \
-       else                                                 \
-           *headerSize = WLAN_QOS_HDR_LEN;                  \
-     }\
-     else                                                   \
-     {\
-       if (IS_HT_FRAME(*(TI_UINT16*)(macHeaderPointer)))    \
-           *headerSize = WLAN_HT_HDR_LEN;                   \
-       else                                                 \
-           *headerSize = WLAN_HDR_LEN;                      \
-     }
-
-/****************************************************************************************
-    The next table is defined in 802.11 spec section 7.2.2 for the address field contents :
-    To DS   From DS     Address 1    Address 2  Address 3    Address 4
-    -------------------------------------------------------------------
-    0           0           DA          SA          BSSID       N/A
-    0           1           DA          BSSID       SA          N/A
-    1           0           BSSID       SA          DA          N/A
-    1           1           RA          TA          DA          SA         
-    
-NOTE: We only support packets coming from within the DS (i.e. From DS = 0)
-*****************************************************************************************/
-/* return the destination address used in *dot11_header_t */
-#define GET_DA_FROM_DOT11_HEADER_T(pDot11Hdr)   ((pDot11Hdr->fc & DOT11_FC_TO_DS) ? (pDot11Hdr->address3) : (pDot11Hdr->address1)) 
-
-
-/*
- * MANAGEMENT
- * -----------------
- */
-
-/* mgmt body max length */
-#define MAX_MGMT_BODY_LENGTH                2312
-/* maximal length of beacon body - note that actual beacons may actually be longer
-   than this size, at least according to the spec, but so far no larger beacon was seen 
-  Note: 1500 is the recommended size by the Motorola Standard team. TI recommendation is 700*/
-#define MAX_BEACON_BODY_LENGTH              1500
-
-/* general mgmt frame structure */
-typedef struct
-{
-    dot11_mgmtHeader_t  hdr;
-    TI_UINT8                body[MAX_MGMT_BODY_LENGTH];
-} dot11_mgmtFrame_t;
-
-/* Capabilities Information Field - IN THE AIR */
-/**/
-/*  bit  15      14       13         12        11         10      9      8      7   -   0*/
-/* +----------+------+----------+---------+----------+---------+------+-----+---------------+*/
-/* |  Channel |      |  Short   | Privacy | CF Poll  |   CF    |      |     |   RESERVED    |   */
-/* |  Agility | PBCC | Preamble |         | Request  | Pollable| IBSS | ESS |               |*/
-/* +----------+------+----------+---------+----------+---------+------+-----+---------------+   */
-/*       1        1       1          1         1          1       1      1*/
-
-
-/* Capabilities Information Field - IN THE MGMT SOFTWARE AFTER THE SWAP */
-/**/
-/* bit 15 - 8         7        6       5          4         3          2       1      0*/
-/* +------------+----------+------+----------+---------+----------+---------+------+-----+*/
-/* |            |  Channel |      |  Short   | Privacy | CF Poll  |   CF    |      |     |*/
-/* |  Reserved  |  Agility | PBCC | Preamble |         | Request  | Pollable| IBSS | ESS |*/
-/* +------------+----------+------+----------+---------+----------+---------+------+-----+*/
-/*       8            1        1       1          1         1          1       1      1*/
-
-
-
-typedef enum
-{ 
-  DOT11_CAPS_ESS             = ( 1 << 0 ),
-  DOT11_CAPS_IBSS            = ( 1 << 1 ),
-  DOT11_CAPS_CF_POLLABLE     = ( 1 << 2 ),
-  DOT11_CAPS_CF_POLL_REQUEST = ( 1 << 3 ),
-  DOT11_CAPS_PRIVACY         = ( 1 << 4 ),
-  DOT11_CAPS_SHORT_PREAMBLE  = ( 1 << 5 ),
-  DOT11_CAPS_PBCC            = ( 1 << 6 ),
-  DOT11_CAPS_CHANNEL_AGILITY = ( 1 << 7 ),
-  DOT11_SPECTRUM_MANAGEMENT  = ( 1 << 8 ),
-  DOT11_CAPS_QOS_SUPPORTED   = ( 1 << 9 ),
-  DOT11_CAPS_SHORT_SLOT_TIME = (1  << 10),
-
-  DOT11_CAPS_APSD_SUPPORT    = ( 1 << 11),
-
-  DOT11_CAPS_DELAYED_BA      = ( 1 << 14),
-  DOT11_CAPS_IMMEDIATE_BA    = ( 1 << 15)
-
-} dot11_capabilities_e;
-
-typedef enum 
-{
-    /* ESS */
-    CAP_ESS_MASK            = 1,
-    CAP_ESS_SHIFT           = 0,
-
-    /* IBSS */
-    CAP_IBSS_MASK           = 1,
-    CAP_IBSS_SHIFT          = 1,
-
-    /* CF Pollable */
-    CAP_CF_POLL_MASK        = 1,
-    CAP_CF_POLL_SHIFT       = 2,
-    
-    /* CF Poll request */
-    CAP_CF_REQ_MASK         = 1,
-    CAP_CF_REQ_SHIFT        = 3,
-    
-    /* Privacy */
-    CAP_PRIVACY_MASK        = 1,
-    CAP_PRIVACY_SHIFT       = 4,
-
-    /* Short Preamble*/
-    CAP_PREAMBLE_MASK       = 1,
-    CAP_PREAMBLE_SHIFT      = 5,
-    
-    /* PBCC */
-    CAP_PBCC_MASK           = 1,
-    CAP_PBCC_SHIFT          = 6,
-    
-    /* Agile */
-    CAP_AGILE_MASK          = 1,
-    CAP_AGILE_SHIFT         = 7,
-
-    /* Slot time */
-    CAP_SLOT_TIME_MASK      = 1,
-    CAP_SLOT_TIME_SHIFT     = 10,
-
-    /* APSD */
-    CAP_APSD_MASK           = 1,
-    CAP_APSD_SHIFT          = 11
-
-
-} wdrv_mgmtCapabilities_e;
-
-
-/*
- * 802.11 Information elements
- * ---------------------------
- */
-
-typedef TI_UINT8 dot11_eleHdr_t[2];  /* Byte-0: IE-ID,  Byte-1: IE-Length  */
-
-/* fixed fields lengths, except of currentAP & timestamp*/
-#define FIX_FIELD_LEN       2
-
-/* SSID Information Element */
-#define DOT11_SSID_ELE_ID   0
-
-/* Max SSID length */
-#define MAX_SSID_LEN        32
-
-typedef struct 
-{
-    dot11_eleHdr_t    hdr;
-    char              serviceSetId[MAX_SSID_LEN];
-}  dot11_SSID_t;
-
-
-/* Supportted rates Information Element */
-#define DOT11_SUPPORTED_RATES_ELE_ID        1
-#define DOT11_EXT_SUPPORTED_RATES_ELE_ID        50
-typedef struct 
-{
-  dot11_eleHdr_t hdr;
-  TI_UINT8 rates[DOT11_MAX_SUPPORTED_RATES];
-}  dot11_RATES_t;
-
-
-#define ERP_IE_NON_ERP_PRESENT_MASK         0x1
-#define ERP_IE_USE_PROTECTION_MASK          0x2
-#define ERP_IE_BARKER_PREAMBLE_MODE_MASK    0x4
-#define DOT11_ERP_IE_ID 42
-typedef struct
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           ctrl;
-}  dot11_ERP_t;
-
-/* RSN Information Element */
-#define MAX_RSN_IE                          3
-#define DOT11_RSN_MAX                       255 
-typedef struct 
-{
-  dot11_eleHdr_t hdr;
-  TI_UINT8 rsnIeData[DOT11_RSN_MAX];
-}  dot11_RSN_t;
-
-/* General definitions needed by rsn.c */
-#define IV_FIELD_SIZE   4 
-#define ICV_FIELD_SIZE  4
-#define MIC_FIELD_SIZE  8 
-#define EIV_FIELD_SIZE  4
-#define WEP_AFTER_HEADER_FIELD_SIZE  IV_FIELD_SIZE
-#define TKIP_AFTER_HEADER_FIELD_SIZE (IV_FIELD_SIZE + EIV_FIELD_SIZE)
-#define AES_AFTER_HEADER_FIELD_SIZE  8
-
-/* DS params Information Element */
-#define DOT11_DS_PARAMS_ELE_ID      3
-#define DOT11_DS_PARAMS_ELE_LEN     1
-typedef struct 
-{
-  dot11_eleHdr_t hdr;
-  TI_UINT8  currChannel;
-}  dot11_DS_PARAMS_t;
-
-
-/* DS params Information Element */
-#define DOT11_IBSS_PARAMS_ELE_ID    6
-#define DOT11_IBSS_PARAMS_ELE_LEN   2
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT16          atimWindow;
-} dot11_IBSS_PARAMS_t;
-
-#define DOT11_FH_PARAMS_ELE_ID      2
-#define DOT11_FH_PARAMS_ELE_LEN     5
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT16          dwellTime;
-    TI_UINT8           hopSet;
-    TI_UINT8           hopPattern;
-    TI_UINT8           hopIndex;
-}  dot11_FH_PARAMS_t;
-
-/* tim Information Element */
-#define DOT11_TIM_ELE_ID    5
-#define DOT11_PARTIAL_VIRTUAL_BITMAP_MAX    251
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           dtimCount;
-    TI_UINT8           dtimPeriod;
-    TI_UINT8           bmapControl;
-    TI_UINT8           partialVirtualBmap[DOT11_PARTIAL_VIRTUAL_BITMAP_MAX];
-}  dot11_TIM_t;
-
-/* tim Information Element */
-#define DOT11_CF_ELE_ID             4
-#define DOT11_CF_PARAMS_ELE_LEN     6
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           cfpCount;
-    TI_UINT8           cfpPeriod;
-    TI_UINT16          cfpMaxDuration;
-    TI_UINT16          cfpDurRemain;
-} dot11_CF_PARAMS_t;
-
-/* Challenge text Information Element */
-#define DOT11_CHALLENGE_TEXT_ELE_ID     16
-#define DOT11_CHALLENGE_TEXT_MAX        253
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           text[ DOT11_CHALLENGE_TEXT_MAX ];
-}  dot11_CHALLENGE_t;
-
-
-#define DOT11_NUM_OF_MAX_TRIPLET_CHANNEL    37
-
-typedef struct
-{
-    TI_UINT8           firstChannelNumber;
-    TI_UINT8           numberOfChannels;
-    TI_UINT8           maxTxPowerLevel;
-} dot11_TripletChannel_t;
-
-typedef struct
-{
-    TI_UINT8                CountryString[DOT11_COUNTRY_STRING_LEN];
-    dot11_TripletChannel_t  tripletChannels[DOT11_NUM_OF_MAX_TRIPLET_CHANNEL];
-} dot11_countryIE_t;
-
-
-/* Country Inforamtion Element */
-#define DOT11_COUNTRY_ELE_ID        7
-#define DOT11_COUNTRY_ELE_LEN_MAX   ( ((DOT11_NUM_OF_MAX_TRIPLET_CHANNEL+1)*3) + !((DOT11_NUM_OF_MAX_TRIPLET_CHANNEL&0x1)))
-typedef struct 
-{
-    dot11_eleHdr_t    hdr;
-    dot11_countryIE_t countryIE;
-}  dot11_COUNTRY_t;
-
-
-/* Power Constraint Information Element */
-#define DOT11_POWER_CONSTRAINT_ELE_ID       (32)
-#define DOT11_POWER_CONSTRAINT_ELE_LEN      (1)
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           powerConstraint;
-}  dot11_POWER_CONSTRAINT_t;
-
-
-
-/* Power Capability Information Element */
-#define DOT11_CAPABILITY_ELE_ID         (33)
-#define DOT11_CAPABILITY_ELE_LEN        (2)
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           minTxPower;
-    TI_UINT8           maxTxPower;
-} dot11_CAPABILITY_t;
-
-/* TPC request Information Element */
-#define DOT11_TPC_REQUEST_ELE_ID        (34)
-#define DOT11_TPC_REQUEST_ELE_LEN       (0)
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-}  dot11_TPC_REQUEST_t;
-
-/* TPC report Information Element */
-#define DOT11_TPC_REPORT_ELE_ID         (35)
-#define DOT11_TPC_REPORT_ELE_LEN        (2)
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           transmitPower;
-    TI_UINT8           linkMargin;
-} dot11_TPC_REPORT_t;
-
-
-#ifdef  XCC_MODULE_INCLUDED
-
-/* Cell Transmit Power Information Element */
-#define DOT11_CELL_TP_ELE_ID            (150)
-#define DOT11_CELL_TP_ELE_LEN           (6)
-
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           oui[4];
-    TI_UINT8           power;
-    TI_UINT8           reserved;
-} dot11_CELL_TP_t;
-
-#define   DOT11_CELL_TP \
-    dot11_CELL_TP_t         *cellTP;
-    
-#else   /* XCC_MODULE_INCLUDED */
-
-#define   DOT11_CELL_TP
-
-#endif  /* XCC_MODULE_INCLUDED */
-
-
-/* Channel Supported Information Element */
-#define DOT11_CHANNEL_SUPPORTED_ELE_ID  (36)
-#define DOT11_CHANNEL_SUPPORTED_ELE_LEN (26)
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           supportedChannel[DOT11_CHANNEL_SUPPORTED_ELE_LEN];
-
-} dot11_CHANNEL_SUPPORTED_t;
-
-/* Channel Switch Announcement Information Element */
-#define DOT11_CHANNEL_SWITCH_ELE_ID     (37)
-#define DOT11_CHANNEL_SWITCH_ELE_LEN    (3)
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           channelSwitchMode;
-    TI_UINT8           channelNumber;
-    TI_UINT8           channelSwitchCount;
-}  dot11_CHANNEL_SWITCH_t;
-
-#define MAX_NUM_REQ (16)
-
-/* Measurement request Information Element */
-#define DOT11_MEASUREMENT_REQUEST_ELE_ID        (38)
-#define DOT11_MEASUREMENT_REQUEST_LEN           (2)
-#define DOT11_MEASUREMENT_REQUEST_ELE_LEN       (3 + DOT11_MEASUREMENT_REQUEST_LEN*MAX_NUM_REQ)
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           measurementToken;
-    TI_UINT8           measurementMode;
-    TI_UINT8           measurementType;
-    TI_UINT8           measurementRequests[DOT11_MEASUREMENT_REQUEST_LEN*MAX_NUM_REQ];
-}  dot11_MEASUREMENT_REQUEST_t;
-
-
-/* Quiet Information Element */
-#define DOT11_QUIET_ELE_ID              (40)
-#define DOT11_QUIET_ELE_LEN             (6)
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           quietCount;
-    TI_UINT8           quietPeriod;
-    TI_UINT16          quietDuration;
-    TI_UINT16          quietOffset;
-} dot11_QUIET_t;
-
-
-/* QoS Capability Information Element */
-#define DOT11_QOS_CAPABILITY_ELE_ID     (46)
-#define DOT11_QOS_CAPABILITY_ELE_LEN    (1)
-
-#define AC_APSD_FLAGS_MASK              (1)
-#define Q_ACK_BITG_MASK                 (1)
-#define MAX_SP_LENGTH_MASK              (3)
-#define MORE_DATA_ACK_MASK              (1)
-
-#define AC_VO_APSD_FLAGS_SHIFT          (0)
-#define AC_VI_APSD_FLAGS_SHIFT          (1)
-#define AC_BK_APSD_FLAGS_SHIFT          (2)
-#define AC_BE_APSD_FLAGS_SHIFT          (3)
-#define Q_ACK_FLAGS_SHIFT               (4)
-#define MAX_SP_LENGTH_SHIFT             (5)
-#define MORE_DATA_ACK_SHIFT             (7)
-
-#define QOS_CONTROL_UP_SHIFT            (0)
-
-#define AP_QOS_INFO_UAPSD_MASK          (1)
-#define AP_QOS_INFO_UAPSD_SHIFT         (7)
-
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           QosInfoField;
-}  dot11_QOS_CAPABILITY_IE_t;
-
-/* WPS Information Element */
-#define DOT11_WPS_ELE_ID    (221)
-#define DOT11_WPS_OUI       {0x00, 0x50, 0xF2, 0x04}
-#define DOT11_WPS_OUI_LEN   4
-
-/* WME Information Element */
-#define DOT11_WME_ELE_ID                (221)
-#define DOT11_WME_ELE_LEN               (7)
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           OUI[3];
-    TI_UINT8           OUIType;
-    TI_UINT8           OUISubType;
-    TI_UINT8           version;
-    TI_UINT8           ACInfoField;
-}  dot11_WME_IE_t;
-
-
-typedef struct
-{
-    TI_UINT8           ACI_AIFSN;
-    TI_UINT8           ECWmin_ECWmax;
-    TI_UINT16          TXOPLimit;
-} dot11_QOS_AC_IE_ParametersRecord_t;
-
-typedef struct
-{
-    dot11_QOS_AC_IE_ParametersRecord_t        ACBEParametersRecord;
-    dot11_QOS_AC_IE_ParametersRecord_t        ACBKParametersRecord;
-    dot11_QOS_AC_IE_ParametersRecord_t        ACVIParametersRecord;
-    dot11_QOS_AC_IE_ParametersRecord_t        ACVOParametersRecord;
-} dot11_ACParameters_t;
-
-
-/* WME Parameter Information Element */
-#define DOT11_WME_PARAM_ELE_ID          (221)
-#define DOT11_WME_PARAM_ELE_LEN         (24)
-typedef struct 
-{
-    dot11_eleHdr_t      hdr;
-    TI_UINT8               OUI[3];
-    TI_UINT8               OUIType;
-    TI_UINT8               OUISubType;
-    TI_UINT8               version;
-    TI_UINT8               ACInfoField;
-    TI_UINT8               reserved;
-    dot11_ACParameters_t   WME_ACParameteres;
-}  dot11_WME_PARAM_t;
-
-
-/* 802.11n HT Information Element */
-#define DOT11_HT_CAPABILITIES_ELE_LEN    (26)
-#define DOT11_HT_INFORMATION_ELE_LEN    (22)
-
-#define DOT11_HT_CAPABILITIES_MCS_RATE_OFFSET   (3)
-#define DOT11_HT_INFORMATION_MCS_RATE_OFFSET    (6)
-
-typedef struct 
-{
-    dot11_eleHdr_t  tHdr;
-    TI_UINT8        aHtCapabilitiesIe[DOT11_HT_CAPABILITIES_ELE_LEN];   /* HT capabilities IE unparsed */
-}  Tdot11HtCapabilitiesUnparse;
-
-typedef struct 
-{
-    dot11_eleHdr_t  tHdr;
-    TI_UINT8        aHtInformationIe[DOT11_HT_INFORMATION_ELE_LEN];     /* HT Information IE unparsed */
-}  Tdot11HtInformationUnparse;
-
-/* BA session bits mask */
-#define DOT11_BAR_CONTROL_FIELD_TID_BITS            0xf000
-#define DOT11_BA_PARAMETER_SET_FIELD_TID_BITS       0x003C
-#define DOT11_BA_PARAMETER_SET_FIELD_WINSIZE_BITS   0xffC0
-#define DOT11_DELBA_PARAMETER_FIELD_TID_BITS        0xf000
-
-/* action field BA frames */
-typedef enum
-{
-    DOT11_BA_ACTION_ADDBA           = 0,
-    DOT11_BA_ACTION_DELBA           = 2
-} Edot11BaAction;
-
-
-/* WiFi Simple Config Information Element */
-#define DOT11_WSC_PARAM_ELE_ID          (221)
-
-#define DOT11_WSC_SELECTED_REGISTRAR_CONFIG_METHODS      0x1053
-#define DOT11_WSC_SELECTED_REGISTRAR_CONFIG_METHODS_PIN  0xC
-#define DOT11_WSC_SELECTED_REGISTRAR_CONFIG_METHODS_PBC  0x80
-
-#define DOT11_WSC_DEVICE_PASSWORD_ID      0x1012
-#define DOT11_WSC_DEVICE_PASSWORD_ID_PIN  0x0000
-#define DOT11_WSC_DEVICE_PASSWORD_ID_PBC  0x0004
-
-/* WiFi Simple Config Parameter Information Element */
-#define DOT11_WSC_PROBE_REQ_PARAM_ELE_LEN           (22)
-#define DOT11_WSC_BEACON_MAX_LENGTH 160
-
-typedef struct 
-{
-    dot11_eleHdr_t              hdr;
-    TI_UINT8                        OUI[3];
-    TI_UINT8                        OUIType;
-    TI_UINT8 WSCBeaconOrProbIE[DOT11_WSC_BEACON_MAX_LENGTH];
-}  dot11_WSC_t;
-
-#define dot11_WPA_OUI_TYPE                  (1)
-#define dot11_WME_OUI_TYPE                  (2)
-#define dot11_WSC_OUI_TYPE                  (4)
-#define dot11_WME_OUI_SUB_TYPE_IE           (0)
-#define dot11_WME_OUI_SUB_TYPE_PARAMS_IE    (1)
-#define dot11_WME_VERSION                   (1)
-#define dot11_WME_ACINFO_MASK               0x0f
-
-/* -------------------- TSPEC ----------------- */
-
-typedef struct
-{
-    TI_UINT8   tsInfoArr[3];
-
-}  tsInfo_t;
-
-
-
-/* This structure is part of the TSPEC structure. It was seperated since there are some cases (such as DEL_TS), which we dont need
-to send ALL the TSPEC structure, but only as far as TsInfo. The TSPEC structure contains this smaller structure */
-typedef struct
-{
-    dot11_eleHdr_t  hdr;
-    
-    TI_UINT8   OUI[3];
-    TI_UINT8   oui_type;
-    TI_UINT8   oui_subtype;
-    TI_UINT8   version;
-
-    tsInfo_t tsInfoField;
-}  dot11_WME_TSPEC_IE_hdr_t;
-
-typedef struct
-{
-
-    dot11_WME_TSPEC_IE_hdr_t tHdr;
-
-    TI_UINT16  nominalMSDUSize;
-    TI_UINT16  maximumMSDUSize;
-    TI_UINT32  minimumServiceInterval;
-    TI_UINT32  maximumServiceInterval;
-    TI_UINT32  inactivityInterval;
-    TI_UINT32  suspensionInterval;
-    TI_UINT32  serviceStartTime;
-    TI_UINT32  minimumDataRate;
-    TI_UINT32  meanDataRate;
-    TI_UINT32  peakDataRate;
-    TI_UINT32  maximumBurstSize;
-    TI_UINT32  delayBound;
-    TI_UINT32  minimumPHYRate;
-    TI_UINT16  surplusBandwidthAllowance;
-    TI_UINT16  mediumTime;
-
-} dot11_WME_TSPEC_IE_t;
-
-
-#define WME_TSPEC_IE_ID                         221
-#define WME_TSPEC_IE_LEN                        61
-#define WME_TSPEC_IE_TSINFO_LEN                 9                
-#define WME_TSPEC_IE_OUI_TYPE                   0x02
-#define WME_TSPEC_IE_OUI_SUB_TYPE               0x02
-#define WME_TSPEC_IE_VERSION                    0x01
-
-/* OUI TYPE values that can be present in management packets inside Cisco vendor specific IE */
-typedef enum
-{
-    TS_METRIX_OUI_TYPE = 0x07,
-    TS_RATE_SET_OUI_TYPE = 0x08,
-    EDCA_LIFETIME_OUI_TYPE = 0x09
-} XCC_IE_OUI_TYPE_t;
-
-#define ADDTS_REQUEST_ACTION                    0x00
-#define ADDTS_RESPONSE_ACTION                   0x01
-#define DELTS_ACTION                            0x02
-
-#define ADDTS_STATUS_CODE_SUCCESS               0x00
-#define DELTS_CODE_SUCCESS                      0x00
- 
-
-#define TS_INFO_0_TRAFFIC_TYPE_MASK             0x01
-#define TS_INFO_0_TSID_MASK                     0x1E
-#define TS_INFO_0_DIRECTION_MASK                0x60
-#define TS_INFO_0_ACCESS_POLICY_MASK            0x80
-
-#define TS_INFO_1_ACCESS_POLICY_MASK            0x01
-#define TS_INFO_1_AGGREGATION_MASK              0x02
-#define TS_INFO_1_APSD_MASK                     0x04    
-#define TS_INFO_1_USER_PRIORITY_MASK            0x38
-#define TS_INFO_1_TSINFO_ACK_POLICY_MASK        0xC0
-
-#define TS_INFO_2_SCHEDULE_MASK                 0x01
-#define TS_INFO_2_RESERVED_MASK                 0xF7    
-
-#define TRAFFIC_TYPE_SHIFT                      0
-#define TSID_SHIFT                              1
-#define DIRECTION_SHIFT                         5
-#define ACCESS_POLICY_SHIFT                     7
-#define AGGREGATION_SHIFT                       1
-#define APSD_SHIFT                              2   
-#define USER_PRIORITY_SHIFT                     3
-#define TSINFO_ACK_POLICY_SHIFT                 6
-#define SCHEDULE_SHIFT                          0
-#define RESERVED_SHIFT                          1
-#define SURPLUS_BANDWIDTH_ALLOW                 13  
-
-#define TS_INFO_0_ACCESS_POLICY_EDCA            0x1                 
-#define NORMAL_ACKNOWLEDGEMENT                  0x00        
-#define NO_SCHEDULE                             0x00        
-#define PS_UPSD                                 0x01
-#define EDCA_MODE                               0x08
-#define FIX_MSDU_SIZE                           0x8000
-
-#define WPA_IE_OUI                              {0x00, 0x50, 0xf2}
-#define XCC_OUI                                 {0x00, 0x40, 0x96}
-
-/* Action field structure
-    used for extended management action such as spectrum management */ 
-typedef TI_UINT8 dot11_ACTION_FIELD_t[2];
-
-
-/* Management frames sub types */
-typedef enum
-{
-    ASSOC_REQUEST       = 0,
-    ASSOC_RESPONSE      = 1,
-    RE_ASSOC_REQUEST    = 2,
-    RE_ASSOC_RESPONSE   = 3,
-    PROBE_REQUEST       = 4,
-    PROBE_RESPONSE      = 5,
-    BEACON              = 8,
-    ATIM                = 9,
-    DIS_ASSOC           = 10,
-    AUTH                = 11,
-    DE_AUTH             = 12,
-    ACTION              = 13
-} dot11MgmtSubType_e;
-
-/* Management frames element IDs */
-typedef enum
-{
-    SSID_IE_ID                          = 0,
-    SUPPORTED_RATES_IE_ID               = 1,
-    FH_PARAMETER_SET_IE_ID              = 2,
-    DS_PARAMETER_SET_IE_ID              = 3,
-    CF_PARAMETER_SET_IE_ID              = 4,
-    TIM_IE_ID                           = 5,
-    IBSS_PARAMETER_SET_IE_ID            = 6,
-    COUNTRY_IE_ID                       = 7,
-    CHALLANGE_TEXT_IE_ID                = 16,
-    POWER_CONSTRAINT_IE_ID              = 32,
-    TPC_REPORT_IE_ID                    = 35,
-    CHANNEL_SWITCH_ANNOUNCEMENT_IE_ID   = 37,
-    QUIET_IE_ID                         = 40,
-    ERP_IE_ID                           = 42,
-    HT_CAPABILITIES_IE_ID               = 45,
-    QOS_CAPABILITY_IE_ID                = 46,
-    RSN_IE_ID                           = 48,
-    EXT_SUPPORTED_RATES_IE_ID           = 50,
-    HT_INFORMATION_IE_ID                = 61,
-    XCC_EXT_1_IE_ID                     = 133,
-    XCC_EXT_2_IE_ID                     = 149,  
-    CELL_POWER_IE                       = 150, /*XCC*/
-    WPA_IE_ID                           = 221
-
-} dot11MgmtIeId_e;
-
-/* Spectrum Management Action fields */
-typedef enum
-{
-    MEASUREMENT_REQUEST             = 0,
-    MEASUREMENT_REPORT              = 1,
-    TPC_REQUEST                     = 2,
-    TPC_REPORT                      = 3,
-    CHANNEL_SWITCH_ANNOUNCEMENT     = 4
-} dot11ActionFrameTypes_e;
-
-/* Category fields (such as apectrum management)*/
-typedef enum
-{
-    CATAGORY_SPECTRUM_MANAGEMENT        = 0,
-    CATAGORY_QOS                        = 1,
-    WME_CATAGORY_QOS                    = 17,
-    CATAGORY_SPECTRUM_MANAGEMENT_ERROR  = 128
-} dot11CategoryTypes_e;
-
-
-/* 
- * Management templates to set to the HAL:
- */
-
-#ifdef XCC_MODULE_INCLUDED
-
-    typedef struct  
-    {
-        dot11_mgmtHeader_t  hdr;
-        char                infoElements[sizeof( dot11_SSID_t ) + 
-                                         sizeof( dot11_RATES_t ) +
-                                         sizeof( dot11_RATES_t ) +
-                                         sizeof( Tdot11HtCapabilitiesUnparse ) +
-                                         DOT11_WSC_PROBE_REQ_MAX_LENGTH +
-                                         sizeof( XCC_radioManagmentCapability_IE_t )
-                                        ];
-    } probeReqTemplate_t;
-
-#else /* XCC_MODULE_INCLUDED */
-
-    typedef struct  
-    {
-        dot11_mgmtHeader_t  hdr;
-        char                infoElements[sizeof( dot11_SSID_t ) + 
-                                         sizeof( dot11_RATES_t ) +
-                                         sizeof( dot11_RATES_t ) +
-                                         sizeof( Tdot11HtCapabilitiesUnparse ) +
-                                         DOT11_WSC_PROBE_REQ_MAX_LENGTH
-                                        ];
-    } probeReqTemplate_t;
-
-#endif /* XCC_MODULE_INCLUDED */
-
-
-typedef struct 
-{
-    dot11_mgmtHeader_t  hdr;
-    TI_UINT8               timeStamp[TIME_STAMP_LEN];
-    TI_UINT16              beaconInterval;
-    TI_UINT16              capabilities;
-    char                infoElements[ sizeof( dot11_SSID_t ) + 
-                                      sizeof( dot11_RATES_t ) +
-                                      sizeof( dot11_RATES_t ) +
-                                      sizeof( dot11_DS_PARAMS_t ) +
-                                      sizeof( dot11_COUNTRY_t)      ];
-}  probeRspTemplate_t;
-
-typedef struct 
-{
-    dot11_mgmtHeader_t  hdr;
-} nullDataTemplate_t;
-
-typedef struct 
-{
-    dot11_mgmtHeader_t  hdr;
-    TI_UINT16 disconnReason;
-} disconnTemplate_t; /* Deauth or Disassoc */
-
-typedef struct
-{
-    dot11_header_t   hdr;
-	TI_UINT8 	securityOverhead[AES_AFTER_HEADER_FIELD_SIZE];
-    Wlan_LlcHeader_T LLC;
-    TI_UINT16 hardType;
-    TI_UINT16 protType;
-    TI_UINT8  hardSize;
-    TI_UINT8  protSize;
-    TI_UINT16 op;
-    TMacAddr  StaMac;
-    TIpAddr   StaIp;
-    TMacAddr  TargMac;
-    TIpAddr   TargIp;
-} ArpRspTemplate_t; /* for auto ArpRsp sending by FW */
-
-typedef struct
-{
-   dot11_PsPollFrameHeader_t   hdr;
-} psPollTemplate_t;
-
-typedef struct
-{
-   dot11_header_t   hdr;
-}  QosNullDataTemplate_t;
-
-/* Traffic Stream Rate Set (TSRS) info-elements */
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           OUI[3];
-    TI_UINT8           oui_type;
-    TI_UINT8           tsid;
-    TI_UINT8           tsNominalRate;
-} dot11_TSRS_STA_IE_t;
-
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           OUI[3];
-    TI_UINT8           oui_type;
-    TI_UINT8           tsid;
-    TI_UINT8           tsRates[8];
-}  dot11_TSRS_IE_t;
-
-/* MSDU lifetime info-element */
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           OUI[3];
-    TI_UINT8           oui_type;
-    TI_UINT8           tsid;
-    TI_UINT16          msduLifeTime;
-}  dot11_MSDU_LIFE_TIME_IE_t;
-
-typedef struct 
-{
-    dot11_eleHdr_t  hdr;
-    TI_UINT8           OUI[3];
-    TI_UINT8           oui_type;
-    TI_UINT8           tsid;
-    TI_UINT8           state;
-    TI_UINT16          measureInterval;
-}  dot11_TS_METRICS_IE_t;
-
-typedef struct 
-{
-    dot11_TSRS_IE_t             *trafficStreamParameter;
-    dot11_MSDU_LIFE_TIME_IE_t   *edcaLifetimeParameter;
-    dot11_TS_METRICS_IE_t       *tsMetrixParameter;
-} XCCv4IEs_t;
-
-
-/* Measurement Report message frame structure */
-#define DOT11_MEASUREMENT_REPORT_ELE_ID     (39)
-#define DOT11_MAX_MEASUREMENT_REPORT_LEN    (4)
-#define DOT11_MIN_MEASUREMENT_REPORT_IE_LEN (3)
-#define DOT11_MEASUREMENT_REPORT_ELE_IE_LEN (DOT11_MIN_MEASUREMENT_REPORT_IE_LEN + DOT11_MAX_MEASUREMENT_REPORT_LEN*MAX_NUM_REQ)
-
-typedef struct
-{
-    dot11_ACTION_FIELD_t    actionField;
-    TI_UINT8   dialogToken;
-
-    dot11_eleHdr_t  hdr;
-    TI_UINT8            measurementToken;
-    TI_UINT8            measurementMode;
-    TI_UINT8            measurementType;
-    TI_UINT8            measurementReports[DOT11_MAX_MEASUREMENT_REPORT_LEN*MAX_NUM_REQ];
-}  MeasurementReportFrame_t;
-
-
-
-typedef enum 
-{
-    STATUS_SUCCESSFUL = 0,
-    STATUS_UNSPECIFIED,
-    STATUS_AUTH_REJECT,
-    STATUS_ASSOC_REJECT,
-    STATUS_SECURITY_FAILURE,
-    STATUS_AP_DEAUTHENTICATE,
-    STATUS_AP_DISASSOCIATE,
-    STATUS_ROAMING_TRIGGER,
-    STATUS_DISCONNECT_DURING_CONNECT,
-    STATUS_SG_RESELECT,
-	STATUS_MIC_FAILURE = 14,
-    MGMT_STATUS_MAX_NUM = 15
-} mgmtStatus_e;
-
-/* Used as a status code in case of STATUS_AUTH_REJECT or STATUS_ASSOC_REJECT that was not received at all */
-#define STATUS_PACKET_REJ_TIMEOUT   0xFFFF
-
-/* As defined in 802.11 spec section 7.3.1 - status codes for deAuth packet */
-#define STATUS_CODE_802_1X_AUTHENTICATION_FAILED 23
-
-/* map field included in measurement report IE (only in basic report) */
-typedef enum
-{
-  DOT11_BSS_ONLY                    = (0x01),
-  DOT11_OFDM_ONLY                   = (0x02),
-  DOT11_RADAR_AND_UNIDENTIFIED      = (0x0C)
-} dot11_Map_Sub_Field_e;
-
-
-typedef struct
-{
-   legacy_dot11_header_t dot11Header;
-   Wlan_LlcHeader_T  snapHeader;
-}  legacy_dot11_DataMsduHeader_t;
-
-
-#define WLAN_HEADER_TYPE_CONCATENATION 0x01
-#define WLAN_CONCAT_HEADER_LEN 2
-
-
-#endif   /* _802_11_INFO_DEFS_H */
diff --git a/wl1271/utils/CmdInterfaceCodes.h b/wl1271/utils/CmdInterfaceCodes.h
deleted file mode 100644
index ce579db..0000000
--- a/wl1271/utils/CmdInterfaceCodes.h
+++ /dev/null
@@ -1,1536 +0,0 @@
-/*
- * CmdInterfaceCodes.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/****************************************************************************/
-/*																			*/
-/*    MODULE:   CmdInterfaceCodes.h											*/
-/*    PURPOSE:																*/
-/*																			*/
-/****************************************************************************/
-#ifndef _CMD_INTERFACE_CODES_H_
-#define _CMD_INTERFACE_CODES_H_
-
-/** \file  CmdInterfaceCodes.h 
- * \brief Command Interface Codes 
- * \n\n
- * This file contains the definitions for the parameters that can be Set/Get from outside user.
- * \n\n
- */
-
-#include "TWDriver.h"
-
-/* defines */
-/***********/
-
-/* types */
-/*********/
-
-
-/* This file contains the definitions for the parameters that can be Set/Get from outside.
-    The parmeters that can be Set/Get from inside the driver only are defined in the file paramIn.h */
-
-/****************************************************************************
-                                PARAMETERS ISSUE
-    Each parameter in the system is defined as UINT32. The parameter
-    structue is as following:
-
- bit   31   30 - 24     23    22 - 16    15 - 8       7 - 0
-    +-----+----------+-----+----------+-----------+-----------+
-    | Set | Reserved | Get | Reserved | Module    | Parameter |
-    | bit |          | bit |          | number    | number    |
-    +-----+----------+-----+----------+-----------+-----------+
-
-  The 'set' bit indicates whteher this parameter can be set from OS abstraction layer.
-  The 'get' bit indicates whteher this parameter can be get from OS abstraction layer.
-  (All the parameters can be Get/Set from insied the driver.)
-  The module number indicated who is the oner of the parameter.
-  The parameter number is the parameter unique number used to identify it.
-
-****************************************************************************/
-
-/** \def SET_BIT
- * \brief Bitmaks of bit which indicates if the Command is SET Command
- */
-#define	SET_BIT         			0x08000000
-/** \def GET_BIT
- * \brief Bitmaks of bit which indicates if the Command is GET Command
- */
-#define	GET_BIT				        0x00800000
-/** \def ASYNC_PARAM
- * \brief Bitmaks of bit which indicates if the access to the Command Parameter is Async
- */
-#define ASYNC_PARAM					0x00010000
-/** \def ALLOC_NEEDED_PARAM
- * \brief Bitmaks of bit which indicates if that the data is not allocated in the paramInfo structure
- */
-#define ALLOC_NEEDED_PARAM			0x00020000
-
-
-/** \def GET_PARAM_MODULE_NUMBER
- * \brief Macro which gets the Parameter's Module Number from the second byte of x \n
- * x should be taken from Module Parameters Enumeration
- * sa EModuleParam
- */
-#define GET_PARAM_MODULE_NUMBER(x)  ((x & 0x0000FF00) >> 8)
-/** \def IS_PARAM_ASYNC
- * \brief Macro which returns True if access to the Command Parameter is Async \n
- * Otherwise returns False
- */
-#define IS_PARAM_ASYNC(x)			(x & ASYNC_PARAM)
-/** \def IS_ALLOC_NEEDED_PARAM
- * \brief Macro which returns True if data is not allocated in the paramInfo structure \n
- * (there is a need to allocate memory for data). Otherwise returns False
- */
-#define IS_ALLOC_NEEDED_PARAM(x)	(x & ALLOC_NEEDED_PARAM)	
-/** \def IS_PARAM_FOR_MODULE
- * \brief Macro which returns True if input param is for input module. \n
- * Otherwise returns False
- */
-#define IS_PARAM_FOR_MODULE(param, module)   ((param & 0x0000FF00) == module)
-
-/** \enum EModuleParam
- * \brief Modules Parameters ID
- * 
- * \par Description
- * This Enumeration defines all available Modules numbers. \n
- * Note that the actual number is held in the second byte (E.g. 0x0000FF00). \n
- * According to these numbers it is decided to which Module the Command Parameter is destined
- * 
- * \sa
- */
-/* NOTICE! whenever you add a module, you have to increment MAX_PARAM_MODULE_NUMBER as well!!! */
-typedef enum
-{
-    DRIVER_MODULE_PARAM               	= 0x0000,	/**< Driver Module Number							*/
-    AUTH_MODULE_PARAM               	= 0x0100,	/**< Authentication Module Number					*/
-    ASSOC_MODULE_PARAM              	= 0x0200,	/**< Association Module Number	   					*/
-    RX_DATA_MODULE_PARAM            	= 0x0300,	/**< RX Data Module Number							*/
-    TX_CTRL_MODULE_PARAM            	= 0x0400,	/**< TX Control Module Number						*/
-    CTRL_DATA_MODULE_PARAM          	= 0x0500,	/**< Control Data Module Number						*/
-    SITE_MGR_MODULE_PARAM           	= 0x0600,	/**< Site Manager Module Number						*/
-    CONN_MODULE_PARAM               	= 0x0700,	/**< Connection Module Number						*/
-    RSN_MODULE_PARAM                	= 0x0800,	/**< Robust Security NW (RSN) Module Number			*/
-    ADM_CTRL_MODULE_PARAM           	= 0x0900,	/**< ADM Control Module Number						*/
-    TWD_MODULE_PARAM                	= 0x0A00,	/**< Report Module Number							*/
-    REPORT_MODULE_PARAM             	= 0x0B00,	/**< Report Module Number							*/
-    SME_MODULE_PARAM                    = 0x0C00,	/**< SME Module Number								*/
-    MLME_SM_MODULE_PARAM            	= 0x0D00,	/**< 802.11 MLME State-Machine Module Number  		*/
-    REGULATORY_DOMAIN_MODULE_PARAM  	= 0x0E00,	/**< Regulatory Domain Module Number 				*/
-    MEASUREMENT_MODULE_PARAM        	= 0x0F00,	/**< Measurement Module Number						*/
-    XCC_MANAGER_MODULE_PARAM        	= 0x1000,	/**< XCC Manager Module Number 						*/
-    ROAMING_MANAGER_MODULE_PARAM    	= 0x1100,	/**< Roaming Manager Module Number					*/
-    SOFT_GEMINI_PARAM               	= 0x1200,	/**< Soft Gemini Module Number						*/
-    QOS_MANAGER_PARAM               	= 0x1300,	/**< Quality Of Service (QoS) Manager Module Number	*/
-    POWER_MANAGER_PARAM             	= 0x1400,	/**< Power Manager Module Number					*/
-    SCAN_CNCN_PARAM                 	= 0x1500,	/**< Scan Concentrator Module Number				*/
-    SCAN_MNGR_PARAM                 	= 0x1600,	/**< Scan Manager Module Number						*/
-    MISC_MODULE_PARAM					= 0x1700,	/**< Misc. Module Number							*/
-    HEALTH_MONITOR_MODULE_PARAM         = 0x1800,	/**< Health Monitor Module Number					*/
-    CURR_BSS_MODULE_PARAM               = 0x1900,   /**< Current Bss Module Number	     		        */
-    /*
-    Last module - DO NOT TOUCH!
-    */
-    MODULE_PARAM_LAST_MODULE						/**< LAst Module - Dummy, mast be last				*/
-
-}   EModuleParam;
-
-/** \def MAX_PARAM_MODULE_NUMBER
- * \brief Macro which returns the number of Parameters Modules
- */
-#define MAX_PARAM_MODULE_NUMBER             (GET_PARAM_MODULE_NUMBER(MODULE_PARAM_LAST_MODULE))
-
-
-
-/** \enum EExternalParam
- * \brief External Parameters
- * 
- * \par Description
- * This Enumeation includes all the eaxternal parameters numbers which are used for Get/Set Commands. 
- * Each module can have 256 parameters	\n
- * PARAMETERS ISSUE:	\n
- * Each parameter in the system is defined as UINT32. The parameter structue is as following:	\n
- * bit 0 - 7: 		Parameter Number - number of parameter inside Module\n
- * bit 8 - 15:		Module number - number of Module\n
- * bit 16:			Async Bit - indicates if command is Async (ON) or Sync (OFF)\n
- * bit 17:			Allocate Bit - indicates if allocation should be done for parameter (ON) or not (OFF)\n
- * bit 18 - 22:		Reserved			\n
- * bit 23:			Get Bit	- indicates if command is Get (ON) or not (OFF)	\n
- * bit 24 - 26:		Reserved	\n
- * bit 27:			Set Bit	- indicates if command is Set (ON) or not (OFF)	\n
- * bit 28 - 31:		Reserved	\n\n
- * The 'set' bit indicates whteher this parameter can be set from OS abstraction layer.
- * The 'get' bit indicates whteher this parameter can be get from OS abstraction layer.
- * (All the parameters can be Get/Set from insied the driver.)
- * The module number indicated who is the oner of the parameter.
- * The parameter number is the parameter unique number used to identify it.
- *
- * \sa
- */
- /* bit | 31 - 28  | 27  | 26 - 24  |  23 | 22 - 18  |    17    |  16   |  15 - 8   |   7 - 0   |
- *      +----------+-----+----------+-----+----------+----------+-------+-----------+-----------+
- *      | Reserved | Set | Reserved | Get | Reserved | Allocate | Async | Module    | Parameter |
- *      |          | bit |          | bit |          |    bit   |  bit  | number    | number    |
- *      +----------+-----+----------+-----+----------+----------+-------+-----------+-----------+
- */
-typedef enum
-{
-	/* Driver General section */
-    DRIVER_INIT_PARAM                           =	SET_BIT |           DRIVER_MODULE_PARAM | 0x00,	/**< Driver Init Parameter (Driver General Set Command): \n
-																									* Used for setting driver defaults. Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x00\n
-																									* Module Number: Driver Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: OFF	\n
-																									* SET Bit: ON	\n
-																									*/
-    DRIVER_START_PARAM                          =	SET_BIT |           DRIVER_MODULE_PARAM | 0x01, /**< Driver Start Parameter (Driver General Set Command): \n
-																									* Used for Starting Driver. Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x01\n
-																									* Module Number: Driver Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: OFF	\n
-																									* SET Bit: ON	\n
-																									*/
-    DRIVER_STOP_PARAM                           =	SET_BIT |           DRIVER_MODULE_PARAM | 0x02, /**< Driver Stop Parameter (Driver General Set Command): \n
-																									* Used for Stopping Driver. Done Sync with no memory allocation \n
-																									* Parameter Number:	0x02\n
-																									* Module Number: Driver Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: OFF	\n
-																									* SET Bit: ON	\n
-																									*/
-    DRIVER_STATUS_PARAM                         =	          GET_BIT | DRIVER_MODULE_PARAM | 0x03, /**< Driver Status Parameter (Driver General Get Command): \n
-																									* Used for Getting Driver's Status (if running). Done Sync with no memory allocation\n																														Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x03\n
-																									* Module Number: Driver Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: OFF	\n
-																									*/
-    DRIVER_THREADID_PARAM                       =	          GET_BIT | DRIVER_MODULE_PARAM | 0x04, /**< Driver Thread ID Parameter (Driver General Get Command): \n
-																									* Used for Getting Driver's Thread ID. Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x04\n
-																									* Module Number: Driver Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: OFF	\n
-																									*/
-
-	/* Site manager section */	
-	SITE_MGR_DESIRED_CHANNEL_PARAM				=	SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x01,	/**< Site Manager Desired Channel Parameter (Site Manager Module Set/Get Command):\n 
-																										* Used for Setting/Getting desired Channel to/from OS abstraction layer\n 
-																										* Done Sync with no memory allocation \n
-																										* Parameter Number:	0x01\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: ON	\n
-																										*/
-	SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM	=	SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x05,	/**< Site Manager Desired Supported Rate Set Parameter (Site Manager Module Set/Get Command):\n 
-																										* Used for Setting/Getting Desired Supported Rate to/from OS abstraction layer\n 
-																										* Done Sync with no memory allocation \n
-																										* Parameter Number:	0x05\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: ON	\n
-																										*/
-	SITE_MGR_DESIRED_PREAMBLE_TYPE_PARAM		= 	SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x0A,	/**< Site Manager Desired Preamble Type Parameter (Site Manager Module Set/Get Command): \n 
-																										* Used for Setting/Getting Desired Preamble Type to/from OS abstraction layer\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x0A\	n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: ON	\n
-																										*/
-    
-    SITE_MGRT_SET_RATE_MANAGMENT             = SET_BIT | SITE_MGR_MODULE_PARAM | 0x06 ,                 /**< Site Manager Desired Preamble Type Parameter (Site Manager Module Set/Get Command): \n 
-                                                                                                        * Used for Setting/Getting Desired Preamble Type to/from OS abstraction layer\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x06\	n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: OF	\n
-																										* SET Bit: ON	\n
-*/
- 
-
-    SITE_MGRT_GET_RATE_MANAGMENT             = GET_BIT | SITE_MGR_MODULE_PARAM | 0x07| ASYNC_PARAM,     /**< Site Manager Desired Preamble Type Parameter (Site Manager Module Set/Get Command): \n 
-                                                                                                        * Used for Setting/Getting Desired Preamble Type to/from OS abstraction layer\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x07\	n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: ON	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-*/
-
-
-																									   
-	SITE_MGR_CURRENT_CHANNEL_PARAM              = 	SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x0E,	/**< Site Manager Current Channel Parameter (Site Manager Module Set/Get Command): \n 
-																										* Used for Setting/Getting Current Channel to/from OS abstraction layer\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x0E	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: ON	\n
-																										*/
-	SITE_MGR_TI_WLAN_COUNTERS_PARAM            	=			  GET_BIT | SITE_MGR_MODULE_PARAM | 0x14,	/**< Site Manager TI WLAN Counters Parameter (Site Manager Module Get Command): \n 
-																										* Used for Getting TI WLAN Statistics Counters from OS abstraction layer\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x14	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-																										*/
-	SITE_MGR_EEPROM_VERSION_PARAM				=			  GET_BIT | SITE_MGR_MODULE_PARAM | 0x16,  	/**< Site Manager EEPROM Version Parameter (Site Manager Module Get Command): \n 
-																										* Used for Getting EEPROM Version from FW\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x16	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-																										*/ 
-	SITE_MGR_FIRMWARE_VERSION_PARAM				=			  GET_BIT | SITE_MGR_MODULE_PARAM | 0x17,	/**< Site Manager FW Version Parameter (Site Manager Module Get Command): \n 
-																										* Used for Getting FW Version from FW\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x17	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-																										*/ 
-	SITE_MGR_DESIRED_SLOT_TIME_PARAM			=	SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x1B,	/**< Site Manager Desired Slot Time Parameter (Site Manager Module Set/Get Command): \n 
-																										* Used for Getting Desired Slot Time from OS abstraction layer and Setting Desired Slot Time to FW\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x1B	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: ON	\n
-																										*/
-	SITE_MGR_GET_AP_QOS_CAPABILITIES            =             GET_BIT | SITE_MGR_MODULE_PARAM | 0x2E,	/**< Site Manager Get AP QoS Cpabilities Parameter (Site Manager Module Get Command): \n  
-																										* Used for Getting AP QoS Cpabilities from OS abstraction layer\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x2E	\n
-																										* Module Number: Site Manager Module Number \n 
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-																										*/
-	SITE_MGR_CURRENT_TX_RATE_PARAM				=             GET_BIT | SITE_MGR_MODULE_PARAM | 0x32,	/**< Site Manager Current TX Rate Parameter (Site Manager Module Get Command): \n  
-																										* Used for Getting Current TX Rate from OS abstraction layer\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x32	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-																										*/
-	SITE_MGR_BSSID_FULL_LIST_PARAM				=			  GET_BIT | SITE_MGR_MODULE_PARAM | 0x34,	/**< Site Manager BSSID Full List Parameter (Site Manager Module Get Command): \n  
-																										* Used for Getting BSSID Full List from OS abstraction layer\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x34	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-																										*/
-	SITE_MGR_BEACON_FILTER_DESIRED_STATE_PARAM = 	SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x35,	/**< Site Manager Beacon Filter Desired State Parameter (Site Manager Module Set/Get Command): \n  
-																										* Used for Getting Beacon Filter Desired State from OS abstraction layer or Setting Beacon Filter Desired State to FW\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x35	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: ON	\n
-																										*/
-    SITE_MGR_NETWORK_TYPE_IN_USE				=             GET_BIT | SITE_MGR_MODULE_PARAM | 0x36,	/**< Site Manager NW Type in Use Parameter (Site Manager Module Get Command): \n  
-																										* Used for Getting NW Type in Use from OS abstraction layer\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x36	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-																										*/
-
-	/* Simple Config module */
-	SITE_MGR_SIMPLE_CONFIG_MODE					= 	SET_BIT | GET_BIT | SITE_MGR_MODULE_PARAM | 0x38,	/**< Site Manager Simple Configuration Mode Parameter (Simple Configuration Module Set/Get Command): \n  
-																										* Used for Setting/Getting WiFi Simple Configuration Mode\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x38	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: ON	\n
-																										*/
-    SITE_MGR_GET_PRIMARY_SITE					= 	          GET_BIT | SITE_MGR_MODULE_PARAM | 0x40,	/**< Site Manager Get Primary Site Parameter (Simple Configuration Module Get Command): \n  
-																										* Used for Getting Primary Site from OS abstraction layer\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x40	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-																										*/
-
-    SITE_MGR_PRIMARY_SITE_HT_SUPPORT			= 	          GET_BIT | SITE_MGR_MODULE_PARAM | 0x41,	/**< Site Manager check if the Primary Site support HT: \n  
-                                                                                                        * Used for check if the Primary Site support HT \n
-                                                                                                        * Done Sync with no memory allocation\n 
-                                                                                                        * Parameter Number:	0x41	\n
-                                                                                                        * Module Number: Site Manager Module Number \n
-                                                                                                        * Async Bit: OFF	\n
-                                                                                                        * Allocate Bit: OFF	\n
-                                                                                                        * GET Bit: ON	\n
-                                                                                                        * SET Bit: OFF	\n
-                                                                                                        */
-	SITE_MGR_CURRENT_RX_RATE_PARAM				=             GET_BIT | SITE_MGR_MODULE_PARAM | 0x42,	/**< Site Manager Current RX Rate Parameter (Site Manager Module Get Command): \n  
-																										* Used for Getting Current RX Rate from OS abstraction layer\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x33	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-																										*/
-    SITE_MGR_SET_WLAN_IP_PARAM				=             SET_BIT | SITE_MGR_MODULE_PARAM | 0x43,	/**< Site Manager WLAN interface IP Parameter (Site Manager Module Set Command): \n  
-																										* Used for Setting the WLAN interface IP from OS abstraction layer\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x43	\n
-																										* Module Number: Site Manager Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-																										*/
-
-	/* CTRL data section */
-	CTRL_DATA_CURRENT_BSS_TYPE_PARAM			=	SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x04,	/**< Control Data Primary BSS Type Parameter (Control Data Module Set/Get Command): \n  
-																										* Used for Setting/Getting Primary BSS Type to/form Control Data Parameters\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x04	\n
-																										* Module Number: Control Data Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: ON	\n
-																										*/
-    CTRL_DATA_MAC_ADDRESS						= 	          GET_BIT | CTRL_DATA_MODULE_PARAM | 0x08,	/**< Control Data MAC Address Parameter (Control Data Module Get Command): \n  
-																										* Used for Getting MAC Address form FW\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x08	\n
-																										* Module Number: Control Data Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-																										*/
-    CTRL_DATA_CLSFR_TYPE                        =			  GET_BIT | CTRL_DATA_MODULE_PARAM | 0x0D,	/**< Control Data Classifier Type Parameter (Control Data Module Set/Get Command): \n  
-																										* Used for Setting/Getting Classifier Type to/form Control Data (TX Data Queue) Parameters\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x0D	\n
-																										* Module Number: Control Data Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: OFF	\n
-																										*/
-    CTRL_DATA_CLSFR_CONFIG                      =	SET_BIT           | CTRL_DATA_MODULE_PARAM | 0x0E,	/**< Control Data Classifier Configure Parameter (Control Data Module Set Command): \n  
-																										* Used for adding Classifier entry to Control Data (TX Data Queue) Parameters\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x0E	\n
-																										* Module Number: Control Data Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: OFF	\n
-																										* SET Bit: ON	\n
-																										*/
-    CTRL_DATA_CLSFR_REMOVE_ENTRY                =	SET_BIT           | CTRL_DATA_MODULE_PARAM | 0x0F,	/**< Control Data Classifier Configure Parameter (Control Data Module Set Command): \n  
-																										* Used for removing Classifier entry from Control Data (TX Data Queue) Parameters\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x0F	\n
-																										* Module Number: Control Data Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: OFF	\n
-																										* SET Bit: ON	\n
-																										*/
-    CTRL_DATA_TRAFFIC_INTENSITY_THRESHOLD		=	SET_BIT | GET_BIT | CTRL_DATA_MODULE_PARAM | 0x15,	/**< Control Data Traffic Intensity Threshold Parameter (Control Data Module Set/Get Command): \n  
-																										* Used for Setting/Getting Traffic Intensity Threshold to/from Control Data (Traffic Intensity Threshold) Parameters\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x15	\n
-																										* Module Number: Control Data Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: ON	\n
-																										*/
-    CTRL_DATA_TOGGLE_TRAFFIC_INTENSITY_EVENTS	=	SET_BIT           | CTRL_DATA_MODULE_PARAM | 0x16,	/**< Control Data Toggle Traffic Intensity Events Parameter (Control Data Module Set Command): \n  
-																										* Used for Toggle Traffic Intensity Events (turns ON/OFF traffic intensity notification events)	\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x16	\n
-																										* Module Number: Control Data Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: OFF	\n
-																										* SET Bit: ON	\n
-																										*/
-
-	/* SME SM section */    
-    SME_DESIRED_SSID_ACT_PARAM                  = SET_BIT | GET_BIT | SME_MODULE_PARAM	 | 0x01,		/**< SME Set SSID and start connection process (SME Module Set/Get Command): \n  
-																										* Used for set SSID and start connection or get current SSID \n 
-																										* Parameter Number:	0x01 \n
-																										* Module Number: SME Module Number \n
-																										* Async Bit: OFF \n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: ON	\n
-																										*/
-
-    SME_RADIO_ON_PARAM                          = SET_BIT | GET_BIT | SME_MODULE_PARAM	 | 0x03,		/**< SME State-Machine Radio ON Parameter (SME Module Set/Get Command): \n  
-																										* Used for Setting new and generating State-Machine Event, or Getting current Radio ON\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x03	\n
-																										* Module Number: SME Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: ON	\n
-																										*/
-    SME_CONNECTION_MODE_PARAM                   = SET_BIT | GET_BIT | SME_MODULE_PARAM   | 0x04,		/**< SME State-Machine Connection Mode Parameter (SME Module Set/Get Command): \n  
-																										* Used for Setting new Connection Mode (and generating disconnect State-Machine event) or Getting current Connection Mode\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x04	\n
-																										* Module Number: SME Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: ON	\n
-																										* SET Bit: ON	\n
-																										*/
-    SME_WSC_PB_MODE_PARAM                       = SET_BIT           | SME_MODULE_PARAM   | 0x07,		/**< SME State-Machine SME on the WPS Mode Parameter (SME Module Set Command): \n  
-																										* Used for updating the SME on the WPS mode\n
-																										* Done Sync with no memory allocation\n 
-																										* Parameter Number:	0x07	\n
-																										* Module Number: SME Module Number \n
-																										* Async Bit: OFF	\n
-																										* Allocate Bit: OFF	\n
-																										* GET Bit: OFF	\n
-																										* SET Bit: ON	\n
-																										*/
-
-    SME_DESIRED_SSID_PARAM                      = SET_BIT           | SME_MODULE_PARAM	 | 0x08,		/**< SME Set SSID without start connection process (SME Module Set Command): \n  
-                                                                                                        * Used for set SSID without connection \n 
-                                                                                                        * Parameter Number:	0x08 \n
-                                                                                                        * Module Number: SME Module Number \n
-                                                                                                        * Async Bit: OFF \n
-                                                                                                        * Allocate Bit: OFF	\n
-                                                                                                        * GET Bit: OFF	\n
-                                                                                                        * SET Bit: ON	\n
-                                                                                                        */
-
-	/* Scan Concentrator section */
-    SCAN_CNCN_START_APP_SCAN					= 	SET_BIT | 			SCAN_CNCN_PARAM | 0x01 | ALLOC_NEEDED_PARAM,	/**< Scan Concentrator Start Application Scan Parameter (Scan Concentrator Module Set Command): \n  
-																														* Used for start one-shot scan as running application scan client\n
-																														* Done Sync with memory allocation\n 
-																														* Parameter Number:	0x01	\n
-																														* Module Number: Scan Concentrator Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: ON	\n
-																														* GET Bit: OFF	\n
-																														* SET Bit: ON	\n
-																														*/
-    SCAN_CNCN_STOP_APP_SCAN                     =   SET_BIT |           SCAN_CNCN_PARAM | 0x02,							/**< Scan Concentrator Stop Application Scan Parameter (Scan Concentrator Module Set Command): \n  
-																														* Used for stop one-shot scan as running application scan client\n
-																														* Done Sync with no memory allocation\n 
-																														* Parameter Number:	0x02	\n
-																														* Module Number: Scan Concentrator Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: OFF	\n
-																														* GET Bit: OFF	\n
-																														* SET Bit: ON	\n
-																														*/
-    SCAN_CNCN_START_PERIODIC_SCAN               =   SET_BIT |           SCAN_CNCN_PARAM | 0x03 | ALLOC_NEEDED_PARAM,	/**< Scan Concentrator Start Periodic Scan Parameter (Scan Concentrator Module Set Command): \n  
-																														* Used for start periodic scan as running application scan client\n
-																														* Done Sync with memory allocation\n 
-																														* Parameter Number:	0x03	\n
-																														* Module Number: Scan Concentrator Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: ON	\n
-																														* GET Bit: OFF	\n
-																														* SET Bit: ON	\n
-																														*/
-    SCAN_CNCN_STOP_PERIODIC_SCAN                =   SET_BIT |           SCAN_CNCN_PARAM | 0x04,							/**< Scan Concentrator Stop Periodic Scan Parameter (Scan Concentrator Module Set Command): \n  
-																														* Used for stop periodic scan as running application scan client\n
-																														* Done Sync with no memory allocation\n 
-																														* Parameter Number:	0x04	\n
-																														* Module Number: Scan Concentrator Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: OFF	\n
-																														* GET Bit: OFF	\n
-																														* SET Bit: ON	\n
-																														*/
-    SCAN_CNCN_BSSID_LIST_SCAN_PARAM             =   SET_BIT |           SCAN_CNCN_PARAM | 0x05,							/**< Scan Concentrator BSSID List Scon Parameter (Scan Concentrator Module Set Command): \n  
-																														* Used for start one-shot scan as running application scan client\n
-																														* Done Sync with no memory allocation\n 
-																														* Parameter Number:	0x05	\n
-																														* Module Number: Scan Concentrator Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: OFF	\n
-																														* GET Bit: OFF	\n
-																														* SET Bit: ON	\n
-																														*/
-	SCAN_CNCN_NUM_BSSID_IN_LIST_PARAM           =   GET_BIT |           SCAN_CNCN_PARAM | 0x06,							/**< Scan Concentrator BSSID List Size Parameter (Scan Concentrator Module Get Command): \n  
-																														* Used for retrieving the size to allocate for the application scan result list\n
-																														* Done Sync with no memory allocation\n 
-																														* Parameter Number:	0x06	\n
-																														* Module Number: Scan Concentrator Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: OFF	\n
-																														* GET Bit: ON	\n
-																														* SET Bit: OFF	\n
-																														*/
-    SCAN_CNCN_BSSID_LIST_SIZE_PARAM             =   GET_BIT |           SCAN_CNCN_PARAM | 0x07,							/**< Scan Concentrator BSSID List Size Parameter (Scan Concentrator Module Get Command): \n  
-																														* Used for retrieving the size to allocate for the application scan result list\n
-																														* Done Sync with no memory allocation\n 
-																														* Parameter Number:	0x06	\n
-																														* Module Number: Scan Concentrator Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: OFF	\n
-																														* GET Bit: ON	\n
-																														* SET Bit: OFF	\n
-																														*/
-    SCAN_CNCN_BSSID_LIST_PARAM                  =   GET_BIT |           SCAN_CNCN_PARAM | 0x08,							/**< Scan Concentrator BSSID List Parameter (Scan Concentrator Module Get Command): \n  
-																														* Used for retrieving the application scan result table\n
-																														* Done Sync with no memory allocation\n 
-																														* Parameter Number:	0x07	\n
-																														* Module Number: Scan Concentrator Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: OFF	\n
-																														* GET Bit: ON	\n
-																														* SET Bit: OFF	\n
-																														*/
-	SCAN_CNCN_BSSID_RATE_LIST_PARAM             =   GET_BIT |           SCAN_CNCN_PARAM | 0x09,							/**< Scan Concentrator Rate List Parameter (Scan Concentrator Module Get Command): \n  
-																														* Used for retrieving the application scan rates result table\n
-																														* Done Sync with no memory allocation\n 
-																														* Parameter Number:	0x08	\n
-																														* Module Number: Scan Concentrator Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: OFF	\n
-																														* GET Bit: ON	\n
-																														* SET Bit: OFF	\n
-																														*/
-    SCAN_CNCN_SET_SRA                           =   SET_BIT |           SCAN_CNCN_PARAM | 0x0A,                         /**< Scan Concentrator set scan result aging (Scan Concentrator Module Get Command): \n  
-																														* Used for aging threshold\n
-																														* Parameter Number:	0x09	\n
-																														* Module Number: Scan Concentrator Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: OFF	\n
-																														* GET Bit: OFF	\n
-																														* SET Bit: ON	\n
-																														*/
-
-    SCAN_CNCN_SET_RSSI                          =   SET_BIT |           SCAN_CNCN_PARAM | 0x0B,                         /**< Scan Concentrator set rssi filter threshold (Scan Concentrator Module Get Command): \n  
-																														* Used for rssi threshold\n
-																														* Parameter Number:	0x0A	\n
-																														* Module Number: Scan Concentrator Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: OFF	\n
-																														* GET Bit: OFF	\n
-																														* SET Bit: ON	\n
-																														*/
-
-	/* Scan Manager module */
-    SCAN_MNGR_SET_CONFIGURATION                 =	SET_BIT |           SCAN_MNGR_PARAM | 0x01 | ALLOC_NEEDED_PARAM,	/**< Scan Manager Set Configuration Parameter (Scan Manager Module Set Command): \n  
-																														* Used for setting the Scan Policy\n
-																														* Done Sync with memory allocation\n 
-																														* Parameter Number:	0x01	\n
-																														* Module Number: Scan Manager Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: ON	\n
-																														* GET Bit: OFF	\n
-																														* SET Bit: ON	\n
-																														*/
-    SCAN_MNGR_BSS_LIST_GET						=			  GET_BIT | SCAN_MNGR_PARAM | 0x02 | ALLOC_NEEDED_PARAM,	/**< Scan Manager Get BSS List Parameter (Scan Manager Module Get Command): \n  
-																														* Used for getting the currently available BSS list\n
-																														* Done Sync with memory allocation\n 
-																														* Parameter Number:	0x02	\n
-																														* Module Number: Scan Manager Module Number \n
-																														* Async Bit: OFF	\n
-																														* Allocate Bit: ON	\n
-																														* GET Bit: ON	\n
-																														* SET Bit: OFF	\n
-																														*/
-
-	/* regulatory domain section */
-	REGULATORY_DOMAIN_MANAGEMENT_CAPABILITY_ENABLED_PARAM	=			  GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x02,					   	/**< Regulatory Domain Management Capability Enabled Parameter (Regulatory Domain Module Get Command): \n  
-																																				* Used for getting indication if Spectrum Management is enabled\n
-																																				* Done Sync with no memory allocation\n 
-																																				* Parameter Number:	0x02	\n
-																																				* Module Number: Regulatory Domain Module Number \n
-																																				* Async Bit: OFF	\n
-																																				* Allocate Bit: OFF	\n
-																																				* GET Bit: ON	\n
-																																				* SET Bit: OFF	\n
-																																				*/
-	REGULATORY_DOMAIN_ENABLED_PARAM							=			  GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x03,						/**< Regulatory Domain Enabled Parameter (Regulatory Domain Module Get Command): \n  
-																																				* Used for getting indication if regulatory domain if 802.11d is in use\n
-																																				* Done Sync with no memory allocation\n 
-																																				* Parameter Number:	0x03	\n
-																																				* Module Number: Regulatory Domain Module Number \n
-																																				* Async Bit: OFF	\n
-																																				* Allocate Bit: OFF	\n
-																																				* GET Bit: ON	\n
-																																				* SET Bit: OFF	\n
-																																				*/ 		
-    REGULATORY_DOMAIN_CURRENT_TX_POWER_LEVEL_PARAM      	= 	SET_BIT | GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x06,						/**< Regulatory Domain Current TX Power Level Parameter (Regulatory Domain Module Set/Get Command): \n  
-																																				* Used for setting/getting current TZ Power Level\n
-																																				* Done Sync with no memory allocation\n 
-																																				* Parameter Number:	0x06	\n
-																																				* Module Number: Regulatory Domain Module Number \n
-																																				* Async Bit: OFF	\n
-																																				* Allocate Bit: OFF	\n
-																																				* GET Bit: ON	\n
-																																				* SET Bit: ON	\n
-																																				*/ 
-    REGULATORY_DOMAIN_CURRENT_TX_POWER_IN_DBM_PARAM			= 	SET_BIT | GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x08,						/**< Regulatory Domain Current TX Power in DBM Parameter (Regulatory Domain Module Set/Get Command): \n  
-																																				* Used for setting/getting current TX Power Level in DBM\n
-																																				* Done Sync with no memory allocation\n 
-																																				* Parameter Number:	0x08	\n
-																																				* Module Number: Regulatory Domain Module Number \n
-																																				* Async Bit: OFF	\n
-																																				* Allocate Bit: OFF	\n
-																																				* GET Bit: ON	\n
-																																				* SET Bit: ON	\n
-																																				*/
-    REGULATORY_DOMAIN_ENABLE_DISABLE_802_11D				=	SET_BIT |           REGULATORY_DOMAIN_MODULE_PARAM | 0x0C,					 	/**< Regulatory Domain Enable/Disable 802.11d Parameter (Regulatory Domain Module Set Command): \n  
-																																				* Used for enabling/disabling 802.11d.\n
-																																				* Done Sync with no memory allocation\n 
-																																				* Parameter Number:	0x0C	\n
-																																				* Module Number: Regulatory Domain Module Number \n
-																																				* Async Bit: OFF	\n
-																																				* Allocate Bit: OFF	\n
-																																				* GET Bit: OFF	\n
-																																				* SET Bit: ON	\n
-																																				*/   	
-    REGULATORY_DOMAIN_ENABLE_DISABLE_802_11H				=	SET_BIT |           REGULATORY_DOMAIN_MODULE_PARAM | 0x0D,						/**< Regulatory Domain Enable/Disable 802.11h Parameter (Regulatory Domain Module Set Command): \n  
-																																				* Used for enabling/disabling 802.11h (If 802_11h is enabled, enable 802_11d as well)\n
-																																				* Done Sync with no memory allocation\n 
-																																				* Parameter Number:	0x0D	\n
-																																				* Module Number: Regulatory Domain Module Number \n
-																																				* Async Bit: OFF	\n
-																																				* Allocate Bit: OFF	\n
-																																				* GET Bit: OFF	\n
-																																				* SET Bit: ON	\n
-																																				*/ 
-    REGULATORY_DOMAIN_COUNTRY_2_4_PARAM						=	SET_BIT | GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x0E | ALLOC_NEEDED_PARAM,	/**< Regulatory Domain Country 2-4 Parameter (Regulatory Domain Module Set/Get Command): \n  
-																																				* Used for getting Country String or setting the local country IE per band with the Country IE that was detected in the last passive scan\n
-																																				* Done Sync with memory allocation\n 
-																																				* Parameter Number:	0x0E	\n
-																																				* Module Number: Regulatory Domain Module Number \n
-																																				* Async Bit: OFF	\n
-																																				* Allocate Bit: ON	\n
-																																				* GET Bit: ON	\n
-																																				* SET Bit: ON	\n
-																																				*/		
-    REGULATORY_DOMAIN_COUNTRY_5_PARAM						=	SET_BIT | GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x0F | ALLOC_NEEDED_PARAM,	/**< Regulatory Domain Country 5 Parameter (Regulatory Domain Module Set/Get Command): \n  
-																																				* Used for getting Country String or setting the local country IE per band with the Country IE that was detected in the last passive scan\n
-																																				* Done Sync with memory allocation\n 
-																																				* Parameter Number:	0x0F	\n
-																																				* Module Number: Regulatory Domain Module Number \n
-																																				* Async Bit: OFF	\n
-																																				* Allocate Bit: ON	\n
-																																				* GET Bit: ON	\n
-																																				* SET Bit: ON	\n
-																																				*/	
-    REGULATORY_DOMAIN_DFS_CHANNELS_RANGE					=	SET_BIT | GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x10,						/**< Regulatory Domain DFS Channels Parameter (Regulatory Domain Module Set/Get Command): \n  
-																																				* Used for config manager in order to set/get a parameter received from the OS abstraction layer\n
-																																				* Done Sync with no memory allocation\n 
-																																				* Parameter Number:	0x10	\n
-																																				* Module Number: Regulatory Domain Module Number \n
-																																				* Async Bit: OFF	\n
-																																				* Allocate Bit: OFF	\n
-																																				* GET Bit: ON	\n
-																																				* SET Bit: ON	\n
-																																				*/	
-	REGULATORY_DOMAIN_TX_POWER_LEVEL_TABLE_PARAM			=   		  GET_BIT | REGULATORY_DOMAIN_MODULE_PARAM | 0x12,						/**< Regulatory Domain TX Power Level Table Parameter (Regulatory Domain Module Get Command): \n  
-																																				* Used for getting TX Power Level Table from FW\n
-																																				* Done Sync with no memory allocation\n 
-																																				* Parameter Number:	0x12	\n
-																																				* Module Number: Regulatory Domain Module Number \n
-																																				* Async Bit: OFF	\n
-																																				* Allocate Bit: OFF	\n
-																																				* GET Bit: ON	\n
-																																				* SET Bit: OFF	\n
-																																				*/		
-
-	/* Power Manager params */
-    POWER_MGR_POWER_MODE							= 	SET_BIT | GET_BIT | POWER_MANAGER_PARAM | 0x01,							/**< Power Manager Power Mode Parameter (Power Manager Module Set/Get Command): \n  
-																																* Used for setting/getting the Power Mode to/from Power Manager Module\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	0x01	\n
-																																* Module Number: Power Manager Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: ON	\n
-																																*/
-    POWER_MGR_POWER_LEVEL_PS                        =   SET_BIT | GET_BIT | POWER_MANAGER_PARAM | 0x02,							/**< Power Manager Power Level Power-Save Parameter (Power Manager Module Set/Get Command): \n  
-																																* Used for getting the Power Level Power-Save from Power Manager Module or setting the Power Level Power-Save to Power Manager Module (and to FW if Power-Save is Enabled)\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	0x02	\n
-																																* Module Number: Power Manager Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: ON	\n
-																																*/
-    POWER_MGR_POWER_LEVEL_DEFAULT                   =   SET_BIT | GET_BIT | POWER_MANAGER_PARAM | 0x03,							/**< Power Manager Power Level Default Parameter (Power Manager Module Set/Get Command): \n  
-																																* Used for getting the Power Level Default from Power Manager Module or setting the Power Level Default to Power Manager Module (and to FW if Power-Save is Enabled)\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	0x03	\n
-																																* Module Number: Power Manager Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: ON	\n
-																																*/
-    POWER_MGR_POWER_LEVEL_DOZE_MODE                 =   SET_BIT | GET_BIT | POWER_MANAGER_PARAM | 0x04,							/**< Power Manager Power Level Doze Mode (short-doze / long-doze) Parameter (Power Manager Module Set/Get Command): \n  
-																																* Used for getting the Power Level Doze Mode from Power Manager Module or setting the Power Level Doze Mode to Power Manager Module (and to FW if Power-Save is Enabled)\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	0x04	\n
-																																* Module Number: Power Manager Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: ON	\n
-																																*/
-    POWER_MGR_KEEP_ALIVE_ENA_DIS                    =   SET_BIT |           POWER_MANAGER_PARAM | 0x05,							/**< Power Manager Keep Alive Enable/Disable Parameter (Power Manager Module Set Command): \n  
-																																* Used for setting the Keep Alive Enable/Disable to Power Manager and FW\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	0x05	\n
-																																* Module Number: Power Manager Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: OFF	\n
-																																* SET Bit: ON	\n
-																																*/
-    POWER_MGR_KEEP_ALIVE_ADD_REM                    =   SET_BIT |           POWER_MANAGER_PARAM | 0x06 | ALLOC_NEEDED_PARAM,	/**< Power Manager Keep Alive add REM Parameter (Power Manager Module Set Command): \n  
-																																* Used for setting addition/removal of a template and global enable/disable flag to Power Manager and FW\n
-																																* Done Sync with memory allocation\n 
-																																* Parameter Number:	0x06	\n
-																																* Module Number: Power Manager Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: ON	\n
-																																* GET Bit: OFF	\n
-																																* SET Bit: ON	\n
-																																*/
-    POWER_MGR_KEEP_ALIVE_GET_CONFIG                 =             GET_BIT | POWER_MANAGER_PARAM | 0x07 | ALLOC_NEEDED_PARAM,	/**< Power Manager Keep Alive Get Configuration Parameter (Power Manager Module Get Command): \n  
-																																* Used for getting the Keep Alive current Configuration\n
-																																* Done Sync with memory allocation\n 
-																																* Parameter Number:	0x07	\n
-																																* Module Number: Power Manager Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: ON	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: OFF	\n
-																																*/
-
-
-    POWER_MGR_GET_POWER_CONSUMPTION_STATISTICS       =            GET_BIT | POWER_MANAGER_PARAM | 0x09| ASYNC_PARAM,             /**< Power Manager  Get power consumption parmeter (Power Manager Module Get Command): \n  
-                                                                                                                                * Used for getting the Keep Alive current Configuration\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	0x08	\n
-																																* Module Number: Power Manager Module Number \n
-																																* Async Bit: ON	\n
-																																* Allocate Bit: ON	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: OFF	\n
-																																*/
-
-
-
-
-	/* Robust Security NW (RSN) section */
-	RSN_ENCRYPTION_STATUS_PARAM						=	SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x04,							/**< Robust Security NW (RSN) Encryption Status Parameter (RSN Module Set/Get Command): \n  
-																																* Used for setting/getting Encryption Status to/from RSN Module\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	0x04	\n
-																																* Module Number: RSN Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: ON	\n
-																																*/
-	RSN_ADD_KEY_PARAM								=	SET_BIT | 			RSN_MODULE_PARAM | 0x05,							/**< Robust Security NW (RSN) Add Key Parameter (RSN Module Set Command): \n  
-																																* Used for adding RSN Key to FW\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	0x05	\n
-																																* Module Number: RSN Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: OFF	\n
-																																* SET Bit: ON	\n
-																																*/
-	RSN_REMOVE_KEY_PARAM							=	SET_BIT           | RSN_MODULE_PARAM | 0x06,							/**< Robust Security NW (RSN) Remove Key Parameter (RSN Module Set Command): \n  
-																																* Used for removing RSN Key from FW\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	0x06	\n
-																																* Module Number: RSN Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: OFF	\n
-																																* SET Bit: ON	\n
-																																*/
-    RSN_EXT_AUTHENTICATION_MODE                 	= 	SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x07,							/**< Robust Security NW (RSN) External Authentication Mode Parameter (RSN Module Set/Get Command): \n  
-																																* Used for getting RSN External Authentication Mode from RSN Module or setting RSN External Authentication Mode to FW and RSN Module\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	0x07	\n
-																																* Module Number: RSN Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: ON	\n
-																																*/
-	RSN_MIXED_MODE									=	SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x08,							/**< Robust Security NW (RSN) Mixed Mode Parameter (RSN Module Set/Get Command): \n  
-																																* Used for setting/getting RSN Mixed Mode to/from RSN Module\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	0x08	\n
-																																* Module Number: RSN Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: ON	\n
-																																*/
-    RSN_DEFAULT_KEY_ID								=	SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x09,							/**< Robust Security NW (RSN) Defualt Key ID Parameter (RSN Module Set/Get Command): \n  
-																																* Used for getting RSN defualt Key ID from RSN Module or setting RSN defualt Key ID to FW and RSN Module\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	0x09	\n
-																																* Module Number: RSN Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: ON	\n
-																																*/
-	RSN_XCC_NETWORK_EAP								=	SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x0A,							/**< Robust Security NW (RSN) XCC NW EAP Parameter (RSN Module Set/Get Command): \n  
-                                                                                                                                * Used for setting/getting RSN XCC NW EAP to/from RSN Module\n
-                                                                                                                                * Done Sync with no memory allocation\n 
-                                                                                                                                * Parameter Number:	0x0B	\n
-                                                                                                                                * Module Number: RSN Module Number \n
-                                                                                                                                * Async Bit: OFF	\n
-                                                                                                                                * Allocate Bit: OFF	\n
-                                                                                                                                * GET Bit: ON	\n
-                                                                                                                                * SET Bit: ON	\n
-                                                                                                                                */
-
-    RSN_SET_KEY_PARAM								=	SET_BIT | RSN_MODULE_PARAM | 0x0B,							            /**< Robust Security NW (RSN) Set Key Parameter (RSN Module Set/Get Command): \n  
-                                                                                                                                * Used for setting Keys during external RSN mode to RSN Module\n
-                                                                                                                                * Done Sync with no memory allocation\n 
-                                                                                                                                * Parameter Number:	0x0B	\n
-                                                                                                                                * Module Number: RSN Module Number \n
-                                                                                                                                * Async Bit: OFF	\n
-                                                                                                                                * Allocate Bit: OFF	\n
-                                                                                                                                * GET Bit: ON	\n
-                                                                                                                                * SET Bit: ON	\n
-                                                                                                                                */
-
-
-
-    RSN_SET_PROTECTION_RX_PARAM					=	SET_BIT | RSN_MODULE_PARAM | ASYNC_PARAM | 0x0C,					        /**< Robust Security NW (RSN) Set Protection RX Parameter (RSN Module Set/Get Command): \n  
-                                                                                                                                * Used for setting protection for RX during external RSN mode to RSN Module\n
-                                                                                                                                * Done ASync with no memory allocation\n 
-                                                                                                                                * Parameter Number:	0x0C	\n
-                                                                                                                                * Module Number: RSN Module Number \n
-                                                                                                                                * Async Bit: ON	\n
-                                                                                                                                * Allocate Bit: OFF	\n
-                                                                                                                                * GET Bit: ON	\n
-                                                                                                                                * SET Bit: ON	\n
-                                                                                                                                */
-
-
-    RSN_SET_PROTECTION_RX_TX_PARAM					=	SET_BIT | RSN_MODULE_PARAM | 0x0D,							            /**< Robust Security NW (RSN) Set Protection RX TX Parameter (RSN Module Set/Get Command): \n  
-                                                                                                                                * Used for setting protection for both RX and TX during external RSN mode to RSN Module\n
-                                                                                                                                * Done Sync with no memory allocation\n 
-                                                                                                                                * Parameter Number:	0x0C	\n
-                                                                                                                                * Module Number: RSN Module Number \n
-                                                                                                                                * Async Bit: OFF	\n
-                                                                                                                                * Allocate Bit: OFF	\n
-                                                                                                                                * GET Bit: ON	\n
-                                                                                                                                * SET Bit: ON	\n
-                                                                                                                                */
-
-    RSN_PORT_STATUS_PARAM		 			    =	SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x0D,							    /**< Robust Security NW (RSN)  Port Status (RSN Module Set/Get Command): \n  
-                                                                                                                                * Used for setting port status during external RSN mode to RSN Module\n
-                                                                                                                                * Done Sync with no memory allocation\n 
-                                                                                                                                * Parameter Number:	0x0D	\n
-                                                                                                                                * Module Number: RSN Module Number \n
-                                                                                                                                * Async Bit: OFF	\n
-                                                                                                                                * Allocate Bit: OFF	\n
-                                                                                                                                * GET Bit: ON	\n
-                                                                                                                                * SET Bit: ON	\n
-                                                                                                                                */
-
-    RSN_GENERIC_IE_PARAM		 			      = SET_BIT           | RSN_MODULE_PARAM | 0x0E,							    /**< Robust Security NW (RSN)  Generic IE (RSN Module Set Command): \n  
-                                                                                                                                * Used for setting the Generic IE passed to the AP during association to RSN Module\n
-                                                                                                                                * Done Sync with no memory allocation\n 
-                                                                                                                                * Parameter Number:	0x0E	\n
-                                                                                                                                * Module Number: RSN Module Number \n
-                                                                                                                                * Async Bit: OFF	\n
-                                                                                                                                * Allocate Bit: OFF	\n
-                                                                                                                                * GET Bit: OFF	\n
-                                                                                                                                * SET Bit: ON	\n
-                                                                                                                                */
-
-    RSN_EXTERNAL_MODE_PARAM		 			      =          SET_BIT | GET_BIT | RSN_MODULE_PARAM | 0x0F,							    /**< Robust Security NW (RSN)  External Mode Parameter: \n  
-                                                                                                                                * Used for getting the RSN External Mode\n
-                                                                                                                                * Done Sync with no memory allocation\n 
-                                                                                                                                * Parameter Number:     0x0F    \n
-                                                                                                                                * Module Number: RSN Module Number \n
-                                                                                                                                * Async Bit: OFF        \n
-                                                                                                                                * Allocate Bit: OFF     \n
-                                                                                                                                * GET Bit: OFF  \n
-                                                                                                                                * SET Bit: ON   \n
-                                                                                                                                */
-
-    RSN_GEM_DATA_PARAM                                                =                     RSN_MODULE_PARAM | 0x10,                                                        /**< Robust Security NW (RSN)  External Mode Parameter: \n  
-                                                                                                                                * Used for setting GEM data\n
-                                                                                                                                * Done Sync with no memory allocation\n 
-                                                                                                                                * Parameter Number:     0x10    \n
-                                                                                                                                * Module Number: RSN Module Number \n
-                                                                                                                                * Async Bit: OFF	\n
-                                                                                                                                * Allocate Bit: OFF	\n
-                                                                                                                                * GET Bit: ON 	\n
-                                                                                                                                * SET Bit: OFF	\n
-                                                                                                                                */
-
-
-	/* TWD Control section */
-    TWD_RTS_THRESHOLD_PARAM                			=   SET_BIT | GET_BIT | TWD_MODULE_PARAM | TWD_RTS_THRESHOLD_PARAM_ID,		/**< TWD Control RTS Threshold Parameter (TWD Control Module Set/Get Command): \n  
-																																* Used for getting RTS Threshold from TWD Control Module or setting RTS Threshold to FW and TWD Control Module\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	TWD_RTS_THRESHOLD_PARAM_ID	\n
-																																* Module Number: TWD Control Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: ON	\n
-																																*/
-    TWD_FRAG_THRESHOLD_PARAM               			=   SET_BIT | GET_BIT | TWD_MODULE_PARAM | TWD_FRAG_THRESHOLD_PARAM_ID,		/**< TWD Control Fragmentation Threshold Parameter (TWD Control Module Set/Get Command): \n  
-																																* Used for getting Fragmentation Threshold from TWD Control Module or setting Fragmentation Threshold to FW and TWD Control Module\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	TWD_FRAG_THRESHOLD_PARAM_ID	\n
-																																* Module Number: TWD Control Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: ON	\n
-																																*/
-    TWD_RSSI_LEVEL_PARAM							=			  GET_BIT | TWD_MODULE_PARAM | TWD_RSSI_LEVEL_PARAM_ID 			| ASYNC_PARAM,	/**< TWD Control RSSI Level Parameter (TWD Control Module Get Command): \n  
-																																				* Used for getting RSSI Level From FW\n
-																																				* Done Async with no memory allocation\n 
-																																				* Parameter Number:	TWD_RSSI_LEVEL_PARAM_ID	\n
-																																				* Module Number: TWD Control Module Number \n
-																																				* Async Bit: ON	\n
-																																				* Allocate Bit: OFF	\n
-																																				* GET Bit: ON	\n
-																																				* SET Bit: OFF	\n
-																																				*/
-    TWD_SNR_RATIO_PARAM                    			=			  GET_BIT | TWD_MODULE_PARAM | TWD_SNR_RATIO_PARAM_ID			| ASYNC_PARAM,	/**< TWD Control SNR Radio Parameter (TWD Control Module Get Command): \n  
-																																				* Used for getting SNR Radio From FW (same outcome as TWD_RSSI_LEVEL_PARAM)\n
-																																				* Done Async with no memory allocation\n 
-																																				* Parameter Number:	TWD_SNR_RATIO_PARAM_ID	\n
-																																				* Module Number: TWD Control Module Number \n
-																																				* Async Bit: ON	\n
-																																				* Allocate Bit: OFF	\n
-																																				* GET Bit: ON	\n
-																																				* SET Bit: OFF	\n
-																																				*/
-
-	/*for BIP/PLT/Radio Debug Tests --> supports Set + GET*/
-	TWD_RADIO_TEST_PARAM               						=   SET_BIT | GET_BIT | TWD_MODULE_PARAM | TWD_RADIO_TEST_PARAM_ID 	| ASYNC_PARAM,	/**< TWD Control SNR Radio Parameter (TWD Control Module Set/Get Command): \n  
-																																				* Used for performing BIP/PLT/Radio Debug Tests\n
-																																				* Done Async with no memory allocation\n 
-																																				* Parameter Number:	TWD_RADIO_TEST_PARAM_ID	\n
-																																				* Module Number: TWD Control Module Number \n
-																																				* Async Bit: ON	\n
-																																				* Allocate Bit: OFF	\n
-																																				* GET Bit: ON	\n
-																																				* SET Bit: ON	\n
-																																				*/
-	
-	TWD_FM_COEX_PARAM               						=   SET_BIT |    TWD_MODULE_PARAM | TWD_FM_COEX_PARAM_ID,	                        /**< TWD Control FM-Coexistence Parameters (TWD Control Module Set/Get Command): \n  
-																																				* Used for setting the FM-Coexistence Parameters\n
-																																				* Done Async with no memory allocation\n 
-																																				* Parameter Number:	TWD_FM_COEX_PARAM_ID	\n
-																																				* Module Number: TWD Control Module Number \n
-																																				* Async Bit: ON	\n
-																																				* Allocate Bit: OFF	\n
-																																				* GET Bit: OFF	\n
-																																				* SET Bit: ON	\n
-																																				*/
-
-    TWD_DCO_ITRIM_PARAMS                			=   SET_BIT | GET_BIT | TWD_MODULE_PARAM | TWD_DCO_ITRIM_PARAMS_ID,		/**< TWD Control DCO Itrim Parameters (TWD Control Module Set/Get Command): \n  
-																																* Used for getting DCO Itrim Parameters from TWD Control Module or setting DCO Itrim Parameters to FW and TWD Control Module\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	TWD_DCO_ITRIM_PARAMS_ID	\n
-																																* Module Number: TWD Control Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: ON	\n
-																																* SET Bit: ON	\n
-																																*/
-    /* Roaming manager */
-    ROAMING_MNGR_APPLICATION_CONFIGURATION		= 	SET_BIT | GET_BIT | ROAMING_MANAGER_MODULE_PARAM | 0x01,	/**< Roaming Manager Application Configuration Parameter (Roaming Manager Module Set/Get Command): \n  
-																												* Used for setting/getting Roaming Manager Application Configuration to/from Roaming Manager Module and State-Machine\n
-																												* Done Sync with no memory allocation\n 
-																												* Parameter Number:	0x01	\n
-																												* Module Number: Roaming Manager Module Number \n
-																												* Async Bit: OFF	\n
-																												* Allocate Bit: OFF	\n
-																												* GET Bit: ON	\n
-																												* SET Bit: ON	\n
-																												*/
-    ROAMING_MNGR_USER_DEFINED_TRIGGER     		= 	SET_BIT |           ROAMING_MANAGER_MODULE_PARAM | 0x02,	/**< Roaming Manager User Defined Trigger Parameter (Roaming Manager Module Set Command): \n  
-																												* Used for setting user-defined trigger to FW\n
-																												* Done Sync with no memory allocation\n 
-																												* Parameter Number:	0x02	\n
-																												* Module Number: Roaming Manager Module Number \n
-																												* Async Bit: OFF	\n
-																												* Allocate Bit: OFF	\n
-																												* GET Bit: OFF	\n
-																												* SET Bit: ON	\n
-																												*/
-
-	/* QOS manager params */
-    QOS_MNGR_SET_OS_PARAMS						=	SET_BIT |           QOS_MANAGER_PARAM | 0x10,	/**< QoS Manager Set OS Parameter (QoS Module Set Command): \n  
-																									* Used for setting Quality Of Service Manager's Parameters\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x10	\n
-																									* Module Number: QoS Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: OFF	\n
-																									* SET Bit: ON	\n
-																									*/
-    QOS_MNGR_AP_QOS_PARAMETERS					=			  GET_BIT | QOS_MANAGER_PARAM | 0x11,	/**< QoS Manager AP QoS Parameter (QoS Module Get Command): \n  
-																									* Used for getting current AP QoS Parameters from QoS Module\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x11	\n
-																									* Module Number: QoS Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: OFF	\n
-																									*/
-    QOS_MNGR_OS_TSPEC_PARAMS					=             GET_BIT | QOS_MANAGER_PARAM | 0x12,	/**< QoS Manager OS TSPEC Parameter (QoS Module Get Command): \n  
-																									* Used for getting current OS 802.11 QoS TSPEC Parameters from QoS Module\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x12	\n
-																									* Module Number: QoS Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: OFF	\n
-																									*/
-    QOS_MNGR_AC_STATUS							=	SET_BIT | GET_BIT | QOS_MANAGER_PARAM | 0x13,	/**< QoS Manager AC Status Parameter (QoS Module Set/Get Command): \n  
-																									* Used for setting/getting SC Status\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x13	\n
-																									* Module Number: QoS Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: ON	\n
-																									*/
-    QOS_MNGR_ADD_TSPEC_REQUEST					=	SET_BIT | 			QOS_MANAGER_PARAM | 0x14,	/**< QoS Manager Add TSPEC Request Parameter (QoS Module Set Command): \n  
-																									* Used for setting TSPEC Parameters to QoS Module\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x14	\n
-																									* Module Number: QoS Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: OFF	\n
-																									* SET Bit: ON	\n
-																									*/
-	QOS_MNGR_DEL_TSPEC_REQUEST					=	SET_BIT           | QOS_MANAGER_PARAM | 0x15,	/**< QoS Manager Delete TSPEC Request Parameter (QoS Module Set Command): \n  
-																									* Used for deleting TSPEC Parameters from QoS Module\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x15	\n
-																									* Module Number: QoS Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: OFF	\n
-																									* SET Bit: ON	\n
-																									*/
-	QOS_MNGR_GET_DESIRED_PS_MODE				=             GET_BIT | QOS_MANAGER_PARAM | 0x17,	/**< QoS Manager Get Desired Power-Save Mode Parameter (QoS Module Get Command): \n  
-																									* Used for getting the current desired Power-Save Mode from QoS Module\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x17	\n
-																									* Module Number: QoS Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: OFF	\n
-																									*/
-    QOS_SET_RX_TIME_OUT							=	SET_BIT |			QOS_MANAGER_PARAM | 0x18, 	/**< QoS Manager Get Desired Power-Save Mode Parameter (QoS Module Set Command): \n  
-																									* Used for setting RX Time Out (PS poll and UPSD) to FW and in QoS Module\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x18	\n
-																									* Module Number: QoS Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: OFF	\n
-																									* SET Bit: ON	\n
-																									*/
-    QOS_MNGR_PS_RX_STREAMING					=	SET_BIT | GET_BIT | QOS_MANAGER_PARAM | 0x19,	/**< QoS Manager Set Power-Save RX Streaming Parameter (QoS Module Set/Get Command): \n  
-																									* Used for getting Power-Save RX Streaming or setting Power-Save RX Streaming to FW and in QoS Module\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x19	\n
-																									* Module Number: QoS Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: ON	\n
-																									*/
-
-    /* Soft Gemini params */
-	SOFT_GEMINI_SET_ENABLE						=	SET_BIT |           SOFT_GEMINI_PARAM	| 0x01,	/**< Soft Gimini Parameters Set Enable Parameter (Soft Gimini Parameters Module Set Command): \n  
-																									* Used for configuring Soft Gimini enable Mode (Enable|Disable|Auto) in FW\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x01	\n
-																									* Module Number: Soft Gimini Parameters Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: OFF	\n
-																									* SET Bit: ON	\n
-																									*/
-    SOFT_GEMINI_SET_CONFIG						=	SET_BIT |           SOFT_GEMINI_PARAM   | 0x03,	/**< Soft Gimini Parameters Set Configuration Parameter (Soft Gimini Parameters Module Set Command): \n  
-																									* Used for setting Soft Gimini Configuration to FW\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x03	\n
-																									* Module Number: Soft Gimini Parameters Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: OFF	\n
-																									* SET Bit: ON	\n
-																									*/
-    SOFT_GEMINI_GET_CONFIG                      =	GET_BIT |           SOFT_GEMINI_PARAM   | 0x04,	/**< Soft Gimini Parameters Get Configuration Parameter (Soft Gimini Parameters Module Get Command): \n  
-																									* Used for getting Soft Gimini Configuration\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x04	\n
-																									* Module Number: Soft Gimini Parameters Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: OFF	\n
-																									*/
-
-	/* REPORT section */
-	REPORT_MODULE_TABLE_PARAM                   =	SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x01,	/**< Report Module Table Parameter (Report Module Set/Get Command): \n  
-																									* Used for setting/getting Report Module Table (Tble of all Logged Modules)\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x01	\n
-																									* Module Number: Report Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: ON	\n
-																									*/
-	REPORT_SEVERITY_TABLE_PARAM                 =	SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x02,	/**< Report Severity Table Parameter (Report Module Set/Get Command): \n  
-																									* Used for setting/getting the Severity Table (holds availble severity Levels of the event which is reported to user)\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x02	\n
-																									* Module Number: Report Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: ON	\n
-																									*/
-    REPORT_MODULE_ON_PARAM                      =   SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x03,	/**< Report Module ON Parameter (Report Module Set/Get Command): \n  
-																									* Used for setting (Enable) ceratin Logged Module in Report Modules Table or getting the Reported Module Status from Table (Enabled/Disabled)\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x03	\n
-																									* Module Number: Report Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: ON	\n
-																									*/
-    REPORT_MODULE_OFF_PARAM                     =   SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x04,	/**< Report Module OFF Parameter (Report Module Set/Get Command): \n  
-																									* Used for setting (Disable) ceratin Logged Module in Report Modules Table or getting the Reported Module Status from Table (Enabled/Disabled)\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x04	\n
-																									* Module Number: Report Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: ON	\n
-																									*/
-    REPORT_PPMODE_VALUE_PARAM                   =   SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x05,	/**< Report PP MODE Value Parameter (Report Module Set/Get Command): \n  
-																									* Used for setting (Enable/Disable) or Getting the Debug Mode flag, which indicates whether debug module should be used or not\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x05	\n
-																									* Module Number: Report Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: ON	\n
-																									*/
-	REPORT_OUTPUT_TO_LOGGER_ON                  =   SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x06,	/**< Report output ON Parameter (Report Module Set/Get Command): \n  
-																									* Used for setting the output of logs to the logger application\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x04	\n
-																									* Module Number: Report Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: ON	\n
-																									*/
-
-	REPORT_OUTPUT_TO_LOGGER_OFF                  =   SET_BIT | GET_BIT | REPORT_MODULE_PARAM | 0x07,/**< Report output OFF Parameter (Report Module Set/Get Command): \n  
-																									* Used for setting OFF the output of logs to the logger application\n
-																									* Done Sync with no memory allocation\n 
-																									* Parameter Number:	0x04	\n
-																									* Module Number: Report Module Number \n
-																									* Async Bit: OFF	\n
-																									* Allocate Bit: OFF	\n
-																									* GET Bit: ON	\n
-																									* SET Bit: ON	\n
-																									*/
-
-
-	/* TX data section */
-    TX_CTRL_COUNTERS_PARAM						=			  GET_BIT | TX_CTRL_MODULE_PARAM | 0x01 | ALLOC_NEEDED_PARAM,	/**< TX Control Counters Parameter (TX Control Module Get Command): \n  
-																															* Used for getting TX statistics per Tx-queue\n
-																															* Done Sync with memory allocation\n 
-																															* Parameter Number:	0x01	\n
-																															* Module Number: TX Control Module Number \n
-																															* Async Bit: OFF	\n
-																															* Allocate Bit: ON	\n
-																															* GET Bit: ON	\n
-																															* SET Bit: OFF	\n
-																															*/
-    TX_CTRL_RESET_COUNTERS_PARAM                =	SET_BIT 		  | TX_CTRL_MODULE_PARAM | 0x02,						/**< TX Control Reset Counters Parameter (TX Control Module Set Command): \n  
-																															* Used for Reset all TX statistics per Tx-queue\n
-																															* Done Sync with no memory allocation\n 
-																															* Parameter Number:	0x02	\n
-																															* Module Number: TX Control Module Number \n
-																															* Async Bit: OFF	\n
-																															* Allocate Bit: OFF	\n
-																															* GET Bit: OFF	\n
-																															* SET Bit: ON	\n
-																															*/
-    TX_CTRL_SET_MEDIUM_USAGE_THRESHOLD			=	SET_BIT           | TX_CTRL_MODULE_PARAM | 0x03,						/**< TX Control Set Medum Usage Threshold Parameter (TX Control Module Set Command): \n  
-																															* Used for setting Medum Usage Threshold of AC\n
-																															* Done Sync with no memory allocation\n 
-																															* Parameter Number:	0x03	\n
-																															* Module Number: TX Control Module Number \n
-																															* Async Bit: OFF	\n
-																															* Allocate Bit: OFF	\n
-																															* GET Bit: OFF	\n
-																															* SET Bit: ON	\n
-																															*/
-
-    TX_CTRL_GENERIC_ETHERTYPE         			=	SET_BIT | GET_BIT | TX_CTRL_MODULE_PARAM | 0x10,						/**< TX Control Get/Set Generic Ethertype (TX Control Module Get/Set Command): \n  
-																															* Used for setting the Generic Ethertype for authentication packets\n
-																															* Done Sync with no memory allocation\n 
-																															* Parameter Number:	0x10	\n
-																															* Module Number: TX Control Module Number \n
-																															* Async Bit: OFF	\n
-																															* Allocate Bit: OFF	\n
-																															* GET Bit: ON	\n
-																															* SET Bit: ON	\n
-																															*/
-
-    /* RX data section */
-    RX_DATA_ENABLE_DISABLE_RX_DATA_FILTERS     	=   SET_BIT | GET_BIT | RX_DATA_MODULE_PARAM | 0x04,						/**< RX Data Enable/Disable Filters Parameter (RX Data Module Set/Get Command): \n  
-																															* Used for Enabling/Disabling Filters in FW or getting the  Filters Enabling/Disabling current Status\n
-																															* Done Sync with no memory allocation\n 
-																															* Parameter Number:	0x04	\n
-																															* Module Number: RX Data Module Number \n
-																															* Async Bit: OFF	\n
-																															* Allocate Bit: OFF	\n
-																															* GET Bit: ON	\n
-																															* SET Bit: ON	\n
-																															*/
-    RX_DATA_ADD_RX_DATA_FILTER                 	=   SET_BIT           | RX_DATA_MODULE_PARAM | 0x05,						/**< RX Data Add Filter Parameter (RX Data Module Set Command): \n  
-																															* Used for adding RX Data Filter to FW\n
-																															* Done Sync with no memory allocation\n 
-																															* Parameter Number:	0x05	\n
-																															* Module Number: RX Data Module Number \n
-																															* Async Bit: OFF	\n
-																															* Allocate Bit: OFF	\n
-																															* GET Bit: OFF	\n
-																															* SET Bit: ON	\n
-																															*/
-    RX_DATA_REMOVE_RX_DATA_FILTER              	=   SET_BIT           | RX_DATA_MODULE_PARAM | 0x06,						/**< RX Data Remove Filter Parameter (RX Data Module Set Command): \n  
-																															* Used for removing RX Data Filter from FW\n
-																															* Done Sync with no memory allocation\n 
-																															* Parameter Number:	0x06	\n
-																															* Module Number: RX Data Module Number \n
-																															* Async Bit: OFF	\n
-																															* Allocate Bit: OFF	\n
-																															* GET Bit: OFF	\n
-																															* SET Bit: ON	\n
-																															*/
-    RX_DATA_GET_RX_DATA_FILTERS_STATISTICS     	=             GET_BIT | RX_DATA_MODULE_PARAM | 0x07 | ASYNC_PARAM,			/**< RX Data Get RX Data Filter Statistics Parameter (RX Data Module Get Command): \n  
-																															* Used for getting RX Data Filter Statistics from FW\n
-																															* Done Async with no memory allocation\n 
-																															* Parameter Number:	0x07	\n
-																															* Module Number: RX Data Module Number \n
-																															* Async Bit: ON	\n
-																															* Allocate Bit: OFF	\n
-																															* GET Bit: ON	\n
-																															* SET Bit: OFF	\n
-																															*/
-    
-
-	/* measurement section */
-    MEASUREMENT_ENABLE_DISABLE_PARAM			=	SET_BIT |           MEASUREMENT_MODULE_PARAM | 0x01,	/**< Measurement Enable/Disable Parameter (Measurement Module Set Command): \n  
-																											* Used for Enabling/Disabling Measurement Management Module\n
-																											* Done Sync with no memory allocation\n 
-																											* Parameter Number:	0x01	\n
-																											* Module Number: Measurement Module Number \n
-																											* Async Bit: OFF	\n
-																											* Allocate Bit: OFF	\n
-																											* GET Bit: OFF	\n
-																											* SET Bit: ON	\n
-																											*/
-	MEASUREMENT_MAX_DURATION_PARAM				=	SET_BIT |           MEASUREMENT_MODULE_PARAM | 0x02,	/**< Measurement Maximum Duration Parameter (Measurement Module Set Command): \n  
-																											* Used for updating the Maximum Duration on non serving channel\n
-																											* Done Sync with no memory allocation\n 
-																											* Parameter Number:	0x02	\n
-																											* Module Number: Measurement Module Number \n
-																											* Async Bit: OFF	\n
-																											* Allocate Bit: OFF	\n
-																											* GET Bit: OFF	\n
-																											* SET Bit: ON	\n
-																											*/
-
-	/* XCC */    
-    XCC_CONFIGURATION							=	SET_BIT | GET_BIT | XCC_MANAGER_MODULE_PARAM | 0x01,	/**< XCC Manager Configuration Parameter (XCC Manager Module Set/Get Command): \n  
-																											* Used for setting or getting XCC configuration (RogueAP, CCKM, CKIP, All)\n
-																											* Done Sync with no memory allocation\n 
-																											* Parameter Number:	0x01	\n
-																											* Module Number: XCC Manager Module Number \n
-																											* Async Bit: OFF	\n
-																											* Allocate Bit: OFF	\n
-																											* GET Bit: ON	\n
-																											* SET Bit: ON	\n
-																											*/
-
-	/* MISC section */
-	DEBUG_ACTIVATE_FUNCTION						=	SET_BIT | 			MISC_MODULE_PARAM | 0x03,		 	/**< Debug Activate Function Parameter (MISC Module Set Command): \n  
-																											* Used for performing debug function\n
-																											* Done Sync with no memory allocation\n 
-																											* Parameter Number:	0x03	\n
-																											* Module Number: MISC Module Number \n
-																											* Async Bit: OFF	\n
-																											* Allocate Bit: OFF	\n
-																											* GET Bit: OFF	\n
-																											* SET Bit: ON	\n
-																											*/ 
-
-	/* Health Monitoring section */
-    HEALTH_MONITOR_CHECK_DEVICE                 =   SET_BIT |           HEALTH_MONITOR_MODULE_PARAM | 0x01,	/**< Health Monitoring Check Device Parameter (Health Monitoring Module Set Command): \n  
-																											* Used for sending health check command to FW\n
-																											* Done Sync with no memory allocation\n 
-																											* Parameter Number:	0x01	\n
-																											* Module Number: Health Monitoring Module Number \n
-																											* Async Bit: OFF	\n
-																											* Allocate Bit: OFF	\n
-																											* GET Bit: OFF	\n
-																											* SET Bit: ON	\n
-																											*/
-
-	/* TWD CoexActivity table */
-    TWD_COEX_ACTIVITY_PARAM                			=   SET_BIT | TWD_MODULE_PARAM | TWD_COEX_ACTIVITY_PARAM_ID,		/**< TWD Control CoexActivity Parameter (TWD Control Module Set/Get Command): \n  
-																																* Used for getting RTS Threshold from TWD Control Module or setting RTS Threshold to FW and TWD Control Module\n
-																																* Done Sync with no memory allocation\n 
-																																* Parameter Number:	TWD_COEX_ACTIVITY_PARAM_ID	\n
-																																* Module Number: TWD Control Module Number \n
-																																* Async Bit: OFF	\n
-																																* Allocate Bit: OFF	\n
-																																* GET Bit: OFF	\n
-																																* SET Bit: ON	\n
-																																*/
-
-    /* CurrBss Section */
-    CURR_BSS_REGISTER_LINK_QUALITY_EVENT_PARAM     =   SET_BIT | CURR_BSS_MODULE_PARAM | 0x01,	 /**< CurrBss User Defined Trigger Parameter (Roaming Manager Module Set Command): \n  
-                                                                                                    * Used for setting user-defined trigger to FW\n
-                                                                                                    * Done Sync with no memory allocation\n 
-                                                                                                    * Parameter Number:	0x01	\n
-                                                                                                    * Module Number: Curr Bss Module Number \n
-                                                                                                    * Async Bit: OFF	\n
-                                                                                                    * Allocate Bit: OFF	\n
-                                                                                                    * GET Bit: OFF	\n
-                                                                                                    * SET Bit: ON	\n
-                                                                                                    */
-
-	LAST_CMD									=	0x00	/**< Last External Parameter - Dummy, Should always stay Last	*/													
-
-}   EExternalParam;
-
-/* functions */
-/*************/
-
-#endif  /* _CMD_INTERFACE_CODES_H_ */
-        
diff --git a/wl1271/utils/GenSM.c b/wl1271/utils/GenSM.c
deleted file mode 100644
index 9c9c4ef..0000000
--- a/wl1271/utils/GenSM.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * GenSM.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file GenSM.c
- *  \brief Generic state machine implementation
- *
- *  \see GenSM.h
- */
-
-
-#define __FILE_ID__  FILE_ID_128
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "GenSM.h"
-
-
-/** 
- * \fn     genSM_Create 
- * \brief  Cerates a generic state machine object
- * 
- * Cerates a generic state machine object. Allocates system resources.
- * 
- * \note   event/action matrix and debug descriptions are used by reference, and are not copied! 
- * \param  hOS - handle to the OS object
- * \return Handle to the generic state machine object
- * \sa     GenSM_Unload, GenSM_Init, genSM_SetDefaults
- */
-TI_HANDLE genSM_Create (TI_HANDLE hOS)
-{
-    TGenSM      *pGenSM = NULL;
-
-    /* Allocate object storage */
-    pGenSM = os_memoryAlloc (hOS, sizeof(TGenSM));
-    if (NULL != pGenSM)
-    {
-        /* Store OS handle */
-        pGenSM->hOS = hOS;
-    }
-
-    return (TI_HANDLE)pGenSM;
-}
-
-/** 
- * \fn     genSM_Unload 
- * \brief  Unloads a generic state machine object
- * 
- * Unloads a generic state machine object. Frees system resources consumed by the object.
- * 
- * \param  hGenSM - hanlde to the generic state machine object
- * \return None
- * \sa     GenSM_Create 
- */
-void genSM_Unload (TI_HANDLE hGenSM)
-{
-    TGenSM      *pGenSM =       (TGenSM*)hGenSM;
-
-    /* free the generic state machine object storage */
-    os_memoryFree (pGenSM->hOS, hGenSM, sizeof (TGenSM));
-}
-
-/** 
- * \fn     genSM_Init 
- * \brief  Initializes the generic state machine object
- * 
- * Initializes the generic state machine object. Store handles to other modules.
- * 
- * \param  hGenSM - hanlde to the generic state machine object
- * \param  hReport - handle to the report module
- * \return None
- * \sa     GenSM_Create, genSM_SetDefaults
- */
-void genSM_Init (TI_HANDLE hGenSM, TI_HANDLE hReport)
-{
-    TGenSM      *pGenSM =       (TGenSM*)hGenSM;
-
-    /* store report handle */
-    pGenSM->hReport = hReport;
-}
-
-/** 
- * \fn     genSM_SetDefaults 
- * \brief  Set default values to the generic state machine 
- * 
- * Set default values to the generic state machine
- * 
- * \note   event/action matrix and debug descriptions are used by reference, and are not copied! 
- * \param  hGenSM - hanlde to the generic state machine object
- * \param  uStateNum - number of states
- * \param  uEventNum - number of events
- * \param  pMatrix - pointer to the event/actions matrix
- * \param  uInitialState - the initial state
- * \param  pGenSMName - a string describing the state machine, for debug prints
- * \param  pStateDesc - strings describing the state machine states, for debug prints
- * \param  pEventDesc - strings describing the state machine events, for debug prints
- * \param  uModuleLogIndex - Log index used by the module using the state machine
- * \return None
- * \sa     genSM_Create, genSM_Init
- */
-void genSM_SetDefaults (TI_HANDLE hGenSM, TI_UINT32 uStateNum, TI_UINT32 uEventNum,
-                        TGenSM_matrix pMatrix, TI_UINT32 uInitialState, TI_INT8 *pGenSMName, 
-                        TI_INT8 **pStateDesc, TI_INT8 **pEventDesc, TI_UINT32 uModuleLogIndex)
-{
-    TGenSM      *pGenSM =       (TGenSM*)hGenSM;
-
-    /* set values */
-    pGenSM->uStateNum       = uStateNum;
-    pGenSM->uEventNum       = uEventNum;
-    pGenSM->tMatrix         = pMatrix;
-    pGenSM->uCurrentState   = uInitialState;
-    pGenSM->pGenSMName      = pGenSMName;
-    pGenSM->pStateDesc      = pStateDesc;
-    pGenSM->pEventDesc      = pEventDesc;
-    pGenSM->uModuleLogIndex = uModuleLogIndex;
-    pGenSM->bEventPending   = TI_FALSE;
-    pGenSM->bInAction       = TI_FALSE;
-}
-
-void genSM_Event (TI_HANDLE hGenSM, TI_UINT32 uEvent, void *pData)
-{
-    TGenSM              *pGenSM =       (TGenSM*)hGenSM;
-    TGenSM_actionCell   *pCell;
-
-	if (pGenSM == NULL)
-	{
-        TRACE0(pGenSM->hReport, REPORT_SEVERITY_ERROR , "genSM_Event: Handle is NULL!!\n");
-		return;
-	}
-
-#ifdef TI_DBG
-    /* sanity check */
-    if (uEvent >= pGenSM->uEventNum)
-    {
-        TRACE3(pGenSM->hReport, REPORT_SEVERITY_ERROR , "genSM_Event: module: %d received event %d, which is out of events boundry %d\n", pGenSM->uModuleLogIndex, uEvent, pGenSM->uEventNum);
-    }
-    if (TI_TRUE == pGenSM->bEventPending)
-    {
-        TRACE3(pGenSM->hReport, REPORT_SEVERITY_ERROR , "genSM_Event: module: %d received event %d, when event %d is pending execution!\n", pGenSM->uModuleLogIndex, uEvent, pGenSM->uEvent);
-    }
-#endif
-
-    /* mark that an event is pending */
-    pGenSM->bEventPending = TI_TRUE;
-
-    /* save event and data */
-    pGenSM->uEvent = uEvent;
-    pGenSM->pData = pData;
-
-    /* if an event is currently executing, return (new event will be handled when current event is done) */
-    if (TI_TRUE == pGenSM->bInAction)
-    {
-        TRACE1(pGenSM->hReport, REPORT_SEVERITY_INFORMATION , ": module: %d delaying execution of event \n", pGenSM->uModuleLogIndex);
-        return;
-    }
-
-    /* execute events, until none is pending */
-    while (TI_TRUE == pGenSM->bEventPending)
-    {
-        /* get the cell pointer for the current state and event */
-        pCell = &(pGenSM->tMatrix[ (pGenSM->uCurrentState * pGenSM->uEventNum) + pGenSM->uEvent ]);
-        
-
-        /* print state transition information */
-		TRACE4(pGenSM->hReport, REPORT_SEVERITY_INFORMATION, "genSM_Event: module %d <currentState = %d, event = %d> --> nextState = %d\n", pGenSM->uModuleLogIndex, pGenSM->uCurrentState, uEvent, pCell->uNextState);
-
-        /* mark that event execution is in place */
-        pGenSM->bInAction = TI_TRUE;
-
-        /* mark that pending event is being handled */
-        pGenSM->bEventPending = TI_FALSE;
-        
-        /* update current state */
-        pGenSM->uCurrentState = pCell->uNextState;
-
-        /* run transition function */
-        (*(pCell->fAction)) (pGenSM->pData);
-
-        /* mark that event execution is complete */
-        pGenSM->bInAction = TI_FALSE;
-    }
-}
-
-/** 
- * \fn     genSM_GetCurrentState
- * \brief  retrieves the state machine current state
- * 
- * retrieves the state machine current state
- * 
- * \param  hGenSM - hanlde to the generic state machine object
- * \return state machine current state
- */
-TI_UINT32 genSM_GetCurrentState (TI_HANDLE hGenSM)
-{
-    TGenSM              *pGenSM =       (TGenSM*)hGenSM;
-
-	if (pGenSM == NULL)
-	{
-        TRACE0(pGenSM->hReport, REPORT_SEVERITY_ERROR , "genSM_GetCurrentState: Handle is NULL!!\n");
-		return 0;
-	}
-    return pGenSM->uCurrentState;
-}
diff --git a/wl1271/utils/GenSM.h b/wl1271/utils/GenSM.h
deleted file mode 100644
index 120d239..0000000
--- a/wl1271/utils/GenSM.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * GenSM.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file GenSM.h
- *  \brief Generic state machine declarations
- *
- *  \see GenSM.c
- */
-
-
-#ifndef __GENSM_H__
-#define __GENSM_H__
-
-#include "tidef.h"
-
-/* action function type definition */
-typedef void (*TGenSM_action) (void *pData);
-
-
-/* State/Event cell */
-typedef  struct
-{
-    TI_UINT32       uNextState; /**< next state in transition */
-    TGenSM_action   fAction;    /**< action function */
-} TGenSM_actionCell;
-
-
-
-/* 
- * matrix type 
- * Although the state-machine matrix is actually a two-dimensional array, it is treated as a single 
- * dimension array, since the size of each dimeansion is only known in run-time
- */
-typedef TGenSM_actionCell *TGenSM_matrix;
-
-
-/* generic state machine object structure */
-typedef struct
-{
-    TI_HANDLE       hOS;               /**< OS handle */ 
-    TI_HANDLE       hReport;           /**< report handle */ 
-    TGenSM_matrix   tMatrix;           /**< next state/action matrix */
-    TI_UINT32       uStateNum;         /**< Number of states in the matrix */
-    TI_UINT32       uEventNum;         /**< Number of events in the matrix */
-    TI_UINT32       uCurrentState;     /**< Current state */
-    TI_UINT32       uEvent;            /**< Last event sent */
-    void            *pData;            /**< Last event data */
-    TI_BOOL         bEventPending;     /**< Event pending indicator */
-    TI_BOOL         bInAction;         /**< Evenet execution indicator */
-    TI_UINT32       uModuleLogIndex;   /**< Module index to use for printouts */
-    TI_INT8         *pGenSMName;       /**< state machine name */
-    TI_INT8         **pStateDesc;      /**< State description strings */
-    TI_INT8         **pEventDesc;      /**< Event description strings */
-} TGenSM;
-
-TI_HANDLE   genSM_Create (TI_HANDLE hOS);
-void        genSM_Unload (TI_HANDLE hGenSM);
-void        genSM_Init (TI_HANDLE hGenSM, TI_HANDLE hReport);
-void        genSM_SetDefaults (TI_HANDLE hGenSM, TI_UINT32 uStateNum, TI_UINT32 uEventNum,
-                        TGenSM_matrix pMatrix, TI_UINT32 uInitialState, TI_INT8 *pGenSMName, 
-                        TI_INT8 **pStateDesc, TI_INT8 **pEventDesc, TI_UINT32 uModuleLogIndex);
-void        genSM_Event (TI_HANDLE hGenSM, TI_UINT32 uEvent, void *pData);
-TI_UINT32   genSM_GetCurrentState (TI_HANDLE hGenSM);
-
-#endif /* __GENSM_H__ */
-
diff --git a/wl1271/utils/bmtrace_api.h b/wl1271/utils/bmtrace_api.h
deleted file mode 100644
index a4243cd..0000000
--- a/wl1271/utils/bmtrace_api.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * bmtrace_api.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   bmtrace_api.h 
- *  \brief  bmtrace performance tracing module API definition                                  
- *
- *  \see    bmtrace.c
- */
-
-#ifndef __BM_TRACE_API_H
-#define __BM_TRACE_API_H
-
-void            bm_enable(void);
-void            bm_disable(void);
-unsigned long   bm_act_trace_in(void);
-void            bm_act_trace_out(int loc, unsigned long in_ts);
-int             bm_act_register_event(char* module, char* context, char* group, unsigned char level, char* name, char* suffix, int is_param);
-void            bm_init(void);
-int             print_out_buffer(char *buf);
-
-
-#ifdef TIWLAN_BMTRACE
-#define TIWLAN_CLT_LEVEL 1
-#else
-#define TIWLAN_CLT_LEVEL 0
-#endif
-
-#define CL_TRACE_START() \
-	unsigned long in_ts = bm_act_trace_in();
-
-#define CL_TRACE_RESTART_Lx() \
-	in_ts = bm_act_trace_in();
-
-#define CL_TRACE_END(MODULE, CONTEXT, GROUP, LEVEL, SUFFIX) \
-	{ \
-		static int loc = 0; \
-		if (loc==0) \
-			loc = bm_act_register_event(MODULE, CONTEXT, GROUP, LEVEL, (char*)__FUNCTION__, SUFFIX, 0); \
-		bm_act_trace_out(loc, in_ts); \
-	}
-
-	#define CL_TRACE_START_L0() CL_TRACE_START()
-	#define CL_TRACE_END_L0() CL_TRACE_END("KERNEL", "SYS_CALL", "PLATFORM_TEST", 0, "")
-
-#if TIWLAN_CLT_LEVEL == 1
-    #define CL_TRACE_INIT()     bm_init()
-    #define CL_TRACE_ENABLE()   bm_enable()
-    #define CL_TRACE_DISABLE()  bm_disable()
-    #define CL_TRACE_PRINT(buf) print_out_buffer(buf)
-	#define CL_TRACE_START_L1() CL_TRACE_START()
-	#define CL_TRACE_START_L2() 
-	#define CL_TRACE_START_L3() 
-	#define CL_TRACE_START_L4() 
-	#define CL_TRACE_START_L5() 
-    #define CL_TRACE_RESTART()  CL_TRACE_RESTART_Lx()
-	#define CL_TRACE_END_L1(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 1, SUFFIX)
-	#define CL_TRACE_END_L2(MODULE, CONTEXT, GROUP, SUFFIX) 
-	#define CL_TRACE_END_L3(MODULE, CONTEXT, GROUP, SUFFIX) 
-	#define CL_TRACE_END_L4(MODULE, CONTEXT, GROUP, SUFFIX) 
-	#define CL_TRACE_END_L5(MODULE, CONTEXT, GROUP, SUFFIX) 
-#elif TIWLAN_CLT_LEVEL == 2
-    #define CL_TRACE_INIT()     bm_init()
-    #define CL_TRACE_ENABLE()   bm_enable()
-    #define CL_TRACE_DISABLE()  bm_disable()
-    #define CL_TRACE_PRINT(buf) print_out_buffer(buf)
-	#define CL_TRACE_START_L1() CL_TRACE_START()
-	#define CL_TRACE_START_L2() CL_TRACE_START()
-	#define CL_TRACE_START_L3() 
-	#define CL_TRACE_START_L4() 
-	#define CL_TRACE_START_L5() 
-    #define CL_TRACE_RESTART()  CL_TRACE_RESTART_Lx()
-	#define CL_TRACE_END_L1(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 1, SUFFIX)
-	#define CL_TRACE_END_L2(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 2, SUFFIX)
-	#define CL_TRACE_END_L3(MODULE, CONTEXT, GROUP, SUFFIX) 
-	#define CL_TRACE_END_L4(MODULE, CONTEXT, GROUP, SUFFIX) 
-	#define CL_TRACE_END_L5(MODULE, CONTEXT, GROUP, SUFFIX) 
-#elif TIWLAN_CLT_LEVEL == 3
-    #define CL_TRACE_INIT()     bm_init()
-    #define CL_TRACE_ENABLE()   bm_enable()
-    #define CL_TRACE_DISABLE()  bm_disable()
-    #define CL_TRACE_PRINT(buf) print_out_buffer(buf)
-	#define CL_TRACE_START_L1() CL_TRACE_START()
-	#define CL_TRACE_START_L2() CL_TRACE_START()
-	#define CL_TRACE_START_L3() CL_TRACE_START()
-	#define CL_TRACE_START_L4() 
-	#define CL_TRACE_START_L5() 
-    #define CL_TRACE_RESTART()  CL_TRACE_RESTART_Lx()
-	#define CL_TRACE_END_L1(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 1, SUFFIX)
-	#define CL_TRACE_END_L2(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 2, SUFFIX)
-	#define CL_TRACE_END_L3(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 3, SUFFIX)
-	#define CL_TRACE_END_L4(MODULE, CONTEXT, GROUP, SUFFIX) 
-	#define CL_TRACE_END_L5(MODULE, CONTEXT, GROUP, SUFFIX) 
-#elif TIWLAN_CLT_LEVEL == 4
-    #define CL_TRACE_INIT()     bm_init()
-    #define CL_TRACE_ENABLE()   bm_enable()
-    #define CL_TRACE_DISABLE()  bm_disable()
-    #define CL_TRACE_PRINT(buf) print_out_buffer(buf)
-	#define CL_TRACE_START_L1() CL_TRACE_START()
-	#define CL_TRACE_START_L2() CL_TRACE_START()
-	#define CL_TRACE_START_L3() CL_TRACE_START()
-	#define CL_TRACE_START_L4() CL_TRACE_START()
-	#define CL_TRACE_START_L5() 
-    #define CL_TRACE_RESTART()  CL_TRACE_RESTART_Lx()
-	#define CL_TRACE_END_L1(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 1, SUFFIX)
-	#define CL_TRACE_END_L2(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 2, SUFFIX)
-	#define CL_TRACE_END_L3(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 3, SUFFIX)
-	#define CL_TRACE_END_L4(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 4, SUFFIX)
-	#define CL_TRACE_END_L5(MODULE, CONTEXT, GROUP, SUFFIX) 
-#elif TIWLAN_CLT_LEVEL == 5
-    #define CL_TRACE_INIT()     bm_init()
-    #define CL_TRACE_ENABLE()   bm_enable()
-    #define CL_TRACE_DISABLE()  bm_disable()
-    #define CL_TRACE_PRINT(buf) print_out_buffer(buf)
-	#define CL_TRACE_START_L1() CL_TRACE_START()
-	#define CL_TRACE_START_L1() CL_TRACE_START()
-	#define CL_TRACE_START_L2() CL_TRACE_START()
-	#define CL_TRACE_START_L3() CL_TRACE_START()
-	#define CL_TRACE_START_L4() CL_TRACE_START()
-	#define CL_TRACE_START_L5() CL_TRACE_START()
-    #define CL_TRACE_RESTART()  CL_TRACE_RESTART_Lx()
-	#define CL_TRACE_END_L1(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 1, SUFFIX)
-	#define CL_TRACE_END_L2(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 2, SUFFIX)
-	#define CL_TRACE_END_L3(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 3, SUFFIX)
-	#define CL_TRACE_END_L4(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 4, SUFFIX)
-	#define CL_TRACE_END_L5(MODULE, CONTEXT, GROUP, SUFFIX) CL_TRACE_END(MODULE, CONTEXT, GROUP, 5, SUFFIX)
-#else
-    #define CL_TRACE_INIT()   
-    #define CL_TRACE_ENABLE() 
-    #define CL_TRACE_DISABLE()
-    #define CL_TRACE_RESTART() 
-    #define CL_TRACE_PRINT(buf)  
-	#define CL_TRACE_START_L1() 
-	#define CL_TRACE_START_L1() 
-	#define CL_TRACE_START_L2() 
-	#define CL_TRACE_START_L3() 
-	#define CL_TRACE_START_L4() 
-	#define CL_TRACE_START_L5() 
-	#define CL_TRACE_END_L1(MODULE, CONTEXT, GROUP, SUFFIX) 
-	#define CL_TRACE_END_L2(MODULE, CONTEXT, GROUP, SUFFIX) 
-	#define CL_TRACE_END_L3(MODULE, CONTEXT, GROUP, SUFFIX) 
-	#define CL_TRACE_END_L4(MODULE, CONTEXT, GROUP, SUFFIX) 
-	#define CL_TRACE_END_L5(MODULE, CONTEXT, GROUP, SUFFIX) 
-#endif
-
-
-#endif /* __BM_TRACE_API_H */
diff --git a/wl1271/utils/commonTypes.h b/wl1271/utils/commonTypes.h
deleted file mode 100644
index 28e8158..0000000
--- a/wl1271/utils/commonTypes.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * commonTypes.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __COMMON_TYPES_H__
-#define __COMMON_TYPES_H__
-
-/************************************/
-/*      System return values.       */
-/************************************/
-
-typedef enum
-{
-    PARAM_NOT_SUPPORTED         = 2,
-    PARAM_VALUE_NOT_VALID       = 3,
-    CONFIGURATION_NOT_VALID     = 4,
-    NO_SITE_SELECTED_YET        = 5,
-    EXTERNAL_SET_PARAM_DENIED   = 7,
-    EXTERNAL_GET_PARAM_DENIED   = 8,
-    PARAM_MODULE_NUMBER_INVALID = 9,
-    STATION_IS_NOT_RUNNING      = 10,
-    CARD_IS_NOT_INSTALLED       = 11,
-
-    /* QoSMngr */
-    NOT_CONNECTED,
-    TRAFIC_ADM_PENDING,
-    NO_QOS_AP,
-    ADM_CTRL_DISABLE,
-    AC_ALREADY_IN_USE,
-    USER_PRIORITY_NOT_ADMITTED,
-
-
-	COMMAND_PENDING,
-
-    /* Rx Data Filters */
-    RX_NO_AVAILABLE_FILTERS,
-    RX_FILTER_ALREADY_EXISTS,
-    RX_FILTER_DOES_NOT_EXIST,
-    /* Soft Gemini */
-    SG_REJECT_MEAS_SG_ACTIVE,
-    PARAM_ALREADY_CONFIGURED
-
-} systemStatus_e;
-
-#endif /* __COMMON_TYPES_H__ */
-
diff --git a/wl1271/utils/context.c b/wl1271/utils/context.c
deleted file mode 100644
index be71f9a..0000000
--- a/wl1271/utils/context.c
+++ /dev/null
@@ -1,494 +0,0 @@
-/*
- * context.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   context.c 
- *  \brief  The Context-Engine is an OS independent module, which provides the
- *            infrustracture for switching from external contexts to the driver's context.
- *          This includes also the driver task itself (workqueue in Linux), which invokes the 
- *            driver specific handlers in the driver's context.
- *          The OS specific implementation under this module (e.g. task-switching or 
- *            protection-locking) is provided by the OS abstraction layer (osapi.c).
- * 
- *  \see    context.h, osapi.c
- */
-
-
-#define __FILE_ID__  FILE_ID_125
-#include "osApi.h"
-#include "report.h"
-#include "context.h"
-#include "bmtrace_api.h"
-
-
-
-#define MAX_CLIENTS     8   /* Maximum number of clients using context services */
-#define MAX_NAME_SIZE   16  /* Maximum client's name string size */
-
-#ifdef TI_DBG
-typedef struct
-{
-    TI_UINT32       uSize;                  /* Clients' name string size */
-    char            sName [MAX_NAME_SIZE];  /* Clients' name string      */
-} TClientName;
-#endif /* TI_DBG */
-
-/* context module structure */
-typedef struct
-{
-    TI_HANDLE        hOs;
-    TI_HANDLE        hReport;
-
-    TI_BOOL          bContextSwitchRequired;       /* Indicate if the driver should switch to its  */
-                                                   /*   own context or not before handling events  */
-    TI_HANDLE        hProtectionLock;              /* Handle of protection lock used by context clients */
-    TI_UINT32        uNumClients;                  /* Number of registered clients      */
-    TContextCbFunc   aClientCbFunc [MAX_CLIENTS];  /* Clients' callback functions       */
-    TI_HANDLE        aClientCbHndl [MAX_CLIENTS];  /* Clients' callback handles         */
-    TI_BOOL          aClientEnabled[MAX_CLIENTS];  /* Clients' enable/disable flags     */
-    TI_BOOL          aClientPending[MAX_CLIENTS];  /* Clients' pending flags            */
-
-#ifdef TI_DBG
-    TClientName      aClientName   [MAX_CLIENTS];  /* Clients' name string              */
-    TI_UINT32        aRequestCount [MAX_CLIENTS];  /* Clients' schedule requests counter*/
-    TI_UINT32        aInvokeCount  [MAX_CLIENTS];  /* Clients' invocations counter      */
-#endif
-
-} TContext;
-
-
-/** 
- * \fn     context_Create 
- * \brief  Create the module 
- * 
- * Allocate and clear the module object.
- * 
- * \note    
- * \param  hOs      - Handle to Os Abstraction Layer
- * \return Handle of the allocated object 
- * \sa     context_Destroy
- */ 
-TI_HANDLE context_Create (TI_HANDLE hOs)
-{
-    TI_HANDLE hContext;
-
-    /* allocate module object */
-    hContext = os_memoryAlloc (hOs, sizeof(TContext));
-
-    if (!hContext)
-    {
-        WLAN_OS_REPORT (("context_Create():  Allocation failed!!\n"));
-        return NULL;
-    }
-
-    os_memoryZero (hOs, hContext, (sizeof(TContext)));
-
-    return (hContext);
-}
-
-
-/** 
- * \fn     context_Destroy
- * \brief  Destroy the module. 
- * 
- * Free the module memory.
- * 
- * \note   
- * \param  hContext - The module object
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     context_Create
- */ 
-TI_STATUS context_Destroy (TI_HANDLE hContext)
-{
-    TContext *pContext = (TContext *)hContext;
-
-    /* Destroy the protection handle */
-    os_protectDestroy (pContext->hOs, pContext->hProtectionLock);
-
-    /* free module object */
-    os_memoryFree (pContext->hOs, pContext, sizeof(TContext));
-
-    return TI_OK;
-}
-
-
-/** 
- * \fn     context_Init 
- * \brief  Init required handles 
- * 
- * Init required handles.
- * 
- * \note    
- * \param  hContext  - The queue object
- * \param  hOs       - Handle to Os Abstraction Layer
- * \param  hReport   - Handle to report module
- * \return void        
- * \sa     
- */ 
-void context_Init (TI_HANDLE hContext, TI_HANDLE hOs, TI_HANDLE hReport)
-{
-    TContext *pContext = (TContext *)hContext;
-
-    pContext->hOs     = hOs;
-    pContext->hReport = hReport;
-
-    /* Create the module's protection lock and save its handle */
-    pContext->hProtectionLock = os_protectCreate (pContext->hOs);
-}
-
-
-/** 
- * \fn     context_SetDefaults
- * \brief  Configure module with default settings
- * 
- * Set default setting which indicates if the driver should switch to 
- *     its own context or not before handling events
- * 
- * \note   
- * \param  hContext           - The module's object                                          
- * \param  pContextInitParams - The module's init parameters                              
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     
- */ 
-TI_STATUS context_SetDefaults (TI_HANDLE hContext, TContextInitParams *pContextInitParams)
-{
-    TContext *pContext = (TContext *)hContext;
-
-    /* Set parameters */
-    pContext->bContextSwitchRequired = pContextInitParams->bContextSwitchRequired;
-
-    return TI_OK;
-}
-
-
-/** 
- * \fn     context_RegisterClient
- * \brief  Save client's parameters
- * 
- * This function is used by the Context clients in their init process, for registering 
- *   their information, 
- * This includes their callback function that should be invoked from the driver context
- *   when they are pending. 
- * 
- * \note   
- * \param  hContext - The module handle
- * \param  fCbFunc  - The client's callback function.
- * \param  hCbHndl  - The client's callback function handle.
- * \param  bEnable  - TRUE = Enabled.
- * \return TI_UINT32 - The index allocated for the client
- * \sa     
- */ 
-TI_UINT32 context_RegisterClient (TI_HANDLE       hContext,
-                                  TContextCbFunc  fCbFunc,
-                                  TI_HANDLE       hCbHndl,
-                                  TI_BOOL         bEnable,
-                                  char           *sName,
-                                  TI_UINT32       uNameSize)
-{
-    TContext *pContext = (TContext *)hContext;
-    TI_UINT32 uClientId = pContext->uNumClients;
-
-    /* If max number of clients is exceeded, report error and exit. */
-    if (uClientId == MAX_CLIENTS)
-    {
-        TRACE0(pContext->hReport, REPORT_SEVERITY_ERROR , "context_RegisterClient() MAX_CLIENTS limit exceeded!!\n");
-        return 0;
-    }
-
-    /* Save the new client's parameters. */
-    pContext->aClientCbFunc[uClientId]  = fCbFunc;
-    pContext->aClientCbHndl[uClientId]  = hCbHndl;
-    pContext->aClientEnabled[uClientId] = bEnable;
-    pContext->aClientPending[uClientId] = TI_FALSE;
-
-#ifdef TI_DBG
-    if (uNameSize <= MAX_NAME_SIZE)
-    {
-        os_memoryCopy(pContext->hOs,
-                      (void *)(pContext->aClientName[uClientId].sName),
-                      (void *)sName,
-                      uNameSize);
-        pContext->aClientName[uClientId].uSize = uNameSize;
-    }
-    else
-    {
-        TRACE0(pContext->hReport, REPORT_SEVERITY_ERROR , "context_RegisterClient() MAX_NAME_SIZE limit exceeded!\n");
-    }
-#endif /* TI_DBG */
-
-    /* Increment clients number and return new client ID. */
-    pContext->uNumClients++;
-
-    TRACE2(pContext->hReport, REPORT_SEVERITY_INIT , "context_RegisterClient(): Client=, ID=%d, enabled=%d\n", uClientId, bEnable);
-
-    return uClientId;
-}
-
-
-/** 
- * \fn     context_RequestSchedule
- * \brief  Handle client's switch to driver's context.
- * 
- * This function is called by a client from external context event.
- * It sets the client's Pending flag and requests the driver's task scheduling.
- * Thus, the client's callback will be called afterwards from the driver context.
- * 
- * \note   
- * \param  hContext   - The module handle
- * \param  uClientId  - The client's index
- * \return void 
- * \sa     context_DriverTask
- */ 
-void context_RequestSchedule (TI_HANDLE hContext, TI_UINT32 uClientId)
-{
-    TContext *pContext = (TContext *)hContext;
-
-#ifdef TI_DBG
-    pContext->aRequestCount[uClientId]++; 
-    TRACE3(pContext->hReport, REPORT_SEVERITY_INFORMATION , "context_RequestSchedule(): Client=, ID=%d, enabled=%d, pending=%d\n", uClientId, pContext->aClientEnabled[uClientId], pContext->aClientPending[uClientId]);
-#endif /* TI_DBG */
-
-    /* Set client's Pending flag */
-    pContext->aClientPending[uClientId] = TI_TRUE;
-
-    /* Prevent system from going to sleep */
-    os_wake_lock(pContext->hOs);
-
-    /* 
-     * If configured to switch context, request driver task scheduling.
-     * Else (context switch not required) call the driver task directly. 
-     */
-    if (pContext->bContextSwitchRequired)
-    {
-        if (os_RequestSchedule(pContext->hOs) != TI_OK)
-            os_wake_unlock(pContext->hOs);
-    }
-    else
-    {
-        context_DriverTask(hContext);
-        os_wake_unlock(pContext->hOs);
-    }
-}
-
-
-/** 
- * \fn     context_DriverTask
- * \brief  The driver task
- * 
- * This function is the driver's main task that always runs in the driver's 
- * single context, scheduled through the OS (the driver's workqueue in Linux). 
- * Only one instantiation of this task may run at a time!
- * 
- * \note   
- * \param  hContext   - The module handle
- * \return void 
- * \sa     context_RequestSchedule
- */ 
-void context_DriverTask (TI_HANDLE hContext)
-{
-    TContext       *pContext = (TContext *)hContext;
-    TContextCbFunc  fCbFunc;
-    TI_HANDLE       hCbHndl;
-    TI_UINT32       i;
-    CL_TRACE_START_L1();
-
-    TRACE0(pContext->hReport, REPORT_SEVERITY_INFORMATION , "context_DriverTask():\n");
-
-    /* For all registered clients do: */
-    for (i = 0; i < pContext->uNumClients; i++)
-    {
-        /* If client is pending and enabled */
-        if (pContext->aClientPending[i]  &&  pContext->aClientEnabled[i])
-        {
-#ifdef TI_DBG
-            pContext->aInvokeCount[i]++;
-            TRACE1(pContext->hReport, REPORT_SEVERITY_INFORMATION , "Invoking - Client=, ID=%d\n", i);
-#endif /* TI_DBG */
-
-            /* Clear client's pending flag */
-            pContext->aClientPending[i] = TI_FALSE;
-
-            /* Call client's callback function */
-            fCbFunc = pContext->aClientCbFunc[i];
-            hCbHndl = pContext->aClientCbHndl[i];
-            fCbFunc(hCbHndl);
-        }
-    }
-
-    CL_TRACE_END_L1("tiwlan_drv.ko", "CONTEXT", "TASK", "");
-}
-
-
-/** 
- * \fn     context_EnableClient / context_DisableClient
- * \brief  Enable a specific client activation
- * 
- * Called by the driver main when needed to enble/disable a specific event handling.
- * The Enable function also schedules the driver-task if the specified client is pending.
- * 
- * \note   
- * \param  hContext   - The module handle
- * \param  uClientId  - The client's index
- * \return void 
- * \sa     context_DriverTask
- */ 
-void context_EnableClient (TI_HANDLE hContext, TI_UINT32 uClientId)
-{
-    TContext *pContext = (TContext *)hContext;
-
-#ifdef TI_DBG
-    if (pContext->aClientEnabled[uClientId])
-    {
-        TRACE0(pContext->hReport, REPORT_SEVERITY_ERROR , "context_EnableClient() Client  already enabled!!\n");
-        return;
-    }
-    TRACE3(pContext->hReport, REPORT_SEVERITY_INFORMATION , "context_EnableClient(): Client=, ID=%d, enabled=%d, pending=%d\n", uClientId, pContext->aClientEnabled[uClientId], pContext->aClientPending[uClientId]);
-#endif /* TI_DBG */
-
-    /* Enable client */
-    pContext->aClientEnabled[uClientId] = TI_TRUE;
-
-    /* If client is pending, schedule driver task */
-    if (pContext->aClientPending[uClientId])
-    {
-        /* Prevent system from going to sleep */
-        os_wake_lock(pContext->hOs);
-
-        /* 
-         * If configured to switch context, request driver task scheduling.
-         * Else (context switch not required) call the driver task directly. 
-         */
-        if (pContext->bContextSwitchRequired)
-        {
-            if (os_RequestSchedule(pContext->hOs) != TI_OK)
-                os_wake_unlock(pContext->hOs);
-        }
-        else
-        {
-            context_DriverTask(hContext);
-            os_wake_unlock(pContext->hOs);
-        }
-    }
-}
-
-void context_DisableClient (TI_HANDLE hContext, TI_UINT32 uClientId)
-{
-    TContext *pContext = (TContext *)hContext;
-
-#ifdef TI_DBG
-    if (!pContext->aClientEnabled[uClientId])
-    {
-        TRACE0(pContext->hReport, REPORT_SEVERITY_ERROR , "context_DisableClient() Client  already disabled!!\n");
-        return;
-    }
-    TRACE3(pContext->hReport, REPORT_SEVERITY_INFORMATION , "context_DisableClient(): Client=, ID=%d, enabled=%d, pending=%d\n", uClientId, pContext->aClientEnabled[uClientId], pContext->aClientPending[uClientId]);
-#endif /* TI_DBG */
-
-    /* Disable client */
-    pContext->aClientEnabled[uClientId] = TI_FALSE;
-}
-
-
-/** 
- * \fn     context_EnterCriticalSection / context_LeaveCriticalSection
- * \brief  Lock / Unlock context related critical sections
- * 
- * The context clients should use these functions for protecting their critical sections
- *   when handling context transition to driver context.
- * 
- * \note   
- * \param  hContext   - The module handle
- * \return void 
- * \sa     
- */ 
-void context_EnterCriticalSection (TI_HANDLE hContext)
-{
-    TContext *pContext = (TContext *)hContext;
-
-    TRACE0(pContext->hReport, REPORT_SEVERITY_INFORMATION , "context_EnterCriticalSection():\n");
-
-    /* Start critical section protection */
-    os_protectLock (pContext->hOs, pContext->hProtectionLock);
-}
-
-void context_LeaveCriticalSection (TI_HANDLE hContext)
-{
-    TContext *pContext = (TContext *)hContext;
-
-    TRACE0(pContext->hReport, REPORT_SEVERITY_INFORMATION , "context_LeaveCriticalSection():\n");
-
-    /* Stop critical section protection */
-    os_protectUnlock (pContext->hOs, pContext->hProtectionLock);
-}
-
-
-/** 
- * \fn     context_Print
- * \brief  Print module information
- * 
- * Print the module's clients parameters.
- * 
- * \note   
- * \param  hContext - The queue object
- * \return void
- * \sa     
- */ 
-
-#ifdef TI_DBG
-
-void context_Print(TI_HANDLE hContext)
-{
-#ifdef REPORT_LOG
-    TContext *pContext = (TContext *)hContext;
-    TI_UINT32 i;
-
-    WLAN_OS_REPORT(("context_Print():  %d Clients Registered:\n", pContext->uNumClients));
-    WLAN_OS_REPORT(("=======================================\n"));
-    WLAN_OS_REPORT(("bContextSwitchRequired = %d\n", pContext->bContextSwitchRequired));
-
-    for (i = 0; i < pContext->uNumClients; i++)
-    {
-        WLAN_OS_REPORT(("Client %d - %s: CbFunc=0x%x, CbHndl=0x%x, Enabled=%d, Pending=%d, Requests=%d, Invoked=%d\n",
-                        i,
-                        pContext->aClientName[i].sName,
-                        pContext->aClientCbFunc[i],
-                        pContext->aClientCbHndl[i],
-                        pContext->aClientEnabled[i],
-                        pContext->aClientPending[i],
-                        pContext->aRequestCount[i],
-                        pContext->aInvokeCount[i] ));
-    }
-#endif
-}
-
-#endif /* TI_DBG */
diff --git a/wl1271/utils/context.h b/wl1271/utils/context.h
deleted file mode 100644
index f3eb855..0000000
--- a/wl1271/utils/context.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * context.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-/** \file   context.h 
- *  \brief  context module header file.                                  
- *
- *  \see    context.c
- */
-
-#ifndef _CONTEXT_H_
-#define _CONTEXT_H_
-
-
-
-/* The callback function type for context clients */
-typedef void (*TContextCbFunc)(TI_HANDLE hCbHndl);
-
-/* The context init parameters */
-typedef struct
-{
-    /* Indicate if the driver should switch to its own context or not before handling events */
-    TI_BOOL   bContextSwitchRequired;  
-} TContextInitParams;
-
-
-
-/* External Functions Prototypes */
-/* ============================= */
-TI_HANDLE context_Create          (TI_HANDLE hOs);
-TI_STATUS context_Destroy         (TI_HANDLE hContext);
-void      context_Init            (TI_HANDLE hContext, TI_HANDLE hOs, TI_HANDLE hReport);
-TI_STATUS context_SetDefaults     (TI_HANDLE hContext, TContextInitParams *pContextInitParams);
-
-TI_UINT32 context_RegisterClient (TI_HANDLE       hContext,
-                                  TContextCbFunc  fCbFunc,
-                                  TI_HANDLE       hCbHndl,
-                                  TI_BOOL         bEnable,
-                                  char           *sName,
-                                  TI_UINT32       uNameSize);
-
-void      context_RequestSchedule (TI_HANDLE hContext, TI_UINT32 uClientId);
-void      context_DriverTask      (TI_HANDLE hContext);
-void      context_EnableClient    (TI_HANDLE hContext, TI_UINT32 uClientId);
-void      context_DisableClient   (TI_HANDLE hContext, TI_UINT32 uClientId);
-
-void      context_EnterCriticalSection (TI_HANDLE hContext);
-void      context_LeaveCriticalSection (TI_HANDLE hContext);
-void      context_DisableClient   (TI_HANDLE hContext, TI_UINT32 uClientId);
-void      context_EnableClient    (TI_HANDLE hContext, TI_UINT32 uClientId);
-#ifdef TI_DBG
-void      context_Print           (TI_HANDLE hContext);
-#endif /* TI_DBG */
-
-
-
-#endif  /* _CONTEXT_H_ */
-
-
diff --git a/wl1271/utils/freq.c b/wl1271/utils/freq.c
deleted file mode 100644
index b432812..0000000
--- a/wl1271/utils/freq.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * freq.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  freq.c
- *  \brief frequency to channel (and vice versa) conversion implementation
- *
- *  \see   freq.h
- */
-
-
-#define __FILE_ID__  FILE_ID_126
-#include "osTIType.h"
-
-#define     CHAN_FREQ_TABLE_SIZE        (sizeof(ChanFreq) / sizeof(CHAN_FREQ))
-
-typedef struct {
-    TI_UINT8       chan;
-    TI_UINT32      freq;
-} CHAN_FREQ;
-
-static CHAN_FREQ ChanFreq[] = {
-    {1,  2412000},
-    {2,  2417000},
-    {3,  2422000},
-    {4,  2427000},
-    {5,  2432000},
-    {6,  2437000},
-    {7,  2442000},
-    {8,  2447000},
-    {9,  2452000},
-    {10, 2457000},
-    {11, 2462000},
-    {12, 2467000},
-    {13, 2472000}, 
-    {14, 2484000}, 
-    {34, 5170000},
-    {36, 5180000},
-    {38, 5190000},
-    {40, 5200000},
-    {42, 5210000},
-    {44, 5220000},
-    {46, 5230000}, 
-    {48, 5240000},
-    {52, 5260000},
-    {56, 5280000},
-    {60, 5300000},
-    {64, 5320000},
-    {100,5500000},
-    {104,5520000},
-    {108,5540000},
-    {112,5560000},
-    {116,5580000},
-    {120,5600000},
-    {124,5620000},
-    {128,5640000},
-    {132,5660000},
-    {136,5680000},
-    {140,5700000},
-    {149,5745000},
-    {153,5765000},
-    {157,5785000},
-    {161,5805000}
-  };
-
-TI_UINT8 Freq2Chan (TI_UINT32 freq)
-{
-    TI_UINT32   i;
-
-    for (i = 0; i < CHAN_FREQ_TABLE_SIZE; i++)
-    {
-        if (ChanFreq[ i ].freq == freq)
-        {
-            return ChanFreq[ i ].chan;
-        }
-    }
-
-    return 0;
-}
-
-
-TI_UINT32 Chan2Freq (TI_UINT8 chan)
-{
-    TI_UINT32   i;
-
-    for (i = 0; i < CHAN_FREQ_TABLE_SIZE; i++)
-    {
-        if (ChanFreq[ i ].chan == chan)
-        {
-            return ChanFreq[ i ].freq;
-        }
-    }
-
-    return 0;
-}
-
diff --git a/wl1271/utils/freq.h b/wl1271/utils/freq.h
deleted file mode 100644
index e5d6449..0000000
--- a/wl1271/utils/freq.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * freq.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file  freq.h
- *  \brief frequency to channel (and vice versa) conversion
- *
- *  \see   freq.c
- */
-
-
-#ifndef __FREQ_H__
-#define __FREQ_H__
-
-#include "osTIType.h"
-
-TI_UINT8 Freq2Chan (TI_UINT32 freq);
-TI_UINT32 Chan2Freq (TI_UINT8 chan);
-
-#endif /* __FREQ_H__ */
-
diff --git a/wl1271/utils/fsm.c b/wl1271/utils/fsm.c
deleted file mode 100644
index aca1b7a..0000000
--- a/wl1271/utils/fsm.c
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * fsm.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file fsm.c
- *  \brief finite state machine source code
- *
- *  \see fsm.h
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	fsm.c													   */
-/*    PURPOSE:	Finite State Machine source code						   */
-/*																	 	   */
-/***************************************************************************/
-
-#define __FILE_ID__  FILE_ID_127
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "fsm.h"
-
-/* Constants */
-
-/* Enumerations */
-
-/* Typedefs */
-
-/* Structures */
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-/**
-*
-* fsm_Init  - Initialize the FSM structure
-*
-* \b Description: 
-*
-* Init The FSM structure. If matrix argument is NULL, allocate memory for
-* new matrix.
-*
-* \b ARGS:
-*
-*  O   - pFsm - the generated FSM module  \n
-*  I   - noOfStates - Number of states in the module \n
-*  I   - noOfStates - Number of events in the module \n
-*  I/O - matrix - the state event matrix
-*  I   - transFunc - Transition finction for the state machine \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure 
-*
-* \sa fsm_Event
-*/
-TI_STATUS fsm_Create(TI_HANDLE				hOs,
-				fsm_stateMachine_t		**pFsm,
-				TI_UINT8					MaxNoOfStates,
-				TI_UINT8					MaxNoOfEvents)
-{
-	/* check for perliminary conditions */
-	if ((pFsm == NULL) || (MaxNoOfStates == 0) || (MaxNoOfEvents == 0))
-	{
-		return TI_NOK;
-	}
-
-	/* allocate memory for FSM context */
-	*pFsm = (fsm_stateMachine_t *)os_memoryAlloc(hOs, sizeof(fsm_stateMachine_t));
-	if (*pFsm == NULL)
-	{
-		return TI_NOK;
-	}
-	os_memoryZero(hOs, (*pFsm), sizeof(fsm_stateMachine_t));
-
-	/* allocate memory for FSM matrix */
-	(*pFsm)->stateEventMatrix = (fsm_Matrix_t)os_memoryAlloc(hOs, MaxNoOfStates * MaxNoOfEvents * sizeof(fsm_actionCell_t));
-	if ((*pFsm)->stateEventMatrix == NULL)
-	{
-		os_memoryFree(hOs, *pFsm, sizeof(fsm_stateMachine_t));
-		return TI_NOK;
-	}
-	os_memoryZero(hOs, (*pFsm)->stateEventMatrix, 
-		(MaxNoOfStates * MaxNoOfEvents * sizeof(fsm_actionCell_t)));
-	/* update pFsm structure with parameters */
-	(*pFsm)->MaxNoOfStates = MaxNoOfStates;
-	(*pFsm)->MaxNoOfEvents = MaxNoOfEvents;
-
-	return(TI_OK);
-}
-
-/**
-*
-* fsm_Unload  - free all memory allocated to FSM structure
-*
-* \b Description: 
-*
-* Unload the FSM structure.
-*
-* \b ARGS:
-*
-*  O   - pFsm - the generated FSM module  \n
-*  I   - noOfStates - Number of states in the module \n
-*  I   - noOfStates - Number of events in the module \n
-*  I/O - matrix - the state event matrix
-*  I   - transFunc - Transition finction for the state machine \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure 
-*
-* \sa fsm_Event
-*/
-TI_STATUS fsm_Unload(TI_HANDLE				hOs,
-				fsm_stateMachine_t		*pFsm)
-{
-	/* check for perliminary conditions */
-	if (pFsm == NULL)
-	{
-		return TI_NOK;
-	}
-
-	/* free memory of FSM matrix */
-	if (pFsm->stateEventMatrix != NULL)
-	{
-		os_memoryFree(hOs, pFsm->stateEventMatrix,
-					  pFsm->MaxNoOfStates * pFsm->MaxNoOfEvents * sizeof(fsm_actionCell_t));
-	}
-
-	/* free memory for FSM context (no need to check for null) */
-	os_memoryFree(hOs, pFsm, sizeof(fsm_stateMachine_t));
-
-	return(TI_OK);
-}
-
-/**
-*
-* fsm_Init  - Initialize the FSM structure
-*
-* \b Description: 
-*
-* Init The FSM structure. If matrix argument is NULL, allocate memory for
-* new matrix.
-*
-* \b ARGS:
-*
-*  O   - pFsm - the generated FSM module  \n
-*  I   - noOfStates - Number of states in the module \n
-*  I   - noOfStates - Number of events in the module \n
-*  I/O - matrix - the state event matrix
-*  I   - transFunc - Transition finction for the state machine \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure 
-*
-* \sa fsm_Event
-*/
-TI_STATUS fsm_Config(fsm_stateMachine_t	*pFsm,
-				  fsm_Matrix_t			pMatrix,
-				  TI_UINT8					ActiveNoOfStates,
-				  TI_UINT8					ActiveNoOfEvents,
-				  fsm_eventActivation_t	transFunc,
-				  TI_HANDLE				hOs)
-{
-	/* check for perliminary conditions */
-	if ((pFsm == NULL) ||
-		(pMatrix == NULL))
-	{
-		return TI_NOK;
-	}
-
-	if ((ActiveNoOfStates > pFsm->MaxNoOfStates) || 
-		(ActiveNoOfEvents > pFsm->MaxNoOfEvents))
-	{
-		return TI_NOK;
-	}
-
-	/* copy matrix to FSM context */
-	os_memoryCopy(hOs, (void *)pFsm->stateEventMatrix, (void *)pMatrix,
-				  ActiveNoOfStates * ActiveNoOfEvents * sizeof(fsm_actionCell_t));
-
-	/* update pFsm structure with parameters */
-	pFsm->ActiveNoOfStates = ActiveNoOfStates;
-	pFsm->ActiveNoOfEvents = ActiveNoOfEvents;
-	pFsm->transitionFunc = transFunc;
-	return(TI_OK);
-}
-
-/**
-*
-* fsm_Event  - perform event transition in the matrix
-*
-* \b Description: 
-*
-* Perform event transition in the matrix
-*
-* \b ARGS:
-*
-*  I   - pFsm - the generated FSM module  \n
-*  I/O - currentState - current state of the SM \n
-*  I   - event - event causing transition \n
-*  I   - pData - data for activation function \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure 
-*
-* \sa fsm_Init
-*/
-TI_STATUS fsm_Event(fsm_stateMachine_t		*pFsm,
-				 TI_UINT8					*currentState,
-				 TI_UINT8					event,
-				 void					*pData)
-{
-	TI_UINT8		oldState;
-	TI_STATUS		status;
-
-	/* check for FSM existance */
-	if (pFsm == NULL)
-	{
-		return TI_NOK;
-	}
-
-	/* boundary check */
-	if ((*currentState >= pFsm->ActiveNoOfStates) || (event >= pFsm->ActiveNoOfEvents))
-	{
-		return TI_NOK;
-	}
-	
-	oldState = *currentState;
-	/* update current state */
-	*currentState = pFsm->stateEventMatrix[(*currentState * pFsm->ActiveNoOfEvents) + event].nextState;
-
-	/* activate transition function */
-    if ((*pFsm->stateEventMatrix[(oldState * pFsm->ActiveNoOfEvents) + event].actionFunc) == NULL) 
-    {
-        return TI_NOK;
-    }
-	status = (*pFsm->stateEventMatrix[(oldState * pFsm->ActiveNoOfEvents) + event].actionFunc)(pData);
-
-	return status;
-}
-
-
-/**
-*
-* fsm_GetNextState  - Retrun the next state for a given current state and an event.
-*
-* \b Description: 
-*
-* Retrun the next state for a given current state and an event.
-*
-* \b ARGS:
-*
-*  I   - pFsm - the generated FSM module  \n
-*  I   - currentState - current state of the SM \n
-*  I   - event - event causing transition \n
-*  O   - nextState - returned next state \n
-*
-* \b RETURNS:
-*
-*  TI_OK on success, TI_NOK on failure 
-*
-* \sa 
-*/
-TI_STATUS fsm_GetNextState(fsm_stateMachine_t		*pFsm,
-						TI_UINT8					currentState,
-						TI_UINT8					event,
-						TI_UINT8					*nextState)
-{
-	if (pFsm != NULL)
-	{
-		if ((currentState < pFsm->ActiveNoOfStates) && (event < pFsm->ActiveNoOfEvents))
-		{
-			*nextState = pFsm->stateEventMatrix[(currentState * pFsm->ActiveNoOfEvents) + event].nextState;
-			return(TI_OK);
-		}
-	}
-	
-	return(TI_NOK);
-}
-
-TI_STATUS action_nop(void *pData)
-{
-	return TI_OK;
-}
diff --git a/wl1271/utils/fsm.h b/wl1271/utils/fsm.h
deleted file mode 100644
index 7bea2da..0000000
--- a/wl1271/utils/fsm.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * fsm.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file fsm.h
- *  \brief finite state machine header file
- *
- *  \see fsm.c
- */
-
-
-/***************************************************************************/
-/*																		   */
-/*		MODULE:	fsm.h													   */
-/*    PURPOSE:	Finite State Machine API								   */
-/*																	 	   */
-/***************************************************************************/
-
-#ifndef __FSM_H__
-#define __FSM_H__
-
-#include "tidef.h"
-#include "commonTypes.h"
-
-/* Constants */
-#define	MAX_DESC_STRING_LEN		64		
-
-
-/* Enumerations */
-
-/* Typedefs */
-
-/** state transition function */
-typedef	TI_STATUS (*fsm_eventActivation_t)(TI_UINT8 *currState, TI_UINT8 event, void* data);
-
-/** action function type definition */
-typedef TI_STATUS (*fsm_Action_t)(void* pData);
-
-/* Structures */
-
-/* State\Event cell */
-typedef  struct
-{
-	TI_UINT8			nextState;		/**< next state in transition */
-	fsm_Action_t	actionFunc;		/**< action function */
-} fsm_actionCell_t;
-
-/** matrix type */
-typedef	fsm_actionCell_t*		fsm_Matrix_t;
-
-/** general FSM structure */
-typedef struct
-{
-	fsm_Matrix_t			stateEventMatrix;		/**< State\Event matrix */
-	TI_UINT8					MaxNoOfStates;			/**< Max Number of states in the matrix */
-	TI_UINT8					MaxNoOfEvents;			/**< Max Number of events in the matrix */
-	TI_UINT8					ActiveNoOfStates;		/**< Active Number of states in the matrix */
-	TI_UINT8					ActiveNoOfEvents;		/**< Active Number of events in the matrix */
-	fsm_eventActivation_t	transitionFunc;			/**< State transition function */
-} fsm_stateMachine_t;
-
-/* External data definitions */
-
-/* External functions definitions */
-
-/* Function prototypes */
-
-TI_STATUS fsm_Create(TI_HANDLE				hOs,
-				fsm_stateMachine_t		**pFsm,
-				TI_UINT8					MaxNoOfStates,
-				TI_UINT8					MaxNoOfEvents);
-
-TI_STATUS fsm_Unload(TI_HANDLE				hOs,
-				fsm_stateMachine_t		*pFsm);
-
-TI_STATUS fsm_Config(fsm_stateMachine_t	*pFsm,
-				  fsm_Matrix_t			pMatrix,
-				  TI_UINT8					ActiveNoOfStates,
-				  TI_UINT8					ActiveNoOfEvents,
-				  fsm_eventActivation_t	transFunc,
-				  TI_HANDLE				hOs);
-
-TI_STATUS fsm_Event(fsm_stateMachine_t		*pFsm,
-				 TI_UINT8					*currentState,
-				 TI_UINT8					event,
-				 void					*pData);
-
-TI_STATUS fsm_GetNextState(fsm_stateMachine_t		*pFsm,
-						TI_UINT8					currentState,
-						TI_UINT8					event,
-						TI_UINT8					*nextState);
-
-
-TI_STATUS action_nop(void *pData);
-
-
-#endif /* __FSM_H__ */
diff --git a/wl1271/utils/mem.c b/wl1271/utils/mem.c
deleted file mode 100644
index b7cdbbc..0000000
--- a/wl1271/utils/mem.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * mem.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#define __FILE_ID__  FILE_ID_129
-#include "tidef.h"
-#include "osApi.h"
-
-
-#define MEM_BLOCK_START  (('m'<<24) | ('e'<<16) | ('m'<<8) | 's')
-#define MEM_BLOCK_END    (('m'<<24) | ('e'<<16) | ('m'<<8) | 'e')
-
-
-typedef struct
-{
-    TI_HANDLE hOs;
-    TI_UINT32 uMaxAllocated;
-    TI_UINT32 uCurAllocated;
-
-} TMemMng;
-
-
-typedef struct
-{
-    TI_UINT32 size;
-    TI_UINT32 signature;
-
-} TMemBlock;
-
-
-
-/****************************************************************************************
- *                                                                                      *
- *                      OS Memory API                                                   *       
- *                                                                                      *
- ****************************************************************************************/
-TI_HANDLE mem_Create (TI_HANDLE hOs)
-{
-    TMemMng *pMemMng = (TMemMng *)os_memoryAlloc (hOs, sizeof(TMemMng));
-
-    if (pMemMng != NULL) 
-    {
-        pMemMng->hOs = hOs;
-        pMemMng->uCurAllocated = 0;
-        pMemMng->uMaxAllocated = 0;
-    }
-
-    return (TI_HANDLE)pMemMng;
-}
-
-
-TI_STATUS mem_Destroy (TI_HANDLE hMem)
-{
-    TMemMng *pMemMng = (TMemMng *)hMem;
-
-    if (pMemMng != NULL) 
-    {
-        os_memoryFree (pMemMng->hOs, (void *)pMemMng, sizeof(TMemMng));
-    }
-
-    return TI_OK;
-}
-
-
-
-/****************************************************************************************
- *                        os_memoryAlloc()                                 
- ****************************************************************************************
-DESCRIPTION:    Allocates resident (nonpaged) system-space memory.
-
-ARGUMENTS:      OsContext   - our adapter context.
-                Size        - Specifies the size, in bytes, to be allocated.
-
-RETURN:         Pointer to the allocated memory.
-                NULL if there is insufficient memory available.
-
-NOTES:          With the call to vmalloc it is assumed that this function will
-                never be called in an interrupt context. vmalloc has the potential to
-                sleep the caller while waiting for memory to become available.
-
-*****************************************************************************************/
-void* mem_Alloc (TI_HANDLE hMem, TI_UINT32 size)
-{
-    TMemMng *pMemMng = (TMemMng *)hMem;
-    TMemBlock *pMemBlock;
-    TI_UINT32 total = size + sizeof(TMemBlock) + sizeof(TI_UINT32);
-
-  #ifdef TI_MEM_ALLOC_TRACE
-    os_printf ("mem_Alloc(0x%p, %lu) : %u\n", hMem, size, uTotalSize);
-  #endif
-
-    pMemBlock = (TMemBlock *) os_memoryAlloc (pMemMng->hOs, total);
-    pMemBlock->size = size;
-    pMemBlock->signature = MEM_BLOCK_START;
-    *(TI_UINT32 *)((TI_UINT8 *)pMemBlock + total - sizeof(TI_UINT32)) = MEM_BLOCK_END;
-
-    pMemMng->uCurAllocated += total;
-    if (pMemMng->uMaxAllocated < pMemMng->uCurAllocated) 
-    {
-        pMemMng->uMaxAllocated = pMemMng->uCurAllocated;
-    }
-
-    return (void*)((TI_UINT8 *)pMemBlock + sizeof(TMemBlock));
-}
-
-
-/****************************************************************************************
- *                        os_memoryCAlloc()                                 
- ****************************************************************************************
-DESCRIPTION:    Allocates an array in memory with elements initialized to 0.
-
-ARGUMENTS:      OsContext   -   our adapter context.
-                Number      -   Number of elements
-                Size        -   Length in bytes of each element
-
-RETURN:         None
-
-NOTES:          
-*****************************************************************************************/
-void* mem_Calloc (TI_HANDLE hMem, TI_UINT32 number, TI_UINT32 size)
-{
-    TMemMng *pMemMng = (TMemMng *)hMem;
-    void *ptr;
-    TI_UINT32 total;
-
-    total = number * size;
-
- #ifdef TI_MEM_ALLOC_TRACE
-    os_printf ("os_memoryCAlloc(%u, %u) : %u\n", number, size, total);
- #endif
-
-    ptr = mem_Alloc (hMem, total);
-
-    if (ptr != NULL)
-    {
-        os_memorySet (pMemMng->hOs, ptr, 0, total);
-    }
-
-    return ptr;
-}
-
-
-
-/****************************************************************************************
- *                        os_memoryFree()                                 
- ****************************************************************************************
-DESCRIPTION:    This function releases a block of memory previously allocated with the
-                os_memoryAlloc function.
-
-
-ARGUMENTS:      OsContext   -   our adapter context.
-                pMemPtr     -   Pointer to the base virtual address of the allocated memory.
-                                This address was returned by the os_memoryAlloc function.
-                Size        -   Specifies the size, in bytes, of the memory block to be released.
-                                This parameter must be identical to the Length that was passed to
-                                os_memoryAlloc.
-
-RETURN:         None
-
-NOTES:          
-*****************************************************************************************/
-void mem_Free (TI_HANDLE hMem, void* ptr, TI_UINT32 size)
-{
-    TMemMng *pMemMng = (TMemMng *)hMem;
-    TMemBlock *pMemBlock = (TMemBlock *)((TI_UINT8 *)ptr - sizeof(TMemBlock));
-   
-  #ifdef TI_MEM_ALLOC_TRACE
-    os_printf ("os_memoryFree(%p, %u)\n", ptr, size);
-  #endif
-
-    if (pMemBlock->signature != MEM_BLOCK_START)
-    {
-      #ifdef TI_MEM_ALLOC_TRACE
-        os_printf ("os_memoryFree: memory block signature is incorrect - 0x%x\n", pMemBlock->signature);
-      #endif
-    }
-
-    else
-    {
-        *(TI_UINT8 *)(&pMemBlock->signature) = '~';
-        if (*(TI_UINT32 *)((TI_UINT8 *)pMemBlock + pMemBlock->size + sizeof(TMemBlock)) != MEM_BLOCK_END)
-        {
-          #ifdef TI_MEM_ALLOC_TRACE
-            os_printf ("os_memoryFree: memory block corruption, size - %u\n", pMemBlock->size);
-          #endif
-        }
-
-        os_memoryFree (pMemMng->hOs, pMemBlock, pMemBlock->signature + sizeof(TMemBlock) + sizeof(TI_UINT32));
-
-        pMemMng->uCurAllocated -= size + sizeof(TMemBlock) + sizeof(TI_UINT32);
-
-        if ((int)pMemMng->uCurAllocated < 0) 
-        {
-          #ifdef TI_MEM_ALLOC_TRACE
-            os_printf ("os_memoryFree: memory heap allocation calculation corrupted, size=%u, current=%u\n",
-                       size, drv->cur_heap_bytes_allocated);
-          #endif
-            pMemMng->uCurAllocated = 0;
-        }
-    }
-}
diff --git a/wl1271/utils/osDot11.h b/wl1271/utils/osDot11.h
deleted file mode 100644
index ec1e2cc..0000000
--- a/wl1271/utils/osDot11.h
+++ /dev/null
@@ -1,687 +0,0 @@
-/*
- * osDot11.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*--------------------------------------------------------------------------*/
-/* Module:		osDot11.h */
-/**/
-/* Purpose:		*/
-/**/
-/*--------------------------------------------------------------------------*/
-#ifndef __OSDOT11_H__
-#define __OSDOT11_H__
-
-#include "tidef.h"
-#include "tiQosTypes.h"
-
-
-#define	OS_STATUS_MEDIA_SPECIFIC_INDICATION	((NDIS_STATUS)0x40010012L)
-
-#define OS_802_11_REQUEST_REAUTH					0x01
-#define OS_802_11_REQUEST_KEYUPDATE					0x02
-#define OS_802_11_REQUEST_PAIRWISE_ERROR			0x06
-#define OS_802_11_REQUEST_GROUP_ERROR				0x0E
-
-#define OS_802_11_SSID_FIRST_VALID_CHAR             32
-
-#define OS_802_11_SSID_JUNK(str,len)                   \
-        ((len) > 2 &&                                  \
-         (unsigned char)(str)[0] < OS_802_11_SSID_FIRST_VALID_CHAR && \
-         (unsigned char)(str)[1] < OS_802_11_SSID_FIRST_VALID_CHAR && \
-         (unsigned char)(str)[2] < OS_802_11_SSID_FIRST_VALID_CHAR)
-
-
-/**/
-/*  Per-packet information for Ieee8021QInfo.*/
-/**/
-typedef struct _OS_PACKET_8021Q_INFO
-{
-    union
-    {
-        struct
-        {
-            TI_UINT32      UserPriority:3;         /* 802.1p priority */
-            TI_UINT32      CanonicalFormatId:1;    /* always 0*/
-            TI_UINT32      VlanId:12;              /* VLAN Identification*/
-            TI_UINT32      Reserved:16;            /* set to 0*/
-        }   TagHeader;
-
-        void*  Value;
-    }u;
-} OS_PACKET_8021Q_INFO, *POS_PACKET_8021Q_INFO;
-
-
-typedef TI_UINT64 OS_802_11_KEY_RSC;
-
-typedef struct _OS_802_11_SSID 
-{
-    TI_UINT32 SsidLength;
-    TI_UINT8  Ssid[32];
-} OS_802_11_SSID, *POS_802_11_SSID;
-
-typedef enum _OS_802_11_NETWORK_TYPE
-{
-  os802_11FH,
-  os802_11DS,
-  os802_11OFDM5,
-  os802_11OFDM24,
-  os802_11Automode,
-  os802_11NetworkTypeMax
-} OS_802_11_NETWORK_TYPE;
-
-typedef struct _OS_802_11_NETWORK_TYPE_LIST 
-{
-  TI_UINT32                  NumberOfItems;
-  OS_802_11_NETWORK_TYPE NetworkType [1];
-} OS_802_11_NETWORK_TYPE_LIST, *POS_802_11_NETWORK_TYPE_LIST;
-
-typedef enum _OS_802_11_POWER_MODE
-{
-  /*Continuous access mode (CAM). */
-  /*When the power mode is set to CAM, the device is always on. */
-  os802_11PowerModeCAM, 
-
-  /*Specifies maximum (MAX) power saving. A power mode of MAX */
-  /*results in the greatest power savings for the 802.11 NIC radio. */
-  os802_11PowerModeMAX_PSP,
-
-  /*Specifies fast power-saving mode. This power mode provides */
-  /*the best combination of network performance and power usage. */
-  os802_11PowerModeFast_PSP,
-  os802_11PowerModeMax
-} OS_802_11_POWER_MODE;
-
-/*specified in milliwatts (mW).*/
-typedef TI_UINT32 OS_802_11_TX_POWER_LEVEL;
-/*Normal value from -10 and -200*/
-typedef TI_INT32 OS_802_11_RSSI; 
-
-/*Length */
-
-/*  Specifies the length of the OS_802_11_CONFIGURATION_FH structure in bytes. */
-/*HopPattern*/
-/*  Specifies the hop pattern used to determine the hop sequence. */
-/*  As defined by the 802.11 standard, the layer management entity (LME) of */
-/*  the physical layer uses a hop pattern to determine the hop sequence. */
-/*HopSet*/
-/*  Specifies a set of patterns. The LME of the physical layer uses these */
-/*  patterns to determine the hop sequence. */
-/*DwellTime*/
-/*  Specifies the maximum period of time during which the transmitter */
-/*  should remain fixed on a channel. This interval is described in Kµsec (1024 µsec). */
-typedef struct _OS_802_11_CONFIGURATION_FH 
-{
-    TI_UINT32  Length; 
-    TI_UINT32  HopPattern;
-    TI_UINT32  HopSet; 
-    TI_UINT32  DwellTime;
-} OS_802_11_CONFIGURATION_FH, *POS_802_11_CONFIGURATION_FH;
-
-/*Length */
-
-/*  Specifies the length of the NDIS_802_11_CONFIGURATION structure in bytes. */
-/*BeaconPeriod */
-/*  Specifies the interval between beacon message transmissions. */
-/*  This value is specified in Kµsec (1024 µsec). */
-/*ATIMWindow */
-/*  Specifies the announcement traffic information message (ATIM) window in */
-/*  Kµsec (1024 µsec). The ATIM window is a short time period immediately */
-/*  after the transmission of each beacon in an IBSS configuration. */
-/*  During the ATIM window, any station can indicate the need to transfer data */
-/*  to another station during the following data-transmission window. */
-/*DSConfig */
-/*  Specifies the frequency of the selected channel in kHz. */
-/*FHConfig */
-/*  Specifies the frequency hopping configuration in an OS_802_11_CONFIGURATION_FH structure. */
-typedef struct _OS_802_11_CONFIGURATION 
-{
-    TI_UINT32 Length;
-    TI_UINT32 BeaconPeriod;
-    TI_UINT32 ATIMWindow;
-  union 
-  {
-        TI_UINT32 DSConfig;
-        TI_UINT32 channel;
-  } Union;
-  OS_802_11_CONFIGURATION_FH FHConfig;
-} OS_802_11_CONFIGURATION, *POS_802_11_CONFIGURATION;
-
-/*Ndis802_11IBSS */
-/*  Specifies the independent basic service set (IBSS) mode. */
-/*  This mode is also known as ad hoc mode. */
-/*Ndis802_11Infrastructure */
-/*  Specifies the infrastructure mode. */
-/*Ndis802_11AutoUnknown */
-/*  Specifies an automatic mode. In this mode, the 802.11 NIC can switch */
-/*  between ad hoc and infrastructure modes as required. */
-/*Ndis802_11HighSpeedIBSS*/
-/*  Specifies proprietary ad hoc mode that works only PBCC.*/
-typedef enum _OS_802_11_NETWORK_MODE
-{
-  os802_11IBSS,
-  os802_11Infrastructure,
-  os802_11AutoUnknown,
-  os802_11HighSpeedIBSS,
-  os802_11InfrastructureMax
-} OS_802_11_NETWORK_MODE, OS_802_11_NETWORK_INFRASTRUCTURE,*POS_802_11_NETWORK_INFRASTRUCTURE;
-
-/**/
-/*The rates array contains a set of eight octets. */
-/*Each octet contains a desired data rate in units of .5 Mbps.*/
-/**/
-typedef TI_UINT8 OS_802_11_RATES[8];
-
-typedef TI_UINT8 OS_802_11_RATES_EX[16];
-
-typedef TI_UINT8 OS_802_11_N_RATES[32];
-
-typedef struct _OS_802_11_FIXED_IEs 
-{
-	TI_UINT8  TimeStamp[8]; 
-	TI_UINT16 BeaconInterval;
-	TI_UINT16 Capabilities; 
-} OS_802_11_FIXED_IEs, *POS_802_11_FIXED_IEs;
-
-typedef struct _OS_802_11_VARIABLE_IEs 
-{
-	TI_UINT8 ElementID;
-	TI_UINT8 Length;	/* Number of bytes in data field*/
-	TI_UINT8 data[1];
-}  OS_802_11_VARIABLE_IEs, *POS_802_11_VARIABLE_IEs;
-
-typedef struct _OS_802_11_BSSID
-{
-  TI_UINT32 Length;
-  TMacAddr                  MacAddress;
-  TI_UINT16					Capabilities; 
-  OS_802_11_SSID            Ssid;
-  TI_UINT32                 Privacy;
-  OS_802_11_RSSI            Rssi;
-  OS_802_11_NETWORK_TYPE    NetworkTypeInUse;
-  OS_802_11_CONFIGURATION   Configuration;
-  OS_802_11_NETWORK_MODE    InfrastructureMode;
-  OS_802_11_RATES           SupportedRates;
-}  OS_802_11_BSSID, *POS_802_11_BSSID;
-
-typedef struct _OS_802_11_BSSID_LIST
-{
-    TI_UINT32          NumberOfItems;
-  OS_802_11_BSSID  Bssid[1];
-}  OS_802_11_BSSID_LIST, *POS_802_11_BSSID_LIST;
-
-
-typedef struct _OS_802_11_BSSID_EX
-{
-  TI_UINT32					Length;
-  TMacAddr		            MacAddress;
-  TI_UINT16					Capabilities; 
-  OS_802_11_SSID            Ssid;
-  TI_UINT32                 Privacy;
-  OS_802_11_RSSI            Rssi;
-  OS_802_11_NETWORK_TYPE    NetworkTypeInUse;
-  OS_802_11_CONFIGURATION   Configuration;
-  OS_802_11_NETWORK_MODE    InfrastructureMode;
-  OS_802_11_RATES_EX        SupportedRates;
-  TI_UINT32                 IELength;
-  TI_UINT8                  IEs[1];
-} OS_802_11_BSSID_EX, *POS_802_11_BSSID_EX, OS_WLAN_BSSID_EX, *POS_WLAN_BSSID_EX;
-
-typedef struct _OS_802_11_BSSID_LIST_EX
-{
-  TI_UINT32                 NumberOfItems;
-  OS_802_11_BSSID_EX        Bssid[1];
-}  OS_802_11_BSSID_LIST_EX, *POS_802_11_BSSID_LIST_EX;
-
-
-typedef TI_UINT32 OS_802_11_FRAGMENTATION_THRESHOLD;
-typedef TI_UINT32 OS_802_11_RTS_THRESHOLD;
-typedef TI_UINT32 OS_802_11_ANTENNA;
-
-
-/*Length */
-/*  Specifies the length of the NDIS_802_11_WEP structure in bytes. */
-/*KeyIndex */
-/*  Specifies which key to add or remove. The global keys are represented */
-/*  by values of zero to n. When the most significant bit is set to 1, */
-/*  it indicates the key used to transmit to the access point. */
-/*KeyLength */
-/*  Specifies the length of the KeyMaterial character array in bytes. */
-/*KeyMaterial */
-/*  Specifies an arraythat identifies the WEP key. The length of this array is */
-/*  variable and depends upon the value of the KeyLength member. */
-
-typedef TI_UINT32 OS_802_11_KEY_INDEX;
-typedef struct _OS_802_11_WEP 
-{
-    TI_UINT32 Length;
-    TI_UINT32 KeyIndex; 
-    TI_UINT32 KeyLength;
-    TI_UINT8  KeyMaterial [32]; 
-} OS_802_11_WEP, *POS_802_11_WEP;
-
-/* Key mapping keys require a BSSID*/
-/*typedef tiUINT64 OS_802_11_KEY_RSC;*/
-
-typedef struct _OS_802_11_KEY
-{
-    TI_UINT32                  Length;             /* Length of this structure*/
-    TI_UINT32                  KeyIndex;
-    TI_UINT32                  KeyLength;          /* length of key in bytes*/
-    TMacAddr                   BSSID;
-    OS_802_11_KEY_RSC          KeyRSC;
-    TI_UINT8                   KeyMaterial[32];     /* variable length depending on above field*/
-}  OS_802_11_KEY, *POS_802_11_KEY;
-
-typedef struct _OS_802_11_REMOVE_KEY
-{
-    TI_UINT32                  Length;             /* Length of this structure*/
-    TI_UINT32                  KeyIndex;
-    TMacAddr                   BSSID;
-} OS_802_11_REMOVE_KEY, *POS_802_11_REMOVE_KEY;
-
-#define OS_802_11_AI_REQFI_CAPABILITIES     1
-#define OS_802_11_AI_REQFI_LISTENINTERVAL   2
-#define OS_802_11_AI_REQFI_CURRENTAPADDRESS 4
-
-
-#define OS_802_11_AI_RESFI_CAPABILITIES     1
-#define OS_802_11_AI_RESFI_STATUSCODE       2
-#define OS_802_11_AI_RESFI_ASSOCIATIONID    4
-
-typedef struct _OS_802_11_AI_REQFI
-{
-	TI_UINT16 Capabilities;
-	TI_UINT16 ListenInterval;
-	TMacAddr  CurrentAPAddress;
-#ifndef _WINDOWS
-    TI_UINT16 reserved; /* added for packing */
-#endif
-} OS_802_11_AI_REQFI;
-
-typedef struct _OS_802_11_AI_RESFI
-{
-	TI_UINT16 Capabilities;
-	TI_UINT16 StatusCode;
-	TI_UINT16 AssociationId;
-#ifndef _WINDOWS
-    TI_UINT16 reserved; /* added for packing */
-#endif
-} OS_802_11_AI_RESFI;
-
-typedef struct _OS_802_11_ASSOCIATION_INFORMATION
-{
-    TI_UINT32 Length;
-    TI_UINT16 AvailableRequestFixedIEs;
-    OS_802_11_AI_REQFI RequestFixedIEs;
-    TI_UINT32 RequestIELength;
-    TI_UINT32 OffsetRequestIEs;
-    TI_UINT16 AvailableResponseFixedIEs;
-    OS_802_11_AI_RESFI ResponseFixedIEs;
-    TI_UINT32 ResponseIELength;
-    TI_UINT32 OffsetResponseIEs;
-
-}  OS_802_11_ASSOCIATION_INFORMATION, *POS_802_11_ASSOCIATION_INFORMATION;
-
-
-/* supported EAP types*/
-typedef enum _OS_802_11_EAP_TYPES
-{
-    OS_EAP_TYPE_NONE                = -1,
-	OS_EAP_TYPE_MD5_CHALLENGE		= 4,
-	OS_EAP_TYPE_GENERIC_TOKEN_CARD	= 6,
-	OS_EAP_TYPE_TLS					= 13,
-	OS_EAP_TYPE_LEAP				= 17,
-	OS_EAP_TYPE_TTLS				= 21,
-	OS_EAP_TYPE_PEAP				= 25,
-	OS_EAP_TYPE_MS_CHAP_V2			= 26,
-    OS_EAP_TYPE_FAST                = 43
-} OS_802_11_EAP_TYPES;
-
-/* encryption type*/
-typedef enum _OS_802_11_ENCRYPTION_TYPES
-{
-	OS_ENCRYPTION_TYPE_NONE = 0,
-	OS_ENCRYPTION_TYPE_WEP,
-	OS_ENCRYPTION_TYPE_TKIP,
-	OS_ENCRYPTION_TYPE_AES 
-} OS_802_11_ENCRYPTION_TYPES;
-
-/* Key type*/
-typedef enum _OS_802_11_KEY_TYPES
-{
-    OS_KEY_TYPE_STATIC = 0,
-    OS_KEY_TYPE_DYNAMIC
-} OS_802_11_KEY_TYPES;
-
-/* ELP mode*/
-typedef enum _OS_802_11_ELP_MODES
-{
-	OS_ELP_MODE_DISABLE,
-	OS_ELP_MODE_SYNC,
-    OS_ELP_MODE_NON_SYNC
-} OS_802_11_ELP_MODES;
-
-/* Roaming mode*/
-typedef enum _OS_802_11_ROAMING_MODES
-{
-	OS_ROAMING_MODE_DISABLE,
-	OS_ROAMING_MODE_ENABLE
-} OS_802_11_ROAMING_MODES;
-
-typedef enum _OS_802_11_POWER_PROFILE
-{
-    OS_POWER_MODE_AUTO,
-    OS_POWER_MODE_ACTIVE,
-    OS_POWER_MODE_SHORT_DOZE,
-    OS_POWER_MODE_LONG_DOZE
-} OS_802_11_POWER_PROFILE;
-
-typedef enum _OS_802_11_POWER_LEVELS
-{
-    OS_POWER_LEVEL_ELP,
-    OS_POWER_LEVEL_PD,
-    OS_POWER_LEVEL_AWAKE
-} OS_802_11_POWER_LEVELS;
-
-
-typedef enum _OS_802_11_BEACON_FILTER_MODE
-{
-    OS_BEACON_FILTER_MODE_INACTIVE,
-    OS_BEACON_FILTER_MODE_ACTIVE
-} OS_802_11_BEACON_FILTER_MODE;
-
-
-typedef enum _OS_802_11_SCAN_TYPES
-{
-    OS_SCAN_TYPE_PASSIVE,
-    OS_SCAN_TYPE_BROADCAST,
-    OS_SCAN_TYPE_UNICAST
-} OS_802_11_SCAN_TYPES;
-
-typedef enum _OS_802_11_VOICE_DELIVERY_PROTOCOL
-{
-    OS_VOICE_DELIVERY_PROTOCOL_DISABLED,
-    OS_VOICE_DELIVERY_PROTOCOL_PS_POLL   
-} OS_802_11_VOICE_DELIVERY_PROTOCOL;
-
-typedef struct _OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS
-{
-    TI_UINT32 uHighThreshold;
-	TI_UINT32 uLowThreshold;
-    TI_UINT32 TestInterval;
-} OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS;
-
-typedef struct{
-	TI_UINT32 uHighOrLowThresholdFlag;                /* high or low */
-	TI_UINT32 uAboveOrBelowFlag;       /* direction of crossing */
-} OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_CROSS_INDICATION_PARAMS;
-
-typedef TI_UINT8   OS_802_11_PMKID_VALUE[16];
-
-typedef struct _OS_BSSIDInfo
-{
-    TMacAddr   BSSID;
-    OS_802_11_PMKID_VALUE   PMKID;
-}  OS_BSSIDInfo, *POS_BSSIDInfo;
-
-typedef struct _OS_802_11_PMKID
-{
-    TI_UINT32        Length;
-    TI_UINT32        BSSIDInfoCount;
-    OS_BSSIDInfo    osBSSIDInfo[1];
-}  OS_802_11_PMKID, *POS_802_11_PMKID;
-
-typedef enum _OS_802_11_WEP_STATUS 
-{
-  os802_11WEPEnabled = 0,
-  os802_11Encryption1Enabled = os802_11WEPEnabled,
-  os802_11WEPDisabled,
-  os802_11EncryptionDisabled = os802_11WEPDisabled,
-  os802_11WEPKeyAbsent,
-  os802_11Encryption1KeyAbsent = os802_11WEPKeyAbsent,
-  os802_11WEPNotSupported,
-  os802_11EncryptionNotSupported = os802_11WEPNotSupported,
-  os802_11Encryption2Enabled,
-  os802_11Encryption2KeyAbsent,
-  os802_11Encryption3Enabled,
-  os802_11Encryption3KeyAbsent
-} OS_802_11_WEP_STATUS, OS_802_11_ENCRYPTION_STATUS;
-
-/*os802_11AuthModeOpen */
-/*  Specifies 802.11 open authentication mode. There are no checks when accepting */
-/*  clients in this mode. */
-/*os802_11AuthModeShared */
-/*  Specifies 802.11 shared authentication that uses a pre-shared wired equivalent */
-/*  privacy (WEP) key. */
-/*os802_11AuthModeAutoSwitch */
-/*  Specifies auto-switch mode. When using auto-switch mode, the NIC tries 802.11 shared */
-/*  authentication mode first. If shared mode fails, the NIC attempts to use 802.11 open */
-/*  authentication mode. */
-
-typedef enum _OS_802_11_AUTHENTICATION_MODE 
-{
-    os802_11AuthModeOpen,
-    os802_11AuthModeShared,
-    os802_11AuthModeAutoSwitch,
-    os802_11AuthModeWPA,
-    os802_11AuthModeWPAPSK,
-    os802_11AuthModeWPANone,
-    os802_11AuthModeWPA2,
-    os802_11AuthModeWPA2PSK,
-    os802_11AuthModeMax
-} OS_802_11_AUTHENTICATION_MODE;
-
-
-/*os802_11PrivFilterAcceptAll */
-/*  Specifies an open mode. In this mode, the NIC accepts any packet if the packet */
-/*  is not encrypted or if the NIC successfully decrypts it. */
-/*os802_11PrivFilter8021xWEP */
-/*  Specifies a filtering mode. In the 802.1X filtering mode, 802.1X packets are */
-/*  accepted even if they are not encrypted. However, the NIC accepts nothing else */
-/*  unless it is encrypted using WEP. */
-typedef enum _OS_802_11_PRIVACY_FILTER 
-{
-  os802_11PrivFilterAcceptAll, 
-  os802_11PrivFilter8021xWEP 
-} OS_802_11_PRIVACY_FILTER;
-
-typedef enum _OS_802_11_RELOAD_DEFAULTS
-{
-  os802_11ReloadWEPKeys
-} OS_802_11_RELOAD_DEFAULTS, *POS_802_11_RELOAD_DEFAULTS;
-
-typedef enum _OS_802_11_STATUS_TYPE
-{
-    os802_11StatusType_Authentication,
-    os802_11StatusType_PMKID_CandidateList = 2,
-    os802_11StatusTypeMax       /* not a real type, defined as an upper bound */
-} OS_802_11_STATUS_TYPE, *POS_802_11_STATUS_TYPE;
-
-typedef struct _OS_802_11_STATUS_INDICATION
-{
-    OS_802_11_STATUS_TYPE StatusType;
-} OS_802_11_STATUS_INDICATION, *POS_802_11_STATUS_INDICATION;
-
-
-typedef struct _OS_802_11_AUTHENTICATION_REQUEST
-{
-    TI_UINT32           	Length;             /* Length of this structure*/
-    TMacAddr 	            BSSID;
-	TI_UINT32				Flags;
-}  OS_802_11_AUTHENTICATION_REQUEST, *POS_802_11_AUTHENTICATION_REQUEST;
-
-typedef enum
-{
-	OS_DISASSOC_STATUS_UNSPECIFIED      		=   0,  
-	OS_DISASSOC_STATUS_AUTH_REJECT				=   1,
-	OS_DISASSOC_STATUS_ASSOC_REJECT				=   2,
-	OS_DISASSOC_STATUS_SECURITY_FAILURE 		=   3,
-	OS_DISASSOC_STATUS_AP_DEAUTHENTICATE		=   4,
-	OS_DISASSOC_STATUS_AP_DISASSOCIATE			=   5,
-	OS_DISASSOC_STATUS_ROAMING_TRIGGER			=   6
-
-}	OS_802_11_DISASSOCIATE_REASON_E;
-
-typedef struct
-{
-	OS_802_11_DISASSOCIATE_REASON_E  eDisAssocType;
-	TI_UINT32						 uStatusCode;
-} OS_802_11_DISASSOCIATE_REASON_T;
-
-
-
-#define OS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLE   0x01
-
-typedef struct _OS_802_11_PMKID_CANDIDATE 
-{
-    TMacAddr               BSSID;
-    TI_UINT32              Flags;
-}  OS_802_11_PMKID_CANDIDATE, *POS_802_11_PMKID_CANDIDATE;
-
-typedef struct _OS_802_11_PMKID_CANDIDATELIST
-{
-    TI_UINT32                   Version;       /* Version of the structure*/
-    TI_UINT32                   NumCandidates; /* No. of pmkid candidates*/
-    OS_802_11_PMKID_CANDIDATE  CandidateList[1];
-}  OS_802_11_PMKID_CANDIDATELIST, *POS_802_11_PMKID_CANDIDATELIST;
-
-
-typedef TI_UINT8 OS_802_11_MAC_PMKID_VALUE[16];
-
-typedef struct _OS_802_11_BSSIDInfo
-{
-    TMacAddr 	               BSSID;
-    OS_802_11_MAC_PMKID_VALUE  PMKID;
-}  OS_802_11_BSSIDInfo, *POS_802_11_BSSIDInfo;
-
-
-typedef struct _OS_802_11_AUTH_ENCRYPTION
-{
-    OS_802_11_AUTHENTICATION_MODE AuthModeSupported;
-    OS_802_11_ENCRYPTION_STATUS   EncryptionStatusSupported;
-} OS_802_11_AUTH_ENCRYPTION, *POS_802_11_AUTH_ENCRYPTION;
-
-
-typedef struct _OS_802_11_CAPABILITY
-{
-    TI_UINT32 Length;
-    TI_UINT32 Version;
-    TI_UINT32 NoOfPmKIDs;
-    TI_UINT32 NoOfAuthEncryptPairsSupported;
-    OS_802_11_AUTH_ENCRYPTION AuthEncryptionSupported[1];
-
-} OS_802_11_CAPABILITY, *POS_802_11_CAPABILITY;
-
-#define OID_CAPABILITY_VERSION 2
-
-
-
-typedef enum _OS_802_11_REG_DOMAIN
-{
-  os802_11_Domain_FCC = 0x10,
-  os802_11_Domain_IC = 0x20,
-  os802_11_Domain_ETSI = 0x30,
-  os802_11_Domain_Spain = 0x31,
-  os802_11_Domain_France = 0x32,
-  os802_11_Domain_MKK = 0x40,
-  os802_11_Domain_MKK1 = 0x41,
-  os802_11_Domain_US	= 0x50,		
-  os802_11_Domain_WB	= 0x51,
-  os802_11_Domain_EXWB	= 0x52
-} OS_802_11_REG_DOMAIN;
-
-
-
-#define OID_TI_VERSION							0xFF080001
-
-
-/* propritary OIDs used by FUNK supplicant for WPA Mixed mode support*/
-/* WPA2 MIxed mode OIDs */
-#define CGUID_FSW_802_11_AVAILABLE_OPTIONS      {0x1a905534, 0xe71f, 0x46d1, {0xa2, 0xcb, 0xa5, 0x57, 0x01, 0x76, 0x38, 0xfd}}
-#define CGUID_FSW_802_11_OPTIONS 				{0xdc7a51b7, 0x2236, 0x467d, {0xb1, 0x55, 0x03, 0x50, 0x42, 0x04, 0xcf, 0x30}}
-
-#define OID_FSW_802_11_AVAILABLE_OPTIONS        0xFF010237
-#define OID_FSW_802_11_OPTIONS                  0xFF010238
-
-
-
-/**/
-/* IEEE 802.11 OIDs*/
-/**/
-#define OID_802_11_BSSID                        0x0D010101
-#define OID_802_11_SSID                         0x0D010102
-#define OID_802_11_INFRASTRUCTURE_MODE          0x0D010108
-#define OID_802_11_ADD_WEP                      0x0D010113
-#define OID_802_11_REMOVE_WEP                   0x0D010114
-#define OID_802_11_DISASSOCIATE                 0x0D010115
-#define OID_802_11_AUTHENTICATION_MODE          0x0D010118
-#define OID_802_11_PRIVACY_FILTER               0x0D010119
-#define OID_802_11_BSSID_LIST_SCAN              0x0D01011A
-#define OID_802_11_WEP_STATUS                   0x0D01011B
-#define OID_802_11_RELOAD_DEFAULTS              0x0D01011C
-#define OID_802_11_ADD_KEY                      0x0D01011D
-#define OID_802_11_REMOVE_KEY                   0x0D01011E
-#define OID_802_11_ASSOCIATION_INFORMATION      0x0D01011F
-#define OID_802_11_NETWORK_TYPES_SUPPORTED      0x0D010203
-#define OID_802_11_NETWORK_TYPE_IN_USE          0x0D010204
-#define OID_802_11_TX_POWER_LEVEL               0x0D010205
-#define OID_802_11_RSSI                         0x0D010206
-#define OID_802_11_RSSI_TRIGGER                 0x0D010207
-#define OID_802_11_FRAGMENTATION_THRESHOLD      0x0D010209
-#define OID_802_11_RTS_THRESHOLD                0x0D01020A
-#define OID_802_11_NUMBER_OF_ANTENNAS           0x0D01020B
-#define OID_802_11_RX_ANTENNA_SELECTED          0x0D01020C
-#define OID_802_11_TX_ANTENNA_SELECTED          0x0D01020D
-#define OID_802_11_SUPPORTED_RATES              0x0D01020E
-#define OID_802_11_DESIRED_RATES                0x0D010210
-#define OID_802_11_CONFIGURATION                0x0D010211
-#define OID_802_11_STATISTICS                   0x0D020212
-#define OID_802_11_POWER_MODE                   0x0D010216
-#define OID_802_11_BSSID_LIST                   0x0D010217
-
-
-#ifndef _USER_MODE
-	#include "osdot11nousermode.h"
-#endif
-
-
-
-
-/* AnyWPA mode flags used in propritary FUNK suplicant OIDs*/
-
-#define     OS_802_11_OPTION_ENABLE_PROMOTE_MODE        0x00000001 /*bit 0*/
-#define     OS_802_11_OPTION_ENABLE_PROMOTE_CIPHER      0x00000002 /*bit 1*/
-#define		OS_802_11_OPTION_DISABLE_PROMOTE_MODE		0
-#define     OS_802_11_OPTION_ENABLE_ALL                 0x00000003 
-
-#endif
diff --git a/wl1271/utils/queue.c b/wl1271/utils/queue.c
deleted file mode 100644
index 059a348..0000000
--- a/wl1271/utils/queue.c
+++ /dev/null
@@ -1,426 +0,0 @@
-/*
- * queue.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-/** \file   queue.c 
- *  \brief  This module provides generic queueing services, including enqueue, dequeue
- *            and requeue of any object that contains TQueNodeHdr in its structure.                                  
- *
- *  \see    queue.h
- */
-
-
-
-#define __FILE_ID__  FILE_ID_130
-#include "report.h"
-#include "queue.h"
-
-
-/* Queue structure */
-typedef struct 
-{
-    TQueNodeHdr tHead;          /* The queue first node */
-    TI_UINT32   uCount;         /* Current number of nodes in queue */
-    TI_UINT32   uLimit;         /* Upper limit of nodes in queue */
-    TI_UINT32   uMaxCount;      /* Maximum uCount value (for debug) */
-    TI_UINT32   uOverflow;      /* Number of overflow occurences - couldn't insert node (for debug) */
-    TI_UINT32   uNodeHeaderOffset; /* Offset of NodeHeader field from the entry of the queued item */
-	TI_HANDLE   hOs;
-	TI_HANDLE   hReport; 
-} TQueue;	
-
-
-
-/*
- *              INTERNAL  FUNCTIONS 
- *        =============================== 
- */
-
-
-/*
- *  InsertNode():  Insert new node between pPrev and pNext 
- */
-static INLINE void InsertNode( TQueNodeHdr *pNode, TQueNodeHdr *pPrev, TQueNodeHdr *pNext)
-{
-	pNext->pPrev = pNode;
-	pNode->pNext = pNext;
-	pNode->pPrev = pPrev;
-	pPrev->pNext = pNode;
-}
-
-/*
- *  RemoveNode():  Remove node from between pPrev and pNext 
- */
-static INLINE void RemoveNode( TQueNodeHdr *pPrev, TQueNodeHdr *pNext)
-{
-	pNext->pPrev = pPrev;
-	pPrev->pNext = pNext;
-}
-
-/*
- *  AddToHead():  Add node to queue head (last in queue) 
- */
-static INLINE void AddToHead( TQueNodeHdr *pNode, TQueNodeHdr *pListHead)
-{
-	InsertNode (pNode, pListHead, pListHead->pNext);
-}
-
-/*
- *  AddToTail():  Add node to queue tail (first in queue)
- */
-static INLINE void AddToTail( TQueNodeHdr *pNode, TQueNodeHdr *pListHead)
-{
-	InsertNode( pNode, pListHead->pPrev, pListHead );
-}
-
-/*
- *  DelFromTail():  Delete node from queue tail (first in queue)
- */
-static INLINE void DelFromTail (TQueNodeHdr *pNode)
-{
-	RemoveNode (pNode->pPrev, pNode->pNext);
-}
-
-
-
-/*
- *              EXTERNAL  FUNCTIONS 
- *        =============================== 
- */
-
-
-/** 
- * \fn     que_Create 
- * \brief  Create a queue. 
- * 
- * Allocate and init a queue object.
- * 
- * \note    
- * \param  hOs               - Handle to Os Abstraction Layer
- * \param  hReport           - Handle to report module
- * \param  uLimit            - Maximum items to store in queue
- * \param  uNodeHeaderOffset - Offset of NodeHeader field from the entry of the queued item.
- * \return Handle to the allocated queue 
- * \sa     que_Destroy
- */ 
-TI_HANDLE que_Create (TI_HANDLE hOs, TI_HANDLE hReport, TI_UINT32 uLimit, TI_UINT32 uNodeHeaderOffset)
-{
-	TQueue *pQue;
-
-	/* allocate queue module */
-	pQue = os_memoryAlloc (hOs, sizeof(TQueue));
-	
-	if (!pQue)
-	{
-		WLAN_OS_REPORT (("Error allocating the Queue Module\n"));
-		return NULL;
-	}
-	
-    os_memoryZero (hOs, pQue, sizeof(TQueue));
-
-	/* Intialize the queue header */
-    pQue->tHead.pNext = pQue->tHead.pPrev = &pQue->tHead;
-
-	/* Set the Queue parameters */
-    pQue->hOs               = hOs;
-    pQue->hReport           = hReport;
-	pQue->uLimit            = uLimit;
-	pQue->uNodeHeaderOffset = uNodeHeaderOffset;
-
-	return (TI_HANDLE)pQue;
-}
-
-
-/** 
- * \fn     que_Destroy
- * \brief  Destroy the queue. 
- * 
- * Free the queue memory.
- * 
- * \note   The queue's owner should first free the queued items!
- * \param  hQue - The queue object
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     que_Create
- */ 
-TI_STATUS que_Destroy (TI_HANDLE hQue)
-{
-    TQueue *pQue = (TQueue *)hQue;
-
-    if (pQue)
-	{
-        /* Alert if the queue is unloaded before it was cleared from items */
-        if (pQue->uCount)
-        {
-            TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING, "que_Destroy() Queue Not Empty!!");
-        }
-        /* free Queue object */
-        os_memoryFree (pQue->hOs, pQue, sizeof(TQueue));
-    }
-	
-    return TI_OK;
-}
-
-
-/** 
- * \fn     que_Init 
- * \brief  Init required handles 
- * 
- * Init required handles.
- * 
- * \note    
- * \param  hQue      - The queue object
- * \param  hOs       - Handle to Os Abstraction Layer
- * \param  hReport   - Handle to report module
- * \return TI_OK on success or TI_NOK on failure  
- * \sa     
- */ 
-TI_STATUS que_Init (TI_HANDLE hQue, TI_HANDLE hOs, TI_HANDLE hReport)
-{
-	TQueue *pQue = (TQueue *)hQue;
-
-    pQue->hOs = hOs;
-    pQue->hReport = hReport;
-	
-	return TI_OK;
-}
-
-
-/** 
- * \fn     que_Enqueue
- * \brief  Enqueue an item 
- * 
- * Enqueue an item at the queue's head (last in queue).
- * 
- * \note   
- * \param  hQue   - The queue object
- * \param  hItem  - Handle to queued item
- * \return TI_OK if item was queued, or TI_NOK if not queued due to overflow
- * \sa     que_Dequeue, que_Requeue
- */ 
-TI_STATUS que_Enqueue (TI_HANDLE hQue, TI_HANDLE hItem)
-{
-	TQueue      *pQue = (TQueue *)hQue;
-    TQueNodeHdr *pQueNodeHdr;  /* the Node-Header in the given item */
-
-    if (pQue)
-	{
-            /* Check queue limit */
-            if(pQue->uCount < pQue->uLimit)
-            {
-                /* Find NodeHeader in the given item */
-                pQueNodeHdr = (TQueNodeHdr *)((TI_UINT8*)hItem + pQue->uNodeHeaderOffset);
-        
-                /* Verify that pNext is NULL --> Sanity check that this item is not already linked to a queue */
-                if (pQueNodeHdr->pNext)
-                {
-                    /* Not an error since we have a case where a timer may expire twice in a row (in TxDataQueue) */
-                    TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING, "que_Enqueue(): Trying to enqueue an item that is already enqueued!!");
-                    return TI_NOK;
-                }
-        
-                /* Enqueue item and increment items counter */
-                AddToHead (pQueNodeHdr, &pQue->tHead);
-                pQue->uCount++;
-        
-#ifdef TI_DBG
-                    if (pQue->uCount > pQue->uMaxCount)
-                    {
-                        pQue->uMaxCount = pQue->uCount;
-                    }
-                    TRACE0(pQue->hReport, REPORT_SEVERITY_INFORMATION , "que_Enqueue(): Enqueued Successfully\n");
-#endif
-        
-                return TI_OK;
-            }
-
-        /* 
-         *  Queue is overflowed, return TI_NOK.
-         */
-#ifdef TI_DBG
-        pQue->uOverflow++;
-        TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING , "que_Enqueue(): Queue Overflow\n");
-#endif
-    }
-	return TI_NOK;
-}
-
-
-/** 
- * \fn     que_Dequeue
- * \brief  Dequeue an item 
- * 
- * Dequeue an item from the queue's tail (first in queue).
- * 
- * \note   
- * \param  hQue - The queue object
- * \return pointer to dequeued item or NULL if queue is empty
- * \sa     que_Enqueue, que_Requeue
- */ 
-TI_HANDLE que_Dequeue (TI_HANDLE hQue)
-{
-    TQueue   *pQue = (TQueue *)hQue;
-	TI_HANDLE hItem;
-
-    if (pQue)
-    {
-        if (pQue->uCount)
-        {
-            /* Queue is not empty, take packet from the queue tail */
-    
-            /* find pointer to the node entry */
-            hItem = (TI_HANDLE)((TI_UINT8*)pQue->tHead.pPrev - pQue->uNodeHeaderOffset); 
-
-            DelFromTail (pQue->tHead.pPrev);    /* remove node from the queue */
-            pQue->uCount--;
-
-#ifdef TI_DBG
-            /* Clear the pNext so we can do a sanity check when enqueuing this structre in the future */
-            ((TQueNodeHdr *)((TI_UINT8*)hItem + pQue->uNodeHeaderOffset))->pNext = NULL;
-#endif
-
-            return (hItem);
-        }
-    }
-    
-	/* Queue is empty */
-    TRACE0(pQue->hReport, REPORT_SEVERITY_INFORMATION , "que_Dequeue(): Queue is empty\n");
-    return NULL;
-}
-
-
-/** 
- * \fn     que_Requeue
- * \brief  Requeue an item 
- * 
- * Requeue an item at the queue's tail (first in queue).
- * 
- * \note   
- * \param  hQue   - The queue object
- * \param  hItem  - Handle to queued item
- * \return TI_OK if item was queued, or TI_NOK if not queued due to overflow
- * \sa     que_Enqueue, que_Dequeue
- */ 
-TI_STATUS que_Requeue (TI_HANDLE hQue, TI_HANDLE hItem)
-{
-    TQueue      *pQue = (TQueue *)hQue;
-    TQueNodeHdr *pQueNodeHdr;  /* the NodeHeader in the given item */
-
-    /* 
-	 *  If queue's limits not exceeded add the packet to queue's tail and return TI_OK 
-	 */
-    if (pQue->uCount < pQue->uLimit)
-	{
-        /* Find NodeHeader in the given item */
-        pQueNodeHdr = (TQueNodeHdr *)((TI_UINT8*)hItem + pQue->uNodeHeaderOffset);
-
-        /* Verify that pNext is NULL --> Sanity check that this item is not already linked to a queue */
-        if (pQueNodeHdr->pNext)
-        {
-            TRACE0(pQue->hReport, REPORT_SEVERITY_ERROR, "que_Requeue(): Trying to Requeue an item that is already enqueued!!");
-            return TI_NOK;
-        }
-
-        /* Enqueue item and increment items counter */
-		AddToTail (pQueNodeHdr, &pQue->tHead);
-		pQue->uCount++;
-
-#ifdef TI_DBG
-		if (pQue->uCount > pQue->uMaxCount)
-			pQue->uMaxCount = pQue->uCount;
-TRACE0(pQue->hReport, REPORT_SEVERITY_INFORMATION , "que_Requeue(): Requeued successfully\n");
-#endif
-
-		return TI_OK;
-    }
-    
-
-	/* 
-	 *  Queue is overflowed, return TI_NOK.
-	 *  Note: This is not expected in the current design, since Tx packet may be requeued
-	 *          only right after it was dequeued in the same context so the queue can't be full.
-	 */
-#ifdef TI_DBG
-    pQue->uOverflow++;
-TRACE0(pQue->hReport, REPORT_SEVERITY_ERROR , "que_Requeue(): Queue Overflow\n");
-#endif
-    
-    return TI_NOK;
-}
-
-
-/** 
- * \fn     que_Size
- * \brief  Return queue size 
- * 
- * Return number of items in queue.
- * 
- * \note   
- * \param  hQue - The queue object
- * \return TI_UINT32 - the items count
- * \sa     
- */ 
-TI_UINT32 que_Size (TI_HANDLE hQue)
-{
-    TQueue *pQue = (TQueue *)hQue;
- 
-    return (pQue->uCount);
-}
-
-	
-/** 
- * \fn     que_Print
- * \brief  Print queue status
- * 
- * Print the queue's parameters (not the content).
- * 
- * \note   
- * \param  hQue - The queue object
- * \return void
- * \sa     
- */ 
-
-#ifdef TI_DBG
-
-void que_Print(TI_HANDLE hQue)
-{
-#ifdef REPORT_LOG
-    TQueue *pQue = (TQueue *)hQue;
-
-    WLAN_OS_REPORT(("que_Print: Count=%u MaxCount=%u Limit=%u Overflow=%u NodeHeaderOffset=%u Next=0x%x Prev=0x%x\n",
-                    pQue->uCount, pQue->uMaxCount, pQue->uLimit, pQue->uOverflow, 
-                    pQue->uNodeHeaderOffset, pQue->tHead.pNext, pQue->tHead.pPrev));
-#endif
-}
-
-#endif /* TI_DBG */
diff --git a/wl1271/utils/queue.h b/wl1271/utils/queue.h
deleted file mode 100644
index cbeb359..0000000
--- a/wl1271/utils/queue.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * queue.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-/** \file   queue.h 
- *  \brief  queue module header file.                                  
- *
- *  \see    queue.c
- */
-
-
-#ifndef _QUEUE_H_
-#define _QUEUE_H_
-
-
-#define QUE_UNLIMITED_SIZE      0xFFFFFFFF
-
-/* A queue node header structure */                        
-typedef struct _TQueNodeHdr 
-{
-    struct _TQueNodeHdr *pNext;
-    struct _TQueNodeHdr *pPrev;
-} TQueNodeHdr;
-
-
-
-/* External Functions Prototypes */
-/* ============================= */
-TI_HANDLE que_Create  (TI_HANDLE hOs, TI_HANDLE hReport, TI_UINT32 uLimit, TI_UINT32 uNodeHeaderOffset);
-TI_STATUS que_Destroy (TI_HANDLE hQue);
-TI_STATUS que_Enqueue (TI_HANDLE hQue, TI_HANDLE hItem);
-TI_HANDLE que_Dequeue (TI_HANDLE hQue);
-TI_STATUS que_Requeue (TI_HANDLE hQue, TI_HANDLE hItem);
-TI_UINT32 que_Size    (TI_HANDLE hQue);
-
-#ifdef TI_DBG
-void      que_Print   (TI_HANDLE hQue);
-#endif /* TI_DBG */
-
-
-
-#endif  /* _QUEUE_H_ */
diff --git a/wl1271/utils/rate.c b/wl1271/utils/rate.c
deleted file mode 100644
index bbccb2b..0000000
--- a/wl1271/utils/rate.c
+++ /dev/null
@@ -1,1817 +0,0 @@
-/*
- * rate.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  rate.c
- *  \brief Rate conversion
- *
- *  \see   rate.h
- */
-#define __FILE_ID__  FILE_ID_131
-#include "tidef.h"
-#include "rate.h"
-
-ERate rate_NetToDrv (TI_UINT32 rate)
-{
-    switch (rate)
-    {
-        case NET_RATE_1M:
-        case NET_RATE_1M_BASIC:
-            return DRV_RATE_1M;
-
-        case NET_RATE_2M:
-        case NET_RATE_2M_BASIC:
-            return DRV_RATE_2M;
-
-        case NET_RATE_5_5M:
-        case NET_RATE_5_5M_BASIC:
-            return DRV_RATE_5_5M;
-
-        case NET_RATE_11M:
-        case NET_RATE_11M_BASIC:
-            return DRV_RATE_11M;
-
-        case NET_RATE_22M:
-        case NET_RATE_22M_BASIC:
-            return DRV_RATE_22M;
-
-        case NET_RATE_6M:
-        case NET_RATE_6M_BASIC:
-            return DRV_RATE_6M;
-
-        case NET_RATE_9M:
-        case NET_RATE_9M_BASIC:
-            return DRV_RATE_9M;
-
-        case NET_RATE_12M:
-        case NET_RATE_12M_BASIC:
-            return DRV_RATE_12M;
-
-        case NET_RATE_18M:
-        case NET_RATE_18M_BASIC:
-            return DRV_RATE_18M;
-
-        case NET_RATE_24M:
-        case NET_RATE_24M_BASIC:
-            return DRV_RATE_24M;
-
-        case NET_RATE_36M:
-        case NET_RATE_36M_BASIC:
-            return DRV_RATE_36M;
-
-        case NET_RATE_48M:
-        case NET_RATE_48M_BASIC:
-            return DRV_RATE_48M;
-
-        case NET_RATE_54M:
-        case NET_RATE_54M_BASIC:
-            return DRV_RATE_54M;
-
-        case NET_RATE_MCS0:
-        case NET_RATE_MCS0_BASIC:
-            return DRV_RATE_MCS_0;
-
-        case NET_RATE_MCS1:
-        case NET_RATE_MCS1_BASIC:
-            return DRV_RATE_MCS_1;
-
-        case NET_RATE_MCS2:
-        case NET_RATE_MCS2_BASIC:
-            return DRV_RATE_MCS_2;
-
-        case NET_RATE_MCS3:
-        case NET_RATE_MCS3_BASIC:
-            return DRV_RATE_MCS_3;
-
-        case NET_RATE_MCS4:
-        case NET_RATE_MCS4_BASIC:
-            return DRV_RATE_MCS_4;
-
-        case NET_RATE_MCS5:
-        case NET_RATE_MCS5_BASIC:
-            return DRV_RATE_MCS_5;
-
-        case NET_RATE_MCS6:
-        case NET_RATE_MCS6_BASIC:
-            return DRV_RATE_MCS_6;
-
-        case NET_RATE_MCS7:
-        case NET_RATE_MCS7_BASIC:
-            return DRV_RATE_MCS_7;
-
-        default:
-            return DRV_RATE_INVALID;
-    }
-}
-
-/************************************************************************
- *                        hostToNetworkRate                         *
- ************************************************************************
-DESCRIPTION: Translates a host rate (1, 2, 3, ....) to network rate (0x02, 0x82, 0x84, etc...) 
-                                                                                                   
-INPUT:      rate        -   Host rate
-
-OUTPUT:     
-
-
-RETURN:     Network rate if the input rate is valid, otherwise returns 0.
-
-************************************************************************/
-ENetRate rate_DrvToNet (ERate rate)
-{
-    switch (rate)
-    {
-        case DRV_RATE_AUTO:
-            return NET_RATE_AUTO;
-
-        case DRV_RATE_1M:
-            return NET_RATE_1M;
-
-        case DRV_RATE_2M:
-            return NET_RATE_2M;
-
-        case DRV_RATE_5_5M:
-            return NET_RATE_5_5M;
-
-        case DRV_RATE_11M:
-            return NET_RATE_11M;
-
-        case DRV_RATE_22M:
-            return NET_RATE_22M;
-
-        case DRV_RATE_6M:
-            return NET_RATE_6M;
-
-        case DRV_RATE_9M:
-            return NET_RATE_9M;
-
-        case DRV_RATE_12M:
-            return NET_RATE_12M;
-
-        case DRV_RATE_18M:
-            return NET_RATE_18M;
-
-        case DRV_RATE_24M:
-            return NET_RATE_24M;
-
-        case DRV_RATE_36M:
-            return NET_RATE_36M;
-
-        case DRV_RATE_48M:
-            return NET_RATE_48M;
-
-        case DRV_RATE_54M:
-            return NET_RATE_54M;
-
-        case DRV_RATE_MCS_0:
-            return NET_RATE_MCS0;
-
-        case DRV_RATE_MCS_1:
-            return NET_RATE_MCS1;
-    
-        case DRV_RATE_MCS_2:
-            return NET_RATE_MCS2;
-    
-        case DRV_RATE_MCS_3:
-            return NET_RATE_MCS3;
-    
-        case DRV_RATE_MCS_4:
-            return NET_RATE_MCS4;
-    
-        case DRV_RATE_MCS_5:
-            return NET_RATE_MCS5;
-    
-        case DRV_RATE_MCS_6:
-            return NET_RATE_MCS6;
-    
-        case DRV_RATE_MCS_7:
-            return NET_RATE_MCS7;
-
-        default:
-            return NET_RATE_AUTO;
-    }
-}
-
-/***************************************************************************
-*                   getMaxActiveRatefromBitmap                             *
-****************************************************************************
-* DESCRIPTION:  
-*
-* INPUTS:       hCtrlData - the object
-*               
-* OUTPUT:       
-*
-* RETURNS:      
-***************************************************************************/
-ERate rate_GetMaxFromDrvBitmap (TI_UINT32 uRateBitMap)
-{
-    if (uRateBitMap & DRV_RATE_MASK_MCS_7_OFDM)
-    {
-        return DRV_RATE_MCS_7;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_MCS_6_OFDM)
-    {
-        return DRV_RATE_MCS_6;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_MCS_5_OFDM)
-    {
-        return DRV_RATE_MCS_5;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_MCS_4_OFDM)
-    {
-        return DRV_RATE_MCS_4;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_MCS_3_OFDM)
-    {
-        return DRV_RATE_MCS_3;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_MCS_2_OFDM)
-    {
-        return DRV_RATE_MCS_2;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_MCS_1_OFDM)
-    {
-        return DRV_RATE_MCS_1;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_MCS_0_OFDM)
-    {
-        return DRV_RATE_MCS_0;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_54_OFDM)
-    {
-        return DRV_RATE_54M;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_48_OFDM)
-    {
-        return DRV_RATE_48M;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_36_OFDM)
-    {
-        return DRV_RATE_36M;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_24_OFDM)
-    {
-        return DRV_RATE_24M;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_22_PBCC)
-    {
-        return DRV_RATE_22M;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_18_OFDM)
-    {
-        return DRV_RATE_18M;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_12_OFDM)
-    {
-        return DRV_RATE_12M;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_11_CCK)
-    {
-        return DRV_RATE_11M;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_9_OFDM)
-    {
-        return DRV_RATE_9M;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_6_OFDM)
-    {
-        return DRV_RATE_6M;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_5_5_CCK)
-    {
-        return DRV_RATE_5_5M;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_2_BARKER)
-    {
-        return DRV_RATE_2M;
-    }
-
-    if (uRateBitMap & DRV_RATE_MASK_1_BARKER)
-    {
-        return DRV_RATE_1M;
-    }
-
-    return DRV_RATE_INVALID;
-}
-
-/************************************************************************
- *                        validateNetworkRate                           *
- ************************************************************************
-DESCRIPTION: Verify that the input nitwork rate is valid
-                                                                                                   
-INPUT:      rate    -   input network rate
-
-OUTPUT:     
-
-
-RETURN:     TI_OK if valid, otherwise TI_NOK
-
-************************************************************************/
-static TI_STATUS rate_ValidateNet (ENetRate eRate)
-{
-    switch (eRate)
-    {
-        case NET_RATE_1M:
-        case NET_RATE_1M_BASIC:
-        case NET_RATE_2M:
-        case NET_RATE_2M_BASIC:
-        case NET_RATE_5_5M:
-        case NET_RATE_5_5M_BASIC:
-        case NET_RATE_11M:
-        case NET_RATE_11M_BASIC:
-        case NET_RATE_22M:
-        case NET_RATE_22M_BASIC:
-        case NET_RATE_6M:
-        case NET_RATE_6M_BASIC:
-        case NET_RATE_9M:
-        case NET_RATE_9M_BASIC:
-        case NET_RATE_12M:
-        case NET_RATE_12M_BASIC:
-        case NET_RATE_18M:
-        case NET_RATE_18M_BASIC:
-        case NET_RATE_24M:
-        case NET_RATE_24M_BASIC:
-        case NET_RATE_36M:
-        case NET_RATE_36M_BASIC:
-        case NET_RATE_48M:
-        case NET_RATE_48M_BASIC:
-        case NET_RATE_54M:
-        case NET_RATE_54M_BASIC:
-            return TI_OK;
-
-        default:
-            return TI_NOK;
-    }
-}
-
-/************************************************************************
- *                        getMaxBasicRate                           *
- ************************************************************************
-DESCRIPTION: Goes over an array of network rates and returns the max basic rate
-                                                                                                   
-INPUT:      pRates      -   Rate array
-
-OUTPUT:     
-
-
-RETURN:     Max basic rate (in network units)
-
-************************************************************************/
-ENetRate rate_GetMaxBasicFromStr (TI_UINT8 *pRatesString, TI_UINT32 len, ENetRate eMaxRate)
-{
-    TI_UINT32   i;
-    
-    for (i = 0; i < len; i++)
-    {
-        if (NET_BASIC_RATE (pRatesString[i]) && rate_ValidateNet ((ENetRate)pRatesString[i]) == TI_OK)
-        {
-            eMaxRate = TI_MAX ((ENetRate)pRatesString[i], eMaxRate);
-        }
-    }
-
-    return eMaxRate;
-}
-
-/************************************************************************
- *                        getMaxActiveRate                          *
- ************************************************************************
-DESCRIPTION: Goes over an array of network rates and returns the max active rate
-                                                                                                   
-INPUT:      pRates      -   Rate array
-
-OUTPUT:     
-
-
-RETURN:     Max active rate (in network units)
-
-************************************************************************/
-ENetRate rate_GetMaxActiveFromStr (TI_UINT8 *pRatesString, TI_UINT32 len, ENetRate eMaxRate)
-{
-    TI_UINT32   i;
-    
-    for (i = 0; i < len; i++)
-    {
-        if (NET_ACTIVE_RATE (pRatesString[i]) && rate_ValidateNet ((ENetRate)pRatesString[i]) == TI_OK)
-        {
-            eMaxRate = TI_MAX ((ENetRate)pRatesString[i], eMaxRate);
-        }
-    }
-
-    return eMaxRate;
-}
-
-TI_UINT32 rate_DrvToNumber (ERate eRate)
-{
-    switch (eRate)
-    {
-        case DRV_RATE_1M:
-            return 1;
-
-        case DRV_RATE_2M:
-            return 2;
-
-        case DRV_RATE_5_5M:
-            return 5;
-
-        case DRV_RATE_11M:
-            return 11;
-
-        case DRV_RATE_22M:
-            return 22;
-
-        case DRV_RATE_6M:
-            return 6;
-
-        case DRV_RATE_9M:
-            return 9;
-
-        case DRV_RATE_12M:
-            return 12;
-
-        case DRV_RATE_18M:
-            return 18;
-
-        case DRV_RATE_24M:
-            return 24;
-
-        case DRV_RATE_36M:
-            return 36;
-
-        case DRV_RATE_48M:
-            return 48;
-
-        case DRV_RATE_54M:
-            return 54;
-
-        case DRV_RATE_MCS_0:
-            return 6;
-    
-        case DRV_RATE_MCS_1:
-            return 13;
-    
-        case DRV_RATE_MCS_2:
-            return 19;
-    
-        case DRV_RATE_MCS_3:
-            return 26;
-    
-        case DRV_RATE_MCS_4:
-            return 39;
-    
-        case DRV_RATE_MCS_5:
-            return 52;
-    
-        case DRV_RATE_MCS_6:
-            return 58;
-    
-        case DRV_RATE_MCS_7:
-            return 65;
-
-        default:
-            return 0;
-    }
-}
-
-/************************************************************************
- *                        bitMapToNetworkStringRates                    *
- ************************************************************************
-DESCRIPTION: Converts bit map to the rates string
-                                                                                                   
-INPUT:      suppRatesBitMap     -   bit map of supported rates
-            basicRatesBitMap    -   bit map of basic rates
-
-OUTPUT:     string - network format rates array,
-            len - rates array length
-            firstOFDMrateLoc - the index of first OFDM rate in the rates array.
-
-
-RETURN:     None
-
-************************************************************************/
-TI_STATUS rate_DrvBitmapToNetStr (TI_UINT32   uSuppRatesBitMap,
-                                  TI_UINT32   uBasicRatesBitMap,
-                                  TI_UINT8    *string,
-                                  TI_UINT32   *len,
-                                  TI_UINT32   *pFirstOfdmRate)
-{
-    TI_UINT32   i = 0;
-    
-    if (uSuppRatesBitMap & DRV_RATE_MASK_1_BARKER)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_1_BARKER)
-        {
-            string[i++] = NET_RATE_1M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_1M;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_2_BARKER)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_2_BARKER)
-        {
-            string[i++] = NET_RATE_2M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_2M;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_5_5_CCK)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_5_5_CCK)
-        {
-            string[i++] = NET_RATE_5_5M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_5_5M;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_11_CCK)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_11_CCK)
-        {
-            string[i++] = NET_RATE_11M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_11M;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_22_PBCC)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_22_PBCC)
-        {
-            string[i++] = NET_RATE_22M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_22M;
-        }
-    }
-
-    *pFirstOfdmRate = i;
-    
-    if (uSuppRatesBitMap & DRV_RATE_MASK_6_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_6_OFDM)
-        {
-            string[i++] = NET_RATE_6M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_6M;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_9_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_9_OFDM)
-        {
-            string[i++] = NET_RATE_9M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_9M;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_12_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_12_OFDM)
-        {
-            string[i++] = NET_RATE_12M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_12M;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_18_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_18_OFDM)
-        {
-            string[i++] = NET_RATE_18M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_18M;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_24_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_24_OFDM)
-        {
-            string[i++] = NET_RATE_24M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_24M;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_36_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_36_OFDM)
-        {
-            string[i++] = NET_RATE_36M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_36M;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_48_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_48_OFDM)
-        {
-            string[i++] = NET_RATE_48M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_48M;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_54_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_54_OFDM)
-        {
-            string[i++] = NET_RATE_54M_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_54M;
-        }
-    }
-
-    *len = i;
-    
-    return TI_OK;
-}
-
-
-/************************************************************************
- *                        bitMapToNetworkStringRates                    *
- ************************************************************************
-DESCRIPTION: Converts bit map to the rates string
-                                                                                                   
-INPUT:      suppRatesBitMap     -   bit map of supported rates
-            basicRatesBitMap    -   bit map of basic rates
-
-OUTPUT:     string - network format rates array,
-            len - rates array length
-            firstOFDMrateLoc - the index of first OFDM rate in the rates array.
-
-
-RETURN:     None
-
-************************************************************************/
-TI_STATUS rate_DrvBitmapToNetStrIncluding11n (TI_UINT32   uSuppRatesBitMap,
-											  TI_UINT32   uBasicRatesBitMap,
-											  TI_UINT8    *string,
-											  TI_UINT32   *pFirstOfdmRate)
-{
-    TI_UINT32   i = 0;
-
-
-	rate_DrvBitmapToNetStr (uSuppRatesBitMap, uBasicRatesBitMap, string, &i, pFirstOfdmRate);
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_MCS_0_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_MCS_0_OFDM)
-        {
-            string[i++] = NET_RATE_MCS0_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_MCS0;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_MCS_1_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_MCS_1_OFDM)
-        {
-            string[i++] = NET_RATE_MCS1_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_MCS1;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_MCS_2_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_MCS_2_OFDM)
-        {
-            string[i++] = NET_RATE_MCS2_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_MCS2;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_MCS_3_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_MCS_3_OFDM)
-        {
-            string[i++] = NET_RATE_MCS3_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_MCS3;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_MCS_4_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_MCS_4_OFDM)
-        {
-            string[i++] = NET_RATE_MCS4_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_MCS4;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_MCS_5_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_MCS_5_OFDM)
-        {
-            string[i++] = NET_RATE_MCS5_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_MCS5;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_MCS_6_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_MCS_6_OFDM)
-        {
-            string[i++] = NET_RATE_MCS6_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_MCS6;
-        }
-    }
-
-    if (uSuppRatesBitMap & DRV_RATE_MASK_MCS_7_OFDM)
-    {
-        if (uBasicRatesBitMap & DRV_RATE_MASK_MCS_7_OFDM)
-        {
-            string[i++] = NET_RATE_MCS7_BASIC;
-        }
-        else
-        {
-            string[i++] = NET_RATE_MCS7;
-        }
-    }
-
-    
-    return TI_OK;
-}
-
-/************************************************************************
- *                        networkStringToBitMapSuppRates                *
- ************************************************************************
-DESCRIPTION: Converts supported rates string to the bit map
-                                                                                                   
-INPUT:      string      -   array of rates in the network format
-            len - array length
-
-OUTPUT:     bitMap - bit map of rates.
-
-RETURN:     None
-
-************************************************************************/
-TI_STATUS rate_NetStrToDrvBitmap (TI_UINT32 *pBitMap, TI_UINT8 *string, TI_UINT32 len)
-{
-    TI_UINT32   i;
-    
-    *pBitMap = 0;
-    
-    for (i = 0; i < len; i++)
-    {
-        switch (string[i])
-        {
-            case NET_RATE_1M:
-            case NET_RATE_1M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_1_BARKER;
-                break;
-
-            case NET_RATE_2M:
-            case NET_RATE_2M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_2_BARKER;
-                break;
-
-            case NET_RATE_5_5M:
-            case NET_RATE_5_5M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_5_5_CCK;
-                break;
-
-            case NET_RATE_11M:
-            case NET_RATE_11M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_11_CCK;
-                break;
-
-            case NET_RATE_22M:
-            case NET_RATE_22M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_22_PBCC;
-                break;
-
-            case NET_RATE_6M:
-            case NET_RATE_6M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_6_OFDM;
-                break;
-
-            case NET_RATE_9M:
-            case NET_RATE_9M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_9_OFDM;
-                break;
-
-            case NET_RATE_12M:
-            case NET_RATE_12M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_12_OFDM;
-                break;
-
-            case NET_RATE_18M:
-            case NET_RATE_18M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_18_OFDM;
-                break;
-
-            case NET_RATE_24M:
-            case NET_RATE_24M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_24_OFDM;
-                break;
-
-            case NET_RATE_36M:
-            case NET_RATE_36M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_36_OFDM;
-                break;
-
-            case NET_RATE_48M:
-            case NET_RATE_48M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_48_OFDM;
-                break;
-
-            case NET_RATE_54M:
-            case NET_RATE_54M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_54_OFDM;
-                break;
-
-            case NET_RATE_MCS0:
-            case NET_RATE_MCS0_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_0_OFDM;
-                break;
-    
-            case NET_RATE_MCS1:
-            case NET_RATE_MCS1_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_1_OFDM;
-                break;
-    
-            case NET_RATE_MCS2:
-            case NET_RATE_MCS2_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_2_OFDM;
-                break;
-    
-            case NET_RATE_MCS3:
-            case NET_RATE_MCS3_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_3_OFDM;
-                break;
-    
-            case NET_RATE_MCS4:
-            case NET_RATE_MCS4_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_4_OFDM;
-                break;
-    
-            case NET_RATE_MCS5:
-            case NET_RATE_MCS5_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_5_OFDM;
-                break;
-    
-            case NET_RATE_MCS6:
-            case NET_RATE_MCS6_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_6_OFDM;
-                break;
-    
-            case NET_RATE_MCS7:
-            case NET_RATE_MCS7_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_7_OFDM;
-                break;
-
-            default:
-                break;
-        }
-    }
-
-    return TI_OK;
-}
-
-/************************************************************************
- *                        networkStringToBitMapBasicRates               *
- ************************************************************************
-DESCRIPTION: Converts basic rates string to the bit map
-                                                                                                   
-INPUT:      string      -   array of rates in the network format
-            len - array length
-
-OUTPUT:     bitMap - bit map of rates.
-
-RETURN:     None
-
-************************************************************************/
-TI_STATUS rate_NetBasicStrToDrvBitmap (TI_UINT32 *pBitMap, TI_UINT8 *string, TI_UINT32 len)
-{
-    TI_UINT32   i;
-    
-    *pBitMap = 0;
-    
-    for (i = 0; i < len; i++)
-    {
-        switch (string[i])
-        {
-            case NET_RATE_1M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_1_BARKER;
-                break;
-
-            case NET_RATE_2M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_2_BARKER;
-                break;
-
-            case NET_RATE_5_5M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_5_5_CCK;
-                break;
-
-            case NET_RATE_11M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_11_CCK;
-                break;
-
-            case NET_RATE_22M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_22_PBCC;
-                break;
-
-            case NET_RATE_6M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_6_OFDM;
-                break;
-
-            case NET_RATE_9M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_9_OFDM;
-                break;
-
-            case NET_RATE_12M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_12_OFDM;
-                break;
-
-            case NET_RATE_18M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_18_OFDM;
-                break;
-
-            case NET_RATE_24M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_24_OFDM;
-                break;
-
-            case NET_RATE_36M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_36_OFDM;
-                break;
-
-            case NET_RATE_48M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_48_OFDM;
-                break;
-
-            case NET_RATE_54M_BASIC:
-                *pBitMap |= DRV_RATE_MASK_54_OFDM;
-                break;
-
-            case NET_RATE_MCS0_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_0_OFDM;
-                break;
-    
-            case NET_RATE_MCS1_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_1_OFDM;
-                break;
-    
-            case NET_RATE_MCS2_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_2_OFDM;
-                break;
-    
-            case NET_RATE_MCS3_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_3_OFDM;
-                break;
-    
-            case NET_RATE_MCS4_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_4_OFDM;
-                break;
-    
-            case NET_RATE_MCS5_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_5_OFDM;
-                break;
-    
-            case NET_RATE_MCS6_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_6_OFDM;
-                break;
-    
-            case NET_RATE_MCS7_BASIC:
-                *pBitMap |= DRV_RATE_MASK_MCS_7_OFDM;
-                break;
-    
-            default:
-                break;
-        }
-    }
-
-    return TI_OK;
-}
-
-
-/************************************************************************
- *                        rate_McsNetStrToDrvBitmap                     *
- ************************************************************************
-DESCRIPTION: Converts MCS IEs rates bit map to driver bit map. 
-             supported only MCS0 - MCS7 
-                                                                                                   
-INPUT:      string - HT capabilities IE in the network format
-            len - IE array length
-
-OUTPUT:     bitMap - bit map of rates.
-
-RETURN:     None
-
-************************************************************************/
-TI_STATUS rate_McsNetStrToDrvBitmap (TI_UINT32 *pBitMap, TI_UINT8 *string)
-{
-    *pBitMap = string[0];
-
-    *pBitMap = *pBitMap << (DRV_RATE_MCS_0 - 1);
-
-    return TI_OK;
-}
-
-
-TI_STATUS rate_DrvBitmapToHwBitmap (TI_UINT32 uDrvBitMap, TI_UINT32 *pHwBitmap)
-{
-    TI_UINT32   uHwBitMap = 0;
-    
-    if (uDrvBitMap & DRV_RATE_MASK_1_BARKER)
-    {
-        uHwBitMap |= HW_BIT_RATE_1MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_2_BARKER)
-    {
-        uHwBitMap |= HW_BIT_RATE_2MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_5_5_CCK)
-    {
-        uHwBitMap |= HW_BIT_RATE_5_5MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_11_CCK)
-    {
-        uHwBitMap |= HW_BIT_RATE_11MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_22_PBCC)
-    {
-        uHwBitMap |= HW_BIT_RATE_22MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_6_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_6MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_9_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_9MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_12_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_12MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_18_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_18MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_24_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_24MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_36_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_36MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_48_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_48MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_54_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_54MBPS;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_MCS_0_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_MCS_0;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_MCS_1_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_MCS_1;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_MCS_2_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_MCS_2;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_MCS_3_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_MCS_3;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_MCS_4_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_MCS_4;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_MCS_5_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_MCS_5;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_MCS_6_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_MCS_6;
-    }
-
-    if (uDrvBitMap & DRV_RATE_MASK_MCS_7_OFDM)
-    {
-        uHwBitMap |= HW_BIT_RATE_MCS_7;
-    }
-
-    *pHwBitmap = uHwBitMap;
-    
-    return TI_OK;
-}
-
-TI_STATUS rate_PolicyToDrv (ETxRateClassId ePolicyRate, ERate *eAppRate)
-{
-    ERate     Rate = DRV_RATE_AUTO;
-    TI_STATUS status = TI_OK;
-
-    switch (ePolicyRate)
-    {
-        case txPolicy1    :   Rate =  DRV_RATE_1M   ;    break;
-        case txPolicy2    :   Rate =  DRV_RATE_2M   ;    break;
-        case txPolicy5_5  :   Rate =  DRV_RATE_5_5M ;    break;
-        case txPolicy11   :   Rate =  DRV_RATE_11M  ;    break;
-        case txPolicy22   :   Rate =  DRV_RATE_22M  ;    break;
-        case txPolicy6    :   Rate =  DRV_RATE_6M   ;    break;
-        case txPolicy9    :   Rate =  DRV_RATE_9M   ;    break;
-        case txPolicy12   :   Rate =  DRV_RATE_12M  ;    break;
-        case txPolicy18   :   Rate =  DRV_RATE_18M  ;    break;
-        case txPolicy24   :   Rate =  DRV_RATE_24M  ;    break;
-        case txPolicy36   :   Rate =  DRV_RATE_36M  ;    break;
-        case txPolicy48   :   Rate =  DRV_RATE_48M  ;    break;
-        case txPolicy54   :   Rate =  DRV_RATE_54M  ;    break;
-        case txPolicyMcs0 :   Rate =  DRV_RATE_MCS_0;    break;
-        case txPolicyMcs1 :   Rate =  DRV_RATE_MCS_1;    break;
-        case txPolicyMcs2 :   Rate =  DRV_RATE_MCS_2;    break;
-        case txPolicyMcs3 :   Rate =  DRV_RATE_MCS_3;    break;
-        case txPolicyMcs4 :   Rate =  DRV_RATE_MCS_4;    break;
-        case txPolicyMcs5 :   Rate =  DRV_RATE_MCS_5;    break;
-        case txPolicyMcs6 :   Rate =  DRV_RATE_MCS_6;    break;
-        case txPolicyMcs7 :   Rate =  DRV_RATE_MCS_7;    break;
-
-        default:
-            status = TI_NOK;
-            break;
-    }
-
-    if (status == TI_OK)
-        *eAppRate = Rate;
-    else
-        *eAppRate = DRV_RATE_INVALID; 
-
-    return status;
-}
-
-
-TI_UINT32 rate_BasicToDrvBitmap (EBasicRateSet eBasicRateSet, TI_BOOL bDot11a)
-{
-    if (!bDot11a)
-    {
-        switch (eBasicRateSet)
-        {
-            case BASIC_RATE_SET_1_2:
-                return DRV_RATE_MASK_1_BARKER | 
-                       DRV_RATE_MASK_2_BARKER;
-
-            case BASIC_RATE_SET_1_2_5_5_11:
-                return DRV_RATE_MASK_1_BARKER | 
-                       DRV_RATE_MASK_2_BARKER | 
-                       DRV_RATE_MASK_5_5_CCK | 
-                       DRV_RATE_MASK_11_CCK;
-
-            case BASIC_RATE_SET_UP_TO_12:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM;
-
-            case BASIC_RATE_SET_UP_TO_18:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM;
-
-            case BASIC_RATE_SET_UP_TO_24:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM;
-
-            case BASIC_RATE_SET_UP_TO_36:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM;
-
-            case BASIC_RATE_SET_UP_TO_48:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM;
-
-            case BASIC_RATE_SET_UP_TO_54:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM |
-                       DRV_RATE_MASK_54_OFDM;
-
-            case BASIC_RATE_SET_6_12_24:
-                return DRV_RATE_MASK_6_OFDM | 
-                       DRV_RATE_MASK_12_OFDM | 
-                       DRV_RATE_MASK_24_OFDM;
-
-            case BASIC_RATE_SET_1_2_5_5_6_11_12_24:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_24_OFDM;
-
-            case BASIC_RATE_SET_ALL_MCS_RATES:
-                return DRV_RATE_MASK_MCS_0_OFDM |
-                       DRV_RATE_MASK_MCS_1_OFDM |
-                       DRV_RATE_MASK_MCS_2_OFDM |
-                       DRV_RATE_MASK_MCS_3_OFDM |
-                       DRV_RATE_MASK_MCS_4_OFDM |
-                       DRV_RATE_MASK_MCS_5_OFDM |
-                       DRV_RATE_MASK_MCS_6_OFDM |
-                       DRV_RATE_MASK_MCS_7_OFDM |
-                       DRV_RATE_MASK_1_BARKER   | 
-                       DRV_RATE_MASK_2_BARKER   |
-                       DRV_RATE_MASK_5_5_CCK    |  
-                       DRV_RATE_MASK_11_CCK;
-
-
-            default:
-                return DRV_RATE_MASK_1_BARKER | 
-                       DRV_RATE_MASK_2_BARKER;
-        }
-    }
-    else
-    {
-        switch (eBasicRateSet)
-        {
-            case BASIC_RATE_SET_UP_TO_12:
-                return DRV_RATE_MASK_6_OFDM | 
-                       DRV_RATE_MASK_9_OFDM | 
-                       DRV_RATE_MASK_12_OFDM;
-
-            case BASIC_RATE_SET_UP_TO_18:
-                return DRV_RATE_MASK_6_OFDM | 
-                       DRV_RATE_MASK_9_OFDM | 
-                       DRV_RATE_MASK_12_OFDM | 
-                       DRV_RATE_MASK_18_OFDM;
-
-            case BASIC_RATE_SET_UP_TO_24:
-                return DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM;
-
-            case BASIC_RATE_SET_UP_TO_36:
-                return DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM;
-
-            case BASIC_RATE_SET_UP_TO_48:
-                return DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM;
-
-            case BASIC_RATE_SET_UP_TO_54:
-                return DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM |
-                       DRV_RATE_MASK_54_OFDM;
-
-            case BASIC_RATE_SET_6_12_24:
-                return DRV_RATE_MASK_6_OFDM | 
-                       DRV_RATE_MASK_12_OFDM | 
-                       DRV_RATE_MASK_24_OFDM;
-
-            case BASIC_RATE_SET_ALL_MCS_RATES:
-                return DRV_RATE_MASK_MCS_0_OFDM |
-                       DRV_RATE_MASK_MCS_1_OFDM |
-                       DRV_RATE_MASK_MCS_2_OFDM |
-                       DRV_RATE_MASK_MCS_3_OFDM |
-                       DRV_RATE_MASK_MCS_4_OFDM |
-                       DRV_RATE_MASK_MCS_5_OFDM |
-                       DRV_RATE_MASK_MCS_6_OFDM |
-                       DRV_RATE_MASK_MCS_7_OFDM |
-                       DRV_RATE_MASK_6_OFDM | 
-                       DRV_RATE_MASK_12_OFDM | 
-                       DRV_RATE_MASK_24_OFDM;
-
-            default:
-                return DRV_RATE_MASK_6_OFDM | 
-                       DRV_RATE_MASK_12_OFDM | 
-                       DRV_RATE_MASK_24_OFDM;
-        }
-    }
-}
-
-TI_UINT32 rate_SupportedToDrvBitmap (ESupportedRateSet eSupportedRateSet, TI_BOOL bDot11a)
-{
-    if (!bDot11a)
-    {
-        switch (eSupportedRateSet)
-        {
-            case SUPPORTED_RATE_SET_1_2:
-                return DRV_RATE_MASK_1_BARKER | 
-                       DRV_RATE_MASK_2_BARKER;
-
-            case SUPPORTED_RATE_SET_1_2_5_5_11:
-                return DRV_RATE_MASK_1_BARKER | 
-                       DRV_RATE_MASK_2_BARKER | 
-                       DRV_RATE_MASK_5_5_CCK | 
-                       DRV_RATE_MASK_11_CCK;
-
-            case SUPPORTED_RATE_SET_1_2_5_5_11_22:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_22_PBCC;
-
-            case SUPPORTED_RATE_SET_UP_TO_18:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM;
-
-            case SUPPORTED_RATE_SET_UP_TO_24:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM;
-
-            case SUPPORTED_RATE_SET_UP_TO_36:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM;
-
-            case SUPPORTED_RATE_SET_UP_TO_48:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM;
-
-            case SUPPORTED_RATE_SET_UP_TO_54:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM |
-                       DRV_RATE_MASK_54_OFDM;
-
-            case SUPPORTED_RATE_SET_ALL:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_22_PBCC |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM |
-                       DRV_RATE_MASK_54_OFDM;
-
-            case SUPPORTED_RATE_SET_ALL_OFDM:
-                return DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM |
-                       DRV_RATE_MASK_54_OFDM;
-                       
-            case SUPPORTED_RATE_SET_ALL_MCS_RATES:
-                return DRV_RATE_MASK_MCS_0_OFDM |
-                       DRV_RATE_MASK_MCS_1_OFDM |
-                       DRV_RATE_MASK_MCS_2_OFDM |
-                       DRV_RATE_MASK_MCS_3_OFDM |
-                       DRV_RATE_MASK_MCS_4_OFDM |
-                       DRV_RATE_MASK_MCS_5_OFDM |
-                       DRV_RATE_MASK_MCS_6_OFDM |
-                       DRV_RATE_MASK_MCS_7_OFDM |
-                       DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_22_PBCC |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM |
-                       DRV_RATE_MASK_54_OFDM;
-
-            default:
-                return DRV_RATE_MASK_1_BARKER |
-                       DRV_RATE_MASK_2_BARKER |
-                       DRV_RATE_MASK_5_5_CCK |
-                       DRV_RATE_MASK_11_CCK |
-                       DRV_RATE_MASK_22_PBCC |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM |
-                       DRV_RATE_MASK_54_OFDM;
-        }
-    }
-    else
-    {
-        switch (eSupportedRateSet)
-        {
-            case SUPPORTED_RATE_SET_UP_TO_18:
-                return DRV_RATE_MASK_6_OFDM | 
-                       DRV_RATE_MASK_9_OFDM | 
-                       DRV_RATE_MASK_12_OFDM | 
-                       DRV_RATE_MASK_18_OFDM;
-
-            case SUPPORTED_RATE_SET_UP_TO_24:
-                return DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM;
-
-            case SUPPORTED_RATE_SET_UP_TO_36:
-                return DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM;
-
-            case SUPPORTED_RATE_SET_UP_TO_48:
-                return DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM;
-
-            case SUPPORTED_RATE_SET_UP_TO_54:
-                return DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM |
-                       DRV_RATE_MASK_54_OFDM;
-                       
-            case SUPPORTED_RATE_SET_ALL:
-            case SUPPORTED_RATE_SET_ALL_OFDM:
-                return DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM |
-                       DRV_RATE_MASK_54_OFDM;
-                       
-            case SUPPORTED_RATE_SET_ALL_MCS_RATES:
-                return DRV_RATE_MASK_MCS_0_OFDM |
-                       DRV_RATE_MASK_MCS_1_OFDM |
-                       DRV_RATE_MASK_MCS_2_OFDM |
-                       DRV_RATE_MASK_MCS_3_OFDM |
-                       DRV_RATE_MASK_MCS_4_OFDM |
-                       DRV_RATE_MASK_MCS_5_OFDM |
-                       DRV_RATE_MASK_MCS_6_OFDM |
-                       DRV_RATE_MASK_MCS_7_OFDM |
-                       DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM |
-                       DRV_RATE_MASK_54_OFDM;
-
-            default:
-                return DRV_RATE_MASK_6_OFDM |
-                       DRV_RATE_MASK_9_OFDM |
-                       DRV_RATE_MASK_12_OFDM |
-                       DRV_RATE_MASK_18_OFDM |
-                       DRV_RATE_MASK_24_OFDM |
-                       DRV_RATE_MASK_36_OFDM |
-                       DRV_RATE_MASK_48_OFDM |
-                       DRV_RATE_MASK_54_OFDM;
-        }
-    }
-}
-
-TI_STATUS rate_ValidateVsBand (TI_UINT32 *pSupportedMask, TI_UINT32 *pBasicMask, TI_BOOL bDot11a)
-{
-    if (bDot11a)
-    {
-        *pSupportedMask &= ~
-            (
-                DRV_RATE_MASK_1_BARKER |
-                DRV_RATE_MASK_2_BARKER |
-                DRV_RATE_MASK_5_5_CCK |
-                DRV_RATE_MASK_11_CCK |
-                DRV_RATE_MASK_22_PBCC
-            );
-    }
-
-    *pBasicMask &= *pSupportedMask;
-
-    if (*pBasicMask == 0)
-    {
-        if (bDot11a)
-        {
-            *pBasicMask = DRV_RATE_MASK_6_OFDM | DRV_RATE_MASK_12_OFDM | DRV_RATE_MASK_24_OFDM;
-        }
-        else
-        {
-            *pBasicMask = DRV_RATE_MASK_1_BARKER | DRV_RATE_MASK_2_BARKER;
-        }
-    }
-
-    return TI_OK;
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name:    RateNumberToHost
-Routine Description:
-Arguments:
-Return Value:    None
------------------------------------------------------------------------------*/
-ERate rate_NumberToDrv (TI_UINT32 rate)
-{
-    switch (rate)
-    {
-        case 0x1:
-            return DRV_RATE_1M;
-
-        case 0x2:
-            return DRV_RATE_2M;
-
-        case 0x5:
-            return DRV_RATE_5_5M;
-
-        case 0xB:
-            return DRV_RATE_11M;
-
-        case 0x16:
-            return DRV_RATE_22M;
-
-        case 0x6:
-            return DRV_RATE_6M;
-
-        case 0x9:
-            return DRV_RATE_9M;
-
-        case 0xC:
-            return DRV_RATE_12M;
-
-        case 0x12:
-            return DRV_RATE_18M;
-
-        case 0x18:
-            return DRV_RATE_24M;
-
-        case 0x24:
-            return DRV_RATE_36M;
-
-        case 0x30:
-            return DRV_RATE_48M;
-
-        case 0x36:
-            return DRV_RATE_54M;
-
-        /* MCS rate */
-        case 0x7:
-            return DRV_RATE_MCS_0;
-
-        case 0xD:
-            return DRV_RATE_MCS_1;
-
-        case 0x13:
-            return DRV_RATE_MCS_2;
-
-        case 0x1A:
-            return DRV_RATE_MCS_3;
-
-        case 0x27:
-            return DRV_RATE_MCS_4;
-
-        case 0x34:
-            return DRV_RATE_MCS_5;
-
-        case 0x3A:
-            return DRV_RATE_MCS_6;
-
-        case 0x41:
-            return DRV_RATE_MCS_7;
-
-        default:
-            return DRV_RATE_6M;
-    }
-}
-
-TI_UINT32 rate_GetDrvBitmapForDefaultBasicSet ()
-{
-    return rate_BasicToDrvBitmap (BASIC_RATE_SET_1_2_5_5_11, TI_FALSE);
-}
-
-TI_UINT32 rate_GetDrvBitmapForDefaultSupporteSet ()
-{
-    return rate_SupportedToDrvBitmap (SUPPORTED_RATE_SET_1_2_5_5_11, TI_FALSE);
-}
-
diff --git a/wl1271/utils/rate.h b/wl1271/utils/rate.h
deleted file mode 100644
index 435d3d5..0000000
--- a/wl1271/utils/rate.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * rate.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file  rate.h
- *  \brief Rate conversion
- *
- *  \see   rate.c
- */
-
-#ifndef RATE_H
-#define RATE_H
-
-#include "TWDriver.h"
-
-
-typedef enum
-{
-    NET_BASIC_MASK      = 0x80,
-    NET_RATE_AUTO       = 0x00,
-    NET_RATE_1M         = 0x02,
-    NET_RATE_2M         = 0x04,
-    NET_RATE_5_5M       = 0x0B,
-    NET_RATE_11M        = 0x16,
-    NET_RATE_22M        = 0x2C,
-    NET_RATE_6M         = 0x0C,
-    NET_RATE_9M         = 0x12,
-    NET_RATE_12M        = 0x18,
-    NET_RATE_18M        = 0x24,
-    NET_RATE_24M        = 0x30,
-    NET_RATE_36M        = 0x48,
-    NET_RATE_48M        = 0x60,
-    NET_RATE_54M        = 0x6C,
-    NET_RATE_MCS0       = 0x0D, /* MCS0 6.5M */
-    NET_RATE_MCS1       = 0x1A, /* MCS1 13M */
-    NET_RATE_MCS2       = 0x27, /* MCS2 19.5M */
-    NET_RATE_MCS3       = 0x34, /* MCS3 26M */
-    NET_RATE_MCS4       = 0x4E, /* MCS4 39M */
-    NET_RATE_MCS5       = 0x68, /* MCS5 52M */
-    NET_RATE_MCS6       = 0x75, /* MCS6 58.5M */
-    NET_RATE_MCS7       = 0x7F  /* MCS7 65M */
-
-} ENetRate;
-
-
-typedef enum 
-{
-    NET_RATE_1M_BASIC   = (NET_RATE_1M   | NET_BASIC_MASK),
-    NET_RATE_2M_BASIC   = (NET_RATE_2M   | NET_BASIC_MASK),
-    NET_RATE_5_5M_BASIC = (NET_RATE_5_5M | NET_BASIC_MASK),
-    NET_RATE_11M_BASIC  = (NET_RATE_11M  | NET_BASIC_MASK),
-    NET_RATE_22M_BASIC  = (NET_RATE_22M  | NET_BASIC_MASK),
-    NET_RATE_6M_BASIC   = (NET_RATE_6M   | NET_BASIC_MASK),
-    NET_RATE_9M_BASIC   = (NET_RATE_9M   | NET_BASIC_MASK),
-    NET_RATE_12M_BASIC  = (NET_RATE_12M  | NET_BASIC_MASK),
-    NET_RATE_18M_BASIC  = (NET_RATE_18M  | NET_BASIC_MASK),
-    NET_RATE_24M_BASIC  = (NET_RATE_24M  | NET_BASIC_MASK),
-    NET_RATE_36M_BASIC  = (NET_RATE_36M  | NET_BASIC_MASK),
-    NET_RATE_48M_BASIC  = (NET_RATE_48M  | NET_BASIC_MASK),
-    NET_RATE_54M_BASIC  = (NET_RATE_54M  | NET_BASIC_MASK),
-    NET_RATE_MCS0_BASIC  = (NET_RATE_MCS0  | NET_BASIC_MASK),
-    NET_RATE_MCS1_BASIC  = (NET_RATE_MCS1  | NET_BASIC_MASK),
-    NET_RATE_MCS2_BASIC  = (NET_RATE_MCS2  | NET_BASIC_MASK),
-    NET_RATE_MCS3_BASIC  = (NET_RATE_MCS3  | NET_BASIC_MASK),
-    NET_RATE_MCS4_BASIC  = (NET_RATE_MCS4  | NET_BASIC_MASK),
-    NET_RATE_MCS5_BASIC  = (NET_RATE_MCS5  | NET_BASIC_MASK),
-    NET_RATE_MCS6_BASIC  = (NET_RATE_MCS6  | NET_BASIC_MASK),
-    NET_RATE_MCS7_BASIC  = (NET_RATE_MCS7  | NET_BASIC_MASK)
-
-} ENetRateBasic;
-
-
-typedef enum
-{
-    BASIC_RATE_SET_1_2                  = 0,
-    BASIC_RATE_SET_1_2_5_5_11           = 1,
-    BASIC_RATE_SET_UP_TO_12             = 2,
-    BASIC_RATE_SET_UP_TO_18             = 3,
-    BASIC_RATE_SET_1_2_5_5_6_11_12_24   = 4,
-    BASIC_RATE_SET_UP_TO_36             = 5,
-    BASIC_RATE_SET_UP_TO_48             = 6,
-    BASIC_RATE_SET_UP_TO_54             = 7,
-    BASIC_RATE_SET_UP_TO_24             = 8,
-    BASIC_RATE_SET_6_12_24              = 9,
-    BASIC_RATE_SET_ALL_MCS_RATES        = 10
-} EBasicRateSet;
-
-
-/* Keep increasing define values - related to increasing suported rates */
-typedef enum
-{
-    SUPPORTED_RATE_SET_1_2              = 0,
-    SUPPORTED_RATE_SET_1_2_5_5_11       = 1,
-    SUPPORTED_RATE_SET_1_2_5_5_11_22    = 2,
-    SUPPORTED_RATE_SET_UP_TO_18         = 3,
-    SUPPORTED_RATE_SET_UP_TO_24         = 4,
-    SUPPORTED_RATE_SET_UP_TO_36         = 5,
-    SUPPORTED_RATE_SET_UP_TO_48         = 6,
-    SUPPORTED_RATE_SET_UP_TO_54         = 7,
-    SUPPORTED_RATE_SET_ALL              = 8,
-    SUPPORTED_RATE_SET_ALL_OFDM         = 9,
-    SUPPORTED_RATE_SET_ALL_MCS_RATES    = 10
-
-} ESupportedRateSet;
-
-
-typedef enum
-{
-    DRV_MODULATION_NONE     = 0,
-    DRV_MODULATION_CCK      = 1,
-    DRV_MODULATION_PBCC     = 2,
-    DRV_MODULATION_QPSK     = 3,
-    DRV_MODULATION_OFDM     = 4
-
-} EModulationType;
-
-
-#define NET_BASIC_RATE(rate)       ((rate) & NET_BASIC_MASK)
-#define NET_ACTIVE_RATE(rate)      (!NET_BASIC_RATE (rate))
-
-
-ERate     rate_NumberToDrv (TI_UINT32 rate);
-TI_UINT32 rate_DrvToNumber (ERate eRate);
-ERate     rate_NetToDrv (TI_UINT32 rate);
-ENetRate  rate_DrvToNet (ERate eRate);
-TI_STATUS rate_DrvBitmapToNetStr (TI_UINT32 uSuppRatesBitMap, TI_UINT32 uBasicRatesBitMap, TI_UINT8 *string, TI_UINT32 *len, TI_UINT32 *pFirstOfdmRate);
-TI_STATUS rate_DrvBitmapToNetStrIncluding11n (TI_UINT32 uSuppRatesBitMap, TI_UINT32 uBasicRatesBitMap, TI_UINT8 *string, TI_UINT32 *pFirstOfdmRate);
-TI_STATUS rate_NetStrToDrvBitmap (TI_UINT32 *pBitMap, TI_UINT8 *string, TI_UINT32 len);
-TI_STATUS rate_NetBasicStrToDrvBitmap (TI_UINT32 *pBitMap, TI_UINT8 *string, TI_UINT32 len);
-TI_STATUS rate_McsNetStrToDrvBitmap (TI_UINT32 *pBitMap, TI_UINT8 *string);
-TI_STATUS rate_DrvBitmapToHwBitmap (TI_UINT32 uDrvBitmap, TI_UINT32 *pHwBitmap);
-TI_STATUS rate_PolicyToDrv (ETxRateClassId ePolicyRate, ERate *eAppRate);
-TI_UINT32 rate_BasicToDrvBitmap (EBasicRateSet eBasicRateSet, TI_BOOL bDot11a);
-TI_UINT32 rate_SupportedToDrvBitmap (ESupportedRateSet eSupportedRateSet, TI_BOOL bDot11a);
-
-ERate     rate_GetMaxFromDrvBitmap (TI_UINT32 uBitMap);
-ENetRate  rate_GetMaxBasicFromStr (TI_UINT8 *pRatesString, TI_UINT32 len, ENetRate eMaxRate);
-ENetRate  rate_GetMaxActiveFromStr (TI_UINT8 *pRatesString, TI_UINT32 len, ENetRate eMaxRate);
-
-TI_STATUS rate_ValidateVsBand (TI_UINT32 *pSupportedMask, TI_UINT32 *pBasicMask, TI_BOOL bDot11a);
-
-TI_UINT32 rate_GetDrvBitmapForDefaultBasicSet (void);
-TI_UINT32 rate_GetDrvBitmapForDefaultSupporteSet (void);
-
-#endif
-
-
diff --git a/wl1271/utils/report.c b/wl1271/utils/report.c
deleted file mode 100644
index 2a3c548..0000000
--- a/wl1271/utils/report.c
+++ /dev/null
@@ -1,556 +0,0 @@
-/*
- * report.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file report.c
- *  \brief report module implementation
- *
- *  \see report.h
- */
-
-#define __FILE_ID__  FILE_ID_132
-#include "tidef.h"
-#include "osApi.h"
-#include "report.h"
-#include "commonTypes.h"
-#include "CmdInterfaceCodes.h"
-
-
-
-
-/************************************************************************
- *                        report_create                              	*
- ************************************************************************/
-TI_HANDLE report_Create (TI_HANDLE hOs)
-{
-    TReport *pReport;
-
-    pReport = os_memoryAlloc(hOs, sizeof(TReport));
-    if (!pReport)
-    {
-        return NULL;
-    }
-
-    pReport->hOs = hOs;
-
-    os_memoryZero(hOs, pReport->aSeverityTable, sizeof(pReport->aSeverityTable));
-    os_memoryZero(hOs, pReport->aFileEnable, sizeof(pReport->aFileEnable));
-
-
-#ifdef PRINTF_ROLLBACK
-
-	/* Fill the files names table */
-
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_0  ]),  "timer                   "  ,  sizeof("timer                   "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_1  ]),  "measurementMgr          "  ,  sizeof("measurementMgr          "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_2  ]),  "measurementMgrSM        "  ,  sizeof("measurementMgrSM        "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_3  ]),  "regulatoryDomain        "  ,  sizeof("regulatoryDomain        "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_4  ]),  "requestHandler          "  ,  sizeof("requestHandler          "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_5  ]),  "SoftGemini              "  ,  sizeof("SoftGemini              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_6  ]),  "spectrumMngmntMgr       "  ,  sizeof("spectrumMngmntMgr       "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_7  ]),  "SwitchChannel           "  ,  sizeof("SwitchChannel           "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_8  ]),  "roamingMngr             "  ,  sizeof("roamingMngr             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_9  ]),  "scanMngr                "  ,  sizeof("scanMngr                "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_10 ]),  "admCtrlXCC              "  ,  sizeof("admCtrlXCC              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_11 ]),  "XCCMngr                 "  ,  sizeof("XCCMngr                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_12 ]),  "XCCRMMngr               "  ,  sizeof("XCCRMMngr               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_13 ]),  "XCCTSMngr               "  ,  sizeof("XCCTSMngr               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_14 ]),  "rogueAp                 "  ,  sizeof("rogueAp                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_15 ]),  "TransmitPowerXCC        "  ,  sizeof("TransmitPowerXCC        "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_16 ]),  "admCtrl                 "  ,  sizeof("admCtrl                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_17 ]),  "admCtrlNone             "  ,  sizeof("admCtrlNone             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_18 ]),  "admCtrlWep              "  ,  sizeof("admCtrlWep              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_19 ]),  "admCtrlWpa              "  ,  sizeof("admCtrlWpa              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_20 ]),  "admCtrlWpa2             "  ,  sizeof("admCtrlWpa2             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_21 ]),  "apConn                  "  ,  sizeof("apConn                  "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_22 ]),  "broadcastKey802_1x      "  ,  sizeof("broadcastKey802_1x      "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_23 ]),  "broadcastKeyNone        "  ,  sizeof("broadcastKeyNone        "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_24 ]),  "broadcastKeySM          "  ,  sizeof("broadcastKeySM          "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_25 ]),  "conn                    "  ,  sizeof("conn                    "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_26 ]),  "connIbss                "  ,  sizeof("connIbss                "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_27 ]),  "connInfra               "  ,  sizeof("connInfra               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_28 ]),  "keyDerive               "  ,  sizeof("keyDerive               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_29 ]),  "keyDeriveAes            "  ,  sizeof("keyDeriveAes            "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_30 ]),  "keyDeriveCkip           "  ,  sizeof("keyDeriveCkip           "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_31 ]),  "keyDeriveTkip           "  ,  sizeof("keyDeriveTkip           "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_32 ]),  "keyDeriveWep            "  ,  sizeof("keyDeriveWep            "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_33 ]),  "keyParser               "  ,  sizeof("keyParser               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_34 ]),  "keyParserExternal       "  ,  sizeof("keyParserExternal       "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_35 ]),  "keyParserWep            "  ,  sizeof("keyParserWep            "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_36 ]),  "mainKeysSm              "  ,  sizeof("mainKeysSm              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_37 ]),  "mainSecKeysOnly         "  ,  sizeof("mainSecKeysOnly         "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_38 ]),  "mainSecNull             "  ,  sizeof("mainSecNull             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_39 ]),  "mainSecSm               "  ,  sizeof("mainSecSm               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_40 ]),  "rsn                     "  ,  sizeof("rsn                     "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_41 ]),  "sme                     "  ,  sizeof("sme                     "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_42 ]),  "smeSelect               "  ,  sizeof("smeSelect               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_43 ]),  "smeSm                   "  ,  sizeof("smeSm                   "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_44 ]),  "unicastKey802_1x        "  ,  sizeof("unicastKey802_1x        "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_45 ]),  "unicastKeyNone          "  ,  sizeof("unicastKeyNone          "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_46 ]),  "unicastKeySM            "  ,  sizeof("unicastKeySM            "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_47 ]),  "CmdDispatcher           "  ,  sizeof("CmdDispatcher           "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_48 ]),  "CmdHndlr                "  ,  sizeof("CmdHndlr                "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_49 ]),  "DrvMain                 "  ,  sizeof("DrvMain                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_50 ]),  "EvHandler               "  ,  sizeof("EvHandler               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_51 ]),  "Ctrl                    "  ,  sizeof("Ctrl                    "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_52 ]),  "GeneralUtil             "  ,  sizeof("GeneralUtil             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_53 ]),  "RateAdaptation          "  ,  sizeof("RateAdaptation          "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_54 ]),  "rx                      "  ,  sizeof("rx                      "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_55 ]),  "TrafficMonitor          "  ,  sizeof("TrafficMonitor          "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_56 ]),  "txCtrl                  "  ,  sizeof("txCtrl                  "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_57 ]),  "txCtrlParams            "  ,  sizeof("txCtrlParams            "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_58 ]),  "txCtrlServ              "  ,  sizeof("txCtrlServ              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_59 ]),  "TxDataClsfr             "  ,  sizeof("TxDataClsfr             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_60 ]),  "txDataQueue             "  ,  sizeof("txDataQueue             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_61 ]),  "txMgmtQueue             "  ,  sizeof("txMgmtQueue             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_62 ]),  "txPort                  "  ,  sizeof("txPort                  "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_63 ]),  "assocSM                 "  ,  sizeof("assocSM                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_64 ]),  "authSm                  "  ,  sizeof("authSm                  "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_65 ]),  "currBss                 "  ,  sizeof("currBss                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_66 ]),  "healthMonitor           "  ,  sizeof("healthMonitor           "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_67 ]),  "mlmeBuilder             "  ,  sizeof("mlmeBuilder             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_68 ]),  "mlmeParser              "  ,  sizeof("mlmeParser              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_69 ]),  "mlmeSm                  "  ,  sizeof("mlmeSm                  "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_70 ]),  "openAuthSm              "  ,  sizeof("openAuthSm              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_71 ]),  "PowerMgr                "  ,  sizeof("PowerMgr                "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_72 ]),  "PowerMgrDbgPrint        "  ,  sizeof("PowerMgrDbgPrint        "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_73 ]),  "PowerMgrKeepAlive       "  ,  sizeof("PowerMgrKeepAlive       "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_74 ]),  "qosMngr                 "  ,  sizeof("qosMngr                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_75 ]),  "roamingInt              "  ,  sizeof("roamingInt              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_76 ]),  "ScanCncn                "  ,  sizeof("ScanCncn                "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_77 ]),  "ScanCncnApp             "  ,  sizeof("ScanCncnApp             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_78 ]),  "ScanCncnOsSm            "  ,  sizeof("ScanCncnOsSm            "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_79 ]),  "ScanCncnSm              "  ,  sizeof("ScanCncnSm              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_80 ]),  "ScanCncnSmSpecific      "  ,  sizeof("ScanCncnSmSpecific      "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_81 ]),  "scanResultTable         "  ,  sizeof("scanResultTable         "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_82 ]),  "scr                     "  ,  sizeof("scr                     "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_83 ]),  "sharedKeyAuthSm         "  ,  sizeof("sharedKeyAuthSm         "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_84 ]),  "siteHash                "  ,  sizeof("siteHash                "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_85 ]),  "siteMgr                 "  ,  sizeof("siteMgr                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_86 ]),  "StaCap                  "  ,  sizeof("StaCap                  "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_87 ]),  "systemConfig            "  ,  sizeof("systemConfig            "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_88 ]),  "templates               "  ,  sizeof("templates               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_89 ]),  "trafficAdmControl       "  ,  sizeof("trafficAdmControl       "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_90 ]),  "CmdBld                  "  ,  sizeof("CmdBld                  "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_91 ]),  "CmdBldCfg               "  ,  sizeof("CmdBldCfg               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_92 ]),  "CmdBldCfgIE             "  ,  sizeof("CmdBldCfgIE             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_93 ]),  "CmdBldCmd               "  ,  sizeof("CmdBldCmd               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_94 ]),  "CmdBldCmdIE             "  ,  sizeof("CmdBldCmdIE             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_95 ]),  "CmdBldItr               "  ,  sizeof("CmdBldItr               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_96 ]),  "CmdBldItrIE             "  ,  sizeof("CmdBldItrIE             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_97 ]),  "CmdQueue                "  ,  sizeof("CmdQueue                "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_98 ]),  "RxQueue                 "  ,  sizeof("RxQueue                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_99 ]),  "txCtrlBlk               "  ,  sizeof("txCtrlBlk               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_100]),  "txHwQueue               "  ,  sizeof("txHwQueue               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_101]),  "CmdMBox                 "  ,  sizeof("CmdMBox                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_102]),  "eventMbox               "  ,  sizeof("eventMbox               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_103]),  "fwDebug                 "  ,  sizeof("fwDebug                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_104]),  "FwEvent                 "  ,  sizeof("FwEvent                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_105]),  "HwInit                  "  ,  sizeof("HwInit                  "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_106]),  "RxXfer                  "  ,  sizeof("RxXfer                  "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_107]),  "txResult                "  ,  sizeof("txResult                "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_108]),  "txXfer                  "  ,  sizeof("txXfer                  "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_109]),  "MacServices             "  ,  sizeof("MacServices             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_110]),  "MeasurementSrv          "  ,  sizeof("MeasurementSrv          "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_111]),  "measurementSrvDbgPrint  "  ,  sizeof("measurementSrvDbgPrint  "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_112]),  "MeasurementSrvSM        "  ,  sizeof("MeasurementSrvSM        "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_113]),  "PowerSrv                "  ,  sizeof("PowerSrv                "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_114]),  "PowerSrvSM              "  ,  sizeof("PowerSrvSM              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_115]),  "ScanSrv                 "  ,  sizeof("ScanSrv                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_116]),  "ScanSrvSM               "  ,  sizeof("ScanSrvSM               "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_117]),  "TWDriver                "  ,  sizeof("TWDriver                "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_118]),  "TWDriverCtrl            "  ,  sizeof("TWDriverCtrl            "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_119]),  "TWDriverRadio           "  ,  sizeof("TWDriverRadio           "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_120]),  "TWDriverTx              "  ,  sizeof("TWDriverTx              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_121]),  "TwIf                    "  ,  sizeof("TwIf                    "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_122]),  "SdioBusDrv              "  ,  sizeof("SdioBusDrv              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_123]),  "TxnQueue                "  ,  sizeof("TxnQueue                "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_124]),  "WspiBusDrv              "  ,  sizeof("WspiBusDrv              "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_125]),  "context                 "  ,  sizeof("context                 "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_126]),  "freq                    "  ,  sizeof("freq                    "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_127]),  "fsm                     "  ,  sizeof("fsm                     "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_128]),  "GenSM                   "  ,  sizeof("GenSM                   "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_129]),  "mem                     "  ,  sizeof("mem                     "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_130]),  "queue                   "  ,  sizeof("queue                   "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_131]),  "rate                    "  ,  sizeof("rate                    "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_132]),  "report                  "  ,  sizeof("report                  "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_133]),  "stack                   "  ,  sizeof("stack                   "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_134]),  "externalSec             "  ,  sizeof("externalSec             "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_135]),  "roamingMngr_autoSM      "  ,  sizeof("roamingMngr_autoSM      "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_136]),  "roamingMngr_manualSM    "  ,  sizeof("roamingMngr_manualSM    "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_137]),  "cmdinterpretoid         "  ,  sizeof("cmdinterpretoid         "));
-    os_memoryCopy(hOs, (void *)(pReport->aFileName[FILE_ID_138]),  "WlanDrvIf               "  ,  sizeof("WlanDrvIf               "));
-
-#endif  /* PRINTF_ROLLBACK */
-
-	/* Severity table description */
-
-	os_memoryCopy(hOs, (char *)(pReport->aSeverityDesc[REPORT_SEVERITY_INIT]),              "INIT", sizeof("INIT"));
-	os_memoryCopy(hOs, (char *)(pReport->aSeverityDesc[REPORT_SEVERITY_INFORMATION]),       "INFORMATION", sizeof("INFORMATION"));
-	os_memoryCopy(hOs, (char *)(pReport->aSeverityDesc[REPORT_SEVERITY_WARNING]),           "WARNING", sizeof("WARNING"));
-	os_memoryCopy(hOs, (char *)(pReport->aSeverityDesc[REPORT_SEVERITY_ERROR]),             "ERROR", sizeof("ERROR"));
-	os_memoryCopy(hOs, (char *)(pReport->aSeverityDesc[REPORT_SEVERITY_FATAL_ERROR]),       "FATAL_ERROR", sizeof("FATAL_ERROR"));
-	os_memoryCopy(hOs, (char *)(pReport->aSeverityDesc[REPORT_SEVERITY_SM]),                "SM", sizeof("SM"));
-	os_memoryCopy(hOs, (char *)(pReport->aSeverityDesc[REPORT_SEVERITY_CONSOLE]),           "CONSOLE", sizeof("CONSOLE"));
-
-    return (TI_HANDLE)pReport;
-}
-
-/************************************************************************
- *                        report_SetDefaults                            *
- ************************************************************************/
-TI_STATUS report_SetDefaults (TI_HANDLE hReport, TReportInitParams *pInitParams)
-{
-	if( (NULL == hReport) || (NULL == pInitParams))
-	{
-		return TI_NOK;
-	}
-
-    report_SetReportFilesTable (hReport, (TI_UINT8 *)pInitParams->aFileEnable);
-    report_SetReportSeverityTable (hReport, (TI_UINT8 *)pInitParams->aSeverityTable);
-    
-    return TI_OK;
-}
-
-/************************************************************************
- *                        report_unLoad                                 *
- ************************************************************************/
-TI_STATUS report_Unload (TI_HANDLE hReport)
-{
-    TReport *pReport = (TReport *)hReport;
-
-	if(NULL == pReport)
-	{
-		return TI_NOK;
-	}
-
-#if defined(TIWLN_WINCE30) && defined(TI_DBG)
-    closeMyFile();
-#endif
-
-    os_memoryFree(pReport->hOs, pReport, sizeof(TReport));
-    return TI_OK;
-}
-
-
-TI_STATUS report_SetReportModule(TI_HANDLE hReport, TI_UINT8 module_index)
-{
-	if(NULL == hReport)
-	{
-		return TI_NOK;
-	}
-
-    ((TReport *)hReport)->aFileEnable[module_index] = 1;
-
-    return TI_OK;
-}
-
-
-TI_STATUS report_ClearReportModule(TI_HANDLE hReport, TI_UINT8 module_index)
-{
-	if(NULL == hReport)
-	{
-		return TI_NOK;
-	}
-
-    ((TReport *)hReport)->aFileEnable[module_index] = 0;
-
-    return TI_OK;
-}
-
-
-TI_STATUS report_GetReportFilesTable(TI_HANDLE hReport, TI_UINT8 *pFiles)
-{
-    TI_UINT8 index;
-
-	if( (NULL == hReport) || (NULL == pFiles))
-	{
-		return TI_NOK;
-	}
-
-    os_memoryCopy(((TReport *)hReport)->hOs, 
-                  (void *)pFiles, 
-                  (void *)(((TReport *)hReport)->aFileEnable), 
-                  sizeof(((TReport *)hReport)->aFileEnable));
-
-    for (index = 0; index < sizeof(((TReport *)hReport)->aFileEnable); index++)
-    {
-        pFiles[index] += '0';
-    }
-
-    return TI_OK;
-}
-
-
-TI_STATUS report_SetReportFilesTable(TI_HANDLE hReport, TI_UINT8 *pFiles)
-{
-    TI_UINT8 index;
-
-	if( (NULL == hReport) || (NULL == pFiles))
-	{
-		return TI_NOK;
-	}
-
-
-    for (index = 0; index < sizeof(((TReport *)hReport)->aFileEnable); index++)
-    {
-        pFiles[index] -= '0';
-    }
-
-    os_memoryCopy(((TReport *)hReport)->hOs, 
-                  (void *)(((TReport *)hReport)->aFileEnable), 
-                  (void *)pFiles, 
-                  sizeof(((TReport *)hReport)->aFileEnable));
-
-    return TI_OK;
-}
-
-
-TI_STATUS report_GetReportSeverityTable(TI_HANDLE hReport, TI_UINT8 *pSeverities)
-{
-    TI_UINT8 index;
-
-	if( (NULL == hReport) || (NULL == pSeverities))
-	{
-
-		return TI_NOK;
-	}
-
-
-    os_memoryCopy (((TReport *)hReport)->hOs, 
-                   (void *)pSeverities, 
-                   (void *)(((TReport *)hReport)->aSeverityTable), 
-                   sizeof(((TReport *)hReport)->aSeverityTable));
-
-    for (index = 0; index < sizeof(((TReport *)hReport)->aSeverityTable); index++)
-    {
-        pSeverities[index] += '0';
-    }
-
-    return TI_OK;
-}
-
-
-TI_STATUS report_SetReportSeverityTable(TI_HANDLE hReport, TI_UINT8 *pSeverities)
-{
-    TI_UINT8 index;
-
-	if( (NULL == hReport) || (NULL == pSeverities))
-	{
-		return TI_NOK;
-	}
-
-    for (index = 0; index < sizeof(((TReport *)hReport)->aSeverityTable); index++)
-    {
-        pSeverities[index] -= '0';
-    }
-
-    os_memoryCopy(((TReport *)hReport)->hOs, 
-                  (void *)(((TReport *)hReport)->aSeverityTable), 
-                  (void *)pSeverities, 
-                  sizeof(((TReport *)hReport)->aSeverityTable));
-
-    return TI_OK;
-}
-
-
-/***********************************************************************
-*                        report_setParam                                   
-***********************************************************************/
-TI_STATUS report_SetParam (TI_HANDLE hReport, TReportParamInfo *pParam)
-{
-	if( (NULL == hReport) || (NULL == pParam))
-	{
-		return TI_NOK;
-	}
-
-	switch (pParam->paramType)
-	{
-	case REPORT_MODULE_ON_PARAM:
-		report_SetReportModule(hReport, pParam->content.aFileEnable[0]);
-		break;
-
-	case REPORT_MODULE_OFF_PARAM:
-		report_ClearReportModule(hReport, pParam->content.aFileEnable[0]);
-		break;
-
-	case REPORT_MODULE_TABLE_PARAM:
-		report_SetReportFilesTable(hReport, (TI_UINT8 *)pParam->content.aFileEnable);
-		break;
-
-	case REPORT_SEVERITY_TABLE_PARAM:
-		report_SetReportSeverityTable(hReport, (TI_UINT8 *)pParam->content.aSeverityTable);
-		break;
-
-	case REPORT_PPMODE_VALUE_PARAM:
-		os_setDebugMode((TI_BOOL)pParam->content.uReportPPMode);
-		break;
-
-	case REPORT_OUTPUT_TO_LOGGER_ON:
-		os_setDebugOutputToLogger(TI_TRUE);
-		break;
-
-	case REPORT_OUTPUT_TO_LOGGER_OFF:
-		os_setDebugOutputToLogger(TI_FALSE);
-        break;
-
-	default:
-		TRACE1(hReport, REPORT_SEVERITY_ERROR, "Set param, Params is not supported, %d\n", pParam->paramType);
-		return PARAM_NOT_SUPPORTED;
-	}
-
-	return TI_OK;
-}
-
-/***********************************************************************
- *                        report_getParam                                   
- ***********************************************************************/
-TI_STATUS report_GetParam (TI_HANDLE hReport, TReportParamInfo *pParam)
-{
-	if( (NULL == hReport) || (NULL == pParam))
-	{
-		return TI_NOK;
-	}
-
-    switch (pParam->paramType)
-    {
-    case REPORT_MODULE_TABLE_PARAM:
-        report_GetReportFilesTable(hReport, (TI_UINT8 *)pParam->content.aFileEnable);
-        break;
-
-    case REPORT_SEVERITY_TABLE_PARAM:
-        report_GetReportSeverityTable(hReport, (TI_UINT8 *)pParam->content.aSeverityTable);
-        break;
-
-    default:
-        TRACE1(hReport, REPORT_SEVERITY_ERROR, "Get param, Params is not supported, %d\n", pParam->paramType);
-        return PARAM_NOT_SUPPORTED;
-    }
-
-    return TI_OK;
-}
-
-
-/************************************************************************
- *                        report_Dump                                 *
- ************************************************************************/
-TI_STATUS report_Dump (TI_UINT8 *pBuffer, char *pString, TI_UINT32 size)
-{
-    TI_UINT32 index;
-    TI_UINT8  temp_nibble;
-	if( (NULL == pBuffer) || (NULL == pString))
-	{
-		return TI_NOK;
-}
-
-    /* Go over pBuffer and convert it to chars */ 
-    for (index = 0; index < size; index++)
-{
-        /* First nibble */
-        temp_nibble = (pBuffer[index] & 0x0F);
-        if (temp_nibble <= 9)
-	{
-            pString[(index << 1) + 1] = temp_nibble + '0';
-	}
-        else
-	{
-            pString[(index << 1) + 1] = temp_nibble - 10 + 'A';
-	}
-
-        /* Second nibble */
-        temp_nibble = ((pBuffer[index] & 0xF0) >> 4);
-        if (temp_nibble <= 9)
-{    
-            pString[(index << 1)] = temp_nibble + '0';
-	}   
-        else
-{
-            pString[(index << 1)] = temp_nibble - 10 + 'A';
-	 }
-	}
-
-    /* Put string terminator */
-    pString[(size * 2)] = 0;
-
-    return TI_OK;
-	}
-
-
-/* HEX DUMP for BDs !!! Debug code only !!! */
-TI_STATUS report_PrintDump (TI_UINT8 *pData, TI_UINT32 datalen)
-{
-#ifdef TI_DBG
-    TI_INT32  dbuflen=0;
-    TI_UINT32 j;
-    TI_CHAR   dbuf[50];
-    static const TI_CHAR hexdigits[16] = "0123456789ABCDEF";
-
-   
-	if((NULL == pData)||(datalen <= 0)
-)
-	{
-		return TI_NOK;
-	}
-
-   
-    for(j=0; j < datalen;)
-    {
-        /* Add a byte to the line*/
-        dbuf[dbuflen] =  hexdigits[(pData[j] >> 4)&0x0f];
-        dbuf[dbuflen+1] = hexdigits[pData[j] & 0x0f];
-        dbuf[dbuflen+2] = ' ';
-        dbuf[dbuflen+3] = '\0';
-        dbuflen += 3;
-        j++;
-        if((j % 16) == 0)
-        {
-            /* Dump a line every 16 hex digits*/
-            WLAN_OS_REPORT(("%04.4x  %s\n", j-16, dbuf));
-            dbuflen = 0;
-        }
-    }
-    /* Flush if something has left in the line*/
-    if(dbuflen)
-        WLAN_OS_REPORT(("%04.4x  %s\n", j & 0xfff0, dbuf));
-#endif
-    return TI_OK;
-}
-
-void handleRunProblem(EProblemType prType)
-{
-    /* Here problem handling methods can be specified per problem type.
-       They can be OS dependent and can contain debug prints, traceBack,
-       fatal error initiation etc.
-    */
-    return; /* empty for now */
-}
diff --git a/wl1271/utils/report.h b/wl1271/utils/report.h
deleted file mode 100644
index 882f7e0..0000000
--- a/wl1271/utils/report.h
+++ /dev/null
@@ -1,766 +0,0 @@
-/*
- * report.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/***************************************************************************/
-/*                                                                          */
-/*    MODULE:   report.h                                                    */
-/*    PURPOSE:  Report module internal header API                           */
-/*                                                                          */
-/***************************************************************************/
-#ifndef __REPORT_H__
-#define __REPORT_H__
-
-/** \file  report.h 
- * \brief Report module API	\n
- * APIs which are used for reporting messages to the User while running. \n\n
- * 
- * The report mechanism: Messages are reported per file and severity Level	\n
- * Therefore, each file has a report flag which indicate if reporting for that file is enabled, \n
- * and each severity has a severity flag which indicate if reporting for that severity is enabled.	\n
- * Only if both flags are enabled, the message is printed. \n
- * The report flags of all file are indicated in a bit map Table which is contained in the report module handle	\n
- * The report flags of all severities  are indicated in a bit map Table which is contained in the report module handle	\n
- */
-
-/* in order to work without the driver logger use that definition here  
- * #define PRINTF_ROLLBACK
- */
-
-#include "osApi.h"
-#include "commonTypes.h"
-    
-#define MAX_STRING_LEN         32 
-
-
-/*******************************/
-/*      Report Files IDs       */
-/*******************************/
-
-typedef enum
-{
-	FILE_ID_0	   ,    /*   timer                    */
-	FILE_ID_1	   ,    /*   measurementMgr			  */
-	FILE_ID_2	   ,    /*   measurementMgrSM         */
-	FILE_ID_3	   ,    /*   regulatoryDomain         */
-	FILE_ID_4	   ,    /*   requestHandler           */
-	FILE_ID_5	   ,    /*   SoftGemini               */
-	FILE_ID_6	   ,    /*   spectrumMngmntMgr        */
-	FILE_ID_7	   ,    /*   SwitchChannel            */
-	FILE_ID_8	   ,    /*   roamingMngr              */
-	FILE_ID_9	   ,    /*   scanMngr                 */
-	FILE_ID_10	   ,    /*   admCtrlXCC               */
-	FILE_ID_11	   ,    /*   XCCMngr                  */
-	FILE_ID_12	   ,    /*   XCCRMMngr                */
-	FILE_ID_13	   ,    /*   XCCTSMngr                */
-	FILE_ID_14	   ,    /*   rogueAp                  */
-	FILE_ID_15	   ,    /*   TransmitPowerXCC         */
-	FILE_ID_16	   ,    /*   admCtrl                  */
-	FILE_ID_17	   ,    /*   admCtrlNone              */
-	FILE_ID_18	   ,    /*   admCtrlWep               */
-	FILE_ID_19	   ,    /*   admCtrlWpa               */
-	FILE_ID_20	   ,    /*   admCtrlWpa2              */
-	FILE_ID_21	   ,    /*   apConn                   */
-	FILE_ID_22	   ,    /*   broadcastKey802_1x       */
-	FILE_ID_23	   ,    /*   broadcastKeyNone         */
-	FILE_ID_24	   ,    /*   broadcastKeySM           */
-	FILE_ID_25	   ,    /*   conn                     */
-	FILE_ID_26	   ,    /*   connIbss                 */
-	FILE_ID_27	   ,    /*   connInfra                */
-	FILE_ID_28	   ,    /*   keyDerive                */
-	FILE_ID_29	   ,    /*   keyDeriveAes             */
-	FILE_ID_30	   ,    /*   keyDeriveCkip            */
-	FILE_ID_31	   ,    /*   keyDeriveTkip            */
-	FILE_ID_32	   ,    /*   keyDeriveWep             */
-	FILE_ID_33	   ,    /*   keyParser                */
-	FILE_ID_34	   ,    /*   keyParserExternal        */
-	FILE_ID_35	   ,    /*   keyParserWep             */
-	FILE_ID_36	   ,    /*   mainKeysSm               */
-	FILE_ID_37	   ,    /*   mainSecKeysOnly          */
-	FILE_ID_38	   ,    /*   mainSecNull              */
-	FILE_ID_39	   ,    /*   mainSecSm                */
-	FILE_ID_40	   ,    /*   rsn                      */
-	FILE_ID_41	   ,    /*   sme                      */
-	FILE_ID_42	   ,    /*   smeSelect                */
-	FILE_ID_43	   ,    /*   smeSm                    */
-	FILE_ID_44	   ,    /*   unicastKey802_1x         */
-	FILE_ID_45	   ,    /*   unicastKeyNone           */
-	FILE_ID_46	   ,    /*   unicastKeySM             */
-	FILE_ID_47	   ,    /*   CmdDispatcher            */
-	FILE_ID_48	   ,    /*   CmdHndlr                 */
-	FILE_ID_49	   ,    /*   DrvMain                  */
-	FILE_ID_50	   ,    /*   EvHandler                */
-	FILE_ID_51	   ,    /*   Ctrl                     */
-	FILE_ID_52	   ,    /*   GeneralUtil              */
-	FILE_ID_53	   ,    /*   RateAdaptation           */
-	FILE_ID_54	   ,    /*   rx                       */
-	FILE_ID_55	   ,    /*   TrafficMonitor           */
-	FILE_ID_56	   ,    /*   txCtrl                   */
-	FILE_ID_57	   ,    /*   txCtrlParams             */
-	FILE_ID_58	   ,    /*   txCtrlServ               */
-	FILE_ID_59	   ,    /*   TxDataClsfr              */
-	FILE_ID_60	   ,    /*   txDataQueue              */
-	FILE_ID_61	   ,    /*   txMgmtQueue              */
-	FILE_ID_62	   ,    /*   txPort                   */
-	FILE_ID_63	   ,    /*   assocSM                  */
-	FILE_ID_64	   ,    /*   authSm                   */
-	FILE_ID_65	   ,    /*   currBss                  */
-	FILE_ID_66	   ,    /*   healthMonitor            */
-	FILE_ID_67	   ,    /*   mlmeBuilder              */
-	FILE_ID_68	   ,    /*   mlmeParser               */
-	FILE_ID_69	   ,    /*   mlmeSm                   */
-	FILE_ID_70	   ,    /*   openAuthSm               */
-	FILE_ID_71	   ,    /*   PowerMgr                 */
-	FILE_ID_72	   ,    /*   PowerMgrDbgPrint         */
-	FILE_ID_73	   ,    /*   PowerMgrKeepAlive        */
-	FILE_ID_74	   ,    /*   qosMngr                  */
-	FILE_ID_75	   ,    /*   roamingInt               */
-	FILE_ID_76	   ,    /*   ScanCncn                 */
-	FILE_ID_77	   ,    /*   ScanCncnApp              */
-	FILE_ID_78	   ,    /*   ScanCncnOsSm             */
-	FILE_ID_79	   ,    /*   ScanCncnSm               */
-	FILE_ID_80	   ,    /*   ScanCncnSmSpecific       */
-	FILE_ID_81	   ,    /*   scanResultTable          */
-	FILE_ID_82	   ,    /*   scr                      */
-	FILE_ID_83	   ,    /*   sharedKeyAuthSm          */
-	FILE_ID_84	   ,    /*   siteHash                 */
-	FILE_ID_85	   ,    /*   siteMgr                  */
-	FILE_ID_86	   ,    /*   StaCap                   */
-	FILE_ID_87	   ,    /*   systemConfig             */
-	FILE_ID_88	   ,    /*   templates                */
-	FILE_ID_89	   ,    /*   trafficAdmControl        */
-	FILE_ID_90	   ,    /*   CmdBld                   */
-	FILE_ID_91	   ,    /*   CmdBldCfg                */
-	FILE_ID_92	   ,    /*   CmdBldCfgIE              */
-	FILE_ID_93	   ,    /*   CmdBldCmd                */
-	FILE_ID_94	   ,    /*   CmdBldCmdIE              */
-	FILE_ID_95	   ,    /*   CmdBldItr                */
-	FILE_ID_96	   ,    /*   CmdBldItrIE              */
-	FILE_ID_97	   ,    /*   CmdQueue                 */
-	FILE_ID_98	   ,    /*   RxQueue                  */
-	FILE_ID_99	   ,    /*   txCtrlBlk                */
-	FILE_ID_100	   ,    /*   txHwQueue                */
-	FILE_ID_101	   ,    /*   CmdMBox                  */
-	FILE_ID_102	   ,    /*   eventMbox                */
-	FILE_ID_103	   ,    /*   fwDebug                  */
-	FILE_ID_104	   ,    /*   FwEvent                  */
-	FILE_ID_105	   ,    /*   HwInit                   */
-	FILE_ID_106	   ,    /*   RxXfer                   */
-	FILE_ID_107	   ,    /*   txResult                 */
-	FILE_ID_108	   ,    /*   txXfer                   */
-	FILE_ID_109	   ,    /*   MacServices              */
-	FILE_ID_110	   ,    /*   MeasurementSrv           */
-	FILE_ID_111	   ,    /*   measurementSrvDbgPrint   */
-	FILE_ID_112	   ,    /*   MeasurementSrvSM         */
-	FILE_ID_113	   ,    /*   PowerSrv                 */
-	FILE_ID_114	   ,    /*   PowerSrvSM               */
-	FILE_ID_115	   ,    /*   ScanSrv                  */
-	FILE_ID_116	   ,    /*   ScanSrvSM                */
-	FILE_ID_117	   ,    /*   TWDriver                 */
-	FILE_ID_118	   ,    /*   TWDriverCtrl             */
-	FILE_ID_119	   ,    /*   TWDriverRadio            */
-	FILE_ID_120	   ,    /*   TWDriverTx               */
-	FILE_ID_121	   ,    /*   TwIf                     */
-	FILE_ID_122	   ,    /*   SdioBusDrv               */
-	FILE_ID_123	   ,    /*   TxnQueue                 */
-	FILE_ID_124	   ,    /*   WspiBusDrv               */
-	FILE_ID_125	   ,    /*   context                  */
-	FILE_ID_126	   ,    /*   freq                     */
-	FILE_ID_127	   ,    /*   fsm                      */
-	FILE_ID_128	   ,    /*   GenSM                    */
-	FILE_ID_129	   ,    /*   mem                      */
-	FILE_ID_130	   ,    /*   queue                    */
-	FILE_ID_131	   ,    /*   rate                     */
-	FILE_ID_132	   ,    /*   report                   */
-	FILE_ID_133	   ,    /*   stack                    */
-    FILE_ID_134	   ,    /*   externalSec              */
-    FILE_ID_135	   ,    /*   roamingMngr_autoSM       */
-    FILE_ID_136	   ,    /*   roamingMngr_manualSM     */
-	FILE_ID_137	   ,    /*   cmdinterpretoid          */
-    FILE_ID_138	   ,    /*   wlandrvif                */
-	REPORT_FILES_NUM	/*   Number of files with trace reports   */
-
-} EReportFiles;
- 
-
-/************************************/      
-/*      Report Severity values      */
-/************************************/
-
-/** \enum EReportSeverity
- * \brief Report Severity Types
- * 
- * \par Description
- * All available severity Levels of the events which are reported to user.\n
- * 
- * \sa
- */
-typedef enum
-{
-    REPORT_SEVERITY_INIT           =  1,	/**< Init Level (event happened during initialization)			*/
-    REPORT_SEVERITY_INFORMATION    =  2,	/**< Information Level											*/
-    REPORT_SEVERITY_WARNING        =  3,	/**< Warning Level												*/
-    REPORT_SEVERITY_ERROR          =  4,	/**< Error Level (error accored)  		 						*/
-    REPORT_SEVERITY_FATAL_ERROR    =  5,	/**< Fatal-Error Level (fatal-error accored)					*/
-    REPORT_SEVERITY_SM             =  6,	/**< State-Machine Level (event happened in State-Machine)		*/
-    REPORT_SEVERITY_CONSOLE        =  7,	/**< Consol Level (event happened in Consol) 					*/
-    REPORT_SEVERITY_MAX            = REPORT_SEVERITY_CONSOLE + 1	/**< Maximum number of report severity levels	*/
-
-} EReportSeverity;
-
-/** \enum EProblemType
- * \brief used to handle SW problems according to their types.
- *
- * \par Description
- * All available SW problem types checked in run time.\n
- *
- * \sa
- */
-typedef enum
-{
-    PROBLEM_BUF_SIZE_VIOLATION    =  1,
-    PROBLEM_NULL_VALUE_PTR        =  2,
-
-    PROBLEM_MAX_VALUE
-
-} EProblemType;
-/** \struct TReport
- * \brief Report Module Object
- * 
- * \par Description
- * All the Databases and other parameters which are needed for reporting messages to user
- * 
- * \sa
- */
-typedef struct 
-{
-    TI_HANDLE       hOs;												/**< Handle to Operating System Object																									*/
-    TI_UINT8        aSeverityTable[REPORT_SEVERITY_MAX];				/**< Severities Table: Table which holds for each severity level a flag which indicates whether the severity is enabled for reporting	*/
-	char            aSeverityDesc[REPORT_SEVERITY_MAX][MAX_STRING_LEN];	/**< Severities Descriptors Table: Table which holds for each severity a string of its name, which is used in severity's reported messages		*/
-    TI_UINT8        aFileEnable[REPORT_FILES_NUM];					    /**< Files table indicating per file if it is enabled for reporting	 */
-
-#ifdef PRINTF_ROLLBACK
-    char            aFileName[REPORT_FILES_NUM][MAX_STRING_LEN];	    /**< Files names table inserted in the file's reported messages		 */
-#endif
-
-} TReport;
-
-/** \struct TReportParamInfo
- * \brief Report Parameter Information
- * 
- * \par Description
- * Struct which defines all the Databases and other parameters which are needed
- * for reporting messages to user. 
- * The actual Content of the Report Parameter Could be one of the followed (held in union): 
- * Severety Table | Module Table | Enable/Disable indication of debug module usage
- * 
- * \sa	EExternalParam, ETwdParam
- */
-typedef struct
-{
-    TI_UINT32       paramType;								/**< The reported parameter type - one of External Parameters (which includes Set,Get, Module, internal number etc.)
-															* of Report Module. Used by user for Setting or Getting Report Module Paramters, for exaple Set/Get severety table
-															* to/from Report Module
-															*/
-    TI_UINT32       paramLength;							/**< Length of reported parameter	*/
-
-    union
-    {
-        TI_UINT8    aSeverityTable[REPORT_SEVERITY_MAX];	/**< Table which holds severity flag for every available LOG severity level. 
-															* This flag indicates for each severity - whether it is enabled for Logging or not.	
-															* User can Set/Get this Tabel
-															*/
-        TI_UINT8    aFileEnable[REPORT_FILES_NUM]; 		/**< Table which holds file flag for every available LOG file.
-															* This flag indicates for each file - whether it is enabled for Logging or not.				
-															* User can Set/Get this Tabel
-															*/															
-        TI_UINT32   uReportPPMode;							/**< Used by user for Indicating if Debug Module should be enabled/disabled																	*/
-
-    } content;
-
-} TReportParamInfo;
-
-/** \struct TReportInitParams
- * \brief Report Init Parameters
- * 
- * \par Description
- * Struct which defines all the Databases needed for init and set the defualts of the Report Module.
- * 
- */
-typedef struct
-{
-    /* Note: The arrays sizes are aligned to 4 byte to avoid padding added by the compiler! */
-	TI_UINT8   aSeverityTable[(REPORT_SEVERITY_MAX + 3) & ~3];	/**< Table in the size of all available LOG severity levels which indicates for each severity - whether it is enabled for Logging or not.	*/
-	TI_UINT8   aFileEnable   [(REPORT_FILES_NUM    + 3) & ~3];	/**< Table in the size of all available LOG files which indicates for each file - whether it is enabled for Logging or not				*/				
-
-} TReportInitParams;
-
-
-
-/****************************/
-/* report module Macros		*/
-/****************************/
-
-/* The report mechanism is like that:
-    Each file has a report flag. Each severity has a severity flag.
-    Only if bits are enabled, the message is printed */
-/* The modules which have their report flag enable are indicated by a bit map in the reportModule 
-    variable contained in the report handle*/
-/* The severities which have are enabled are indicated by a bit map in the reportSeverity
-    variable contained in the report handle*/
-/* general trace messages */
-#ifndef PRINTF_ROLLBACK
-
-#define TRACE0(hReport, level, str) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 0); } } while(0)
-
-#define TRACE1(hReport, level, str, p1) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 1, (TI_UINT32)p1); } } while(0)
-
-#define TRACE2(hReport, level, str, p1, p2) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 2, (TI_UINT32)p1, (TI_UINT32)p2); } } while(0)
-
-#define TRACE3(hReport, level, str, p1, p2, p3) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 3, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3); } } while(0)
-
-#define TRACE4(hReport, level, str, p1, p2, p3, p4) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 4, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4); } } while(0)
-
-#define TRACE5(hReport, level, str, p1, p2, p3, p4, p5) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 5, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5); } } while(0)
-
-#define TRACE6(hReport, level, str, p1, p2, p3, p4, p5, p6) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 6, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6); } } while(0)
-
-#define TRACE7(hReport, level, str, p1, p2, p3, p4, p5, p6, p7) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 7, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7); } } while(0)
-
-#define TRACE8(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 8, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8); } } while(0)
-
-#define TRACE9(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 9, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9); } } while(0)
-
-#define TRACE10(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 10, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10); } } while(0)
-
-#define TRACE11(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 11, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11); } } while(0)
-
-#define TRACE12(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 12, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12); } } while(0)
-
-#define TRACE13(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 13, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13); } } while(0)
-
-#define TRACE14(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 14, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14); } } while(0)
-
-#define TRACE15(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 15, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15); } } while(0)
-
-#define TRACE16(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 16, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16); } } while(0)
-
-#define TRACE17(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 17, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17); } } while(0)
-
-#define TRACE18(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 18, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18); } } while(0)
-
-#define TRACE19(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 19, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18, (TI_UINT32)p19); } } while(0)
-
-#define TRACE20(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 20, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18, (TI_UINT32)p19, (TI_UINT32)p20); } } while(0)
-
-#define TRACE21(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 21, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18, (TI_UINT32)p19, (TI_UINT32)p20, (TI_UINT32)p21); } } while(0)
-
-#define TRACE22(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 22, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18, (TI_UINT32)p19, (TI_UINT32)p20, (TI_UINT32)p21, (TI_UINT32)p22); } } while(0)
-
-#define TRACE25(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 22, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18, (TI_UINT32)p19, (TI_UINT32)p20, (TI_UINT32)p21, (TI_UINT32)p22, (TI_UINT32)p23, (TI_UINT32)p24, (TI_UINT32)p25); } } while(0)
-
-#define TRACE31(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 22, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18, (TI_UINT32)p19, (TI_UINT32)p20, (TI_UINT32)p21, (TI_UINT32)p22, (TI_UINT32)p23, (TI_UINT32)p24, (TI_UINT32)p25, (TI_UINT32)p26, (TI_UINT32)p27, (TI_UINT32)p28, (TI_UINT32)p29, (TI_UINT32)p30, (TI_UINT32)p31); } } while(0)
-
-
-#else /* PRINTF_ROLLBACK */
-
-#define TRACE0(hReport, level, str) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str); } } while(0)
-
-#define TRACE1(hReport, level, str, p1) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1); } } while(0)
-
-#define TRACE2(hReport, level, str, p1, p2) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2); } } while(0)
-
-#define TRACE3(hReport, level, str, p1, p2, p3) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3); } } while(0)
-
-#define TRACE4(hReport, level, str, p1, p2, p3, p4) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4); } } while(0)
-
-#define TRACE5(hReport, level, str, p1, p2, p3, p4, p5) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5); } } while(0)
-
-#define TRACE6(hReport, level, str, p1, p2, p3, p4, p5, p6) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6); } } while(0)
-
-#define TRACE7(hReport, level, str, p1, p2, p3, p4, p5, p6, p7) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7); } } while(0)
-
-#define TRACE8(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8); } } while(0)
-
-#define TRACE9(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9); } } while(0)
-
-#define TRACE10(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } } while(0)
-
-#define TRACE11(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } } while(0)
-
-#define TRACE12(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } } while(0)
-
-#define TRACE13(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); } } while(0)
-
-#define TRACE14(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); } } while(0)
-
-#define TRACE15(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15); } } while(0)
-
-#define TRACE16(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16); } } while(0)
-
-#define TRACE17(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17); } } while(0)
-
-#define TRACE18(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18); } } while(0)
-
-#define TRACE19(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19); } } while(0)
-
-#define TRACE20(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20); } } while(0)
-
-#define TRACE21(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21); } } while(0)
-
-#define TRACE22(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22); } } while(0)
-
-#define TRACE25(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25); } } while(0)
-
-#define TRACE31(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p27, p27, p28, p29, p30, p31); } } while(0)
-
-#endif /* #ifdef PRINTF_ROLLBACK */
-
-
-/****************************/
-/* report module Macros		*/
-/****************************/
-
-/* The report mechanism is like that:
-Each file has a report flag. Each severity has a severity flag.
-Only if bits are enabled, the message is printed */
-/* The modules which have their report flag enable are indicated by a bit map in the reportModule 
-variable contained in the report handle*/
-/* The severities which have are enabled are indicated by a bit map in the reportSeverity
-variable contained in the report handle*/
-
-#ifdef REPORT_LOG
-
-/** \def WLAN_OS_REPORT
-* \brief Macro which writes a message to user via specific Operating System printf.
-* E.g. print is done using the relevant used OS printf method.
-*/
-#define WLAN_OS_REPORT(msg)                                           \
-	do { os_printf msg;} while(0)
-
-
-#ifdef INIT_MESSAGES
-/** \def WLAN_INIT_REPORT
-* \brief Macro which writes a message to user via specific Operating System printf.
-* E.g. print is done using the relevant used OS printf method.
-*/
-#define WLAN_INIT_REPORT(msg)                                         \
-	do { os_printf msg;} while(0)
-#else
-/** \def WLAN_INIT_REPORT
-* \brief Macro which writes a message to user via specific Operating System printf.
-* E.g. print is done using the relevant used OS printf method.
-*/
-#define WLAN_INIT_REPORT(msg) 
-#endif
-#define TRACE_INFO_HEX(hReport, data, datalen) \
-	do { if (hReport && (((TReport *)hReport)->aSeverityTable[REPORT_SEVERITY_INFORMATION]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \
-{ report_PrintDump (data, datalen); } } while(0)
-
-
-#else   /* REPORT_LOG */
-
-/* NOTE: Keep a dummy report function call to treat compilation warnings */
-
-/** \def WLAN_OS_REPORT
-* \brief Dummy macro: Nothing is done 
-*/
-#define WLAN_OS_REPORT(msg)                                           \
-	do { } while (0)
-
-/** \def WLAN_INIT_REPORT
-* \brief Dummy macro: Nothing is done 
-*/
-#define WLAN_INIT_REPORT(msg)                                         \
-	do { } while (0)
-
-
-#define TRACE_INFO_HEX(hReport, data, datalen) \
-	do { } while (0)
-
-#endif  /* REPORT_LOG */
-
-
-/****************************/
-/* report module prototypes */
-/****************************/
-
-/** \brief  Create Report Module Object
- * \param  hOs   			- OS module object handle
- * \return Handle to the report module on success, NULL otherwise
- * 
- * \par Description
- * Report module creation function, called by the config mgr in creation phase	\n
- * performs the following:	\n
- *	-   Allocate the report handle
- */ 
-TI_HANDLE report_Create (TI_HANDLE hOs);
-/** \brief  Set Report Module Defaults
- * \param  hReport   	- Report module object handle
- * \param  pInitParams	- Pointer to Input Init Parameters
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Report module configuration function, called by the config mgr in configuration phase	\n
- * performs the following:	\n
- *	-   Reset & init local variables
- *	-   Resets all report modules bits
- *	-   Resets all severities bits
- *	-   Init the description strings * 
- */ 
-TI_STATUS report_SetDefaults            (TI_HANDLE hReport, TReportInitParams *pInitParams);
-/** \brief  Unload Report Module
- * \param  hReport   	- Report module object handle
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Report Module unload function, called by the config mgr in the unload phase	\n
- * performs the following:	\n
- *	-   Free all memory allocated by the module		
- */ 
-TI_STATUS report_Unload                 (TI_HANDLE hReport);
-/** \brief  Set Report Module
- * \param  hReport   	- Report module object handle
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Enables the relevant module for reporting -  according to the received module index 
- */ 
-TI_STATUS report_SetReportModule        (TI_HANDLE hReport, TI_UINT8 module_index);
-/** \brief  Clear Report Module
- * \param  hReport   	- Report module object handle
- * \param  module_index	- Index of file to be disable for reporting 
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Disables the relevant module for reporting -  according to the received module index 
- */ 
-TI_STATUS report_ClearReportModule      (TI_HANDLE hReport, TI_UINT8 module_index);
-/** \brief  Get Report files Table
- * \param  hReport   	- Report module object handle
- * \param  pFiles		- Pointer to output files Table
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Returns the Modules Table (the table which holds Modules reporting indication) held in Report Module Object
- */ 
-TI_STATUS report_GetReportFilesTable    (TI_HANDLE hReport, TI_UINT8 *pFiles); 
-/** \brief  Set Report Files Table
- * \param  hReport   	- Report module object handle
- * \param  pFiles		- Pointer to input files Table
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Updates the Modules Table: copies the input Modules Table (the table which holds Modules reporting indication) 
- * to the Modules Table which is held in Report Module Object
- */ 
-TI_STATUS report_SetReportFilesTable    (TI_HANDLE hReport, TI_UINT8 *pFiles); 
-/** \brief  Get Report Severity Table
- * \param  hReport   	- Report module object handle
- * \param  pSeverities	- Pointer to input Severity Table
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Returns the Severities Table (the table which holds Severities reporting indication) held in Report Module Object
- */ 
-TI_STATUS report_GetReportSeverityTable (TI_HANDLE hReport, TI_UINT8 *pSeverities);
-/** \brief  Set Report Severity Table
- * \param  hReport   	- Report module object handle
- * \param  pSeverities	- Pointer to input Severity Table
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Updates the Severities Table: copies the input Severities Table (the table which holds Severities reporting indication) 
- * to the Severities Table which is held in Report Module Object
- */ 
-TI_STATUS report_SetReportSeverityTable (TI_HANDLE hReport, TI_UINT8 *pSeverities);
-/** \brief  Set Report Parameters
- * \param  hReport   	- Report module object handle
- * \param  pParam		- Pointer to input Report Parameters Information
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Report set param function sets parameter/s to Report Module Object. 
- * Called by the following:
- *	-   configuration Manager in order to set a parameter/s from the OS abstraction layer
- *	-   Form inside the driver 
- */ 
-TI_STATUS report_SetParam               (TI_HANDLE hReport, TReportParamInfo *pParam);                   
-/** \brief  Get Report Parameters
- * \param  hReport   	- Report module object handle
- * \param  pParam		- Pointer to output Report Parameters Information
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Report get param function gets parameter/s from Report Module Object. 
- * Called by the following:
- *	-   configuration Manager in order to get a parameter/s from the OS abstraction layer
- *	-   from inside the driver 
- */ 
-TI_STATUS report_GetParam               (TI_HANDLE hReport, TReportParamInfo *pParam); 
-/** \brief Report Dump
- * \param  pBuffer  - Pointer to input HEX buffer
- * \param  pString	- Pointer to output string
- * \param  size		- size of output string
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Converts hex buffer to string buffer
- * NOTE:	1. The caller has to make sure that the string size is at lease: ((Size * 2) + 1)
- * 	      	2. A string terminator is inserted into lase char of the string 
- */ 
-TI_STATUS report_Dump 					(TI_UINT8 *pBuffer, char *pString, TI_UINT32 size);
-/** \brief Report Print Dump
- * \param  pData  	- Pointer to input data buffer
- * \param  datalen	- size of input data buffer
- * \return TI_OK on success or TI_NOK on failure
- * 
- * \par Description
- * Performs HEX dump of input Data buffer. Used for debug only! 
- */ 
-TI_STATUS report_PrintDump 				(TI_UINT8 *pData, TI_UINT32 datalen);
-
-/** \brief Sets bRedirectOutputToLogger
-* \param  value  	    - True if to direct output to remote PC
-* \param  hEvHandler	- Event handler
-*/ 
-void os_setDebugOutputToLogger(TI_BOOL value);
-
-/** \brief Sets handles a SW running problem
-* \param  problemType  	- used for different problem handling depending on problem type
-*/
-void handleRunProblem(EProblemType prType);
-
-#endif /* __REPORT_H__ */
-
-
diff --git a/wl1271/utils/stack.c b/wl1271/utils/stack.c
deleted file mode 100644
index aee7ca4..0000000
--- a/wl1271/utils/stack.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * stack.c
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file stack.c
- *  \brief Seport module API
- *
- *  \see stack.h
- */
-
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   stack.c                                                    */
-/*    PURPOSE:  Stack module implementation                                */
-/*                                                                         */
-/***************************************************************************/
-
-
-#define __FILE_ID__  FILE_ID_133
-#include "tidef.h"
-#include "osApi.h"
-#include "stack.h"
-
-
-/**
- * \date 30-May-2006\n
- * \brief initialize stack object
- *
- * Function Scope \e Public.\n
- * \param pStack    - pointer to the Stack_t structure\n
- * \param hOS       - handle to the OS object\n
- * \param uElemSize - size of a one stack element\n
- * \param uDep      - stack depth\n
- * \param pBuf      - pointer to the stack buffer; if NULL a memory for the stack buffer will be dynamically allocated\n
- * \param fCpy      - pointer to function copying the stack element; if NULL a default copy function will be used\n
- * \return 0 - on success, -1 - on failure\n
- */
-unsigned stackInit 
-(
-    Stack_t   *pStack, 
-    TI_HANDLE  hOs,
-    unsigned   uElemSize, 
-    unsigned   uDep, 
-    void      *pBuf, 
-    void     (*fCpy) (TI_HANDLE, void*, void*, unsigned)
-)
-{
-    pStack->hOs       = hOs;
-    pStack->uPtr      = 0;
-    pStack->uElemSize = uElemSize;
-    pStack->uDep      = uDep * uElemSize;
-
-    if (pBuf)
-    {
-        pStack->pBuf  = pBuf;
-        pStack->bBuf  = 0;
-    }
-
-    else
-    {
-        pStack->pBuf  = _os_memoryAlloc (hOs, pStack->uDep);
-        pStack->bBuf  = TI_TRUE;
-    }
-
-    if (fCpy)
-        pStack->fCpy  = fCpy;
-    else
-        pStack->fCpy  = os_memoryCopy; 
-
-    return 0; 
-}
-
-
-/**
- * \date 30-May-2006\n
- * \brief destroy stack object
- *
- * Function Scope \e Public.\n
- * \param pStack    - pointer to the Stack_t structure\n
- * \return 0 - on success, -1 - on failure\n
- */
-unsigned stackDestroy (Stack_t *pStack)
-{
-    if (pStack->bBuf)
-        _os_memoryFree (pStack->hOs, pStack->pBuf, pStack->uDep);
-
-    return 0;
-}
-
-
-/**
- * \date 30-May-2006\n
- * \brief destroy stack object
- *
- * Function Scope \e Public.\n
- * \param pStack    - pointer to the Stack_t structure\n
- * \param pVal      - the pointer to the pushed value\n
- * \return 0 - on success, -1 - on failure\n
- */
-unsigned stackPush (Stack_t *pStack, void *pVal)
-{
-    if (pStack->uPtr < pStack->uDep)
-    {
-        pStack->fCpy (pStack->hOs, (unsigned char*)pStack->pBuf + pStack->uPtr, pVal, pStack->uElemSize);
-        pStack->uPtr += pStack->uElemSize;
-
-        return 0;
-    }
-
-    return -1;
-}
-
-
-/**
- * \date 30-May-2006\n
- * \brief destroy stack object
- *
- * Function Scope \e Public.\n
- * \param pStack    - pointer to the Stack_t structure\n
- * \param pVal      - the pointer to the popped value\n
- * \return 0 - on success, -1 - on failure\n
- */
-unsigned stackPop (Stack_t *pStack, void *pVal)
-{
-    if (pStack->uPtr > 0)
-    {
-        pStack->uPtr -= pStack->uElemSize;
-        pStack->fCpy (pStack->hOs, pVal, (unsigned char*)pStack->pBuf + pStack->uPtr, pStack->uElemSize);
-
-        return 0;
-    }
-
-    return -1;
-}
diff --git a/wl1271/utils/stack.h b/wl1271/utils/stack.h
deleted file mode 100644
index c652163..0000000
--- a/wl1271/utils/stack.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * stack.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file stack.h
- *  \brief Seport module API
- *
- *  \see stack.c
- */
-
-/***************************************************************************/
-/*                                                                         */
-/*    MODULE:   stack.h                                                    */
-/*    PURPOSE:  Stack module internal header API                           */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef STACK_H
-#define STACK_H
-
-
-typedef struct _Stack_t
-{
-    TI_HANDLE   hOs;
-    void       *pBuf;
-    unsigned    uPtr;
-    unsigned    uDep;
-    unsigned    uElemSize;
-    TI_BOOL        bBuf;
-
-    void      (*fCpy) (TI_HANDLE, void*, void*, unsigned);
-
-} Stack_t;
-
-
-
-unsigned stackInit    (Stack_t *pStack, TI_HANDLE hOs, unsigned uElemSize, unsigned uDep, void *pBuf, void (*fCpy) (TI_HANDLE, void*, void*, unsigned));
-unsigned stackDestroy (Stack_t *pStack);
-unsigned stackPush    (Stack_t *pStack, void *pVal);
-unsigned stackPop     (Stack_t *pStack, void *pVal);
-
-
-#endif
diff --git a/wl1271/utils/tiQosTypes.h b/wl1271/utils/tiQosTypes.h
deleted file mode 100644
index 14b2428..0000000
--- a/wl1271/utils/tiQosTypes.h
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * tiQosTypes.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/*--------------------------------------------------------------------------*/
-/* Module:      tiQosTypes.h*/
-/**/
-/* Purpose:     */
-/**/
-/*--------------------------------------------------------------------------*/
-
-#ifndef TI_QOS_TYPES_H
-#define TI_QOS_TYPES_H
-
-
-#define MAX_NUM_OF_802_1d_TAGS          8
-
-/*
- * This enum defines the protocol modes of the QOS management object
- */
-typedef enum
-{
-    QOS_WME,
-    QOS_NONE
-
-} EQosProtocol;
-
-
-/*
- * This enum includes the header converting modes configured to dataCtrl object.
- */
-typedef enum
-{
-    HDR_CONVERT_NONE,
-    HDR_CONVERT_QOS,
-    HDR_CONVERT_LEGACY
-
-} EHeaderConvertMode;
-
-
-typedef enum
-{
-    QOS_AC_BE = 0,
-    QOS_AC_BK,
-    QOS_AC_VI,
-    QOS_AC_VO,
-    QOS_HIGHEST_AC_INDEX = QOS_AC_VO
-
-} EAcTrfcType;
-
-
-#define FIRST_AC_INDEX                  QOS_AC_BE
-#define AC_PARAMS_MAX_TSID              15
-#define MAX_APSD_CONF                   0xffff
-
-
-typedef enum
-{
-    DROP_NEW_PACKET = 0,
-    DROP_OLD_PACKET
-
-} EQOverflowPolicy;
-
-
-typedef enum
-{
-    AC_NOT_ADMITTED,
-    AC_WAIT_ADMISSION,
-    AC_ADMITTED
-
-} ETrafficAdmState;
-
-
-/* 
- * This enum defines the admission state configured to dataCtrl object.
- */
-typedef enum
-{
-    ADMISSION_NOT_REQUIRED,
-    ADMISSION_REQUIRED
-
-} EAdmissionState;
-
-
-typedef struct
-{
-    /* Power save mode */
-    TI_UINT8                PsMode;             
-    TI_UINT16               TxQueueSize;
-    TI_UINT8                QueueIndex;
-    EQOverflowPolicy        QueueOvFlowPolicy;
-    TI_UINT8                ackPolicy;
-    TI_UINT32               MsduLifeTime;
-
-} TAcTrfcCtrl;
-
-typedef struct
-{
-    /* header converting mode */
-    EHeaderConvertMode      headerConverMode;                           
-    /* flag for converting zero tags */
-    TI_BOOL                 convertTagZeroFrames;                       
-    /* AC admission state */
-    ETrafficAdmState        admissionState;                             
-    /* AC admission is mandatory */
-    EAdmissionState         admissionRequired;                          
-    /* Tag to AC classification */
-    EAcTrfcType             tag_ToAcClsfrTable[MAX_NUM_OF_802_1d_TAGS]; 
-
-} TQosParams;
-
-
-typedef struct
-{
-    TAcTrfcCtrl             acTrfcCtrl;
-    TQosParams              qosParams;
-    TI_UINT8                *tsrsArr;
-    TI_UINT8                tsrsArrLen;
-    TI_UINT8                acID;
-
-} TTxDataQosParams;
-
-
-typedef struct _OS_802_11_QOS_PARAMS
-{
-    TI_UINT32               acID;
-    TI_UINT32               MaxLifeTime;
-    TI_UINT32               PSDeliveryProtocol;
-	TI_UINT32				VoiceDeliveryProtocol;
-
-} OS_802_11_QOS_PARAMS;
-
-
-typedef struct  
-{
-    TI_UINT32               psPoll;
-    TI_UINT32               UPSD;
-
-} OS_802_11_QOS_RX_TIMEOUT_PARAMS;
-
-
-typedef struct _OS_802_11_AC_QOS_PARAMS
-{
-    TI_UINT32               uAC;
-    TI_UINT32               uAssocAdmissionCtrlFlag;
-    TI_UINT32               uAIFS;
-    TI_UINT32               uCwMin;
-    TI_UINT32               uCwMax;
-    TI_UINT32               uTXOPLimit;
-
-} OS_802_11_AC_QOS_PARAMS;
-
-
-typedef struct _OS_802_11_AP_QOS_CAPABILITIES_PARAMS
-{
-    TI_UINT32               uQOSFlag;
-    TI_UINT32               uAPSDFlag;
-
-} OS_802_11_AP_QOS_CAPABILITIES_PARAMS;
-
-
-typedef struct _OS_802_11_QOS_TSPEC_PARAMS
-{
-    TI_UINT32               uUserPriority;
-    TI_UINT32               uNominalMSDUsize; /* in bytes */
-    TI_UINT32               uMeanDataRate;        /* bits per second */
-    TI_UINT32               uMinimumPHYRate;  /* 1,2,5,6,9,11,12,18,......*/
-    TI_UINT32               uSurplusBandwidthAllowance;
-    TI_UINT32               uAPSDFlag;
-    TI_UINT32               uMediumTime;
-    TI_UINT32               uReasonCode;
-    TI_UINT32               uMinimumServiceInterval;
-    TI_UINT32               uMaximumServiceInterval;
-
-} OS_802_11_QOS_TSPEC_PARAMS;
-
-
-typedef struct _OS_802_11_QOS_DELETE_TSPEC_PARAMS
-{
-    TI_UINT32               uUserPriority;
-    TI_UINT32               uReasonCode;
-} OS_802_11_QOS_DELETE_TSPEC_PARAMS;
-
-
-typedef struct _OS_802_11_QOS_DESIRED_PS_MODE
-{
-    TI_UINT32               uDesiredPsMode;
-    TI_UINT32               uDesiredWmeAcPsMode[QOS_HIGHEST_AC_INDEX + 1];
-
-} OS_802_11_QOS_DESIRED_PS_MODE;
-
-
-/* When this value is added to reason code in TSPEC events, it indicates a TSPEC response which was unexpected at the time */
-/* For example, a TSPEC response arrives after a TSPEC timeout */
-#define TSPEC_RESPONSE_UNEXPECTED      0x1000   
-
-
-typedef enum
-{
-    ADDTS_RESPONSE_ACCEPT = 0,
-    ADDTS_RESPONSE_REJECT = 3,
-    ADDTS_RESPONSE_AP_PARAM_INVALID = 253,
-    ADDTS_RESPONSE_TIMEOUT = 254,
-    TSPEC_DELETED_BY_AP = 255
-
-} ETspecStatus;
-
-
-typedef struct _OS_802_11_AC_UPSD_STATUS_PARAMS
-{
-   TI_UINT32                uAC;
-   TI_UINT32                uCurrentUAPSDStatus;
-   TI_UINT32                pCurrentAdmissionStatus;
-
-} OS_802_11_AC_UPSD_STATUS_PARAMS;
-
-
-typedef struct _OS_802_11_THRESHOLD_CROSS_PARAMS
-{
-    TI_UINT32               uAC;
-    TI_UINT32               uHighThreshold;
-    TI_UINT32               uLowThreshold;
-
-} OS_802_11_THRESHOLD_CROSS_PARAMS;
-
-
-typedef struct OS_802_11_THRESHOLD_CROSS_INDICATION_PARAMS
-{
-    TI_UINT32               uAC;
-    TI_UINT32               uHighOrLowThresholdFlag;  /* According to thresholdCross_e enum */
-    TI_UINT32               uAboveOrBelowFlag;        /* According to thresholdCrossDirection_e enum */
-
-} OS_802_11_THRESHOLD_CROSS_INDICATION_PARAMS;
-
-
-typedef enum
-{
-    HIGH_THRESHOLD_CROSS,
-    LOW_THRESHOLD_CROSS
-
-} EThresholdCross;
-
-
-typedef enum
-{
-    CROSS_ABOVE,
-    CROSS_BELOW
-
-} EThresholdCrossDirection;
-
-
-typedef struct
-{
-   TI_UINT32                dstIpAddress;
-   TI_UINT32                dstPort;
-   TI_UINT32                PktTag;
-   TI_UINT32                userPriority;
-
-} TStreamTrafficProperties;
-
-
-typedef enum
-{
-   UPLINK_DIRECTION = 0,
-   DOWNLINK_DIRECTION = 1,
-   RESERVED_DIRECTION = 2,
-   BI_DIRECTIONAL = 3
-
-} EStreamDirection;
-
-
-/* classification algorithms: 
-  0) D-tag to D-tag
-  1) DSCP to D-tag
-  2) Destination port number to D-tag 
-  3) Destination IP&Port to D-tag
-*/
-typedef enum
-{
-    D_TAG_CLSFR    = 0,
-    DSCP_CLSFR     = 1,
-    PORT_CLSFR     = 2,
-    IPPORT_CLSFR   = 3,
-    CLSFR_MAX_TYPE = IPPORT_CLSFR
-
-} EClsfrType;
-
-
-
-/*************************/
-/*   classifier params   */
-/*************************/
-
-/* Destination IP address and port number */
-typedef struct 
-{
-    TI_UINT32               DstIPAddress;
-    TI_UINT16               DstPortNum;
-
-} TIpPort;
-
-/* Classification mapping table */
-typedef struct 
-{
-    union   
-    {
-        TIpPort             DstIPPort;  /* for destination IP&Port classifier*/
-        TI_UINT16           DstPortNum; /* for destination Port classifier*/
-        TI_UINT8            CodePoint;  /* for DSCP classifier*/
-    } Dscp;
-
-    TI_UINT8                DTag;
-
-} TClsfrTableEntry;
-
-/* number of classifier entries in the classification table */
-#define NUM_OF_CLSFR_TABLE_ENTRIES  16
-
-typedef struct
-{
-    EClsfrType              eClsfrType; /* The type of the classifier: D-tag, DSCP, Port or IP&Port */
-    TI_UINT32               uNumActiveEntries; /* The number of active entries in the classification table */
-    TClsfrTableEntry        ClsfrTable[NUM_OF_CLSFR_TABLE_ENTRIES]; /* Classification table - size changed from 15 to 16*/
-
-} TClsfrParams;
-
-typedef struct{
-	TI_UINT8                       voiceTspecConfigure;
-	TI_UINT8                       videoTspecConfigure;
-}TSpecConfigure;
-
-#endif /* TI_QOS_TYPES_H */
-
diff --git a/wl1271/utils/tidef.h b/wl1271/utils/tidef.h
deleted file mode 100644
index e06a186..0000000
--- a/wl1271/utils/tidef.h
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * tidef.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TIDEF_H
-#define TIDEF_H
-
-#include "osTIType.h"
-
-/** \file  tidef.h 
- * \brief TI User Definitions APIs 
- * \n\n
- * Note: TI_ prefix implies TI wrapping of primitives which is used for partability.
- * E.g. using these interfaces enables porting between different OS under these 
- * interfaces without user notice.
- * \n\n
- */
-
-/**********************
- *	Definitions
- **********************/
-
-/**
- * \def TI_FALSE
- * \brief False value
- */
-#define TI_FALSE                    0
-/**
- * \def TI_TRUE
- * \brief True value
- */
-#define TI_TRUE                     1
-
-/**
- * \def TI_OK
- * \brief OK return value
- */
-#define TI_OK                       0
-/**
- * \def TI_NOK
- * \brief NOT OK return value
- */
-#define TI_NOK                      1
-/**
- * \def MAC_ADDR_LEN
- * \brief Length of Standart MAC address
- */
-#define MAC_ADDR_LEN                6
-/**
- * \def IP_V4_ADDR_LEN
- * \brief Length of Standart IP V4 address
- */
-#define REGISTER_SIZE		        4
-#define IP_V4_ADDR_LEN              4
-/**
- * \def IP_V4_ADDR_LEN
- * \brief Length of Standart IP V6 address
- */
-#define IP_V6_ADDR_LEN              6
-
-/**********************
- *	Macros
- **********************/
-
-
-#ifndef TI_MAX
-/**
- * \def TI_MAX
- * \brief Macro which returns the maximum of two values
- */
-#define TI_MAX(a,b)                 (((a) > (b)) ? (a) : (b))
-#endif
-
-#ifndef TI_MIN
-/**
- * \def TI_MAX
- * \brief Macro which returns the minimum of two values
- */
-#define TI_MIN(a,b)                 (((a) < (b)) ? (a) : (b))
-#endif
-
-#ifndef NULL
-/**
- * \def NULL
- * \brief Macro which returns NULL
- */
-#define NULL                        ((void *)0)
-#endif
-
-/**
- * \def TI_VOIDCAST
- * \brief Macro which Casts to void
- */
-#ifndef TI_VOIDCAST 
-#define TI_VOIDCAST(p)             ((void)p)
-#endif
-
-
-#ifndef SIZE_ARR
-/**
- * \def SIZE_ARR
- * \brief Macro which returns number of elements in array a
- */
-#define SIZE_ARR(a)                 (sizeof(a)/sizeof(a[0]))
-#endif
-
-
-#ifndef TI_FIELD_OFFSET
-/**
- * \def TI_FIELD_OFFSET
- * \brief Macro which returns a field offset from structure begine
- */
-#define TI_FIELD_OFFSET(type,field)    ((TI_UINT32)(&(((type*)0)->field)))
-#endif                                 
-
-
-#ifndef TI_BIT
-#define TI_BIT(x)                   (1 << (x))
-#endif
-
-
-#ifndef IS_MASK_ON
-/**
- * \def IS_MASK_ON
- * \brief Macro which returns True if bitmask in field is on (==1) \n
- * Otherwise returns False
- */
-#define IS_MASK_ON(  field, bitmask ) (  (bitmask) == ( (field) &  (bitmask) ) )
-#endif
-
-#ifndef IS_MASK_OFF
-/**
- * \def IS_MASK_OFF
- * \brief Macro which returns True if bitmask in field is off (==0) \n
- * Otherwise returns False
- */
-#define IS_MASK_OFF( field, bitmask ) ( ~(bitmask) == ( (field) | ~(bitmask) ) )
-#endif
-
-
-#ifndef INRANGE
-/**
- * \def INRANGE
- * \brief Macro which returns True if value (x) in range (law <= x <= high) \n
- * Otherwise returns False
- */
-#define INRANGE(x,low,high)         (((x) >= (low)) && ((x) <= (high)))
-#endif
-
-#ifndef OUTRANGE
-/**
- * \def OUTRANGE
- * \brief Macro which returns True if value (x) out of range (x < law | x > high) \n
- * Otherwise returns False
- */
-#define OUTRANGE(x,low,high)        (((x) < (low)) || ((x) > (high)))
-#endif
-
-/* Due to alignment exceptions MAC_COPY and MAC_EQUAL are done byte by byte */
-
-/**
- * \def MAC_COPY
- * \brief Macro which copies 6 bytes source to 6 bytes destination \n
- * Due to alignment exceptions MAC_COPY is done byte by byte
- */
-#define MAC_COPY(dst,src)           ((TI_UINT8*)(dst))[0] = ((TI_UINT8*)(src))[0]; \
-                                    ((TI_UINT8*)(dst))[1] = ((TI_UINT8*)(src))[1]; \
-                                    ((TI_UINT8*)(dst))[2] = ((TI_UINT8*)(src))[2]; \
-                                    ((TI_UINT8*)(dst))[3] = ((TI_UINT8*)(src))[3]; \
-                                    ((TI_UINT8*)(dst))[4] = ((TI_UINT8*)(src))[4]; \
-                                    ((TI_UINT8*)(dst))[5] = ((TI_UINT8*)(src))[5]
-/**
- * \def MAC_EQUAL
- * \brief Macro which compares 6 bytes ofmac1 to 6 bytes of mac2 and returns True if all are equall \n
- * Otherwise returns False \n
- * Due to alignment exceptions MAC_EQUAL is done byte by byte
- */
-#define MAC_EQUAL(mac1,mac2)        (((TI_UINT8*)(mac1))[0] == ((TI_UINT8*)(mac2))[0] && \
-                                     ((TI_UINT8*)(mac1))[1] == ((TI_UINT8*)(mac2))[1] && \
-                                     ((TI_UINT8*)(mac1))[2] == ((TI_UINT8*)(mac2))[2] && \
-                                     ((TI_UINT8*)(mac1))[3] == ((TI_UINT8*)(mac2))[3] && \
-                                     ((TI_UINT8*)(mac1))[4] == ((TI_UINT8*)(mac2))[4] && \
-                                     ((TI_UINT8*)(mac1))[5] == ((TI_UINT8*)(mac2))[5])
-/**
- * \def MAC_BROADCAST
- * \brief Macro which returns True if MAC address is broadcast (equals "\xff\xff\xff\xff\xff\xff") \n
- * Otherwise returns False
- */
-#define MAC_BROADCAST(mac)          MAC_EQUAL (mac, "\xff\xff\xff\xff\xff\xff")
-/**
- * \def MAC_NULL
- * \brief Macro which returns True if MAC address is Null (equals "\x0\x0\x0\x0\x0\x0") \n
- * Otherwise returns False
- */
-#define MAC_NULL(mac)               MAC_EQUAL (mac, "\x0\x0\x0\x0\x0\x0")
-/**
- * \def MAC_MULTICAST
- * \brief Macro which returns True if MAC address is Multicast\n
- * Otherwise returns False
- */
-#define MAC_MULTICAST(mac)          ((mac)[0] & 0x01)
-/**
- * \def IP_COPY
- * \brief Macro which copies IP V4 source to IP V4 destination 
- */
-#define IP_COPY(dst,src)            *((TI_UINT32*)(dst)) = *((TI_UINT32*)(src))
-/**
- * \def BYTE_SWAP_WORD
- * \brief Macro which swaps Word's bytes. Used for Endian handling
- */
-#define BYTE_SWAP_WORD(x)           ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
-/**
- * \def BYTE_SWAP_LONG
- * \brief Macro which swaps Long's bytes. Used for Endian handling
- */
-#define BYTE_SWAP_LONG(x)           ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) | \
-                                     (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24))
-
-
-/* TI always supports Little Endian */
-#if defined (__BYTE_ORDER_BIG_ENDIAN)
-
-#define WLANTOHL(x)                 (x)
-#define WLANTOHS(x)                 (x)
-#define HTOWLANL(x)                 (x)
-#define HTOWLANS(x)                 (x)
-
-#define ENDIAN_HANDLE_WORD(x)       BYTE_SWAP_WORD (x)
-#define ENDIAN_HANDLE_LONG(x)       BYTE_SWAP_LONG (x)
-
-#define INT64_LOWER(x)              *(((TI_UINT32*)&(x))+1)
-#define INT64_HIGHER(x)             *((TI_UINT32*)&(x))
-
-#define COPY_WLAN_WORD(dst,src)     ((TI_UINT8 *)(dst))[0] = ((TI_UINT8 *)(src))[1]; \
-                                    ((TI_UINT8 *)(dst))[1] = ((TI_UINT8 *)(src))[0]
-#define COPY_WLAN_LONG(dst,src)     ((TI_UINT8 *)(dst))[0] = ((TI_UINT8 *)(src))[3]; \
-                                    ((TI_UINT8 *)(dst))[1] = ((TI_UINT8 *)(src))[2]; \
-                                    ((TI_UINT8 *)(dst))[2] = ((TI_UINT8 *)(src))[1]; \
-                                    ((TI_UINT8 *)(dst))[3] = ((TI_UINT8 *)(src))[0]
-
-#define SET_WLAN_WORD(dst,val)      ((TI_UINT8 *)(dst))[1] =  (val)        & 0xff; \
-                                    ((TI_UINT8 *)(dst))[0] = ((val) >> 8)  & 0xff
-
-#define SET_WLAN_LONG(dst,val)      ((TI_UINT8 *)(dst))[3] =  (val)        & 0xff; \
-                                    ((TI_UINT8 *)(dst))[2] = ((val) >> 8)  & 0xff; \
-                                    ((TI_UINT8 *)(dst))[1] = ((val) >> 16) & 0xff; \
-                                    ((TI_UINT8 *)(dst))[0] = ((val) >> 24) & 0xff
-
-#define WLAN_WORD(src)              (((TI_UINT8 *)(src))[1]) | (((TI_UINT8 *)(src))[0] << 8)
-#define WLAN_LONG(src)              (((TI_UINT8 *)(src))[3]) | (((TI_UINT8 *)(src))[2] << 8) | (((TI_UINT8 *)(src))[1] << 16) | (((TI_UINT8 *)(src))[0] << 24)
-
-#elif defined (__BYTE_ORDER_LITTLE_ENDIAN)
-
-/**
- * \def WLANTOHL
- * \brief Macro which performs bytes swap of Long in Little Endian
- */
-#define WLANTOHL(x)                 BYTE_SWAP_LONG (x)
-/**
- * \def WLANTOHS
- * \brief Macro which performs bytes swap of Word in Little Endian
- */
-#define WLANTOHS(x)                 BYTE_SWAP_WORD (x)
-/**
- * \def HTOWLANL
- * \brief Macro which performs bytes swap of Long in Little Endian
- */
-#define HTOWLANL(x)                 BYTE_SWAP_LONG (x)
-/**
- * \def HTOWLANL
- * \brief Macro which performs bytes swap of Word in Little Endian
- */
-#define HTOWLANS(x)                 BYTE_SWAP_WORD (x)
-
-/**
- * \def ENDIAN_HANDLE_WORD
- * \brief Macro which handles Word in Little Endian 
- */
-#define ENDIAN_HANDLE_WORD(x)       (x)
-/**
- * \def ENDIAN_HANDLE_WORD
- * \brief Macro which handles Long in Little Endian 
- */
-#define ENDIAN_HANDLE_LONG(x)       (x)
-
-/**
- * \def INT64_HIGHER
- * \brief Macro which returns the content of higher address of INT64 variable in Little Endian
- */
-#define INT64_HIGHER(x)             *(((TI_UINT32*)&(x))+1)
-/**
- * \def INT64_LOWER
- * \brief Macro which returns the content of lower address of INT64 variable in Little Endian
- */
-#define INT64_LOWER(x)              *((TI_UINT32*)&(x))
-
-/**
- * \def COPY_WLAN_WORD
- * \brief Macro which copies word source to word destination byte by byte in Little Endian
- */
-#define COPY_WLAN_WORD(dst,src)     ((TI_UINT8 *)(dst))[0] = ((TI_UINT8 *)(src))[0]; \
-                                    ((TI_UINT8 *)(dst))[1] = ((TI_UINT8 *)(src))[1]
-/**
- * \def COPY_WLAN_LONG
- * \brief Macro which copies long source to long destination byte by byte in Little Endian
- */
-#define COPY_WLAN_LONG(dst,src)     ((TI_UINT8 *)(dst))[0] = ((TI_UINT8 *)(src))[0]; \
-                                    ((TI_UINT8 *)(dst))[1] = ((TI_UINT8 *)(src))[1]; \
-                                    ((TI_UINT8 *)(dst))[2] = ((TI_UINT8 *)(src))[2]; \
-                                    ((TI_UINT8 *)(dst))[3] = ((TI_UINT8 *)(src))[3]
-/**
- * \def SET_WLAN_WORD
- * \brief Macro which copies Word from val source to desrination in Little Endian
- */
-#define SET_WLAN_WORD(dst,val)      ((TI_UINT8 *)(dst))[0] =  (val)        & 0xff; \
-                                    ((TI_UINT8 *)(dst))[1] = ((val) >> 8)  & 0xff
-/**
- * \def SET_WLAN_LONG
- * \brief Macro which copies Long from val source to desrination in Little Endian
- */
-#define SET_WLAN_LONG(dst,val)      ((TI_UINT8 *)(dst))[0] =  (val)        & 0xff; \
-                                    ((TI_UINT8 *)(dst))[1] = ((val) >> 8)  & 0xff; \
-                                    ((TI_UINT8 *)(dst))[2] = ((val) >> 16) & 0xff; \
-                                    ((TI_UINT8 *)(dst))[3] = ((val) >> 24) & 0xff
-/**
- * \def WLAN_WORD
- * \brief Macro which returns Word value from source address in Little Endian
- */
-#define WLAN_WORD(src)              (((TI_UINT8 *)(src))[0]) | (((TI_UINT8 *)(src))[1] << 8)
-/**
- * \def WLAN_LONG
- * \brief Macro which returns Long value from source address in Little Endian
- */
-#define WLAN_LONG(src)              (((TI_UINT8 *)(src))[0]) | (((TI_UINT8 *)(src))[1] << 8) | (((TI_UINT8 *)(src))[2] << 16) | (((TI_UINT8 *)(src))[3] << 24)
-#else
-
-#error "Must define byte order (BIG/LITTLE ENDIAN)"
-
-#endif
-
-
-/**********************
- *	types
- **********************/
-
-/**
- * \typedef TI_HANDLE
- * \brief Handle type - Pointer to void
- */
-typedef void*                       TI_HANDLE;
-/**
- * \typedef TI_BOOL
- * \brief Boolean type
- * \n
- * Used for indicating True or False ( TI_TRUE | TI_FALSE )
- */
-typedef TI_UINT32                   TI_BOOL;
-/**
- * \typedef TI_STATUS
- * \brief Return Status type
- * \n
- * Used as return status ( TI_OK | TI_NOK | TI_PENDING )
- */
-typedef TI_UINT32                   TI_STATUS;
-/**
- * \typedef TMacAddr
- * \brief MAC Address Type
- * \n
- * A buffer (size of Standart MAC Address Length in bytes) which holds a MAC address
- */
-typedef TI_UINT8                    TMacAddr [MAC_ADDR_LEN];
-/**
- * \typedef TIpAddr
- * \brief IP V4 Address Type
- * \n
- * A buffer (size of Standart IP V4 Address Length in bytes) which holds IP V4 address
- */
-typedef TI_UINT8                    TIpAddr [IP_V4_ADDR_LEN];
-
-#endif /* TIDEF_H */
-
-
diff --git a/wl1271/utils/timer.c b/wl1271/utils/timer.c
deleted file mode 100644
index 7be2426..0000000
--- a/wl1271/utils/timer.c
+++ /dev/null
@@ -1,666 +0,0 @@
-/*
- * timer.c
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/** \file   timer.c 
- *  \brief  The timers services OS-Independent layer over the OS-API timer services which are OS-Dependent.
- *  
- *  \see    timer.h, osapi.c
- */
-
-#define __FILE_ID__  FILE_ID_0
-#include "osApi.h"
-#include "report.h"
-#include "queue.h"
-#include "context.h"
-#include "timer.h"
-
-
-#define EXPIRY_QUE_SIZE  QUE_UNLIMITED_SIZE
-
-/* The timer module structure (common to all timers) */
-typedef struct 
-{
-    TI_HANDLE   hOs;
-    TI_HANDLE   hReport;
-    TI_HANDLE   hContext;
-    TI_UINT32   uContextId;     /* The ID allocated to this module on registration to context module */
-    TI_HANDLE   hInitQueue;     /* Handle of the Init-Queue */
-    TI_HANDLE   hOperQueue;     /* Handle of the Operational-Queue */
-    TI_BOOL     bOperState;     /* TRUE when the driver is in operational state (not init or recovery) */
-    TI_UINT32   uTwdInitCount;  /* Increments on each TWD init (i.e. recovery) */
-    TI_UINT32   uTimersCount;   /* Number of created timers */
-} TTimerModule;	
-
-/* Per timer structure */
-typedef struct 
-{
-    TI_HANDLE    hTimerModule;             /* The timer module handle (see TTimerModule, needed on expiry) */
-    TI_HANDLE    hOsTimerObj;              /* The OS-API timer object handle */
-    TQueNodeHdr  tQueNodeHdr;              /* The header used for queueing the timer */
-    TTimerCbFunc fExpiryCbFunc;            /* The CB-function provided by the timer user for expiration */
-    TI_HANDLE    hExpiryCbHndl;            /* The CB-function handle */
-    TI_UINT32    uIntervalMsec;            /* The timer duration in Msec */
-    TI_BOOL      bPeriodic;                /* If TRUE, restarted after each expiry */
-    TI_BOOL      bOperStateWhenStarted;    /* The bOperState value when the timer was started */
-    TI_UINT32    uTwdInitCountWhenStarted; /* The uTwdInitCount value when the timer was started */
-} TTimerInfo;	
-
-
-
-
-/** 
- * \fn     tmr_Create 
- * \brief  Create the timer module
- * 
- * Allocate and clear the timer module object.
- * 
- * \note   This is NOT a specific timer creation! (see tmr_CreateTimer)
- * \param  hOs - Handle to Os Abstraction Layer
- * \return Handle of the allocated object 
- * \sa     tmr_Destroy
- */ 
-TI_HANDLE tmr_Create (TI_HANDLE hOs)
-{
-    TI_HANDLE hTimerModule;
-
-    /* allocate module object */
-    hTimerModule = os_memoryAlloc (hOs, sizeof(TTimerModule));
-	
-    if (!hTimerModule)
-    {
-        WLAN_OS_REPORT (("tmr_Create():  Allocation failed!!\n"));
-        return NULL;
-    }
-	
-    os_memoryZero (hOs, hTimerModule, (sizeof(TTimerModule)));
-
-    return (hTimerModule);
-}
-
-
-/** 
- * \fn     tmr_Destroy
- * \brief  Destroy the module. 
- * 
- * Free the module's queues and object.
- * 
- * \note   This is NOT a specific timer destruction! (see tmr_DestroyTimer)
- * \param  hTimerModule - The module object
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     tmr_Create
- */ 
-TI_STATUS tmr_Destroy (TI_HANDLE hTimerModule)
-{
-    TTimerModule *pTimerModule = (TTimerModule *)hTimerModule;
-
-    if (!pTimerModule)
-    {
-        WLAN_OS_REPORT (("tmr_Destroy(): ERROR - NULL timer!\n"));
-        return TI_NOK;
-    }
-
-    /* Alert if there are still timers that were not destroyed */
-    if (pTimerModule->uTimersCount)
-    {
-        WLAN_OS_REPORT (("tmr_Destroy():  ERROR - Destroying Timer module but not all timers were destroyed!!\n"));
-    }
-
-    /* Destroy the module's queues (protect in critical section)) */
-    context_EnterCriticalSection (pTimerModule->hContext);
-    que_Destroy (pTimerModule->hInitQueue);
-    que_Destroy (pTimerModule->hOperQueue);
-    context_LeaveCriticalSection (pTimerModule->hContext);
-
-    /* free module object */
-    os_memoryFree (pTimerModule->hOs, pTimerModule, sizeof(TTimerModule));
-	
-    return TI_OK;
-}
-/** 
- * \fn     tmr_Free
- * \brief  Free the memory. 
- * 
- * Free the module's queues and object.
- * 
- * \param  hTimerModule - The module object
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     tmr_Create
- */ 
-TI_STATUS tmr_Free(TI_HANDLE hTimerModule)
-{
-    TTimerModule *pTimerModule = (TTimerModule *)hTimerModule;
-
-    if (!pTimerModule)
-    {
-        WLAN_OS_REPORT (("tmr_Free(): ERROR - NULL timer!\n"));
-        return TI_NOK;
-    }
-
-    /* free module object */
-    os_memoryFree (pTimerModule->hOs, pTimerModule, sizeof(TTimerModule));
-	
-    return TI_OK;
-}
-
-
-/** 
- * \fn     tmr_ClearInitQueue & tmr_ClearOperQueue
- * \brief  Clear Init/Operationsl queue
- * 
- * Dequeue all queued timers.
- * 
- * \note   
- * \param  hTimerModule - The object                                          
- * \return void 
- * \sa     
- */ 
-void tmr_ClearInitQueue (TI_HANDLE hTimerModule)
-{
-    TTimerModule *pTimerModule = (TTimerModule *)hTimerModule;
-
-    context_EnterCriticalSection (pTimerModule->hContext);
-    while (que_Dequeue (pTimerModule->hInitQueue) != NULL) {}
-    context_LeaveCriticalSection (pTimerModule->hContext);
-}
-
-void tmr_ClearOperQueue (TI_HANDLE hTimerModule)
-{
-    TTimerModule *pTimerModule = (TTimerModule *)hTimerModule;
-
-    context_EnterCriticalSection (pTimerModule->hContext);
-    while (que_Dequeue (pTimerModule->hOperQueue) != NULL) {}
-    context_LeaveCriticalSection (pTimerModule->hContext);
-}
-
-
-/** 
- * \fn     tmr_Init 
- * \brief  Init required handles 
- * 
- * Init required handles and module variables, create the init-queue and 
- *     operational-queue, and register as the context-engine client.
- * 
- * \note    
- * \param  hTimerModule  - The queue object
- * \param  hOs       - Handle to Os Abstraction Layer
- * \param  hReport   - Handle to report module
- * \param  hContext  - Handle to context module
- * \return void        
- * \sa     
- */ 
-void tmr_Init (TI_HANDLE hTimerModule, TI_HANDLE hOs, TI_HANDLE hReport, TI_HANDLE hContext)
-{
-    TTimerModule *pTimerModule = (TTimerModule *)hTimerModule;
-    TI_UINT32     uNodeHeaderOffset;
-
-    if (!pTimerModule)
-    {
-        WLAN_OS_REPORT (("tmr_Init(): ERROR - NULL timer!\n"));
-        return;
-    }
-
-    pTimerModule->hOs           = hOs;
-    pTimerModule->hReport       = hReport;
-    pTimerModule->hContext      = hContext;
-	
-    pTimerModule->bOperState    = TI_FALSE;
-    pTimerModule->uTimersCount  = 0;
-    pTimerModule->uTwdInitCount = 0;
-
-    /* The offset of the queue-node-header from timer structure entry is needed by the queue */
-    uNodeHeaderOffset = TI_FIELD_OFFSET(TTimerInfo, tQueNodeHdr); 
-
-    /* Create and initialize the Init and Operational queues (for timers expiry events) */
-    pTimerModule->hInitQueue = que_Create (pTimerModule->hOs, 
-                                           pTimerModule->hReport, 
-                                           EXPIRY_QUE_SIZE, 
-                                           uNodeHeaderOffset);
-    pTimerModule->hOperQueue = que_Create (pTimerModule->hOs, 
-                                           pTimerModule->hReport, 
-                                           EXPIRY_QUE_SIZE, 
-                                           uNodeHeaderOffset);
-
-    /* Register to the context engine and get the client ID */
-    pTimerModule->uContextId = context_RegisterClient (pTimerModule->hContext,
-                                                       tmr_HandleExpiry,
-                                                       hTimerModule,
-                                                       TI_TRUE,
-                                                       "TIMER",
-                                                       sizeof("TIMER"));
-}
-
-
-/** 
- * \fn     tmr_UpdateDriverState 
- * \brief  Update driver state 
- * 
- * Under critical section, update driver state (operational or not),
- *   and if opertional, clear init queue.
- * Leave critical section and if operational state, request schedule for handling 
- *   timer events in driver context (if any).
- * 
- * \note    
- * \param  hTimerModule - The timer module object
- * \param  bOperState   - TRUE if driver state is now operational, FALSE if not.
- * \return void  
- * \sa     
- */ 
-void tmr_UpdateDriverState (TI_HANDLE hTimerModule, TI_BOOL bOperState)
-{
-    TTimerModule *pTimerModule = (TTimerModule *)hTimerModule;
-
-    if (!pTimerModule)
-    {
-        WLAN_OS_REPORT (("tmr_UpdateDriverState(): ERROR - NULL timer!\n"));
-        return;
-    }
-
-    /* Enter critical section */
-    context_EnterCriticalSection (pTimerModule->hContext);
-
-    if (bOperState == pTimerModule->bOperState) 
-    {
-        context_LeaveCriticalSection (pTimerModule->hContext);
-        TRACE1(pTimerModule->hReport, REPORT_SEVERITY_ERROR, "tmr_UpdateDriverState(): New bOperState (%d) is as current!\n", bOperState);
-        return;
-    }
-
-    /* Save new state (TRUE means operational). */
-    pTimerModule->bOperState = bOperState;
-
-    /* If new state is operational */
-    if (bOperState) 
-    {
-        /* Increment the TWD initializations counter (for detecting recovery events). */
-        pTimerModule->uTwdInitCount++;
-
-        /* Empty the init queue (obsolete). */
-        while (que_Dequeue (pTimerModule->hInitQueue) != NULL) {}
-    }
-
-    /* Leave critical section */
-    context_LeaveCriticalSection (pTimerModule->hContext);
-
-    /* If new state is operational, request switch to driver context for handling timer events */
-    if (bOperState) 
-    {
-        context_RequestSchedule (pTimerModule->hContext, pTimerModule->uContextId);
-    }
-}
-
-
-
-/** 
- * \fn     tmr_CreateTimer
- * \brief  Create a new timer
- * 
- * Create a new timer object, icluding creating a timer in the OS-API.  
- * 
- * \note   This timer creation may be used only after tmr_Create() and tmr_Init() were executed!!
- * \param  hTimerModule - The module handle
- * \return TI_HANDLE    - The created timer handle
- * \sa     tmr_DestroyTimer
- */ 
-TI_HANDLE tmr_CreateTimer (TI_HANDLE hTimerModule)
-{
-    TTimerModule *pTimerModule = (TTimerModule *)hTimerModule; /* The timer module handle */
-    TTimerInfo   *pTimerInfo;  /* The created timer handle */
-
-    if (!pTimerModule)
-    {
-        WLAN_OS_REPORT (("tmr_CreateTimer(): ERROR - NULL timer!\n"));
-        return NULL;
-    }
-
-    /* Allocate timer object */
-    pTimerInfo = os_memoryAlloc (pTimerModule->hOs, sizeof(TTimerInfo));
-    if (!pTimerInfo)
-    {
-        WLAN_OS_REPORT (("tmr_CreateTimer():  Timer allocation failed!!\n"));
-        return NULL;
-    }
-    os_memoryZero (pTimerModule->hOs, pTimerInfo, (sizeof(TTimerInfo)));
-
-    /* Allocate OS-API timer, providing the common expiry callback with the current timer handle */
-    pTimerInfo->hOsTimerObj = os_timerCreate(pTimerModule->hOs, tmr_GetExpiry, (TI_HANDLE)pTimerInfo);
-    if (!pTimerInfo->hOsTimerObj)
-    {
-        TRACE0(pTimerModule->hReport, REPORT_SEVERITY_CONSOLE ,"tmr_CreateTimer():  OS-API Timer allocation failed!!\n");
-        os_memoryFree (pTimerModule->hOs, pTimerInfo, sizeof(TTimerInfo));
-        WLAN_OS_REPORT (("tmr_CreateTimer():  OS-API Timer allocation failed!!\n"));
-        return NULL;
-    }
-
-    /* Save the timer module handle in the created timer object (needed for the expiry callback) */
-    pTimerInfo->hTimerModule = hTimerModule;
-    pTimerModule->uTimersCount++;  /* count created timers */
-
-    /* Return the created timer handle */
-    return (TI_HANDLE)pTimerInfo;
-}
-
-
-/** 
- * \fn     tmr_DestroyTimer
- * \brief  Destroy the specified timer
- * 
- * Destroy the specified timer object, icluding the timer in the OS-API.  
- * 
- * \note   This timer destruction function should be used before tmr_Destroy() is executed!!
- * \param  hTimerInfo - The timer handle
- * \return TI_OK on success or TI_NOK on failure 
- * \sa     tmr_CreateTimer
- */ 
-TI_STATUS tmr_DestroyTimer (TI_HANDLE hTimerInfo)
-{
-    TTimerInfo *pTimerInfo = (TTimerInfo *)hTimerInfo;  /* The timer handle */     
-    TTimerModule *pTimerModule;                  /* The timer module handle */
-
-    if (!pTimerInfo)
-    {
-        return TI_NOK;
-    }
-    pTimerModule = (TTimerModule *)pTimerInfo->hTimerModule;
-    if (!pTimerModule)
-    {
-        WLAN_OS_REPORT (("tmr_DestroyTimer(): ERROR - NULL timer!\n"));
-        return TI_NOK;
-    }
-
-    /* Free the OS-API timer */
-    if (pTimerInfo->hOsTimerObj) {
-        os_timerDestroy (pTimerModule->hOs, pTimerInfo->hOsTimerObj);
-        pTimerModule->uTimersCount--;  /* update created timers number */
-    }
-    /* Free the timer object */
-    os_memoryFree (pTimerModule->hOs, hTimerInfo, sizeof(TTimerInfo));
-    return TI_OK;
-}
-
-
-/** 
- * \fn     tmr_StartTimer
- * \brief  Start a timer
- * 
- * Start the specified timer running.
- * 
- * \note   Periodic-Timer may be used by applications that serve the timer expiry 
- *           in a single context.
- *         If an application can't finish serving the timer expiry in a single context, 
- *           e.g. periodic scan, then it isn't recommended to use the periodic timer service.
- *         If such an application uses the periodic timer then it should protect itself from cases
- *            where the timer expires again before the previous timer expiry processing is finished!!
- * \param  hTimerInfo    - The specific timer handle
- * \param  fExpiryCbFunc - The timer's expiry callback function.
- * \param  hExpiryCbHndl - The client's expiry callback function handle.
- * \param  uIntervalMsec - The timer's duration in Msec.
- * \param  bPeriodic     - If TRUE, the timer is restarted after expiry.
- * \return void
- * \sa     tmr_StopTimer, tmr_GetExpiry
- */ 
-void tmr_StartTimer (TI_HANDLE     hTimerInfo,
-                     TTimerCbFunc  fExpiryCbFunc,
-                     TI_HANDLE     hExpiryCbHndl,
-                     TI_UINT32     uIntervalMsec,
-                     TI_BOOL       bPeriodic)
-{
-    TTimerInfo   *pTimerInfo   = (TTimerInfo *)hTimerInfo;                 /* The timer handle */     
-    TTimerModule *pTimerModule = (TTimerModule *)pTimerInfo->hTimerModule; /* The timer module handle */
-
-    if (!pTimerModule)
-    {
-        WLAN_OS_REPORT (("tmr_StartTimer(): ERROR - NULL timer!\n"));
-        return;
-    }
-
-    /* Save the timer parameters. */
-    pTimerInfo->fExpiryCbFunc            = fExpiryCbFunc;
-    pTimerInfo->hExpiryCbHndl            = hExpiryCbHndl;
-    pTimerInfo->uIntervalMsec            = uIntervalMsec;
-    pTimerInfo->bPeriodic                = bPeriodic;
-    pTimerInfo->bOperStateWhenStarted    = pTimerModule->bOperState;
-    pTimerInfo->uTwdInitCountWhenStarted = pTimerModule->uTwdInitCount;
-
-    /* Start OS-API timer running */
-    os_timerStart(pTimerModule->hOs, pTimerInfo->hOsTimerObj, uIntervalMsec);
-}
-
-
-/** 
- * \fn     tmr_StopTimer
- * \brief  Stop a running timer
- * 
- * Stop the specified timer.
- * 
- * \note   When using this function, it must be considered that timer expiry may happen
- *           right before the timer is stopped, so it can't be assumed that this completely 
- *           prevents the timer expiry event!
- * \param  hTimerInfo - The specific timer handle
- * \return void
- * \sa     tmr_StartTimer
- */ 
-void tmr_StopTimer (TI_HANDLE hTimerInfo)
-{
-    TTimerInfo   *pTimerInfo   = (TTimerInfo *)hTimerInfo;                 /* The timer handle */     
-    TTimerModule *pTimerModule = (TTimerModule *)pTimerInfo->hTimerModule; /* The timer module handle */
-
-    if (!pTimerModule)
-    {
-        WLAN_OS_REPORT (("tmr_StopTimer(): ERROR - NULL timer!\n"));
-        return;
-    }
-
-    /* Stop OS-API timer running */
-    os_timerStop(pTimerModule->hOs, pTimerInfo->hOsTimerObj);
-
-    /* Clear periodic flag to prevent timer restart if we are in tmr_HandleExpiry context. */
-    pTimerInfo->bPeriodic = TI_FALSE;
-}
-
-
-/** 
- * \fn     tmr_GetExpiry
- * \brief  Called by OS-API upon any timer expiry
- * 
- * This is the common callback function called upon expiartion of any timer.
- * It is called by the OS-API in timer expiry context and handles the transition
- *   to the driver's context for handling the expiry event.
- * 
- * \note   
- * \param  hTimerInfo - The specific timer handle
- * \return void
- * \sa     tmr_HandleExpiry
- */ 
-void tmr_GetExpiry (TI_HANDLE hTimerInfo)
-{
-    TTimerInfo   *pTimerInfo   = (TTimerInfo *)hTimerInfo;                 /* The timer handle */     
-    TTimerModule *pTimerModule = (TTimerModule *)pTimerInfo->hTimerModule; /* The timer module handle */
-
-    if (!pTimerModule)
-    {
-        WLAN_OS_REPORT (("tmr_GetExpiry(): ERROR - NULL timer!\n"));
-        return;
-    }
-
-    /* Enter critical section */
-    context_EnterCriticalSection (pTimerModule->hContext);
-
-    /* 
-     * If the expired timer was started when the driver's state was Operational,
-     *   insert it to the Operational-queue 
-     */
-    if (pTimerInfo->bOperStateWhenStarted)
-    {
-        que_Enqueue (pTimerModule->hOperQueue, hTimerInfo);
-    }
-
-    /* 
-     * Else (started when driver's state was NOT-Operational), if now the state is still
-     *   NOT Operational insert it to the Init-queue.
-     *   (If state changed from non-operational to operational the event is ignored)
-     */
-    else if (!pTimerModule->bOperState)
-    {
-        que_Enqueue (pTimerModule->hInitQueue, hTimerInfo);
-    }
-
-    /* Leave critical section */
-    context_LeaveCriticalSection (pTimerModule->hContext);
-
-    /* Request switch to driver context for handling timer events */
-    context_RequestSchedule (pTimerModule->hContext, pTimerModule->uContextId);
-}
-
-
-/** 
- * \fn     tmr_HandleExpiry
- * \brief  Handles queued expiry events in driver context
- * 
- * This is the Timer module's callback that is registered to the ContextEngine module to be invoked
- *   from the driver task (after requested by tmr_GetExpiry through context_RequestSchedule ()).
- * It dequeues all expiry events from the queue that correlates to the current driver state,
- *   and calls their users callbacks.
- * 
- * \note   
- * \param  hTimerModule - The module object
- * \return void
- * \sa     tmr_GetExpiry
- */ 
-void tmr_HandleExpiry (TI_HANDLE hTimerModule)
-{
-    TTimerModule *pTimerModule = (TTimerModule *)hTimerModule; /* The timer module handle */
-    TTimerInfo   *pTimerInfo;      /* The timer handle */     
-    TI_BOOL       bTwdInitOccured; /* Indicates if TWD init occured since timer start */
-
-    if (!pTimerModule)
-    {
-        WLAN_OS_REPORT (("tmr_HandleExpiry(): ERROR - NULL timer!\n"));
-        return;
-    }
-
-    while (1)
-    {
-        /* Enter critical section */
-        context_EnterCriticalSection (pTimerModule->hContext);
-    
-        /* If current driver state is Operational, dequeue timer object from Operational-queue */
-        if (pTimerModule->bOperState)
-        {
-            pTimerInfo = (TTimerInfo *) que_Dequeue (pTimerModule->hOperQueue);
-        }
-    
-        /* Else (driver state is NOT-Operational), dequeue timer object from Init-queue */
-        else
-        {
-            pTimerInfo = (TTimerInfo *) que_Dequeue (pTimerModule->hInitQueue);
-        }
-    
-        /* Leave critical section */
-        context_LeaveCriticalSection (pTimerModule->hContext);
-
-        /* If no more objects in queue, exit */
-        if (!pTimerInfo) 
-        {
-            return;  /** EXIT Point **/
-        }
-
-        /* If current TWD-Init-Count is different than when the timer was started, Init occured. */
-        bTwdInitOccured = (pTimerModule->uTwdInitCount != pTimerInfo->uTwdInitCountWhenStarted);
-
-        /* Call specific timer callback function */
-        pTimerInfo->fExpiryCbFunc (pTimerInfo->hExpiryCbHndl, bTwdInitOccured);
-
-        /* If the expired timer is periodic, start it again. */
-        if (pTimerInfo->bPeriodic) 
-        {
-            tmr_StartTimer ((TI_HANDLE)pTimerInfo,
-                            pTimerInfo->fExpiryCbFunc,
-                            pTimerInfo->hExpiryCbHndl,
-                            pTimerInfo->uIntervalMsec,
-                            pTimerInfo->bPeriodic);
-        }
-    }
-}
-
-
-/** 
- * \fn     tmr_PrintModule / tmr_PrintTimer
- * \brief  Print module / timer information
- * 
- * Print the module's information / a specific timer information.
- * 
- * \note   
- * \param  The module / timer handle
- * \return void
- * \sa     
- */ 
-
-#ifdef TI_DBG
-
-void tmr_PrintModule (TI_HANDLE hTimerModule)
-{
-    TTimerModule *pTimerModule = (TTimerModule *)hTimerModule;
-
-    if (!pTimerModule)
-    {
-        WLAN_OS_REPORT (("tmr_PrintModule(): ERROR - NULL timer!\n"));
-        return;
-    }
-
-    /* Print module parameters */
-    WLAN_OS_REPORT(("tmr_PrintModule(): uContextId=%d, bOperState=%d, uTwdInitCount=%d, uTimersCount=%d\n", 
-    pTimerModule->uContextId, pTimerModule->bOperState, 
-    pTimerModule->uTwdInitCount, pTimerModule->uTimersCount));
-
-    /* Print Init Queue Info */
-    WLAN_OS_REPORT(("tmr_PrintModule(): Init-Queue:\n")); 
-    que_Print(pTimerModule->hInitQueue);
-
-    /* Print Operational Queue Info */
-    WLAN_OS_REPORT(("tmr_PrintModule(): Operational-Queue:\n")); 
-    que_Print(pTimerModule->hOperQueue);
-}
-
-void tmr_PrintTimer (TI_HANDLE hTimerInfo)
-{
-#ifdef REPORT_LOG
-    TTimerInfo   *pTimerInfo   = (TTimerInfo *)hTimerInfo;                 /* The timer handle */     
-
-    WLAN_OS_REPORT(("tmr_PrintTimer(): uIntervalMs=%d, bPeriodic=%d, bOperStateWhenStarted=%d, uTwdInitCountWhenStarted=%d, hOsTimerObj=0x%x, fExpiryCbFunc=0x%x\n", 
-    pTimerInfo->uIntervalMsec, pTimerInfo->bPeriodic, pTimerInfo->bOperStateWhenStarted, 
-    pTimerInfo->uTwdInitCountWhenStarted, pTimerInfo->hOsTimerObj, pTimerInfo->fExpiryCbFunc));
-#endif
-}
-
-#endif /* TI_DBG */
diff --git a/wl1271/utils/timer.h b/wl1271/utils/timer.h
deleted file mode 100644
index ed48e83..0000000
--- a/wl1271/utils/timer.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * timer.h
- *
- * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-
-/** \file   timer.h 
- *  \brief  timer module header file.                                  
- *
- *  \see    timer.c
- */
-
-#ifndef _TIMER_H_
-#define _TIMER_H_
-
-
-/* The callback function type for timer clients */
-typedef void (*TTimerCbFunc)(TI_HANDLE hCbHndl, TI_BOOL bTwdInitOccured);
-
-
-/* External Functions Prototypes */
-/* ============================= */
-TI_HANDLE tmr_Create (TI_HANDLE hOs);
-TI_STATUS tmr_Destroy (TI_HANDLE hTimerModule);
-TI_STATUS tmr_Free (TI_HANDLE hTimerModule);
-void      tmr_ClearInitQueue (TI_HANDLE hTimerModule);
-void      tmr_ClearOperQueue (TI_HANDLE hTimerModule);
-void      tmr_Init (TI_HANDLE hTimerModule, TI_HANDLE hOs, TI_HANDLE hReport, TI_HANDLE hContext);
-void      tmr_UpdateDriverState (TI_HANDLE hTimerModule, TI_BOOL bOperState);
-TI_HANDLE tmr_CreateTimer (TI_HANDLE hTimerModule);
-TI_STATUS tmr_DestroyTimer (TI_HANDLE hTimerInfo);
-void      tmr_StartTimer (TI_HANDLE     hTimerInfo,
-                          TTimerCbFunc  fExpiryCbFunc,
-                          TI_HANDLE     hExpiryCbHndl,
-                          TI_UINT32     uIntervalMsec,
-                          TI_BOOL       bPeriodic);
-void      tmr_StopTimer (TI_HANDLE hTimerInfo);
-void      tmr_GetExpiry (TI_HANDLE hTimerInfo);
-void      tmr_HandleExpiry (TI_HANDLE hTimerModule);
-
-#ifdef TI_DBG
-void      tmr_PrintModule (TI_HANDLE hTimerModule);
-void      tmr_PrintTimer (TI_HANDLE hTimerInfo);
-#endif /* TI_DBG */
-
-
-#endif  /* _TIMER_H_ */
-
-
diff --git a/wl1271/utils/version.h b/wl1271/utils/version.h
deleted file mode 100644
index 4f0f058..0000000
--- a/wl1271/utils/version.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * version.h
- *
- * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
- * All rights reserved.                                                  
- *                                                                       
- * Redistribution and use in source and binary forms, with or without    
- * modification, are permitted provided that the following conditions    
- * are met:                                                              
- *                                                                       
- *  * Redistributions of source code must retain the above copyright     
- *    notice, this list of conditions and the following disclaimer.      
- *  * Redistributions in binary form must reproduce the above copyright  
- *    notice, this list of conditions and the following disclaimer in    
- *    the documentation and/or other materials provided with the         
- *    distribution.                                                      
- *  * Neither the name Texas Instruments nor the names of its            
- *    contributors may be used to endorse or promote products derived    
- *    from this software without specific prior written permission.      
- *                                                                       
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-                                                                                                             
-/**************************************************************************/                                                                                                             
-/*                                                                        */                                                                                                             
-/*   MODULE:  version.h                                                   */                                                                                                             
-/*   PURPOSE: release specific definitions file.                          */                                                                                                             
-/*                                                                        */                                                                                                             
-/**************************************************************************/                                                                                                             
-                                                                                                             
-                                                                                                             
-#ifndef _VERSION_H_                                                                                                             
-#define _VERSION_H_                                                                                                             
-
-#define SW_VERSION_STR      "WiLink_Driver_6.1.0.0.131"
-
-#define SW_RELEASE_MONTH    03
-#define SW_RELEASE_DAY      21
-#define SW_RELEASE_YEAR     2010
-
-#endif /* _VERSION_H_ */
-                                                                                                       
-
diff --git a/wl1271/wpa_supplicant_lib/Android.mk b/wl1271/wpa_supplicant_lib/Android.mk
deleted file mode 100644
index 6fb1ec9..0000000
--- a/wl1271/wpa_supplicant_lib/Android.mk
+++ /dev/null
@@ -1,102 +0,0 @@
-#
-# Copyright (C) 2008 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-LOCAL_PATH := $(call my-dir)
-
-ifndef WPA_SUPPLICANT_VERSION
-WPA_SUPPLICANT_VERSION := VER_0_5_X
-endif
-
-ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_5_X)
-WPA_SUPPL_DIR = external/wpa_supplicant
-else
-WPA_SUPPL_DIR = external/wpa_supplicant_6/wpa_supplicant
-endif
-WPA_SUPPL_DIR_INCLUDE = $(WPA_SUPPL_DIR)
-ifeq ($(WPA_SUPPLICANT_VERSION),VER_0_6_X)
-WPA_SUPPL_DIR_INCLUDE += $(WPA_SUPPL_DIR)/src \
-	$(WPA_SUPPL_DIR)/src/common \
-	$(WPA_SUPPL_DIR)/src/drivers \
-	$(WPA_SUPPL_DIR)/src/l2_packet \
-	$(WPA_SUPPL_DIR)/src/utils \
-	$(WPA_SUPPL_DIR)/src/wps
-endif
-
-DK_ROOT = hardware/ti/wlan/$(BOARD_WLAN_DEVICE)
-OS_ROOT = $(DK_ROOT)/platforms
-STAD	= $(DK_ROOT)/stad
-UTILS	= $(DK_ROOT)/utils
-TWD	= $(DK_ROOT)/TWD
-COMMON  = $(DK_ROOT)/common
-TXN	= $(DK_ROOT)/Txn
-CUDK	= $(DK_ROOT)/CUDK
-LIB	= ../../lib
-
-include $(WPA_SUPPL_DIR)/android.config
-
-INCLUDES = $(STAD)/Export_Inc \
-	$(STAD)/src/Application \
-	$(UTILS) \
-	$(OS_ROOT)/os/linux/inc \
-	$(OS_ROOT)/os/common/inc \
-	$(TWD)/TWDriver \
-	$(TWD)/FirmwareApi \
-	$(TWD)/TwIf \
-	$(TWD)/FW_Transfer/Export_Inc \
-	$(TXN) \
-	$(CUDK)/configurationutility/inc \
-	$(CUDK)/os/common/inc \
-	external/openssl/include \
-	$(WPA_SUPPL_DIR_INCLUDE) \
-	$(DK_ROOT)/../lib
-  
-L_CFLAGS = -DCONFIG_DRIVER_CUSTOM -DHOST_COMPILE -D__BYTE_ORDER_LITTLE_ENDIAN
-L_CFLAGS += -DWPA_SUPPLICANT_$(WPA_SUPPLICANT_VERSION)
-OBJS = driver_ti.c $(LIB)/scanmerge.c $(LIB)/shlist.c
-
-# To force sizeof(enum) = 4
-L_CFLAGS += -mabi=aapcs-linux
-
-ifdef CONFIG_NO_STDOUT_DEBUG
-L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
-endif
-
-ifdef CONFIG_DEBUG_FILE
-L_CFLAGS += -DCONFIG_DEBUG_FILE
-endif
-
-ifdef CONFIG_ANDROID_LOG
-L_CFLAGS += -DCONFIG_ANDROID_LOG
-endif
-
-ifdef CONFIG_IEEE8021X_EAPOL
-L_CFLAGS += -DIEEE8021X_EAPOL
-endif
-
-ifdef CONFIG_WPS
-L_CFLAGS += -DCONFIG_WPS
-endif
-
-########################
- 
-include $(CLEAR_VARS)
-LOCAL_MODULE := libCustomWifi
-LOCAL_SHARED_LIBRARIES := libc libcutils
-LOCAL_CFLAGS := $(L_CFLAGS)
-LOCAL_SRC_FILES := $(OBJS)
-LOCAL_C_INCLUDES := $(INCLUDES)
-include $(BUILD_STATIC_LIBRARY)
-
-########################
diff --git a/wl1271/wpa_supplicant_lib/driver_ti.c b/wl1271/wpa_supplicant_lib/driver_ti.c
deleted file mode 100644
index 0f125e4..0000000
--- a/wl1271/wpa_supplicant_lib/driver_ti.c
+++ /dev/null
@@ -1,1447 +0,0 @@
-/* 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include "includes.h"
-#include <sys/ioctl.h>
-#include <net/if_arp.h>
-#ifdef ANDROID
-#include <cutils/properties.h>
-#endif
-#include "driver_ti.h"
-#include "scanmerge.h"
-#ifdef CONFIG_WPS
-#include "wps_defs.h"
-#endif
-
-/*-------------------------------------------------------------------*/
-#define TI2WPA_STATUS(s)	(((s) != 0) ? -1 : 0)
-#define TI_CHECK_DRIVER(f,r)	\
-	if( !(f) ) { \
-		wpa_printf(MSG_ERROR,"TI: Driver not initialized yet"); \
-		return( r ); \
-	}
-
-/*-----------------------------------------------------------------------------
-Routine Name: check_and_get_build_channels
-Routine Description: get number of allowed channels according to a build var.
-Arguments: None
-Return Value: Number of channels
------------------------------------------------------------------------------*/
-static int check_and_get_build_channels( void )
-{
-#ifdef ANDROID
-    char prop_status[PROPERTY_VALUE_MAX];
-    char *prop_name = "ro.wifi.channels";
-    int i, default_channels = NUMBER_SCAN_CHANNELS_FCC;
-
-    if( property_get(prop_name, prop_status, NULL) ) {
-        i = atoi(prop_status);
-        if( i != 0 )
-            default_channels = i;
-    }
-    return( default_channels );
-#else
-    return( NUMBER_SCAN_CHANNELS_FCC );
-#endif
-}
-
-static int wpa_driver_tista_cipher2wext(int cipher)
-{
-	switch (cipher) {
-	case CIPHER_NONE:
-		return IW_AUTH_CIPHER_NONE;
-	case CIPHER_WEP40:
-		return IW_AUTH_CIPHER_WEP40;
-	case CIPHER_TKIP:
-		return IW_AUTH_CIPHER_TKIP;
-	case CIPHER_CCMP:
-		return IW_AUTH_CIPHER_CCMP;
-	case CIPHER_WEP104:
-		return IW_AUTH_CIPHER_WEP104;
-	default:
-		return 0;
-	}
-}
-
-static int wpa_driver_tista_keymgmt2wext(int keymgmt)
-{
-	switch (keymgmt) {
-	case KEY_MGMT_802_1X:
-	case KEY_MGMT_802_1X_NO_WPA:
-#ifdef CONFIG_WPS
-	case KEY_MGMT_WPS:
-#endif
-		return IW_AUTH_KEY_MGMT_802_1X;
-	case KEY_MGMT_PSK:
-		return IW_AUTH_KEY_MGMT_PSK;
-	default:
-		return 0;
-	}
-}
-
-static int wpa_driver_tista_get_bssid(void *priv, u8 *bssid)
-{
-	struct wpa_driver_ti_data *drv = priv;
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	return wpa_driver_wext_get_bssid(drv->wext, bssid);
-}
-
-static int wpa_driver_tista_get_ssid(void *priv, u8 *ssid)
-{
-	struct wpa_driver_ti_data *drv = priv;
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	return wpa_driver_wext_get_ssid(drv->wext, ssid);
-}
-
-static int wpa_driver_tista_private_send( void *priv, u32 ioctl_cmd, void *bufIn, u32 sizeIn, void *bufOut, u32 sizeOut )
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	ti_private_cmd_t private_cmd;
-	struct iwreq iwr;
-	s32 res;
-
-	private_cmd.cmd = ioctl_cmd;
-	if(bufOut == NULL)
-	    private_cmd.flags = PRIVATE_CMD_SET_FLAG;
-	else
-	    private_cmd.flags = PRIVATE_CMD_GET_FLAG;
-
-	private_cmd.in_buffer = bufIn;
-	private_cmd.in_buffer_len = sizeIn;
-	private_cmd.out_buffer = bufOut;
-	private_cmd.out_buffer_len = sizeOut;
-
-	os_memset(&iwr, 0, sizeof(iwr));
-	os_strncpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
-
-	iwr.u.data.pointer = &private_cmd;
-	iwr.u.data.length = sizeof(ti_private_cmd_t);
-	iwr.u.data.flags = 0;
-
-	res = ioctl(drv->ioctl_sock, SIOCIWFIRSTPRIV, &iwr);
-	if (0 != res)
-	{
-		wpa_printf(MSG_ERROR, "ERROR - wpa_driver_tista_private_send - error sending Wext private IOCTL to STA driver (ioctl_cmd = %x,  res = %d, errno = %d)", ioctl_cmd, res, errno);
-		drv->errors++;
-		if (drv->errors > MAX_NUMBER_SEQUENTIAL_ERRORS) {
-			drv->errors = 0;
-			wpa_msg(drv->ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "HANGED");
-		}
-		return -1;
-	}
-	drv->errors = 0;
-	wpa_printf(MSG_DEBUG, "wpa_driver_tista_private_send ioctl_cmd = %x  res = %d", ioctl_cmd, res);
-
-	return 0;
-}
-
-static int wpa_driver_tista_driver_start( void *priv )
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	u32 uDummyBuf;
-	s32 res;
-
-	res = wpa_driver_tista_private_send(priv, DRIVER_START_PARAM, &uDummyBuf, sizeof(uDummyBuf), NULL, 0);
-
-	if (0 != res) {
-		wpa_printf(MSG_ERROR, "ERROR - Failed to start driver!");
-		wpa_msg(drv->ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "HANGED");
-	}
-	else {
-		os_sleep(0, WPA_DRIVER_WEXT_WAIT_US); /* delay 400 ms */
-		wpa_printf(MSG_DEBUG, "wpa_driver_tista_driver_start success");
-	}
-	return res;
-}
-
-static int wpa_driver_tista_driver_stop( void *priv )
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	u32 uDummyBuf;
-	s32 res;
-
-	res = wpa_driver_tista_private_send(priv, DRIVER_STOP_PARAM, &uDummyBuf, sizeof(uDummyBuf), NULL, 0);
-
-	if (0 != res) {
-		wpa_printf(MSG_ERROR, "ERROR - Failed to stop driver!");
-		wpa_msg(drv->ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "HANGED");
-	}
-	else
-		wpa_printf(MSG_DEBUG, "wpa_driver_tista_driver_stop success");
-
-	return res;
-}
-
-int wpa_driver_tista_parse_custom(void *ctx, const void *custom)
-{
-	IPC_EV_DATA * pData = NULL;
-
-	pData = (IPC_EV_DATA *)custom;
-	wpa_printf(MSG_DEBUG, "uEventType %d", pData->EvParams.uEventType);
-	switch (pData->EvParams.uEventType) {
-		case	IPC_EVENT_LINK_SPEED:
-			wpa_printf(MSG_DEBUG, "IPC_EVENT_LINK_SPEED");
-			if(pData->uBufferSize == sizeof(u32))
-			{
-				wpa_printf(MSG_DEBUG, "update link_speed");
-				/* Dm: pStaDrv->link_speed = *((u32 *)pData->uBuffer) / 2; */
-			}
-
-			/* Dm: wpa_printf(MSG_INFO,"wpa_supplicant - Link Speed = %u", pStaDrv->link_speed ); */
-			break;
-		default:
-			wpa_printf(MSG_DEBUG, "Unknown event");
-			break;
-	}
-
-	return 0;
-}
-
-static void ti_init_scan_params( scan_Params_t *pScanParams, int scanType,
-					int noOfChan, int scan_probe_flag )
-{
-	u8 i,j;
-	int maxDwellTime = 110000;
-
-	/* init application scan default params */
-	pScanParams->desiredSsid.len = 0;
-	/* all scan, we will use active scan */
-	pScanParams->scanType = scanType;
-	if ((scanType == SCAN_TYPE_NORMAL_ACTIVE) && scan_probe_flag)
-		maxDwellTime = 30000;
-
-	pScanParams->band = RADIO_BAND_2_4_GHZ;
-	pScanParams->probeReqNumber = 3;
-	pScanParams->probeRequestRate = RATE_MASK_UNSPECIFIED; /* Let the FW select */;
-	pScanParams->Tid = 0;
-	pScanParams->numOfChannels = noOfChan;
-	for ( i = 0; i < noOfChan; i++ )
-	{
-		for ( j = 0; j < 6; j++ )
-		{
-			pScanParams->channelEntry[ i ].normalChannelEntry.bssId[ j ] = 0xff;
-		}
-		pScanParams->channelEntry[ i ].normalChannelEntry.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
-		pScanParams->channelEntry[ i ].normalChannelEntry.ETMaxNumOfAPframes = 0;
-		pScanParams->channelEntry[ i ].normalChannelEntry.maxChannelDwellTime = maxDwellTime;
-		pScanParams->channelEntry[ i ].normalChannelEntry.minChannelDwellTime = maxDwellTime;
-		pScanParams->channelEntry[ i ].normalChannelEntry.txPowerDbm = DEF_TX_POWER;
-		pScanParams->channelEntry[ i ].normalChannelEntry.channel = i + 1;
-	}
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name: wpa_driver_tista_scan
-Routine Description: request scan from driver
-Arguments: 
-   priv - pointer to private data structure
-   ssid - ssid buffer
-   ssid_len - length of ssid
-Return Value: 0 on success, -1 on failure
------------------------------------------------------------------------------*/
-static int wpa_driver_tista_scan( void *priv, const u8 *ssid, size_t ssid_len )
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	struct wpa_supplicant *wpa_s = (struct wpa_supplicant *)(drv->ctx);
-	struct wpa_ssid *issid;
-	scan_Params_t scanParams;
-	int scan_type, res, timeout, scan_probe_flag = 0;
-
-	wpa_printf(MSG_DEBUG, "%s", __func__);
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-
-#if 1
-	os_memset(&scanParams, 0, sizeof(scan_Params_t));
-	/* Initialize scan parameters */
-	scan_type = drv->scan_type;
-	if (wpa_s->prev_scan_ssid != BROADCAST_SSID_SCAN) {
-		if (wpa_s->prev_scan_ssid->scan_ssid) {
-			scan_type = SCAN_TYPE_NORMAL_ACTIVE;
-			scan_probe_flag = 1;
-		}
-	}
-	ti_init_scan_params(&scanParams, scan_type, drv->scan_channels,
-				scan_probe_flag);
-
-	drv->force_merge_flag = 0; /* Set merge flag */
-
-	if ((scan_probe_flag && ssid) &&
-	    (ssid_len > 0 && ssid_len <= sizeof(scanParams.desiredSsid.str))) {
-		os_memcpy(scanParams.desiredSsid.str, ssid, ssid_len);
-		if (ssid_len < sizeof(scanParams.desiredSsid.str))
-			scanParams.desiredSsid.str[ssid_len] = '\0';
-		scanParams.desiredSsid.len = ssid_len;
-		drv->force_merge_flag = 1;
-	}
-
-	drv->last_scan = scan_type; /* Remember scan type for last scan */
-
-	res = wpa_driver_tista_private_send(priv, TIWLN_802_11_START_APP_SCAN_SET, &scanParams, sizeof(scanParams), NULL, 0);
-
-	if (0 != res) {
-		wpa_printf(MSG_ERROR, "ERROR - Failed to do tista scan!");
-		if (wpa_s->scanning) {
-			res = 0;
-			wpa_printf(MSG_ERROR, "Ongoing Scan action...");
-		}
-	} else {
-		wpa_printf(MSG_DEBUG, "wpa_driver_tista_scan success");
-	}
-	timeout = 30;
-	wpa_printf(MSG_DEBUG, "Scan requested (ret=%d) - scan timeout %d sec",
-			res, timeout);
-	eloop_cancel_timeout(wpa_driver_wext_scan_timeout, drv->wext, drv->ctx);
-	eloop_register_timeout(timeout, 0, wpa_driver_wext_scan_timeout,
-				drv->wext, drv->ctx);
-	return res;
-#else
-	return wpa_driver_wext_scan(drv->wext, ssid, ssid_len);
-#endif
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name: wpa_driver_tista_get_mac_addr
-Routine Description: return WLAN MAC address
-Arguments: 
-   priv - pointer to private data structure
-Return Value: pointer to BSSID
------------------------------------------------------------------------------*/
-const u8 *wpa_driver_tista_get_mac_addr( void *priv )
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	u8 mac[ETH_ALEN] = {0};
-
-	TI_CHECK_DRIVER( drv->driver_is_loaded, NULL );
-	if(0 != wpa_driver_tista_private_send(priv, CTRL_DATA_MAC_ADDRESS, NULL, 0,
-		mac, ETH_ALEN))
-	{
-		wpa_printf(MSG_ERROR, "ERROR - Failed to get mac address!");
-		os_memset(drv->own_addr, 0, ETH_ALEN);
-	}
-	else
-	{
-		os_memcpy(drv->own_addr, mac, ETH_ALEN);
-		wpa_printf(MSG_DEBUG, "Macaddr = " MACSTR, MAC2STR(drv->own_addr));
-	}
-	wpa_printf(MSG_DEBUG, "wpa_driver_tista_get_mac_addr success");
-
-	return (const u8 *)&drv->own_addr;
-}
-
-static int wpa_driver_tista_get_rssi(void *priv, int *rssi_data, int *rssi_beacon)
-{
-	u8 bssid[ETH_ALEN];
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	TCuCommon_RoamingStatisticsTable buffer;
-
-	os_memset(&buffer, 0, sizeof(TCuCommon_RoamingStatisticsTable));
-	*rssi_data = 0;
-	*rssi_beacon = 0;
-	if (wpa_driver_tista_get_bssid(priv, bssid) == 0 &&
-		os_memcmp(bssid, "\x00\x00\x00\x00\x00\x00", ETH_ALEN) != 0) {
-		if(0 != wpa_driver_tista_private_send(priv, TIWLN_802_11_RSSI, NULL, 0,
-				&buffer, sizeof(TCuCommon_RoamingStatisticsTable))) {
-			wpa_printf(MSG_ERROR, "ERROR - Failed to get rssi level");
-			return -1;
-		}
-		*rssi_data = (s8)buffer.rssi;
-		*rssi_beacon = (s8)buffer.rssiBeacon;
-		wpa_printf(MSG_DEBUG, "wpa_driver_tista_get_rssi data %d beacon %d success",
-						*rssi_data, *rssi_beacon);
-	}
-	else {
-		wpa_printf(MSG_DEBUG, "no WiFi link.");
-		return -1;
-	}
-	return 0;
-}
-
-static int wpa_driver_tista_config_power_management(void *priv, TPowerMgr_PowerMode *mode, u8 is_set)
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-
-	if(is_set) /* set power mode */
-	{
-		if((mode->PowerMode) < POWER_MODE_MAX)
-		{
-			if(0 != wpa_driver_tista_private_send(priv, TIWLN_802_11_POWER_MODE_SET, 
-				mode, sizeof(TPowerMgr_PowerMode), NULL, 0))
-			{
-				wpa_printf(MSG_ERROR, "ERROR - Failed to set power mode");
-				return -1;
-			}
-		}
-		else
-		{
-			wpa_printf(MSG_ERROR, "ERROR - Invalid Power Mode");
-			return -1;
-		}
-	}
-	else /* get power mode */
-	{
-		if(0 != wpa_driver_tista_private_send(priv, TIWLN_802_11_POWER_MODE_GET, NULL, 0,
-			mode, sizeof(TPowerMgr_PowerMode)))
-		{
-			wpa_printf(MSG_ERROR, "ERROR - Failed to get power mode");
-			return -1;
-		}
-	}
-	wpa_printf(MSG_DEBUG, "wpa_driver_tista_config_power_management success");
-
-	return 0;
-}
-
-static int wpa_driver_tista_enable_bt_coe(void *priv, u32 mode)
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	u32 mode_set = mode;
-
-	/* Mapping the mode between UI enum and driver enum */
-	switch(mode_set)
-	{
-		case BLUETOOTH_COEXISTENCE_MODE_ENABLED:
-			mode_set = SG_OPPORTUNISTIC;
-			break;
-		case BLUETOOTH_COEXISTENCE_MODE_SENSE:
-			mode_set = SG_PROTECTIVE;
-			break;
-		case BLUETOOTH_COEXISTENCE_MODE_DISABLED:
-			mode_set = SG_DISABLE;
-			break;
-		default:
-			wpa_printf(MSG_DEBUG, "wpa_driver_tista_enable_bt_coe - Unknown Mode");
-			return -1;
-			break;
-	}
-
-	if(0 != wpa_driver_tista_private_send(priv, SOFT_GEMINI_SET_ENABLE, 
-		&mode_set, sizeof(u32), NULL, 0))
-	{
-		wpa_printf(MSG_ERROR, "ERROR - Failed to enable BtCoe");
-		return -1;
-	}
-	wpa_printf(MSG_DEBUG, "wpa_driver_tista_enable_bt_coe success");
-
-	return 0;
-}
-
-static int wpa_driver_tista_get_bt_coe_status(void *priv, u32 *mode)
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	u32 mode_get = 0;
-
-	if(0 != wpa_driver_tista_private_send(priv, SOFT_GEMINI_GET_CONFIG, NULL, 0,
-		&mode_get, sizeof(u32)))
-	{
-		wpa_printf(MSG_ERROR, "ERROR - Failed to get bt coe status");
-		return -1;
-	}
-	*mode = mode_get;
-	wpa_printf(MSG_DEBUG, "wpa_driver_tista_get_bt_coe_status mode %d success", *mode);
-
-	return 0;
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name: prepare_filter_struct
-Routine Description: fills rx data filter structure according to parameter type
-Arguments:
-   priv - pointer to private data structure
-   type - type of mac address
-   dfreq_ptr - pointer to TRxDataFilterRequest structure
-Return Value: 0 - success, -1 - error
------------------------------------------------------------------------------*/
-static int prepare_filter_struct( void *priv, int type,
-					TRxDataFilterRequest *dfreq_ptr )
-{
-	const u8 *macaddr = NULL;
-	size_t len = 0;
-	u8 mask;
-	int ret = -1;
-
-	wpa_printf(MSG_DEBUG, "filter type=%d", type);
-	switch (type) {
-	case RX_SELF_FILTER:
-		macaddr = wpa_driver_tista_get_mac_addr(priv);
-		len = MAC_ADDR_LEN;
-		mask = 0x3F; /* 6 bytes */
-		break;
-	case RX_BROADCAST_FILTER:
-		macaddr = (const u8 *)"\xFF\xFF\xFF\xFF\xFF\xFF";
-		len = MAC_ADDR_LEN;
-		mask = 0x3F; /* 6 bytes */
-		break;
-	case RX_IPV4_MULTICAST_FILTER:
-		macaddr = (const u8 *)"\x01\x00\x5E";
-		len = 3;
-		mask = 0x7; /* 3 bytes */
-		break;
-	case RX_IPV6_MULTICAST_FILTER:
-		macaddr = (const u8 *)"\x33\x33";
-		len = 2;
-		mask = 0x3; /* 2 bytes */
-		break;
-	}
-
-	if (macaddr != NULL) {
-		dfreq_ptr->offset = 0;
-		dfreq_ptr->maskLength = 1;
-		dfreq_ptr->mask[0] = mask;
-		dfreq_ptr->patternLength = len;
-		os_memcpy( dfreq_ptr->pattern, macaddr, MAC_ADDR_LEN );
-		ret = 0;
-	}
-	return ret;
-}
-
-static int wpa_driver_tista_driver_rx_data_filter( void *priv, TRxDataFilterRequest *dfreq_ptr, u8 is_add )
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	int cmd, res;
-
-	if (is_add) { /* add rx data filter */
-		cmd = TIWLN_ADD_RX_DATA_FILTER;
-		wpa_printf(MSG_DEBUG, "Add RX data filter");
-	}
-	else { /* remove rx data filter */
-		cmd = TIWLN_REMOVE_RX_DATA_FILTER;
-		wpa_printf(MSG_DEBUG, "Remove RX data filter");
-	}
-
-	res = wpa_driver_tista_private_send(priv, cmd, dfreq_ptr, sizeof(TRxDataFilterRequest), NULL, 0);
-	if (0 != res)
-		wpa_printf(MSG_ERROR, "ERROR - Failed to handle rx data filter command!");
-	else
-		wpa_printf(MSG_DEBUG, "%s success", __func__);
-	return res;
-}
-
-static int wpa_driver_tista_driver_enable_rx_data_filter( void *priv )
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	u32 val = TRUE;
-	int res;
-
-	res = wpa_driver_tista_private_send(priv, TIWLN_ENABLE_DISABLE_RX_DATA_FILTERS,
-						&val, sizeof(u32), NULL, 0);
-	if (0 != res)
-		wpa_printf(MSG_ERROR, "ERROR - Failed to enable RX data filter!");
-	else
-		wpa_printf(MSG_DEBUG, "%s success", __func__);
-	return res;
-}
-
-static int wpa_driver_tista_driver_disable_rx_data_filter( void *priv )
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	u32 val = FALSE;
-	int res;
-
-	res = wpa_driver_tista_private_send(priv, TIWLN_ENABLE_DISABLE_RX_DATA_FILTERS,
-						&val, sizeof(u32), NULL, 0);
-	if (0 != res)
-		wpa_printf(MSG_ERROR, "ERROR - Failed to disable RX data filter!");
-	else
-		wpa_printf(MSG_DEBUG, "%s success", __func__);
-	return res;
-}
-
-static int wpa_driver_tista_driver_rx_data_filter_statistics( void *priv,
-				TCuCommon_RxDataFilteringStatistics *stats )
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	int res;
-
-	res = wpa_driver_tista_private_send(priv, TIWLN_GET_RX_DATA_FILTERS_STATISTICS,
-		NULL, 0, stats, sizeof(TCuCommon_RxDataFilteringStatistics));
-	if (0 != res)
-		wpa_printf(MSG_ERROR, "ERROR - Failed to get RX data filter statistics!");
-	else
-		wpa_printf(MSG_DEBUG, "%s success", __func__);
-	return res;
-}
-
-static int get_num_of_channels(char *country)
-{
-	int channels = NUMBER_SCAN_CHANNELS_FCC;
-
-	if (os_strcasecmp(country, "EU"))
-		channels = NUMBER_SCAN_CHANNELS_ETSI;
-	else if (os_strcasecmp(country, "JP"))
-		channels = NUMBER_SCAN_CHANNELS_MKK1;
-	return channels;
-}
-
-/*-----------------------------------------------------------------------------
-Routine Name: wpa_driver_tista_driver_cmd
-Routine Description: executes driver-specific commands
-Arguments: 
-   priv - pointer to private data structure
-   cmd - command
-   buf - return buffer
-   buf_len - buffer length
-Return Value: actual buffer length - success, -1 - failure
------------------------------------------------------------------------------*/
-static int wpa_driver_tista_driver_cmd( void *priv, char *cmd, char *buf, size_t buf_len )
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-	int ret = -1, prev_events, flags;
-
-	wpa_printf(MSG_DEBUG, "%s %s", __func__, cmd);
-
-	if( os_strcasecmp(cmd, "start") == 0 ) {
-		wpa_printf(MSG_DEBUG,"Start command");
-		ret = wpa_driver_tista_driver_start(priv);
-		if( ret == 0 ) {
-			drv->driver_is_loaded = TRUE;
-			wpa_msg(drv->ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "STARTED");
-		}
-		return( TI2WPA_STATUS(ret) );
-	}
-
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-
-	if( os_strcasecmp(cmd, "stop") == 0 ) {
-		wpa_printf(MSG_DEBUG,"Stop command");
-		if ((wpa_driver_wext_get_ifflags(drv->wext, &flags) == 0) &&
-		    (flags & IFF_UP)) {
-			wpa_printf(MSG_ERROR, "TI: %s when iface is UP", cmd);
-			wpa_driver_wext_set_ifflags(drv->wext, flags & ~IFF_UP);
-		}
-		ret = wpa_driver_tista_driver_stop(priv);
-		if( ret == 0 ) {
-			scan_exit(drv); /* Clear scan cache */
-			drv->driver_is_loaded = FALSE;
-			wpa_msg(drv->ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "STOPPED");
-		}
-	}
-	if( os_strcasecmp(cmd, "reload") == 0 ) {
-		wpa_printf(MSG_DEBUG,"Reload command");
-		ret = 0;
-		wpa_msg(drv->ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "HANGED");
-	}
-	else if( os_strcasecmp(cmd, "macaddr") == 0 ) {
-		wpa_driver_tista_get_mac_addr(priv);
-		wpa_printf(MSG_DEBUG, "Macaddr command");
-		ret = sprintf(buf, "Macaddr = " MACSTR "\n", MAC2STR(drv->own_addr));
-		wpa_printf(MSG_DEBUG, "buf %s", buf);
-	}
-	else if( os_strcasecmp(cmd, "scan-passive") == 0 ) {
-		wpa_printf(MSG_DEBUG,"Scan Passive command");
-		drv->scan_type =  SCAN_TYPE_NORMAL_PASSIVE;
-		ret = 0;
-	}
-	else if( os_strcasecmp(cmd, "scan-active") == 0 ) {
-		wpa_printf(MSG_DEBUG,"Scan Active command");
-		drv->scan_type =  SCAN_TYPE_NORMAL_ACTIVE;
-		ret = 0;
-	}
-	else if( os_strcasecmp(cmd, "scan-mode") == 0 ) {
-		wpa_printf(MSG_DEBUG,"Scan Mode command");
-		ret = snprintf(buf, buf_len, "ScanMode = %u\n", drv->scan_type);
-		if (ret < (int)buf_len) {
-			return( ret );
-		}
-	}
-	else if( os_strcasecmp(cmd, "linkspeed") == 0 ) {
-		struct wpa_supplicant *wpa_s = (struct wpa_supplicant *)(drv->ctx);
-
- 		wpa_printf(MSG_DEBUG,"Link Speed command");
-		drv->link_speed = wpa_s->link_speed / 1000000;
-		ret = sprintf(buf,"LinkSpeed %u\n", drv->link_speed);
-		wpa_printf(MSG_DEBUG, "buf %s", buf);
-	}
-	else if( os_strncasecmp(cmd, "country", 7) == 0 ) {
-		drv->scan_channels = get_num_of_channels(cmd + 8);
-		ret = sprintf(buf,"Scan-Channels = %d\n", drv->scan_channels);
-		wpa_printf(MSG_DEBUG, "buf %s", buf);
-	}
-	else if( os_strncasecmp(cmd, "scan-channels", 13) == 0 ) {
-		int noOfChan;
-
-		noOfChan = atoi(cmd + 13);
-		wpa_printf(MSG_DEBUG,"Scan Channels command = %d", noOfChan);
-		if( (noOfChan > 0) && (noOfChan <= MAX_NUMBER_OF_CHANNELS_PER_SCAN) )
-			drv->scan_channels = noOfChan;
-		ret = sprintf(buf,"Scan-Channels = %d\n", drv->scan_channels);
-		wpa_printf(MSG_DEBUG, "buf %s", buf);
-	}
-	else if( os_strcasecmp(cmd, "rssi-approx") == 0 ) {
-		scan_result_t *cur_res;
-		struct wpa_supplicant *wpa_s = (struct wpa_supplicant *)(drv->ctx);
-		scan_ssid_t *p_ssid;
-		int rssi, len;
-
-		wpa_printf(MSG_DEBUG,"rssi-approx command");
-
-		if( !wpa_s )
-			return( ret );
-		cur_res = scan_get_by_bssid(drv, wpa_s->bssid);
-		if( cur_res ) {
-			p_ssid = scan_get_ssid(cur_res);
-			len = (int)(p_ssid->ssid_len);
-			rssi = cur_res->level;
-			if( (len > 0) && (len <= MAX_SSID_LEN) && (len < (int)buf_len)) {
-				os_memcpy((void *)buf, (void *)(p_ssid->ssid), len);
-				ret = len;
-				ret += snprintf(&buf[ret], buf_len-len, " rssi %d\n", rssi);
-			}
-		}
-	}
-	else if( os_strcasecmp(cmd, "rssi") == 0 ) {
-		u8 ssid[MAX_SSID_LEN];
-		scan_result_t *cur_res;
-		struct wpa_supplicant *wpa_s = (struct wpa_supplicant *)(drv->ctx);
-		int rssi_data, rssi_beacon, len;
-
-		wpa_printf(MSG_DEBUG,"rssi command");
-
-		ret = wpa_driver_tista_get_rssi(priv, &rssi_data, &rssi_beacon);
-		if( ret == 0 ) {
-			len = wpa_driver_tista_get_ssid(priv, (u8 *)ssid);
-			wpa_printf(MSG_DEBUG,"rssi_data %d rssi_beacon %d", rssi_data, rssi_beacon);
-			if( (len > 0) && (len <= MAX_SSID_LEN) ) {
-				os_memcpy((void *)buf, (void *)ssid, len);
-				ret = len;
-				ret += sprintf(&buf[ret], " rssi %d\n", rssi_beacon);
-				wpa_printf(MSG_DEBUG, "buf %s", buf);
-				/* Update cached value */
-				if( !wpa_s )
-					return( ret );
-				cur_res = scan_get_by_bssid(drv, wpa_s->bssid);
-				if( cur_res )
-					cur_res->level = rssi_beacon;
-			}
-			else
-			{
-				wpa_printf(MSG_DEBUG, "Fail to get ssid when reporting rssi");
-				ret = -1;
-			}
-		}
-	}
-	else if( os_strncasecmp(cmd, "powermode", 9) == 0 ) {
-		u32 mode;
-		TPowerMgr_PowerMode tMode;
-
-		mode = (u32)atoi(cmd + 9);
-		wpa_printf(MSG_DEBUG,"Power Mode command = %u", mode);
-		if( mode < POWER_MODE_MAX )
-		{
-			tMode.PowerMode = (PowerMgr_PowerMode_e)mode;
-			tMode.PowerMngPriority = POWER_MANAGER_USER_PRIORITY;
-			ret = wpa_driver_tista_config_power_management( priv, &tMode, 1 );
-		}
-	}
-	else if (os_strncasecmp(cmd, "getpower", 8) == 0 ) {
-		u32 mode;
-		TPowerMgr_PowerMode tMode;
-
-		os_memset(&tMode, 0, sizeof(TPowerMgr_PowerMode));
-		ret = wpa_driver_tista_config_power_management( priv, &tMode, 0 );
-		if( ret == 0 ) {
-			ret = sprintf(buf, "powermode = %u\n", tMode.PowerMode);
-			wpa_printf(MSG_DEBUG, "buf %s", buf);
-		}
-	}
-	else if( os_strncasecmp(cmd, "btcoexmode", 10) == 0 ) {
-		u32 mode;
-
-		mode = (u32)atoi(cmd + 10);
-		wpa_printf(MSG_DEBUG,"BtCoex Mode command = %u", mode);
-		ret = wpa_driver_tista_enable_bt_coe( priv, mode );
-		if( ret == 0 ) {
-			drv->btcoex_mode = mode;
-		}
-	}
-	else if( os_strcasecmp(cmd, "btcoexstat") == 0 ) {
-		u32 status = drv->btcoex_mode;
-
-		wpa_printf(MSG_DEBUG,"BtCoex Status");
-		ret = wpa_driver_tista_get_bt_coe_status( priv, &status );
-		if( ret == 0 ) {
-			ret = sprintf(buf, "btcoexstatus = 0x%x\n", status);
-			wpa_printf(MSG_DEBUG, "buf %s", buf);
-		}
-	}
-	else if( os_strcasecmp(cmd, "rxfilter-start") == 0 ) {
-		wpa_printf(MSG_DEBUG,"Rx Data Filter Start command");
-		ret = wpa_driver_tista_driver_enable_rx_data_filter( priv );
-	}
-	else if( os_strcasecmp(cmd, "rxfilter-stop") == 0 ) {
-		wpa_printf(MSG_DEBUG,"Rx Data Filter Stop command");
-		ret = wpa_driver_tista_driver_disable_rx_data_filter( priv );
-	}
-	else if( os_strcasecmp(cmd, "rxfilter-statistics") == 0 ) {
-		TCuCommon_RxDataFilteringStatistics stats;
-		int len, i;
-
-		os_memset(&stats, 0, sizeof(TCuCommon_RxDataFilteringStatistics));
-		wpa_printf(MSG_DEBUG,"Rx Data Filter Statistics command");
-		ret = wpa_driver_tista_driver_rx_data_filter_statistics( priv, &stats );
-		if( ret == 0 ) {
-			ret = snprintf(buf, buf_len, "RxFilterStat: %u", (u32)stats.unmatchedPacketsCount);
-			for(i=0;( i < MAX_DATA_FILTERS );i++) {
-				ret += snprintf(&buf[ret], buf_len-ret, " %u", (u32)stats.matchedPacketsCount[i]);
-			}
-			ret += snprintf(&buf[ret], buf_len-ret, "\n");
-			if (ret >= (int)buf_len) {
-				ret = -1;
-			}
-		}
-	}
-	else if( os_strncasecmp(cmd, "rxfilter-add", 12) == 0 ) {
-		TRxDataFilterRequest dfreq;
-		char *cp = cmd + 12;
-		char *endp;
-		int type;
-
-		if (*cp != '\0') {
-			type = (int)strtol(cp, &endp, 0);
-			if (endp != cp) {
-				wpa_printf(MSG_DEBUG,"Rx Data Filter Add [%d] command", type);
-				ret = prepare_filter_struct( priv, type, &dfreq );
-				if( ret == 0 ) {
-					ret = wpa_driver_tista_driver_rx_data_filter( priv, &dfreq, 1 );
-				}
-			}
-		}
-	}
-	else if( os_strncasecmp(cmd, "rxfilter-remove",15) == 0 ) {
-		TRxDataFilterRequest dfreq;
-		char *cp = cmd + 15;
-		char *endp;
-		int type;
-
-		if (*cp != '\0') {
-			type = (int)strtol(cp, &endp, 0);
-			if (endp != cp) {
-				wpa_printf(MSG_DEBUG,"Rx Data Filter remove [%d] command", type);
-				ret = prepare_filter_struct( priv, type, &dfreq );
-				if( ret == 0 ) {
-					ret = wpa_driver_tista_driver_rx_data_filter( priv, &dfreq, 0 );
-				}
-			}
-		}
-	}
-	else {
-		wpa_printf(MSG_DEBUG,"Unsupported command");
-	}
-	return ret;
-}
-
-#ifdef WPA_SUPPLICANT_VER_0_6_X
-/*-----------------------------------------------------------------------------
-Routine Name: wpa_driver_tista_set_probe_req_ie
-Routine Description: set probe request ie for WSC mode change
-Arguments:
-   priv - pointer to private data structure
-   ies - probe_req_ie data
-   ies_len - ie data length
-Return Value: actual buffer length - success, -1 - failure
------------------------------------------------------------------------------*/
-static int wpa_driver_tista_set_probe_req_ie(void *priv, const u8* ies, size_t ies_len)
-{
-	struct wpa_driver_ti_data *drv = (struct wpa_driver_ti_data *)priv;
-#ifdef CONFIG_WPS
-	TWscMode WscModeStruct;
-
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-
-	if ((!ies || (0 == ies_len)) && (NULL == drv->probe_req_ie)) {
-		return 0;
-	}
-
-	if (ies && drv->probe_req_ie) {
-		size_t len = wpabuf_len(drv->probe_req_ie);
-		u8* data = (u8*)wpabuf_head(drv->probe_req_ie);
-		if ((ies_len == len) && (0 == os_memcmp(ies, data, ies_len))) {
-			return 0;
-		}
-	}
-
-	os_memset(&WscModeStruct, 0, sizeof(TWscMode));
-
-	if (!ies || (0 == ies_len)) {
-		WscModeStruct.WSCMode = TIWLN_SIMPLE_CONFIG_OFF;
-	} else {
-		const size_t head_len = 6; /* probeReqIe head: dd xx 00 50 f2 04 */
-		u8 *pos, *end;
-		u16 password_id = 0;
-		size_t min_len = 0;
-
-		pos = (u8*)ies + head_len; /* Find the WSC mode in probe_req_ie by password_id */
-		end = (u8*)ies + ies_len;
-		while (pos < end) {
-			if (ATTR_DEV_PASSWORD_ID == WPA_GET_BE16(pos)) {
-				password_id = WPA_GET_BE16(pos+4);
-				break;
-			}
-			pos += (4 + WPA_GET_BE16(pos+2));
-		}
-		WscModeStruct.WSCMode = (DEV_PW_PUSHBUTTON == password_id)?TIWLN_SIMPLE_CONFIG_PBC_METHOD:TIWLN_SIMPLE_CONFIG_PIN_METHOD;
-
-		pos = (u8*)ies + head_len;
-		min_len = ies_len - head_len;
-		if (min_len > sizeof(WscModeStruct.probeReqWSCIE)) {
-			min_len = sizeof(WscModeStruct.probeReqWSCIE);
-		}
-		os_memcpy(WscModeStruct.probeReqWSCIE, pos, min_len);
-	}
-
-	wpa_hexdump(MSG_DEBUG, "SetProbeReqIe:WscModeStruct", (u8*)&WscModeStruct, sizeof(TWscMode));
-	if(0 == wpa_driver_tista_private_send(priv, SITE_MGR_SIMPLE_CONFIG_MODE, (void*)&WscModeStruct, sizeof(TWscMode), NULL, 0)) {
-		/* Update the cached probe req ie */
-		wpabuf_free(drv->probe_req_ie);
-		drv->probe_req_ie = NULL;
-
-		if (ies && ies_len) {
-			drv->probe_req_ie = wpabuf_alloc(sizeof(WscModeStruct.probeReqWSCIE));
-			if (drv->probe_req_ie) {
-				wpabuf_put_data(drv->probe_req_ie, ies, ies_len);
-			}
-		}
-	} else {
-		wpa_printf(MSG_ERROR, "ERROR - Failed to set wsc mode!");
-		return -1;
-	}
-#endif
-	return 0;
-}
-#endif
-
-/**
- * wpa_driver_tista_init - Initialize WE driver interface
- * @ctx: context to be used when calling wpa_supplicant functions,
- * e.g., wpa_supplicant_event()
- * @ifname: interface name, e.g., wlan0
- * Returns: Pointer to private data, %NULL on failure
- */
-void * wpa_driver_tista_init(void *ctx, const char *ifname)
-{
-	struct wpa_driver_ti_data *drv;
-
-	drv = os_zalloc(sizeof(*drv));
-	if (drv == NULL)
-		return NULL;
-	drv->wext = wpa_driver_wext_init(ctx, ifname);
-	if (drv->wext == NULL) {
-		os_free(drv);
-		return NULL;
-	}
-
-	drv->ctx = ctx;
-	os_strncpy(drv->ifname, ifname, sizeof(drv->ifname));
-	drv->ioctl_sock = socket(PF_INET, SOCK_DGRAM, 0);
-	if (drv->ioctl_sock < 0) {
-		perror("socket");
-		wpa_driver_wext_deinit(drv->wext);
-		os_free(drv);
-		return NULL;
-	}
-
-	/* Signal that driver is not stopped */
-	drv->driver_is_loaded = TRUE;
-
-	/* Set default scan type */
-	drv->scan_type = SCAN_TYPE_NORMAL_ACTIVE;
-	drv->force_merge_flag = 0;
-	scan_init(drv);
-
-	/* Set default amount of channels */
-	drv->scan_channels = check_and_get_build_channels();
-
-	/* Link Speed will be set by the message from the driver */
-	drv->link_speed = 0;
-
-	/* BtCoex mode is read from tiwlan.ini file */
-	drv->btcoex_mode = 0; /* SG_DISABLE */
-
-#ifdef CONFIG_WPS
-	/* The latest probe_req_ie for WSC */
-	drv->probe_req_ie = NULL;
-#endif
-
-	/* Number of sequential errors */
-	drv->errors = 0;
-	return drv;
-}
-
-/**
- * wpa_driver_tista_deinit - Deinitialize WE driver interface
- * @priv: Pointer to private wext data from wpa_driver_tista_init()
- *
- * Shut down driver interface and processing of driver events. Free
- * private data buffer if one was allocated in wpa_driver_tista_init().
- */
-void wpa_driver_tista_deinit(void *priv)
-{
-	struct wpa_driver_ti_data *drv = priv;
-
-	wpa_driver_wext_deinit(drv->wext);
-	close(drv->ioctl_sock);
-	scan_exit(drv);
-#ifdef CONFIG_WPS
-	wpabuf_free(drv->probe_req_ie);
-	drv->probe_req_ie = NULL;
-#endif
-	os_free(drv);
-}
-
-static int wpa_driver_tista_set_auth_param(struct wpa_driver_ti_data *drv,
-					  int idx, u32 value)
-{
-	struct iwreq iwr;
-	int ret = 0;
-
-	os_memset(&iwr, 0, sizeof(iwr));
-	os_strncpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
-	iwr.u.param.flags = idx & IW_AUTH_INDEX;
-	iwr.u.param.value = value;
-
-	if (ioctl(drv->ioctl_sock, SIOCSIWAUTH, &iwr) < 0) {
-		perror("ioctl[SIOCSIWAUTH]");
-		wpa_printf(MSG_ERROR, "WEXT auth param %d value 0x%x - ",
-			idx, value);
-		ret = errno == EOPNOTSUPP ? -2 : -1;
-	}
-
-	return ret;
-}
-
-static int wpa_driver_tista_set_wpa(void *priv, int enabled)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int ret;
-
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	ret = wpa_driver_tista_set_auth_param(drv, IW_AUTH_WPA_ENABLED,
-					      enabled);
-	return ret;
-}
-
-static int wpa_driver_tista_set_auth_alg(void *priv, int auth_alg)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int algs = 0, res;
-
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	if (auth_alg & AUTH_ALG_OPEN_SYSTEM)
-		algs |= IW_AUTH_ALG_OPEN_SYSTEM;
-	if (auth_alg & AUTH_ALG_SHARED_KEY)
-		algs |= IW_AUTH_ALG_SHARED_KEY;
-	if (auth_alg & AUTH_ALG_LEAP)
-		algs |= IW_AUTH_ALG_LEAP;
-	if (algs == 0) {
-		/* at least one algorithm should be set */
-		algs = IW_AUTH_ALG_OPEN_SYSTEM;
-	}
-
-	res = wpa_driver_tista_set_auth_param(drv, IW_AUTH_80211_AUTH_ALG,
-					     algs);
-
-	return res;
-}
-
-static int wpa_driver_tista_set_countermeasures(void *priv, int enabled)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int ret;
-
-	wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	ret = wpa_driver_tista_set_auth_param(drv,
-					      IW_AUTH_TKIP_COUNTERMEASURES,
-					      enabled);
-	return ret;
-}
-
-static int wpa_driver_tista_set_drop_unencrypted(void *priv,
-						int enabled)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int ret;
-
-	wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	/* Dm: drv->use_crypt = enabled; */
-	ret = wpa_driver_tista_set_auth_param(drv, IW_AUTH_DROP_UNENCRYPTED,
-					      enabled);
-	return ret;
-}
-
-static int wpa_driver_tista_pmksa(struct wpa_driver_ti_data *drv,
-				 u32 cmd, const u8 *bssid, const u8 *pmkid)
-{
-	struct iwreq iwr;
-	struct iw_pmksa pmksa;
-	int ret = 0;
-
-	os_memset(&iwr, 0, sizeof(iwr));
-	os_strncpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
-	os_memset(&pmksa, 0, sizeof(pmksa));
-	pmksa.cmd = cmd;
-	pmksa.bssid.sa_family = ARPHRD_ETHER;
-	if (bssid)
-		os_memcpy(pmksa.bssid.sa_data, bssid, ETH_ALEN);
-	if (pmkid) {
-		os_memcpy(pmksa.pmkid, pmkid, IW_PMKID_LEN);
-		wpa_printf(MSG_DEBUG, "pmkid %s", pmkid);
-	}
-	iwr.u.data.pointer = (caddr_t)&pmksa;
-	iwr.u.data.length = sizeof(pmksa);
-
-	if (ioctl(drv->ioctl_sock, SIOCSIWPMKSA, &iwr) < 0) {
-		if (errno != EOPNOTSUPP)
-			perror("ioctl[SIOCSIWPMKSA]");
-		ret = -1;
-	}
-	return ret;
-}
-
-static int wpa_driver_tista_add_pmkid(void *priv, const u8 *bssid,
-				     const u8 *pmkid)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int ret;
-
-	wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-	TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	ret = wpa_driver_tista_pmksa(drv, IW_PMKSA_ADD, bssid, pmkid);
-	return ret;
-}
-
-static int wpa_driver_tista_remove_pmkid(void *priv, const u8 *bssid,
-		 			const u8 *pmkid)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int ret;
-
-	wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-	TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	ret = wpa_driver_tista_pmksa(drv, IW_PMKSA_REMOVE, bssid, pmkid);
-	return ret;
-}
-
-static int wpa_driver_tista_flush_pmkid(void *priv)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int ret;
-
-	wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-	TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	ret = wpa_driver_tista_pmksa(drv, IW_PMKSA_FLUSH, NULL, NULL);
-	return ret;
-}
-
-static int wpa_driver_tista_mlme(struct wpa_driver_ti_data *drv,
-				const u8 *addr, int cmd, int reason_code)
-{
-	struct iwreq iwr;
-	struct iw_mlme mlme;
-	int ret = 0;
-
-	os_memset(&iwr, 0, sizeof(iwr));
-	os_strncpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
-	os_memset(&mlme, 0, sizeof(mlme));
-	mlme.cmd = cmd;
-	mlme.reason_code = reason_code;
-	mlme.addr.sa_family = ARPHRD_ETHER;
-	os_memcpy(mlme.addr.sa_data, addr, ETH_ALEN);
-	iwr.u.data.pointer = (caddr_t) &mlme;
-	iwr.u.data.length = sizeof(mlme);
-
-	if (ioctl(drv->ioctl_sock, SIOCSIWMLME, &iwr) < 0) {
-		perror("ioctl[SIOCSIWMLME]");
-		ret = -1;
-	}
-
-	return ret;
-}
-
-static int wpa_driver_tista_deauthenticate(void *priv, const u8 *addr,
-					  int reason_code)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int ret;
-
-	wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	ret = wpa_driver_tista_mlme(drv, addr, IW_MLME_DEAUTH, reason_code);
-	return ret;
-}
-
-
-static int wpa_driver_tista_disassociate(void *priv, const u8 *addr,
-					int reason_code)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int ret;
-
-	wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	ret = wpa_driver_tista_mlme(drv, addr, IW_MLME_DISASSOC, reason_code);
-	return ret;
-}
-
-static int wpa_driver_tista_set_key(void *priv, wpa_alg alg,
-			    const u8 *addr, int key_idx,
-			    int set_tx, const u8 *seq, size_t seq_len,
-			    const u8 *key, size_t key_len)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int ret;
-
-	wpa_printf(MSG_DEBUG, "%s", __func__);
-	TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	ret = wpa_driver_wext_set_key(drv->wext, alg, addr, key_idx, set_tx,
-					seq, seq_len, key, key_len);
-	return ret;
-}
-
-static int wpa_driver_tista_set_gen_ie(void *priv, const u8 *ie, size_t ie_len)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	struct iwreq iwr;
-	int ret = 0;
-
-	os_memset(&iwr, 0, sizeof(iwr));
-	os_strncpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
-	iwr.u.data.pointer = (caddr_t)ie;
-	iwr.u.data.length = ie_len;
-
-	if (ioctl(drv->ioctl_sock, SIOCSIWGENIE, &iwr) < 0) {
-		perror("ioctl[SIOCSIWGENIE]");
-		ret = -1;
-	}
-
-	return ret;
-}
-
-#ifdef WPA_SUPPLICANT_VER_0_6_X
-static struct wpa_scan_results *wpa_driver_tista_get_scan_results(void *priv)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	struct wpa_scan_results *res;
-	struct wpa_scan_res **tmp;
-	unsigned ap_num;
-
-	TI_CHECK_DRIVER( drv->driver_is_loaded, NULL );
-	res = wpa_driver_wext_get_scan_results(drv->wext);
-	if (res == NULL) {
-		return NULL;
-	}
-
-	wpa_printf(MSG_DEBUG, "Actual APs number %d", res->num);
-	ap_num = (unsigned)scan_count(drv) + res->num;
-	tmp = os_realloc(res->res, ap_num * sizeof(struct wpa_scan_res *));
-	if (tmp == NULL)
-		return res;
-	res->num = scan_merge(drv, tmp, drv->force_merge_flag, res->num, ap_num);
-	wpa_printf(MSG_DEBUG, "After merge, APs number %d", res->num);
-	tmp = os_realloc(tmp, res->num * sizeof(struct wpa_scan_res *));
-	res->res = tmp;
-	return res;
-}
-
-int wpa_driver_tista_set_mode(void *priv, int mode)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int ret;
-
-	wpa_printf(MSG_DEBUG, "%s", __func__);
-	TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	ret = wpa_driver_wext_set_mode(drv->wext, mode);
-	return ret;
-}
-#else
-/*-----------------------------------------------------------------------------
-Compare function for sorting scan results. Return >0 if @b is considered better.
------------------------------------------------------------------------------*/
-static int wpa_driver_tista_scan_result_compare(const void *a, const void *b)
-{
-	const struct wpa_scan_result *wa = a;
-	const struct wpa_scan_result *wb = b;
-
-	return( wb->level - wa->level );
-}
-
-static int wpa_driver_tista_get_scan_results(void *priv,
-					      struct wpa_scan_result *results,
-					      size_t max_size)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int ap_num = 0;
-
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-	ap_num = wpa_driver_wext_get_scan_results(drv->wext, results, max_size);
-	wpa_printf(MSG_DEBUG, "Actual APs number %d", ap_num);
-
-	if (ap_num < 0)
-		return -1;
-
-	/* Merge new results with previous */
-        ap_num = scan_merge(drv, results, drv->force_merge_flag, ap_num, max_size);
-	wpa_printf(MSG_DEBUG, "After merge, APs number %d", ap_num);
-	qsort(results, ap_num, sizeof(struct wpa_scan_result),
-		wpa_driver_tista_scan_result_compare);
-	return ap_num;
-}
-#endif
-
-static int wpa_driver_tista_associate(void *priv,
-			  struct wpa_driver_associate_params *params)
-{
-	struct wpa_driver_ti_data *drv = priv;
-	int allow_unencrypted_eapol;
-	int value, flags, ret = 0;
-
-	wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-	TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );
-
-#ifdef WPA_SUPPLICANT_VER_0_6_X
-#ifdef ANDROID
-	((struct wpa_driver_wext_data *)(drv->wext))->skip_disconnect = 0;
-#endif
-#endif
-
-	if (wpa_driver_wext_get_ifflags(drv->wext, &flags) == 0) {
-		if (!(flags & IFF_UP)) {
-			wpa_driver_wext_set_ifflags(drv->wext, flags | IFF_UP);
-		}
-	}
-
-#if 0
-	if (!params->bssid)
-		wpa_driver_wext_set_bssid(drv->wext, NULL);
-#endif
-
-#ifdef WPA_SUPPLICANT_VER_0_5_X
-	/* Set driver network mode (Adhoc/Infrastructure) according to supplied parameters */
-	wpa_driver_wext_set_mode(drv->wext, params->mode);
-#endif
-	wpa_driver_tista_set_gen_ie(drv, params->wpa_ie, params->wpa_ie_len);
-
-	if (params->wpa_ie == NULL || params->wpa_ie_len == 0)
-		value = IW_AUTH_WPA_VERSION_DISABLED;
-#ifdef WPA_SUPPLICANT_VER_0_6_X
-	else if (params->wpa_ie[0] == WLAN_EID_RSN)
-#else
-	else if (params->wpa_ie[0] == RSN_INFO_ELEM)
-#endif
-		value = IW_AUTH_WPA_VERSION_WPA2;
-#ifdef CONFIG_WPS
-	else if (params->key_mgmt_suite == KEY_MGMT_WPS)
-		value = IW_AUTH_WPA_VERSION_DISABLED;
-#endif
-	else
-		value = IW_AUTH_WPA_VERSION_WPA;
-	wpa_driver_tista_set_auth_param(drv, IW_AUTH_WPA_VERSION, value);
-	value = wpa_driver_tista_cipher2wext(params->pairwise_suite);
-	wpa_driver_tista_set_auth_param(drv, IW_AUTH_CIPHER_PAIRWISE, value);
-	value = wpa_driver_tista_cipher2wext(params->group_suite);
-	wpa_driver_tista_set_auth_param(drv, IW_AUTH_CIPHER_GROUP, value);
-	value = wpa_driver_tista_keymgmt2wext(params->key_mgmt_suite);
-	wpa_driver_tista_set_auth_param(drv, IW_AUTH_KEY_MGMT, value);
-	value = params->key_mgmt_suite != KEY_MGMT_NONE ||
-		params->pairwise_suite != CIPHER_NONE ||
-		params->group_suite != CIPHER_NONE ||
-#ifdef WPA_SUPPLICANT_VER_0_6_X
-		(params->wpa_ie_len && (params->key_mgmt_suite != KEY_MGMT_WPS));
-#else
-		params->wpa_ie_len;
-#endif
-	wpa_driver_tista_set_auth_param(drv, IW_AUTH_PRIVACY_INVOKED, value);
-
-	/* Allow unencrypted EAPOL messages even if pairwise keys are set when
-	 * not using WPA. IEEE 802.1X specifies that these frames are not
-	 * encrypted, but WPA encrypts them when pairwise keys are in use. */
-	if (params->key_mgmt_suite == KEY_MGMT_802_1X ||
-	    params->key_mgmt_suite == KEY_MGMT_PSK)
-		allow_unencrypted_eapol = 0;
-	else
-		allow_unencrypted_eapol = 1;
-	
-	wpa_driver_tista_set_auth_param(drv,
-					   IW_AUTH_RX_UNENCRYPTED_EAPOL,
-					   allow_unencrypted_eapol);
-
-	if (params->freq)
-		wpa_driver_wext_set_freq(drv->wext, params->freq);
-
-	if (params->bssid) {
-		wpa_printf(MSG_DEBUG, "wpa_driver_tista_associate: BSSID=" MACSTR,
-			            MAC2STR(params->bssid));
-		/* if there is bssid -> set it */
-		if (os_memcmp(params->bssid, "\x00\x00\x00\x00\x00\x00", ETH_ALEN) != 0) {
-			wpa_driver_wext_set_bssid(drv->wext, params->bssid);
-		}
-	}
-	ret = wpa_driver_wext_set_ssid(drv->wext, params->ssid, params->ssid_len);
-	return ret;
-}
-
-static int wpa_driver_tista_set_operstate(void *priv, int state)
-{
-	struct wpa_driver_ti_data *drv = priv;
-
-	wpa_printf(MSG_DEBUG, "%s: operstate %d (%s)",
-		   __func__, /*drv->operstate,*/ state, state ? "UP" : "DORMANT");
-        TI_CHECK_DRIVER( drv->driver_is_loaded, -1 );		   
-	/* Dm: drv->operstate = state; */
-	return wpa_driver_wext_set_operstate(drv->wext, state);
-}
-
-const struct wpa_driver_ops wpa_driver_custom_ops = {
-	.name = TIWLAN_DRV_NAME,
-	.desc = "TI Station Driver (1271)",
-	.get_bssid = wpa_driver_tista_get_bssid,
-	.get_ssid = wpa_driver_tista_get_ssid,
-	.set_wpa = wpa_driver_tista_set_wpa,
-	.set_key = wpa_driver_tista_set_key,
-	.set_countermeasures = wpa_driver_tista_set_countermeasures,
-	.set_drop_unencrypted = wpa_driver_tista_set_drop_unencrypted,
-	.scan = wpa_driver_tista_scan,
-#ifdef WPA_SUPPLICANT_VER_0_6_X
-	.get_scan_results2 = wpa_driver_tista_get_scan_results,
-	.combo_scan = NULL,
-#else
-	.get_scan_results = wpa_driver_tista_get_scan_results,
-#endif
-	.deauthenticate = wpa_driver_tista_deauthenticate,
-	.disassociate = wpa_driver_tista_disassociate,
-	.associate = wpa_driver_tista_associate,
-	.set_auth_alg = wpa_driver_tista_set_auth_alg,
-	.get_mac_addr = wpa_driver_tista_get_mac_addr,
-	.init = wpa_driver_tista_init,
-	.deinit = wpa_driver_tista_deinit,
-	.add_pmkid = wpa_driver_tista_add_pmkid,
-	.remove_pmkid = wpa_driver_tista_remove_pmkid,
-	.flush_pmkid = wpa_driver_tista_flush_pmkid,
-	.set_operstate = wpa_driver_tista_set_operstate,
-#ifdef WPA_SUPPLICANT_VER_0_6_X
-	.set_mode = wpa_driver_tista_set_mode,
-	.set_probe_req_ie = wpa_driver_tista_set_probe_req_ie,
-#endif
-	.driver_cmd = wpa_driver_tista_driver_cmd
-};
diff --git a/wl1271/wpa_supplicant_lib/driver_ti.h b/wl1271/wpa_supplicant_lib/driver_ti.h
deleted file mode 100644
index c60d43e..0000000
--- a/wl1271/wpa_supplicant_lib/driver_ti.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef _DRIVER_TI_H_
-#define _DRIVER_TI_H_
-
-#include "wireless_copy.h"
-#include "common.h"
-#include "driver.h"
-#include "l2_packet.h"
-#include "eloop.h"
-#include "priv_netlink.h"
-#include "driver_wext.h"
-#include "wpa_ctrl.h"
-#include "wpa_supplicant_i.h"
-#include "config.h"
-#ifdef WPA_SUPPLICANT_VER_0_6_X
-#include "ieee802_11_defs.h"
-#else
-#include "wpa.h"
-#endif
-#include "cu_ostypes.h"
-#include "STADExternalIf.h"
-#include "convert.h"
-#include "shlist.h"
-
-#define TIWLAN_DRV_NAME         "tiwlan0"
-
-#define NUMBER_SCAN_CHANNELS_FCC        11
-#define NUMBER_SCAN_CHANNELS_ETSI       13
-#define NUMBER_SCAN_CHANNELS_MKK1       14
-
-#define RX_SELF_FILTER			0
-#define RX_BROADCAST_FILTER		1
-#define RX_IPV4_MULTICAST_FILTER	2
-#define RX_IPV6_MULTICAST_FILTER	3
-
-#define MAX_NUMBER_SEQUENTIAL_ERRORS	4
-
-typedef enum {
-	BLUETOOTH_COEXISTENCE_MODE_ENABLED = 0,
-	BLUETOOTH_COEXISTENCE_MODE_DISABLED,
-	BLUETOOTH_COEXISTENCE_MODE_SENSE
-} EUIBTCoexMode;
-
-struct wpa_driver_ti_data {
-	void *wext; /* private data for driver_wext */
-	void *ctx;
-	char ifname[IFNAMSIZ + 1];
-	int ioctl_sock;
-	u8 own_addr[ETH_ALEN];          /* MAC address of WLAN interface */
-	int driver_is_loaded;           /* TRUE/FALSE flag if driver is already loaded and can be accessed */
-	int scan_type;                  /* SCAN_TYPE_NORMAL_ACTIVE or  SCAN_TYPE_NORMAL_PASSIVE */
-	int force_merge_flag;		/* Force scan results merge */
-	int scan_channels;              /* Number of allowed scan channels */
-	unsigned int link_speed;        /* Link Speed */
-	u32 btcoex_mode;		/* BtCoex Mode */
-	int last_scan;			/* Last scan type */
-	SHLIST scan_merge_list;		/* Previous scan list */
-#ifdef CONFIG_WPS
-	struct wpabuf *probe_req_ie;    /* Store the latest probe_req_ie for WSC */
-#endif
-	int errors;			/* Number of sequential errors */
-};
-#endif